1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4684],{583(t,e,n){t.exports=n.p+"assets/media/3a28c1f0e0b742dbaacc.svg?url"},9067(t,e,n){n.r(e),n.d(e,{default:()=>b});var a=n(36870),s=n(9601),o=n(86326),l=n(82432),i=n(2997),r=n(81857),c=n(19943),d=n(52505),u=n(44110),h=n(286),p=n(54499),m=n(36940),f=n(58e3),g=n(583),y=n(53227),j=n(28787),x=n(27264);function S(t){let{application:e,site:n,onClaim:s,accountSlug:o,accounts:l,onSelectAccount:i}=t,r=!e,c=e&&e.get("name"),d=!!n,h=d?"app":"apps",p=l?.size&&l?.size>1,{data:S,isLoading:v}=(0,f.C)(o),w=p&&!v&&S&&!S.canCreateSites;return(0,a.jsxs)(j.A,{title:`Claim your ${c} ${h} on Netlify`,illustration:g,action:(0,a.jsx)(x.A,{saveLabel:`Claim ${h}`,savingLabel:`Claiming ${h} now`,onSave:s,disabled:w}),loading:r,children:[(0,a.jsxs)("p",{children:[n?(0,a.jsxs)("span",{children:["By claiming ",(0,a.jsx)("strong",{children:n.get("name")}),", youâll get full control to configure a custom domain, enable HTTPs, and enjoy all the features Netlify offers."]}):(0,a.jsxs)("span",{children:["By claiming your ",c," ",h,", youâll get full control to configure a custom domain, enable HTTPs, and enjoy all the features Netlify offers."]})," "]}),(0,a.jsxs)("p",{children:["Plus, you can still update and deploy your ",h," from ",c," after you add ",d?"it":"them"," to your Netlify account."]}),p&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.A,{accounts:l,data:(0,u.fromJS)({account_slug:o}),onChange:t=>{let{target:{value:e}}=t;return i(e)}}),w&&(0,a.jsx)(y.A,{className:"tw-mt-4",error:(0,a.jsxs)("span",{className:" tw-flex tw-flex-col tw-gap-2",children:[(0,a.jsx)("strong",{children:"You donât have permission to claim a new project in this team."}),"Please choose another team or contact your team owner for access."]})})]})]})}class v extends o.Component{unmounted;constructor(t){super(t),this.state={}}UNSAFE_componentWillMount(){let t=(0,h.f)(this.props.token);this.setState({jwt:t})}componentDidMount(){let{api:t}=this.props,{jwt:e}=this.state,n=(0,h.c)(e)?null:{code:422,message:"Invalid JSON Web Token"};if(n)return this.handleError(n);(function(t){let{api:e,jwt:n}=t;return(function(t,e,n){let a=e.payload.id;return a?t.siteById(a).then(t=>{let e=t.data;return e&&e.id===a&&(n.site=(0,u.fromJS)(e),n.sites=(0,u.fromJS)([])),n}).catch(()=>n):Promise.resolve(n)})(e,n,{}).then(t=>t.site?t:Promise.all([function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.application(e.payload.client_id).then(t=>(n.application=(0,u.fromJS)(t.data),n))}(e,n,t),function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.sites({token:e.token,sortBy:"updated_at"}).then(t=>{let a=e.payload.id;return n.sites=(0,u.fromJS)(t.data),n.site=a&&n.sites.find(t=>t.get("id")===a),n})}(e,n,t),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.accounts().then(t=>e.accounts=(0,u.fromJS)(t.data))}(e,t)]).then(()=>t))})({api:t,jwt:e}).then(t=>this.handleLoaded(t,e)).catch(t=>this.handleError(t))}componentWillUnmount(){this.unmounted=!0}updateState(t){this.unmounted||this.setState(t)}handleDone=t=>{let{onDone:e}=this.props,n=t?.data;if(!n)return void e?.();let a=Array.isArray(n)?n:[n];if(a.length>1)return void e?.();e?.(a)};handleLoaded=(t,e)=>{let{sites:n}=t,{onLoaded:a}=this.props,s=n.isEmpty();return a?.({jwt:e,...t}),s?this.handleDone(t):this.updateState(t)};handleError=t=>{let{onError:e}=this.props;e?.(t)};handleClaim=()=>{let{api:t,token:e,account:n}=this.props,{jwt:a,accountSlug:s}=this.state,o=s??n?.get("slug");return t.claimFromAccount({token:e,id:a.payload.id,accountSlug:o}).then(t=>this.handleDone(t)).catch(t=>this.handleError(t))};handleSelectAccount=t=>{this.setState({accountSlug:t})};render(){let{application:t,sites:e,site:n,accounts:s,accountSlug:o}=this.state,{account:l}=this.props;return(0,a.jsx)("div",{className:"container",children:t&&e?(0,a.jsx)(S,{application:t,site:n,onClaim:this.handleClaim,accountSlug:o??l?.get("slug"),accounts:s,onSelectAccount:this.handleSelectAccount}):(0,a.jsx)("div",{className:"page page-drop",children:(0,a.jsx)("div",{className:"drop-page__content",children:(0,a.jsx)(p.A,{className:"tw-ml-10"})})})})}}var w=n(87310),N=n(6138),A=n(8687),C=n(35566);let b=(0,l.Ng)(t=>{let e=window.location.hash.substring(1),n=(0,c.ji)(window.location.search),a=(0,N.KW)(n);!e&&n?e=a:e&&a&&(0,N.sc)(n);let s=(0,i.PR)(t);return{api:(0,r.x4)(t),token:e,account:s,accounts:(0,i.N8)(t)}},t=>({setData:e=>{let{site:n,accounts:a}=e;n&&t(d.o1.siteSuccess(n.toJS())),a&&t(i.o1.accountsSuccess("accounts",a.toJS(),[]))}}))(t=>{let{token:e,setData:n,api:l,account:i,accounts:r}=t,{setIsLoadingApp:d}=(0,w.ZT)(),[u,h]=(0,o.useState)(null),p=async t=>{let e=t?.[0],n=e?(0,s.l2)(e):"/";d(!1);let a=(0,c.ji)(window.location.search);(0,N.KW)(a)&&(0,N.sc)(a),A.N.replace(n)};return(0,a.jsx)("div",{children:u?(0,a.jsx)(C.A,{error:u}):(0,a.jsx)(v,{api:l,token:e,onError:t=>{d(!1),h(t)},onLoaded:t=>{n(t),d(!1)},onDone:p,account:i,accounts:r})})})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.