1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2867],{75868:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/merchant/stores/add/custom",function(){return r(99852)}])},59563:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(85893);function s(e){let{className:t,children:r,type:s,onClick:a,disabled:l,loading:o}=e;return(0,n.jsxs)("button",{type:s||"button",className:"btn min-w-24 ".concat(t||"btn-primary"),disabled:l||o,onClick:a,children:[o?(0,n.jsx)("span",{className:"loading loading-spinner"}):null,r]})}r(67294)},26291:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(85893);function s(e){let{label:t,htmlFor:r,children:s,info:a,error:l}=e;return(0,n.jsxs)("div",{className:"form-control w-full mb-2",children:[t&&(0,n.jsx)("div",{className:"label",children:(0,n.jsx)("label",{className:"label-text",htmlFor:r,children:t})}),s,a&&!l&&(0,n.jsx)("small",{className:"text-xs leading-3 text-gray-400",children:a}),l&&(0,n.jsx)("small",{className:"text-xs leading-3 text-red-700",children:l})]})}r(67294)},4862:function(e,t,r){"use strict";var n=r(85893);t.Z=e=>{let{defaultValue:t,placeholder:r,label:s,disabled:a,required:l,name:o,type:i,value:c,onChange:u}=e;return(0,n.jsx)("input",{defaultValue:t,name:o,placeholder:r,disabled:a,type:i||"text",value:c,onChange:u,className:"input input-bordered w-full"})}},3225:function(e,t,r){"use strict";var n=r(85893);r(26291);var s=r(67294),a=r(41192);t.Z=e=>{let{name:t,value:r,onChange:l}=e,[o,i]=(0,s.useState)(!1);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{name:t,type:o?"text":"password",value:r,onChange:l,className:"input input-bordered w-full pr-2"}),(0,n.jsx)("button",{tabIndex:-1,className:"absolute inset-y-0 right-0 p-2 focus:outline-none focus:text-indigo-700 hover:text-indigo-700",type:"button",onClick:e=>i(!o),children:o?(0,n.jsx)(a.dSq,{}):(0,n.jsx)(a.tgn,{})})]})}},29814:function(e,t,r){"use strict";r.d(t,{II:function(){return s.Z},cw:function(){return a.Z},zx:function(){return n.Z}}),r(85893);var n=r(59563),s=r(4862);r(3225);var a=r(26291)},55936:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return f}});var n=r(85893),s=r(41664),a=r.n(s),l=r(11163),o=r(67294),i=r(20192),c=r(76467),u=r(38342);function d(e){let{children:t,header:r}=e,s=(0,l.useRouter)(),c=(0,u.a)(e=>e.access_token),d=(0,u.a)(e=>e.loadAccount);return((0,o.useEffect)(()=>{d()},[]),c)?(0,n.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,n.jsx)("main",{className:"min-h-screen bg-gray-50 py-8",children:(0,n.jsxs)("div",{className:"container mx-auto px-4 max-w-7xl",children:[r&&(0,n.jsx)("div",{className:"mb-8",children:r}),t,(0,n.jsxs)("footer",{className:"mt-8 pt-6 border-t border-gray-200 flex flex-col sm:flex-row items-center justify-between gap-4 text-sm",children:[(0,n.jsx)("div",{className:"flex items-center gap-4",children:(0,n.jsxs)(a(),{href:"/contact",className:"inline-flex items-center gap-1.5 text-gray-500 hover:text-indigo-600 transition-colors",children:[(0,n.jsx)(i.bax,{className:"w-4 h-4"}),"Help & Support"]})}),(0,n.jsxs)("p",{className:"text-gray-400",children:["\xa9 ",new Date().getFullYear()," Goaffpro. All rights reserved."]})]})]})})}):("undefined"!=typeof localStorage&&s.replace("/login?redirect="+s.pathname),null)}function f(e){let{children:t,header:r}=e;return(0,n.jsx)(c.default,{children:(0,n.jsx)(d,{header:r,children:t})})}},99852:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return p}});var n=r(85893),s=r(9008),a=r.n(s),l=r(41664),o=r.n(l),i=r(11163),c=r(67294),u=r(20192),d=r(29814),f=r(62924),m=r(55936);function p(){let e=(0,i.useRouter)(),[t,r]=(0,c.useState)(""),[s,l]=(0,c.useState)(""),[p,x]=(0,c.useState)(null),[h,b]=(0,c.useState)(!1);async function g(r){r&&(r.preventDefault(),r.stopPropagation()),b(!0),await (0,f.Sv)().post("/sdk/install",{integration:"sdk",storeUrl:t,storeName:s}).then(e=>{let{data:t}=e;t.access_token&&x(t.access_token)}).then(()=>{b(!1),e.replace("/merchant")}).catch(()=>{b(!1)})}return(0,n.jsxs)(m.default,{children:[(0,n.jsx)(a(),{children:(0,n.jsx)("title",{children:"Add Custom Store | Goaffpro"})}),(0,n.jsxs)(o(),{href:"/merchant/stores/add",className:"inline-flex items-center gap-2 text-sm text-gray-500 hover:text-indigo-600 mb-6 transition-colors",children:[(0,n.jsx)(u.Ao2,{className:"w-4 h-4"}),"Back to platforms"]}),(0,n.jsxs)("div",{className:"max-w-lg mx-auto",children:[(0,n.jsxs)("div",{className:"mb-8 text-center",children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Add Custom Store"}),(0,n.jsx)("p",{className:"text-gray-600 mt-1",children:"Integrate Goaffpro with any platform using our SDK"})]}),p?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-xl p-8 shadow-sm text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,n.jsx)(u._rq,{className:"w-8 h-8 text-green-600"})}),(0,n.jsx)("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Store Created Successfully!"}),(0,n.jsx)("p",{className:"text-gray-600 mb-6",children:"Complete the integration by following the setup steps."}),(0,n.jsxs)("a",{href:"https://app.goaffpro.com/t/?token=".concat(p,"&then=/wizard"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 btn btn-primary px-6 py-3",children:["View Integration Steps",(0,n.jsx)(u.AlO,{className:"w-4 h-4"})]})]}):(0,n.jsx)("div",{className:"bg-white border border-gray-200 rounded-xl p-6 shadow-sm",children:(0,n.jsxs)("form",{onSubmit:g,children:[(0,n.jsx)(d.cw,{label:"Store Name",info:"A name for your store",children:(0,n.jsx)(d.II,{value:s,placeholder:"My Awesome Store",onCh
1ange:e=>l(e.target.value)})}),(0,n.jsx)(d.cw,{label:"Store URL",info:"Your website URL",children:(0,n.jsx)(d.II,{value:t,placeholder:"https://mystore.com",onChange:e=>r(e.target.value)})}),(0,n.jsx)(d.zx,{type:"submit",primary:!0,loading:h,onClick:g,className:"w-full",children:"Create Store"})]})})]})]})}},32063:function(e,t,r){"use strict";r.d(t,{w_:function(){return u}});var n=r(67294),s={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=n.createContext&&n.createContext(s),l=["attr","size","title"];function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,s;n=t,s=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[n]=s}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e){return t=>n.createElement(d,o({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,r)=>n.createElement(t.tag,c({key:r},t.attr),e(t.child)))}(e.child))}function d(e){var t=t=>{var r,{attr:s,size:a,title:i}=e,u=function(e,t){if(null==e)return{};var r,n,s=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}(e,l),d=a||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,s,u,{className:r,style:c(c({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),i&&n.createElement("title",null,i),e.children)};return void 0!==a?n.createElement(a.Consumer,null,e=>t(e)):t(s)}}},function(e){e.O(0,[6130,3365,1664,6467,2888,9774,179],function(){return e(e.s=75868)}),_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.