PageSourceSearch

https://ticketme.io/_next/static/chunks/pages/goods/checkout/[ownerId]/[goodsId]/select-9981d4c024bb6b8f.js

js ticketme.io collected 2026-09-24 10:15:46 UTC 14,920 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3f1741f3-11b8-49f0-8cff-1fe871e28dd2",e._sentryDebugIdIdentifier="sentry-dbid-3f1741f3-11b8-49f0-8cff-1fe871e28dd2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20475],{11744:(e,t,o)=>{"use strict";o.d(t,{K:()=>d});var s=o(14232),r=o(32587),n=o(85664),a=o(15929),c=o(70251);let d=()=>{let[e]=(0,r.A)([a.A.ACCESS_TOKEN]),[t]=(0,n.L4)(c.hH),[o,d]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{d(e[a.A.ACCESS_TOKEN]&&!(null==t?void 0:t.id))},[t,e]),{isLoginWaiting:o}}},28705:(e,t,o)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/goods/checkout/[ownerId]/[goodsId]/select",function(){return o(73293)}])},50209:(e,t,o)=>{"use strict";o.d(t,{B:()=>r});var s=o(83904);let r=async e=>{try{return(await s.pY.get("".concat("https://ticketme.io/api/goods","/purchasedTicketCount?goodsId=").concat(e.goodsId,"&ownerId=").concat(e.ownerId),{headers:{Authorization:"Bearer ".concat(e.accessToken)}})).data.purchasedTicketCount||0}catch(e){return 0}}},54460:(e,t,o)=>{"use strict";o.d(t,{P:()=>r});var s=o(83904);let r=async e=>{let{params:t,accessToken:o}=e;return(await s.pY.get("".concat("https://ticketme.io/api/marketplace","/listingList"),{headers:{Authorization:"Bearer ".concat(o)},params:t})).data}},63303:(e,t,o)=>{"use strict";o.d(t,{IF:()=>a,aH:()=>n,cs:()=>c,ld:()=>d});var s=o(14903);let r=e=>e.replace(/^\/private/,""),n=e=>r(e.pathname).startsWith("/goods/"),a=e=>r(e.pathname).startsWith("/event/"),c=e=>r(e.pathname).startsWith("/membership/"),d=e=>r(e.pathname).startsWith("/event/group")?s.ww.GROUP:n(e)?s.ww.GOODS:a(e)?s.ww.EVENT:c(e)?s.ww.MEMBERSHIP:""},66785:(e,t,o)=>{"use strict";o.d(t,{b:()=>u});var s=o(89099),r=o(32587),n=o(15929),a=o(21272),c=o(83904);let d=async(e,t,o,s)=>await c.pY.post("".concat("https://ticketme.io/api/common","/membershipPreOrderTicketAmount"),{membershipId:t,ownerId:o,amount:s},{headers:{Authorization:"Bearer ".concat(e)}}),l=async e=>{let{accessToken:t,eventId:o,ownerId:s,amount:r,orders:n,optionGroupId:a,isOptionTicket:d,mainEventId:l,mainOwnerId:i,optionSessionId:u,ticketJWT:g}=e,p={headers:{Authorization:"Bearer ".concat(t),...g?{"x-ticketme-ticket-token":g}:{}}},h={eventId:o,ownerId:s,amount:r,orders:n,...a?{optionGroupId:a}:{},...void 0!==d?{isOptionTicket:d}:{},...l?{mainEventId:l}:{},...i?{mainOwnerId:i}:{},...u?{optionSessionId:u}:{}};return await c.pY.post("".concat("https://ticketme.io/api/event","/preOrderTicketAmount"),h,p)},i=async(e,t,o,s,r,n,a,d,l)=>{let i={goodsId:t,ownerId:o,amount:s,...r?{optionGroupId:r}:{},...n?{mainEventId:n}:{},...a?{mainOwnerId:a}:{},...d?{isOptionTicket:d}:{},...l?{optionSessionId:l}:{}};return await c.pY.post("".concat("https://ticketme.io/api/goods","/preOrderTicketAmount"),i,{headers:{Authorization:"Bearer ".concat(e)}})},u=()=>{let{t:e}=(0,a.Y)(),[t]=(0,r.A)([n.A.ACCESS_TOKEN,n.A.ACCESS_TOKEN_FOR_TICKET]),o=(0,s.useRouter)().pathname.includes("private");return{preOrderTicketAmount:async(s,r,a,c,d,i,u,g,p)=>{if(0===a)return null;try{return await l({accessToken:t[n.A.ACCESS_TOKEN],eventId:s,ownerId:r,amount:a,orders:c,...d?{optionGroupId:d}:{},...g?{isOptionTicket:g}:{},...i?{mainEventId:i}:{},...u?{mainOwnerId:u}:{},...p?{optionSessionId:p}:{},ticketJWT:o?t[n.A.ACCESS_TOKEN_FOR_TICKET]:void 0}),null}catch(o){var h,m,I;let t=(null==o||null==(I=o.response)||null==(m=I.data)||null==(h=m.error)?void 0:h.message)||o.message;switch(console.log(t),t){case"This event can't be currently preordered.":return{title:e.pages.goods.checkout.ownerId.goodsId.select.OTHER_PERSON_PURCHASED,message:e.pages.goods.checkout.ownerId.goodsId.select.RETRY_LATER};case"totalPaymentAmount must be greater than 0":return{title:e.pages.goods.checkout.ownerId.goodsId.select.ZERO_TOTAL_NOT_ALLOWED_TITLE,message:e.pages.goods.checkout.ownerId.goodsId.select.ZERO_TOTAL_NOT_ALLOWED_MESSAGE};default:return{title:e.pages.goods.checkout.ownerId.goodsId.select.PURCHASE_FAILED,message:e.pages.goods.checkout.ownerId.goodsId.select.TRY_AGAIN_LATER}}}},createPreOrderForGoods:async(o,s,r,a,c,d,l,u)=>{if(0===r)return null;try{return await i(t[n.A.ACCESS_TOKEN],o,s,r,a,c,d,l,u),null}catch(o){var g,p,h;let t=(null==o||null==(h=o.response)||null==(p=h.data)||null==(g=p.error)?void 0:g.message)||o.message;if(console.log(t),"This goods can't be currently preordered."===t)return{title:e.pages.goods.checkout.ownerId.goodsId.select.OTHER_PERSON_PURCHASED,message:e.pages.goods.checkout.ownerId.goodsId.select.RETRY_LATER};return{title:e.pages.goods.checkout.ownerId.goodsId.select.PURCHASE_FAILED,message:e.pages.goods.checkout.ownerId.goodsId.select.TRY_AGAIN_LATER}}},createPreOrderForMembership:async(o,s,r)=>{if(0===r)return null;try{return await d(t[n.A.ACCESS_TOKEN],o,s,r),null}catch(o){var a,c,l;let t=(null==o||null==(l=o.response)||null==(c=l.data)||null==(a=c.error)?void 0:a.message)||o.message;if(console.log(t),"This membership can't be currently preordered."===t)return{title:e.pages.goods.checkout.ownerId.goodsId.select.OTHER_PERSON_PURCHASED,message:e.pages.goods.checkout.ownerId.goodsId.select.RETRY_LATER};return{title:e.pages.goods.checkout.ownerId.goodsId.select.PURCHASE_FAILED,message:e.pages.goods.checkout.ownerId.goodsId.select.TRY_AGAIN_LATER}}}}}},73293:(e,t,o)=>{"use strict";o.r(t),o.d(t,{__N_SSG:()=>z,default:()=>B});var s=o(37876),r=o(14232),n=o(24836),a=o(39955),c=o(79736),d=o(87365),l=o(71211),i=o(38443),u=o(54587),g=o.n(u),p=o(89099),h=o(32587),m=o(84274),I=o(85664),E=o(77036),x=o(91591),k=o(72339),A=o(19038),T=o(81972),w=o(15929),_=o(98318),C=o(11744),S=o(21272),f=o(66785),O=o(52497),b=o(70251),y=o(50209),R=o(78772),j=o(54460),v=o(20707),N=o(73979),L=o(14903),P=o(65922),D=o(64216),Y=o(63303),K=o(37968),U=o(973);let H=()=>{let{t:e}=(0,S.Y)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(a.a,{w:"100%",mt:"sm",px:"lg",py:"2xl",bg:"bg.surfaceFill",borderRadius:"xl",children:(0,s.jsx)(v.EY,{color:"sub",variant:"p",label:!0,textAlign:"center",children:e.pages.goods.checkout.ownerId.goodsId.select.SoldOut.CURRENTLY_UNAVAILABLE})})})},F=()=>(0,s.jsx)(a.a,{w:"100%",mt:"sm",px:"lg",py:"lg",bg:"bg.surfaceFill",borderRadius:"xl",children:(0,s.jsxs)(i.o,{flexDirection:"column",py:"2xl",children:[(0,s.jsx)(m.A,{size:12,color:"black",margin:4}),(0,s.jsx)(v.EY,{variant:"p",fontWeight:"bold",mt:"2xl",children:"チケット情報を読み込み中です..."})]})});var z=!0;let B=e=>{let{goods:t}=e,o=(0,p.useRouter)(),i=(0,I.vc)(b.hH),[u,m]=(0,h.A)([w.A.ACCESS_TOKEN,w.A.ACCOUNT_ID,w.A.QUICK_PURCHASE_REDIRECT_PATH]),[z,B]=(0,r.useState)(0),[G,W]=(0,r.useState)(0),[M,q]=(0,r.useState)([]),[Q,J]=(0,r.useState)(!0),{ownerId:$,goodsId:V}=o.query,{data:X}=(0,_.S)(V,$,u[w.A.ACCESS_TOKEN]),Z=null!=X?X:t,{isLoginWaiting:ee}=(0,C.K)(),[et,eo]=(0,r.useState)([]),[es,er]=(0,r.useState)(1),[en,ea]=(0,r.useState)("1"),[ec,ed]=(0,r.useState)(),[el,ei]=(0,r.useState)(),[eu,eg]=(0,r.useState)(!1),{isOpen:ep,onOpen:eh,onClose:em}=(0,n.j)(),{t:eI}=(0,S.Y)(),eE=!!Z.mintLimitNum&&Z.mintLimitNum<=G,ex=Math.min(Z.ticketMaxNum-z,Z.mintLimitNum?Z.mintLimitNum-G:Z.ticketMaxNum,5,(0,N.S)(Z.price,L.D.MAX_GOODS)),ek=Math.floor(new Date().getTime()/1e3),eA=Z.saleTime.start<=ek&&Z.saleTime.end>=ek,{isListProhibited:eT}=(0,D.j)(Z),{createPreOrderForGoods:ew}=(0,f.b)(),e_=(0,Y.ld)(o),{createSelectListing:eC}=(0,O.M)({ticketType:e_,ticketId:V,ownerId:$,tokenId:null==ec?void 0:ec.tokenId}),eS=async()=>
1{if(eg(!0),ec){let e=await eC();if(e){ei(e),eh();return}o.push("/goods/ticket/".concat($,"/").concat(V,"/").concat(ec.tokenId,"/payment"))}else{let e=await ew(V,$,es);e?(ei(e),eh()):o.push("/goods/checkout/".concat($,"/").concat(V,"/"))}},ef=(0,P.cT)(i,Z.flags);return((0,r.useEffect)(()=>{if(!o.isReady)return;let e=async()=>{if(u[w.A.ACCESS_TOKEN]){J(!0);try{let[e,t,o]=await Promise.all([(0,j.P)({params:{type:L.ww.GOODS,ticketId:V},accessToken:u[w.A.ACCESS_TOKEN]}),(0,R.q)({params:{type:L.ww.GOODS,ticketId:V,ownerId:$},accessToken:u[w.A.ACCESS_TOKEN]}),(0,y.B)({goodsId:V,ownerId:$,accessToken:u[w.A.ACCESS_TOKEN]})]),s=e.data.filter(e=>t.some(t=>"unclaimed"===t.status&&e.seller.id===t.user.id&&e.tokenId===t.tokenId));B(Z.ticketSoldNum),W(o),q(s.sort((e,t)=>e.tokenId-t.tokenId))}catch(e){console.error("チケット情報の取得中にエラーが発生しました:",e)}finally{J(!1)}}};((e,t,s)=>{e!==t&&(s.flags.private||s.flags.pending)&&o.push("/")})($,u[w.A.ACCOUNT_ID],Z),e()},[u,V,$,Z,o,i]),(0,r.useEffect)(()=>{let e=Number.parseInt(en,10);isNaN(e)||(0===e?er(1):er(Math.min(e,ex)))},[ex,en]),(0,r.useEffect)(()=>{eo(M.sort((e,t)=>e.tokenId-t.tokenId))},[M]),ef)?(0,s.jsx)(x.kx,{children:(0,s.jsx)(T.J,{isOpen:!0,onClose:()=>{o.push("/goods/ticket/".concat($,"/").concat(V))},onClick:()=>{m(w.A.QUICK_PURCHASE_REDIRECT_PATH,o.asPath,{path:"/"}),o.push("/settings/userDetail/edit?supplement=true")}})}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(x.kx,{children:[(0,s.jsx)(A.h,{isOpen:ep,onClose:em,defaultError:{title:eI.pages.goods.checkout.ownerId.goodsId.select.PURCHASE_FAILED,message:eI.pages.goods.checkout.ownerId.goodsId.select.TRY_AGAIN_LATER},firstButton:{text:eI.pages.goods.checkout.ownerId.goodsId.select.OK,onclick:()=>{o.reload()}},error:el}),(0,s.jsxs)(a.a,{w:"100%",maxW:{base:"",lg:"500px"},mx:{base:"",lg:"auto"},pt:"2xl !important",pb:"240px",px:"lg",children:[(0,s.jsx)(k.Vz,{ticket:Z,ticketType:L.ww.GOODS}),(0,s.jsx)(v.EY,{mt:"5xl",variant:"h2",label:!0,children:eI.pages.goods.checkout.ownerId.goodsId.select.SELECT_TICKET_TO_PURCHASE}),!eE&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.z,{mt:"3xl",children:[(0,s.jsx)(v.EY,{variant:"p",fontWeight:"bold",children:eI.pages.goods.checkout.ownerId.goodsId.select.ORGANIZER_SELLING_DIRECTLY}),(0,s.jsx)(d.h,{}),(0,s.jsx)(v.EY,{color:"sub",size:"sm",children:eI.pages.goods.checkout.ownerId.goodsId.select.UP_TO_TICKETS.replace("{maxTicketsPerPayment}",String(ex))})]}),Q?(0,s.jsx)(F,{}):0!==ex&&eA?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(a.a,{w:"100%",mt:"sm",px:"lg",bg:"bg.surfaceFill",borderRadius:"xl",children:(0,s.jsxs)(c.z,{justifyContent:"space-between",py:"sm",children:[(0,s.jsx)(c.z,{children:(0,s.jsxs)(v.EY,{variant:"p",fontWeight:"bold",label:!0,children:["\xa5",Z.price.toLocaleString()]})}),(0,s.jsxs)(c.z,{children:[(0,s.jsx)(l.Q7,{defaultValue:es,max:ex,min:1,value:en,children:(0,s.jsx)(l.OO,{w:"60px",h:"50px",px:"14px",py:"15px",color:"#000000",bg:"#F2F2F2",borderColor:"white",_hover:{borderColor:"white"},_placeholder:{top:"0px",textColor:"#808080",fontSize:"15px",fontWeight:"300",paddingTop:"15px",paddingBottom:"15px",position:"absolute",bottom:"0px",verticalAlign:"center"},onBlur:()=>{ea(String(es))},onChange:e=>{ea(e.target.value)},rounded:"15px"})}),(0,s.jsx)(v.EY,{pr:"sm",variant:"p",fontWeight:"bold",label:!0,children:eI.pages.goods.checkout.ownerId.goodsId.select.TICKETS}),et&&et.length&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(E.J,{isSelect:!ec,onClick:()=>{ed(void 0)}})})]})]})})}):(0,s.jsx)(H,{})]}),!eT&&(0,s.jsxs)(a.a,{mt:"2xl",children:[(0,s.jsx)(v.EY,{variant:"p",fontWeight:"bold",children:eI.pages.goods.checkout.ownerId.goodsId.select.OWNER_SELLING_TICKETS}),(0,s.jsx)(a.a,{w:"100%",mt:"sm",px:"lg",bg:"bg.surfaceFill",borderRadius:"xl",children:Q?(0,s.jsx)(F,{}):et&&et.length?(0,s.jsx)(s.Fragment,{children:et.map((e,t)=>(0,s.jsxs)(c.z,{justifyContent:"space-between",py:"lg",children:[(0,s.jsxs)(c.z,{children:[(0,s.jsx)(v.eu,{src:e.seller.icon?(0,K.lQ)(e.seller.icon,""):"/images/DefaultIcon.png"}),(0,s.jsx)(v.EY,{ml:"sm",variant:"p",label:!0,children:"#".concat((0,U.c)(Number(e.tokenId),Z.ticketMaxNum.toString().length))}),e.seller.isOfficial&&(0,s.jsx)(g(),{width:15,height:15,alt:"official icon",src:"/svg/official/15x15.svg"})]}),(0,s.jsxs)(c.z,{children:[(0,s.jsxs)(v.EY,{ml:"sm",variant:"p",label:!0,children:["\xa5",e.price.toLocaleStr
1ing()]}),(0,s.jsx)(E.J,{isSelect:(null==ec?void 0:ec.tokenId)===e.tokenId,onClick:()=>{(null==ec?void 0:ec.tokenId)===e.tokenId?ed(void 0):ed(e)},disabled:e.seller.id===(null==i?void 0:i.id)})]})]},t))}):(0,s.jsx)(H,{})})]})]}),(0,s.jsxs)(a.a,{pos:"fixed",zIndex:1e3,right:"50%",bottom:"3xl",left:"50%",w:"100%",maxW:"460px",display:"flex",justifyContent:"center",gap:"xxs",px:"lg",flexDirection:"column",transform:"translateX(-50%)",children:[(0,s.jsx)(v.$n,{disabled:Q||es>ex||!ec&&0===es||!eA&&!ec,onClick:eS,isLoading:eu||ee,mx:"auto",children:"".concat(Z.price?eI.pages.goods.checkout.ownerId.goodsId.select.PURCHASE_COUNT[0]:eI.pages.goods.checkout.ownerId.goodsId.select.ACQUIRE_COUNT[0]).concat(!ec?es:1).concat(Z.price?eI.pages.goods.checkout.ownerId.goodsId.select.PURCHASE_COUNT[1]:eI.pages.goods.checkout.ownerId.goodsId.select.ACQUIRE_COUNT[1])}),(0,s.jsx)(v.$n,{onClick:()=>{let e=(0,Y.aH)(o)?"/goods/ticket/".concat(o.query.ownerId,"/").concat(o.query.goodsId):"/event/ticket/".concat(o.query.ownerId,"/").concat(o.query.eventId);o.push(e)},variant:"secondary",mx:"auto",children:eI.components.view.Checkout.CheckoutPayment.BACK})]})]})})}},73979:(e,t,o)=>{"use strict";o.d(t,{S:()=>s,q:()=>r});let s=(e,t)=>Math.floor(t/e),r=(e,t,o)=>{let s=Math.ceil((e-t)*o);return s>0?s:0}},77036:(e,t,o)=>{"use strict";o.d(t,{J:()=>a});var s=o(37876),r=o(21272),n=o(20707);let a=e=>{let{isSelect:t,onClick:o,disabled:a=!1}=e,{t:c}=(0,r.Y)();return a?(0,s.jsx)(n.$n,{w:"75px",variant:"secondary",size:"sm",disabled:!0,opacity:.5,cursor:"not-allowed",children:c.components.Payment.SelectButton.SELECT}):(0,s.jsx)(s.Fragment,{children:t?(0,s.jsx)(n.$n,{variant:"secondary",w:"75px",size:"sm",bg:"bg.yellow",_hover:{bg:"bg.yellow"},onClick:o,children:c.components.Payment.SelectButton.SELECTED}):(0,s.jsx)(n.$n,{w:"75px",variant:"secondary",size:"sm",onClick:o,children:c.components.Payment.SelectButton.SELECT})})}},78772:(e,t,o)=>{"use strict";o.d(t,{q:()=>r});var s=o(83904);let r=async e=>{let{params:t,accessToken:o}=e;return(await s.pY.get("".concat("https://ticketmeapi.com","/api/marketplace/getTicketHolders"),{headers:{Authorization:"Bearer ".concat(o)},params:t})).data.data}},97311:(e,t,o)=>{"use strict";o.d(t,{H:()=>r});var s=o(83904);let r=async e=>{try{let t=e.accessToken?{headers:{Authorization:"Bearer ".concat(e.accessToken)}}:{};return(await s.pY.get("".concat("https://ticketme.io/api/goods","/goods?goodsId=").concat(e.goodsId,"&ownerId=").concat(e.ownerId),t)).data.data}catch(e){return null}}},98318:(e,t,o)=>{"use strict";o.d(t,{S:()=>n});var s=o(27715),r=o(97311);let n=(e,t,o)=>{let{data:n,error:a,isLoading:c,isValidating:d,mutate:l}=(0,s.Ay)("/goods/".concat(e,"/").concat(o),async()=>{try{return(0,r.H)({goodsId:e,ownerId:t,accessToken:o})}catch(e){return null}},{revalidateOnFocus:!1});return{data:n,error:a,isLoading:c,isValidating:d,mutate:l}}}},e=>{e.O(0,[37458,71211,91591,76257,81385,14160,28646,90636,46593,38792],()=>e(e.s=28705)),_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.