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B,EACT11B,MAAO,sBACN,KAAM,EAAG,CAAC,cAGjBmJ,EAAG,OAGPA,EAAG,GACF,EAAG,CAAC,iBAGX,mEErKA,MAAAC,GAAiC,EAAAC,EAAAC,GAAgB2rB,EAAM,mCAEvD,IAAAgB,EAAA,EAKAtX,IAASsW,EAAM,cAAiBiB,WAAUA,EAAA5sB,EAAA6sB,UAAUA,EAAA7sB,EAAA8f,KAAKA,EAAA9f,sHCJzD8sB,GAA4Bj2B,EAAAA,EAAAA,IAAiB,CAC3CC,OAAQ,cACRO,KAAAA,CAAMC,GCSR,MAAMs0B,GAAOvzB,EAAAA,EAAAA,IAAI,GACX00B,GAAc10B,EAAAA,EAAAA,KAAI,GAElB20B,EAAWA,KACfpB,EAAKh4B,OAAS,EACdm5B,EAAYn5B,OAAQ,GAEhB0G,EAAQA,KACZsxB,EAAKh4B,MAAQ,GDJf,MAAO,CAAC+J,EAAUC,MACRK,EAAAA,EAAAA,OAAcC,EAAAA,EAAAA,IAAaC,EAAAA,EAAc,CAC/CC,MAAO,GACP,cAAcC,EAAAA,EAAAA,IAAOlJ,EAAAA,GAAaC,YAClCkf,OAAQ,QACRtP,MAAO,QACP,qBAAsB+nB,EAAYn5B,MAClC2K,cAAeyuB,EACfpR,QAASthB,GACR,CACDnD,SAASqH,EAAAA,EAAAA,IAAS,IAAM,EACtBE,EAAAA,EAAAA,IAAaiuB,EAAAA,EAAY,CAAEf,KAAMA,EAAKh4B,OAAS,KAAM,EAAG,CAAC,WAE3DiM,EAAG,GACF,EAAG,CAAC,aAAc,uBAEvB,IErCA,MAAAC,EAAoBgtB,EAEpB,IAAAG,EAAA","sources":["webpack://Novadoc/./src/components/v2/common/eds/EReadEdsDialogActions.ts","webpack://Novadoc/./src/components/v2/common/survey/useSurveyActions.ts","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaSignModal.vue?bc04","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaSignModal.vue","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaSignModal.vue?faf9","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaFogrotPasswordModal.vue?cff9","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaFogrotPasswordModal.vue","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaFogrotPasswordModal.vue?59e2","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaOtpModal.vue?1bb6","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaOtpModal.vue","webpack://Novadoc/./src/components/v2/common/eds/GryadaSignModals/GryadaOtpModal.vue?c634","webpack://Novadoc/./src/components/v2/common/eds/ReadEDSForm.vue?3b62","webpack://Novadoc/./src/components/v2/common/eds/ReadEDSForm.vue","webpack://Novadoc/./src/components/v2/common/eds/ReadEDSForm.vue?f35e","webpack://Novadoc/./src/components/v2/common/eds/ReadEDSModal.vue?91fe","webpack://Novadoc/./src/components/v2/common/eds/ReadEDSModal.vue","webpack://Novadoc/./src/components/v2/common/header/useUserMenu.ts","webpack://Novadoc/./src/components/v2/common/header/components/Breadcrumbs.vue?fef4","webpack://Novadoc/./src/components/v2/common/header/components/Breadcrumbs.vue","webpack://Novadoc/./src/components/v2/common/header/components/Breadcrumbs.vue?79a0","webpack://Novadoc/./src/components/v2/common/header/components/AdminMenu.vue?b2a5","webpack://Novadoc/./src/components/v2/common/header/components/AdminMenu.vue","webpack://Novadoc/./src/components/v2/common/header/components/AdminMenu.vue?92ec","webpack://Novadoc/./src/components/v2/common/header/components/Divider.vue","webpack://Novadoc/./src/components/v2/common/header/components/Divider.vue?cac5","webpack://Novadoc/./src/components/v2/common/header/components/UserMenu.vue?0250","webpack://Novadoc/./src/components/v2/common/header/components/UserMenu.vue","webpack://Novadoc/./src/components/v2/common/header/components/UserMenu.vue?c7e3","webpack://Novadoc/./src/components/v2/common/header/components/SystemNotifications.vue?0beb","webpack://Novadoc/./src/components/v2/common/header/components/SystemNotifications.vue","webpack://Novadoc/./src/components/v2/common/header/components/SystemNotifications.vue?4c8d","webpack://Novadoc/./src/components/v2/common/header/components/ServiceDeskModal.vue?e766","webpack://Novadoc/./src/components/v2/common/header/components/ServiceDeskModal.vue","webpack://Novadoc/./src/components/v2/common/header/components/ServiceDeskModal.vue?031e","webpack://Novadoc/./src/components/v2/common/header/components/HelpModal.vue?ea83","webpack://Novadoc/./src/components/v2/common/header/components/HelpModal.vue","webpack://Novadoc/./src/components/v2/common/header/components/HelpModal.vue?8560","webpack://Novadoc/./src/components/v2/common/header/index.vue?af4e","webpack://Novadoc/./src/components/v2/common/header/index.vue","webpack://Novadoc/./src/components/v2/common/header/index.vue?94c2","webpack://Novadoc/./src/components/v2/documents/LoadReportModal.vue?470b","webpack://Novadoc/./src/components/v2/documents/LoadReportModal.vue","webpack://Novadoc/./src/components/v2/documents/LoadReportModal.vue?f661","webpack://Novadoc/./src/components/v2/documents/CreateArchiveModal.vue?022a","webpack://Novadoc/./src/components/v2/documents/CreateArchiveModal.vue","webpack://Novadoc/./src/components/v2/documents/CreateArchiveModal.vue?688a","webpack://Novadoc/./src/components/v2/documents/DocumentBulkActionModal.vue?c466","webpack://Novadoc/./src/components/v2/documents/DocumentBulkActionModal.vue","webpack://Novadoc/./src/components/v2/documents/DocumentBulkActionModal.vue?5935","webpack://Novadoc/./src/components/v2/documents/RejectDocumentReasonModal.vue?43ed","webpack://Novadoc/./src/components/v2/documents/RejectDocumentReasonModal.vue","webpack://Novadoc/./src/components/v2/documents/RejectDocumentReasonModal.vue?15c2","webpack://Novadoc/./src/components/v2/documents/CancelDocumentReasonModal.vue?5071","webpack://Novadoc/./src/components/v2/documents/CancelDocumentReasonModal.vue","webpack://Novadoc/./src/components/v2/documents/CancelDocumentReasonModal.vue?99de","webpack://Novadoc/./src/components/v2/common/layout/Default.vue?b6b9","webpack://Novadoc/./src/components/v2/common/layout/Default.vue","webpack://Novadoc/./src/components/v2/common/layout/Default.vue?6ecd","webpack://Novadoc/./src/components/v2/common/layout/components/DemoRequestModal.vue?f2fd","webpack://Novadoc/./src/components/v2/common/layout/components/DemoRequestModal.vue","webpack://Novadoc/./src/components/v2/common/layout/components/DemoRequestModal.vue?9cd9","webpack://Novadoc/./src/components/v2/common/layout/Home.vue?ed9f","webpack://Novadoc/./src/components/v2/common/layout/Home.vue","webpack://Novadoc/./src/components/v2/common/layout/Home.vue?fdc4","webpack://Novadoc/./src/components/v2/common/survey/SurveyForm.vue?0af5","webpack://Novadoc/./src/components/v2/common/survey/SurveyForm.vue","webpack://Novadoc/./src/components/v2/common/survey/SurveyForm.vue?6ea7","webpack://Novadoc/./src/components/v2/common/survey/SurveyModal.vue?c486","webpack://Novadoc/./src/components/v2/common/survey/SurveyModal.vue","webpack://Novadoc/./src/components/v2/common/survey/SurveyModal.vue?1ea8"],"sourcesContent":["export enum EReadEdsDialogActions {\n  signing = 'signing',\n  contractorAdding = 'contractorAdding',\n  default = 'default',\n}\n","import { useSurveysModule } from '@/modules/store/surveys';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { ISurveyDTO, ISurvey, Survey } from '@/lib/models/Survey/Survey';\nimport { storeToRefs } from 'pinia';\nimport { DateFormatter } from '@/lib/core/helpers';\nimport { useUserModule } from '@/modules/store/user';\nimport { useRoute, useRouter } from 'vue-router';\nimport { ELoginReminderType } from '@/lib/models/User/ELoginReminderType';\n\ninterface ISurveyActions {\n  showSurveyModal(): void;\n  setSurveyDelayTime(delayInMinutes?: number, delayInDays?: number): void;\n  setLastSurveyId(id: number | null): void;\n  confirmSurvey(id: number, finished: boolean): Promise<void>;\n  saveRelativeUrlToLocalStorage(): void;\n  navigateToSavedUrl(): void;\n}\n\nexport const useSurveyActions = (): ISurveyActions => {\n  const {\n    openModal, closeModal,\n  } = useUiModule();\n  const { lastSurveyId, profile } = storeToRefs(useUserModule());\n\n  const router = useRouter();\n  const route = useRoute();\n\n  const surveysModule = useSurveysModule();\n  const { currentSurvey, showSurvey } = storeToRefs(surveysModule);\n\n  const setSurveyDelayTime = (delayInMinutes = 0, delayInDays = 1) => {\n    const storageKeyName = 'surveyDelayTime';\n    localStorage.setItem(storageKeyName, DateFormatter.getFutureDateFromToday(delayInMinutes, delayInDays));\n  };\n\n  const setLastSurveyId = (surveyId: number | null) => {\n    lastSurveyId.value = surveyId;\n  };\n\n  const needToGetSurveys = () => {\n    const surveyDelayTime = localStorage.getItem('surveyDelayTime');\n    if (surveyDelayTime) {\n      const currentTime = new Date();\n      const delayTime = new Date(surveyDelayTime);\n      const getTimeDifference = (delayTime.getTime() - currentTime.getTime()) / 60000;\n      if (showSurvey.value && getTimeDifference < 10) {\n        showSurvey.value = false;\n        return true;\n      }\n      if (currentTime < delayTime) {\n        return false;\n      }\n    }\n    return true;\n  };\n\n  const showSurveyModal = async () => {\n    if (profile.value?.loginReminder === ELoginReminderType.firstLogin) {\n      setSurveyDelayTime();\n      return;\n    }\n    const surveysExist = needToGetSurveys();\n    if (surveysExist) {\n      const result = await surveysModule.getUserSurveys(1, 10);\n      if (result) {\n        const surveyArr = result.data.map((s: ISurveyDTO) => new Survey(s));\n        // eslint-disable-next-line no-restricted-syntax\n        for (const survey of surveyArr) {\n          currentSurvey.value = survey as ISurvey;\n          // eslint-disable-next-line no-await-in-loop\n          await openModal(EModalNames.surveyModal);\n          break;\n        }\n      }\n    }\n  };\n\n  const saveRelativeUrlToLocalStorage = () => {\n    const relativePath = route.path;\n    localStorage.setItem('relativeUrl', relativePath);\n  };\n\n  const navigateToSavedUrl = () => {\n    const savedUrl = localStorage.getItem('relativeUrl');\n\n    if (savedUrl) {\n      router.push(savedUrl)\n        .then(() => {\n          localStorage.removeItem('relativeUrl');\n        })\n        .catch((err) => {\n          console.error('Navigation error:', err);\n        });\n    } else {\n      console.log('No URL saved in local storage.');\n    }\n  };\n\n  const confirmSurvey = async (id: number, finished: boolean): Promise<void> => {\n    if (id === 0) return;\n    const status = await surveysModule.linkSurvey(id, finished);\n\n    if (status === EApiResponseStatus.SUCCESS) {\n      if (finished) {\n        navigateToSavedUrl();\n      } else {\n        await closeModal(EModalNames.surveyModal);\n      }\n    }\n  };\n\n  return {\n    showSurveyModal,\n    setSurveyDelayTime,\n    setLastSurveyId,\n    confirmSurvey,\n    saveRelativeUrlToLocalStorage,\n    navigateToSavedUrl,\n  };\n};\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"ND-modal__body\" }\nconst _hoisted_2 = { class: \"ND-modal__footer modal__footer\" }\n\nimport {\n  computed, onBeforeUnmount, onMounted, reactive, ref, Ref, watch,\n} from 'vue';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport {\n  ENdButtonTypes, NdButton, NdInputPassword, NdInputText,\n} from '@/components/v2/ui';\nimport { minLength, required } from '@vuelidate/validators';\nimport { BaseValidation, useVuelidate } from '@vuelidate/core';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EInputTypes } from '@/components/ui/Input/common';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useSignContractorId } from '@/lib/core/composables/useSignContractorId';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport forge from 'node-forge';\nimport { useI18n } from 'vue-i18n';\nimport { useRoute } from 'vue-router';\nimport { useLabelsModule } from '@/modules/store/labels';\nimport { publicKeyPem } from '@/config/encryption';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { EContractorsOperationsStatus } from '@/modules/api/Contractors.api';\nimport { useEDSModule } from '@/modules/store/eds';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'GryadaSignModal',\n  props: {\n  uid: {\n    type: String,\n    default: '',\n  },\n},\n  emits: [\"login\"],\n  setup(__props, { emit: __emit }) {\n\nconst props = __props;\n\nconst { t } = useI18n();\nconst route = useRoute();\nconst labelsModule = useLabelsModule();\nconst { closeModal, openModal } = useUiModule();\nconst contractorsModule = useContractorsModule();\nconst documentsModule = useDocumentsModule();\n\nconst { signContractorId } = useSignContractorId();\n\nconst {\n  currentDocument,\n  selectedAttachmentId,\n} = storeToRefs(documentsModule);\n\nconst loading = ref(false);\n\nconst companyAddRoutes = ref([\n  ERouteNames.myContractors,\n  ERouteNames.documents,\n  ERouteNames.home,\n]);\n\nconst {\n  confirmDialogConfig,\n  bulkActionsDialogConfig,\n} = storeToRefs(useUiModule());\n\nconst emit = __emit;\n\nconst signatureNovaForm = reactive({\n  login: '',\n  password: '',\n});\n\nconst validationRules = computed(() => ({\n  signatureNovaForm: {\n    login: {\n      required,\n      minLength: minLength(4),\n    },\n    password: {\n      required,\n      minLength: minLength(4),\n    },\n  },\n}));\n\nconst encryptValue = (value) => {\n  try {\n    const publicKey = forge.pki.publicKeyFromPem(publicKeyPem.trim());\n\n    const encryptedBytes = publicKey.encrypt(value, 'RSAES-PKCS1-V1_5');\n    const encryptedBase64 = forge.util.encode64(encryptedBytes);\n    return encryptedBase64;\n  } catch (err) {\n    console.error('Ошибка шифрования:', err);\n    return null;\n  }\n};\n\nconst v$: Ref<BaseValidation> = useVuelidate(validationRules, { signatureNovaForm });\n\nconst isDisabledConfirmButton = computed<boolean>(() => !signatureNovaForm.login || !signatureNovaForm.password);\n\nconst close = (): void => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n};\n\nconst closeAllModal = () => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n  closeModal(EModalNames.readEDSModal);\n  bulkActionsDialogConfig.value.list = [];\n};\n\nconst openPersonConfirmationModal = () => {\n  openModal(EModalNames.personConfirmationModal);\n};\n\nconst showErrorMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.error, new Error(text));\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst showSuccessMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.success, { text });\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst checkValidation = async () => {\n  const isValid = await v$.value.$validate();\n\n  if (!isValid) {\n    const loginErrors = v$.value.signatureNovaForm.login.$errors;\n    if (loginErrors.length > 0) {\n      const err = loginErrors[0];\n      switch (err.$validator) {\n      case 'required':\n        showErrorMessage('Потрібно заповнити поле логін');\n        break;\n      case 'minLength':\n        showErrorMessage('Логін має містити мінімум 4 символи');\n        break;\n      }\n      return false;\n    }\n\n    const passwordErrors = v$.value.signatureNovaForm.password.$errors;\n    if (passwordErrors.length > 0) {\n      const err = passwordErrors[0];\n      switch (err.$validator) {\n      case 'required':\n        showErrorMessage('Потрібно заповнити поле пароль');\n        break;\n      case 'minLength':\n        showErrorMessage('Пароль має містити мінімум 4 символи');\n        break;\n      }\n      return false;\n    }\n  }\n\n  return true;\n};\n\nconst signAttachment = async (): Promise<void> => {\n  const isValid = await checkValidation();\n\n  if (!isValid) return;\n\n  loading.value = true;\n\n  const { keystoreList, signatureTaxNumber } = storeToRefs(useEDSModule());\n  const { signature } = keystoreList.value;\n\n  const contractorId = signContractorId.value;\n  const login = encryptValue(signatureNovaForm.login);\n  const password = encryptValue(signatureNovaForm.password);\n  const attachmentId = selectedAttachmentId.value;\n  const signMethod = 'cloud';\n  const documentId = currentDocument.value?.id;\n\n  try {\n    const { result } = await documentsModule.gryadaAttachmentSign(\n      documentId,\n      attachmentId,\n      contractorId,\n      login,\n      password,\n      signMethod,\n    );\n\n    if (result?.status === 'unknownError') {\n      showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n      return;\n    }\n\n    if (result?.error) {\n      showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n      return;\n    }\n\n    if (result?.status === 'success') {\n      closeAllModal();\n      showSuccessMessage('Вкладення успішно підписано');\n    }\n  } catch (error) {\n    showErrorMessage(error);\n  } finally {\n    loading.value = false;\n  }\n};\n\nconst signDocument = async (): Promise<void> => {\n  const isValid = await checkValidation();\n\n  if (!isValid) return;\n\n  loading.value = true;\n\n  const contractorId = signContractorId.value;\n  const login = encryptValue(signatureNovaForm.login);\n  const password = encryptValue(signatureNovaForm.password);\n  const signMethod = 'cloud';\n  const documentId = currentDocument.value?.id;\n\n  if (companyAddRoutes.value.includes(route.name)) {\n    try {\n      const responseStatus = await contractorsModule.gryadaSignDefaultFile(\n        login,\n        password,\n        signMethod,\n        props.uid,\n      );\n\n      switch (responseStatus) {\n      case EContractorsOperationsStatus.SUCCESS:\n        closeAllModal();\n        showSuccessMessage(t(`general.apiMessages.contractors.${EContractorsOperationsStatus.SUCCESS}`));\n        break;\n      case EContractorsOperationsStatus.UNKNOWN_ERROR:\n        showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n        break;\n      default:\n        showErrorMessage(t(`general.apiMessages.contractors.${responseStatus}`));\n        break;\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  } else {\n    try {\n      const docsToSign = bulkActionsDialogConfig.value?.list;\n      const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n      if (docsToSign && docsToSign.length > 0) {\n        for (const doc of docsToSign) {\n          const attachSignatures = doc.attachSignatures ?? [];\n          const attachmentsToSign = attachSignatures.filter(\n            (signature) => signature.status === 'ready' && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n          );\n\n          for (const signature of attachmentsToSign) {\n            const { result } = await documentsModule.gryadaAttachmentSign(\n              doc.id,\n              signature.attach_object_id,\n              contractorId,\n              login,\n              password,\n              signMethod,\n            );\n\n            if (result?.status === 'unknownError') {\n              showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n              return;\n            }\n\n            if (result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status !== 'success') {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status === 'success') {\n              showSuccessMessage('Вкладення успішно підписано');\n            }\n          }\n\n          try {\n            const result = await documentsModule.gryadaDocumentSign(\n              contractorId,\n              doc.id,\n              login,\n              password,\n              signMethod,\n              doc,\n            );\n\n            if (result?.result?.status === 'unknownError') {\n              showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n              return;\n            }\n\n            if (result?.result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result.result.status}`));\n            } else {\n              showSuccessMessage('Документ успішно підписано');\n            }\n          } catch (error) {\n            showErrorMessage(error);\n          }\n        }\n\n        closeAllModal();\n      } else {\n        const attachSignatures = currentDocument.value.attachSignatures ?? [];\n        const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n        const attachmentsToSign = attachSignatures.filter(\n          (signature) => signature.status === 'ready'\n                && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n        );\n\n        for (const signature of attachmentsToSign) {\n          const { result } = await documentsModule.gryadaAttachmentSign(\n            documentId,\n            signature.attach_object_id,\n            contractorId,\n            login,\n            password,\n            signMethod,\n          );\n\n          if (result?.status === 'unknownError') {\n            showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n            return;\n          }\n\n          if (result?.error) {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status !== 'success') {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status === 'success') {\n            showSuccessMessage('Вкладення успішно підписано');\n          }\n        }\n\n        const { result } = await documentsModule.gryadaDocumentSign(\n          contractorId,\n          currentDocument.value.id,\n          login,\n          password,\n          signMethod,\n        );\n\n        if (result?.status === 'unknownError') {\n          showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n          return;\n        }\n\n        if (result?.error) {\n          showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n        }\n\n        if (result?.status === 'success') {\n          closeAllModal();\n          showSuccessMessage('Документ успішно підписано');\n        }\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  }\n};\n\nwatch(() => signatureNovaForm.login, (value) => {\n  emit('login', value);\n});\n\nonBeforeUnmount(() => {\n  close();\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: companyAddRoutes.value.includes(_unref(route).name) ? 'Підтвердить свою особу' : 'Підпис Nova ключ',\n    onAfterLeave: close,\n    \"custom-close-event\": true,\n    onCustomClose: closeAllModal,\n    \"modal-name\": _unref(EModalNames).signatureNovaKeyModal\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createVNode(_unref(NdInputText), {\n          class: \"gryada__input\",\n          modelValue: signatureNovaForm.login,\n          \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((signatureNovaForm.login) = $event)),\n          type: _unref(EInputTypes).text,\n          validator: _unref(v$).signatureNovaForm.login,\n          label: 'Логін'\n        }, null, 8, [\"modelValue\", \"type\", \"validator\"]),\n        _createVNode(_unref(NdInputPassword), {\n          class: \"gryada__input\",\n          label: 'Пароль',\n          modelValue: signatureNovaForm.password,\n          \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((signatureNovaForm.password) = $event)),\n          validator: _unref(v$).signatureNovaForm.password\n        }, null, 8, [\"modelValue\", \"validator\"]),\n        _createElementVNode(\"span\", {\n          class: \"nova-key__forgot-password\",\n          onClick: openPersonConfirmationModal\n        }, \" Забули пароль? \")\n      ]),\n      _createElementVNode(\"div\", _hoisted_2, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Відміна'}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: companyAddRoutes.value.includes(_unref(route).name) ? 'Підтвердити' : 'Підписати',\n          type: _unref(ENdButtonTypes).primary,\n          onClick: _cache[2] || (_cache[2] = ($event: any) => (_unref(selectedAttachmentId) ? signAttachment() : signDocument())),\n          disabled: isDisabledConfirmButton.value,\n          \"is-loading\": loading.value\n        }, null, 8, [\"text\", \"type\", \"disabled\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"companyAddRoutes.includes(route.name) ? 'Підтвердить свою особу' : 'Підпис Nova ключ'\"\n    @after-leave=\"close\"\n    :custom-close-event=\"true\"\n    @custom-close=\"closeAllModal\"\n    :modal-name=\"EModalNames.signatureNovaKeyModal\"\n  >\n    <div class=\"ND-modal__body\">\n      <NdInputText\n        class=\"gryada__input\"\n        v-model=\"signatureNovaForm.login\"\n        :type=\"EInputTypes.text\"\n        :validator=\"v$.signatureNovaForm.login\"\n        :label=\"'Логін'\"\n      />\n      <NdInputPassword\n        class=\"gryada__input\"\n        :label=\"'Пароль'\"\n        v-model=\"signatureNovaForm.password\"\n        :validator=\"v$.signatureNovaForm.password\"\n      />\n      <span\n        class=\"nova-key__forgot-password\"\n        @click=\"openPersonConfirmationModal\"\n      >\n        Забули пароль?\n      </span>\n    </div>\n    <div class=\"ND-modal__footer modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: 'Відміна'}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"companyAddRoutes.includes(route.name) ? 'Підтвердити' : 'Підписати'\"\n        :type=\"ENdButtonTypes.primary\"\n        @click=\"selectedAttachmentId ? signAttachment() : signDocument()\"\n        :disabled=\"isDisabledConfirmButton\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  computed, defineEmits, defineProps, onBeforeUnmount, onMounted, reactive, ref, Ref, watch,\n} from 'vue';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport {\n  ENdButtonTypes, NdButton, NdInputPassword, NdInputText,\n} from '@/components/v2/ui';\nimport { minLength, required } from '@vuelidate/validators';\nimport { BaseValidation, useVuelidate } from '@vuelidate/core';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EInputTypes } from '@/components/ui/Input/common';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useSignContractorId } from '@/lib/core/composables/useSignContractorId';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport forge from 'node-forge';\nimport { useI18n } from 'vue-i18n';\nimport { useRoute } from 'vue-router';\nimport { useLabelsModule } from '@/modules/store/labels';\nimport { publicKeyPem } from '@/config/encryption';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { EContractorsOperationsStatus } from '@/modules/api/Contractors.api';\nimport { useEDSModule } from '@/modules/store/eds';\n\nconst props = defineProps({\n  uid: {\n    type: String,\n    default: '',\n  },\n});\n\nconst { t } = useI18n();\nconst route = useRoute();\nconst labelsModule = useLabelsModule();\nconst { closeModal, openModal } = useUiModule();\nconst contractorsModule = useContractorsModule();\nconst documentsModule = useDocumentsModule();\n\nconst { signContractorId } = useSignContractorId();\n\nconst {\n  currentDocument,\n  selectedAttachmentId,\n} = storeToRefs(documentsModule);\n\nconst loading = ref(false);\n\nconst companyAddRoutes = ref([\n  ERouteNames.myContractors,\n  ERouteNames.documents,\n  ERouteNames.home,\n]);\n\nconst {\n  confirmDialogConfig,\n  bulkActionsDialogConfig,\n} = storeToRefs(useUiModule());\n\nconst emit = defineEmits<{(e: 'login', value: string): void }>();\n\nconst signatureNovaForm = reactive({\n  login: '',\n  password: '',\n});\n\nconst validationRules = computed(() => ({\n  signatureNovaForm: {\n    login: {\n      required,\n      minLength: minLength(4),\n    },\n    password: {\n      required,\n      minLength: minLength(4),\n    },\n  },\n}));\n\nconst encryptValue = (value) => {\n  try {\n    const publicKey = forge.pki.publicKeyFromPem(publicKeyPem.trim());\n\n    const encryptedBytes = publicKey.encrypt(value, 'RSAES-PKCS1-V1_5');\n    const encryptedBase64 = forge.util.encode64(encryptedBytes);\n    return encryptedBase64;\n  } catch (err) {\n    console.error('Ошибка шифрования:', err);\n    return null;\n  }\n};\n\nconst v$: Ref<BaseValidation> = useVuelidate(validationRules, { signatureNovaForm });\n\nconst isDisabledConfirmButton = computed<boolean>(() => !signatureNovaForm.login || !signatureNovaForm.password);\n\nconst close = (): void => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n};\n\nconst closeAllModal = () => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n  closeModal(EModalNames.readEDSModal);\n  bulkActionsDialogConfig.value.list = [];\n};\n\nconst openPersonConfirmationModal = () => {\n  openModal(EModalNames.personConfirmationModal);\n};\n\nconst showErrorMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.error, new Error(text));\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst showSuccessMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.success, { text });\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst checkValidation = async () => {\n  const isValid = await v$.value.$validate();\n\n  if (!isValid) {\n    const loginErrors = v$.value.signatureNovaForm.login.$errors;\n    if (loginErrors.length > 0) {\n      const err = loginErrors[0];\n      switch (err.$validator) {\n      case 'required':\n        showErrorMessage('Потрібно заповнити поле логін');\n        break;\n      case 'minLength':\n        showErrorMessage('Логін має містити мінімум 4 символи');\n        break;\n      }\n      return false;\n    }\n\n    const passwordErrors = v$.value.signatureNovaForm.password.$errors;\n    if (passwordErrors.length > 0) {\n      const err = passwordErrors[0];\n      switch (err.$validator) {\n      case 'required':\n        showErrorMessage('Потрібно заповнити поле пароль');\n        break;\n      case 'minLength':\n        showErrorMessage('Пароль має містити мінімум 4 символи');\n        break;\n      }\n      return false;\n    }\n  }\n\n  return true;\n};\n\nconst signAttachment = async (): Promise<void> => {\n  const isValid = await checkValidation();\n\n  if (!isValid) return;\n\n  loading.value = true;\n\n  const { keystoreList, signatureTaxNumber } = storeToRefs(useEDSModule());\n  const { signature } = keystoreList.value;\n\n  const contractorId = signContractorId.value;\n  const login = encryptValue(signatureNovaForm.login);\n  const password = encryptValue(signatureNovaForm.password);\n  const attachmentId = selectedAttachmentId.value;\n  const signMethod = 'cloud';\n  const documentId = currentDocument.value?.id;\n\n  try {\n    const { result } = await documentsModule.gryadaAttachmentSign(\n      documentId,\n      attachmentId,\n      contractorId,\n      login,\n      password,\n      signMethod,\n    );\n\n    if (result?.status === 'unknownError') {\n      showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n      return;\n    }\n\n    if (result?.error) {\n      showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n      return;\n    }\n\n    if (result?.status === 'success') {\n      closeAllModal();\n      showSuccessMessage('Вкладення успішно підписано');\n    }\n  } catch (error) {\n    showErrorMessage(error);\n  } finally {\n    loading.value = false;\n  }\n};\n\nconst signDocument = async (): Promise<void> => {\n  const isValid = await checkValidation();\n\n  if (!isValid) return;\n\n  loading.value = true;\n\n  const contractorId = signContractorId.value;\n  const login = encryptValue(signatureNovaForm.login);\n  const password = encryptValue(signatureNovaForm.password);\n  const signMethod = 'cloud';\n  const documentId = currentDocument.value?.id;\n\n  if (companyAddRoutes.value.includes(route.name)) {\n    try {\n      const responseStatus = await contractorsModule.gryadaSignDefaultFile(\n        login,\n        password,\n        signMethod,\n        props.uid,\n      );\n\n      switch (responseStatus) {\n      case EContractorsOperationsStatus.SUCCESS:\n        closeAllModal();\n        showSuccessMessage(t(`general.apiMessages.contractors.${EContractorsOperationsStatus.SUCCESS}`));\n        break;\n      case EContractorsOperationsStatus.UNKNOWN_ERROR:\n        showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n        break;\n      default:\n        showErrorMessage(t(`general.apiMessages.contractors.${responseStatus}`));\n        break;\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  } else {\n    try {\n      const docsToSign = bulkActionsDialogConfig.value?.list;\n      const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n      if (docsToSign && docsToSign.length > 0) {\n        for (const doc of docsToSign) {\n          const attachSignatures = doc.attachSignatures ?? [];\n          const attachmentsToSign = attachSignatures.filter(\n            (signature) => signature.status === 'ready' && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n          );\n\n          for (const signature of attachmentsToSign) {\n            const { result } = await documentsModule.gryadaAttachmentSign(\n              doc.id,\n              signature.attach_object_id,\n              contractorId,\n              login,\n              password,\n              signMethod,\n            );\n\n            if (result?.status === 'unknownError') {\n              showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n              return;\n            }\n\n            if (result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status !== 'success') {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status === 'success') {\n              showSuccessMessage('Вкладення успішно підписано');\n            }\n          }\n\n          try {\n            const result = await documentsModule.gryadaDocumentSign(\n              contractorId,\n              doc.id,\n              login,\n              password,\n              signMethod,\n              doc,\n            );\n\n            if (result?.result?.status === 'unknownError') {\n              showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n              return;\n            }\n\n            if (result?.result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result.result.status}`));\n            } else {\n              showSuccessMessage('Документ успішно підписано');\n            }\n          } catch (error) {\n            showErrorMessage(error);\n          }\n        }\n\n        closeAllModal();\n      } else {\n        const attachSignatures = currentDocument.value.attachSignatures ?? [];\n        const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n        const attachmentsToSign = attachSignatures.filter(\n          (signature) => signature.status === 'ready'\n                && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n        );\n\n        for (const signature of attachmentsToSign) {\n          const { result } = await documentsModule.gryadaAttachmentSign(\n            documentId,\n            signature.attach_object_id,\n            contractorId,\n            login,\n            password,\n            signMethod,\n          );\n\n          if (result?.status === 'unknownError') {\n            showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n            return;\n          }\n\n          if (result?.error) {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status !== 'success') {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status === 'success') {\n            showSuccessMessage('Вкладення успішно підписано');\n          }\n        }\n\n        const { result } = await documentsModule.gryadaDocumentSign(\n          contractorId,\n          currentDocument.value.id,\n          login,\n          password,\n          signMethod,\n        );\n\n        if (result?.status === 'unknownError') {\n          showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n          return;\n        }\n\n        if (result?.error) {\n          showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n        }\n\n        if (result?.status === 'success') {\n          closeAllModal();\n          showSuccessMessage('Документ успішно підписано');\n        }\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  }\n};\n\nwatch(() => signatureNovaForm.login, (value) => {\n  emit('login', value);\n});\n\nonBeforeUnmount(() => {\n  close();\n});\n</script>\n\n<style scoped lang=\"scss\">\n.gryada__input {\n  height: 2.5rem !important;\n\n  :deep(.nd-input-text__label--empty),\n  :deep(.nd-input-text__input) {\n    @include typography('inter-12');\n    font-weight: 400;\n  }\n\n  :deep(.nd-input-text__label--valid),\n  :deep(.nd-input-text__label--invalid), {\n    @include typography('inter-10');\n    font-weight: 400;\n  }\n\n  &:first-child {\n    margin-bottom: 5px;\n  }\n}\n\n.nova-key__forgot-password {\n  @include typography('inter-12');\n  cursor: pointer;\n  display: flex;\n  justify-content: flex-end;\n  font-weight: 400;\n  margin-top: 10px;\n  text-decoration: underline;\n  color: $pale_aqua_dark;\n}\n\n.modal__footer {\n  @include size(100%, auto);\n\n  .modal__button-left {\n    @include flex(column, center, center);\n    @include size(2.5rem, 2.5rem);\n    background-color: $light_100;\n    border-radius: 8px;\n    cursor: pointer;\n\n    @include hover() {\n      background-color: $light_200;\n    }\n\n    .nd-button__icon-back {\n      transform: rotate(180deg);\n    }\n\n    @include mobile() {\n      @include size(30px, 30px);\n    }\n  }\n\n  .modal__button-right {\n    @include size(14.5rem, 2.5rem);\n    cursor: pointer;\n\n    :deep(.nd-button__text) {\n      margin-left: 0;\n      text-align: center;\n    }\n\n    @include mobile() {\n      @include size(85%, 30px);\n    }\n  }\n}\n\n:deep(.nd-input-text__error) {\n  border: 1px solid !important;\n  border-color: $maximum_red !important;\n}\n</style>\n","import script from \"./GryadaSignModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GryadaSignModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GryadaSignModal.vue?vue&type=style&index=0&id=9b3f7418&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9b3f7418\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, createVNode as _createVNode, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"ND-modal__body\" }\nconst _hoisted_2 = { class: \"ND-modal__footer modal__footer\" }\n\nimport {\n  ref,\n  Ref,\n  reactive,\n  computed,\n  onBeforeUnmount, onMounted, watch,\n} from 'vue';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport {\n  NdButton,\n  NdInputText,\n  ENdButtonTypes, NdInputPassword,\n} from '@/components/v2/ui';\nimport {\n  required,\n  minLength,\n  maxLength,\n} from '@vuelidate/validators';\nimport {\n  BaseValidation,\n  useVuelidate,\n} from '@vuelidate/core';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EInputTypes } from '@/components/ui/Input/common';\nimport { IContractor } from '@/lib/models/Contractor/Contractor';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport NdInput from '@/components/NdInput.vue';\nimport { userApi } from '@/modules/api/User.api';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { i18n } from '@/modules/i18n';\nimport { useDocumentsModule } from '@/modules/store/documents';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'GryadaFogrotPasswordModal',\n  props: {\n  login: {\n    type: String,\n    default: '',\n  },\n  uid: {\n    type: String,\n    default: '',\n  },\n},\n  emits: [\"login\", \"phoneNumber\"],\n  setup(__props, { emit: __emit }) {\n\nconst emit = __emit;\n\nconst props = __props;\n\nconst { closeModal, openModal } = useUiModule();\nconst contractorsModule = useContractorsModule();\nconst documentsModule = useDocumentsModule();\nconst {\n  bulkActionsDialogConfig,\n} = storeToRefs(useUiModule());\n\nconst {\n  activeContractor,\n} = storeToRefs(contractorsModule);\n\nconst loading = ref(false);\nconst phoneMask = ref('+38 (0##) ###-##-##');\n\nconst forgotPasswordForm = reactive({\n  login: '',\n  phoneNumber: '',\n});\n\nconst isDisabledConfirmButton = computed<boolean>(() => forgotPasswordForm.phoneNumber.length !== 19 || !forgotPasswordForm.login);\n\nconst sendOTP = async () => {\n  loading.value = true;\n\n  try {\n    const res = await documentsModule.gryadaCreateOTPSignSession(\n      forgotPasswordForm.phoneNumber?.replace(/\\D/g, ''),\n      bulkActionsDialogConfig.value.list.length ? 'multiple' : 'single',\n      forgotPasswordForm.login,\n      props.uid,\n    );\n\n    const { status } = res.result;\n\n    if (res?.result?.error === 'Failed to create GryadaSignSession') {\n      showErrorMessage('Вичерпано кількість спроб відправки ОТР кодів, спробуйте, будь ласка, пізніше');\n    }\n\n    if (res?.result?.error === 'User is not verified in ZUP') {\n      showErrorMessage('Вказаний номер телефону не верифікований');\n    }\n\n    if (status === EApiResponseStatus.SUCCESS) {\n      openModal(EModalNames.personOtpConfirmationModal);\n    }\n  } catch (error) {\n    console.log(error);\n  } finally {\n    loading.value = false;\n  }\n};\n\nconst close = (): void => {\n  closeModal(EModalNames.personConfirmationModal);\n};\n\nconst closeAllModal = () => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n  closeModal(EModalNames.personConfirmationModal);\n  closeModal(EModalNames.readEDSModal);\n};\n\nconst showErrorMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.error, new Error(text));\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nwatch(\n  () => props.login,\n  (newVal) => {\n    forgotPasswordForm.login = newVal;\n  },\n  { immediate: true },\n);\n\nwatch(\n  () => forgotPasswordForm.login,\n  (newVal) => {\n    emit('login', newVal);\n  },\n);\nwatch(\n  () => forgotPasswordForm.phoneNumber,\n  (newVal) => {\n    emit('phoneNumber', newVal.replace(/\\D/g, ''));\n  },\n);\n\nonBeforeUnmount(() => {\n  close();\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: 'Підтвердить свою особу',\n    onAfterLeave: close,\n    \"custom-close-event\": true,\n    onCustomClose: closeAllModal,\n    \"modal-name\": _unref(EModalNames).personConfirmationModal\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _cache[2] || (_cache[2] = _createElementVNode(\"p\", { class: \"gryada__title\" }, \" Ключ співробітника Nova \", -1)),\n        _cache[3] || (_cache[3] = _createElementVNode(\"p\", { class: \"gryada__subTitle\" }, \" Введіть номер телефону співробітника до якого прив’язаний ключ \", -1)),\n        _createVNode(_unref(NdInputText), {\n          style: {\"margin-bottom\":\"5px\"},\n          class: \"gryada__input\",\n          modelValue: forgotPasswordForm.login,\n          \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((forgotPasswordForm.login) = $event)),\n          type: _unref(EInputTypes).text,\n          label: 'Логін'\n        }, null, 8, [\"modelValue\", \"type\"]),\n        _createVNode(_unref(NdInputText), {\n          class: \"gryada__input\",\n          label: 'Номер телефону',\n          modelValue: forgotPasswordForm.phoneNumber,\n          \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((forgotPasswordForm.phoneNumber) = $event)),\n          mask: phoneMask.value,\n          type: _unref(EInputTypes).tel\n        }, null, 8, [\"modelValue\", \"mask\", \"type\"])\n      ]),\n      _createElementVNode(\"div\", _hoisted_2, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Відміна'}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: 'Продовжити',\n          type: _unref(ENdButtonTypes).primary,\n          onClick: sendOTP,\n          disabled: isDisabledConfirmButton.value,\n          \"is-loading\": loading.value\n        }, null, 8, [\"type\", \"disabled\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"'Підтвердить свою особу'\"\n    @after-leave=\"close\"\n    :custom-close-event=\"true\"\n    @custom-close=\"closeAllModal\"\n    :modal-name=\"EModalNames.personConfirmationModal\"\n  >\n    <div class=\"ND-modal__body\">\n      <p class=\"gryada__title\">\n        Ключ співробітника Nova\n      </p>\n      <p\n        class=\"gryada__subTitle\">\n        Введіть номер телефону співробітника до якого прив’язаний ключ\n      </p>\n      <NdInputText\n        style=\"margin-bottom: 5px;\"\n        class=\"gryada__input\"\n        v-model=\"forgotPasswordForm.login\"\n        :type=\"EInputTypes.text\"\n        :label=\"'Логін'\"\n      />\n      <NdInputText\n        class=\"gryada__input\"\n        :label=\"'Номер телефону'\"\n        v-model=\"forgotPasswordForm.phoneNumber\"\n        :mask=\"phoneMask\"\n        :type=\"EInputTypes.tel\"\n      />\n    </div>\n    <div class=\"ND-modal__footer modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: 'Відміна'}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"'Продовжити'\"\n        :type=\"ENdButtonTypes.primary\"\n        @click=\"sendOTP\"\n        :disabled=\"isDisabledConfirmButton\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  ref,\n  Ref,\n  reactive,\n  computed,\n  onBeforeUnmount, defineProps, onMounted, watch, defineEmits,\n} from 'vue';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport {\n  NdButton,\n  NdInputText,\n  ENdButtonTypes, NdInputPassword,\n} from '@/components/v2/ui';\nimport {\n  required,\n  minLength,\n  maxLength,\n} from '@vuelidate/validators';\nimport {\n  BaseValidation,\n  useVuelidate,\n} from '@vuelidate/core';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EInputTypes } from '@/components/ui/Input/common';\nimport { IContractor } from '@/lib/models/Contractor/Contractor';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport NdInput from '@/components/NdInput.vue';\nimport { userApi } from '@/modules/api/User.api';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { i18n } from '@/modules/i18n';\nimport { useDocumentsModule } from '@/modules/store/documents';\n\nconst emit = defineEmits<{(e: 'login', value: string): void\n  (e: 'phoneNumber', value: string): void\n}>();\n\nconst props = defineProps({\n  login: {\n    type: String,\n    default: '',\n  },\n  uid: {\n    type: String,\n    default: '',\n  },\n});\n\nconst { closeModal, openModal } = useUiModule();\nconst contractorsModule = useContractorsModule();\nconst documentsModule = useDocumentsModule();\nconst {\n  bulkActionsDialogConfig,\n} = storeToRefs(useUiModule());\n\nconst {\n  activeContractor,\n} = storeToRefs(contractorsModule);\n\nconst loading = ref(false);\nconst phoneMask = ref('+38 (0##) ###-##-##');\n\nconst forgotPasswordForm = reactive({\n  login: '',\n  phoneNumber: '',\n});\n\nconst isDisabledConfirmButton = computed<boolean>(() => forgotPasswordForm.phoneNumber.length !== 19 || !forgotPasswordForm.login);\n\nconst sendOTP = async () => {\n  loading.value = true;\n\n  try {\n    const res = await documentsModule.gryadaCreateOTPSignSession(\n      forgotPasswordForm.phoneNumber?.replace(/\\D/g, ''),\n      bulkActionsDialogConfig.value.list.length ? 'multiple' : 'single',\n      forgotPasswordForm.login,\n      props.uid,\n    );\n\n    const { status } = res.result;\n\n    if (res?.result?.error === 'Failed to create GryadaSignSession') {\n      showErrorMessage('Вичерпано кількість спроб відправки ОТР кодів, спробуйте, будь ласка, пізніше');\n    }\n\n    if (res?.result?.error === 'User is not verified in ZUP') {\n      showErrorMessage('Вказаний номер телефону не верифікований');\n    }\n\n    if (status === EApiResponseStatus.SUCCESS) {\n      openModal(EModalNames.personOtpConfirmationModal);\n    }\n  } catch (error) {\n    console.log(error);\n  } finally {\n    loading.value = false;\n  }\n};\n\nconst close = (): void => {\n  closeModal(EModalNames.personConfirmationModal);\n};\n\nconst closeAllModal = () => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n  closeModal(EModalNames.personConfirmationModal);\n  closeModal(EModalNames.readEDSModal);\n};\n\nconst showErrorMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.error, new Error(text));\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nwatch(\n  () => props.login,\n  (newVal) => {\n    forgotPasswordForm.login = newVal;\n  },\n  { immediate: true },\n);\n\nwatch(\n  () => forgotPasswordForm.login,\n  (newVal) => {\n    emit('login', newVal);\n  },\n);\nwatch(\n  () => forgotPasswordForm.phoneNumber,\n  (newVal) => {\n    emit('phoneNumber', newVal.replace(/\\D/g, ''));\n  },\n);\n\nonBeforeUnmount(() => {\n  close();\n});\n</script>\n\n<style scoped lang=\"scss\">\n.gryada__input {\n  height: 2.5rem !important;\n\n  :deep(.nd-input-text__label--empty),\n  :deep(.nd-input-text__input) {\n    @include typography('inter-12');\n    font-weight: 400;\n  }\n\n  :deep(.nd-input-text__label--valid),\n  :deep(.nd-input-text__label--invalid), {\n    @include typography('inter-10');\n    font-weight: 400;\n  }\n\n  &:first-child {\n    margin-bottom: 5px;\n  }\n}\n\n.gryada__title {\n  @include typography('inter-semibold-12');\n  margin-top: 16px;\n  font-weight: 600;\n}\n\n.gryada__subTitle {\n  @include typography('inter-12');\n  font-weight: 400;\n  margin-top: 10px;\n  margin-bottom: 10px;\n  color: $light_500;\n}\n\n.nova-key__forgot-password {\n  @include typography('inter-12');\n  cursor: pointer;\n  display: flex;\n  justify-content: flex-end;\n  font-weight: 400;\n  margin-top: 10px;\n  text-decoration: underline;\n  color: $pale_aqua_dark;\n}\n\n.modal__footer {\n  @include size(100%, auto);\n\n  .modal__button-left {\n    @include flex(column, center, center);\n    @include size(2.5rem, 2.5rem);\n    background-color: $light_100;\n    border-radius: 8px;\n    cursor: pointer;\n\n    @include hover() {\n      background-color: $light_200;\n    }\n\n    .nd-button__icon-back {\n      transform: rotate(180deg);\n    }\n\n    @include mobile() {\n      @include size(30px, 30px);\n    }\n  }\n\n  .modal__button-right {\n    @include size(14.5rem, 2.5rem);\n    cursor: pointer;\n\n    :deep(.nd-button__text) {\n      margin-left: 0;\n      text-align: center;\n    }\n\n    @include mobile() {\n      @include size(85%, 30px);\n    }\n  }\n}\n\n</style>\n","import script from \"./GryadaFogrotPasswordModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GryadaFogrotPasswordModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GryadaFogrotPasswordModal.vue?vue&type=style&index=0&id=293a6980&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-293a6980\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"ND-modal__body\" }\nconst _hoisted_2 = { class: \"gryada-block-button send-otp-btn\" }\nconst _hoisted_3 = {\n  key: 0,\n  class: \"gryadaTimer-counter\"\n}\nconst _hoisted_4 = { class: \"ND-modal__footer modal__footer\" }\n\nimport {\n  ref,\n  Ref,\n  reactive,\n  computed,\n  onBeforeUnmount, onBeforeMount, watch,\n} from 'vue';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport {\n  NdButton,\n  NdInputText,\n  ENdButtonTypes,\n  NdInputOtp,\n} from '@/components/v2/ui';\nimport {\n  BaseValidation,\n  useVuelidate,\n} from '@vuelidate/core';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EInputTypes } from '@/components/ui/Input/common';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useSignContractorId } from '@/lib/core/composables/useSignContractorId';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport forge from 'node-forge';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { i18n } from '@/modules/i18n';\nimport { useI18n } from 'vue-i18n';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { publicKeyPem } from '@/config/encryption';\nimport { useRoute } from 'vue-router';\nimport { useLabelsModule } from '@/modules/store/labels';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { EContractorsOperationsStatus } from '@/modules/api/Contractors.api';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'GryadaOtpModal',\n  props: {\n  login: {\n    type: String,\n    default: '',\n  },\n  phoneNumber: {\n    type: String,\n    default: '',\n  },\n  isLoadingSign: {\n    type: Boolean,\n    default: false,\n  },\n  uid: {\n    type: String,\n    default: '',\n  },\n},\n  setup(__props) {\n\nconst props = __props;\n\nconst { closeModal, openModal } = useUiModule();\nconst contractorsModule = useContractorsModule();\nconst documentsModule = useDocumentsModule();\nconst { currentDocument, selectedAttachmentId } = storeToRefs(documentsModule);\nconst { signContractorId } = useSignContractorId();\nconst { bulkActionsDialogConfig } = storeToRefs(useUiModule());\nconst route = useRoute();\nconst labelsModule = useLabelsModule();\n\n// eslint-disable-next-line no-undef\nlet timer: NodeJS.Timeout;\n\nconst loading = ref(false);\nconst isLoadingSendOTP = ref(false);\nconst phoneNumber = ref('');\nconst login = ref('');\nconst otpField = ref('');\nconst checkOTPRun = ref(false);\nconst isRunChange = ref(false);\nconst { t } = useI18n();\nconst form = reactive({\n  otpField: '',\n});\nconst timerOTP = reactive({\n  minutes: 0, seconds: 0, friendlyMinutes: '', friendlySeconds: '', isRun: false,\n});\nconst defaultTimerOTP = reactive({\n  min: 3, sec: 0,\n});\n\nconst companyAddRoutes = ref([\n  ERouteNames.myContractors,\n  ERouteNames.documents,\n  ERouteNames.home,\n]);\n\nconst startTimer = (): void => {\n  stopTimer();\n  timerOTP.isRun = true;\n  timer = setInterval(() => {\n    timerOTP.seconds -= 1;\n  }, 1000);\n};\n\nconst stopTimer = (): void => {\n  clearTimeout(timer);\n};\n\nconst setDefaultTimerOTP = (): void => {\n  timerOTP.minutes = defaultTimerOTP.min;\n  timerOTP.seconds = defaultTimerOTP.sec;\n  timerOTP.friendlyMinutes = defaultTimerOTP.min < 10 ? `0${defaultTimerOTP.min}` : defaultTimerOTP.min.toString();\n  timerOTP.friendlySeconds = defaultTimerOTP.sec < 10 ? `0${defaultTimerOTP.sec}` : defaultTimerOTP.sec.toString();\n  checkOTPRun.value = false;\n};\n\nonBeforeMount(async () => {\n  isRunChange.value = false;\n  setDefaultTimerOTP();\n});\n\nwatch(timerOTP, () => {\n  if (timerOTP.seconds < 0) {\n    stopTimer();\n    if (timerOTP.minutes !== 0) {\n      timerOTP.minutes -= 1;\n      timerOTP.friendlyMinutes = `0${timerOTP.minutes}`;\n      timerOTP.seconds = 59;\n      startTimer();\n    } else {\n      timerOTP.isRun = false;\n      setDefaultTimerOTP();\n    }\n  }\n  if (timerOTP.seconds < 10) {\n    timerOTP.friendlySeconds = `0${timerOTP.seconds}`;\n  } else {\n    timerOTP.friendlySeconds = timerOTP.seconds.toString();\n  }\n});\n\nconst sendOTP = async () => {\n  isLoadingSendOTP.value = true;\n  try {\n    const res = await documentsModule.gryadaCreateOTPSignSession(\n      props.phoneNumber,\n      bulkActionsDialogConfig.value.list.length ? 'multiple' : 'single',\n      login.value,\n      props.uid,\n    );\n    const status = res?.result?.status;\n\n    if (res?.result?.error === 'Failed to create GryadaSignSession') {\n      showErrorMessage('Вичерпано кількість спроб відправки ОТР кодів, спробуйте, будь ласка, пізніше');\n    }\n\n    if (res?.result?.error === 'User is not verified in ZUP') {\n      showErrorMessage('Вказаний номер телефону не верифікований');\n    }\n\n    if (status === EApiResponseStatus.SUCCESS) {\n      checkOTPRun.value = true;\n      startTimer();\n    }\n\n    if (status === EApiResponseStatus.ERROR) {\n      showErrorMessage('Виникла невідома помилка');\n    }\n  } catch (error) {\n    console.error(error);\n  } finally {\n    isLoadingSendOTP.value = false;\n  }\n};\n\nconst buttonText = computed(() => {\n  if (!checkOTPRun.value) {\n    return 'Відправити повторно';\n  }\n  if (checkOTPRun.value) {\n    return 'Відправити повторно через';\n  }\n  return 'Застосувати';\n});\n\nconst isDisabledConfirmButton = computed<boolean>(() => !login.value || form.otpField.length !== 4);\n\nconst close = (): void => {\n  stopTimer();\n  setDefaultTimerOTP();\n  closeModal(EModalNames.personOtpConfirmationModal);\n};\n\nconst showErrorMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.error, new Error(text));\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst showSuccessMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.success, { text });\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst mountTimer = () => {\n  checkOTPRun.value = true;\n  startTimer();\n};\n\nconst closeAllModal = () => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n  closeModal(EModalNames.personConfirmationModal);\n  closeModal(EModalNames.personOtpConfirmationModal);\n  closeModal(EModalNames.readEDSModal);\n  bulkActionsDialogConfig.value.list = [];\n};\n\nconst encryptValue = (value) => {\n  try {\n    const publicKey = forge.pki.publicKeyFromPem(publicKeyPem.trim());\n\n    const encryptedBytes = publicKey.encrypt(value, 'RSAES-PKCS1-V1_5');\n    const encryptedBase64 = forge.util.encode64(encryptedBytes);\n    return encryptedBase64;\n  } catch (err) {\n    console.error('Ошибка шифрования:', err);\n    return null;\n  }\n};\n\nconst signAttachment = async (): Promise<void> => {\n  loading.value = true;\n\n  const contractorId = signContractorId.value;\n  const encryptedLogin = encryptValue(login.value);\n  const encryptedPassword = encryptValue(form.otpField);\n  const signMethod = 'cloudOTP';\n  const documentId = currentDocument.value?.id;\n  const attachmentId = selectedAttachmentId.value;\n\n  try {\n    const { result } = await documentsModule.gryadaAttachmentSign(\n      documentId,\n      attachmentId,\n      contractorId,\n      login,\n      password,\n      signMethod,\n    );\n\n    if (result?.status === 'unknownError') {\n      showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n      return;\n    }\n\n    if (result?.error) {\n      showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n      return;\n    }\n\n    if (result?.status === 'success') {\n      closeAllModal();\n      showSuccessMessage('Вкладення успішно підписано');\n    }\n  } catch (error) {\n    showErrorMessage(error);\n  } finally {\n    loading.value = false;\n  }\n};\n\nconst signDocument = async (): Promise<void> => {\n  loading.value = true;\n\n  const documentId = currentDocument.value?.id;\n  const contractorId = signContractorId.value;\n  const encryptedLogin = encryptValue(login.value);\n  const encryptedPassword = encryptValue(form.otpField);\n  const signMethod = 'cloudOTP';\n\n  if (companyAddRoutes.value.includes(route.name)) {\n    try {\n      const responseStatus = await contractorsModule.gryadaSignDefaultFile(\n        encryptedLogin,\n        encryptedPassword,\n        signMethod,\n        props.uid,\n      );\n\n      switch (responseStatus) {\n      case EContractorsOperationsStatus.SUCCESS:\n        closeAllModal();\n        showSuccessMessage(t(`general.apiMessages.contractors.${EContractorsOperationsStatus.SUCCESS}`));\n        break;\n      case EContractorsOperationsStatus.UNKNOWN_ERROR:\n        showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n        break;\n      default:\n        showErrorMessage(t(`general.apiMessages.contractors.${responseStatus}`));\n        break;\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  } else {\n    try {\n      const docsToSign = bulkActionsDialogConfig.value.list;\n      const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n      if (docsToSign && docsToSign.length > 0) {\n        for (const doc of docsToSign) {\n          const attachSignatures = doc.attachSignatures ?? [];\n          const attachmentsToSign = attachSignatures.filter(\n            (signature) => signature.status === 'ready' && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n          );\n\n          for (const signature of attachmentsToSign) {\n            const { result } = await documentsModule.gryadaAttachmentSign(\n              doc.id,\n              signature.attach_object_id,\n              contractorId,\n              login,\n              password,\n              signMethod,\n            );\n\n            if (result?.status === 'unknownError') {\n              showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n              return;\n            }\n\n            if (result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status !== 'success') {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status === 'success') {\n              showSuccessMessage('Вкладення успішно підписано');\n            }\n          }\n\n          try {\n            const result = await documentsModule.gryadaDocumentSign(\n              contractorId,\n              doc.id,\n              encryptedLogin,\n              encryptedPassword,\n              signMethod,\n              doc,\n            );\n\n            if (result?.result?.error === 'invalid OTP for GryadaSignSession') {\n              showErrorMessage('Ви ввели невірний OTP');\n            }\n\n            if (result?.result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result.result.status}`));\n            }\n\n            if (result?.result?.status.toUpperCase() === EApiResponseStatus.SUCCESS) {\n              showSuccessMessage('Документ успішно підписано');\n            }\n          } catch (error) {\n            showErrorMessage(error);\n          }\n        }\n\n        closeAllModal();\n      } else {\n        const attachSignatures = currentDocument.value.attachSignatures ?? [];\n        const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n        const attachmentsToSign = attachSignatures.filter(\n          (signature) => signature.status === 'ready'\n                && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n        );\n\n        for (const signature of attachmentsToSign) {\n          const { result } = await documentsModule.gryadaAttachmentSign(\n            documentId,\n            signature.attach_object_id,\n            contractorId,\n            login,\n            password,\n            signMethod,\n          );\n\n          if (result?.status === 'unknownError') {\n            showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n            return;\n          }\n\n          if (result?.error) {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status !== 'success') {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status === 'success') {\n            showSuccessMessage('Вкладення успішно підписано');\n          }\n        }\n\n        const { result } = await documentsModule.gryadaDocumentSign(\n          contractorId,\n          currentDocument.value.id,\n          encryptedLogin,\n          encryptedPassword,\n          signMethod,\n        );\n\n        if (result?.error === 'invalid OTP for GryadaSignSession') {\n          showErrorMessage('Ви ввели невірний OTP код');\n          return;\n        }\n\n        if (result?.error) {\n          showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n          return;\n        }\n\n        if (result?.status === 'success') {\n          closeAllModal();\n          showSuccessMessage('Документ успішно підписано');\n        }\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  }\n};\n\nwatch(\n  () => props.login,\n  (newVal) => {\n    login.value = newVal;\n  },\n  { immediate: true },\n);\n\nonBeforeUnmount(async () => {\n  close();\n  stopTimer();\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: 'Підтвердить свою особу',\n    onAfterLeave: close,\n    onAfterEnter: mountTimer,\n    \"custom-close-event\": true,\n    onCustomClose: closeAllModal,\n    \"modal-name\": _unref(EModalNames).personOtpConfirmationModal\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _cache[4] || (_cache[4] = _createElementVNode(\"p\", { class: \"gryada__title\" }, \" Ключ співробітника Nova \", -1)),\n        _cache[5] || (_cache[5] = _createElementVNode(\"p\", { class: \"gryada__subTitle\" }, \" Для підписання документа введіть код ОТР, надісланий на вказаний номер телефону \", -1)),\n        _createVNode(_unref(NdInputText), {\n          style: {\"margin-bottom\":\"5px\"},\n          class: \"gryada__input\",\n          modelValue: login.value,\n          \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((login).value = $event)),\n          type: _unref(EInputTypes).text,\n          label: 'Логін',\n          disabled: true\n        }, null, 8, [\"modelValue\", \"type\"]),\n        _createVNode(_unref(NdInputOtp), {\n          modelValue: form.otpField,\n          \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((form.otpField) = $event)),\n          label: \"''\",\n          maxlength: 4,\n          placeholder: \"----\"\n        }, null, 8, [\"modelValue\"]),\n        _createElementVNode(\"div\", _hoisted_2, [\n          _createVNode(_unref(NdButton), {\n            type: _unref(ENdButtonTypes).gray200,\n            text: buttonText.value,\n            disabled: checkOTPRun.value,\n            onClick: _cache[2] || (_cache[2] = ($event: any) => (sendOTP())),\n            \"is-loading\": isLoadingSendOTP.value\n          }, {\n            \"icon-after\": _withCtx(() => [\n              (timerOTP.isRun)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, _toDisplayString(timerOTP.friendlyMinutes) + \":\" + _toDisplayString(timerOTP.friendlySeconds), 1))\n                : _createCommentVNode(\"\", true)\n            ]),\n            _: 1\n          }, 8, [\"type\", \"text\", \"disabled\", \"is-loading\"])\n        ])\n      ]),\n      _createElementVNode(\"div\", _hoisted_4, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Відміна'}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: 'Підтвердити',\n          type: _unref(ENdButtonTypes).primary,\n          disabled: isDisabledConfirmButton.value,\n          onClick: _cache[3] || (_cache[3] = ($event: any) => (_unref(selectedAttachmentId) ? signAttachment() : signDocument())),\n          \"is-loading\": loading.value\n        }, null, 8, [\"type\", \"disabled\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"'Підтвердить свою особу'\"\n    @after-leave=\"close\"\n    @after-enter=\"mountTimer\"\n    :custom-close-event=\"true\"\n    @custom-close=\"closeAllModal\"\n    :modal-name=\"EModalNames.personOtpConfirmationModal\"\n  >\n    <div class=\"ND-modal__body\">\n      <p class=\"gryada__title\">\n        Ключ співробітника Nova\n      </p>\n      <p\n        class=\"gryada__subTitle\">\n        Для підписання документа введіть код ОТР, надісланий на вказаний номер телефону\n      </p>\n      <NdInputText\n        style=\"margin-bottom: 5px;\"\n        class=\"gryada__input\"\n        v-model=\"login\"\n        :type=\"EInputTypes.text\"\n        :label=\"'Логін'\"\n        :disabled=\"true\"\n      />\n      <NdInputOtp\n        v-model=\"form.otpField\"\n        label=\"''\"\n        :maxlength=\"4\"\n        placeholder='----'\n      />\n      <div class=\"gryada-block-button send-otp-btn\">\n        <NdButton\n          :type=\"ENdButtonTypes.gray200\"\n          :text=\"buttonText\"\n          :disabled=\"checkOTPRun\"\n          @click=\"sendOTP()\"\n          :is-loading=\"isLoadingSendOTP\"\n        >\n          <template v-slot:icon-after>\n            <span v-if=\"timerOTP.isRun\" class=\"gryadaTimer-counter\">{{timerOTP.friendlyMinutes}}:{{ timerOTP.friendlySeconds }}</span>\n          </template>\n        </NdButton>\n      </div>\n    </div>\n    <div class=\"ND-modal__footer modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: 'Відміна'}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"'Підтвердити'\"\n        :type=\"ENdButtonTypes.primary\"\n        :disabled=\"isDisabledConfirmButton\"\n        @click=\"selectedAttachmentId ? signAttachment() : signDocument()\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  ref,\n  Ref,\n  reactive,\n  computed,\n  onBeforeUnmount, onBeforeMount, watch, defineProps,\n} from 'vue';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport {\n  NdButton,\n  NdInputText,\n  ENdButtonTypes,\n  NdInputOtp,\n} from '@/components/v2/ui';\nimport {\n  BaseValidation,\n  useVuelidate,\n} from '@vuelidate/core';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EInputTypes } from '@/components/ui/Input/common';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useSignContractorId } from '@/lib/core/composables/useSignContractorId';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport forge from 'node-forge';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { i18n } from '@/modules/i18n';\nimport { useI18n } from 'vue-i18n';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { publicKeyPem } from '@/config/encryption';\nimport { useRoute } from 'vue-router';\nimport { useLabelsModule } from '@/modules/store/labels';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { EContractorsOperationsStatus } from '@/modules/api/Contractors.api';\n\nconst props = defineProps({\n  login: {\n    type: String,\n    default: '',\n  },\n  phoneNumber: {\n    type: String,\n    default: '',\n  },\n  isLoadingSign: {\n    type: Boolean,\n    default: false,\n  },\n  uid: {\n    type: String,\n    default: '',\n  },\n});\n\nconst { closeModal, openModal } = useUiModule();\nconst contractorsModule = useContractorsModule();\nconst documentsModule = useDocumentsModule();\nconst { currentDocument, selectedAttachmentId } = storeToRefs(documentsModule);\nconst { signContractorId } = useSignContractorId();\nconst { bulkActionsDialogConfig } = storeToRefs(useUiModule());\nconst route = useRoute();\nconst labelsModule = useLabelsModule();\n\n// eslint-disable-next-line no-undef\nlet timer: NodeJS.Timeout;\n\nconst loading = ref(false);\nconst isLoadingSendOTP = ref(false);\nconst phoneNumber = ref('');\nconst login = ref('');\nconst otpField = ref('');\nconst checkOTPRun = ref(false);\nconst isRunChange = ref(false);\nconst { t } = useI18n();\nconst form = reactive({\n  otpField: '',\n});\nconst timerOTP = reactive({\n  minutes: 0, seconds: 0, friendlyMinutes: '', friendlySeconds: '', isRun: false,\n});\nconst defaultTimerOTP = reactive({\n  min: 3, sec: 0,\n});\n\nconst companyAddRoutes = ref([\n  ERouteNames.myContractors,\n  ERouteNames.documents,\n  ERouteNames.home,\n]);\n\nconst startTimer = (): void => {\n  stopTimer();\n  timerOTP.isRun = true;\n  timer = setInterval(() => {\n    timerOTP.seconds -= 1;\n  }, 1000);\n};\n\nconst stopTimer = (): void => {\n  clearTimeout(timer);\n};\n\nconst setDefaultTimerOTP = (): void => {\n  timerOTP.minutes = defaultTimerOTP.min;\n  timerOTP.seconds = defaultTimerOTP.sec;\n  timerOTP.friendlyMinutes = defaultTimerOTP.min < 10 ? `0${defaultTimerOTP.min}` : defaultTimerOTP.min.toString();\n  timerOTP.friendlySeconds = defaultTimerOTP.sec < 10 ? `0${defaultTimerOTP.sec}` : defaultTimerOTP.sec.toString();\n  checkOTPRun.value = false;\n};\n\nonBeforeMount(async () => {\n  isRunChange.value = false;\n  setDefaultTimerOTP();\n});\n\nwatch(timerOTP, () => {\n  if (timerOTP.seconds < 0) {\n    stopTimer();\n    if (timerOTP.minutes !== 0) {\n      timerOTP.minutes -= 1;\n      timerOTP.friendlyMinutes = `0${timerOTP.minutes}`;\n      timerOTP.seconds = 59;\n      startTimer();\n    } else {\n      timerOTP.isRun = false;\n      setDefaultTimerOTP();\n    }\n  }\n  if (timerOTP.seconds < 10) {\n    timerOTP.friendlySeconds = `0${timerOTP.seconds}`;\n  } else {\n    timerOTP.friendlySeconds = timerOTP.seconds.toString();\n  }\n});\n\nconst sendOTP = async () => {\n  isLoadingSendOTP.value = true;\n  try {\n    const res = await documentsModule.gryadaCreateOTPSignSession(\n      props.phoneNumber,\n      bulkActionsDialogConfig.value.list.length ? 'multiple' : 'single',\n      login.value,\n      props.uid,\n    );\n    const status = res?.result?.status;\n\n    if (res?.result?.error === 'Failed to create GryadaSignSession') {\n      showErrorMessage('Вичерпано кількість спроб відправки ОТР кодів, спробуйте, будь ласка, пізніше');\n    }\n\n    if (res?.result?.error === 'User is not verified in ZUP') {\n      showErrorMessage('Вказаний номер телефону не верифікований');\n    }\n\n    if (status === EApiResponseStatus.SUCCESS) {\n      checkOTPRun.value = true;\n      startTimer();\n    }\n\n    if (status === EApiResponseStatus.ERROR) {\n      showErrorMessage('Виникла невідома помилка');\n    }\n  } catch (error) {\n    console.error(error);\n  } finally {\n    isLoadingSendOTP.value = false;\n  }\n};\n\nconst buttonText = computed(() => {\n  if (!checkOTPRun.value) {\n    return 'Відправити повторно';\n  }\n  if (checkOTPRun.value) {\n    return 'Відправити повторно через';\n  }\n  return 'Застосувати';\n});\n\nconst isDisabledConfirmButton = computed<boolean>(() => !login.value || form.otpField.length !== 4);\n\nconst close = (): void => {\n  stopTimer();\n  setDefaultTimerOTP();\n  closeModal(EModalNames.personOtpConfirmationModal);\n};\n\nconst showErrorMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.error, new Error(text));\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst showSuccessMessage = (text: string) => {\n  try {\n    emitter.emit(EEmitterEventNames.success, { text });\n  } catch (error) {\n    console.error(error);\n  }\n};\n\nconst mountTimer = () => {\n  checkOTPRun.value = true;\n  startTimer();\n};\n\nconst closeAllModal = () => {\n  closeModal(EModalNames.signatureNovaKeyModal);\n  closeModal(EModalNames.personConfirmationModal);\n  closeModal(EModalNames.personOtpConfirmationModal);\n  closeModal(EModalNames.readEDSModal);\n  bulkActionsDialogConfig.value.list = [];\n};\n\nconst encryptValue = (value) => {\n  try {\n    const publicKey = forge.pki.publicKeyFromPem(publicKeyPem.trim());\n\n    const encryptedBytes = publicKey.encrypt(value, 'RSAES-PKCS1-V1_5');\n    const encryptedBase64 = forge.util.encode64(encryptedBytes);\n    return encryptedBase64;\n  } catch (err) {\n    console.error('Ошибка шифрования:', err);\n    return null;\n  }\n};\n\nconst signAttachment = async (): Promise<void> => {\n  loading.value = true;\n\n  const contractorId = signContractorId.value;\n  const encryptedLogin = encryptValue(login.value);\n  const encryptedPassword = encryptValue(form.otpField);\n  const signMethod = 'cloudOTP';\n  const documentId = currentDocument.value?.id;\n  const attachmentId = selectedAttachmentId.value;\n\n  try {\n    const { result } = await documentsModule.gryadaAttachmentSign(\n      documentId,\n      attachmentId,\n      contractorId,\n      login,\n      password,\n      signMethod,\n    );\n\n    if (result?.status === 'unknownError') {\n      showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n      return;\n    }\n\n    if (result?.error) {\n      showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n      return;\n    }\n\n    if (result?.status === 'success') {\n      closeAllModal();\n      showSuccessMessage('Вкладення успішно підписано');\n    }\n  } catch (error) {\n    showErrorMessage(error);\n  } finally {\n    loading.value = false;\n  }\n};\n\nconst signDocument = async (): Promise<void> => {\n  loading.value = true;\n\n  const documentId = currentDocument.value?.id;\n  const contractorId = signContractorId.value;\n  const encryptedLogin = encryptValue(login.value);\n  const encryptedPassword = encryptValue(form.otpField);\n  const signMethod = 'cloudOTP';\n\n  if (companyAddRoutes.value.includes(route.name)) {\n    try {\n      const responseStatus = await contractorsModule.gryadaSignDefaultFile(\n        encryptedLogin,\n        encryptedPassword,\n        signMethod,\n        props.uid,\n      );\n\n      switch (responseStatus) {\n      case EContractorsOperationsStatus.SUCCESS:\n        closeAllModal();\n        showSuccessMessage(t(`general.apiMessages.contractors.${EContractorsOperationsStatus.SUCCESS}`));\n        break;\n      case EContractorsOperationsStatus.UNKNOWN_ERROR:\n        showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n        break;\n      default:\n        showErrorMessage(t(`general.apiMessages.contractors.${responseStatus}`));\n        break;\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  } else {\n    try {\n      const docsToSign = bulkActionsDialogConfig.value.list;\n      const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n      if (docsToSign && docsToSign.length > 0) {\n        for (const doc of docsToSign) {\n          const attachSignatures = doc.attachSignatures ?? [];\n          const attachmentsToSign = attachSignatures.filter(\n            (signature) => signature.status === 'ready' && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n          );\n\n          for (const signature of attachmentsToSign) {\n            const { result } = await documentsModule.gryadaAttachmentSign(\n              doc.id,\n              signature.attach_object_id,\n              contractorId,\n              login,\n              password,\n              signMethod,\n            );\n\n            if (result?.status === 'unknownError') {\n              showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n              return;\n            }\n\n            if (result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status !== 'success') {\n              showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n              return;\n            }\n\n            if (result?.status === 'success') {\n              showSuccessMessage('Вкладення успішно підписано');\n            }\n          }\n\n          try {\n            const result = await documentsModule.gryadaDocumentSign(\n              contractorId,\n              doc.id,\n              encryptedLogin,\n              encryptedPassword,\n              signMethod,\n              doc,\n            );\n\n            if (result?.result?.error === 'invalid OTP for GryadaSignSession') {\n              showErrorMessage('Ви ввели невірний OTP');\n            }\n\n            if (result?.result?.error) {\n              showErrorMessage(t(`general.apiMessages.documents.${result.result.status}`));\n            }\n\n            if (result?.result?.status.toUpperCase() === EApiResponseStatus.SUCCESS) {\n              showSuccessMessage('Документ успішно підписано');\n            }\n          } catch (error) {\n            showErrorMessage(error);\n          }\n        }\n\n        closeAllModal();\n      } else {\n        const attachSignatures = currentDocument.value.attachSignatures ?? [];\n        const { key_type: keyType, tax_number: taxNumber } = await documentsModule.gryadaIdentifyKey(login, password, signMethod);\n\n        const attachmentsToSign = attachSignatures.filter(\n          (signature) => signature.status === 'ready'\n                && signature.required && signature.type === keyType && signature.tax_number === taxNumber,\n        );\n\n        for (const signature of attachmentsToSign) {\n          const { result } = await documentsModule.gryadaAttachmentSign(\n            documentId,\n            signature.attach_object_id,\n            contractorId,\n            login,\n            password,\n            signMethod,\n          );\n\n          if (result?.status === 'unknownError') {\n            showErrorMessage('Виникла помилка, файл ключа пошкоджено, або пароль не вірний');\n            return;\n          }\n\n          if (result?.error) {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status !== 'success') {\n            showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n            return;\n          }\n\n          if (result?.status === 'success') {\n            showSuccessMessage('Вкладення успішно підписано');\n          }\n        }\n\n        const { result } = await documentsModule.gryadaDocumentSign(\n          contractorId,\n          currentDocument.value.id,\n          encryptedLogin,\n          encryptedPassword,\n          signMethod,\n        );\n\n        if (result?.error === 'invalid OTP for GryadaSignSession') {\n          showErrorMessage('Ви ввели невірний OTP код');\n          return;\n        }\n\n        if (result?.error) {\n          showErrorMessage(t(`general.apiMessages.documents.${result?.status}`));\n          return;\n        }\n\n        if (result?.status === 'success') {\n          closeAllModal();\n          showSuccessMessage('Документ успішно підписано');\n        }\n      }\n    } catch (error) {\n      showErrorMessage(error);\n    } finally {\n      loading.value = false;\n    }\n  }\n};\n\nwatch(\n  () => props.login,\n  (newVal) => {\n    login.value = newVal;\n  },\n  { immediate: true },\n);\n\nonBeforeUnmount(async () => {\n  close();\n  stopTimer();\n});\n</script>\n\n<style scoped lang=\"scss\">\n.gryada__input {\n  height: 2.5rem !important;\n\n  :deep(.nd-input-text__label--empty),\n  :deep(.nd-input-text__input) {\n    @include typography('inter-12');\n    font-weight: 400;\n  }\n\n  :deep(.nd-input-text__label--valid),\n  :deep(.nd-input-text__label--invalid), {\n    @include typography('inter-10');\n    font-weight: 400;\n  }\n\n  &:first-child {\n    margin-bottom: 5px;\n  }\n}\n\n.gryada__title {\n  @include typography('inter-semibold-12');\n  margin-top: 16px;\n  font-weight: 600;\n}\n\n.gryada__subTitle {\n  @include typography('inter-12');\n  font-weight: 400;\n  margin-top: 10px;\n  margin-bottom: 10px;\n  color: $light_500;\n}\n\n.nova-key__forgot-password {\n  @include typography('inter-12');\n  cursor: pointer;\n  display: flex;\n  justify-content: flex-end;\n  font-weight: 400;\n  margin-top: 10px;\n  text-decoration: underline;\n  color: $pale_aqua_dark;\n}\n\n.modal__footer {\n  @include size(100%, auto);\n\n  .modal__button-left {\n    @include flex(column, center, center);\n    @include size(2.5rem, 2.5rem);\n    background-color: $light_100;\n    border-radius: 8px;\n    cursor: pointer;\n\n    @include hover() {\n      background-color: $light_200;\n    }\n\n    .nd-button__icon-back {\n      transform: rotate(180deg);\n    }\n\n    @include mobile() {\n      @include size(30px, 30px);\n    }\n  }\n\n  .modal__button-right {\n    @include size(14.5rem, 2.5rem);\n    cursor: pointer;\n\n    :deep(.nd-button__text) {\n      margin-left: 0;\n      text-align: center;\n    }\n\n    @include mobile() {\n      @include size(85%, 30px);\n    }\n  }\n}\n\n.gryadaEmail-block,\n.gryadaOtp-block,\n.gryadaTimer-block {\n  @include flex(row, space-between, flex-end);\n  @include mobile() {\n    @include flex(column, space-between, center);\n  }\n\n  .gryada-block-input {\n    @include size(calc(100% - 13rem), 2.5rem);\n\n    :deep(.nd-input-text__input) {\n      padding: 0.25rem 1rem;\n      @include typography('inter-12');\n      font-weight: 400;\n    }\n    :deep(.nd-input-text__input:disabled) {\n      color: $light_400;\n    }\n    @include tablet() {\n      :deep(.nd-input-text__input) {\n        @include typography('inter-16');\n        font-weight: 400;\n      }\n    }\n    @include mobile() {\n      @include size(100%, 2.5rem);\n      margin-right: 0rem;\n      :deep(.nd-input-text__input) {\n        @include typography('inter-16');\n        font-weight: 400;\n      }\n    }\n  }\n\n  .gryada-block-button {\n    min-width: 8.5rem;\n    text-align: center;\n    @include flex(column, center, center);\n    margin-bottom: 0;\n    text-wrap: nowrap;\n\n    .nd-button {\n      @include size(11.25rem, 2.5rem);\n      min-height: 40px !important;\n\n      :deep(.nd-button__inner) {\n        @include flex(row, center, center);\n      }\n\n      :deep(.nd-button__text) {\n        margin-left: 0rem;\n      }\n      @include tablet() {\n        :deep(.nd-button__text) {\n          @include typography('inter-medium-16');\n          font-weight: 500;\n        }\n      }\n      @include mobile() {\n        @include size(100%);\n        :deep(.nd-button__text) {\n          @include typography('inter-medium-18');\n          font-weight: 500;\n        }\n      }\n    }\n\n    @include mobile() {\n      @include size(100%, 5.3rem);\n\n      &:not(.send-otp-btn) {\n        @include size(100%, 9rem);\n      }\n\n      position: absolute;\n      bottom: 0;\n      left: 0;\n      background-color: $light_000;\n      padding: 1.25rem;\n    }\n  }\n\n  .send-otp-btn {\n    @include flex(column, flex-end, flex-end);\n\n    .nd-button {\n      z-index: 1;\n    }\n  }\n\n  .check-otp-btn {\n    @include flex(column, flex-start, center);\n  }\n\n}\n\n.send-otp-btn {\n  margin-top: 16px;\n\n  @include mobile() {\n    margin-top: 5px;\n  }\n}\n\n:deep(.nd-input-otp) {\n  height: 40px !important;\n  border-bottom-width: inherit !important;\n\n  @include mobile() {\n    height: 30px !important;\n  }\n}\n\n:deep(.nd-input-otp__input) {\n  height: 40px !important;\n  background-color: $light_050;\n  border-radius: 8px;\n\n  @include mobile() {\n    height: 30px !important;\n  }\n}\n\n:deep(.nd-input-text__label--disabled) {\n  opacity: 1;\n  color: #94A3B8;\n}\n</style>\n","import script from \"./GryadaOtpModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./GryadaOtpModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./GryadaOtpModal.vue?vue&type=style&index=0&id=37a256f4&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-37a256f4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withModifiers as _withModifiers, normalizeClass as _normalizeClass, isRef as _isRef, resolveDirective as _resolveDirective, withDirectives as _withDirectives, withCtx as _withCtx, createBlock as _createBlock, vShow as _vShow, Fragment as _Fragment, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"read-eds-form ND-modal__body\" }\nconst _hoisted_2 = { class: \"read-eds-form__content\" }\nconst _hoisted_3 = { class: \"file-signature__ui\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"keystore\"\n}\nconst _hoisted_5 = { class: \"add-keystore-ui__caption\" }\nconst _hoisted_6 = {\n  key: 1,\n  class: \"read-keystore-ui\"\n}\nconst _hoisted_7 = { class: \"read-keystore-ui__filename\" }\nconst _hoisted_8 = {\n  key: 1,\n  class: \"keystore\"\n}\nconst _hoisted_9 = { class: \"add-keystore-ui__caption\" }\nconst _hoisted_10 = {\n  key: 1,\n  class: \"read-keystore-ui\"\n}\nconst _hoisted_11 = { class: \"read-keystore-ui__filename\" }\nconst _hoisted_12 = { class: \"file-signature__settings\" }\nconst _hoisted_13 = {\n  key: 0,\n  class: \"read-eds-form_checkbox\"\n}\nconst _hoisted_14 = { class: \"read-eds-form_checkbox\" }\nconst _hoisted_15 = { class: \"read-eds-form_checkbox__title\" }\nconst _hoisted_16 = { class: \"read-eds-form_checkbox__icon-container\" }\nconst _hoisted_17 = {\n  key: 0,\n  class: \"cloud-signature_diia-mobile\"\n}\nconst _hoisted_18 = {\n  key: 1,\n  class: \"cloud-signature_diia\"\n}\nconst _hoisted_19 = { class: \"cloud_signature_diia-header\" }\nconst _hoisted_20 = { class: \"cloud_signature_diia-header__title\" }\nconst _hoisted_21 = { class: \"cloud_signature_diia-header__subTitle\" }\nconst _hoisted_22 = {\n  key: 2,\n  style: {\"width\":\"100%\",\"margin-top\":\"5px\"}\n}\nconst _hoisted_23 = {\n  key: 3,\n  class: \"ksp-signature\"\n}\nconst _hoisted_24 = {\n  key: 2,\n  class: \"cloud-signature_diia ksp-signature__confirm\"\n}\nconst _hoisted_25 = { class: \"cloud_signature_diia-header\" }\nconst _hoisted_26 = {\n  key: 0,\n  class: \"cloud_signature_diia-header__subTitle\"\n}\nconst _hoisted_27 = [\"href\"]\nconst _hoisted_28 = [\"src\"]\nconst _hoisted_29 = { key: 0 }\nconst _hoisted_30 = { class: \"read-eds-form__footer\" }\nconst _hoisted_31 = { class: \"read-eds-form__button-right\" }\nconst _hoisted_32 = {\n  key: 0,\n  class: \"timer-counter\"\n}\n\nimport {\n  computed, onBeforeMount, onBeforeUnmount, onMounted, Ref, ref, watch,\n} from 'vue';\nimport { useFileDialog } from '@vueuse/core';\nimport {\n  NdButton, NdCheckbox, NdInputPassword, Tabs, Tab, NdQrCode, ENdButtonTypes,\n} from '@/components/v2/ui';\nimport NdInput from '@/components/NdInput.vue';\nimport { kspRequiresUserId } from '@/modules/eds/ksp';\nimport { ensureKSPInitialized, prefetchKSPServers, prepareForKSPSigning } from '@/modules/eds/euscpKsp';\nimport { otpTimerFunctions, timerOTPObject } from '@/components/v2/views/auth/modules/otpModule';\nimport { supportedEDSFileTypes } from '@/config';\nimport { useGetBreakpoints } from '@/lib/core/composables';\nimport { useI18n } from 'vue-i18n';\nimport { useEDSModule } from '@/modules/store/eds';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { useUserModule } from '@/modules/store/user';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { EReadEdsDialogActions } from '@/components/v2/common/eds/EReadEdsDialogActions';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport { ESignatureType } from '@/lib/models/Signature/ESignatureType';\nimport { minLength, required } from '@vuelidate/validators';\nimport { BaseValidation, useVuelidate } from '@vuelidate/core';\nimport { isEdsError } from '@/modules/eds/EdsError';\nimport { DateFormatter, FileConverter } from '@/lib/core/helpers';\nimport { Loader } from '@/components/ui';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { EWSEventNamesDocuments } from '@/modules/ws/EWSEventNames';\nimport { EDocumentActions } from '@/lib/models/Document/EDocumentActions';\nimport { i18n } from '@/modules/i18n';\nimport { EContractorsOperationsStatus } from '@/modules/api/Contractors.api';\nimport { EContractorActions } from '@/lib/models/Contractor/EContractorActions';\nimport GryadaSignModal from '@/components/v2/common/eds/GryadaSignModals/GryadaSignModal.vue';\nimport GryadaFogrotPasswordModal from '@/components/v2/common/eds/GryadaSignModals/GryadaFogrotPasswordModal.vue';\nimport GryadaOtpModal from '@/components/v2/common/eds/GryadaSignModals/GryadaOtpModal.vue';\nimport { useRoute } from 'vue-router';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { authApi } from '@/modules/api/Auth.api';\nimport { useAuthModule } from '@/modules/store/auth';\nimport { IDocument } from '@/lib/models/Document/Document';\nimport { useSignContractorId } from '@/lib/core/composables/useSignContractorId';\nimport { useTutorialModule } from '@/modules/store/tutorial';\nimport PersonOtpConfirmationModal from '@/components/v2/common/eds/GryadaSignModals/PersonOtpConfirmationModal.vue';\nimport PersonConfirmationModal from '@/components/v2/common/eds/GryadaSignModals/PersonConfirmationModal.vue';\nimport SignatureNovaKeyModal from '@/components/v2/common/eds/GryadaSignModals/SignatureNovaKeyModal.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'ReadEDSForm',\n  setup(__props) {\n\nconst userModule = useUserModule();\nconst contractorModule = useContractorsModule();\nconst {\n  createLinkContractorCloudDigitalSign, subscribeToContractorWS, unSubscribeToContractorWS, getMyContractors,\n} = contractorModule;\nconst { existingContractor } = storeToRefs(contractorModule);\nconst tutorialModule = useTutorialModule();\nconst documentsModule = useDocumentsModule();\nconst {\n  createDocumentDigitalSign, subscribeToDocumentWS, unSubscribeToDocumentWS, currentDocument, getDocument, updateDocuments,\n} = documentsModule;\nconst tokenKeyMedia = ref<any>([]);\nconst { saveEds } = storeToRefs(useUserModule());\nconst { t } = useI18n();\nconst route = useRoute();\nconst edsModule = useEDSModule();\nconst { resetSignature, resetStamp, resetKSPData } = edsModule;\nconst {\n  keystoreList,\n  signatureTaxNumber,\n  signatureCompanyName,\n  stampTaxNumber,\n  stampCompanyName,\n  keyTypeDevice,\n  tokenData,\n  kspData,\n  kspConfirmEvent,\n} = storeToRefs(edsModule);\nconst { isMobile } = useGetBreakpoints();\nconst authModule = useAuthModule();\nconst { isGryadaHiddenByQuery } = storeToRefs(authModule);\nconst {\n  readEdsDialogConfig, closeModal, openModal, setModalWrapperEvent,\n} = useUiModule();\nconst { signContractorId } = useSignContractorId();\nconst { beforeCloseModalOperation, bulkActionsDialogConfig } = storeToRefs(useUiModule());\n\nconst tabs = [\n  { title: 'Файловий' },\n  { title: 'Хмарний' },\n  { title: 'Апаратний' },\n];\n\nconst kspUiOpen = ref(false);\nconst loadKsp = ref(false);\nconst kspServers = ref<any[]>([]);\nconst selectedKsp = ref<any>(null);\nconst kspOptions = computed(() => kspServers.value.map((server) => ({\n  label: server.name,\n  value: server.name,\n  ...server,\n})));\n\nconst tokenKey = ref<any>(null);\nconst edsTokenInterval = ref<any>(null);\nconst gryadaUid = ref<string>('');\n\nconst options = ref([]);\nconst resultInit = ref<any>({\n  supported: false,\n  isWebExtensionSupported: false,\n  isWebExtensionInstalled: false,\n  helpURL: '',\n  webExtensionInstallURL: '',\n});\n\nconst signatureDescription = computed(() => {\n  if (!keystoreList.value.signature.loadedSignature) return keystoreList.value.signature.file?.name;\n  if (!keystoreList.value.signature.loadedSignature.canBeUsed) return keystoreList.value.signature.file?.name;\n  return `${signatureTaxNumber.value}; ${signatureCompanyName.value}`;\n});\n\nconst stampDescription = computed(() => {\n  if (!keystoreList.value.stamp.loadedSignature) return keystoreList.value.stamp.file?.name;\n  if (!keystoreList.value.stamp.loadedSignature.canBeUsed) return keystoreList.value.stamp.file?.name;\n  return `${stampTaxNumber.value}; ${stampCompanyName.value}`;\n});\n\nconst activeTab = ref(0);\nconst signatureUi = ref(false);\nconst stampUi = ref(false);\nconst login = ref('');\nconst phoneNumber = ref('');\nconst keyType = ref<ESignatureType>(ESignatureType.signature);\nconst signaturePassword = computed(() => keystoreList.value.signature.password);\nconst stampPassword = computed(() => keystoreList.value.stamp.password);\nconst minSignaturePasswordLength = ref(1);\nconst minStampPasswordLength = ref(1);\nconst validationRules = computed(() => ({\n  signaturePassword: {\n    required,\n    minLength: minLength(minSignaturePasswordLength),\n  },\n  stampPassword: {\n    required,\n    minLength: minLength(minStampPasswordLength),\n  },\n}));\nconst validator: Ref<BaseValidation> = useVuelidate(validationRules, { signaturePassword, stampPassword });\nconst timeOutId = ref<any>(null);\nconst isQrcodeActive = ref<boolean>(false);\nconst qrCodeMode = ref<boolean>(false);\nconst loadEds = ref<boolean>(false);\nconst edsInitResult = ref<any>(null);\n/*\n* Adds file to keystoreList if it has supported file format\n* */\nconst addFileToKeystoreList = (fileList: File[] | FileList | null): void => {\n  const supportedFileTypesArray = supportedEDSFileTypes\n    .split(', ')\n    .map((str: string) => str.substring(1));\n\n  if (fileList) {\n    for (let i = 0; i < fileList.length; i += 1) {\n      const file = fileList instanceof FileList ? fileList.item(i) as File : fileList[i];\n      const extension = file.name.split('.').pop() as string;\n      if (supportedFileTypesArray.includes(extension.toLowerCase())) {\n        if (keyType.value === ESignatureType.signature) {\n          keystoreList.value.signature.file = file;\n        }\n        if (keyType.value === ESignatureType.stamp) {\n          keystoreList.value.stamp.file = file;\n        }\n      } else {\n        try {\n          emitter.emit(\n            EEmitterEventNames.error,\n            new Error(\n              `${t('components.common.eds.ReadEDSForm.selectKeystoreFileForm.notSupportedFileTypeError')} ${supportedEDSFileTypes}`,\n            ),\n          );\n        } catch (error) {\n          console.error(error);\n        }\n      }\n    }\n  }\n};\n// select file\nconst {\n  files,\n  open,\n  reset,\n} = useFileDialog({\n  multiple: false,\n  reset: true,\n  accept: isMobile.value ? '' : supportedEDSFileTypes,\n});\nwatch(files, (fileList: FileList | null) => addFileToKeystoreList(fileList));\n\nconst openNewFile = ($keyType: ESignatureType): void => {\n  keyType.value = $keyType;\n  minSignaturePasswordLength.value = 1;\n  minStampPasswordLength.value = 1;\n  open();\n};\n\nconst openSignatureUi = () => {\n  signatureUi.value = true;\n  openNewFile(ESignatureType.signature);\n};\n\nconst openStampUi = () => {\n  stampUi.value = true;\n  openNewFile(ESignatureType.stamp);\n};\n\nconst handleSetLogin = (value) => {\n  login.value = value;\n};\n\nconst handleSetPhoneNumber = (value) => {\n  phoneNumber.value = value;\n};\n\nconst isShowRefreshButton = computed(() => {\n  const isCorrectTab = activeTab.value === 2;\n\n  const isWebExtMissing = !resultInit?.value?.supported\n      || !resultInit?.value?.isWebExtensionSupported\n      || !resultInit?.value?.isWebExtensionInstalled;\n\n  return isCorrectTab && isWebExtMissing;\n});\n\nconst submitButtonIsEnabled = computed(() => {\n  const signatureIsValid = signatureUi.value\n    ? typeof keystoreList.value.signature.file !== 'undefined' && !validator.value.signaturePassword.$invalid\n    : true;\n  const stampIsValid = stampUi.value\n    ? typeof keystoreList.value.stamp.file !== 'undefined' && !validator.value.stampPassword.$invalid\n    : true;\n\n  if (activeTab.value === 1 && kspUiOpen.value) {\n    if (!selectedKsp.value) return false;\n    if (kspRequiresUserId(selectedKsp.value) && !kspData.value.userId?.trim()) return false;\n    return true;\n  }\n\n  if (tokenKey.value && tokenKey.value?.label !== '') return true;\n  if (!signatureUi.value && !stampUi.value) return false;\n  return signatureIsValid && stampIsValid && activeTab.value === 0;\n});\n\nconst isLoading = ref(false);\nconst qrUrlValue = ref('');\n\nconst openDiiaApp = (): void => {\n  if (isMobile.value && qrUrlValue.value) {\n    window.location.replace(qrUrlValue.value);\n  }\n};\n\nconst hasUnsignedAttachments = computed(() => currentDocument?.attachSignatures?.some(\n  (signature) => signature.required === true && signature.status === 'ready',\n) ?? false);\n\nconst generateQRCodeForAddingDiiaContractor = async () => {\n  readEdsDialogConfig.showTabsHeader = false;\n  if (!qrCodeMode.value) {\n    isLoading.value = true;\n  }\n  qrCodeMode.value = true;\n  isQrcodeActive.value = false;\n  const res = await createLinkContractorCloudDigitalSign();\n  await subscribeToContractorWS(EWSEventNamesDocuments.diiaSign, res?.requestId);\n  emitter.on(EWSEventNamesDocuments.diiaSign, async (wsMessage: any) => {\n    const {\n      message,\n      status,\n    } = JSON.parse(wsMessage);\n\n    if (status === 'success') {\n      emitter.emit(\n        EEmitterEventNames.success,\n        { text: t(`general.contractorActionMessages.success.${EContractorActions.add}`) },\n      );\n    }\n\n    if (status === 'error') {\n      try {\n        emitter.emit(\n          EEmitterEventNames.error,\n          new Error(`${t(`general.contractorActionMessages.error.${EContractorActions.add}`)}, ${message}`),\n        );\n      } catch (error) {\n        console.error(error);\n      }\n      isQrcodeActive.value = false;\n    }\n\n    emitter.off(EWSEventNamesDocuments.diiaSign);\n\n    await unSubscribeToContractorWS(EWSEventNamesDocuments.diiaSign, res?.requestId);\n    beforeCloseModalOperation.value = null;\n    otpTimerFunctions.stopTimer();\n    otpTimerFunctions.setDefaultTimerOTP();\n    closeModal(EModalNames.readEDSModal);\n    await userModule.getUserProfile();\n  });\n\n  if (res?.status === EApiResponseStatus.SUCCESS) {\n    otpTimerFunctions.setDefaultTimerValues(3, 0);\n    otpTimerFunctions.setDefaultTimerOTP();\n    otpTimerFunctions.startTimer();\n    qrUrlValue.value = res.url;\n    if (isMobile.value) {\n      openDiiaApp();\n      await closeModal(EModalNames.readEDSModal);\n    }\n  }\n\n  isLoading.value = false;\n};\n\nconst startDiiaQrForDocumentsBulk = async (): Promise<any> => {\n  readEdsDialogConfig.showTabsHeader = false;\n  await subscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n  if (!qrCodeMode.value) {\n    isLoading.value = true;\n  }\n  qrCodeMode.value = true;\n  isQrcodeActive.value = false;\n\n  const docsToSign = bulkActionsDialogConfig.value?.list ?? [];\n\n  const documentIds = docsToSign.map((doc) => doc.id);\n\n  const attachmentIds = docsToSign.flatMap((doc) => (doc.attachSignatures ?? [])\n    .filter((s) => s.required\n          && s.status === 'ready'\n          && s.type === 'signature'\n          && s.contractor_id === signContractorId.value)\n    .map((s) => s.attach_object_id));\n\n  const handler = async (wsMessage: any) => {\n    const { status, message } = JSON.parse(wsMessage);\n\n    if (status === 'success') {\n      emitter.emit(EEmitterEventNames.success, {\n        text: 'Документи підписано',\n      });\n\n      await updateDocuments(documentIds);\n    }\n\n    if (status === 'error') {\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error(`Помилка підписання: ${message}`),\n      );\n    }\n\n    emitter.off(EWSEventNamesDocuments.diiaSign, handler);\n    await unSubscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n    closeModal(EModalNames.readEDSModal);\n  };\n\n  emitter.on(EWSEventNamesDocuments.diiaSign, handler);\n\n  const res = await createDocumentDigitalSign(attachmentIds, documentIds);\n\n  if (res?.status === EApiResponseStatus.SUCCESS) {\n    qrUrlValue.value = res.url;\n    if (isMobile.value) {\n      openDiiaApp();\n      await closeModal(EModalNames.readEDSModal);\n    }\n  }\n\n  isLoading.value = false;\n  return res;\n};\n\nconst startDiiaQrForDocument = async (): Promise<any> => {\n  const documentId = currentDocument.id;\n  const attachmentIds = currentDocument?.attachSignatures\n    .filter((s) => s.required && s.status === 'ready' && s.type === 'signature' && s.contractor_id === signContractorId.value)\n    .map((s) => s.attach_object_id);\n\n  if (!documentId) {\n    console.error('startDiiaQrForDocument: documentId is missing');\n    return null;\n  }\n\n  return await createDocumentDigitalSign(attachmentIds, documentId);\n};\n\nconst startDiiaQrForAttachment = async (\n  attachmentId: number | number[],\n): Promise<any> => {\n  const documentId = currentDocument.id;\n\n  if (!documentId) {\n    console.error('startDiiaQrForAttachment: documentId is missing');\n    return null;\n  }\n\n  return await createDocumentDigitalSign(attachmentId, documentId);\n};\n\nconst startDiiaQrFlow = async (): Promise<any> => {\n  const { selectedAttachmentId } = storeToRefs(useDocumentsModule());\n\n  if (route.name === ERouteNames.allDocuments) {\n    await startDiiaQrForDocumentsBulk();\n    return null;\n  }\n\n  if (route.name === ERouteNames.document && selectedAttachmentId.value === null) {\n    return await startDiiaQrForDocument();\n  }\n\n  if (selectedAttachmentId.value !== null) {\n    const res = await startDiiaQrForAttachment(selectedAttachmentId.value);\n    selectedAttachmentId.value = null;\n    return res;\n  }\n\n  return null;\n};\n\nconst generateQRCodeForDiiaSign = async () => {\n  await subscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n  readEdsDialogConfig.showTabsHeader = false;\n  if (!qrCodeMode.value) {\n    isLoading.value = true;\n  }\n  qrCodeMode.value = true;\n  isQrcodeActive.value = false;\n\n  const res = await startDiiaQrFlow();\n\n  if (!res) {\n    isLoading.value = false;\n    return;\n  }\n\n  emitter.on(EWSEventNamesDocuments.diiaSign, async (wsMessage: any) => {\n    const {\n      message,\n      status,\n    } = JSON.parse(wsMessage);\n\n    if (status === 'success') {\n      emitter.emit(\n        EEmitterEventNames.success,\n        { text: `${t(`general.documentActionMessages.success.${EDocumentActions.sign}`, [currentDocument?.name])}` },\n      );\n      await getDocument(currentDocument?.id as number);\n      emitter.emit(EEmitterEventNames.updateDocument);\n    }\n\n    if (status === 'error') {\n      try {\n        emitter.emit(\n          EEmitterEventNames.error,\n          new Error(\n            `${t(`general.documentActionMessages.error.${EDocumentActions.sign}`, [currentDocument?.name])}${message}.`,\n          ),\n        );\n      } catch (error) {\n        console.error(error);\n      }\n      isQrcodeActive.value = false;\n    }\n\n    emitter.off(EWSEventNamesDocuments.diiaSign);\n\n    await unSubscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n    beforeCloseModalOperation.value = null;\n    otpTimerFunctions.stopTimer();\n    otpTimerFunctions.setDefaultTimerOTP();\n    closeModal(EModalNames.readEDSModal);\n  });\n\n  if (res?.status === EApiResponseStatus.SUCCESS) {\n    otpTimerFunctions.setDefaultTimerValues(3, 0);\n    otpTimerFunctions.setDefaultTimerOTP();\n    otpTimerFunctions.startTimer();\n    qrUrlValue.value = res.url;\n    if (isMobile.value) {\n      openDiiaApp();\n      await closeModal(EModalNames.readEDSModal);\n    }\n  }\n\n  isLoading.value = false;\n};\n\nconst checkCertEndDate = async () => {\n  const certEndTimeStr = keystoreList.value?.signature?.loadedSignature?.certEndTime;\n  if (!certEndTimeStr) return;\n\n  const certEndDate = new Date(certEndTimeStr);\n  const currentDate = new Date();\n  const warningDate = new Date(currentDate);\n  warningDate.setDate(currentDate.getDate() + 30);\n\n  if (certEndDate <= warningDate) {\n    const formatedCertEndDate = DateFormatter.toHumanReadable(certEndDate);\n    emitter.emit(\n      EEmitterEventNames.info,\n      {\n        text: `Термін дії сертифікату вашого ключа КЕП закінчується ${formatedCertEndDate}.\n        Рекомендуємо вчасно звернутись до вашого кваліфікованого надавача електронних довірчих послуг, для продовження використання КЕП`,\n      },\n    );\n  }\n};\n\nconst generateQR = async () => {\n  kspUiOpen.value = false;\n  if (readEdsDialogConfig.dialogAction === EReadEdsDialogActions.contractorAdding) {\n    await generateQRCodeForAddingDiiaContractor();\n  } else {\n    await generateQRCodeForDiiaSign();\n  }\n};\n\nconst openKspUi = async (): Promise<void> => {\n  kspUiOpen.value = true;\n  qrUrlValue.value = '';\n  qrCodeMode.value = false;\n  keyTypeDevice.value = 'ksp';\n  stampUi.value = false;\n  edsModule.resetSignature(true);\n  await prepareForKSPSigning();\n\n  if (kspServers.value.length) {\n    return;\n  }\n\n  loadKsp.value = true;\n  try {\n    kspServers.value = await ensureKSPInitialized();\n    if (kspOptions.value.length === 1) {\n      selectedKsp.value = kspOptions.value[0];\n    }\n  } catch (error) {\n    console.error('KSP initialization error:', error);\n    emitter.emit(EEmitterEventNames.error, new Error('Не вдалося завантажити список сервісів хмарного підпису'));\n    kspUiOpen.value = false;\n  } finally {\n    loadKsp.value = false;\n  }\n};\n\nconst resetKspUi = async (): Promise<void> => {\n  kspUiOpen.value = false;\n  selectedKsp.value = null;\n  const { resetOperationKSP, setKSPConfirmCallback, prepareForKSPSigning } = await import('@/modules/eds/euscpKsp');\n  setKSPConfirmCallback(null);\n  await resetOperationKSP();\n  await prepareForKSPSigning();\n  resetKSPData();\n};\n\nconst submit = async (): Promise<void> => {\n  isLoading.value = true;\n  let canApplySignature = false;\n  let canApplyStamp = false;\n  if (activeTab.value === 2) {\n    signatureUi.value = true;\n    keyTypeDevice.value = 'token';\n  } else if (activeTab.value === 1 && kspUiOpen.value) {\n    stampUi.value = false;\n    keyTypeDevice.value = 'ksp';\n    kspData.value.kspName = selectedKsp.value?.name || selectedKsp.value?.label || '';\n    if (selectedKsp.value && kspRequiresUserId(selectedKsp.value)) {\n      kspData.value.userId = kspData.value.userId?.trim() || '';\n    }\n    edsModule.resetSignature(true);\n    await prepareForKSPSigning();\n    canApplySignature = Boolean(selectedKsp.value);\n  } else {\n    keyTypeDevice.value = 'file';\n  }\n  if (signatureUi.value && keyTypeDevice.value !== 'ksp') {\n    try {\n      minSignaturePasswordLength.value = 1;\n      tokenData.value = tokenKeyMedia.value?.find((el) => el.type === tokenKey.value.label);\n      edsModule.resetSignature(true);\n      await edsModule.readSignatureFromKeystore(edsModule.keystoreList.signature);\n      if (keystoreList.value.signature.loadedSignature?.isStamp) {\n        emitter.emit(EEmitterEventNames.error, new Error(\n          'Ви завантажили файл ключа печатки. Очистіть, будь ласка, поле та оберіть файл ключа підпису.',\n        ));\n      } else {\n        canApplySignature = true;\n      }\n    } catch (error) {\n      if (isEdsError(error)) {\n        if (error.code === 24) { // wrong password\n          minSignaturePasswordLength.value = 999;\n        }\n        try {\n          emitter.emit(EEmitterEventNames.error, new Error(error.message));\n          // eslint-disable-next-line no-empty\n        } catch ($e) {\n        }\n      }\n      console.error(error);\n      isLoading.value = false;\n    }\n  }\n\n  if (stampUi.value) {\n    try {\n      minStampPasswordLength.value = 1;\n      edsModule.resetStamp(true);\n      await edsModule.readSignatureFromKeystore(edsModule.keystoreList.stamp);\n      if (!keystoreList.value.stamp.loadedSignature?.isStamp) {\n        emitter.emit(EEmitterEventNames.error, new Error(\n          'Ви завантажили файл ключа підпису. Очистіть, будь ласка, поле та оберіть файл ключа печатки.',\n        ));\n      } else {\n        canApplyStamp = true;\n      }\n    } catch (error) {\n      if (isEdsError(error)) {\n        if (error.code === 24) { // wrong password\n          minStampPasswordLength.value = 999;\n        }\n        try {\n          emitter.emit(EEmitterEventNames.error, new Error(error.message));\n          // eslint-disable-next-line no-empty\n        } catch ($e) {\n        }\n      }\n      console.error(error);\n      isLoading.value = false;\n    }\n  }\n\n  let canProceed = false;\n  if (keyTypeDevice.value === 'ksp' && kspUiOpen.value) {\n    canProceed = canApplySignature;\n  } else if (signatureUi.value && !stampUi.value) {\n    canProceed = canApplySignature;\n  } else if (!signatureUi.value && stampUi.value) {\n    canProceed = canApplyStamp;\n  } else if (signatureUi.value && stampUi.value) {\n    canProceed = canApplySignature && canApplyStamp;\n  }\n  if (canProceed) {\n    if (keyTypeDevice.value !== 'ksp' && keystoreList.value?.signature?.file) {\n      keystoreList.value.signature.fileBase64 = await FileConverter.toBase64(keystoreList.value?.signature?.file as File) as string;\n      keystoreList.value.signature.password = keystoreList.value.signature.password as string;\n    }\n    if (keyTypeDevice.value !== 'ksp' && keystoreList.value?.stamp?.file) {\n      keystoreList.value.stamp.fileBase64 = await FileConverter.toBase64(keystoreList.value?.stamp?.file as File) as string;\n      keystoreList.value.stamp.password = keystoreList.value.stamp.password as string;\n    }\n    readEdsDialogConfig.signDocument = true;\n    await beforeCloseModalOperation.value();\n    isLoading.value = false;\n    if (keyTypeDevice.value === 'ksp') {\n      if (readEdsDialogConfig.dialogAction === EReadEdsDialogActions.contractorAdding) {\n        await resetKspUi();\n      }\n      closeModal(EModalNames.readEDSModal);\n    } else {\n      setTimeout(() => {\n        closeModal(EModalNames.readEDSModal);\n      }, 3000);\n      await openModal(EModalNames.readEDSModal);\n    }\n    beforeCloseModalOperation.value = async () => {\n      beforeCloseModalOperation.value = null;\n    };\n  } else {\n    isLoading.value = false;\n  }\n  await checkCertEndDate();\n};\n\nconst close = async (): Promise<void> => {\n  if (keyTypeDevice.value === 'ksp' || kspUiOpen.value) {\n    await resetKspUi();\n  }\n  setModalWrapperEvent('close');\n  readEdsDialogConfig.signDocument = false;\n  closeModal(EModalNames.readEDSModal);\n};\n\nconst resetSignatureLocal = (): void => {\n  resetSignature();\n  sessionStorage.removeItem('sessionKeystoreListPasswords');\n  localStorage.removeItem('sessionKeystoreList');\n};\n\nconst openHelpURL = (): void => {\n  if (resultInit?.value?.helpURL) {\n    window.open(resultInit.value.helpURL, '_blank');\n  }\n};\n\nconst openInstallURL = (): void => {\n  if (resultInit?.value?.webExtensionInstallURL) {\n    window.open(resultInit.value.webExtensionInstallURL, '_blank');\n  }\n};\n\nwatch(timerOTPObject, () => {\n  if (!isQrcodeActive.value && !timerOTPObject.isRun) {\n    isQrcodeActive.value = true;\n    clearTimeout(timeOutId.value);\n  }\n});\n\nwatch(kspConfirmEvent, (event) => {\n  if (event) {\n    isLoading.value = false;\n    readEdsDialogConfig.showTabsHeader = false;\n  }\n});\n\nwatch(selectedKsp, (ksp) => {\n  if (!ksp) {\n    kspData.value.kspName = '';\n    return;\n  }\n  kspData.value.kspName = ksp.name || ksp.label || '';\n  if (!kspRequiresUserId(ksp)) {\n    kspData.value.userId = '';\n  }\n});\n\nwatch(activeTab, async (val) => {\n  if (val !== 1) {\n    if (kspUiOpen.value) {\n      await resetKspUi();\n    }\n  }\n\n  if (val === 2 && !edsInitResult.value) {\n    loadEds.value = true;\n    try {\n      const { euscp } = await import('@/modules/eds/euscpSW');\n      edsInitResult.value = await euscp.init('sw');\n      resultInit.value = edsInitResult.value?.libraryInfo;\n      tokenKeyMedia.value = edsInitResult.value?.allMedias;\n      options.value = tokenKeyMedia.value?.map((token: any) => ({\n        label: token.type,\n        value: token.typeIndex,\n      })) || [];\n      if (options.value.length === 1) {\n        tokenKey.value = options.value[0];\n      }\n      edsTokenInterval.value = setInterval(async () => {\n        try {\n          const newTokenKeyMedia = await euscp.getKeyMedias();\n          const newLibraryInfo = await euscp.getLibraryInfo();\n          resultInit.value = newLibraryInfo;\n          if (JSON.stringify(newTokenKeyMedia) !== JSON.stringify(tokenKeyMedia.value)) {\n            tokenKeyMedia.value = newTokenKeyMedia;\n            options.value = tokenKeyMedia.value?.map((token: any) => ({\n              label: token.type,\n              value: token.typeIndex,\n            })) || [];\n            if (options.value.length === 1) {\n              tokenKey.value = options.value[0];\n            }\n            if (options.value.length === 0) {\n              tokenKey.value = null;\n            }\n          }\n        } catch {\n          resultInit.value = {\n            supported: false,\n            isWebExtensionSupported: false,\n            isWebExtensionInstalled: false,\n            helpURL: 'https://iit.com.ua/download/productfiles/EUSignWebOManual.pdf',\n            webExtensionInstallURL: 'https://chrome.google.com/webstore/detail/%D1%96%D1%96%D1%82-%D0%BA%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87-%D1%86%D1%81%D0%BA-1-%D0%B1%D1%96%D0%B1%D0%BB/jffafkigfgmjafhpkoibhfefeaebmccg?utm_source=chrome-app-launcher-info-dialog',\n          };\n        }\n      }, 2000);\n      loadEds.value = false;\n    } catch (error) {\n      console.log('EUSCP initialization error:', error);\n      if (!resultInit.value) {\n        resultInit.value = {\n          supported: false,\n          isWebExtensionSupported: false,\n          isWebExtensionInstalled: false,\n          helpURL: 'https://iit.com.ua/download/productfiles/EUSignWebOManual.pdf',\n          webExtensionInstallURL: 'https://chrome.google.com/webstore/detail/%D1%96%D1%96%D1%82-%D0%BA%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87-%D1%86%D1%81%D0%BA-1-%D0%B1%D1%96%D0%B1%D0%BB/jffafkigfgmjafhpkoibhfefeaebmccg?utm_source=chrome-app-launcher-info-dialog',\n        };\n      }\n      loadEds.value = false;\n    }\n  }\n  if (val !== 2) {\n    clearInterval(edsTokenInterval.value);\n  }\n});\n\nonBeforeMount(async () => {\n  clearInterval(edsTokenInterval.value);\n  try {\n    await prefetchKSPServers();\n  } catch (error) {\n    console.error('KSP prefetch error:', error);\n  }\n  if (saveEds.value && readEdsDialogConfig.showSaveEds) {\n    const sessionKeyStoreListObject = JSON.parse(localStorage.getItem('sessionKeystoreList') as string);\n    const sessionKeyStoreListPasswords = JSON.parse(sessionStorage.getItem('sessionKeystoreListPasswords') as string);\n    const sessionKeyStoreList = {\n      signature: {\n        ...sessionKeyStoreListObject?.signature,\n        password: sessionKeyStoreListPasswords?.signature?.password || '',\n      },\n      stamp: {\n        ...sessionKeyStoreListObject?.stamp,\n        password: sessionKeyStoreListPasswords?.stamp?.password || '',\n      },\n    };\n    if (sessionKeyStoreList && sessionKeyStoreList?.signature?.fileBase64 !== '' && sessionKeyStoreList?.signature?.password !== '') {\n      keystoreList.value = sessionKeyStoreList;\n      keystoreList.value.signature.file = FileConverter.base64ToFile(keystoreList.value.signature.fileBase64);\n      signatureUi.value = true;\n    }\n    if (sessionKeyStoreList && sessionKeyStoreList?.stamp?.fileBase64 !== '' && sessionKeyStoreList?.stamp?.password !== '') {\n      keystoreList.value = sessionKeyStoreList;\n      keystoreList.value.stamp.file = FileConverter.base64ToFile(keystoreList.value.stamp.fileBase64);\n      stampUi.value = true;\n    }\n  }\n});\n\nconst openNovaKeyModal = async () => {\n  kspUiOpen.value = false;\n  gryadaUid.value = await authModule.signAuthSessionCreate('gryada_link_contractor');\n  openModal(EModalNames.signatureNovaKeyModal);\n};\n\nconst reloadPage = (): void => {\n  window.location.reload();\n};\n\nonBeforeUnmount(async () => {\n  clearInterval(edsTokenInterval.value);\n  otpTimerFunctions.stopTimer();\n  otpTimerFunctions.setDefaultTimerOTP();\n  if (keyTypeDevice.value === 'ksp' || kspUiOpen.value) {\n    await resetKspUi();\n  }\n  if (!saveEds.value) {\n    sessionStorage.removeItem('sessionKeystoreListPasswords');\n  }\n  readEdsDialogConfig.dialogAction = EReadEdsDialogActions.default;\n});\n\nconst handleTabChange = (index: number) => {\n  activeTab.value = index;\n};\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _component_q_select = _resolveComponent(\"q-select\")!\n  const _component_q_item_section = _resolveComponent(\"q-item-section\")!\n  const _component_q_item = _resolveComponent(\"q-item\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createElementVNode(\"div\", _hoisted_1, [\n      _createElementVNode(\"div\", _hoisted_2, [\n        _createVNode(_unref(Tabs), {\n          \"show-header\": _unref(readEdsDialogConfig).showTabsHeader,\n          tabs: tabs,\n          \"onUpdate:selectedTab\": handleTabChange\n        }, {\n          default: _withCtx(({ selected }) => [\n            (selected === 0)\n              ? (_openBlock(), _createBlock(_unref(Tab), {\n                  key: 0,\n                  class: \"file-signature\"\n                }, {\n                  default: _withCtx(() => [\n                    _createElementVNode(\"div\", _hoisted_3, [\n                      (_unref(readEdsDialogConfig).showSignatureUi)\n                        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                            (!signatureUi.value)\n                              ? (_openBlock(), _createElementBlock(\"div\", {\n                                  key: 0,\n                                  class: \"add-keystore-ui\",\n                                  onClick: _cache[0] || (_cache[0] = ($event: any) => (openSignatureUi()))\n                                }, [\n                                  _createVNode(_component_InlineSvg, {\n                                    class: \"add-keystore-ui__icon\",\n                                    src: require('@/assets/icons/IconSignature.svg')\n                                  }, null, 8, [\"src\"]),\n                                  _createElementVNode(\"div\", _hoisted_5, _toDisplayString(_ctx.$t('components.common.eds.ReadEDSForm.selectKeyCaption')), 1)\n                                ]))\n                              : _createCommentVNode(\"\", true),\n                            (signatureUi.value)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n                                  _createElementVNode(\"div\", {\n                                    class: _normalizeClass(['read-keystore__file', { 'read-keystore__file--invalid-type': _unref(keystoreList).signature.loadedSignature?.isStamp }]),\n                                    onClick: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (openNewFile(_unref(ESignatureType).signature)), [\"stop\"]))\n                                  }, [\n                                    _createVNode(_component_InlineSvg, {\n                                      class: \"read-keystore-ui__icon\",\n                                      src: require('@/assets/icons/IconSignature.svg')\n                                    }, null, 8, [\"src\"]),\n                                    _createElementVNode(\"div\", _hoisted_7, _toDisplayString(signatureDescription.value), 1),\n                                    _createVNode(_component_InlineSvg, {\n                                      class: \"read-keystore-ui__icon read-keystore-ui__icon--right\",\n                                      onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (_unref(keystoreList).signature.file ? resetSignatureLocal() : signatureUi.value = false), [\"stop\"])),\n                                      src: require('@/assets/icons/IconCross.svg')\n                                    }, null, 8, [\"src\"])\n                                  ], 2),\n                                  _createVNode(_unref(NdInputPassword), {\n                                    modelValue: _unref(keystoreList).signature.password,\n                                    \"onUpdate:modelValue\": [\n                                      _cache[3] || (_cache[3] = ($event: any) => ((_unref(keystoreList).signature.password) = $event)),\n                                      _cache[4] || (_cache[4] = ($event: any) => (minSignaturePasswordLength.value = 1))\n                                    ],\n                                    label: _ctx.$t('components.common.eds.ReadEDSForm.enterKeyPasswordInputCaption'),\n                                    validator: _unref(validator).signaturePassword\n                                  }, null, 8, [\"modelValue\", \"label\", \"validator\"])\n                                ]))\n                              : _createCommentVNode(\"\", true)\n                          ]))\n                        : _createCommentVNode(\"\", true),\n                      (_unref(readEdsDialogConfig).showStampUi)\n                        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n                            (!stampUi.value)\n                              ? (_openBlock(), _createElementBlock(\"div\", {\n                                  key: 0,\n                                  class: \"add-keystore-ui\",\n                                  onClick: _cache[5] || (_cache[5] = _withModifiers(($event: any) => (openStampUi()), [\"stop\"]))\n                                }, [\n                                  _createVNode(_component_InlineSvg, {\n                                    class: \"add-keystore-ui__icon\",\n                                    src: require('@/assets/icons/IconStamp.svg')\n                                  }, null, 8, [\"src\"]),\n                                  _createElementVNode(\"div\", _hoisted_9, _toDisplayString(_ctx.$t('components.common.eds.ReadEDSForm.selectStampCaption')), 1)\n                                ]))\n                              : _createCommentVNode(\"\", true),\n                            (stampUi.value)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n                                  _createElementVNode(\"div\", {\n                                    class: _normalizeClass(['read-keystore__file', { 'read-keystore__file--invalid-type': _unref(keystoreList).stamp.loadedSignature && !_unref(keystoreList).stamp.loadedSignature?.isStamp }]),\n                                    onClick: _cache[7] || (_cache[7] = _withModifiers(($event: any) => (openNewFile(_unref(ESignatureType).stamp)), [\"stop\"]))\n                                  }, [\n                                    _createVNode(_component_InlineSvg, {\n                                      class: \"read-keystore-ui__icon\",\n                                      src: require('@/assets/icons/IconStamp.svg')\n                                    }, null, 8, [\"src\"]),\n                                    _createElementVNode(\"div\", _hoisted_11, _toDisplayString(stampDescription.value), 1),\n                                    _createVNode(_component_InlineSvg, {\n                                      class: \"read-keystore-ui__icon read-keystore-ui__icon--right\",\n                                      onClick: _cache[6] || (_cache[6] = _withModifiers(($event: any) => (_unref(keystoreList).stamp.file ? _unref(resetStamp)() : stampUi.value = false), [\"stop\"])),\n                                      src: require('@/assets/icons/IconCross.svg')\n                                    }, null, 8, [\"src\"])\n                                  ], 2),\n                                  _createVNode(_unref(NdInputPassword), {\n                                    modelValue: _unref(keystoreList).stamp.password,\n                                    \"onUpdate:modelValue\": [\n                                      _cache[8] || (_cache[8] = ($event: any) => ((_unref(keystoreList).stamp.password) = $event)),\n                                      _cache[9] || (_cache[9] = ($event: any) => (minStampPasswordLength.value = 1))\n                                    ],\n                                    label: _ctx.$t('components.common.eds.ReadEDSForm.enterStampPasswordInputCaption'),\n                                    validator: _unref(validator).stampPassword\n                                  }, null, 8, [\"modelValue\", \"label\", \"validator\"])\n                                ]))\n                              : _createCommentVNode(\"\", true)\n                          ]))\n                        : _createCommentVNode(\"\", true)\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_12, [\n                      (_unref(readEdsDialogConfig).showSaveEds)\n                        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n                            _createElementVNode(\"div\", _hoisted_14, [\n                              _createVNode(_unref(NdCheckbox), {\n                                modelValue: _unref(saveEds),\n                                \"onUpdate:modelValue\": _cache[10] || (_cache[10] = ($event: any) => (_isRef(saveEds) ? (saveEds).value = $event : null)),\n                                disabled: false\n                              }, null, 8, [\"modelValue\"]),\n                              _createElementVNode(\"span\", _hoisted_15, _toDisplayString(_ctx.$t('components.common.eds.ReadEDSForm.saveEds')), 1)\n                            ]),\n                            _withDirectives((_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n                              _createVNode(_component_InlineSvg, {\n                                class: \"read-eds-form_checkbox__icon\",\n                                src: require('@/assets/icons/IconInfo.svg')\n                              }, null, 8, [\"src\"])\n                            ])), [\n                              [_directive_tooltip, { theme: 'nd-tooltip', content: _ctx.$t('components.common.eds.ReadEDSForm.saveEdsToolTip'), html: true }]\n                            ])\n                          ]))\n                        : _createCommentVNode(\"\", true)\n                    ])\n                  ]),\n                  _: 1\n                }))\n              : _createCommentVNode(\"\", true),\n            (selected === 1)\n              ? (_openBlock(), _createBlock(_unref(Tab), {\n                  key: 1,\n                  class: \"cloud-signature\"\n                }, {\n                  default: _withCtx(() => [\n                    (_unref(readEdsDialogConfig).showTabsHeader && _unref(readEdsDialogConfig).showDiiaSign && !kspUiOpen.value)\n                      ? (_openBlock(), _createBlock(_unref(NdButton), {\n                          key: 0,\n                          class: \"cloud-signature_button\",\n                          \"is-loading\": isLoading.value,\n                          text: '',\n                          onClick: generateQR\n                        }, {\n                          \"icon-before\": _withCtx(() => [\n                            (_unref(isMobile))\n                              ? (_openBlock(), _createElementBlock(\"span\", _hoisted_17, _toDisplayString(_ctx.$t('components.common.eds.ReadEDSForm.cloudSignature.diia.buttonTitleMobile')), 1))\n                              : (_openBlock(), _createBlock(_component_InlineSvg, {\n                                  key: 1,\n                                  src: require(`@/assets/icons/IconDiia-white.svg`)\n                                }, null, 8, [\"src\"]))\n                          ]),\n                          _: 1\n                        }, 8, [\"is-loading\"]))\n                      : _createCommentVNode(\"\", true),\n                    _withDirectives(_createVNode(_unref(Loader), null, null, 512), [\n                      [_vShow, isLoading.value && !_unref(kspConfirmEvent)]\n                    ]),\n                    (qrUrlValue.value)\n                      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n                          _createElementVNode(\"div\", _hoisted_19, [\n                            _createElementVNode(\"div\", _hoisted_20, _toDisplayString(_ctx.$t('components.common.eds.ReadEDSForm.cloudSignature.diia.title')), 1),\n                            _createElementVNode(\"div\", _hoisted_21, _toDisplayString(_ctx.$t('components.common.eds.ReadEDSForm.cloudSignature.diia.subTitle')), 1)\n                          ]),\n                          _createElementVNode(\"div\", {\n                            class: \"cloud_signature_diia__qr\",\n                            onClick: _withModifiers(openDiiaApp, [\"stop\"])\n                          }, [\n                            _createVNode(_unref(NdQrCode), {\n                              \"model-value\": qrUrlValue.value,\n                              \"is-active\": isQrcodeActive.value,\n                              placeholder: _ctx.$t('components.common.eds.ReadEDSForm.cloudSignature.diia.buttonTimerError')\n                            }, null, 8, [\"model-value\", \"is-active\", \"placeholder\"])\n                          ])\n                        ]))\n                      : _createCommentVNode(\"\", true),\n                    (!qrUrlValue.value && !isLoading.value && !_unref(isGryadaHiddenByQuery) && !kspUiOpen.value)\n                      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [\n                          _createVNode(_unref(NdButton), {\n                            text: \"Ключ співробітника Nova\",\n                            style: {\"width\":\"100%\"},\n                            type: _unref(ENdButtonTypes).gray200,\n                            onClick: openNovaKeyModal\n                          }, null, 8, [\"type\"]),\n                          _createVNode(_unref(NdButton), {\n                            text: \"Хмарний підпис\",\n                            style: {\"width\":\"100%\",\"margin-top\":\"5px\"},\n                            type: _unref(ENdButtonTypes).gray200,\n                            onClick: openKspUi\n                          }, null, 8, [\"type\"])\n                        ]))\n                      : _createCommentVNode(\"\", true),\n                    (kspUiOpen.value)\n                      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_23, [\n                          (loadKsp.value)\n                            ? (_openBlock(), _createBlock(_unref(Loader), { key: 0 }))\n                            : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                                (!_unref(kspConfirmEvent))\n                                  ? (_openBlock(), _createBlock(_component_q_select, {\n                                      key: 0,\n                                      modelValue: selectedKsp.value,\n                                      \"onUpdate:modelValue\": _cache[11] || (_cache[11] = ($event: any) => ((selectedKsp).value = $event)),\n                                      options: kspOptions.value,\n                                      label: \"Сервіс хмарного підпису\",\n                                      class: \"token-select\",\n                                      height: \"2.75rem\",\n                                      \"menu-self\": \"top left\",\n                                      \"options-cover\": \"\",\n                                      \"use-portal\": false,\n                                      \"popup-content-class\": \"token-options\"\n                                    }, null, 8, [\"modelValue\", \"options\"]))\n                                  : _createCommentVNode(\"\", true),\n                                (selectedKsp.value && _unref(kspRequiresUserId)(selectedKsp.value) && !_unref(kspConfirmEvent))\n                                  ? (_openBlock(), _createBlock(NdInput, {\n                                      key: 1,\n                                      modelValue: _unref(kspData).userId,\n                                      \"onUpdate:modelValue\": _cache[12] || (_cache[12] = ($event: any) => ((_unref(kspData).userId) = $event)),\n                                      label: \"Ідентифікатор користувача (телефон, email)\",\n                                      filled: \"\",\n                                      size: \"small\",\n                                      class: \"ksp-user-id\"\n                                    }, null, 8, [\"modelValue\"]))\n                                  : _createCommentVNode(\"\", true),\n                                (_unref(kspConfirmEvent))\n                                  ? (_openBlock(), _createElementBlock(\"div\", _hoisted_24, [\n                                      _createElementVNode(\"div\", _hoisted_25, [\n                                        _cache[17] || (_cache[17] = _createElementVNode(\"div\", { class: \"cloud_signature_diia-header__title\" }, \" Підтвердіть підпис у мобільному додатку \", -1)),\n                                        (_unref(kspConfirmEvent).mobileAppName)\n                                          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_26, _toDisplayString(_unref(kspConfirmEvent).mobileAppName), 1))\n                                          : _createCommentVNode(\"\", true)\n                                      ]),\n                                      _createElementVNode(\"a\", {\n                                        href: _unref(kspConfirmEvent).url,\n                                        target: \"_blank\",\n                                        rel: \"noopener noreferrer\",\n                                        class: \"cloud_signature_diia__qr\"\n                                      }, [\n                                        _createElementVNode(\"img\", {\n                                          src: `data:image/bmp;base64,${_unref(kspConfirmEvent).qrCode}`,\n                                          alt: \"QR-код підтвердження\"\n                                        }, null, 8, _hoisted_28)\n                                      ], 8, _hoisted_27)\n                                    ]))\n                                  : _createCommentVNode(\"\", true)\n                              ], 64))\n                        ]))\n                      : _createCommentVNode(\"\", true)\n                  ]),\n                  _: 1\n                }))\n              : _createCommentVNode(\"\", true),\n            (selected === 2)\n              ? (_openBlock(), _createBlock(_unref(Tab), {\n                  key: 2,\n                  class: \"hardware-signature\"\n                }, {\n                  default: _withCtx(() => [\n                    (_unref(isMobile))\n                      ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                          _createTextVNode(\" Використання апаратних токенів на мобільних пристроях не доступне, криптографічна бібліотека не підтримується. \")\n                        ], 64))\n                      : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                          (loadEds.value)\n                            ? (_openBlock(), _createBlock(_unref(Loader), { key: 0 }))\n                            : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                                (!resultInit.value?.supported || !resultInit.value.isWebExtensionSupported || !resultInit.value.isWebExtensionInstalled)\n                                  ? (_openBlock(), _createElementBlock(\"div\", _hoisted_29, [\n                                      _cache[18] || (_cache[18] = _createElementVNode(\"div\", { class: \"token-init-message\" }, \"Для роботи з криптографічною бібліотекою необхідно встановити додаткове програмне забезпечення (web-бібліотеку підпису)\", -1)),\n                                      _createVNode(_unref(NdButton), {\n                                        class: \"q-mb-sm\",\n                                        text: _ctx.$t('components.common.eds.ReadEDSForm.install'),\n                                        onClick: openInstallURL\n                                      }, null, 8, [\"text\"]),\n                                      _createVNode(_unref(NdButton), {\n                                        type: \"gray50\",\n                                        text: 'Настанова користувача',\n                                        onClick: openHelpURL\n                                      })\n                                    ]))\n                                  : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                                      _createVNode(_component_q_select, {\n                                        modelValue: tokenKey.value,\n                                        \"onUpdate:modelValue\": _cache[13] || (_cache[13] = ($event: any) => ((tokenKey).value = $event)),\n                                        options: options.value,\n                                        label: \"Носій особистого ключа\",\n                                        class: \"token-select\",\n                                        height: \"2.75rem\",\n                                        \"menu-self\": \"top left\",\n                                        \"options-cover\": \"\",\n                                        \"use-portal\": false,\n                                        \"popup-content-class\": options.value.length > 0 ? 'token-options' : 'token-options-empty'\n                                      }, {\n                                        \"no-option\": _withCtx(() => [\n                                          _createVNode(_component_q_item, null, {\n                                            default: _withCtx(() => [\n                                              _createVNode(_component_q_item_section, null, {\n                                                default: _withCtx(() => _cache[19] || (_cache[19] = [\n                                                  _createTextVNode(\" Не виявлено підключених апаратних ключів (токенів) \")\n                                                ])),\n                                                _: 1\n                                              })\n                                            ]),\n                                            _: 1\n                                          })\n                                        ]),\n                                        _: 1\n                                      }, 8, [\"modelValue\", \"options\", \"popup-content-class\"]),\n                                      _createVNode(_unref(NdInputPassword), {\n                                        modelValue: _unref(keystoreList).signature.password,\n                                        \"onUpdate:modelValue\": [\n                                          _cache[14] || (_cache[14] = ($event: any) => ((_unref(keystoreList).signature.password) = $event)),\n                                          _cache[15] || (_cache[15] = ($event: any) => (minSignaturePasswordLength.value = 1))\n                                        ],\n                                        label: 'Пароль',\n                                        validator: _unref(validator).signaturePassword\n                                      }, null, 8, [\"modelValue\", \"validator\"])\n                                    ], 64))\n                              ], 64))\n                        ], 64))\n                  ]),\n                  _: 1\n                }))\n              : _createCommentVNode(\"\", true)\n          ]),\n          _: 1\n        }, 8, [\"show-header\"])\n      ]),\n      _createElementVNode(\"div\", _hoisted_30, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"read-eds-form__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Назад'}]\n        ]),\n        _createElementVNode(\"div\", _hoisted_31, [\n          (!qrCodeMode.value)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                (isShowRefreshButton.value)\n                  ? (_openBlock(), _createBlock(_unref(NdButton), {\n                      key: 0,\n                      type: \"gray50\",\n                      text: _ctx.$t('components.common.eds.ReadEDSForm.refresh'),\n                      onClick: reloadPage,\n                      \"is-loading\": isLoading.value\n                    }, null, 8, [\"text\", \"is-loading\"]))\n                  : (_openBlock(), _createBlock(_unref(NdButton), {\n                      key: 1,\n                      text: _ctx.$t('components.common.eds.ReadEDSForm.submit'),\n                      disabled: !submitButtonIsEnabled.value,\n                      \"is-loading\": isLoading.value && !_unref(kspConfirmEvent),\n                      onClick: _cache[16] || (_cache[16] = ($event: any) => (submit()))\n                    }, null, 8, [\"text\", \"disabled\", \"is-loading\"]))\n              ], 64))\n            : (_openBlock(), _createBlock(_unref(NdButton), {\n                key: 1,\n                text: _ctx.$t('components.common.eds.ReadEDSForm.cloudSignature.diia.buttonTimerTitle'),\n                class: \"qrcode-btn\",\n                disabled: !isQrcodeActive.value,\n                \"is-loading\": isLoading.value,\n                onClick: generateQR\n              }, {\n                \"icon-after\": _withCtx(() => [\n                  (_unref(timerOTPObject).isRun)\n                    ? (_openBlock(), _createElementBlock(\"span\", _hoisted_32, \" через \" + _toDisplayString(_unref(timerOTPObject).friendlyMinutes) + \":\" + _toDisplayString(_unref(timerOTPObject).friendlySeconds), 1))\n                    : _createCommentVNode(\"\", true)\n                ]),\n                _: 1\n              }, 8, [\"text\", \"disabled\", \"is-loading\"]))\n        ])\n      ])\n    ]),\n    _createVNode(GryadaSignModal, {\n      onLogin: handleSetLogin,\n      uid: gryadaUid.value\n    }, null, 8, [\"uid\"]),\n    _createVNode(GryadaFogrotPasswordModal, {\n      login: login.value,\n      uid: gryadaUid.value,\n      onPhoneNumber: handleSetPhoneNumber,\n      onLogin: handleSetLogin\n    }, null, 8, [\"login\", \"uid\"]),\n    _createVNode(GryadaOtpModal, {\n      uid: gryadaUid.value,\n      \"phone-number\": phoneNumber.value,\n      \"is-loading-sign\": isLoading.value,\n      login: login.value\n    }, null, 8, [\"uid\", \"phone-number\", \"is-loading-sign\", \"login\"])\n  ], 64))\n}\n}\n\n})","<template>\n  <div class=\"read-eds-form ND-modal__body\">\n    <div class=\"read-eds-form__content\">\n      <Tabs\n        :show-header=\"readEdsDialogConfig.showTabsHeader\"\n        :tabs=\"tabs\"\n        @update:selectedTab=\"handleTabChange\"\n      >\n        <template #default=\"{ selected }\">\n          <Tab\n            v-if=\"selected === 0\"\n            class=\"file-signature\"\n          >\n            <div class=\"file-signature__ui\">\n              <div\n                v-if=\"readEdsDialogConfig.showSignatureUi\"\n                class=\"keystore\"\n              >\n                <div class=\"add-keystore-ui\" v-if=\"!signatureUi\" @click=\"openSignatureUi()\">\n                  <InlineSvg class=\"add-keystore-ui__icon\" :src=\"require('@/assets/icons/IconSignature.svg')\"/>\n                  <div class=\"add-keystore-ui__caption\">{{ $t('components.common.eds.ReadEDSForm.selectKeyCaption') }}</div>\n                </div>\n                <div class=\"read-keystore-ui\" v-if=\"signatureUi\">\n                  <div\n                    :class=\"['read-keystore__file', { 'read-keystore__file--invalid-type': keystoreList.signature.loadedSignature?.isStamp }]\"\n                    @click.stop=\"openNewFile(ESignatureType.signature)\"\n                  >\n                    <InlineSvg class=\"read-keystore-ui__icon\" :src=\"require('@/assets/icons/IconSignature.svg')\"/>\n                    <div class=\"read-keystore-ui__filename\">{{ signatureDescription }}</div>\n                    <InlineSvg\n                      class=\"read-keystore-ui__icon read-keystore-ui__icon--right\"\n                      @click.stop=\"keystoreList.signature.file ? resetSignatureLocal() : signatureUi = false\"\n                      :src=\"require('@/assets/icons/IconCross.svg')\"\n                    />\n                  </div>\n                  <NdInputPassword\n                    v-model=\"keystoreList.signature.password\"\n                    :label=\"$t('components.common.eds.ReadEDSForm.enterKeyPasswordInputCaption')\"\n                    :validator=\"validator.signaturePassword\"\n                    @update:modelValue=\"minSignaturePasswordLength = 1\"\n                  />\n                </div>\n              </div>\n              <div\n                v-if=\"readEdsDialogConfig.showStampUi\"\n                class=\"keystore\"\n              >\n                <div class=\"add-keystore-ui\" v-if=\"!stampUi\" @click.stop=\"openStampUi()\">\n                  <InlineSvg class=\"add-keystore-ui__icon\" :src=\"require('@/assets/icons/IconStamp.svg')\"/>\n                  <div class=\"add-keystore-ui__caption\">{{ $t('components.common.eds.ReadEDSForm.selectStampCaption') }}</div>\n                </div>\n                <div class=\"read-keystore-ui\" v-if=\"stampUi\">\n                  <div\n                    :class=\"['read-keystore__file', { 'read-keystore__file--invalid-type': keystoreList.stamp.loadedSignature && !keystoreList.stamp.loadedSignature?.isStamp }]\"\n                    @click.stop=\"openNewFile(ESignatureType.stamp)\"\n                  >\n                    <InlineSvg class=\"read-keystore-ui__icon\" :src=\"require('@/assets/icons/IconStamp.svg')\"/>\n                    <div class=\"read-keystore-ui__filename\">{{ stampDescription }}</div>\n                    <InlineSvg\n                      class=\"read-keystore-ui__icon read-keystore-ui__icon--right\"\n                      @click.stop=\"keystoreList.stamp.file ? resetStamp() : stampUi = false\"\n                      :src=\"require('@/assets/icons/IconCross.svg')\"\n                    />\n                  </div>\n                  <NdInputPassword\n                    v-model=\"keystoreList.stamp.password\"\n                    :label=\"$t('components.common.eds.ReadEDSForm.enterStampPasswordInputCaption')\"\n                    :validator=\"validator.stampPassword\"\n                    @update:modelValue=\"minStampPasswordLength = 1\"\n                  />\n                </div>\n              </div>\n            </div>\n            <div class=\"file-signature__settings\">\n              <div\n                v-if=\"readEdsDialogConfig.showSaveEds\"\n                class=\"read-eds-form_checkbox\"\n              >\n                <div class=\"read-eds-form_checkbox\">\n                  <NdCheckbox\n                    v-model=\"saveEds\"\n                    :disabled=\"false\"\n                  />\n                  <span class=\"read-eds-form_checkbox__title\">\n                    {{ $t('components.common.eds.ReadEDSForm.saveEds') }}\n                  </span>\n                </div>\n                <div\n                  class=\"read-eds-form_checkbox__icon-container\"\n                  v-tooltip=\"{ theme: 'nd-tooltip', content: $t('components.common.eds.ReadEDSForm.saveEdsToolTip'), html: true }\"\n                >\n                  <InlineSvg class=\"read-eds-form_checkbox__icon\" :src=\"require('@/assets/icons/IconInfo.svg')\"/>\n                </div>\n              </div>\n            </div>\n          </Tab>\n          <Tab\n            class=\"cloud-signature\"\n            v-if=\"selected === 1\"\n          >\n            <NdButton\n              class=\"cloud-signature_button\"\n              v-if=\"readEdsDialogConfig.showTabsHeader && readEdsDialogConfig.showDiiaSign && !kspUiOpen\"\n              :is-loading=\"isLoading\"\n              :text=\"''\"\n\n              @click=\"generateQR\"\n            >\n              <template v-slot:icon-before>\n                <span v-if=\"isMobile\" class=\"cloud-signature_diia-mobile\">\n                  {{ $t('components.common.eds.ReadEDSForm.cloudSignature.diia.buttonTitleMobile') }}\n                </span>\n                <InlineSvg\n                  v-else\n                  :src=\"require(`@/assets/icons/IconDiia-white.svg`)\"\n                />\n              </template>\n            </NdButton>\n            <Loader v-show=\"isLoading && !kspConfirmEvent\"/>\n            <div\n              class=\"cloud-signature_diia\"\n              v-if=\"qrUrlValue\"\n            >\n              <div class=\"cloud_signature_diia-header\">\n                <div class=\"cloud_signature_diia-header__title\">\n                  {{ $t('components.common.eds.ReadEDSForm.cloudSignature.diia.title') }}\n                </div>\n                <div class=\"cloud_signature_diia-header__subTitle\">\n                  {{ $t('components.common.eds.ReadEDSForm.cloudSignature.diia.subTitle') }}\n                </div>\n              </div>\n              <div\n                class=\"cloud_signature_diia__qr\"\n                @click.stop=\"openDiiaApp\"\n              >\n                <NdQrCode\n                  :model-value=\"qrUrlValue\"\n                  :is-active=\"isQrcodeActive\"\n                  :placeholder=\"$t('components.common.eds.ReadEDSForm.cloudSignature.diia.buttonTimerError')\"\n                />\n              </div>\n            </div>\n            <div\n              v-if=\"!qrUrlValue && !isLoading && !isGryadaHiddenByQuery && !kspUiOpen\"\n              style=\"width: 100%; margin-top: 5px;\"\n            >\n              <NdButton\n                text=\"Ключ співробітника Nova\"\n                style=\"width: 100%\"\n                :type=\"ENdButtonTypes.gray200\"\n                @click=\"openNovaKeyModal\"\n              />\n              <NdButton\n                text=\"Хмарний підпис\"\n                style=\"width: 100%; margin-top: 5px;\"\n                :type=\"ENdButtonTypes.gray200\"\n                @click=\"openKspUi\"\n              />\n            </div>\n            <div\n              v-if=\"kspUiOpen\"\n              class=\"ksp-signature\"\n            >\n              <Loader v-if=\"loadKsp\" />\n              <template v-else>\n                <q-select\n                  v-if=\"!kspConfirmEvent\"\n                  v-model=\"selectedKsp\"\n                  :options=\"kspOptions\"\n                  label=\"Сервіс хмарного підпису\"\n                  class=\"token-select\"\n                  height=\"2.75rem\"\n                  menu-self=\"top left\"\n                  options-cover\n                  :use-portal=\"false\"\n                  popup-content-class=\"token-options\"\n                />\n                <NdInput\n                  v-if=\"selectedKsp && kspRequiresUserId(selectedKsp) && !kspConfirmEvent\"\n                  v-model=\"kspData.userId\"\n                  label=\"Ідентифікатор користувача (телефон, email)\"\n                  filled\n                  size=\"small\"\n                  class=\"ksp-user-id\"\n                />\n                <div\n                  v-if=\"kspConfirmEvent\"\n                  class=\"cloud-signature_diia ksp-signature__confirm\"\n                >\n                  <div class=\"cloud_signature_diia-header\">\n                    <div class=\"cloud_signature_diia-header__title\">\n                      Підтвердіть підпис у мобільному додатку\n                    </div>\n                    <div\n                      v-if=\"kspConfirmEvent.mobileAppName\"\n                      class=\"cloud_signature_diia-header__subTitle\"\n                    >\n                      {{ kspConfirmEvent.mobileAppName }}\n                    </div>\n                  </div>\n                  <a\n                    :href=\"kspConfirmEvent.url\"\n                    target=\"_blank\"\n                    rel=\"noopener noreferrer\"\n                    class=\"cloud_signature_diia__qr\"\n                  >\n                    <img\n                      :src=\"`data:image/bmp;base64,${kspConfirmEvent.qrCode}`\"\n                      alt=\"QR-код підтвердження\"\n                    >\n                  </a>\n                </div>\n              </template>\n            </div>\n          </Tab>\n          <Tab\n            class=\"hardware-signature\"\n            v-if=\"selected === 2\"\n          >\n            <template v-if=\"isMobile\">\n              Використання апаратних токенів на мобільних пристроях не доступне, криптографічна бібліотека не підтримується.\n            </template>\n            <template v-else>\n              <Loader v-if=\"loadEds\" />\n              <template v-else>\n                <div v-if=\"!resultInit?.supported || !resultInit.isWebExtensionSupported || !resultInit.isWebExtensionInstalled\">\n                  <div class=\"token-init-message\">Для роботи з криптографічною бібліотекою необхідно встановити додаткове програмне забезпечення (web-бібліотеку підпису)</div>\n                  <NdButton\n                    class=\"q-mb-sm\"\n                    :text=\"$t('components.common.eds.ReadEDSForm.install')\"\n                    @click=\"openInstallURL\"\n                  ></NdButton>\n                  <NdButton\n                    type=\"gray50\"\n                    :text=\"'Настанова користувача'\"\n                    @click=\"openHelpURL\"\n                  ></NdButton>\n                </div>\n                <template v-else>\n                  <q-select\n                    v-model=\"tokenKey\"\n                    :options=\"options\"\n                    label=\"Носій особистого ключа\"\n                    class=\"token-select\"\n                    height=\"2.75rem\"\n                    menu-self=\"top left\"\n                    options-cover\n                    :use-portal=\"false\"\n                    :popup-content-class=\"options.length > 0 ? 'token-options' : 'token-options-empty'\"\n                  >\n                    <template v-slot:no-option>\n                      <q-item>\n                        <q-item-section>\n                          Не виявлено підключених апаратних ключів (токенів)\n                        </q-item-section>\n                      </q-item>\n                    </template>\n                  </q-select>\n                  <NdInputPassword\n                    v-model=\"keystoreList.signature.password\"\n                    :label=\"'Пароль'\"\n                    :validator=\"validator.signaturePassword\"\n                    @update:modelValue=\"minSignaturePasswordLength = 1\"\n                  />\n                </template>\n              </template>\n            </template>\n          </Tab>\n        </template>\n      </Tabs>\n    </div>\n    <div class=\"read-eds-form__footer\">\n      <div\n        class=\"read-eds-form__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: 'Назад'}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <div class=\"read-eds-form__button-right\">\n        <template v-if=\"!qrCodeMode\">\n          <NdButton\n            v-if=\"isShowRefreshButton\"\n            type=\"gray50\"\n            :text=\"$t('components.common.eds.ReadEDSForm.refresh')\"\n            @click=\"reloadPage\"\n            :is-loading=\"isLoading\"\n          ></NdButton>\n          <NdButton\n            v-else\n            :text=\"$t('components.common.eds.ReadEDSForm.submit')\"\n            :disabled=\"!submitButtonIsEnabled\"\n            :is-loading=\"isLoading && !kspConfirmEvent\"\n            @click=\"submit()\"\n          ></NdButton>\n        </template>\n        <NdButton\n          v-else\n          :text=\"$t('components.common.eds.ReadEDSForm.cloudSignature.diia.buttonTimerTitle')\"\n          class=\"qrcode-btn\"\n          :disabled=\"!isQrcodeActive\"\n          :is-loading=\"isLoading\"\n          @click=\"generateQR\"\n        >\n          <template v-slot:icon-after>\n            <span v-if=\"timerOTPObject.isRun\" class=\"timer-counter\"> через {{ timerOTPObject.friendlyMinutes }}:{{\n              timerOTPObject.friendlySeconds }}</span>\n          </template>\n        </NdButton>\n      </div>\n    </div>\n  </div>\n  <GryadaSignModal\n    @login=\"handleSetLogin\"\n    :uid=\"gryadaUid\"\n  />\n  <GryadaFogrotPasswordModal\n    :login=\"login\"\n    :uid=\"gryadaUid\"\n    @phone-number=\"handleSetPhoneNumber\"\n    @login=\"handleSetLogin\"\n  />\n  <GryadaOtpModal\n    :uid=\"gryadaUid\"\n    :phone-number=\"phoneNumber\"\n    :is-loading-sign=\"isLoading\"\n    :login=\"login\"\n  />\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  computed, onBeforeMount, onBeforeUnmount, onMounted, Ref, ref, watch,\n} from 'vue';\nimport { useFileDialog } from '@vueuse/core';\nimport {\n  NdButton, NdCheckbox, NdInputPassword, Tabs, Tab, NdQrCode, ENdButtonTypes,\n} from '@/components/v2/ui';\nimport NdInput from '@/components/NdInput.vue';\nimport { kspRequiresUserId } from '@/modules/eds/ksp';\nimport { ensureKSPInitialized, prefetchKSPServers, prepareForKSPSigning } from '@/modules/eds/euscpKsp';\nimport { otpTimerFunctions, timerOTPObject } from '@/components/v2/views/auth/modules/otpModule';\nimport { supportedEDSFileTypes } from '@/config';\nimport { useGetBreakpoints } from '@/lib/core/composables';\nimport { useI18n } from 'vue-i18n';\nimport { useEDSModule } from '@/modules/store/eds';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { useUserModule } from '@/modules/store/user';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { EReadEdsDialogActions } from '@/components/v2/common/eds/EReadEdsDialogActions';\nimport { storeToRefs } from 'pinia';\nimport { emitter } from '@/modules/emitter';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport { ESignatureType } from '@/lib/models/Signature/ESignatureType';\nimport { minLength, required } from '@vuelidate/validators';\nimport { BaseValidation, useVuelidate } from '@vuelidate/core';\nimport { isEdsError } from '@/modules/eds/EdsError';\nimport { DateFormatter, FileConverter } from '@/lib/core/helpers';\nimport { Loader } from '@/components/ui';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { EWSEventNamesDocuments } from '@/modules/ws/EWSEventNames';\nimport { EDocumentActions } from '@/lib/models/Document/EDocumentActions';\nimport { i18n } from '@/modules/i18n';\nimport { EContractorsOperationsStatus } from '@/modules/api/Contractors.api';\nimport { EContractorActions } from '@/lib/models/Contractor/EContractorActions';\nimport GryadaSignModal from '@/components/v2/common/eds/GryadaSignModals/GryadaSignModal.vue';\nimport GryadaFogrotPasswordModal from '@/components/v2/common/eds/GryadaSignModals/GryadaFogrotPasswordModal.vue';\nimport GryadaOtpModal from '@/components/v2/common/eds/GryadaSignModals/GryadaOtpModal.vue';\nimport { useRoute } from 'vue-router';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { authApi } from '@/modules/api/Auth.api';\nimport { useAuthModule } from '@/modules/store/auth';\nimport { IDocument } from '@/lib/models/Document/Document';\nimport { useSignContractorId } from '@/lib/core/composables/useSignContractorId';\nimport { useTutorialModule } from '@/modules/store/tutorial';\nimport PersonOtpConfirmationModal from '@/components/v2/common/eds/GryadaSignModals/PersonOtpConfirmationModal.vue';\nimport PersonConfirmationModal from '@/components/v2/common/eds/GryadaSignModals/PersonConfirmationModal.vue';\nimport SignatureNovaKeyModal from '@/components/v2/common/eds/GryadaSignModals/SignatureNovaKeyModal.vue';\n\nconst userModule = useUserModule();\nconst contractorModule = useContractorsModule();\nconst {\n  createLinkContractorCloudDigitalSign, subscribeToContractorWS, unSubscribeToContractorWS, getMyContractors,\n} = contractorModule;\nconst { existingContractor } = storeToRefs(contractorModule);\nconst tutorialModule = useTutorialModule();\nconst documentsModule = useDocumentsModule();\nconst {\n  createDocumentDigitalSign, subscribeToDocumentWS, unSubscribeToDocumentWS, currentDocument, getDocument, updateDocuments,\n} = documentsModule;\nconst tokenKeyMedia = ref<any>([]);\nconst { saveEds } = storeToRefs(useUserModule());\nconst { t } = useI18n();\nconst route = useRoute();\nconst edsModule = useEDSModule();\nconst { resetSignature, resetStamp, resetKSPData } = edsModule;\nconst {\n  keystoreList,\n  signatureTaxNumber,\n  signatureCompanyName,\n  stampTaxNumber,\n  stampCompanyName,\n  keyTypeDevice,\n  tokenData,\n  kspData,\n  kspConfirmEvent,\n} = storeToRefs(edsModule);\nconst { isMobile } = useGetBreakpoints();\nconst authModule = useAuthModule();\nconst { isGryadaHiddenByQuery } = storeToRefs(authModule);\nconst {\n  readEdsDialogConfig, closeModal, openModal, setModalWrapperEvent,\n} = useUiModule();\nconst { signContractorId } = useSignContractorId();\nconst { beforeCloseModalOperation, bulkActionsDialogConfig } = storeToRefs(useUiModule());\n\nconst tabs = [\n  { title: 'Файловий' },\n  { title: 'Хмарний' },\n  { title: 'Апаратний' },\n];\n\nconst kspUiOpen = ref(false);\nconst loadKsp = ref(false);\nconst kspServers = ref<any[]>([]);\nconst selectedKsp = ref<any>(null);\nconst kspOptions = computed(() => kspServers.value.map((server) => ({\n  label: server.name,\n  value: server.name,\n  ...server,\n})));\n\nconst tokenKey = ref<any>(null);\nconst edsTokenInterval = ref<any>(null);\nconst gryadaUid = ref<string>('');\n\nconst options = ref([]);\nconst resultInit = ref<any>({\n  supported: false,\n  isWebExtensionSupported: false,\n  isWebExtensionInstalled: false,\n  helpURL: '',\n  webExtensionInstallURL: '',\n});\n\nconst signatureDescription = computed(() => {\n  if (!keystoreList.value.signature.loadedSignature) return keystoreList.value.signature.file?.name;\n  if (!keystoreList.value.signature.loadedSignature.canBeUsed) return keystoreList.value.signature.file?.name;\n  return `${signatureTaxNumber.value}; ${signatureCompanyName.value}`;\n});\n\nconst stampDescription = computed(() => {\n  if (!keystoreList.value.stamp.loadedSignature) return keystoreList.value.stamp.file?.name;\n  if (!keystoreList.value.stamp.loadedSignature.canBeUsed) return keystoreList.value.stamp.file?.name;\n  return `${stampTaxNumber.value}; ${stampCompanyName.value}`;\n});\n\nconst activeTab = ref(0);\nconst signatureUi = ref(false);\nconst stampUi = ref(false);\nconst login = ref('');\nconst phoneNumber = ref('');\nconst keyType = ref<ESignatureType>(ESignatureType.signature);\nconst signaturePassword = computed(() => keystoreList.value.signature.password);\nconst stampPassword = computed(() => keystoreList.value.stamp.password);\nconst minSignaturePasswordLength = ref(1);\nconst minStampPasswordLength = ref(1);\nconst validationRules = computed(() => ({\n  signaturePassword: {\n    required,\n    minLength: minLength(minSignaturePasswordLength),\n  },\n  stampPassword: {\n    required,\n    minLength: minLength(minStampPasswordLength),\n  },\n}));\nconst validator: Ref<BaseValidation> = useVuelidate(validationRules, { signaturePassword, stampPassword });\nconst timeOutId = ref<any>(null);\nconst isQrcodeActive = ref<boolean>(false);\nconst qrCodeMode = ref<boolean>(false);\nconst loadEds = ref<boolean>(false);\nconst edsInitResult = ref<any>(null);\n/*\n* Adds file to keystoreList if it has supported file format\n* */\nconst addFileToKeystoreList = (fileList: File[] | FileList | null): void => {\n  const supportedFileTypesArray = supportedEDSFileTypes\n    .split(', ')\n    .map((str: string) => str.substring(1));\n\n  if (fileList) {\n    for (let i = 0; i < fileList.length; i += 1) {\n      const file = fileList instanceof FileList ? fileList.item(i) as File : fileList[i];\n      const extension = file.name.split('.').pop() as string;\n      if (supportedFileTypesArray.includes(extension.toLowerCase())) {\n        if (keyType.value === ESignatureType.signature) {\n          keystoreList.value.signature.file = file;\n        }\n        if (keyType.value === ESignatureType.stamp) {\n          keystoreList.value.stamp.file = file;\n        }\n      } else {\n        try {\n          emitter.emit(\n            EEmitterEventNames.error,\n            new Error(\n              `${t('components.common.eds.ReadEDSForm.selectKeystoreFileForm.notSupportedFileTypeError')} ${supportedEDSFileTypes}`,\n            ),\n          );\n        } catch (error) {\n          console.error(error);\n        }\n      }\n    }\n  }\n};\n// select file\nconst {\n  files,\n  open,\n  reset,\n} = useFileDialog({\n  multiple: false,\n  reset: true,\n  accept: isMobile.value ? '' : supportedEDSFileTypes,\n});\nwatch(files, (fileList: FileList | null) => addFileToKeystoreList(fileList));\n\nconst openNewFile = ($keyType: ESignatureType): void => {\n  keyType.value = $keyType;\n  minSignaturePasswordLength.value = 1;\n  minStampPasswordLength.value = 1;\n  open();\n};\n\nconst openSignatureUi = () => {\n  signatureUi.value = true;\n  openNewFile(ESignatureType.signature);\n};\n\nconst openStampUi = () => {\n  stampUi.value = true;\n  openNewFile(ESignatureType.stamp);\n};\n\nconst handleSetLogin = (value) => {\n  login.value = value;\n};\n\nconst handleSetPhoneNumber = (value) => {\n  phoneNumber.value = value;\n};\n\nconst isShowRefreshButton = computed(() => {\n  const isCorrectTab = activeTab.value === 2;\n\n  const isWebExtMissing = !resultInit?.value?.supported\n      || !resultInit?.value?.isWebExtensionSupported\n      || !resultInit?.value?.isWebExtensionInstalled;\n\n  return isCorrectTab && isWebExtMissing;\n});\n\nconst submitButtonIsEnabled = computed(() => {\n  const signatureIsValid = signatureUi.value\n    ? typeof keystoreList.value.signature.file !== 'undefined' && !validator.value.signaturePassword.$invalid\n    : true;\n  const stampIsValid = stampUi.value\n    ? typeof keystoreList.value.stamp.file !== 'undefined' && !validator.value.stampPassword.$invalid\n    : true;\n\n  if (activeTab.value === 1 && kspUiOpen.value) {\n    if (!selectedKsp.value) return false;\n    if (kspRequiresUserId(selectedKsp.value) && !kspData.value.userId?.trim()) return false;\n    return true;\n  }\n\n  if (tokenKey.value && tokenKey.value?.label !== '') return true;\n  if (!signatureUi.value && !stampUi.value) return false;\n  return signatureIsValid && stampIsValid && activeTab.value === 0;\n});\n\nconst isLoading = ref(false);\nconst qrUrlValue = ref('');\n\nconst openDiiaApp = (): void => {\n  if (isMobile.value && qrUrlValue.value) {\n    window.location.replace(qrUrlValue.value);\n  }\n};\n\nconst hasUnsignedAttachments = computed(() => currentDocument?.attachSignatures?.some(\n  (signature) => signature.required === true && signature.status === 'ready',\n) ?? false);\n\nconst generateQRCodeForAddingDiiaContractor = async () => {\n  readEdsDialogConfig.showTabsHeader = false;\n  if (!qrCodeMode.value) {\n    isLoading.value = true;\n  }\n  qrCodeMode.value = true;\n  isQrcodeActive.value = false;\n  const res = await createLinkContractorCloudDigitalSign();\n  await subscribeToContractorWS(EWSEventNamesDocuments.diiaSign, res?.requestId);\n  emitter.on(EWSEventNamesDocuments.diiaSign, async (wsMessage: any) => {\n    const {\n      message,\n      status,\n    } = JSON.parse(wsMessage);\n\n    if (status === 'success') {\n      emitter.emit(\n        EEmitterEventNames.success,\n        { text: t(`general.contractorActionMessages.success.${EContractorActions.add}`) },\n      );\n    }\n\n    if (status === 'error') {\n      try {\n        emitter.emit(\n          EEmitterEventNames.error,\n          new Error(`${t(`general.contractorActionMessages.error.${EContractorActions.add}`)}, ${message}`),\n        );\n      } catch (error) {\n        console.error(error);\n      }\n      isQrcodeActive.value = false;\n    }\n\n    emitter.off(EWSEventNamesDocuments.diiaSign);\n\n    await unSubscribeToContractorWS(EWSEventNamesDocuments.diiaSign, res?.requestId);\n    beforeCloseModalOperation.value = null;\n    otpTimerFunctions.stopTimer();\n    otpTimerFunctions.setDefaultTimerOTP();\n    closeModal(EModalNames.readEDSModal);\n    await userModule.getUserProfile();\n  });\n\n  if (res?.status === EApiResponseStatus.SUCCESS) {\n    otpTimerFunctions.setDefaultTimerValues(3, 0);\n    otpTimerFunctions.setDefaultTimerOTP();\n    otpTimerFunctions.startTimer();\n    qrUrlValue.value = res.url;\n    if (isMobile.value) {\n      openDiiaApp();\n      await closeModal(EModalNames.readEDSModal);\n    }\n  }\n\n  isLoading.value = false;\n};\n\nconst startDiiaQrForDocumentsBulk = async (): Promise<any> => {\n  readEdsDialogConfig.showTabsHeader = false;\n  await subscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n  if (!qrCodeMode.value) {\n    isLoading.value = true;\n  }\n  qrCodeMode.value = true;\n  isQrcodeActive.value = false;\n\n  const docsToSign = bulkActionsDialogConfig.value?.list ?? [];\n\n  const documentIds = docsToSign.map((doc) => doc.id);\n\n  const attachmentIds = docsToSign.flatMap((doc) => (doc.attachSignatures ?? [])\n    .filter((s) => s.required\n          && s.status === 'ready'\n          && s.type === 'signature'\n          && s.contractor_id === signContractorId.value)\n    .map((s) => s.attach_object_id));\n\n  const handler = async (wsMessage: any) => {\n    const { status, message } = JSON.parse(wsMessage);\n\n    if (status === 'success') {\n      emitter.emit(EEmitterEventNames.success, {\n        text: 'Документи підписано',\n      });\n\n      await updateDocuments(documentIds);\n    }\n\n    if (status === 'error') {\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error(`Помилка підписання: ${message}`),\n      );\n    }\n\n    emitter.off(EWSEventNamesDocuments.diiaSign, handler);\n    await unSubscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n    closeModal(EModalNames.readEDSModal);\n  };\n\n  emitter.on(EWSEventNamesDocuments.diiaSign, handler);\n\n  const res = await createDocumentDigitalSign(attachmentIds, documentIds);\n\n  if (res?.status === EApiResponseStatus.SUCCESS) {\n    qrUrlValue.value = res.url;\n    if (isMobile.value) {\n      openDiiaApp();\n      await closeModal(EModalNames.readEDSModal);\n    }\n  }\n\n  isLoading.value = false;\n  return res;\n};\n\nconst startDiiaQrForDocument = async (): Promise<any> => {\n  const documentId = currentDocument.id;\n  const attachmentIds = currentDocument?.attachSignatures\n    .filter((s) => s.required && s.status === 'ready' && s.type === 'signature' && s.contractor_id === signContractorId.value)\n    .map((s) => s.attach_object_id);\n\n  if (!documentId) {\n    console.error('startDiiaQrForDocument: documentId is missing');\n    return null;\n  }\n\n  return await createDocumentDigitalSign(attachmentIds, documentId);\n};\n\nconst startDiiaQrForAttachment = async (\n  attachmentId: number | number[],\n): Promise<any> => {\n  const documentId = currentDocument.id;\n\n  if (!documentId) {\n    console.error('startDiiaQrForAttachment: documentId is missing');\n    return null;\n  }\n\n  return await createDocumentDigitalSign(attachmentId, documentId);\n};\n\nconst startDiiaQrFlow = async (): Promise<any> => {\n  const { selectedAttachmentId } = storeToRefs(useDocumentsModule());\n\n  if (route.name === ERouteNames.allDocuments) {\n    await startDiiaQrForDocumentsBulk();\n    return null;\n  }\n\n  if (route.name === ERouteNames.document && selectedAttachmentId.value === null) {\n    return await startDiiaQrForDocument();\n  }\n\n  if (selectedAttachmentId.value !== null) {\n    const res = await startDiiaQrForAttachment(selectedAttachmentId.value);\n    selectedAttachmentId.value = null;\n    return res;\n  }\n\n  return null;\n};\n\nconst generateQRCodeForDiiaSign = async () => {\n  await subscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n  readEdsDialogConfig.showTabsHeader = false;\n  if (!qrCodeMode.value) {\n    isLoading.value = true;\n  }\n  qrCodeMode.value = true;\n  isQrcodeActive.value = false;\n\n  const res = await startDiiaQrFlow();\n\n  if (!res) {\n    isLoading.value = false;\n    return;\n  }\n\n  emitter.on(EWSEventNamesDocuments.diiaSign, async (wsMessage: any) => {\n    const {\n      message,\n      status,\n    } = JSON.parse(wsMessage);\n\n    if (status === 'success') {\n      emitter.emit(\n        EEmitterEventNames.success,\n        { text: `${t(`general.documentActionMessages.success.${EDocumentActions.sign}`, [currentDocument?.name])}` },\n      );\n      await getDocument(currentDocument?.id as number);\n      emitter.emit(EEmitterEventNames.updateDocument);\n    }\n\n    if (status === 'error') {\n      try {\n        emitter.emit(\n          EEmitterEventNames.error,\n          new Error(\n            `${t(`general.documentActionMessages.error.${EDocumentActions.sign}`, [currentDocument?.name])}${message}.`,\n          ),\n        );\n      } catch (error) {\n        console.error(error);\n      }\n      isQrcodeActive.value = false;\n    }\n\n    emitter.off(EWSEventNamesDocuments.diiaSign);\n\n    await unSubscribeToDocumentWS(EWSEventNamesDocuments.diiaSign);\n    beforeCloseModalOperation.value = null;\n    otpTimerFunctions.stopTimer();\n    otpTimerFunctions.setDefaultTimerOTP();\n    closeModal(EModalNames.readEDSModal);\n  });\n\n  if (res?.status === EApiResponseStatus.SUCCESS) {\n    otpTimerFunctions.setDefaultTimerValues(3, 0);\n    otpTimerFunctions.setDefaultTimerOTP();\n    otpTimerFunctions.startTimer();\n    qrUrlValue.value = res.url;\n    if (isMobile.value) {\n      openDiiaApp();\n      await closeModal(EModalNames.readEDSModal);\n    }\n  }\n\n  isLoading.value = false;\n};\n\nconst checkCertEndDate = async () => {\n  const certEndTimeStr = keystoreList.value?.signature?.loadedSignature?.certEndTime;\n  if (!certEndTimeStr) return;\n\n  const certEndDate = new Date(certEndTimeStr);\n  const currentDate = new Date();\n  const warningDate = new Date(currentDate);\n  warningDate.setDate(currentDate.getDate() + 30);\n\n  if (certEndDate <= warningDate) {\n    const formatedCertEndDate = DateFormatter.toHumanReadable(certEndDate);\n    emitter.emit(\n      EEmitterEventNames.info,\n      {\n        text: `Термін дії сертифікату вашого ключа КЕП закінчується ${formatedCertEndDate}.\n        Рекомендуємо вчасно звернутись до вашого кваліфікованого надавача електронних довірчих послуг, для продовження використання КЕП`,\n      },\n    );\n  }\n};\n\nconst generateQR = async () => {\n  kspUiOpen.value = false;\n  if (readEdsDialogConfig.dialogAction === EReadEdsDialogActions.contractorAdding) {\n    await generateQRCodeForAddingDiiaContractor();\n  } else {\n    await generateQRCodeForDiiaSign();\n  }\n};\n\nconst openKspUi = async (): Promise<void> => {\n  kspUiOpen.value = true;\n  qrUrlValue.value = '';\n  qrCodeMode.value = false;\n  keyTypeDevice.value = 'ksp';\n  stampUi.value = false;\n  edsModule.resetSignature(true);\n  await prepareForKSPSigning();\n\n  if (kspServers.value.length) {\n    return;\n  }\n\n  loadKsp.value = true;\n  try {\n    kspServers.value = await ensureKSPInitialized();\n    if (kspOptions.value.length === 1) {\n      selectedKsp.value = kspOptions.value[0];\n    }\n  } catch (error) {\n    console.error('KSP initialization error:', error);\n    emitter.emit(EEmitterEventNames.error, new Error('Не вдалося завантажити список сервісів хмарного підпису'));\n    kspUiOpen.value = false;\n  } finally {\n    loadKsp.value = false;\n  }\n};\n\nconst resetKspUi = async (): Promise<void> => {\n  kspUiOpen.value = false;\n  selectedKsp.value = null;\n  const { resetOperationKSP, setKSPConfirmCallback, prepareForKSPSigning } = await import('@/modules/eds/euscpKsp');\n  setKSPConfirmCallback(null);\n  await resetOperationKSP();\n  await prepareForKSPSigning();\n  resetKSPData();\n};\n\nconst submit = async (): Promise<void> => {\n  isLoading.value = true;\n  let canApplySignature = false;\n  let canApplyStamp = false;\n  if (activeTab.value === 2) {\n    signatureUi.value = true;\n    keyTypeDevice.value = 'token';\n  } else if (activeTab.value === 1 && kspUiOpen.value) {\n    stampUi.value = false;\n    keyTypeDevice.value = 'ksp';\n    kspData.value.kspName = selectedKsp.value?.name || selectedKsp.value?.label || '';\n    if (selectedKsp.value && kspRequiresUserId(selectedKsp.value)) {\n      kspData.value.userId = kspData.value.userId?.trim() || '';\n    }\n    edsModule.resetSignature(true);\n    await prepareForKSPSigning();\n    canApplySignature = Boolean(selectedKsp.value);\n  } else {\n    keyTypeDevice.value = 'file';\n  }\n  if (signatureUi.value && keyTypeDevice.value !== 'ksp') {\n    try {\n      minSignaturePasswordLength.value = 1;\n      tokenData.value = tokenKeyMedia.value?.find((el) => el.type === tokenKey.value.label);\n      edsModule.resetSignature(true);\n      await edsModule.readSignatureFromKeystore(edsModule.keystoreList.signature);\n      if (keystoreList.value.signature.loadedSignature?.isStamp) {\n        emitter.emit(EEmitterEventNames.error, new Error(\n          'Ви завантажили файл ключа печатки. Очистіть, будь ласка, поле та оберіть файл ключа підпису.',\n        ));\n      } else {\n        canApplySignature = true;\n      }\n    } catch (error) {\n      if (isEdsError(error)) {\n        if (error.code === 24) { // wrong password\n          minSignaturePasswordLength.value = 999;\n        }\n        try {\n          emitter.emit(EEmitterEventNames.error, new Error(error.message));\n          // eslint-disable-next-line no-empty\n        } catch ($e) {\n        }\n      }\n      console.error(error);\n      isLoading.value = false;\n    }\n  }\n\n  if (stampUi.value) {\n    try {\n      minStampPasswordLength.value = 1;\n      edsModule.resetStamp(true);\n      await edsModule.readSignatureFromKeystore(edsModule.keystoreList.stamp);\n      if (!keystoreList.value.stamp.loadedSignature?.isStamp) {\n        emitter.emit(EEmitterEventNames.error, new Error(\n          'Ви завантажили файл ключа підпису. Очистіть, будь ласка, поле та оберіть файл ключа печатки.',\n        ));\n      } else {\n        canApplyStamp = true;\n      }\n    } catch (error) {\n      if (isEdsError(error)) {\n        if (error.code === 24) { // wrong password\n          minStampPasswordLength.value = 999;\n        }\n        try {\n          emitter.emit(EEmitterEventNames.error, new Error(error.message));\n          // eslint-disable-next-line no-empty\n        } catch ($e) {\n        }\n      }\n      console.error(error);\n      isLoading.value = false;\n    }\n  }\n\n  let canProceed = false;\n  if (keyTypeDevice.value === 'ksp' && kspUiOpen.value) {\n    canProceed = canApplySignature;\n  } else if (signatureUi.value && !stampUi.value) {\n    canProceed = canApplySignature;\n  } else if (!signatureUi.value && stampUi.value) {\n    canProceed = canApplyStamp;\n  } else if (signatureUi.value && stampUi.value) {\n    canProceed = canApplySignature && canApplyStamp;\n  }\n  if (canProceed) {\n    if (keyTypeDevice.value !== 'ksp' && keystoreList.value?.signature?.file) {\n      keystoreList.value.signature.fileBase64 = await FileConverter.toBase64(keystoreList.value?.signature?.file as File) as string;\n      keystoreList.value.signature.password = keystoreList.value.signature.password as string;\n    }\n    if (keyTypeDevice.value !== 'ksp' && keystoreList.value?.stamp?.file) {\n      keystoreList.value.stamp.fileBase64 = await FileConverter.toBase64(keystoreList.value?.stamp?.file as File) as string;\n      keystoreList.value.stamp.password = keystoreList.value.stamp.password as string;\n    }\n    readEdsDialogConfig.signDocument = true;\n    await beforeCloseModalOperation.value();\n    isLoading.value = false;\n    if (keyTypeDevice.value === 'ksp') {\n      if (readEdsDialogConfig.dialogAction === EReadEdsDialogActions.contractorAdding) {\n        await resetKspUi();\n      }\n      closeModal(EModalNames.readEDSModal);\n    } else {\n      setTimeout(() => {\n        closeModal(EModalNames.readEDSModal);\n      }, 3000);\n      await openModal(EModalNames.readEDSModal);\n    }\n    beforeCloseModalOperation.value = async () => {\n      beforeCloseModalOperation.value = null;\n    };\n  } else {\n    isLoading.value = false;\n  }\n  await checkCertEndDate();\n};\n\nconst close = async (): Promise<void> => {\n  if (keyTypeDevice.value === 'ksp' || kspUiOpen.value) {\n    await resetKspUi();\n  }\n  setModalWrapperEvent('close');\n  readEdsDialogConfig.signDocument = false;\n  closeModal(EModalNames.readEDSModal);\n};\n\nconst resetSignatureLocal = (): void => {\n  resetSignature();\n  sessionStorage.removeItem('sessionKeystoreListPasswords');\n  localStorage.removeItem('sessionKeystoreList');\n};\n\nconst openHelpURL = (): void => {\n  if (resultInit?.value?.helpURL) {\n    window.open(resultInit.value.helpURL, '_blank');\n  }\n};\n\nconst openInstallURL = (): void => {\n  if (resultInit?.value?.webExtensionInstallURL) {\n    window.open(resultInit.value.webExtensionInstallURL, '_blank');\n  }\n};\n\nwatch(timerOTPObject, () => {\n  if (!isQrcodeActive.value && !timerOTPObject.isRun) {\n    isQrcodeActive.value = true;\n    clearTimeout(timeOutId.value);\n  }\n});\n\nwatch(kspConfirmEvent, (event) => {\n  if (event) {\n    isLoading.value = false;\n    readEdsDialogConfig.showTabsHeader = false;\n  }\n});\n\nwatch(selectedKsp, (ksp) => {\n  if (!ksp) {\n    kspData.value.kspName = '';\n    return;\n  }\n  kspData.value.kspName = ksp.name || ksp.label || '';\n  if (!kspRequiresUserId(ksp)) {\n    kspData.value.userId = '';\n  }\n});\n\nwatch(activeTab, async (val) => {\n  if (val !== 1) {\n    if (kspUiOpen.value) {\n      await resetKspUi();\n    }\n  }\n\n  if (val === 2 && !edsInitResult.value) {\n    loadEds.value = true;\n    try {\n      const { euscp } = await import('@/modules/eds/euscpSW');\n      edsInitResult.value = await euscp.init('sw');\n      resultInit.value = edsInitResult.value?.libraryInfo;\n      tokenKeyMedia.value = edsInitResult.value?.allMedias;\n      options.value = tokenKeyMedia.value?.map((token: any) => ({\n        label: token.type,\n        value: token.typeIndex,\n      })) || [];\n      if (options.value.length === 1) {\n        tokenKey.value = options.value[0];\n      }\n      edsTokenInterval.value = setInterval(async () => {\n        try {\n          const newTokenKeyMedia = await euscp.getKeyMedias();\n          const newLibraryInfo = await euscp.getLibraryInfo();\n          resultInit.value = newLibraryInfo;\n          if (JSON.stringify(newTokenKeyMedia) !== JSON.stringify(tokenKeyMedia.value)) {\n            tokenKeyMedia.value = newTokenKeyMedia;\n            options.value = tokenKeyMedia.value?.map((token: any) => ({\n              label: token.type,\n              value: token.typeIndex,\n            })) || [];\n            if (options.value.length === 1) {\n              tokenKey.value = options.value[0];\n            }\n            if (options.value.length === 0) {\n              tokenKey.value = null;\n            }\n          }\n        } catch {\n          resultInit.value = {\n            supported: false,\n            isWebExtensionSupported: false,\n            isWebExtensionInstalled: false,\n            helpURL: 'https://iit.com.ua/download/productfiles/EUSignWebOManual.pdf',\n            webExtensionInstallURL: 'https://chrome.google.com/webstore/detail/%D1%96%D1%96%D1%82-%D0%BA%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87-%D1%86%D1%81%D0%BA-1-%D0%B1%D1%96%D0%B1%D0%BB/jffafkigfgmjafhpkoibhfefeaebmccg?utm_source=chrome-app-launcher-info-dialog',\n          };\n        }\n      }, 2000);\n      loadEds.value = false;\n    } catch (error) {\n      console.log('EUSCP initialization error:', error);\n      if (!resultInit.value) {\n        resultInit.value = {\n          supported: false,\n          isWebExtensionSupported: false,\n          isWebExtensionInstalled: false,\n          helpURL: 'https://iit.com.ua/download/productfiles/EUSignWebOManual.pdf',\n          webExtensionInstallURL: 'https://chrome.google.com/webstore/detail/%D1%96%D1%96%D1%82-%D0%BA%D0%BE%D1%80%D0%B8%D1%81%D1%82%D1%83%D0%B2%D0%B0%D1%87-%D1%86%D1%81%D0%BA-1-%D0%B1%D1%96%D0%B1%D0%BB/jffafkigfgmjafhpkoibhfefeaebmccg?utm_source=chrome-app-launcher-info-dialog',\n        };\n      }\n      loadEds.value = false;\n    }\n  }\n  if (val !== 2) {\n    clearInterval(edsTokenInterval.value);\n  }\n});\n\nonBeforeMount(async () => {\n  clearInterval(edsTokenInterval.value);\n  try {\n    await prefetchKSPServers();\n  } catch (error) {\n    console.error('KSP prefetch error:', error);\n  }\n  if (saveEds.value && readEdsDialogConfig.showSaveEds) {\n    const sessionKeyStoreListObject = JSON.parse(localStorage.getItem('sessionKeystoreList') as string);\n    const sessionKeyStoreListPasswords = JSON.parse(sessionStorage.getItem('sessionKeystoreListPasswords') as string);\n    const sessionKeyStoreList = {\n      signature: {\n        ...sessionKeyStoreListObject?.signature,\n        password: sessionKeyStoreListPasswords?.signature?.password || '',\n      },\n      stamp: {\n        ...sessionKeyStoreListObject?.stamp,\n        password: sessionKeyStoreListPasswords?.stamp?.password || '',\n      },\n    };\n    if (sessionKeyStoreList && sessionKeyStoreList?.signature?.fileBase64 !== '' && sessionKeyStoreList?.signature?.password !== '') {\n      keystoreList.value = sessionKeyStoreList;\n      keystoreList.value.signature.file = FileConverter.base64ToFile(keystoreList.value.signature.fileBase64);\n      signatureUi.value = true;\n    }\n    if (sessionKeyStoreList && sessionKeyStoreList?.stamp?.fileBase64 !== '' && sessionKeyStoreList?.stamp?.password !== '') {\n      keystoreList.value = sessionKeyStoreList;\n      keystoreList.value.stamp.file = FileConverter.base64ToFile(keystoreList.value.stamp.fileBase64);\n      stampUi.value = true;\n    }\n  }\n});\n\nconst openNovaKeyModal = async () => {\n  kspUiOpen.value = false;\n  gryadaUid.value = await authModule.signAuthSessionCreate('gryada_link_contractor');\n  openModal(EModalNames.signatureNovaKeyModal);\n};\n\nconst reloadPage = (): void => {\n  window.location.reload();\n};\n\nonBeforeUnmount(async () => {\n  clearInterval(edsTokenInterval.value);\n  otpTimerFunctions.stopTimer();\n  otpTimerFunctions.setDefaultTimerOTP();\n  if (keyTypeDevice.value === 'ksp' || kspUiOpen.value) {\n    await resetKspUi();\n  }\n  if (!saveEds.value) {\n    sessionStorage.removeItem('sessionKeystoreListPasswords');\n  }\n  readEdsDialogConfig.dialogAction = EReadEdsDialogActions.default;\n});\n\nconst handleTabChange = (index: number) => {\n  activeTab.value = index;\n};\n</script>\n\n<style scoped lang=\"scss\">\n@import 'readEdsFormStyle';\n.token {\n  &-select {\n    padding: 0 15px;\n    margin-bottom: 10px;\n    background-color: #f6f6f9;\n    border-radius: 10px;\n    height: 44px;\n\n    :deep(.q-field__label) {\n      top: 16px;\n    }\n    :deep(.q-field__marginal) {\n      height: 44px;\n    }\n    &.q-field--auto-height.q-field--labeled :deep(.q-field__control-container) {\n      padding-top: 16px;\n    }\n  }\n\n  &-init-message {\n    font-size: 12px;\n    color: #475569;\n    text-align: center;\n    margin: 10px 0;\n  }\n}\n\n.ksp-signature {\n  width: 100%;\n  margin-top: 10px;\n\n  &__confirm {\n    margin-top: 0;\n  }\n\n  &__confirm img {\n    max-width: 200px;\n    padding: 10px;\n    background: white;\n  }\n}\n\n.ksp-user-id {\n  margin-top: 10px;\n  border: 1px solid transparent;\n}\n</style>\n<style>\n  .token-options {\n    transform: translate(0px, 44px);\n    width: 291px;\n    min-height: 40px !important;\n  }\n  .token-options-empty {\n    transform: translate(-10px, -10px);\n    width: 291px;\n  }\n</style>\n","import script from \"./ReadEDSForm.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ReadEDSForm.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./ReadEDSForm.vue?vue&type=style&index=0&id=0863686a&scoped=true&lang=scss\"\nimport \"./ReadEDSForm.vue?vue&type=style&index=1&id=0863686a&lang=css\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0863686a\"]])\n\nexport default __exports__\nimport QSelect from 'quasar/src/components/select/QSelect.js';\nimport QItem from 'quasar/src/components/item/QItem.js';\nimport QItemSection from 'quasar/src/components/item/QItemSection.js';\nimport QField from 'quasar/src/components/field/QField.js';\nimport qInstall from \"../../../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(script, 'components', {QSelect,QItem,QItemSection,QField});\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { EModalNames } from '@/modules/store/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport ReadEDSForm from './ReadEDSForm.vue';\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'ReadEDSModal',\n  setup(__props) {\n\n\n\nreturn (_ctx: any,_cache: any) => {\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: _ctx.$t('components.common.eds.ReadEDSForm.formCaption'),\n    \"modal-name\": _unref(EModalNames).readEDSModal,\n    height: '25rem'\n  }, {\n    default: _withCtx(() => [\n      _createVNode(ReadEDSForm)\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","import script from \"./ReadEDSModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ReadEDSModal.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import {\n  Ref,\n  computed,\n} from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { onClickOutside } from '@vueuse/core';\nimport { useContractorsActions } from '@/components/v2/views/settings/contractors/useContractorsActions';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { useUiModule } from '@/modules/store/ui';\nimport { useNavigationHelpers } from '@/lib/core/composables';\nimport { useAuthModule } from '@/modules/store/auth';\nimport { useUserModule } from '@/modules/store/user';\nimport { Components } from '@/lib/types';\n\nexport const useUserMenu = () => {\n  const userModule = useUserModule();\n  const contractorsActions = useContractorsActions();\n  const uiModule = useUiModule();\n  const { redirect } = useNavigationHelpers();\n  const authModule = useAuthModule();\n  const { profile } = storeToRefs(userModule);\n\n  const phonesList = computed<Components.NdSelect.INdSelectListItem[]>(() => {\n    const tmpArr: Components.NdSelect.INdSelectListItem[] = profile.value?.phones\n      ? profile.value.phones.map((phone: string) => ({\n        label: phone,\n        value: phone,\n      }))\n      : [];\n\n    return tmpArr;\n  });\n\n  const contactPhone = phonesList.value.length ? phonesList.value[0].value : '';\n\n  const switchActiveContractor = async (contractorId: number): Promise<void> => {\n    await contractorsActions.switchActiveContractor(contractorId);\n  };\n\n  const onContractorManagement = (): void => {\n    uiModule.toggleUserMenu();\n    redirect({ name: ERouteNames.myContractors });\n  };\n\n  const onAddContractor = async (): Promise<void> => {\n    uiModule.toggleUserMenu();\n    await contractorsActions.showAddContractorModal();\n  };\n\n  const onExit = (): void => {\n    uiModule.toggleUserMenu();\n    authModule.logOut();\n  };\n\n  const onClickOutsideAvatar = (element: Ref<HTMLDivElement | undefined>, isOpen: Ref<boolean>, callback: () => void) => {\n    onClickOutside(element, (event: Event) => {\n      const target = event.target as Element;\n      if (target.className !== 'avatar__text' && isOpen.value) {\n        callback();\n      }\n    });\n  };\n\n  return {\n    switchActiveContractor,\n    onContractorManagement,\n    onAddContractor,\n    onExit,\n    onClickOutsideAvatar,\n    phonesList,\n    contactPhone,\n  };\n};\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"nd-breadcrumbs\" }\n\nimport { useRoute } from 'vue-router';\nimport { computed } from 'vue';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { storeToRefs } from 'pinia';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { useI18n } from 'vue-i18n';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'Breadcrumbs',\n  setup(__props) {\n\nconst { t } = useI18n();\n\nconst route = useRoute();\nconst { currentDocument } = storeToRefs(useDocumentsModule());\nconst currentLocation = computed<string>(() => {\n  if (route.name === ERouteNames.document) {\n    return currentDocument.value?.name as string;\n  }\n  return t(`components.common.header.navBreadcrumbs.${route.name as string}`);\n});\n\nreturn (_ctx: any,_cache: any) => {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, _toDisplayString(currentLocation.value), 1))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { useRoute } from 'vue-router';\nimport { computed } from 'vue';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { storeToRefs } from 'pinia';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { useI18n } from 'vue-i18n';\n\nconst { t } = useI18n();\n\nconst route = useRoute();\nconst { currentDocument } = storeToRefs(useDocumentsModule());\nconst currentLocation = computed<string>(() => {\n  if (route.name === ERouteNames.document) {\n    return currentDocument.value?.name as string;\n  }\n  return t(`components.common.header.navBreadcrumbs.${route.name as string}`);\n});\n</script>\n\n<template>\n  <div class=\"nd-breadcrumbs\">{{ currentLocation }}</div>\n</template>\n\n<style scoped lang=\"scss\">\n.nd-breadcrumbs {\n  @include lineClamp(2);\n  @include typography('inter-14');\n  margin: 0 2rem;\n  text-align: center;\n  font-weight: 500;\n  width: calc(100vw - 35rem);\n  @include tablet() {\n    display: none;\n  }\n  @include mobile() {\n    display: none;\n  }\n}\n</style>\n","import script from \"./Breadcrumbs.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Breadcrumbs.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Breadcrumbs.vue?vue&type=style&index=0&id=66164005&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-66164005\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, unref as _unref, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"nd-admin-menu\" }\nconst _hoisted_2 = { class: \"nd-admin-menu__list\" }\nconst _hoisted_3 = [\"onClick\"]\n\nimport { computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\nimport { RouteLocationNamedRaw } from 'vue-router';\nimport { useNavigationHelpers } from '@/lib/core/composables';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { useUserModule } from '@/modules/store/user';\nimport { Components } from '@/lib/types';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'AdminMenu',\n  setup(__props) {\n\nconst { t } = useI18n();\nconst { redirect, isActiveRoute } = useNavigationHelpers();\nconst userModule = useUserModule();\nconst routes: Components.IMenuItemConfig[] = computed(() => [\n  {\n    routeLocation: { name: ERouteNames.users },\n    label: t('views.admin.routes.users'),\n    hasPermissions: userModule.hasPermissions('adminViewContractorsList'),\n  },\n  {\n    routeLocation: { name: ERouteNames.organization },\n    routeLocationDetail: { name: ERouteNames.organizationDetail },\n    label: t('views.admin.routes.organization'),\n    hasPermissions: userModule.profile?.permissions?.some((permission) => permission.startsWith('admin')),\n  },\n  {\n    routeLocation: { name: ERouteNames.adminSettings },\n    label: t('views.admin.routes.settings'),\n    hasPermissions: userModule.hasPermissions('adminEditAdminProfiles') || userModule.hasPermissions('adminEditRates'),\n  },\n  // {\n  //   routeLocation: { name: ERouteNames.adminLogs },\n  //   label: t('views.admin.routes.logs'),\n  //   hasPermissions: userModule.hasPermissions('adminViewLogs'),\n  // },\n  {\n    routeLocation: { name: ERouteNames.surveys },\n    label: t('views.admin.routes.surveys'),\n    hasPermissions: userModule.hasPermissions('adminEditSurveys'),\n  },\n  {\n    routeLocation: { name: ERouteNames.leads },\n    label: t('views.admin.routes.leads'),\n    hasPermissions: userModule.hasPermissions('adminViewLeads') || userModule.hasPermissions('adminAccess'),\n  },\n  {\n    routeLocation: { name: ERouteNames.templates },\n    label: t('views.admin.routes.templates'),\n    hasPermissions: userModule.hasPermissions('adminTemplatesAdmin'),\n  },\n  {\n    routeLocation: { name: ERouteNames.adminExports },\n    label: t('views.admin.routes.exports'),\n    hasPermissions: userModule.profile?.permissions?.some((permission) => permission.startsWith('admin')),\n  },\n]);\n\nconst $redirect = (to: RouteLocationNamedRaw) => {\n  if (!isActiveRoute(to)) {\n    redirect(to);\n  }\n};\n\nreturn (_ctx: any,_cache: any) => {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"ul\", _hoisted_2, [\n      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(routes.value, (route) => {\n        return (_openBlock(), _createElementBlock(_Fragment, {\n          key: route.routeLocation.name\n        }, [\n          (route.hasPermissions)\n            ? (_openBlock(), _createElementBlock(\"li\", {\n                key: 0,\n                onClick: ($event: any) => ($redirect(route.routeLocation)),\n                class: _normalizeClass([\"nd-admin-menu__item\", {'active': _unref(isActiveRoute)(route.routeLocation) || (route?.routeLocationDetail && _unref(isActiveRoute)(route?.routeLocationDetail))}])\n              }, _toDisplayString(route.label), 11, _hoisted_3))\n            : _createCommentVNode(\"\", true)\n        ], 64))\n      }), 128))\n    ])\n  ]))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { useI18n } from 'vue-i18n';\nimport { RouteLocationNamedRaw } from 'vue-router';\nimport { useNavigationHelpers } from '@/lib/core/composables';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { useUserModule } from '@/modules/store/user';\nimport { Components } from '@/lib/types';\n\nconst { t } = useI18n();\nconst { redirect, isActiveRoute } = useNavigationHelpers();\nconst userModule = useUserModule();\nconst routes: Components.IMenuItemConfig[] = computed(() => [\n  {\n    routeLocation: { name: ERouteNames.users },\n    label: t('views.admin.routes.users'),\n    hasPermissions: userModule.hasPermissions('adminViewContractorsList'),\n  },\n  {\n    routeLocation: { name: ERouteNames.organization },\n    routeLocationDetail: { name: ERouteNames.organizationDetail },\n    label: t('views.admin.routes.organization'),\n    hasPermissions: userModule.profile?.permissions?.some((permission) => permission.startsWith('admin')),\n  },\n  {\n    routeLocation: { name: ERouteNames.adminSettings },\n    label: t('views.admin.routes.settings'),\n    hasPermissions: userModule.hasPermissions('adminEditAdminProfiles') || userModule.hasPermissions('adminEditRates'),\n  },\n  // {\n  //   routeLocation: { name: ERouteNames.adminLogs },\n  //   label: t('views.admin.routes.logs'),\n  //   hasPermissions: userModule.hasPermissions('adminViewLogs'),\n  // },\n  {\n    routeLocation: { name: ERouteNames.surveys },\n    label: t('views.admin.routes.surveys'),\n    hasPermissions: userModule.hasPermissions('adminEditSurveys'),\n  },\n  {\n    routeLocation: { name: ERouteNames.leads },\n    label: t('views.admin.routes.leads'),\n    hasPermissions: userModule.hasPermissions('adminViewLeads') || userModule.hasPermissions('adminAccess'),\n  },\n  {\n    routeLocation: { name: ERouteNames.templates },\n    label: t('views.admin.routes.templates'),\n    hasPermissions: userModule.hasPermissions('adminTemplatesAdmin'),\n  },\n  {\n    routeLocation: { name: ERouteNames.adminExports },\n    label: t('views.admin.routes.exports'),\n    hasPermissions: userModule.profile?.permissions?.some((permission) => permission.startsWith('admin')),\n  },\n]);\n\nconst $redirect = (to: RouteLocationNamedRaw) => {\n  if (!isActiveRoute(to)) {\n    redirect(to);\n  }\n};\n</script>\n\n<template>\n  <div class=\"nd-admin-menu\">\n    <ul class=\"nd-admin-menu__list\">\n      <template v-for=\"route in routes\" :key=\"route.routeLocation.name\">\n        <li\n          v-if=\"route.hasPermissions\"\n          @click=\"$redirect(route.routeLocation)\"\n          class=\"nd-admin-menu__item\"\n          :class=\"{'active': isActiveRoute(route.routeLocation) || (route?.routeLocationDetail && isActiveRoute(route?.routeLocationDetail))}\">{{route.label}}</li>\n      </template>\n    </ul>\n  </div>\n</template>\n\n<style scoped lang=\"scss\">\n.nd-admin-menu {\n  &__list {\n    @include flex(row, center, center);\n    gap: 4px;\n  }\n  &__item {\n    @include typography('inter-12');\n    color: $light_500;\n    padding: 10px 16px;\n    cursor: pointer;\n    font-weight: 400;\n    border-radius: 8px;\n    &.active {\n      background-color: $light_050;\n      color: $pale_aqua_dark;\n    }\n  }\n}\n</style>\n","import script from \"./AdminMenu.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./AdminMenu.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./AdminMenu.vue?vue&type=style&index=0&id=7ba8abf7&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7ba8abf7\"]])\n\nexport default __exports__","<script setup lang=\"ts\">\n\n</script>\n\n<template>\n  <div class=\"nd-divider\"></div>\n</template>\n\n<style scoped lang=\"scss\">\n.nd-divider {\n  @include size(1px, 60%);\n  border: 1px solid $light_050;\n  margin: 0 0.5rem 0 0.25rem;\n}\n</style>\n","import { render } from \"./Divider.vue?vue&type=template&id=fa6146fe&scoped=true\"\nconst script = {}\n\nimport \"./Divider.vue?vue&type=style&index=0&id=fa6146fe&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-fa6146fe\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = { class: \"nd-user-menu\" }\nconst _hoisted_2 = { class: \"nd-user-menu__heading\" }\nconst _hoisted_3 = { class: \"user-info\" }\nconst _hoisted_4 = { class: \"user-info__username\" }\nconst _hoisted_5 = {\n  key: 0,\n  class: \"user-info__phone\"\n}\nconst _hoisted_6 = { class: \"nd-user-menu__contractors\" }\nconst _hoisted_7 = {\n  key: 0,\n  class: \"contractor contractor--active\"\n}\nconst _hoisted_8 = { class: \"contractor__tax-number\" }\nconst _hoisted_9 = { class: \"contractor__shortname\" }\nconst _hoisted_10 = {\n  key: 1,\n  class: \"contractor__empty\"\n}\nconst _hoisted_11 = { class: \"contractor__empty-message\" }\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = { class: \"contractor__tax-number\" }\nconst _hoisted_14 = { class: \"contractor__shortname\" }\n\nimport { computed } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { RouteLocationNamedRaw } from 'vue-router';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useUserModule } from '@/modules/store/user';\nimport Avatar from '@/components/v2/ui/Avatar.vue';\nimport { useUserMenu } from '../useUserMenu';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'UserMenu',\n  emits: [\"redirect\"],\n  setup(__props, { emit: __emit }) {\n\nconst { activeContractor, otherContractors } = storeToRefs(useContractorsModule());\nconst { isServiceUser } = storeToRefs(useUserModule());\nconst { profile } = storeToRefs(useUserModule());\n\nconst {\n  switchActiveContractor,\n  onExit,\n  contactPhone,\n} = useUserMenu();\n\nconst emit = __emit;\nconst contactPhoneMask = computed<string>(() => {\n  let i = 0;\n  const v = contactPhone.toLocaleString();\n  // eslint-disable-next-line no-plusplus\n  return '+### ## ### ## ##'.replace(/#/g, () => v[i++]);\n});\n\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createElementVNode(\"div\", _hoisted_4, _toDisplayString(_unref(profile).fullName), 1),\n        (!_unref(isServiceUser))\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, _toDisplayString(contactPhoneMask.value), 1))\n          : _createCommentVNode(\"\", true)\n      ]),\n      (!_unref(isServiceUser))\n        ? (_openBlock(), _createElementBlock(\"div\", {\n            key: 0,\n            class: \"user-settings\",\n            onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('redirect', { name: _unref(ERouteNames).myContractors })))\n          }, [\n            _createVNode(_component_InlineSvg, {\n              src: require('@/assets/icons/IconGearWhite.svg')\n            }, null, 8, [\"src\"])\n          ]))\n        : _createCommentVNode(\"\", true)\n    ]),\n    _createElementVNode(\"div\", _hoisted_6, [\n      (_unref(activeContractor))\n        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n            _createVNode(Avatar, {\n              color: (_unref(activeContractor)?.avatarColor as unknown as Colors.HTMLColor),\n              caption: (_unref(activeContractor)?.avatarCaption as unknown as string),\n              disabled: !_unref(activeContractor).active,\n              class: \"contractor__avatar\"\n            }, null, 8, [\"color\", \"caption\", \"disabled\"]),\n            _createElementVNode(\"div\", {\n              class: _normalizeClass([\"contractor__description\", {'contractor__description--disabled': !_unref(activeContractor).active}])\n            }, [\n              _createElementVNode(\"div\", _hoisted_8, _toDisplayString(_unref(activeContractor)?.taxNumber), 1),\n              _createElementVNode(\"div\", _hoisted_9, _toDisplayString(_unref(activeContractor)?.shortName), 1)\n            ], 2)\n          ]))\n        : _createCommentVNode(\"\", true),\n      (!_unref(activeContractor))\n        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n            _createElementVNode(\"p\", _hoisted_11, _toDisplayString(_ctx.$t('components.common.header.userMenu.contractorEmptyMessage')), 1)\n          ]))\n        : _createCommentVNode(\"\", true),\n      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(otherContractors), (contractor) => {\n        return (_openBlock(), _createElementBlock(\"div\", {\n          key: contractor.id,\n          class: \"contractor\",\n          onClick: ($event: any) => (_unref(switchActiveContractor)(contractor.id))\n        }, [\n          _createVNode(Avatar, {\n            color: (contractor?.avatarColor as unknown as Colors.HTMLColor),\n            caption: (contractor?.avatarCaption as unknown as string),\n            disabled: !contractor.active,\n            class: \"contractor__avatar\"\n          }, null, 8, [\"color\", \"caption\", \"disabled\"]),\n          _createElementVNode(\"div\", {\n            class: _normalizeClass([\"contractor__description\", {'contractor__description--disabled': !contractor.active}])\n          }, [\n            _createElementVNode(\"div\", _hoisted_13, _toDisplayString(contractor?.taxNumber), 1),\n            _createElementVNode(\"div\", _hoisted_14, _toDisplayString(contractor?.shortName), 1)\n          ], 2)\n        ], 8, _hoisted_12))\n      }), 128))\n    ]),\n    _createElementVNode(\"div\", {\n      class: \"nd-user-menu__footer\",\n      onClick: _cache[1] || (_cache[1] = ($event: any) => (_unref(onExit)()))\n    }, [\n      _createVNode(_component_InlineSvg, {\n        src: require(`@/assets/icons/IconExit.svg`)\n      }, null, 8, [\"src\"]),\n      _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('components.common.header.userMenu.exitButton')), 1)\n    ])\n  ]))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { defineEmits, computed } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { RouteLocationNamedRaw } from 'vue-router';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useUserModule } from '@/modules/store/user';\nimport Avatar from '@/components/v2/ui/Avatar.vue';\nimport { useUserMenu } from '../useUserMenu';\n\nconst { activeContractor, otherContractors } = storeToRefs(useContractorsModule());\nconst { isServiceUser } = storeToRefs(useUserModule());\nconst { profile } = storeToRefs(useUserModule());\n\nconst {\n  switchActiveContractor,\n  onExit,\n  contactPhone,\n} = useUserMenu();\n\nconst emit = defineEmits<{(e: 'redirect', value: RouteLocationNamedRaw): void }>();\nconst contactPhoneMask = computed<string>(() => {\n  let i = 0;\n  const v = contactPhone.toLocaleString();\n  // eslint-disable-next-line no-plusplus\n  return '+### ## ### ## ##'.replace(/#/g, () => v[i++]);\n});\n\n</script>\n\n<template>\n  <div class=\"nd-user-menu\">\n    <div class=\"nd-user-menu__heading\">\n      <div class=\"user-info\">\n        <div class=\"user-info__username\">{{ profile.fullName }}</div>\n        <div v-if=\"!isServiceUser\" class=\"user-info__phone\">{{ contactPhoneMask }}</div>\n      </div>\n      <div\n        v-if=\"!isServiceUser\" class=\"user-settings\"\n        @click=\"emit('redirect', { name: ERouteNames.myContractors })\"\n      >\n        <InlineSvg :src=\"require('@/assets/icons/IconGearWhite.svg')\" />\n      </div>\n    </div>\n    <div class=\"nd-user-menu__contractors\">\n      <div v-if=\"activeContractor\" class=\"contractor contractor--active\">\n        <Avatar\n          :color=\"(activeContractor?.avatarColor as unknown as Colors.HTMLColor)\"\n          :caption=\"(activeContractor?.avatarCaption as unknown as string)\"\n          :disabled=\"!activeContractor.active\"\n          class=\"contractor__avatar\"\n        />\n        <div class=\"contractor__description\" :class=\"{'contractor__description--disabled': !activeContractor.active}\">\n          <div class=\"contractor__tax-number\">{{ activeContractor?.taxNumber }}</div>\n          <div class=\"contractor__shortname\">{{ activeContractor?.shortName }}</div>\n        </div>\n      </div>\n      <div v-if=\"!activeContractor\" class=\"contractor__empty\">\n        <p class=\"contractor__empty-message\">\n          {{ $t('components.common.header.userMenu.contractorEmptyMessage') }}\n        </p>\n      </div>\n      <div\n        v-for=\"contractor in otherContractors\"\n        :key=\"contractor.id\"\n        class=\"contractor\"\n        @click=\"switchActiveContractor(contractor.id)\"\n      >\n        <Avatar\n          :color=\"(contractor?.avatarColor as unknown as Colors.HTMLColor)\"\n          :caption=\"(contractor?.avatarCaption as unknown as string)\"\n          :disabled=\"!contractor.active\"\n          class=\"contractor__avatar\"\n        />\n        <div class=\"contractor__description\" :class=\"{'contractor__description--disabled': !contractor.active}\">\n          <div class=\"contractor__tax-number\">{{ contractor?.taxNumber }}</div>\n          <div class=\"contractor__shortname\">{{ contractor?.shortName }}</div>\n        </div>\n      </div>\n    </div>\n    <div class=\"nd-user-menu__footer\" @click=\"onExit()\">\n      <InlineSvg :src=\"require(`@/assets/icons/IconExit.svg`)\" />\n      <span>{{ $t('components.common.header.userMenu.exitButton') }}</span>\n    </div>\n  </div>\n</template>\n\n<style scoped lang=\"scss\">\n.nd-user-menu {\n  @include size(17rem, fit-content);\n  max-height: calc(100svh - $header-height - 0.5rem);\n  @include position(absolute, calc(#{$header-height} - 0.5rem), 0.5rem, null, null);\n  background-color: $light_000;\n  @include flex(column, flex-start, flex-start);\n  z-index: 50;\n  transition: all 0.3s ease-in-out;\n  padding: 1rem 1.125rem;\n  box-shadow: $shadow_03;\n  border-radius: 0.25rem;\n\n  .nd-user-menu__heading {\n    @include size(100%);\n    @include flex(row, space-between, flex-start);\n    border-bottom: 1px solid $light_200;\n    padding-bottom: 0.5rem;\n\n    .user-info {\n      @include flex(column, center, flex-start);\n\n      .user-info__username {\n        @include typography('inter-semibold-14');\n        font-weight: 600;\n        margin-bottom: 0.25rem;\n      }\n\n      .user-info__phone {\n        @include typography('inter-12');\n        font-weight: 400;\n      }\n    }\n\n    .user-settings {\n      @include size(2rem, 2rem);\n      @include flex(row, center, center);\n      border-radius: 0.5rem;\n      cursor: pointer;\n      background-color: $pale_aqua_light;\n      padding: 0.5rem;\n\n      @include hover() {\n        filter: brightness(105%);\n      }\n    }\n  }\n\n  .nd-user-menu__contractors {\n    width: 100%;\n    border-bottom: 1px solid $light_200;\n    padding-top: .75rem;\n    padding-bottom: 0.5rem;\n    overflow-y: auto;\n\n    .contractor {\n      @include size(100%, 2.875rem);\n      @include flex(row, flex-start, center);\n      cursor: pointer;\n      padding: 0.75rem 0 0.75rem 0.75rem;\n      border-radius: 0.5rem;\n      transition: all 0.3s ease-in-out;\n\n      &--active {\n        background-color: $pale_aqua_light;\n      }\n\n      &:not(:last-child) {\n        margin-bottom: 0.25rem;\n      }\n\n      .contractor__avatar {\n        @include size(1.625rem, 1.625rem);\n        min-width: 1.625rem;\n        margin-right: 1rem;\n        :deep(.avatar__text) {\n          @include typography('inter-medium-12');\n          font-weight: 500;\n          border: .0625rem solid $light_000;\n        }\n      }\n\n      .contractor__description {\n        @include size(100%);\n        @include flex(column, flex-start, flex-start);\n\n        .contractor__tax-number {\n          @include typography('inter-10');\n          font-weight: 600;\n        }\n\n        .contractor__shortname {\n          @include typography('inter-10');\n          @include lineClamp(1);\n          max-width: 10rem;\n          letter-spacing: 0;\n          font-weight: 400;\n        }\n        &--disabled {\n          color: $light_400;\n        }\n      }\n    }\n\n    .contractor__empty {\n      margin: 0.5rem 0;\n      text-align: center;\n\n      .contractor__empty-message {\n        @include typography('inter-12');\n      }\n    }\n  }\n\n  .nd-user-menu__footer {\n    @include size(100%);\n    @include flex(row, center, center);\n    filter: $filter-svg-maximum-red;\n    cursor: pointer;\n    padding-top: 1rem;\n\n    span {\n      margin-left: 0.25rem;\n      @include typography('inter-medium-14');\n    }\n\n    svg {\n      @include size(1.2rem, 1.2rem);\n    }\n  }\n}\n</style>\n","import script from \"./UserMenu.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./UserMenu.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./UserMenu.vue?vue&type=style&index=0&id=ba6f3fc4&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ba6f3fc4\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"notifications\" }\nconst _hoisted_2 = { class: \"notifications__heading\" }\nconst _hoisted_3 = { class: \"notifications__list\" }\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = { class: \"notification__dot\" }\nconst _hoisted_6 = { class: \"notification__content\" }\nconst _hoisted_7 = { class: \"notification__description\" }\nconst _hoisted_8 = { class: \"title text-shrink\" }\nconst _hoisted_9 = { class: \"date\" }\nconst _hoisted_10 = { class: \"notification__message text-shrink\" }\nconst _hoisted_11 = [\"onClick\"]\n\nimport ModalSidebar from '@/components/v2/ui/Modal/ModalSidebar.vue';\nimport { ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { onClickOutside } from '@vueuse/core';\nimport { useUiModule } from '@/modules/store/ui';\nimport { useNotificationsModule } from '@/modules/store/notifications';\nimport { ENotificationStatuses } from '@/lib/models/Notification/ENotificationStatuses';\nimport { INotification } from '@/lib/models/Notification/Notification';\nimport { ENotificationObjectTypes } from '@/lib/models/Notification/ENotificationObjectTypes';\nimport { useGetBreakpoints, useNavigationHelpers } from '@/lib/core/composables';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'SystemNotifications',\n  emits: [\"close\"],\n  setup(__props, { emit: __emit }) {\n\nconst emit = __emit;\nconst close = () => emit('close');\n\nconst uiModule = useUiModule();\nconst { openNotificationMenu } = storeToRefs(uiModule);\nconst notificationsModule = useNotificationsModule();\nconst { list } = storeToRefs(notificationsModule);\nconst { redirect } = useNavigationHelpers();\nconst { isMobile } = useGetBreakpoints();\nconst notificationMenu = ref<HTMLDivElement>();\nonClickOutside(notificationMenu, (event: Event) => {\n  const target = event.target as Element;\n  if (target.id !== 'toggleNotificationMenu') {\n    openNotificationMenu.value = false;\n  }\n});\n\nconst onNotificationClick = (notification: INotification) => {\n  close();\n  openNotificationMenu.value = false;\n  notificationsModule.markNotificationAsRead(notification.id);\n  const notificationPayload = notification.payload;\n  if (notification.objectType === ENotificationObjectTypes.document) {\n    redirect({ name: ERouteNames.document, params: { id: notification.objectId }});\n  }\n  if (notification.objectType === ENotificationObjectTypes.archive) {\n    redirect({ name: ERouteNames.myArchives });\n  }\n  if (notification.objectType === ENotificationObjectTypes.comment) {\n    redirect({\n      name: ERouteNames.document,\n      params: { id: Number(notificationPayload.documentId) },\n      query: { commentId: notificationPayload.commentId },\n    });\n  }\n};\n\nconst onNotificationDeleteClick = (notification?: INotification) => {\n  notificationsModule.deleteNotification(notification?.id);\n};\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_q_tooltip = _resolveComponent(\"q-tooltip\")!\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n\n  return (_openBlock(), _createBlock(ModalSidebar, {\n    title: _ctx.$t('components.common.header.notificationMenu.title'),\n    onClose: _cache[1] || (_cache[1] = ($event: any) => (close()))\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"div\", _hoisted_2, [\n          _createElementVNode(\"div\", {\n            class: \"action\",\n            onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (onNotificationDeleteClick()), [\"prevent\",\"stop\"]))\n          }, \"Очистити\")\n        ]),\n        _createElementVNode(\"div\", _hoisted_3, [\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(list) as INotification[], (notification) => {\n            return (_openBlock(), _createElementBlock(\"div\", {\n              key: `notification-${notification.id}`,\n              class: _normalizeClass(['notification', { 'notification--read': notification.status === _unref(ENotificationStatuses).read }]),\n              onClick: _withModifiers(($event: any) => (onNotificationClick(notification)), [\"stop\"])\n            }, [\n              _createElementVNode(\"div\", _hoisted_5, [\n                _createElementVNode(\"div\", {\n                  class: _normalizeClass(['dot', notification.colorGroup])\n                }, null, 2)\n              ]),\n              _createElementVNode(\"div\", _hoisted_6, [\n                _createElementVNode(\"div\", _hoisted_7, [\n                  _createElementVNode(\"div\", _hoisted_8, _toDisplayString(notification.title), 1),\n                  _createElementVNode(\"div\", _hoisted_9, _toDisplayString(notification.createdAtConverted), 1)\n                ]),\n                _createElementVNode(\"div\", _hoisted_10, _toDisplayString(notification.message), 1),\n                _createVNode(_component_q_tooltip, null, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString(notification.message), 1)\n                  ]),\n                  _: 2\n                }, 1024)\n              ]),\n              _createElementVNode(\"div\", {\n                class: \"notification__action\",\n                onClick: _withModifiers(($event: any) => (onNotificationDeleteClick(notification)), [\"stop\"])\n              }, [\n                _createVNode(_component_InlineSvg, {\n                  src: require('@/assets/icons/IconCross.svg')\n                }, null, 8, [\"src\"])\n              ], 8, _hoisted_11)\n            ], 10, _hoisted_4))\n          }), 128))\n        ])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\"]))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport ModalSidebar from '@/components/v2/ui/Modal/ModalSidebar.vue';\nimport { defineEmits, ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { onClickOutside } from '@vueuse/core';\nimport { useUiModule } from '@/modules/store/ui';\nimport { useNotificationsModule } from '@/modules/store/notifications';\nimport { ENotificationStatuses } from '@/lib/models/Notification/ENotificationStatuses';\nimport { INotification } from '@/lib/models/Notification/Notification';\nimport { ENotificationObjectTypes } from '@/lib/models/Notification/ENotificationObjectTypes';\nimport { useGetBreakpoints, useNavigationHelpers } from '@/lib/core/composables';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\n\nconst emit = defineEmits<{(e: 'close'): void;}>();\nconst close = () => emit('close');\n\nconst uiModule = useUiModule();\nconst { openNotificationMenu } = storeToRefs(uiModule);\nconst notificationsModule = useNotificationsModule();\nconst { list } = storeToRefs(notificationsModule);\nconst { redirect } = useNavigationHelpers();\nconst { isMobile } = useGetBreakpoints();\nconst notificationMenu = ref<HTMLDivElement>();\nonClickOutside(notificationMenu, (event: Event) => {\n  const target = event.target as Element;\n  if (target.id !== 'toggleNotificationMenu') {\n    openNotificationMenu.value = false;\n  }\n});\n\nconst onNotificationClick = (notification: INotification) => {\n  close();\n  openNotificationMenu.value = false;\n  notificationsModule.markNotificationAsRead(notification.id);\n  const notificationPayload = notification.payload;\n  if (notification.objectType === ENotificationObjectTypes.document) {\n    redirect({ name: ERouteNames.document, params: { id: notification.objectId }});\n  }\n  if (notification.objectType === ENotificationObjectTypes.archive) {\n    redirect({ name: ERouteNames.myArchives });\n  }\n  if (notification.objectType === ENotificationObjectTypes.comment) {\n    redirect({\n      name: ERouteNames.document,\n      params: { id: Number(notificationPayload.documentId) },\n      query: { commentId: notificationPayload.commentId },\n    });\n  }\n};\n\nconst onNotificationDeleteClick = (notification?: INotification) => {\n  notificationsModule.deleteNotification(notification?.id);\n};\n</script>\n\n<template>\n  <ModalSidebar :title=\"$t('components.common.header.notificationMenu.title')\" @close=\"close()\">\n    <div class=\"notifications\">\n      <div class=\"notifications__heading\">\n        <div class=\"action\" @click.prevent.stop=\"onNotificationDeleteClick()\">Очистити</div>\n      </div>\n      <div class=\"notifications__list\">\n        <div\n          v-for=\"notification in list as INotification[]\"\n          :key=\"`notification-${notification.id}`\"\n          :class=\"['notification', { 'notification--read': notification.status === ENotificationStatuses.read }]\"\n          @click.stop=\"onNotificationClick(notification)\"\n        >\n          <div class=\"notification__dot\">\n            <div :class=\"['dot', notification.colorGroup]\" />\n          </div>\n          <div class=\"notification__content\">\n            <div class=\"notification__description\">\n              <div class=\"title text-shrink\">{{ notification.title }}</div>\n              <div class=\"date\">{{ notification.createdAtConverted }}</div>\n            </div>\n            <div class=\"notification__message text-shrink\">\n              {{ notification.message }}\n            </div>\n            <q-tooltip>\n              {{ notification.message }}\n            </q-tooltip>\n          </div>\n          <div class=\"notification__action\" @click.stop=\"onNotificationDeleteClick(notification)\">\n            <InlineSvg :src=\"require('@/assets/icons/IconCross.svg')\" />\n          </div>\n        </div>\n      </div>\n    </div>\n  </ModalSidebar>\n</template>\n\n<style scoped lang=\"scss\">\n.notifications {\n  @include flex(column, flex-start, center);\n  @include size(100%);\n  height: calc(100svh - 3.75rem);\n  padding: .5rem;\n\n  .notifications__heading {\n    @include size(100%);\n    @include flex(row, center, flex-start);\n    border-bottom: 1px solid $light_050;\n\n    .action {\n      color: $primary--dark;\n      @include typography('inter-semibold-12');\n      cursor: pointer;\n    }\n  }\n\n  .notifications__list {\n    @include size(100%, 100%);\n    overflow-y: auto;\n  }\n\n  .notification {\n    @include flex(row, flex-start, center);\n    @include size(100%, 2.875rem);\n    cursor: pointer;\n    border-radius: 0.25rem;\n\n    &:not(:last-child) {\n      margin-bottom: 0.75rem;\n    }\n\n    @include hover() {\n      background-color: $light_050;\n    }\n\n    &--read {\n      .title {\n        color: $light_400;\n      }\n    }\n\n    .notification__dot,\n    .notification__action {\n      @include size(1.5rem, 100%);\n      @include flex(row, center, center);\n    }\n\n    .notification__action {\n      margin-left: auto;\n      cursor: pointer;\n    }\n\n    .dot {\n      @include size(.75rem, .75rem);\n      border-radius: 50%;\n    }\n\n    .notification__content {\n      @include size(100%, 2.875rem);\n      @include flex(column, space-around, flex-start);\n      flex: 1;\n      padding: 0.25rem 0;\n\n      .notification__description {\n        @include flex(row, space-between, center);\n        @include size(100%);\n\n        .title {\n          @include typography('inter-10');\n          font-weight: 600;\n          letter-spacing: 0px;\n          max-width: 7.5rem;\n        }\n\n        .date {\n          @include typography('inter-10');\n          font-weight: 400;\n          letter-spacing: 0px;\n        }\n      }\n\n      .notification__message {\n        @include typography('inter-10');\n        color: $light_400;\n        font-weight: 400;\n        letter-spacing: 0px;\n        width: 12.5rem;\n      }\n    }\n  }\n\n  .text-shrink {\n    display: block;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n}\n</style>\n","import script from \"./SystemNotifications.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SystemNotifications.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SystemNotifications.vue?vue&type=style&index=0&id=1bd09dbb&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1bd09dbb\"]])\n\nexport default __exports__\nimport QTooltip from 'quasar/src/components/tooltip/QTooltip.js';\nimport qInstall from \"../../../../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(script, 'components', {QTooltip});\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, withModifiers as _withModifiers, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"service-desk-form\" }\nconst _hoisted_2 = { class: \"q-mt-md q-mb-md\" }\nconst _hoisted_3 = { class: \"attachment__description\" }\nconst _hoisted_4 = { class: \"attachment__description-file\" }\nconst _hoisted_5 = { class: \"attachment__description-filename\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"attachment__actions\"\n}\nconst _hoisted_7 = { class: \"progress-bar\" }\nconst _hoisted_8 = {\n  key: 1,\n  class: \"attachment__actions q-mt-xs row justify-between items-center\"\n}\nconst _hoisted_9 = { class: \"attachment__error-message\" }\nconst _hoisted_10 = [\"onClick\"]\nconst _hoisted_11 = {\n  key: 2,\n  class: \"attachment__actions\"\n}\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = { class: \"actiom-block\" }\n\nimport ModalSidebar from '@/components/v2/ui/Modal/ModalSidebar.vue';\nimport {\n  onBeforeMount, onBeforeUnmount, ref, watch,\n} from 'vue';\nimport { useDropZone, useFileDialog } from '@vueuse/core';\nimport { supportedImageFileTypes } from '@/config';\nimport { useI18n } from 'vue-i18n';\nimport {\n  createFileWithProgressTracker,\n  createProgressTracker,\n  EUploadStatus,\n  IFileWithUploadProgress,\n} from '@/lib/core/helpers';\nimport { fileApi } from '@/modules/api/FileApi';\nimport { emitter } from '@/modules/emitter';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport { useUserModule } from '@/modules/store/user';\nimport { useUiModule } from '@/modules/store/ui';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { homePageApi } from '@/modules/api/HomePage.api';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'ServiceDeskModal',\n  emits: [\"close\"],\n  setup(__props, { emit: __emit }) {\n\nconst {\n  serviceDeskModalConfig,\n} = useUiModule();\nconst userModule = useUserModule();\n\nconst emit = __emit;\nconst close = () => emit('close');\nconst content = ref('');\nconst email = ref(userModule?.profile?.properties?.notificationEmail);\nconst { t } = useI18n();\nconst emailError = ref(false);\nconst contentError = ref(false);\n\nconst uploadList = ref<IFileWithUploadProgress[]>([]);\nconst addFileToUploadList = async (fileList: File[] | FileList | null): Promise<void> => {\n  const supportedFileTypesArray = supportedImageFileTypes\n    .split(', ')\n    .map((str: string) => str.substring(1)\n      .toLowerCase());\n\n  if (fileList) {\n    for (let i = 0; i < fileList.length; i += 1) {\n      const file = fileList instanceof FileList ? fileList.item(i) as File : fileList[i];\n      const extension = file.name.split('.')\n        .pop() as string;\n      if (supportedFileTypesArray.includes(extension.toLowerCase())) {\n        const f = createFileWithProgressTracker(file);\n        const progressTracker = createProgressTracker(f);\n        // @ts-ignore\n        uploadList.value.push(f);\n        try {\n          // eslint-disable-next-line no-await-in-loop\n          const { data } = await fileApi.upload(file, progressTracker);\n          if ((data as any).status === 'POTENCIALLY_INSECURE_CONTENT') {\n            const errorMessage = 'При завантаженні вкладення виникла помилка, '\n              + 'файл містить потенційно небезпечний вміст. '\n              + 'Перезбережіть файл та спробуйте ще раз.';\n            emitter.emit(\n              EEmitterEventNames.error,\n              new Error(errorMessage),\n            );\n          }\n          f.status.value = data.id ? EUploadStatus.success : EUploadStatus.error;\n          f.id = data.id;\n        } catch (error) {\n          console.error(error);\n          f.status.value = EUploadStatus.error;\n        }\n      } else {\n        try {\n          emitter.emit(\n            EEmitterEventNames.error,\n            new Error(\n              `${t('components.common.eds.ReadEDSForm.selectKeystoreFileForm.notSupportedFileTypeError')} ${supportedImageFileTypes}`,\n            ),\n          );\n        } catch (error) {\n          console.error(error);\n        }\n      }\n    }\n  }\n};\n\n// drop file\nconst dropZoneRef = ref<HTMLDivElement>();\n\n// select file\nconst {\n  files,\n  open: openNewFile,\n} = useFileDialog({\n  accept: supportedImageFileTypes,\n  multiple: false,\n  reset: true,\n});\n\nconst onDrop = (list: File[] | FileList | null): void => {\n  // always clean current list and add first file from fileList\n  if (list) {\n    addFileToUploadList([list[0]]);\n  }\n};\n\nconst removeFile = (index: number): void => {\n  uploadList.value.splice(index, 1);\n};\n\nconst validateEmailOnBlur = () => {\n  const emailPattern = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n  emailError.value = !emailPattern.test(email.value || '');\n};\n\nconst contentRequired = (val: string) => (val && val.trim().length > 0 ? true : contentError.value = true);\n\nconst { isOverDropZone } = useDropZone(dropZoneRef, onDrop);\n\nwatch(files, (fileList: FileList | null) => addFileToUploadList(fileList));\nwatch(email, () => emailError.value = false);\nwatch(content, () => contentError.value = false);\n\nconst handleSubmit = async () => {\n  if (!emailError.value && content.value.trim()) {\n    emailError.value = false;\n    contentError.value = false;\n    const fileIds = uploadList.value.map((el) => el.id);\n    const lastContractorData = userModule?.profile?.contractors?.find((el) => el.id === userModule?.lastContractor);\n    const description = `${content.value.trim()}\n\n- Назва користувача - ${userModule?.profile?.fullName}\n- Номер телефону користувача - ${userModule?.profile?.phones ? userModule.profile.phones[0] : 'null'}\n- Авторизований з ключа - ${userModule?.profile?.isAuthenticatedByKey}\n- Найменування активного контрагента - ${lastContractorData?.name}\n- tax number активного контрагента - ${lastContractorData?.taxNumber}\n- Сторінка на якій знаходиться користувач - ${window.location.href}\n    `;\n    const { data } = await homePageApi.serviceTicketCreate(email.value, description, fileIds);\n    if (data?.result?.status === EApiResponseStatus.SUCCESS) {\n      emitter.emit(\n        EEmitterEventNames.success,\n        { text: 'Запит до служби підтримки отримано. Очікуйте зворотнього звʼязку на вказаний e-mail впродовж 4х робочих годин.' },\n      );\n      close();\n    } else {\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error('Щось пішло не так. Спробуйте повторити запит пізніше'),\n      );\n    }\n  } else {\n    if (!email.value) {\n      emailError.value = true;\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error('Не заповнено реквізит e-mail'),\n      );\n    }\n    if (!content.value) {\n      contentError.value = true;\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error('Не заповнено реквізит зміст звернення'),\n      );\n    }\n  }\n};\n\nconst createServiceDeskMessage = () => {\n  const lastContractorData = userModule?.profile?.contractors?.find((el) => el.id === userModule?.lastContractor);\n  content.value = `${serviceDeskModalConfig.message}\nБудь ласка, зв'яжіться зі мною стосовно тарифікації.\nМої контакти:\nEDRPOU: ${lastContractorData?.taxNumber}\ntel: ${userModule?.profile?.phones ? userModule.profile.phones[0] : 'null'}\ne-mail: ${userModule?.profile?.emails ? userModule.profile.emails[0] : 'null'}`;\n};\n\nconst resetServiceDeskMessage = () => {\n  serviceDeskModalConfig.message = '';\n  serviceDeskModalConfig.shouldAutoCreateMessage = false;\n};\n\nonBeforeMount(() => {\n  if (serviceDeskModalConfig.shouldAutoCreateMessage) {\n    createServiceDeskMessage();\n  }\n});\n\nonBeforeUnmount(() => {\n  if (serviceDeskModalConfig.shouldAutoCreateMessage) {\n    resetServiceDeskMessage();\n  }\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_q_input = _resolveComponent(\"q-input\")!\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _component_q_card_section = _resolveComponent(\"q-card-section\")!\n  const _component_q_btn = _resolveComponent(\"q-btn\")!\n\n  return (_openBlock(), _createBlock(ModalSidebar, {\n    title: _ctx.$t('components.common.header.seviceDesk.title'),\n    onClose: _cache[7] || (_cache[7] = ($event: any) => (close())),\n    classModal: 'request-modal',\n    style: 'height: 100%;'\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createVNode(_component_q_card_section, { class: \"service-desk-block\" }, {\n          default: _withCtx(() => [\n            _createVNode(_component_q_input, {\n              outlined: \"\",\n              modelValue: email.value,\n              \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((email).value = $event)),\n              label: \"e-mail\",\n              type: \"email\",\n              class: _normalizeClass([\"q-mb-md\", {'show-error': emailError.value}]),\n              onBlur: validateEmailOnBlur\n            }, null, 8, [\"modelValue\", \"class\"]),\n            _createVNode(_component_q_input, {\n              outlined: \"\",\n              autogrow: \"\",\n              modelValue: content.value,\n              \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((content).value = $event)),\n              label: \"Зміст звернення\",\n              type: \"textarea\",\n              class: _normalizeClass([{'show-error': contentError.value}, \"q-mb-md request-textarea\"]),\n              rules: [contentRequired]\n            }, null, 8, [\"modelValue\", \"class\", \"rules\"]),\n            _createElementVNode(\"div\", _hoisted_2, [\n              _cache[10] || (_cache[10] = _createElementVNode(\"div\", { class: \"attach-title q-mb-md\" }, \"Вкладення до запиту\", -1)),\n              _createElementVNode(\"div\", {\n                ref_key: \"dropZoneRef\",\n                ref: dropZoneRef,\n                class: _normalizeClass([\n              'new-document__dropzone',\n              { 'flex justify-start items-start': uploadList.value.length > 0 },\n              { 'flex justify-center items-center': uploadList.value.length === 0 },\n              { 'border-[1.5px] border-dashed border-gray-400': _unref(isOverDropZone) },\n            ]),\n                onClick: _cache[6] || (_cache[6] = _withModifiers(($event: any) => (_unref(openNewFile)()), [\"stop\"]))\n              }, [\n                _createElementVNode(\"div\", {\n                  onClick: _cache[4] || (_cache[4] = _withModifiers(($event: any) => (_unref(openNewFile)()), [\"stop\"])),\n                  class: \"new-document__select-file-message\"\n                }, [\n                  _createElementVNode(\"div\", {\n                    onClick: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (_unref(openNewFile)()), [\"stop\"])),\n                    class: \"new-document__select-icon-box\"\n                  }, [\n                    _createVNode(_component_InlineSvg, {\n                      class: \"read-eds-form__select-icon\",\n                      src: require('@/assets/icons/IconUploadV2.svg')\n                    }, null, 8, [\"src\"])\n                  ]),\n                  _createElementVNode(\"span\", {\n                    onClick: _cache[3] || (_cache[3] = _withModifiers(($event: any) => (_unref(openNewFile)()), [\"stop\"])),\n                    class: \"select-file-message-title\"\n                  }, \" Завантажте або перетягніть файл \"),\n                  _cache[8] || (_cache[8] = _createElementVNode(\"br\", null, null, -1)),\n                  _cache[9] || (_cache[9] = _createElementVNode(\"span\", { class: \"select-file-message-limit\" }, \" PDF, JPG, PNG, JPEG, HEIC \", -1))\n                ]),\n                _createElementVNode(\"div\", {\n                  class: \"new-document__upload-list\",\n                  onClick: _cache[5] || (_cache[5] = _withModifiers(() => {}, [\"stop\"]))\n                }, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(uploadList.value, ({ file, status, progress }, fKey) => {\n                    return (_openBlock(), _createElementBlock(\"div\", {\n                      class: _normalizeClass([\n                  'attachment',\n                  { 'attachment--inprogress': status === _unref(EUploadStatus).inProgress },\n                  { 'attachment--valid': status === _unref(EUploadStatus).success },\n                  { 'attachment--invalid': status === _unref(EUploadStatus).error },\n                ]),\n                      key: fKey\n                    }, [\n                      _createElementVNode(\"div\", _hoisted_3, [\n                        _createElementVNode(\"div\", _hoisted_4, [\n                          _createElementVNode(\"div\", _hoisted_5, _toDisplayString(file.name), 1)\n                        ])\n                      ]),\n                      (status === _unref(EUploadStatus).inProgress)\n                        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n                            _createElementVNode(\"div\", _hoisted_7, [\n                              _createElementVNode(\"div\", {\n                                class: \"progress-bar__progress\",\n                                style: _normalizeStyle({ width: `${progress}%` })\n                              }, null, 4)\n                            ])\n                          ]))\n                        : _createCommentVNode(\"\", true),\n                      (status === _unref(EUploadStatus).error)\n                        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n                            _createElementVNode(\"div\", _hoisted_9, _toDisplayString(_ctx.$t('views.documents.documentConstructor.section1.dropZone.downloadError')), 1),\n                            _createElementVNode(\"div\", {\n                              class: \"attachment__button\",\n                              onClick: _withModifiers(($event: any) => (removeFile(fKey)), [\"stop\"])\n                            }, [\n                              _createVNode(_component_InlineSvg, {\n                                class: \"filter-svg-maximum-red attachment__button__icon\",\n                                src: require('@/assets/icons/IconDocumentRejected.svg')\n                              }, null, 8, [\"src\"])\n                            ], 8, _hoisted_10)\n                          ]))\n                        : _createCommentVNode(\"\", true),\n                      (status === _unref(EUploadStatus).success)\n                        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, [\n                            _createElementVNode(\"div\", {\n                              class: \"attachment__button\",\n                              onClick: _withModifiers(($event: any) => (removeFile(fKey)), [\"stop\"])\n                            }, [\n                              _createVNode(_component_InlineSvg, {\n                                class: \"attachment__button__icon\",\n                                src: require('@/assets/icons/IconTrash.svg')\n                              }, null, 8, [\"src\"])\n                            ], 8, _hoisted_12)\n                          ]))\n                        : _createCommentVNode(\"\", true)\n                    ], 2))\n                  }), 128))\n                ])\n              ], 2)\n            ])\n          ]),\n          _: 1\n        }),\n        _createElementVNode(\"div\", _hoisted_13, [\n          _createVNode(_component_q_btn, {\n            class: \"send-btn send-btn--primary\",\n            label: _ctx.$t('components.common.header.seviceDesk.button'),\n            color: \"primary\",\n            onClick: handleSubmit\n          }, null, 8, [\"label\"])\n        ])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\"]))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport ModalSidebar from '@/components/v2/ui/Modal/ModalSidebar.vue';\nimport {\n  defineEmits, onBeforeMount, onBeforeUnmount, ref, watch,\n} from 'vue';\nimport { useDropZone, useFileDialog } from '@vueuse/core';\nimport { supportedImageFileTypes } from '@/config';\nimport { useI18n } from 'vue-i18n';\nimport {\n  createFileWithProgressTracker,\n  createProgressTracker,\n  EUploadStatus,\n  IFileWithUploadProgress,\n} from '@/lib/core/helpers';\nimport { fileApi } from '@/modules/api/FileApi';\nimport { emitter } from '@/modules/emitter';\nimport { EEmitterEventNames } from '@/modules/emitter/EEmitterEventNames';\nimport { useUserModule } from '@/modules/store/user';\nimport { useUiModule } from '@/modules/store/ui';\nimport { EApiResponseStatus } from '@/lib/core/api';\nimport { homePageApi } from '@/modules/api/HomePage.api';\n\nconst {\n  serviceDeskModalConfig,\n} = useUiModule();\nconst userModule = useUserModule();\n\nconst emit = defineEmits<{(e: 'close'): void; }>();\nconst close = () => emit('close');\nconst content = ref('');\nconst email = ref(userModule?.profile?.properties?.notificationEmail);\nconst { t } = useI18n();\nconst emailError = ref(false);\nconst contentError = ref(false);\n\nconst uploadList = ref<IFileWithUploadProgress[]>([]);\nconst addFileToUploadList = async (fileList: File[] | FileList | null): Promise<void> => {\n  const supportedFileTypesArray = supportedImageFileTypes\n    .split(', ')\n    .map((str: string) => str.substring(1)\n      .toLowerCase());\n\n  if (fileList) {\n    for (let i = 0; i < fileList.length; i += 1) {\n      const file = fileList instanceof FileList ? fileList.item(i) as File : fileList[i];\n      const extension = file.name.split('.')\n        .pop() as string;\n      if (supportedFileTypesArray.includes(extension.toLowerCase())) {\n        const f = createFileWithProgressTracker(file);\n        const progressTracker = createProgressTracker(f);\n        // @ts-ignore\n        uploadList.value.push(f);\n        try {\n          // eslint-disable-next-line no-await-in-loop\n          const { data } = await fileApi.upload(file, progressTracker);\n          if ((data as any).status === 'POTENCIALLY_INSECURE_CONTENT') {\n            const errorMessage = 'При завантаженні вкладення виникла помилка, '\n              + 'файл містить потенційно небезпечний вміст. '\n              + 'Перезбережіть файл та спробуйте ще раз.';\n            emitter.emit(\n              EEmitterEventNames.error,\n              new Error(errorMessage),\n            );\n          }\n          f.status.value = data.id ? EUploadStatus.success : EUploadStatus.error;\n          f.id = data.id;\n        } catch (error) {\n          console.error(error);\n          f.status.value = EUploadStatus.error;\n        }\n      } else {\n        try {\n          emitter.emit(\n            EEmitterEventNames.error,\n            new Error(\n              `${t('components.common.eds.ReadEDSForm.selectKeystoreFileForm.notSupportedFileTypeError')} ${supportedImageFileTypes}`,\n            ),\n          );\n        } catch (error) {\n          console.error(error);\n        }\n      }\n    }\n  }\n};\n\n// drop file\nconst dropZoneRef = ref<HTMLDivElement>();\n\n// select file\nconst {\n  files,\n  open: openNewFile,\n} = useFileDialog({\n  accept: supportedImageFileTypes,\n  multiple: false,\n  reset: true,\n});\n\nconst onDrop = (list: File[] | FileList | null): void => {\n  // always clean current list and add first file from fileList\n  if (list) {\n    addFileToUploadList([list[0]]);\n  }\n};\n\nconst removeFile = (index: number): void => {\n  uploadList.value.splice(index, 1);\n};\n\nconst validateEmailOnBlur = () => {\n  const emailPattern = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n  emailError.value = !emailPattern.test(email.value || '');\n};\n\nconst contentRequired = (val: string) => (val && val.trim().length > 0 ? true : contentError.value = true);\n\nconst { isOverDropZone } = useDropZone(dropZoneRef, onDrop);\n\nwatch(files, (fileList: FileList | null) => addFileToUploadList(fileList));\nwatch(email, () => emailError.value = false);\nwatch(content, () => contentError.value = false);\n\nconst handleSubmit = async () => {\n  if (!emailError.value && content.value.trim()) {\n    emailError.value = false;\n    contentError.value = false;\n    const fileIds = uploadList.value.map((el) => el.id);\n    const lastContractorData = userModule?.profile?.contractors?.find((el) => el.id === userModule?.lastContractor);\n    const description = `${content.value.trim()}\n\n- Назва користувача - ${userModule?.profile?.fullName}\n- Номер телефону користувача - ${userModule?.profile?.phones ? userModule.profile.phones[0] : 'null'}\n- Авторизований з ключа - ${userModule?.profile?.isAuthenticatedByKey}\n- Найменування активного контрагента - ${lastContractorData?.name}\n- tax number активного контрагента - ${lastContractorData?.taxNumber}\n- Сторінка на якій знаходиться користувач - ${window.location.href}\n    `;\n    const { data } = await homePageApi.serviceTicketCreate(email.value, description, fileIds);\n    if (data?.result?.status === EApiResponseStatus.SUCCESS) {\n      emitter.emit(\n        EEmitterEventNames.success,\n        { text: 'Запит до служби підтримки отримано. Очікуйте зворотнього звʼязку на вказаний e-mail впродовж 4х робочих годин.' },\n      );\n      close();\n    } else {\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error('Щось пішло не так. Спробуйте повторити запит пізніше'),\n      );\n    }\n  } else {\n    if (!email.value) {\n      emailError.value = true;\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error('Не заповнено реквізит e-mail'),\n      );\n    }\n    if (!content.value) {\n      contentError.value = true;\n      emitter.emit(\n        EEmitterEventNames.error,\n        new Error('Не заповнено реквізит зміст звернення'),\n      );\n    }\n  }\n};\n\nconst createServiceDeskMessage = () => {\n  const lastContractorData = userModule?.profile?.contractors?.find((el) => el.id === userModule?.lastContractor);\n  content.value = `${serviceDeskModalConfig.message}\nБудь ласка, зв'яжіться зі мною стосовно тарифікації.\nМої контакти:\nEDRPOU: ${lastContractorData?.taxNumber}\ntel: ${userModule?.profile?.phones ? userModule.profile.phones[0] : 'null'}\ne-mail: ${userModule?.profile?.emails ? userModule.profile.emails[0] : 'null'}`;\n};\n\nconst resetServiceDeskMessage = () => {\n  serviceDeskModalConfig.message = '';\n  serviceDeskModalConfig.shouldAutoCreateMessage = false;\n};\n\nonBeforeMount(() => {\n  if (serviceDeskModalConfig.shouldAutoCreateMessage) {\n    createServiceDeskMessage();\n  }\n});\n\nonBeforeUnmount(() => {\n  if (serviceDeskModalConfig.shouldAutoCreateMessage) {\n    resetServiceDeskMessage();\n  }\n});\n</script>\n\n<template>\n  <ModalSidebar\n    :title=\"$t('components.common.header.seviceDesk.title')\"\n    @close=\"close()\"\n    :classModal=\"'request-modal'\"\n    :style=\"'height: 100%;'\"\n  >\n    <div class=\"service-desk-form\">\n      <q-card-section class=\"service-desk-block\">\n        <q-input\n          outlined\n          v-model=\"email\"\n          label=\"e-mail\"\n          type=\"email\"\n          class=\"q-mb-md\"\n          :class=\"{'show-error': emailError}\"\n          @blur=\"validateEmailOnBlur\"\n        />\n        <q-input\n          outlined\n          autogrow\n          v-model=\"content\"\n          label=\"Зміст звернення\"\n          type=\"textarea\"\n          :class=\"{'show-error': contentError}\"\n          class=\"q-mb-md request-textarea\"\n          :rules=\"[contentRequired]\"\n        />\n        <div class=\"q-mt-md q-mb-md\">\n          <div class=\"attach-title q-mb-md\">Вкладення до запиту</div>\n          <div\n            ref=\"dropZoneRef\"\n            :class=\"[\n              'new-document__dropzone',\n              { 'flex justify-start items-start': uploadList.length > 0 },\n              { 'flex justify-center items-center': uploadList.length === 0 },\n              { 'border-[1.5px] border-dashed border-gray-400': isOverDropZone },\n            ]\"\n            @click.stop=\"openNewFile()\"\n          >\n            <div\n              @click.stop=\"openNewFile()\"\n              class=\"new-document__select-file-message\"\n            >\n              <div @click.stop=\"openNewFile()\" class=\"new-document__select-icon-box\">\n                <InlineSvg\n                  class=\"read-eds-form__select-icon\"\n                  :src=\"require('@/assets/icons/IconUploadV2.svg')\"\n                />\n              </div>\n              <span\n                @click.stop=\"openNewFile()\"\n                class=\"select-file-message-title\">\n                Завантажте або перетягніть файл\n              </span>\n              <br>\n              <span class=\"select-file-message-limit\">\n                PDF, JPG, PNG, JPEG, HEIC\n              </span>\n            </div>\n            <div class=\"new-document__upload-list\" @click.stop>\n              <div\n                v-for=\"({ file, status, progress }, fKey) in uploadList\"\n                :class=\"[\n                  'attachment',\n                  { 'attachment--inprogress': status === EUploadStatus.inProgress },\n                  { 'attachment--valid': status === EUploadStatus.success },\n                  { 'attachment--invalid': status === EUploadStatus.error },\n                ]\"\n                :key=\"fKey\"\n              >\n                <div class=\"attachment__description\">\n                  <div class=\"attachment__description-file\">\n                    <div class=\"attachment__description-filename\">\n                      {{ file.name }}\n                    </div>\n                  </div>\n                </div>\n                <div v-if=\"status === EUploadStatus.inProgress\" class=\"attachment__actions\">\n                  <div class=\"progress-bar\">\n                    <div\n                      class=\"progress-bar__progress\"\n                      :style=\"{ width: `${progress}%` }\"\n                    />\n                  </div>\n                </div>\n                <div v-if=\"status === EUploadStatus.error\" class=\"attachment__actions q-mt-xs row justify-between items-center\">\n                  <div class=\"attachment__error-message\">\n                    {{ $t('views.documents.documentConstructor.section1.dropZone.downloadError') }}\n                  </div>\n                  <div class=\"attachment__button\" @click.stop=\"removeFile(fKey)\">\n                    <InlineSvg\n                      class=\"filter-svg-maximum-red attachment__button__icon\"\n                      :src=\"require('@/assets/icons/IconDocumentRejected.svg')\"/>\n                  </div>\n                </div>\n                <div v-if=\"status === EUploadStatus.success\" class=\"attachment__actions\">\n                  <div class=\"attachment__button\" @click.stop=\"removeFile(fKey)\">\n                    <InlineSvg\n                      class=\"attachment__button__icon\"\n                      :src=\"require('@/assets/icons/IconTrash.svg')\"/>\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </q-card-section>\n      <div class=\"actiom-block\">\n        <q-btn\n          class=\"send-btn send-btn--primary\" :label=\"$t('components.common.header.seviceDesk.button')\" color=\"primary\"\n          @click=\"handleSubmit\"/>\n      </div>\n    </div>\n  </ModalSidebar>\n</template>\n\n<style scoped lang=\"scss\">\n.service-desk-form {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  overflow: auto;\n  max-height: calc(100vh - 50px);\n}\n\n.attach-title {\n  @include typography('inter-semibold-12');\n  @media all and (max-width: 576px) {\n    font-size: 16px;\n  }\n}\n\n.q-input :deep(.q-icon.text-negative) {\n  display: none;\n}\n\n.q-input :deep(.q-field__control .q-field__label) {\n  @media all and (max-width: 576px) {\n    font-size: 14px;\n  }\n}\n\n.q-input :deep(.q-field__control) {\n  border: 1px solid transparent;\n\n  &:focus-within {\n    border: 1px solid $light_300;\n    transition: all .2s ease-in;\n  }\n\n  @media all and (max-width: 576px) {\n    height: 3rem;\n  }\n}\n\n.q-input :deep(input) {\n  @media all and (max-width: 576px) {\n    font-size: 12px;\n  }\n}\n\n.request-textarea {\n  height: fit-content;\n  min-height: 270px;\n\n  :deep(.q-field__control) {\n    padding-right: 0;\n    height: 100%;\n    border: 1px solid transparent;\n\n    &:focus-within {\n      border: 1px solid $light_300;\n      transition: all .2s ease-in;\n    }\n\n  }\n\n  :deep(textarea) {\n    resize: none;\n    min-height: 250px;\n    max-height: calc(700px - 28px);\n    overflow-y: auto;\n    @media all and (max-width: 576px) {\n      font-size: 12px;\n    }\n  }\n\n  :deep(.q-field__control .q-field__label) {\n    @media all and (max-width: 576px) {\n      font-size: 14px\n    }\n  }\n}\n\n.new-document__dropzone {\n  @include size(100%, 100%);\n  @include flex(row, center, center);\n  cursor: pointer;\n  border-radius: 8px;\n  padding-top: 0.25rem;\n  padding-bottom: 0.25rem;\n  text-align: center;\n\n  .new-document__select-file-message {\n    color: $light_500;\n    border-radius: 8px;\n    border: 1px solid #E2E8F0;\n    border-style: dashed;\n    width: 100%;\n\n    .select-file-message-title {\n      cursor: pointer;\n      @include typography('inter-12');\n      font-weight: 400;\n      color: $light_500;\n    }\n\n    .select-file-message-limit {\n      @include typography('inter-10');\n      font-weight: 400;\n      color: $light_400;\n    }\n  }\n\n  .new-document__select-icon-box {\n    border-radius: 50%;\n    margin-left: auto;\n    margin-right: auto;\n    display: flex;\n    height: 2.5rem;\n    width: 2.5rem;\n    cursor: pointer;\n    align-items: center;\n    justify-content: center;\n  }\n\n  .new-document__upload-list {\n    width: 100%;\n\n    .attachment {\n      width: 100%;\n      border: 1px solid #E2E8F0;\n      border-radius: 8px;\n      margin-top: 10px;\n      padding: 0.75rem 0.5rem;\n    }\n  }\n\n  .attachment--valid {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n  }\n\n  .attachment__description {\n    width: 85%\n  }\n\n  .attachment__description-filename {\n    text-align: justify;\n    word-break: break-word;\n  }\n}\n\n.actiom-block {\n  background-color: #fff;\n  margin-top: auto;\n  position: sticky;\n  bottom: 0px;\n  padding: 20px 0;\n  @media all and (max-width: 576px) {\n    bottom: 40px;\n  }\n}\n\n.send-btn {\n  width: 90%;\n  height: 40px;\n  margin: 0 auto;\n  display: flex;\n\n  &:before {\n    content: none;\n  }\n\n  :deep(.block) {\n    font-family: 'Inter';\n    color: #000;\n    font-size: 12px;\n    font-weight: 500;\n    text-transform: none;\n  }\n\n  &--primary {\n    color: $light_900;\n    background-color: $primary;\n    border-radius: 0.5rem;\n\n    &:disabled {\n      color: $light_400;\n      background-color: $light_200;\n    }\n  }\n}\n\n.q-field.show-error :deep(.q-field__inner) {\n  border-radius: 8px;\n  border: 1px solid $maximum_red;\n}\n\n.progress-bar {\n  margin-top: 10px;\n  height: 0.625rem;\n  background-color: #F6F6F9;\n\n  .progress-bar__progress {\n    height: 0.625rem;\n    background-color: #CDE1EE;\n  }\n}\n\n.attachment__error-message {\n  color: $maximum_red;\n}\n</style>\n","import script from \"./ServiceDeskModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ServiceDeskModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./ServiceDeskModal.vue?vue&type=style&index=0&id=5afc0bc8&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-5afc0bc8\"]])\n\nexport default __exports__\nimport QCardSection from 'quasar/src/components/card/QCardSection.js';\nimport QInput from 'quasar/src/components/input/QInput.js';\nimport QBtn from 'quasar/src/components/btn/QBtn.js';\nimport QIcon from 'quasar/src/components/icon/QIcon.js';\nimport QField from 'quasar/src/components/field/QField.js';\nimport qInstall from \"../../../../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(script, 'components', {QCardSection,QInput,QBtn,QIcon,QField});\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"help-modal__body ND-modal__body\" }\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = { class: \"help-modal__footer ND-modal__footer\" }\n\nimport { computed } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { useRoute } from 'vue-router';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { getUserManualUrl, openUserManual } from '@/lib/core/helpers';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'HelpModal',\n  setup(__props) {\n\nconst route = useRoute();\nconst uiModule = useUiModule();\nconst { openModals } = storeToRefs(uiModule);\n\nconst isOpen = computed(() => openModals.value[EModalNames.userManualModal]);\nconst viewerUrl = computed(() => getUserManualUrl(route.name));\n\nconst close = (): void => {\n  uiModule.closeModal(EModalNames.userManualModal);\n};\n\nconst openInNewWindow = (): void => {\n  openUserManual(route.name);\n  close();\n};\n\nreturn (_ctx: any,_cache: any) => {\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: _ctx.$t('components.common.header.help.title'),\n    \"modal-name\": _unref(EModalNames).userManualModal,\n    class: \"help-modal\",\n    height: '90svh',\n    width: '75svw',\n    \"is-full-height-modal\": true\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        (isOpen.value)\n          ? (_openBlock(), _createElementBlock(\"iframe\", {\n              class: \"help-modal__viewer\",\n              key: viewerUrl.value,\n              src: viewerUrl.value,\n              title: \"user-manual-viewer\",\n              frameborder: \"0\"\n            }, null, 8, _hoisted_2))\n          : _createCommentVNode(\"\", true)\n      ]),\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createVNode(_unref(NdButton), {\n          class: \"help-modal__button\",\n          text: _ctx.$t('components.common.header.help.close'),\n          type: _unref(ENdButtonTypes).gray200,\n          onClick: close\n        }, null, 8, [\"text\", \"type\"]),\n        _createVNode(_unref(NdButton), {\n          class: \"help-modal__button help-modal__button--primary\",\n          text: _ctx.$t('components.common.header.help.openInNewWindow'),\n          type: _unref(ENdButtonTypes).primary,\n          onClick: openInNewWindow\n        }, null, 8, [\"text\", \"type\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"$t('components.common.header.help.title')\"\n    :modal-name=\"EModalNames.userManualModal\"\n    class=\"help-modal\"\n    :height=\"'90svh'\"\n    :width=\"'75svw'\"\n    :is-full-height-modal=\"true\"\n  >\n    <div class=\"help-modal__body ND-modal__body\">\n      <iframe\n        v-if=\"isOpen\"\n        class=\"help-modal__viewer\"\n        :key=\"viewerUrl\"\n        :src=\"viewerUrl\"\n        title=\"user-manual-viewer\"\n        frameborder=\"0\"\n      />\n    </div>\n    <div class=\"help-modal__footer ND-modal__footer\">\n      <NdButton\n        class=\"help-modal__button\"\n        :text=\"$t('components.common.header.help.close')\"\n        :type=\"ENdButtonTypes.gray200\"\n        @click=\"close\"\n      />\n      <NdButton\n        class=\"help-modal__button help-modal__button--primary\"\n        :text=\"$t('components.common.header.help.openInNewWindow')\"\n        :type=\"ENdButtonTypes.primary\"\n        @click=\"openInNewWindow\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { useRoute } from 'vue-router';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { getUserManualUrl, openUserManual } from '@/lib/core/helpers';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\n\nconst route = useRoute();\nconst uiModule = useUiModule();\nconst { openModals } = storeToRefs(uiModule);\n\nconst isOpen = computed(() => openModals.value[EModalNames.userManualModal]);\nconst viewerUrl = computed(() => getUserManualUrl(route.name));\n\nconst close = (): void => {\n  uiModule.closeModal(EModalNames.userManualModal);\n};\n\nconst openInNewWindow = (): void => {\n  openUserManual(route.name);\n  close();\n};\n</script>\n\n<style scoped lang=\"scss\">\n.help-modal__body {\n  display: flex;\n  flex: 1 1 auto;\n  min-height: 0;\n  overflow: hidden;\n  width: 100%;\n  height: auto;\n  max-height: none;\n  background-color: $light_050;\n  padding: 1.125rem;\n  border-radius: 1rem;\n\n  @include mobile() {\n    min-height: 0;\n    max-height: none;\n  }\n}\n\n.help-modal__viewer {\n  @include size(100%, 100%);\n  border: none;\n  border-radius: 0.5rem;\n  background-color: $light_000;\n}\n\n.help-modal__footer {\n  gap: 0.75rem;\n  align-items: center;\n  flex-shrink: 0;\n\n  @include mobile() {\n    flex-direction: column-reverse;\n    height: auto;\n    padding-top: 0.75rem;\n  }\n}\n\n.help-modal__button {\n  min-width: 8rem;\n\n  @include mobile() {\n    width: 100%;\n  }\n}\n\n.help-modal__button--primary {\n  min-width: 14rem;\n}\n</style>\n","import script from \"./HelpModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./HelpModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./HelpModal.vue?vue&type=style&index=0&id=48651c4c&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-48651c4c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { class: \"burger-menu\" }\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = {\n  key: 0,\n  class: \"nd-nav__menu\"\n}\nconst _hoisted_4 = [\"onClick\"]\nconst _hoisted_5 = { class: \"nd-nav__link-label\" }\nconst _hoisted_6 = {\n  key: 1,\n  class: \"nd-nav__menu\"\n}\nconst _hoisted_7 = [\"onClick\"]\nconst _hoisted_8 = { class: \"nd-nav__link-label\" }\nconst _hoisted_9 = { style: {\"width\":\"auto\"} }\nconst _hoisted_10 = {\n  key: 0,\n  class: \"right-side-block\"\n}\nconst _hoisted_11 = {\n  key: 0,\n  class: \"dot\"\n}\nconst _hoisted_12 = {\n  key: 0,\n  class: \"nd-info__text\"\n}\nconst _hoisted_13 = { class: \"nd-info__contractor\" }\nconst _hoisted_14 = { class: \"nd-info__tax-number\" }\n\nimport { computed, reactive, ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { useI18n } from 'vue-i18n';\nimport { onClickOutside } from '@vueuse/core';\nimport { RouteLocationNamedRaw, useRoute } from 'vue-router';\nimport { useNavigationHelpers, useGetBreakpoints } from '@/lib/core/composables';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport Avatar from '@/components/v2/ui/Avatar.vue';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useUserModule } from '@/modules/store/user';\nimport { useNotificationsModule } from '@/modules/store/notifications';\nimport { useUserMenu } from '@/components/v2/common/header/useUserMenu';\nimport { Components } from '@/lib/types';\nimport Breadcrumbs from './components/Breadcrumbs.vue';\nimport AdminMenu from './components/AdminMenu.vue';\nimport Divider from './components/Divider.vue';\nimport UserMenu from './components/UserMenu.vue';\nimport SystemNotifications from './components/SystemNotifications.vue';\nimport ServiceDeskModal from './components/ServiceDeskModal.vue';\nimport HelpModal from './components/HelpModal.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'index',\n  setup(__props) {\n\nconst {\n  isServiceDeskModalOpen,\n} = storeToRefs(useUiModule());\n\nconst { toggleServiceDeskModal, openModal } = useUiModule();\n\nconst { isMobile } = useGetBreakpoints();\nconst isNavMenuOpen = ref(false);\nconst isNavSubMenuOpen = ref(false);\nconst isUserMenuOpen = ref(false);\n\nconst navMenu = ref<HTMLDivElement>();\nconst userMenu = ref<HTMLDivElement>();\n\nconst isSystemNotificationsModalOpen = ref(false);\nconst { t } = useI18n();\n\nconst { activeContractor } = storeToRefs(useContractorsModule());\nconst { openSidebar, hoverSidebar } = storeToRefs(useUiModule());\nconst userModule = useUserModule();\nconst { profile } = storeToRefs(useUserModule());\nconst { contactPhone } = useUserMenu();\n\nconst contractorControlProfiles = computed(() => userModule.hasPermissions('contractorControlProfiles'));\nconst contractorControlUsers = computed(() => userModule.hasPermissions('contractorControlUsers'));\nconst adminAccess = computed(() => userModule.hasPermissions('adminAccess'));\nconst contractorControlLabels = computed(() => userModule.hasPermissions('contractorControlLabels'));\nconst contractorControlTokens = computed(() => userModule.hasPermissions('contractorControlTokens'));\n\nconst route = useRoute();\nconst { redirect } = useNavigationHelpers();\n\nconst menuNavItemsConfig = computed(() => [\n  {\n    label: t('components.common.header.nav.home'),\n    routeLocation: { name: ERouteNames.home },\n    icon: 'IconHomeMenu.svg',\n    show: true,\n  },\n  {\n    label: t('components.common.header.nav.documents'),\n    routeLocation: { name: ERouteNames.documents },\n    icon: 'IconDocumentMenu.svg',\n    show: true,\n  },\n  {\n    label: t('components.common.header.nav.admin'),\n    routeLocation: { name: ERouteNames.organization },\n    icon: 'IconAdmin.svg',\n    show: adminAccess.value,\n  },\n  {\n    label: t('components.common.header.nav.settings'),\n    routeLocation: { name: ERouteNames.myCredentials },\n    icon: 'IconGear.svg',\n    show: true,\n    subMenu: [\n      {\n        label: t('views.settings.sidebar.myCredentials'),\n        routeLocation: { name: ERouteNames.myCredentials },\n        icon: 'IconDisplay.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.contractors'),\n        routeLocation: { name: ERouteNames.myContractors },\n        icon: 'IconCase.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.myContractorRate'),\n        routeLocation: { name: ERouteNames.myContractorRate },\n        icon: 'IconAccountBalance.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.labels'),\n        routeLocation: { name: ERouteNames.labels },\n        icon: 'IconLabel.svg',\n        show: contractorControlLabels.value,\n      },\n      {\n        label: t('views.settings.sidebar.archives'),\n        routeLocation: { name: ERouteNames.myArchives },\n        icon: 'IconArchive.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.exports'),\n        routeLocation: { name: ERouteNames.myExports },\n        icon: 'IconDocumentDownload.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.accessRights'),\n        routeLocation: { name: ERouteNames.accessRights },\n        icon: 'IconGear.svg',\n        show: contractorControlProfiles.value || contractorControlUsers.value,\n      },\n      {\n        label: t('views.settings.sidebar.personalSettings'),\n        routeLocation: { name: ERouteNames.mySettings },\n        icon: 'IconUserInfo.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.api'),\n        routeLocation: { name: ERouteNames.api },\n        icon: 'IconIntegration.svg',\n        show: contractorControlTokens.value,\n      },\n    ],\n  },\n]);\nconst subMenuNavItemsConfig: Components.IMenuItemConfig[] = reactive([]);\n\nonClickOutside(navMenu, (event: Event) => {\n  const target = event.target as Element;\n\n  if (target.className !== 'nd-nav') {\n    isNavMenuOpen.value = false;\n  }\n});\n\nconst $redirect = (to: RouteLocationNamedRaw) => {\n  isNavMenuOpen.value = false;\n  isNavSubMenuOpen.value = false;\n  isUserMenuOpen.value = false;\n  redirect(to);\n};\n\nconst handleAvatarClick = () => {\n  isUserMenuOpen.value = !isUserMenuOpen.value;\n};\n\nconst openHelp = () => {\n  openModal(EModalNames.userManualModal);\n};\n\nconst navMenuClick = (menuItem: Components.IMenuItemConfig): void => {\n  if (isMobile.value && menuItem.subMenu) {\n    subMenuNavItemsConfig.length = 0;\n    menuItem.subMenu.forEach((i: Components.IMenuItemConfig) => { subMenuNavItemsConfig.push(i); });\n    isNavMenuOpen.value = false;\n    isNavSubMenuOpen.value = true;\n  } else {\n    $redirect(menuItem.routeLocation);\n  }\n};\nconst navBtnClick = (): void => {\n  if (isMobile) {\n    if (isNavMenuOpen.value) {\n      isNavMenuOpen.value = false;\n      return;\n    }\n    if (isNavSubMenuOpen.value) {\n      isNavMenuOpen.value = true;\n      isNavSubMenuOpen.value = false;\n    }\n    if (!isNavMenuOpen.value) isNavMenuOpen.value = true;\n  } else {\n    isNavMenuOpen.value = !isNavMenuOpen.value;\n  }\n};\nonClickOutside(userMenu, (event: Event) => {\n  const target = event.target as Element;\n\n  if (target) {\n    isUserMenuOpen.value = false;\n  }\n});\nconst avatarSource = computed(() => activeContractor.value || profile.value);\nconst isAdminRoute = computed(() => route.path.startsWith('/admin'));\nconst isActiveContractorOrProfile = computed(() => activeContractor.value?.active ?? true);\n\nconst { haveUnreadNotifications } = storeToRefs(useNotificationsModule());\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createElementBlock(\"header\", {\n    class: _normalizeClass([\"nd-header\", { 'nd-header--hover': !_unref(openSidebar) && _unref(hoverSidebar) && _unref(route).name !== _unref(ERouteNames).home }])\n  }, [\n    _createElementVNode(\"div\", {\n      class: _normalizeClass([\"nd-nav\", [\n        { 'nd-nav--mini': !_unref(openSidebar) && _unref(route).name !== _unref(ERouteNames).home },\n        { 'nd-nav--hover': !_unref(openSidebar) && _unref(hoverSidebar) && _unref(route).name !== _unref(ERouteNames).home }]]),\n      ref_key: \"navMenu\",\n      ref: navMenu,\n      onClick: navBtnClick\n    }, [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"span\", {\n          class: _normalizeClass({ 'line-transform': isNavMenuOpen.value })\n        }, null, 2),\n        _createElementVNode(\"span\", {\n          class: _normalizeClass({ 'line-transform-middle': isNavMenuOpen.value })\n        }, null, 2),\n        _createElementVNode(\"span\", {\n          class: _normalizeClass({ 'line-transform-reverse': isNavMenuOpen.value })\n        }, null, 2)\n      ]),\n      _createElementVNode(\"img\", {\n        src: isAdminRoute.value ? require('@/assets/images/adminLogo.svg') : require('@/assets/images/Logo_1.svg'),\n        alt: \"Logo\",\n        class: _normalizeClass([\"nd-nav__logo\", [\n          { 'nd-nav__logo--mini': !_unref(isMobile) && !_unref(openSidebar) && _unref(route).name !== _unref(ERouteNames).home },\n          { 'nd-nav__logo--hover': !_unref(isMobile) && !_unref(openSidebar) && _unref(hoverSidebar) && _unref(route).name !== _unref(ERouteNames).home }]])\n      }, null, 10, _hoisted_2),\n      _createVNode(_Transition, { name: \"fade\" }, {\n        default: _withCtx(() => [\n          _createElementVNode(\"div\", null, [\n            (isNavMenuOpen.value && !isNavSubMenuOpen.value)\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(menuNavItemsConfig.value, (item, itemKey) => {\n                    return (_openBlock(), _createElementBlock(_Fragment, { key: itemKey }, [\n                      (item.show)\n                        ? (_openBlock(), _createElementBlock(\"div\", {\n                            key: 0,\n                            class: \"nd-nav__link\",\n                            onClick: _withModifiers(($event: any) => (navMenuClick(item)), [\"stop\"])\n                          }, [\n                            _createVNode(_component_InlineSvg, {\n                              src: require(`@/assets/icons/${item.icon}`),\n                              class: \"nd-nav__link-icon\"\n                            }, null, 8, [\"src\"]),\n                            _createElementVNode(\"span\", _hoisted_5, _toDisplayString(item.label), 1)\n                          ], 8, _hoisted_4))\n                        : _createCommentVNode(\"\", true)\n                    ], 64))\n                  }), 128))\n                ]))\n              : _createCommentVNode(\"\", true),\n            (!isNavMenuOpen.value && isNavSubMenuOpen.value)\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(subMenuNavItemsConfig, (item, itemKey) => {\n                    return (_openBlock(), _createElementBlock(_Fragment, { key: itemKey }, [\n                      (item.show)\n                        ? (_openBlock(), _createElementBlock(\"div\", {\n                            key: 0,\n                            class: \"nd-nav__link\",\n                            onClick: _withModifiers(($event: any) => (navMenuClick(item)), [\"stop\"])\n                          }, [\n                            _createVNode(_component_InlineSvg, {\n                              src: require(`@/assets/icons/${item.icon}`),\n                              class: \"nd-nav__link-icon\"\n                            }, null, 8, [\"src\"]),\n                            _createElementVNode(\"span\", _hoisted_8, _toDisplayString(item.label), 1)\n                          ], 8, _hoisted_7))\n                        : _createCommentVNode(\"\", true)\n                    ], 64))\n                  }), 128))\n                ]))\n              : _createCommentVNode(\"\", true),\n            (_unref(isMobile))\n              ? (_openBlock(), _createElementBlock(\"div\", {\n                  key: 2,\n                  class: _normalizeClass(['menu-overlay', {'menu-overlay--show': isNavMenuOpen.value || isNavSubMenuOpen.value }]),\n                  onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => {isNavMenuOpen.value = false; isNavSubMenuOpen.value = false;}, [\"stop\"]))\n                }, null, 2))\n              : _createCommentVNode(\"\", true)\n          ])\n        ]),\n        _: 1\n      })\n    ], 2),\n    _createElementVNode(\"div\", _hoisted_9, [\n      (isAdminRoute.value && !_unref(isMobile))\n        ? (_openBlock(), _createBlock(AdminMenu, { key: 0 }))\n        : (!_unref(isMobile))\n          ? (_openBlock(), _createBlock(Breadcrumbs, { key: 1 }))\n          : _createCommentVNode(\"\", true)\n    ]),\n    ((!isNavMenuOpen.value && !isNavSubMenuOpen.value) || !_unref(isMobile))\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n          _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n            class: \"nd-action q-mr-sm\",\n            onClick: _withModifiers(openHelp, [\"stop\"])\n          }, [\n            _createVNode(_component_InlineSvg, {\n              src: require('@/assets/icons/IconHelp.svg')\n            }, null, 8, [\"src\"])\n          ])), [\n            [_directive_tooltip, _ctx.$t('components.common.header.help.button')]\n          ]),\n          _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n            class: \"nd-action q-mr-sm\",\n            onClick: _cache[2] || (_cache[2] = _withModifiers(\n//@ts-ignore\n(...args) => (_unref(toggleServiceDeskModal) && _unref(toggleServiceDeskModal)(...args)), [\"stop\"]))\n          }, [\n            _createVNode(_component_InlineSvg, {\n              src: require('@/assets/icons/IconChat.svg')\n            }, null, 8, [\"src\"]),\n            _createVNode(_Transition, { name: \"fade\" }, {\n              default: _withCtx(() => [\n                (_unref(isServiceDeskModalOpen))\n                  ? (_openBlock(), _createBlock(ServiceDeskModal, {\n                      key: 0,\n                      onClose: _cache[1] || (_cache[1] = ($event: any) => (isServiceDeskModalOpen.value = false))\n                    }))\n                  : _createCommentVNode(\"\", true)\n              ]),\n              _: 1\n            })\n          ])), [\n            [_directive_tooltip, _ctx.$t('components.common.header.seviceDesk.button')]\n          ]),\n          _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n            class: \"nd-action\",\n            onClick: _cache[4] || (_cache[4] = _withModifiers(($event: any) => (isSystemNotificationsModalOpen.value = !isSystemNotificationsModalOpen.value), [\"stop\"]))\n          }, [\n            (_unref(haveUnreadNotifications))\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11))\n              : _createCommentVNode(\"\", true),\n            _createVNode(_component_InlineSvg, {\n              src: require('@/assets/icons/IconBell.svg')\n            }, null, 8, [\"src\"]),\n            _createVNode(_Transition, { name: \"fade\" }, {\n              default: _withCtx(() => [\n                (isSystemNotificationsModalOpen.value)\n                  ? (_openBlock(), _createBlock(SystemNotifications, {\n                      key: 0,\n                      onClose: _cache[3] || (_cache[3] = ($event: any) => (isSystemNotificationsModalOpen.value = false))\n                    }))\n                  : _createCommentVNode(\"\", true)\n              ]),\n              _: 1\n            })\n          ])), [\n            [_directive_tooltip, _ctx.$t('components.common.header.notificationMenu.title')]\n          ]),\n          (!_unref(isMobile))\n            ? (_openBlock(), _createBlock(Divider, { key: 0 }))\n            : _createCommentVNode(\"\", true),\n          _createElementVNode(\"div\", {\n            class: \"nd-info\",\n            onClick: _cache[5] || (_cache[5] = ($event: any) => (handleAvatarClick())),\n            ref_key: \"userMenu\",\n            ref: userMenu\n          }, [\n            _withDirectives(_createVNode(Avatar, {\n              color: (avatarSource.value?.avatarColor as unknown as Colors.HTMLColor),\n              caption: (avatarSource.value?.avatarCaption as unknown as string),\n              disabled: !isActiveContractorOrProfile.value,\n              class: \"nd-avatar\"\n            }, null, 8, [\"color\", \"caption\", \"disabled\"]), [\n              [_directive_tooltip, !isActiveContractorOrProfile.value ? 'Не активний. Зверніться до підтримки' : undefined]\n            ]),\n            (!_unref(isMobile))\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n                  _createElementVNode(\"p\", _hoisted_13, _toDisplayString(_unref(activeContractor)?.shortName || _unref(profile)?.fullName), 1),\n                  _createElementVNode(\"p\", _hoisted_14, _toDisplayString(_unref(activeContractor)?.taxNumber || _unref(contactPhone)), 1)\n                ]))\n              : _createCommentVNode(\"\", true),\n            _createVNode(_Transition, { name: \"fade\" }, {\n              default: _withCtx(() => [\n                (isUserMenuOpen.value)\n                  ? (_openBlock(), _createBlock(UserMenu, {\n                      key: 0,\n                      onRedirect: $redirect\n                    }))\n                  : _createCommentVNode(\"\", true)\n              ]),\n              _: 1\n            })\n          ], 512)\n        ]))\n      : _createCommentVNode(\"\", true),\n    _createVNode(HelpModal)\n  ], 2))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { computed, reactive, ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { useI18n } from 'vue-i18n';\nimport { onClickOutside } from '@vueuse/core';\nimport { RouteLocationNamedRaw, useRoute } from 'vue-router';\nimport { useNavigationHelpers, useGetBreakpoints } from '@/lib/core/composables';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport Avatar from '@/components/v2/ui/Avatar.vue';\nimport { useContractorsModule } from '@/modules/store/contractors';\nimport { useUserModule } from '@/modules/store/user';\nimport { useNotificationsModule } from '@/modules/store/notifications';\nimport { useUserMenu } from '@/components/v2/common/header/useUserMenu';\nimport { Components } from '@/lib/types';\nimport Breadcrumbs from './components/Breadcrumbs.vue';\nimport AdminMenu from './components/AdminMenu.vue';\nimport Divider from './components/Divider.vue';\nimport UserMenu from './components/UserMenu.vue';\nimport SystemNotifications from './components/SystemNotifications.vue';\nimport ServiceDeskModal from './components/ServiceDeskModal.vue';\nimport HelpModal from './components/HelpModal.vue';\n\nconst {\n  isServiceDeskModalOpen,\n} = storeToRefs(useUiModule());\n\nconst { toggleServiceDeskModal, openModal } = useUiModule();\n\nconst { isMobile } = useGetBreakpoints();\nconst isNavMenuOpen = ref(false);\nconst isNavSubMenuOpen = ref(false);\nconst isUserMenuOpen = ref(false);\n\nconst navMenu = ref<HTMLDivElement>();\nconst userMenu = ref<HTMLDivElement>();\n\nconst isSystemNotificationsModalOpen = ref(false);\nconst { t } = useI18n();\n\nconst { activeContractor } = storeToRefs(useContractorsModule());\nconst { openSidebar, hoverSidebar } = storeToRefs(useUiModule());\nconst userModule = useUserModule();\nconst { profile } = storeToRefs(useUserModule());\nconst { contactPhone } = useUserMenu();\n\nconst contractorControlProfiles = computed(() => userModule.hasPermissions('contractorControlProfiles'));\nconst contractorControlUsers = computed(() => userModule.hasPermissions('contractorControlUsers'));\nconst adminAccess = computed(() => userModule.hasPermissions('adminAccess'));\nconst contractorControlLabels = computed(() => userModule.hasPermissions('contractorControlLabels'));\nconst contractorControlTokens = computed(() => userModule.hasPermissions('contractorControlTokens'));\n\nconst route = useRoute();\nconst { redirect } = useNavigationHelpers();\n\nconst menuNavItemsConfig = computed(() => [\n  {\n    label: t('components.common.header.nav.home'),\n    routeLocation: { name: ERouteNames.home },\n    icon: 'IconHomeMenu.svg',\n    show: true,\n  },\n  {\n    label: t('components.common.header.nav.documents'),\n    routeLocation: { name: ERouteNames.documents },\n    icon: 'IconDocumentMenu.svg',\n    show: true,\n  },\n  {\n    label: t('components.common.header.nav.admin'),\n    routeLocation: { name: ERouteNames.organization },\n    icon: 'IconAdmin.svg',\n    show: adminAccess.value,\n  },\n  {\n    label: t('components.common.header.nav.settings'),\n    routeLocation: { name: ERouteNames.myCredentials },\n    icon: 'IconGear.svg',\n    show: true,\n    subMenu: [\n      {\n        label: t('views.settings.sidebar.myCredentials'),\n        routeLocation: { name: ERouteNames.myCredentials },\n        icon: 'IconDisplay.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.contractors'),\n        routeLocation: { name: ERouteNames.myContractors },\n        icon: 'IconCase.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.myContractorRate'),\n        routeLocation: { name: ERouteNames.myContractorRate },\n        icon: 'IconAccountBalance.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.labels'),\n        routeLocation: { name: ERouteNames.labels },\n        icon: 'IconLabel.svg',\n        show: contractorControlLabels.value,\n      },\n      {\n        label: t('views.settings.sidebar.archives'),\n        routeLocation: { name: ERouteNames.myArchives },\n        icon: 'IconArchive.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.exports'),\n        routeLocation: { name: ERouteNames.myExports },\n        icon: 'IconDocumentDownload.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.accessRights'),\n        routeLocation: { name: ERouteNames.accessRights },\n        icon: 'IconGear.svg',\n        show: contractorControlProfiles.value || contractorControlUsers.value,\n      },\n      {\n        label: t('views.settings.sidebar.personalSettings'),\n        routeLocation: { name: ERouteNames.mySettings },\n        icon: 'IconUserInfo.svg',\n        show: true,\n      },\n      {\n        label: t('views.settings.sidebar.api'),\n        routeLocation: { name: ERouteNames.api },\n        icon: 'IconIntegration.svg',\n        show: contractorControlTokens.value,\n      },\n    ],\n  },\n]);\nconst subMenuNavItemsConfig: Components.IMenuItemConfig[] = reactive([]);\n\nonClickOutside(navMenu, (event: Event) => {\n  const target = event.target as Element;\n\n  if (target.className !== 'nd-nav') {\n    isNavMenuOpen.value = false;\n  }\n});\n\nconst $redirect = (to: RouteLocationNamedRaw) => {\n  isNavMenuOpen.value = false;\n  isNavSubMenuOpen.value = false;\n  isUserMenuOpen.value = false;\n  redirect(to);\n};\n\nconst handleAvatarClick = () => {\n  isUserMenuOpen.value = !isUserMenuOpen.value;\n};\n\nconst openHelp = () => {\n  openModal(EModalNames.userManualModal);\n};\n\nconst navMenuClick = (menuItem: Components.IMenuItemConfig): void => {\n  if (isMobile.value && menuItem.subMenu) {\n    subMenuNavItemsConfig.length = 0;\n    menuItem.subMenu.forEach((i: Components.IMenuItemConfig) => { subMenuNavItemsConfig.push(i); });\n    isNavMenuOpen.value = false;\n    isNavSubMenuOpen.value = true;\n  } else {\n    $redirect(menuItem.routeLocation);\n  }\n};\nconst navBtnClick = (): void => {\n  if (isMobile) {\n    if (isNavMenuOpen.value) {\n      isNavMenuOpen.value = false;\n      return;\n    }\n    if (isNavSubMenuOpen.value) {\n      isNavMenuOpen.value = true;\n      isNavSubMenuOpen.value = false;\n    }\n    if (!isNavMenuOpen.value) isNavMenuOpen.value = true;\n  } else {\n    isNavMenuOpen.value = !isNavMenuOpen.value;\n  }\n};\nonClickOutside(userMenu, (event: Event) => {\n  const target = event.target as Element;\n\n  if (target) {\n    isUserMenuOpen.value = false;\n  }\n});\nconst avatarSource = computed(() => activeContractor.value || profile.value);\nconst isAdminRoute = computed(() => route.path.startsWith('/admin'));\nconst isActiveContractorOrProfile = computed(() => activeContractor.value?.active ?? true);\n\nconst { haveUnreadNotifications } = storeToRefs(useNotificationsModule());\n</script>\n\n<template>\n  <header class=\"nd-header\" :class=\"{ 'nd-header--hover': !openSidebar && hoverSidebar && route.name !== ERouteNames.home }\">\n    <div\n      class=\"nd-nav\"\n      ref=\"navMenu\"\n      :class=\"[\n        { 'nd-nav--mini': !openSidebar && route.name !== ERouteNames.home },\n        { 'nd-nav--hover': !openSidebar && hoverSidebar && route.name !== ERouteNames.home }]\"\n      @click=\"navBtnClick\"\n    >\n      <div class=\"burger-menu\">\n        <span :class=\"{ 'line-transform': isNavMenuOpen }\"></span>\n        <span :class=\"{ 'line-transform-middle': isNavMenuOpen }\"></span>\n        <span :class=\"{ 'line-transform-reverse': isNavMenuOpen }\"></span>\n      </div>\n      <img\n        :src=\"isAdminRoute ? require('@/assets/images/adminLogo.svg') : require('@/assets/images/Logo_1.svg')\"\n        alt=\"Logo\"\n        class=\"nd-nav__logo\"\n        :class=\"[\n          { 'nd-nav__logo--mini': !isMobile && !openSidebar && route.name !== ERouteNames.home },\n          { 'nd-nav__logo--hover': !isMobile && !openSidebar && hoverSidebar && route.name !== ERouteNames.home }]\"\n      />\n      <Transition name=\"fade\">\n        <div>\n          <div v-if=\"isNavMenuOpen && !isNavSubMenuOpen\" class=\"nd-nav__menu\">\n            <template\n              v-for=\"(item, itemKey) in menuNavItemsConfig\"\n              :key=\"itemKey\"\n            >\n              <div\n                class=\"nd-nav__link\"\n                @click.stop=\"navMenuClick(item)\"\n                v-if=\"item.show\"\n              >\n                <InlineSvg :src=\"require(`@/assets/icons/${item.icon}`)\" class=\"nd-nav__link-icon\" />\n                <span class=\"nd-nav__link-label\">\n                  {{ item.label }}\n                </span>\n              </div>\n            </template>\n          </div>\n          <div v-if=\"!isNavMenuOpen && isNavSubMenuOpen\" class=\"nd-nav__menu\">\n            <template\n              v-for=\"(item, itemKey) in subMenuNavItemsConfig\"\n              :key=\"itemKey\"\n            >\n              <div\n                class=\"nd-nav__link\"\n                @click.stop=\"navMenuClick(item)\"\n                v-if=\"item.show\"\n              >\n                <InlineSvg :src=\"require(`@/assets/icons/${item.icon}`)\" class=\"nd-nav__link-icon\" />\n                <span class=\"nd-nav__link-label\">\n                  {{ item.label }}\n                </span>\n              </div>\n            </template>\n          </div>\n          <div\n            v-if=\"isMobile\"\n            :class=\"['menu-overlay', {'menu-overlay--show': isNavMenuOpen || isNavSubMenuOpen }]\"\n            @click.stop=\"isNavMenuOpen = false; isNavSubMenuOpen = false;\"\n          ></div>\n        </div>\n      </Transition>\n    </div>\n    <div style=\"width: auto\">\n      <AdminMenu v-if=\"isAdminRoute && !isMobile\"/>\n      <Breadcrumbs v-else-if=\"!isMobile\" />\n    </div>\n    <div\n      v-if=\"(!isNavMenuOpen && !isNavSubMenuOpen) || !isMobile\"\n      class=\"right-side-block\"\n    >\n      <div\n        class=\"nd-action q-mr-sm\"\n        @click.stop=\"openHelp\"\n        v-tooltip=\"$t('components.common.header.help.button')\"\n      >\n        <InlineSvg :src=\"require('@/assets/icons/IconHelp.svg')\" />\n      </div>\n      <div\n        class=\"nd-action q-mr-sm\"\n        @click.stop=\"toggleServiceDeskModal\"\n        v-tooltip=\"$t('components.common.header.seviceDesk.button')\"\n      >\n        <InlineSvg :src=\"require('@/assets/icons/IconChat.svg')\" />\n        <Transition name=\"fade\">\n          <ServiceDeskModal\n            v-if=\"isServiceDeskModalOpen\"\n            @close=\"isServiceDeskModalOpen = false\"\n          />\n        </Transition>\n      </div>\n      <div\n        class=\"nd-action\"\n        @click.stop=\"isSystemNotificationsModalOpen = !isSystemNotificationsModalOpen\"\n        v-tooltip=\"$t('components.common.header.notificationMenu.title')\"\n      >\n        <div class=\"dot\" v-if=\"haveUnreadNotifications\" />\n        <InlineSvg :src=\"require('@/assets/icons/IconBell.svg')\" />\n        <Transition name=\"fade\">\n          <SystemNotifications\n            v-if=\"isSystemNotificationsModalOpen\"\n            @close=\"isSystemNotificationsModalOpen = false\"\n          />\n        </Transition>\n      </div>\n      <Divider v-if=\"!isMobile\"/>\n      <div\n        class=\"nd-info\"\n        @click=\"handleAvatarClick()\"\n        ref=\"userMenu\"\n      >\n        <Avatar\n          :color=\"(avatarSource?.avatarColor as unknown as Colors.HTMLColor)\"\n          :caption=\"(avatarSource?.avatarCaption as unknown as string)\"\n          :disabled=\"!isActiveContractorOrProfile\"\n          class=\"nd-avatar\"\n          v-tooltip=\"!isActiveContractorOrProfile ? 'Не активний. Зверніться до підтримки' : undefined\"\n        />\n        <div v-if=\"!isMobile\" class=\"nd-info__text\">\n          <p class=\"nd-info__contractor\">\n            {{ activeContractor?.shortName || profile?.fullName }}\n          </p>\n          <p class=\"nd-info__tax-number\" >\n            {{ activeContractor?.taxNumber || contactPhone }}\n          </p>\n        </div>\n        <Transition name=\"fade\">\n          <UserMenu\n            v-if=\"isUserMenuOpen\"\n            @redirect=\"$redirect\"\n          />\n        </Transition>\n      </div>\n    </div>\n    <HelpModal />\n  </header>\n</template>\n\n<style scoped lang=\"scss\">\n\n.nd-info {\n  display: flex;\n  cursor: pointer;\n  align-items: center;\n  justify-content: start;\n  min-width: 10rem;\n\n  @include mobile() {\n    min-width: auto;\n    justify-content: flex-start;\n  }\n}\n\n.nd-info__contractor {\n  @include typography('inter-8');\n  @include lineClamp(1);\n  max-width: 7rem;\n  font-weight: 500;\n}\n\n.nd-info__tax-number {\n  @include typography('inter-8');\n  @include lineClamp(1);\n  margin-top: 0.2rem;\n  max-width: 5rem;\n  font-weight: 400;\n  color: $light_500;\n}\n\n.nd-header {\n  @include size(100vw, $header-height);\n  min-height: $header-height;\n  @include flex(row, space-between, center);\n  border-bottom: 1px solid $light_200;\n  user-select: none;\n  background-color: $light_000;\n  &--hover {\n    &:deep(.nd-breadcrumbs) {\n      position: relative;\n    }\n  }\n}\n\n.menu-overlay {\n  @include size(100%, 100svh);\n  background-color: $light_050;\n  z-index: -1;\n  opacity: 0;\n  transition: all 0.2s ease-in-out;\n  position: absolute;\n  top: $header-height;\n  left:0;\n\n  &--show {\n    z-index: 49;\n    opacity: 1;\n    transition: opacity 0.2s ease-in-out;\n  }\n}\n.nd-header-mobile__icon {\n  height: 1.75rem;\n  width: 1.75rem;\n  filter: $filter-svg-gray-400;\n}\n\n.nd-header-mobile__icon-toggle--open {\n  height: 1.2rem;\n  width: 1.2rem;\n}\n\n.nd-nav {\n  cursor: pointer;\n  @include flex(row, space-around, center);\n  min-width: 7.5rem;\n  @include mobile{\n    @include flex(row, flex-start, center);\n    min-width: auto;\n    width: auto;\n    height: 100%;\n    gap: 0.5rem;\n  }\n\n  &.nd-nav--mini {\n    justify-content: flex-start;\n  }\n\n  .nd-nav__logo {\n    padding-right: $page-inner-padding;\n    padding-left: 1rem;\n    border-right: 1px solid $light_200;\n    transition: all 0.3s ease-in-out;\n    opacity: 1;\n\n    @include mobile() {\n      border-right: none;\n      flex-shrink: 0;\n    }\n\n    @include hover() {\n      filter: brightness(105%);\n    }\n    &--mini {\n      opacity: 0;\n    }\n    &--hover {\n      opacity: 1;\n    }\n  }\n\n  .nd-nav__menu-toggle {\n    @include flex(row, center, center);\n    @include size(1rem, 1rem);\n    margin-left: 1.25rem;\n\n    &--open {\n      @include size(0.7rem, 0.7rem);\n      margin-right: 5px;\n    }\n  }\n\n  .nd-nav__menu {\n    @include size(13.75rem);\n    @include flex(column, flex-start, flex-start);\n    @include position(absolute, calc(#{$header-height} - 0.5rem), null, null, 0.5rem);\n    background-color: $light_000;\n    z-index: 50;\n    transition: all 0.3s ease-in-out;\n    padding: 0.75rem 0.625rem;\n    box-shadow: $shadow_03;\n    border-radius: 0.25rem;\n    @include mobile{\n      width: calc(100vw - 2rem);\n      @include position(absolute, calc(#{$header-height} + 1rem), null, null, 1rem);\n      border-radius: 0.75rem;\n    }\n\n    .nd-nav__link {\n      @include flex(row, flex-start, center);\n      @include size(100%, 2rem);\n      cursor: pointer;\n      padding: 0.5rem 0.75rem;\n      @include mobile{\n        @include flex(row-reverse, space-between, center);\n        @include size(100%, 2.625rem);\n      }\n    }\n\n    .nd-nav__link-icon {\n      @include size(1rem, 1rem);\n      @include flex(row, center, center);\n      margin-right: 0.75rem;\n      @include mobile{\n        @include size(1.5rem, 1.5rem);\n      }\n    }\n    .nd-nav__link-label {\n      @include typography('inter-14');\n      color: $light_900;\n      font-weight: 400;\n      @include mobile{\n        @include typography('inter-16');\n        color: $light_900;\n        font-weight: 400;\n      }\n    }\n  }\n}\n\n.right-side-block {\n  @include flex(row, space-between, center);\n  margin-right: $page-inner-padding;\n  height: $header-height;\n  width: 20rem;\n\n  @include mobile() {\n    width: 11rem;\n  }\n\n  .nd-avatar {\n    @include size(2rem, 2rem);\n    margin-right: 0.5rem;\n    margin-left: 0.5rem;\n    min-width: 2rem;\n    //margin: 0 $page-inner-padding 0 0.75rem;\n    @include mobile{\n      @include size(1.625rem, 1.625rem);\n      margin-right: 0;\n      min-width: 1.725rem;\n      min-height: 1.625rem;\n      :deep(.avatar__text) {\n        @include typography('inter-10');\n        font-weight: 500;\n      }\n    }\n  }\n}\n\n.nd-action {\n  @include size(2rem, 2rem);\n  @include flex(row, center, center);\n  border-radius: 0.5rem;\n  cursor: pointer;\n  position: relative;\n  flex-shrink: 0;\n  @include mobile{\n    @include size(2.5rem, 2.5rem);\n  }\n\n  svg {\n    @include size(1rem, 1rem);\n    filter: $filter-svg-jet;\n    @include mobile{\n      @include size(1.625rem, 1.625rem);\n      filter: $filter-svg-gray-400;\n    }\n  }\n\n  @include hover() {\n    background-color: $primary;\n  }\n\n  .dot {\n    @include size(0.5rem, 0.5rem);\n    border-radius: 50%;\n    border: 1px solid $light_000;\n    background-color: $maximum_red;\n    @include position(absolute, 6px, 8px);\n    z-index: 1;\n    @include mobile{\n      @include size(0.5rem, 0.5rem);\n      border: 1px solid $light_000;\n      @include position(absolute, 5px, 6px);\n    }\n    @include tablet{\n      @include size(0.5rem, 0.5rem);\n      border: 1px solid $light_000;\n      @include position(absolute, 5px, 6px);\n    }\n  }\n}\n.burger-menu {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  width: 1rem;\n  height: 0.625rem;\n  margin-left: 1.25rem;\n  flex-shrink: 0;\n  @include tablet{\n    width: 1.45rem;\n    height: 1rem;\n    margin-left: 1.75rem;\n  }\n  cursor: pointer;\n  @include mobile{\n    width: 1.45rem;\n    height: 1rem;\n    margin-left: 1.25rem;\n  }\n}\n\n.burger-menu span {\n  display: block;\n  height: 2px;\n  background-color: #000;\n  transition: all 0.3s ease-in-out;\n  @include tablet{\n    background-color: #94a3b8;\n  }\n  cursor: pointer;\n  @include mobile{\n    background-color: #94a3b8;\n  }\n}\n\n/* Верхняя линия */\n.line-transform {\n  transform: translateY(3px) rotate(45deg);\n  @include tablet{\n    transform: translateY(5px) rotate(45deg);\n  }\n  @include mobile{\n    transform: translateY(5px) rotate(45deg);\n  }\n}\n\n/* Средняя линия исчезает */\n.line-transform-middle {\n  opacity: 0;\n}\n\n/* Нижняя линия */\n.line-transform-reverse {\n  transform: translateY(-5px) rotate(-45deg);\n}\n</style>\n","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=2948762e&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2948762e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, vModelRadio as _vModelRadio, withDirectives as _withDirectives, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"ND-modal__body report-modal__body\" }\nconst _hoisted_2 = { class: \"report-modal__radio-label\" }\nconst _hoisted_3 = [\"onClick\"]\nconst _hoisted_4 = [\"value\", \"disabled\"]\nconst _hoisted_5 = {\n  key: 0,\n  class: \"text q-mt-md\"\n}\nconst _hoisted_6 = { class: \"report-modal__radio-label\" }\nconst _hoisted_7 = [\"onClick\"]\nconst _hoisted_8 = [\"value\", \"disabled\"]\nconst _hoisted_9 = { class: \"ND-modal__footer modal__footer\" }\n\nimport { ref, computed, watch } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { SupportedOutputFileFormats } from '@/lib/core/helpers';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { useRoute } from 'vue-router';\nimport { EXPORT_JOB_MIN_ROWS, EXPORT_XLSX_MAX_ROWS } from '@/lib/models/Export/exportConstants';\nimport { i18n } from '@/modules/i18n';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'LoadReportModal',\n  setup(__props) {\n\nconst { t } = i18n.global;\nconst route = useRoute();\nconst shouldShowReportPage = computed(() => route.name === 'allDocuments');\nconst pickedPageFormat = [\n  {\n    value: 'all',\n    label: 'Всі',\n  },\n  {\n    value: 'page',\n    label: 'Поточна',\n  },\n];\nconst supportedFileFormats = [\n  SupportedOutputFileFormats.XLSX,\n  SupportedOutputFileFormats.CSV,\n];\n\nconst documentsModule = useDocumentsModule();\nconst {\n  reportPage,\n  paginatorInfo,\n} = storeToRefs(documentsModule);\n\nconst {\n  reportDialogConfig,\n  closeModal,\n} = useUiModule();\nconst { openModals } = storeToRefs(useUiModule());\n\nconst loading = ref(false);\nconst isDisabled = ref(false);\nconst picked = ref<SupportedOutputFileFormats>(SupportedOutputFileFormats.XLSX);\nconst pickedPage = ref('all');\n\nconst documentsTotal = computed(() => paginatorInfo.value?.total ?? 0);\nconst isLargeAllPagesExport = computed(() => (\n  shouldShowReportPage.value\n  && pickedPage.value === 'all'\n  && documentsTotal.value > EXPORT_JOB_MIN_ROWS\n));\nconst isXlsxBlocked = computed(() => (\n  isLargeAllPagesExport.value\n  || (!shouldShowReportPage.value && (reportDialogConfig.rowsCount ?? 0) > EXPORT_XLSX_MAX_ROWS)\n));\n\nconst isFormatDisabled = (value: SupportedOutputFileFormats): boolean => (\n  value === SupportedOutputFileFormats.XLSX && isXlsxBlocked.value\n);\n\nconst formatTooltip = (value: SupportedOutputFileFormats) => {\n  if (!isFormatDisabled(value)) {\n    return undefined;\n  }\n\n  return {\n    theme: 'nd-tooltip',\n    content: t('components.common.ReportModal.xlsxUnavailableHint'),\n  };\n};\n\nconst applyDefaultFormat = () => {\n  picked.value = isXlsxBlocked.value\n    ? SupportedOutputFileFormats.CSV\n    : SupportedOutputFileFormats.XLSX;\n};\n\nwatch(() => openModals.value[EModalNames.loadReportModal], (isOpen) => {\n  if (!isOpen) return;\n  pickedPage.value = 'all';\n  reportPage.value = 'all';\n  applyDefaultFormat();\n});\n\nwatch(isXlsxBlocked, (blocked) => {\n  if (blocked) {\n    picked.value = SupportedOutputFileFormats.CSV;\n  }\n});\n\nconst changePicked = (value: SupportedOutputFileFormats) => {\n  if (isDisabled.value || isFormatDisabled(value)) return;\n  picked.value = value;\n};\n\nconst changePickedPage = (value: string) => {\n  if (isDisabled.value) return;\n  pickedPage.value = value;\n  reportPage.value = value;\n};\n\nconst close = (): void => {\n  if (loading.value) return;\n  closeModal(EModalNames.loadReportModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  isDisabled.value = true;\n  try {\n    await reportDialogConfig.action(picked.value);\n  } finally {\n    loading.value = false;\n    isDisabled.value = false;\n    close();\n  }\n};\n\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: _ctx.$t(_unref(reportDialogConfig).message),\n    \"modal-name\": _unref(EModalNames).loadReportModal,\n    class: \"report-modal\"\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"div\", _hoisted_2, _toDisplayString(_ctx.$t('components.common.ReportModal.label')), 1),\n        (_openBlock(), _createElementBlock(_Fragment, null, _renderList(supportedFileFormats, (value) => {\n          return _withDirectives(_createElementVNode(\"div\", {\n            key: value,\n            class: _normalizeClass(['report-modal__radio-item', { 'report-modal__radio-item--disabled': isFormatDisabled(value) }]),\n            onClick: ($event: any) => (changePicked(value))\n          }, [\n            _withDirectives(_createElementVNode(\"input\", {\n              type: \"radio\",\n              value: value,\n              \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((picked).value = $event)),\n              disabled: isDisabled.value || isFormatDisabled(value)\n            }, null, 8, _hoisted_4), [\n              [_vModelRadio, picked.value]\n            ]),\n            _createElementVNode(\"label\", null, _toDisplayString(value), 1)\n          ], 10, _hoisted_3), [\n            [_directive_tooltip, formatTooltip(value)]\n          ])\n        }), 64)),\n        (shouldShowReportPage.value)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n              _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_ctx.$t('components.common.ReportModal.page')), 1),\n              (_openBlock(), _createElementBlock(_Fragment, null, _renderList(pickedPageFormat, (item) => {\n                return _createElementVNode(\"div\", {\n                  key: item.value,\n                  onClick: ($event: any) => (changePickedPage(item.value)),\n                  class: \"report-modal__radio-item\"\n                }, [\n                  _withDirectives(_createElementVNode(\"input\", {\n                    type: \"radio\",\n                    value: item.value,\n                    \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((pickedPage).value = $event)),\n                    disabled: isDisabled.value\n                  }, null, 8, _hoisted_8), [\n                    [_vModelRadio, pickedPage.value]\n                  ]),\n                  _createElementVNode(\"label\", null, _toDisplayString(item.label), 1)\n                ], 8, _hoisted_7)\n              }), 64))\n            ]))\n          : _createCommentVNode(\"\", true)\n      ]),\n      _createElementVNode(\"div\", _hoisted_9, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: _ctx.$t(`components.documents.DocumentsBulkActionModal.cancel`)}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: _ctx.$t('components.common.ReportModal.submit'),\n          type: _unref(ENdButtonTypes).primary,\n          onClick: _cache[2] || (_cache[2] = ($event: any) => (submit())),\n          \"is-loading\": loading.value\n        }, null, 8, [\"text\", \"type\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"$t(reportDialogConfig.message)\"\n    :modal-name=\"EModalNames.loadReportModal\"\n    class=\"report-modal\"\n  >\n    <div class=\"ND-modal__body report-modal__body\">\n      <div class=\"report-modal__radio-label\">\n        {{ $t('components.common.ReportModal.label') }}\n      </div>\n      <div\n        v-for=\"value in supportedFileFormats\"\n        :key=\"value\"\n        v-tooltip=\"formatTooltip(value)\"\n        :class=\"['report-modal__radio-item', { 'report-modal__radio-item--disabled': isFormatDisabled(value) }]\"\n        @click=\"changePicked(value)\"\n      >\n        <input type=\"radio\" :value=\"value\" v-model=\"picked\" :disabled=\"isDisabled || isFormatDisabled(value)\"/>\n        <label>{{ value }}</label>\n      </div>\n      <div v-if=\"shouldShowReportPage\" class=\"text q-mt-md\">\n        <div class=\"report-modal__radio-label\">\n          {{ $t('components.common.ReportModal.page') }}\n        </div>\n        <div\n          v-for=\"item in pickedPageFormat\"\n          :key=\"item.value\"\n          @click=\"changePickedPage(item.value)\"\n          class=\"report-modal__radio-item\"\n        >\n          <input type=\"radio\" :value=\"item.value\" v-model=\"pickedPage\" :disabled=\"isDisabled\"/>\n          <label>{{ item.label }}</label>\n        </div>\n      </div>\n    </div>\n    <div class=\"ND-modal__footer modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: $t(`components.documents.DocumentsBulkActionModal.cancel`)}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"$t('components.common.ReportModal.submit')\"\n        :type=\"ENdButtonTypes.primary\"\n        @click=\"submit()\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { SupportedOutputFileFormats } from '@/lib/core/helpers';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { useRoute } from 'vue-router';\nimport { EXPORT_JOB_MIN_ROWS, EXPORT_XLSX_MAX_ROWS } from '@/lib/models/Export/exportConstants';\nimport { i18n } from '@/modules/i18n';\n\nconst { t } = i18n.global;\nconst route = useRoute();\nconst shouldShowReportPage = computed(() => route.name === 'allDocuments');\nconst pickedPageFormat = [\n  {\n    value: 'all',\n    label: 'Всі',\n  },\n  {\n    value: 'page',\n    label: 'Поточна',\n  },\n];\nconst supportedFileFormats = [\n  SupportedOutputFileFormats.XLSX,\n  SupportedOutputFileFormats.CSV,\n];\n\nconst documentsModule = useDocumentsModule();\nconst {\n  reportPage,\n  paginatorInfo,\n} = storeToRefs(documentsModule);\n\nconst {\n  reportDialogConfig,\n  closeModal,\n} = useUiModule();\nconst { openModals } = storeToRefs(useUiModule());\n\nconst loading = ref(false);\nconst isDisabled = ref(false);\nconst picked = ref<SupportedOutputFileFormats>(SupportedOutputFileFormats.XLSX);\nconst pickedPage = ref('all');\n\nconst documentsTotal = computed(() => paginatorInfo.value?.total ?? 0);\nconst isLargeAllPagesExport = computed(() => (\n  shouldShowReportPage.value\n  && pickedPage.value === 'all'\n  && documentsTotal.value > EXPORT_JOB_MIN_ROWS\n));\nconst isXlsxBlocked = computed(() => (\n  isLargeAllPagesExport.value\n  || (!shouldShowReportPage.value && (reportDialogConfig.rowsCount ?? 0) > EXPORT_XLSX_MAX_ROWS)\n));\n\nconst isFormatDisabled = (value: SupportedOutputFileFormats): boolean => (\n  value === SupportedOutputFileFormats.XLSX && isXlsxBlocked.value\n);\n\nconst formatTooltip = (value: SupportedOutputFileFormats) => {\n  if (!isFormatDisabled(value)) {\n    return undefined;\n  }\n\n  return {\n    theme: 'nd-tooltip',\n    content: t('components.common.ReportModal.xlsxUnavailableHint'),\n  };\n};\n\nconst applyDefaultFormat = () => {\n  picked.value = isXlsxBlocked.value\n    ? SupportedOutputFileFormats.CSV\n    : SupportedOutputFileFormats.XLSX;\n};\n\nwatch(() => openModals.value[EModalNames.loadReportModal], (isOpen) => {\n  if (!isOpen) return;\n  pickedPage.value = 'all';\n  reportPage.value = 'all';\n  applyDefaultFormat();\n});\n\nwatch(isXlsxBlocked, (blocked) => {\n  if (blocked) {\n    picked.value = SupportedOutputFileFormats.CSV;\n  }\n});\n\nconst changePicked = (value: SupportedOutputFileFormats) => {\n  if (isDisabled.value || isFormatDisabled(value)) return;\n  picked.value = value;\n};\n\nconst changePickedPage = (value: string) => {\n  if (isDisabled.value) return;\n  pickedPage.value = value;\n  reportPage.value = value;\n};\n\nconst close = (): void => {\n  if (loading.value) return;\n  closeModal(EModalNames.loadReportModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  isDisabled.value = true;\n  try {\n    await reportDialogConfig.action(picked.value);\n  } finally {\n    loading.value = false;\n    isDisabled.value = false;\n    close();\n  }\n};\n\n</script>\n\n<style scoped lang=\"scss\">\n@import \"loadReportModalStyle\";\n</style>\n","import script from \"./LoadReportModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./LoadReportModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./LoadReportModal.vue?vue&type=style&index=0&id=ec80b2e0&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ec80b2e0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, vModelRadio as _vModelRadio, withDirectives as _withDirectives, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createVNode as _createVNode, resolveDirective as _resolveDirective, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"ND-modal__body report-modal__body\" }\nconst _hoisted_2 = { class: \"text q-mt-md\" }\nconst _hoisted_3 = [\"onClick\"]\nconst _hoisted_4 = [\"value\", \"disabled\"]\nconst _hoisted_5 = { class: \"text q-mb-sm\" }\nconst _hoisted_6 = { class: \"document-bulk-action__subtitle\" }\nconst _hoisted_7 = { class: \"ND-modal__footer modal__footer\" }\n\nimport { ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { useArchivesModule } from '@/modules/store/archives';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'CreateArchiveModal',\n  setup(__props) {\n\nconst archivesModule = useArchivesModule();\nconst pickedTypeFormat = [\n  {\n    value: 'all',\n    label: 'Всі файли',\n  },\n  {\n    value: 'forPrint',\n    label: 'Файли для перегляду',\n  },\n];\n\nconst documentsModule = useDocumentsModule();\nconst {\n  reportPage,\n} = storeToRefs(documentsModule);\n\nconst {\n  confirmDialogConfig,\n  closeModal,\n} = useUiModule();\n\nconst loading = ref(false);\nconst isDisabled = ref(false);\nconst pickedType = ref('all');\n\nconst changePickedType = (value) => {\n  if (isDisabled.value) return;\n  archivesModule.contentType = value;\n  pickedType.value = value;\n  reportPage.value = value;\n};\n\nconst close = (): void => {\n  if (loading.value) return;\n  closeModal(EModalNames.createArchiveModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  isDisabled.value = true;\n  await confirmDialogConfig.action();\n  loading.value = false;\n  isDisabled.value = false;\n  close();\n};\n\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: 'Архів по документах',\n    \"modal-name\": _unref(EModalNames).createArchiveModal,\n    class: \"report-modal\"\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _cache[2] || (_cache[2] = _createElementVNode(\"div\", { class: \"report-modal__radio-label\" }, \" Оберіть вміст архіву \", -1)),\n        _createElementVNode(\"div\", _hoisted_2, [\n          (_openBlock(), _createElementBlock(_Fragment, null, _renderList(pickedTypeFormat, (item) => {\n            return _createElementVNode(\"div\", {\n              key: item.value,\n              onClick: ($event: any) => (changePickedType(item.value)),\n              class: \"report-modal__radio-item\"\n            }, [\n              _withDirectives(_createElementVNode(\"input\", {\n                type: \"radio\",\n                value: item.value,\n                \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((pickedType).value = $event)),\n                disabled: isDisabled.value\n              }, null, 8, _hoisted_4), [\n                [_vModelRadio, pickedType.value]\n              ]),\n              _createElementVNode(\"label\", null, _toDisplayString(item.label), 1)\n            ], 8, _hoisted_3)\n          }), 64))\n        ])\n      ]),\n      _createElementVNode(\"div\", _hoisted_5, [\n        _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_unref(confirmDialogConfig).message), 1)\n      ]),\n      _createElementVNode(\"div\", _hoisted_7, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: _ctx.$t(`components.documents.DocumentsBulkActionModal.cancel`)}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: _ctx.$t('components.common.ReportModal.submit'),\n          type: _unref(ENdButtonTypes).primary,\n          onClick: _cache[1] || (_cache[1] = ($event: any) => (submit())),\n          \"is-loading\": loading.value\n        }, null, 8, [\"text\", \"type\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"'Архів по документах'\"\n    :modal-name=\"EModalNames.createArchiveModal\"\n    class=\"report-modal\"\n  >\n    <div class=\"ND-modal__body report-modal__body\">\n      <div class=\"report-modal__radio-label\">\n        <!-- {{ $t('components.common.ReportModal.label') }} -->\n        Оберіть вміст архіву\n      </div>\n      <div class=\"text q-mt-md\">\n        <div\n          v-for=\"item in pickedTypeFormat\"\n          :key=\"item.value\"\n          @click=\"changePickedType(item.value)\"\n          class=\"report-modal__radio-item\"\n        >\n          <input type=\"radio\" :value=\"item.value\" v-model=\"pickedType\" :disabled=\"isDisabled\"/>\n          <label>{{ item.label }}</label>\n        </div>\n      </div>\n    </div>\n    <div class=\"text q-mb-sm\">\n      <div class=\"document-bulk-action__subtitle\">{{ confirmDialogConfig.message }}</div>\n    </div>\n    <div class=\"ND-modal__footer modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: $t(`components.documents.DocumentsBulkActionModal.cancel`)}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"$t('components.common.ReportModal.submit')\"\n        :type=\"ENdButtonTypes.primary\"\n        @click=\"submit()\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport {\n  useUiModule,\n  EModalNames,\n} from '@/modules/store/ui';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { useArchivesModule } from '@/modules/store/archives';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\n\nconst archivesModule = useArchivesModule();\nconst pickedTypeFormat = [\n  {\n    value: 'all',\n    label: 'Всі файли',\n  },\n  {\n    value: 'forPrint',\n    label: 'Файли для перегляду',\n  },\n];\n\nconst documentsModule = useDocumentsModule();\nconst {\n  reportPage,\n} = storeToRefs(documentsModule);\n\nconst {\n  confirmDialogConfig,\n  closeModal,\n} = useUiModule();\n\nconst loading = ref(false);\nconst isDisabled = ref(false);\nconst pickedType = ref('all');\n\nconst changePickedType = (value) => {\n  if (isDisabled.value) return;\n  archivesModule.contentType = value;\n  pickedType.value = value;\n  reportPage.value = value;\n};\n\nconst close = (): void => {\n  if (loading.value) return;\n  closeModal(EModalNames.createArchiveModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  isDisabled.value = true;\n  await confirmDialogConfig.action();\n  loading.value = false;\n  isDisabled.value = false;\n  close();\n};\n\n</script>\n\n<style scoped lang=\"scss\">\n@import \"loadReportModalStyle\";\n</style>\n","import script from \"./CreateArchiveModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./CreateArchiveModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./CreateArchiveModal.vue?vue&type=style&index=0&id=ad718e4a&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-ad718e4a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, renderList as _renderList, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"document-bulk-action__subtitle\" }\nconst _hoisted_2 = { class: \"ND-modal__body document-bulk-action__body\" }\nconst _hoisted_3 = { class: \"document__description\" }\nconst _hoisted_4 = { class: \"document__title\" }\nconst _hoisted_5 = { class: \"document__name\" }\nconst _hoisted_6 = [\"onClick\"]\nconst _hoisted_7 = { class: \"modal__footer ND-modal__footer\" }\n\nimport { computed } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport { useUiModule, EModalNames } from '@/modules/store/ui';\nimport { IDocument } from '@/lib/models/Document/Document';\nimport { EDocumentActions } from '@/lib/models/Document/EDocumentActions';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'DocumentBulkActionModal',\n  setup(__props) {\n\nconst { closeModal } = useUiModule();\nconst { bulkActionsDialogConfig } = storeToRefs(useUiModule());\n\nconst documentsReadyForAction = computed(() => {\n  switch (bulkActionsDialogConfig.value.actionType) {\n  case EDocumentActions.sign:\n    return bulkActionsDialogConfig.value.list.filter((d: IDocument) => d.canBeSigned);\n  case EDocumentActions.delete:\n    return bulkActionsDialogConfig.value.list.filter((d: IDocument) => d.canBeDeleted);\n  default:\n    return bulkActionsDialogConfig.value.list;\n  }\n});\n\nconst isValidDocument = (document: IDocument): boolean => {\n  switch (bulkActionsDialogConfig.value.actionType) {\n  case EDocumentActions.sign:\n    return document.canBeSigned;\n  case EDocumentActions.delete:\n    return document.canBeDeleted;\n  default:\n    return true;\n  }\n};\n\nconst removeFromList = (document: IDocument): void => {\n  bulkActionsDialogConfig.value.list = bulkActionsDialogConfig.value.list.filter((d) => d.id !== document.id);\n};\n\nconst close = (): void => {\n  closeModal(EModalNames.documentBulkActionModal);\n};\nconst submit = (): void => {\n  bulkActionsDialogConfig.value.list = documentsReadyForAction.value;\n  bulkActionsDialogConfig.value.action();\n};\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: _ctx.$t(`components.documents.DocumentsBulkActionModal.titles.${_unref(bulkActionsDialogConfig).actionType}`),\n    \"modal-name\": _unref(EModalNames).documentBulkActionModal,\n    class: \"document-bulk-action-modal\"\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        (_unref(bulkActionsDialogConfig).actionType !== _unref(EDocumentActions).print)\n          ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n              _createTextVNode(_toDisplayString(_ctx.$t(`components.documents.DocumentsBulkActionModal.subtitles.${_unref(bulkActionsDialogConfig).actionType}`,\n              [documentsReadyForAction.value.length, _unref(bulkActionsDialogConfig).list.length])) + \": \", 1)\n            ], 64))\n          : _createCommentVNode(\"\", true)\n      ]),\n      _createElementVNode(\"div\", _hoisted_2, [\n        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(bulkActionsDialogConfig).list as IDocument[], (document) => {\n          return (_openBlock(), _createElementBlock(\"div\", {\n            key: document.id,\n            class: _normalizeClass([\n          'document',\n          { 'document--invalid': !isValidDocument(document) },\n        ])\n          }, [\n            _createElementVNode(\"div\", _hoisted_3, [\n              _createElementVNode(\"div\", _hoisted_4, _toDisplayString(document.name), 1),\n              _createElementVNode(\"div\", _hoisted_5, _toDisplayString(document.typeName), 1)\n            ]),\n            _createElementVNode(\"div\", {\n              class: \"document__action\",\n              onClick: ($event: any) => (removeFromList(document))\n            }, [\n              _createVNode(_component_InlineSvg, {\n                class: \"inline-icon\",\n                src: require('@/assets/icons/IconCross.svg')\n              }, null, 8, [\"src\"])\n            ], 8, _hoisted_6)\n          ], 2))\n        }), 128))\n      ]),\n      _createElementVNode(\"div\", _hoisted_7, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: _ctx.$t(`components.documents.DocumentsBulkActionModal.cancel`)}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: _ctx.$t(`components.documents.DocumentsBulkActionModal.submit`),\n          type: _unref(ENdButtonTypes).primary,\n          disabled: !documentsReadyForAction.value.length,\n          onClick: _cache[0] || (_cache[0] = ($event: any) => (submit()))\n        }, null, 8, [\"text\", \"type\", \"disabled\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"$t(`components.documents.DocumentsBulkActionModal.titles.${bulkActionsDialogConfig.actionType}`)\"\n    :modal-name=\"EModalNames.documentBulkActionModal\"\n    class=\"document-bulk-action-modal\"\n  >\n    <div class=\"document-bulk-action__subtitle\">\n      <template v-if=\"bulkActionsDialogConfig.actionType !== EDocumentActions.print\">\n        {{ $t(`components.documents.DocumentsBulkActionModal.subtitles.${bulkActionsDialogConfig.actionType}`,\n              [documentsReadyForAction.length, bulkActionsDialogConfig.list.length]) }}:\n      </template>\n    </div>\n    <div class=\"ND-modal__body document-bulk-action__body\">\n      <div\n        v-for=\"document in bulkActionsDialogConfig.list as IDocument[]\"\n        :key=\"document.id\"\n        :class=\"[\n          'document',\n          { 'document--invalid': !isValidDocument(document) },\n        ]\"\n      >\n        <div class=\"document__description\">\n          <div class=\"document__title\">{{ document.name }}</div>\n          <div class=\"document__name\">{{ document.typeName }}</div>\n        </div>\n\n        <div\n          class=\"document__action\"\n          @click=\"removeFromList(document)\"\n        >\n          <InlineSvg class=\"inline-icon\" :src=\"require('@/assets/icons/IconCross.svg')\"/>\n        </div>\n      </div>\n    </div>\n    <div class=\"modal__footer ND-modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: $t(`components.documents.DocumentsBulkActionModal.cancel`)}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"$t(`components.documents.DocumentsBulkActionModal.submit`)\"\n        :type=\"ENdButtonTypes.primary\"\n        :disabled=\"!documentsReadyForAction.length\"\n        @click=\"submit()\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport { useUiModule, EModalNames } from '@/modules/store/ui';\nimport { IDocument } from '@/lib/models/Document/Document';\nimport { EDocumentActions } from '@/lib/models/Document/EDocumentActions';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\n\nconst { closeModal } = useUiModule();\nconst { bulkActionsDialogConfig } = storeToRefs(useUiModule());\n\nconst documentsReadyForAction = computed(() => {\n  switch (bulkActionsDialogConfig.value.actionType) {\n  case EDocumentActions.sign:\n    return bulkActionsDialogConfig.value.list.filter((d: IDocument) => d.canBeSigned);\n  case EDocumentActions.delete:\n    return bulkActionsDialogConfig.value.list.filter((d: IDocument) => d.canBeDeleted);\n  default:\n    return bulkActionsDialogConfig.value.list;\n  }\n});\n\nconst isValidDocument = (document: IDocument): boolean => {\n  switch (bulkActionsDialogConfig.value.actionType) {\n  case EDocumentActions.sign:\n    return document.canBeSigned;\n  case EDocumentActions.delete:\n    return document.canBeDeleted;\n  default:\n    return true;\n  }\n};\n\nconst removeFromList = (document: IDocument): void => {\n  bulkActionsDialogConfig.value.list = bulkActionsDialogConfig.value.list.filter((d) => d.id !== document.id);\n};\n\nconst close = (): void => {\n  closeModal(EModalNames.documentBulkActionModal);\n};\nconst submit = (): void => {\n  bulkActionsDialogConfig.value.list = documentsReadyForAction.value;\n  bulkActionsDialogConfig.value.action();\n};\n</script>\n\n<style scoped lang=\"scss\">\n@import \"documentBulkActionModalStyle\";\n</style>\n","import script from \"./DocumentBulkActionModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DocumentBulkActionModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DocumentBulkActionModal.vue?vue&type=style&index=0&id=297b6400&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-297b6400\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, isRef as _isRef, vModelText as _vModelText, withDirectives as _withDirectives, resolveComponent as _resolveComponent, createVNode as _createVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"reject-document-body ND-modal__body\" }\nconst _hoisted_2 = {\n  class: \"reject-document__textarea-label\",\n  for: \"textarea\"\n}\nconst _hoisted_3 = { class: \"reject-document__textarea-container\" }\nconst _hoisted_4 = [\"placeholder\"]\nconst _hoisted_5 = { class: \"modal__footer ND-modal__footer\" }\n\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { storeToRefs } from 'pinia';\nimport { ENdButtonTypes, NdButton } from '@/components/v2/ui';\nimport { onBeforeUnmount, ref } from 'vue';\nimport { useDocumentActions } from '@/views/documents/useDocumentActions';\nimport { IDocument } from '@/lib/models/Document/Document';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'RejectDocumentReasonModal',\n  setup(__props) {\n\nconst loading = ref(false);\nconst documentsModule = useDocumentsModule();\nconst documentActions = useDocumentActions();\nconst { rejectionReason, rejectionDialogTitle } = storeToRefs(documentsModule);\n\nconst {\n  closeModal,\n} = useUiModule();\n\nconst close = (): void => {\n  rejectionReason.value = '';\n  closeModal(EModalNames.rejectDocumentReasonModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  try {\n    await documentActions.rejectDocument(documentsModule?.currentDocument as IDocument);\n    loading.value = false;\n  } catch (error) {\n    loading.value = false;\n    console.error(error);\n  }\n};\n\nonBeforeUnmount(() => {\n  close();\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: _unref(rejectionDialogTitle),\n    \"modal-name\": _unref(EModalNames).rejectDocumentReasonModal\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"label\", _hoisted_2, _toDisplayString(_ctx.$t('components.documents.RejectDocumentReasonModal.textareaLabel')) + \": \", 1),\n        _createElementVNode(\"div\", _hoisted_3, [\n          _withDirectives(_createElementVNode(\"textarea\", {\n            class: \"reject-document__textarea\",\n            \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(rejectionReason) ? (rejectionReason).value = $event : null)),\n            rows: \"8\",\n            placeholder: _ctx.$t('components.documents.RejectDocumentReasonModal.textareaPlaceholder'),\n            id: \"textarea\"\n          }, \"            \", 8, _hoisted_4), [\n            [_vModelText, _unref(rejectionReason)]\n          ])\n        ])\n      ]),\n      _createElementVNode(\"div\", _hoisted_5, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Назад'}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: _ctx.$t('components.documents.RejectDocumentReasonModal.submit'),\n          type: _unref(ENdButtonTypes).primary,\n          disabled: _unref(rejectionReason).length === 0,\n          onClick: submit,\n          \"is-loading\": loading.value\n        }, null, 8, [\"text\", \"type\", \"disabled\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { storeToRefs } from 'pinia';\nimport { ENdButtonTypes, NdButton } from '@/components/v2/ui';\nimport { onBeforeUnmount, ref } from 'vue';\nimport { useDocumentActions } from '@/views/documents/useDocumentActions';\nimport { IDocument } from '@/lib/models/Document/Document';\n\nconst loading = ref(false);\nconst documentsModule = useDocumentsModule();\nconst documentActions = useDocumentActions();\nconst { rejectionReason, rejectionDialogTitle } = storeToRefs(documentsModule);\n\nconst {\n  closeModal,\n} = useUiModule();\n\nconst close = (): void => {\n  rejectionReason.value = '';\n  closeModal(EModalNames.rejectDocumentReasonModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  try {\n    await documentActions.rejectDocument(documentsModule?.currentDocument as IDocument);\n    loading.value = false;\n  } catch (error) {\n    loading.value = false;\n    console.error(error);\n  }\n};\n\nonBeforeUnmount(() => {\n  close();\n});\n</script>\n\n<template>\n  <ModalWrapper\n    :title=\"rejectionDialogTitle\"\n    :modal-name=\"EModalNames.rejectDocumentReasonModal\"\n  >\n    <div class=\"reject-document-body ND-modal__body\">\n      <label class=\"reject-document__textarea-label\" for=\"textarea\">\n        {{ $t('components.documents.RejectDocumentReasonModal.textareaLabel') }}:\n      </label>\n      <div class=\"reject-document__textarea-container\">\n        <textarea\n          class=\"reject-document__textarea\"\n          v-model=\"rejectionReason\"\n          rows=\"8\"\n          :placeholder=\"$t('components.documents.RejectDocumentReasonModal.textareaPlaceholder')\"\n          id=\"textarea\"\n        >\n            </textarea>\n      </div>\n    </div>\n    <div class=\"modal__footer ND-modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: 'Назад'}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"$t('components.documents.RejectDocumentReasonModal.submit')\"\n        :type=\"ENdButtonTypes.primary\"\n        :disabled=\"rejectionReason.length === 0\"\n        @click=\"submit\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<style scoped lang=\"scss\">\n@import \"rejectDocumentReasonModalStyle\";\n</style>\n","import script from \"./RejectDocumentReasonModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./RejectDocumentReasonModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./RejectDocumentReasonModal.vue?vue&type=style&index=0&id=0fc3fa6e&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0fc3fa6e\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, isRef as _isRef, vModelText as _vModelText, withDirectives as _withDirectives, resolveComponent as _resolveComponent, createVNode as _createVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"reject-document-body ND-modal__body\" }\nconst _hoisted_2 = {\n  class: \"reject-document__textarea-label\",\n  for: \"textarea\"\n}\nconst _hoisted_3 = { class: \"reject-document__textarea-container\" }\nconst _hoisted_4 = [\"placeholder\"]\nconst _hoisted_5 = { class: \"modal__footer ND-modal__footer\" }\n\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { storeToRefs } from 'pinia';\nimport { ENdButtonTypes, NdButton } from '@/components/v2/ui';\nimport { onBeforeUnmount, ref } from 'vue';\nimport { useDocumentActions } from '@/views/documents/useDocumentActions';\nimport { IDocument } from '@/lib/models/Document/Document';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'CancelDocumentReasonModal',\n  setup(__props) {\n\nconst loading = ref(false);\nconst documentsModule = useDocumentsModule();\nconst documentActions = useDocumentActions();\nconst { cancelReason, cancelDialogTitle } = storeToRefs(documentsModule);\n\nconst {\n  closeModal,\n} = useUiModule();\n\nconst close = (): void => {\n  cancelReason.value = '';\n  closeModal(EModalNames.cancelDocumentReasonModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  try {\n    await documentActions.cancelDocument(documentsModule?.currentDocument as IDocument);\n    loading.value = false;\n  } catch (error) {\n    loading.value = false;\n    console.error(error);\n  }\n};\n\nonBeforeUnmount(() => {\n  close();\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: _unref(cancelDialogTitle),\n    \"modal-name\": _unref(EModalNames).cancelDocumentReasonModal\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"label\", _hoisted_2, _toDisplayString(_ctx.$t('components.documents.RejectDocumentReasonModal.textareaLabel')) + \": \", 1),\n        _createElementVNode(\"div\", _hoisted_3, [\n          _withDirectives(_createElementVNode(\"textarea\", {\n            class: \"reject-document__textarea\",\n            \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(cancelReason) ? (cancelReason).value = $event : null)),\n            rows: \"8\",\n            placeholder: _ctx.$t('components.documents.RejectDocumentReasonModal.textareaPlaceholder'),\n            id: \"textarea\"\n          }, \"            \", 8, _hoisted_4), [\n            [_vModelText, _unref(cancelReason)]\n          ])\n        ])\n      ]),\n      _createElementVNode(\"div\", _hoisted_5, [\n        _withDirectives((_openBlock(), _createElementBlock(\"div\", {\n          class: \"modal__button-left\",\n          onClick: close\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nd-button__icon-back\",\n            src: require('@/assets/icons/IconArrowToRight.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Назад'}]\n        ]),\n        _createVNode(_unref(NdButton), {\n          class: \"modal__button-right\",\n          text: _ctx.$t('components.documents.RejectDocumentReasonModal.submit'),\n          type: _unref(ENdButtonTypes).primary,\n          disabled: _unref(cancelReason).length === 0,\n          onClick: submit,\n          \"is-loading\": loading.value\n        }, null, 8, [\"text\", \"type\", \"disabled\", \"is-loading\"])\n      ])\n    ]),\n    _: 1\n  }, 8, [\"title\", \"modal-name\"]))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { useDocumentsModule } from '@/modules/store/documents';\nimport { storeToRefs } from 'pinia';\nimport { ENdButtonTypes, NdButton } from '@/components/v2/ui';\nimport { onBeforeUnmount, ref } from 'vue';\nimport { useDocumentActions } from '@/views/documents/useDocumentActions';\nimport { IDocument } from '@/lib/models/Document/Document';\n\nconst loading = ref(false);\nconst documentsModule = useDocumentsModule();\nconst documentActions = useDocumentActions();\nconst { cancelReason, cancelDialogTitle } = storeToRefs(documentsModule);\n\nconst {\n  closeModal,\n} = useUiModule();\n\nconst close = (): void => {\n  cancelReason.value = '';\n  closeModal(EModalNames.cancelDocumentReasonModal);\n};\n\nconst submit = async (): Promise<void> => {\n  loading.value = true;\n  try {\n    await documentActions.cancelDocument(documentsModule?.currentDocument as IDocument);\n    loading.value = false;\n  } catch (error) {\n    loading.value = false;\n    console.error(error);\n  }\n};\n\nonBeforeUnmount(() => {\n  close();\n});\n</script>\n\n<template>\n  <ModalWrapper\n    :title=\"cancelDialogTitle\"\n    :modal-name=\"EModalNames.cancelDocumentReasonModal\"\n  >\n    <div class=\"reject-document-body ND-modal__body\">\n      <label class=\"reject-document__textarea-label\" for=\"textarea\">\n        {{ $t('components.documents.RejectDocumentReasonModal.textareaLabel') }}:\n      </label>\n      <div class=\"reject-document__textarea-container\">\n        <textarea\n          class=\"reject-document__textarea\"\n          v-model=\"cancelReason\"\n          rows=\"8\"\n          :placeholder=\"$t('components.documents.RejectDocumentReasonModal.textareaPlaceholder')\"\n          id=\"textarea\"\n        >\n            </textarea>\n      </div>\n    </div>\n    <div class=\"modal__footer ND-modal__footer\">\n      <div\n        class=\"modal__button-left\"\n        @click=\"close\"\n        v-tooltip=\"{ theme: 'nd-tooltip', content: 'Назад'}\"\n      >\n        <InlineSvg\n          class=\"nd-button__icon-back\"\n          :src=\"require('@/assets/icons/IconArrowToRight.svg')\"\n        />\n      </div>\n      <NdButton\n        class=\"modal__button-right\"\n        :text=\"$t('components.documents.RejectDocumentReasonModal.submit')\"\n        :type=\"ENdButtonTypes.primary\"\n        :disabled=\"cancelReason.length === 0\"\n        @click=\"submit\"\n        :is-loading=\"loading\"\n      />\n    </div>\n  </ModalWrapper>\n</template>\n\n<style scoped lang=\"scss\">\n@import \"rejectDocumentReasonModalStyle\";\n</style>\n","import script from \"./CancelDocumentReasonModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./CancelDocumentReasonModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./CancelDocumentReasonModal.vue?vue&type=style&index=0&id=4fcef783&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4fcef783\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { ReadEDSModal } from '@/components/v2/common/eds';\nimport Header from '@/components/v2/common/header';\nimport WelcomeMessage from '@/components/welcome/WelcomeMessage.vue';\nimport WelcomeMessageReminderModal from '@/components/welcome/WelcomeMessageReminderModal.vue';\nimport LoadReportModal from '@/components/v2/documents/LoadReportModal.vue';\nimport CreateArchiveModal from '@/components/v2/documents/CreateArchiveModal.vue';\nimport DocumentBulkActionModal from '@/components/v2/documents/DocumentBulkActionModal.vue';\nimport RejectDocumentReasonModal from '@/components/v2/documents/RejectDocumentReasonModal.vue';\nimport CancelDocumentReasonModal from '@/components/v2/documents/CancelDocumentReasonModal.vue';\nimport AssignLabelModal from '@/components/v2/views/settings/labels/components/AssignLabelModal.vue';\nimport AssignLabelToNewDocumentModal from '@/components/v2/views/settings/labels/components/AssignLabelToNewDocumentModal.vue';\nimport ToastNotifications from '@/components/v2/common/ToastNotifications.vue';\nimport AddContractorModal from '@/components/v2/views/settings/contractors/components/AddContractorModal.vue';\nimport { useGetBreakpoints } from '@/lib/core/composables';\nimport { storeToRefs } from 'pinia';\nimport { useUiModule } from '@/modules/store/ui';\nimport { useAuthModule } from '@/modules/store/auth';\nimport { useRoute } from 'vue-router';\nimport { isDocumentSignTokenRoute } from '@/lib/core/composables/useDocumentSignTokenRoute';\nimport { computed } from 'vue';\nimport ConfirmModal from '@/components/v2/common/ConfirmModal.vue';\nimport { ELoginReminderType } from '@/lib/models/User/ELoginReminderType';\nimport { useTutorialModule } from '@/modules/store/tutorial';\nimport { useUserModule } from '@/modules/store/user';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'Default',\n  setup(__props) {\n\nconst { isMobile } = useGetBreakpoints();\nconst { anyModalOpen } = storeToRefs(useUiModule());\nconst userModule = useUserModule();\n\nconst { profile, isServiceUser } = storeToRefs(userModule);\nconst tutorialModule = useTutorialModule();\nconst { welcomeMessageWasShown } = storeToRefs(tutorialModule);\n\nconst showWelcomeMessage = computed(() => (profile.value\n    && profile.value.loginReminder === ELoginReminderType.firstLogin\n    && !welcomeMessageWasShown.value && !isServiceUser.value));\n\nconst authModule = useAuthModule();\nconst route = useRoute();\nconst isLoggedIn = computed(() => authModule.isLoggedIn);\nconst isTokenSignRoute = computed(() => isDocumentSignTokenRoute(route));\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_router_view = _resolveComponent(\"router-view\")!\n\n  return (_openBlock(), _createElementBlock(\"section\", {\n    class: _normalizeClass([\n      'nd-layout',\n      { 'nd-layout--with-border': _unref(anyModalOpen) },\n      { 'nd-layout--mobile': _unref(isMobile) },\n      { 'nd-layout--token': isTokenSignRoute.value && _unref(isMobile) },\n    ]\n    )\n  }, [\n    (isLoggedIn.value && !isTokenSignRoute.value)\n      ? (_openBlock(), _createBlock(_unref(Header), { key: 0 }))\n      : _createCommentVNode(\"\", true),\n    _createVNode(_component_router_view),\n    _createVNode(ToastNotifications),\n    _createVNode(_unref(ReadEDSModal)),\n    _createVNode(ConfirmModal),\n    _createVNode(AddContractorModal),\n    _createVNode(RejectDocumentReasonModal),\n    _createVNode(CancelDocumentReasonModal),\n    _createVNode(WelcomeMessageReminderModal),\n    _createVNode(DocumentBulkActionModal),\n    _createVNode(LoadReportModal),\n    _createVNode(CreateArchiveModal),\n    _createVNode(AssignLabelModal),\n    _createVNode(AssignLabelToNewDocumentModal),\n    (showWelcomeMessage.value)\n      ? (_openBlock(), _createBlock(WelcomeMessage, { key: 1 }))\n      : _createCommentVNode(\"\", true),\n    _cache[0] || (_cache[0] = _createElementVNode(\"div\", {\n      id: \"modals\",\n      class: \"modals\"\n    }, null, -1))\n  ], 2))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { ReadEDSModal } from '@/components/v2/common/eds';\nimport Header from '@/components/v2/common/header';\nimport WelcomeMessage from '@/components/welcome/WelcomeMessage.vue';\nimport WelcomeMessageReminderModal from '@/components/welcome/WelcomeMessageReminderModal.vue';\nimport LoadReportModal from '@/components/v2/documents/LoadReportModal.vue';\nimport CreateArchiveModal from '@/components/v2/documents/CreateArchiveModal.vue';\nimport DocumentBulkActionModal from '@/components/v2/documents/DocumentBulkActionModal.vue';\nimport RejectDocumentReasonModal from '@/components/v2/documents/RejectDocumentReasonModal.vue';\nimport CancelDocumentReasonModal from '@/components/v2/documents/CancelDocumentReasonModal.vue';\nimport AssignLabelModal from '@/components/v2/views/settings/labels/components/AssignLabelModal.vue';\nimport AssignLabelToNewDocumentModal from '@/components/v2/views/settings/labels/components/AssignLabelToNewDocumentModal.vue';\nimport ToastNotifications from '@/components/v2/common/ToastNotifications.vue';\nimport AddContractorModal from '@/components/v2/views/settings/contractors/components/AddContractorModal.vue';\nimport { useGetBreakpoints } from '@/lib/core/composables';\nimport { storeToRefs } from 'pinia';\nimport { useUiModule } from '@/modules/store/ui';\nimport { useAuthModule } from '@/modules/store/auth';\nimport { useRoute } from 'vue-router';\nimport { isDocumentSignTokenRoute } from '@/lib/core/composables/useDocumentSignTokenRoute';\nimport { computed } from 'vue';\nimport ConfirmModal from '@/components/v2/common/ConfirmModal.vue';\nimport { ELoginReminderType } from '@/lib/models/User/ELoginReminderType';\nimport { useTutorialModule } from '@/modules/store/tutorial';\nimport { useUserModule } from '@/modules/store/user';\n\nconst { isMobile } = useGetBreakpoints();\nconst { anyModalOpen } = storeToRefs(useUiModule());\nconst userModule = useUserModule();\n\nconst { profile, isServiceUser } = storeToRefs(userModule);\nconst tutorialModule = useTutorialModule();\nconst { welcomeMessageWasShown } = storeToRefs(tutorialModule);\n\nconst showWelcomeMessage = computed(() => (profile.value\n    && profile.value.loginReminder === ELoginReminderType.firstLogin\n    && !welcomeMessageWasShown.value && !isServiceUser.value));\n\nconst authModule = useAuthModule();\nconst route = useRoute();\nconst isLoggedIn = computed(() => authModule.isLoggedIn);\nconst isTokenSignRoute = computed(() => isDocumentSignTokenRoute(route));\n</script>\n\n<template>\n  <section\n    :class=\"[\n      'nd-layout',\n      { 'nd-layout--with-border': anyModalOpen },\n      { 'nd-layout--mobile': isMobile },\n      { 'nd-layout--token': isTokenSignRoute && isMobile },\n    ]\n    \">\n    <Header v-if=\"isLoggedIn && !isTokenSignRoute\"/>\n    <router-view/>\n    <!--    <Footer v-if=\"isLoggedIn && !isMobile\"/>-->\n    <ToastNotifications/>\n    <ReadEDSModal/>\n    <ConfirmModal/>\n    <AddContractorModal/>\n    <RejectDocumentReasonModal/>\n    <CancelDocumentReasonModal/>\n    <WelcomeMessageReminderModal/>\n    <DocumentBulkActionModal/>\n    <LoadReportModal/>\n    <CreateArchiveModal/>\n    <AssignLabelModal/>\n    <AssignLabelToNewDocumentModal/>\n    <WelcomeMessage v-if=\"showWelcomeMessage\"/>\n    <div id=\"modals\" class=\"modals\"/>\n  </section>\n</template>\n\n<style scoped lang=\"scss\">\n.nd-layout {\n  position: relative;\n  overflow: hidden;\n  background-color: $light_000;\n  @include size(100vw, 100svh);\n  display: grid;\n  grid-template-columns: 1fr;\n  grid-template-rows: auto 1fr;\n  &--mobile {\n    :deep(.loader) {\n      height: calc(100svh - 124px);\n      @include position(fixed, 60px);\n    }\n  }\n  &--token {\n    grid-template-rows: 1fr;\n  }\n}\n</style>\n","import script from \"./Default.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Default.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Default.vue?vue&type=style&index=0&id=19eaeef7&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-19eaeef7\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\nimport _imports_0 from '@/assets/images/ImageEmail_320.png'\n\n\nconst _hoisted_1 = { class: \"demo-section__content\" }\nconst _hoisted_2 = { class: \"demo-section__bottom\" }\n\nimport { computed, ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { NdModal } from '@/components/ui';\nimport DemoRequestForm from '@/components/v2/common/DemoRequestForm.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'DemoRequestModal',\n  setup(__props) {\n\nconst uiStore = useUiModule();\nconst { openModals } = storeToRefs(uiStore);\nconst { closeModal, setModalOpen } = uiStore;\nconst formRef = ref<InstanceType<typeof DemoRequestForm> | null>(null);\n\nconst isOpen = computed({\n  get: () => !!openModals.value.demoRequestModal,\n  set: (value: boolean) => setModalOpen(EModalNames.demoRequestModal, value),\n});\n\nconst close = (): void => {\n  formRef.value?.resetForm();\n  closeModal(EModalNames.demoRequestModal);\n};\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_Modal = _resolveComponent(\"Modal\")!\n\n  return (_openBlock(), _createBlock(_component_Modal, {\n    modelValue: isOpen.value,\n    \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((isOpen).value = $event)),\n    close: close\n  }, {\n    default: _withCtx(() => [\n      _createVNode(_unref(NdModal), { onCloseModal: close }, {\n        content: _withCtx(() => [\n          _createElementVNode(\"div\", _hoisted_1, [\n            _cache[3] || (_cache[3] = _createElementVNode(\"div\", { class: \"demo-section__top\" }, [\n              _createElementVNode(\"div\", { class: \"demo-section__illustration\" }, [\n                _createElementVNode(\"img\", {\n                  src: _imports_0,\n                  alt: \"Email_320\"\n                })\n              ])\n            ], -1)),\n            _createElementVNode(\"div\", _hoisted_2, [\n              _cache[1] || (_cache[1] = _createElementVNode(\"h2\", { class: \"demo-section__title\" }, [\n                _createTextVNode(\" Цифровізуйте свій бізнес\"),\n                _createElementVNode(\"br\"),\n                _createTextVNode(\" з NovaDoc \")\n              ], -1)),\n              _cache[2] || (_cache[2] = _createElementVNode(\"p\", { class: \"demo-section__text\" }, [\n                _createTextVNode(\" Наша команда підтримки готова допомогти вам із реєстрацією, технічними налаштуваннями чи будь-якими питаннями щодо роботи сервісу. Звертайтеся в будь-який час, \"),\n                _createElementVNode(\"strong\", null, \"ми завжди на зв’язку!\")\n              ], -1)),\n              _createVNode(DemoRequestForm, {\n                ref_key: \"formRef\",\n                ref: formRef,\n                variant: \"modal\",\n                onSuccess: close\n              }, null, 512)\n            ])\n          ])\n        ]),\n        _: 1\n      })\n    ]),\n    _: 1\n  }, 8, [\"modelValue\"]))\n}\n}\n\n})","<template>\n  <Modal v-model=\"isOpen\" :close=\"close\">\n    <NdModal @close-modal=\"close\">\n      <template v-slot:content>\n        <div class=\"demo-section__content\">\n          <div class=\"demo-section__top\">\n            <div class=\"demo-section__illustration\">\n              <img src=\"@/assets/images/ImageEmail_320.png\" alt=\"Email_320\" />\n            </div>\n          </div>\n          <div class=\"demo-section__bottom\">\n            <h2 class=\"demo-section__title\">\n              Цифровізуйте свій бізнес<br>\n              з NovaDoc\n            </h2>\n\n            <p class=\"demo-section__text\">\n              Наша команда підтримки готова допомогти вам із реєстрацією, технічними\n              налаштуваннями чи будь-якими питаннями щодо роботи сервісу.\n              Звертайтеся в будь-який час, <strong>ми завжди на зв’язку!</strong>\n            </p>\n\n            <DemoRequestForm\n              ref=\"formRef\"\n              variant=\"modal\"\n              @success=\"close\"\n            />\n          </div>\n        </div>\n      </template>\n    </NdModal>\n  </Modal>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { storeToRefs } from 'pinia';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { NdModal } from '@/components/ui';\nimport DemoRequestForm from '@/components/v2/common/DemoRequestForm.vue';\n\nconst uiStore = useUiModule();\nconst { openModals } = storeToRefs(uiStore);\nconst { closeModal, setModalOpen } = uiStore;\nconst formRef = ref<InstanceType<typeof DemoRequestForm> | null>(null);\n\nconst isOpen = computed({\n  get: () => !!openModals.value.demoRequestModal,\n  set: (value: boolean) => setModalOpen(EModalNames.demoRequestModal, value),\n});\n\nconst close = (): void => {\n  formRef.value?.resetForm();\n  closeModal(EModalNames.demoRequestModal);\n};\n</script>\n\n<style scoped lang=\"scss\">\n.nd-modal {\n  width: auto;\n  height: auto;\n  background: $light_050;\n  padding-top: 1.5rem;\n\n  :deep(.nd-modal__close) {\n    width: 1.5rem;\n    height: 1.5rem;\n    top: .625rem;\n    right: .625rem;\n    @include flex(column, center, center);\n  }\n\n  :deep(.nd-modal__close:hover) {\n    filter: $filter-svg-maximum-red;\n  }\n\n  :deep(.nd-modal__close-icon) {\n    width: .8825rem;\n    height: .8825rem;\n  }\n}\n\n.demo-section__content {\n  padding: 0 .5rem;\n  @include flex(column, center, center);\n  background: $light_050;\n}\n\n.demo-section__title {\n  @include typography('nova-poshta-bold-36');\n  text-align: center;\n  margin-bottom: 1rem;\n}\n\n.demo-section__text {\n  max-width: 50rem;\n  margin: 0 0 3.875rem;\n  @include typography('inter-semibold-16');\n  font-weight: 400;\n  text-align: center;\n  color: $light_jet;\n\n  strong {\n    font-weight: 600;\n  }\n}\n\n.demo-section__top {\n  @include flex(row, center, center);\n  margin-bottom: 1.5rem;\n}\n\n.demo-section__illustration {\n  width: 11.875rem;\n  height: 11.875rem;\n  @include flex(row, center, center);\n  filter: drop-shadow(0 1.4rem 1.2rem rgba(15, 23, 42, 0.12));\n}\n</style>\n","import script from \"./DemoRequestModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./DemoRequestModal.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./DemoRequestModal.vue?vue&type=style&index=0&id=2c0c169b&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-2c0c169b\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withModifiers as _withModifiers, createVNode as _createVNode, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, createCommentVNode as _createCommentVNode, Transition as _Transition, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { class: \"nd-header\" }\nconst _hoisted_2 = { class: \"left-side-block\" }\nconst _hoisted_3 = [\"aria-expanded\"]\nconst _hoisted_4 = { class: \"desktop-nav\" }\nconst _hoisted_5 = { class: \"nav-link-block\" }\nconst _hoisted_6 = { class: \"link-item\" }\nconst _hoisted_7 = { class: \"link-item\" }\nconst _hoisted_8 = { class: \"link-item\" }\nconst _hoisted_9 = [\"src\"]\nconst _hoisted_10 = { class: \"middle-side-block\" }\nconst _hoisted_11 = [\"src\"]\nconst _hoisted_12 = { class: \"right-side-block\" }\nconst _hoisted_13 = {\n  class: \"mobile-menu__nav\",\n  \"aria-label\": \"Mobile menu\"\n}\n\nimport {\n  ref,\n  watch,\n  onMounted,\n  onBeforeUnmount,\n} from 'vue';\nimport { useGetBreakpoints } from '@/lib/core/composables';\nimport { storeToRefs } from 'pinia';\nimport { useUiModule, EModalNames } from '@/modules/store/ui';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport DemoRequestModal from '@/components/v2/common/layout/components/DemoRequestModal.vue';\nimport ToastNotifications from '@/components/v2/common/ToastNotifications.vue';\nimport { useRouter } from 'vue-router';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'Home',\n  setup(__props) {\n\nconst router = useRouter();\nconst { isMobile, isTablet } = useGetBreakpoints();\nconst { anyModalOpen } = storeToRefs(useUiModule());\nconst { openModal } = useUiModule();\nconst isMenuOpen = ref(false);\n\nconst scrollToSection = (id: string) => {\n  const element = document.getElementById(id);\n  if (!element) return;\n  isMenuOpen.value = false;\n  element.scrollIntoView({\n    behavior: 'smooth',\n    block: 'start',\n  });\n};\n\nconst toggleMenu = () => {\n  isMenuOpen.value = !isMenuOpen.value;\n};\n\nconst closeMenu = () => {\n  isMenuOpen.value = false;\n};\n\nconst openDemoRequestModal = async () => {\n  closeMenu();\n  await openModal(EModalNames.demoRequestModal);\n};\n\nconst goToHome = () => {\n  closeMenu();\n  router.push({\n    name: ERouteNames.home,\n  });\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n  const target = event.target as HTMLElement | null;\n  if (!target?.closest('.nd-header')) {\n    closeMenu();\n  }\n};\n\nwatch(isTablet, (value) => {\n  if (!value) {\n    closeMenu();\n  }\n});\n\nonMounted(() => {\n  document.addEventListener('click', onDocumentClick);\n});\n\nonBeforeUnmount(() => {\n  document.removeEventListener('click', onDocumentClick);\n});\n\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_InlineSvg = _resolveComponent(\"InlineSvg\")!\n  const _component_router_view = _resolveComponent(\"router-view\")!\n  const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n  return (_openBlock(), _createElementBlock(\"section\", {\n    class: _normalizeClass([\n      'nd-layout',\n      { 'nd-layout--with-border': _unref(anyModalOpen) },\n      { 'nd-layout--mobile': _unref(isMobile) },\n      { 'nd-layout--menu-open': isMenuOpen.value },\n    ]\n    )\n  }, [\n    _createElementVNode(\"div\", _hoisted_1, [\n      _createElementVNode(\"div\", _hoisted_2, [\n        _createElementVNode(\"button\", {\n          class: \"burger-menu\",\n          type: \"button\",\n          \"aria-label\": \"Меню\",\n          \"aria-expanded\": isMenuOpen.value,\n          onClick: _withModifiers(toggleMenu, [\"stop\"])\n        }, [\n          _createElementVNode(\"span\", {\n            class: _normalizeClass({ 'line-transform': isMenuOpen.value })\n          }, null, 2),\n          _createElementVNode(\"span\", {\n            class: _normalizeClass({ 'line-transform-middle': isMenuOpen.value })\n          }, null, 2),\n          _createElementVNode(\"span\", {\n            class: _normalizeClass({ 'line-transform-reverse': isMenuOpen.value })\n          }, null, 2)\n        ], 8, _hoisted_3),\n        _createElementVNode(\"nav\", _hoisted_4, [\n          _createElementVNode(\"ul\", _hoisted_5, [\n            _createElementVNode(\"li\", _hoisted_6, [\n              _createElementVNode(\"a\", {\n                href: \"#\",\n                onClick: _cache[0] || (_cache[0] = _withModifiers(($event: any) => (scrollToSection('product')), [\"prevent\"]))\n              }, \"Продукт\")\n            ]),\n            _createElementVNode(\"li\", _hoisted_7, [\n              _createElementVNode(\"a\", {\n                href: \"#\",\n                onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (scrollToSection('pricing')), [\"prevent\"]))\n              }, \"Тарифи\")\n            ]),\n            _createElementVNode(\"li\", _hoisted_8, [\n              _createElementVNode(\"a\", {\n                href: \"#\",\n                onClick: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (scrollToSection('integration')), [\"prevent\"]))\n              }, \"Інтеграція\")\n            ])\n          ])\n        ]),\n        _createElementVNode(\"img\", {\n          class: \"nd-nav__logo nd-nav__logo--mobile\",\n          src: require('@/assets/images/new-logo.svg'),\n          alt: \"Logo\"\n        }, null, 8, _hoisted_9)\n      ]),\n      _createElementVNode(\"div\", _hoisted_10, [\n        _createElementVNode(\"img\", {\n          src: require('@/assets/images/new-logo.svg'),\n          alt: \"Logo\",\n          class: \"nd-nav__logo nd-nav__logo--desktop\"\n        }, null, 8, _hoisted_11)\n      ]),\n      _createElementVNode(\"div\", _hoisted_12, [\n        _createVNode(_unref(NdButton), {\n          type: _unref(ENdButtonTypes).borderred,\n          text: \"Замовити демонстрацію\",\n          class: \"nav_button nav_button--demo\",\n          onClick: openDemoRequestModal\n        }, null, 8, [\"type\"]),\n        _createVNode(_unref(NdButton), {\n          type: _unref(ENdButtonTypes).maximumred,\n          text: \"Почати безкоштовно\",\n          class: \"nav_button nav_button--start\",\n          onClick: _cache[3] || (_cache[3] = ($event: any) => (goToHome()))\n        }, null, 8, [\"type\"]),\n        _withDirectives((_openBlock(), _createElementBlock(\"button\", {\n          class: \"nav-container__button\",\n          onClick: _cache[4] || (_cache[4] = ($event: any) => (goToHome()))\n        }, [\n          _createVNode(_component_InlineSvg, {\n            class: \"nav-container__icon\",\n            src: require('@/assets/icons/IconLogIn.svg')\n          }, null, 8, [\"src\"])\n        ])), [\n          [_directive_tooltip, { theme: 'nd-tooltip', content: 'Увійти'}]\n        ])\n      ]),\n      _createVNode(_Transition, { name: \"fade\" }, {\n        default: _withCtx(() => [\n          (isMenuOpen.value)\n            ? (_openBlock(), _createElementBlock(\"div\", {\n                key: 0,\n                class: \"mobile-menu\",\n                onClick: _cache[8] || (_cache[8] = _withModifiers(() => {}, [\"stop\"]))\n              }, [\n                _createElementVNode(\"nav\", _hoisted_13, [\n                  _createElementVNode(\"a\", {\n                    href: \"#\",\n                    class: \"mobile-menu__link\",\n                    onClick: _cache[5] || (_cache[5] = _withModifiers(($event: any) => (scrollToSection('product')), [\"prevent\"]))\n                  }, \"Продукт\"),\n                  _createElementVNode(\"a\", {\n                    href: \"#\",\n                    class: \"mobile-menu__link\",\n                    onClick: _cache[6] || (_cache[6] = _withModifiers(($event: any) => (scrollToSection('pricing')), [\"prevent\"]))\n                  }, \"Тарифи\"),\n                  _createElementVNode(\"a\", {\n                    href: \"#\",\n                    class: \"mobile-menu__link\",\n                    onClick: _cache[7] || (_cache[7] = _withModifiers(($event: any) => (scrollToSection('integration')), [\"prevent\"]))\n                  }, \"Інтеграція\"),\n                  _createElementVNode(\"a\", {\n                    href: \"#\",\n                    class: \"mobile-menu__link\",\n                    onClick: _withModifiers(openDemoRequestModal, [\"prevent\"])\n                  }, \"Замовити демонстрацію\")\n                ])\n              ]))\n            : _createCommentVNode(\"\", true)\n        ]),\n        _: 1\n      })\n    ]),\n    (isMenuOpen.value)\n      ? (_openBlock(), _createElementBlock(\"div\", {\n          key: 0,\n          class: \"menu-overlay\",\n          onClick: closeMenu\n        }))\n      : _createCommentVNode(\"\", true),\n    _createVNode(_component_router_view),\n    _createVNode(ToastNotifications),\n    _createVNode(DemoRequestModal),\n    _cache[9] || (_cache[9] = _createElementVNode(\"div\", {\n      id: \"modals\",\n      class: \"modals\"\n    }, null, -1))\n  ], 2))\n}\n}\n\n})","<script setup lang=\"ts\">\nimport {\n  ref,\n  watch,\n  onMounted,\n  onBeforeUnmount,\n} from 'vue';\nimport { useGetBreakpoints } from '@/lib/core/composables';\nimport { storeToRefs } from 'pinia';\nimport { useUiModule, EModalNames } from '@/modules/store/ui';\nimport { NdButton, ENdButtonTypes } from '@/components/v2/ui';\nimport DemoRequestModal from '@/components/v2/common/layout/components/DemoRequestModal.vue';\nimport ToastNotifications from '@/components/v2/common/ToastNotifications.vue';\nimport { useRouter } from 'vue-router';\nimport { ERouteNames } from '@/modules/router/ERouteNames';\n\nconst router = useRouter();\nconst { isMobile, isTablet } = useGetBreakpoints();\nconst { anyModalOpen } = storeToRefs(useUiModule());\nconst { openModal } = useUiModule();\nconst isMenuOpen = ref(false);\n\nconst scrollToSection = (id: string) => {\n  const element = document.getElementById(id);\n  if (!element) return;\n  isMenuOpen.value = false;\n  element.scrollIntoView({\n    behavior: 'smooth',\n    block: 'start',\n  });\n};\n\nconst toggleMenu = () => {\n  isMenuOpen.value = !isMenuOpen.value;\n};\n\nconst closeMenu = () => {\n  isMenuOpen.value = false;\n};\n\nconst openDemoRequestModal = async () => {\n  closeMenu();\n  await openModal(EModalNames.demoRequestModal);\n};\n\nconst goToHome = () => {\n  closeMenu();\n  router.push({\n    name: ERouteNames.home,\n  });\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n  const target = event.target as HTMLElement | null;\n  if (!target?.closest('.nd-header')) {\n    closeMenu();\n  }\n};\n\nwatch(isTablet, (value) => {\n  if (!value) {\n    closeMenu();\n  }\n});\n\nonMounted(() => {\n  document.addEventListener('click', onDocumentClick);\n});\n\nonBeforeUnmount(() => {\n  document.removeEventListener('click', onDocumentClick);\n});\n\n</script>\n\n<template>\n  <section\n    :class=\"[\n      'nd-layout',\n      { 'nd-layout--with-border': anyModalOpen },\n      { 'nd-layout--mobile': isMobile },\n      { 'nd-layout--menu-open': isMenuOpen },\n    ]\n    \">\n    <div class=\"nd-header\">\n      <div class=\"left-side-block\">\n        <button\n          class=\"burger-menu\"\n          type=\"button\"\n          aria-label=\"Меню\"\n          :aria-expanded=\"isMenuOpen\"\n          @click.stop=\"toggleMenu\"\n        >\n          <span :class=\"{ 'line-transform': isMenuOpen }\"></span>\n          <span :class=\"{ 'line-transform-middle': isMenuOpen }\"></span>\n          <span :class=\"{ 'line-transform-reverse': isMenuOpen }\"></span>\n        </button>\n\n        <nav class=\"desktop-nav\">\n          <ul class=\"nav-link-block\">\n            <li class=\"link-item\">\n              <a href=\"#\" @click.prevent=\"scrollToSection('product')\">Продукт</a>\n            </li>\n            <li class=\"link-item\">\n              <a href=\"#\" @click.prevent=\"scrollToSection('pricing')\">Тарифи</a>\n            </li>\n            <li class=\"link-item\">\n              <a href=\"#\" @click.prevent=\"scrollToSection('integration')\">Інтеграція</a>\n            </li>\n          </ul>\n        </nav>\n\n        <img\n          class=\"nd-nav__logo nd-nav__logo--mobile\"\n          :src=\"require('@/assets/images/new-logo.svg')\"\n          alt=\"Logo\"\n        />\n      </div>\n      <div class=\"middle-side-block\">\n        <img\n          :src=\"require('@/assets/images/new-logo.svg')\"\n          alt=\"Logo\"\n          class=\"nd-nav__logo nd-nav__logo--desktop\"\n        />\n      </div>\n      <div class=\"right-side-block\">\n        <NdButton :type=\"ENdButtonTypes.borderred\" text=\"Замовити демонстрацію\" class=\"nav_button nav_button--demo\" @click=\"openDemoRequestModal\"/>\n        <NdButton :type=\"ENdButtonTypes.maximumred\" text=\"Почати безкоштовно\" class=\"nav_button nav_button--start\" @click=\"goToHome()\"/>\n        <button\n          class=\"nav-container__button\"\n          v-tooltip=\"{ theme: 'nd-tooltip', content: 'Увійти'}\"\n          @click=\"goToHome()\"\n        >\n          <InlineSvg\n            class=\"nav-container__icon\"\n            :src=\"require('@/assets/icons/IconLogIn.svg')\"/>\n        </button>\n      </div>\n\n      <Transition name=\"fade\">\n        <div v-if=\"isMenuOpen\" class=\"mobile-menu\" @click.stop>\n          <nav class=\"mobile-menu__nav\" aria-label=\"Mobile menu\">\n            <a href=\"#\" class=\"mobile-menu__link\" @click.prevent=\"scrollToSection('product')\">Продукт</a>\n            <a href=\"#\" class=\"mobile-menu__link\" @click.prevent=\"scrollToSection('pricing')\">Тарифи</a>\n            <a href=\"#\" class=\"mobile-menu__link\" @click.prevent=\"scrollToSection('integration')\">Інтеграція</a>\n            <a href=\"#\" class=\"mobile-menu__link\" @click.prevent=\"openDemoRequestModal\">Замовити демонстрацію</a>\n          </nav>\n        </div>\n      </Transition>\n    </div>\n\n    <div\n      v-if=\"isMenuOpen\"\n      class=\"menu-overlay\"\n      @click=\"closeMenu\"\n    />\n\n    <router-view/>\n    <ToastNotifications/>\n    <DemoRequestModal/>\n    <div id=\"modals\" class=\"modals\"/>\n  </section>\n</template>\n\n<style scoped lang=\"scss\">\n.nd-layout {\n  position: relative;\n  overflow: hidden;\n  background-color: $light_000;\n  @include size(100vw, 100svh);\n  display: grid;\n  grid-template-columns: 1fr;\n  grid-template-rows: auto 1fr;\n  &--mobile {\n    :deep(.loader) {\n      height: calc(100svh - 124px);\n      @include position(fixed, 60px);\n    }\n  }\n}\n\n.nd-header {\n  position: relative;\n  z-index: 20;\n  @include size(100vw, $header-height);\n  min-height: 5rem;\n  @include flex(row, space-between, center);\n  border-bottom: 1px solid $light_200;\n  user-select: none;\n  background-color: $light_000;\n  &--hover {\n    &:deep(.nd-breadcrumbs) {\n      position: relative;\n    }\n  }\n}\n\n.burger-menu {\n  display: none;\n  flex-direction: column;\n  justify-content: space-between;\n  width: 1.45rem;\n  height: 1rem;\n  padding: 0;\n  border: 0;\n  background: transparent;\n  cursor: pointer;\n\n  span {\n    display: block;\n    height: 2px;\n    background-color: $light_500;\n    transition: all 0.3s ease-in-out;\n  }\n}\n\n.line-transform {\n  transform: translateY(5px) rotate(45deg);\n}\n\n.line-transform-middle {\n  opacity: 0;\n}\n\n.line-transform-reverse {\n  transform: translateY(-5px) rotate(-45deg);\n}\n\n.left-side-block {\n  @include flex(row, start, center);\n  margin-left: 2.375rem;\n  width: 34%;\n  gap: 1rem;\n\n  .nav-link-block{\n    @include flex(row, start, center);\n    .link-item {\n      margin-right: 1.5rem;\n      @include typography('inter-14');\n      font-weight: 500;\n      color: $light_500;\n\n      a {\n        color: inherit;\n        text-decoration: none;\n\n        &:hover {\n          color: $maximum_red;\n        }\n      }\n    }\n  }\n\n  .nd-nav__logo--mobile {\n    display: none;\n    width: 7.5rem;\n    height: 1rem;\n  }\n}\n\n.middle-side-block {\n  width: auto;\n\n  .nd-nav__logo {\n    width: 8.75rem;\n    height: 1.125rem;\n  }\n}\n\n.right-side-block {\n  @include flex(row, end, center);\n  margin-right: 1.75rem;\n  height: $header-height;\n  width: 35%;\n\n  .nav_button {\n    height: 2.9375rem;\n    margin-right: 1.5rem;\n    @include typography('inter-semibold-18');\n\n    &--demo {\n      width: 16.5rem;\n    }\n\n    &--start {\n      width: 14.3125rem;\n    }\n  }\n}\n\n.nav-container__button {\n  .nav-container__icon {\n    color: $light_500;\n    &:hover {\n      color: $maximum_red;\n    }\n  }\n}\n\n.mobile-menu {\n  display: none;\n}\n\n.menu-overlay {\n  display: none;\n}\n\n.fade-enter-active,\n.fade-leave-active {\n  transition: opacity 0.2s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n  opacity: 0;\n}\n\n@media (max-width: $breakpoint_desktop) {\n  .left-side-block {\n    width: auto;\n    margin-left: 1.5rem;\n\n    .link-item {\n      margin-right: 1rem;\n    }\n  }\n\n  .right-side-block {\n    width: auto;\n    margin-right: 1rem;\n\n    .nav_button {\n      margin-right: 0.75rem;\n      @include typography('inter-semibold-14');\n\n      &--demo {\n        width: 13rem;\n      }\n\n      &--start {\n        width: 12rem;\n      }\n    }\n  }\n}\n\n@media (max-width: $breakpoint_laptop) {\n  .burger-menu {\n    display: flex;\n  }\n\n  .left-side-block {\n    .desktop-nav {\n      display: none;\n    }\n\n    .nd-nav__logo--mobile {\n      display: block;\n    }\n  }\n\n  .middle-side-block {\n    display: none;\n  }\n\n  .right-side-block {\n    .nav_button--demo {\n      display: none;\n    }\n\n    .nav_button--start {\n      width: 11rem;\n      height: 2.5rem;\n      margin-right: 0.75rem;\n    }\n  }\n\n  .mobile-menu {\n    display: block;\n    position: absolute;\n    top: 100%;\n    left: 0;\n    right: 0;\n    z-index: 30;\n    padding: 0.75rem 1.5rem 1.25rem;\n    background: $light_000;\n    border-bottom: 1px solid $light_200;\n    box-shadow: 0 0.75rem 1.25rem rgba(15, 23, 42, 0.08);\n  }\n\n  .mobile-menu__nav {\n    @include flex(column, flex-start, stretch);\n    gap: 0.25rem;\n  }\n\n  .mobile-menu__link {\n    @include typography('inter-16');\n    font-weight: 500;\n    color: $light_900;\n    text-decoration: none;\n    padding: 0.875rem 0.5rem;\n    border-radius: 0.5rem;\n\n    &:hover {\n      color: $maximum_red;\n      background: $light_050;\n    }\n  }\n\n  .menu-overlay {\n    display: block;\n    position: fixed;\n    inset: 0;\n    top: 5rem;\n    z-index: 15;\n    background: rgba(15, 23, 42, 0.24);\n  }\n}\n\n@media (max-width: $breakpoint_mobile) {\n  .left-side-block {\n    margin-left: 1rem;\n\n    .nd-nav__logo--mobile {\n      width: 6.5rem;\n    }\n  }\n\n  .right-side-block {\n    margin-right: 0.75rem;\n\n    .nav_button--start {\n      width: auto;\n      min-width: 8.5rem;\n      padding: 0 0.75rem;\n      height: 2.25rem;\n      font-size: 0.75rem;\n    }\n  }\n\n  .mobile-menu {\n    padding: 0.5rem 1rem 1rem;\n  }\n}\n\n</style>\n\n<style lang=\"scss\">\n/* Badge is hidden per Google guidelines — branding notice is shown in the demo form */\n.grecaptcha-badge {\n  visibility: hidden !important;\n}\n</style>\n","import script from \"./Home.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Home.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Home.vue?vue&type=style&index=0&id=57138914&scoped=true&lang=scss\"\nimport \"./Home.vue?vue&type=style&index=1&id=57138914&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-57138914\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"survey-form ND-modal__body\" }\nconst _hoisted_2 = { class: \"survey-form__heading\" }\nconst _hoisted_3 = { class: \"survey-form__body\" }\nconst _hoisted_4 = { class: \"survey-form-main__footer\" }\nconst _hoisted_5 = { class: \"survey-form__heading\" }\nconst _hoisted_6 = { class: \"survey-form__body\" }\nconst _hoisted_7 = { class: \"survey-form-reminder__footer\" }\n\nimport {\n  onBeforeMount, ref, watch,\n} from 'vue';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { useSurveyActions } from '@/components/v2/common/survey/useSurveyActions';\nimport { useSurveysModule } from '@/modules/store/surveys';\nimport { storeToRefs } from 'pinia';\n\ninterface ISurveyFormProps {\n  step: number;\n}\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'SurveyForm',\n  props: {\n    step: {}\n  },\n  setup(__props: any) {\n\nconst {\n  confirmSurvey, setSurveyDelayTime, setLastSurveyId, saveRelativeUrlToLocalStorage,\n} = useSurveyActions();\nconst surveysModule = useSurveysModule();\nconst { currentSurvey } = storeToRefs(surveysModule);\nconst props = __props;\n\nconst {\n  closeModal,\n} = useUiModule();\n\nconst tab = ref('');\n\nconst openLink = (linkValue: any): void => {\n  window.location.href = linkValue;\n};\n\nconst takeSurvey = async () => {\n  // need to write surveyId into the user properties\n  setSurveyDelayTime();\n  setLastSurveyId(Number(currentSurvey.value?.id));\n  saveRelativeUrlToLocalStorage();\n\n  openLink(currentSurvey.value?.googleFormId);\n\n  await closeModal(EModalNames.surveyModal);\n};\n\nconst showRemindLaterTab = async () => {\n  setSurveyDelayTime();\n  setLastSurveyId(Number(currentSurvey.value?.id));\n\n  await closeModal(EModalNames.surveyModal);\n};\n\nconst doNotDisturb = async () => {\n  const surveyId = Number(currentSurvey.value?.id);\n  if (surveyId) {\n    await confirmSurvey(surveyId, false);\n  }\n  setSurveyDelayTime();\n  await closeModal(EModalNames.surveyModal);\n};\n\nconst remindLater = async () => {\n  setSurveyDelayTime();\n  await closeModal(EModalNames.surveyModal);\n};\n\nwatch(() => props.step, (value) => {\n  if (value === 2) {\n    tab.value = 'surveyReminder';\n  }\n  if (value === 0) {\n    setSurveyDelayTime();\n    setLastSurveyId(Number(currentSurvey.value?.id));\n  }\n});\n\nonBeforeMount(() => {\n  tab.value = 'surveyMain';\n});\n\nreturn (_ctx: any,_cache: any) => {\n  const _component_q_btn = _resolveComponent(\"q-btn\")!\n  const _component_q_tab_panel = _resolveComponent(\"q-tab-panel\")!\n  const _component_q_tab_panels = _resolveComponent(\"q-tab-panels\")!\n\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createVNode(_component_q_tab_panels, {\n      modelValue: tab.value,\n      \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((tab).value = $event)),\n      class: \"control-panel__panels\"\n    }, {\n      default: _withCtx(() => [\n        (_openBlock(), _createBlock(_component_q_tab_panel, {\n          class: \"survey-form-main\",\n          name: \"surveyMain\",\n          key: tab.value,\n          style: {\"overflow\":\"hidden\"}\n        }, {\n          default: _withCtx(() => [\n            _createElementVNode(\"div\", _hoisted_2, _toDisplayString(_ctx.$t('components.common.survey.SurveyModal.surveyMain.title')), 1),\n            _createElementVNode(\"div\", _hoisted_3, _toDisplayString(_unref(currentSurvey).surveyText), 1),\n            _createElementVNode(\"div\", _hoisted_4, [\n              _createVNode(_component_q_btn, {\n                unelevated: \"\",\n                \"no-caps\": \"\",\n                align: \"center\",\n                label: _ctx.$t('components.common.survey.SurveyModal.surveyMain.takeSurveyBtn'),\n                onClick: takeSurvey,\n                class: \"takeSurvey-button\"\n              }, null, 8, [\"label\"]),\n              _createVNode(_component_q_btn, {\n                unelevated: \"\",\n                \"no-caps\": \"\",\n                align: \"center\",\n                label: _ctx.$t('components.common.survey.SurveyModal.surveyMain.showRemindLaterBtn'),\n                onClick: showRemindLaterTab,\n                class: \"showRemindLater-button\"\n              }, null, 8, [\"label\"])\n            ])\n          ]),\n          _: 1\n        })),\n        (_openBlock(), _createBlock(_component_q_tab_panel, {\n          class: \"survey-form-reminder\",\n          name: \"surveyReminder\",\n          key: tab.value,\n          style: {\"overflow\":\"hidden\"}\n        }, {\n          default: _withCtx(() => [\n            _createElementVNode(\"div\", _hoisted_5, _toDisplayString(_ctx.$t('components.common.survey.SurveyModal.surveyReminder.title')), 1),\n            _createElementVNode(\"div\", _hoisted_6, _toDisplayString(_unref(currentSurvey).surveyText), 1),\n            _createElementVNode(\"div\", _hoisted_7, [\n              _createVNode(_component_q_btn, {\n                unelevated: \"\",\n                \"no-caps\": \"\",\n                align: \"center\",\n                label: _ctx.$t('components.common.survey.SurveyModal.surveyReminder.doNotDisturbBtn'),\n                onClick: doNotDisturb,\n                class: \"doNotDisturb-button\"\n              }, null, 8, [\"label\"]),\n              _createVNode(_component_q_btn, {\n                unelevated: \"\",\n                \"no-caps\": \"\",\n                align: \"center\",\n                label: _ctx.$t('components.common.survey.SurveyModal.surveyReminder.remindLaterBtn'),\n                onClick: remindLater,\n                class: \"remindLater-button\"\n              }, null, 8, [\"label\"])\n            ])\n          ]),\n          _: 1\n        }))\n      ]),\n      _: 1\n    }, 8, [\"modelValue\"])\n  ]))\n}\n}\n\n})","<template>\n  <div class=\"survey-form ND-modal__body\">\n    <q-tab-panels v-model=\"tab\" class=\"control-panel__panels\">\n      <q-tab-panel class=\"survey-form-main\" name=\"surveyMain\" :key=\"tab\" style=\"overflow: hidden\">\n        <div class=\"survey-form__heading\">\n          {{ $t('components.common.survey.SurveyModal.surveyMain.title') }}\n        </div>\n        <div class=\"survey-form__body\">\n          {{ currentSurvey.surveyText }}\n        </div>\n        <div class=\"survey-form-main__footer\">\n          <q-btn\n            unelevated\n            no-caps\n            align=\"center\"\n            :label=\"$t('components.common.survey.SurveyModal.surveyMain.takeSurveyBtn')\"\n            @click=\"takeSurvey\"\n            class=\"takeSurvey-button\"\n          >\n          </q-btn>\n          <q-btn\n            unelevated\n            no-caps\n            align=\"center\"\n            :label=\"$t('components.common.survey.SurveyModal.surveyMain.showRemindLaterBtn')\"\n            @click=\"showRemindLaterTab\"\n            class=\"showRemindLater-button\"\n          >\n          </q-btn>\n        </div>\n      </q-tab-panel>\n      <q-tab-panel class=\"survey-form-reminder\" name=\"surveyReminder\" :key=\"tab\" style=\"overflow: hidden\">\n        <div class=\"survey-form__heading\">\n          {{ $t('components.common.survey.SurveyModal.surveyReminder.title') }}\n        </div>\n        <div class=\"survey-form__body\">\n          {{ currentSurvey.surveyText }}\n        </div>\n        <div class=\"survey-form-reminder__footer\">\n          <q-btn\n            unelevated\n            no-caps\n            align=\"center\"\n            :label=\"$t('components.common.survey.SurveyModal.surveyReminder.doNotDisturbBtn')\"\n            @click=\"doNotDisturb\"\n            class=\"doNotDisturb-button\"\n          >\n          </q-btn>\n          <q-btn\n            unelevated\n            no-caps\n            align=\"center\"\n            :label=\"$t('components.common.survey.SurveyModal.surveyReminder.remindLaterBtn')\"\n            @click=\"remindLater\"\n            class=\"remindLater-button\"\n          >\n          </q-btn>\n        </div>\n      </q-tab-panel>\n    </q-tab-panels>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  onBeforeMount, ref, defineProps, watch,\n} from 'vue';\nimport { EModalNames, useUiModule } from '@/modules/store/ui';\nimport { useSurveyActions } from '@/components/v2/common/survey/useSurveyActions';\nimport { useSurveysModule } from '@/modules/store/surveys';\nimport { storeToRefs } from 'pinia';\n\ninterface ISurveyFormProps {\n  step: number;\n}\n\nconst {\n  confirmSurvey, setSurveyDelayTime, setLastSurveyId, saveRelativeUrlToLocalStorage,\n} = useSurveyActions();\nconst surveysModule = useSurveysModule();\nconst { currentSurvey } = storeToRefs(surveysModule);\nconst props = defineProps<ISurveyFormProps>();\n\nconst {\n  closeModal,\n} = useUiModule();\n\nconst tab = ref('');\n\nconst openLink = (linkValue: any): void => {\n  window.location.href = linkValue;\n};\n\nconst takeSurvey = async () => {\n  // need to write surveyId into the user properties\n  setSurveyDelayTime();\n  setLastSurveyId(Number(currentSurvey.value?.id));\n  saveRelativeUrlToLocalStorage();\n\n  openLink(currentSurvey.value?.googleFormId);\n\n  await closeModal(EModalNames.surveyModal);\n};\n\nconst showRemindLaterTab = async () => {\n  setSurveyDelayTime();\n  setLastSurveyId(Number(currentSurvey.value?.id));\n\n  await closeModal(EModalNames.surveyModal);\n};\n\nconst doNotDisturb = async () => {\n  const surveyId = Number(currentSurvey.value?.id);\n  if (surveyId) {\n    await confirmSurvey(surveyId, false);\n  }\n  setSurveyDelayTime();\n  await closeModal(EModalNames.surveyModal);\n};\n\nconst remindLater = async () => {\n  setSurveyDelayTime();\n  await closeModal(EModalNames.surveyModal);\n};\n\nwatch(() => props.step, (value) => {\n  if (value === 2) {\n    tab.value = 'surveyReminder';\n  }\n  if (value === 0) {\n    setSurveyDelayTime();\n    setLastSurveyId(Number(currentSurvey.value?.id));\n  }\n});\n\nonBeforeMount(() => {\n  tab.value = 'surveyMain';\n});\n</script>\n\n<style scoped lang=\"scss\">\n@import 'surveyFormStyle';\n</style>\n","import script from \"./SurveyForm.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SurveyForm.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SurveyForm.vue?vue&type=style&index=0&id=364e9001&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-364e9001\"]])\n\nexport default __exports__\nimport QTabPanels from 'quasar/src/components/tab-panels/QTabPanels.js';\nimport QTabPanel from 'quasar/src/components/tab-panels/QTabPanel.js';\nimport QBtn from 'quasar/src/components/btn/QBtn.js';\nimport qInstall from \"../../../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(script, 'components', {QTabPanels,QTabPanel,QBtn});\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport { ref } from 'vue';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EModalNames } from '@/modules/store/ui';\nimport SurveyForm from './SurveyForm.vue';\n\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'SurveyModal',\n  setup(__props) {\n\nconst step = ref(1);\nconst customEvent = ref(true);\n\nconst nextStep = () => {\n  step.value += 1;\n  customEvent.value = false;\n};\nconst close = () => {\n  step.value = 0;\n};\n\nreturn (_ctx: any,_cache: any) => {\n  return (_openBlock(), _createBlock(ModalWrapper, {\n    title: '',\n    \"modal-name\": _unref(EModalNames).surveyModal,\n    height: '25rem',\n    width: '30rem',\n    \"custom-close-event\": customEvent.value,\n    onCustomClose: nextStep,\n    onClose: close\n  }, {\n    default: _withCtx(() => [\n      _createVNode(SurveyForm, { step: step.value }, null, 8, [\"step\"])\n    ]),\n    _: 1\n  }, 8, [\"modal-name\", \"custom-close-event\"]))\n}\n}\n\n})","<template>\n  <ModalWrapper\n    :title=\"''\"\n    :modal-name=\"EModalNames.surveyModal\"\n    :height=\"'25rem'\"\n    :width=\"'30rem'\"\n    :custom-close-event=\"customEvent\"\n    @custom-close=\"nextStep\"\n    @close=\"close\"\n  >\n    <SurveyForm :step=\"step\" />\n  </ModalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport ModalWrapper from '@/components/v2/ui/Modal/ModalWrapper.vue';\nimport { EModalNames } from '@/modules/store/ui';\nimport SurveyForm from './SurveyForm.vue';\n\nconst step = ref(1);\nconst customEvent = ref(true);\n\nconst nextStep = () => {\n  step.value += 1;\n  customEvent.value = false;\n};\nconst close = () => {\n  step.value = 0;\n};\n</script>\n<style scoped lang=\"scss\">\n</style>\n","import script from \"./SurveyModal.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SurveyModal.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"names":["EReadEdsDialogActions","useSurveyActions","openModal","closeModal","useUiModule","lastSurveyId","profile","storeToRefs","useUserModule","router","useRouter","route","useRoute","surveysModule","useSurveysModule","currentSurvey","showSurvey","setSurveyDelayTime","delayInMinutes","delayInDays","storageKeyName","localStorage","setItem","DateFormatter","getFutureDateFromToday","setLastSurveyId","surveyId","value","needToGetSurveys","surveyDelayTime","getItem","currentTime","Date","delayTime","getTimeDifference","getTime","showSurveyModal","async","loginReminder","ELoginReminderType","firstLogin","surveysExist","result","getUserSurveys","surveyArr","data","map","s","Survey","survey","EModalNames","surveyModal","saveRelativeUrlToLocalStorage","relativePath","path","navigateToSavedUrl","savedUrl","push","then","removeItem","catch","err","console","error","log","confirmSurvey","id","finished","status","linkSurvey","EApiResponseStatus","SUCCESS","_hoisted_1","class","_hoisted_2","GryadaSignModalvue_type_script_setup_true_lang_ts","_defineComponent","__name","props","uid","type","String","default","emits","setup","__props","emit","__emit","t","useI18n","useLabelsModule","contractorsModule","useContractorsModule","documentsModule","useDocumentsModule","signContractorId","useSignContractorId","currentDocument","selectedAttachmentId","loading","ref","companyAddRoutes","ERouteNames","myContractors","documents","home","confirmDialogConfig","bulkActionsDialogConfig","signatureNovaForm","reactive","login","password","validationRules","computed","required","dist","mw","minLength","encryptValue","publicKey","forge","pki","publicKeyFromPem","publicKeyPem","trim","encryptedBytes","encrypt","encryptedBase64","util","encode64","v$","useVuelidate","isDisabledConfirmButton","close","signatureNovaKeyModal","closeAllModal","readEDSModal","list","openPersonConfirmationModal","personConfirmationModal","showErrorMessage","text","emitter","EEmitterEventNames","Error","showSuccessMessage","success","checkValidation","isValid","$validate","loginErrors","$errors","length","$validator","passwordErrors","signAttachment","keystoreList","signatureTaxNumber","useEDSModule","signature","contractorId","attachmentId","signMethod","documentId","gryadaAttachmentSign","signDocument","includes","name","responseStatus","gryadaSignDefaultFile","EContractorsOperationsStatus","UNKNOWN_ERROR","docsToSign","key_type","keyType","tax_number","taxNumber","gryadaIdentifyKey","doc","attachSignatures","attachmentsToSign","filter","attach_object_id","gryadaDocumentSign","watch","onBeforeUnmount","_ctx","_cache","_component_InlineSvg","_resolveComponent","_directive_tooltip","_resolveDirective","_openBlock","_createBlock","ModalWrapper","title","_unref","onAfterLeave","onCustomClose","_withCtx","_createElementVNode","_createVNode","NdInputText","modelValue","$event","EInputTypes","validator","label","NdInputPassword","onClick","_withDirectives","_createElementBlock","src","require","theme","content","NdButton","ENdButtonTypes","primary","disabled","_","__exports__","exportHelper","A","GryadaSignModal","GryadaFogrotPasswordModalvue_type_script_setup_true_lang_ts","activeContractor","phoneMask","forgotPasswordForm","phoneNumber","sendOTP","res","gryadaCreateOTPSignSession","replace","personOtpConfirmationModal","newVal","immediate","style","mask","tel","GryadaFogrotPasswordModal_exports_","GryadaFogrotPasswordModal","_hoisted_3","key","_hoisted_4","GryadaOtpModalvue_type_script_setup_true_lang_ts","isLoadingSign","Boolean","timer","isLoadingSendOTP","checkOTPRun","isRunChange","form","otpField","timerOTP","minutes","seconds","friendlyMinutes","friendlySeconds","isRun","defaultTimerOTP","min","sec","startTimer","stopTimer","setInterval","clearTimeout","setDefaultTimerOTP","toString","onBeforeMount","ERROR","buttonText","mountTimer","encryptedLogin","encryptedPassword","toUpperCase","onAfterEnter","NdInputOtp","maxlength","placeholder","gray200","_toDisplayString","_createCommentVNode","GryadaOtpModal_exports_","GryadaOtpModal","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","width","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","ReadEDSFormvue_type_script_setup_true_lang_ts","userModule","contractorModule","createLinkContractorCloudDigitalSign","subscribeToContractorWS","unSubscribeToContractorWS","getMyContractors","existingContractor","useTutorialModule","createDocumentDigitalSign","subscribeToDocumentWS","unSubscribeToDocumentWS","getDocument","updateDocuments","tokenKeyMedia","saveEds","edsModule","resetSignature","resetStamp","resetKSPData","signatureCompanyName","stampTaxNumber","stampCompanyName","keyTypeDevice","tokenData","kspData","kspConfirmEvent","isMobile","useGetBreakpoints","authModule","useAuthModule","isGryadaHiddenByQuery","readEdsDialogConfig","setModalWrapperEvent","beforeCloseModalOperation","tabs","kspUiOpen","loadKsp","kspServers","selectedKsp","kspOptions","server","tokenKey","edsTokenInterval","gryadaUid","options","resultInit","supported","isWebExtensionSupported","isWebExtensionInstalled","helpURL","webExtensionInstallURL","signatureDescription","loadedSignature","canBeUsed","file","stampDescription","stamp","activeTab","signatureUi","stampUi","ESignatureType","signaturePassword","stampPassword","minSignaturePasswordLength","minStampPasswordLength","timeOutId","isQrcodeActive","qrCodeMode","loadEds","edsInitResult","addFileToKeystoreList","fileList","supportedFileTypesArray","supportedEDSFileTypes","split","str","substring","i","FileList","item","extension","pop","toLowerCase","files","open","reset","useFileDialog","multiple","accept","openNewFile","$keyType","openSignatureUi","openStampUi","handleSetLogin","handleSetPhoneNumber","isShowRefreshButton","isCorrectTab","isWebExtMissing","submitButtonIsEnabled","signatureIsValid","$invalid","stampIsValid","kspRequiresUserId","userId","isLoading","qrUrlValue","openDiiaApp","window","location","generateQRCodeForAddingDiiaContractor","some","showTabsHeader","EWSEventNamesDocuments","diiaSign","requestId","on","message","JSON","parse","wsMessage","EContractorActions","add","off","otpTimerFunctions","getUserProfile","setDefaultTimerValues","url","startDiiaQrForDocumentsBulk","documentIds","attachmentIds","flatMap","contractor_id","handler","startDiiaQrForDocument","startDiiaQrForAttachment","startDiiaQrFlow","allDocuments","document","generateQRCodeForDiiaSign","EDocumentActions","sign","updateDocument","checkCertEndDate","certEndTimeStr","certEndTime","certEndDate","currentDate","warningDate","setDate","getDate","formatedCertEndDate","toHumanReadable","info","generateQR","dialogAction","contractorAdding","openKspUi","prepareForKSPSigning","ensureKSPInitialized","resetKspUi","resetOperationKSP","setKSPConfirmCallback","Promise","resolve","__webpack_require__","bind","submit","canApplySignature","canApplyStamp","kspName","find","el","readSignatureFromKeystore","isStamp","isEdsError","code","$e","canProceed","fileBase64","FileConverter","toBase64","setTimeout","resetSignatureLocal","sessionStorage","openHelpURL","openInstallURL","timerOTPObject","event","ksp","val","euscp","e","init","libraryInfo","allMedias","token","typeIndex","newTokenKeyMedia","getKeyMedias","newLibraryInfo","getLibraryInfo","stringify","clearInterval","prefetchKSPServers","showSaveEds","sessionKeyStoreListObject","sessionKeyStoreListPasswords","sessionKeyStoreList","base64ToFile","openNovaKeyModal","signAuthSessionCreate","reloadPage","reload","handleTabChange","index","_component_q_select","_component_q_item_section","_component_q_item","_Fragment","Tabs","selected","Tab","showSignatureUi","$t","_normalizeClass","_withModifiers","showStampUi","NdCheckbox","_isRef","html","showDiiaSign","Loader","_vShow","NdQrCode","height","NdInput","filled","size","mobileAppName","href","target","rel","qrCode","alt","_createTextVNode","onLogin","onPhoneNumber","ReadEDSForm_exports_","ReadEDSForm","runtime_auto_import_default","QSelect","QItem","QItemSection","QField","ReadEDSModalvue_type_script_setup_true_lang_ts","ReadEDSModal_exports_","ReadEDSModal","useUserMenu","contractorsActions","useContractorsActions","uiModule","redirect","useNavigationHelpers","phonesList","tmpArr","phones","phone","contactPhone","switchActiveContractor","onContractorManagement","toggleUserMenu","onAddContractor","showAddContractorModal","onExit","logOut","onClickOutsideAvatar","element","isOpen","callback","onClickOutside","className","Breadcrumbsvue_type_script_setup_true_lang_ts","currentLocation","Breadcrumbs_exports_","Breadcrumbs","AdminMenuvue_type_script_setup_true_lang_ts","isActiveRoute","routes","routeLocation","users","hasPermissions","organization","routeLocationDetail","organizationDetail","permissions","permission","startsWith","adminSettings","surveys","leads","templates","adminExports","$redirect","to","_renderList","active","AdminMenu_exports_","AdminMenu","script","Divider_exports_","render","Divider","UserMenuvue_type_script_setup_true_lang_ts","otherContractors","isServiceUser","contactPhoneMask","v","toLocaleString","fullName","Avatar","color","avatarColor","caption","avatarCaption","shortName","contractor","UserMenu_exports_","UserMenu","SystemNotificationsvue_type_script_setup_true_lang_ts","openNotificationMenu","notificationsModule","useNotificationsModule","notificationMenu","onNotificationClick","notification","markNotificationAsRead","notificationPayload","payload","objectType","ENotificationObjectTypes","params","objectId","archive","myArchives","comment","Number","query","commentId","onNotificationDeleteClick","deleteNotification","_component_q_tooltip","ModalSidebar","onClose","ENotificationStatuses","read","colorGroup","createdAtConverted","SystemNotifications_exports_","SystemNotifications","QTooltip","ServiceDeskModalvue_type_script_setup_true_lang_ts","serviceDeskModalConfig","email","properties","notificationEmail","emailError","contentError","uploadList","addFileToUploadList","supportedImageFileTypes","f","createFileWithProgressTracker","progressTracker","createProgressTracker","fileApi","upload","errorMessage","EUploadStatus","dropZoneRef","onDrop","removeFile","splice","validateEmailOnBlur","emailPattern","test","contentRequired","isOverDropZone","useDropZone","handleSubmit","fileIds","lastContractorData","contractors","lastContractor","description","isAuthenticatedByKey","homePageApi","serviceTicketCreate","createServiceDeskMessage","emails","resetServiceDeskMessage","shouldAutoCreateMessage","_component_q_input","_component_q_card_section","_component_q_btn","classModal","outlined","onBlur","autogrow","rules","ref_key","progress","fKey","inProgress","_normalizeStyle","ServiceDeskModal_exports_","ServiceDeskModal","QCardSection","QInput","QBtn","QIcon","HelpModalvue_type_script_setup_true_lang_ts","openModals","userManualModal","viewerUrl","getUserManualUrl","openInNewWindow","openUserManual","frameborder","HelpModal_exports_","HelpModal","headervue_type_script_setup_true_lang_ts","isServiceDeskModalOpen","toggleServiceDeskModal","isNavMenuOpen","isNavSubMenuOpen","isUserMenuOpen","navMenu","userMenu","isSystemNotificationsModalOpen","openSidebar","hoverSidebar","contractorControlProfiles","contractorControlUsers","adminAccess","contractorControlLabels","contractorControlTokens","menuNavItemsConfig","icon","show","myCredentials","subMenu","myContractorRate","labels","myExports","accessRights","mySettings","api","subMenuNavItemsConfig","handleAvatarClick","openHelp","navMenuClick","menuItem","forEach","navBtnClick","avatarSource","isAdminRoute","isActiveContractorOrProfile","haveUnreadNotifications","_Transition","itemKey","args","undefined","onRedirect","header_exports_","header","LoadReportModalvue_type_script_setup_true_lang_ts","i18n","global","shouldShowReportPage","pickedPageFormat","supportedFileFormats","SupportedOutputFileFormats","XLSX","CSV","reportPage","paginatorInfo","reportDialogConfig","isDisabled","picked","pickedPage","documentsTotal","total","isLargeAllPagesExport","EXPORT_JOB_MIN_ROWS","isXlsxBlocked","rowsCount","EXPORT_XLSX_MAX_ROWS","isFormatDisabled","formatTooltip","applyDefaultFormat","loadReportModal","blocked","changePicked","changePickedPage","action","_vModelRadio","LoadReportModal_exports_","LoadReportModal","CreateArchiveModalvue_type_script_setup_true_lang_ts","archivesModule","useArchivesModule","pickedTypeFormat","pickedType","changePickedType","contentType","createArchiveModal","CreateArchiveModal_exports_","CreateArchiveModal","DocumentBulkActionModalvue_type_script_setup_true_lang_ts","documentsReadyForAction","actionType","d","canBeSigned","delete","canBeDeleted","isValidDocument","removeFromList","documentBulkActionModal","print","typeName","DocumentBulkActionModal_exports_","DocumentBulkActionModal","for","RejectDocumentReasonModalvue_type_script_setup_true_lang_ts","documentActions","useDocumentActions","rejectionReason","rejectionDialogTitle","rejectDocumentReasonModal","rejectDocument","rows","_vModelText","RejectDocumentReasonModal_exports_","RejectDocumentReasonModal","CancelDocumentReasonModalvue_type_script_setup_true_lang_ts","cancelReason","cancelDialogTitle","cancelDocumentReasonModal","cancelDocument","CancelDocumentReasonModal_exports_","CancelDocumentReasonModal","Defaultvue_type_script_setup_true_lang_ts","anyModalOpen","tutorialModule","welcomeMessageWasShown","showWelcomeMessage","isLoggedIn","isTokenSignRoute","isDocumentSignTokenRoute","_component_router_view","Header","ToastNotifications","ConfirmModal","AddContractorModal","WelcomeMessageReminderModal","AssignLabelModal","AssignLabelToNewDocumentModal","WelcomeMessage","Default_exports_","Default","DemoRequestModalvue_type_script_setup_true_lang_ts","uiStore","setModalOpen","formRef","get","demoRequestModal","set","resetForm","_component_Modal","NdModal","onCloseModal","_imports_0","DemoRequestForm","variant","onSuccess","DemoRequestModal","Homevue_type_script_setup_true_lang_ts","isTablet","isMenuOpen","scrollToSection","getElementById","scrollIntoView","behavior","block","toggleMenu","closeMenu","openDemoRequestModal","goToHome","onDocumentClick","closest","onMounted","addEventListener","removeEventListener","borderred","maximumred","Home_exports_","Home","SurveyFormvue_type_script_setup_true_lang_ts","step","tab","openLink","linkValue","takeSurvey","googleFormId","showRemindLaterTab","doNotDisturb","remindLater","_component_q_tab_panel","_component_q_tab_panels","overflow","surveyText","unelevated","align","SurveyForm","QTabPanels","QTabPanel","SurveyModalvue_type_script_setup_true_lang_ts","customEvent","nextStep","SurveyModal"],"sourceRoot":""}