PageSourceSearch

https://slash-everything.vercel.app/_next/static/chunks/pages/index-792557a3b7a45464.js

js slash-everything.vercel.app collected 2026-10-03 07:45:22 UTC 9,960 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(88831)}])},33505:function(e,t,n){"use strict";n.d(t,{h:function(){return w}});var i=n(85893),r=n(31214),l=n(94929),s=n(92022),a=n(7335),o=n(19152),c=n(204),d=n(88911),u=n(29222),h=n(7306),x=n(48056),g=n(91259),j=n(39828),p=n(9008),f=n.n(p),b=n(11163),m=n(44111),y=n.n(m);let w=()=>{(0,s.S)({base:!1,lg:!0});let e=(0,b.useRouter)(),t=(0,x.SF)(),n=(0,x.eC)(),{auth:p,db:w}=(0,r.Z)(),{user:S,isLoading:v}=(0,l.Z)(),{isOpen:C,onOpen:z,onClose:A}=(0,a.q)(),k=()=>C?A():z(),_=async()=>{if(!t)return;let e=await (null==n?void 0:n.auth.login("slash-everything.vercel.app")),i=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payload:e})}),{token:r}=await i.json();(0,g._p)(p,r).then(e=>{let t=e.user,n=(0,j.JU)(w,"users",t.uid);(0,j.QT)(n).then(e=>{e.exists()||(0,j.pl)(n,{createdAt:(0,j.Bt)()},{merge:!0})})}).catch(e=>{console.error(e)})},U=(0,x.U6)(),I=async()=>{await U(),await _()};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(f(),{children:[(0,i.jsx)("title",{children:"Slash Everything"}),(0,i.jsx)("meta",{name:"description",content:"Generated by create next app"}),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(o.xu,{py:{base:"3",lg:"4"},px:"2",width:"full",maxHeight:"16",children:(0,i.jsxs)(c.k,{width:"full",justifyContent:"space-between",maxHeight:"16",children:[(0,i.jsx)(o.xu,{onClick:()=>e.push("/"),children:(0,i.jsx)(d.x,{fontSize:"xl",fontWeight:"extrabold",ml:"2",color:"blue.400",fontStyle:"italic",children:"Slash Everything"})}),(0,i.jsx)(i.Fragment,{children:t?(0,i.jsx)(i.Fragment,{children:S?(0,i.jsxs)(c.k,{direction:"column",children:[(0,i.jsx)(u.z,{color:"white",borderColor:"blue.400",textColor:"blue.400",variant:"outline",borderRadius:"3xl",minH:"10",onClick:()=>k(),children:(0,i.jsxs)(c.k,{align:"center",children:[(0,i.jsx)(y(),{diameter:30,seed:(0,m.jsNumberForAddress)(null==S?void 0:S.uid)}),(0,i.jsx)(d.x,{ml:"2",children:t.substring(0,10)+"..."})]})}),(0,i.jsx)(h.K,{direction:{base:"column"},display:{base:C?"block":"none"},bgColor:"gray.100",borderRadius:"3xl",border:"1px",borderColor:"gray.400",p:"2",boxShadow:"3xl",children:(0,i.jsx)(o.xu,{onClick:()=>(0,g.w7)(p),children:(0,i.jsx)(d.x,{my:"1",ml:"2",children:"Sign Out"})})})]}):(0,i.jsx)(u.z,{color:"white",borderColor:"blue.400",textColor:"blue.400",variant:"outline",borderRadius:"3xl",onClick:()=>I(),children:"Sign in"})}):(0,i.jsx)(u.z,{color:"white",borderColor:"blue.400",textColor:"blue.400",variant:"outline",borderRadius:"3xl",onClick:()=>I(),children:"Connect Wallet"})})]})})]})}},31214:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(83977),r=n(91259),l=n(39828);function s(){let e=(0,i.ZF)({apiKey:"AIzaSyAFdUCsvjHHywzNHSS7z5DSfw4TjGWcy2o",authDomain:"slash-everything-dev.firebaseapp.com",projectId:"slash-everything-dev",storageBucket:"slash-everything-dev.appspot.com",messagingSenderId:"742484895049",appId:"1:742484895049:web:4357eea0356bbcbd40a698"}),t=(0,l.ad)(e),n=(0,r.v0)(e);return{db:t,auth:n}}},40655:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});let i={initiated:"blue",processing:"cyan",failed:"red",completed:"green",action_required:"yellow"}},94929:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(91259),r=n(39828),l=n(67294),s=n(31214);function a(){let[e,t]=(0,l.useState)(!0),[n,a]=(0,l.useState)(null),{auth:o,db:c}=(0,s.Z)();return(0,l.useEffect)(()=>{let e=(0,i.Aj)(o,async e=>{if(e){let t=(0,r.JU)(c,"users",e.uid),i=await (0,r.QT)(t);if(i.exists()){var n;a({...e,role:null===(n=i.data())||void 0===n?void 0:n.role})}}else a(null);t(!1)});return()=>{e()}},[o]),{isLoading:e,user:n}}},88831:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var i=n(85893),r=n(31214),l=n(40655),s=n(94929),a=n(39828),o=n(67294),c=n(19152),d=n(36979),u=n(7306),h=n(14418),x=n(88911),g=n(33838),j=n(77630),p=n(28129),f=n(38267),b=n(8399),m=n(29222),y=n(29379),w=n(44857),S=n(5902),v=n(89154),C=n(41689),z=n(48056),A=n(91259),k=n(11163),_=n(89583),U=n(33505);
1function I(){let e=(0,k.useRouter)(),t=(0,z.SF)(),n=(0,z.eC)(),{auth:I,db:T}=(0,r.Z)(),{user:W}=(0,s.Z)(),{orders:E}=function(){let{db:e}=(0,r.Z)(),{user:t,isLoading:n}=(0,s.Z)(),[i,l]=(0,o.useState)(!0),[c,d]=(0,o.useState)(null),[u,h]=(0,o.useState)(null);return(0,o.useEffect)(()=>{!n&&t&&e?(async()=>{let n=(0,a.JU)(e,"users",t.uid),i=(0,a.cf)(n,e=>{e.exists()?d({...e.data(),id:e.id}):d(null),l(!1)}),r=(0,a.IO)((0,a.hJ)(e,"orders"),(0,a.ar)("user","==",t.uid));console.log(t.uid);let s=(0,a.cf)(r,async e=>{let t=[];console.log(t),e.forEach(e=>{console.log(e.data(),"dox"),t.push(e.data())}),h(t),l(!1)});return()=>{i(),s()}})():l(!1)},[e,t,n]),{isLoading:i,document:c,orders:u}}(),[K,N]=(0,o.useState)(!1),[O,Z]=(0,o.useState)(""),[F,J]=(0,o.useState)(""),[R,H]=(0,o.useState)(""),P=async()=>{if(!t)return;let e=await (null==n?void 0:n.auth.login("slash-everything.vercel.app")),i=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payload:e})}),{token:r}=await i.json();(0,A._p)(I,r).then(e=>{let t=e.user,n=(0,a.JU)(T,"users",t.uid);(0,a.QT)(n).then(e=>{e.exists()||(0,a.pl)(n,{createdAt:(0,a.Bt)()},{merge:!0})})}).catch(e=>{console.error(e)})},L=(0,z.U6)(),X=async()=>{var t;if(!F||!R)return;N(!0),console.log(W,"user");let n=await (null==I?void 0:null===(t=I.currentUser)||void 0===t?void 0:t.getIdToken()),i=await fetch("/api/scraping",{method:"POST",body:JSON.stringify({amazonUrl:F,amount:R}),headers:{Authorization:n||"unauthenticated"}});if(200===i.status){let t=await i.json();e.push(t.paymentUrl),N(!1)}else N(!1),alert("You have already started this payment. Please continue the payment or start from order again.")},q=e=>{let t=e.target.value;J(t),t&&!t.includes("https://www.amazon.co.jp/hz/wishlist/")?Z("error:Amazonの欲しい物リストのURLではないようです"):Z("")},B=e=>{let t=e.target.value;H(t),t&&parseInt(t)>1e4?Z("error:現在Slash-Everythingは10,000円以下にのみ対応しています"):Z("")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(U.h,{}),(0,i.jsx)(c.xu,{as:"section",bg:"bg-surface",py:{base:"16",md:"24"},children:(0,i.jsx)(d.W,{children:(0,i.jsxs)(u.K,{spacing:{base:"8",md:"10"},align:"center",px:{base:"4",md:"0"},children:[(0,i.jsx)(u.K,{spacing:{base:"4",md:"6"},textAlign:"center",children:(0,i.jsxs)(u.K,{spacing:"3",children:[(0,i.jsx)(h.X,{size:{base:"md",md:"3xl"},fontWeight:"extrabold",fontStyle:"italic",color:"blue.400",children:"Slash Everything"}),(0,i.jsx)(x.x,{color:"blue.400",fontWeight:"extrabold",fontSize:{base:"lg",md:"xl"},maxW:"3xl",children:"クリプトで欲しいものを買おう"})]})}),(0,i.jsxs)(u.K,{textAlign:"center",children:[(0,i.jsx)(h.X,{size:"lg",children:"Step 1"}),(0,i.jsxs)(x.x,{textAlign:{base:"left",md:"center"},children:["Amazonで欲しいものリストを作成してください。作成方法は",(0,i.jsx)(g.r,{href:"https://www.amazon.co.jp/gp/help/customer/display.html?nodeId=GHCGC7B7SQ222YMD",target:"_blank",color:"blue.400",fontWeight:"bold",children:"こちら"})]}),(0,i.jsx)(x.x,{textAlign:{base:"left",md:"center"},children:"住所を知られたくない方は匿名で設定してください。"})]}),(0,i.jsxs)(u.K,{textAlign:"center",children:[(0,i.jsx)(h.X,{size:"lg",children:"Step 2"}),(0,i.jsx)(x.x,{textAlign:{base:"left",md:"center"},children:"欲しいものリストのURLを入力して、クリプト決済ボタンを押してください。"}),(0,i.jsx)(x.x,{textAlign:{base:"left",md:"center"},children:"リンクが切り替わるので、クリプト決済を完了してください。"}),(0,i.jsx)(j.m.form,{width:{base:"full"},children:(0,i.jsxs)(u.K,{direction:{base:"column"},spacing:"4",shouldWrapChildren:!0,textAlign:"center",children:[(0,i.jsx)(p.I,{size:"lg",placeholder:"欲しいものリストのURLを入力してください",type:"url",required:!0,mx:"auto",onChange:q}),(0,i.jsxs)(f.NI,{isInvalid:Boolean(O),children:[(0,i.jsx)(p.I,{size:"lg",placeholder:"\xa5 金額",type:"number",required:!0,onChange:B}),O&&(0,i.jsx)(b.J1,{children:O})]}),t?(0,i.jsx)(i.Fragment,{children:W?(0,i.jsx)(m.z,{onClick:X,mx:"auto",isLoading:K,loadingText:"loading...",isDisabled:!F||!R||Number(R)>1e4,children:"Slash Payment"}):(0,i.jsx)(m.z,{onClick:P,size:"lg",minWidth:"48",children:"Sign in"})}):(0,i.jsx)(m.z,{onClick:L,size:"lg",minWidth:"48",children:"Connect Wallet"})]})})]}),(0,i.jsxs)(u.K,{textAlign:"center",children:[(0,i.jsx)(h.X,{size:"lg",children:"Step 3"}),(0,i.jsx)(x.x,{textAlign:{base:"left",md:"center"},children:"運営が欲しいものをプレゼントするのでお待ちください。"}),(0,i.jsx)(x.x,{textAlign:{base:"left",md:"center"},children:"プレゼントされるまで、欲しいものリストは削除ãƒ
1»å¤‰æ›´ã—ないでください。"}),(0,i.jsx)(u.K,{spacing:"4",children:null==E?void 0:E.map(e=>(0,i.jsxs)(y.Z,{size:"sm",border:"1px",borderColor:"gray.100",children:[(0,i.jsx)(w.O,{pb:"0",textAlign:"left",children:(0,i.jsxs)(u.K,{direction:"row",justifyContent:"space-between",children:[(0,i.jsxs)(x.x,{children:["id: ",e.orderCode]}),(0,i.jsxs)(x.x,{fontSize:"lg",fontWeight:"extrabold",children:[e.amount,"円"]})]})}),(0,i.jsx)(S.e,{textAlign:"left",children:(0,i.jsxs)(u.K,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,i.jsx)(g.r,{href:e.requestUrl,target:"_blank",children:(0,i.jsx)(v.h,{colorScheme:"gray",size:"sm",icon:(0,i.jsx)(_.UpG,{fontSize:"1.25rem"}),"aria-label":"Amazon"})}),(0,i.jsx)(C.C,{colorScheme:l.l[e.status],height:"5",children:e.status})]})})]},e.orderCode))})]})]})})})]})}}},function(e){e.O(0,[16,278,445,729,163,774,888,179],function(){return e(e.s=48312)}),_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.