text: (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9404,3438],{30183:function(e,t,n){"use strict";var r=n(67105),i=n(24246),o=n(98502),a=n(20632),c=n(27524),s=n.n(c);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(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,r.Z)(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}t.Z=function(e){var t=e.children,n=(0,o.Z)(e,["children"]);return(0,i.jsx)(a.Z,u(u({colors:{0:"var(--wv-red)",50:"var(--wv-orange)",90:"var(--wv-green)"}},n),{},{children:(0,i.jsx)("span",{className:s().score,children:t})}))}},37801:function(e,t,n){"use strict";var r=n(24246),i=n(88742),o=n.n(i),a=n(40505),c=n(27378),s=n(17756),l=n(6882),u=n(2604),d=n(36427),p=n(27383),f=n(60189),h=n(89046),v=n(97165),m=n(85505),g=n(93632),y=n(55888),b=n(61659),j=n(45118),x=n(18213);t.Z=function(e){var t,n,i=e.active,O=e.close,Z=e.revalidateAnalytics,w=(0,c.useState)(!1),P=w[0],_=w[1],k=(0,c.useState)(null),D=k[0],S=k[1],C=(0,f.e1)(),N=(0,m.Z)(),E=(0,x.ZP)(),A=E.teamData,L=E.team,M=A?null===L||void 0===L||null===(t=L.billing)||void 0===t||null===(n=t.period)||void 0===n?void 0:n.end:null,I=(0,h.ic)(),R=(0,p.P)(I).revalidate,T=function(){var e=(0,a.Z)(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(!0),e.prev=1,S(null),t=(0,b.LP)(),e.next=6,(0,g.Z)("".concat(y._Q,"/").concat(I,"/disable").concat((0,v.c)({slug:N})),t,{method:"PUT",throwOnHTTPError:!0});case 6:return e.next=8,Promise.all([R(),Z()]);case 8:null!==C&&void 0!==C&&C.current&&C.current.success("Disabled Analytics successfully."),_(!1),O(),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(1),S(e.t0),_(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return A?(0,r.jsxs)(s.Modal,{active:i,onClickOutside:P?function(){}:O,children:[(0,r.jsxs)(s.Body,{children:[(0,r.jsx)(l.ZP,{h4:!0,Component:"h1",noMargin:!0,center:!0,children:"Disable Analytics"}),(0,r.jsx)(u.Z,{}),(0,r.jsx)(l.ZP,{preset:"body-2",noMargin:!0,type:"secondary",center:!0,children:L&&M?"Analytics tracking and storage for your project will be disabled at\n            the end of your current billing period, on ".concat((0,j.Z)(M,{month:"short",day:"numeric",year:"numeric"}),"."):"Analytics tracking and storage for your project will be disabled immediately."}),D&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Z,{}),(0,r.jsx)(d.Z,{error:D})]})]}),(0,r.jsxs)(s.Actions,{children:[(0,r.jsx)(s.Action,{onClick:O,disabled:P,children:"Cancel"}),(0,r.jsx)(s.Action,{loading:P,onClick:T,children:"Disable"})]})]}):null}},44933:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(24246),i=n(48115),o=n(27383),a=n(89046);function c(){var e,t=(0,a.ic)(),n=(0,o.P)(t).data,c=null===n||void 0===n||null===(e=n.analytics)||void 0===e?void 0:e.id;return(0,r.jsx)(i.Z,{text:["module.exports = {","  analyticsId: '".concat(c,"'"),"}"],prompt:!1,width:"100%"})}},2545:function(e,t,n){"use strict";n.d(t,{Rj:function(){return l},tC:function(){return u},T$:function(){return d}});var r=n(24246),i=n(79892),o=(n(27378),n(79894)),a=n(82209),c=n(16378),s=n(18213);function l(e,t,n){var r,i,o;if(!e)return"";var c=(0,a.Z)(e),s=c.project,l=c.idWithoutPrefix,u=(null===n||void 0===n?void 0:n.slug)||"team"in e&&(null===e||void 0===e||null===(r=e.team)||void 0===r?void 0:r.slug)||(null===t||void 0===t?void 0:t.username)||(null===t||void 0===t?void 0:t.uid)||(null===(i=e.creator)||void 0===i?void 0:i.username)||(null===(o=e.creator)||void 0===o?void 0:o.uid)||null;return"/".concat(encodeURIComponent(u),"/").concat(encodeURIComponent(s),"/").concat(l)}function u(e){return e?"/deployment/redirect?host=".concat(e):""}t.ZP=function(e){var t=e.deployment,n=e.host,a=e.alias,c=e.title,s=e.children,l=d(t),p=u(n);return(0,r.jsxs)("span",{className:"jsx-667885294 link-container",children:[(0,r.jsx)(o.default,{href:l||p,children:(0,r.jsx)("a",{title:c,className:"jsx-667885294 link",children:a||s||n||(null===t||void 0===t?void 0:t.host)||(null===t||void 0===t?void 0:t.url)})}),(0,r.jsx)(i.default,{id:"667885294",children:[".link.jsx-667885294{-webkit-text-decoration:none;text-decoration:none;color:var(--geist-foreground);font-weight:500;}",".link-container.jsx-667885294:hover .link.jsx-667885294{-webkit-text-decoration:underline;text-decoration:underline;}",".link-container.jsx-667885294:hover .deployment-link-content{-webkit-text-decoration:underline;text-decoration:underline;}"]})]})};var d=function(e){return l(e,(0,c.Z)().user,(0,s.ZP)().team)}},55096:function(e,t,n){"use strict";n.d(t,{D:function(){return s},A:function(){return l}});var r=n(24246),i=n(59523),o=n(71043),a=n(79642),c=n(11675);function s(e){var t=e.deployment,n=e.size,i=void 0===n?24:n;return(0,r.jsx)("span",{style:{display:"inline-block"},children:(0,r.jsx)(u,{deployment:t,size:i})})}function l(e){var t=e.deployment;if(!t)return null;if(t.meta.githubDeployment&&"string"===typeof t.meta.githubCommitAuthorLogin)return t.meta.githubCommitAuthorLogin;if(t.meta.gitlabDeployment&&"string"===typeof t.meta.gitlabCommitAuthorLogin)return t.meta.gitlabCommitAuthorLogin;if(t.meta.bitbucketDeployment){if("string"===typeof t.meta.bitbucketCommitAuthorLogin)return t.meta.bitbucketCommitAuthorLogin;if("string"===typeof t.meta.bitbucketCommitAuthorName)return t.meta.bitbucketCommitAuthorName}return t.creator.username}function u(e){var t=e.deployment,n=e.size;if(!t)return(0,r.jsx)(i.qE,{placeholder:!0,size:n});var s=l({deployment:t});return t.meta.githubDeployment&&"string"===typeof t.meta.githubCommitAuthorLogin?(0,r.jsx)(a.O,{iconBackground:!0,size:n,username:t.meta.githubCommitAuthorLogin}):t.meta.gitlabDeployment&&"string"===typeof t.meta.gitlabCommitAuthorAvatar&&"string"===typeof t.meta.gitlabCommitAuthorLogin?(0,r.jsx)(c.n,{iconBackground:!0,size:n,url:t.meta.gitlabCommitAuthorAvatar,username:t.meta.gitlabCommitAuthorLogin}):t.meta.bitbucketDeployment&&"string"===typeof t.meta.bitbucketCommitAuthorAvatar?(0,r.jsx)(o.K,{iconBackground:!0,size:n,url:t.meta.bitbucketCommitAuthorAvatar,username:s||void 0}):(0,r.jsx)(i.qE,{size:n,uid:t.creator.uid,username:t.creator.username})}},71694:function(e,t,n){"use strict";var r=n(67105),i=n(24246),o=n(98502),a=n(27378),c=n(87858),s=n(58093);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(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,r.Z)(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}var d=function(e){var t=e.width,n=void 0===t?14:t,r=e.height,a=void 0===r?14:r,c=e.color,l=void 0===c?"#0052CC":c,d=e.border,p=(0,o.Z)(e,["width","height","color","border"]),f="bitbucket-".concat((0,s.Z)());return(0,i.jsxs)("svg",u(u({width:n,height:a,viewBox:"-2 -2 65 59"},p),{},{children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("linearGradient",{x1:"104.953%",y1:"21.921%",x2:"46.569%",y2:"75.234%",id:f,children:[(0,i.jsx)("stop",{stopColor:l,stopOpacity:".4",offset:"7%"}),(0,i.jsx)("stop",{stopColor:l,offset:"100%"})]})}),d?(0,i.jsx)("path",{stroke:"white",strokeWidth:4,d:"M59.696 18.86h-18.77l-3.15 18.39h-13L9.426 55.47a2.71 2.71 0 001.75.66h40.74a2 2 0 002-1.68l5.78-35.59z M2 .82a2 2 0 00-2 2.32l8.49 51.54a2.7 2.7 0 00.91 1.61 2.71 2.71 0 001.75.66l15.76-18.88H24.7l-3.47-18.39h38.44l2.7-16.53a2 2 0 00-2-2.32L2 .82z"}):null,(0,i.jsx)("path",{d:"M59.696 18.86h-18.77l-3.15 18.39h-13L9.426 55.47a2.71 2.71 0 001.75.66h40.74a2 2 0 002-1.68l5.78-35.59z",fill:"url(#".concat(f,")"),fillRule:"nonzero",transform:"translate(-.026 .82)"}),(0,i.jsx)("path",{d:"M2 .82a2 2 0 00-2 2.32l8.49 51.54a2.7 2.7 0 00.91 1.61 2.71 2.71 0 001.75.66l15.76-18.88H24.7l-3.47-18.39h38.44l2.7-16.53a2 2 0 00-2-2.32L2 .82z",fill:l,fillRule:"nonzero"})]}))};t.Z=(0,c.l)((0,a.memo)(d),"bitbucket")},97127:function(e,t,n){"use strict";var r=n(67105),i=n(24246),o=n(98502),a=n(27378),c=n(87858);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){var t=e.monochrome,n=e.height,r=e.width,a=e.color,c=e.label,s=(0,o.Z)(e,["monochrome","height","width","color","label"]);return(0,i.jsxs)("svg",l(l({width:r||14,height:n||14,viewBox:"0 0 24 22","aria-label":c||"gitlab"},s),{},{children:[(0,i.jsx)("path",{d:"M1.279 8.29L.044 12.294c-.117.367 0 .78.325 1.014l11.323 8.23-.009-.012-.03-.039L1.279 8.29zM22.992 13.308a.905.905 0 00.325-1.014L22.085 8.29 11.693 21.52l11.299-8.212z",fill:t?"currentColor":a||"#FCA326"}),(0,i.jsx)("path",{d:"M1.279 8.29l10.374 13.197.03.039.01-.006L22.085 8.29H1.28z",fill:t?"currentColor":a||"#E24329",opacity:t&&"0.4"}),(0,i.jsx)("path",{d:"M15.982 8.29l-4.299 13.236-.004.011.014-.017L22.085 8.29h-6.103zM7.376 8.29H1.279l10.374 13.197L7.376 8.29z",fill:t?"currentColor":a||"#FC6D26",opacity:t&&"0.6"}),(0,i.jsx)("path",{d:"M18.582.308l-2.6 7.982h6.103L19.48.308c-.133-.41-.764-.41-.897 0zM1.279 8.29L3.88.308c.133-.41.764-.41.897 0l2.6 7.982H1.279z",fill:t?"currentColor":a||"#E24329",opacity:t&&"0.4"})]}))};t.Z=(0,c.l)((0,a.memo)(u),"gitlab")},71043:function(e,t,n){"use strict";n.d(t,{K:function(){return u}});var r=n(67105),i=n(24246),o=n(98502),a=n(27378),c=n(71694),s=n(50584);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=function(e){var t=e.size,n=void 0===t?30:t,a=e.showIcon,u=void 0===a||a,d=e.iconSize,p=void 0===d?14:d,f=e.iconBackground,h=void 0===f||f,v=(0,o.Z)(e,["size","showIcon","iconSize","iconBackground"]);return(0,i.jsx)(s.Z,function(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,r.Z)(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}({size:n,icon:u&&(0,i.jsx)(c.Z,{background:h,width:p,height:p,border:!0})},v))};u.displayName="ButbucketAvatar",t.Z=(0,a.memo)(u)},79642:function(e,t,n){"use strict";n.d(t,{O:function(){return u}});var r=n(67105),i=n(24246),o=n(98502),a=n(27378),c=n(45093),s=n(50584);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=function(e){var t=e.username,n=e.size,a=void 0===n?30:n,u=(e.showIcon,e.iconSize),d=void 0===u?14:u,p=e.iconBackground,f=void 0===p||p,h=e.icon,v=void 0===h?(0,i.jsx)(c.Z,{background:f,width:d,height:d}):h,m=(0,o.Z)(e,["username","size","showIcon","iconSize","iconBackground","icon"]);t||(t="404");var g=t&&"https://avatars.githubusercontent.com/".concat(t.replace("[bot]",""),"?s=").concat(2*a);return(0,i.jsx)(s.Z,function(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,r.Z)(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}({size:a,src:g,icon:v},m))};u.displayName="GitHubAvatar",t.Z=(0,a.memo)(u)},11675:function(e,t,n){"use strict";n.d(t,{n:function(){return u}});var r=n(67105),i=n(24246),o=n(98502),a=n(27378),c=n(97127),s=n(50584);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=function(e){var t=e.url,n=e.size,a=void 0===n?30:n,u=e.showIcon,d=void 0===u||u,p=e.iconSize,f=void 0===p?14:p,h=e.iconBackground,v=void 0===h||h,m=(0,o.Z)(e,["url","size","showIcon","iconSize","iconBackground"]);return t&&(m=Object.assign(m,{src:t})),(0,i.jsx)(s.Z,function(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,r.Z)(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}({size:a,icon:d&&(0,i.jsx)(c.Z,{background:v,width:f,height:f})},m))};u.displayName="GitLabAvatar",t.Z=(0,a.memo)(u)},50584:function(e,t,n){"use strict";var r=n(24246),i=n(67105),o=n(98502),a=n(27378),c=n(59523),s=n(14923),l=n.n(s),u=n(2576);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){var t=e.icon,n=e.left,a=e.right,s=e.size,d=e.bottom,f=void 0===d?-5:d,h=e.iconTitle,v=(0,o.Z)(e,["icon","left","right","size","bottom","iconTitle"]);return void 0===a&&void 0===n&&(n=-3),(0,r.jsxs)("div",{className:l().wrapper,style:(0,i.Z)({},"--size",(0,u.Z)(s)),children:[(0,r.jsx)(c.ZP,p({size:s},v)),(0,r.jsx)("div",{className:l().icon,style:{left:n,bottom:f,right:a},"aria-hidden":!0,title:h,children:t})]})};f.displayName="AvatarWithIcon",t.Z=(0,a.memo)(f)},12455:function(e,t,n){"use strict";var r=n(24246),i=n(67105),o=n(38944),a=n(38038),c=n.n(a);t.Z=function(e){var t=e.children,n=e.className,a=e.noWrap,s=e.title,l=e.style;return(0,r.jsx)("code",{style:l,className:(0,o.Z)(c().code,n,(0,i.Z)({},c().nowrap,a)),title:s,"data-geist-inline-code":"",children:t})}},28518:function(e,t,n){"use strict";var r=n(24246),i=n(67105),o=n(27378),a=n(38944),c=n(21985),s=n(61918),l=n(81970),u=n.n(l);function d(e){var t,n=e.title,o=e.content,l=e.tooltip,d=e.right,p=e.className,f=e.ellipsis;return(0,r.jsxs)("dl",{className:(0,a.Z)(u().description,(t={},(0,i.Z)(t,u().right,d),(0,i.Z)(t,u().ellipsis,f),t),p),children:[(0,r.jsxs)("dt",{"data-geist-description-title":"",children:[n,l?(0,r.jsx)("span",{className:u().icon,children:(0,r.jsx)(s.Z,{text:l,children:(0,r.jsx)(c.Z,{})})}):null]}),(0,r.jsx)("dd",{"data-geist-description-content":"",children:o})]})}t.Z=o.memo(d)},36427:function(e,t,n){"use strict";var r=n(67105),i=n(24246),o=n(27378),a=n(38944),c=n(48298),s=n(2604),l=n(9388),u=n.n(l),d=n(89004),p=n(63677),f=function(e){var t,n=e.id,l=e.style,f=e.label,h=void 0===f?"Error":f,v=e.className,m=e.children,g=e.size,y=e.error;var b=(0,d.U)(g),j=(0,o.useMemo)((function(){return m||(o.isValidElement(y)?y:y&&"object"===typeof y?(0,i.jsxs)(i.Fragment,{children:[y.message,y.link?(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsx)("span",{className:u()["action-link"],children:(0,i.jsxs)(p.Z,{type:"blend",href:y.link,children:[null!==(e=y.action)&&void 0!==e?e:"Learn More"," \u2192"]})})]}):null]}):y);var e}),[m,y]);return(0,i.jsxs)("div",{role:"alert","aria-atomic":"true",className:(0,a.Z)(u().error,v,(t={},(0,r.Z)(t,u().label,!!h),(0,r.Z)(t,u().large,"large"===g),(0,r.Z)(t,u().small,"small"===g),t)),id:n,style:l,"data-geist-error":"",children:[(0,i.jsx)("div",{"aria-hidden":!0,children:(0,i.jsx)(c.Z,{size:b,color:"var(--geist-error)",weight:"bold",align:"bottom"})}),(0,i.jsxs)("div",{className:u().text,children:[h&&(0,i.jsxs)("b",{children:[h,":"]}),(0,i.jsx)(s.Z,{inline:!0,x:.25}),j]})]})};f.displayName="Error",t.Z=(0,o.memo)(f)},43572:function(e,t,n){"use strict";var r=n(24246),i=n(67105),o=n(98502),a=n(27378),c=n(38944),s=n(68677),l=n(11248),u=n.n(l),d=n(47045),p=n(73521),f=n(13970),h=n(58093),v=n(89004),m=n(2604),g=n(36427);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t){var n,l=e.disabled,y=e.label,j=e.typeName,x=void 0===j?"text":j,O=e.prefix,Z=e.suffix,w=e.prefixStyling,P=void 0===w||w,_=e.prefixContainer,k=void 0===_||_,D=e.suffixStyling,S=void 0===D||D,C=e.suffixContainer,N=void 0===C||C,E=e.width,A=e.error,L=e.type,M=e.size,I=e.className,R=(0,o.Z)(e,["disabled","label","typeName","prefix","suffix","prefixStyling","prefixContainer","suffixStyling","suffixContainer","width","error","type","size","className"]),T=y?s.Z:a.Fragment,z=b({},y&&{value:y,withInput:!0,style:{width:E},id:R.id}),F=(0,d.B)()||l,B=(0,h.Z)("input-");L=A?"error":L;var U=(0,f.Z)(L);return(0,r.jsxs)(T,b(b({},z),{},{children:[(0,r.jsx)("div",{className:(0,c.Z)(u().container,U,(n={},(0,i.Z)(n,u().prefix,O),(0,i.Z)(n,u().suffix,Z),(0,i.Z)(n,u().noPrefixStyle,!P),(0,i.Z)(n,u().noSuffixStyle,!S),(0,i.Z)(n,u().large,"large"===M),(0,i.Z)(n,u().small,"small"===M),n)),style:{width:E},"data-geist-input-wrapper":"",children:(0,r.jsxs)(p.lO.Provider,{value:(0,v.U)(M),children:[(0,r.jsx)("input",b(b({},R),{},{className:(0,c.Z)(u().input,I),disabled:F,type:x,ref:t,"aria-invalid":!!A,"aria-describedby":A?"".concat(B,"-error"):void 0,"data-geist-input":""})),O&&(k?(0,r.jsx)("span",{"data-geist-input-prefix":"",children:O}):O),Z&&(N?(0,r.jsx)("span",{"data-geist-input-suffix":"",children:Z}):Z)]})}),A&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.Z,{y:.5}),(0,r.jsx)(g.Z,{id:"".concat(B,"-error"),style:{width:E},size:M,error:A})]})]}))}j.displayName="Input",t.Z=(0,a.memo)((0,a.forwardRef)(j))},33438:function(e,t,n){"use strict";n.d(t,{v2:function(){return L},j2:function(){return A},R:function(){return O},sN:function(){return R},Uk:function(){return T},xw:function(){return Z},XG:function(){return M}});var r=n(24246),i=n(67105),o=n(98502),a=n(27378),c=n(33488),s=n(55911),l=n(84932),u=n(95324),d=n(58093),p=n(74497),f=n(60042),h=n.n(f),v=n(73521),m=n(55543),g=n.n(m);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=(0,a.forwardRef)((function(e,t){var n,a=e.children,c=e.width,s=void 0===c?150:c,l=e.height,u=e.className,d=e.style,p=e.variant,f=e.divide,v=(0,o.Z)(e,["children","width","height","className","style","variant","divide"]);return(0,r.jsx)("ul",b(b({},v),{},{"data-geist-menu":"",role:"menu",tabIndex:-1,className:h()(u,g().menu,(n={},(0,i.Z)(n,g().divide,f),(0,i.Z)(n,g().loose,"loose"===p),n)),style:b(b({},d),{},{width:s,maxHeight:l}),ref:t,children:a}))}));j.displayName="MenuInner";var x=(0,a.forwardRef)((function(e,t){var n=e.children,a=e.suffix,c=e.prefix,s=e.className,l=e.Component,u=void 0===l?"li":l,d=e.type,p=(0,o.Z)(e,["children","suffix","prefix","className","Component","type"]);return(0,r.jsxs)(u,b(b({},p),{},{"data-geist-menu-item":"",role:"menuitem",tabIndex:-1,className:h()(s,g().item,(0,i.Z)({},g().error,"error"===d)),ref:t,children:[c&&(0,r.jsx)(v.lO.Provider,{value:18,children:(0,r.jsx)("span",{className:g().prefix,"aria-hidden":!0,children:c})}),n,a&&(0,r.jsx)(v.lO.Provider,{value:18,children:(0,r.jsx)("span",{className:g().suffix,"aria-hidden":!0,children:a})})]}))}));x.displayName="MenuItemInner";var O=function(){return(0,r.jsx)("li",{role:"separator",className:g().divider,"data-geist-menu-divider":""})},Z=function(e){var t=e.title,n=e.children,i=(0,d.Z)("menu-section-");return(0,r.jsxs)("li",{role:"presentation",className:g().section,"dat-geist-menu-section":"",children:[(0,r.jsx)("span",{"aria-hidden":!0,id:i,className:g().title,children:t}),(0,r.jsx)("ul",{role:"group","aria-labelledby":i,children:n})]})},w=function(e){var t=e.element,n=e.active,r=void 0===n||n,i=e.onClickOutside,o=e.event,c=void 0===o?"click":o,s=(0,a.useCallback)((function(e){t&&!t.contains(e.target)&&i()}),[i,t]);(0,a.useEffect)((function(){if(r&&t)return document.addEventListener(c,s),function(){document.removeEventListener(c,s)};document.removeEventListener(c,s)}),[r,t,s,c])},P=n(63677),_=n(96536),k=n(79455);function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=(0,a.createContext)({menuId:"",buttonId:"",open:!1,listRef:null,buttonRef:null,selected:-1,typeahead:"",popperAttributes:{},popperStyles:{},selectFirstNonDisabled:function(){},setSelected:function(){},setOpen:function(){},afterSelect:function(){},handleKey:function(){},closeAndRestoreFocus:function(){}}),N=function(){return(0,a.useContext)(C)},E=(0,c.hS)(),A=function(e){var t=e.children,n=(0,o.Z)(e,["children"]),i=N(),a=i.menuId,c=i.buttonId,s=i.open,l=i.setOpen,d=i.setSelected,f=i.selectFirstNonDisabled,h=i.buttonRef,v=i.popperAttributes,m=i.popperStyles,g=i.reference;return(0,r.jsx)(p.Z,S(S(S({},n),{},{ref:(0,u.Z)([h,g]),id:c,onMouseDown:function(e){"mouse"===e.pointerType&&(d(-1),l((function(e){return!e})))},onClick:function(e){"mouse"!==e.pointerType&&l((function(e){return!e}))},onKeyDown:function(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),l(!0),f();break;case"Enter":case" ":e.preventDefault(),l(!0),f()}},"aria-haspopup":!0,"aria-expanded":s,"aria-controls":a,"data-geist-menu-button":"",style:m.reference},v.reference),{},{children:t}))},L=function(e){var t=e.children,n=e.arrow,i=void 0===n||n,a=(0,o.Z)(e,["children","arrow"]),c=N(),l=c.menuId,u=c.buttonId,d=c.open,p=c.listRef,f=c.popper,h=c.arrow,v=c.popperStyles,m=c.popperAttributes,y=c.handleKey,b=c.closeAndRestoreFocus,x=(0,k.dD)(),O=(0,r.jsx)(j,S(S({id:l,"aria-labelledby":u,ref:p},a),{},{onKeyDown:y,children:t}));return x?(0,r.jsx)(_.default,{onDismiss:b,show:d,children:O}):(0,r.jsx)(s.Z,{children:(0,r.jsxs)("div",S(S({className:g().wrapper,ref:f,style:v.popper},m.popper),{},{hidden:!d,children:[i&&(0,r.jsx)("div",{ref:h,className:g().arrow,style:v.arrow}),O]}))})},M=function(e){var t=e.children,n=e.defaultOpen,i=void 0!==n&&n,s=e.closeOnSelect,u=void 0===s||s,p=e.rotate,f=void 0!==p&&p,h=e.position,v=void 0===h?"bottom-start":h,m=(0,a.useState)(""),g=m[0],y=m[1],b=(0,a.useState)(i),j=b[0],x=b[1],O=(0,a.useState)(-1),Z=O[0],P=O[1],_=(0,a.useRef)(Z);_.current=Z;var k=(0,d.Z)("menu-"),D=(0,d.Z)("menu-button-"),S=(0,c.Ak)(),N=S.ref,A=(0,o.Z)(S,["ref"]),L=A.list,M=A.map,I=(0,a.useState)(null),R=I[0],T=I[1],z=(0,a.useState)(null),F=z[0],B=z[1],U=(0,a.useState)(null),H=U[0],K=U[1],W=(0,a.useRef)(null),q=(0,l.D)(j?R:null,j?F:null,{placement:v,modifiers:[{name:"arrow",options:{element:H,padding:5}},{name:"offset",options:{offset:[0,10]}}]}),J=q.styles,G=q.attributes,V=(0,a.useCallback)((function(){x(!1),setTimeout((function(){var e;null===(e=W.current)||void 0===e||e.focus()}),1)}),[]),X=(0,a.useCallback)((function(){u&&V()}),[u,V]),Y=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"forward";P((function(t){var n,r=t,i="backward"===e,o=i?-1:L.current.length,a=i?t-1:t+1,c=i?L.current.length:-1;-2===a&&f&&i&&(r=c-1);for(var s=a;i?s>=o:s<=o;i?s--:s++){var l=L.current[s];if(!l||i?s<=o:s>=o){if(f){s=c;continue}r=t;break}if(!l.disabled){r=s;break}}var u=L.current[r];return null===u||void 0===u||null===(n=u.element)||void 0===n||n.scrollIntoView({block:"nearest"}),r}))}),[f,L]),Q=(0,a.useCallback)((function(e){switch(e.key){case"Escape":V();break;case"ArrowDown":case"ArrowRight":e.preventDefault(),Y("forward");break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),Y("backward");break;case"Home":P(0);break;case"End":P(L.current.length-1);break;case"Tab":e.preventDefault();break;case"Backspace":y("");break;case"Enter":case" ":var t;if(-1===_.current)break;var n=L.current[_.current],r=n._internalId,i=M.current[r];if(i.disabled)break;if(i.isLink&&n.element)return n.element.click(),void X();null===i||void 0===i||null===(t=i.onClick)||void 0===t||t.call(i),X();break;default:"string"===typeof e.key&&1===e.key.length&&y((function(t){return t+e.key.toLowerCase()}))}}),[X,L,M,Y,V]);w({element:N.current,active:j,onClickOutside:(0,a.useCallback)((function(){return x(!1)}),[]),event:"mousedown"}),(0,a.useEffect)((function(){j&&window.requestAnimationFrame((function(){var e;null===(e=N.current)||void 0===e||e.focus()}))}),[j,N]),(0,a.useEffect)((function(){j||(P(-1),y(""))}),[j]),(0,a.useEffect)((function(){if(g){var e=function(e,t,n){if(!n)return null;var r=e.findIndex((function(e){var r=t[e._internalId],i=r.value;return!r.disabled&&(null===i||void 0===i?void 0:i.toLowerCase().startsWith(n))}));return-1!==r?r:null}(L.current,M.current,g);null!=e&&P(e);var t=setTimeout((function(){y("")}),1e3);return function(){clearTimeout(t)}}}),[g,L,M]);return(0,r.jsx)(E.Provider,{value:A,children:(0,r.jsx)(C.Provider,{value:{menuId:k,buttonId:D,open:j,setOpen:x,listRef:N,popper:B,reference:T,arrow:K,selected:Z,setSelected:P,buttonRef:W,typeahead:g,afterSelect:X,popperStyles:J,popperAttributes:G,selectFirstNonDisabled:function(){var e=L.current.findIndex((function(e){return!e.disabled}));P(e)},handleKey:Q,closeAndRestoreFocus:V},children:t})})},I=function(){},R=function(e){var t=e.children,n=e.disabled,i=e.onClick,a=void 0===i?I:i,s=e.value,l=e.isLink,u=(0,o.Z)(e,["children","disabled","onClick","value","isLink"]),p=(0,d.Z)("menu-item-"),f=N(),h=f.selected,v=f.setSelected,m=f.afterSelect,y=(0,c.Yf)(E,{value:s||("string"===typeof t?t:void 0),disabled:n,onClick:a,isLink:l}),b=y.index,j=y.ref,O=h===b;O&&v(b);var Z="string"===typeof t,w=(0,r.jsx)(x,S(S({},u),{},{ref:j,"aria-labelledby":Z?p:void 0,"aria-disabled":n||void 0,onPointerUp:function(){n||(l||a(),m())},onPointerMove:n?void 0:function(){return v(b)},"data-selected":O?"":void 0,className:g().item,Component:l?P.Z:void 0,children:Z?(0,r.jsx)("span",{id:p,children:t}):t}));return l?(0,r.jsx)("li",{role:"none","data-geist-menu-item":"","data-geist-menu-link":"",children:w}):w},T=function(e){var t=e.children,n=(0,o.Z)(e,["children"]);return(0,r.jsx)(R,S(S({},n),{},{isLink:!0,children:t}))}},17756:function(e,t,n){"use strict";n.r(t),n.d(t,{Action:function(){return O},Actions:function(){return Z},Body:function(){return k},Error:function(){return C},Header:function(){return D},Inset:function(){return A},Modal:function(){return g},Outset:function(){return L},P:function(){return S},Subtitle:function(){return _},Title:function(){return P},default:function(){return g}});var r=n(67105),i=n(24246),o=(n(27378),n(38944)),a=n(389),c=n.n(a),s=n(65218),l=n(3111),u=n(93066),d=n(96637),p=n(35668),f=n.n(p),h=n(79455),v=n(75885),m=(0,s.default)((function(){return Promise.all([n.e(8944),n.e(6536)]).then(n.bind(n,96536))}),{ssr:!1,loadableGenerated:{webpack:function(){return[96536]},modules:["../geist/modal/modal.tsx -> ../drawer"]}}),g=function(e){var t=e.active,n=e.activeRenderDelay,a=e.children,s=e.onAnimationDone,p=e.onEnterKeyPress,g=e.onClickOutside,y=e.width,b=e.allowOverflow,j=(0,h.dD)(),x=(0,v.Z)(t,{enterDelay:n||-1,exitDelay:n||350,onUnmount:s}),O=x.mounted,Z=x.rendered;return O?j?(0,i.jsx)(m,{show:t,onDismiss:g,onAnimationDone:s,children:a}):(0,i.jsx)(u.Z,{handlers:{ESC:g,ENTER:p},useKeys:Z,children:(0,i.jsx)(l.Z,{active:Z,onClick:g,render:function(e){var t,n=e.innerRef;return(0,i.jsx)(d.Z,{active:Z,children:(0,i.jsx)("div",{className:(0,o.Z)(f().wrapper,(t={},(0,r.Z)(t,f().active,Z),(0,r.Z)(t,f().allowOverflow,b),t)),ref:n,style:{width:y||420},"data-geist-modal":"",children:(0,i.jsx)(c(),{children:a})})})}})}):null},y=n(98502),b=n(36776);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=function(e){var t=e.children,n=e.onClick,r=e.disabled,o=e.loading,a=e.tabIndex,c=e.type,s=void 0===c?"button":c,l=(0,y.Z)(e,["children","onClick","disabled","loading","tabIndex","type"]);return(0,i.jsx)("button",x(x({className:f().action,disabled:r||o,onClick:r||o?void 0:n,tabIndex:a,type:s},l),{},{"data-geist-modal-action":"",children:o?(0,i.jsx)(b.Z,{size:4,height:"14px"}):t}))},Z=function(e){var t=e.children;return(0,i.jsx)("footer",{className:f().actions,"data-geist-modal-actions":"",children:t})},w=n(6882),P=function(e){var t=e.children;return(0,i.jsx)(w.ZP,{h3:!0,center:!0,noMargin:!0,"data-geist-modal-title":"",children:t})},_=function(e){var t=e.children;return(0,i.jsx)(w.ZP,{noMargin:!0,type:"secondary",preset:"body-2",center:!0,"data-geist-modal-subtitle":"",children:t})},k=function(e){var t=e.padding,n=void 0===t||t,a=e.children,c=e.className;return(0,i.jsx)("div",{className:(0,o.Z)(f().modalBody,c,(0,r.Z)({},f().padding,n)),"data-geist-modal-body":"",children:a})},D=function(e){var t=e.children;return(0,i.jsx)("header",{className:f().header,"data-geist-modal-header":"",children:(0,i.jsx)("h3",{children:t})})},S=function(e){var t=e.children;return(0,i.jsx)("div",{className:f().modalParagraph,"data-geist-modal-paragraph":"",children:t})},C=function(e){var t=e.children;return(0,i.jsx)("header",{className:f().error,"data-geist-modal-error":"",children:(0,i.jsx)("h3",{children:t})})},N=n(60042),E=n.n(N),A=function(e){var t=e.last,n=e.children;return(0,i.jsx)("div",{className:E()(f().inset,(0,r.Z)({},f().last,t)),children:n})},L=function(e){var t=e.children;return(0,i.jsx)("div",{className:f().outset,children:t})}},20632:function(e,t,n){"use strict";var r=n(24246),i=n(67105),o=n(98502),a=n(27378),c=n(38944),s=n(37815),l=n(71090),u=n.n(l);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.backgroundColor,n=e.colors,l=e.value,d=e.size,f=e.placeholder,h=e.children,v=e.className,m=e.style,g=(0,o.Z)(e,["backgroundColor","colors","value","size","placeholder","children","className","style"]);f=(0,s.J)()||f;var y=(0,a.useMemo)((function(){if(n&&l){var e=Object.keys(n);if(e&&0!==e.length){var t=e.filter((function(e){return l>=Number(e)})).pop();return t?n[t]:"var(--geist-foreground)"}}}),[n,l]);return(0,r.jsxs)("div",p(p({className:(0,c.Z)(u().circle,v,(0,i.Z)({},u().animate,!f)),style:p(p({},m),{},(0,i.Z)({},"--value","number"===typeof l?l/100*332:void 0)),"data-geist-progress-circle":""},g),{},{children:[(0,r.jsxs)("svg",{viewBox:"0 0 120 120",fill:"none",strokeWidth:"2",width:d,height:d,children:[(0,r.jsx)("circle",{r:"53",cx:"60",cy:"60",strokeDashoffset:"0",stroke:t||"var(--accents-2)",strokeWidth:12,"data-geist-progress-circle-bg":""}),(0,r.jsx)("circle",{className:u().arc,transform:"rotate(-90 60 60)",strokeDasharray:"0 340",strokeDashoffset:"0",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:12,stroke:y||"transparent",r:"53",cx:"60",cy:"60","data-geist-progress-circle-fg":""})]}),(0,r.jsx)("div",{className:u().content,children:h})]}))}},48115:function(e,t,n){"use strict";var r=n(24246),i=n(67105),o=n(98502),a=n(27378),c=n(80360),s=n.n(c),l=n(38944),u=n(47365),d=n(22465),p=n.n(d),f=n(13970),h=n(60189);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=(0,a.memo)((function(e){var t,n=e.text,c=e.copyText,d=e.onCopy,v=e.width,g=e.prompt,y=void 0===g||g,b=e.icon,j=void 0===b||b,x=e.dark,O=e.type,Z=e.fill,w=e.className,P=e.variant,_=(0,o.Z)(e,["text","copyText","onCopy","width","prompt","icon","dark","type","fill","className","variant"]),k=(0,h.e1)(),D=(0,f.Z)(O,Z,P),S=(0,a.useCallback)((function(){c?s()(c):Array.isArray(n)?s()(n.join("\n")):s()(n),k&&k.current&&k.current.message({text:"Copied to clipboard!"}),d&&d()}),[k,d,n,c]);return(0,r.jsxs)("div",m(m({className:(0,l.Z)(p().snippet,(t={},(0,i.Z)(t,p().prompt,y),(0,i.Z)(t,p().dark,x),t),w,D)},_),{},{style:m({width:v},_.style),"data-geist-snippet":"",children:[Array.isArray(n)?n.map((function(e,t){return(0,r.jsx)("pre",{className:"geist-overflow-scroll-y",children:e},"snippet-".concat(n,"-").concat(e,"-").concat(t))})):(0,r.jsx)("pre",{className:"geist-overflow-scroll-y",children:n}),j&&(0,r.jsx)("button",{className:(0,l.Z)("geist-reset",p().copy),onClick:S,children:(0,r.jsx)(u.Z,{size:22})})]}))}));t.Z=g},27125:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(24246),i=n(67105),o=n(38944),a=n(30992),c=n.n(a);function s(e){var t;return(0,r.jsx)("div",{className:(0,o.Z)("geist-no-scrollbar",c().tabs,(t={},(0,i.Z)(t,c().disabled,e.disabled),(0,i.Z)(t,c().centered,e.centered),(0,i.Z)(t,c().bold,e.bold),t)),"data-geist-tabs":"",children:e.tabs.map((function(t){return(0,r.jsx)("div",{className:c().tabContainer,role:"button",tabIndex:0,onClick:function(){var n;e.disabled||(null===(n=e.setSelected)||void 0===n||n.call(e,t.value))},onKeyDown:function(n){var r;e.disabled||" "!==n.key||(n.preventDefault(),null===(r=e.setSelected)||void 0===r||r.call(e,t.value))},"data-geist-tab":"",children:(0,r.jsxs)("div",{className:(0,o.Z)(c().tab,(0,i.Z)({},c().activeTab,e.selected===t.value)),children:[t.icon&&(0,r.jsx)("div",{className:c().tabIcon,children:t.icon}),(0,r.jsx)("div",{children:t.title})]})},t.value)}))})}},96583:function(e,t,n){"use strict";n.d(t,{n:function(){return i},Gj:function(){return o},Yy:function(){return a},lv:function(){return c}});var r=n(53651),i=function(e){if(!e||!e.analytics)return!1;var t=e.analytics;return!!t.enabledAt&&(!!(t.canceledAt&&t.canceledAt>Date.now())||t.enabledAt>t.disabledAt)},o=function(e){var t;return null!==e&&void 0!==e&&null!==(t=e.analytics)&&void 0!==t&&t.canceledAt?(0,r.Z)(new Date(e.analytics.canceledAt),new Date):null},a=function(e){if(null!==e&&void 0!==e&&e.framework)return!!["nextjs","blitzjs","nuxtjs","gatsby"].includes(e.framework)},c=function(e,t){var n,r=t?["pro","enterprise"]:["hobby","pro","enterprise"];return{isValid:r.includes((null===e||void 0===e||null===(n=e.billing)||void 0===n?void 0:n.plan)||""),validPlans:r}}},87203:function(e,t,n){"use strict";function r(e){if(e&&"network_error"!==e.code&&"rate_limited"!==e.code&&"too_many_requests"!==e.code&&"cancelled"!==e.message)throw e}n.d(t,{Z:function(){return r}})},55641:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=encodeURIComponent;function i(e){return"string"===typeof e?e:void 0}function o(e){var t=e.meta;if(null!==t&&void 0!==t&&t.githubDeployment){var n="https://github.com/".concat(r(t.githubCommitOrg),"/").concat(r(t.githubCommitRepo),"/commit/").concat(t.githubCommitSha),o="https://github.com/".concat(r(t.githubCommitOrg),"/").concat(r(t.githubCommitRepo),"/tree/").concat(r(t.githubCommitRef)),a=t.githubPrId?"https://github.com/".concat(r(t.githubOrg),"/").concat(r(t.githubRepo),"/pull/").concat(t.githubPrId):void 0;return{type:"github",commitRef:String(t.githubCommitRef),commitSha:String(t.githubCommitSha),commitAuthorName:String(t.githubCommitAuthorName),commitAuthorLogin:i(t.githubCommitAuthorLogin),commitMessage:String(t.githubCommitMessage),repoName:String(t.githubCommitRepo),repoNamespace:String(t.githubCommitOrg),commitUrl:n,refUrl:o,viaFork:t.githubOrg!==t.githubCommitOrg,prId:t.githubPrId?Number(t.githubPrId):void 0,prUrl:a}}if(null!==t&&void 0!==t&&t.gitlabDeployment){var c="https://gitlab.com/".concat(t.gitlabProjectPath,"/tree/").concat(r(t.gitlabCommitRef)),s="https://gitlab.com/".concat(t.gitlabProjectPath,"/commit/").concat(t.gitlabCommitSha);return{type:"gitlab",commitRef:String(t.gitlabCommitRef),commitSha:String(t.gitlabCommitSha),commitAuthorName:String(t.gitlabCommitAuthorName),commitAuthorLogin:i(t.gitlabCommitAuthorLogin),commitMessage:String(t.gitlabCommitMessage),repoName:String(t.gitlabProjectName),repoNamespace:String(t.gitlabProjectNamespace),commitUrl:s,refUrl:c}}if(null!==t&&void 0!==t&&t.bitbucketDeployment){var l="https://bitbucket.org/".concat(t.bitbucketRepoOwner,"/").concat(t.bitbucketRepoSlug,"/branch/").concat(r(t.bitbucketCommitRef)),u="https://bitbucket.org/".concat(t.bitbucketRepoOwner,"/").concat(t.bitbucketRepoSlug,"/commits/").concat(t.bitbucketCommitSha);return{type:"bitbucket",commitRef:String(t.bitbucketCommitRef),commitSha:String(t.bitbucketCommitSha),commitAuthorName:i(t.bitbucketCommitAuthorName),commitAuthorLogin:i(t.bitbucketCommitAuthorLogin),commitMessage:String(t.bitbucketCommitMessage),repoName:String(t.bitbucketRepoSlug),repoNamespace:String(t.bitbucketRepoOwner),commitUrl:u,refUrl:l}}return null}},82209:function(e,t,n){"use strict";function r(e){if(!e)return{};var t=i(e),n=function(e){var t="host"in e&&e.host||e.url,n=a(e),r=t.replace(n+"-","").split(".").slice(0,-2)[0].split("-")[0];9!==r.length&&console.warn("Found invalid hash",{hash:r,deployment:e});return r}(e),r=function(e){if("team"in e&&e.team)return e.team.slug||e.team.id;if(e.creator)return e.creator.username||e.creator.uid;return console.warn("No user of team associated with the deployment: ".concat(i(e))),""}(e),c=a(e),s=o(e);return{project:c,idWithoutPrefix:t?t.replace("dpl_",""):void 0,id:t,hash:n,handle:r,host:s}}function i(e){return"id"in e&&e.id||e.uid}function o(e){return"host"in e&&e.host||e.url||""}function a(e){return e.name?e.name:function(e){var t=e.match(/^(.*)-([^-]{9,})\.([a-zA-Z0-9-]+\.[a-zA-Z0-9-]+)$/);if(t)return t[1];var n=e.match(/^(.*)-([^-]{9,})-(.+)\.([a-zA-Z0-9-]+\.[a-zA-Z0-9-]+)$/);if(n)return n[1];return""}(o(e))}n.d(t,{Z:function(){return r}})},89046:function(e,t,n){"use strict";n.d(t,{ic:function(){return s},KR:function(){return l},d:function(){return u},zR:function(){return d}});var r=n(86677),i=n(18213),o=n(16378),a=n(32572),c=n(24281),s=function(){return(0,r.useRouter)().query.project},l=function(e){var t=(0,i.ZP)().teamData,n=(0,o.Z)().user;return e&&t?t.team?"/".concat(t.team.slug,"/").concat(e.name):n?"/".concat(n.username,"/").concat(e.name):null:null},u=function(e,t){var n,r;return(0,a.Z)(null===e||void 0===e||null===(n=e.targets)||void 0===n||null===(r=n.production)||void 0===r?void 0:r.id,t)},d=function(e){var t=(0,c.B8)(e,{limit:1}).data;return t?0===t.length:void 0}},27289:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(24246),i=n(27378),o=n(88038),a=n(36083),c=n(16378),s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body::before{content:'';display:block;position:fixed;width:100%;height:100%;top:0;left:0;background:var(--geist-background);z-index: 99999}.render body::before{display:none}"}}),(0,r.jsx)("noscript",{dangerouslySetInnerHTML:{__html:"<style>body::before{content:none}</style>"}})]});function l(e){var t=e.requireAuth,n=void 0===t||t,l=e.timeout,u=void 0===l?1e3:l;if(n)return(0,r.jsxs)(o.default,{children:[s,(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"if (!document.cookie || document.cookie.indexOf('authorization=') === -1) {\n              location.replace('/login?next=' + encodeURIComponent(location.pathname + location.search))\n            } else {\n              document.documentElement.classList.add('render')\n            }"}})]});var d=(0,i.useState)(!1),p=d[0],f=d[1],h=(0,c.Z)().isLoggedOut,v=(0,i.useRef)();return v.current=h,(0,i.useEffect)((function(){var e=setTimeout((function(){"undefined"===typeof v.current&&f(!0)}),u);return function(){return clearTimeout(e)}}),[u]),(0,i.useEffect)((function(){h&&(document.documentElement.classList.add("render"),f(!1))}),[h]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.default,{children:[s,(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:"if (!document.cookie || document.cookie.indexOf('authorization=') === -1) {\n            document.documentElement.classList.add('render')\n          }"}})]}),p?(0,r.jsx)("div",{className:"geist-fade-in",style:{width:20,height:20,position:"fixed",top:0,left:0,right:0,bottom:0,margin:"auto",zIndex:1e5},children:(0,r.jsx)(a.Z,{})}):null]})}},45118:function(e,t){"use strict";t.Z=function(e,t){var n=(new Intl.DateTimeFormat).resolvedOptions().locale;return new Date(e).toLocaleString(n,t)}},8340:function(e,t,n){"use strict";n.d(t,{bb:function(){return s},aM:function(){return l}});var r=n(59972),i=n(67105),o=(n(27378),n(86677));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if("URLSearchParams"in window){var n=window.location,r=n.search,i=n.pathname,a=new URLSearchParams(r),s=c({},o.default.query);if(t)a.set(e,t),s[e]=t;else{if(null!==t)return;a.delete(e),delete s[e]}var l=a.toString(),u=i+(l?"?".concat(l):"");o.default.replace({pathname:o.default.pathname,query:s},u,{shallow:!0})}}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if("URLSearchParams"in window){var t=window.location,n=t.search,i=t.pathname,a=new URLSearchParams(n),s=c({},o.default.query);e.forEach((function(e){var t=(0,r.Z)(e,2),n=t[0],i=t[1];i?(a.set(n,i),s[n]=i):null===i&&(a.delete(n),delete s[n])}));var l=a.toString(),u=i+(l?"?".concat(l):"");o.default.replace({pathname:o.default.pathname,query:s},u,{shallow:!0})}}},85505:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(18213),i=n(16378);function o(){var e=(0,r.ZP)().teamData,t=(0,i.Z)().user;return e?e.team?e.team.slug:t?t.username:null:null}},53332:function(e,t,n){"use strict";n.d(t,{f9:function(){return y},W0:function(){return j},BZ:function(){return x},ZP:function(){return O}});var r=n(24246),i=n(67105),o=n(27378),a=n(86677),c=n(38944),s=n(61498),l=n(27289),u=n(68855),d=n(76051),p=n(60189),f=n(94834),h=n(16378),v=n(18213);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e){var t=(0,a.useRouter)(),n=(0,p.e1)(),r=t.query.teamSlug;r=(r||"").replace(/\?.+/,"");var i=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(0,f.Z)();var t=(0,h.Z)(e,!0),n=t.data,r=t.isLoggedOut,i=(0,v.ZP)(),o=i.teamsData,a=i.teamData,c=i.teamSlug,s=i.isTeam;return{teamData:a,teamsData:o,userData:n,teamSlug:c,isTeam:s,isLoggedOut:r}}(e),c=i.teamData,s=i.userData,l=i.teamSlug,u=i.isLoggedOut;(0,o.useEffect)((function(){t.query.invited&&(n&&n.current&&n.current.success("You are now a member of this Team."),t.replace({pathname:"/[teamSlug]"},"/".concat(l),{shallow:!0}))}),[t,l,n]),(0,o.useEffect)((function(){if(e&&s&&c){var t,n;if(u)return;if(r&&(null===(t=s.user)||void 0===t?void 0:t.username)!==r&&(null===(n=s.user)||void 0===n?void 0:n.uid)!==r&&!c.team){var i=new Error("Team not found");throw i.status=404,(0,d.nY)(),i}}}),[e,r,s,c,u])}var b=(0,o.memo)((function(e){var t=e.Section,n=e.opts,i=e.pageProps;y(n.requireAuth);var a=(0,o.useState)({}),u=a[0],d=a[1];return(0,r.jsxs)(r.Fragment,{children:[n.requireAuth?(0,r.jsx)(l.Z,{}):null,(0,r.jsx)(s.Z,g(g(g({title:n.pageName||"Dashboard",dashboard:!0,active:n.active,lightFooter:n.lightFooter,theme:n.theme,stickyTabs:n.stickyTabs},n.pageProps),u),{},{children:(0,r.jsx)("div",{className:(0,c.Z)("dashboard-container",{gray:n.darkFold}),children:(0,r.jsx)(t,g(g({},i),{},{setDynamicPageProps:d}))})}))]})}));function j(e){return(0,u.P)((0,p.CP)(e))}b.displayName="DashboardLayout";var x=j(b);function O(e,t){t=Object.assign({requireAuth:!0,active:""},t||{});var n=(0,o.memo)(e);return e.getLayout=function(e,i){return(0,r.jsx)(x,{Section:n,pageProps:i,opts:t})},e}},68855:function(e,t,n){"use strict";n.d(t,{P:function(){return x}});var r=n(55395),i=n(88742),o=n.n(i),a=n(40505),c=n(67105),s=n(24246),l=n(83101),u=n(76982),d=n(9968),p=n(39183),f=n(3184),h=n(27378),v=n(86677),m=n(37875),g=n(50808);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,f.Z)(e);if(t){var i=(0,f.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,p.Z)(this,n)}}function x(e){var t=function(t){(0,d.Z)(i,t);var n=j(i);function i(){var e;(0,l.Z)(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),(0,c.Z)((0,r.Z)(e),"state",{error:null}),e}return(0,u.Z)(i,[{key:"componentDidUpdate",value:function(e){e.router.asPath!==this.props.router.asPath&&this.state.error&&this.setState({error:null})}},{key:"render",value:function(){var t=this.state.error;if(t){var n=t.statusCode||t.status||t.res&&t.res.status;return(0,s.jsx)(m.default,{statusCode:n,err:t,reported:!0})}return(0,s.jsx)(e,b({},this.props))}}],[{key:"getDerivedStateFromError",value:function(e){if(404===e.status&&e.teamSlug&&e.membershipRequestedBy)throw e;var t=e.statusCode||e.status||e.res&&e.res.status;return(0,g.D)(e,{statusCode:t}),{error:e}}}]),i}(h.PureComponent);return t.getInitialProps=e.getInitialProps,t.getLayout=e.getLayout,(0,v.withRouter)(t)}t.Z=function(e){return function(t){(0,d.Z)(r,t);var n=j(r);function r(){return(0,l.Z)(this,r),n.apply(this,arguments)}return(0,u.Z)(r,[{key:"render",value:function(){return this.props.statusCode?(0,s.jsx)(m.default,{statusCode:this.props.statusCode,err:this.props.err,reported:!0}):(0,s.jsx)(e,b({},this.props))}}],[{key:"getInitialProps",value:function(){var t=(0,a.Z)(o().mark((function t(n){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.getInitialProps){t.next=6;break}return t.next=3,e.getInitialProps(n);case 3:t.t1=t.sent,t.next=7;break;case 6:t.t1=null;case 7:if(t.t0=t.t1,t.t0){t.next=10;break}t.t0={};case 10:return(r=t.t0).statusCode&&n.res&&(n.res.statusCode=r.statusCode),t.abrupt("return",r);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),r}(h.Component)}},64483:function(e,t,n){"use strict";n.r(t);var r=n(76334);t.default=r.default},76334:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Et}});var r=n(98502),i=n(67105),o=n(59972),a=n(24246),c=n(30183),s=n(38944),l=n(58917),u=n(37815),d=n(46121),p=n(11927),f=n.n(p);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=function(e){var t=e.legend,n=e.title,i=e.children,o=e.className,c=(0,r.Z)(e,["legend","title","children","className"]);return(0,u.J)()?(0,a.jsxs)(l.Z,{className:f().chart,children:[(0,a.jsx)(d.Z,{width:200,height:24}),(0,a.jsx)(d.Z,{className:f().legend,width:260,height:24}),(0,a.jsx)(d.Z,{width:"100%",height:200,className:f().graph})]}):(0,a.jsxs)(l.Z,v(v({className:(0,s.Z)(f().chart,o)},c),{},{children:[(0,a.jsx)("div",{className:f().title,children:n}),(0,a.jsx)("div",{className:f().legend,children:t}),(0,a.jsx)("div",{className:f().graph,children:i})]}))},g=n(6882),y=n(2604),b=n(57312),j=n(69799),x=n.n(j),O=(0,a.jsxs)(b.Z,{border:!0,shadow:!1,center:!0,className:x().noDataCard,children:[(0,a.jsx)(g.ZP,{bold:!0,noMargin:!0,preset:"body-2",center:!0,children:"No Data"}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsxs)(g.ZP,{noMargin:!0,preset:"body-2",center:!0,maxWidth:"35ch",type:"secondary",children:["There\u2019s not enough data available in the selected range to display this statistic yet.",(0,a.jsx)("br",{})," Please check back again later."]})]}),Z=n(37801),w=n(27378),P=n(3741),_=n(71116),k=n(39648),D=n(78509),S=n(28098),C=n(91984),N=n(40924),E=n(23997),A=n(75295),L=n(84251),M=n(5164),I=n(47622),R=n(23952),T=n(24795),z=n(57898),F=n(58338),B=n(56624),U=n(12455),H=n(63677),K=n(24231),W=n(55096),q=n(55641),J=n(2545),G=function(e){var t=e.deployment,n=(0,q.S)(t),r=(0,K.Rd)(t.created),i=(0,J.T$)(t);return n?(0,a.jsxs)(l.Z,{style:{width:256,padding:"var(--geist-gap-half)"},children:[(0,a.jsx)(g.ZP,{weight:500,noMargin:!0,small:!0,children:(0,a.jsx)(H.Z,{type:"highlight",href:i,className:"geist-ellipsis",external:!0,title:n.commitMessage,children:n.commitMessage})}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsx)("span",{children:(0,a.jsx)(U.Z,{children:n.commitRef})}),(0,a.jsx)(y.Z,{y:.5}),(0,a.jsx)("hr",{className:"geist-hr-reset"}),(0,a.jsx)(y.Z,{y:.5}),(0,a.jsxs)(g.ZP,{type:"secondary",small:!0,noMargin:!0,children:[r," by ",(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsx)(W.D,{deployment:t})]})]}):null},V=n(31338),X=n.n(V),Y=n(79455),Q=n(45118),$=n(44316);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ne={"28d":{text:"Last 28 Days",asObj:{days:28},restriction:"enterprise"},"14d":{text:"Last 14 Days",asObj:{days:14},restriction:"enterprise"},"7d":{text:"Last 7 Days",asObj:{days:7},restriction:"pro"},"3d":{text:"Last 3 Days",asObj:{days:3},restriction:"pro"},"1d":{text:"Last Day",asObj:{days:1},restriction:null}},re={"10m":{text:"By 10 Mins",asObj:{minutes:10},restriction:"enterprise"},"30m":{text:"By 30 Mins",asObj:{minutes:30},restriction:"enterprise"},"1h":{text:"By Hour",asObj:{minutes:60},restriction:"pro"},"3h":{text:"By 3 Hours",asObj:{minutes:180},restriction:null},"12h":{text:"By 12 Hours",asObj:{minutes:720},restriction:null},"24h":{text:"By Day",asObj:{minutes:1440},restriction:null}},ie="Real Experience Score",oe="RES",ae=["FCP","LCP","CLS","FID"];function ce(e,t){var n=Math.pow(10,t),r=Math.round(e*n)/n;return Number.isNaN(r)?null:r}var se={FCP:{name:"First Contentful Paint",parser:function(e){return ce(Number(e)/1e3,2)},desktop:{good:.934,bad:1.6},mobile:{good:2.336,bad:4},unit:"s",description:"When the browser renders the first bit of content from the DOM, providing the first feedback to the user that the page is actually loading."},LCP:{name:"Largest Contentful Paint",parser:function(e){return ce(Number(e)/1e3,2)},desktop:{good:1.2,bad:2.4},mobile:{good:2.5,bad:4},unit:"s",description:"Measures loading performance. To provide a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading."},FID:{name:"First Input Delay",parser:function(e){return ce(Number(e),0)},desktop:{good:100,bad:300},mobile:{good:100,bad:300},unit:"ms",description:"Measures the time from the first user interaction to when the browser begins processing event handlers in response to that interaction."},CLS:{name:"Cumulative Layout Shift",parser:function(e){return ce(Number(e),3)},desktop:{good:.1,bad:.25},mobile:{good:.1,bad:.25},unit:"",description:"Measures the sum total of all individual layout shift scores for every unexpected layout shift that occurs during the entire lifespan of the page."},RES:{name:"Real Experience Score",desktop:{good:10,bad:50},mobile:{good:10,bad:50},unit:""}},le={device:"mobile",timePeriod:"1d",percentile:"75",percentileIdx:0,timeInterval:"3h"},ue=(0,w.createContext)(le),de=function(){return(0,w.useContext)(ue)},pe=function(e,t,n){var r=se[e],i=r.mobile,o=r.desktop,a=r.unit,c="mobile"===n||"tablet"===n?i:o,s=c.good,l=c.bad,u=t<s?"good":t>l?"bad":"medium";return te("good"===u?{color:"var(--wv-green)",icon:$.CheckInCircle,reason:"Below ".concat(s).concat(a),badge:"Good"}:"bad"===u?{color:"var(--wv-red)",icon:$.AlertCircle,reason:"Above ".concat(l).concat(a),badge:"Poor"}:{color:"var(--wv-orange)",icon:$.AlertCircle,reason:"Above ".concat(s).concat(a),badge:"Needs Improvement"},r)},fe=function(e){if(!e)return 0;var t=0;return Object.values(e).forEach((function(e){e&&(t+=e.sample_size)})),t},he=function(e){return new Date(e[0])},ve=function(e){return e[1]},me=(0,M.Z)((function(e){return new Date(e[0])})).left,ge=20,ye=0,be=20,je=35,xe=function(e){var t=e.leftAxisSize,n=void 0===t?0:t,r=e.parentWidth,c=void 0===r?0:r,l=e.parentHeight,u=void 0===l?0:l,d=e.showTooltip,p=e.hideTooltip,f=e.tooltipData,h=e.tooltipTop,v=void 0===h?0:h,m=e.tooltipLeft,g=void 0===m?0:m,y=e.data,b=void 0===y?[]:y,j=e.deployments,x=void 0===j?[]:j,O=e.leftAxisUnit,Z=void 0===O?"":O,A=e.title,M=e.dateStart,T=de().timePeriod,U=(0,Y.Av)(),H=(0,Y.dD)(),K=U?2:3,W=(0,w.useState)(!1),q=W[0],J=W[1],V=c,$=u,ee=V-je-ye,te=$-ge-be-(H?10:0),ne=(0,w.useMemo)((function(){var e=(0,I.Z)(b,he).getTime();return(0,C.Z)({range:[0,ee],domain:[Math.min(e,new Date(M).getTime()),new Date]})}),[ee,M,b]),re=(0,w.useMemo)((function(){return(0,N.Z)({range:[te,0],domain:[0,Math.max(n,(0,R.Z)(b,ve))],nice:!0})}),[te,n,b]),ie=function(e){var t,n;if(!q){var r=((0,L.Z)(e)||{x:0}).x;r-=je;var i=ne.invert(r),o=me(b,i,1),a=b[o-1],c=b[o],s=a;c&&he(c)&&(s=i.valueOf()-he(a).valueOf()>he(c).valueOf()-i.valueOf()?c:a);var l=null!==(t=ne(he(s)))&&void 0!==t?t:0,u=null!==(n=re(ve(s)))&&void 0!==n?n:0;d({tooltipData:{type:"metric",data:s},tooltipLeft:l,tooltipTop:u})}},oe=function(e,t){var n;if(!q){var r=((0,L.Z)(e)||{x:0}).x;r-=je;var i=ne.invert(r),o=me(b,i,1),a=b[o-1],c=b[o],s=a;c&&he(c)&&(s=i.valueOf()-he(a).valueOf()>he(c).valueOf()-i.valueOf()?c:a);var l=null!==(n=re(ve(s)))&&void 0!==n?n:0;d({tooltipData:{type:"deployment",data:t},tooltipLeft:ne(t.createdAt),tooltipTop:l})}},ae=function(){return J((function(e){return!e}))},ce=(0,w.useCallback)((function(){q||p()}),[q,p]),se=(0,w.useMemo)((function(){return null!==b&&void 0!==b&&b.length?b.concat([[(new Date).toString(),b[b.length-1][1]]]):b}),[b]),le=(0,w.useMemo)((function(){if(null===x||void 0===x||!x.length||null===b||void 0===b||!b.length)return[];var e=0,t=[];return x.forEach((function(n){var r=ne(new Date(n.createdAt));e&&Math.abs(r-e)<5||(e=r,t.push([n,r]))})),t}),[x,b,ne]);return(0,w.useEffect)((function(){var e=function(e){e.target&&(e.target.closest(".analytics-graph-svg")||ce())};return document.addEventListener("touchstart",e),function(){return document.removeEventListener("touchstart",e)}}),[ce]),(0,a.jsxs)("div",{children:[(0,a.jsx)("svg",{width:V,height:$,style:{overflow:"visible"},"aria-label":A,className:"analytics-graph-svg",children:(0,a.jsxs)(B.Z,{left:je,top:ge,children:[(0,a.jsx)(S.Z,{numTicks:6,scale:re,width:ee,stroke:"var(--accents-2)",pointerEvents:"none"}),(0,a.jsx)(z.Z,{numTicks:3,scale:re,tickFormat:function(e){return"".concat(e).concat(Z)},hideAxisLine:!0,hideTicks:!0,tickLabelProps:function(){return{transform:"translate(0 3)",fill:"var(--accents-5)",fontSize:12,textAnchor:"end"}}}),(0,a.jsx)(F.Z,{numTicks:K,top:te,scale:ne,tickFormat:function(e){return function(e,t){var n="1d"===t?{hour:"numeric",minute:"numeric",hour12:!1}:{month:"numeric",day:"numeric"};return(0,Q.Z)(e,n)}(String(e),T)},tickStroke:"var(--accents-3)",hideAxisLine:!0,tickLabelProps:function(){return{fill:"var(--accents-5)",fontSize:12,textAnchor:"middle"}}}),(0,a.jsx)(P.Z,{curve:D.Z,data:se,x:function(e){var t;return null!==(t=ne(he(e)))&&void 0!==t?t:0},y:function(e){var t;return null!==(t=re(ve(e)))&&void 0!==t?t:0},stroke:"var(--geist-success)",strokeWidth:2}),f&&(0,a.jsx)("circle",{cx:g,cy:v,r:4,fill:"var(--geist-success)",stroke:"white",strokeWidth:1,pointerEvents:"none"}),(0,a.jsx)(_.Z,{"aria-hidden":!0,x:0,y:0,width:ee,height:te,fill:"transparent",onTouchStart:ie,onTouchMove:ie,onMouseMove:ie,onMouseLeave:ce,onClick:ae}),le.map((function(e,t){var n=(0,o.Z)(e,2),r=n[0],i=n[1];return(0,a.jsxs)(w.Fragment,{children:[(0,a.jsx)(k.Z,{stroke:"var(--accents-5)",strokeDasharray:"5,5",from:{x:i,y:0},to:{x:i,y:te}}),(0,a.jsx)(_.Z,{x:i-3,y:0,width:6,height:te,fill:"transparent",onTouchStart:function(e){return oe(e,r)},onTouchMove:function(e){return oe(e,r)},onMouseMove:function(e){return oe(e,r)},onMouseLeave:ce,onClick:ae,style:{cursor:"pointer"}})]},"deployment-line-".concat(t))}))]})}),!!f&&(0,a.jsx)("div",{children:(0,a.jsx)(E.Z,{top:v,left:g,className:(0,s.Z)(X().tooltip,(0,i.Z)({},X().locked,q)),offsetLeft:je,offsetTop:be-ge,unstyled:!0,onClick:function(e){e.stopPropagation()},children:"deployment"===f.type?(0,a.jsx)(G,{deployment:f.data}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("b",{children:ve(f.data)}),(0,a.jsx)("span",{children:(0,Q.Z)(f.data[0],{month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1})})]})})})]})},Oe=(0,T.Z)((0,A.Z)((0,w.memo)(xe))),Ze=n(17756),we=n(44933),Pe=function(e){var t=e.active,n=e.close;return(0,a.jsx)(Ze.Modal,{active:t,onClickOutside:n,children:(0,a.jsxs)(Ze.Body,{children:[(0,a.jsx)(g.ZP,{h4:!0,Component:"h1",noMargin:!0,center:!0,children:"Analytics ID"}),(0,a.jsx)(y.Z,{}),(0,a.jsx)(g.ZP,{preset:"body-2",noMargin:!0,type:"secondary",children:"To use Analytics with a Next.js project hosted elsewhere, please add the following Environment Variable:"}),(0,a.jsx)(y.Z,{}),(0,a.jsx)(we.Z,{}),(0,a.jsx)(y.Z,{}),(0,a.jsxs)(g.ZP,{preset:"body-2",noMargin:!0,type:"secondary",children:["If your site uses a"," ",(0,a.jsx)(H.Z,{href:"/docs/analytics#content-security-policy",type:"highlight",children:"Content Security Policy (CSP)"}),", be sure you\u2019ve allowed Next.js Analytics."]})]})})},_e=function(e){var t=e.children;return(0,a.jsx)(l.Z,{row:!0,vcenter:!0,right:!0,children:t})},ke=function(e){var t=e.variant,n=e.color,r=e.name;return(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,noWrap:!0,flex:"0 0 auto",children:[(0,a.jsx)("div",{style:{height:"1rem",width:"1rem",background:"dashed"===t?"none":n,border:"dashed"===t?"1px dashed ".concat(n):"none",borderRadius:"50%",marginRight:"var(--geist-gap-quarter)"}}),(0,a.jsx)("span",{style:{whiteSpace:"nowrap"},children:r})]})},De=n(86237),Se=n(57893),Ce=n(43572),Ne=n(67731),Ee=n(27125),Ae=n(89046),Le=n(88742),Me=n.n(Le),Ie=n(40505),Re=n(55888),Te=n(61659),ze=n(93632),Fe=n(97165),Be=n(57824),Ue=n.n(Be),He=n(70053),Ke=n(18213),We=n(16378);function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ge=n(53247),Ve=n(74497),Xe=n(28518),Ye=function(e){return new Date(e[0])},Qe=function(e){var t=e.data,n=de().cutoffDate,r=(0,w.useMemo)((function(){var e,r=(null===(e=(0,I.Z)(t,Ye))||void 0===e?void 0:e.getTime())||1/0,i=new Date(n).getTime(),o=r?Math.min(r,i):i;return(0,C.Z)({range:[0,70],domain:[o,new Date]})}),[t,n]),i=(0,N.Z)({range:[20,0],domain:[0,100],nice:!0});return(0,a.jsx)("svg",{width:"70",height:"20",viewBox:"0 0 70 20",style:{overflow:"visible"},children:(0,a.jsx)(P.Z,{data:t,x:function(e){var t;return null!==(t=r(Ye(e)))&&void 0!==t?t:0},y:function(e){var t;return null!==(t=i(function(e){return e[1]}(e)))&&void 0!==t?t:0},stroke:"var(--geist-success)",strokeWidth:2})})},$e=n(85198),et=n.n($e),tt=function(e){var t=e.name,n=e.data,r=e.placeholder,i=de(),c=i.percentileIdx,s=i.cutoffDate,u=i.deployments,p=i.timePeriod,f=i.device,h=(0,w.useState)(!1),v=h[0],b=h[1],j=v?$.ChevronUp:$.ChevronDown,x=(0,w.useMemo)((function(){if(!n||!n.time_groups||null==c)return[];var e=Object.entries(n.time_groups).map((function(e){var t=(0,o.Z)(e,2);return[t[0],t[1].p_scores[c]]}));return e.length&&(e=e.concat([[(new Date).toString(),e[e.length-1][1]]])),e.sort()}),[n,c]),Z=null!==n&&void 0!==n&&n.vitals?fe(n.vitals):0,P=!(null!==x&&void 0!==x&&x.length),_=null!=c&&null!==n&&void 0!==n&&n.p_scores?n.p_scores[c]:null,k=_?pe("RES",100-_,f):{color:"",icon:null},D=k.color,S=k.icon;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Ge.ZP,{placeholder:r,thumbnail:(0,a.jsx)(Ve.Z,{onClick:function(){return b((function(e){return!e}))},variant:"unstyled",className:"geist-reset",children:(0,a.jsx)(j,{size:20,color:"var(--accents-5)"})}),children:[(0,a.jsx)(Ge.Sn,{label:!0,title:"Page",description:(0,a.jsx)(U.Z,{noWrap:!0,children:t})}),(0,a.jsx)(Ge.Sn,{label:!0,title:"Data Points",description:r||0===Z?"\u2013":Z.toLocaleString(),width:"20%"}),(0,a.jsx)(Ge.Sn,{label:!0,title:"Real Experience Score",width:"20%",description:r&&"",children:!r&&(0,a.jsx)(l.Z,{row:!0,vcenter:!0,style:{lineHeight:"20px"},children:null!=c&&_&&S?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S,{color:D,secondary:"#fff",fill:!0,size:20}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),_]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($.AlertCircle,{color:"var(--accents-3)",secondary:"#fff",fill:!0,size:20}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsx)("span",{className:et().a5,children:"Not enough data"})]})})}),(0,a.jsx)(Ge.Sn,{label:!0,title:"Trend",width:70,description:r&&"\u2013",descriptionSkeletonWidth:"100%",children:r?null:P?(0,a.jsx)("svg",{width:"70",height:"20",style:{overflow:"visible"},children:(0,a.jsx)("polyline",{strokeWidth:2,stroke:"var(--accents-3)",points:"0,20 70,20"})}):(0,a.jsx)(Qe,{data:x})})]}),v&&(0,a.jsx)(Ge.D2,{titleWrapper:!1,title:(0,a.jsx)(m,{className:et().chart,legend:(0,a.jsxs)(_e,{children:[(0,a.jsx)(ke,{color:"var(--geist-success)",name:oe}),(0,a.jsx)(ke,{color:"var(--accents-5)",variant:"dashed",name:"Production Deployments"})]}),title:(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,flex:"0 1 auto",children:[(0,a.jsxs)(g.ZP,{weight:500,span:!0,noMargin:!0,children:[ie," by ",ne[p].text]}),(0,a.jsx)(y.Z,{inline:!0,x:.5})]}),children:P?O:(0,a.jsx)(Oe,{deployments:(null===u||void 0===u?void 0:u.deployments)||[],data:x,leftAxisSize:100,dateStart:s})}),children:(0,a.jsx)(l.Z,{row:!0,vcenter:!0,children:ae.map((function(e,t){var i,o;if(!(null!==n&&void 0!==n&&null!==(i=n.vitals)&&void 0!==i&&i[e])||null==c)return(0,a.jsx)("div",{className:et().metric,children:(0,a.jsx)(Xe.Z,{title:se[e].name,content:(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,children:[(0,a.jsx)($.AlertCircle,{fill:!0,size:20,color:"var(--accents-3)"}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsx)("span",{className:et().a5,children:"Not enough data"})]})})},"".concat(e,"-description-").concat(t));var s=null===(o=n.vitals[e])||void 0===o?void 0:o.p_values[c],u=se[e].parser(s),p=pe(e,u||0,f),h=p.unit,v=p.icon,m=p.reason,g=p.color;return(0,a.jsx)("div",{className:et().metric,children:(0,a.jsx)(Xe.Z,{title:se[e].name,content:r?(0,a.jsx)(d.Z,{width:150,height:20}):(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,children:[(0,a.jsx)(v,{fill:!0,size:20,color:g,secondary:"#fff"}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsxs)("span",{className:et().metricScore,children:[u,h," ",(0,a.jsxs)("span",{children:["(",m,")"]})]})]})})},"".concat(e,"-description-").concat(t))}))})})]})},nt=Array(10).fill(0).map((function(e,t){return(0,a.jsx)(tt,{placeholder:!0},"placeholder-pages-row-".concat(t))})),rt=function(){var e=(0,w.useState)("source"),t=e[0],n=e[1],r=(0,w.useState)(""),i=r[0],o=r[1],c=(0,w.useState)(""),s=c[0],u=c[1],d=(0,w.useState)(void 0),p=d[0],f=d[1],h=(0,w.useState)(!1),v=h[0],m=h[1];return(0,a.jsx)(De.Z,{threshold:[.1],onIntersect:function(e){e.isIntersecting&&m(!0)},children:(0,a.jsx)("div",{children:(0,a.jsxs)(l.Z,{wrapper:!0,children:[(0,a.jsx)(y.Z,{y:2}),(0,a.jsxs)(l.Z,{direction:["column","row"],vcenter:!0,gap:.5,children:[(0,a.jsx)(l.Z,{children:(0,a.jsx)(g.ZP,{noMargin:!0,h3:!0,Component:"h2",weight:600,children:"Pages"})}),(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsx)(Ce.Z,{prefix:(0,a.jsx)(Se.Z,{}),prefixStyling:!1,value:i,onChange:function(e){return o(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&u(i)},onBlur:function(){u(i)},placeholder:"Search..."})}),(0,a.jsx)(l.Z,{flex:"0 0 auto",className:"geist-hide-on-mobile",children:(0,a.jsxs)(Ne.Z,{placeholder:"Sort",value:p,onChange:function(e){return f(e.target.value)},children:[(0,a.jsx)("option",{value:"datapoints",children:"Data Points"}),(0,a.jsx)("option",{value:"res",children:"Real Experience Score"}),(0,a.jsx)("option",{value:"name",children:"Page Name"})]})})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(l.Z,{children:(0,a.jsx)(Ee.Z,{selected:t,setSelected:function(e){return n(e)},tabs:[{title:"Pages Names",value:"source"},{title:"URLs",value:"url"}]})}),v?(0,a.jsx)(it,{apiSearch:s,tab:t,sort:p}):(0,a.jsx)(l.Z,{children:nt})]}),(0,a.jsx)(y.Z,{y:2})]})})})},it=function(e){var t,n,r,i=e.apiSearch,o=e.tab,c=e.sort,s=de(),u=s.device,d=s.percentileIdx,p=s.timePeriod,f=s.timeInterval,h=function(e,t,n){var r=t.device,i=t.field,o=t.search,a=t.days,c=void 0===a?1:a,s=t.intervalMinutes,l=void 0===s?1440:s,u=t.once,d=void 0!==u&&u,p=(0,Te.LP)(),f=(0,Ke.ZP)().teamData,h=(0,We.Z)().user,v=(0,w.useState)(Ue()("10 seconds")),m=v[0],g=v[1],y={days:c,intervalMinutes:l,device:r,field:i,search:o};return(0,He.ZP)((function(){return e&&f&&h?"/v2".concat(Re._Q,"/by-field/").concat(encodeURIComponent(e)).concat((0,Fe.c)(Je(Je({},y),{},{slug:f.team?f.team.slug:h.username}))):""}),function(){var e=(0,Ie.Z)(Me().mark((function e(t){var n;return Me().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ze.Z)(t,p,{throwOnHTTPError:!0,returnStatus:!0});case 2:if(null!==(n=e.sent)&&204!==n.status){e.next=6;break}return g(0),e.abrupt("return",{empty:!0});case 6:return d&&g(0),e.abrupt("return",n.body);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Je(Je({},n),{},{refreshInterval:m}))}((0,Ae.ic)(),{field:"source"===o?"page":"url",device:u,search:i,days:ne[p].asObj.days,intervalMinutes:re[f].asObj.minutes}),v=h.data,m=h.error,j=(null!==(t=null===v||void 0===v||null===(n=v.data)||void 0===n||null===(r=n.device)||void 0===r?void 0:r.groups)&&void 0!==t?t:[]).sort((function(e,t){switch(c){case"datapoints":return t.data.vitals&&e.data.vitals?fe(t.data.vitals)-fe(e.data.vitals):0;case"res":return null==d?0:e.data.p_scores[d]-t.data.p_scores[d];case"name":return e.value.localeCompare(t.value);default:return 0}})).slice(0,100),O=!v||m;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(l.Z,{children:O?nt:j.length?j.map((function(e,t){var n=e.value,r=e.data;return(0,a.jsx)(tt,{name:n,data:r},"analytics-page-".concat(n,"-").concat(t))})):(0,a.jsxs)(b.Z,{shadow:!1,border:!0,className:x().noDataCard,center:!0,style:{minHeight:731},children:[(0,a.jsx)(g.ZP,{bold:!0,noMargin:!0,preset:"body-2",center:!0,children:"No Pages"}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsx)(g.ZP,{noMargin:!0,preset:"body-2",center:!0,type:"secondary",children:"There is no Page data that matches your filters."})]})})})},ot=n(49120),at=n.n(ot),ct=function(e){var t=e.children,n=(0,u.J)();return(0,a.jsx)(d.Z,{show:n,children:(0,a.jsx)("div",{className:at().pill,children:t})})},st=n(22761),lt=n(52995),ut=n(17146),dt=n(33438),pt=n(20632),ft=n(36083),ht=n(61918),vt=n(96583),mt=n(10950),gt=n(87203),yt=n(8340),bt=n(53332),jt=n(60189),xt=n(16121),Ot=n(27383),Zt=n(43043),wt=n(30734),Pt=n(86677),_t=n(29427);function kt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var St=(0,mt.y)(Promise.all([n.e(9974),n.e(5902),n.e(6279)]).then(n.bind(n,4282))),Ct=(0,mt.y)(Promise.all([n.e(9974),n.e(5902),n.e(328)]).then(n.bind(n,19056))),Nt=(0,mt.y)(Promise.all([n.e(9974),n.e(1820)]).then(n.bind(n,41820))),Et=(0,bt.ZP)((function(){var e,t,n,r,p,f,h=(0,Ke.ZP)(),v=h.teamData,j=h.team,Z=(0,We.Z)().user,P=(0,jt.e1)(),_=(0,Pt.useRouter)(),k=(0,Ae.ic)(),D=(0,w.useState)(!1),S=D[0],C=D[1],N=(0,w.useState)(le.device),E=N[0],A=N[1],L=(0,w.useState)(le.timePeriod),M=L[0],I=L[1],R=(0,w.useState)(le.timeInterval),T=R[0],z=R[1],F=(0,w.useState)("FCP"),B=F[0],U=F[1],H=(0,w.useState)(le.percentile),K=H[0],W=H[1],q=_.query,J=(0,w.useRef)(!1),G=(0,w.useMemo)((function(){if(!k||!v||!Z)return null;var e=null;return v&&(v.team?e=v.team.slug:Z&&(e=Z.username)),e?"".concat(e,"-").concat(k,"-analytics"):null}),[k,v,Z]);(0,w.useEffect)((function(){if(!J.current&&G){if(J.current=!0,q){var e=q.device,t=q.percentile,n=q.time;if(e||t||n)return e&&A(e),t&&W(t),n&&I(n),void(0,yt.aM)([["percentile",null],["time",null],["device",null]])}try{var r=localStorage.getItem(G);if(r){var i,o,a,c,s=JSON.parse(r);A(null!==(i=s.device)&&void 0!==i?i:le.device),I(null!==(o=s.timePeriod)&&void 0!==o?o:le.timePeriod),z(null!==(a=s.timeInterval)&&void 0!==a?a:le.timeInterval),W(null!==(c=s.percentile)&&void 0!==c?c:le.percentile)}}catch(l){return}}}),[G,q]),(0,w.useEffect)((function(){if(J.current&&G)try{localStorage.setItem(G,JSON.stringify({device:E,percentile:K,timePeriod:M,timeInterval:T}))}catch(e){return}}),[E,K,M,T,G]);var V=(0,Ot.W)(k),X=V.data,Y=V.error,Q=(0,Zt.Z)(k,{days:ne[M].asObj.days,intervalMinutes:re[T].asObj.minutes}),ee=Q.data,te=Q.error,ce=Q.revalidate,de=null===ee||void 0===ee?void 0:ee.empty,pe=(null===ee||void 0===ee?void 0:ee.data)||null,fe=(null===pe||void 0===pe?void 0:pe.devices[E])||null,he=!(null===pe||void 0===pe||!pe.devices)&&0===Object.keys(pe.devices).length,ve=!fe||(!fe||0===Object.keys(fe).length),me=!S&&(null===ee||void 0===ee?void 0:ee.pending),ge=(0,Ae.zR)(k),ye=me||!pe||he,be=(null===(e=j||Z)||void 0===e||null===(t=e.billing)||void 0===t||null===(n=t.controls)||void 0===n?void 0:n.analyticsSampleRateInPercent)||_t.as.sampleRateDefault,je=j?"/teams/".concat(j.slug,"/settings/billing#analytics-sampling"):"/account/billing#analytics-sampling";(0,w.useEffect)((function(){var e=P.current;return me?P.current.message({key:"pending-analytics-data",text:(0,a.jsxs)("div",{style:{display:"flex"},children:[(0,a.jsx)(ft.Z,{}),(0,a.jsx)("span",{children:"\xa0\xa0Processing data points..."})]}),preserve:!0}):P.current.removeToastByKey("pending-analytics-data"),function(){e.removeToastByKey("pending-analytics-data")}}),[me,P]),(0,w.useEffect)((function(){S&&ee&&(ee.pending||ee.data&&(C(!1),null===P||void 0===P||P.current.success({text:(0,a.jsxs)(a.Fragment,{children:["Enabled Analytics for ",(0,a.jsx)("b",{children:k})]})})))}),[S,ee,P,k]);var xe=(0,w.useMemo)((function(){var e;return null!==(e=null===pe||void 0===pe?void 0:pe.p_groups.indexOf(K))&&void 0!==e?e:-1}),[pe,K]),Ze=(0,w.useMemo)((function(){var e,t,n,r;return{FCP:se.FCP.parser(null===fe||void 0===fe||null===(e=fe.vitals.FCP)||void 0===e?void 0:e.p_values[xe]),LCP:se.LCP.parser(null===fe||void 0===fe||null===(t=fe.vitals.LCP)||void 0===t?void 0:t.p_values[xe]),FID:se.FID.parser(null===fe||void 0===fe||null===(n=fe.vitals.FID)||void 0===n?void 0:n.p_values[xe]),CLS:se.CLS.parser(null===fe||void 0===fe||null===(r=fe.vitals.CLS)||void 0===r?void 0:r.p_values[xe])}}),[fe,xe]),we=(0,w.useMemo)((function(){var e,t,n,r;return{FCP:null===fe||void 0===fe||null===(e=fe.vitals.FCP)||void 0===e?void 0:e.p_scores[xe],LCP:null===fe||void 0===fe||null===(t=fe.vitals.LCP)||void 0===t?void 0:t.p_scores[xe],FID:null===fe||void 0===fe||null===(n=fe.vitals.FID)||void 0===n?void 0:n.p_scores[xe],CLS:null===fe||void 0===fe||null===(r=fe.vitals.CLS)||void 0===r?void 0:r.p_scores[xe]}}),[fe,xe]),Pe=(0,w.useMemo)((function(){var e;return se[B].parser(null===fe||void 0===fe||null===(e=fe.vitals[B])||void 0===e?void 0:e.p_values[xe])}),[B,fe,xe]),De=(0,w.useMemo)((function(){return(0,wt.Z)(new Date,ne[M].asObj)}),[M]),Se=(0,w.useMemo)((function(){if(!fe)return[];var e=[];return Object.entries(fe.time_groups).forEach((function(t){var n,r=(0,o.Z)(t,2),i=r[0],a=r[1].vitals;if(a&&a[B]){var c=null===(n=a[B])||void 0===n?void 0:n.p_values[xe];if(null!=c){var s=se[B].parser(c);null!=s&&e.push([i,s])}}})),e.sort()}),[fe,B,xe]),Ce=(0,w.useMemo)((function(){if(!fe)return[];var e=[];return Object.entries(fe.time_groups).forEach((function(t){var n=(0,o.Z)(t,2),r=n[0],i=n[1].p_scores;e.push([r,i[xe]])})),e.sort()}),[fe,xe]),Ee=(0,w.useMemo)((function(){if(!fe)return 0;var e=0;return Object.values(fe.vitals).forEach((function(t){t&&(e+=t.sample_size)})),e}),[fe]),Le=null===Se||void 0===Se||null===(r=Se[0])||void 0===r?void 0:r[0],Me=(0,xt.Z)({project:Le?X:void 0,since:Le?new Date(Le).getTime():null,target:"production",limit:50},{revalidateOnFocus:!1},"v6"),Ie=Me.data,Re=Me.error;(0,gt.Z)(Y||te||Re);var Te=v&&v.team?null===(p=v.team)||void 0===p||null===(f=p.billing)||void 0===f?void 0:f.plan:"hobby",ze=S||de||he;return(0,a.jsxs)("main",{children:[(0,a.jsx)(st.Z,{title:X?"".concat(X.name," \u2013 Analytics"):"Analytics",titlePostfix:!0,noIndex:!0}),(0,a.jsx)(ue.Provider,{value:{percentileIdx:xe,percentile:K,device:E,timePeriod:M,timeInterval:T,cutoffDate:De,deployments:Ie},children:(0,a.jsxs)(u.f.Provider,{value:!!ye,children:[(0,a.jsxs)(l.Z,{className:(0,s.Z)(x().gray,(0,i.Z)({},x().gradientOverlay,ze)),style:ze?void 0:{borderBottom:"1px solid var(--accents-2)"},children:[he&&(0,a.jsx)(Ct,{revalidateAnalytics:ce}),(de||S)&&(0,a.jsx)(St,{enabling:S,setEnabling:C,revalidate:ce}),(0,a.jsx)(y.Z,{y:2}),(0,a.jsxs)(l.Z,{wrapper:!0,children:[(0,a.jsx)(Ft,{project:X,updatedAt:null===pe||void 0===pe?void 0:pe.updated_at,isExternalProject:ge,revalidate:ce,sampleRate:be,sampleRateSettingHref:je}),(0,a.jsxs)(l.Z,{flex:"0 0 auto",row:!0,gap:.5,children:[(0,a.jsx)(l.Z,{className:x().select,children:(0,a.jsx)(d.Z,{show:ye,children:(0,a.jsxs)(Ne.Z,{value:E,onChange:function(e){return A(e.target.value)},"aria-label":"Select Device",children:[(0,a.jsx)("option",{value:"mobile",children:"Mobile"}),(0,a.jsx)("option",{value:"tablet",children:"Tablet"}),(0,a.jsx)("option",{value:"desktop",children:"Desktop"})]})})}),(0,a.jsx)(l.Z,{className:x().select,children:(0,a.jsx)(d.Z,{show:ye,children:(0,a.jsx)(Ne.Z,{value:K,onChange:function(e){return W(e.target.value)},"aria-label":"Select Data Percentile",children:ye?(0,a.jsx)("option",{children:"P75"}):null===pe||void 0===pe?void 0:pe.p_groups.map((function(e){return(0,a.jsxs)("option",{value:e,children:["P",e]},"percentile-".concat(e))}))})})}),(0,a.jsx)(l.Z,{className:x().select,children:(0,a.jsx)(d.Z,{show:ye,children:"hobby"===Te?zt:(0,a.jsx)(Ne.Z,{value:M,onChange:function(e){return I(e.target.value)},"aria-label":"Select Time Period",children:Object.entries(ne).map((function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return"pro"===Te&&"enterprise"===r.restriction?null:(0,a.jsx)("option",{value:n,children:ne[n].text},"time-period-".concat(n))}))})})}),(0,a.jsx)(l.Z,{className:x().select,children:(0,a.jsx)(d.Z,{show:ye,children:(0,a.jsx)(Ne.Z,{value:T,onChange:function(e){return z(e.target.value)},"aria-label":"Select Time Interval",children:Object.entries(re).map((function(e){var t=(0,o.Z)(e,2),n=t[0],r=t[1];return"hobby"===Te&&null!==r.restriction||"pro"===Te&&"enterprise"===r.restriction?null:(0,a.jsx)("option",{value:n,children:r.text},"time-interval-".concat(n))}))})})})]}),(0,a.jsxs)(l.Z,{direction:["column","row"],children:[(0,a.jsx)(l.Z,{flex:"0 0 320px",children:(0,a.jsxs)(b.Z,{children:[(0,a.jsxs)(l.Z,{row:!0,center:!0,children:[(0,a.jsx)(g.ZP,{weight:600,h5:!0,Component:"span",noMargin:!0,center:!0,children:ie}),(0,a.jsx)(y.Z,{inline:!0,x:.5}),(0,a.jsx)(ht.Z,{text:"The combined score of your Web Vitals experienced by your visitors.",position:"bottom",children:(0,a.jsx)($.Info,{size:16})})]}),(0,a.jsx)(y.Z,{}),(0,a.jsx)(l.Z,{center:!0,children:(0,a.jsx)(c.Z,{size:128,value:ve?0:null===fe||void 0===fe?void 0:fe.p_scores[xe],children:(0,a.jsx)(g.ZP,{noMargin:!0,bold:!0,h2:!0,Component:"span",children:!ve&&(null===fe||void 0===fe?void 0:fe.p_scores[xe])})})}),(0,a.jsx)(l.Z,{center:!0,children:(0,a.jsx)(ct,{children:ve?"Not enough data":"".concat(Ee.toLocaleString()," Data Point")+(Ee>1?"s":"")})})]})}),(0,a.jsx)(l.Z,{children:(0,a.jsx)(b.Z,{children:(0,a.jsx)(m,{legend:(0,a.jsxs)(_e,{children:[(0,a.jsx)(ke,{color:"var(--geist-success)",name:oe}),(0,a.jsx)(ke,{color:"var(--accents-5)",variant:"dashed",name:"Production Deployments"})]}),title:(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,flex:"0 1 auto",children:[(0,a.jsxs)(g.ZP,{weight:500,span:!0,noMargin:!0,children:[oe," by"," ",ne[M].text]}),(0,a.jsx)(y.Z,{inline:!0,x:.5}),!ve&&(0,a.jsx)(Tt,{data:Ce,downIsGood:!1})]}),children:ve||!Ce.length?O:(0,a.jsx)(Oe,{deployments:(null===Ie||void 0===Ie?void 0:Ie.deployments)||[],data:Ce,title:"".concat(oe," by ").concat(ne[M].text),leftAxisSize:100,dateStart:De})})})})]}),(0,a.jsx)(l.Z,{children:(0,a.jsx)(b.Z,{padding:!1,gap:0,children:(0,a.jsxs)(l.Z,{direction:["column","row"],style:{borderBottom:"1px solid var(--accents-2)"},children:[ae.map((function(e,t){var n=Ze[e];return(0,a.jsx)(At,{order:t,name:e,notEnoughData:ve||null==n,value:n,score:we[e],active:B===e,"aria-label":"Show details for ".concat(se[e].name," metric"),onClick:function(){U(e)}},"metric-button-".concat(t))})),(0,a.jsxs)(l.Z,{direction:["column","row"],gap:0,flex:"0 0 100%",className:(0,s.Z)(x().metricDetails),style:(0,i.Z)({},"--order",ae.indexOf(B)),children:[(0,a.jsxs)(l.Z,{className:x().metricDetailsLeft,children:[(0,a.jsx)(Lt,{name:B,notEnoughData:ve||null==Pe,score:Pe}),(0,a.jsx)(y.Z,{y:.5}),(0,a.jsx)("hr",{className:"geist-hr-reset"}),(0,a.jsx)(y.Z,{y:.5}),(0,a.jsx)(Mt,{name:B}),(0,a.jsx)(y.Z,{}),(0,a.jsx)(It,{name:B})]}),(0,a.jsx)(y.Z,{y:-1}),(0,a.jsx)(l.Z,{flex:"1",style:{borderLeft:"1px solid var(--accents-2)",padding:"var(--geist-gap)"},children:(0,a.jsx)(m,{legend:(0,a.jsxs)(_e,{children:[(0,a.jsx)(ke,{color:"var(--geist-success)",name:B}),(0,a.jsx)(ke,{color:"var(--accents-5)",variant:"dashed",name:"Production Deployments"})]}),title:(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,children:[(0,a.jsxs)(g.ZP,{weight:500,span:!0,noMargin:!0,children:[B," by"," ",ne[M].text]}),(0,a.jsx)(y.Z,{inline:!0,x:.5}),(0,a.jsx)(Tt,{data:Se,unit:se[B].unit,downIsGood:!0})]}),children:ve||!Se.length?O:(0,a.jsx)(Oe,{deployments:(null===Ie||void 0===Ie?void 0:Ie.deployments)||[],data:Se,leftAxisUnit:se[B].unit,leftAxisSize:se[B]["tablet"===E?"mobile":E].bad,title:"".concat(B," by ").concat(ne[M].text),dateStart:De},"graph-data-for-".concat(B))})})]})]})})})]}),(0,a.jsx)(y.Z,{y:2})]}),!ze&&(0,a.jsx)(rt,{})]})})]})}),{active:"Analytics"}),At=function(e){var t=e.name,n=e.value,o=e.score,c=e.active,p=e.order,f=e.notEnoughData,h=(0,r.Z)(e,["name","value","score","active","order","notEnoughData"]),v=de().device,m=(0,u.J)();m&&(c=!1);var b=pe(t,n||0,v),j=b.color,O=b.unit,Z=b.name,w=c?"transparent":void 0;return(0,a.jsx)(Ve.Z,Dt(Dt({},h),{},{variant:"unstyled",disabled:m,className:(0,s.Z)(x().metricButton,(0,i.Z)({},x().active,c)),style:(0,i.Z)({order:p},"--metric-color",f?"var(--accents-3)":j),children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(g.ZP,{preset:"body-2",noMargin:!0,weight:600,children:Z}),(0,a.jsx)(y.Z,{y:.5}),(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,style:{justifyContent:"space-between"},children:[m?(0,a.jsx)(d.Z,{width:80,height:36}):(0,a.jsxs)(g.ZP,{h3:!0,Component:"span",noMargin:!0,children:[(0,a.jsx)("span",{className:x().score,children:f?"\u2013":n}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsx)(g.ZP,{type:"secondary",small:!0,className:x().unit,weight:500,children:O})]}),(0,a.jsx)(pt.Z,{value:f?0:o,colors:{0:m||c?"#fff":j},backgroundColor:f?void 0:w,size:32,children:(0,a.jsx)(g.ZP,{noMargin:!0,style:{fontSize:12},children:f?null:o})})]})]})}))},Lt=function(e){var t=e.name,n=e.score,r=e.notEnoughData,i=de().device,o=pe(t,n||0,i),c=o.badge,s=o.reason,p=o.icon,f=o.color;return(0,u.J)()?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Z,{width:"60%",height:21}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsx)(d.Z,{width:"40%",height:21}),(0,a.jsx)(y.Z,{y:.1})]}):(0,a.jsxs)(l.Z,{flex:"0 0 auto",children:[(0,a.jsx)(g.ZP,{preset:"body-2",noMargin:!0,weight:600,children:r?"No Data":c}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,children:[r?(0,a.jsx)($.AlertCircle,{fill:!0,size:20,color:"var(--geist-secondary)",secondary:"#fff"}):(0,a.jsx)(p,{fill:!0,size:20,color:f,secondary:"#fff"}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsx)(g.ZP,{small:!0,type:"secondary",noMargin:!0,children:r?"Not enough data":s})]})]})},Mt=function(e){var t=e.name,n=se[t].description;return(0,u.J)()?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Z,{width:"100%",height:21}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsx)(d.Z,{width:"100%",height:21}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsx)(d.Z,{width:"50%",height:21})]}):(0,a.jsx)("div",{className:x().metricDescription,children:(0,a.jsx)(g.ZP,{preset:"body-2",noMargin:!0,children:n})})},It=function(e){var t=e.name,n=(0,u.J)();return(0,a.jsx)(d.Z,{show:n,style:{marginTop:"auto"},children:(0,a.jsx)(ut.Z,{href:"https://web.dev/".concat(t.toLowerCase()),suffix:(0,a.jsx)($.ExternalLink,{}),type:"success",align:"start",tab:!0,children:"Learn More"})})},Rt=function(e){var t=e.time,n=e.sampleRate,r=e.settingHref,i=e.hideSampleRate,o=(0,u.J)(),c=(0,K.Rd)(t?new Date(t).getTime():void 0,{justNowLabel:"just now"});return(0,a.jsx)(l.Z,{row:!0,vcenter:!0,className:x().updatedAtAndSampling,flex:"0 0 auto",gap:.5,children:o?(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsx)(d.Z,{width:270,height:22})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsxs)(g.ZP,{type:"secondary",preset:"body-2",noMargin:!0,children:["Updated ",c]})}),!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsx)(g.ZP,{type:"secondary",preset:"body-2",noMargin:!0,children:"\xb7"})}),(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsx)(H.Z,{href:r,className:x().samplingLink,children:(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,children:[(0,a.jsx)(g.ZP,{preset:"body-2",noMargin:!0,weight:500,children:(0,a.jsxs)("span",{className:x().samplingLinkText,children:["Sampling ",n,"%"]})}),(0,a.jsx)(y.Z,{x:.25}),(0,a.jsx)(pt.Z,{value:n,colors:{0:o?"transparent":"var(--geist-success)"},size:24})]})})})]})]})})},Tt=function(e){var t=e.data,n=e.downIsGood,r=void 0===n||n,i=e.unit,o=void 0===i?"":i,c=function(e,t){if(null===e||void 0===e||!e.length)return{};var n,r,i=e[0][1],o=ce(e[e.length-1][1]-i,2);return o>0?(n=$.ArrowUpCircle,r=t?"var(--wv-red)":"var(--wv-green)"):0===o?(n=$.ArrowRightCircle,r="var(--accents-5)"):(n=$.ArrowDownCircle,r=t?"var(--wv-green)":"var(--wv-red)"),{icon:n,color:r,difference:o}}(t,r),s=c.icon,u=c.color,d=c.difference;return t.length?(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,flex:"0 0 auto",children:[(0,a.jsx)(s,{color:u,size:20}),(0,a.jsx)(y.Z,{inline:!0,x:.25}),(0,a.jsxs)(g.ZP,{noMargin:!0,small:!0,style:{color:u},children:[d,o]})]}):null},zt=(0,a.jsx)(ht.Z,{text:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(g.ZP,{h5:!0,Component:"span",noMargin:!0,children:"Upgrade to Pro"}),(0,a.jsx)(y.Z,{y:.25}),(0,a.jsx)(g.ZP,{preset:"body-2",noMargin:!0,type:"secondary",children:"Upgrade to a paid Team Account to see older Analytics events."}),(0,a.jsx)(y.Z,{}),(0,a.jsx)(ut.Z,{href:"/teams/create",type:"success",width:"100%",children:"Create a Team"})]}),position:"bottom",delay:!1,invert:!1,center:!1,padding:"var(--geist-gap)",children:(0,a.jsx)("span",{style:{pointerEvents:"none"},children:(0,a.jsx)(Ne.Z,{placeholder:"Last Day",children:Object.keys(ne).map((function(e){return(0,a.jsx)("option",{value:e,children:ne[e].text},"time-period-".concat(e))}))})})}),Ft=function(e){var t,n=e.updatedAt,r=e.isExternalProject,o=e.sampleRate,c=e.sampleRateSettingHref,s=e.project,p=e.revalidate,f=(0,u.J)(),h=(0,w.useState)(!1),v=h[0],m=h[1],y=(0,w.useState)(!1),b=y[0],j=y[1],O=(0,w.useState)(!1),P=O[0],_=O[1],k=(0,vt.Gj)(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,className:x().header,gap:.5,children:[(0,a.jsxs)(l.Z,{row:!0,vcenter:!0,gap:.5,children:[(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsx)(g.ZP,{h2:!0,Component:"h1",weight:500,noMargin:!0,children:"Analytics"})}),null!==k&&!f&&(0,a.jsx)(l.Z,{flex:"0 0 auto",children:(0,a.jsx)(Ve.Z,{variant:"unstyled",onClick:function(){return _(!0)},children:(0,a.jsx)(lt.Z,{size:"small",uppercase:!0,type:k<=1?"error":k<=3?"warning":"lite",style:k>3?(t={},(0,i.Z)(t,"--geist-foreground","var(--accents-6)"),(0,i.Z)(t,"--accents-1","var(--geist-background)"),t):void 0,children:0===k?"ending today":"".concat(k," day").concat(1!==k?"s":""," left")})})})]}),(0,a.jsx)(l.Z,{flex:"0 0 auto",vcenter:!0,className:x().menu,children:f?(0,a.jsx)(d.Z,{width:40,height:40}):(0,a.jsxs)(dt.XG,{position:"bottom-end",children:[(0,a.jsx)(dt.j2,{type:"secondary",svgOnly:!0,"aria-label":"More Analytics Actions",shape:"square",children:(0,a.jsx)($.MoreHorizontal,{size:16})}),(0,a.jsxs)(dt.v2,{width:180,divide:!0,children:[r&&(0,a.jsx)(dt.sN,{onClick:function(){return m(!0)},children:"Analytics ID"}),null!==k?(0,a.jsx)(dt.sN,{onClick:function(){return _(!0)},children:"Re-Enable Analytics"}):(0,a.jsx)(dt.sN,{type:"error",onClick:function(){return j(!0)},children:"Disable Analytics"})]})]})}),(0,a.jsx)(Rt,{time:n,sampleRate:o,settingHref:c,hideSampleRate:null!==k&&!f})]}),(0,a.jsx)(Pe,{active:v,close:function(){return m(!1)}}),(0,a.jsx)(Z.Z,{active:b,close:function(){return j(!1)},revalidateAnalytics:p}),P&&(0,a.jsx)(Nt,{active:!0,revalidateAnalytics:p,close:function(){return _(!1)}})]})}},93066:function(e,t,n){"use strict";n.d(t,{Z:function(){return E}});var r={};n.r(r),n.d(r,{ARROW_DOWN:function(){return h},ARROW_LEFT:function(){return v},ARROW_RIGHT:function(){return m},ARROW_UP:function(){return g},BACKSPACE:function(){return y},COMMA:function(){return b},ENTER:function(){return x},ENTER_OR_SPACEBAR:function(){return j},ESC:function(){return O},F:function(){return _},SHIFT:function(){return P},SPACEBAR:function(){return Z},TAB:function(){return w}});var i=n(24246),o=n(98502),a=n(83101),c=n(76982),s=n(55395),l=n(9968),u=n(39183),d=n(3184),p=n(67105),f=n(27378),h=k(40),v=k(37),m=k(39),g=k(38),y=k(8),b=k(188),j=function(e){return k(13)(e)||k(32)(e)},x=k(13),O=k(27),Z=k(32),w=k(9),P=k(16),_=k(70);function k(e){return function(t){return t.keyCode===e}}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,p.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.Z)(e);if(t){var i=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,u.Z)(this,n)}}var N,E=(N=function(e){return e.children},function(e){(0,l.Z)(n,e);var t=C(n);function n(){var e;(0,a.Z)(this,n);for(var i=arguments.length,o=new Array(i),c=0;c<i;c++)o[c]=arguments[c];return e=t.call.apply(t,[this].concat(o)),(0,p.Z)((0,s.Z)(e),"getMatcher",(function(t){return(e.props.matchers?S(S({},r),e.props.matchers):r)[t]})),(0,p.Z)((0,s.Z)(e),"handleKeyDown",(function(t){var n=e.props.handlers,r=n&&(n.keydown||n);Object.keys(r||{}).forEach((function(r){var i=e.getMatcher(r),o=n[r]||n.keydown&&n.keydown[r];i&&i(t)&&o&&o.call((0,s.Z)(e),t,e.props)}))})),(0,p.Z)((0,s.Z)(e),"handleKeyUp",(function(t){var n=e.props.handlers,r=n&&n.keyup;Object.keys(r||{}).forEach((function(n){var i=e.getMatcher(n),o=r[n];i&&i(t)&&o&&o.call((0,s.Z)(e),t,e.props)}))})),e}return(0,c.Z)(n,[{key:"componentDidMount",value:function(){this.props.useKeys&&(document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp))}},{key:"componentDidUpdate",value:function(){this.props.useKeys?(document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)):(document.removeEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp))}},{key:"componentWillUnmount",value:function(){this.props.useKeys&&(document.removeEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp))}},{key:"render",value:function(){var e=this.props,t=(e.useKeys,(0,o.Z)(e,["useKeys"]));return(0,i.jsx)(N,S({},t))}}]),n}(f.Component))},96637:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(24246),i=n(83101),o=n(76982),a=n(9968),c=n(39183),s=n(3184),l=n(27378),u=n(38944),d=n(55911),p=0;function f(){0===p&&(document.body.style.overflow="hidden"),p+=1}function h(){0===(p-=1)&&(document.body.style.overflow=null)}function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.Z)(e);if(t){var i=(0,s.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,c.Z)(this,n)}}var m=function(e){(0,a.Z)(n,e);var t=v(n);function n(){return(0,i.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n,[{key:"componentDidMount",value:function(){f()}},{key:"componentWillUnmount",value:function(){h()}},{key:"render",value:function(){var e=this.props,t=e.active,n=e.children,i=e.className,o=e.container,a=e.onClick;return(0,r.jsx)(d.Z,{container:o,children:(0,r.jsxs)("div",{className:(0,u.Z)("geist-overlay",i),children:[(0,r.jsx)("div",{className:(0,u.Z)("geist-overlay-backdrop",{active:t}),onClick:a}),n]})})}}]),n}(l.Component)},16121:function(e,t,n){"use strict";n.d(t,{V:function(){return h},Z:function(){return v}});var r=n(67105),i=n(98502),o=n(27378),a=n(70053),c=n(93632),s=n(61659),l=n(55888),u=n(97165),d=n(18213);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){var t,n=e.limit,r=e.project,i=e.requireProject,p=e.users,f=e.target,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},v=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"v6",m=(0,s.LP)(),g=(0,d.ZP)(),y=g.teamData,b=p&&p.length>0?p.map((function(e){return e.uid})).join(","):null,j=(0,a.g_)((function(e,t){if(i&&!r)return null;var o;if(!e)return"".concat((0,l.PP)(v)).concat((0,u.c)({projectId:null===r||void 0===r?void 0:r.id,limit:n,teamId:(null===y||void 0===y||null===(o=y.team)||void 0===o?void 0:o.id)||null,target:f||null,users:b}));var a,c=t&&t.deployments.length>=n?t.deployments[t.deployments.length-1].created-1:null;return c?"".concat((0,l.PP)(v)).concat((0,u.c)({projectId:null===r||void 0===r?void 0:r.id,limit:n,from:c,teamId:(null===y||void 0===y||null===(a=y.team)||void 0===a?void 0:a.id)||null,target:f,users:b})):null}),(function(e){return(0,c.Z)(e,m,{throwOnHTTPError:!0})}),h),x=(0,o.useMemo)((function(){return j.data?j.data.map((function(e){return e.deployments})).flat():[]}),[j.data]),O=Boolean(j.data),Z=O&&0===x.length,w=function(){return j.setSize((function(e){return e+1}))},P=O&&j.data&&j.size>j.data.length,_=O&&j.data&&(null===(t=j.data[j.data.length-1])||void 0===t?void 0:t.deployments.length)<n;return[j,{deployments:x,initialDataLoaded:O,isEmpty:Z,loadMore:w,isLoadingMore:P,isReachingEnd:_}]}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"v6",r=e.limit,o=e.projectId,p=e.project,h=e.from,v=e.target,m=e.users,g=void 0===m?[]:m,y=(0,i.Z)(e,["limit","projectId","project","from","target","users"]),b=(0,s.LP)(),j=(0,d.ZP)(),x=j.teamData,O=g.length>0?g.map((function(e){return e.uid})).join(","):null;return(0,a.ZP)((function(){var e;return"".concat((0,l.PP)(n)).concat((0,u.c)(f({projectId:o||(null===p||void 0===p?void 0:p.id),limit:r,from:h||null,teamId:(null===x||void 0===x||null===(e=x.team)||void 0===e?void 0:e.id)||null,target:v,users:O},y)))}),(function(e){return(0,c.Z)(e,b,{throwOnHTTPError:!0})}),t)}},43043:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(88742),i=n.n(r),o=n(40505),a=n(67105),c=n(55888),s=n(61659),l=n(72047),u=n.n(l);function d(e){return p.apply(this,arguments)}function p(){return(p=(0,o.Z)(i().mark((function e(t){var n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:3,e.abrupt("return",u()(t,{randomize:!1,factor:1,minTimeout:n>=5?1e3:250,maxTimeout:n>=5?1001:251,retries:n}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f=n(93632),h=n(97165),v=n(27378),m=n(70053),g=n(18213),y=n(16378);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.days,r=void 0===n?1:n,a=t.intervalMinutes,l=void 0===a?1440:a,u=t.once,p=void 0!==u&&u,b=arguments.length>2?arguments[2]:void 0,x=(0,s.LP)(),O=(0,g.ZP)(),Z=O.teamData,w=(0,y.Z)(),P=w.user,_=(0,v.useState)(3333),k=_[0],D=_[1],S={days:r,intervalMinutes:l};return(0,m.ZP)((function(){return e&&Z&&P?"/v2".concat(c._Q,"/overview/").concat(encodeURIComponent(e)).concat((0,h.c)(j(j({},S),{},{slug:Z.team?Z.team.slug:P.username}))):""}),(function(e){function t(){return(t=(0,o.Z)(i().mark((function t(){var n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,f.Z)(e,x,{throwOnHTTPError:!0,returnStatus:!0});case 2:if(null!==(n=t.sent)&&204!==n.status){t.next=6;break}return D(0),t.abrupt("return",{empty:!0});case 6:return p&&200===n.status&&D(0),t.abrupt("return",n.body);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return d((function(){return function(){return t.apply(this,arguments)}()}),6)}),j(j({},b),{},{refreshInterval:k}))}},24281:function(e,t,n){"use strict";n.d(t,{g4:function(){return h},B8:function(){return v},Oe:function(){return m}});var r=n(22968),i=n(88742),o=n.n(i),a=n(40505),c=n(27378),s=n(70053),l=n(93632),u=n(18213),d=n(61659),p=n(97165),f=n(55888);function h(e,t){var n=(0,u.ZP)().teamData;return(0,s.ZP)(e?"".concat(f.du,"/").concat(e.projectId,"/domains/").concat(e.name).concat((0,p.c)({teamId:null!==n&&void 0!==n&&n.team?n.team.id:null})):null,(function(e){return(0,l.Z)(e,(0,d.LP)(),{throwOnHTTPError:!0})}),t)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?10:n,i=t.production,c=t.redirects,h=t.order,v=(0,u.ZP)(),m=v.teamData;return(0,s.ZP)(e?"".concat(f.du,"/").concat(e,"/domains").concat((0,p.c)({limit:r,production:i,redirects:c,order:h,teamId:null!==m&&void 0!==m&&m.team?m.team.id:null})):null,function(){var e=(0,a.Z)(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.Z)(t,(0,d.LP)(),{throwOnHTTPError:!0});case 2:return n=e.sent,e.abrupt("return",n.domains);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}function m(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.limit,h=void 0===i?20:i,v=arguments.length>2?arguments[2]:void 0,m=(0,d.LP)(),g=(0,u.ZP)(),y=g.teamData,b=(0,s.g_)((function(t,n){var r;if(!e||!y)return null;var i="".concat(f.du,"/").concat(e,"/domains");if(!t)return"".concat(i).concat((0,p.c)({limit:h+1,teamId:null!==y&&void 0!==y&&y.team?y.team.id:null}));var o=((null===n||void 0===n||null===(r=n.domains)||void 0===r?void 0:r.length)||0)>h?null===n||void 0===n?void 0:n.domains[h-1].createdAt:null;return o?"".concat(i).concat((0,p.c)({limit:h+1,teamId:null!==y&&void 0!==y&&y.team?y.team.id:null,until:o})):null}),function(){var e=(0,a.Z)(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.Z)(t,m,{throwOnHTTPError:!0}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v),j=(0,c.useMemo)((function(){var e;return b.data?(e=[]).concat.apply(e,(0,r.Z)(b.data.map((function(e){return e.domains.slice(0,h)})))):[]}),[b.data,h]),x=!!b.data,O=x&&0===j.length,Z=function(){return b.setSize((function(e){return e+1}))},w=b.data&&b.size>b.data.length,P=b.data&&(null===(t=b.data[b.data.length-1])||void 0===t?void 0:t.domains.length)<=h;return[b,{domains:j,initialDataLoaded:x,isEmpty:O,loadMore:Z,isLoadingMore:w,isReachingEnd:P}]}},27383:function(e,t,n){"use strict";n.d(t,{P:function(){return l},W:function(){return u}});var r=n(70053),i=n(93632),o=n(61659),a=n(55888),c=n(97165),s=n(18213);function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=n.latestDeployments,u=void 0===l?0:l,d=n.config,p=(0,o.LP)(),f=(0,s.ZP)(),h=f.teamData;return(0,r.ZP)(h&&e?"".concat(a.VE,"/").concat(encodeURIComponent(e)).concat((0,c.c)({teamId:null===(t=h.team)||void 0===t?void 0:t.id,latestDeployments:u})):"",(function(e){return(0,i.Z)(e,p,{throwOnHTTPError:!0})}),d)}function u(e,t){return l(e,{latestDeployments:1,config:t})}l.preload=function(e,t){return"".concat(a.VE,"/").concat(encodeURIComponent(e)).concat((0,c.c)({teamId:t,latestDeployments:0}))}},26240:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[teamSlug]/[project]/insights",function(){return n(64483)}])},27524:function(e){e.exports={score:"analytics-circle_score__17HcI"}},11927:function(e){e.exports={chart:"chart_chart__2rGWm",legend:"chart_legend__1cM5J",title:"chart_title__1I_5R",graph:"chart_graph__1qSrK"}},31338:function(e){e.exports={tooltip:"graph_tooltip__17qYD",locked:"graph_locked__1kF9X",deploymentLine:"graph_deploymentLine__3aqq0"}},85198:function(e){e.exports={chart:"pages_chart__T_Xj5",metricScore:"pages_metricScore__2jjMg",metric:"pages_metric__nalH1",a5:"pages_a5__5hsif"}},49120:function(e){e.exports={pill:"pill_pill__21k37"}},14923:function(e){e.exports={wrapper:"icon_wrapper__qYh8M",icon:"icon_icon__2VI4T"}},38038:function(e){e.exports={code:"inline_code__2sZVJ",nowrap:"inline_nowrap__3KL_t"}},81970:function(e){e.exports={description:"description_description__2hdsT",icon:"description_icon__1ySlg",right:"description_right__1mgyA",ellipsis:"description_ellipsis__2sdZ1"}},9388:function(e){e.exports={error:"error_error__3mrJ4","action-link":"error_action-link__2U1iD",label:"error_label__1DIup",text:"error_text__3FAOV",small:"error_small__150fJ",large:"error_large__2WW5K"}},11248:function(e){e.exports={container:"input_container__1QFMt",input:"input_input__3wlDO",prefix:"input_prefix__22g3W",suffix:"input_suffix__2dRFl",noPrefixStyle:"input_noPrefixStyle__3Vu_y",noSuffixStyle:"input_noSuffixStyle__2RyuH",large:"input_large__g2bon",small:"input_small__3cjMu"}},55543:function(e){e.exports={wrapper:"menu_wrapper__3iI3R",menu:"menu_menu__1R7a3",item:"menu_item__2lcax",error:"menu_error__rTCf5",suffix:"menu_suffix__Fph8x",prefix:"menu_prefix__3sIyw",divider:"menu_divider__2At3Z",section:"menu_section__2hSvf",title:"menu_title__VkVHV",loose:"menu_loose__3ikPz",divide:"menu_divide__2x6EO",arrow:"menu_arrow__10XLF"}},35668:function(e){e.exports={wrapper:"modal_wrapper__edSN2",allowOverflow:"modal_allowOverflow__1yG5M",active:"modal_active__rzo9w",actions:"modal_actions__2GjX0",action:"modal_action__24so5",modalBody:"modal_modalBody__28ePJ",padding:"modal_padding__2Ed5l",error:"modal_error__GL2IC",header:"modal_header__2nA_e",modalParagraph:"modal_modalParagraph__4ZFQE",inset:"modal_inset__1Mdn6",last:"modal_last__17Mry",outset:"modal_outset__DWAqd"}},71090:function(e){e.exports={circle:"progress-circle_circle__2txpD",content:"progress-circle_content__2knBt",arc:"progress-circle_arc__2IRMC",animate:"progress-circle_animate__T2ilP",fadeIn:"progress-circle_fadeIn__15utu"}},22465:function(e){e.exports={snippet:"snippet_snippet__l83NO",dark:"snippet_dark__2pitK",copy:"snippet_copy__3xUoY",prompt:"snippet_prompt__2JFPC"}},30992:function(e){e.exports={tabs:"tabs_tabs__2c8FJ",centered:"tabs_centered__14lgd",bold:"tabs_bold___tAne",tabContainer:"tabs_tabContainer__2togU",disabled:"tabs_disabled__CzgTe",tab:"tabs_tab__k4R3X",activeTab:"tabs_activeTab__D-5xW",tabIcon:"tabs_tabIcon__Kav0c"}},69799:function(e){e.exports={gray:"analytics_gray__1uM7y",noDataCard:"analytics_noDataCard__N4Swu",gradientOverlay:"analytics_gradientOverlay__1r6-w",fadeIn:"analytics_fadeIn__3Ib_T",badge:"analytics_badge__rFwit",metricButton:"analytics_metricButton__1Bu0r",active:"analytics_active__3jHgR",score:"analytics_score__3NzNK",unit:"analytics_unit__18Mfg",metricTitle:"analytics_metricTitle__2Iq3S",metricDescription:"analytics_metricDescription__1ZXb2",select:"analytics_select__1vza9",metricDetails:"analytics_metricDetails__3h6fd",metricDetailsLeft:"analytics_metricDetailsLeft__18gQ3",header:"analytics_header__3vyz0",menu:"analytics_menu__2KRzr",samplingLinkText:"analytics_samplingLinkText__xr7ik",samplingLink:"analytics_samplingLink__1iXrZ",updatedAtAndSampling:"analytics_updatedAtAndSampling__uZkrh"}}},function(e){e.O(0,[9774,7938,9593,8944,41,2970,9845,6337,8780,4932,4554,1230,5737,1859,9409,2761,6784,6744,4316,8473,5047,6239,7875,3247,9833,2888,179],(function(){return t=26240,e(e.s=t);var t}));var t=e.O();_N_E=t}]);