1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0d87e-90ad-71f3-8d74-b243871e489e")}catch(e){}}();(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[213],{13597:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/organisation/stripe/refresh",function(){return t(54192)}])},54192:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return w}});var n=t(31549),o=t(44194),i=t(37486),s=t(84742),a=t(21105),c=t(39355),l=t(16560),u=t(6829),d=t(23647),p=t(34441),f=t(85410),h=t(51463),g=t(42284);let m=c.Ps` 2 mutation GetConnectOnboardingLink( 3 $organisationId: ID! 4 $returnUrl: String! 5 $refreshUrl: String! 6 $accountId: ID 7 ) { 8 getConnectOnboardingLink( 9 organisationId: $organisationId 10 returnUrl: $returnUrl 11 refreshUrl: $refreshUrl 12 accountId: $accountId 13 ) { 14 url 15 expiresAt 16 } 17 } 18`;var w=!0;r.default=d.p0.withLayout({title:"Stripe Connect Setup"})(()=>{let e=(0,i.useRouter)(),{t:r}=(0,s.$G)("organization"),t=(0,h.X6)(),c=(0,g.WG)(t),[d,w]=(0,o.useState)("loading"),v=(0,a.D)({mutationFn:async e=>{let{bearerToken:r}=await (0,f.h)(),t=(0,p.Ds)({headers:{authorization:r}}),n=`${window.location.origin}/account/organisation/stripe/return`,o=`${window.location.origin}/account/organisation/stripe/refresh`,i=await t.request(m,{organisationId:e,returnUrl:n,refreshUrl:o});return i.getConnectOnboardingLink},onSuccess:e=>{window.location.href=e.url},onError:t=>{console.error("Failed to get onboarding link:",t),w("error"),u.C.error(t?.response?.errors?.[0]?.message||r("stripe.refreshError","Failed to refresh onboarding. Please try again from settings.")),setTimeout(()=>{e.push("/account/settings")},3e3)}});return(0,o.useEffect)(()=>{let t=async()=>{if(!c?.id){console.error("No organisation selected"),w("error"),u.C.error(r("stripe.noOrganisation","No organisation selected")),setTimeout(()=>{e.push("/account/settings")},2e3);return}try{console.log("Refreshing Stripe Connect onboarding for org:",c.id),await v.mutateAsync(c.id)}catch(e){console.error("Error refreshing onboarding:",e)}};e.isReady&&c&&t()},[e.isReady,c,r]),(0,n.jsx)(l.W2,{className:"py-12",children:(0,n.jsxs)("div",{className:"max-w-md mx-auto text-center",children:["loading"===d&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6",children:(0,n.jsxs)("svg",{className:"animate-spin h-12 w-12 text-blue-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),(0,n.jsx)(l.Dx,{size:"lg",className:"mb-2",children:r("stripe.refreshingSetup","Refreshing setup...")}),(0,n.jsx)(l.ZT.Paragraph,{className:"text-gray-600",children:r("stripe.redirectingToStripe","Please wait while we redirect you back to Stripe to continue your setup.")})]}),"error"===d&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 bg-red-100 rounded-full",children:(0,n.jsx)("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,n.jsx)(l.Dx,{size:"lg",className:"mb-2 text-red-800",children:r("stripe.refreshFailed","Refresh Failed")}),(0,n.jsx)(l.ZT.Paragraph,{className:"text-gray-600",children:r("stripe.refreshFailedDescription","Unable to refresh your setup session. Returning to settings...")})]})]})})})},39856:function(e,r,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.d(r,{J:function(){return b}});var o,i="basil",s="https://js.stripe.com",a="".concat(s,"/").concat(i,"/stripe.js"),c=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,l=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,u="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",d=function(){for(var e=document.querySelectorAll('script[src^="'.concat(s,'"]')),r=0;r<e.length;r++){var t,n=e[r];if(t=n.src,c.test(t)||l.test(t))return n}return null},p=function(e){var r=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src="".concat(a).concat(r);var n=document.head||document.body;if(!n)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(t),t},f=function(e,r){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"7.9.0",startTime:r})},h=null,g=null,m=null,w=function(e,r,t){if(null===e)return null;var n,o=r[0].match(/^pk_test/),s=3===(n=e.version)?"v3":n;o&&s!==i&&console.warn("Stripe.js@".concat(s," was loaded on the page, but @stripe/stripe-js@").concat("7.9.0"," expected Stripe.js@").concat(i,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var a=e.apply(void 0,r);return f(a,t),a},v=function(e){var r="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==n(e))throw Error(r);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw Error(r)},y=!1,b=function(){for(var e,r=arguments.length,t=Array(r),n=0;n<r;n++)t[n]=arguments[n];y=!0;var i=Date.now();return(e=o,null!==h?h:(h=new Promise(function(r,t){if("undefined"==typeof window||"undefined"==typeof document){r(null);return}if(window.Stripe&&e&&console.warn(u),window.Stripe){r(window.Stripe);return}try{var n,o=d();o&&e?console.warn(u):o?o&&null!==m&&null!==g&&(o.removeEventListener("load",m),o.removeEventListener("error",g),null===(n=o.parentNode)||void 0===n||n.removeChild(o),o=p(e)):o=p(e),m=function(){window.Stripe?r(window.Stripe):t(Error("Stripe.js not available"))},g=function(e){t(Error("Failed to load Stripe.js",{cause:e}))},o.addEventListener("load",m),o.addEventListener("error",g)}catch(e){t(e);return}})).catch(function(e){return h=null,Promise.reject(e)})).then(function(e){return w(e,t,i)})};b.setLoadParameters=function(e){if(!(y&&o&&Object.keys(v(e)).reduce(function(r,t){var n;return r&&e[t]===(null===(n=o)||void 0===n?void 0:n[t])},!0))){if(y)throw Error("You cannot change load parameters after calling loadStripe");o=v(e)}}}},function(e){e.O(0,[2915,3647,9774,2888,179],function(){return e(e.s=13597)}),_N_E=e.O()}]); 19//# chunkId=01a0d87e-90ad-71f3-8d74-b243871e489e
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.