'use strict';

const membership = require('./membership-ed8d3277.js');
const User = require('./User-e889279b.js');
const UserSettings = require('./UserSettings-fc04eb54.js');
const cookie = require('./cookie-135bf612.js');
const index = require('./index-33e96540.js');
require('./apiBase-e4ebaf8b.js');
require('./data-transfer-field-e8417d5f.js');
require('./filter-d5040f65.js');
const instance = require('./instance-36d7564f.js');
const mentorintyBridgeApi = require('./mentorinty-bridge-api-0534712d.js');
const index$1 = require('./index-a2e99c85.js');
const i18n = require('./i18n-49870fc9.js');
const i18n$1 = require('./i18n-5585a319.js');
const calendar = require('./calendar-e4b7baeb.js');

const mentornityApiEndpoint = 'https://api.mentornity.com';
// export const mentornityApiEndpoint = 'http://localhost:1707';

const appRoute = '/:domain(/:page)(/:id)';
function getRouteParams(pathname) {
  // console.log(pathname, new Route(appRoute).match(pathname));
  return new index.routeParser(appRoute).match(pathname);
}

const sozlukCalendarEntryEn = {
  key: 'calendar',
  language: 'en',
  january: 'January',
  february: 'February',
  march: 'March',
  april: 'April',
  may: 'May',
  june: 'June',
  july: 'July',
  august: 'August',
  september: 'September',
  october: 'October',
  november: 'November',
  december: 'December',
  january3: 'Jan',
  february3: 'Feb',
  march3: 'Mar',
  april3: 'Apr',
  may3: 'May',
  june3: 'Jun',
  july3: 'Jul',
  august3: 'Aug',
  september3: 'Sep',
  october3: 'Oct',
  november3: 'Nov',
  december3: 'Dec',
  sunday: 'Sunday',
  monday: 'Monday',
  tuesday: 'Tuesday',
  wednesday: 'Wednesday',
  thursday: 'Thursday',
  friday: 'Friday',
  saturday: 'Saturday',
  sunday3: 'Sun',
  monday3: 'Mon',
  tuesday3: 'Tue',
  wednesday3: 'Wed',
  thursday3: 'Thu',
  friday3: 'Fri',
  saturday3: 'Sat',
  sunday2: 'Su',
  monday2: 'Mo',
  tuesday2: 'Tu',
  wednesday2: 'We',
  thursday2: 'Th',
  friday2: 'Fr',
  saturday2: 'Sa',
};
const sozlukCalendarEntryPtBr = {
  key: 'calendar',
  language: 'pt-br',
  january: 'Janeiro',
  february: 'Fevereiro',
  march: 'Março',
  april: 'Abril',
  may: 'Maio',
  june: 'Junho',
  july: 'Julho',
  august: 'Agosto',
  september: 'Setembro',
  october: 'Outubro',
  november: 'Novembro',
  december: 'Dezembro',
  january3: 'Jan',
  february3: 'Fev',
  march3: 'Mar',
  april3: 'Abr',
  may3: 'Mai',
  june3: 'Jun',
  july3: 'Jul',
  august3: 'Ago',
  september3: 'Set',
  october3: 'Out',
  november3: 'Nov',
  december3: 'Dez',
  sunday: 'Domingo',
  monday: 'Segunda-feira',
  tuesday: 'Terça-feira',
  wednesday: 'Quarta-feira',
  thursday: 'Quinta-feira',
  friday: 'Sexta-feira',
  saturday: 'Sábado',
  sunday3: 'Dom',
  monday3: 'Seg',
  tuesday3: 'Ter',
  wednesday3: 'Qua',
  thursday3: 'Qui',
  friday3: 'Sex',
  saturday3: 'Sáb',
  sunday2: 'dom',
  monday2: '2ª',
  tuesday2: '3ª',
  wednesday2: '4ª',
  thursday2: '5ª',
  friday2: '6ª',
  saturday2: 'sáb',
};
const sozlukCalendarEntryTr = {
  key: 'calendar',
  language: 'tr',
  january: 'Ocak',
  february: 'Şubat',
  march: 'Mart',
  april: 'Nisan',
  may: 'Mayıs',
  june: 'Haziran',
  july: 'Temmuz',
  august: 'Ağustos',
  september: 'Eylül',
  october: 'Ekim',
  november: 'Kasım',
  december: 'Aralık',
  january3: 'Oca',
  february3: 'Şub',
  march3: 'Mar',
  april3: 'Nis',
  may3: 'May',
  june3: 'Haz',
  july3: 'Tem',
  august3: 'Ağu',
  september3: 'Eyl',
  october3: 'Eki',
  november3: 'Kas',
  december3: 'Ara',
  sunday: 'Pazar',
  monday: 'Pazartesi',
  tuesday: 'Salı',
  wednesday: 'Çarşamba',
  thursday: 'Perşembe',
  friday: 'Cuma',
  saturday: 'Cumartesi',
  sunday3: 'Paz',
  monday3: 'Pzt',
  tuesday3: 'Sal',
  wednesday3: 'Çar',
  thursday3: 'Per',
  friday3: 'Cum',
  saturday3: 'Cmt',
  sunday2: 'Pa',
  monday2: 'Pt',
  tuesday2: 'Sa',
  wednesday2: 'Ça',
  thursday2: 'Pe',
  friday2: 'Cu',
  saturday2: 'Ct',
};
const sozlukTimePickerEntryEn = Object.assign(Object.assign({}, sozlukCalendarEntryEn), { time: 'Time', duration: 'Duration', min: 'min', done: 'Done', cancel: 'Cancel', guests: 'Guests', selectSession: 'Select a session', locationType: 'Location Type', location: 'Location', meetingLocation: 'Address', custom: 'Custom', jitsi: 'Jitsi', zoom: 'Zoom', timezone: 'Time Zone', bookWithDuration: 'Book a {duration} min call', conflictsWithCalendar: 'Conflicts with {meetingName} in your {calendarName}.', pickCustomTime: 'Pick a custom time', noAvailabilityLeftForDay: 'No availability left for this day. Please select a different day.', noAvailabilityForDay: 'There is no availability for this day. Please select a different day.', scheduleMeeting: 'Schedule meeting', scheduleMeetingConfirmation: 'Are you sure to schedule this meeting?', meetingIsScheduled: 'Meeting is scheduled.', stayOnPage: 'Stay on page', goToMeetingPage: 'Go to meeting page' });
const sozlukTimePickerEntryPtBr = Object.assign(Object.assign({}, sozlukCalendarEntryPtBr), { time: 'Hora', duration: 'Duração', min: 'min', done: 'OK', cancel: 'Cancelar', guests: 'Participantes', selectSession: 'Selecione uma sessão', locationType: 'Ponto de encontro', location: 'Localizacao', meetingLocation: 'Ponto de encontro', custom: 'Customizado', jitsi: 'Jitsi', zoom: 'Zoom', timezone: 'Fuso Horário', bookWithDuration: 'Reserve uma ligação de {duration} minutos', conflictsWithCalendar: 'Conflito com {meetingName} em seu {calendarName}.', pickCustomTime: 'Escolha um horário personalizado', noAvailabilityLeftForDay: 'Sem disponibilidade para este dia. Selecione um dia diferente.', noAvailabilityForDay: 'Não há disponibilidade para este dia. Selecione um dia diferente.', scheduleMeeting: 'Agendar Sessões', scheduleMeetingConfirmation: 'Tem certeza que deseja agendar esta reunião?', meetingIsScheduled: 'A reunião está agendada.', stayOnPage: 'Ficar na página', goToMeetingPage: 'Vá para a página da reunião' });
const sozlukTimePickerEntryTr = Object.assign(Object.assign({}, sozlukCalendarEntryTr), { time: 'Saat', duration: 'Süre', min: 'dk', done: 'Seç', cancel: 'Vazgeç', guests: 'Katılımcılar', selectSession: 'Bir seans seçin', locationType: 'Toplantı Yeri', location: 'Konum', meetingLocation: 'Toplantı Yeri', custom: 'Özel', jitsi: 'Jitsi', zoom: 'Zoom', timezone: 'Saat Dilimi', bookWithDuration: '{duration} dakikalık toplantı oluştur', conflictsWithCalendar: '{calendarName} takvimindeki {meetingName} ile çakışıyor.', pickCustomTime: 'Saat seçin', noAvailabilityLeftForDay: 'Seçilen gün için müsaitlik kalmadı. Lütfen başka bir gün seçin.', noAvailabilityForDay: 'Seçilen günde müsaitlik yok. Lütfen başka bir gün seçin.', scheduleMeeting: 'Toplantı Oluştur', scheduleMeetingConfirmation: 'Bu toplantıyı oluşturmak istediğinize emin misiniz?', meetingIsScheduled: 'Toplantı oluşturuldu', stayOnPage: 'Sayfada kal', goToMeetingPage: 'Toplantı sayfasına git' });

const MentornityMembershipApplicationSettingsI18nKey = 'mentornity-membership-application-settings-wrapper';
const mentornityMembershipApplicationSettingsI18nDefault = {
  previewWhenUpdate: 'The preview on the right will be updated when there is a change on the controls.',
  appOpenAndAccessible: 'Applications are open and accessible',
  onThisUrl: 'on this URL',
  appsAreClosed: 'Applications are closed.',
  description: 'Description',
  fields: 'Fields',
  appsAreNotOpen: 'Applications are not open.',
  saveChanges: 'Save changes'
};

const MentornityMembershipAppListWrapperI18nKey = 'mentornity-membership-application-list-wrapper';
const mentornityMembershipAppListWrapperI18nDefault = {
  applications: 'Applications',
  invited: 'Invited',
  acceptAndInvite: 'Accept & Invite',
  applicationIsSent: 'Your application is sent.',
  applicationFailed: 'Sending the application failed.',
  firstName: 'First name',
  lastName: 'Last name',
  email: 'Email',
  date: 'Date',
  sendApplication: 'Send Application',
  mentorApplications: 'Mentor Applications',
  menteeApplications: 'Mentee Applications'
};

const mentornityMentorCardList = [
  {
    key: 'mentornity-mentor-card-list',
    language: 'en',
    noItemInList: 'There is no user in the list.'
  },
  {
    key: 'mentornity-mentor-card-list',
    language: 'tr',
    noItemInList: 'Listede kullanıcı yok.'
  },
  {
    key: 'mentornity-mentor-card-list',
    language: 'pt-br',
    noItemInList: 'Não há nenhum usuário na lista.'
  },
];
const userCardListPageAvailableTimePickerView = [
  Object.assign(Object.assign({}, sozlukTimePickerEntryEn), { key: 'user-card-list-page-available-time-picker-view', language: 'en' }),
  Object.assign(Object.assign({}, sozlukTimePickerEntryPtBr), { key: 'user-card-list-page-available-time-picker-view', language: 'pt-br' }),
  Object.assign(Object.assign({}, sozlukTimePickerEntryTr), { key: 'user-card-list-page-available-time-picker-view', language: 'tr' }),
];
const userDetailPageInfoView = [
  {
    key: 'user-detail-page-info-view',
    language: 'en',
    seeMore: 'See More'
  },
  {
    key: 'user-detail-page-info-view',
    language: 'pt-br',
    seeMore: 'Ver Mais'
  },
  {
    key: 'user-detail-page-info-view',
    language: 'tr',
    seeMore: 'Daha Fazla'
  },
];
const userDetailPageAvailableTimePickerView = [
  Object.assign(Object.assign({}, sozlukTimePickerEntryEn), { key: 'user-detail-page-available-time-picker-view', language: 'en' }),
  Object.assign(Object.assign({}, sozlukTimePickerEntryPtBr), { key: 'user-detail-page-available-time-picker-view', language: 'pt-br' }),
  Object.assign(Object.assign({}, sozlukTimePickerEntryTr), { key: 'user-detail-page-available-time-picker-view', language: 'tr' }),
];
const pairDetailPage = [
  Object.assign(Object.assign({}, sozlukTimePickerEntryEn), { key: 'pair-detail-page', language: 'en' }),
  Object.assign(Object.assign({}, sozlukTimePickerEntryPtBr), { key: 'pair-detail-page', language: 'pt-br' }),
  Object.assign(Object.assign({}, sozlukTimePickerEntryTr), { key: 'pair-detail-page', language: 'tr' }),
];
const userDetailPageMeetingListView = [
  {
    key: 'user-detail-page-meeting-list-view',
    language: 'en',
    noItemInList: 'There is no meeting.'
  },
  {
    key: 'user-detail-page-meeting-list-view',
    language: 'pt-br',
    noItemInList: 'Não há sessões.'
  },
  {
    key: 'user-detail-page-meeting-list-view',
    language: 'tr',
    noItemInList: 'Toplantı bulunmuyor.'
  },
];
const myMeetingsPageMeetingListView = [
  {
    key: 'my-meetings-page-meeting-list-view',
    language: 'en',
    noItemInList: "You don't have any meetings."
  },
  {
    key: 'my-meetings-page-meeting-list-view',
    language: 'pt-br',
    noItemInList: 'Você não tem reuniões.'
  },
  {
    key: 'my-meetings-page-meeting-list-view',
    language: 'tr',
    noItemInList: 'Toplantınız bulunmuyor.'
  },
];
const mentornityMembershipApplicationListView = [
  {
    key: 'mentornity-membership-application-list-view',
    language: 'en',
    noItemInList: 'There is no application.'
  },
  {
    key: 'mentornity-membership-application-list-view',
    language: 'pt-br',
    noItemInList: 'Não há aplicativo.'
  },
  {
    key: 'mentornity-membership-application-list-view',
    language: 'tr',
    noItemInList: 'Başvuru bulunmuyor.'
  },
];
const mentornityPairsMeetingWidget = [
  {
    key: i18n.MentornityPairsMeetingWidgetI18nKey,
    language: 'en',
    meetings: 'meetings',
    myPairs: 'My Pairs',
    scheduleMeeting: '+Schedule a meeting',
    seeAll: 'See All',
    seeRequests: 'See requests',
    goToSelectionPage: 'Go to the selection page',
    waitingForResponse: 'There are {count} requests waiting your response.',
    notMatchedMessage: 'No one is paired with you at the moment.',
    pairsEmptyRequestOpenMessage: 'You may send pair requests.',
    pairsEmptyRequestOffMessage: 'Please contact your program manager for the matching.',
    pairsHasRequestEmptyMessage: 'Please review the received requests to be matched.',
    pairsHasNotRequestEmptyMessage: 'The requests will be listed here when you have.',
  },
  {
    key: i18n.MentornityPairsMeetingWidgetI18nKey,
    language: 'pt-br',
    meetings: 'Encontros',
    myPairs: 'Meus pares',
    scheduleMeeting: '+Agendar uma reunião',
    seeAll: 'Ver tudo',
    goToSelectionPage: 'Vá para a página de seleção',
    seeRequests: 'Ver solicitações',
    waitingForResponse: 'Há {count} solicitações aguardando sua resposta.',
    notMatchedMessage: 'Ninguém está emparelhado com você no momento.',
    pairsEmptyRequestOpenMessage: 'Você pode enviar solicitações de pares.',
    pairsEmptyRequestOffMessage: 'Entre em contato com seu gerente de programa para a correspondência.',
    pairsHasRequestEmptyMessage: 'Revise as solicitações recebidas para serem correspondidas.',
    pairsHasNotRequestEmptyMessage: 'Os pedidos serão listados aqui quando você tiver.',
  },
  {
    key: i18n.MentornityPairsMeetingWidgetI18nKey,
    language: 'tr',
    meetings: 'toplantı',
    myPairs: 'Eşleşmelerim',
    scheduleMeeting: '+Toplantı oluştur',
    seeAll: 'Hepsini gör',
    goToSelectionPage: 'Seçim sayfasına git',
    seeRequests: 'İstekleri gör',
    waitingForResponse: 'Cevabınızı bekleyen {count} istek var.',
    notMatchedMessage: 'Şu anda eşleştiğiniz kimse bulunmuyor.',
    pairsEmptyRequestOpenMessage: 'Eşleşmeler için istek gönderebilirsiniz.',
    pairsEmptyRequestOffMessage: 'Eşleşme için lütfen program yöneticiniz ile görüşün.',
    pairsHasRequestEmptyMessage: 'Eşleşmek için lütfen size gelen istekleri onaylayın',
    pairsHasNotRequestEmptyMessage: 'Olduğunda istekler burada listelenecek.',
  },
];
const mentornityUpcomingMeetingWidget = [
  {
    key: i18n.MentornityUpcomingMeetingWidgetI18nKey,
    language: 'en',
    upcomingMeetings: 'Upcoming Meetings',
    seeAll: 'See All',
    listMeetingsHere: 'We will list your meetings here.',
    emptyMeetings: 'There is no upcoming meeting for now.',
    meet: 'Meet',
  },
  {
    key: i18n.MentornityUpcomingMeetingWidgetI18nKey,
    language: 'pt-br',
    upcomingMeetings: 'Próximas reuniões',
    seeAll: 'Ver tudo',
    listMeetingsHere: 'Listaremos suas reuniões aqui.',
    emptyMeetings: 'Não há nenhuma reunião próxima por agora.',
    meet: 'Meet',
  },
  {
    key: i18n.MentornityUpcomingMeetingWidgetI18nKey,
    language: 'tr',
    upcomingMeetings: 'Yaklaşan Toplantılar',
    seeAll: 'Hepsini gör',
    listMeetingsHere: 'Toplantılarınızı burada listeleyeceğiz.',
    emptyMeetings: 'Şu an için yaklaşan bir toplantı görünmüyor.',
    meet: 'Meet',
  },
];
const mentornityPastMeetingWidget = [
  {
    key: i18n.MentornityPastMeetingWidgetI18nKey,
    language: 'en',
    pastMeetings: 'Past Meetings',
    meetingQuestions: 'Meeting Questions',
    listMeetingsHere: 'We will list your meetings here.',
    emptyMeetings: 'There is no past meeting for now.',
    meet: 'Meet',
    seeAll: 'See All',
    submit: 'Submit',
    fillForm: 'Please fill the form',
    formsAreWaiting: 'meetings are waiting your response.',
    formsIsWaiting: 'meeting is waiting your response.'
  },
  {
    key: i18n.MentornityPastMeetingWidgetI18nKey,
    language: 'pt-br',
    pastMeetings: 'Reuniões anteriores',
    meetingQuestions: 'Perguntas da reunião',
    listMeetingsHere: 'Vamos listar suas reuniões aqui.',
    emptyMeetings: 'Não há reunião anterior por enquanto.',
    meet: 'Meet',
    seeAll: 'Ver tudo',
    submit: 'Enviar',
    fillForm: 'Por favor, preencha o formulário',
    formsAreWaiting: 'reuniões estão esperando sua resposta.',
    formsIsWaiting: 'reunião está esperando sua resposta.'
  },
  {
    key: i18n.MentornityPastMeetingWidgetI18nKey,
    language: 'tr',
    pastMeetings: 'Geçmiş Toplantılar',
    meetingQuestions: 'Toplantı Soruları',
    listMeetingsHere: 'Toplantılarınızı burada listeleyeceğiz.',
    emptyMeetings: 'Şu an için geçmiş bir toplantı görünmüyor.',
    meet: 'Meet',
    seeAll: 'Hepsini gör',
    submit: 'Kaydet',
    fillForm: 'Lütfen formu doldurun',
    formsAreWaiting: 'toplantı için dönüş bekleniyor.',
    formsIsWaiting: 'toplantı için dönüş bekleniyor.'
  },
];
const mentornityProgramInfoWidget = [
  {
    key: i18n.MentornityProgramInfoWidgetI18nKey,
    language: 'en',
    onboardingSteps: 'Onboarding steps',
    terms: 'Terms',
    learnMore: 'Learn More',
    programTerms: 'Program Terms',
    programInfo: 'Program Info'
  },
  {
    key: i18n.MentornityProgramInfoWidgetI18nKey,
    language: 'pt-br',
    onboardingSteps: 'Etapas de integração',
    terms: 'Termos',
    learnMore: 'Saber mais',
    programTerms: 'Termos do programa',
    programInfo: 'Informações do programa'
  },
  {
    key: i18n.MentornityProgramInfoWidgetI18nKey,
    language: 'tr',
    onboardingSteps: 'Karşılama adımları',
    terms: 'Koşullar',
    learnMore: 'Daha fazla',
    programTerms: 'Program Koşulları',
    programInfo: 'Program Bilgisi'
  },
];
const mentornityAnnouncementsWidget = [
  {
    key: i18n.MentornityAnnouncementsWidgetI18nKey,
    language: 'en',
    announcements: 'Announcements',
    seeAll: 'See all',
    emptyMessage: 'You will find announcements about the program in this section.',
  },
  {
    key: i18n.MentornityAnnouncementsWidgetI18nKey,
    language: 'pt-br',
    announcements: 'Anúncios',
    seeAll: 'Ver todos',
    emptyMessage: 'Você encontrará anúncios sobre o programa nesta seção.',
  },
  {
    key: i18n.MentornityAnnouncementsWidgetI18nKey,
    language: 'tr',
    announcements: 'Duyurular',
    seeAll: 'Hepsini gör',
    emptyMessage: 'Programla ilgili duyuruları bu bölümde bulabilirsiniz.',
  },
];
const mentornityAcceptInvitationWrapper = [
  {
    key: i18n$1.MentornityAcceptInvitationWrapperI18nKey,
    language: 'en',
    email: 'Email',
    password: 'Password',
    definePassword: 'Define a password',
    invitation: "Invitiation",
    submit: 'Submit',
    agreeTermsAndPrivacy: 'I have read and agree to the <a href="{organisationTermsLink}" target="__blank"> {organisationTitle} terms </a> and <a href="{policyLink}" target="__blank"> Privacy Policy </a>'
  },
  {
    key: i18n$1.MentornityAcceptInvitationWrapperI18nKey,
    language: 'pt-br',
    email: 'E-mail',
    password: 'Senha',
    definePassword: 'Defina uma senha',
    invitation: "Convite",
    submit: 'Enviar',
    agreeTermsAndPrivacy: 'Li e concordo com os termos do <a href="{organisationTermsLink}" target="__blank"> {organisationTitle} </a> e a <a href="{policyLink}" target="__blank"> Política de Privacidade </a>'
  },
  {
    key: i18n$1.MentornityAcceptInvitationWrapperI18nKey,
    language: 'tr',
    email: 'E-posta',
    password: 'Şifre',
    definePassword: 'Şifre tanımlayın',
    invitation: "Davet",
    submit: 'Gönder',
    agreeTermsAndPrivacy: '<a href="{organisationTermsLink}" target="__blank"> {organisationTitle} </a> şartlarını ve <a href="{policyLink}" target="__blank"> Gizlilik Politikasını </a> Gizlilik Politikasını okudum ve kabul ediyorum'
  },
];
const MembershipAppListWrapper = [
  {
    key: MentornityMembershipAppListWrapperI18nKey,
    language: 'en',
    applications: 'Applications',
    invited: 'Invited',
    acceptAndInvite: 'Accept & Invite',
    applicationIsSent: 'Your application is sent.',
    applicationFailed: 'Sending the application failed.',
    firstName: 'First name',
    lastName: 'Last name',
    email: 'Email',
    date: 'Date',
    sendApplication: 'Send Application',
    mentorApplications: 'Mentor Applications',
    menteeApplications: 'Mentee Applications'
  },
  {
    key: MentornityMembershipAppListWrapperI18nKey,
    language: 'pt-br',
    applications: 'Formulários',
    invited: 'Convidamos',
    acceptAndInvite: 'Aceitar e convidar',
    applicationIsSent: 'A sua candidatura é enviada.',
    applicationFailed: 'O envio do aplicativo falhou.',
    firstName: 'Primeiro nome',
    lastName: 'Sobrenome',
    email: 'Email',
    date: 'Encontro',
    sendApplication: 'Enviar aplicativo',
    mentorApplications: 'Aplicativos de mentores',
    menteeApplications: 'Aplicativos de mentorados'
  },
  {
    key: MentornityMembershipAppListWrapperI18nKey,
    language: 'tr',
    applications: 'Başvurular',
    invited: 'Davetiye gönderildi',
    acceptAndInvite: 'Kabul et & Davet et',
    applicationIsSent: 'Başvurunuz gönderildi.',
    applicationFailed: 'Başvuru gönderilirken hata oluştu.',
    firstName: 'İsim',
    lastName: 'Soyisim',
    email: 'E-posta',
    date: 'Tarih',
    sendApplication: 'Başvuruyu Gönder',
    mentorApplications: 'Mentor Başvuruları',
    menteeApplications: 'Menti Başvuruları'
  },
];
const MentornityMembershipApplicationSettingsWrapper = [
  {
    key: MentornityMembershipApplicationSettingsI18nKey,
    language: 'en',
    previewWhenUpdate: 'The preview on the right will be updated when there is a change on the controls.',
    appOpenAndAccessible: 'Applications are open and accessible',
    onThisUrl: 'on this URL',
    appsAreClosed: 'Applications are closed.',
    description: 'Description',
    fields: 'Fields',
    appsAreNotOpen: 'Applications are not open.',
    saveChanges: 'Save changes'
  },
  {
    key: MentornityMembershipApplicationSettingsI18nKey,
    language: 'pt-br',
    previewWhenUpdate: 'A visualização à direita será atualizada quando houver uma alteração nos controles.',
    appOpenAndAccessible: 'As inscrições estão abertas e acessíveis',
    onThisUrl: 'neste URL',
    appsAreClosed: 'As candidaturas estão encerradas.',
    description: 'Descrição',
    fields: 'Campos',
    appsAreNotOpen: 'As candidaturas não estão abertas.',
    saveChanges: 'Salvar alterações'
  },
  {
    key: MentornityMembershipApplicationSettingsI18nKey,
    language: 'tr',
    previewWhenUpdate: 'Bir değişiklik yaptığınızda sağ taraf da güncellenecek',
    appOpenAndAccessible: 'başvuru şu an açık',
    onThisUrl: 'Bu link ile',
    appsAreClosed: 'Başvurular kapalı.',
    description: 'Açıklamalar',
    fields: 'Alanlar',
    appsAreNotOpen: 'Başvurular açık değil',
    saveChanges: 'Değişiklikleri kaydet'
  },
];
const mentornityAvailabilitySettingsView = [
  Object.assign(Object.assign({ 
    // DvnAppViewTakvimAvailabilitySettingsViewI18n
    oneTimeAvailabilities: 'ONE TIME AVAILABILITIES', recurringAvailabilities: 'RECURRING AVAILABILITIES', 
    // TakvimCreateCustomAvailabilityFormI18n is extended by DvnAppViewTakvimAvailabilitySettingsViewI18n
    breakDuration: 'Breaks Between Meetings', createAvailability: 'Create Availability', updateAvailability: 'Update', deleteAvailability: 'Delete', cancel: 'Cancel', endTime: 'End Time', hours: 'hours', jitsi: 'Jitsi Meet', location: 'Location', minutes: 'minutes', recurrence: 'Recurrence', startTime: 'Start Time', meetingDuration: 'Meeting Duration', recurringAvailability: 'Recurring availability', videoConferencePlatform: 'Video Conference Platform', weekly: 'Weekly', zoom: 'Zoom' }, sozlukCalendarEntryEn), { 
    // these must be at the end to override the extended entries
    key: 'availability-settings-view', language: 'en' }),
  Object.assign(Object.assign({ 
    // DvnAppViewTakvimAvailabilitySettingsViewI18n
    oneTimeAvailabilities: 'DISPONIBILIDADES ÚNICAS', recurringAvailabilities: 'DISPONIBILIDADES RECORRENTES', 
    // TakvimCreateCustomAvailabilityFormI18n is extended by DvnAppViewTakvimAvailabilitySettingsViewI18n
    breakDuration: 'Intervalos entre reuniões', createAvailability: 'Crio', updateAvailability: 'Atualizar', deleteAvailability: 'Excluir', cancel: 'Cancelar', endTime: 'Fim do tempo', hours: 'horas', jitsi: 'Jitsi Meet', location: 'Localização', minutes: 'minutos', recurrence: 'Recorrência', startTime: 'Hora de início', meetingDuration: 'Duração da Reunião', recurringAvailability: 'Disponibilidade recorrente', videoConferencePlatform: 'Plataforma de videoconferência', weekly: 'Semanalmente', zoom: 'Zoom' }, sozlukCalendarEntryPtBr), { 
    // these must be at the end to override the extended entries
    key: 'availability-settings-view', language: 'pt-br' }),
  Object.assign(Object.assign({ 
    // DvnAppViewTakvimAvailabilitySettingsViewI18n
    oneTimeAvailabilities: 'TEK SEFERLİK MÜSAİTLİKLER', recurringAvailabilities: 'TEKRAR EDEN MÜSAİTLİKLER', 
    // TakvimCreateCustomAvailabilityFormI18n is extended by DvnAppViewTakvimAvailabilitySettingsViewI18n
    breakDuration: 'Toplantı araları', createAvailability: 'Oluştur', updateAvailability: 'Güncelle', deleteAvailability: 'Sil', cancel: 'Vazgeç', endTime: 'Bitiş', hours: 'saat', jitsi: 'Jitsi Meet', location: 'Konum', minutes: 'dakika', recurrence: 'Tekrar', startTime: 'Başlangıç', meetingDuration: 'Toplantı Süresi', recurringAvailability: 'Tekrar eden müsaitlik', videoConferencePlatform: 'Görüntülü Konuşma Platformu', weekly: 'Haftalık', zoom: 'Zoom' }, sozlukCalendarEntryTr), { 
    // these must be at the end to override the extended entries
    key: 'availability-settings-view', language: 'tr' }),
];
const sozlukEntries = [
  ...mentornityAvailabilitySettingsView,
  ...mentornityMembershipApplicationListView,
  ...mentornityMentorCardList,
  ...mentornityPairsMeetingWidget,
  ...mentornityUpcomingMeetingWidget,
  ...userCardListPageAvailableTimePickerView,
  ...userDetailPageInfoView,
  ...userDetailPageMeetingListView,
  ...userDetailPageAvailableTimePickerView,
  ...pairDetailPage,
  ...myMeetingsPageMeetingListView,
  ...mentornityAnnouncementsWidget,
  ...mentornityProgramInfoWidget,
  ...mentornityPastMeetingWidget,
  ...MentornityMembershipApplicationSettingsWrapper,
  ...MembershipAppListWrapper,
  ...mentornityAcceptInvitationWrapper
];

function getSessionDetails(groupId) {
  const { domain } = getRouteParams(location.pathname);
  const jwt = new cookie.CookieStorage().get('mt_at');
  const sessionToken = new cookie.CookieStorage().get('mt_st');
  const context = {
    organisationDomain: domain,
    organisationId: new cookie.CookieStorage().get('mt_oid'),
    userId: new cookie.CookieStorage().get('mt_uid'),
    role: new cookie.CookieStorage().get('mt_role'),
  };
  const headers = {
    Client: 'd2ViLWNsaWVu',
  };
  if (jwt) {
    headers['Authorization'] = `Bearer ${jwt}`;
    headers['Session-Token'] = sessionToken;
  }
  else {
    headers['Session-Token'] = `NTdiMzY3NjBlNjNiY2UxZWViMDAwMDA0`;
  }
  context.groupId = groupId;
  return { context, headers };
}
function getUserSettings(timeFormat, dateFormat, timeZone, language, isZoomAuthenticated, weekStartDay = 'monday') {
  const authPlatforms = [];
  if (isZoomAuthenticated) {
    authPlatforms.push({
      id: 'zoom',
      name: 'Zoom',
      scope: []
    });
  }
  return UserSettings.UserSettings.decode({ timeFormat, dateFormat, timeZone, language, authPlatforms, weekStartDay });
}
function generateMembershipForRole(role) {
  return membership.Membership.decode({
    config: generateMembershipConfigForRole(role),
  });
}
function generateMembershipConfigIdForRole(role) {
  return `${role}s`;
}
function generateMembershipConfigForRole(role) {
  return membership.MembershipConfig.decode({
    _id: generateMembershipConfigIdForRole(role),
    roleName: role
  });
}
function getUser(id) {
  return User.User.decode({ _id: id });
}
async function generateMentornitySessionContext(contextParams, options) {
  const { organisationId, 
  // organisationDomain,
  accessToken, sessionToken, 
  // role,
  userId, 
  // groupId,
  dateFormat, language, isZoomAuthenticated, timeFormat, timeZone, weekStartDay, } = contextParams;
  const apiHeaders = generateApiHeaders(accessToken, sessionToken);
  const api = instance.createMentornityApiInstance(mentornityApiEndpoint, apiHeaders);
  const mentornityContext = {
    apiSozluk: new index$1.SozlukApi().setLanguage(language).setContents(sozlukEntries),
    mentornityBridgeApi: new mentorintyBridgeApi.MentornityBridgeApi(mentornityApiEndpoint, contextParams, apiHeaders),
    userSettings: getUserSettings(timeFormat, dateFormat, timeZone, language, isZoomAuthenticated, weekStartDay),
    user: User.User.decode({ _id: userId }),
  };
  if (options === null || options === void 0 ? void 0 : options.fetchConfig) {
    mentornityContext.organisationConfig = await api.getOrganisationConfig(organisationId);
    mentornityContext.mentornityBridgeApi.organisationConfig = mentornityContext.organisationConfig;
  }
  if (options === null || options === void 0 ? void 0 : options.fetchMentorship) {
    mentornityContext.mentorship = await api.getMentorshipOfUser(organisationId, userId);
    mentornityContext.mentornityBridgeApi.mentorship = mentornityContext.mentorship;
  }
  // set user's locale and time zone
  calendar.CalendarUtils.setTimeFormat(timeFormat);
  calendar.CalendarUtils.setDateFormat(dateFormat);
  calendar.CalendarUtils.setTimeZone(timeZone);
  switch (language) {
    case 'pt-br':
      calendar.CalendarUtils.setLocale(language, sozlukCalendarEntryPtBr, weekStartDay);
      break;
    case 'tr':
      calendar.CalendarUtils.setLocale(language, sozlukCalendarEntryTr, weekStartDay);
      break;
    default:
      calendar.CalendarUtils.setLocale(language, sozlukCalendarEntryEn, weekStartDay);
      break;
  }
  return mentornityContext;
}
function generateApiHeaders(accessToken, sessionToken) {
  const headers = {
    Client: 'd2ViLWNsaWVu',
    'Session-Token': 'NTdiMzY3NjBlNjNiY2UxZWViMDAwMDA0'
  };
  if (accessToken) {
    headers['Authorization'] = `Bearer ${accessToken}`;
  }
  if (sessionToken) {
    headers['Session-Token'] = sessionToken;
  }
  return headers;
}

exports.MentornityMembershipAppListWrapperI18nKey = MentornityMembershipAppListWrapperI18nKey;
exports.MentornityMembershipApplicationSettingsI18nKey = MentornityMembershipApplicationSettingsI18nKey;
exports.generateMembershipConfigForRole = generateMembershipConfigForRole;
exports.generateMembershipForRole = generateMembershipForRole;
exports.generateMentornitySessionContext = generateMentornitySessionContext;
exports.getRouteParams = getRouteParams;
exports.getSessionDetails = getSessionDetails;
exports.getUser = getUser;
exports.getUserSettings = getUserSettings;
exports.mentornityApiEndpoint = mentornityApiEndpoint;
exports.mentornityMembershipAppListWrapperI18nDefault = mentornityMembershipAppListWrapperI18nDefault;
exports.mentornityMembershipApplicationSettingsI18nDefault = mentornityMembershipApplicationSettingsI18nDefault;
exports.sozlukCalendarEntryEn = sozlukCalendarEntryEn;
exports.sozlukCalendarEntryPtBr = sozlukCalendarEntryPtBr;
exports.sozlukCalendarEntryTr = sozlukCalendarEntryTr;
exports.sozlukEntries = sozlukEntries;
