https://app.getpaloma.com/_next/static/chunks/pages/onboarding/external-payments-b62af7257a48c9ca.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{71406:(e,n,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/onboarding/external-payments",function(){return a(2167)}])},70846:(e,n,a)=>{"use strict";a.d(n,{A:()=>c});var l=a(74848),s=a(86715),t=a(92060),i=a(97286),r=a(89459),o=a(17775),d=a(14240);let u=()=>{var e,n,a,t;let u=(0,s.useRouter)(),{data:c}=(0,i.I)({queryKey:["get_current_organization"],queryFn:()=>(0,d.A)("api/current_organization",{method:"GET"})}),m=null==c?void 0:null===(e=c.current_organization)||void 0===e?void 0:e.storefront_connected,v=null;return((null==u?void 0:u.asPath.includes("onboarding/experience"))||(null==u?void 0:u.asPath.includes("onboarding/setup-process"))||(null==u?void 0:u.asPath.includes("onboarding/webshop-setup"))||(null==u?void 0:u.asPath.includes("onboarding/webshop-create"))||(null==u?void 0:u.asPath.includes("onboarding/webshop-preview")))&&(v=0),(null==u?void 0:u.asPath.includes("onboarding/select-plan"))&&(v=1,((null==c?void 0:null===(a=c.current_organization)||void 0===a?void 0:a.subscription_action)==="setup_stripe_monthly"||(null==c?void 0:null===(t=c.current_organization)||void 0===t?void 0:t.subscription_action)==="setup_stripe_annually"||m)&&(v=4)),((null==u?void 0:u.asPath.includes("onboarding/facebook"))||(null==u?void 0:u.asPath.includes("onboarding/instagram")))&&(v=2),((null==u?void 0:u.asPath.includes("onboarding/payments"))||(null==u?void 0:u.asPath.includes("onboarding/external-payments")))&&(v=3),(null==u?void 0:u.asPath.includes("onboarding/store"))&&(v=4),(null==u?void 0:u.asPath.includes("onboarding/success"))&&(v=5),[o.ST.SHOPIFY,o.ST.SQUARE].includes(null==c?void 0:null===(n=c.current_organization)||void 0===n?void 0:n.storefront_tech)&&(v=null),null!==v?(0,l.jsxs)("div",{className:"flex flex-shrink-0 justify-center md:justify-between items-center w-max m-auto mb-0 mt-4",children:[(0,l.jsx)(r.A,{src:"/images/bar-1.svg",className:"inline-block mr-0.5 sm:mr-1 h-small md:h-1.5"}),(0,l.jsx)(r.A,{src:v>=2?"/images/bar-2.svg":"/images/bar-6.svg",className:"inline-block mr-0.5 sm:mr-1 h-small md:h-1.5"}),(0,l.jsx)(r.A,{src:v>=3?"/images/bar-3.svg":"/images/bar-6.svg",className:"inline-block mr-0.5 sm:mr-1 h-small md:h-1.5"}),(0,l.jsx)(r.A,{src:v>=4?"/images/bar-4.svg":"/images/bar-6.svg",className:"inline-block mr-0.5 sm:mr-1 h-small md:h-1.5"}),(0,l.jsx)(r.A,{src:5===v?"/images/bar-5.svg":"/images/bar-7.svg",className:"inline-block h-small md:h-1.5 mr-0.5"})]}):null};function c(e){var n,a;let{children:i,footer:r}=e,o=(0,s.useRouter)();return(0,l.jsxs)("div",{className:"h-screen flex flex-col items-center bg-white justify-start",children:[(0,l.jsxs)("div",{className:"flex flex-col items-center w-full overflow-x-hidden overflow-y-scroll",children:[(0,l.jsx)(u,{}),(0,l.jsx)("div",{className:(null==o?void 0:null===(n=o.pathname)||void 0===n?void 0:n.includes("onboarding/success"))?"pb-32 md:pb-2 pt-6 w-full":"pt-6 px-4 ".concat((null==o?void 0:null===(a=o.pathname)||void 0===a?void 0:a.includes("onboarding/select-plan"))?"":"max-w-2xl"," pb-32 md:pb-2 w-full"),children:i})]}),r&&(0,l.jsx)("div",{className:"w-full bg-white fixed md:static flex bottom-0 flex-col md:flex-row flex-shrink-0 p-3 gap-3 items-center justify-center border-t border-gray-light md:border-none z-30",children:r}),(0,l.jsx)(t.A,{alwaysKeepAbsolutePositioning:!0})]})}},92060:(e,n,a)=>{"use strict";a.d(n,{A:()=>d});var l=a(74848),s=a(96540),t=a(97286),i=a(68827),r=a(69258),o=a(14240);let d=e=>{var n;let{alwaysKeepAbsolutePositioning:a=!1}=e,{show:d,update:u}=(0,i.B)(),{data:c}=(0,t.I)({queryKey:["get_current_user"],queryFn:()=>(0,o.A)("api/current_user",{method:"GET"}),enabled:!!(0,r.xA)()}),m=null==c?void 0:null===(n=c.current_user)||void 0===n?void 0:n.email;return(0,s.useEffect)(()=>{m&&u({email:m})},[m]),(0,l.jsx)("div",{className:"".concat(a?"absolute":"md:absolute"," top-3 md:bottom-8 md:top-auto right-4 md:right-8 z-30 flex flex-col items-end"),children:(0,l.jsxs)("button",{type:"button",onClick:()=>d(),className:"hover:bg-action-secondary bg-blue-dark flex items-center justify-center h-6 md:h-12 w-6 md:w-20 border rounded-2xl",children:[(0,l.jsx)("h2",{className:"hidden text-white md:block",children:"Help"}),(0,l.jsx)("h2",{className:"md:hidden text-white",children:"?"})]})})}},2167:(e,n,a)=>{"use strict";a.r(n),a.d(n,{default:()=>g});var l=a(74848),s=a(96540),t=a(13368),i=a.n(t),r=a(86715),o=a(97665),d=a(97286),u=a(70846),c=a(48784),m=a(56492),v=a(24186),p=a(13260),h=a(14240);function g(){var e,n;
1let a=(0,r.useRouter)(),t=(0,o.jE)(),[g,x]=(0,s.useState)(!1),[b,f]=(0,s.useState)(!1),[y,_]=(0,s.useState)(""),[j,w]=(0,s.useState)(!1),[N,P]=(0,s.useState)(!1),[z,A]=(0,s.useState)(""),[k,S]=(0,s.useState)(!1),{data:E}=(0,d.I)({queryKey:["get_current_organization"],queryFn:()=>(0,h.A)("api/current_organization",{method:"GET"}),staleTime:0}),T=(0,v.A)("api/current_organization","PUT",t,{onSuccess:()=>{t.invalidateQueries({queryKey:["get_current_organization"]}),f(!0);let{added_storefront_details:e}=null==E?void 0:E.current_organization;e?a.push("/"):a.push("/onboarding/store")}}),I=e=>RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e),V=e=>I("https://paypal.me/".concat(e)),q=e=>I("https://venmo.com/".concat(e));return(0,s.useEffect)(()=>{var e,n,a;let l=null==E?void 0:null===(e=E.current_organization)||void 0===e?void 0:e.paypal_username;_(l||""),x(null==E?void 0:null===(a=E.current_organization)||void 0===a?void 0:null===(n=a.payment_method_types)||void 0===n?void 0:n.includes("paypal")),V(l)||w("Paypal username contains invalid characters!")},[null==E?void 0:null===(e=E.current_organization)||void 0===e?void 0:e.paypal_username,null==E?void 0:null===(n=E.current_organization)||void 0===n?void 0:n.payment_method_types]),(0,l.jsxs)(u.A,{footer:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(c.A,{isLoading:(null==T?void 0:T.status)==="pending"||b,className:"button-primary w-full md:max-w-xs",disabled:g&&!y||N&&!z||j||k,onClick:()=>{if(V(y)){if(q(z)){var e;w(""),S("");let n=null==E?void 0:null===(e=E.current_organization)||void 0===e?void 0:e.payment_method_types,a=[...n];!g||(null==n?void 0:n.includes("paypal"))||a.push("paypal"),!N||(null==n?void 0:n.includes("venmo"))||a.push("venmo"),g||a.filter(e=>"paypal"!==e),N||a.filter(e=>"venmo"!==e),T.mutate({current_organization:{payment_method_types:a,paypal_username:y,venmo_username:z}})}else S("Venmo username contains invalid characters!")}else w("Paypal username contains invalid characters!")},children:"Continue"})}),children:[(0,l.jsx)(i(),{children:(0,l.jsx)("title",{children:"Setup external payments - Paloma"})}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("h1",{className:"text-center mb-12 mt-4 md:mt-0",children:"Setup external payments"}),(0,l.jsxs)("div",{className:"w-full flex justify-between",children:[(0,l.jsx)("h2",{children:"PayPal"}),(0,l.jsx)(m.A,{className:"marker-paypal-btn",flag:g,isUpdatingOrg:(null==T?void 0:T.status)==="pending",onToggle:e=>{x(e)}})]}),(0,l.jsx)("p",{children:"Provide your paypal.me link to direct customers for payment. If you do not have one, or aren't sure, visit paypal.me to create or retrieve yours."}),(0,l.jsx)("h3",{className:"mb-1 mt-4",children:"PayPal.me Link"}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)(p.A,{value:y,disabled:(null==T?void 0:T.status)==="pending",prefix:"paypal.me/",setValue:_,customInputWidth:"w-full md:w-80",min:1,onKeyDown:()=>{w("")},onMouseLeave:e=>{V(e.target.value)||w("Paypal username contains invalid characters!")},onBlur:e=>{V(e.target.value)||w("Paypal username contains invalid characters!")}}),j&&(0,l.jsx)("p",{className:"w-full text-alert type-footnote text-left",children:j})]}),(0,l.jsxs)("div",{className:"w-full flex justify-between mt-6",children:[(0,l.jsx)("h2",{children:"Venmo"}),(0,l.jsx)(m.A,{className:"marker-paypal-btn",flag:N,isUpdatingOrg:(null==T?void 0:T.status)==="pending",onToggle:e=>{P(e)}})]}),(0,l.jsx)("p",{children:"Provide your Venmo username to direct customers for payment. If you do not have one, or aren't sure, visit venmo.com or open the app, and navigate to your profile page."}),(0,l.jsx)("h3",{className:"mb-1 mt-4",children:"Venmo username"}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)(p.A,{value:z,disabled:(null==T?void 0:T.status)==="pending",prefix:"@",setValue:A,customInputWidth:"w-full md:w-80",min:1,onKeyDown:()=>{S("")},onMouseLeave:e=>
1{q(e.target.value)||S("Venmo username contains invalid characters!")},onBlur:e=>{q(e.target.value)||S("Venmo username contains invalid characters!")}}),k&&(0,l.jsx)("p",{className:"w-full text-alert type-footnote text-left",children:k})]})]})]})}}},e=>{var n=n=>e(e.s=n);e.O(0,[636,6593,8792],()=>n(71406)),_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.