PageSourceSearch

https://playingforchange.com/_next/static/chunks/pages/shop/checkout/information-ec4b32205937eedf.js

js playingforchange.com collected 2026-10-02 04:33:05 UTC 17,884 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[846],{80760:function(e,n,s){var t=s(89881);e.exports=function(e,n){var s=[];return t(e,(function(e,t,i){n(e,t,i)&&s.push(e)})),s}},63105:function(e,n,s){var t=s(34963),i=s(80760),r=s(67206),a=s(1469);e.exports=function(e,n){return(a(e)?t:i)(e,r(n,3))}},8018:function(e,n,s){"use strict";var t=s(59499),i=s(50029),r=s(87794),a=s.n(r),o=s(67294),c=s(28482),d=s(7258),u=s(72579),l=s(14914),p=s(55472),h=s(85893);n.Z=function(e){var n=e.addressType,s=e.omitFields,r=void 0===s?[]:s,m=e.onValidationSchemaUpdate,f=void 0===m?function(){}:m,x=e.outsideUS,g=(0,o.useState)([]),j=g[0],y=g[1],v=(0,o.useState)(),w=v[0],b=v[1],N=(0,o.useState)([]),A=N[0],Z=N[1],C=(0,o.useState)(null),S=C[0],I=C[1],P=(0,c.u6)().values;(0,o.useEffect)((function(){function e(){return e=(0,i.Z)(a().mark((function e(){var s,t,i,r,o,c,d;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ox)();case 2:if(s=e.sent,t=s.data.map((function(e){return{value:e.id,label:e.name}})),y(t),!P["".concat(n,"CountryId")]){e.next=15;break}return i=t.find((function(e){return e.value===P["".concat(n,"CountryId")]})),b(i),e.next=10,(0,p.lx)(P["".concat(n,"CountryId")]);case 10:r=e.sent,o=r.data,c=o.map((function(e){return{value:e.id,label:e.name}})),Z(c),P["".concat(n,"StateId")]&&(d=c.find((function(e){return e.value===P["".concat(n,"StateId")]})),setTimeout((function(){I(d)})));case 15:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,P]),(0,o.useEffect)((function(){var e,s=d.Ry().shape((e={},(0,t.Z)(e,"".concat(n,"FirstName"),d.Z_().required("Required")),(0,t.Z)(e,"".concat(n,"LastName"),d.Z_().required("Required")),(0,t.Z)(e,"".concat(n,"Address1"),d.Z_().required("Required")),(0,t.Z)(e,"".concat(n,"City"),d.Z_().required("Required")),(0,t.Z)(e,"".concat(n,"ZipCode"),d.Z_().required("Required")),(0,t.Z)(e,"".concat(n,"CountryId"),d.Z_().required("Required")),e));A.length>0&&(s=s.concat(d.Ry().shape((0,t.Z)({},"".concat(n,"StateId"),d.Z_().required("Required"))))),f(s)}),[A,n]);var q=function(){var e=(0,i.Z)(a().mark((function e(n){var s,t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(n),e.next=3,(0,p.lx)(n.value);case 3:s=e.sent,t=s.data,Z(t.map((function(e){return{value:e.id,label:e.name}}))),x(n.value);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.X2,{children:(0,h.jsxs)(u.JX,{children:[-1===r.indexOf("firstName")&&(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"FirstName")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"First Name",name:"".concat(n,"FirstName")})]}),-1===r.indexOf("lastName")&&(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"LastName")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"Last Name",name:"".concat(n,"LastName")})]}),-1===r.indexOf("businessName")&&(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"BusinessName")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"Company (optional)",name:"".concat(n,"BusinessName")})]}),(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"Address1")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"Street and house number",name:"".concat(n,"Address1")})]}),-1===r.indexOf("address2")&&(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"Address2")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"Additional address info (optional)",name:"".concat(n,"Address2")})]})]})}),(0,h.jsxs)(u.X2,{gutter:{tb:.5},children:[(0,h.jsx)(u.JX,{tb:15,children:(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"City")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"City",name:"".concat(n,"City")})]})}),(0,h.jsx)(u.JX,{tb:9,children:(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"ZipCode")}),(0,h.jsx)(c.gN,{as:l.oi,placeholder:"Postal Code",name:"".concat(n,"ZipCode")})]})})]}),(0,h.jsx)(u.X2,{children:(0,h.jsxs)(u.JX,{children:[(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"CountryId")}),(0,h.jsx)(c.gN,{component:l.Ph,instanceId:"countries",name:"".concat(n,"CountryId"),placeholder:"Country",value:w,onChange:q,options:j})]}),A.length>0&&(0,h.jsxs)(l.cw,{children:[(0,h.jsx)(l.Bc,{name:"".concat(n,"StateId")}),(0,h.jsx)(c.gN,{component:l.Ph,instanceId:"states",name:"".concat(n,"StateId"),placeholder:"State/Province",value:S,defaultValue:A[0],options:A,onChange:function(e){I(e)}})]}),-1===r.indexOf("phone")&&(0,h.jsx)(l.cw,{children:(0,h.jsx)(c.gN,{as:l.oi,placeholder:"Phone",name:"".concat(n,"Phone")})})]})})]})}},49292:function(e,n,s){"use strict";s.d(n,{g:function(){return t}});var t=s(10367).ZP.div.withConfig({componentId:"pfc-169ebdz-0"})(["color:",";font-size:4px;margin:0 auto;position:relative;text-indent:-9999em;transform:translateZ(0);animation-delay:-0.16s;&,&:before,&:after{border-radius:50%;width:2.5em;height:2.5em;animation-fill-mode:both;animation:load 1.8s infinite ease-in-out;}&:before,&:after{content:'';position:absolute;top:0;}&:before{left:-3.5em;animation-delay:-0.32s;}&:after{left:3.5em;}@keyframes load{0%,80%,100%{box-shadow:0 2.5em 0 -1.3em;}40%{box-shadow:0 2.5em 0 0;}}"],(function(e){return e.theme.variables.text}))},99420:function(e,n,s){"use strict";s.d(n,{Z:function(){return y}});var t=s(59499),i=s(67294),r=s(11163),a=s(41664),o=s.n(a),c=s(28482),d=s(7258),u=s(7733),l=s(14914),p=s(72579),h=s(10367),m=(s(5847),s(49292),s(24338)),f=s(85893),x=(h.ZP.div.withConfig({componentId:"pfc-2qo9t6-0"})(["margin:0;","{margin:0 0 10px 0;&:last-child{margin:0;}}"],m.pE),h.ZP.div.withConfig({componentId:"pfc-2qo9t6-1"})(["text-align:center;margin:","px 0;",";display:flex;align-items:center;span{margin:0 10px;}&:before,&:after{content:'';flex:1;height:1px;background-color:",";}"],(function(e){return 3*e.theme.grid.unit}),(function(e){return e.theme.typography.tSmall}),(function(e){return e.theme.variables.border})),s(55472));function g(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),s.push.apply(s,t)}return s}function j(e){for(var n=1;n<arguments.length;n++){var s=null!=arguments[n]?arguments[n]:{};
1n%2?g(Object(s),!0).forEach((function(n){(0,t.Z)(e,n,s[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):g(Object(s)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(s,n))}))}return e}var y=function(e){var n=e.redirectUrl,s=e.forgotPassword,t=void 0===s||s,a=(0,i.useContext)(u.Z).setSession,h=(0,r.useRouter)(),g=(0,i.useState)(!1),y=g[0],v=g[1],w=d.Ry().shape({loginName:d.Z_().required("Required"),password:d.Z_().required("Required"),rememberMe:d.O7().notRequired()});return(0,f.jsx)(c.J9,{initialValues:{loginName:"",password:"",rememberMe:!1},validationSchema:w,onSubmit:function(e,s){(0,x.pH)(e.loginName,e.password,n,e.rememberMe).then((function(e){e.data.success?(0,x.Gg)().then((function(n){a(n.data),h.push(e.data.returnUrl)})):(v(e.data.error),s.setSubmitting(!1))})).catch((function(e){v("An unknown error occured."),s.setSubmitting(!1),console.log(e)}))},children:function(e){var n=e.isSubmitting;return(0,f.jsxs)(l.l0,{children:[y&&(0,f.jsx)(l.zG,{children:y}),(0,f.jsxs)(p.X2,{children:[(0,f.jsx)(p.JX,{children:(0,f.jsxs)(l.cw,{children:[(0,f.jsx)(l.Bc,{name:"loginName"}),(0,f.jsx)(c.gN,{as:l.oi,placeholder:"Email",name:"loginName",type:"email"})]})}),(0,f.jsx)(p.JX,{children:(0,f.jsxs)(l.cw,{children:[(0,f.jsx)(l.Bc,{name:"password"}),(0,f.jsx)(c.gN,{as:l.oi,placeholder:"Password",name:"password",type:"password"}),t&&(0,f.jsx)("p",{children:(0,f.jsx)(o(),{href:"/forgot-password",children:(0,f.jsx)("a",{children:"Forgot Password?"})})})]})})]}),(0,f.jsx)(p.X2,{children:(0,f.jsx)(p.JX,{children:(0,f.jsx)(l.cw,{style:{display:"flex",alignItems:"center"},children:(0,f.jsx)(c.gN,{name:"rememberMe",children:function(e){var n=e.field;return(0,f.jsxs)("label",{style:{display:"flex",alignItems:"center",cursor:"pointer"},children:[(0,f.jsx)("input",j(j({},n),{},{type:"checkbox",checked:n.value,style:{marginRight:"8px"},"aria-label":"Remember me"})),"Remember me"]})}})})})}),(0,f.jsx)(m.DF,{stretch:!0,type:"submit",isLoading:n,children:"Log In"})]})}})}},32673:function(e,n,s){"use strict";var t=s(9008),i=s.n(t),r=s(47311),a=s(85893);n.Z=function(e){var n=e.metaTitleContainer,s=e.metaTagContainer,t=e.metaLinkContainer,o=e.title;return(0,a.jsxs)(i(),{children:[s&&(0,r.ZP)(s),t&&(0,r.ZP)(t),n&&(0,r.ZP)(n),o&&(0,a.jsxs)("title",{children:["Playing for Change | ",o]})]})}},53854:function(e,n,s){"use strict";s.d(n,{Z:function(){return p}});var t=s(67294),i=s(11163),r=(s(63105),s(10367)),a=s(41664),o=s.n(a),c=s(85893),d=r.ZP.div.withConfig({componentId:"pfc-1p3roc0-0"})(["display:flex;margin:40px 0;user-select:none;min-height:20px;","{margin:50px 0 40px 0;}ul{margin:auto;padding:0;list-style:none;}li{display:inline-block;vertical-align:middle;&:after{font-family:'icomoon';content:\"\\e916\";font-size:11px;margin:0 7px;}&:last-child:after{display:none;}}a{",";color:",";font-weight:normal;&:hover,&.is-active{color:",";}}span{",";color:",";font-weight:normal;cursor:not-allowed;}"],(function(e){return e.theme.media.minWidth("tablet")}),(function(e){return e.theme.typography.tXSmall}),(function(e){return e.theme.variables.xSoftText}),(function(e){return e.theme.variables.text}),(function(e){return e.theme.typography.tXSmall}),(function(e){return e.theme.variables.xSoftText})),u=function(e){var n=e.items,s=(0,i.useRouter)();return(0,c.jsx)(d,{children:(0,c.jsx)("ul",{children:n.map((function(e,n){return(0,c.jsx)("li",{children:e.disabled?(0,c.jsx)("span",{children:e.title}):(0,c.jsx)(o(),{href:e.path,children:(0,c.jsx)("a",{className:s.pathname===e.path?"is-active":"",children:e.title})})},n)}))})})},l=s(86215),p=function(){var e=(0,i.useRouter)(),n=(0,t.useContext)(l.Z).cart,s=(0,t.useCallback)((function(){var e=[{title:"Cart",path:"/shop/cart"},{title:"Information",path:"/shop/checkout/information"}];return n.digitalOnly||e.push({title:"Shipping",path:"/shop/checkout/shipping"}),e.push({title:"Payment",path:"/shop/checkout/payment"}),e}),[n.digitalOnly]),r=(0,t.useState)(s()),a=r[0],o=r[1];return(0,t.useEffect)((function(){var n=!1;o(s().map((function(s){return s.disabled=n,s.path===e.route&&(n=!0),s})))}),[e.route,o,n.digitalOnly]),(0,c.jsx)(u,{items:n.lineItems.length?a:[]})}},51760:function(e,n,s){"use strict";var t=s(10367),i=s(70919),r=s(85893),a=(0,t.ZP)(i.H3).withConfig({componentId:"pfc-1p9p0jl-0"})(["margin:40px 0;text-align:center;"]);n.Z=function(e){var n=e.title;return(0,r.jsx)(a,{as:"h1",children:n})}},70547:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return I},default:function(){return P}});var t=s(67294),i=s(28482),r=s(11163),a=s(7258),o=s(53854),c=s(51760),d=s(32673),u=s(7733),l=s(86215),p=s(27141),h=s(14914),m=s(16835),f=s(50029),x=s(87794),g=s.n(x),j=s(35161),y=s.n(j),v=s(72579),w=s(24338),b=s(55472),N=s(85893),A=function(e){var n=e.redirectUrl,s=(0,t.useState)(!1),o=s[0],c=s[1],d=(0,t.useState)(),l=d[0],p=d[1],x=(0,r.useRouter)(),j=(0,t.useContext)(u.Z).setSession,A=a.Ry().shape({firstName:a.Z_().required("Required"),lastName:a.Z_().required("Required"),email:a.Z_().required("Required"),password:a.Z_().required("Required"),
1confirmPassword:a.Z_().oneOf([a.iH("password"),null],"Passwords must match")}),Z=function(){var e=(0,f.Z)(g().mark((function e(s){var t,i;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,p(!0),e.next=4,(0,b.JR)({firstName:s.firstName,lastName:s.lastName,email:s.email,password:s.password});case 4:if(t=e.sent,!(i=t.data).success){e.next=10;break}(0,b.Gg)().then((function(e){j(e.data),x.push(n)})),e.next=13;break;case 10:throw delete i.errors.username,y()(i.errors,(function(e){return(0,m.Z)(e,1)[0]})).join("<br />");case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),p(!1),c(e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(n){return e.apply(this,arguments)}}();return(0,N.jsx)(i.J9,{initialValues:{firstName:"",lastName:"",email:"",password:"",confirmPassword:""},validationSchema:A,onSubmit:Z,children:function(){return(0,N.jsxs)(h.l0,{children:[o&&(0,N.jsx)(h.zG,{dangerouslySetInnerHTML:{__html:o}}),(0,N.jsx)(v.X2,{children:(0,N.jsxs)(v.JX,{children:[(0,N.jsxs)(h.cw,{children:[(0,N.jsx)(h.Bc,{name:"firstName"}),(0,N.jsx)(i.gN,{as:h.oi,placeholder:"First Name",name:"firstName"})]}),(0,N.jsxs)(h.cw,{children:[(0,N.jsx)(h.Bc,{name:"lastName"}),(0,N.jsx)(i.gN,{as:h.oi,placeholder:"Last Name",name:"lastName"})]}),(0,N.jsxs)(h.cw,{children:[(0,N.jsx)(h.Bc,{name:"email"}),(0,N.jsx)(i.gN,{as:h.oi,placeholder:"Email",name:"email",type:"email"})]}),(0,N.jsxs)(h.cw,{children:[(0,N.jsx)(h.Bc,{name:"password"}),(0,N.jsx)(i.gN,{as:h.oi,placeholder:"Password",name:"password",type:"password"})]}),(0,N.jsxs)(h.cw,{children:[(0,N.jsx)(h.Bc,{name:"confirmPassword"}),(0,N.jsx)(i.gN,{as:h.oi,placeholder:"Confirm Password",name:"confirmPassword",type:"password"})]})]})}),(0,N.jsx)(w.DF,{stretch:!0,type:"submit",isLoading:l,children:"Create Account"})]})}})},Z=s(99420),C=s(8018),S=s(70919),I=!0,P=function(e){var n=e.cart,s=(0,t.useContext)(u.Z).session,m=(0,t.useState)(!1),f=m[0],x=m[1],g=(0,t.useContext)(l.Z).updateCart,j=(0,t.useState)(!1),y=j[0],b=j[1],I=(0,t.useState)(!1),P=I[0],q=I[1],_=(0,r.useRouter)(),R=function(e){q(236!=e&&"For customers outside the US please enter your Address Info in English!")};(0,t.useEffect)((function(){236!=n.shippingAddress.countryId&&q("For customers outside the US please enter your Address Info in English!")}),[]);var k={email:n.email||"",shippingAddressFirstName:n.shippingAddress.firstName||"",shippingAddressLastName:n.shippingAddress.lastName||"",shippingAddressBusinessName:n.shippingAddress.businessName||"",shippingAddressAddress1:n.shippingAddress.address1||"",shippingAddressAddress2:n.shippingAddress.address2||"",shippingAddressCity:n.shippingAddress.city||"",shippingAddressZipCode:n.shippingAddress.zipCode||"",shippingAddressCountryId:n.shippingAddress.countryId||"",shippingAddressStateId:n.shippingAddress.stateId||"",shippingAddressPhone:n.shippingAddress.phone||""},O=a.Ry().shape({email:a.Z_().email("Invalid email").required("Required"),shippingAddressFirstName:a.Z_().required("Required"),shippingAddressLastName:a.Z_().required("Required"),shippingAddressAddress1:a.Z_().required("Required"),shippingAddressCity:a.Z_().required("Required"),shippingAddressZipCode:a.Z_().required("Required"),shippingAddressCountryId:a.Z_().required("Required")});(0,t.useEffect)((function(){(0,p.zW)("begin_checkout",{items:n.lineItems.map(p.Mv)})}),[]),(0,t.useEffect)((function(){x(O)}),[]);var B=function(e){x(O.concat(e))};return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(d.Z,{title:"Information"}),(0,N.jsxs)(v.W2,{maxWidth:"mobile-plus",children:[(0,N.jsx)(o.Z,{}),(0,N.jsx)(c.Z,{title:"Your Contact Information"}),s.isGuest&&y&&(0,N.jsxs)(N.Fragment,{children:[!!n.planId&&(0,N.jsx)("p",{children:"Please login to continue."}),(0,N.jsx)(Z.Z,{redirectUrl:"/shop/checkout/information",forgotPassword:!1}),(0,N.jsx)(h.cw,{children:(0,N.jsxs)("p",{children:["Don't have an account?"," ",(0,N.jsx)("button",{onClick:function(){return b(!1)},children:n.planId?"Register":"Continue as Guest"})]})})]}),s.isGuest&&!y&&!!n.planId&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("p",{children:"Please create an account to continue."}),(0,N.jsx)(A,{redirectUrl:"/shop/checkout/information"}),(0,N.jsx)(h.cw,{children:(0,N.jsxs)("p",{children:["Already have an account?"," ",(0,N.jsx)("button",{onClick:function(){return b(!0)},children:"Login"})]})})]}),(0,N.jsx)(i.J9,{initialValues:k,validationSchema:f,initialIsValid:function(){R(n.shippingAddress.countryId)},onSubmit:function(e,s){var t=new FormData;t.append("email",e.email),t.append("shippingAddress[firstName]",e.shippingAddressFirstName),t.append("shippingAddress[lastName]",e.shippingAddressLastName),t.append("shippingAddress[businessName]",e.shippingAddressBusinessName),t.append("shippingAddress[address1]",e.
1shippingAddressAddress1),t.append("shippingAddress[address2]",e.shippingAddressAddress2),t.append("shippingAddress[city]",e.shippingAddressCity),t.append("shippingAddress[zipCode]",e.shippingAddressZipCode),t.append("shippingAddress[countryId]",e.shippingAddressCountryId),t.append("shippingAddress[stateId]",e.shippingAddressStateId),t.append("shippingAddress[phone]",e.shippingAddressPhone),g(t).then((function(e){if(e.data.success)_.push(n.digitalOnly?"/shop/checkout/payment":"/shop/checkout/shipping");else{var t=e.data.message;e.data.errors&&(t="".concat(t," ").concat(Object.values(e.data.errors)[0])),q(t),s.setSubmitting(!1)}})).catch((function(e){q("An unknown error occured."),s.setSubmitting(!1),console.log(e)}))},children:function(e){var t=e.isSubmitting;return(0,N.jsxs)(h.l0,{children:[P&&(0,N.jsx)(h.zG,{children:P}),s.isGuest&&!y&&!n.planId&&(0,N.jsx)(v.X2,{children:(0,N.jsx)(v.JX,{children:(0,N.jsxs)(h.cw,{children:[(0,N.jsx)(h.Bc,{name:"email"}),(0,N.jsx)(i.gN,{as:h.oi,placeholder:"Email",name:"email",type:"email"}),(0,N.jsxs)("p",{children:["Already have an account?"," ",(0,N.jsx)("button",{onClick:function(){return b(!0)},children:"Login"})]})]})})}),(!s.isGuest||!n.planId)&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(S.H4,{children:"Shipping Address"}),(0,N.jsx)(C.Z,{addressType:"shippingAddress",onValidationSchemaUpdate:B,outsideUS:R}),(0,N.jsxs)(w.DF,{stretch:!0,isLoading:t,type:"submit",children:["Proceed to ",n.digitalOnly?"Payment":"Shipping"]})]})]})}})]})]})}},79052:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/shop/checkout/information",function(){return s(70547)}])}},function(e){e.O(0,[1388,7258,9774,2888,179],(function(){return n=79052,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.