import { $APP, shadow$provide } from "./shared.js";
const shadow_esm_import = function(x) { return import(x) };
var $app$config$external_notify_register_success$$,$app$main$data$auth$login_from_token$$,$app$main$data$auth$create_demo_profile$$,$app$main$ui$auth$login$create_demo_profile$$,$app$main$ui$static$0$invalid_token$$,$app$main$ui$auth$login$demo_warning_STAR_$$,$app$main$data$auth$show_redirect_error$$,$app$main$ui$auth$register$register_validate_page_STAR_$$,$app$main$ui$auth$register$register_page_STAR_$$,$app$main$ui$auth$login$login_page$$,$app$main$data$profile$recover_profile$$,$app$main$ui$auth$recovery$on_error$$,
$app$main$ui$auth$recovery$on_success$$,$app$main$ui$auth$recovery$on_submit$$,$app$main$ui$auth$recovery$recovery_form$$,$app$main$ui$auth$recovery$recovery_page$$,$app$main$ui$auth$auth_STAR_$$,$app$main$ui$auth$verify_token$verify_token_STAR_$$,$app$main$data$profile$recover_profile_54775$$,$app$main$data$auth$login_from_token_67431$$,$app$main$data$auth$create_demo_profile_67491$$,$app$main$data$auth$show_redirect_error_67494$$,$cljs$cst$6068$iss$$,$cljs$cst$6074$invalid_token$$,$cljs$cst$6069$verify_email$$,
$cljs$cst$6071$auth$$,$cljs$cst$6077$email_already_validated$$,$cljs$cst$6072$team_invitation$$,$cljs$cst$6078$verify_token$$,$cljs$cst$6076$email_already_exists$$,$cljs$cst$6075$token_expired$$,$cljs$cst$6073$redirect_to$$,$cljs$cst$6067$register_validate_page$$;
$app$config$external_notify_register_success$$=function($G__43725_profile_id$$){var $f$jscomp$700$$=$APP.$app$util$object$get$cljs$0core$0IFn$0_invoke$0arity$02$$($APP.$app$util$globals$global$$,"externalNotifyRegisterSuccess");$APP.$cljs$core$fn_QMARK_$$($f$jscomp$700$$)&&($G__43725_profile_id$$=$APP.$cljs$core$str$$.$cljs$core$IFn$_invoke$arity$1$($G__43725_profile_id$$),$f$jscomp$700$$.$cljs$core$IFn$_invoke$arity$1$?$f$jscomp$700$$.$cljs$core$IFn$_invoke$arity$1$($G__43725_profile_id$$):$f$jscomp$700$$($G__43725_profile_id$$))};
$app$main$data$auth$login_from_token$$=function($p__67429$$){var $map__67430__$1$$=$APP.$cljs$core$__destructure_map$$($p__67429$$),$profile$jscomp$18$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($map__67430__$1$$,$APP.$cljs$cst$1899$profile$$);typeof $app$main$data$auth$login_from_token_67431$$==="undefined"&&($app$main$data$auth$login_from_token_67431$$=function($p__67429$jscomp$1$$,$map__67430$jscomp$1$$,$tdata$jscomp$1$$,$profile$jscomp$19$$,$meta67432$$){this.$p__67429$=$p__67429$jscomp$1$$;
this.$map__67430$=$map__67430$jscomp$1$$;this.$tdata$=$tdata$jscomp$1$$;this.profile=$profile$jscomp$19$$;this.$meta67432$=$meta67432$$;this.$cljs$lang$protocol_mask$partition0$$=393216;this.$cljs$lang$protocol_mask$partition1$$=0},$app$main$data$auth$login_from_token_67431$$.prototype.$potok$v2$core$Event$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,$app$main$data$auth$login_from_token_67431$$.prototype.$potok$v2$core$Event$_type$arity$1$=function(){return $APP.$cljs$cst$3904$app_DOT_main_DOT_data_DOT_auth_SLASH_login_from_token$$},
$app$main$data$auth$login_from_token_67431$$.prototype.$cljs$core$IWithMeta$_with_meta$arity$2$=function($_67433$$,$meta67432__$1$$){return new $app$main$data$auth$login_from_token_67431$$(this.$p__67429$,this.$map__67430$,this.$tdata$,this.profile,$meta67432__$1$$)},$app$main$data$auth$login_from_token_67431$$.prototype.$cljs$core$IMeta$_meta$arity$1$=function(){return this.$meta67432$},$app$main$data$auth$login_from_token_67431$$.prototype.$potok$v2$core$WatchEvent$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,
$app$main$data$auth$login_from_token_67431$$.prototype.$potok$v2$core$WatchEvent$watch$arity$3$=function(){return $APP.$beicon$v2$core$observe_on$$($APP.$cljs$cst$2287$async$$,$APP.$beicon$v2$core$map$$(function($profile__$1$jscomp$4$$){return $APP.$app$main$data$auth$logged_in$$($APP.$cljs$core$with_meta$$($profile__$1$jscomp$4$$,new $APP.$cljs$core$PersistentArrayMap$$(null,1,[$APP.$cljs$cst$3897$app_DOT_main_DOT_data_DOT_event_SLASH_source$$,"login-with-token"],null)))},$APP.$app$main$data$profile$on_fetch_profile_success$$(this.profile)))});
return new $app$main$data$auth$login_from_token_67431$$($p__67429$$,$map__67430__$1$$,$map__67430__$1$$,$profile$jscomp$18$$,$APP.$cljs$core$PersistentArrayMap$EMPTY$$)};
$app$main$data$auth$create_demo_profile$$=function(){typeof $app$main$data$auth$create_demo_profile_67491$$==="undefined"&&($app$main$data$auth$create_demo_profile_67491$$=function($meta67492$$){this.$meta67492$=$meta67492$$;this.$cljs$lang$protocol_mask$partition0$$=393216;this.$cljs$lang$protocol_mask$partition1$$=0},$app$main$data$auth$create_demo_profile_67491$$.prototype.$potok$v2$core$Event$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,$app$main$data$auth$create_demo_profile_67491$$.prototype.$potok$v2$core$Event$_type$arity$1$=
function(){return $APP.$cljs$cst$3912$app_DOT_main_DOT_data_DOT_auth_SLASH_create_demo_profile$$},$app$main$data$auth$create_demo_profile_67491$$.prototype.$cljs$core$IWithMeta$_with_meta$arity$2$=function($_67493$$,$meta67492__$1$$){return new $app$main$data$auth$create_demo_profile_67491$$($meta67492__$1$$)},$app$main$data$auth$create_demo_profile_67491$$.prototype.$cljs$core$IMeta$_meta$arity$1$=function(){return this.$meta67492$},$app$main$data$auth$create_demo_profile_67491$$.prototype.$potok$v2$core$WatchEvent$$=
$APP.$cljs$core$PROTOCOL_SENTINEL$$,$app$main$data$auth$create_demo_profile_67491$$.prototype.$potok$v2$core$WatchEvent$watch$arity$3$=function(){return $APP.$beicon$v2$core$map$$($APP.$app$main$data$auth$login$$,$APP.$app$main$repo$cmd_BANG_$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$cst$3913$create_demo_profile$$,$APP.$cljs$core$PersistentArrayMap$EMPTY$$))});return new $app$main$data$auth$create_demo_profile_67491$$($APP.$cljs$core$PersistentArrayMap$EMPTY$$)};
$app$main$ui$auth$login$create_demo_profile$$=function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($app$main$data$auth$create_demo_profile$$())};
$app$main$ui$static$0$invalid_token$$=function(){return $APP.$rumext$v2$jsxs$$($APP.$app$main$ui$static$0$error_container_STAR_$$,{children:[(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_static__main-message",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.invite-invalid")}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_static__desc-message",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.invite-invalid.info")})]})};
$app$main$ui$auth$login$demo_warning_STAR_$$=function(){return $APP.$rumext$v2$jsx$$($APP.$app$main$ui$ds$notifications$context_notification$context_notification_STAR_$$,{level:$APP.$cljs$cst$2300$warning$$,content:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.demo-warning")})};
$app$main$data$auth$show_redirect_error$$=function($error$jscomp$57$$){typeof $app$main$data$auth$show_redirect_error_67494$$==="undefined"&&($app$main$data$auth$show_redirect_error_67494$$=function($error$jscomp$58$$,$meta67495$$){this.error=$error$jscomp$58$$;this.$meta67495$=$meta67495$$;this.$cljs$lang$protocol_mask$partition0$$=393216;this.$cljs$lang$protocol_mask$partition1$$=0},$app$main$data$auth$show_redirect_error_67494$$.prototype.$potok$v2$core$Event$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,
$app$main$data$auth$show_redirect_error_67494$$.prototype.$potok$v2$core$Event$_type$arity$1$=function(){return $APP.$cljs$cst$3914$app_DOT_main_DOT_data_DOT_auth_SLASH_show_redirect_error$$},$app$main$data$auth$show_redirect_error_67494$$.prototype.$cljs$core$IWithMeta$_with_meta$arity$2$=function($_67496$$,$meta67495__$1$$){return new $app$main$data$auth$show_redirect_error_67494$$(this.error,$meta67495__$1$$)},$app$main$data$auth$show_redirect_error_67494$$.prototype.$cljs$core$IMeta$_meta$arity$1$=
function(){return this.$meta67495$},$app$main$data$auth$show_redirect_error_67494$$.prototype.$potok$v2$core$WatchEvent$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,$app$main$data$auth$show_redirect_error_67494$$.prototype.$potok$v2$core$WatchEvent$watch$arity$3$=function(){var $self__$jscomp$4978$$=this,$temp__5825__auto__$jscomp$192$$=function(){switch($self__$jscomp$4978$$.error){case "registration-disabled":return $APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.registration-disabled");
case "profile-blocked":return $APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.profile-blocked");case "auth-provider-not-allowed":return $APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.auth-provider-not-allowed");case "email-domain-not-allowed":return $APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.email-domain-not-allowed");case "unable-to-auth":return null;default:return $APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.generic")}}();
return $APP.$cljs$core$truth_$$($temp__5825__auto__$jscomp$192$$)?(0,$APP.$beicon$v2$core$of$$)($APP.$app$main$data$notifications$warn$cljs$0core$0IFn$0_invoke$0arity$02$$($temp__5825__auto__$jscomp$192$$)):null});return new $app$main$data$auth$show_redirect_error_67494$$($error$jscomp$57$$,$APP.$cljs$core$PersistentArrayMap$EMPTY$$)};
$APP.$app$main$ui$auth$register$register_validate_form_STAR_$$=function($form$jscomp$179_props_73473$$){var $on_submit$jscomp$13_params$jscomp$400$$=$form$jscomp$179_props_73473$$.params,$on_success_callback$jscomp$5$$=$form$jscomp$179_props_73473$$.onSuccessCallback;$form$jscomp$179_props_73473$$=$APP.$app$util$forms$use_form$$.$cljs$core$IFn$_invoke$arity$4$?$APP.$app$util$forms$use_form$$.$cljs$core$IFn$_invoke$arity$4$($APP.$cljs$cst$296$schema$$,$APP.$app$main$ui$auth$register$schema_COLON_register_validate_form$$,
$APP.$cljs$cst$4857$initial$$,$on_submit$jscomp$13_params$jscomp$400$$):$APP.$app$util$forms$use_form$$($APP.$cljs$cst$296$schema$$,$APP.$app$main$ui$auth$register$schema_COLON_register_validate_form$$,$APP.$cljs$cst$4857$initial$$,$on_submit$jscomp$13_params$jscomp$400$$);var $submitted_QMARK_$jscomp$1$$=$APP.$rumext$v2$use_state$cljs$0core$0IFn$0_invoke$0arity$01$$(!1),$on_success$jscomp$55$$=$APP.$rumext$v2$use_fn$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$rumext$v2$adapt$$($on_success_callback$jscomp$5$$)],
function($G__73478_params__$1$jscomp$55_token$jscomp$108$$){$app$config$external_notify_register_success$$($APP.$cljs$cst$266$id$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$));if($APP.$cljs$core$fn_QMARK_$$($on_success_callback$jscomp$5$$))return $G__73478_params__$1$jscomp$55_token$jscomp$108$$=$APP.$cljs$cst$3176$email$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$),$on_success_callback$jscomp$5$$.$cljs$core$IFn$_invoke$arity$1$?
$on_success_callback$jscomp$5$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$):$on_success_callback$jscomp$5$$($G__73478_params__$1$jscomp$55_token$jscomp$108$$);if($APP.$cljs$cst$1132$invitation_token$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$)!=null)return $G__73478_params__$1$jscomp$55_token$jscomp$108$$=$APP.$cljs$cst$1132$invitation_token$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$),
$APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$02$$($APP.$cljs$cst$3279$auth_verify_token$$,new $APP.$cljs$core$PersistentArrayMap$$(null,1,[$APP.$cljs$cst$1134$token$$,$G__73478_params__$1$jscomp$55_token$jscomp$108$$],null)));if($APP.$cljs$core$truth_$$($APP.$cljs$cst$3290$is_active$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$)))return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$auth$login_from_register$$());
$APP.$cljs$core$swap_BANG_$$.$cljs$core$IFn$_invoke$arity$4$($APP.$app$util$storage$user$$,$APP.$cljs$core$assoc$$,$APP.$cljs$cst$5136$app_DOT_main_DOT_ui_DOT_auth_DOT_register_SLASH_email$$,$APP.$cljs$cst$3176$email$$.$cljs$core$IFn$_invoke$arity$1$($G__73478_params__$1$jscomp$55_token$jscomp$108$$));return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$cst$5137$auth_register_success$$))}),$on_error$jscomp$69$$=
$APP.$rumext$v2$use_fn$cljs$0core$0IFn$0_invoke$0arity$01$$(function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$error$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.generic")))});$on_submit$jscomp$13_params$jscomp$400$$=$APP.$rumext$v2$use_fn$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$rumext$v2$adapt$$($on_success$jscomp$55$$),$APP.$rumext$v2$adapt$$($on_error$jscomp$69$$)],function($form__$1$jscomp$19$$){$APP.$cljs$core$reset_BANG_$$($submitted_QMARK_$jscomp$1$$,
!0);var $create_welcome_file_QMARK_$jscomp$1$$=$APP.$app$config$external_feature_flag$$(),$params__$1$jscomp$56$$=function(){var $G__73480$$=$APP.$cljs$cst$4855$clean_data$$.$cljs$core$IFn$_invoke$arity$1$($APP.$cljs$core$_deref$$($form__$1$jscomp$19$$));return $APP.$cljs$core$truth_$$($create_welcome_file_QMARK_$jscomp$1$$)?$APP.$cljs$core$assoc$$.$cljs$core$IFn$_invoke$arity$3$($G__73480$$,$APP.$cljs$cst$5139$create_welcome_file$$,!0):$G__73480$$}();return $APP.$beicon$v2$core$subs_BANG_$cljs$0core$0IFn$0_invoke$0arity$03$$($on_success$jscomp$55$$,
$on_error$jscomp$69$$,$APP.$beicon$v2$core$finalize$$(function(){return $APP.$cljs$core$reset_BANG_$$($submitted_QMARK_$jscomp$1$$,!1)},$APP.$app$main$repo$cmd_BANG_$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$cst$5138$register_profile$$,$params__$1$jscomp$56$$)))});return $APP.$rumext$v2$jsxs$$($APP.$app$main$ui$components$forms$form$$,{"on-submit":$on_submit$jscomp$13_params$jscomp$400$$,form:$form$jscomp$179_props_73473$$,"class":"main_ui_auth_register__register-validate-form",children:[(0,$APP.$rumext$v2$jsx$$)("div",
{className:"main_ui_auth_register__fields-row",children:$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$forms$input$$,{name:$APP.$cljs$cst$1349$fullname$$,label:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.fullname"),type:"text","show-success?":!0,"class":"main_ui_auth_register__form-field"})}),$APP.$cljs$core$contains_QMARK_$$($APP.$app$config$flags$$,$APP.$cljs$cst$1224$terms_and_privacy_checkbox$$)?$APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$register$terms_and_privacy_STAR_$$,
{}):null,$APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$register$newsletter_options_STAR_$$,{}),$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$forms$submit_button_STAR_$$,{label:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.register-submit"),disabled:$APP.$cljs$core$_deref$$($submitted_QMARK_$jscomp$1$$),className:"main_ui_auth_register__register-btn"})]})};
$app$main$ui$auth$register$register_validate_page_STAR_$$=function($params$jscomp$401_props_73485$$){$params$jscomp$401_props_73485$$=$params$jscomp$401_props_73485$$.params;return(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_register__auth-form-wrapper main_ui_auth_register__register-form",children:[(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_register__auth-title-wrapper",children:[(0,$APP.$rumext$v2$jsx$$)("h2",{"data-testid":"register-title",className:"main_ui_auth_register__auth-title",
children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.register-account-title")}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_register__auth-subtitle",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.register-account-tagline")})]}),$APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$register$register_validate_form_STAR_$$,{params:$params$jscomp$401_props_73485$$}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_register__links",children:(0,$APP.$rumext$v2$jsx$$)("div",
{className:"main_ui_auth_register__go-back",children:$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$link$link$$,{action:function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$navigate$$($APP.$cljs$cst$5127$auth_register$$,$APP.$cljs$core$PersistentArrayMap$EMPTY$$))},"class":"main_ui_auth_register__go-back-link",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("labels.go-back")})})})]})};
$app$main$ui$auth$register$register_page_STAR_$$=function($props_73451$$){var $params$jscomp$398$$=$props_73451$$.params;return(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_register__auth-form-wrapper main_ui_auth_register__register-form",children:[(0,$APP.$rumext$v2$jsx$$)("h1",{"data-testid":"registration-title",className:"main_ui_auth_register__auth-title",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.register-title")}),$APP.$cljs$core$contains_QMARK_$$($APP.$app$config$flags$$,
$APP.$cljs$cst$1185$demo_warning$$)?(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$login$demo_warning_STAR_$$,{}):null,$APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$register$register_methods_STAR_$$,{params:$params$jscomp$398$$}),(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_register__links",children:[(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_register__account",children:[(0,$APP.$rumext$v2$jsxs$$)("span",{className:"main_ui_auth_register__account-text",children:[$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.already-have-account"),
" "]}),$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$link$link$$,{action:function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$navigate$$($APP.$cljs$cst$3907$auth_login$$,$params$jscomp$398$$))},"class":"main_ui_auth_register__account-link","data-testid":"login-here-link",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.login-here")})]}),$APP.$cljs$core$contains_QMARK_$$($APP.$app$config$flags$$,$APP.$cljs$cst$1201$demo_users$$)?
(0,$APP.$rumext$v2$jsxs$$)($APP.$rumext$v2$Fragment$$,{children:[(0,$APP.$rumext$v2$jsx$$)("hr",{className:"main_ui_auth_register__separator"}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_register__demo-account",children:$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$link$link$$,{action:$app$main$ui$auth$login$create_demo_profile$$,"class":"main_ui_auth_register__demo-account-link",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.create-demo-account")})})]}):
null]})]})};
$app$main$ui$auth$login$login_page$$=function($go_register_map__73393_map__73393__$1_props_73392$$){$go_register_map__73393_map__73393__$1_props_73392$$=$APP.$rumext$v2$util$wrap_props$$($go_register_map__73393_map__73393__$1_props_73392$$);$go_register_map__73393_map__73393__$1_props_73392$$=$APP.$cljs$core$__destructure_map$$($go_register_map__73393_map__73393__$1_props_73392$$);var $params$jscomp$393$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($go_register_map__73393_map__73393__$1_props_73392$$,$APP.$cljs$cst$1419$params$$);
$go_register_map__73393_map__73393__$1_props_73392$$=$APP.$rumext$v2$use_fn$cljs$0core$0IFn$0_invoke$0arity$01$$(function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$navigate$$($APP.$cljs$cst$5127$auth_register$$,$params$jscomp$393$$))});return(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_login__auth-form-wrapper",children:[(0,$APP.$rumext$v2$jsx$$)("h1",{"data-testid":"login-title",className:"main_ui_auth_login__auth-title",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.login-account-title")}),
(0,$APP.$rumext$v2$jsx$$)("p",{className:"main_ui_auth_login__auth-tagline",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.login-tagline")}),$APP.$cljs$core$contains_QMARK_$$($APP.$app$config$flags$$,$APP.$cljs$cst$1185$demo_warning$$)?(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$login$demo_warning_STAR_$$,{}):null,$APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$login$login_dialog_STAR_$$,{params:$params$jscomp$393$$}),(0,$APP.$rumext$v2$jsx$$)("hr",{className:"main_ui_auth_login__separator"}),
(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_login__links",children:$APP.$cljs$core$contains_QMARK_$$($APP.$app$config$flags$$,$APP.$cljs$cst$1176$registration$$)?(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_login__register",children:[(0,$APP.$rumext$v2$jsxs$$)("span",{className:"main_ui_auth_login__register-text",children:[$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.register")," "]}),$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$link$link$$,{action:$go_register_map__73393_map__73393__$1_props_73392$$,
"class":"main_ui_auth_login__register-link","data-testid":"register-submit",children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.register-submit")})]}):null})]})};
$app$main$data$profile$recover_profile$$=function($data$jscomp$285_data__$1$jscomp$13$$){$data$jscomp$285_data__$1$jscomp$13$$=(0,$APP.$app$main$data$profile$check_recover_profile$$)($data$jscomp$285_data__$1$jscomp$13$$);typeof $app$main$data$profile$recover_profile_54775$$==="undefined"&&($app$main$data$profile$recover_profile_54775$$=function($data$jscomp$286$$,$meta54776$$){this.data=$data$jscomp$286$$;this.$meta54776$=$meta54776$$;this.$cljs$lang$protocol_mask$partition0$$=393216;this.$cljs$lang$protocol_mask$partition1$$=
0},$app$main$data$profile$recover_profile_54775$$.prototype.$potok$v2$core$Event$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,$app$main$data$profile$recover_profile_54775$$.prototype.$potok$v2$core$Event$_type$arity$1$=function(){return $APP.$cljs$cst$3223$app_DOT_main_DOT_data_DOT_profile_SLASH_recover_profile$$},$app$main$data$profile$recover_profile_54775$$.prototype.$cljs$core$IWithMeta$_with_meta$arity$2$=function($_54777$$,$meta54776__$1$$){return new $app$main$data$profile$recover_profile_54775$$(this.data,
$meta54776__$1$$)},$app$main$data$profile$recover_profile_54775$$.prototype.$cljs$core$IMeta$_meta$arity$1$=function(){return this.$meta54776$},$app$main$data$profile$recover_profile_54775$$.prototype.$potok$v2$core$WatchEvent$$=$APP.$cljs$core$PROTOCOL_SENTINEL$$,$app$main$data$profile$recover_profile_54775$$.prototype.$potok$v2$core$WatchEvent$watch$arity$3$=function(){var $map__54781_on_error$jscomp$12$$=$APP.$cljs$core$meta$$(this.data),$map__54781__$1_on_success$jscomp$7$$=$APP.$cljs$core$__destructure_map$$($map__54781_on_error$jscomp$12$$);
$map__54781_on_error$jscomp$12$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$3$($map__54781__$1_on_success$jscomp$7$$,$APP.$cljs$cst$1281$on_error$$,$APP.$beicon$v2$core$throw$0$$);$map__54781__$1_on_success$jscomp$7$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$3$($map__54781__$1_on_success$jscomp$7$$,$APP.$cljs$cst$2445$on_success$$,$APP.$cljs$core$identity$$);return $APP.$beicon$v2$core$catch$0$cljs$0core$0IFn$0_invoke$0arity$02$$($map__54781_on_error$jscomp$12$$,$APP.$beicon$v2$core$tap$cljs$0core$0IFn$0_invoke$0arity$02$$($map__54781__$1_on_success$jscomp$7$$,
$APP.$app$main$repo$cmd_BANG_$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$cst$3224$recover_profile$$,this.data)))});return new $app$main$data$profile$recover_profile_54775$$($data$jscomp$285_data__$1$jscomp$13$$,$APP.$cljs$core$PersistentArrayMap$EMPTY$$)};$app$main$ui$auth$recovery$on_error$$=function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$error$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.invalid-recovery-token")))};
$app$main$ui$auth$recovery$on_success$$=function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$variadic$($APP.$app$main$data$notifications$info$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.notifications.password-changed-successfully")),$APP.$cljs$core$prim_seq$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$cst$3907$auth_login$$)]))};
$app$main$ui$auth$recovery$on_submit$$=function($form$jscomp$203_params$jscomp$434$$){var $mdata$jscomp$27$$=new $APP.$cljs$core$PersistentArrayMap$$(null,2,[$APP.$cljs$cst$1281$on_error$$,$app$main$ui$auth$recovery$on_error$$,$APP.$cljs$cst$2445$on_success$$,$app$main$ui$auth$recovery$on_success$$],null);$form$jscomp$203_params$jscomp$434$$=new $APP.$cljs$core$PersistentArrayMap$$(null,2,[$APP.$cljs$cst$1134$token$$,$APP.$cljs$core$get_in$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$core$_deref$$($form$jscomp$203_params$jscomp$434$$),
new $APP.$cljs$core$PersistentVector$$(null,2,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$4855$clean_data$$,$APP.$cljs$cst$1134$token$$],null)),$APP.$cljs$cst$749$password$$,$APP.$cljs$core$get_in$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$core$_deref$$($form$jscomp$203_params$jscomp$434$$),new $APP.$cljs$core$PersistentVector$$(null,2,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$4855$clean_data$$,$APP.$cljs$cst$3196$password_2$$],null))],null);return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($app$main$data$profile$recover_profile$$($APP.$cljs$core$with_meta$$($form$jscomp$203_params$jscomp$434$$,
$mdata$jscomp$27$$)))};
$app$main$ui$auth$recovery$recovery_form$$=function($form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$){$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$=$APP.$rumext$v2$util$wrap_props$$($form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$);$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$=$APP.$cljs$core$__destructure_map$$($form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$);$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$=
$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$,$APP.$cljs$cst$1419$params$$);$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$=$APP.$app$util$forms$use_form$$.$cljs$core$IFn$_invoke$arity$4$?$APP.$app$util$forms$use_form$$.$cljs$core$IFn$_invoke$arity$4$($APP.$cljs$cst$296$schema$$,$app$main$ui$auth$recovery$schema_COLON_recovery_form$$,$APP.$cljs$cst$4857$initial$$,$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$):
$APP.$app$util$forms$use_form$$($APP.$cljs$cst$296$schema$$,$app$main$ui$auth$recovery$schema_COLON_recovery_form$$,$APP.$cljs$cst$4857$initial$$,$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$);return $APP.$rumext$v2$jsxs$$($APP.$app$main$ui$components$forms$form$$,{"on-submit":$app$main$ui$auth$recovery$on_submit$$,"class":"main_ui_auth_recovery__recovery-form",form:$form$jscomp$204_map__80689_map__80689__$1_params$jscomp$435_props_80688$$,children:[(0,$APP.$rumext$v2$jsx$$)("div",
{className:"main_ui_auth_recovery__fields-row",children:$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$forms$input$$,{type:"password",name:$APP.$cljs$cst$3195$password_1$$,"show-success?":!0,label:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.new-password"),"class":"main_ui_auth_recovery__form-field"})}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_recovery__fields-row",children:$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$forms$input$$,{type:"password",name:$APP.$cljs$cst$3196$password_2$$,
"show-success?":!0,label:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.confirm-password"),"class":"main_ui_auth_recovery__form-field"})}),$APP.$rumext$v2$jsx$$($APP.$app$main$ui$components$forms$submit_button_STAR_$$,{label:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.recovery-submit"),className:"main_ui_auth_recovery__submit-btn"})]})};
$app$main$ui$auth$recovery$recovery_page$$=function($map__80691_map__80691__$1_params$jscomp$436_props_80690$$){$map__80691_map__80691__$1_params$jscomp$436_props_80690$$=$APP.$rumext$v2$util$wrap_props$$($map__80691_map__80691__$1_params$jscomp$436_props_80690$$);$map__80691_map__80691__$1_params$jscomp$436_props_80690$$=$APP.$cljs$core$__destructure_map$$($map__80691_map__80691__$1_params$jscomp$436_props_80690$$);$map__80691_map__80691__$1_params$jscomp$436_props_80690$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($map__80691_map__80691__$1_params$jscomp$436_props_80690$$,
$APP.$cljs$cst$1419$params$$);return(0,$APP.$rumext$v2$jsxs$$)("div",{className:"main_ui_auth_recovery__auth-form-wrapper",children:[(0,$APP.$rumext$v2$jsx$$)("h1",{className:"main_ui_auth_recovery__auth-title",children:"Forgot your password?"}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_recovery__auth-subtitle",children:"Please enter your new password"}),(0,$APP.$rumext$v2$jsx$$)("hr",{className:"main_ui_auth_recovery__separator"}),(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$recovery$recovery_form$$,
{params:$map__80691_map__80691__$1_params$jscomp$436_props_80690$$}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_recovery__links",children:(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth_recovery__go-back",children:(0,$APP.$rumext$v2$jsx$$)("a",{onClick:function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$cst$3907$auth_login$$))},className:"main_ui_auth_recovery__go-back-link",
children:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("profile.recovery.go-to-login")})})})]})};
$app$main$ui$auth$auth_STAR_$$=function($props_80752_route$jscomp$21$$){$props_80752_route$jscomp$21$$=$props_80752_route$jscomp$21$$.route;var $section$jscomp$45$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($props_80752_route$jscomp$21$$,$APP.$cljs$cst$142$data$$),$APP.$cljs$cst$723$name$$),$is_register$$=$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($section$jscomp$45$$,$APP.$cljs$cst$5127$auth_register$$)||$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($section$jscomp$45$$,
$APP.$cljs$cst$6066$auth_register_validate$$)||$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($section$jscomp$45$$,$cljs$cst$6067$register_validate_page$$)||$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($section$jscomp$45$$,$APP.$cljs$cst$5137$auth_register_success$$),$params$jscomp$437$$=$APP.$cljs$cst$2229$query_params$$.$cljs$core$IFn$_invoke$arity$1$($props_80752_route$jscomp$21$$),$error$jscomp$149$$=$APP.$cljs$cst$847$error$$.$cljs$core$IFn$_invoke$arity$1$($params$jscomp$437$$);
$APP.$rumext$v2$use_effect$cljs$0core$0IFn$0_invoke$0arity$02$$([],function(){return $APP.$app$util$dom$set_html_title$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("title.default"))});$APP.$rumext$v2$use_effect$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$rumext$v2$adapt$$($error$jscomp$149$$)],function(){return $APP.$cljs$core$truth_$$($error$jscomp$149$$)?$APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($app$main$data$auth$show_redirect_error$$($error$jscomp$149$$)):
null});return(0,$APP.$rumext$v2$jsxs$$)("main",{className:"main_ui_auth__auth-section "+($is_register$$?"main_ui_auth__register":""),children:[(0,$APP.$rumext$v2$jsx$$)("h1",{className:"main_ui_auth__logo-container",children:(0,$APP.$rumext$v2$jsx$$)("a",{href:"#/",title:"Penpot",className:"main_ui_auth__logo-btn",children:$APP.$app$main$ui$icons$logo$$})}),(0,$APP.$rumext$v2$jsx$$)("div",{className:"main_ui_auth__login-illustration",children:(0,$APP.$rumext$v2$jsx$$)("img",{src:"images/registration-illustration.png"})}),
(0,$APP.$rumext$v2$jsxs$$)("section",{className:"main_ui_auth__auth-content",children:[function(){var $G__80759__$1$$=$section$jscomp$45$$ instanceof $APP.$cljs$core$Keyword$$?$section$jscomp$45$$.$fqn$:null;switch($G__80759__$1$$){case "auth-register":return(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$register$register_page_STAR_$$,{params:$params$jscomp$437$$});case "auth-register-success":return $APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$register$register_success_page_STAR_$$,{params:$params$jscomp$437$$});
case "auth-register-validate":return(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$register$register_validate_page_STAR_$$,{params:$params$jscomp$437$$});case "auth-login":return(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$login$login_page$$,{params:$params$jscomp$437$$});case "auth-recovery-request":return $APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$recovery_request$recovery_request_page$$,{});case "auth-recovery":return(0,$APP.$rumext$v2$jsx$$)($app$main$ui$auth$recovery$recovery_page$$,{params:$params$jscomp$437$$});
default:throw Error(["No matching clause: ",$APP.$cljs$core$str$$.$cljs$core$IFn$_invoke$arity$1$($G__80759__$1$$)].join(""));}}(),$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($section$jscomp$45$$,$APP.$cljs$cst$5127$auth_register$$)?$APP.$rumext$v2$jsx$$($APP.$app$main$ui$auth$register$terms_register_STAR_$$,{}):null]})]})};$APP.$app$main$ui$auth$auth_page_STAR_$$=function($props_80761$$){return(0,$APP.$rumext$v2$create_element$$)($app$main$ui$auth$auth_STAR_$$,$props_80761$$)};
$app$main$ui$auth$verify_token$verify_token_STAR_$$=function($props_80779$$){var $token$jscomp$194$$=$APP.$cljs$core$get_in$$.$cljs$core$IFn$_invoke$arity$2$($props_80779$$.route,new $APP.$cljs$core$PersistentVector$$(null,2,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$2229$query_params$$,$APP.$cljs$cst$1134$token$$],null)),$bad_token$$=$APP.$rumext$v2$use_state$cljs$0core$0IFn$0_invoke$0arity$01$$(!1);$APP.$rumext$v2$use_effect$cljs$0core$0IFn$0_invoke$0arity$02$$([],function(){$APP.$app$util$dom$set_html_title$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("title.default"));
return $APP.$beicon$v2$core$subs_BANG_$cljs$0core$0IFn$0_invoke$0arity$03$$(function($tdata$jscomp$4$$){return $app$main$ui$auth$verify_token$handle_token$$.$cljs$core$IFn$_invoke$arity$1$($tdata$jscomp$4$$)},function($cause$jscomp$97_map__80784__$1$$){$cause$jscomp$97_map__80784__$1$$=$APP.$cljs$core$__destructure_map$$($APP.$cljs$core$ex_data$$($cause$jscomp$97_map__80784__$1$$));var $type$jscomp$688$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($cause$jscomp$97_map__80784__$1$$,$APP.$cljs$cst$139$type$$),
$code$jscomp$56$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($cause$jscomp$97_map__80784__$1$$,$APP.$cljs$cst$271$code$$);if($APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($APP.$cljs$cst$2211$validation$$,$type$jscomp$688$$)||$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($cljs$cst$6074$invalid_token$$,$code$jscomp$56$$)||$APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($cljs$cst$6075$token_expired$$,$APP.$cljs$cst$982$reason$$.$cljs$core$IFn$_invoke$arity$1$($cause$jscomp$97_map__80784__$1$$)))return $APP.$cljs$core$reset_BANG_$$($bad_token$$,
!0);if($APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($cljs$cst$6076$email_already_exists$$,$code$jscomp$56$$)){var $msg$jscomp$49$$=$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.email-already-exists");$APP.$app$util$timers$schedule$cljs$0core$0IFn$0_invoke$0arity$02$$(100,function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$error$$($msg$jscomp$49$$))})}else $APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($cljs$cst$6077$email_already_validated$$,
$code$jscomp$56$$)?($msg$jscomp$49$$=$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.email-already-validated"),$APP.$app$util$timers$schedule$cljs$0core$0IFn$0_invoke$0arity$02$$(100,function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$warn$cljs$0core$0IFn$0_invoke$0arity$02$$($msg$jscomp$49$$))})):($msg$jscomp$49$$=$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.generic"),$APP.$app$util$timers$schedule$cljs$0core$0IFn$0_invoke$0arity$02$$(100,
function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$error$$($msg$jscomp$49$$))}));return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$cst$3907$auth_login$$))},$APP.$app$main$repo$cmd_BANG_$$.$cljs$core$IFn$_invoke$arity$2$($cljs$cst$6078$verify_token$$,new $APP.$cljs$core$PersistentArrayMap$$(null,1,[$APP.$cljs$cst$1134$token$$,$token$jscomp$194$$],
null)))});return $APP.$cljs$core$truth_$$($APP.$cljs$core$_deref$$($bad_token$$))?(0,$APP.$rumext$v2$jsx$$)($app$main$ui$static$0$invalid_token$$,{}):$APP.$rumext$v2$jsx$$($APP.$app$main$ui$ds$product$loader$loader_STAR_$$,{title:$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("labels.loading"),overlay:!0})};
$APP.$app$main$ui$auth$verify_token$verify_token_page_STAR_$$=function($props_80785$$){return(0,$APP.$rumext$v2$create_element$$)($app$main$ui$auth$verify_token$verify_token_STAR_$$,$props_80785$$)};$cljs$cst$6068$iss$$=new $APP.$cljs$core$Keyword$$(null,"iss","iss",1130086696);$cljs$cst$6074$invalid_token$$=new $APP.$cljs$core$Keyword$$(null,"invalid-token","invalid-token",2042664034);$cljs$cst$6069$verify_email$$=new $APP.$cljs$core$Keyword$$(null,"verify-email","verify-email",464870696);
$cljs$cst$6071$auth$$=new $APP.$cljs$core$Keyword$$(null,"auth","auth",1389754926);$cljs$cst$6077$email_already_validated$$=new $APP.$cljs$core$Keyword$$(null,"email-already-validated","email-already-validated",-1757263672);$cljs$cst$6072$team_invitation$$=new $APP.$cljs$core$Keyword$$(null,"team-invitation","team-invitation",672622666);$cljs$cst$6078$verify_token$$=new $APP.$cljs$core$Keyword$$(null,"verify-token","verify-token",1740891189);
$cljs$cst$6076$email_already_exists$$=new $APP.$cljs$core$Keyword$$(null,"email-already-exists","email-already-exists",-516776612);$cljs$cst$6075$token_expired$$=new $APP.$cljs$core$Keyword$$(null,"token-expired","token-expired",-312857642);$cljs$cst$6073$redirect_to$$=new $APP.$cljs$core$Keyword$$(null,"redirect-to","redirect-to",-1381988340);$cljs$cst$6067$register_validate_page$$=new $APP.$cljs$core$Keyword$$(null,"register-validate-page","register-validate-page",2093054747);var $app$main$ui$auth$recovery$schema_COLON_recovery_form$$=new $APP.$cljs$core$PersistentVector$$(null,3,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$427$and$$,new $APP.$cljs$core$PersistentVector$$(null,5,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$202$map$$,new $APP.$cljs$core$PersistentArrayMap$$(null,1,[$APP.$cljs$cst$937$title$$,"RecoveryForm"],null),new $APP.$cljs$core$PersistentVector$$(null,2,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$1134$token$$,
$APP.$cljs$cst$970$app_DOT_common_DOT_schema_SLASH_text$$],null),new $APP.$cljs$core$PersistentVector$$(null,2,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$3195$password_1$$,$APP.$cljs$cst$971$app_DOT_common_DOT_schema_SLASH_password$$],null),new $APP.$cljs$core$PersistentVector$$(null,2,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$3196$password_2$$,$APP.$cljs$cst$971$app_DOT_common_DOT_schema_SLASH_password$$],null)],null),new $APP.$cljs$core$PersistentVector$$(null,
3,5,$APP.$cljs$core$PersistentVector$EMPTY_NODE$$,[$APP.$cljs$cst$514$fn$$,new $APP.$cljs$core$PersistentArrayMap$$(null,2,[$APP.$cljs$cst$943$error_SLASH_code$$,"errors.password-invalid-confirmation",$APP.$cljs$cst$4410$error_SLASH_field$$,$APP.$cljs$cst$3196$password_2$$],null),function($p__80686_password_1$$){var $map__80687__$1_password_2$$=$APP.$cljs$core$__destructure_map$$($p__80686_password_1$$);$p__80686_password_1$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($map__80687__$1_password_2$$,
$APP.$cljs$cst$3195$password_1$$);$map__80687__$1_password_2$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$2$($map__80687__$1_password_2$$,$APP.$cljs$cst$3196$password_2$$);return $APP.$cljs$core$_EQ_$$.$cljs$core$IFn$_invoke$arity$2$($p__80686_password_1$$,$map__80687__$1_password_2$$)}],null)],null);var $app$main$ui$auth$verify_token$handle_token$$=function(){var $method_table__5622__auto__$jscomp$24$$=$APP.$cljs$core$atom$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$core$PersistentArrayMap$EMPTY$$),$prefer_table__5623__auto__$jscomp$24$$=$APP.$cljs$core$atom$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$core$PersistentArrayMap$EMPTY$$),$method_cache__5624__auto__$jscomp$24$$=$APP.$cljs$core$atom$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$core$PersistentArrayMap$EMPTY$$),$cached_hierarchy__5625__auto__$jscomp$24$$=
$APP.$cljs$core$atom$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$core$PersistentArrayMap$EMPTY$$),$hierarchy__5626__auto__$jscomp$24$$=$APP.$cljs$core$get$$.$cljs$core$IFn$_invoke$arity$3$($APP.$cljs$core$PersistentArrayMap$EMPTY$$,$APP.$cljs$cst$204$hierarchy$$,$APP.$cljs$core$get_global_hierarchy$$.$cljs$core$IFn$_invoke$arity$0$?$APP.$cljs$core$get_global_hierarchy$$.$cljs$core$IFn$_invoke$arity$0$():$APP.$cljs$core$get_global_hierarchy$$());return new $APP.$cljs$core$MultiFn$$($APP.$cljs$core$symbol$$.$cljs$core$IFn$_invoke$arity$2$("app.main.ui.auth.verify-token",
"handle-token"),function($token$jscomp$192$$){return $cljs$cst$6068$iss$$.$cljs$core$IFn$_invoke$arity$1$($token$jscomp$192$$)},$APP.$cljs$cst$205$default$$,$hierarchy__5626__auto__$jscomp$24$$,$method_table__5622__auto__$jscomp$24$$,$prefer_table__5623__auto__$jscomp$24$$,$method_cache__5624__auto__$jscomp$24$$,$cached_hierarchy__5625__auto__$jscomp$24$$)}();
$app$main$ui$auth$verify_token$handle_token$$.$cljs$core$IMultiFn$_add_method$arity$3$(null,$cljs$cst$6069$verify_email$$,function($data$jscomp$496$$){$app$config$external_notify_register_success$$($APP.$cljs$cst$2271$profile_id$$.$cljs$core$IFn$_invoke$arity$1$($data$jscomp$496$$));var $msg$jscomp$47$$=$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("dashboard.notifications.email-verified-successfully");$APP.$app$util$timers$schedule$cljs$0core$0IFn$0_invoke$0arity$02$$(1E3,function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$success$cljs$0core$0IFn$0_invoke$0arity$02$$($msg$jscomp$47$$))});
return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($app$main$data$auth$login_from_token$$($data$jscomp$496$$))});
$app$main$ui$auth$verify_token$handle_token$$.$cljs$core$IMultiFn$_add_method$arity$3$(null,$APP.$cljs$cst$6070$change_email$$,function(){var $msg$jscomp$48$$=$APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("dashboard.notifications.email-changed-successfully");$APP.$app$util$timers$schedule$cljs$0core$0IFn$0_invoke$0arity$02$$(100,function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$data$notifications$success$cljs$0core$0IFn$0_invoke$0arity$02$$($msg$jscomp$48$$))});return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$variadic$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$cst$5119$settings_profile$$),
$APP.$cljs$core$prim_seq$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$app$main$data$profile$refresh_profile$$()]))});$app$main$ui$auth$verify_token$handle_token$$.$cljs$core$IMultiFn$_add_method$arity$3$(null,$cljs$cst$6071$auth$$,function($tdata$jscomp$2$$){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($app$main$data$auth$login_from_token$$($tdata$jscomp$2$$))});
$app$main$ui$auth$verify_token$handle_token$$.$cljs$core$IMultiFn$_add_method$arity$3$(null,$cljs$cst$6072$team_invitation$$,function($route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$){var $G__80778_G__80778__$1_token$jscomp$193$$=$APP.$cljs$cst$767$state$$.$cljs$core$IFn$_invoke$arity$1$($route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$);$G__80778_G__80778__$1_token$jscomp$193$$=$G__80778_G__80778__$1_token$jscomp$193$$ instanceof $APP.$cljs$core$Keyword$$?$G__80778_G__80778__$1_token$jscomp$193$$.$fqn$:
null;switch($G__80778_G__80778__$1_token$jscomp$193$$){case "created":return $route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$=$APP.$cljs$cst$1912$team_id$$.$cljs$core$IFn$_invoke$arity$1$($route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$),$APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$variadic$($APP.$app$main$data$notifications$success$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("auth.notifications.team-invitation-accepted")),
$APP.$cljs$core$prim_seq$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$app$main$data$profile$refresh_profile$$(),$APP.$app$main$data$common$go_to_dashboard_recent$cljs$0core$0IFn$0_invoke$0arity$0variadic$$($APP.$cljs$core$prim_seq$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$cljs$cst$1912$team_id$$,$route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$]))]));case "pending":return $G__80778_G__80778__$1_token$jscomp$193$$=$APP.$cljs$cst$1132$invitation_token$$.$cljs$core$IFn$_invoke$arity$1$($route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$),
$route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$=$cljs$cst$6073$redirect_to$$.$cljs$core$IFn$_invoke$arity$2$($route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$,$APP.$cljs$cst$5127$auth_register$$),$APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$1$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$02$$($route_id$jscomp$1_tdata$jscomp$3_team_id$jscomp$159$$,new $APP.$cljs$core$PersistentArrayMap$$(null,1,[$APP.$cljs$cst$1132$invitation_token$$,$G__80778_G__80778__$1_token$jscomp$193$$],
null)));default:throw Error(["No matching clause: ",$APP.$cljs$core$str$$.$cljs$core$IFn$_invoke$arity$1$($G__80778_G__80778__$1_token$jscomp$193$$)].join(""));}});$app$main$ui$auth$verify_token$handle_token$$.$cljs$core$IMultiFn$_add_method$arity$3$(null,$APP.$cljs$cst$205$default$$,function(){return $APP.$app$main$store$emit_BANG_$$.$cljs$core$IFn$_invoke$arity$variadic$($APP.$app$main$router$nav$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$cljs$cst$3907$auth_login$$),$APP.$cljs$core$prim_seq$cljs$0core$0IFn$0_invoke$0arity$02$$([$APP.$app$main$data$notifications$warn$cljs$0core$0IFn$0_invoke$0arity$01$$($APP.$app$util$i18n$tr$$.$cljs$core$IFn$_invoke$arity$1$("errors.unexpected-token"))]))});
//# sourceMappingURL=main-auth.js.map
