"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8773],{357969:function(n,t,e){e.d(t,{O:function(){return i}});var r=e(652983);function i(n,t,e){(0,r.useEffect)(function(){if(t){var r=(null==e?void 0:e.capture)||!1;return document.addEventListener("mousedown",i,r),document.addEventListener("touchstart",i,r),function(){document.removeEventListener("mousedown",i,r),document.removeEventListener("touchstart",i,r)}}function i(e){[n].flat().some(function(n){var t;return null===(t=null==n?void 0:n.current)||void 0===t?void 0:t.contains(e.target)})||t(e)}},[n,t,e])}},908773:function(n,t,e){e.d(t,{E:function(){return S},G:function(){return O}});var r,i,o,c,u=e(940117),a=e(652983),f=e(63730),l=e(173898),s=(0,l.keyframes)(r||(r=(0,u.a)(["\n 0% { opacity: 0 }\n 100% { opacity: 1 }\n"],["\n 0% { opacity: 0 }\n 100% { opacity: 1 }\n"]))),d=l.default.div(i||(i=(0,u.a)(["\n cursor: pointer;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(50, 50, 50, 0.667);\n z-index: 1999;\n transition: 200ms;\n animation: "," 150ms ease-in-out;\n"],["\n cursor: pointer;\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: rgba(50, 50, 50, 0.667);\n z-index: 1999;\n transition: 200ms;\n animation: "," 150ms ease-in-out;\n"])),s),v="undefined"==typeof window?a.useEffect:a.useLayoutEffect;function m(n,t){if(n.current)for(var e in t)n.current.style[e]=t[e]}var h={backfaceVisibility:"hidden",transformStyle:"preserve-3d"},p={backfaceVisibility:"unset",willChange:"unset",transformStyle:"unset"};function g(n,t){return void 0===n&&(n=null),void 0===t&&(t=null),function(e){n&&n(e),t&&t(e)}}var w={active:!1,exiting:!1,duration:.3},y=function(n,t){return(0,u.c)((0,u.c)({},n),{transition:Object.keys(n).map(function(n){return n+" "+t+"s"}).join(", ")})},b={enter:{opacity:1},exit:{opacity:0}},E=function(n){return n.map(function(n){return Math.min(100,Math.max(0,n))})},x=e(524777);function R(n){var t=n.anchor,e=n.anchorToWindow,r=n.attach,i=n.childRef,o=n.children,c=n.margin,f=n.style,l=(0,u.b)(n,["anchor","anchorToWindow","attach","childRef","children","margin","style"]),s=(0,u._)((0,a.useState)({}),2),d=s[0],v=s[1],m=(0,a.useCallback)(function(){if(null==i?void 0:i.current){var n=e&&{bottom:0,height:window.innerHeight,left:0,right:0,top:0,width:window.innerWidth},o=L(i),a=n||L(t,window),f=function(n){var t=(0,u._)(n.attach,2),e=t[0],r=t[1],i=n.margin,o=n.rect,c=n.childRect;if(!o||!c)return{top:null,left:null};var a=o.top+o.height*(e[0]/100)-(c.height+2*i)*(r[0]/100),f=o.left+o.width*(e[1]/100)-(c.width+2*i)*(r[1]/100);return{top:(0,x.rem)(a<=0?o.bottom:a),left:(0,x.rem)(f<=0?o.right:f)}}({attach:r,margin:c,rect:a,childRect:o}),l=f.top,s=f.left;v(function(n){return(0,u.c)((0,u.c)({},n),{top:l,left:s,rect:a,childRect:o})})}},[t,e,r,i,c]);(0,a.useLayoutEffect)(function(){return m()},[]),(0,a.useLayoutEffect)(function(){var n=null==i?void 0:i.current;return window.addEventListener("resize",m),window.addEventListener("scroll",m),null==n||n.addEventListener("transitionend",m),function(){window.removeEventListener("resize",m),window.removeEventListener("scroll",m),null==n||n.removeEventListener("transitionend",m)}},[i,m]),(0,a.useLayoutEffect)(function(){h||p||m()});var h=d.top,p=d.left,g=function(n){var t;if(null===(t=null==n?void 0:n.ref)||void 0===t?void 0:t.current){var e=parseInt(getComputedStyle(n.ref.current).zIndex);if(e>0)return e}return 5e3}(o);return a.createElement(k,(0,u.c)({anchorToWindow:e,attach:r,childRect:d.childRect,children:o,margin:c,rect:d.rect,style:(0,u.c)((0,u.c)({},f),{top:h,left:p,zIndex:g})},l))}function L(n,t){var e=void 0===t?{}:t,r=e.scrollX,i=e.scrollY;if(n&&n.current){var o=n.current,c=o.offsetHeight,u=o.offsetWidth,a=n.current.getBoundingClientRect(),f=a.x,l=a.y,s=f+(void 0===r?0:r),d=l+(void 0===i?0:i);return{bottom:d+c,height:c,left:s,right:s+u,top:d,width:u}}return null}var k=l.default.div(c||(c=(0,u.a)(["\n position: fixed;\n margin: ",";\n overflow: visible;\n max-width: calc(100vw - 1.5rem) !important;\n\n ","\n"],["\n position: fixed;\n margin: ",";\n overflow: visible;\n max-width: calc(100vw - 1.5rem) !important;\n\n ","\n"])),function(n){return(0,x.rem)(n.margin)},function(n){return!n.anchorToWindow&&(0,l.css)(o||(o=(0,u.a)(["\n position: absolute;\n\n > div {\n max-width: 100%;\n\n > div {\n max-width: 100%;\n\n > * {\n max-width: 100%;\n }\n }\n }\n "],["\n position: absolute;\n\n > div {\n max-width: 100%;\n\n > div {\n max-width: 100%;\n\n > * {\n max-width: 100%;\n }\n }\n }\n "])))}),C=e(357969),_="undefined"==typeof document||null===document;function S(n,t){var e,r,i=(0,a.useRef)(null),o=(0,a.useRef)(null),c=(0,a.useRef)(null),l=t.allowPageInteraction,s=void 0!==l&&l,x=t.anchorToWindow,L=void 0!==x&&x,k=t.attach,S=t.forceActive,O=t.margin,W=t.onClick,j=t.screen,P=t.trigger,T=void 0===P?"click":P,z=function(n,t){var e=n.onOpen,r=n.onClose,i=n.forceActive,o=n.animation,c=void 0===o?b:o,f=t.childRef,l=t.screenRef,s=(0,u._)((0,a.useState)(w),2),d=s[0],E=s[1],x=d.active,R=d.exiting,L=d.duration,k=(0,a.useRef)(i),C=f.current,_=!0===i||!1===i,S=!i&&k.current;v(function(){if(C){var n,t,e=parseFloat((n=["animation-duration"],t=getComputedStyle(C),Object.assign.apply(Object,(0,u.e)([{}],(0,u._)(n.map(function(n){var e;return(e={})[n]=t.getPropertyValue(n),e})),!1)))["animation-duration"]);e&&L!==e&&E(function(n){return(0,u.c)((0,u.c)({},n),{duration:e})})}},[L,C]);var O=(0,a.useMemo)(function(){return function(n,t){var e,r,i,o=t.enter,c=t.exit;e=y(o,L),i=Object.keys(r=y(c,L)).join(" "),requestAnimationFrame(function(){m(n,(0,u.c)((0,u.c)((0,u.c)({},e),h),{willChange:i})),requestAnimationFrame(function(){m(n,(0,u.c)((0,u.c)({},r),p))})})}},[L]);v(function(){!_&&C&&R&&(O(f,c),screen&&O(l,b)),_&&(S&&(O(f,c),screen&&O(l,b),E(function(n){return(0,u.c)((0,u.c)({},n),{exiting:!0})})),k.current=i)},[O,c,f,_,C,R,i,S,l]);var W=g(function(){x||E(function(n){return(0,u.c)((0,u.c)({},n),{exiting:!1,active:!0})})},e),j=g(function(){x&&E(function(n){return(0,u.c)((0,u.c)({},n),{active:!0,exiting:!0})})},r);function P(){R&&E(function(n){return(0,u.c)((0,u.c)({},n),{exiting:!1,active:!1})})}var T={onAnimationStart:function(){return E(function(n){return(0,u.c)((0,u.c)({},n),{active:!0})})},onTransitionEnd:function(){return P()},onAnimationEnd:function(){return P()}};return _?R||S?{open:W,close:j,active:!0,animationProps:T}:{open:W,close:j,active:i,animationProps:T}:{open:W,close:j,active:x,animationProps:T}}(t,{childRef:o,screenRef:i}),A=z.open,I=z.close,M=z.active,F=z.animationProps,V=!0===S||!1===S,$=function(n){return!V&&M?I(n):A(n)};if((0,C.O)([c,o],function(n){s||V||"click"!==T||I(n)}),_)return[null,null];var q=(e="iris-portals",_?null:null!==(r=document.getElementById(e))&&void 0!==r?r:function(n){if(_)return null;var t=function(n,t){if(_)return null;var e=document.createElement("div");return Object.entries(t).map(function(n){var t=(0,u._)(n,2),r=t[0],i=t[1];return e[r]=i}),e}(0,{id:n});return document.body.appendChild(t),t}(e)),B=!V&&"click"===T&&{onClick:function(n){W&&W(n),$(n)}},H=(0,a.cloneElement)(n,(0,u.c)({ref:o},F)),N=(0,f.createPortal)(a.createElement(a.Fragment,null,a.createElement(R,{anchor:c,anchorToWindow:L,attach:function(n,t){if("string"==typeof n&&!t)switch(n){case"top":return[[0,50],[100,50]];case"topRight":return[[0,100],[100,0]];case"right":return[[50,100],[50,0]];case"bottomRight":return[[100,100],[0,0]];case"bottom":return[[100,50],[0,50]];case"bottomLeft":return[[100,0],[0,100]];case"left":return[[50,0],[50,100]];case"topLeft":return[[0,0],[100,100]]}if("string"==typeof n&&t)switch(n){case"top":return[[0,50],[0,50]];case"topRight":return[[0,100],[100,100]];case"right":return[[50,100],[100,100]];case"bottomRight":return[[100,100],[100,100]];case"bottom":return[[100,50],[100,50]];case"bottomLeft":return[[100,0],[100,0]];case"left":return[[50,0],[100,0]];case"topLeft":return[[0,0],[0,0]]}return n&&n.flatMap(function(n){return n}).some(function(n){return n<0||n>100})?(console.error("Invalid coordinates: ".concat(n,". Values must be 0 - 100.")),n.map(E)):n}(void 0===k?null:k,L),childRef:o,margin:void 0===O?8:O,children:H}),void 0!==j&&j&&a.createElement(d,{ref:i,onClick:$})),q);return[M&&N,(0,u.c)((0,u.c)({ref:c},B),!V&&"hover"===T&&{onMouseEnter:A,onMouseLeave:I})]}function O(n){var t=n.type;return"string"==typeof t||t.$$typeof&&"Symbol(react.forward_ref)"===t.$$typeof.toString()}}}]); //# sourceMappingURL=8773-334f64098df91e03.js.map