1"use strict";(self.rspackChunkcircle=self.rspackChunkcircle||[]).push([[4991],{972539(e,t,n){e.exports=n.p+"static/images/logo-639eb657099dd684.svg"},29297(e,t,n){n.d(t,{l:()=>w});var r,o,i=n(452146),a=function(e,t,n){if(navigator.sendBeacon){var r=new URL(e);if(r.searchParams.set("token",t),navigator.sendBeacon(r.toString(),n))return;console.warn("sendBeacon failed, falling back to fetch")}fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat(t)},body:n,keepalive:!0}).catch(function(e){console.warn("Analytics fetch failed",e)})},s=[],l=0,u=null,c=!1,d=function(e){h();var t=new Blob([JSON.stringify(e)]).size;l+t>6e4&&f(),s.push(e),l+=t,s.length>=10?f():m()},f=function(){if(p(),0!==s.length){var e=s;s=[],l=0,g(e)}},m=function(){null===u&&(u=setTimeout(f,2e3))},p=function(){null!==u&&(clearTimeout(u),u=null)},h=function(){c||(c=!0,window.addEventListener("beforeunload",f),window.addEventListener("pagehide",f),window.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&f()}))},g=function(e){var t,n,r,o=null==(t=window)?void 0:t.ANALYTICS_TRACKER_URL,i=null==(n=window)?void 0:n.ANALYTICS_TRACKER_API_TOKEN;if(o&&i){try{r=JSON.stringify(e)}catch(e){console.error("Error while converting batch data to JSON",e);return}a(o,i,r)}},v="circle.".concat(window.RAILS_ENV),y=function(){try{return{isInIframe:window.self!==window.top}}catch(e){return{isInIframe:!0}}}(),b=function(e,t,n){var s,l,u=y.isInIframe;r||(r=window&&window.ANALYTICS_TRACKER_URL),o||(o=window&&window.ANALYTICS_TRACKER_API_TOKEN);var c=(null!=(s=t.community_id)?s:0).toString(),f={platform:"web",ahoy_visitor:window.ANALYTICS_TRACKER_VISITOR,is_in_iframe:u},m={event_name:e,tenant_id:c,app_name:v,triggered_at:new Date().toISOString(),properties:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},f,t)};if(((0,i.tc)()||"true"===window.ANALYTICS_TRACKER_LOG_IN_CONSOLE)&&console.info("useAnalyticsTracker.trackEvent",m),r&&o){if(null==n?void 0:n.batch)return void d(m);try{l=JSON.stringify(m)}catch(e){console.error("Error while converting data to JSON",e);return}a(r,o,l)}},w={trackPageView:function(e){return b("PageView",e)},trackPageExit:function(e){return b("PageExit",e)},trackVideoView:function(e){return b("VideoView",e)},trackVideoSegmentView:function(e){return b("VideoSegmentView",e)},trackPostView:function(e){return b("PostView",e)},trackEvent:b,trackEventsForRevops:function(e,t){return b(e,t)},flushEvents:f}},553756(e,t,n){n.d(t,{E:()=>K,h:()=>H});var r=n(391426),o=n(865494),i=n(432471),a=n(129949),s=n(315638),l=n(275719),u=n(933578),c=n(810284),d=n(274685),f=n(717526),m=n(859792),p=n(303758),h=n(47422),g=n(969990),v=n(30864),y=(0,g.hy)()({component:v.s}),b=n(819436),w=(0,g.un)({getParentRoute:function(){return y},path:"/auth/otp_confirmations/new",component:(0,b.Z)(function(){return n.e(34265).then(n.bind(n,126144))},"OtpConfirmationPage")}),_=(0,g.un)({getParentRoute:function(){return y},path:"/communities/$communityId/questions",component:(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(84847),n.e(53167),n.e(68369),n.e(25021)]).then(n.bind(n,70305))},"CommunitiesQuestionsRoute")}),C=(0,g.un)({getParentRoute:function(){return y},path:"/communities/$communityId/templates",component:(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(84847),n.e(53167),n.e(68369),n.e(25021)]).then(n.bind(n,54181))},"CommunitiesTemplatesRoute")}),x=(0,g.un)({getParentRoute:function(){return y},path:"/communities/new",component:(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(84847),n.e(53167),n.e(68369),n.e(25021)]).then(n.bind(n,907797))},"CreateCommunityPage")}),j=(0,g.un)({getParentRoute:function(){return y},path:"/invitation",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(86625),n.e(22505),n.e(97448),n.e(9446)]).then(n.bind(n,39629))},"AcceptInvitationPage")}),S=(0,g.un)({getParentRoute:function(){return y},path:"/settings/profile",component:(0,b.Z)(function(){return Promise.all([n.e(2954),n.e(24678),n.e(92167),n.e(96068),n.e(43032),n.e(47931),n.e(22930),n.e(80809),n.e(25140),n.e(95638),n.e(70543),n.e(38497),n.e(64568),n.e(86625),n.e(36918),n.e(22505),n.e(97448),n.e(60542),n.e(30755),n.e(14007)]).then(n.bind(n,913665))},"CreateUserProfile")}),P=(0,g.un)({getParentRoute:function(){return y},path:"/sign_in",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(22765),n.e(86625),n.e(22505),n.e(97448),n.e(7066),n.e(48746),n.e(16593)]).then(n.bind(n,310952))},"SignInPage")}),O=n(145878),k=(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(22765),n.e(86625),n.e(22505),n.e(97448),n.e(7066),n.e(48746),n.e(57797),n.e(6901)]).then(n.bind(n,672533))},"SignUp"),N=(0,g.un)({getParentRoute:function(){return y},path:"/sign_up",component:function(){var e=(0,O.O)({from:y.id}).hasEmail;return(0,r.jsx)(k,{hasEmail:void 0!==e&&e})}}),I=(0,g.un)({getParentRoute:function(){return y},path:"/user/password",component:(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(76868)]).then(n.bind(n,850479))},"ForgotPasswordPage")}),E=(0,g.un)({getParentRoute:function(){return y},path:"/user/sign_in",component:(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(27266)]).then(n.bind(n,182848))},"SignInPage")}),A=(0,b.Z)(function(){return Promise.all([n.e(24014),n.e(21318),n.e(86625),n.e(22505),n.e(97448),n.e(7066),n.e(57797),n.e(8634)]).then(n.bind(n,71300))},"SignUpPage"),R=(0,g.un)({getParentRoute:function(){return y},path:"/user/sign_up",component:function(){var e=(0,O.O)({from:y.id}).hasEmail;return(0,r.jsx)(A,{hasEmail:void 0!==e&&e})}}),T=(0,g.un)({getParentRoute:function(){return y},path:"/users/confirmation/new",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(78543)]).then(n.bind(n,600338))},"ResendConfirmationPage")}),L=(0,g.un)({getParentRoute:function(){return y},path:"/users/login",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(22765),n.e(86625),n.e(22505),n.e(97448),n.e(7066),n.e(48746),n.e(16593)]).then(n.bind(n,310952))},"SignInPage")}),V=(0,g.un)({getParentRoute:function(){return y},path:"/users/password/edit",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(58438),n.e(49067)]).then(n.bind(n,766118))},"ChangePasswordPage")}),B=(0,g.un)({getParentRoute:function(){return y},path:"/users/password/new",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(58438),n.e(12785)]).then(n.bind(n,970222))},"ForgotPasswordPage")}),F=(0,g.un)({getParentRoute:function(){return y},path:"/users/sign_in",component:(0,b.Z)(function(){return Promise.all([n.e(21318),n.e(22765),n.e(86625),n.e(22505),n.e(97448),n.e(7066),n.e(48746),n.e(16593)]).then(n.bind(n,310952))},"SignInPage")}),W=y.addChildren([E,R,I,P,F,L,N,B,V,j,T,w,S,x,C,_]),M=(0,h.H)({routeTree:W,context:{hasEmail:!1}}),Z=function(e){var t=e.hasEmail;return(0,r.jsx)(p.p,{router:M,context:{hasEmail:t}})};function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var z=(0,u.createContext)({updateCurrentCommunity:function(){}});z.displayName="CurrentCommunityContext";var H=function(){return(0,u.useContext)(z)},U=new c.E,K=function(e){var t,n,c,p=e.currentCommunity,h=e.currentCommunityPolicies,g=e.communityThemeSettings,v=e.brandColor,y=e.brandTextColor,b=e.invitationToken,w=e.signUpOptions,_=e.notice,C=e.alert,x=e.errors,j=e.user_email,S=e.current_user,P=e.is_signup_password_matching,O=e.user_is_passwordless,k=e.can_current_community_support_custom_login,N=e.authProviderAuthorizationUrl,I=e.authProviderName,E=e.authProviderSignInWithCircleLinkLabel,A=e.promotion_details,R=e.suggestedLanguage,T=e.isCaiSuf,L=e.googleClientId,V=e.googleOneTapNonce,B=(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},void 0===g?{}:g),n=n={brand_color:void 0===v?{light:"",dark:""}:v,brand_text_color:void 0===y?{light:"",dark:""}:y,current_theme:"default",is_custom:!1},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t);(0,a.lV)();var F=function(e){if(Array.isArray(e))return e}(c=(0,u.useState)(p))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(c)||function(e){if(e){if("string"==typeof e)return D(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return D(e,2)}}(c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),W=F[0],M=F[1];return(0,r.jsx)(u.StrictMode,{children:(0,r.jsx)(l.s,{children:(0,r.jsx)(i.C,{children:(0,r.jsx)(d.Ht,{client:U,children:(0,r.jsx)(z.Provider,{value:{currentCommunity:W,updateCurrentCommunity:M,currentCommunityPolicies:h,invitationToken:b,signUpOptions:w,errors:x,currentUser:S,userEmail:j,isSignupPasswordMatching:P,isUserPasswordless:O,canCurrentCommunitySupportCustomLogin:k,authProviderAuthorizationUrl:N,authProviderName:I,suggestedLanguage:R,authProviderSignInWithCircleLinkLabel:E,promotion_details:A,isCaiSuf:T,googleClientId:L,googleOneTapNonce:V},children:(0,r.jsx)(s.N,{theme:B,children:(0,r.jsx)(f.t,{children:(0,r.jsxs)(m.E,{children:[(0,r.jsx)(o.c,{notice:_,alert:C}),(0,r.jsx)(Z,{hasEmail:!!((null==x?void 0:x.email)&&j)})]})})})})})})})})}},39755(e,t,n){var r=n(391426),o=n(570310),i=function(e){var t=e.width,n=e.height,i=e.className;return(0,r.jsxs)("svg",{width:void 0===t?100:t,height:void 0===n?29:n,className:(0,o.x)("w-auto",i),viewBox:"0 0 100 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M13.2792 29.3418C11.4348 29.3418 9.70116 28.9974 8.07815 28.3085C6.45515 27.5951 5.04116 26.611 3.8362 25.3563C2.63124 24.077 1.68449 22.6009 0.995937 20.928C0.331979 19.255 0 17.4468 0 15.5033C0 13.5597 0.331979 11.7638 0.995937 10.1155C1.68449 8.44253 2.63124 6.97872 3.8362 5.72403C5.04116 4.46933 6.45515 3.49756 8.07815 2.8087C9.70116 2.09525 11.4348 1.73853 13.2792 1.73853C15.6153 1.73853 17.7301 2.21826 19.6236 3.17773C21.5417 4.13721 23.1156 5.47801 24.3451 7.20013C25.5747 8.92226 26.337 10.915 26.6321 13.1784H20.6934C20.4966 11.8991 20.0417 10.7797 19.3286 9.82023C18.64 8.86076 17.7793 8.1104 16.7465 7.56916C15.7383 7.02792 14.6071 6.7573 13.3529 6.7573C12.1972 6.7573 11.152 6.96642 10.2176 7.38465C9.3077 7.80288 8.5085 8.40562 7.81995 9.19288C7.15599 9.98014 6.63958 10.915 6.27071 11.9975C5.92644 13.0554 5.7543 14.224 5.7543 15.5033C5.7543 16.8072 5.92644 18.0003 6.27071 19.0828C6.63958 20.1407 7.15599 21.0633 7.81995 21.8505C8.5085 22.6378 9.3077 23.2528 10.2176 23.6957C11.152 24.1139 12.1972 24.323 13.3529 24.323C14.6071 24.323 15.7506 24.0524 16.7834 23.5112C17.8162 22.9453 18.6646 22.1827 19.3286 21.2232C20.0171 20.2391 20.472 19.1197 20.6934 17.865H26.6321C26.3124 20.153 25.5378 22.1581 24.3082 23.8802C23.0787 25.6023 21.5172 26.9431 19.6236 27.9026C17.7301 28.8621 15.6153 29.3418 13.2792 29.3418Z",fill:"#191B1F"}),(0,r.jsx)("path",{d:"M34.4938 28.7882H29.3666V9.08217H34.4938V28.7882Z",fill:"#191B1F"}),(0,r.jsx)("path",{d:"M43.446 19.2304V28.7882H38.3188V9.08217H43.0403V12.8832C43.778 11.6285 44.8477 10.6444 46.2494 9.93094C47.6511 9.21748 49.1388 8.86076 50.7127 8.86076V14.1748C49.2864 14.0763 48.0199 14.1502 46.9133 14.3962C45.8313 14.6176 44.983 15.1219 44.3682 15.9092C43.7534 16.6718 43.446 17.7789 43.446 19.2304Z",fill:"#191B1F"}),(0,r.jsx)("path",{d:"M60.7936 29.1573C58.9001 29.1573 57.2279 28.7267 55.7771 27.8657C54.3508 27.0046 53.2319 25.7991 52.4204 24.2492C51.6089 22.6993 51.2031 20.928 51.2031 18.9352C51.2031 16.9671 51.6089 15.2203 52.4204 13.695C53.2565 12.1451 54.4 10.9273 55.8508 10.0416C57.3017 9.15598 58.9493 8.71315 60.7936 8.71315C62.4904 8.71315 64.0274 9.08218 65.4044 9.82023C66.7815 10.5337 67.9004 11.5547 68.7611 12.8832C69.6218 14.1871 70.1505 15.7247 70.3473 17.496H64.9618C64.8389 16.1921 64.3962 15.1588 63.6339 14.3962C62.8962 13.6335 61.9494 13.2522 60.7936 13.2522C59.9084 13.2522 59.1337 13.4859 58.4698 13.9533C57.8304 14.4208 57.3263 15.0727 56.9574 15.9092C56.6132 16.7456 56.441 17.7543 56.441 18.9352C56.441 20.0915 56.6132 21.1002 56.9574 21.9
1612C57.3263 22.8223 57.8304 23.4866 58.4698 23.954C59.1337 24.3968 59.9084 24.6182 60.7936 24.6182C61.974 24.6182 62.9208 24.2492 63.6339 23.5112C64.3716 22.7485 64.8143 21.7029 64.9618 20.3744H70.3473C70.1751 22.1704 69.6587 23.7326 68.798 25.0611C67.9373 26.365 66.8307 27.3736 65.4782 28.0871C64.1257 28.8006 62.5642 29.1573 60.7936 29.1573Z",fill:"#191B1F"}),(0,r.jsx)("path",{d:"M78.0655 28.7882H72.9014V2.29207L78.0655 2.29207V28.7882Z",fill:"#191B1F"}),(0,r.jsx)("path",{d:"M90.4833 29.1204C88.516 29.1204 86.7823 28.7021 85.2823 27.8657C83.8068 27.0046 82.6633 25.7991 81.8518 24.2492C81.0403 22.6993 80.6346 20.9034 80.6346 18.8614C80.6346 16.8933 81.0526 15.1465 81.8887 13.6212C82.7248 12.0959 83.8806 10.9027 85.356 10.0416C86.8315 9.15598 88.516 8.71315 90.4095 8.71315C91.9587 8.71315 93.3604 9.00837 94.6146 9.59881C95.8933 10.1647 96.963 10.9765 97.8237 12.0344C98.6844 13.0923 99.2992 14.3224 99.668 15.7247C100.037 17.1024 100.098 18.5908 99.8525 20.1899H83.6593V16.9425H94.4301C94.3809 15.5648 93.9752 14.4823 93.2129 13.695C92.4752 12.8832 91.5038 12.4772 90.2988 12.4772C89.3398 12.4772 88.5283 12.7232 87.8643 13.2153C87.2004 13.7073 86.684 14.4331 86.3151 15.3925C85.9708 16.3274 85.7987 17.4837 85.7987 18.8614C85.7987 20.2145 85.9708 21.3585 86.3151 22.2934C86.6594 23.2282 87.1758 23.9417 87.8643 24.4337C88.5529 24.9258 89.389 25.1718 90.3726 25.1718C91.5038 25.1718 92.4383 24.9012 93.176 24.3599C93.9137 23.8187 94.4301 23.0683 94.7252 22.1088H99.8156C99.25 24.323 98.1557 26.0451 96.5327 27.2752C94.9097 28.5053 92.8932 29.1204 90.4833 29.1204Z",fill:"#191B1F"}),(0,r.jsx)("path",{d:"M35.2689 4.16397C35.2689 5.17264 34.9492 6.0091 34.3098 6.67335C33.6705 7.313 32.8467 7.63283 31.8384 7.63283C30.8302 7.63283 29.9941 7.313 29.3301 6.67335C28.6908 6.0091 28.3711 5.17264 28.3711 4.16397C28.3711 3.13069 28.6908 2.29423 29.3301 1.65458C29.9941 0.990329 30.8302 0.658203 31.8384 0.658203C32.8467 0.658203 33.6705 0.990329 34.3098 1.65458C34.9492 2.29423 35.2689 3.13069 35.2689 4.16397Z",fill:"#506CF0"})]})};n.d(t,{i:()=>i})},666836(e,t,n){var r=n(391426),o=n(568316),i=n(778144),a=n(570310),s=n(39755),l=n(765724),u=n(622779),c={url:void 0,type:void 0},d=function(e){var t,n,d=e.community,f=e.withCircleBranding,m=e.isLeftAlignLogo,p=void 0!==m&&m,h=e.displayCommunityName,g=void 0===h||h,v=(0,u.wR)().isDarkAppearance,y=d?(0,l.Xt)(d,v):c,b=y.url,w=y.type,_=null==d||null==(n=d.prefs)?void 0:n.brand_color,C=(v?null==_?void 0:_.dark:null==_?void 0:_.light)||"#506cf0";return!w||void 0!==f&&f?(0,r.jsx)(s.i,{}):"icon"!==w||b?"icon"===w&&b?(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("img",{loading:"lazy",src:b,alt:"",className:(0,a.x)("mb-3 h-8",{"self-start":p})}),g&&(0,r.jsx)(o.o.LabelMd,{weight:"medium",children:null==d?void 0:d.name})]}):(0,r.jsx)("img",{loading:"lazy",className:"max-h-9 max-w-[14.375rem]",src:b||void 0,alt:null!=(t=null==d?void 0:d.name)?t:""}):(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:(0,a.x)("mb-3 flex size-12 items-center justify-center rounded-md text-center",{"self-start":p}),style:{backgroundColor:C},"aria-hidden":!0,children:(0,r.jsx)(o.o.TitleSm,{weight:"semibold",color:"text-brand-button",children:(0,i.A)(null==d?void 0:d.name)})}),g&&(0,r.jsx)(o.o.LabelMd,{weight:"medium",children:null==d?void 0:d.name})]})};n.d(t,{f:()=>d})},590179(e,t,n){n.d(t,{V:()=>w});var r=n(391426),o=n(973646),i=n(927561),a=n(553756),s=n(790604),l=n(817582),u=n(51730),c=n(570310),d=n(434104),f=n(888834),m=n(933578),p=n(258752),h=n(417980),g=n(387099),v=n(717526),y=n(674251);function b(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}var w=function(e){var t,n,w=e.className,_=e.email,C=e.onShowOtpForm,x=e.onCancel,j=e.onPasswordSubmitted,S=e.onPasswordSucceeded,P=e.onPasswordFailed,O=(0,a.h)().currentCommunity,k=(0,v.d)(),N=(0,m.useMemo)(function(){return(0,f.parse)(window.location.search)},[]),I=(0,p.n_)({mutationFn:function(e){return(0,u.oK)(s.K.signIn(),{user:e})},onSuccess:function(e){(null==e?void 0:e.redirect_url)&&(null==S||S(),window.location.href=e.redirect_url)}}),E=I.mutateAsync,A=I.isPending,R=s.K.forgotPassword({params:(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},N),n=n={email:_},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t)});return(0,r.jsxs)("div",{className:(0,c.x)("flex h-full flex-col items-center justify-center",w),children:[O&&(0,r.jsx)(l.s,{currentCommunity:O,title:(0,h.t)("authentication_app.signup.title.welcome_community",{community_name:O.name}),subtitle:(0,h.t)("authentication_app.signup.subtitle_otp_first_password")}),(0,r.jsxs)("div",{className:"text-primary w-full rounded-lg border border-primary p-6 sm:w-[468px]",children:[(0,r.jsxs)("div",{className:"bg-tertiary -mx-6 -mt-6 mb-4 flex h-14 items-center justify-between rounded-t-lg px-6",children:[(0,r.jsx)(y.o.BodySm,{children:_}),(0,r.jsx)("button",{type:"button",className:"cursor-pointer text-secondary transition-colors hover:text-primary",onClick:x,disabled:A,"aria-label":(0,h.t)("otp_challenge_modal.cancel"),tabIndex:-1,children:(0,r.jsx)(o.In,{type:"20-close",size:20,className:"size-5"})})]}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)(i.l,{defaultValues:{password:""},onSubmit:function(e,t){var n,r=e.password,o=t.setError;return(n=function(){var e;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var u=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:null==j||j(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,E({email:_,password:r})];case 2:return t.sent(),[3,4];case 3:return e=t.sent().message,null==P||P(),o("password",{type:"server",message:e}),k.error(e),[3,4];case 4:return[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){b(i,r,o,a,s,"next",e)}function s(e){b(i,r,o,a,s,"throw",e)}a(void 0)})})()},formClassName:"flex flex-col gap-4",children:[(0,r.jsx)(i.l.Item,{isFirstChild:!0,id:"password",name:"password",label:(0,h.t)("otp_challenge_modal.password_state.password_label"),hideDescription:!0,hideBorder:!0,rules:{required:(0,h.t)("otp_challenge_modal.password_state.password_required")},children:(0,r.jsx)(i.l.Input,{type:"password",autoFocus:!0,autoComplete:"current-password",disabled:A})}),(0,r.jsx)(g.$,{type:"submit",variant:"primary",disabled:A,full:!0,extraLarge:!0,children:(0,h.t)("otp_challenge_modal.password_state.sign_in")})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(d.N,{asButton:!0,size:"sm",onClick:C,children:(0,h.t)("otp_challenge_modal.password_state.sign_in_with_code")}),(0,r.jsx)(d.N,{size:"sm",href:R,children:(0,h.t)("otp_challenge_modal.password_state.forgot_password")})]}),(0,r.jsxs)("div",{className:"border-primary flex w-fit items-center gap-1 rounded-md border px-2 py-1",children:[(0,r.jsx)(o.In,{type:"16-lock",size:16,className:"text-tertiary size-4"}),(0,r.jsx)("span",{className:"leading-[18px] tracking-[0.2px]",children:(0,r.jsx)(y.o.LabelXs,{color:"text-tertiary",weight:"font-medium",children:(0,h.t)("otp_challenge_modal.safe_and_secure")})})]})]})]})]})]})}},790604(e,t,n){var r=n(27838),o={discoverSignIn:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.m)("/user/sign_in",void 0===t?{}:t)},discoverSignUp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.m)("/user/sign_up",void 0===t?{}:t)},discoverForgotPassword:function(){return"/user/password"},forgotPassword:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.m)("/users/password/new",void 0===t?{}:t)},emailLookup:function(){return"/auth/email_lookup"},signIn:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.m)("/sign_in",void 0===t?{}:t)},socialSignIn:function(e,t){return"/users/auth/".concat(e,"?community_id=").concat(t)},signUp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params;return(0,r.m)("/sign_up",void 0===t?{}:t)},terms:function(){return"/terms"},privacy_policy:function(){return"/privacy"},resetPassword:function(){return"/users/password"},acceptInvitation:function(){return"/invitation"},resendConfirmation:function(){return"/users/confirmation"},resendConfirmationPage:function(){return"/users/confirmation/new"},optSessions:function(){return"/auth/otp_sessions"},resetPasswordOnOtpLogin:function(){return"/auth/password_reset"},passwordSetup:function(){return"/auth/password_setup"},resendOtp:function(){return"/auth/otp_sessions/resend"},two_fa:{emailOtpVerification:function(){return"/two_fa/email_otp/verify"}},communities:{new:function(){return"/communities/new"},index:function(){return"/communities"},update:function(e){return"/communities/".concat(e)}}};n.d(t,{K:()=>o})},761571(e,t,n){n.d(t,{m:()=>i});var r=n(697890),o=function(e){for(var t=5381,n=0;n<e.length;n++)t=33*t^e.charCodeAt(n);return t>>>0},i=function(){if((0,r.VS)())return!0;var e=window.ANALYTICS_TRACKER_VISITOR;return!!e&&o(e)%100<100}}
1,571865(e,t,n){n.d(t,{e:()=>N});var r=n(391426),o=n(553756),i=n(790604),a=n(51730),s=n(570310),l=n(933578),u=n(258752),c=n(417980),d=n(717526),f=n(263653),m=n(434104),p=n(387099),h=n(797339),g=function(e){var t=e.handleResend,n=e.allowResend,o=e.isLoading,i=e.showSignInWithPassword,a=e.onSignInWithPassword,s=e.onSkip;return(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[n?(0,r.jsx)(m.N,{asButton:!0,size:"sm",onClick:t,disabled:o,children:(0,c.t)("otp_challenge_modal.resend_code")}):(0,r.jsx)(m.N,{href:(0,c.t)("otp_challenge_modal.experiencing_issues.link"),target:"_blank",rel:"noopener noreferrer",size:"sm","aria-label":(0,c.t)("otp_challenge_modal.experiencing_issues.link_aria_label"),children:(0,c.t)("otp_challenge_modal.experiencing_issues.link_text")}),void 0!==i&&i&&(0,r.jsx)(m.N,{asButton:!0,size:"sm",onClick:a,children:(0,c.t)("otp_challenge_modal.sign_in_with_password")})]}),s&&(0,r.jsx)(p.$,{variant:"secondary",type:"button",onClick:s,children:(0,c.t)("otp_challenge_modal.skip")})]}),(0,r.jsx)(h.V,{})]})};g.displayName="OtpFooter";var v=n(788289),y=n(257957),b=n(568316),w=function(e){var t=e.className;return(0,r.jsxs)("div",{className:(0,s.x)("flex flex-col items-center justify-center",t),children:[(0,r.jsx)(y.a,{className:"!p-0 mb-2"}),(0,r.jsx)(b.o.BodySm,{children:(0,c.t)("otp_challenge_modal.loading")})]})};w.displayName="OtpLoading";var _=function(e){var t=e.email,n=e.showTitle,o=e.showSecureAccountCopy,i=void 0!==o&&o;return(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[n&&(0,r.jsx)(b.o.BodySm,{weight:"font-bold",children:i?(0,c.t)("otp_challenge_modal.enter_verification_code"):(0,c.t)("otp_challenge_modal.verification_required")}),(0,r.jsxs)(b.o.BodySm,{children:[(0,c.t)("otp_challenge_modal.enter_code_sent_to"),"\xa0",t&&(0,r.jsx)(b.o.LabelSm,{as:"span",weight:"medium",children:t}),i&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,c.t)("otp_challenge_modal.enter_code_sent_to_secure_suffix")]})]})]})};_.displayName="OtpSubheader";var C=n(817582),x=n(761571),j=n(852362),S=function(){var e=(0,j.X)().trackEvent,t=(0,x.m)(),n=(0,o.h)().currentCommunity,r=!!(null==n?void 0:n.growth_otp_first_member_auth_enabled),i=(0,l.useRef)(!1),a=(0,l.useCallback)(function(){!t||i.current||(i.current=!0,e("otp_challenge.viewed",{is_otp_first_community_auth:r},{batch:!1}))},[t,e,r]),s=(0,l.useRef)(a);return s.current=a,(0,l.useEffect)(function(){s.current()},[]),{trackCodeSubmitted:(0,l.useCallback)(function(){t&&e("otp_challenge.code_submitted",{is_otp_first_community_auth:r},{batch:!1})},[t,e,r]),trackSucceeded:(0,l.useCallback)(function(){t&&e("otp_challenge.succeeded",{is_otp_first_community_auth:r},{batch:!1})},[t,e,r]),trackFailed:(0,l.useCallback)(function(){t&&e("otp_challenge.failed",{is_otp_first_community_auth:r},{batch:!1})},[t,e,r]),trackResendClicked:(0,l.useCallback)(function(){t&&e("otp_challenge.resend_clicked",{is_otp_first_community_auth:r},{batch:!1})},[t,e,r]),trackSignInWithPasswordClicked:(0,l.useCallback)(function(){t&&e("otp_challenge.sign_in_with_password_clicked",{is_otp_first_community_auth:r},{batch:!1})},[t,e,r]),trackSkipClicked:(0,l.useCallback)(function(){t&&e("otp_challenge.skip_clicked",{is_otp_first_community_auth:r},{batch:!1})},[t,e,r])}};function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=function(e){var t=e.email,n=e.onCancel,m=e.onSubmit,p=e.isLoading,h=void 0!==p&&p,y=e.error,b=e.showTitle,x=e.showHeader,j=e.showSubheaderTitle,P=e.showSignInWithPassword,N=e.onSignInWithPassword,I=e.onSkip,E=e.onResendSuccess,A=e.onResendError,R=e.includeBorder,T=e.community,L=e.className,V=e.useEntryFlowBranding,B=(0,d.d)(),F=(0,o.h)().currentCommunity,W=(void 0===T?null:T)||F,M=void 0!==V&&V&&!!(null==W?void 0:W.growth_otp_first_member_auth_enabled),Z=M?(0,c.t)("authentication_app.signup.title.welcome_community",{community_name:null==W?void 0:W.name}):void 0,D=M?(0,c.t)("authentication_app.signup.subtitle_otp_first"):void 0,z=k((0,l.useState)(!1),2),H=z[0],U=z[1],K=k((0,l.useState)(0),2),G=K[0],$=K[1],Y=S(),J=Y.trackCodeSubmitted,X=Y.trackSucceeded,q=Y.trackFailed,Q=Y.trackResendClicked,ee=Y.trackSignInWithPasswordClicked,et=Y.trackSkipClicked,en=(0,u.n_)({mutationFn:function(e){return $(G+1),(0,a.oK)(i.K.resendOtp(),e)},onSuccess:function(e){E?E(null==e?void 0:e.message):B.success(null==e?void 0:e.message)},onError:function(e){var t,n=(null==(t=e.body)?void 0:t.error)||e.message||(0,c.t)("otp_challenge_modal.resend_failed");A?A(n):B.error(n)}}),er=en.isPending,eo=H||h||er,ei=H||h;return(0,r.jsxs)("div",{className:(0,s.x)("flex h-full flex-col items-center justify-center",L),children:[(void 0===b||b)&&(0,r.jsx)(C.s,{currentCommunity:W,title:Z,subtitle:D}),(0,r.jsxs)("div",{className:(0,s.x)("text-primary","w-full rounded-lg p-6 sm:w-[468px]",void 0===R||R?"border border-primary":""),children:[(void 0===x||x)&&(0,r.jsx)(v.T,{email:t,onCancel:n,isDisabled:eo}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(_,{email:t,showTitle:void 0!==j&&j||M,showSecureAccountCopy:M}),(0,r.jsx)(f.w,{onComplete:function(e){var t;return(t=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var u=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:U(!0),J(),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,m(e)];case 2:return t.sent(),X(),[3,5];case 3:return t.sent(),q(),[3,5];case 4:return U(!1),[7];case 5:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){O(i,r,o,a,s,"next",e)}function s(e){O(i,r,o,a,s,"throw",e)}a(void 0)})})()},disabled:eo,error:!!y,className:"mx-auto max-w-md"}),ei?(0,r.jsx)(w,{}):(0,r.jsx)(g,{handleResend:function(){t&&(Q(),en.mutate({user:{email:t}}))},allowResend:G<1,isLoading:er,showSignInWithPassword:void 0!==P&&P,onSignInWithPassword:N?function(){ee(),N()}:void 0,onSkip:I?function(){et(),I()}:void 0})]})]})]})};N.displayName="OtpChallengeContent"},788289(e,t,n){var r=n(391426),o=n(973646),i=n(568316),a=n(417980),s=function(e){var t=e.email,n=e.isDisabled,s=e.onCancel;return t?(0,r.jsxs)("div",{className:"bg-tertiary -mx-6 -mt-6 mb-4 flex h-12 items-center justify-between rounded-t-lg px-6",children:[(0,r.jsx)(i.o.BodySm,{children:t}),(0,r.jsx)("button",{type:"button",className:"cursor-pointer text-secondary transition-colors hover:text-primary",onClick:s,disabled:n,"aria-label":(0,a.t)("otp_challenge_modal.cancel"),tabIndex:-1,
1children:(0,r.jsx)(o.In,{type:"20-close",size:20,className:"size-5"})})]}):null};s.displayName="OtpHeader",n.d(t,{T:()=>s})},797339(e,t,n){var r=n(391426),o=n(653346),i=n(417980),a=n(674251),s=function(){return(0,r.jsxs)("div",{className:"border-primary flex w-fit items-center gap-1 rounded-md border px-2 py-1",children:[(0,r.jsx)(o.t,{name:"lock",size:"sm",color:"tertiary"}),(0,r.jsx)("span",{className:"leading-[18px] tracking-[0.2px]",children:(0,r.jsx)(a.o.LabelXs,{color:"text-tertiary",weight:"font-medium",children:(0,i.t)("otp_challenge_modal.safe_and_secure")})})]})};s.displayName="OtpSecurityBadge",n.d(t,{V:()=>s})},817582(e,t,n){var r=n(391426),o=n(568316),i=n(417980),a=n(666836),s=function(e){var t=e.currentCommunity,n=e.title,s=e.subtitle;return(0,r.jsxs)("div",{className:"flex flex-col space-y-1.5 p-6 pb-8 pt-0 text-center",children:[(0,r.jsx)("div",{className:"mb-2 flex justify-center",children:(0,r.jsx)(a.f,{community:t,withCircleBranding:!t,displayCommunityName:!1})}),(0,r.jsx)("div",{className:"mb-1 font-semibold tracking-tight",style:{letterSpacing:"0.01em"},children:(0,r.jsx)(o.o.TitleLg,{children:null!=n?n:(0,i.t)("otp_challenge_modal.new.title")})}),(0,r.jsx)(o.o.BodyMd,{color:"text-tertiary",children:null!=s?s:(0,i.t)("otp_challenge_modal.new.subtitle")})]})};n.d(t,{s:()=>s})},865494(e,t,n){var r=n(933578),o=n(717526),i=function(e){var t=e.alert,n=e.notice,i=(0,o.d)(),a=i.success,s=i.error;return(0,r.useEffect)(function(){t&&s(t),n&&a(n)},[]),null};n.d(t,{c:()=>i})},859792(e,t,n){n.d(t,{E:()=>C,L:()=>b});var r=n(391426),o=n(590179),i=n(571865),a=n(737225),s=function(e){var t=e.isOpen,n=e.variant,s=e.email,l=e.onSubmit,u=e.onCancel,c=e.isLoading,d=e.error,f=e.showSignInWithPassword,m=e.onSignInWithPassword,p=e.isPasswordStep,h=e.onShowOtpForm,g="modal-fullscreen"===n;return(0,r.jsxs)(a.aF,{shouldShowCloseButton:!0,isOpen:t,className:"!z-[2000]",children:[(0,r.jsx)(a.aF.Overlay,{}),(0,r.jsx)(a.aF.Content,{size:g?"screen":"auto",className:g?"":"!h-auto !w-auto !rounded-lg",children:(0,r.jsx)(a.aF.Body,{className:g?"":"!p-0",children:void 0!==p&&p&&s?(0,r.jsx)(o.V,{email:s,onShowOtpForm:null!=h?h:function(){},onCancel:u}):(0,r.jsx)(i.e,{email:s,isLoading:c,error:d,onCancel:u,onSubmit:l,showTitle:g,showSubheaderTitle:!g,includeBorder:g,showSignInWithPassword:void 0!==f&&f,onSignInWithPassword:m})})})]})};s.displayName="OtpChallengeModal";var l=n(546079),u=n(417980),c=n(717526),d=function(e){var t=e.isOpen,n=e.variant,a=e.email,s=e.onSubmit,d=e.onCancel,f=e.isLoading,m=e.error,p=e.showSignInWithPassword,h=e.onSignInWithPassword,g=e.isPasswordStep,v=void 0!==g&&g,y=e.onShowOtpForm,b=(0,c.d)();return(0,r.jsx)(l.a.Root,{open:t,onOpenChange:function(e){return!e&&!f&&d()},size:"modal-fullscreen"===n?"full-screen":"md",children:(0,r.jsxs)(l.a.Content,{children:[!v&&a&&(0,r.jsx)(l.a.Header,{title:a,showCloseButton:!0}),(0,r.jsx)(l.a.Body,{children:v&&a?(0,r.jsx)(o.V,{email:a,onShowOtpForm:null!=y?y:function(){},onCancel:d}):(0,r.jsx)(i.e,{email:a,isLoading:f,error:m,onCancel:d,onSubmit:s,onResendSuccess:function(e){return b.success(e)},onResendError:function(e){return b.error(e||(0,u.t)("otp_challenge_modal.resend_failed"))},showTitle:!1,showHeader:!1,showSubheaderTitle:!0,includeBorder:!1,showSignInWithPassword:void 0!==p&&p,onSignInWithPassword:h})})]})})};d.displayName="OtpChallengeModalCompass";var f=n(355104),m=n(933578);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){n(e);return}s.done?t(l):Promise.resolve(l).then(r,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v="password",y=(0,m.createContext)(null);y.displayName="OtpChallengeContext";var b=function(){var e=(0,m.useContext)(y);if(!e)throw Error("OtpChallengeProvider is missing");return e},w=function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e,t)},_={isOpen:!1,isLoading:!1,error:null,failedAttempts:0},C=function(e){var t=e.children,n=(0,c.d)(),a=(0,f.c)().isCircleV4,l=g((0,m.useReducer)(w,_),2),p=l[0],b=l[1],C=(0,m.useRef)(null),x=g((0,m.useState)(),2),j=x[0],S=x[1],P=g((0,m.useState)("modal"),2),O=P[0],k=P[1],N=g((0,m.useState)(!1),2),I=N[0],E=N[1],A=g((0,m.useState)("otp"),2),R=A[0],T=A[1],L="embedded"===O&&p.isOpen,V="embedded"!==O,B=(0,m.useCallback)(function(){b(_),C.current=null,T("otp")},[]),F=(0,m.useCallback)(function(){var e=C.current;e&&e.reject(Error((0,u.t)("otp_challenge_modal.cancelled"),{cause:{otpChallengeCancelled:!0}})),B()},[B]),W=(0,m.useCallback)(function(e){return new Promise(function(t,n){C.current={retryWithOtp:function(t){return e(t)},resolve:function(e){return t(e)},reject:n},b({isOpen:!0})})},[]),M=(0,m.useCallback)(function(e){var t;return(t=function(){var t,r,o,i,a,s;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),s=Object.defineProperty;return s(a,"next",{value:l(0)}),s(a,"throw",{value:l(1)}),s(a,"return",{value:l(2)}),"function"==typeof Symbol&&s(a,Symbol.iterator,{value:function(){return this}}),a;function l(s){return function(l){var u=[s,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:if(!(t=C.current))return[2];b({isLoading:!0,error:null}),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,t.retryWithOtp(e.trim())];case 2:return r=l.sent(),t.resolve(r),[3,4];case 3:return(null==(a=(o=l.sent()).cause)||null==(i=a.errorDetails)?void 0:i.otp_challenge_validation_failed)?(b({isLoading:!1,error:!0,failedAttempts:s=p.failedAttempts+1}),n.error(String(o.message)),s>=3&&F()):(t.reject(o),B()),[3,4];case 4:return[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(e){h(i,r,o,a,s,"next",e)}function s(e){h(i,r,o,a,s,"throw",e)}a(void 0)})})()},[B,p.failedAttempts,n]),Z=(0,m.useMemo)(function(){return{runMutationWithOtp:W,setEmail:S,setVariant:k,setShowSignInWithPassword:E,close:B}},[W,S,k,E,B]);return(0,r.jsxs)(y.Provider,{value:Z,children:[!L&&t,L&&(R===v&&j?(0,r.jsx)(o.V,{email:j,onShowOtpForm:function(){return T("otp")},onCancel:F,className:"min-h-screen bg-primary px-4 sm:px-8"}):(0,r.jsx)(i.e,{email:j,onSubmit:M,onCancel:F,isLoading:p.isLoading,error:p.error,className:"min-h-screen bg-primary px-4 sm:px-8",showSignInWithPassword:I,onSignInWithPassword:function(){return T(v)},useEntryFlowBranding:!0})),V&&(a?(0,r.jsx)(d,{isOpen:p.isOpen,variant:O,email:j,onSubmit:M,onCancel:F,isLoading:p.isLoading,error:p.error,showSignInWithPassword:I,onSignInWithPassword:function(){return T(v)},isPasswordStep:R===v,onShowOtpForm:function(){return T("otp")}}):(0,r.jsx)(s,{isOpen:p.isOpen,variant:O,email:j,onSubmit:M,onCancel:F,isLoading:p.isLoading,error:p.error,showSignInWithPassword:I,onSignInWithPassword:function(){return T(v)},isPasswordStep:R===v,onShowOtpForm:function(){return T("otp")}}
1))]})}},697890(e,t,n){var r=Object.freeze({PRODUCTION:"production",DEVELOPMENT:"development",STAGING:"staging"}),o=function(){return window.RAILS_ENV===r.PRODUCTION},i=function(){return window.RAILS_ENV===r.STAGING},a=function(){return window.RAILS_ENV===r.DEVELOPMENT};n.d(t,{R6:()=>o,VS:()=>a,xg:()=>i})},852362(e,t,n){n.d(t,{X:()=>l});var r=n(553756),o=n(230763),i=n(933578),a=n(29297),s=function(e,t){var n,r;return{community:e?{id:e.id,slug:e.slug,name:e.name,is_on_trial:e.is_on_trial,owner_id:e.owner_id,is_private:e.is_private,is_expired_trial:e.is_expired_trial,trial_ends_at:e.trial_ends_at,locale:e.locale,created_at:e.created_at,current_plan_interval:e.current_plan_interval,current_plan_name:e.current_plan_name,current_plan_tier:e.current_plan_tier,current_plan:e.current_plan,plan_status:e.plan_status,default_currency:e.default_currency}:void 0,user:t?{id:t.id,is_admin:t.is_admin,is_moderator:t.is_moderator}:void 0,path:null==(n=window.location)?void 0:n.pathname,user_agent:null==(r=window.navigator)?void 0:r.userAgent}},l=function(){var e=(0,o.Od)(),t=e.currentCommunity,n=e.currentCommunityMember,l=e.experimentation,u=(0,r.h)().currentCommunity||t;return{trackEvent:(0,i.useCallback)(function(e,t,r){var o,i=(o=null==l?void 0:l.flags,{community_id:null==u?void 0:u.id,specific:t,common:s(u,n),context:o});(null==r?void 0:r.batch)?a.l.trackEvent(e,i,r):setTimeout(function(){a.l.trackEvent(e,i,r)},0)},[u,n,l])}}},432471(e,t,n){var r=n(391426),o=n(257957),i=n(933578),a=n(417980);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l=(0,i.createContext)({isReady:!1});l.displayName="I18nContext";var u=function(e){var t,n=e.children,u=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return s(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=u[0],d=u[1];(0,i.useEffect)(function(){(0,a.Zi)().then(function(){return d(!0)})},[]);var f=(0,i.useMemo)(function(){return{isReady:c}},[c]);return c?(0,r.jsx)(l.Provider,{value:f,children:n}):(0,r.jsx)(o.a,{center:!0,variant:"fullscreen"})};n.d(t,{C:()=>u})},145878(e,t,n){var r=(0,n(674274).T)(),o=r.useScopedNavigate,i=(r.useScopedMatchRoute,r.useScopedParams),a=r.useScopedRouteContext;r.ScopedLink,n.d(t,{A_:()=>i,O:()=>a,Zd:()=>o})},452146(e,t,n){var r=n(781952),o=function(e){try{var t=r.A.get(e);return"true"===t}catch(e){return!1}},i=function(){return o("track_event_logging_enabled")},a=function(){return o("price_testing_enabled")};n.d(t,{tc:()=>i,zu:()=>a})}
1,674274(e,t,n){var r=n(519104),o=n(16876),i=n(322249),a=n(1107),s=n(534529),l=function(){return{useScopedNavigate:function(){return(0,r.Z)()},useScopedMatchRoute:o._f,useScopedParams:i.g,useScopedRouteContext:a.s,ScopedLink:s.N_}};n.d(t,{T:()=>l})},47422(e,t,n){var r=n(391426),o=n(118393),i=n(891755),a=n(14655),s=n(177631);function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var u=function(e){return(0,i.a)(l({defaultPreload:"intent",defaultPreloadStaleTime:0,scrollRestoration:!0,scrollToTopSelectors:["#panel","#".concat(o.eL.workspaceBody)],defaultErrorComponent:function(e){var t,n;return(0,r.jsx)(a.w,(t=l({},e),n=n={fullHeight:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},defaultPendingComponent:s.D},e))};n.d(t,{H:()=>u})}}]); 2//# sourceMappingURL=/packs/js/4991-b4233eb4692bb06d.js.map
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.