-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4aa97b024c33bfa1b9f7a0b45d2a65ccfb200353-02ffeb761823f3adc816.js
2 lines (2 loc) · 19 KB
/
4aa97b024c33bfa1b9f7a0b45d2a65ccfb200353-02ffeb761823f3adc816.js
1
2
"use strict";(self.webpackChunkgatsby_starter_hello_world=self.webpackChunkgatsby_starter_hello_world||[]).push([[961],{8263:function(t,r,e){e.d(r,{x:function(){return i}});var n=e(7294),o=e(9638);function a(){return(a=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}var i=function(t){return n.createElement(o.x,a({viewBox:"0 0 24 24",a11yTitle:"Close"},t),n.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"2",d:"M3,3 L21,21 M3,21 L21,3"}))}},7752:function(t,r,e){e.d(r,{Z:function(){return j}});var n=e(7294),o=e(8263),a=e(3935),i=e(4753),s=e(3336),l=e(9409),f=e(5298),u=e(1085),c=e(5384),p=e(3523),m=e(4192),d=e(9653),h=(0,s.css)(["left:-100%;right:100%;z-index:-1;position:fixed;"]),x=s.default.div.withConfig({displayName:"StyledLayer",componentId:"rmtehz-0"})([""," background:transparent;position:relative;z-index:",";pointer-events:none;outline:none;"," ",";"],m.Oh,(function(t){return t.theme.layer.zIndex}),(function(t){if("hidden"===t.position)return h;var r=[];if(t.targetBounds){var e=t.targetBounds,n=e.left,o=e.right,a=e.top,i=e.bottom;r.push("\n position: fixed;\n top: "+a+"px;\n left: "+n+"px;\n right: "+o+"px;\n bottom: "+i+"px;\n ")}else r.push("\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n");if(t.responsive&&t.theme.layer.responsiveBreakpoint){var s=t.theme.global.breakpoints[t.theme.layer.responsiveBreakpoint];r.push((0,d.bk)(s,"\n position: absolute;\n width: 100%;\n height: 100%;\n min-height: 100vh;\n"))}return r}),(function(t){return t.theme.layer&&t.theme.layer.extend}));x.defaultProps={},Object.setPrototypeOf(x.defaultProps,l.l);var g=s.default.div.withConfig({displayName:"StyledLayer__StyledOverlay",componentId:"rmtehz-1"})(["position:absolute;"," top:0px;left:0px;right:0px;bottom:0px;"," pointer-events:all;"],(function(t){if(t.responsive&&t.theme.layer.responsiveBreakpoint){var r=t.theme.global.breakpoints[t.theme.layer.responsiveBreakpoint];return(0,d.bk)(r,"position: relative;")}return""}),(function(t){return!t.plain&&t.theme.layer.overlay.background&&(0,p.Nu)(t.theme.layer.overlay.background,t.theme)})),v=function(t,r,e){var n=-1!==e.indexOf("top")||-1!==e.indexOf("bottom")?"vertical":"horizontal",o=t[e]||t[n]||t,a=r.global.edgeSize[o]||o;return!!r.global.edgeSize[o]||"string"==typeof o?(0,d.gd)(a):0},b=function(t,r,e,n){return void 0===n&&(n=void 0),n?t[n]+v(r,e,n):{bottom:t.bottom+v(r,e,"bottom"),end:t.right+v(r,e,"end"),left:t.left+v(r,e,"left"),right:t.right+v(r,e,"right"),start:t.left+v(r,e,"start"),top:t.top+v(r,e,"top")}},y={center:{vertical:(0,s.keyframes)(["0%{transform:translateX(-50%) scale(0.8);}100%{transform:translateX(-50%) scale(1);}"]),horizontal:(0,s.keyframes)(["0%{transform:translateY(-50%) scale(0.8);}100%{transform:translateY(-50) scale(1);}"]),true:(0,s.keyframes)(["0%{transform:scale(0.8);}100%{transform:scale(1);}"]),false:(0,s.keyframes)(["0%{transform:translate(-50%,-50%) scale(0.8);}100%{transform:translate(-50%,-50%) scale(1);}"])},top:{vertical:(0,s.keyframes)(["0%{transform:translate(-50%,-100%);}100%{transform:translate(-50%,0);}"]),horizontal:(0,s.keyframes)(["0%{transform:translateY(-100%);}100%{transform:translateY(0);}"]),true:(0,s.keyframes)(["0%{transform:translateY(-100%);}100%{transform:translateY(0);}"]),false:(0,s.keyframes)(["0%{transform:translate(-50%,-100%);}100%{transform:translate(-50%,0);}"])},bottom:{vertical:(0,s.keyframes)(["0%{transform:translate(-50%,100%);}100%{transform:translate(-50%,0);}"]),horizontal:(0,s.keyframes)(["0%{transform:translateY(100%);}100%{transform:translateY(0);}"]),true:(0,s.keyframes)(["0%{transform:translateY(100%);}100%{transform:translateY(0);}"]),false:(0,s.keyframes)(["0%{transform:translate(-50%,100%);}100%{transform:translate(-50%,0);}"])},left:{vertical:(0,s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),horizontal:(0,s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"]),true:(0,s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),false:(0,s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"])},right:{vertical:(0,s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),horizontal:(0,s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"]),true:(0,s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),false:(0,s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"])},start:{vertical:(0,s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),horizontal:(0,s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"]),true:(0,s.keyframes)(["0%{transform:translateX(-100%);}100%{transform:translateX(0);}"]),false:(0,s.keyframes)(["0%{transform:translate(-100%,-50%);}100%{transform:translate(0,-50%);}"])},end:{vertical:(0,s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),horizontal:(0,s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"]),true:(0,s.keyframes)(["0%{transform:translateX(100%);}100%{transform:translateX(0);}"]),false:(0,s.keyframes)(["0%{transform:translate(100%,-50%);}100%{transform:translate(0,-50%);}"])}},k=function(t,r,e){var n,o=void 0!==t.animation?t.animation:t.animate;return void 0===o&&(o="slide"),"slide"===o||!0===o?n=y[r][e]:"fadeIn"===o&&(n=(0,s.keyframes)(["0%{opacity:0}100%{opacity:1}"])),n?(0,s.css)(["animation:"," ","s ease-in-out forwards;"],n,.2):""},w={center:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;left:50%;transform:translateX(-50%);",""],t.top,t.bottom,(function(t){return k(t,"center","vertical")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;top:50%;transform:translateY(-50%);",""],t.left,t.right,(function(t){return k(t,"center","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"center","true")}))},false:function(){return(0,s.css)(["top:50%;left:50%;transform:translate(-50%,-50%);",""],(function(t){return k(t,"center","false")}))}},top:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;left:50%;transform:translate(-50%,0%);",""],t.top,t.bottom,(function(t){return k(t,"top","vertical")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;top:","px;transform:translateY(0);",""],t.left,t.right,t.top,(function(t){return k(t,"top","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateY(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"top","true")}))},false:function(t){return(0,s.css)(["top:","px;left:50%;transform:translate(-50%,0);",""],t.top,(function(t){return k(t,"top","false")}))}},bottom:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;left:50%;transform:translate(-50%,0);",""],t.top,t.bottom,(function(t){return k(t,"bottom","vertical")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;bottom:","px;transform:translateY(0);",""],t.left,t.top,t.bottom,(function(t){return k(t,"bottom","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateY(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"bottom","true")}))},false:function(t){return(0,s.css)(["bottom:","px;left:50%;transform:translate(-50%,0);",""],t.bottom,(function(t){return k(t,"bottom","false")}))}},left:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,(function(t){return k(t,"left","vertical")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;top:50%;transform:translate(0,-50%);",""],t.left,t.right,(function(t){return k(t,"left","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"left","true")}))},false:function(t){return(0,s.css)(["left:","px;top:50%;transform:translate(0,-50%);",""],t.left,(function(t){return k(t,"left","false")}))}},right:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.right,(function(t){return k(t,"right","vertical")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;top:50%;transform:translate(0,-50%);",""],t.left,t.right,(function(t){return k(t,"right","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"right","true")}))},false:function(t){return(0,s.css)(["right:","px;top:50%;transform:translate(0,-50%);",""],t.right,(function(t){return k(t,"right","false")}))}},start:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;inset-inline-start:","px;transform:translateX(0);",""],t.top,t.bottom,t.start,(function(t){return k(t,"start","vertical")}))},horizontal:function(t){return(0,s.css)(["inset-inline-start:","px;inset-inline-end:","px;top:50%;transform:translate(0,-50%);",""],t.start,t.end,(function(t){return k(t,"start","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;inset-inline-start:","px;inset-inline-end:","px;transform:translateX(0);",""],t.top,t.bottom,t.start,t.end,(function(t){return k(t,"start","true")}))},false:function(t){return(0,s.css)(["inset-inline-start:","px;top:50%;transform:translate(0,-50%);",""],t.start,(function(t){return k(t,"start","false")}))}},end:{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;inset-inline-end:","px;transform:translateX(0);",""],t.top,t.bottom,t.end,(function(t){return k(t,"end","vertical")}))},horizontal:function(t){return(0,s.css)(["inset-inline-start:","px;inset-inline-end:","px;top:50%;transform:translate(0,-50%);",""],t.start,t.end,(function(t){return k(t,"end","horizontal")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;inset-inline-start:","px;inset-inline-end:","px;transform:translateX(0);",""],t.top,t.bottom,t.start,t.end,(function(t){return k(t,"end","true")}))},false:function(t){return(0,s.css)(["inset-inline-end:","px;top:50%;transform:translate(0,-50%);",""],t.end,(function(t){return k(t,"end","false")}))}},"top-right":{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;right:","px;transform:translateX(0);",";"],t.top,t.bottom,t.right,(function(t){return k(t,"top","true")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;top:0;transform:translateX(0);",";"],t.left,t.right,(function(t){return k(t,"top","true")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",";"],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"top","true")}))},false:function(t){return(0,s.css)(["top:","px;right:","px;transform:translateY(0);",";"],t.top,t.right,(function(t){return k(t,"top","true")}))}},"top-left":{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,(function(t){return k(t,"top","true")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;top:0;transform:translateX(0);",""],t.left,t.right,(function(t){return k(t,"top","true")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"top","true")}))},false:function(t){return(0,s.css)(["top:","px;left:","px;transform:translateY(0);",""],t.top,t.left,(function(t){return k(t,"top","true")}))}},"bottom-right":{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.right,(function(t){return k(t,"bottom","true")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;bottom:","px;transform:translateY(0);",""],t.left,t.right,t.bottom,(function(t){return k(t,"bottom","true")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"bottom","true")}))},false:function(t){return(0,s.css)(["bottom:","px;right:","px;transform:translateY(0);",""],t.bottom,t.right,(function(t){return k(t,"bottom","true")}))}},"bottom-left":{vertical:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,(function(t){return k(t,"bottom","true")}))},horizontal:function(t){return(0,s.css)(["left:","px;right:","px;bottom:","px;transform:translateY(0);",""],t.left,t.right,t.bottom,(function(t){return k(t,"bottom","true")}))},true:function(t){return(0,s.css)(["top:","px;bottom:","px;left:","px;right:","px;transform:translateX(0);",""],t.top,t.bottom,t.left,t.right,(function(t){return k(t,"bottom","true")}))},false:function(t){return(0,s.css)(["bottom:","px;left:","px;transform:translateY(0);",""],t.bottom,t.left,(function(t){return k(t,"bottom","true")}))}}},z=(0,s.css)([""," max-height:",";max-width:",";border-radius:",";",";"],(function(t){return t.modal||"hidden"!==t.position?(0,s.css)(["position:",";"],t.modal?"absolute":"fixed"):h}),(function(t){return"calc(100% - "+b(t.targetBounds,t.margin,t.theme,"top")+"px - "+b(t.targetBounds,t.margin,t.theme,"bottom")+"px)"}),(function(t){return"calc(100% - "+b(t.targetBounds,t.margin,t.theme,"left")+"px - "+b(t.targetBounds,t.margin,t.theme,"right")+"px)"}),(function(t){return t.plain?0:t.theme.layer.border.radius}),(function(t){return"hidden"!==t.position&&w[t.position][t.full](b(t.targetBounds,t.margin,t.theme),t.targetBounds)||""})),X=(0,s.css)(["position:relative;max-height:none;max-width:none;border-radius:0;top:0;bottom:0;left:0;right:0;transform:none;animation:none;height:100vh;width:100vw;"]),E=s.default.div.withConfig({displayName:"StyledLayer__StyledContainer",componentId:"rmtehz-2"})([""," display:flex;flex-direction:column;min-height:",";"," outline:none;pointer-events:all;z-index:",";"," ",";"],(function(t){return t.modal?"":m.Oh}),(function(t){return t.theme.global.size.xxsmall}),(function(t){return!t.plain&&t.theme.layer.background&&(0,p.Nu)(t.theme.layer.background,t.theme)}),(function(t){return t.theme.layer.container.zIndex}),z,(function(t){if(t.responsive&&t.theme.layer.responsiveBreakpoint){var r=t.theme.global.breakpoints[t.theme.layer.responsiveBreakpoint];if(r)return(0,d.bk)(r,X)}return""}));function C(){return(C=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}E.defaultProps={},Object.setPrototypeOf(E.defaultProps,l.l);var O=s.default.a.withConfig({displayName:"LayerContainer__HiddenAnchor",componentId:"sc-1srj14c-0"})(["width:0;height:0;overflow:hidden;position:absolute;"]),Y=[],B={left:0,right:0,top:0,bottom:0},I=(0,n.forwardRef)((function(t,r){var e=t.children,o=t.full,a=void 0!==o&&o,m=t.id,d=t.margin,h=void 0===d?"none":d,v=t.modal,b=void 0===v||v,y=t.onClickOutside,k=t.onEsc,w=t.plain,z=t.position,X=void 0===z?"center":z,I=t.responsive,L=void 0===I||I,S=t.target,_=function(t,r){if(null==t)return{};var e,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)e=a[n],r.indexOf(e)>=0||(o[e]=t[e]);return o}(t,["children","full","id","margin","modal","onClickOutside","onEsc","plain","position","responsive","target"]),N=(0,n.useContext)(s.ThemeContext)||l.l.theme,P=(0,n.useState)(B),j=P[0],R=P[1],M=(0,n.useRef)(),T=(0,n.useRef)(),V=(0,n.useRef)(),A=(0,n.useContext)(c.w)||Y,D=(0,n.useMemo)((function(){return A.length}),[A]),H=(0,n.useMemo)((function(){return[].concat(A,[D])}),[A,D]);(0,n.useEffect)((function(){if("hidden"!==X){var t=V.current||T.current||r.current;t&&t.scrollIntoView&&t.scrollIntoView();for(var e=document.activeElement;e&&e!==T.current;)e=e.parentElement;b&&!e&&M.current&&M.current.focus()}}),[b,X,r]),(0,n.useEffect)((function(){if("hidden"!==X){var t=V.current||T.current||r.current;t&&t.scrollIntoView&&t.scrollIntoView()}}),[X,r]),(0,n.useEffect)((function(){var t=function(t){for(var r=null,e=t.target;null===r&&e!==document&&null!==e;){var n=e.getAttribute("data-g-portal-id");null!==n&&""!==n?r=parseInt(n,10):e=e.parentNode}null!==r&&-1===A.indexOf(r)||null===e||y(t)};if(y&&document.addEventListener("mousedown",t),S){var r=function(){var t=(0,i.zw)(S).getBoundingClientRect();R({left:t.left,right:window.innerWidth-t.right,top:t.top,bottom:window.innerHeight-t.bottom})};return r(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),function(){window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0),y&&document.removeEventListener("mousedown",t)}}return R(B),function(){y&&document.removeEventListener("mousedown",t)}}),[S,y,A,D]);var W=n.createElement(E,C({ref:r||T,id:m,full:a,margin:h,modal:b,targetBounds:b?B:j},_,{position:X,plain:w,responsive:L,dir:N.dir,"data-g-portal-id":D}),n.createElement(O,{ref:M,tabIndex:"-1","aria-hidden":"true"}),e);if(b&&(W=n.createElement(x,{ref:V,id:m,targetBounds:j,plain:w,position:X,responsive:L,tabIndex:"-1",dir:N.dir},n.createElement(g,{plain:w,responsive:L,onMouseDown:y}),W)),k&&(W=n.createElement(u.N,{onEsc:k},W)),N.layer.background){var q=(0,p.im)(N.layer.background,N);void 0!==q&&q!==N.dark&&(W=n.createElement(s.ThemeContext.Provider,{value:C({},N,{dark:q})},W))}return W=n.createElement(c.w.Provider,{value:H},W),b&&(W=n.createElement(f.l,{hidden:"hidden"===X,restrictScroll:!S||void 0,trapFocus:!0},W)),W})),L=e(9619);function S(){return(S=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}var _=(0,n.forwardRef)((function(t,r){var e=t.animate,o=t.animation,s=t.targetChildPosition,l=(0,n.useState)(),f=l[0],u=l[1];(0,n.useEffect)((function(){return u(document.activeElement)}),[]);var c=(0,n.useState)(),p=c[0],m=c[1],d=(0,n.useContext)(L.c);return(0,n.useEffect)((function(){return m((0,i.r9)(d,s))}),[d,s]),(0,n.useEffect)((function(){return function(){if(f&&(f.focus?setTimeout((function(){return f.focus()}),0):f.parentNode&&f.parentNode.focus&&f.parentNode.focus()),p)if(!1!==(void 0!==o?o:e)){var t=p.cloneNode(!0);t.id="layerClone",d.appendChild(t);var r=t.querySelector('[class*="StyledLayer__StyledContainer"]');r&&r.style&&(r.style.animationDirection="reverse"),setTimeout((function(){var t=document.getElementById("layerClone");t&&(d.removeChild(t),p.remove())}),200)}else d.removeChild(p)}}),[e,o,d,p,f]),p?(0,a.createPortal)(n.createElement(I,S({ref:r},t)),p):null}));_.displayName="Layer";var N=_,P=e(6289),j=function(t){t.full;var r=t.children,e=t.onClose;return n.createElement(N,{full:!0},n.createElement(P.x,{alignContent:"center",justify:"center",direction:"row"},n.createElement(P.x,{height:{min:"100%"},width:"80%",overflow:"scroll",pad:"medium",justify:"center",alignContent:"center"},n.createElement(o.x,{style:{cursor:"pointer"},color:"plain",onClick:function(){return e&&e()}}),r)))}}}]);
//# sourceMappingURL=4aa97b024c33bfa1b9f7a0b45d2a65ccfb200353-02ffeb761823f3adc816.js.map