1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2054],{27236:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/developers/domains/create",function(){return t(47260)}])},59390:function(e,s,t){"use strict";t.d(s,{G:function(){return d}});var i=t(52322),n=t(97729),a=t.n(n),r=t(42587),l=t(39970),c=t(66621);function o(e){let{children:s}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{children:(0,i.jsx)("title",{children:"Developers"})}),(0,i.jsxs)(l.Z,{children:[(0,i.jsxs)("div",{className:"border-dark-accent flex items-center justify-between border-b px-8 py-4",children:[(0,i.jsx)(c.H,{items:[{title:"API Keys",href:"/developers/keys"},{title:"Transactions",href:"/developers/transactions"},{title:"Trees",href:"/developers/trees"},{title:"Domains",href:"/developers/domains"}]}),(0,i.jsx)(r.zx,{href:"https://underdog.readme.io",type:"primary",children:"View Documentation"})]}),(0,i.jsx)("div",{className:"px-16 py-8",children:s})]})]})}let d=e=>(0,i.jsx)(o,{children:e})},66621:function(e,s,t){"use strict";t.d(s,{H:function(){return r}});var i=t(52322),n=t(5632),a=t(42587);let r=e=>{let{items:s,className:t}=e,r=(0,n.useRouter)();return(0,i.jsx)("div",{className:t,children:s.map((e,s)=>(0,i.jsx)(a.zx,{type:"link",className:e.href&&r.asPath.split("?")[0]===e.href?"text-primary":"",children:(0,i.jsx)(a.tf,{...e})},s))})}},47260:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return j}});var i=t(52322),n=t(59390),a=t(42587),r=t(79782),l=t(28426),c=t(5632),o=t(2784),d=t(87536),u=t(54306),p=t(54204),m=t(95026);let x=e=>{var s;let{namespace:t,onSuccess:n,...c}=e,{currentWallet:d}=(0,a.BN)(),x=(0,u.O)(),{pay:h,setPaymentMetadata:f,metadata:j}=(0,l.Eo)({connection:new p.ew(r.Ti[m.KzI.Mainnet])}),y=(0,a.l5)(),{error:v}=(0,m.ayw)({params:{namespace:t}},y);if((0,o.useEffect)(()=>{var e;(null==d?void 0:null===(e=d.org)||void 0===e?void 0:e.superAdminAddress)&&f({namespace:t?t.toLowerCase():"",domainAuthority:d.org.superAdminAddress})},[null==d?void 0:null===(s=d.org)||void 0===s?void 0:s.superAdminAddress,t,f]),!x.publicKey)return(0,i.jsx)(a.pB,{...c});let g=async()=>{try{if(!v)return(0,a.jK)({title:"Domain with namespace has already been created"});await h(),n()}catch(e){(0,a.jK)({title:"Transaction failed"})}};return(0,i.jsxs)("div",{children:[(0,i.jsx)(a.zx,{type:"primary",...c,onClick:g,disabled:!j.namespace,children:"Checkout"}),(0,i.jsx)(a.zx,{type:"link",className:"text-primary",onClick:()=>x.disconnect(),...c,children:"Select a different wallet"})]})},h=()=>{let e=(0,c.useRouter)(),{watch:s,register:t,formState:{errors:n},setValue:u}=(0,d.cI)({defaultValues:{payWith:"sol"}}),[p,m]=(0,o.useState)(r.aO.domain.sol),{payWith:h,code:f,namespace:j}=s();return(0,o.useEffect)(()=>{"sol"===h?m(f===r.o_?r.aO.domain.partner.sol:r.aO.domain.sol):m(f===r.zm?r.aO.domain.partner.usdc:r.aO.domain.usdc)},[h,f]),(0,i.jsxs)("form",{className:"space-y-4",children:[(0,i.jsx)(a.II,{label:{title:"Namespace"},placeholder:"Namespace (e.g. solarplex, underdog, drip)",maxLength:16,error:n.namespace,...t("namespace",{required:!0})}),(0,i.jsx)(a.II,{label:{title:"Partner Code"},error:n.code,...t("code")}),(0,i.jsxs)("div",{className:"space-y-0.5",children:[(0,i.jsx)(a.__,{label:"Pay With"}),(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,i.jsx)(a.zx,{size:"sm",type:"sol"===h?"secondary":"default",onClick:()=>u("payWith","sol"),children:(0,i.jsx)(a.tf,{title:"SOL",media:{src:"https://assets.coingecko.com/coins/images/21629/large/solana.jpg",size:"xs"}})}),(0,i.jsx)(a.zx,{type:"usdc"===h?"secondary":"default",onClick:()=>u("payWith","usdc"),children:(0,i.jsx)(a.tf,{title:"USDC",media:{src:"https://assets.coingecko.com/coins/images/6319/large/usdc.png",size:"xs"}})})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(a.__,{label:"Price"}),(0,i.jsx)(a.tf,{title:p===r.aO.domain.usdc?"1000 USDC":p===r.aO.domain.sol?"20 SOL":p===r.aO.domain.usdc?"1000 USDC":p===r.aO.domain.partner.usdc?"100 USDC":"1 SOL",size:"xl"})]}),(0,i.jsx)(l.L7,{paymentLinkId:p,children:(0,i.jsx)(x,{block:!0,namespace:j,onSuccess:()=>{(0,a.jK)({title:"Processing Domain Creation",description:"We'll redirect you to the Domains page and your new Domain will be updated soon"}),e.push("/domains")}})})]})},f=()=>(0,i.jsx)(a.W2,{children:(0,i.jsx)(h,{})});function j(){return(0,i.jsx)(f,{})}j.getLayout=n.G}},function(e){e.O(0,[5781,391,9970,9774,2888,179],function(){return e(e.s=27236)}),_N_E=e.O()}]);
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.