PageSourceSearch

https://sitemechanic.ai/_next/static/chunks/pages/auth/link-3f849924efc2ed4b.js

js sitemechanic.ai collected 2026-10-05 12:40:17 UTC 6,142 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="def489a8-7e2d-4ff9-a90a-8a9ab9605992",e._sentryDebugIdIdentifier="sentry-dbid-def489a8-7e2d-4ff9-a90a-8a9ab9605992")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1030],{97186:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/link",function(){return t(72424)}])},42270:function(e,n,t){"use strict";var r=t(33286),o=t(75362);n.Z=function(e){const n=`/api/organizations/${e}/members`,t=(0,r.G)();return(0,o.Z)(n,((e,n)=>{let{arg:r}=n;return t({path:e,body:r})}))}},72424:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return C}});var r=t(85893),o=t(67294),i=t(11163),c=t(1762),u=t(99345),s=t(24367),a=t(29276),l=t(40548),f=t(33794),d=t(70793),p=t(41714),h=t(27219),m=t(36923),v=t(12890),g=t(56374),w=t(91522),y=t(3883),E=t(42270),b=t(36003);const x="emailForSignIn",{onboarding:_,appHome:N}=b.default.paths;function j(){return(0,r.jsxs)("div",{className:"flex space-x-2",children:[(0,r.jsx)(f.Z,{}),(0,r.jsx)("span",{children:(0,r.jsx)(u.cC,{i18nKey:"auth:signingIn"})})]})}var C=!0;n.default=e=>{let{invite:n}=e;const t=(0,c.aC)(),f=(0,i.useRouter)(),C=(0,o.useRef)(),[Z,S]=(0,o.useState)(),{state:k,setError:I}=(0,p.g)(),P=(0,h.Z)(),$=P.isMutating,O=n?.organization.id||"",{trigger:M,isMutating:R}=(0,E.Z)(O),V=(0,o.useCallback)((()=>f.push(N)),[f]),D=(0,o.useCallback)((async e=>{if(await P.trigger(e),n)try{await M({code:n.code})}catch(t){I("")}window.localStorage.removeItem(x),await V()}),[M,n,V,P,I]);return(0,o.useEffect)((()=>{f.prefetch(_),f.prefetch(N)}),[f]),(0,o.useEffect)((()=>{if(C.current)return;const e=function(){if(!(0,d.j)())return;return window.location.href}();if(!e)return;if(!(0,s.JB)(t,e))return void I("generic");const n=function(){if(!(0,d.j)())return;return window.localStorage.getItem(x)}();n?(async()=>{C.current=!0;try{const r=await(0,s.P6)(t,n,e);return D(r.user)}catch(r){(0,g.x)(r)?S(r):I((0,y.O)(r))}})():I("generic")}),[t,$,D,V,P,I]),(0,r.jsxs)(w.Z,{heading:"",children:[(0,r.jsx)(a.Z,{condition:$||R,children:(0,r.jsx)(j,{})}),(0,r.jsx)(a.Z,{condition:k.error,children:(0,r.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,r.jsx)(m.Z,{error:k.error}),(0,r.jsx)(l.ZP,{variant:"ghost",href:b.default.paths.signIn,children:(0,r.jsx)(u.cC,{i18nKey:"auth:getNewLink"})})]})}),(0,r.jsx)(a.Z,{condition:Z,children:e=>(0,r.jsx)(v.Z,{cancelButton:!1,error:e,isOpen:!0,setIsOpen:()=>S(void 0),onSuccess:e=>D(e.user)})})]})}},28771:function(e,n,t){"use strict";t.d(n,{F:function(){return o},e:function(){return i}});var r=t(67294);function o(...e){return n=>e.forEach((e=>function(e,n){"function"===typeof e?e(n):null!==e&&void 0!==e&&(e.current=n)}(e,n)))}function i(...e){return(0,r.useCallback)(o(...e),e)}},25360:function(e,n,t){"use strict";t.d(n,{b:function(){return i},k:function(){return o}});var r=t(67294);function o(e,n){const t=(0,r.createContext)(n);function o(e){const{children:n,...o}=e,i=(0,r.useMemo)((()=>o),Object.values(o));return(0,r.createElement)(t.Provider,{value:i},n)}return o.displayName=e+"Provider",[o,function(o){const i=(0,r.useContext)(t);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${e}\``)}]}function i(e,n=[]){let t=[];const o=()=>{const n=t.map((e=>(0,r.createContext)(e)));return function(t){const o=(null===t||void 0===t?void 0:t[e])||n;return(0,r.useMemo)((()=>({[`__scope${e}`]:{...t,[e]:o}})),[t,o])}};return o.scopeName=e,[function(n,o){const i=(0,r.createContext)(o),c=t.length;function u(n){const{scope:t,children:o,...u}=n,s=(null===t||void 0===t?void 0:t[e][c])||i,a=(0,r.useMemo)((()=>u),Object.values(u));return(0,r.createElement)(s.Provider,{value:a},o)}return t=[...t,o],u.displayName=n+"Provider",[u,function(t,u){const s=(null===u||void 0===u?void 0:u[e][c])||i,a=(0,r.useContext)(s);if(a)return a;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},c(o,...n)]}function c(...e){const n=e[0];if(1===e.length)return n;const t=()=>{const t=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=t.reduce(((n,{useScope:t,scopeName:r})=>({...n,...t(e)[`__scope${r}`]})),{});return(0,r.useMemo)((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return t.scopeName=n.scopeName,t}},64757:function(e,n,t){"use strict";t.d(n,{WV:function(){return d},jH:function(){return p}});var r=t(87462),o=t(67294),i=t(73935),c=t(28771);const u=(0,o.forwardRef)(((e,n)=>{const{children:t,...i}=e,c=o.Children.toArray(t),u=c.find(l);if(u){const e=u.props.children,t=c.map((n=>n===u?o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null:n));return(0,o.createElement)(s,(0,r.Z)({},i,{ref:n}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,t):null)}return(0,o.createElement)(s,(0,r.Z)({},i,{ref:n}),t)}
1));u.displayName="Slot";const s=(0,o.forwardRef)(((e,n)=>{const{children:t,...r}=e;return(0,o.isValidElement)(t)?(0,o.cloneElement)(t,{...f(r,t.props),ref:n?(0,c.F)(n,t.ref):t.ref}):o.Children.count(t)>1?o.Children.only(null):null}));s.displayName="SlotClone";const a=({children:e})=>(0,o.createElement)(o.Fragment,null,e);function l(e){return(0,o.isValidElement)(e)&&e.type===a}function f(e,n){const t={...n};for(const r in n){const o=e[r],i=n[r];/^on[A-Z]/.test(r)?o&&i?t[r]=(...e)=>{i(...e),o(...e)}:o&&(t[r]=o):"style"===r?t[r]={...o,...i}:"className"===r&&(t[r]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}const d=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,n)=>{const t=(0,o.forwardRef)(((e,t)=>{const{asChild:i,...c}=e,s=i?u:n;return(0,o.useEffect)((()=>{window[Symbol.for("radix-ui")]=!0}),[]),(0,o.createElement)(s,(0,r.Z)({},c,{ref:t}))}));return t.displayName=`Primitive.${n}`,{...e,[n]:t}}),{});function p(e,n){e&&(0,i.flushSync)((()=>e.dispatchEvent(n)))}}},function(e){e.O(0,[5643,4413,6062,5675,633,8726,4099,2888,9774,179],(function(){return n=97186,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.