PageSourceSearch

https://www.dekitabi.com/_next/static/chunks/2699.4fde16255a46e12f.js

js dekitabi.com collected 2026-09-24 10:19:19 UTC 8,501 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2699],{40481:function(e,t,r){r.r(t),r.d(t,{default:function(){return x}});var n=r(85893);let a=r(50066).ZP.div.withConfig({componentId:"sc-df31b033-0"})(["border-top:3px solid var(--darkBlue);padding:10px 10px 10px 10px;margin:20px 0;.grid-3{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0;@media (max-width:785px){grid-template-columns:1fr;}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;@media (max-width:646px){grid-template-columns:1fr;gap:10px;}}}.checkout-title{font-size:1.8em;color:white;font-weight:700;margin:10px 0 15px 0;color:var(--darkBlue);}.normal-button{background-color:var(--blue);height:50px;color:white;font-size:1.1em;font-weight:600;padding:10px;width:100%;text-align:center;border-radius:10px;margin:20px 0;img{filter:none;}}.card-warning{border-radius:5px;display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:5px;margin-top:5px;background:lightblue;color:var(--darkBlue);img{filter:var(--darkBlueFilter);}}"]);var i=r(54465),o=r(86664),s=r(77004),l=r(67294),c=r(87066),d=r(25675),u=r.n(d),p=r(70788),m=l.memo(e=>{var t;let{user:r,t:a,booking:i,clientSecret:s,updateStripePaymentIntent:d,signUpTab:m,formInput:h,loadingCheckout:g,setLoadingCheckout:f}=e,x=(0,o.useStripe)(),v=(0,o.useElements)(),[y,b]=(0,l.useState)(""),[w,k]=(0,l.useState)(null),[j,_]=(0,l.useState)(""),{signUp:S,federatedSignIn:N,error:C}=(0,p.Z)();(0,l.useEffect)(()=>{if(x){let e=new URLSearchParams(window.location.search).get("payment_intent_client_secret");e&&x.retrievePaymentIntent(e).then(e=>{let{paymentIntent:t}=e;switch(t.status){case"succeeded":k("Payment succeeded!");break;case"processing":k("Your payment is processing.");break;case"requires_payment_method":k("Your payment was not successful, please try again.");break;default:k("Something went wrong.")}}).catch(e=>console.log(e))}},[x]);let I=async()=>{if(!x||!v)return;let{error:e}=await x.confirmPayment({elements:v,capture_method:"automatic_async",confirmParams:{return_url:"".concat(window.location.origin,"/book/completed?booking=").concat(null==i?void 0:i.id)}});"card_error"===e.type||"validation_error"===e.type?(b(!1),k(e.message)):(b(!1),k("errorMsg"))},P=async e=>{null==e||e.preventDefault(),b(!0),k(""),_("");let t=async e=>{try{var t;await (0,c.Z)({method:"post",url:"https://asia-northeast1-dekitabi.cloudfunctions.net/bookActivity",data:{booking:{...i,customerId:null==e?void 0:e.uid,shopId:null==i?void 0:null===(t=i.activity)||void 0===t?void 0:t.shopId}}}),await d({test:!0,secret:s.split("_secret_")[0],updatedData:{customer:e.stripeCustomerId,receipt_email:e.email}}),I()}catch(e){_("errorMsg")}};(null==r?void 0:r.uid)?t(r):"email"===m?h.password!==h.confirmPassword?(_("passwordDoesNotMatch"),b(!1)):S(!1,null==h?void 0:h.email,null==h?void 0:h.password).then(e=>{e?t(e):(_(C||"errorMsg"),b(!1))}).catch(e=>{setTimeout(()=>{_(e),b(!1)},1e3)}):N("Google").then(async e=>{e?t(e):(_("errorMsg"),b(!1))}).catch(e=>{_(e),b(!1)})};return(0,n.jsxs)("div",{className:"stripe-element",style:{position:g?"absolute":"relative",top:g?"-100vw":"0",opacity:g?"0":"1",transition:"opacity 1s ease-in-out"},children:[(0,n.jsx)("p",{className:"checkout-title",children:a("payment")}),(0,n.jsxs)("form",{id:"payment-form",onSubmit:P,children:[(0,n.jsx)(o.PaymentElement,{id:"payment-element",onReady:()=>{setTimeout(()=>{f(!1)},300)}}),(0,n.jsx)("button",{className:"normal-button",disabled:y||!x||!v,id:"submit",children:y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u(),{height:35,width:40,src:"/img/icon-spinner.svg",alt:"spinner",className:"spinner"})," ",a("pleaseWait"),"..."]}):a((null==r?void 0:r.uid)?"payNow":"payNowAndSignUp")}),"undefined"!=typeof navigator&&(0,n.jsx)(n.Fragment,{children:!(null===(t=navigator)||void 0===t?void 0:t.cookieEnabled)&&(0,n.jsxs)("p",{className:"warning-message",children:[(0,n.jsx)(u(),{src:"/img/icon-alert.svg",alt:"alert",height:15,width:15}),a("enableCookiesCheckout")]})}),w&&(0,n.jsxs)("p",{className:"error-message",id:"payment-message",children:["⛔ ",w.charAt(0).toUpperCase()+w.slice(1)]}),j&&(0,n.jsxs)("p",{className:"error-message",id:"payment-message",children:["⛔ ",a(C||j)]})]}),(0,n.jsxs)("div",{className:"card-warning",children:[(0,n.jsx)(u(),{height:17,width:17,src:"/img/icon-alert.svg",alt:"alert"}),a("chargedJpy")]})]})}),h=r(32114),g=r(64347);let f=(0,i.J)("pk_test_51LQsYfKMKJW62reyO9olWAVTBaX8dG47gj29uPhBGXENoDdesY2eBdHoXeq2oDwpRj9IL7o5UNBk94G8rKI9VXL700dfLfezF6");var x=e=>{let t,r,i,c,{t:d,complete:u,loading:p,user:x,language:v,booking:y,signUpTab:b,formInput:w}=e,k=(0,h.Z)(null==y?void 0:y.currency,null==y?void 0:y.total,"stripe");try{t=(0,s.getFunctions)(void 0,"asia-northeast1"),r=(0,s.httpsCallable)(t,"createStripeCheckout"),c=(0,s.httpsCallable)(t,"updateStripePaymentIntent"),i=(0,s.httpsCallable)(t,"testcreateStripeCustomer")}catch(e){}let[j,_]=(0,l.useState)(),[S,N]=(0,l.useState)(!0),C=async()=>{var e,t,n;let a={test:!0,amount:k,currency:null==y?void 0:null===(e=y.currency)||void 0===e?void 0:e.code,transfer_group:null==y?void 0:null===(t=y.activity)||void 0===t?void 0:t.shopId,capture_method:"automatic_async",receipt_email:(null==x?void 0:x.email)?null==x?void 0:x.email:"[email protected]",payment_method_types:["card"],...!(null==y?void 0:null===(n=y.activity)||void 0===n?void 0:n.withAvailability)&&{payment_method_options:{card:{capture_method:"manual",setup_future_usage:"off_session"}}}};await r(a).then(e=>{_(e.data.clientSecret)}).catch(e=>console.log(e))},I=(0,l.useRef)();(0,l.useEffect)(()=>{!j&&(null==y?void 0:y.currency.rate)&&!I.current&&(I.current=!0,C())},[]);let P={clientSecret:j,appearance:{theme:"flat",labels:"floating",variables:{fontLineHeight:"1.5",borderRadius:"10px",colorBackgroun
1d:"#F6F8FA",colorPrimaryText:"#262626"},rules:{".Block":{backgroundColor:"var(--colorBackground)",boxShadow:"none",padding:"12px"},".Input":{padding:"12px"},".Input:disabled, .Input--invalid:disabled":{color:"lightgray"},".Input:focus":{boxShadow:"none"},".Tab":{padding:"10px 12px 8px 12px",border:"none"},".Tab:hover":{border:"none",boxShadow:"0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 7px rgba(18, 42, 66, 0.04)"},".Tab--selected, .Tab--selected:focus, .Tab--selected:hover":{border:"none",backgroundColor:"#fff",boxShadow:"0 0 0 1.5px var(--colorPrimaryText), 0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 7px rgba(18, 42, 66, 0.04)"},".Label":{fontWeight:"500"}}},loader:"always",locale:v.code};return(0,n.jsxs)(a,{children:[j&&P.clientSecret&&(0,n.jsx)(o.Elements,{stripe:f,options:P,children:(0,n.jsx)(m,{user:x,loading:p,t:d,complete:u,clientSecret:j,updateStripePaymentIntent:c,createStripeCustomer:i,language:v,booking:y,signUpTab:b,formInput:w,loadingCheckout:S,setLoadingCheckout:N})})," ",S&&(0,n.jsxs)("div",{className:"stripe-element-skeleton",children:[(0,n.jsx)("p",{className:"checkout-title",children:d("payment")}),(0,n.jsxs)("div",{className:"grid-3",children:[(0,n.jsx)(g.Z,{variant:"rounded",width:"100%",height:60}),(0,n.jsxs)("div",{className:"grid-2",children:[(0,n.jsx)(g.Z,{variant:"rounded",width:"100%",height:60}),(0,n.jsx)(g.Z,{variant:"rounded",width:"100%",height:60})]})]}),(0,n.jsx)(g.Z,{variant:"rounded",width:"100%",height:60}),(0,n.jsx)(g.Z,{style:{marginTop:"15px"},variant:"rounded",width:"100%",height:20}),(0,n.jsx)(g.Z,{style:{margin:"20px 0"},variant:"rounded",width:"100%",height:50}),(0,n.jsx)(g.Z,{style:{marginTop:"15px"},variant:"rounded",width:"100%",height:30})]})]})}},91259:function(e,t,r){r.d(t,{w9:function(){return n.Q},_O:function(){return n.U},hJ:function(){return n.V},O4:function(){return n.X},a$:function(){return n.b},n0:function(){return n.k},Xb:function(){return n.a8},h8:function(){return n.C},v0:function(){return n.o},AP:function(){return n.i},uJ:function(){return n.H},aF:function(){return n.a1},LS:function(){return n.a3},e5:function(){return n.a9},rh:function(){return n.c},w7:function(){return n.B},s:function(){return n.aj},gQ:function(){return n.ak}});var n=r(81435);r(74444),r(25816),r(53333),r(8463)},97582:function(e,t,r){function n(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}r.d(t,{_T:function(){return n}}),"function"==typeof SuppressedError&&SuppressedError}}]);

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.