@testdracul/media-frontend 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.env.development +4 -0
  2. package/.env.example +3 -0
  3. package/.eslintrc.json +25 -0
  4. package/babel.config.js +5 -0
  5. package/dist/dracul-media-frontend.es.js +16238 -0
  6. package/dist/dracul-media-frontend.umd.js +586 -0
  7. package/dist/media-frontend.css +1 -0
  8. package/docs-en.md +45 -0
  9. package/docs-es.md +45 -0
  10. package/package.json +56 -0
  11. package/readme.md +36 -0
  12. package/src/components/CsvWebViewer/CsvWebViewer.vue +81 -0
  13. package/src/components/CsvWebViewer/index.ts +4 -0
  14. package/src/components/FileUpload/FileUpload.vue +94 -0
  15. package/src/components/FileUpload/index.ts +4 -0
  16. package/src/components/FileUploadButton/FileUploadButton.vue +127 -0
  17. package/src/components/FileUploadButton/index.ts +4 -0
  18. package/src/components/FileUploadExpiration/FileUploadExpiration.vue +274 -0
  19. package/src/components/FileUploadExpiration/index.ts +4 -0
  20. package/src/components/FileUploadExpress/FileUploadExpress.vue +208 -0
  21. package/src/components/FileUploadExpress/index.ts +4 -0
  22. package/src/components/FileView/FileView.vue +336 -0
  23. package/src/components/FileView/index.ts +4 -0
  24. package/src/components/GroupsShow/GroupsShow.vue +40 -0
  25. package/src/components/GroupsShow/index.ts +4 -0
  26. package/src/components/MediaField/MediaField.vue +62 -0
  27. package/src/components/MediaField/index.ts +4 -0
  28. package/src/components/PdfWebViewer/PdfWebViewer.vue +81 -0
  29. package/src/components/PdfWebViewer/index.ts +4 -0
  30. package/src/components/UsersShow/UsersShow.vue +39 -0
  31. package/src/components/UsersShow/index.ts +4 -0
  32. package/src/components/XlsxWebViewer/XlsxWebViewer.vue +70 -0
  33. package/src/components/XlsxWebViewer/index.ts +4 -0
  34. package/src/helpers/redeableBytes.ts +9 -0
  35. package/src/i18n/index.ts +22 -0
  36. package/src/i18n/messages/DocMessages.ts +31 -0
  37. package/src/i18n/messages/ExtraMessages.ts +29 -0
  38. package/src/i18n/messages/FileMessages.ts +223 -0
  39. package/src/i18n/messages/UserStorageMessages.ts +145 -0
  40. package/src/i18n/permissions/FilePermissionMessages.ts +50 -0
  41. package/src/i18n/permissions/OldPermissionMessages.ts +59 -0
  42. package/src/i18n/permissions/UserStoragePermissionMessages.ts +40 -0
  43. package/src/index.ts +70 -0
  44. package/src/mixins/readableBytesMixin.ts +9 -0
  45. package/src/pages/FileManagementPage/FileCreate/FileCreate.vue +108 -0
  46. package/src/pages/FileManagementPage/FileCreate/index.ts +3 -0
  47. package/src/pages/FileManagementPage/FileCrud/FileCrud.vue +133 -0
  48. package/src/pages/FileManagementPage/FileCrud/index.ts +4 -0
  49. package/src/pages/FileManagementPage/FileDelete/FileDelete.vue +61 -0
  50. package/src/pages/FileManagementPage/FileDelete/index.ts +3 -0
  51. package/src/pages/FileManagementPage/FileFilters/FileFilters.vue +150 -0
  52. package/src/pages/FileManagementPage/FileFilters/index.ts +3 -0
  53. package/src/pages/FileManagementPage/FileForm/FileForm.vue +184 -0
  54. package/src/pages/FileManagementPage/FileForm/UserCombobox.vue +66 -0
  55. package/src/pages/FileManagementPage/FileForm/index.ts +3 -0
  56. package/src/pages/FileManagementPage/FileList/FileEditButton.vue +410 -0
  57. package/src/pages/FileManagementPage/FileList/FileList.vue +178 -0
  58. package/src/pages/FileManagementPage/FileList/index.ts +4 -0
  59. package/src/pages/FileManagementPage/FileShow/FileShow.vue +23 -0
  60. package/src/pages/FileManagementPage/FileShow/FileShowData.vue +35 -0
  61. package/src/pages/FileManagementPage/FileShow/index.ts +3 -0
  62. package/src/pages/FileManagementPage/FileUpdate/FileUpdate.vue +107 -0
  63. package/src/pages/FileManagementPage/FileUpdate/index.ts +4 -0
  64. package/src/pages/FileManagementPage/index.vue +20 -0
  65. package/src/pages/MediaDocPage/MediaDocCard.vue +35 -0
  66. package/src/pages/MediaDocPage/MediaDocPage.vue +78 -0
  67. package/src/pages/UserStoragePage/UserStorage.vue +311 -0
  68. package/src/pages/UserStoragePage/UserStorageForm/UserStorageForm.vue +172 -0
  69. package/src/pages/UserStoragePage/UserStorageUpdate/UserStorageUpdate.vue +91 -0
  70. package/src/pages/UserStoragePage/index.vue +14 -0
  71. package/src/providers/FileMetricsProvider.ts +47 -0
  72. package/src/providers/FileProvider.ts +60 -0
  73. package/src/providers/UploadProvider.ts +32 -0
  74. package/src/providers/UserStorageProvider.ts +47 -0
  75. package/src/providers/gql/almacenamientoPorUsuario.graphql +10 -0
  76. package/src/providers/gql/cantidadArchivosPorUsuario.graphql +10 -0
  77. package/src/providers/gql/fetchMediaVariables.graphql +6 -0
  78. package/src/providers/gql/fileCreate.graphql +27 -0
  79. package/src/providers/gql/fileDelete.graphql +7 -0
  80. package/src/providers/gql/fileFetch.graphql +29 -0
  81. package/src/providers/gql/fileFind.graphql +29 -0
  82. package/src/providers/gql/fileGlobalMetrics.graphql +6 -0
  83. package/src/providers/gql/filePaginate.graphql +38 -0
  84. package/src/providers/gql/fileUpdate.graphql +29 -0
  85. package/src/providers/gql/fileUpload.graphql +29 -0
  86. package/src/providers/gql/fileUploadAnonymous.graphql +25 -0
  87. package/src/providers/gql/fileUserMetrics.graphql +9 -0
  88. package/src/providers/gql/userStorageFetch.graphql +17 -0
  89. package/src/providers/gql/userStorageFindByUser.graphql +17 -0
  90. package/src/providers/gql/userStorageUpdate.graphql +31 -0
  91. package/src/routes/index.ts +32 -0
  92. package/vite.config.ts +65 -0
  93. package/vue.config.js +22 -0
@@ -0,0 +1,586 @@
1
+ (function($,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("deepmerge"),require("vuex"),require("vue-i18n"),require("vuetify/components/VBtn"),require("vuetify/components/VGrid"),require("vuetify/components/VProgressLinear"),require("vuetify/components/VIcon"),require("vuetify/components/VSnackbar"),require("vuetify/components/VList"),require("vuetify/components/VChip"),require("vuetify/components/VChipGroup"),require("vuetify/components/VTextField"),require("vuetify/components/VToolbar"),require("vuetify/components/VCard"),require("vuetify/components/VDialog"),require("vuetify/components/VCombobox"),require("vuetify/components/VForm"),require("vuetify/components/VSelect"),require("vuetify/components/VColorPicker"),require("vuetify/components/VMenu"),require("vuetify/components/VDivider"),require("vuetify/components/VTooltip"),require("vuetify/components/VDataTable"),require("vuetify/components/VAlert"),require("vuetify/components/VExpansionPanel"),require("vuetify/components/VFooter"),require("vuetify/components/VDatePicker"),require("vuetify/components/VTimePicker"),require("vuetify/components/VAvatar"),require("vuetify/components/VImg"),require("vuetify/components/VAutocomplete"),require("vuetify/components/VSwitch"),require("vuetify/components/VProgressCircular"),require("vuetify/components/VCheckbox"),require("vuetify/components/VOverlay"),require("vuetify/components/VTable"),require("vuetify/components/VTimeline"),require("buffer"),require("vue-pdf-embed"),require("papaparse"),require("xlsx"),require("vuetify/components/VTabs"),require("vuetify/components/VWindow")):typeof define=="function"&&define.amd?define(["exports","vue","deepmerge","vuex","vue-i18n","vuetify/components/VBtn","vuetify/components/VGrid","vuetify/components/VProgressLinear","vuetify/components/VIcon","vuetify/components/VSnackbar","vuetify/components/VList","vuetify/components/VChip","vuetify/components/VChipGroup","vuetify/components/VTextField","vuetify/components/VToolbar","vuetify/components/VCard","vuetify/components/VDialog","vuetify/components/VCombobox","vuetify/components/VForm","vuetify/components/VSelect","vuetify/components/VColorPicker","vuetify/components/VMenu","vuetify/components/VDivider","vuetify/components/VTooltip","vuetify/components/VDataTable","vuetify/components/VAlert","vuetify/components/VExpansionPanel","vuetify/components/VFooter","vuetify/components/VDatePicker","vuetify/components/VTimePicker","vuetify/components/VAvatar","vuetify/components/VImg","vuetify/components/VAutocomplete","vuetify/components/VSwitch","vuetify/components/VProgressCircular","vuetify/components/VCheckbox","vuetify/components/VOverlay","vuetify/components/VTable","vuetify/components/VTimeline","buffer","vue-pdf-embed","papaparse","xlsx","vuetify/components/VTabs","vuetify/components/VWindow"],n):($=typeof globalThis<"u"?globalThis:$||self,n($.DraculMediaFrontend={},$.Vue,$.merge,$.Vuex,$.VueI18n,$.VBtn,$.VGrid,$.VProgressLinear,$.VIcon,$.VSnackbar,$.VList,$.VChip,$.VChipGroup,$.VTextField,$.VToolbar,$.VCard,$.VDialog,$.VCombobox,$.VForm,$.VSelect,null,$.VMenu,$.VDivider,$.VTooltip,$.VDataTable,$.VAlert,$.VExpansionPanel,$.VFooter,$.VDatePicker,$.VTimePicker,$.VAvatar,$.VImg,$.VAutocomplete,$.VSwitch,null,null,null,null,$.VTimeline,$.buffer,$.VuePdfEmbed,$.Papa,$.XLSX,$.VTabs,$.VWindow))})(this,(function($,n,jt,ne,se,H,O,wo,Q,Oi,ue,Li,Eo,le,_e,Y,yt,Ua,$a,rt,Ah,Wt,Pe,Ve,bt,$e,Ne,_o,Vo,Do,lt,dt,za,qa,xh,Nh,Sh,Ch,Qt,To,Fo,Mo,Po,vt,At){"use strict";function Bo(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const Ya=Bo(Po),Oo={en:{media:{file:{title:"File management",dashboardTitle:"File Dashboard",subtitle:"View, search, create, edit and delete Files",visualizerSubtitle:"Viewing and Searching for Files",creating:"Creating File",editing:"Editing File",deleting:"Deleting File",showing:"Showing File",filename:"Filename",description:"Description",tags:"Tags",extension:"Extension",relativePath:"Relative path",absolutePath:"Absolute path",size:"Size",type:"Type",text:"Text",image:"Image",application:"Application",audio:"Audio",mimetype:"mimetype",id:"ID",url:"URL",createdAt:"Creation date",createdBy:"Created by",download:"download",noFile:"You have not selected any file",fileSizeExceeded:"The file size must be less than ",storageCapacityExceeded:"File upload failed. You dont have enough storage capacity; your available storage is {val} MBs",wrongExpirationDate:"The expiration date must be greater than the actual date ",lastAccess:"Last access",filters:"Filters",from:"From",until:"Until",sizeGt:"Size greater than",sizeLt:"Size less than",expirationDate:"Expiration date",days:"days",visibility:"Visibility",chooseFile:"Choose a file",isPublic:"Public",hits:"Hits",group:"Shared with group",user:"Shared with user",groups:"Shared with groups",users:"Shared with users",errorCsvMessage:"Cannot show the csv file right now, please try again later!",history:{date:"Modification date",user:"User"},dashboard:{fileUserMetrics:{title:"File indicators of the last 5 months",countLabel:"File count",sizeLabel:"Size"},almacenamientoPorUsuario:{title:"User storage per user (Mb)",subtitle:"Total size"},cantidadArchivosPorUsuario:{title:"Number of files per user",subtitle:"Number of files"}}}}},es:{media:{file:{title:"Administración de Archivos",dashboardTitle:"Dashboard de Archivos",subtitle:"Ver, buscar, crear, editar, y borrar Archivo",visualizerSubtitle:"Visualizacion y busqueda de Archivos",creating:"Creando archivo",editing:"Modificando archivo",deleting:"Eliminando archivo",showing:"Detalles de archivo",filename:"Nombre del archivo",description:"Descripción",tags:"Etiquetas",extension:"Extensión",relativePath:"Ruta relativa",absolutePath:"Ruta absoluta",size:"Tamaño",type:"Tipo",text:"Texto",image:"Imagen",application:"Aplicación",audio:"Audio",mimetype:"mimetype",id:"ID",url:"URL",createdAt:"Fecha de creación",createdBy:"Creado por",download:"descargar",noFile:"No has seleccionado ningun archivo",fileSizeExceeded:"El tamaño del archivo debe ser menor a ",storageCapacityExceeded:"Error al subir el archivo. No tiene suficiente capacidad de almacenamiento; su espacio disponible es {val} MBs",wrongExpirationDate:"La fecha de expiracion debe ser mayor a la fecha actual",lastAccess:"Último acceso",filters:"Filtros",from:"Desde",until:"Hasta",sizeGt:"Tamaño mayor a",sizeLt:"Tamaño menor a",expirationDate:"Fecha de expiración",days:"días",visibility:"Visibilidad",chooseFile:"Elegir archivo",isPublic:"Público",hits:"Vistas",group:"Compartido con grupo",user:"Compartido con usuario",groups:"Compartido con grupos",users:"Compartido con usuarios",errorCsvMessage:"El archivo no se puede visualizar en este momento, por favor intente más tarde!",history:{date:"Fecha de modificación",user:"Usuario"},dashboard:{fileUserMetrics:{title:"Indicadores de archivos de los últimos 5 meses",countLabel:"Cantidad de archivos",sizeLabel:"Peso"},almacenamientoPorUsuario:{title:"Almacenamiento por usuario (Mb)",subtitle:"Peso total"},cantidadArchivosPorUsuario:{title:"Cantidad de archivos por usuario",subtitle:"Cantidad de archivos"}}}}},pt:{media:{file:{title:"Administração de File",dashboardTitle:"Painel de arquivos",subtitle:"Ver, buscar, criar, editar e usar File",visualizerSubtitle:"Visualizando e pesquisando arquivos",creating:"Criando File",editing:"Edição File",deleting:"Apagando File",showing:"Detalhes do File",filename:"Nome do arquivo",description:"Descrição",tags:"Tags",extension:"Extensão",relativePath:"Caminho relativo",absolutePath:"Caminho absoluto",size:"Tamanho",type:"Tipo",text:"Texto",image:"Imagem",application:"Aplicativo",audio:"Áudio",mimetype:"mimetype",id:"ID",url:"URL",createdAt:"Data de criação",createdBy:"criado pela",download:"download",noFile:"Você não selecionou nenhum arquivo",fileSizeExceeded:"O tamanho do arquivo deve ser menor que ",wrongExpirationDate:"A data de vencimento deve ser maior que a data atual",lastAccess:"Último acesso",filters:"Filtros",from:"Deste",until:"Até",sizeGt:"Tamanho maior que",sizeLt:"Tamanho menor que",expirationDate:"Data de validade",days:"dias",visibility:"Visibilidade",chooseFile:"Escolher arquivo",isPublic:"Público",hits:"Visualizações",group:"Compartilhado com o grupo",user:"Compartilhado com o usuário",groups:"Compartilhado com grupos",users:"Compartilhado com usuários",errorCsvMessage:"O arquivo csv não pode ser exibido neste momento, tente mais tarde!",history:{date:"Data de modificação",user:"Usuário"},dashboard:{fileUserMetrics:{title:"Indicadores de arquivo dos últimos 5 meses",countLabel:"Número de arquivos",sizeLabel:"Peso"},almacenamientoPorUsuario:{title:"Armazenamento por usuário (Mb)",subtitle:"Peso total"},cantidadArchivosPorUsuario:{title:"Número de arquivos por usuário",subtitle:"Número de arquivos"}}}}}},Lo={en:{media:{userStorage:{title:"User Storage",subtitle:"Manage users storage capacity",title2:"Storage list",days:"days",user:"User",capacity:"Capacity",percentage:"Percentage",actions:"Actions",edit:"Edit",editTitle:"Edit User Storage",cliente:"Client",usedPercentage:"Percentage used: ",insufficientCapacity:"Insufficient capacity",sizeLimitExceeded:"File size limit exceeded",updated:"Capacity updated",maxFileSize:"Max size",fileSizeLimit:"File size limit",fileExpirationTime:"File expiration",fileExpirationLimit:"File expiration limit",fileExpirationTimeOlderThanToday:"Expiration date must be older than current date",fileExpirationTimeExceeded:"Expiration time not allowed",fileExpirationLimitExceeded:"File expiration time cannot be longer than ",deleteByLastAccess:"Delete files by last access",deleteByDateCreated:"Delete files by created date",filesPrivacyLabel:"Privacy of uploaded files",filesPrivacy:"Visibility",privacy:{public:"Public",private:"Private"},active:"Active",inactive:"Inactive",filters:"Filters",capacityMin:"Min Capacity (MB)",capacityMax:"Max Capacity (MB)",maxFileSizeMin:"Min Max File Size (MB)",maxFileSizeMax:"Max Max File Size (MB)",percentageMin:"Min Percentage (%)",percentageMax:"Max Percentage (%)",fileExpirationTimeMin:"Min Expiration (days)",fileExpirationTimeMax:"Max Expiration (days)"}}},es:{media:{userStorage:{title:"Almacenamiento usuarios",subtitle:"Administrar el almacenaminto de los usuarios",title2:"Lista de almacenamiento",days:"días",user:"Usuario",capacity:"Capacidad",percentage:"Porcentaje",actions:"Acciones",edit:"Editar",editTitle:"Editar almacenamiento de Usuario",cliente:"Cliente",usedPercentage:"Porcentaje en uso: ",insufficientCapacity:"Capacidad insuficiente",sizeLimitExceeded:"Límite de tamaño del archivo no permitido",updated:"Capacidad actualizada",maxFileSize:"Tamaño máximo",fileSizeLimit:"Límite de tamaño del archivo",fileExpirationTime:"Tiempo de expiración",fileExpirationLimit:"Tiempo de expiración del archivo",fileExpirationTimeExceeded:"Tiempo de expiración no permitido",fileExpirationTimeOlderThanToday:"Tiempo de expiración debe ser mayor a la fecha actual",fileExpirationLimitExceeded:"El límite de expiración del archivo no puede ser mayor a ",deleteByLastAccess:"Eliminar archivos por último acceso",deleteByDateCreated:"Eliminar archivos por fecha de creación",filesPrivacyLabel:"Visibilidad de los ficheros subidos",filesPrivacy:"Visibilidad",privacy:{public:"Publico",private:"Privado"},active:"Activo",inactive:"Inactivo",filters:"Filtros",capacityMin:"Capacidad Mínima (MB)",capacityMax:"Capacidad Máxima (MB)",maxFileSizeMin:"Tamaño Máximo Archivo Mín. (MB)",maxFileSizeMax:"Tamaño Máximo Archivo Máx. (MB)",percentageMin:"Porcentaje Mínimo (%)",percentageMax:"Porcentaje Máximo (%)",fileExpirationTimeMin:"Expiración Mínima (días)",fileExpirationTimeMax:"Expiración Máxima (días)"}}},pt:{media:{userStorage:{title:"Armazenamento do usuário",subtitle:"Gerenciar armazenamento do usuário",title2:"Lista de armazenamento",days:"dias",user:"Usuário",capacity:"Capacidade",percentage:"Porcentagem",actions:"Ações",edit:"Editar",editTitle:"Editar Armazenamento do Usuário",cliente:"Cliente",usedPercentage:"Porcentagem em uso: ",insufficientCapacity:"Capacidade insuficiente",sizeLimitExceeded:"Limite de tamanho de arquivo não permitido",updated:"Capacidade atualizada",maxFileSize:"Tamanho máximo",fileSizeLimit:"Limite de tamanho de arquivo",fileExpirationTime:"Tempo de expiração",fileExpirationLimit:"Tempo de expiração do arquivo",fileExpirationTimeExceeded:"Prazo de validade não permitido",fileExpirationTimeOlderThanToday:"O tempo de expiração deve ser maior que a data atual",fileExpirationLimitExceeded:"O tempo de expiração do arquivo não pode ser mayor que ",deleteByLastAccess:"Excluir o último acesso de arquivos",deleteByDateCreated:"Excluir arquivos por data de criação",filesPrivacyLabel:"Privacidade dos arquivos carregados",filesPrivacy:"Visibilidad",privacy:{public:"Público",private:"Privado"},active:"Ativo",inactive:"Inativo",filters:"Filtros",capacityMin:"Capacidade Mínima (MB)",capacityMax:"Capacidade Máxima (MB)",maxFileSizeMin:"Tamanho Máximo de Arquivo Mín. (MB)",maxFileSizeMax:"Tamanho Máximo de Arquivo Máx. (MB)",percentageMin:"Porcentagem Mínima (%)",percentageMax:"Porcentagem Máxima (%)",fileExpirationTimeMin:"Expiração Mínima (dias)",fileExpirationTimeMax:"Expiração Máxima (dias)"}}}},Io={en:{files:{file:{selectFile:"Select a file"}}},es:{files:{file:{selectFile:"Seleccionar archivo"}}},pt:{files:{file:{selectFile:"Select a file"}}}},Ro={en:{role:{permissions:{FILE_SHOW_ALL:"View all files",FILE_SHOW_OWN:"View own files",FILE_UPDATE_ALL:"Update all files",FILE_UPDATE_OWN:"Update own files",FILE_CREATE:"Upload file",FILE_DELETE_ALL:"Delete all files",FILE_DELETE_OWN:"Delete own files",FILE_SHOW_PUBLIC:"View public files",FILE_DOWNLOAD:"Download files"}}},es:{role:{permissions:{FILE_SHOW_ALL:"Ver todos los archivos",FILE_SHOW_OWN:"Ver archivos propios",FILE_UPDATE_ALL:"Actualizar todos los archivos",FILE_UPDATE_OWN:"Actualizar archivos propios",FILE_CREATE:"Subir Archivo",FILE_DELETE_ALL:"Borrar todos los archivos",FILE_DELETE_OWN:"Borrar archivos propios",FILE_SHOW_PUBLIC:"Ver archivos públicos",FILE_DOWNLOAD:"Descargar archivos"}}},pt:{role:{permissions:{FILE_SHOW_ALL:"Visualização de todos os arquivos",FILE_SHOW_OWN:"Visualização dos próprios arquivos",FILE_CREATE:"Criação de arquivo",FILE_UPDATE_ALL:"Edição do todos os arquivos",FILE_UPDATE_OWN:"Edição do seus próprios arquivos",FILE_DELETE_ALL:"Exclusão de todos os arquivos",FILE_DELETE_OWN:"Exclusão de seus próprios arquivos",FILE_SHOW_PUBLIC:"Visualização arquivos publicos",FILE_DOWNLOAD:"Download de arquivos"}}}},Uo={en:{role:{permissions:{USER_STORAGE_SHOW_ALL:"View all user storage",USER_STORAGE_SHOW_OWN:"View own user storage",USER_STORAGE_UPDATE:"Update user storage",USER_STORAGE_CREATE:"Create user storage",USER_STORAGE_DELETE:"Delete user storage"}}},es:{role:{permissions:{USER_STORAGE_SHOW_ALL:"Ver almacenamientos de usuario",USER_STORAGE_SHOW_OWN:"Ver mi propio almacenamiento de usuario",USER_STORAGE_UPDATE:"Modificar almacenamiento de usuario",USER_STORAGE_CREATE:"Crear almacenamiento de usuario",USER_STORAGE_DELETE:"Eliminar almacenameinto de usuario"}}},pt:{role:{permissions:{USER_STORAGE_SHOW_ALL:"Visualizando o armazenamento de todos do usuário",USER_STORAGE_SHOW_OWN:"Visualizando o armazenamento do usuário propio",USER_STORAGE_UPDATE:"Edição o armazenamento do usuário",USER_STORAGE_CREATE:"Criação o armazenamento do usuário",USER_STORAGE_DELETE:"Exclusão o armazenamento do usuário"}}}},$o={en:{media:{doc:{title:"Media Manual",subtitle:"Storage and Files",swagger:"See REST API (Swagger)"}}},es:{media:{doc:{title:"Manual de Medios",subtitle:"Almacenamiento y Archivos",swagger:"Ver API REST (Swagger)"}}},pt:{media:{doc:{title:"Manual de Mídia",subtitle:"Armazenamento e Arquivos",swagger:"Ver API REST (Swagger)"}}}},zo=jt.all([Oo,Lo,Io,Ro,Uo,$o]),qo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fileFind"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileFind"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extension"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relativePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absolutePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expirationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPublic"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:515,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query fileFind($id:ID!){
2
+ fileFind(id:$id){
3
+ id
4
+ filename
5
+ description
6
+ tags
7
+ mimetype
8
+ type
9
+ extension
10
+ relativePath
11
+ absolutePath
12
+ size
13
+ url
14
+ createdAt
15
+ createdBy{
16
+ user {
17
+ id
18
+ username
19
+ }
20
+ username
21
+ }
22
+ lastAccess
23
+ expirationDate
24
+ isPublic
25
+ hits
26
+ groups
27
+ users
28
+ }
29
+ }
30
+ `}}},Yo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fileFetch"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileFetch"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extension"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relativePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absolutePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expirationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPublic"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:500,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query fileFetch{
31
+ fileFetch{
32
+ id
33
+ filename
34
+ description
35
+ tags
36
+ mimetype
37
+ type
38
+ extension
39
+ relativePath
40
+ absolutePath
41
+ size
42
+ url
43
+ createdAt
44
+ createdBy{
45
+ user {
46
+ id
47
+ username
48
+ }
49
+ username
50
+ }
51
+ lastAccess
52
+ expirationDate
53
+ isPublic
54
+ hits
55
+ groups
56
+ users
57
+ }
58
+ }
59
+ `}}},Ho={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"filePaginate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NamedType",name:{kind:"Name",value:"FilterPaginateInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filePaginate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extension"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relativePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absolutePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expirationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPublic"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileReplaces"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"date"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:815,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query filePaginate($input: FilterPaginateInput){
60
+ filePaginate(input: $input){
61
+ totalItems
62
+ page
63
+ items{
64
+ id
65
+ filename
66
+ description
67
+ tags
68
+ mimetype
69
+ type
70
+ extension
71
+ relativePath
72
+ absolutePath
73
+ size
74
+ url
75
+ createdAt
76
+ createdBy{
77
+ user {
78
+ id
79
+ username
80
+ }
81
+ username
82
+ }
83
+ lastAccess
84
+ expirationDate
85
+ isPublic
86
+ hits
87
+ groups
88
+ users
89
+ fileReplaces {
90
+ user
91
+ date
92
+ username
93
+ }
94
+ }
95
+ }
96
+ }
97
+ `}}},jo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"fileUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FileUpdateInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NamedType",name:{kind:"Name",value:"Upload"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}},{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extension"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relativePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absolutePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expirationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPublic"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:574,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`mutation fileUpdate($input: FileUpdateInput!, $file: Upload){
98
+ fileUpdate(input: $input, file: $file){
99
+ id
100
+ filename
101
+ description
102
+ tags
103
+ mimetype
104
+ type
105
+ extension
106
+ relativePath
107
+ absolutePath
108
+ size
109
+ url
110
+ createdAt
111
+ createdBy{
112
+ user {
113
+ id
114
+ username
115
+ }
116
+ username
117
+ }
118
+ lastAccess
119
+ expirationDate
120
+ isPublic
121
+ hits
122
+ groups
123
+ users
124
+ }
125
+ }
126
+ `}}},Wo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"fileDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:130,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`mutation fileDelete($id: ID!){
127
+ fileDelete(id: $id){
128
+ id
129
+ success
130
+ }
131
+ }
132
+
133
+ `}}};class Qo{constructor(){this.gqlc=null}setGqlc(e){this.gqlc=e}findFile(e){return this.gqlc.query({query:qo,variables:{id:e}})}fetchFiles(){return this.gqlc.query({query:Yo})}paginateFiles(e,t,a=null,s=null,o=null,r=!1){return this.gqlc.query({query:Ho,variables:{input:{pageNumber:e,itemsPerPage:t,search:a,filters:s,orderBy:o,orderDesc:r}},fetchPolicy:"network-only"})}updateFile(e,t){return this.gqlc.mutate({mutation:jo,variables:{input:e,file:t}})}deleteFile(e){return this.gqlc.mutate({mutation:Wo,variables:{id:e}})}}const xt=new Qo,Gt={__name:"SubmitButton",props:{text:{type:String,default:"common.submit"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},name:{type:String,default:"submit"},color:{type:String,default:"secondary"}},setup(i){const{t:e}=se.useI18n();return(t,a)=>(n.openBlock(),n.createBlock(H.VBtn,n.mergeProps({name:i.name,ref:i.name,color:i.danger?"error":i.color,variant:"flat"},t.$attrs,{loading:i.loading,disabled:i.disabled}),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)(i.text)),1)]),_:1},16,["name","color","loading","disabled"]))}},Xt={__name:"CloseButton",props:{text:{type:String,default:"common.close"},loading:{type:Boolean,default:!1},color:{type:String,default:"secondary"}},setup(i){const{t:e}=se.useI18n();return(t,a)=>(n.openBlock(),n.createBlock(H.VBtn,n.mergeProps({color:i.color,variant:"text"},t.$attrs),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)(i.text)),1)]),_:1},16,["color"]))}},Go={__name:"Loading",props:{text:{type:String,default:"common.loading"}},setup(i){const{t:e}=se.useI18n();return(t,a)=>(n.openBlock(),n.createBlock(O.VRow,{class:"fill-height","align-content":"center",justify:"center"},{default:n.withCtx(()=>[n.createVNode(O.VCol,{class:"subtitle-1 text-center",cols:"12"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)(i.text)),1)]),_:1}),n.createVNode(O.VCol,{cols:"6"},{default:n.withCtx(()=>[n.createVNode(wo.VProgressLinear,{color:"primary",indeterminate:"",rounded:"",height:"6"})]),_:1})]),_:1}))}},Ii={__name:"Snackbar",props:{modelValue:{type:[String,Boolean]},message:String,color:{type:String,default:"success"},timeout:{type:Number,default:4e3}},emits:["end","update:modelValue"],setup(i,{emit:e}){const t=i,a=e,s=n.ref(!1),o=n.computed(()=>t.modelValue?t.modelValue:t.message);return n.watch(()=>t.modelValue,r=>{r&&(s.value=!0)}),n.watch(()=>t.message,r=>{r&&(s.value=!0)}),n.watch(s,r=>{r===!1&&(a("end"),a("update:modelValue",null))}),(r,l)=>(n.openBlock(),n.createBlock(Oi.VSnackbar,{modelValue:s.value,"onUpdate:modelValue":l[1]||(l[1]=d=>s.value=d),color:i.color,timeout:i.timeout,location:"bottom"},{default:n.withCtx(()=>[n.createVNode(H.VBtn,{variant:"text",dark:"",onClick:l[0]||(l[0]=d=>s.value=!1)},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[...l[2]||(l[2]=[n.createTextVNode("mdi-close",-1)])]),_:1})]),_:1}),n.createTextVNode(" "+n.toDisplayString(o.value),1)]),_:1},8,["modelValue","color","timeout"]))}},ke={__name:"ShowField",props:{modelValue:{type:[String,Number],default:null},label:{type:String,default:null},icon:{type:String,default:"mdi-label"}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(ue.VListItem,{title:i.modelValue,subtitle:i.label},{prepend:n.withCtx(()=>[n.createVNode(Q.VIcon,{color:"primary",class:"mr-5"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.icon),1)]),_:1})]),_:1},8,["title","subtitle"]))}},Ri={__name:"ShowChipField",props:{chips:{type:Array,default:()=>[]},label:{type:String,default:null},icon:{type:String,default:"mdi-label"}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(ue.VListItem,{subtitle:i.label},{prepend:n.withCtx(()=>[n.createVNode(Q.VIcon,{color:"primary",class:"mr-5"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.icon),1)]),_:1})]),default:n.withCtx(()=>[n.createVNode(Eo.VChipGroup,{column:""},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.chips,a=>(n.openBlock(),n.createBlock(Li.VChip,{key:a.id,color:"primary",label:"",size:"small"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(a.name?a.name:a),1)]),_:2},1024))),128))]),_:1})]),_:1},8,["subtitle"]))}},Kt={__name:"ToolbarDialog",props:{title:{type:String,default:"common.title"},danger:{type:Boolean,default:!1},info:{type:Boolean,default:!1}},emits:["close"],setup(i){const{t:e}=se.useI18n(),t=i,a=n.computed(()=>t.danger?"text-on-error":t.info?"text-on-info":"text-on-primary");return(s,o)=>(n.openBlock(),n.createBlock(_e.VToolbar,{flat:"",class:"mb-2",color:i.danger?"error":i.info?"info":"primary"},{default:n.withCtx(()=>[n.createVNode(_e.VToolbarTitle,{class:n.normalizeClass(a.value)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)(i.title)),1)]),_:1},8,["class"]),n.createVNode(O.VSpacer),n.createVNode(_e.VToolbarItems,null,{default:n.withCtx(()=>[n.createVNode(H.VBtn,{icon:"",variant:"text",class:n.normalizeClass(a.value),onClick:o[0]||(o[0]=r=>s.$emit("close"))},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[...o[1]||(o[1]=[n.createTextVNode("mdi-close",-1)])]),_:1})]),_:1},8,["class"])]),_:1})]),_:1},8,["color"]))}},Xo=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t},Ko={__name:"AddButton",props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},color:{type:String,default:"primary"}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(Ve.VTooltip,{location:"top"},{activator:n.withCtx(({props:a})=>[n.createVNode(H.VBtn,n.mergeProps({...a,...e.$attrs},{icon:"mdi-plus",color:i.color,class:"elevation-8 ma-4",loading:i.loading,disabled:i.disabled,position:"fixed",location:"bottom right"}),null,16,["color","loading","disabled"])]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(e.$t("common.add")),1)]),_:1}))}},Zo={__name:"EditButton",props:{color:{type:String,default:"primary"},small:{type:Boolean,default:!0},icon:{type:String,default:"mdi-pencil"}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(Ve.VTooltip,{location:"top"},{activator:n.withCtx(({props:a})=>[n.createVNode(H.VBtn,n.mergeProps({...a,...e.$attrs},{icon:"",variant:"text",size:i.small?"small":"default",color:i.color,class:"mx-1"}),{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.icon),1)]),_:1})]),_:1},16,["size","color"])]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(e.$t("common.update")),1)]),_:1}))}},Jo={__name:"DeleteButton",props:{color:{type:String,default:"red"},small:{type:Boolean,default:!0},icon:{type:String,default:"mdi-delete"}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(Ve.VTooltip,{location:"top"},{activator:n.withCtx(({props:a})=>[n.createVNode(H.VBtn,n.mergeProps({...a,...e.$attrs},{icon:"",variant:"text",size:i.small?"small":"default",color:i.color,class:"mx-1"}),{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.icon),1)]),_:1})]),_:1},16,["size","color"])]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(e.$t("common.delete")),1)]),_:1}))}},er={__name:"ShowButton",props:{color:{type:String,default:"primary"},small:{type:Boolean,default:!0},icon:{type:String,default:"mdi-magnify"}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(Ve.VTooltip,{location:"top"},{activator:n.withCtx(({props:a})=>[n.createVNode(H.VBtn,n.mergeProps({...a,...e.$attrs},{icon:"",variant:"text",size:i.small?"small":"default",color:i.color,class:"mx-1"}),{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.icon),1)]),_:1})]),_:1},16,["size","color"])]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(e.$t("common.show")),1)]),_:1}))}},tr={class:"pa-0"},Ha={__name:"CrudLayout",props:{title:String,subtitle:String,addButton:Boolean},emits:["add"],setup(i){const{t:e}=se.useI18n();return(t,a)=>(n.openBlock(),n.createElementBlock("div",tr,[n.createVNode(Y.VCard,{class:"elevation-6"},{default:n.withCtx(()=>[n.createVNode(_e.VToolbar,{color:"primary",flat:""},{default:n.withCtx(()=>[n.createVNode(_e.VToolbarTitle,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)(i.title)),1)]),_:1}),n.createVNode(O.VSpacer),i.addButton?(n.openBlock(),n.createBlock(H.VBtn,{key:0,icon:"mdi-plus",color:"white",variant:"text",onClick:a[0]||(a[0]=s=>t.$emit("add"))})):n.createCommentVNode("",!0)]),_:1}),n.createVNode(Y.VCardSubtitle,{class:"mt-2 text-subtitle-1"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)(i.subtitle)),1)]),_:1}),n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.renderSlot(t.$slots,"list")]),_:3})]),_:3}),n.renderSlot(t.$slots,"default")]))}},ja={__name:"ErrorAlert",props:{errorMessage:{type:String,default:null}},setup(i){const{t:e,te:t}=se.useI18n();return(a,s)=>i.errorMessage?(n.openBlock(),n.createBlock($e.VAlert,{key:0,type:"error",variant:"outlined"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(t)(i.errorMessage.split("|")[0])?n.unref(e)(i.errorMessage.split("|")[0],{val:i.errorMessage.split("|")[1]}):i.errorMessage),1)]),_:1})):n.createCommentVNode("",!0)}},ir={key:0,class:"pa-4"},ar={class:"pa-4"},nr={__name:"CrudCreate",props:{title:{type:String,default:"common.create"},open:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},errorMessage:{type:String,default:null},toolbarError:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!0}},emits:["close","create"],setup(i){return(e,t)=>(n.openBlock(),n.createBlock(yt.VDialog,{"model-value":i.open,persistent:"",scrollable:"",fullscreen:i.fullscreen,"max-width":"850"},{default:n.withCtx(()=>[n.createVNode(Y.VCard,null,{default:n.withCtx(()=>[n.createVNode(n.unref(Kt),{title:i.title,danger:i.toolbarError,onClose:t[0]||(t[0]=a=>e.$emit("close")),style:{height:"auto"}},null,8,["title","danger"]),n.createVNode(Y.VCardText,{style:{height:"100%"},class:"pa-0"},{default:n.withCtx(()=>[i.errorMessage?(n.openBlock(),n.createElementBlock("div",ir,[n.createVNode(n.unref(ja),{"error-message":i.errorMessage},null,8,["error-message"])])):n.createCommentVNode("",!0),n.createElementVNode("div",ar,[n.renderSlot(e.$slots,"default")])]),_:3}),n.createVNode(Pe.VDivider),n.createVNode(Y.VCardActions,null,{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(n.unref(Xt),{onClick:t[1]||(t[1]=a=>e.$emit("close"))}),n.createVNode(n.unref(Gt),{loading:i.loading,onClick:t[2]||(t[2]=a=>e.$emit("create"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["model-value","fullscreen"]))}},sr={key:0,class:"pa-4"},or={class:"pa-4"},Wa={__name:"CrudUpdate",props:{title:{type:String,default:"common.update"},open:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},errorMessage:{type:String,default:null},fullscreen:{type:Boolean,default:!1},disableSubmit:{type:Boolean,default:!1}},emits:["close","update"],setup(i){const{t:e}=se.useI18n();return(t,a)=>(n.openBlock(),n.createBlock(yt.VDialog,{"model-value":i.open,persistent:"",scrollable:"",fullscreen:i.fullscreen,"max-width":"850"},{default:n.withCtx(()=>[n.createVNode(Y.VCard,null,{default:n.withCtx(()=>[n.createVNode(n.unref(Kt),{title:i.title,onClose:a[0]||(a[0]=s=>t.$emit("close")),style:{height:"auto"}},null,8,["title"]),n.createVNode(Y.VCardText,{style:{height:"100%"},class:"pa-0"},{default:n.withCtx(()=>[i.errorMessage?(n.openBlock(),n.createElementBlock("div",sr,[n.createVNode(n.unref(ja),{"error-message":i.errorMessage},null,8,["error-message"])])):n.createCommentVNode("",!0),n.createElementVNode("div",or,[n.renderSlot(t.$slots,"default")])]),_:3}),n.createVNode(Pe.VDivider),n.createVNode(Y.VCardActions,null,{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(n.unref(Xt),{onClick:a[1]||(a[1]=s=>t.$emit("close"))}),i.disableSubmit?(n.openBlock(),n.createBlock(Ve.VTooltip,{key:0,location:"bottom"},{activator:n.withCtx(({props:s})=>[n.createElementVNode("div",n.mergeProps(s,{class:"d-inline-block"}),[n.createVNode(n.unref(Gt),{loading:i.loading,disabled:!0,onClick:a[2]||(a[2]=o=>t.$emit("update")),text:"common.update"},null,8,["loading"])],16)]),default:n.withCtx(()=>[a[4]||(a[4]=n.createElementVNode("span",null,"No hay cambios para actualizar",-1))]),_:1})):(n.openBlock(),n.createBlock(n.unref(Gt),{key:1,loading:i.loading,onClick:a[3]||(a[3]=s=>t.$emit("update")),text:"common.update"},null,8,["loading"]))]),_:1})]),_:3})]),_:3},8,["model-value","fullscreen"]))}},rr={__name:"CrudDelete",props:{title:{type:String,default:"common.delete"},open:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},emits:["close","delete"],setup(i){const{t:e}=se.useI18n();return(t,a)=>(n.openBlock(),n.createBlock(yt.VDialog,{"model-value":i.open,"max-width":"850",persistent:"",fullscreen:i.fullscreen},{default:n.withCtx(()=>[n.createVNode(Y.VCard,null,{default:n.withCtx(()=>[n.createVNode(n.unref(Kt),{danger:"",title:i.title,onClose:a[0]||(a[0]=s=>t.$emit("close"))},null,8,["title"]),n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3}),n.createVNode(Pe.VDivider),n.createVNode(Y.VCardActions,null,{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(n.unref(Xt),{color:"grey-darken-2",onClick:a[1]||(a[1]=s=>t.$emit("close"))}),n.createVNode(n.unref(Gt),{loading:i.loading,danger:"",onClick:a[2]||(a[2]=s=>t.$emit("delete")),text:"common.delete"},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["model-value","fullscreen"]))}},Qa={__name:"CrudShow",props:{title:{type:String,default:"common.show"},open:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1}},emits:["close"],setup(i){return(e,t)=>(n.openBlock(),n.createBlock(yt.VDialog,{fullscreen:i.fullscreen,"model-value":i.open,"max-width":"75vw",persistent:""},{default:n.withCtx(()=>[n.createVNode(Y.VCard,null,{default:n.withCtx(()=>[n.createVNode(n.unref(Kt),{info:"",title:i.title,onClose:t[0]||(t[0]=a=>e.$emit("close"))},null,8,["title"]),n.createVNode(Y.VCardText,{style:{overflow:"auto"}},{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3}),n.createVNode(Pe.VDivider),n.createVNode(Y.VCardActions,null,{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(n.unref(Xt),{onClick:t[1]||(t[1]=a=>e.$emit("close"))})]),_:1})]),_:3})]),_:3},8,["fullscreen","model-value"]))}},lr={__name:"FilterLayout",props:{title:{type:String,default:"common.filter"},icon:{type:String,default:"mdi-filter-variant"},clearButton:{type:Boolean,default:!0},applyButton:{type:Boolean,default:!1}},emits:["clear","apply"],setup(i){const e=n.ref(0);return(t,a)=>(n.openBlock(),n.createBlock(Ne.VExpansionPanels,{modelValue:e.value,"onUpdate:modelValue":a[2]||(a[2]=s=>e.value=s),class:"mb-4"},{default:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanel,{elevation:"2"},{default:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanelTitle,null,{default:n.withCtx(()=>[n.createVNode(Q.VIcon,{icon:i.icon,class:"mr-2"},null,8,["icon"]),n.createTextVNode(" "+n.toDisplayString(t.$t(i.title)),1)]),_:1}),n.createVNode(Ne.VExpansionPanelText,null,{default:n.withCtx(()=>[n.createVNode(O.VRow,{dense:""},{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3}),n.createVNode(O.VRow,{dense:""},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",class:"text-right mt-2"},{default:n.withCtx(()=>[i.clearButton?(n.openBlock(),n.createBlock(H.VBtn,{key:0,size:"small",variant:"text",color:"secondary",class:"mr-2",onClick:a[0]||(a[0]=s=>t.$emit("clear"))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.$t("common.clearFilters")),1)]),_:1})):n.createCommentVNode("",!0),i.applyButton?(n.openBlock(),n.createBlock(H.VBtn,{key:1,size:"small",color:"secondary",onClick:a[1]||(a[1]=s=>t.$emit("apply"))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.$t("common.applyFilters")),1)]),_:1})):n.createCommentVNode("",!0)]),_:1})]),_:1})]),_:3})]),_:3})]),_:3},8,["modelValue"]))}},dr={name:"DocLayout",props:{title:{type:String,required:!0},icon:{type:String,default:"mdi-book-open-page-variant"},color:{type:String,default:"primary"},swagger:{type:Boolean,default:!1},swaggerLabel:{type:String,default:"API REST (Swagger)"}}},cr={class:"mb-10"},ur={class:"text-h5 font-weight-bold mb-4 d-flex align-center color-primary"},mr={class:"text-body-1 text-grey-darken-3 leading-relaxed"},fr={class:"mb-10"},hr={class:"text-h5 font-weight-bold mb-4 d-flex align-center"},pr={class:"text-body-1 text-grey-darken-3"},gr={class:"mb-10"},kr={class:"text-h5 font-weight-bold mb-4 d-flex align-center"},yr={class:"bg-grey-lighten-5 pa-4 rounded-lg border"},br={key:0},vr={class:"text-h5 font-weight-bold mb-4 d-flex align-center"},Ar={class:"text-center"},xr={class:"text-caption text-grey-darken-1 mb-1"};function Nr(i,e,t,a,s,o){return n.openBlock(),n.createBlock(O.VContainer,{fluid:"",class:"pa-6"},{default:n.withCtx(()=>[n.createVNode(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",md:"10",lg:"8",class:"mx-auto"},{default:n.withCtx(()=>[n.createVNode(Y.VCard,{variant:"flat",border:"",class:"doc-card"},{default:n.withCtx(()=>[n.createVNode(_e.VToolbar,{color:t.color,density:"comfortable",class:"px-2 elevation-2"},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,{start:"",class:"ml-2",size:"large"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.icon),1)]),_:1}),n.createVNode(_e.VToolbarTitle,{class:"text-h5 font-weight-bold"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.title),1)]),_:1}),n.createVNode(O.VSpacer),t.swagger?(n.openBlock(),n.createBlock(H.VBtn,{key:0,"prepend-icon":"mdi-api",variant:"flat",color:"white",class:"text-none mr-2 font-weight-bold",href:"/api-docs/",target:"_blank"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(t.swaggerLabel),1)]),_:1})):n.createCommentVNode("",!0)]),_:1},8,["color"]),n.createVNode(Y.VCardText,{class:"pa-8"},{default:n.withCtx(()=>[n.createElementVNode("section",cr,[n.createElementVNode("h3",ur,[n.createVNode(Q.VIcon,{start:"",color:t.color,size:"small"},{default:n.withCtx(()=>[...e[0]||(e[0]=[n.createTextVNode("mdi-information",-1)])]),_:1},8,["color"]),n.createTextVNode(" "+n.toDisplayString(i.$t("common.doc.overview")),1)]),n.createElementVNode("div",mr,[n.renderSlot(i.$slots,"overview",{},void 0,!0)])]),n.createElementVNode("section",fr,[n.createElementVNode("h3",hr,[n.createVNode(Q.VIcon,{start:"",color:t.color,size:"small"},{default:n.withCtx(()=>[...e[1]||(e[1]=[n.createTextVNode("mdi-help-circle",-1)])]),_:1},8,["color"]),n.createTextVNode(" "+n.toDisplayString(i.$t("common.doc.howToUse")),1)]),n.createElementVNode("div",pr,[n.renderSlot(i.$slots,"how-to-use",{},void 0,!0)])]),n.createElementVNode("section",gr,[n.createElementVNode("h3",kr,[n.createVNode(Q.VIcon,{start:"",color:t.color,size:"small"},{default:n.withCtx(()=>[...e[2]||(e[2]=[n.createTextVNode("mdi-check-decagram",-1)])]),_:1},8,["color"]),n.createTextVNode(" "+n.toDisplayString(i.$t("common.doc.userBenefits")),1)]),n.createElementVNode("div",yr,[n.renderSlot(i.$slots,"benefits",{},void 0,!0)])]),i.$slots.faq?(n.openBlock(),n.createElementBlock("section",br,[n.createElementVNode("h3",vr,[n.createVNode(Q.VIcon,{start:"",color:t.color,size:"small"},{default:n.withCtx(()=>[...e[3]||(e[3]=[n.createTextVNode("mdi-frequently-asked-questions",-1)])]),_:1},8,["color"]),n.createTextVNode(" "+n.toDisplayString(i.$t("common.doc.faq")),1)]),n.renderSlot(i.$slots,"faq",{},void 0,!0)])):n.createCommentVNode("",!0)]),_:3}),n.createVNode(_o.VFooter,{border:"",class:"pa-4 bg-grey-lighten-4 justify-center"},{default:n.withCtx(()=>[n.createElementVNode("div",Ar,[n.createElementVNode("div",xr," © "+n.toDisplayString(new Date().getFullYear())+" Dracul Modular Framework - Guía del Usuario ",1),n.createVNode(Li.VChip,{size:"x-small",variant:"text",color:t.color,class:"font-weight-bold"},{default:n.withCtx(()=>[...e[4]||(e[4]=[n.createTextVNode(" v1.44.0 ",-1)])]),_:1},8,["color"])])]),_:1})]),_:3})]),_:3})]),_:3})]),_:3})}const Sr=Xo(dr,[["render",Nr],["__scopeId","data-v-11a6bb25"]]),Nt="client.error.unexpectedError",Ui="client.error.networkError",$i="client.error.validation",Cr="client.error.roleNameAlreadyExists",zi="client.error.forbidden",qi="client.error.unauthenticated",Ga="BAD_USER_INPUT",Xa="FORBIDDEN",Ka="UNAUTHENTICATED",Za="CUSTOM_ERROR";class Zt extends Error{constructor(e){super(e.message),this.code=null,this.errorMessage=null,this.inputErrors={},this.errorsQuantity=null,this.i18nMessage="",this.showMessage="",this.i18nMessages=[],this.name="ClientError",e.networkError?(this.i18nMessage=Ui,this.showMessage=Ui,this.i18nMessages.push(Ui)):e.graphQLErrors&&e.graphQLErrors.length>0?this.processGraphQLErrors(e.graphQLErrors):e.message?(this.i18nMessage=e.message,this.showMessage=e.message,this.i18nMessages.push(e.message)):(this.i18nMessage=Nt,this.showMessage=Nt,this.i18nMessages.push(Nt))}processGraphQLErrors(e){this.errorsQuantity=e.length,e.forEach(t=>{const a=t.extensions?.code;if(a==Ga){this.code=Ga,this.errorMessage=t.message,this.i18nMessage=$i,this.showMessage=$i,this.i18nMessages.push($i);const s=t.extensions?.inputErrors;if(s)for(const o in s){const r=s[o]?.properties?.message||s[o];this.inputErrors[o]===void 0?this.inputErrors[o]=[r]:this.inputErrors[o].push(r)}}else a==Xa?(this.code=Xa,this.errorMessage=t.message,this.i18nMessage=zi,this.showMessage=zi,this.i18nMessages.push(zi)):a==Ka?(this.code=Ka,this.errorMessage=t.message,this.i18nMessage=qi,this.showMessage=qi,this.i18nMessages.push(qi)):a==Za?(this.code=Za,this.errorMessage=t.message==="roleNameAlreadyTaken"?Cr:t.message,this.i18nMessage=this.errorMessage,this.showMessage=this.errorMessage,this.i18nMessages.push(t.message)):(this.code=a,this.errorMessage=t.message,this.i18nMessage=t.message||Nt,this.showMessage=t.message||Nt,this.i18nMessages.push(this.i18nMessage))})}}const wr={en:{common:{name:"Name",lastname:"Lastname",user:"User",required:"Required",search:"Search",cancel:"Cancel",loading:"Loading",processing:"Processing",noData:"No data",add:"Add",submit:"Submit",save:"Save",start:"Start",create:"Create",update:"Update",delete:"Delete",created:"Created",updated:"Updated",deleted:"Deleted",show:"show",close:"Close",send:"Send",confirm:"Confirm",next:"Next",previous:"Previous",actions:"Actions",itemsPerPageText:"Items per page",areYouSureDeleteRecord:"Are you sure you want to blur this record?",networkError:"Network error. The server does not respond.",export:"Export",import:"Import",title:"Title",subtitle:"Subtitle",true:"True",false:"False",consult:"Consult",detail:"Detail | Details",filter:"Filter | Filters",applyFilters:"Apply filters",clearFilters:"Clear filters",selectAll:"Select all",clearAll:"Clear all",noResults:"No results found",operation:{success:"Operation success",fail:"Operation fail"},doc:{overview:"Overview",howToUse:"How to use",userBenefits:"Capabilities",faq:"Frequently Asked Questions"}}},es:{common:{name:"Nombre",lastname:"Apellido",user:"Usuario",required:"Requerido",search:"Buscar",cancel:"Cancelar",loading:"Cargando",processing:"Procesando",noData:"Sin datos",add:"Agregar",submit:"Enviar",save:"Guardar",create:"Crear",start:"Comenzar",update:"Actualizar",delete:"Borrar",created:"Creado",updated:"Actualizado",deleted:"Eliminado",show:"Mostrar",close:"Cerrar",send:"Enviar",confirm:"Confirmar",next:"Siguiente",previous:"Anterior",actions:"Acciones",itemsPerPageText:"Elementos por página",areYouSureDeleteRecord:"¿Esta seguro que desea borrar este registro?",networkError:"Error de red. El servidor no responde.",export:"Exportar",import:"Importar",title:"Titulo",subtitle:"Subtitulo",true:"Verdadero",false:"Falso",consult:"Consultar",detail:"Detalle | Detalles",filter:"Filtro | Filtros",applyFilters:"Aplicar filtros",clearFilters:"Limpiar filtros",selectAll:"Seleccionar todo",clearAll:"Limpiar todo",noResults:"No se encontraron resultados",operation:{success:"Operación exitosa",fail:"Operación fallida"},doc:{overview:"Resumen",howToUse:"Cómo utilizar",userBenefits:"Capacidades",faq:"Preguntas Frecuentes"}}},pt:{common:{name:"Nome",lastname:"Último nome",user:"User",required:"Requeridos",search:"Procurar",cancel:"Cancelar",loading:"Carregando",processing:"Em processamento",noData:"Não há dados",add:"Adicionar",submit:"Submit",save:"Salve",start:"Começar",create:"Criar",update:"Atualizar",delete:"Excluir",created:"Criado",updated:"Atualizado",deleted:"Excluído",show:"Mostrar",close:"Fechar",send:"Enviar",confirm:"Confirme",next:"Próximo",previous:"Anterior",actions:"Actions",itemsPerPageText:"Itens por página",areYouSureDeleteRecord:"Tem certeza de que deseja excluir este registro?",networkError:"Erro de vermelho. O servidor não responde.",export:"Exportar",import:"Importar",title:"Título",subtitle:"Subtítulo",true:"Verdade",false:"Falso",consult:"Consultar",detail:"Detalhe | Detalhes",filter:"Filtro | Filtros",applyFilters:"Aplicar filtros",clearFilters:"Limpar filtros",selectAll:"Selecionar tudo",clearAll:"Limpar tudo",noResults:"Nenhum resultado encontrado",operation:{success:"Operação bem sucedida",fail:"Operação falhou"},doc:{overview:"Resumo",howToUse:"Como usar",userBenefits:"Capacidades",faq:"Perguntas Frequentes"}}}},Er={en:{$vuetify:{badge:"Badge",close:"Close",dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},datePicker:{itemsSelected:"{0} selected",nextMonthAriaLabel:"Next month",nextYearAriaLabel:"Next year",prevMonthAriaLabel:"Previous month",prevYearAriaLabel:"Previous year"},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Goto Page {0}",currentPage:"Current Page, Page {0}"}},rating:{ariaLabel:{icon:"Rating {0} of {1}"}}}},es:{$vuetify:{badge:"Placa",close:"Cerrar",dataIterator:{noResultsText:"Ningún elemento coincide con la búsqueda",loadingText:"Cargando..."},dataTable:{itemsPerPageText:"Filas por página:",ariaLabel:{sortDescending:"Orden descendente.",sortAscending:"Orden ascendente.",sortNone:"Sin ordenar.",activateNone:"Pulse para quitar orden.",activateDescending:"Pulse para ordenar descendente.",activateAscending:"Pulse para ordenar ascendente."},sortBy:"Ordenado por"},dataFooter:{itemsPerPageText:"Elementos por página:",itemsPerPageAll:"Todos",nextPage:"Página siguiente",prevPage:"Página anterior",firstPage:"Primer página",lastPage:"Última página",pageText:"{0}-{1} de {2}"},datePicker:{itemsSelected:"{0} seleccionados",nextMonthAriaLabel:"Próximo mes",nextYearAriaLabel:"Próximo año",prevMonthAriaLabel:"Mes anterior",prevYearAriaLabel:"Año anterior"},noDataText:"No hay datos disponibles",carousel:{prev:"Visual anterior",next:"Visual siguiente",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} más"},fileInput:{counter:"{0} archivos",counterSize:"{0} archivos ({1} en total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Navegación de paginación",next:"Página siguiente",previous:"Página anterior",page:"Ir a la página {0}",currentPage:"Página actual, página {0}"}},rating:{ariaLabel:{icon:"Rating {0} of {1}"}}}},pt:{$vuetify:{badge:"Distintivo",close:"Fechar",dataIterator:{noResultsText:"Nenhum dado encontrado",loadingText:"Carregando itens..."},dataTable:{itemsPerPageText:"Linhas por página:",ariaLabel:{sortDescending:"Ordenado decrescente.",sortAscending:"Ordenado crescente.",sortNone:"Não ordenado.",activateNone:"Ative para remover a ordenação.",activateDescending:"Ative para ordenar decrescente.",activateAscending:"Ative para ordenar crescente."},sortBy:"Ordenar por"},dataFooter:{itemsPerPageText:"Itens por página:",itemsPerPageAll:"Todos",nextPage:"Próxima página",prevPage:"Página anterior",firstPage:"Primeira página",lastPage:"Última página",pageText:"{0}-{1} de {2}"},datePicker:{itemsSelected:"{0} selecionado(s)",nextMonthAriaLabel:"Próximo mês",nextYearAriaLabel:"Próximo ano",prevMonthAriaLabel:"Mês anterior",prevYearAriaLabel:"Ano anterior"},noDataText:"Não há dados disponíveis",carousel:{prev:"Visão anterior",next:"Próxima visão",ariaLabel:{delimiter:"Slide {0} de {1} do carrossel"}},calendar:{moreEvents:"Mais {0}"},fileInput:{counter:"{0} arquivo(s)",counterSize:"{0} arquivo(s) ({1} no total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Navegação de paginação",next:"Próxima página",previous:"Página anterior",page:"Ir à página {0}",currentPage:"Página atual, página {0}"}},rating:{ariaLabel:{icon:"Rating {0} of {1}"}}}}},_r={en:{client:{error:{unauthenticated:"Authentication required",forbidden:"Forbidden",validation:"Validation Errors",networkError:"Network error. The server does not respond.",unexpectedError:"An unexpected error has occurred",roleNameAlreadyExists:"The name chosen for the new role was already taken"}}},es:{client:{error:{unauthenticated:"Autenticación requerida",forbidden:"Prohibido",validation:"Error de validación.",networkError:"Error de Red. El servidor no responde",unexpectedError:"Ha ocurrido un error inesperado",roleNameAlreadyExists:"El nombre elegido para el nuevo rol ya fue tomado"}}},pt:{client:{error:{unauthenticated:"Authentication required",forbidden:"Forbidden",validationError:"Validation Error",networkError:"networkError",unexpectedError:"Ocorreu um erro inesperado",roleNameAlreadyExists:"O nome escolhido para o novo papel já foi assumido"}}}},Vr={en:{error:{LIST_MAX_REACHED:"List max reached",LIST_MIN_REACHED:"List min reached",MAX_FILE_SIZE_EXCEEDED:"Maxium file size exceeded",MIMETYPE_NOT_ALLOWED:"File type not allowed"}},es:{error:{LIST_MAX_REACHED:"Máximo alcanzado",LIST_MIN_REACHED:"Mínimo alcanzado",MAX_FILE_SIZE_EXCEEDED:"Se superó el tamaño máximo de archivo",MIMETYPE_NOT_ALLOWED:"Tipo de archivo no permitido"}},pt:{error:{LIST_MAX_REACHED:"List max reached",LIST_MIN_REACHED:"List min reached",MAX_FILE_SIZE_EXCEEDED:"Tamanho máximo do arquivo excedido",MIMETYPE_NOT_ALLOWED:"Tipo de arquivo não permitido"}}},Dr={en:{common:{multiLang:{en:"English",es:"Spanish",pt:"Portuguese",image:"Image",audio:"Audio"}}},es:{common:{multiLang:{en:"Ingles",es:"Español",pt:"Portugués",image:"Imagen",audio:"Audio"}}},pt:{common:{multiLang:{en:"Inglês",es:"Espanhol",pt:"Português",image:"Imagem",audio:"Audio"}}}};jt.all([wr,Dr,Er,_r,Vr]);function St(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Jt={exports:{}},Tr=Jt.exports,Ja;function Fr(){return Ja||(Ja=1,(function(i,e){(function(t,a){i.exports=a()})(Tr,(function(){var t=1e3,a=6e4,s=36e5,o="millisecond",r="second",l="minute",d="hour",c="day",u="week",f="month",m="quarter",p="year",k="date",g="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var b=["th","st","nd","rd"],x=N%100;return"["+N+(b[(x-20)%10]||b[x]||b[0])+"]"}},A=function(N,b,x){var E=String(N);return!E||E.length>=b?N:""+Array(b+1-E.length).join(x)+N},w={s:A,z:function(N){var b=-N.utcOffset(),x=Math.abs(b),E=Math.floor(x/60),C=x%60;return(b<=0?"+":"-")+A(E,2,"0")+":"+A(C,2,"0")},m:function N(b,x){if(b.date()<x.date())return-N(x,b);var E=12*(x.year()-b.year())+(x.month()-b.month()),C=b.clone().add(E,f),P=x-C<0,M=b.clone().add(E+(P?-1:1),f);return+(-(E+(x-C)/(P?C-M:M-C))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:p,w:u,d:c,D:k,h:d,m:l,s:r,ms:o,Q:m}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},S="en",B={};B[S]=v;var D="$isDayjsObject",T=function(N){return N instanceof R||!(!N||!N[D])},V=function N(b,x,E){var C;if(!b)return S;if(typeof b=="string"){var P=b.toLowerCase();B[P]&&(C=P),x&&(B[P]=x,C=P);var M=b.split("-");if(!C&&M.length>1)return N(M[0])}else{var L=b.name;B[L]=b,C=L}return!E&&C&&(S=C),C||!E&&S},F=function(N,b){if(T(N))return N.clone();var x=typeof b=="object"?b:{};return x.date=N,x.args=arguments,new R(x)},_=w;_.l=V,_.i=T,_.w=function(N,b){return F(N,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var R=(function(){function N(x){this.$L=V(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[D]=!0}var b=N.prototype;return b.parse=function(x){this.$d=(function(E){var C=E.date,P=E.utc;if(C===null)return new Date(NaN);if(_.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var M=C.match(h);if(M){var L=M[2]-1||0,U=(M[7]||"0").substring(0,3);return P?new Date(Date.UTC(M[1],L,M[3]||1,M[4]||0,M[5]||0,M[6]||0,U)):new Date(M[1],L,M[3]||1,M[4]||0,M[5]||0,M[6]||0,U)}}return new Date(C)})(x),this.init()},b.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},b.$utils=function(){return _},b.isValid=function(){return this.$d.toString()!==g},b.isSame=function(x,E){var C=F(x);return this.startOf(E)<=C&&C<=this.endOf(E)},b.isAfter=function(x,E){return F(x)<this.startOf(E)},b.isBefore=function(x,E){return this.endOf(E)<F(x)},b.$g=function(x,E,C){return _.u(x)?this[E]:this.set(C,x)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(x,E){var C=this,P=!!_.u(E)||E,M=_.p(x),L=function(re,W){var ie=_.w(C.$u?Date.UTC(C.$y,W,re):new Date(C.$y,W,re),C);return P?ie:ie.endOf(c)},U=function(re,W){return _.w(C.toDate()[re].apply(C.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(W)),C)},z=this.$W,q=this.$M,j=this.$D,te="set"+(this.$u?"UTC":"");switch(M){case p:return P?L(1,0):L(31,11);case f:return P?L(1,q):L(0,q+1);case u:var de=this.$locale().weekStart||0,be=(z<de?z+7:z)-de;return L(P?j-be:j+(6-be),q);case c:case k:return U(te+"Hours",0);case d:return U(te+"Minutes",1);case l:return U(te+"Seconds",2);case r:return U(te+"Milliseconds",3);default:return this.clone()}},b.endOf=function(x){return this.startOf(x,!1)},b.$set=function(x,E){var C,P=_.p(x),M="set"+(this.$u?"UTC":""),L=(C={},C[c]=M+"Date",C[k]=M+"Date",C[f]=M+"Month",C[p]=M+"FullYear",C[d]=M+"Hours",C[l]=M+"Minutes",C[r]=M+"Seconds",C[o]=M+"Milliseconds",C)[P],U=P===c?this.$D+(E-this.$W):E;if(P===f||P===p){var z=this.clone().set(k,1);z.$d[L](U),z.init(),this.$d=z.set(k,Math.min(this.$D,z.daysInMonth())).$d}else L&&this.$d[L](U);return this.init(),this},b.set=function(x,E){return this.clone().$set(x,E)},b.get=function(x){return this[_.p(x)]()},b.add=function(x,E){var C,P=this;x=Number(x);var M=_.p(E),L=function(q){var j=F(P);return _.w(j.date(j.date()+Math.round(q*x)),P)};if(M===f)return this.set(f,this.$M+x);if(M===p)return this.set(p,this.$y+x);if(M===c)return L(1);if(M===u)return L(7);var U=(C={},C[l]=a,C[d]=s,C[r]=t,C)[M]||1,z=this.$d.getTime()+x*U;return _.w(z,this)},b.subtract=function(x,E){return this.add(-1*x,E)},b.format=function(x){var E=this,C=this.$locale();if(!this.isValid())return C.invalidDate||g;var P=x||"YYYY-MM-DDTHH:mm:ssZ",M=_.z(this),L=this.$H,U=this.$m,z=this.$M,q=C.weekdays,j=C.months,te=C.meridiem,de=function(W,ie,ce,he){return W&&(W[ie]||W(E,P))||ce[ie].slice(0,he)},be=function(W){return _.s(L%12||12,W,"0")},re=te||function(W,ie,ce){var he=W<12?"AM":"PM";return ce?he.toLowerCase():he};return P.replace(y,(function(W,ie){return ie||(function(ce){switch(ce){case"YY":return String(E.$y).slice(-2);case"YYYY":return _.s(E.$y,4,"0");case"M":return z+1;case"MM":return _.s(z+1,2,"0");case"MMM":return de(C.monthsShort,z,j,3);case"MMMM":return de(j,z);case"D":return E.$D;case"DD":return _.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return de(C.weekdaysMin,E.$W,q,2);case"ddd":return de(C.weekdaysShort,E.$W,q,3);case"dddd":return q[E.$W];case"H":return String(L);case"HH":return _.s(L,2,"0");case"h":return be(1);case"hh":return be(2);case"a":return re(L,U,!0);case"A":return re(L,U,!1);case"m":return String(U);case"mm":return _.s(U,2,"0");case"s":return String(E.$s);case"ss":return _.s(E.$s,2,"0");case"SSS":return _.s(E.$ms,3,"0");case"Z":return M}return null})(W)||M.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(x,E,C){var P,M=this,L=_.p(E),U=F(x),z=(U.utcOffset()-this.utcOffset())*a,q=this-U,j=function(){return _.m(M,U)};switch(L){case p:P=j()/12;break;case f:P=j();break;case m:P=j()/3;break;case u:P=(q-z)/6048e5;break;case c:P=(q-z)/864e5;break;case d:P=q/s;break;case l:P=q/a;break;case r:P=q/t;break;default:P=q}return C?P:_.a(P)},b.daysInMonth=function(){return this.endOf(f).$D},b.$locale=function(){return B[this.$L]},b.locale=function(x,E){if(!x)return this.$L;var C=this.clone(),P=V(x,E,!0);return P&&(C.$L=P),C},b.clone=function(){return _.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},N})(),I=R.prototype;return F.prototype=I,[["$ms",o],["$s",r],["$m",l],["$H",d],["$W",c],["$M",f],["$y",p],["$D",k]].forEach((function(N){I[N[1]]=function(b){return this.$g(b,N[0],N[1])}})),F.extend=function(N,b){return N.$i||(N(b,R,F),N.$i=!0),F},F.locale=V,F.isDayjs=T,F.unix=function(N){return F(1e3*N)},F.en=B[S],F.Ls=B,F.p={},F}))})(Jt)),Jt.exports}var Yi=Fr();const G=St(Yi);var ei={exports:{}},Mr=ei.exports,en;function Pr(){return en||(en=1,(function(i,e){(function(t,a){i.exports=a()})(Mr,(function(){var t="minute",a=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(o,r,l){var d=r.prototype;l.utc=function(g){var h={date:g,utc:!0,args:arguments};return new r(h)},d.utc=function(g){var h=l(this.toDate(),{locale:this.$L,utc:!0});return g?h.add(this.utcOffset(),t):h},d.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=d.parse;d.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var u=d.init;d.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else u.call(this)};var f=d.utcOffset;d.utcOffset=function(g,h){var y=this.$utils().u;if(y(g))return this.$u?0:y(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=(function(S){S===void 0&&(S="");var B=S.match(a);if(!B)return null;var D=(""+B[0]).match(s)||["-",0,0],T=D[0],V=60*+D[1]+ +D[2];return V===0?0:T==="+"?V:-V})(g),g===null))return this;var v=Math.abs(g)<=16?60*g:g;if(v===0)return this.utc(h);var A=this.clone();if(h)return A.$offset=v,A.$u=!1,A;var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(A=this.local().add(v+w,t)).$offset=v,A.$x.$localOffset=w,A};var m=d.format;d.format=function(g){var h=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,h)},d.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var p=d.toDate;d.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var k=d.diff;d.diff=function(g,h,y){if(g&&this.$u===g.$u)return k.call(this,g,h,y);var v=this.local(),A=l(g).local();return k.call(v,A,h,y)}}}))})(ei)),ei.exports}var Br=Pr();const Or=St(Br);var ti={exports:{}},Lr=ti.exports,tn;function Ir(){return tn||(tn=1,(function(i,e){(function(t,a){i.exports=a()})(Lr,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},a={};return function(s,o,r){var l,d=function(m,p,k){k===void 0&&(k={});var g=new Date(m),h=(function(y,v){v===void 0&&(v={});var A=v.timeZoneName||"short",w=y+"|"+A,S=a[w];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:A}),a[w]=S),S})(p,k);return h.formatToParts(g)},c=function(m,p){for(var k=d(m,p),g=[],h=0;h<k.length;h+=1){var y=k[h],v=y.type,A=y.value,w=t[v];w>=0&&(g[w]=parseInt(A,10))}var S=g[3],B=S===24?0:S,D=g[0]+"-"+g[1]+"-"+g[2]+" "+B+":"+g[4]+":"+g[5]+":000",T=+m;return(r.utc(D).valueOf()-(T-=T%1e3))/6e4},u=o.prototype;u.tz=function(m,p){m===void 0&&(m=l);var k,g=this.utcOffset(),h=this.toDate(),y=h.toLocaleString("en-US",{timeZone:m}),v=Math.round((h-new Date(y))/1e3/60),A=15*-Math.round(h.getTimezoneOffset()/15)-v;if(!Number(A))k=this.utcOffset(0,p);else if(k=r(y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(A,!0),p){var w=k.utcOffset();k=k.add(g-w,"minute")}return k.$x.$timezone=m,k},u.offsetName=function(m){var p=this.$x.$timezone||r.tz.guess(),k=d(this.valueOf(),p,{timeZoneName:m}).find((function(g){return g.type.toLowerCase()==="timezonename"}));return k&&k.value};var f=u.startOf;u.startOf=function(m,p){if(!this.$x||!this.$x.$timezone)return f.call(this,m,p);var k=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(k,m,p).tz(this.$x.$timezone,!0)},r.tz=function(m,p,k){var g=k&&p,h=k||p||l,y=c(+r(),h);if(typeof m!="string")return r(m).tz(h);var v=(function(B,D,T){var V=B-60*D*1e3,F=c(V,T);if(D===F)return[V,D];var _=c(V-=60*(F-D)*1e3,T);return F===_?[V,F]:[B-60*Math.min(F,_)*1e3,Math.max(F,_)]})(r.utc(m,g).valueOf(),y,h),A=v[0],w=v[1],S=r(A).utcOffset(w);return S.$x.$timezone=h,S},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(m){l=m}}}))})(ti)),ti.exports}var Rr=Ir();const Ur=St(Rr);var ii={exports:{}},$r=ii.exports,an;function zr(){return an||(an=1,(function(i,e){(function(t,a){i.exports=a()})($r,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,d={},c=function(h){return(h=+h)+(h>68?1900:2e3)},u=function(h){return function(y){this[h]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),A=60*v[1]+(+v[2]||0);return A===0?0:v[0]==="+"?-A:A})(h)}],m=function(h){var y=d[h];return y&&(y.indexOf?y:y.s.concat(y.f))},p=function(h,y){var v,A=d.meridiem;if(A){for(var w=1;w<=24;w+=1)if(h.indexOf(A(w,0,y))>-1){v=w>12;break}}else v=h===(y?"pm":"PM");return v},k={A:[l,function(h){this.afternoon=p(h,!1)}],a:[l,function(h){this.afternoon=p(h,!0)}],Q:[s,function(h){this.month=3*(h-1)+1}],S:[s,function(h){this.milliseconds=100*+h}],SS:[o,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(h){var y=d.ordinal,v=h.match(/\d+/);if(this.day=v[0],y)for(var A=1;A<=31;A+=1)y(A).replace(/\[|\]/g,"")===h&&(this.day=A)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(h){var y=m("months"),v=(m("monthsShort")||y.map((function(A){return A.slice(0,3)}))).indexOf(h)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[l,function(h){var y=m("months").indexOf(h)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(h){this.year=c(h)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function g(h){var y,v;y=h,v=d&&d.formats;for(var A=(h=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(F,_,R){var I=R&&R.toUpperCase();return _||v[R]||t[R]||v[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,b,x){return b||x.slice(1)}))}))).match(a),w=A.length,S=0;S<w;S+=1){var B=A[S],D=k[B],T=D&&D[0],V=D&&D[1];A[S]=V?{regex:T,parser:V}:B.replace(/^\[|\]$/g,"")}return function(F){for(var _={},R=0,I=0;R<w;R+=1){var N=A[R];if(typeof N=="string")I+=N.length;else{var b=N.regex,x=N.parser,E=F.slice(I),C=b.exec(E)[0];x.call(_,C),F=F.replace(C,"")}}return(function(P){var M=P.afternoon;if(M!==void 0){var L=P.hours;M?L<12&&(P.hours+=12):L===12&&(P.hours=0),delete P.afternoon}})(_),_}}return function(h,y,v){v.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(c=h.parseTwoDigitYear);var A=y.prototype,w=A.parse;A.parse=function(S){var B=S.date,D=S.utc,T=S.args;this.$u=D;var V=T[1];if(typeof V=="string"){var F=T[2]===!0,_=T[3]===!0,R=F||_,I=T[2];_&&(I=T[2]),d=this.$locale(),!F&&I&&(d=v.Ls[I]),this.$d=(function(E,C,P,M){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*E);var L=g(C)(E),U=L.year,z=L.month,q=L.day,j=L.hours,te=L.minutes,de=L.seconds,be=L.milliseconds,re=L.zone,W=L.week,ie=new Date,ce=q||(U||z?1:ie.getDate()),he=U||ie.getFullYear(),Re=0;U&&!z||(Re=z>0?z-1:ie.getMonth());var Ue,at=j||0,nt=te||0,st=de||0,ot=be||0;return re?new Date(Date.UTC(he,Re,ce,at,nt,st,ot+60*re.offset*1e3)):P?new Date(Date.UTC(he,Re,ce,at,nt,st,ot)):(Ue=new Date(he,Re,ce,at,nt,st,ot),W&&(Ue=M(Ue).week(W).toDate()),Ue)}catch{return new Date("")}})(B,V,D,v),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),R&&B!=this.format(V)&&(this.$d=new Date("")),d={}}else if(V instanceof Array)for(var N=V.length,b=1;b<=N;b+=1){T[1]=V[b-1];var x=v.apply(this,T);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}b===N&&(this.$d=new Date(""))}else w.call(this,S)}}}))})(ii)),ii.exports}var qr=zr();const Yr=St(qr);var ai={exports:{}},Hr=ai.exports,nn;function jr(){return nn||(nn=1,(function(i,e){(function(t,a){i.exports=a()})(Hr,(function(){return function(t,a,s){var o=a.prototype,r=function(m){var p,k=m.date,g=m.utc,h={};if(!((p=k)===null||p instanceof Date||p instanceof Array||o.$utils().u(p)||p.constructor.name!=="Object")){if(!Object.keys(k).length)return new Date;var y=g?s.utc():s();Object.keys(k).forEach((function(V){var F,_;h[F=V,_=o.$utils().p(F),_==="date"?"day":_]=k[V]}));var v=h.day||(h.year||h.month>=0?1:y.date()),A=h.year||y.year(),w=h.month>=0?h.month:h.year||h.day?0:y.month(),S=h.hour||0,B=h.minute||0,D=h.second||0,T=h.millisecond||0;return g?new Date(Date.UTC(A,w,v,S,B,D,T)):new Date(A,w,v,S,B,D,T)}return k},l=o.parse;o.parse=function(m){m.date=r.bind(this)(m),l.bind(this)(m)};var d=o.set,c=o.add,u=o.subtract,f=function(m,p,k,g){g===void 0&&(g=1);var h=Object.keys(p),y=this;return h.forEach((function(v){y=m.bind(y)(p[v]*g,v)})),y};o.set=function(m,p){return p=p===void 0?m:p,m.constructor.name==="Object"?f.bind(this)((function(k,g){return d.bind(this)(g,k)}),p,m):d.bind(this)(m,p)},o.add=function(m,p){return m.constructor.name==="Object"?f.bind(this)(c,m,p):c.bind(this)(m,p)},o.subtract=function(m,p){return m.constructor.name==="Object"?f.bind(this)(c,m,p,-1):u.bind(this)(m,p)}}}))})(ai)),ai.exports}var Wr=jr();const Qr=St(Wr);G.extend(Or),G.extend(Ur),G.extend(Yr),G.extend(Qr);const sn=(i,e)=>{if(i===null||i==="")i=G();else if(!Yi.isDayjs(i))throw new Error("Date is not a Dayjs instance");let t=e.split(":"),a=parseInt(t[0]),s=parseInt(t[1]);return G(i).hour(a).minute(s)},on=(i,e)=>{if(i===null||i==="")i=G();else if(!Yi.isDayjs(i))throw new Error("Date is not a Dayjs instance");return G(e).hour(i.hour()).minute(i.minute())};function Ct(){return{setTimeToFormField:(i,e,t)=>{i[e]=sn(i[e],t)},setDateToFormField:(i,e,t)=>{i[e]=on(i[e],t)},convertStringDateToDayjs:(i,e)=>i?e?G.tz(i,e):G.tz(i):null,getDateFormat:i=>{function e(t){return/^[+-]?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(t)&&new Date(parseInt(t)).getTime()>0}return i?G.isDayjs(i)?i.format("YYYY-MM-DD"):/(\d{4})-(\d{2})-(\d{2})T/.test(i)&&G(i).isValid()?G(i).tz().format("YYYY-MM-DD"):/(\d{4})-(\d{2})-(\d{2})/.test(i)?i:(e(i),G(parseInt(i)).tz().format("YYYY-MM-DD")):null},getDateTimeFormat:(i,e=!1,t=!1)=>{function a(o){return/^[+-]?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(o)&&new Date(parseInt(o)).getTime()>0}if(!i)return null;let s="YYYY-MM-DD HH:mm";return e&&(s+=":ss"),t&&(s+=":SSS"),G.isDayjs(i)?i.format(s):/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/.test(i)&&G(i).isValid()?G(i).tz().format(s):/(\d{4})-(\d{2})-(\d{2})( (\d{2}):(\d{2})(:(\d{2}))?)?/.test(i)?i:(a(i),G(parseInt(i)).tz().format(s))},getTimeFormat:(i,e=!1)=>{if(!i)return null;let t="HH:mm";return e&&(t+=":ss"),G.isDayjs(i)?i.format(t):/(\d{2}):(\d{2})(:(\d{2}))?/.test(i)?i:G(parseInt(i)).tz().format(t)},getDateTimeCustomFormat:(i,e,t)=>i?(t||(t=G.tz.guess()),e||(e="YYYY-MM-DD HH:mm:ss"),G.isDayjs(i)?i.tz(t).format(e):/(\d{4})-(\d{2})-(\d{2})( (\d{2}):(\d{2})(:(\d{2}))?)?/.test(i)?i:G(parseInt(i)).tz(t).format(e)):null}}const Hi={__name:"DateInput",props:{modelValue:{type:[String,Object]},closeOnContentClick:{type:Boolean,default:!1},error:{type:Boolean},errorMessages:{type:Array},label:{type:String},color:{type:String,default:"secondary"},prependIcon:{type:String,default:"date_range"},prependInnerIcon:{type:String},rules:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},outlined:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},solo:{type:Boolean,default:!1},variant:{type:String},readonly:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1},width:{type:String,default:null},allowedDates:{type:[Object,Function,Array],default:null}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const{getDateFormat:a,convertStringDateToDayjs:s}=Ct(),o=i,r=t,l=n.ref(!1),d=n.ref(null),c=n.computed({get(){return a(o.modelValue)},set(u){r("update:modelValue",s(u))}});return e({validate:async()=>{if(d.value){const{valid:u}=await d.value.validate();return u}return!1}}),(u,f)=>(n.openBlock(),n.createBlock(Wt.VMenu,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value=m),"close-on-content-click":i.closeOnContentClick,transition:"scale-transition",location:"bottom","min-width":"290px"},{activator:n.withCtx(({props:m})=>[n.createVNode(le.VTextField,n.mergeProps({ref_key:"dateField",ref:d,modelValue:c.value,"onUpdate:modelValue":f[0]||(f[0]=p=>c.value=p),label:i.label,"prepend-icon":i.prependIcon==="date_range"?"mdi-calendar":i.prependIcon,"prepend-inner-icon":i.prependInnerIcon},m,{rules:i.rules,error:i.error,"error-messages":i.errorMessages,color:i.color,style:{width:i.width,maxWidth:i.width},clearable:i.clearable,variant:i.variant?i.variant:i.outlined?"outlined":i.solo?"solo":"underlined",disabled:i.disabled,readonly:i.readonly,"hide-details":i.hideDetails,density:i.dense?"compact":"default"}),{message:n.withCtx(()=>[n.renderSlot(u.$slots,"message")]),"prepend-inner":n.withCtx(()=>[n.renderSlot(u.$slots,"prepend-inner")]),prepend:n.withCtx(()=>[n.renderSlot(u.$slots,"prepend")]),_:3},16,["modelValue","label","prepend-icon","prepend-inner-icon","rules","error","error-messages","color","style","clearable","variant","disabled","readonly","hide-details","density"])]),default:n.withCtx(()=>[n.createVNode(Vo.VDatePicker,{modelValue:c.value,"onUpdate:modelValue":[f[1]||(f[1]=m=>c.value=m),f[2]||(f[2]=m=>l.value=!1)],"allowed-dates":i.allowedDates},null,8,["modelValue","allowed-dates"])]),_:3},8,["modelValue","close-on-content-click"]))}},Gr={__name:"TimeInput",props:{modelValue:{type:[String,Object]},closeOnContentClick:{type:Boolean,default:!1},error:{type:Boolean},errorMessages:{type:Array},label:{type:String},rules:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},format:{type:String,default:"24hr"},prependIcon:{type:String,default:"query_builder"},prependInnerIcon:{type:String},variant:{type:String},outlined:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},solo:{type:Boolean,default:!1},readonly:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const{getTimeFormat:a}=Ct(),s=i,o=t,r=n.ref(!1),l=n.ref(null),d=n.computed({get:()=>a(s.modelValue),set:c=>o("update:modelValue",c)});return e({validate:async()=>{if(l.value){const{valid:c}=await l.value.validate();return c}return!1}}),(c,u)=>(n.openBlock(),n.createBlock(Wt.VMenu,{modelValue:r.value,"onUpdate:modelValue":u[2]||(u[2]=f=>r.value=f),"close-on-content-click":i.closeOnContentClick,transition:"scale-transition",location:"bottom","min-width":"290px"},{activator:n.withCtx(({props:f})=>[n.createVNode(le.VTextField,n.mergeProps({ref_key:"timeField",ref:l},f,{modelValue:d.value,"onUpdate:modelValue":u[0]||(u[0]=m=>d.value=m),label:i.label,"prepend-icon":i.prependIcon==="query_builder"?"mdi-clock-outline":i.prependIcon,"prepend-inner-icon":i.prependInnerIcon,rules:i.rules,error:i.error,"error-messages":i.errorMessages,color:"secondary",clearable:i.clearable,variant:i.variant?i.variant:i.outlined?"outlined":i.solo?"solo":"underlined",disabled:i.disabled,readonly:i.readonly,"hide-details":i.hideDetails,density:i.dense?"compact":"default"}),null,16,["modelValue","label","prepend-icon","prepend-inner-icon","rules","error","error-messages","clearable","variant","disabled","readonly","hide-details","density"])]),default:n.withCtx(()=>[n.createVNode(Do.VTimePicker,{modelValue:d.value,"onUpdate:modelValue":u[1]||(u[1]=f=>d.value=f),format:i.format},null,8,["modelValue","format"])]),_:1},8,["modelValue","close-on-content-click"]))}},rn={__name:"DateTimeInput",props:{modelValue:{type:[String,Object]},closeOnContentClick:{type:Boolean,default:!1},error:{type:Boolean},errorMessages:{type:Array},label:{type:String},dateRules:{type:Array,default:()=>[]},timeRules:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},timeFormat:{type:String,default:"24hr"},outlined:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},solo:{type:Boolean,default:!1},readonly:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1},variant:{type:String},color:{type:String},prependInnerIcon:{type:String},density:{type:String},defaultTime:{type:String,default:"23:59"}},emits:["update:modelValue"],setup(i,{expose:e,emit:t}){const{convertStringDateToDayjs:a}=Ct(),s=i,o=t,r=n.ref(null),l=n.ref(null),d=u=>{let f=s.modelValue?a(s.modelValue):null;!f&&s.defaultTime&&(f=G().hour(parseInt(s.defaultTime.split(":")[0])).minute(parseInt(s.defaultTime.split(":")[1])).second(0));const m=on(f,u);o("update:modelValue",m)},c=u=>{const f=s.modelValue?a(s.modelValue):G(),m=sn(f,u);o("update:modelValue",m)};return e({validate:async()=>{let u=!0,f=!0;return r.value&&(u=await r.value.validate()),l.value&&(f=await l.value.validate()),u&&f}}),(u,f)=>(n.openBlock(),n.createBlock(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(Hi),{ref_key:"date",ref:r,"model-value":i.modelValue,"onUpdate:modelValue":d,rules:i.dateRules,clearable:i.clearable,solo:i.solo,outlined:i.outlined,disabled:i.disabled,readonly:i.readonly,"hide-details":i.hideDetails,dense:i.dense,density:i.density,variant:i.variant,color:i.color,"prepend-inner-icon":i.prependInnerIcon,label:i.label},null,8,["model-value","rules","clearable","solo","outlined","disabled","readonly","hide-details","dense","density","variant","color","prepend-inner-icon","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(Gr),{ref_key:"time",ref:l,"model-value":i.modelValue,"onUpdate:modelValue":c,rules:i.timeRules,format:i.timeFormat,clearable:i.clearable,solo:i.solo,outlined:i.outlined,disabled:i.disabled,readonly:i.readonly,"hide-details":i.hideDetails,dense:i.dense,density:i.density,variant:i.variant,color:i.color},null,8,["model-value","rules","format","clearable","solo","outlined","disabled","readonly","hide-details","dense","density","variant","color"])]),_:1})]),_:1}))}},Xr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchMediaVariables"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fetchMediaVariables"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"maxFileSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileExpirationTime"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:147,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query fetchMediaVariables {
134
+ fetchMediaVariables {
135
+ maxFileSize
136
+ fileExpirationTime
137
+ }
138
+ }
139
+ `}}},Kr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"userStorageFetch"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userStorageFetch"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"capacity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usedSpace"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxFileSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileExpirationTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteByLastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteByCreatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filesPrivacy"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:337,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query userStorageFetch{
140
+ userStorageFetch{
141
+ id
142
+ user {
143
+ name
144
+ username
145
+ id
146
+ }
147
+ capacity
148
+ usedSpace
149
+ maxFileSize
150
+ fileExpirationTime
151
+ deleteByLastAccess
152
+ deleteByCreatedAt
153
+ filesPrivacy
154
+ }
155
+ }
156
+ `}}},Zr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"userStorageFindByUser"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userStorageFindByUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"capacity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usedSpace"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxFileSize"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileExpirationTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteByLastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteByCreatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filesPrivacy"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:349,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query userStorageFindByUser {
157
+ userStorageFindByUser {
158
+ id
159
+ user {
160
+ name
161
+ username
162
+ id
163
+ }
164
+ capacity
165
+ usedSpace
166
+ maxFileSize
167
+ fileExpirationTime
168
+ deleteByLastAccess
169
+ deleteByCreatedAt
170
+ filesPrivacy
171
+ }
172
+ }
173
+ `}}},Jr={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"userStorageUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"capacity"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"usedSpace"}},type:{kind:"NamedType",name:{kind:"Name",value:"Float"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"maxFileSize"}},type:{kind:"NamedType",name:{kind:"Name",value:"Float"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"fileExpirationTime"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deleteByLastAccess"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deleteByCreatedAt"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filesPrivacy"}},type:{kind:"NamedType",name:{kind:"Name",value:"userStorageFilesPrivacyValues"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userStorageUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"capacity"},value:{kind:"Variable",name:{kind:"Name",value:"capacity"}}},{kind:"ObjectField",name:{kind:"Name",value:"usedSpace"},value:{kind:"Variable",name:{kind:"Name",value:"usedSpace"}}},{kind:"ObjectField",name:{kind:"Name",value:"maxFileSize"},value:{kind:"Variable",name:{kind:"Name",value:"maxFileSize"}}},{kind:"ObjectField",name:{kind:"Name",value:"fileExpirationTime"},value:{kind:"Variable",name:{kind:"Name",value:"fileExpirationTime"}}},{kind:"ObjectField",name:{kind:"Name",value:"deleteByLastAccess"},value:{kind:"Variable",name:{kind:"Name",value:"deleteByLastAccess"}}},{kind:"ObjectField",name:{kind:"Name",value:"deleteByCreatedAt"},value:{kind:"Variable",name:{kind:"Name",value:"deleteByCreatedAt"}}},{kind:"ObjectField",name:{kind:"Name",value:"filesPrivacy"},value:{kind:"Variable",name:{kind:"Name",value:"filesPrivacy"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"capacity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"usedSpace"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fileExpirationTime"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteByLastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteByCreatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filesPrivacy"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:837,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`mutation userStorageUpdate(
174
+ $id: ID!,
175
+ $name:String!,
176
+ $capacity:Float!,
177
+ $usedSpace:Float,
178
+ $maxFileSize: Float,
179
+ $fileExpirationTime: Int,
180
+ $deleteByLastAccess: Boolean,
181
+ $deleteByCreatedAt: Boolean
182
+ $filesPrivacy: userStorageFilesPrivacyValues
183
+ ){
184
+ userStorageUpdate(id: $id, input: {
185
+ name: $name,
186
+ capacity: $capacity,
187
+ usedSpace: $usedSpace,
188
+ maxFileSize: $maxFileSize,
189
+ fileExpirationTime: $fileExpirationTime,
190
+ deleteByLastAccess: $deleteByLastAccess,
191
+ deleteByCreatedAt: $deleteByCreatedAt,
192
+ filesPrivacy: $filesPrivacy
193
+ }){
194
+ id
195
+ name
196
+ capacity
197
+ usedSpace
198
+ fileExpirationTime
199
+ deleteByLastAccess
200
+ deleteByCreatedAt
201
+ filesPrivacy
202
+ }
203
+ }`}}};let el=class{constructor(){this.gqlc=null}setGqlc(e){this.gqlc=e}fetchMediaVariables(){return this.gqlc.query({query:Xr,fetchPolicy:"network-only"})}fetchUserStorage(){return this.gqlc.query({query:Kr,fetchPolicy:"network-only"})}findUserStorageByUser(){return this.gqlc.query({query:Zr,fetchPolicy:"network-only"})}updateUserStorage(e){return this.gqlc.mutate({mutation:Jr,variables:e,fetchPolicy:"no-cache"})}};const We=new el,tl={class:"d-flex flex-column align-center"},il=["accept"],al={class:"mb-0 mt-5 text-body-1"},ln={__name:"FileUploadButton",props:{accept:{type:String,default:"*"},loading:{type:Boolean,default:!1},xLarge:{type:Boolean,default:!1},maxFileSize:{type:Number,default:0},errorMessage:{type:String},uploadedFile:{type:Object},updating:{type:Boolean,default:!1},oldFileExtension:{type:String}},emits:["fileSelected"],setup(i,{emit:e}){const t=i,a=e,s=n.ref(null),o=n.ref(!1),r=n.ref(!1),l=n.ref(null),d=n.computed(()=>!!s.value),c=n.computed(()=>t.loading?k.loading:t.errorMessage?k.error:t.uploadedFile?k.uploaded:d.value?k.selected:k.initial),u=n.computed(()=>t.uploadedFile&&t.uploadedFile.type==="image"),f=n.computed(()=>t.uploadedFile&&t.uploadedFile.type==="audio"),m=n.computed(()=>t.uploadedFile&&t.uploadedFile.type==="video"),p=n.computed(()=>t.uploadedFile&&t.uploadedFile.url?t.uploadedFile.url:null),k={initial:{color:"blue-grey",icon:"mdi-cloud-upload"},selected:{color:"cyan-darken-3",icon:"mdi-check-circle"},loading:{color:"amber-darken-3",icon:""},uploaded:{color:"green-darken-3",icon:"mdi-magnify-plus"},error:{color:"red-darken-3",icon:"mdi-alert"}},g=()=>{l.value.click()},h=()=>{(s.value&&s.value.size?s.value.size/1048576:null)>t.maxFileSize&&(o.value=!0)},y=async()=>{const w="."+s.value.name.split(".").pop();t.oldFileExtension!=w?(r.value=!0,s.value=null):r.value=!1},v=w=>{s.value=w.target.files[0],s.value&&(h(),t.updating&&y(),a("fileSelected",s.value))},A=()=>{s.value=null,o.value=!1,r.value=!1};return(w,S)=>(n.openBlock(),n.createElementBlock("div",tl,[n.createElementVNode("input",{type:"file",style:{display:"none"},ref_key:"fileInput",ref:l,accept:i.accept,onChange:v},null,40,il),n.createVNode(H.VBtn,{onClick:S[0]||(S[0]=B=>g()),icon:"",color:c.value.color,loading:i.loading,size:i.xLarge?"x-large":"large"},{default:n.withCtx(()=>[u.value?(n.openBlock(),n.createBlock(lt.VAvatar,{key:0,size:"inherit"},{default:n.withCtx(()=>[n.createVNode(dt.VImg,{src:p.value,alt:"image"},null,8,["src"])]),_:1})):f.value?(n.openBlock(),n.createBlock(Q.VIcon,{key:1},{default:n.withCtx(()=>[...S[1]||(S[1]=[n.createTextVNode("mdi-headset",-1)])]),_:1})):m.value?(n.openBlock(),n.createBlock(Q.VIcon,{key:2},{default:n.withCtx(()=>[...S[2]||(S[2]=[n.createTextVNode("mdi-videocam",-1)])]),_:1})):(n.openBlock(),n.createBlock(Q.VIcon,{key:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(c.value.icon),1)]),_:1}))]),_:1},8,["color","loading","size"]),n.createElementVNode("p",al,n.toDisplayString(s.value?s.value.name:w.$t("media.file.chooseFile")),1),o.value?(n.openBlock(),n.createBlock($e.VAlert,{key:0,class:"mt-3",border:"start",type:"error",variant:"tonal",density:"compact"},{append:n.withCtx(()=>[n.createVNode(H.VBtn,{variant:"text",color:"error",onClick:A,class:"ml-2"},{default:n.withCtx(()=>[...S[3]||(S[3]=[n.createTextVNode("OK",-1)])]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w.$t("media.file.fileSizeExceeded"))+" "+n.toDisplayString(i.maxFileSize)+" Mb ",1)]),_:1})):n.createCommentVNode("",!0),r.value?(n.openBlock(),n.createBlock($e.VAlert,{key:1,class:"mt-3",border:"start",type:"error",variant:"tonal",density:"compact"},{append:n.withCtx(()=>[n.createVNode(H.VBtn,{variant:"text",color:"error",onClick:A,class:"ml-2"},{default:n.withCtx(()=>[...S[4]||(S[4]=[n.createTextVNode("OK",-1)])]),_:1})]),default:n.withCtx(()=>[S[5]||(S[5]=n.createTextVNode(" El nuevo fichero debe tener la misma extension que el original ",-1))]),_:1})):n.createCommentVNode("",!0)]))}};class nl extends Error{}nl.prototype.name="InvalidTokenError";function wt(i){return i+.5|0}const ze=(i,e,t)=>Math.max(Math.min(i,t),e);function Et(i){return ze(wt(i*2.55),0,255)}function qe(i){return ze(wt(i*255),0,255)}function Be(i){return ze(wt(i/2.55)/100,0,1)}function dn(i){return ze(wt(i*100),0,100)}const Se={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ji=[..."0123456789ABCDEF"],sl=i=>ji[i&15],ol=i=>ji[(i&240)>>4]+ji[i&15],ni=i=>(i&240)>>4===(i&15),rl=i=>ni(i.r)&&ni(i.g)&&ni(i.b)&&ni(i.a);function ll(i){var e=i.length,t;return i[0]==="#"&&(e===4||e===5?t={r:255&Se[i[1]]*17,g:255&Se[i[2]]*17,b:255&Se[i[3]]*17,a:e===5?Se[i[4]]*17:255}:(e===7||e===9)&&(t={r:Se[i[1]]<<4|Se[i[2]],g:Se[i[3]]<<4|Se[i[4]],b:Se[i[5]]<<4|Se[i[6]],a:e===9?Se[i[7]]<<4|Se[i[8]]:255})),t}const dl=(i,e)=>i<255?e(i):"";function cl(i){var e=rl(i)?sl:ol;return i?"#"+e(i.r)+e(i.g)+e(i.b)+dl(i.a,e):void 0}const ul=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function cn(i,e,t){const a=e*Math.min(t,1-t),s=(o,r=(o+i/30)%12)=>t-a*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function ml(i,e,t){const a=(s,o=(s+i/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[a(5),a(3),a(1)]}function fl(i,e,t){const a=cn(i,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)a[s]*=1-e-t,a[s]+=e;return a}function hl(i,e,t,a,s){return i===s?(e-t)/a+(e<t?6:0):e===s?(t-i)/a+2:(i-e)/a+4}function Wi(i){const t=i.r/255,a=i.g/255,s=i.b/255,o=Math.max(t,a,s),r=Math.min(t,a,s),l=(o+r)/2;let d,c,u;return o!==r&&(u=o-r,c=l>.5?u/(2-o-r):u/(o+r),d=hl(t,a,s,u,o),d=d*60+.5),[d|0,c||0,l]}function Qi(i,e,t,a){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,a)).map(qe)}function Gi(i,e,t){return Qi(cn,i,e,t)}function pl(i,e,t){return Qi(fl,i,e,t)}function gl(i,e,t){return Qi(ml,i,e,t)}function un(i){return(i%360+360)%360}function kl(i){const e=ul.exec(i);let t=255,a;if(!e)return;e[5]!==a&&(t=e[6]?Et(+e[5]):qe(+e[5]));const s=un(+e[2]),o=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?a=pl(s,o,r):e[1]==="hsv"?a=gl(s,o,r):a=Gi(s,o,r),{r:a[0],g:a[1],b:a[2],a:t}}function yl(i,e){var t=Wi(i);t[0]=un(t[0]+e),t=Gi(t),i.r=t[0],i.g=t[1],i.b=t[2]}function bl(i){if(!i)return;const e=Wi(i),t=e[0],a=dn(e[1]),s=dn(e[2]);return i.a<255?`hsla(${t}, ${a}%, ${s}%, ${Be(i.a)})`:`hsl(${t}, ${a}%, ${s}%)`}const mn={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},fn={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function vl(){const i={},e=Object.keys(fn),t=Object.keys(mn);let a,s,o,r,l;for(a=0;a<e.length;a++){for(r=l=e[a],s=0;s<t.length;s++)o=t[s],l=l.replace(o,mn[o]);o=parseInt(fn[r],16),i[l]=[o>>16&255,o>>8&255,o&255]}return i}let si;function Al(i){si||(si=vl(),si.transparent=[0,0,0,0]);const e=si[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const xl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Nl(i){const e=xl.exec(i);let t=255,a,s,o;if(e){if(e[7]!==a){const r=+e[7];t=e[8]?Et(r):ze(r*255,0,255)}return a=+e[1],s=+e[3],o=+e[5],a=255&(e[2]?Et(a):ze(a,0,255)),s=255&(e[4]?Et(s):ze(s,0,255)),o=255&(e[6]?Et(o):ze(o,0,255)),{r:a,g:s,b:o,a:t}}}function Sl(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Be(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Xi=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ct=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Cl(i,e,t){const a=ct(Be(i.r)),s=ct(Be(i.g)),o=ct(Be(i.b));return{r:qe(Xi(a+t*(ct(Be(e.r))-a))),g:qe(Xi(s+t*(ct(Be(e.g))-s))),b:qe(Xi(o+t*(ct(Be(e.b))-o))),a:i.a+t*(e.a-i.a)}}function oi(i,e,t){if(i){let a=Wi(i);a[e]=Math.max(0,Math.min(a[e]+a[e]*t,e===0?360:1)),a=Gi(a),i.r=a[0],i.g=a[1],i.b=a[2]}}function hn(i,e){return i&&Object.assign(e||{},i)}function pn(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=qe(i[3]))):(e=hn(i,{r:0,g:0,b:0,a:1}),e.a=qe(e.a)),e}function wl(i){return i.charAt(0)==="r"?Nl(i):kl(i)}class _t{constructor(e){if(e instanceof _t)return e;const t=typeof e;let a;t==="object"?a=pn(e):t==="string"&&(a=ll(e)||Al(e)||wl(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=hn(this._rgb);return e&&(e.a=Be(e.a)),e}set rgb(e){this._rgb=pn(e)}rgbString(){return this._valid?Sl(this._rgb):void 0}hexString(){return this._valid?cl(this._rgb):void 0}hslString(){return this._valid?bl(this._rgb):void 0}mix(e,t){if(e){const a=this.rgb,s=e.rgb;let o;const r=t===o?.5:t,l=2*r-1,d=a.a-s.a,c=((l*d===-1?l:(l+d)/(1+l*d))+1)/2;o=1-c,a.r=255&c*a.r+o*s.r+.5,a.g=255&c*a.g+o*s.g+.5,a.b=255&c*a.b+o*s.b+.5,a.a=r*a.a+(1-r)*s.a,this.rgb=a}return this}interpolate(e,t){return e&&(this._rgb=Cl(this._rgb,e._rgb,t)),this}clone(){return new _t(this.rgb)}alpha(e){return this._rgb.a=qe(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=wt(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return oi(this._rgb,2,e),this}darken(e){return oi(this._rgb,2,-e),this}saturate(e){return oi(this._rgb,1,e),this}desaturate(e){return oi(this._rgb,1,-e),this}rotate(e){return yl(this._rgb,e),this}}function Oe(){}const El=(()=>{let i=0;return()=>i++})();function ae(i){return i==null}function me(i){if(Array.isArray&&Array.isArray(i))return!0;const e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function X(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function Ce(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function De(i,e){return Ce(i)?i:e}function K(i,e){return typeof i>"u"?e:i}const _l=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function J(i,e,t){if(i&&typeof i.call=="function")return i.apply(t,e)}function Z(i,e,t,a){let s,o,r;if(me(i))for(o=i.length,s=0;s<o;s++)e.call(t,i[s],s);else if(X(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)e.call(t,i[r[s]],r[s])}function ri(i,e){let t,a,s,o;if(!i||!e||i.length!==e.length)return!1;for(t=0,a=i.length;t<a;++t)if(s=i[t],o=e[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function li(i){if(me(i))return i.map(li);if(X(i)){const e=Object.create(null),t=Object.keys(i),a=t.length;let s=0;for(;s<a;++s)e[t[s]]=li(i[t[s]]);return e}return i}function gn(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Vl(i,e,t,a){if(!gn(i))return;const s=e[i],o=t[i];X(s)&&X(o)?Vt(s,o,a):e[i]=li(o)}function Vt(i,e,t){const a=me(e)?e:[e],s=a.length;if(!X(i))return i;t=t||{};const o=t.merger||Vl;let r;for(let l=0;l<s;++l){if(r=a[l],!X(r))continue;const d=Object.keys(r);for(let c=0,u=d.length;c<u;++c)o(d[c],i,r,t)}return i}function Dt(i,e){return Vt(i,e,{merger:Dl})}function Dl(i,e,t){if(!gn(i))return;const a=e[i],s=t[i];X(a)&&X(s)?Dt(a,s):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=li(s))}const kn={"":i=>i,x:i=>i.x,y:i=>i.y};function Tl(i){const e=i.split("."),t=[];let a="";for(const s of e)a+=s,a.endsWith("\\")?a=a.slice(0,-1)+".":(t.push(a),a="");return t}function Fl(i){const e=Tl(i);return t=>{for(const a of e){if(a==="")break;t=t&&t[a]}return t}}function di(i,e){return(kn[e]||(kn[e]=Fl(e)))(i)}function Ki(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ci=i=>typeof i<"u",Ye=i=>typeof i=="function",yn=(i,e)=>{if(i.size!==e.size)return!1;for(const t of i)if(!e.has(t))return!1;return!0};function Ml(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const ee=Math.PI,ye=2*ee,ui=Number.POSITIVE_INFINITY,Pl=ee/180,fe=ee/2,Qe=ee/4,bn=ee*2/3,vn=Math.log10,mi=Math.sign;function fi(i,e,t){return Math.abs(i-e)<t}function An(i){const e=Math.round(i);i=fi(i,e,i/1e3)?e:i;const t=Math.pow(10,Math.floor(vn(i))),a=i/t;return(a<=1?1:a<=2?2:a<=5?5:10)*t}function Bl(i){const e=[],t=Math.sqrt(i);let a;for(a=1;a<t;a++)i%a===0&&(e.push(a),e.push(i/a));return t===(t|0)&&e.push(t),e.sort((s,o)=>s-o).pop(),e}function Ol(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function hi(i){return!Ol(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Ll(i,e){const t=Math.round(i);return t-e<=i&&t+e>=i}function Il(i,e,t){let a,s,o;for(a=0,s=i.length;a<s;a++)o=i[a][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Ge(i){return i*(ee/180)}function Rl(i){return i*(180/ee)}function xn(i){if(!Ce(i))return;let e=1,t=0;for(;Math.round(i*e)/e!==i;)e*=10,t++;return t}function Nn(i,e){const t=e.x-i.x,a=e.y-i.y,s=Math.sqrt(t*t+a*a);let o=Math.atan2(a,t);return o<-.5*ee&&(o+=ye),{angle:o,distance:s}}function Ul(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function Te(i){return(i%ye+ye)%ye}function Sn(i,e,t,a){const s=Te(i),o=Te(e),r=Te(t),l=Te(o-s),d=Te(r-s),c=Te(s-o),u=Te(s-r);return s===o||s===r||a&&o===r||l>d&&c<u}function ve(i,e,t){return Math.max(e,Math.min(t,i))}function $l(i){return ve(i,-32768,32767)}function Xe(i,e,t,a=1e-6){return i>=Math.min(e,t)-a&&i<=Math.max(e,t)+a}function Zi(i,e,t){t=t||(r=>i[r]<e);let a=i.length-1,s=0,o;for(;a-s>1;)o=s+a>>1,t(o)?s=o:a=o;return{lo:s,hi:a}}const Ji=(i,e,t,a)=>Zi(i,t,a?s=>{const o=i[s][e];return o<t||o===t&&i[s+1][e]===t}:s=>i[s][e]<t),zl=(i,e,t)=>Zi(i,t,a=>i[a][e]>=t);function ql(i,e,t){let a=0,s=i.length;for(;a<s&&i[a]<e;)a++;for(;s>a&&i[s-1]>t;)s--;return a>0||s<i.length?i.slice(a,s):i}const Cn=["push","pop","shift","splice","unshift"];function Yl(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Cn.forEach(t=>{const a="_onData"+Ki(t),s=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return i._chartjs.listeners.forEach(l=>{typeof l[a]=="function"&&l[a](...o)}),r}})})}function wn(i,e){const t=i._chartjs;if(!t)return;const a=t.listeners,s=a.indexOf(e);s!==-1&&a.splice(s,1),!(a.length>0)&&(Cn.forEach(o=>{delete i[o]}),delete i._chartjs)}function Hl(i){const e=new Set(i);return e.size===i.length?i:Array.from(e)}const En=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function _n(i,e){let t=[],a=!1;return function(...s){t=s,a||(a=!0,En.call(window,()=>{a=!1,i.apply(e,t)}))}}function jl(i,e){let t;return function(...a){return e?(clearTimeout(t),t=setTimeout(i,e,a)):i.apply(this,a),e}}const ea=i=>i==="start"?"left":i==="end"?"right":"center",pe=(i,e,t)=>i==="start"?e:i==="end"?t:(e+t)/2,Wl=(i,e,t,a)=>i===(a?"left":"right")?t:i==="center"?(e+t)/2:e,pi=i=>i===0||i===1,Vn=(i,e,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*ye/t)),Dn=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*ye/t)+1,Tt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*fe)+1,easeOutSine:i=>Math.sin(i*fe),easeInOutSine:i=>-.5*(Math.cos(ee*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>pi(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>pi(i)?i:Vn(i,.075,.3),easeOutElastic:i=>pi(i)?i:Dn(i,.075,.3),easeInOutElastic(i){return pi(i)?i:i<.5?.5*Vn(i*2,.1125,.45):.5+.5*Dn(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-Tt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Tt.easeInBounce(i*2)*.5:Tt.easeOutBounce(i*2-1)*.5+.5};function Tn(i){if(i&&typeof i=="object"){const e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Fn(i){return Tn(i)?i:new _t(i)}function ta(i){return Tn(i)?i:new _t(i).saturate(.5).darken(.1).hexString()}const Ql=["x","y","borderWidth","radius","tension"],Gl=["color","borderColor","backgroundColor"];function Xl(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:Gl},numbers:{type:"number",properties:Ql}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Kl(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Mn=new Map;function Zl(i,e){e=e||{};const t=i+JSON.stringify(e);let a=Mn.get(t);return a||(a=new Intl.NumberFormat(i,e),Mn.set(t,a)),a}function Pn(i,e,t){return Zl(e,t).format(i)}const Jl={values(i){return me(i)?i:""+i},numeric(i,e,t){if(i===0)return"0";const a=this.chart.options.locale;let s,o=i;if(t.length>1){const c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=ed(i,t)}const r=vn(Math.abs(o)),l=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),d={notation:s,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(d,this.options.ticks.format),Pn(i,a,d)}};function ed(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var Bn={formatters:Jl};function td(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Bn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ke=Object.create(null),ia=Object.create(null);function Ft(i,e){if(!e)return i;const t=e.split(".");for(let a=0,s=t.length;a<s;++a){const o=t[a];i=i[o]||(i[o]=Object.create(null))}return i}function aa(i,e,t){return typeof e=="string"?Vt(Ft(i,e),t):Vt(Ft(i,""),e)}class id{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=a=>a.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(a,s)=>ta(s.backgroundColor),this.hoverBorderColor=(a,s)=>ta(s.borderColor),this.hoverColor=(a,s)=>ta(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return aa(this,e,t)}get(e){return Ft(this,e)}describe(e,t){return aa(ia,e,t)}override(e,t){return aa(Ke,e,t)}route(e,t,a,s){const o=Ft(this,e),r=Ft(this,a),l="_"+t;Object.defineProperties(o,{[l]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const d=this[l],c=r[s];return X(d)?Object.assign({},c,d):K(d,c)},set(d){this[l]=d}}})}apply(e){e.forEach(t=>t(this))}}var oe=new id({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Xl,Kl,td]);function ad(i){return!i||ae(i.size)||ae(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function On(i,e,t,a,s){let o=e[s];return o||(o=e[s]=i.measureText(s).width,t.push(s)),o>a&&(a=o),a}function Ze(i,e,t){const a=i.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*a)/a+s}function Ln(i,e){!e&&!i||(e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore())}function In(i,e,t,a){Rn(i,e,t,a,null)}function Rn(i,e,t,a,s){let o,r,l,d,c,u,f,m;const p=e.pointStyle,k=e.rotation,g=e.radius;let h=(k||0)*Pl;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(t,a),i.rotate(h),i.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),p){default:s?i.ellipse(t,a,s/2,g,0,0,ye):i.arc(t,a,g,0,ye),i.closePath();break;case"triangle":u=s?s/2:g,i.moveTo(t+Math.sin(h)*u,a-Math.cos(h)*g),h+=bn,i.lineTo(t+Math.sin(h)*u,a-Math.cos(h)*g),h+=bn,i.lineTo(t+Math.sin(h)*u,a-Math.cos(h)*g),i.closePath();break;case"rectRounded":c=g*.516,d=g-c,r=Math.cos(h+Qe)*d,f=Math.cos(h+Qe)*(s?s/2-c:d),l=Math.sin(h+Qe)*d,m=Math.sin(h+Qe)*(s?s/2-c:d),i.arc(t-f,a-l,c,h-ee,h-fe),i.arc(t+m,a-r,c,h-fe,h),i.arc(t+f,a+l,c,h,h+fe),i.arc(t-m,a+r,c,h+fe,h+ee),i.closePath();break;case"rect":if(!k){d=Math.SQRT1_2*g,u=s?s/2:d,i.rect(t-u,a-d,2*u,2*d);break}h+=Qe;case"rectRot":f=Math.cos(h)*(s?s/2:g),r=Math.cos(h)*g,l=Math.sin(h)*g,m=Math.sin(h)*(s?s/2:g),i.moveTo(t-f,a-l),i.lineTo(t+m,a-r),i.lineTo(t+f,a+l),i.lineTo(t-m,a+r),i.closePath();break;case"crossRot":h+=Qe;case"cross":f=Math.cos(h)*(s?s/2:g),r=Math.cos(h)*g,l=Math.sin(h)*g,m=Math.sin(h)*(s?s/2:g),i.moveTo(t-f,a-l),i.lineTo(t+f,a+l),i.moveTo(t+m,a-r),i.lineTo(t-m,a+r);break;case"star":f=Math.cos(h)*(s?s/2:g),r=Math.cos(h)*g,l=Math.sin(h)*g,m=Math.sin(h)*(s?s/2:g),i.moveTo(t-f,a-l),i.lineTo(t+f,a+l),i.moveTo(t+m,a-r),i.lineTo(t-m,a+r),h+=Qe,f=Math.cos(h)*(s?s/2:g),r=Math.cos(h)*g,l=Math.sin(h)*g,m=Math.sin(h)*(s?s/2:g),i.moveTo(t-f,a-l),i.lineTo(t+f,a+l),i.moveTo(t+m,a-r),i.lineTo(t-m,a+r);break;case"line":r=s?s/2:Math.cos(h)*g,l=Math.sin(h)*g,i.moveTo(t-r,a-l),i.lineTo(t+r,a+l);break;case"dash":i.moveTo(t,a),i.lineTo(t+Math.cos(h)*(s?s/2:g),a+Math.sin(h)*g);break;case!1:i.closePath();break}i.fill(),e.borderWidth>0&&i.stroke()}}function Un(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.x<e.right+t&&i.y>e.top-t&&i.y<e.bottom+t}function na(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function sa(i){i.restore()}function nd(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),ae(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function sd(i,e,t,a,s){if(s.strikethrough||s.underline){const o=i.measureText(a),r=e-o.actualBoundingBoxLeft,l=e+o.actualBoundingBoxRight,d=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,u=s.strikethrough?(d+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,u),i.lineTo(l,u),i.stroke()}}function od(i,e){const t=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=t}function Mt(i,e,t,a,s,o={}){const r=me(e)?e:[e],l=o.strokeWidth>0&&o.strokeColor!=="";let d,c;for(i.save(),i.font=s.string,nd(i,o),d=0;d<r.length;++d)c=r[d],o.backdrop&&od(i,o.backdrop),l&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),ae(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,t,a,o.maxWidth)),i.fillText(c,t,a,o.maxWidth),sd(i,t,a,c,o),a+=Number(s.lineHeight);i.restore()}function gi(i,e){const{x:t,y:a,w:s,h:o,radius:r}=e;i.arc(t+r.topLeft,a+r.topLeft,r.topLeft,1.5*ee,ee,!0),i.lineTo(t,a+o-r.bottomLeft),i.arc(t+r.bottomLeft,a+o-r.bottomLeft,r.bottomLeft,ee,fe,!0),i.lineTo(t+s-r.bottomRight,a+o),i.arc(t+s-r.bottomRight,a+o-r.bottomRight,r.bottomRight,fe,0,!0),i.lineTo(t+s,a+r.topRight),i.arc(t+s-r.topRight,a+r.topRight,r.topRight,0,-fe,!0),i.lineTo(t+r.topLeft,a)}const rd=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ld=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function dd(i,e){const t=(""+i).match(rd);if(!t||t[1]==="normal")return e*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return e*i}const cd=i=>+i||0;function oa(i,e){const t={},a=X(e),s=a?Object.keys(e):e,o=X(i)?a?r=>K(i[r],i[e[r]]):r=>i[r]:()=>i;for(const r of s)t[r]=cd(o(r));return t}function $n(i){return oa(i,{top:"y",right:"x",bottom:"y",left:"x"})}function ut(i){return oa(i,["topLeft","topRight","bottomLeft","bottomRight"])}function we(i){const e=$n(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ge(i,e){i=i||{},e=e||oe.font;let t=K(i.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let a=K(i.style,e.style);a&&!(""+a).match(ld)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);const s={family:K(i.family,e.family),lineHeight:dd(K(i.lineHeight,e.lineHeight),t),size:t,style:a,weight:K(i.weight,e.weight),string:""};return s.string=ad(s),s}function ki(i,e,t,a){let s,o,r;for(s=0,o=i.length;s<o;++s)if(r=i[s],r!==void 0&&r!==void 0)return r}function ud(i,e,t){const{min:a,max:s}=i,o=_l(e,(s-a)/2),r=(l,d)=>t&&l===0?0:l+d;return{min:r(a,-Math.abs(o)),max:r(s,o)}}function mt(i,e){return Object.assign(Object.create(i),e)}function ra(i,e=[""],t,a,s=()=>i[0]){const o=t||i;typeof a>"u"&&(a=jn("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:a,_getTarget:s,override:l=>ra([l,...i],e,o,a)};return new Proxy(r,{deleteProperty(l,d){return delete l[d],delete l._keys,delete i[0][d],!0},get(l,d){return qn(l,d,()=>bd(d,e,i,l))},getOwnPropertyDescriptor(l,d){return Reflect.getOwnPropertyDescriptor(l._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(l,d){return Wn(l).includes(d)},ownKeys(l){return Wn(l)},set(l,d,c){const u=l._storage||(l._storage=s());return l[d]=u[d]=c,delete l._keys,!0}})}function ft(i,e,t,a){const s={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:zn(i,a),setContext:o=>ft(i,o,t,a),override:o=>ft(i.override(o),e,t,a)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,l){return qn(o,r,()=>fd(o,r,l))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,l){return i[r]=l,delete o[r],!0}})}function zn(i,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:a=e.indexable,_allKeys:s=e.allKeys}=i;return{allKeys:s,scriptable:t,indexable:a,isScriptable:Ye(t)?t:()=>t,isIndexable:Ye(a)?a:()=>a}}const md=(i,e)=>i?i+Ki(e):e,la=(i,e)=>X(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function qn(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e)||e==="constructor")return i[e];const a=t();return i[e]=a,a}function fd(i,e,t){const{_proxy:a,_context:s,_subProxy:o,_descriptors:r}=i;let l=a[e];return Ye(l)&&r.isScriptable(e)&&(l=hd(e,l,i,t)),me(l)&&l.length&&(l=pd(e,l,i,r.isIndexable)),la(e,l)&&(l=ft(l,s,o&&o[e],r)),l}function hd(i,e,t,a){const{_proxy:s,_context:o,_subProxy:r,_stack:l}=t;if(l.has(i))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+i);l.add(i);let d=e(o,r||a);return l.delete(i),la(i,d)&&(d=da(s._scopes,s,i,d)),d}function pd(i,e,t,a){const{_proxy:s,_context:o,_subProxy:r,_descriptors:l}=t;if(typeof o.index<"u"&&a(i))return e[o.index%e.length];if(X(e[0])){const d=e,c=s._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=da(c,s,i,u);e.push(ft(f,o,r&&r[i],l))}}return e}function Yn(i,e,t){return Ye(i)?i(e,t):i}const gd=(i,e)=>i===!0?e:typeof i=="string"?di(e,i):void 0;function kd(i,e,t,a,s){for(const o of e){const r=gd(t,o);if(r){i.add(r);const l=Yn(r._fallback,t,s);if(typeof l<"u"&&l!==t&&l!==a)return l}else if(r===!1&&typeof a<"u"&&t!==a)return null}return!1}function da(i,e,t,a){const s=e._rootScopes,o=Yn(e._fallback,t,a),r=[...i,...s],l=new Set;l.add(a);let d=Hn(l,r,t,o||t,a);return d===null||typeof o<"u"&&o!==t&&(d=Hn(l,r,o,d,a),d===null)?!1:ra(Array.from(l),[""],s,o,()=>yd(e,t,a))}function Hn(i,e,t,a,s){for(;t;)t=kd(i,e,t,a,s);return t}function yd(i,e,t){const a=i._getTarget();e in a||(a[e]={});const s=a[e];return me(s)&&X(t)?t:s||{}}function bd(i,e,t,a){let s;for(const o of e)if(s=jn(md(o,i),t),typeof s<"u")return la(i,s)?da(t,a,i,s):s}function jn(i,e){for(const t of e){if(!t)continue;const a=t[i];if(typeof a<"u")return a}}function Wn(i){let e=i._keys;return e||(e=i._keys=vd(i._scopes)),e}function vd(i){const e=new Set;for(const t of i)for(const a of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(a);return Array.from(e)}function ca(){return typeof window<"u"&&typeof document<"u"}function ua(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function yi(i,e,t){let a;return typeof i=="string"?(a=parseInt(i,10),i.indexOf("%")!==-1&&(a=a/100*e.parentNode[t])):a=i,a}const bi=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Ad(i,e){return bi(i).getPropertyValue(e)}const xd=["top","right","bottom","left"];function Je(i,e,t){const a={};t=t?"-"+t:"";for(let s=0;s<4;s++){const o=xd[s];a[o]=parseFloat(i[e+"-"+o+t])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}const Nd=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function Sd(i,e){const t=i.touches,a=t&&t.length?t[0]:i,{offsetX:s,offsetY:o}=a;let r=!1,l,d;if(Nd(s,o,i.target))l=s,d=o;else{const c=e.getBoundingClientRect();l=a.clientX-c.left,d=a.clientY-c.top,r=!0}return{x:l,y:d,box:r}}function et(i,e){if("native"in i)return i;const{canvas:t,currentDevicePixelRatio:a}=e,s=bi(t),o=s.boxSizing==="border-box",r=Je(s,"padding"),l=Je(s,"border","width"),{x:d,y:c,box:u}=Sd(i,t),f=r.left+(u&&l.left),m=r.top+(u&&l.top);let{width:p,height:k}=e;return o&&(p-=r.width+l.width,k-=r.height+l.height),{x:Math.round((d-f)/p*t.width/a),y:Math.round((c-m)/k*t.height/a)}}function Cd(i,e,t){let a,s;if(e===void 0||t===void 0){const o=i&&ua(i);if(!o)e=i.clientWidth,t=i.clientHeight;else{const r=o.getBoundingClientRect(),l=bi(o),d=Je(l,"border","width"),c=Je(l,"padding");e=r.width-c.width-d.width,t=r.height-c.height-d.height,a=yi(l.maxWidth,o,"clientWidth"),s=yi(l.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:a||ui,maxHeight:s||ui}}const He=i=>Math.round(i*10)/10;function wd(i,e,t,a){const s=bi(i),o=Je(s,"margin"),r=yi(s.maxWidth,i,"clientWidth")||ui,l=yi(s.maxHeight,i,"clientHeight")||ui,d=Cd(i,e,t);let{width:c,height:u}=d;if(s.boxSizing==="content-box"){const m=Je(s,"border","width"),p=Je(s,"padding");c-=p.width+m.width,u-=p.height+m.height}return c=Math.max(0,c-o.width),u=Math.max(0,a?c/a:u-o.height),c=He(Math.min(c,r,d.maxWidth)),u=He(Math.min(u,l,d.maxHeight)),c&&!u&&(u=He(c/2)),(e!==void 0||t!==void 0)&&a&&d.height&&u>d.height&&(u=d.height,c=He(Math.floor(u*a))),{width:c,height:u}}function Qn(i,e,t){const a=e||1,s=He(i.height*a),o=He(i.width*a);i.height=He(i.height),i.width=He(i.width);const r=i.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==a||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=a,r.height=s,r.width=o,i.ctx.setTransform(a,0,0,a,0,0),!0):!1}const Ed=(function(){let i=!1;try{const e={get passive(){return i=!0,!1}};ca()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return i})();function Gn(i,e){const t=Ad(i,e),a=t&&t.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}const _d=function(i,e){return{x(t){return i+i+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,a){return t-a},leftForLtr(t,a){return t-a}}},Vd=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,e){return i+e},leftForLtr(i,e){return i}}};function ht(i,e,t){return i?_d(e,t):Vd()}function Xn(i,e){let t,a;(e==="ltr"||e==="rtl")&&(t=i.canvas.style,a=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),i.prevTextDirection=a)}function Kn(i,e){e!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}function vi(i,e,t){return i.options.clip?i[t]:e[t]}function Dd(i,e){const{xScale:t,yScale:a}=i;return t&&a?{left:vi(t,e,"left"),right:vi(t,e,"right"),top:vi(a,e,"top"),bottom:vi(a,e,"bottom")}:e}function Td(i,e){const t=e._clip;if(t.disabled)return!1;const a=Dd(e,i.chartArea);return{left:t.left===!1?0:a.left-(t.left===!0?0:t.left),right:t.right===!1?i.width:a.right+(t.right===!0?0:t.right),top:t.top===!1?0:a.top-(t.top===!0?0:t.top),bottom:t.bottom===!1?i.height:a.bottom+(t.bottom===!0?0:t.bottom)}}class Fd{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,a,s){const o=t.listeners[s],r=t.duration;o.forEach(l=>l({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(a-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=En.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((a,s)=>{if(!a.running||!a.items.length)return;const o=a.items;let r=o.length-1,l=!1,d;for(;r>=0;--r)d=o[r],d._active?(d._total>a.duration&&(a.duration=d._total),d.tick(e),l=!0):(o[r]=o[o.length-1],o.pop());l&&(s.draw(),this._notify(s,a,e,"progress")),o.length||(a.running=!1,this._notify(s,a,e,"complete"),a.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let a=t.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,a)),a}listen(e,t,a){this._getAnims(e).listeners[t].push(a)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((a,s)=>Math.max(a,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const a=t.items;let s=a.length-1;for(;s>=0;--s)a[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Le=new Fd;const Zn="transparent",Md={boolean(i,e,t){return t>.5?e:i},color(i,e,t){const a=Fn(i||Zn),s=a.valid&&Fn(e||Zn);return s&&s.valid?s.mix(a,t).hexString():e},number(i,e,t){return i+(e-i)*t}};class Pd{constructor(e,t,a,s){const o=t[a];s=ki([e.to,s,o,e.from]);const r=ki([e.from,o,s]);this._active=!0,this._fn=e.fn||Md[e.type||typeof r],this._easing=Tt[e.easing]||Tt.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=a,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,a){if(this._active){this._notify(!1);const s=this._target[this._prop],o=a-this._start,r=this._duration-o;this._start=a,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=ki([e.to,t,s,e.from]),this._from=ki([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,a=this._duration,s=this._prop,o=this._from,r=this._loop,l=this._to;let d;if(this._active=o!==l&&(r||t<a),!this._active){this._target[s]=l,this._notify(!0);return}if(t<0){this._target[s]=o;return}d=t/a%2,d=r&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[s]=this._fn(o,l,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,a)=>{e.push({res:t,rej:a})})}_notify(e){const t=e?"res":"rej",a=this._promises||[];for(let s=0;s<a.length;s++)a[s][t]()}}class Jn{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!X(e))return;const t=Object.keys(oe.animation),a=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!X(o))return;const r={};for(const l of t)r[l]=o[l];(me(o.properties)&&o.properties||[s]).forEach(l=>{(l===s||!a.has(l))&&a.set(l,r)})})}_animateOptions(e,t){const a=t.options,s=Od(e,a);if(!s)return[];const o=this._createAnimations(s,a);return a.$shared&&Bd(e.options.$animations,a).then(()=>{e.options=a},()=>{}),o}_createAnimations(e,t){const a=this._properties,s=[],o=e.$animations||(e.$animations={}),r=Object.keys(t),l=Date.now();let d;for(d=r.length-1;d>=0;--d){const c=r[d];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,t));continue}const u=t[c];let f=o[c];const m=a.get(c);if(f)if(m&&f.active()){f.update(m,u,l);continue}else f.cancel();if(!m||!m.duration){e[c]=u;continue}o[c]=f=new Pd(m,e,c,u),s.push(f)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const a=this._createAnimations(e,t);if(a.length)return Le.add(this._chart,a),!0}}function Bd(i,e){const t=[],a=Object.keys(e);for(let s=0;s<a.length;s++){const o=i[a[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function Od(i,e){if(!e)return;let t=i.options;if(!t){i.options=e;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function es(i,e){const t=i&&i.options||{},a=t.reverse,s=t.min===void 0?e:0,o=t.max===void 0?e:0;return{start:a?o:s,end:a?s:o}}function Ld(i,e,t){if(t===!1)return!1;const a=es(i,t),s=es(e,t);return{top:s.end,right:a.end,bottom:s.start,left:a.start}}function Id(i){let e,t,a,s;return X(i)?(e=i.top,t=i.right,a=i.bottom,s=i.left):e=t=a=s=i,{top:e,right:t,bottom:a,left:s,disabled:i===!1}}function ts(i,e){const t=[],a=i._getSortedDatasetMetas(e);let s,o;for(s=0,o=a.length;s<o;++s)t.push(a[s].index);return t}function is(i,e,t,a={}){const s=i.keys,o=a.mode==="single";let r,l,d,c;if(e===null)return;let u=!1;for(r=0,l=s.length;r<l;++r){if(d=+s[r],d===t){if(u=!0,a.all)continue;break}c=i.values[d],Ce(c)&&(o||e===0||mi(e)===mi(c))&&(e+=c)}return!u&&!a.all?0:e}function Rd(i,e){const{iScale:t,vScale:a}=e,s=t.axis==="x"?"x":"y",o=a.axis==="x"?"x":"y",r=Object.keys(i),l=new Array(r.length);let d,c,u;for(d=0,c=r.length;d<c;++d)u=r[d],l[d]={[s]:u,[o]:i[u]};return l}function ma(i,e){const t=i&&i.options.stacked;return t||t===void 0&&e.stack!==void 0}function Ud(i,e,t){return`${i.id}.${e.id}.${t.stack||t.type}`}function $d(i){const{min:e,max:t,minDefined:a,maxDefined:s}=i.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function zd(i,e,t){const a=i[e]||(i[e]={});return a[t]||(a[t]={})}function as(i,e,t,a){for(const s of e.getMatchingVisibleMetas(a).reverse()){const o=i[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function ns(i,e){const{chart:t,_cachedMeta:a}=i,s=t._stacks||(t._stacks={}),{iScale:o,vScale:r,index:l}=a,d=o.axis,c=r.axis,u=Ud(o,r,a),f=e.length;let m;for(let p=0;p<f;++p){const k=e[p],{[d]:g,[c]:h}=k,y=k._stacks||(k._stacks={});m=y[c]=zd(s,u,g),m[l]=h,m._top=as(m,r,!0,a.type),m._bottom=as(m,r,!1,a.type);const v=m._visualValues||(m._visualValues={});v[l]=h}}function fa(i,e){const t=i.scales;return Object.keys(t).filter(a=>t[a].axis===e).shift()}function qd(i,e){return mt(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Yd(i,e,t){return mt(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Pt(i,e){const t=i.controller.index,a=i.vScale&&i.vScale.axis;if(a){e=e||i._parsed;for(const s of e){const o=s._stacks;if(!o||o[a]===void 0||o[a][t]===void 0)return;delete o[a][t],o[a]._visualValues!==void 0&&o[a]._visualValues[t]!==void 0&&delete o[a]._visualValues[t]}}}const ha=i=>i==="reset"||i==="none",ss=(i,e)=>e?i:Object.assign({},i),Hd=(i,e,t)=>i&&!e.hidden&&e._stacked&&{keys:ts(t,!0),values:null};class jd{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ma(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Pt(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,a=this.getDataset(),s=(f,m,p,k)=>f==="x"?m:f==="r"?k:p,o=t.xAxisID=K(a.xAxisID,fa(e,"x")),r=t.yAxisID=K(a.yAxisID,fa(e,"y")),l=t.rAxisID=K(a.rAxisID,fa(e,"r")),d=t.indexAxis,c=t.iAxisID=s(d,o,r,l),u=t.vAxisID=s(d,r,o,l);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(r),t.rScale=this.getScaleForId(l),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&wn(this._data,this),e._stacked&&Pt(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),a=this._data;if(X(t)){const s=this._cachedMeta;this._data=Rd(t,s)}else if(a!==t){if(a){wn(a,this);const s=this._cachedMeta;Pt(s),s._parsed=[]}t&&Object.isExtensible(t)&&Yl(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,a=this.getDataset();let s=!1;this._dataCheck();const o=t._stacked;t._stacked=ma(t.vScale,t),t.stack!==a.stack&&(s=!0,Pt(t),t.stack=a.stack),this._resyncElements(e),(s||o!==t._stacked)&&(ns(this,t._parsed),t._stacked=ma(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:a,_data:s}=this,{iScale:o,_stacked:r}=a,l=o.axis;let d=e===0&&t===s.length?!0:a._sorted,c=e>0&&a._parsed[e-1],u,f,m;if(this._parsing===!1)a._parsed=s,a._sorted=!0,m=s;else{me(s[e])?m=this.parseArrayData(a,s,e,t):X(s[e])?m=this.parseObjectData(a,s,e,t):m=this.parsePrimitiveData(a,s,e,t);const p=()=>f[l]===null||c&&f[l]<c[l];for(u=0;u<t;++u)a._parsed[u+e]=f=m[u],d&&(p()&&(d=!1),c=f);a._sorted=d}r&&ns(this,m)}parsePrimitiveData(e,t,a,s){const{iScale:o,vScale:r}=e,l=o.axis,d=r.axis,c=o.getLabels(),u=o===r,f=new Array(s);let m,p,k;for(m=0,p=s;m<p;++m)k=m+a,f[m]={[l]:u||o.parse(c[k],k),[d]:r.parse(t[k],k)};return f}parseArrayData(e,t,a,s){const{xScale:o,yScale:r}=e,l=new Array(s);let d,c,u,f;for(d=0,c=s;d<c;++d)u=d+a,f=t[u],l[d]={x:o.parse(f[0],u),y:r.parse(f[1],u)};return l}parseObjectData(e,t,a,s){const{xScale:o,yScale:r}=e,{xAxisKey:l="x",yAxisKey:d="y"}=this._parsing,c=new Array(s);let u,f,m,p;for(u=0,f=s;u<f;++u)m=u+a,p=t[m],c[u]={x:o.parse(di(p,l),m),y:r.parse(di(p,d),m)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,a){const s=this.chart,o=this._cachedMeta,r=t[e.axis],l={keys:ts(s,!0),values:t._stacks[e.axis]._visualValues};return is(l,r,o.index,{mode:a})}updateRangeFromParsed(e,t,a,s){const o=a[t.axis];let r=o===null?NaN:o;const l=s&&a._stacks[t.axis];s&&l&&(s.values=l,r=is(s,o,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,t){const a=this._cachedMeta,s=a._parsed,o=a._sorted&&e===a.iScale,r=s.length,l=this._getOtherScale(e),d=Hd(t,a,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=$d(l);let m,p;function k(){p=s[m];const g=p[l.axis];return!Ce(p[e.axis])||u>g||f<g}for(m=0;m<r&&!(!k()&&(this.updateRangeFromParsed(c,e,p,d),o));++m);if(o){for(m=r-1;m>=0;--m)if(!k()){this.updateRangeFromParsed(c,e,p,d);break}}return c}getAllParsedValues(e){const t=this._cachedMeta._parsed,a=[];let s,o,r;for(s=0,o=t.length;s<o;++s)r=t[s][e.axis],Ce(r)&&a.push(r);return a}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,a=t.iScale,s=t.vScale,o=this.getParsed(e);return{label:a?""+a.getLabelForValue(o[a.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=Id(K(this.options.clip,Ld(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,a=this._cachedMeta,s=a.data||[],o=t.chartArea,r=[],l=this._drawStart||0,d=this._drawCount||s.length-l,c=this.options.drawActiveElementsOnTop;let u;for(a.dataset&&a.dataset.draw(e,o,l,d),u=l;u<l+d;++u){const f=s[u];f.hidden||(f.active&&c?r.push(f):f.draw(e,o))}for(u=0;u<r.length;++u)r[u].draw(e,o)}getStyle(e,t){const a=t?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(e||0,a)}getContext(e,t,a){const s=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];o=r.$context||(r.$context=Yd(this.getContext(),e,r)),o.parsed=this.getParsed(e),o.raw=s.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=qd(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=a,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",a){const s=t==="active",o=this._cachedDataOpts,r=e+"-"+t,l=o[r],d=this.enableOptionSharing&&ci(a);if(l)return ss(l,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=s?[`${e}Hover`,"hover",e,""]:[e,""],m=c.getOptionScopes(this.getDataset(),u),p=Object.keys(oe.elements[e]),k=()=>this.getContext(a,s,t),g=c.resolveNamedOptions(m,p,k,f);return g.$shared&&(g.$shared=d,o[r]=Object.freeze(ss(g,d))),g}_resolveAnimations(e,t,a){const s=this.chart,o=this._cachedDataOpts,r=`animation-${t}`,l=o[r];if(l)return l;let d;if(s.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,t),m=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(m,this.getContext(e,a,t))}const c=new Jn(s,d&&d.animations);return d&&d._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||ha(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const a=this.resolveDataElementOptions(e,t),s=this._sharedOptions,o=this.getSharedOptions(a),r=this.includeOptions(t,o)||o!==s;return this.updateSharedOptions(o,t,a),{sharedOptions:o,includeOptions:r}}updateElement(e,t,a,s){ha(s)?Object.assign(e,a):this._resolveAnimations(t,s).update(e,a)}updateSharedOptions(e,t,a){e&&!ha(t)&&this._resolveAnimations(void 0,t).update(e,a)}_setStyle(e,t,a,s){e.active=s;const o=this.getStyle(t,s);this._resolveAnimations(t,a,s).update(e,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,t,a){this._setStyle(e,a,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,a=this._cachedMeta.data;for(const[l,d,c]of this._syncList)this[l](d,c);this._syncList=[];const s=a.length,o=t.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,e):o<s&&this._removeElements(o,s-o)}_insertElements(e,t,a=!0){const s=this._cachedMeta,o=s.data,r=e+t;let l;const d=c=>{for(c.length+=t,l=c.length-1;l>=r;l--)c[l]=c[l-t]};for(d(o),l=e;l<r;++l)o[l]=new this.dataElementType;this._parsing&&d(s._parsed),this.parse(e,t),a&&this.updateElements(o,e,t,"reset")}updateElements(e,t,a,s){}_removeElements(e,t){const a=this._cachedMeta;if(this._parsing){const s=a._parsed.splice(e,t);a._stacked&&Pt(a,s)}a.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,a,s]=e;this[t](a,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const a=arguments.length-2;a&&this._sync(["_insertElements",e,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function tt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class pa{static override(e){Object.assign(pa.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return tt()}parse(){return tt()}format(){return tt()}add(){return tt()}diff(){return tt()}startOf(){return tt()}endOf(){return tt()}}var Wd={_date:pa};function Qd(i,e,t,a){const{controller:s,data:o,_sorted:r}=i,l=s._cachedMeta.iScale,d=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(l&&e===l.axis&&e!=="r"&&r&&o.length){const c=l._reversePixels?zl:Ji;if(a){if(s._sharedOptions){const u=o[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const m=c(o,e,t-f),p=c(o,e,t+f);return{lo:m.lo,hi:p.hi}}}}else{const u=c(o,e,t);if(d){const{vScale:f}=s._cachedMeta,{_parsed:m}=i,p=m.slice(0,u.lo+1).reverse().findIndex(g=>!ae(g[f.axis]));u.lo-=Math.max(0,p);const k=m.slice(u.hi).findIndex(g=>!ae(g[f.axis]));u.hi+=Math.max(0,k)}return u}}return{lo:0,hi:o.length-1}}function Ai(i,e,t,a,s){const o=i.getSortedVisibleDatasetMetas(),r=t[e];for(let l=0,d=o.length;l<d;++l){const{index:c,data:u}=o[l],{lo:f,hi:m}=Qd(o[l],e,r,s);for(let p=f;p<=m;++p){const k=u[p];k.skip||a(k,c,p)}}}function Gd(i){const e=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(a,s){const o=e?Math.abs(a.x-s.x):0,r=t?Math.abs(a.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function ga(i,e,t,a,s){const o=[];return!s&&!i.isPointInArea(e)||Ai(i,t,e,function(l,d,c){!s&&!Un(l,i.chartArea,0)||l.inRange(e.x,e.y,a)&&o.push({element:l,datasetIndex:d,index:c})},!0),o}function Xd(i,e,t,a){let s=[];function o(r,l,d){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],a),{angle:f}=Nn(r,{x:e.x,y:e.y});Sn(f,c,u)&&s.push({element:r,datasetIndex:l,index:d})}return Ai(i,t,e,o),s}function Kd(i,e,t,a,s,o){let r=[];const l=Gd(t);let d=Number.POSITIVE_INFINITY;function c(u,f,m){const p=u.inRange(e.x,e.y,s);if(a&&!p)return;const k=u.getCenterPoint(s);if(!(!!o||i.isPointInArea(k))&&!p)return;const h=l(e,k);h<d?(r=[{element:u,datasetIndex:f,index:m}],d=h):h===d&&r.push({element:u,datasetIndex:f,index:m})}return Ai(i,t,e,c),r}function ka(i,e,t,a,s,o){return!o&&!i.isPointInArea(e)?[]:t==="r"&&!a?Xd(i,e,t,s):Kd(i,e,t,a,s,o)}function os(i,e,t,a,s){const o=[],r=t==="x"?"inXRange":"inYRange";let l=!1;return Ai(i,t,e,(d,c,u)=>{d[r]&&d[r](e[t],s)&&(o.push({element:d,datasetIndex:c,index:u}),l=l||d.inRange(e.x,e.y,s))}),a&&!l?[]:o}var Zd={modes:{index(i,e,t,a){const s=et(e,i),o=t.axis||"x",r=t.includeInvisible||!1,l=t.intersect?ga(i,s,o,a,r):ka(i,s,o,!1,a,r),d=[];return l.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const u=l[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(i,e,t,a){const s=et(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;let l=t.intersect?ga(i,s,o,a,r):ka(i,s,o,!1,a,r);if(l.length>0){const d=l[0].datasetIndex,c=i.getDatasetMeta(d).data;l=[];for(let u=0;u<c.length;++u)l.push({element:c[u],datasetIndex:d,index:u})}return l},point(i,e,t,a){const s=et(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;return ga(i,s,o,a,r)},nearest(i,e,t,a){const s=et(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;return ka(i,s,o,t.intersect,a,r)},x(i,e,t,a){const s=et(e,i);return os(i,s,"x",t.intersect,a)},y(i,e,t,a){const s=et(e,i);return os(i,s,"y",t.intersect,a)}}};const rs=["left","top","right","bottom"];function Bt(i,e){return i.filter(t=>t.pos===e)}function ls(i,e){return i.filter(t=>rs.indexOf(t.pos)===-1&&t.box.axis===e)}function Ot(i,e){return i.sort((t,a)=>{const s=e?a:t,o=e?t:a;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Jd(i){const e=[];let t,a,s,o,r,l;for(t=0,a=(i||[]).length;t<a;++t)s=i[t],{position:o,options:{stack:r,stackWeight:l=1}}=s,e.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:l});return e}function ec(i){const e={};for(const t of i){const{stack:a,pos:s,stackWeight:o}=t;if(!a||!rs.includes(s))continue;const r=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return e}function tc(i,e){const t=ec(i),{vBoxMaxWidth:a,hBoxMaxHeight:s}=e;let o,r,l;for(o=0,r=i.length;o<r;++o){l=i[o];const{fullSize:d}=l.box,c=t[l.stack],u=c&&l.stackWeight/c.weight;l.horizontal?(l.width=u?u*a:d&&e.availableWidth,l.height=s):(l.width=a,l.height=u?u*s:d&&e.availableHeight)}return t}function ic(i){const e=Jd(i),t=Ot(e.filter(c=>c.box.fullSize),!0),a=Ot(Bt(e,"left"),!0),s=Ot(Bt(e,"right")),o=Ot(Bt(e,"top"),!0),r=Ot(Bt(e,"bottom")),l=ls(e,"x"),d=ls(e,"y");return{fullSize:t,leftAndTop:a.concat(o),rightAndBottom:s.concat(d).concat(r).concat(l),chartArea:Bt(e,"chartArea"),vertical:a.concat(s).concat(d),horizontal:o.concat(r).concat(l)}}function ds(i,e,t,a){return Math.max(i[t],e[t])+Math.max(i[a],e[a])}function cs(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function ac(i,e,t,a){const{pos:s,box:o}=t,r=i.maxPadding;if(!X(s)){t.size&&(i[s]-=t.size);const f=a[t.stack]||{size:0,count:1};f.size=Math.max(f.size,t.horizontal?o.height:o.width),t.size=f.size/f.count,i[s]+=t.size}o.getPadding&&cs(r,o.getPadding());const l=Math.max(0,e.outerWidth-ds(r,i,"left","right")),d=Math.max(0,e.outerHeight-ds(r,i,"top","bottom")),c=l!==i.w,u=d!==i.h;return i.w=l,i.h=d,t.horizontal?{same:c,other:u}:{same:u,other:c}}function nc(i){const e=i.maxPadding;function t(a){const s=Math.max(e[a]-i[a],0);return i[a]+=s,s}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function sc(i,e){const t=e.maxPadding;function a(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(e[r],t[r])}),o}return a(i?["left","right"]:["top","bottom"])}function Lt(i,e,t,a){const s=[];let o,r,l,d,c,u;for(o=0,r=i.length,c=0;o<r;++o){l=i[o],d=l.box,d.update(l.width||e.w,l.height||e.h,sc(l.horizontal,e));const{same:f,other:m}=ac(e,t,l,a);c|=f&&s.length,u=u||m,d.fullSize||s.push(l)}return c&&Lt(s,e,t,a)||u}function xi(i,e,t,a,s){i.top=t,i.left=e,i.right=e+a,i.bottom=t+s,i.width=a,i.height=s}function us(i,e,t,a){const s=t.padding;let{x:o,y:r}=e;for(const l of i){const d=l.box,c=a[l.stack]||{placed:0,weight:1},u=l.stackWeight/c.weight||1;if(l.horizontal){const f=e.w*u,m=c.size||d.height;ci(c.start)&&(r=c.start),d.fullSize?xi(d,s.left,r,t.outerWidth-s.right-s.left,m):xi(d,e.left+c.placed,r,f,m),c.start=r,c.placed+=f,r=d.bottom}else{const f=e.h*u,m=c.size||d.width;ci(c.start)&&(o=c.start),d.fullSize?xi(d,o,s.top,m,t.outerHeight-s.bottom-s.top):xi(d,o,e.top+c.placed,m,f),c.start=o,c.placed+=f,o=d.right}}e.x=o,e.y=r}var Ee={addBox(i,e){i.boxes||(i.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},i.boxes.push(e)},removeBox(i,e){const t=i.boxes?i.boxes.indexOf(e):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(i,e,t,a){if(!i)return;const s=we(i.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(t-s.height,0),l=ic(i.boxes),d=l.vertical,c=l.horizontal;Z(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,h)=>h.box.options&&h.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),m=Object.assign({},s);cs(m,we(a));const p=Object.assign({maxPadding:m,w:o,h:r,x:s.left,y:s.top},s),k=tc(d.concat(c),f);Lt(l.fullSize,p,f,k),Lt(d,p,f,k),Lt(c,p,f,k)&&Lt(d,p,f,k),nc(p),us(l.leftAndTop,p,f,k),p.x+=p.w,p.y+=p.h,us(l.rightAndBottom,p,f,k),i.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Z(l.chartArea,g=>{const h=g.box;Object.assign(h,i.chartArea),h.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class ms{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,a){}removeEventListener(e,t,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,a,s){return t=Math.max(0,t||e.width),a=a||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):a)}}isAttached(e){return!0}updateConfig(e){}}class oc extends ms{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Ni="$chartjs",rc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fs=i=>i===null||i==="";function lc(i,e){const t=i.style,a=i.getAttribute("height"),s=i.getAttribute("width");if(i[Ni]={initial:{height:a,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",fs(s)){const o=Gn(i,"width");o!==void 0&&(i.width=o)}if(fs(a))if(i.style.height==="")i.height=i.width/(e||2);else{const o=Gn(i,"height");o!==void 0&&(i.height=o)}return i}const hs=Ed?{passive:!0}:!1;function dc(i,e,t){i&&i.addEventListener(e,t,hs)}function cc(i,e,t){i&&i.canvas&&i.canvas.removeEventListener(e,t,hs)}function uc(i,e){const t=rc[i.type]||i.type,{x:a,y:s}=et(i,e);return{type:t,chart:e,native:i,x:a!==void 0?a:null,y:s!==void 0?s:null}}function Si(i,e){for(const t of i)if(t===e||t.contains(e))return!0}function mc(i,e,t){const a=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const l of o)r=r||Si(l.addedNodes,a),r=r&&!Si(l.removedNodes,a);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function fc(i,e,t){const a=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const l of o)r=r||Si(l.removedNodes,a),r=r&&!Si(l.addedNodes,a);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const It=new Map;let ps=0;function gs(){const i=window.devicePixelRatio;i!==ps&&(ps=i,It.forEach((e,t)=>{t.currentDevicePixelRatio!==i&&e()}))}function hc(i,e){It.size||window.addEventListener("resize",gs),It.set(i,e)}function pc(i){It.delete(i),It.size||window.removeEventListener("resize",gs)}function gc(i,e,t){const a=i.canvas,s=a&&ua(a);if(!s)return;const o=_n((l,d)=>{const c=s.clientWidth;t(l,d),c<s.clientWidth&&t()},window),r=new ResizeObserver(l=>{const d=l[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(s),hc(i,o),r}function ya(i,e,t){t&&t.disconnect(),e==="resize"&&pc(i)}function kc(i,e,t){const a=i.canvas,s=_n(o=>{i.ctx!==null&&t(uc(o,i))},i);return dc(a,e,s),s}class yc extends ms{acquireContext(e,t){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(lc(e,t),a):null}releaseContext(e){const t=e.canvas;if(!t[Ni])return!1;const a=t[Ni].initial;["height","width"].forEach(o=>{const r=a[o];ae(r)?t.removeAttribute(o):t.setAttribute(o,r)});const s=a.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[Ni],!0}addEventListener(e,t,a){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),r={attach:mc,detach:fc,resize:gc}[t]||kc;s[t]=r(e,t,a)}removeEventListener(e,t){const a=e.$proxies||(e.$proxies={}),s=a[t];if(!s)return;({attach:ya,detach:ya,resize:ya}[t]||cc)(e,t,s),a[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,a,s){return wd(e,t,a,s)}isAttached(e){const t=e&&ua(e);return!!(t&&t.isConnected)}}function bc(i){return!ca()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?oc:yc}class it{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:a}=this.getProps(["x","y"],e);return{x:t,y:a}}hasValue(){return hi(this.x)&&hi(this.y)}getProps(e,t){const a=this.$animations;if(!t||!a)return this;const s={};return e.forEach(o=>{s[o]=a[o]&&a[o].active()?a[o]._to:this[o]}),s}}function vc(i,e){const t=i.options.ticks,a=Ac(i),s=Math.min(t.maxTicksLimit||a,a),o=t.major.enabled?Nc(e):[],r=o.length,l=o[0],d=o[r-1],c=[];if(r>s)return Sc(e,c,o,r/s),c;const u=xc(o,e,s);if(r>0){let f,m;const p=r>1?Math.round((d-l)/(r-1)):null;for(Ci(e,c,u,ae(p)?0:l-p,l),f=0,m=r-1;f<m;f++)Ci(e,c,u,o[f],o[f+1]);return Ci(e,c,u,d,ae(p)?e.length:d+p),c}return Ci(e,c,u),c}function Ac(i){const e=i.options.offset,t=i._tickSize(),a=i._length/t+(e?0:1),s=i._maxLength/t;return Math.floor(Math.min(a,s))}function xc(i,e,t){const a=Cc(i),s=e.length/t;if(!a)return Math.max(s,1);const o=Bl(a);for(let r=0,l=o.length-1;r<l;r++){const d=o[r];if(d>s)return d}return Math.max(s,1)}function Nc(i){const e=[];let t,a;for(t=0,a=i.length;t<a;t++)i[t].major&&e.push(t);return e}function Sc(i,e,t,a){let s=0,o=t[0],r;for(a=Math.ceil(a),r=0;r<i.length;r++)r===o&&(e.push(i[r]),s++,o=t[s*a])}function Ci(i,e,t,a,s){const o=K(a,0),r=Math.min(K(s,i.length),i.length);let l=0,d,c,u;for(t=Math.ceil(t),s&&(d=s-a,t=d/Math.floor(d/t)),u=o;u<0;)l++,u=Math.round(o+l*t);for(c=Math.max(o,0);c<r;c++)c===u&&(e.push(i[c]),l++,u=Math.round(o+l*t))}function Cc(i){const e=i.length;let t,a;if(e<2)return!1;for(a=i[0],t=1;t<e;++t)if(i[t]-i[t-1]!==a)return!1;return a}const wc=i=>i==="left"?"right":i==="right"?"left":i,ks=(i,e,t)=>e==="top"||e==="left"?i[e]+t:i[e]-t,ys=(i,e)=>Math.min(e||i,i);function bs(i,e){const t=[],a=i.length/e,s=i.length;let o=0;for(;o<s;o+=a)t.push(i[Math.floor(o)]);return t}function Ec(i,e,t){const a=i.ticks.length,s=Math.min(e,a-1),o=i._startPixel,r=i._endPixel,l=1e-6;let d=i.getPixelForTick(s),c;if(!(t&&(a===1?c=Math.max(d-o,r-d):e===0?c=(i.getPixelForTick(1)-d)/2:c=(d-i.getPixelForTick(s-1))/2,d+=s<e?c:-c,d<o-l||d>r+l)))return d}function _c(i,e){Z(i,t=>{const a=t.gc,s=a.length/2;let o;if(s>e){for(o=0;o<s;++o)delete t.data[a[o]];a.splice(0,s)}})}function Rt(i){return i.drawTicks?i.tickLength:0}function vs(i,e){if(!i.display)return 0;const t=ge(i.font,e),a=we(i.padding);return(me(i.text)?i.text.length:1)*t.lineHeight+a.height}function Vc(i,e){return mt(i,{scale:e,type:"scale"})}function Dc(i,e,t){return mt(i,{tick:t,index:e,type:"tick"})}function Tc(i,e,t){let a=ea(i);return(t&&e!=="right"||!t&&e==="right")&&(a=wc(a)),a}function Fc(i,e,t,a){const{top:s,left:o,bottom:r,right:l,chart:d}=i,{chartArea:c,scales:u}=d;let f=0,m,p,k;const g=r-s,h=l-o;if(i.isHorizontal()){if(p=pe(a,o,l),X(t)){const y=Object.keys(t)[0],v=t[y];k=u[y].getPixelForValue(v)+g-e}else t==="center"?k=(c.bottom+c.top)/2+g-e:k=ks(i,t,e);m=l-o}else{if(X(t)){const y=Object.keys(t)[0],v=t[y];p=u[y].getPixelForValue(v)-h+e}else t==="center"?p=(c.left+c.right)/2-h+e:p=ks(i,t,e);k=pe(a,r,s),f=t==="left"?-fe:fe}return{titleX:p,titleY:k,maxWidth:m,rotation:f}}class pt extends it{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:a,_suggestedMax:s}=this;return e=De(e,Number.POSITIVE_INFINITY),t=De(t,Number.NEGATIVE_INFINITY),a=De(a,Number.POSITIVE_INFINITY),s=De(s,Number.NEGATIVE_INFINITY),{min:De(e,a),max:De(t,s),minDefined:Ce(e),maxDefined:Ce(t)}}getMinMax(e){let{min:t,max:a,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:t,max:a};const l=this.getMatchingVisibleMetas();for(let d=0,c=l.length;d<c;++d)r=l[d].controller.getMinMax(this,e),s||(t=Math.min(t,r.min)),o||(a=Math.max(a,r.max));return t=o&&t>a?a:t,a=s&&t>a?t:a,{min:De(t,De(a,t)),max:De(a,De(t,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){J(this.options.beforeUpdate,[this])}update(e,t,a){const{beginAtZero:s,grace:o,ticks:r}=this.options,l=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ud(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=l<this.ticks.length;this._convertTicksToLabels(d?bs(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=vc(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,a;this.isHorizontal()?(t=this.left,a=this.right):(t=this.top,a=this.bottom,e=!e),this._startPixel=t,this._endPixel=a,this._reversePixels=e,this._length=a-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){J(this.options.afterUpdate,[this])}beforeSetDimensions(){J(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){J(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),J(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){J(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let a,s,o;for(a=0,s=e.length;a<s;a++)o=e[a],o.label=J(t.callback,[o.value,a,e],this)}afterTickToLabelConversion(){J(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){J(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,a=ys(this.ticks.length,e.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation;let r=s,l,d,c;if(!this._isVisible()||!t.display||s>=o||a<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),f=u.widest.width,m=u.highest.height,p=ve(this.chart.width-f,0,this.maxWidth);l=e.offset?this.maxWidth/a:p/(a-1),f+6>l&&(l=p/(a-(e.offset?.5:1)),d=this.maxHeight-Rt(e.grid)-t.padding-vs(e.title,this.chart.options.font),c=Math.sqrt(f*f+m*m),r=Rl(Math.min(Math.asin(ve((u.highest.height+6)/l,-1,1)),Math.asin(ve(d/c,-1,1))-Math.asin(ve(m/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){J(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){J(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:a,title:s,grid:o}}=this,r=this._isVisible(),l=this.isHorizontal();if(r){const d=vs(s,t.options.font);if(l?(e.width=this.maxWidth,e.height=Rt(o)+d):(e.height=this.maxHeight,e.width=Rt(o)+d),a.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:m}=this._getLabelSizes(),p=a.padding*2,k=Ge(this.labelRotation),g=Math.cos(k),h=Math.sin(k);if(l){const y=a.mirror?0:h*f.width+g*m.height;e.height=Math.min(this.maxHeight,e.height+y+p)}else{const y=a.mirror?0:g*f.width+h*m.height;e.width=Math.min(this.maxWidth,e.width+y+p)}this._calculatePadding(c,u,h,g)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,a,s){const{ticks:{align:o,padding:r},position:l}=this.options,d=this.labelRotation!==0,c=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,p=0;d?c?(m=s*e.width,p=a*t.height):(m=a*e.height,p=s*t.width):o==="start"?p=t.width:o==="end"?m=e.width:o!=="inner"&&(m=e.width/2,p=t.width/2),this.paddingLeft=Math.max((m-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-f+r)*this.width/(this.width-f),0)}else{let u=t.height/2,f=e.height/2;o==="start"?(u=0,f=e.height):o==="end"&&(u=t.height,f=0),this.paddingTop=u+r,this.paddingBottom=f+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){J(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,a;for(t=0,a=e.length;t<a;t++)ae(e[t].label)&&(e.splice(t,1),a--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let a=this.ticks;t<a.length&&(a=bs(a,t)),this._labelSizes=e=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,a){const{ctx:s,_longestTextCache:o}=this,r=[],l=[],d=Math.floor(t/ys(t,a));let c=0,u=0,f,m,p,k,g,h,y,v,A,w,S;for(f=0;f<t;f+=d){if(k=e[f].label,g=this._resolveTickFontOptions(f),s.font=h=g.string,y=o[h]=o[h]||{data:{},gc:[]},v=g.lineHeight,A=w=0,!ae(k)&&!me(k))A=On(s,y.data,y.gc,A,k),w=v;else if(me(k))for(m=0,p=k.length;m<p;++m)S=k[m],!ae(S)&&!me(S)&&(A=On(s,y.data,y.gc,A,S),w+=v);r.push(A),l.push(w),c=Math.max(A,c),u=Math.max(w,u)}_c(o,t);const B=r.indexOf(c),D=l.indexOf(u),T=V=>({width:r[V]||0,height:l[V]||0});return{first:T(0),last:T(t-1),widest:T(B),highest:T(D),widths:r,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return $l(this._alignToPixels?Ze(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const a=t[e];return a.$context||(a.$context=Dc(this.getContext(),e,a))}return this.$context||(this.$context=Vc(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=Ge(this.labelRotation),a=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),r=e.autoSkipPadding||0,l=o?o.widest.width+r:0,d=o?o.highest.height+r:0;return this.isHorizontal()?d*a>l*s?l/a:d/s:d*s<l*a?d/a:l/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,a=this.chart,s=this.options,{grid:o,position:r,border:l}=s,d=o.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),m=Rt(o),p=[],k=l.setContext(this.getContext()),g=k.display?k.width:0,h=g/2,y=function(x){return Ze(a,x,g)};let v,A,w,S,B,D,T,V,F,_,R,I;if(r==="top")v=y(this.bottom),D=this.bottom-m,V=v-h,_=y(e.top)+h,I=e.bottom;else if(r==="bottom")v=y(this.top),_=e.top,I=y(e.bottom)-h,D=v+h,V=this.top+m;else if(r==="left")v=y(this.right),B=this.right-m,T=v-h,F=y(e.left)+h,R=e.right;else if(r==="right")v=y(this.left),F=e.left,R=y(e.right)-h,B=v+h,T=this.left+m;else if(t==="x"){if(r==="center")v=y((e.top+e.bottom)/2+.5);else if(X(r)){const x=Object.keys(r)[0],E=r[x];v=y(this.chart.scales[x].getPixelForValue(E))}_=e.top,I=e.bottom,D=v+h,V=D+m}else if(t==="y"){if(r==="center")v=y((e.left+e.right)/2);else if(X(r)){const x=Object.keys(r)[0],E=r[x];v=y(this.chart.scales[x].getPixelForValue(E))}B=v-h,T=B-m,F=e.left,R=e.right}const N=K(s.ticks.maxTicksLimit,f),b=Math.max(1,Math.ceil(f/N));for(A=0;A<f;A+=b){const x=this.getContext(A),E=o.setContext(x),C=l.setContext(x),P=E.lineWidth,M=E.color,L=C.dash||[],U=C.dashOffset,z=E.tickWidth,q=E.tickColor,j=E.tickBorderDash||[],te=E.tickBorderDashOffset;w=Ec(this,A,d),w!==void 0&&(S=Ze(a,w,P),c?B=T=F=R=S:D=V=_=I=S,p.push({tx1:B,ty1:D,tx2:T,ty2:V,x1:F,y1:_,x2:R,y2:I,width:P,color:M,borderDash:L,borderDashOffset:U,tickWidth:z,tickColor:q,tickBorderDash:j,tickBorderDashOffset:te}))}return this._ticksLength=f,this._borderValue=v,p}_computeLabelItems(e){const t=this.axis,a=this.options,{position:s,ticks:o}=a,r=this.isHorizontal(),l=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=o,m=Rt(a.grid),p=m+u,k=f?-u:p,g=-Ge(this.labelRotation),h=[];let y,v,A,w,S,B,D,T,V,F,_,R,I="middle";if(s==="top")B=this.bottom-k,D=this._getXAxisLabelAlignment();else if(s==="bottom")B=this.top+k,D=this._getXAxisLabelAlignment();else if(s==="left"){const b=this._getYAxisLabelAlignment(m);D=b.textAlign,S=b.x}else if(s==="right"){const b=this._getYAxisLabelAlignment(m);D=b.textAlign,S=b.x}else if(t==="x"){if(s==="center")B=(e.top+e.bottom)/2+p;else if(X(s)){const b=Object.keys(s)[0],x=s[b];B=this.chart.scales[b].getPixelForValue(x)+p}D=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")S=(e.left+e.right)/2-p;else if(X(s)){const b=Object.keys(s)[0],x=s[b];S=this.chart.scales[b].getPixelForValue(x)}D=this._getYAxisLabelAlignment(m).textAlign}t==="y"&&(d==="start"?I="top":d==="end"&&(I="bottom"));const N=this._getLabelSizes();for(y=0,v=l.length;y<v;++y){A=l[y],w=A.label;const b=o.setContext(this.getContext(y));T=this.getPixelForTick(y)+o.labelOffset,V=this._resolveTickFontOptions(y),F=V.lineHeight,_=me(w)?w.length:1;const x=_/2,E=b.color,C=b.textStrokeColor,P=b.textStrokeWidth;let M=D;r?(S=T,D==="inner"&&(y===v-1?M=this.options.reverse?"left":"right":y===0?M=this.options.reverse?"right":"left":M="center"),s==="top"?c==="near"||g!==0?R=-_*F+F/2:c==="center"?R=-N.highest.height/2-x*F+F:R=-N.highest.height+F/2:c==="near"||g!==0?R=F/2:c==="center"?R=N.highest.height/2-x*F:R=N.highest.height-_*F,f&&(R*=-1),g!==0&&!b.showLabelBackdrop&&(S+=F/2*Math.sin(g))):(B=T,R=(1-_)*F/2);let L;if(b.showLabelBackdrop){const U=we(b.backdropPadding),z=N.heights[y],q=N.widths[y];let j=R-U.top,te=0-U.left;switch(I){case"middle":j-=z/2;break;case"bottom":j-=z;break}switch(D){case"center":te-=q/2;break;case"right":te-=q;break;case"inner":y===v-1?te-=q:y>0&&(te-=q/2);break}L={left:te,top:j,width:q+U.width,height:z+U.height,color:b.backdropColor}}h.push({label:w,font:V,textOffset:R,options:{rotation:g,color:E,strokeColor:C,strokeWidth:P,textAlign:M,textBaseline:I,translation:[S,B],backdrop:L}})}return h}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Ge(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:a,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),l=e+o,d=r.widest.width;let c,u;return t==="left"?s?(u=this.right+o,a==="near"?c="left":a==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-l,a==="near"?c="right":a==="center"?(c="center",u-=d/2):(c="left",u=this.left)):t==="right"?s?(u=this.left+o,a==="near"?c="right":a==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+l,a==="near"?c="left":a==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:a,top:s,width:o,height:r}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(a,s,o,r),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,a=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,r;const l=(d,c,u)=>{!u.width||!u.color||(a.save(),a.lineWidth=u.width,a.strokeStyle=u.color,a.setLineDash(u.borderDash||[]),a.lineDashOffset=u.borderDashOffset,a.beginPath(),a.moveTo(d.x,d.y),a.lineTo(c.x,c.y),a.stroke(),a.restore())};if(t.display)for(o=0,r=s.length;o<r;++o){const d=s[o];t.drawOnChartArea&&l({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),t.drawTicks&&l({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:a,grid:s}}=this,o=a.setContext(this.getContext()),r=a.display?o.width:0;if(!r)return;const l=s.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,m;this.isHorizontal()?(c=Ze(e,this.left,r)-r/2,u=Ze(e,this.right,l)+l/2,f=m=d):(f=Ze(e,this.top,r)-r/2,m=Ze(e,this.bottom,l)+l/2,c=u=d),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,f),t.lineTo(u,m),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const a=this.ctx,s=this._computeLabelArea();s&&na(a,s);const o=this.getLabelItems(e);for(const r of o){const l=r.options,d=r.font,c=r.label,u=r.textOffset;Mt(a,c,0,u,d,l)}s&&sa(a)}drawTitle(){const{ctx:e,options:{position:t,title:a,reverse:s}}=this;if(!a.display)return;const o=ge(a.font),r=we(a.padding),l=a.align;let d=o.lineHeight/2;t==="bottom"||t==="center"||X(t)?(d+=r.bottom,me(a.text)&&(d+=o.lineHeight*(a.text.length-1))):d+=r.top;const{titleX:c,titleY:u,maxWidth:f,rotation:m}=Fc(this,d,t,l);Mt(e,a.text,0,0,o,{color:a.color,maxWidth:f,rotation:m,textAlign:Tc(l,t,s),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,a=K(e.grid&&e.grid.z,-1),s=K(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==pt.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:a,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",s=[];let o,r;for(o=0,r=t.length;o<r;++o){const l=t[o];l[a]===this.id&&(!e||l.type===e)&&s.push(l)}return s}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return ge(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class wi{constructor(e,t,a){this.type=e,this.scope=t,this.override=a,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let a;Bc(t)&&(a=this.register(t));const s=this.items,o=e.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,Mc(e,r,a),this.override&&oe.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const t=this.items,a=e.id,s=this.scope;a in t&&delete t[a],s&&a in oe[s]&&(delete oe[s][a],this.override&&delete Ke[a])}}function Mc(i,e,t){const a=Vt(Object.create(null),[t?oe.get(t):{},oe.get(e),i.defaults]);oe.set(e,a),i.defaultRoutes&&Pc(e,i.defaultRoutes),i.descriptors&&oe.describe(e,i.descriptors)}function Pc(i,e){Object.keys(e).forEach(t=>{const a=t.split("."),s=a.pop(),o=[i].concat(a).join("."),r=e[t].split("."),l=r.pop(),d=r.join(".");oe.route(o,s,d,l)})}function Bc(i){return"id"in i&&"defaults"in i}class Oc{constructor(){this.controllers=new wi(jd,"datasets",!0),this.elements=new wi(it,"elements"),this.plugins=new wi(Object,"plugins"),this.scales=new wi(pt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,a){[...t].forEach(s=>{const o=a||this._getRegistryForType(s);a||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):Z(s,r=>{const l=a||this._getRegistryForType(r);this._exec(e,l,r)})})}_exec(e,t,a){const s=Ki(e);J(a["before"+s],[],a),t[e](a),J(a["after"+s],[],a)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const a=this._typedRegistries[t];if(a.isForType(e))return a}return this.plugins}_get(e,t,a){const s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+a+".");return s}}var Fe=new Oc;class Lc{constructor(){this._init=void 0}notify(e,t,a,s){if(t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const o=s?this._descriptors(e).filter(s):this._descriptors(e),r=this._notify(o,e,t,a);return t==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),r}_notify(e,t,a,s){s=s||{};for(const o of e){const r=o.plugin,l=r[a],d=[t,s,o.options];if(J(l,d,r)===!1&&s.cancelable)return!1}return!0}invalidate(){ae(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const a=e&&e.config,s=K(a.options&&a.options.plugins,{}),o=Ic(a);return s===!1&&!t?[]:Uc(e,o,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],a=this._cache,s=(o,r)=>o.filter(l=>!r.some(d=>l.plugin.id===d.plugin.id));this._notify(s(t,a),e,"stop"),this._notify(s(a,t),e,"start")}}function Ic(i){const e={},t=[],a=Object.keys(Fe.plugins.items);for(let o=0;o<a.length;o++)t.push(Fe.getPlugin(a[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];t.indexOf(r)===-1&&(t.push(r),e[r.id]=!0)}return{plugins:t,localIds:e}}function Rc(i,e){return!e&&i===!1?null:i===!0?{}:i}function Uc(i,{plugins:e,localIds:t},a,s){const o=[],r=i.getContext();for(const l of e){const d=l.id,c=Rc(a[d],s);c!==null&&o.push({plugin:l,options:$c(i.config,{plugin:l,local:t[d]},c,r)})}return o}function $c(i,{plugin:e,local:t},a,s){const o=i.pluginScopeKeys(e),r=i.getOptionScopes(a,o);return t&&e.defaults&&r.push(e.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ba(i,e){const t=oe.datasets[i]||{};return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function zc(i,e){let t=i;return i==="_index_"?t=e:i==="_value_"&&(t=e==="x"?"y":"x"),t}function qc(i,e){return i===e?"_index_":"_value_"}function As(i){if(i==="x"||i==="y"||i==="r")return i}function Yc(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function va(i,...e){if(As(i))return i;for(const t of e){const a=t.axis||Yc(t.position)||i.length>1&&As(i[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function xs(i,e,t){if(t[e+"AxisID"]===i)return{axis:e}}function Hc(i,e){if(e.data&&e.data.datasets){const t=e.data.datasets.filter(a=>a.xAxisID===i||a.yAxisID===i);if(t.length)return xs(i,"x",t[0])||xs(i,"y",t[0])}return{}}function jc(i,e){const t=Ke[i.type]||{scales:{}},a=e.scales||{},s=ba(i.type,e),o=Object.create(null);return Object.keys(a).forEach(r=>{const l=a[r];if(!X(l))return console.error(`Invalid scale configuration for scale: ${r}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const d=va(r,l,Hc(r,i),oe.scales[l.type]),c=qc(d,s),u=t.scales||{};o[r]=Dt(Object.create(null),[{axis:d},l,u[d],u[c]])}),i.data.datasets.forEach(r=>{const l=r.type||i.type,d=r.indexAxis||ba(l,e),u=(Ke[l]||{}).scales||{};Object.keys(u).forEach(f=>{const m=zc(f,d),p=r[m+"AxisID"]||m;o[p]=o[p]||Object.create(null),Dt(o[p],[{axis:m},a[p],u[f]])})}),Object.keys(o).forEach(r=>{const l=o[r];Dt(l,[oe.scales[l.type],oe.scale])}),o}function Ns(i){const e=i.options||(i.options={});e.plugins=K(e.plugins,{}),e.scales=jc(i,e)}function Ss(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Wc(i){return i=i||{},i.data=Ss(i.data),Ns(i),i}const Cs=new Map,ws=new Set;function Ei(i,e){let t=Cs.get(i);return t||(t=e(),Cs.set(i,t),ws.add(t)),t}const Ut=(i,e,t)=>{const a=di(e,t);a!==void 0&&i.add(a)};class Qc{constructor(e){this._config=Wc(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Ss(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Ns(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ei(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Ei(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Ei(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,a=this.type;return Ei(`${a}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const a=this._scopeCache;let s=a.get(e);return(!s||t)&&(s=new Map,a.set(e,s)),s}getOptionScopes(e,t,a){const{options:s,type:o}=this,r=this._cachedScopes(e,a),l=r.get(t);if(l)return l;const d=new Set;t.forEach(u=>{e&&(d.add(e),u.forEach(f=>Ut(d,e,f))),u.forEach(f=>Ut(d,s,f)),u.forEach(f=>Ut(d,Ke[o]||{},f)),u.forEach(f=>Ut(d,oe,f)),u.forEach(f=>Ut(d,ia,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),ws.has(t)&&r.set(t,c),c}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ke[t]||{},oe.datasets[t]||{},{type:t},oe,ia]}resolveNamedOptions(e,t,a,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:l}=Es(this._resolverCache,e,s);let d=r;if(Xc(r,t)){o.$shared=!1,a=Ye(a)?a():a;const c=this.createResolver(e,a,l);d=ft(r,a,c)}for(const c of t)o[c]=d[c];return o}createResolver(e,t,a=[""],s){const{resolver:o}=Es(this._resolverCache,e,a);return X(t)?ft(o,t,void 0,s):o}}function Es(i,e,t){let a=i.get(e);a||(a=new Map,i.set(e,a));const s=t.join();let o=a.get(s);return o||(o={resolver:ra(e,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},a.set(s,o)),o}const Gc=i=>X(i)&&Object.getOwnPropertyNames(i).some(e=>Ye(i[e]));function Xc(i,e){const{isScriptable:t,isIndexable:a}=zn(i);for(const s of e){const o=t(s),r=a(s),l=(r||o)&&i[s];if(o&&(Ye(l)||Gc(l))||r&&me(l))return!0}return!1}var Kc="4.5.1";const Zc=["top","bottom","left","right","chartArea"];function _s(i,e){return i==="top"||i==="bottom"||Zc.indexOf(i)===-1&&e==="x"}function Vs(i,e){return function(t,a){return t[i]===a[i]?t[e]-a[e]:t[i]-a[i]}}function Ds(i){const e=i.chart,t=e.options.animation;e.notifyPlugins("afterRender"),J(t&&t.onComplete,[i],e)}function Jc(i){const e=i.chart,t=e.options.animation;J(t&&t.onProgress,[i],e)}function Ts(i){return ca()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const _i={},Fs=i=>{const e=Ts(i);return Object.values(_i).filter(t=>t.canvas===e).pop()};function eu(i,e,t){const a=Object.keys(i);for(const s of a){const o=+s;if(o>=e){const r=i[s];delete i[s],(t>0||o>e)&&(i[o+t]=r)}}}function tu(i,e,t,a){return!t||i.type==="mouseout"?null:a?e:i}class $t{static defaults=oe;static instances=_i;static overrides=Ke;static registry=Fe;static version=Kc;static getChart=Fs;static register(...e){Fe.add(...e),Ms()}static unregister(...e){Fe.remove(...e),Ms()}constructor(e,t){const a=this.config=new Qc(t),s=Ts(e),o=Fs(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||bc(s)),this.platform.updateConfig(a);const l=this.platform.acquireContext(s,r.aspectRatio),d=l&&l.canvas,c=d&&d.height,u=d&&d.width;if(this.id=El(),this.ctx=l,this.canvas=d,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Lc,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jl(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],_i[this.id]=this,!l||!d){console.error("Failed to create chart: can't acquire context from the given item");return}Le.listen(this,"complete",Ds),Le.listen(this,"progress",Jc),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:a,height:s,_aspectRatio:o}=this;return ae(e)?t&&o?o:s?a/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Fe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qn(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ln(this.canvas,this.ctx),this}stop(){return Le.stop(this),this}resize(e,t){Le.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const a=this.options,s=this.canvas,o=a.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,e,t,o),l=a.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Qn(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),J(a.onResize,[this,r],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};Z(t,(a,s)=>{a.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,a=this.scales,s=Object.keys(a).reduce((r,l)=>(r[l]=!1,r),{});let o=[];t&&(o=o.concat(Object.keys(t).map(r=>{const l=t[r],d=va(r,l),c=d==="r",u=d==="x";return{options:l,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Z(o,r=>{const l=r.options,d=l.id,c=va(d,l),u=K(l.type,r.dtype);(l.position===void 0||_s(l.position,c)!==_s(r.dposition))&&(l.position=r.dposition),s[d]=!0;let f=null;if(d in a&&a[d].type===u)f=a[d];else{const m=Fe.getScale(u);f=new m({id:d,type:u,ctx:this.ctx,chart:this}),a[f.id]=f}f.init(l,e)}),Z(s,(r,l)=>{r||delete a[l]}),Z(a,r=>{Ee.configure(this,r,r.options),Ee.addBox(this,r)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,a=e.length;if(e.sort((s,o)=>s.index-o.index),a>t){for(let s=t;s<a;++s)this._destroyDatasetMeta(s);e.splice(t,a-t)}this._sortedMetasets=e.slice(0).sort(Vs("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((a,s)=>{t.filter(o=>o===a._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let a,s;for(this._removeUnreferencedMetasets(),a=0,s=t.length;a<s;a++){const o=t[a];let r=this.getDatasetMeta(a);const l=o.type||this.config.type;if(r.type&&r.type!==l&&(this._destroyDatasetMeta(a),r=this.getDatasetMeta(a)),r.type=l,r.indexAxis=o.indexAxis||ba(l,this.options),r.order=o.order||0,r.index=a,r.label=""+o.label,r.visible=this.isDatasetVisible(a),r.controller)r.controller.updateIndex(a),r.controller.linkScales();else{const d=Fe.getController(l),{datasetElementType:c,dataElementType:u}=oe.datasets[l];Object.assign(d,{dataElementType:Fe.getElement(u),datasetElementType:c&&Fe.getElement(c)}),r.controller=new d(this,a),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){Z(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const a=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),m=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(m),r=Math.max(+f.getMaxOverflow(),r)}r=this._minPadding=a.layout.autoPadding?r:0,this._updateLayout(r),s||Z(o,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Vs("z","_idx"));const{_active:l,_lastEvent:d}=this;d?this._eventHandler(d,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Z(this.scales,e=>{Ee.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),a=new Set(e.events);(!yn(t,a)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:a,start:s,count:o}of t){const r=a==="_removeElements"?-o:o;eu(e,s,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,a=o=>new Set(e.filter(r=>r[0]===o).map((r,l)=>l+","+r.splice(1).join(","))),s=a(0);for(let o=1;o<t;o++)if(!yn(s,a(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ee.update(this,this.width,this.height,e);const t=this.chartArea,a=t.width<=0||t.height<=0;this._layers=[],Z(this.boxes,s=>{a&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,a=this.data.datasets.length;t<a;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,a=this.data.datasets.length;t<a;++t)this._updateDataset(t,Ye(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const a=this.getDatasetMeta(e),s={meta:a,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(a.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Le.has(this)?this.attached&&!Le.running(this)&&Le.start(this):(this.draw(),Ds({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:a,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,a=[];let s,o;for(s=0,o=t.length;s<o;++s){const r=t[s];(!e||r.visible)&&a.push(r)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,a={meta:e,index:e.index,cancelable:!0},s=Td(this,e);this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&na(t,s),e.controller.draw(),s&&sa(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return Un(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,a,s){const o=Zd.modes[t];return typeof o=="function"?o(this,e,a,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],a=this._metasets;let s=a.filter(o=>o&&o._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},a.push(s)),s}getContext(){return this.$context||(this.$context=mt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const a=this.getDatasetMeta(e);return typeof a.hidden=="boolean"?!a.hidden:!t.hidden}setDatasetVisibility(e,t){const a=this.getDatasetMeta(e);a.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,a){const s=a?"show":"hide",o=this.getDatasetMeta(e),r=o.controller._resolveAnimations(void 0,s);ci(t)?(o.data[t].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),r.update(o,{visible:a}),this.update(l=>l.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Le.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Ln(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete _i[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,a=(o,r)=>{t.addEventListener(this,o,r),e[o]=r},s=(o,r,l)=>{o.offsetX=r,o.offsetY=l,this._eventHandler(o)};Z(this.options.events,o=>a(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,a=(d,c)=>{t.addEventListener(this,d,c),e[d]=c},s=(d,c)=>{e[d]&&(t.removeEventListener(this,d,c),delete e[d])},o=(d,c)=>{this.canvas&&this.resize(d,c)};let r;const l=()=>{s("attach",l),this.attached=!0,this.resize(),a("resize",o),a("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),a("attach",l)},t.isAttached(this.canvas)?l():r()}unbindEvents(){Z(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Z(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,a){const s=a?"set":"remove";let o,r,l,d;for(t==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),l=0,d=e.length;l<d;++l){r=e[l];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],a=e.map(({datasetIndex:o,index:r})=>{const l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[r],index:r}});!ri(a,t)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,t))}notifyPlugins(e,t,a){return this._plugins.notify(this,e,t,a)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,a){const s=this.options.hover,o=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),r=o(t,e),l=a?e:o(e,t);r.length&&this.updateHoverStyle(r,s.mode,!1),l.length&&s.mode&&this.updateHoverStyle(l,s.mode,!0)}_eventHandler(e,t){const a={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=r=>(r.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",a,s)===!1)return;const o=this._handleEvent(e,t,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,s),(o||a.changed)&&this.render(),this}_handleEvent(e,t,a){const{_active:s=[],options:o}=this,r=t,l=this._getActiveElements(e,s,a,r),d=Ml(e),c=tu(e,this._lastEvent,a,d);a&&(this._lastEvent=null,J(o.onHover,[e,l,this],this),d&&J(o.onClick,[e,l,this],this));const u=!ri(l,s);return(u||t)&&(this._active=l,this._updateHoverStyles(l,s,t)),this._lastEvent=c,u}_getActiveElements(e,t,a,s){if(e.type==="mouseout")return[];if(!a)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}}function Ms(){return Z($t.instances,i=>i._plugins.invalidate())}function iu(i,e,t){const{startAngle:a,x:s,y:o,outerRadius:r,innerRadius:l,options:d}=e,{borderWidth:c,borderJoinStyle:u}=d,f=Math.min(c/r,Te(a-t));if(i.beginPath(),i.arc(s,o,r-c/2,a+f/2,t-f/2),l>0){const m=Math.min(c/l,Te(a-t));i.arc(s,o,l+c/2,t-m/2,a+m/2,!0)}else{const m=Math.min(c/2,r*Te(a-t));if(u==="round")i.arc(s,o,m,t-ee/2,a+ee/2,!0);else if(u==="bevel"){const p=2*m*m,k=-p*Math.cos(t+ee/2)+s,g=-p*Math.sin(t+ee/2)+o,h=p*Math.cos(a+ee/2)+s,y=p*Math.sin(a+ee/2)+o;i.lineTo(k,g),i.lineTo(h,y)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function au(i,e,t){const{startAngle:a,pixelMargin:s,x:o,y:r,outerRadius:l,innerRadius:d}=e;let c=s/l;i.beginPath(),i.arc(o,r,l,a-c,t+c),d>s?(c=s/d,i.arc(o,r,d,t+c,a-c,!0)):i.arc(o,r,s,t+fe,a-fe),i.closePath(),i.clip()}function nu(i){return oa(i,["outerStart","outerEnd","innerStart","innerEnd"])}function su(i,e,t,a){const s=nu(i.options.borderRadius),o=(t-e)/2,r=Math.min(o,a*e/2),l=d=>{const c=(t-Math.min(o,d))*a/2;return ve(d,0,Math.min(o,c))};return{outerStart:l(s.outerStart),outerEnd:l(s.outerEnd),innerStart:ve(s.innerStart,0,r),innerEnd:ve(s.innerEnd,0,r)}}function gt(i,e,t,a){return{x:t+i*Math.cos(e),y:a+i*Math.sin(e)}}function Vi(i,e,t,a,s,o){const{x:r,y:l,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+a+t-c,0),m=u>0?u+a+t+c:0;let p=0;const k=s-d;if(a){const b=u>0?u-a:0,x=f>0?f-a:0,E=(b+x)/2,C=E!==0?k*E/(E+a):k;p=(k-C)/2}const g=Math.max(.001,k*f-t/ee)/f,h=(k-g)/2,y=d+h+p,v=s-h-p,{outerStart:A,outerEnd:w,innerStart:S,innerEnd:B}=su(e,m,f,v-y),D=f-A,T=f-w,V=y+A/D,F=v-w/T,_=m+S,R=m+B,I=y+S/_,N=v-B/R;if(i.beginPath(),o){const b=(V+F)/2;if(i.arc(r,l,f,V,b),i.arc(r,l,f,b,F),w>0){const P=gt(T,F,r,l);i.arc(P.x,P.y,w,F,v+fe)}const x=gt(R,v,r,l);if(i.lineTo(x.x,x.y),B>0){const P=gt(R,N,r,l);i.arc(P.x,P.y,B,v+fe,N+Math.PI)}const E=(v-B/m+(y+S/m))/2;if(i.arc(r,l,m,v-B/m,E,!0),i.arc(r,l,m,E,y+S/m,!0),S>0){const P=gt(_,I,r,l);i.arc(P.x,P.y,S,I+Math.PI,y-fe)}const C=gt(D,y,r,l);if(i.lineTo(C.x,C.y),A>0){const P=gt(D,V,r,l);i.arc(P.x,P.y,A,y-fe,V)}}else{i.moveTo(r,l);const b=Math.cos(V)*f+r,x=Math.sin(V)*f+l;i.lineTo(b,x);const E=Math.cos(F)*f+r,C=Math.sin(F)*f+l;i.lineTo(E,C)}i.closePath()}function ou(i,e,t,a,s){const{fullCircles:o,startAngle:r,circumference:l}=e;let d=e.endAngle;if(o){Vi(i,e,t,a,d,s);for(let c=0;c<o;++c)i.fill();isNaN(l)||(d=r+(l%ye||ye))}return Vi(i,e,t,a,d,s),i.fill(),d}function ru(i,e,t,a,s){const{fullCircles:o,startAngle:r,circumference:l,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:m,borderRadius:p}=d,k=d.borderAlign==="inner";if(!c)return;i.setLineDash(f||[]),i.lineDashOffset=m,k?(i.lineWidth=c*2,i.lineJoin=u||"round"):(i.lineWidth=c,i.lineJoin=u||"bevel");let g=e.endAngle;if(o){Vi(i,e,t,a,g,s);for(let h=0;h<o;++h)i.stroke();isNaN(l)||(g=r+(l%ye||ye))}k&&au(i,e,g),d.selfJoin&&g-r>=ee&&p===0&&u!=="miter"&&iu(i,e,g),o||(Vi(i,e,t,a,g,s),i.stroke())}class lu extends it{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,a){const s=this.getProps(["x","y"],a),{angle:o,distance:r}=Nn(s,{x:e,y:t}),{startAngle:l,endAngle:d,innerRadius:c,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),m=(this.options.spacing+this.options.borderWidth)/2,p=K(f,d-l),k=Sn(o,l,d)&&l!==d,g=p>=ye||k,h=Xe(r,c+m,u+m);return g&&h}getCenterPoint(e){const{x:t,y:a,startAngle:s,endAngle:o,innerRadius:r,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:c}=this.options,u=(s+o)/2,f=(r+l+c+d)/2;return{x:t+Math.cos(u)*f,y:a+Math.sin(u)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:a}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,r=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=a>ye?Math.floor(a/ye):0,a===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*s,Math.sin(l)*s);const d=1-Math.sin(Math.min(ee,a||0)),c=s*d;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,ou(e,this,c,o,r),ru(e,this,c,o,r),e.restore()}}function Ps(i,e){const{x:t,y:a,base:s,width:o,height:r}=i.getProps(["x","y","base","width","height"],e);let l,d,c,u,f;return i.horizontal?(f=r/2,l=Math.min(t,s),d=Math.max(t,s),c=a-f,u=a+f):(f=o/2,l=t-f,d=t+f,c=Math.min(a,s),u=Math.max(a,s)),{left:l,top:c,right:d,bottom:u}}function je(i,e,t,a){return i?0:ve(e,t,a)}function du(i,e,t){const a=i.options.borderWidth,s=i.borderSkipped,o=$n(a);return{t:je(s.top,o.top,0,t),r:je(s.right,o.right,0,e),b:je(s.bottom,o.bottom,0,t),l:je(s.left,o.left,0,e)}}function cu(i,e,t){const{enableBorderRadius:a}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=ut(s),r=Math.min(e,t),l=i.borderSkipped,d=a||X(s);return{topLeft:je(!d||l.top||l.left,o.topLeft,0,r),topRight:je(!d||l.top||l.right,o.topRight,0,r),bottomLeft:je(!d||l.bottom||l.left,o.bottomLeft,0,r),bottomRight:je(!d||l.bottom||l.right,o.bottomRight,0,r)}}function uu(i){const e=Ps(i),t=e.right-e.left,a=e.bottom-e.top,s=du(i,t/2,a/2),o=cu(i,t/2,a/2);return{outer:{x:e.left,y:e.top,w:t,h:a,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:a-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Aa(i,e,t,a){const s=e===null,o=t===null,l=i&&!(s&&o)&&Ps(i,a);return l&&(s||Xe(e,l.left,l.right))&&(o||Xe(t,l.top,l.bottom))}function mu(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function fu(i,e){i.rect(e.x,e.y,e.w,e.h)}function xa(i,e,t={}){const a=i.x!==t.x?-e:0,s=i.y!==t.y?-e:0,o=(i.x+i.w!==t.x+t.w?e:0)-a,r=(i.y+i.h!==t.y+t.h?e:0)-s;return{x:i.x+a,y:i.y+s,w:i.w+o,h:i.h+r,radius:i.radius}}class Bs extends it{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:a,backgroundColor:s}}=this,{inner:o,outer:r}=uu(this),l=mu(r.radius)?gi:fu;e.save(),(r.w!==o.w||r.h!==o.h)&&(e.beginPath(),l(e,xa(r,t,o)),e.clip(),l(e,xa(o,-t,r)),e.fillStyle=a,e.fill("evenodd")),e.beginPath(),l(e,xa(o,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,a){return Aa(this,e,t,a)}inXRange(e,t){return Aa(this,e,null,t)}inYRange(e,t){return Aa(this,null,e,t)}getCenterPoint(e){const{x:t,y:a,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+s)/2:t,y:o?a:(a+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const Os=(i,e)=>{let{boxHeight:t=e,boxWidth:a=e}=i;return i.usePointStyle&&(t=Math.min(t,e),a=i.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:t,itemHeight:Math.max(e,t)}},hu=(i,e)=>i!==null&&e!==null&&i.datasetIndex===e.datasetIndex&&i.index===e.index;class Ls extends it{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,a){this.maxWidth=e,this.maxHeight=t,this._margins=a,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=J(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(a=>e.filter(a,this.chart.data))),e.sort&&(t=t.sort((a,s)=>e.sort(a,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}const a=e.labels,s=ge(a.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:l,itemHeight:d}=Os(a,o);let c,u;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,l,d)+10):(u=this.maxHeight,c=this._fitCols(r,s,l,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,t,a,s){const{ctx:o,maxWidth:r,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+l;let f=e;o.textAlign="left",o.textBaseline="middle";let m=-1,p=-u;return this.legendItems.forEach((k,g)=>{const h=a+t/2+o.measureText(k.text).width;(g===0||c[c.length-1]+h+2*l>r)&&(f+=u,c[c.length-(g>0?0:1)]=0,p+=u,m++),d[g]={left:0,top:p,row:m,width:h,height:s},c[c.length-1]+=h+l}),f}_fitCols(e,t,a,s){const{ctx:o,maxHeight:r,options:{labels:{padding:l}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-e;let f=l,m=0,p=0,k=0,g=0;return this.legendItems.forEach((h,y)=>{const{itemWidth:v,itemHeight:A}=pu(a,t,o,h,s);y>0&&p+A+2*l>u&&(f+=m+l,c.push({width:m,height:p}),k+=m+l,g++,m=p=0),d[y]={left:k,top:p,col:g,width:v,height:A},m=Math.max(m,v),p+=A+l}),f+=m,c.push({width:m,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:a,labels:{padding:s},rtl:o}}=this,r=ht(o,this.left,this.width);if(this.isHorizontal()){let l=0,d=pe(a,this.left+s,this.right-this.lineWidths[l]);for(const c of t)l!==c.row&&(l=c.row,d=pe(a,this.left+s,this.right-this.lineWidths[l])),c.top+=this.top+e+s,c.left=r.leftForLtr(r.x(d),c.width),d+=c.width+s}else{let l=0,d=pe(a,this.top+e+s,this.bottom-this.columnSizes[l].height);for(const c of t)c.col!==l&&(l=c.col,d=pe(a,this.top+e+s,this.bottom-this.columnSizes[l].height)),c.top=d,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),d+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;na(e,this),this._draw(),sa(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:a,ctx:s}=this,{align:o,labels:r}=e,l=oe.color,d=ht(e.rtl,this.left,this.width),c=ge(r.font),{padding:u}=r,f=c.size,m=f/2;let p;this.drawTitle(),s.textAlign=d.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:k,boxHeight:g,itemHeight:h}=Os(r,f),y=function(B,D,T){if(isNaN(k)||k<=0||isNaN(g)||g<0)return;s.save();const V=K(T.lineWidth,1);if(s.fillStyle=K(T.fillStyle,l),s.lineCap=K(T.lineCap,"butt"),s.lineDashOffset=K(T.lineDashOffset,0),s.lineJoin=K(T.lineJoin,"miter"),s.lineWidth=V,s.strokeStyle=K(T.strokeStyle,l),s.setLineDash(K(T.lineDash,[])),r.usePointStyle){const F={radius:g*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:V},_=d.xPlus(B,k/2),R=D+m;Rn(s,F,_,R,r.pointStyleWidth&&k)}else{const F=D+Math.max((f-g)/2,0),_=d.leftForLtr(B,k),R=ut(T.borderRadius);s.beginPath(),Object.values(R).some(I=>I!==0)?gi(s,{x:_,y:F,w:k,h:g,radius:R}):s.rect(_,F,k,g),s.fill(),V!==0&&s.stroke()}s.restore()},v=function(B,D,T){Mt(s,T.text,B,D+h/2,c,{strikethrough:T.hidden,textAlign:d.textAlign(T.textAlign)})},A=this.isHorizontal(),w=this._computeTitleHeight();A?p={x:pe(o,this.left+u,this.right-a[0]),y:this.top+u+w,line:0}:p={x:this.left+u,y:pe(o,this.top+w+u,this.bottom-t[0].height),line:0},Xn(this.ctx,e.textDirection);const S=h+u;this.legendItems.forEach((B,D)=>{s.strokeStyle=B.fontColor,s.fillStyle=B.fontColor;const T=s.measureText(B.text).width,V=d.textAlign(B.textAlign||(B.textAlign=r.textAlign)),F=k+m+T;let _=p.x,R=p.y;d.setWidth(this.width),A?D>0&&_+F+u>this.right&&(R=p.y+=S,p.line++,_=p.x=pe(o,this.left+u,this.right-a[p.line])):D>0&&R+S>this.bottom&&(_=p.x=_+t[p.line].width+u,p.line++,R=p.y=pe(o,this.top+w+u,this.bottom-t[p.line].height));const I=d.x(_);if(y(I,R,B),_=Wl(V,_+k+m,A?_+F:this.right,e.rtl),v(d.x(_),R,B),A)p.x+=F+u;else if(typeof B.text!="string"){const N=c.lineHeight;p.y+=Is(B,N)+u}else p.y+=S}),Kn(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,a=ge(t.font),s=we(t.padding);if(!t.display)return;const o=ht(e.rtl,this.left,this.width),r=this.ctx,l=t.position,d=a.size/2,c=s.top+d;let u,f=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),u=this.top+c,f=pe(e.align,f,this.right-m);else{const k=this.columnSizes.reduce((g,h)=>Math.max(g,h.height),0);u=c+pe(e.align,this.top,this.bottom-k-e.labels.padding-this._computeTitleHeight())}const p=pe(l,f,f+m);r.textAlign=o.textAlign(ea(l)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=a.string,Mt(r,t.text,p,u,a)}_computeTitleHeight(){const e=this.options.title,t=ge(e.font),a=we(e.padding);return e.display?t.lineHeight+a.height:0}_getLegendItemAt(e,t){let a,s,o;if(Xe(e,this.left,this.right)&&Xe(t,this.top,this.bottom)){for(o=this.legendHitBoxes,a=0;a<o.length;++a)if(s=o[a],Xe(e,s.left,s.left+s.width)&&Xe(t,s.top,s.top+s.height))return this.legendItems[a]}return null}handleEvent(e){const t=this.options;if(!yu(e.type,t))return;const a=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=hu(s,a);s&&!o&&J(t.onLeave,[e,s,this],this),this._hoveredItem=a,a&&!o&&J(t.onHover,[e,a,this],this)}else a&&J(t.onClick,[e,a,this],this)}}function pu(i,e,t,a,s){const o=gu(a,i,e,t),r=ku(s,a,e.lineHeight);return{itemWidth:o,itemHeight:r}}function gu(i,e,t,a){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),e+t.size/2+a.measureText(s).width}function ku(i,e,t){let a=i;return typeof e.text!="string"&&(a=Is(e,t)),a}function Is(i,e){const t=i.text?i.text.length:0;return e*t}function yu(i,e){return!!((i==="mousemove"||i==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(i==="click"||i==="mouseup"))}var Na={id:"legend",_element:Ls,start(i,e,t){const a=i.legend=new Ls({ctx:i.ctx,options:t,chart:i});Ee.configure(i,a,t),Ee.addBox(i,a)},stop(i){Ee.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,e,t){const a=i.legend;Ee.configure(i,a,t),a.options=t},afterUpdate(i){const e=i.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(i,e){e.replay||i.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,e,t){const a=e.datasetIndex,s=t.chart;s.isDatasetVisible(a)?(s.hide(a),e.hidden=!0):(s.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const e=i.data.datasets,{labels:{usePointStyle:t,pointStyle:a,textAlign:s,color:o,useBorderRadius:r,borderRadius:l}}=i.legend.options;return i._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(t?0:void 0),u=we(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:a||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(l||c.borderRadius),datasetIndex:d.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Rs extends it{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const a=this.options;if(this.left=0,this.top=0,!a.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;const s=me(a.text)?a.text.length:1;this._padding=we(a.padding);const o=s*ge(a.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:t,left:a,bottom:s,right:o,options:r}=this,l=r.align;let d=0,c,u,f;return this.isHorizontal()?(u=pe(l,a,o),f=t+e,c=o-a):(r.position==="left"?(u=a+e,f=pe(l,s,t),d=ee*-.5):(u=o-e,f=pe(l,t,s),d=ee*.5),c=s-t),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const a=ge(t.font),o=a.lineHeight/2+this._padding.top,{titleX:r,titleY:l,maxWidth:d,rotation:c}=this._drawArgs(o);Mt(e,t.text,0,0,a,{color:t.color,maxWidth:d,rotation:c,textAlign:ea(t.align),textBaseline:"middle",translation:[r,l]})}}function bu(i,e){const t=new Rs({ctx:i.ctx,options:e,chart:i});Ee.configure(i,t,e),Ee.addBox(i,t),i.titleBlock=t}var Sa={id:"title",_element:Rs,start(i,e,t){bu(i,t)},stop(i){const e=i.titleBlock;Ee.removeBox(i,e),delete i.titleBlock},beforeUpdate(i,e,t){const a=i.titleBlock;Ee.configure(i,a,t),a.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const zt={average(i){if(!i.length)return!1;let e,t,a=new Set,s=0,o=0;for(e=0,t=i.length;e<t;++e){const l=i[e].element;if(l&&l.hasValue()){const d=l.tooltipPosition();a.add(d.x),s+=d.y,++o}}return o===0||a.size===0?!1:{x:[...a].reduce((l,d)=>l+d)/a.size,y:s/o}},nearest(i,e){if(!i.length)return!1;let t=e.x,a=e.y,s=Number.POSITIVE_INFINITY,o,r,l;for(o=0,r=i.length;o<r;++o){const d=i[o].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=Ul(e,c);u<s&&(s=u,l=d)}}if(l){const d=l.tooltipPosition();t=d.x,a=d.y}return{x:t,y:a}}};function Me(i,e){return e&&(me(e)?Array.prototype.push.apply(i,e):i.push(e)),i}function Ie(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
204
+ `)>-1?i.split(`
205
+ `):i}function vu(i,e){const{element:t,datasetIndex:a,index:s}=e,o=i.getDatasetMeta(a).controller,{label:r,value:l}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[a].data[s],formattedValue:l,dataset:o.getDataset(),dataIndex:s,datasetIndex:a,element:t}}function Us(i,e){const t=i.chart.ctx,{body:a,footer:s,title:o}=i,{boxWidth:r,boxHeight:l}=e,d=ge(e.bodyFont),c=ge(e.titleFont),u=ge(e.footerFont),f=o.length,m=s.length,p=a.length,k=we(e.padding);let g=k.height,h=0,y=a.reduce((w,S)=>w+S.before.length+S.lines.length+S.after.length,0);if(y+=i.beforeBody.length+i.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(l,d.lineHeight):d.lineHeight;g+=p*w+(y-p)*d.lineHeight+(y-1)*e.bodySpacing}m&&(g+=e.footerMarginTop+m*u.lineHeight+(m-1)*e.footerSpacing);let v=0;const A=function(w){h=Math.max(h,t.measureText(w).width+v)};return t.save(),t.font=c.string,Z(i.title,A),t.font=d.string,Z(i.beforeBody.concat(i.afterBody),A),v=e.displayColors?r+2+e.boxPadding:0,Z(a,w=>{Z(w.before,A),Z(w.lines,A),Z(w.after,A)}),v=0,t.font=u.string,Z(i.footer,A),t.restore(),h+=k.width,{width:h,height:g}}function Au(i,e){const{y:t,height:a}=e;return t<a/2?"top":t>i.height-a/2?"bottom":"center"}function xu(i,e,t,a){const{x:s,width:o}=a,r=t.caretSize+t.caretPadding;if(i==="left"&&s+o+r>e.width||i==="right"&&s-o-r<0)return!0}function Nu(i,e,t,a){const{x:s,width:o}=t,{width:r,chartArea:{left:l,right:d}}=i;let c="center";return a==="center"?c=s<=(l+d)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),xu(c,i,e,t)&&(c="center"),c}function $s(i,e,t){const a=t.yAlign||e.yAlign||Au(i,t);return{xAlign:t.xAlign||e.xAlign||Nu(i,e,t,a),yAlign:a}}function Su(i,e){let{x:t,width:a}=i;return e==="right"?t-=a:e==="center"&&(t-=a/2),t}function Cu(i,e,t){let{y:a,height:s}=i;return e==="top"?a+=t:e==="bottom"?a-=s+t:a-=s/2,a}function zs(i,e,t,a){const{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:l,yAlign:d}=t,c=s+o,{topLeft:u,topRight:f,bottomLeft:m,bottomRight:p}=ut(r);let k=Su(e,l);const g=Cu(e,d,c);return d==="center"?l==="left"?k+=c:l==="right"&&(k-=c):l==="left"?k-=Math.max(u,m)+s:l==="right"&&(k+=Math.max(f,p)+s),{x:ve(k,0,a.width-e.width),y:ve(g,0,a.height-e.height)}}function Di(i,e,t){const a=we(t.padding);return e==="center"?i.x+i.width/2:e==="right"?i.x+i.width-a.right:i.x+a.left}function qs(i){return Me([],Ie(i))}function wu(i,e,t){return mt(i,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Ys(i,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?i.override(t):i}const Hs={beforeTitle:Oe,title(i){if(i.length>0){const e=i[0],t=e.chart.data.labels,a=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return t[e.dataIndex]}return""},afterTitle:Oe,beforeBody:Oe,beforeLabel:Oe,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let e=i.dataset.label||"";e&&(e+=": ");const t=i.formattedValue;return ae(t)||(e+=t),e},labelColor(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Oe,afterBody:Oe,beforeFooter:Oe,footer:Oe,afterFooter:Oe};function Ae(i,e,t,a){const s=i[e].call(t,a);return typeof s>"u"?Hs[e].call(t,a):s}class js extends it{static positioners=zt;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,a=this.options.setContext(this.getContext()),s=a.enabled&&t.options.animation&&a.animations,o=new Jn(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wu(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:a}=t,s=Ae(a,"beforeTitle",this,e),o=Ae(a,"title",this,e),r=Ae(a,"afterTitle",this,e);let l=[];return l=Me(l,Ie(s)),l=Me(l,Ie(o)),l=Me(l,Ie(r)),l}getBeforeBody(e,t){return qs(Ae(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:a}=t,s=[];return Z(e,o=>{const r={before:[],lines:[],after:[]},l=Ys(a,o);Me(r.before,Ie(Ae(l,"beforeLabel",this,o))),Me(r.lines,Ae(l,"label",this,o)),Me(r.after,Ie(Ae(l,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(e,t){return qs(Ae(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:a}=t,s=Ae(a,"beforeFooter",this,e),o=Ae(a,"footer",this,e),r=Ae(a,"afterFooter",this,e);let l=[];return l=Me(l,Ie(s)),l=Me(l,Ie(o)),l=Me(l,Ie(r)),l}_createItems(e){const t=this._active,a=this.chart.data,s=[],o=[],r=[];let l=[],d,c;for(d=0,c=t.length;d<c;++d)l.push(vu(this.chart,t[d]));return e.filter&&(l=l.filter((u,f,m)=>e.filter(u,f,m,a))),e.itemSort&&(l=l.sort((u,f)=>e.itemSort(u,f,a))),Z(l,u=>{const f=Ys(e.callbacks,u);s.push(Ae(f,"labelColor",this,u)),o.push(Ae(f,"labelPointStyle",this,u)),r.push(Ae(f,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=l,l}update(e,t){const a=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const l=zt[a.position].call(this,s,this._eventPosition);r=this._createItems(a),this.title=this.getTitle(r,a),this.beforeBody=this.getBeforeBody(r,a),this.body=this.getBody(r,a),this.afterBody=this.getAfterBody(r,a),this.footer=this.getFooter(r,a);const d=this._size=Us(this,a),c=Object.assign({},l,d),u=$s(this.chart,a,c),f=zs(a,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:l.x,caretY:l.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,a,s){const o=this.getCaretPosition(e,a,s);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,a){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:l}=a,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=ut(l),{x:m,y:p}=e,{width:k,height:g}=t;let h,y,v,A,w,S;return o==="center"?(w=p+g/2,s==="left"?(h=m,y=h-r,A=w+r,S=w-r):(h=m+k,y=h+r,A=w-r,S=w+r),v=h):(s==="left"?y=m+Math.max(d,u)+r:s==="right"?y=m+k-Math.max(c,f)-r:y=this.caretX,o==="top"?(A=p,w=A-r,h=y-r,v=y+r):(A=p+g,w=A+r,h=y+r,v=y-r),S=A),{x1:h,x2:y,x3:v,y1:A,y2:w,y3:S}}drawTitle(e,t,a){const s=this.title,o=s.length;let r,l,d;if(o){const c=ht(a.rtl,this.x,this.width);for(e.x=Di(this,a.titleAlign,a),t.textAlign=c.textAlign(a.titleAlign),t.textBaseline="middle",r=ge(a.titleFont),l=a.titleSpacing,t.fillStyle=a.titleColor,t.font=r.string,d=0;d<o;++d)t.fillText(s[d],c.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+l,d+1===o&&(e.y+=a.titleMarginBottom-l)}}_drawColorBox(e,t,a,s,o){const r=this.labelColors[a],l=this.labelPointStyles[a],{boxHeight:d,boxWidth:c}=o,u=ge(o.bodyFont),f=Di(this,"left",o),m=s.x(f),p=d<u.lineHeight?(u.lineHeight-d)/2:0,k=t.y+p;if(o.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},h=s.leftForLtr(m,c)+c/2,y=k+d/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,In(e,g,h,y),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,In(e,g,h,y)}else{e.lineWidth=X(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const g=s.leftForLtr(m,c),h=s.leftForLtr(s.xPlus(m,1),c-2),y=ut(r.borderRadius);Object.values(y).some(v=>v!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,gi(e,{x:g,y:k,w:c,h:d,radius:y}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),gi(e,{x:h,y:k+1,w:c-2,h:d-2,radius:y}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(g,k,c,d),e.strokeRect(g,k,c,d),e.fillStyle=r.backgroundColor,e.fillRect(h,k+1,c-2,d-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,t,a){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:l,boxHeight:d,boxWidth:c,boxPadding:u}=a,f=ge(a.bodyFont);let m=f.lineHeight,p=0;const k=ht(a.rtl,this.x,this.width),g=function(T){t.fillText(T,k.x(e.x+p),e.y+m/2),e.y+=m+o},h=k.textAlign(r);let y,v,A,w,S,B,D;for(t.textAlign=r,t.textBaseline="middle",t.font=f.string,e.x=Di(this,h,a),t.fillStyle=a.bodyColor,Z(this.beforeBody,g),p=l&&h!=="right"?r==="center"?c/2+u:c+2+u:0,w=0,B=s.length;w<B;++w){for(y=s[w],v=this.labelTextColors[w],t.fillStyle=v,Z(y.before,g),A=y.lines,l&&A.length&&(this._drawColorBox(t,e,w,k,a),m=Math.max(f.lineHeight,d)),S=0,D=A.length;S<D;++S)g(A[S]),m=f.lineHeight;Z(y.after,g)}p=0,m=f.lineHeight,Z(this.afterBody,g),e.y-=o}drawFooter(e,t,a){const s=this.footer,o=s.length;let r,l;if(o){const d=ht(a.rtl,this.x,this.width);for(e.x=Di(this,a.footerAlign,a),e.y+=a.footerMarginTop,t.textAlign=d.textAlign(a.footerAlign),t.textBaseline="middle",r=ge(a.footerFont),t.fillStyle=a.footerColor,t.font=r.string,l=0;l<o;++l)t.fillText(s[l],d.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+a.footerSpacing}}drawBackground(e,t,a,s){const{xAlign:o,yAlign:r}=this,{x:l,y:d}=e,{width:c,height:u}=a,{topLeft:f,topRight:m,bottomLeft:p,bottomRight:k}=ut(s.cornerRadius);t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.beginPath(),t.moveTo(l+f,d),r==="top"&&this.drawCaret(e,t,a,s),t.lineTo(l+c-m,d),t.quadraticCurveTo(l+c,d,l+c,d+m),r==="center"&&o==="right"&&this.drawCaret(e,t,a,s),t.lineTo(l+c,d+u-k),t.quadraticCurveTo(l+c,d+u,l+c-k,d+u),r==="bottom"&&this.drawCaret(e,t,a,s),t.lineTo(l+p,d+u),t.quadraticCurveTo(l,d+u,l,d+u-p),r==="center"&&o==="left"&&this.drawCaret(e,t,a,s),t.lineTo(l,d+f),t.quadraticCurveTo(l,d,l+f,d),t.closePath(),t.fill(),s.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,a=this.$animations,s=a&&a.x,o=a&&a.y;if(s||o){const r=zt[e.position].call(this,this._active,this._eventPosition);if(!r)return;const l=this._size=Us(this,e),d=Object.assign({},r,this._size),c=$s(t,e,d),u=zs(e,d,c,t);(s._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const r=we(t.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&l&&(e.save(),e.globalAlpha=a,this.drawBackground(o,e,s,t),Xn(e,t.textDirection),o.y+=r.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),Kn(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const a=this._active,s=e.map(({datasetIndex:l,index:d})=>{const c=this.chart.getDatasetMeta(l);if(!c)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:c.data[d],index:d}}),o=!ri(a,s),r=this._positionChanged(s,t);(o||r)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,a=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(e,o,t,a),l=this._positionChanged(r,e),d=t||!ri(r,o)||l;return d&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),d}_getActiveElements(e,t,a,s){const o=this.options;if(e.type==="mouseout")return[];if(!s)return t.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const r=this.chart.getElementsAtEventForMode(e,o.mode,o,a);return o.reverse&&r.reverse(),r}_positionChanged(e,t){const{caretX:a,caretY:s,options:o}=this,r=zt[o.position].call(this,e,t);return r!==!1&&(a!==r.x||s!==r.y)}}var Ca={id:"tooltip",_element:js,positioners:zt,afterInit(i,e,t){t&&(i.tooltip=new js({chart:i,options:t}))},beforeUpdate(i,e,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,e,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){const e=i.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(i.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;e.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,e){if(i.tooltip){const t=e.replay;i.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,e)=>e.bodyFont.size,boxWidth:(i,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Hs},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Eu=(i,e,t,a)=>(typeof e=="string"?(t=i.push(e)-1,a.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function _u(i,e,t,a){const s=i.indexOf(e);if(s===-1)return Eu(i,e,t,a);const o=i.lastIndexOf(e);return s!==o?t:s}const Vu=(i,e)=>i===null?null:ve(Math.round(i),0,e);function Ws(i){const e=this.getLabels();return i>=0&&i<e.length?e[i]:i}class wa extends pt{static id="category";static defaults={ticks:{callback:Ws}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const a=this.getLabels();for(const{index:s,label:o}of t)a[s]===o&&a.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(ae(e))return null;const a=this.getLabels();return t=isFinite(t)&&a[t]===e?t:_u(a,e,K(t,e),this._addedLabels),Vu(t,a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:a,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(a=0),t||(s=this.getLabels().length-1)),this.min=a,this.max=s}buildTicks(){const e=this.min,t=this.max,a=this.options.offset,s=[];let o=this.getLabels();o=e===0&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let r=e;r<=t;r++)s.push({value:r});return s}getLabelForValue(e){return Ws.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function Du(i,e){const t=[],{bounds:s,step:o,min:r,max:l,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:m}=i,p=o||1,k=u-1,{min:g,max:h}=e,y=!ae(r),v=!ae(l),A=!ae(c),w=(h-g)/(f+1);let S=An((h-g)/k/p)*p,B,D,T,V;if(S<1e-14&&!y&&!v)return[{value:g},{value:h}];V=Math.ceil(h/S)-Math.floor(g/S),V>k&&(S=An(V*S/k/p)*p),ae(d)||(B=Math.pow(10,d),S=Math.ceil(S*B)/B),s==="ticks"?(D=Math.floor(g/S)*S,T=Math.ceil(h/S)*S):(D=g,T=h),y&&v&&o&&Ll((l-r)/o,S/1e3)?(V=Math.round(Math.min((l-r)/S,u)),S=(l-r)/V,D=r,T=l):A?(D=y?r:D,T=v?l:T,V=c-1,S=(T-D)/V):(V=(T-D)/S,fi(V,Math.round(V),S/1e3)?V=Math.round(V):V=Math.ceil(V));const F=Math.max(xn(S),xn(D));B=Math.pow(10,ae(d)?F:d),D=Math.round(D*B)/B,T=Math.round(T*B)/B;let _=0;for(y&&(m&&D!==r?(t.push({value:r}),D<r&&_++,fi(Math.round((D+_*S)*B)/B,r,Qs(r,w,i))&&_++):D<r&&_++);_<V;++_){const R=Math.round((D+_*S)*B)/B;if(v&&R>l)break;t.push({value:R})}return v&&m&&T!==l?t.length&&fi(t[t.length-1].value,l,Qs(l,w,i))?t[t.length-1].value=l:t.push({value:l}):(!v||T===l)&&t.push({value:T}),t}function Qs(i,e,{horizontal:t,minRotation:a}){const s=Ge(a),o=(t?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+i).length;return Math.min(e/o,r)}class Tu extends pt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return ae(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:a}=this.getUserBounds();let{min:s,max:o}=this;const r=d=>s=t?s:d,l=d=>o=a?o:d;if(e){const d=mi(s),c=mi(o);d<0&&c<0?l(0):d>0&&c>0&&r(0)}if(s===o){let d=o===0?1:Math.abs(o*.05);l(o+d),e||r(s-d)}this.min=s,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:a}=e,s;return a?(s=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const s={maxTicks:a,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,r=Du(s,o);return e.bounds==="ticks"&&Il(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,a=this.max;if(super.configure(),this.options.offset&&e.length){const s=(a-t)/Math.max(e.length-1,1)/2;t-=s,a+=s}this._startValue=t,this._endValue=a,this._valueRange=a-t}getLabelForValue(e){return Pn(e,this.chart.options.locale,this.options.ticks.format)}}class Gs extends Tu{static id="linear";static defaults={ticks:{callback:Bn.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ce(e)?e:0,this.max=Ce(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,a=Ge(this.options.ticks.minRotation),s=(e?Math.sin(a):Math.cos(a))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Ti={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},xe=Object.keys(Ti);function Xs(i,e){return i-e}function Ks(i,e){if(ae(e))return null;const t=i._adapter,{parser:a,round:s,isoWeekday:o}=i._parseOpts;let r=e;return typeof a=="function"&&(r=a(r)),Ce(r)||(r=typeof a=="string"?t.parse(r,a):t.parse(r)),r===null?null:(s&&(r=s==="week"&&(hi(o)||o===!0)?t.startOf(r,"isoWeek",o):t.startOf(r,s)),+r)}function Zs(i,e,t,a){const s=xe.length;for(let o=xe.indexOf(i);o<s-1;++o){const r=Ti[xe[o]],l=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((t-e)/(l*r.size))<=a)return xe[o]}return xe[s-1]}function Fu(i,e,t,a,s){for(let o=xe.length-1;o>=xe.indexOf(t);o--){const r=xe[o];if(Ti[r].common&&i._adapter.diff(s,a,r)>=e-1)return r}return xe[t?xe.indexOf(t):0]}function Mu(i){for(let e=xe.indexOf(i)+1,t=xe.length;e<t;++e)if(Ti[xe[e]].common)return xe[e]}function Js(i,e,t){if(!t)i[e]=!0;else if(t.length){const{lo:a,hi:s}=Zi(t,e),o=t[a]>=e?t[a]:t[s];i[o]=!0}}function Pu(i,e,t,a){const s=i._adapter,o=+s.startOf(e[0].value,a),r=e[e.length-1].value;let l,d;for(l=o;l<=r;l=+s.add(l,1,a))d=t[l],d>=0&&(e[d].major=!0);return e}function eo(i,e,t){const a=[],s={},o=e.length;let r,l;for(r=0;r<o;++r)l=e[r],s[l]=r,a.push({value:l,major:!1});return o===0||!t?a:Pu(i,a,s,t)}class to extends pt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const a=e.time||(e.time={}),s=this._adapter=new Wd._date(e.adapters.date);s.init(t),Dt(a.displayFormats,s.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:Ks(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,a=e.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:l}=this.getUserBounds();function d(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!l&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!l)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),s=Ce(s)&&!isNaN(s)?s:+t.startOf(Date.now(),a),o=Ce(o)&&!isNaN(o)?o:+t.endOf(Date.now(),a)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],a=e[e.length-1]),{min:t,max:a}}buildTicks(){const e=this.options,t=e.time,a=e.ticks,s=a.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,l=ql(s,o,r);return this._unit=t.unit||(a.autoSkip?Zs(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):Fu(this,l.length,t.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:Mu(this._unit),this.initOffsets(s),e.reverse&&l.reverse(),eo(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t=0,a=0,s,o;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?a=o:a=(o-this.getDecimalForValue(e[e.length-2]))/2);const r=e.length<3?.5:.25;t=ve(t,0,r),a=ve(a,0,r),this._offsets={start:t,end:a,factor:1/(t+1+a)}}_generate(){const e=this._adapter,t=this.min,a=this.max,s=this.options,o=s.time,r=o.unit||Zs(o.minUnit,t,a,this._getLabelCapacity(t)),l=K(s.ticks.stepSize,1),d=r==="week"?o.isoWeekday:!1,c=hi(d)||d===!0,u={};let f=t,m,p;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":r),e.diff(a,t,r)>1e5*l)throw new Error(t+" and "+a+" are too far apart with stepSize of "+l+" "+r);const k=s.ticks.source==="data"&&this.getDataTimestamps();for(m=f,p=0;m<a;m=+e.add(m,l,r),p++)Js(u,m,k);return(m===a||s.bounds==="ticks"||p===1)&&Js(u,m,k),Object.keys(u).sort(Xs).map(g=>+g)}getLabelForValue(e){const t=this._adapter,a=this.options.time;return a.tooltipFormat?t.format(e,a.tooltipFormat):t.format(e,a.displayFormats.datetime)}format(e,t){const s=this.options.time.displayFormats,o=this._unit,r=t||s[o];return this._adapter.format(e,r)}_tickFormatFunction(e,t,a,s){const o=this.options,r=o.ticks.callback;if(r)return J(r,[e,t,a],this);const l=o.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&l[d],f=c&&l[c],m=a[t],p=c&&f&&m&&m.major;return this._adapter.format(e,s||(p?f:u))}generateTickLabels(e){let t,a,s;for(t=0,a=e.length;t<a;++t)s=e[t],s.label=this._tickFormatFunction(s.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,a=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+a)*t.factor)}getValueForPixel(e){const t=this._offsets,a=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+a*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,a=this.ctx.measureText(e).width,s=Ge(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(s),r=Math.sin(s),l=this._resolveTickFontOptions(0).size;return{w:a*o+l*r,h:a*r+l*o}}_getLabelCapacity(e){const t=this.options.time,a=t.displayFormats,s=a[t.unit]||a.millisecond,o=this._tickFormatFunction(e,0,eo(this,[e],this._majorUnit),s),r=this._getLabelSize(o),l=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],t,a;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,a=s.length;t<a;++t)e=e.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let t,a;if(e.length)return e;const s=this.getLabels();for(t=0,a=s.length;t<a;++t)e.push(Ks(this,s[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Hl(e.sort(Xs))}}function Fi(i,e,t){let a=0,s=i.length-1,o,r,l,d;t?(e>=i[a].pos&&e<=i[s].pos&&({lo:a,hi:s}=Ji(i,"pos",e)),{pos:o,time:l}=i[a],{pos:r,time:d}=i[s]):(e>=i[a].time&&e<=i[s].time&&({lo:a,hi:s}=Ji(i,"time",e)),{time:o,pos:l}=i[a],{time:r,pos:d}=i[s]);const c=r-o;return c?l+(d-l)*(e-o)/c:l}class Bh extends to{static id="timeseries";static defaults=to.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Fi(t,this.min),this._tableRange=Fi(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:a}=this,s=[],o=[];let r,l,d,c,u;for(r=0,l=e.length;r<l;++r)c=e[r],c>=t&&c<=a&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:a,pos:1}];for(r=0,l=s.length;r<l;++r)u=s[r+1],d=s[r-1],c=s[r],Math.round((u+d)/2)!==c&&o.push({time:c,pos:r/(l-1)});return o}_generate(){const e=this.min,t=this.max;let a=super.getDataTimestamps();return(!a.includes(e)||!a.length)&&a.splice(0,0,e),(!a.includes(t)||a.length===1)&&a.push(t),a.sort((s,o)=>s-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),a=this.getLabelTimestamps();return t.length&&a.length?e=this.normalize(t.concat(a)):e=t.length?t:a,e=this._cache.all=e,e}getDecimalForValue(e){return(Fi(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,a=this.getDecimalForPixel(e)/t.factor-t.end;return Fi(this._table,a*this._tableRange+this._minPos,!0)}}const Bu={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...{data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},...{ariaLabel:{type:String},ariaDescribedby:{type:String}}};n.version[0];function kt(i){return n.isProxy(i)?n.toRaw(i):i}function Ou(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return n.isProxy(e)?new Proxy(i,{}):i}function Lu(i,e){const t=i.options;t&&e&&Object.assign(t,e)}function io(i,e){i.labels=e}function ao(i,e,t){const a=[];i.datasets=e.map(s=>{const o=i.datasets.find(r=>r[t]===s[t]);return!o||!s.data||a.includes(o)?{...s}:(a.push(o),Object.assign(o,s),o)})}function Iu(i,e){const t={labels:[],datasets:[]};return io(t,i.labels),ao(t,i.datasets,e),t}n.defineComponent({props:Bu,setup(i,e){let{expose:t,slots:a}=e;const s=n.ref(null),o=n.shallowRef(null);t({chart:o});const r=()=>{if(!s.value)return;const{type:c,data:u,options:f,plugins:m,datasetIdKey:p}=i,k=Iu(u,p),g=Ou(k,u);o.value=new $t(s.value,{type:c,data:g,options:{...f},plugins:m})},l=()=>{const c=n.toRaw(o.value);c&&(i.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},i.destroyDelay):(c.destroy(),o.value=null))},d=c=>{c.update(i.updateMode)};return n.onMounted(r),n.onUnmounted(l),n.watch([()=>i.options,()=>i.data],(c,u)=>{let[f,m]=c,[p,k]=u;const g=n.toRaw(o.value);if(!g)return;let h=!1;if(f){const y=kt(f),v=kt(p);y&&y!==v&&(Lu(g,y),h=!0)}if(m){const y=kt(m.labels),v=kt(k.labels),A=kt(m.datasets),w=kt(k.datasets);y!==v&&(io(g.config.data,y),h=!0),A&&A!==w&&(ao(g.config.data,A,i.datasetIdKey),h=!0)}h&&n.nextTick(()=>{d(g)})},{deep:!0}),()=>n.h("canvas",{role:"img","aria-label":i.ariaLabel,"aria-describedby":i.ariaDescribedby,ref:s},[n.h("p",{},[a.default?a.default():""])])}});const no=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t};({...ne.mapGetters(["isAuth","hasPermission"])},{...ne.mapGetters(["getRole"])}),{...ne.mapActions(["logout"])},{...ne.mapGetters(["isAuth","me","getAvatarUrl"])};const Ru=`query paginateUsers($limit:Int!, $pageNumber: Int, $search: String, $orderBy: String, $orderDesc: Boolean, $activeUsers: Boolean, $role: String, $groups: [String]){
206
+ paginateUsers(limit: $limit, pageNumber: $pageNumber, search: $search, orderBy: $orderBy, orderDesc: $orderDesc, activeUsers: $activeUsers, role: $role, groups: $groups){
207
+ totalItems
208
+ page
209
+ users{
210
+ id
211
+ name
212
+ username
213
+ email
214
+ phone
215
+ active
216
+ avatarurl
217
+ role{
218
+ id
219
+ name
220
+ }
221
+ groups{
222
+ id
223
+ name
224
+ }
225
+ lastPasswordChange
226
+ }
227
+
228
+ }
229
+ }
230
+ `,Uu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"paginateUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageNumber"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderBy"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDesc"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"activeUsers"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"groups"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paginateUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"pageNumber"},value:{kind:"Variable",name:{kind:"Name",value:"pageNumber"}}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"Variable",name:{kind:"Name",value:"orderBy"}}},{kind:"Argument",name:{kind:"Name",value:"orderDesc"},value:{kind:"Variable",name:{kind:"Name",value:"orderDesc"}}},{kind:"Argument",name:{kind:"Name",value:"activeUsers"},value:{kind:"Variable",name:{kind:"Name",value:"activeUsers"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}},{kind:"Argument",name:{kind:"Name",value:"groups"},value:{kind:"Variable",name:{kind:"Name",value:"groups"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastPasswordChange"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:751,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Ru}}},$u=`query user($id: ID!){
231
+ user(id: $id){
232
+ id
233
+ name
234
+ username
235
+ email
236
+ phone
237
+ active
238
+ avatarurl
239
+ role{
240
+ id
241
+ name
242
+ }
243
+ groups{
244
+ id
245
+ name
246
+ }
247
+ }
248
+ }
249
+ `,zu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"user"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:303,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:$u}}},qu=`query users{
250
+ users{
251
+ id
252
+ name
253
+ username
254
+ email
255
+ phone
256
+ active
257
+ avatarurl
258
+ role{
259
+ id
260
+ name
261
+ }
262
+ groups{
263
+ id
264
+ name
265
+ }
266
+ }
267
+ }
268
+ `,Yu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"users"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:286,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:qu}}},Hu=`query usersByRole($roleName: String!){
269
+ usersByRole(roleName: $roleName){
270
+ id
271
+ name
272
+ username
273
+ email
274
+ phone
275
+ active
276
+ avatarurl
277
+ role{
278
+ id
279
+ name
280
+ }
281
+ groups{
282
+ id
283
+ name
284
+ }
285
+ }
286
+ }
287
+ `,ju={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"usersByRole"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"roleName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"usersByRole"},arguments:[{kind:"Argument",name:{kind:"Name",value:"roleName"},value:{kind:"Variable",name:{kind:"Name",value:"roleName"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:339,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Hu}}},Wu=`query usersByRoles($roleNames: [String!]){
288
+ usersByRoles(roleNames: $roleNames){
289
+ id
290
+ name
291
+ username
292
+ email
293
+ phone
294
+ active
295
+ avatarurl
296
+ role{
297
+ id
298
+ name
299
+ }
300
+ groups{
301
+ id
302
+ name
303
+ }
304
+ }
305
+ }
306
+ `,Qu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"usersByRoles"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"roleNames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"usersByRoles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"roleNames"},value:{kind:"Variable",name:{kind:"Name",value:"roleNames"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:346,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Wu}}},Gu=`query roles{
307
+ roles{
308
+ id
309
+ name
310
+ childRoles{
311
+ id
312
+ name
313
+ }
314
+ permissions
315
+ readonly
316
+ }
317
+ }`,Xu={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"roles"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"childRoles"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"permissions"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"readonly"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:192,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Gu}}},Ku=`query groups{
318
+ groups{
319
+ id
320
+ name
321
+ color
322
+ users{
323
+ id
324
+ name
325
+ username
326
+ email
327
+ phone
328
+ active
329
+ avatarurl
330
+ }
331
+ }
332
+ }
333
+
334
+ `,so={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"groups"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:266,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Ku}}},Zu=`mutation createUser($username: String!,$password: String!, $name:String!,
335
+ $email: String!, $phone: String, $role: String!, $groups: [String], $active: Boolean!)
336
+ {
337
+ createUser( input: {username:$username ,password:$password, name:$name, email:$email, phone:$phone, role: $role, groups: $groups, active: $active})
338
+ {
339
+
340
+ id
341
+ name
342
+ username
343
+ email
344
+ phone
345
+ avatarurl
346
+ active
347
+ role{
348
+ id
349
+ name
350
+ }
351
+ groups{
352
+ id
353
+ name
354
+ }
355
+
356
+ }
357
+ }
358
+ `,Ju={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"phone"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"groups"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"active"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"ObjectField",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}},{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"ObjectField",name:{kind:"Name",value:"phone"},value:{kind:"Variable",name:{kind:"Name",value:"phone"}}},{kind:"ObjectField",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}},{kind:"ObjectField",name:{kind:"Name",value:"groups"},value:{kind:"Variable",name:{kind:"Name",value:"groups"}}},{kind:"ObjectField",name:{kind:"Name",value:"active"},value:{kind:"Variable",name:{kind:"Name",value:"active"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:589,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Zu}}},em=`mutation UserUpdate( $id: ID!, $name:String!,$username: String!, $email: String!, $phone: String, $role: String!, $groups: [String], $active: Boolean!){
359
+ updateUser(id: $id, input: {name:$name, username: $username, email:$email, phone:$phone, role: $role, groups: $groups, active: $active})
360
+ {
361
+
362
+ id
363
+ name
364
+ username
365
+ email
366
+ phone
367
+ avatarurl
368
+ active
369
+ role{
370
+ id
371
+ name
372
+ }
373
+ groups{
374
+ id
375
+ name
376
+ }
377
+ }
378
+ }
379
+ `,tm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UserUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"phone"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"groups"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"active"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}},{kind:"ObjectField",name:{kind:"Name",value:"email"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"ObjectField",name:{kind:"Name",value:"phone"},value:{kind:"Variable",name:{kind:"Name",value:"phone"}}},{kind:"ObjectField",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}},{kind:"ObjectField",name:{kind:"Name",value:"groups"},value:{kind:"Variable",name:{kind:"Name",value:"groups"}}},{kind:"ObjectField",name:{kind:"Name",value:"active"},value:{kind:"Variable",name:{kind:"Name",value:"active"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"role"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:563,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:em}}},im=`mutation deleteUser( $id: ID!){
380
+ deleteUser(id: $id)
381
+ {
382
+ id
383
+ success
384
+ }
385
+ }
386
+ `,am={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:135,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:im}}},nm=`mutation changePasswordAdmin($id: ID!, $password:String!, $passwordVerify:String!){
387
+ changePasswordAdmin(id:$id, password:$password, passwordVerify:$passwordVerify){
388
+ status
389
+ message
390
+ }
391
+ }
392
+ `,sm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"changePasswordAdmin"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"passwordVerify"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changePasswordAdmin"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}},{kind:"Argument",name:{kind:"Name",value:"passwordVerify"},value:{kind:"Variable",name:{kind:"Name",value:"passwordVerify"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:246,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:nm}}},om=`mutation adminAvatarUpload($id: ID!, $file: Upload!){
393
+ adminAvatarUpload(id:$id, file: $file){
394
+ filename
395
+ mimetype
396
+ encoding
397
+ url
398
+ }
399
+ }
400
+ `,rm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"adminAvatarUpload"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Upload"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminAvatarUpload"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"encoding"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:207,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:om}}},lm=`query fetchPasswordRules{
401
+ fetchPasswordRules{
402
+ regex
403
+ requirements
404
+ }
405
+ }
406
+ `,dm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchPasswordRules"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fetchPasswordRules"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"regex"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requirements"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:131,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:lm}}};class cm{constructor(){this.gqlc=null}setGqlc(e){this.gqlc=e}paginateUsers(e,t,a=null,s=null,o=!1,r=null,l=null,d=null){return this.gqlc.query({query:Uu,variables:{limit:e,pageNumber:t,search:a,orderBy:s,orderDesc:o,activeUsers:r,role:l,groups:d},fetchPolicy:"network-only"})}user(e){return this.gqlc.query({query:zu,fetchPolicy:"network-only",variables:{id:e}})}users(){return this.gqlc.query({query:Yu,fetchPolicy:"network-only"})}usersByRole(e){return this.gqlc.query({query:ju,fetchPolicy:"network-only",variables:{roleName:e}})}usersByRoles(e){return this.gqlc.query({query:Qu,fetchPolicy:"network-only",variables:{roleNames:e}})}roles(){return this.gqlc.query({query:Xu,fetchPolicy:"network-only"})}groups(){return this.gqlc.query({query:so,fetchPolicy:"network-only"})}createUser({username:e,password:t,name:a,email:s,phone:o,role:r,groups:l,active:d}){return this.gqlc.mutate({mutation:Ju,variables:{username:e,password:t,name:a,email:s,phone:o,role:r,groups:l,active:d}})}updateUser({id:e,name:t,username:a,email:s,phone:o,role:r,groups:l,active:d}){return this.gqlc.mutate({mutation:tm,variables:{id:e,name:t,username:a,email:s,phone:o,role:r,groups:l,active:d}})}deleteUser(e){return this.gqlc.mutate({mutation:am,variables:{id:e}})}adminChangePassword(e,t,a){return this.gqlc.mutate({mutation:sm,variables:{id:e,password:t,passwordVerify:a}})}adminAvatarUpload(e,t){return this.gqlc.mutate({mutation:rm,variables:{id:e,file:t}})}fetchPasswordRules(){return this.gqlc.query({query:dm,fetchPolicy:"network-only"})}}const Mi=new cm,um="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAACFtgAAhbYBqbnzzAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAADHwSURBVHja7d13fNXV/cfxAoqjQtX6q7baOlprbf11aFWs3e1PrdbaWhmCKIQpQ2ULiBJCGGEjQ4ZsFVGmDJlZZJAEQpgJZO+JgmwC/D6nfrURM25u7vfe7/me1x/Px8NHpZic7znn877fe8Y3Ll68+A0AztWyw/Cm4hbxM/Eb8ZhoLbqKASJETBULxSoRLnaKVHFYZIhskSvyRZEoEeXiiDgqPhMnLGXWn98vEqy/b61YJuaLaWKseF30s36Of4oW4jZxJc8NcD4aAQhscb9K/Ej8UTwnXrUKrCrkSaJYXBAXNfOpFUAixFIx2frdOlgB5hfiGvoAQAAA3FzkrxcPi85igvhI7LY+gV80nHobESXetgLCv8XPxdX0HYAAAOhS6G8WfxW9xQzr1XkxRd4rF6yvK1QbzhYDxZPqqxD6GkAAAAJV6JuIX1rffatPrjus79Ep3P6h1i9sEKHWG4Pb6JcAAQCwo+D/QDwjxlmvq09QhB2nQmyxFieqBZJ3ikb0X4AAAHha7JuLP4vB1kK8IoqrttRbmY+ttQUPicvp4wABAPii4F9hFfxR1pa38xRO1zouNokh1qJMAgEIAIBBBb+RuNdaVKaKwUkKo7FOWF8bvCZ+p85bYIyAAAC4q+jfLrpYB9mw9Q41UWFwo+glbmXsgAAA6LlK/4/W6XgZFDZ4KcU6ZfEBFhSCAAA4+7v8J6xteWUUL9hwYNEc6yyCqxhzIAAAgS36zawtX+qo2WMUKfjxq4I11smONzIWQQAA/FP0bxBB1uU0pylGCLBKa6the+42AAEA8H3Rv9L6pL/BmnApPHDqroL3xN/ZYggCANCwwv+gmCk+obhAM2odynR1fTNjGQQAwLOif7N1cttBighcIlOMFHczxkEAAL7+ir+N9V0qJ/HBzeLF82rXCmMfBACYXPjvsV7xf0phgIFfEaiLi25nLgABAKYU/cbiH2IrRQD4zxuvddYZFo2ZI0AAgBsL/7dEH07mA2pdKzBIbXVlzgABAG4o/HeJaeIzJnjAI+p8i0VqFwxzCAgA0K3oqxv3/mbt27/AhA54LVI8yrwCAgCcXvgvt27dS2PiBnxqp3iGdQIgAMBphV9dxPOiyGGiBmyVKjpy0iAIAHDC/v3eIp+JGfCrXPGSuJq5CAQA+LPwX22t6C9iIgYCqlQMVbtsmJtAAICdhf8aMVCUMPECjnJUvM6NhCAAwNeFv5kYIsqZaAFHK7G+lmvK3AUCABpS+C8TPfjED2h5qFA7tSWXuQwEANS3+D9lrThmMgX0tVs8zpwGAgA8Kfz3W4ePMHkC7jpQ6CHmOBAAUF3hv128x8l9gKutFD9lzgMBAKrwXyfGizNMjoARKsWb4lrmQAIAzD22t684woQIGHuGQEcWChIAYFbx/73YzwQIQMSJe5kbCQBwd+G/Qczje34AlzgvZorrmSsJAHDf9bwdOcgHQB3KrRs9uXWQAAAXFP+fiigmNgD1kCAeYA4lAEDPwn+VGCXOMpkB8IL6qvAt0Zw5lQAAfYr/36yjQJnEAPji6uFHmVsJAHB24f+2WMqEBcAGb3PtMAEAziz+T4giJikANsrnbgECAJx1Ve8cJiYAfrRAnSLKHEwAQGAP9OG7fgCBUCieZC4mAMC/hf8K6/z+80xCAAJsCQcIEQDgn+J/L8f4AnAYtf7or8zRBADYU/gvE8PY1w/AwccJh4omzNkEAPiu+N8q4plgAGhgu/g+czcBAA0v/k+25MpeAHqpEE8xhxMA4P0r/zBu7gOgsSmiKXM6AQCeF/+bRTSTBwAX2Cl+xNxOAEDdxf8RUcqkAcBFjom2zPEEAFRf+BuLYPb2A3CxueocE+Z8AgD+W/xvFFuZHAAYQO1o+i5zPwGA4v/5cb6FTAoADFIg7qcGEABMLv5dONgHgKFOifbUAgKAaYW/iZjEBAAAw8epNVDUBgKACcW/uVjPoAeAL20Q11IjCABuLv53cJEPAFQrTdxFrSAAuHWxXzmDHABq9Kl4nJpBAHBT8e/EYj8A8Ig6C+UVagcBwA2H+0xgQAOAV4sDG1FLCAA6Fv9vinUMYgDw2jvicmoKAUCn4v9t67QrBjAANMxm0YzaQgDQofjfwkp/APCpZHETNYYA4OTif5fIYbACgM9liR9TawgATiz+97XkGl8AsJPaSt2CmkMAcFLx/3PLz++7ZoACgL1OiL9TewgATij+T4vTDEoA8JtK0YEaRAAIZPHvbHVEBiQA+NcF0YVaRAAIRPEfxAAEgICHgO7UJAKAP4v/MAYeADhGL2oTAcAfxX8Igw0AHOdlahQBwM7iP5BBBgCO1Y9aRQCwo/j3Y3ABgOMNpGYRAHxZ/F9mUAGANoZQuwgAvij+vRhMcLgzrToGH2kdNKKgbeeQ9PbdR+0L6jV2V7c+E+J7D5q6fcAbb0UOGz0vYtSkd8Inz/owYvaitVFLPtwcs2J99A5F/bP639S/U39G/Vn1/1H/X/V3qL9L/Z3q71b/DfXfUv9N2h0ON4waRgBoSPHvziBCoE89a9d1ZFrPAZNjQycuCX9n+ZaYmMR9B/cdyipIzyk4kldSeqaovOJiIKj/tvoZ1M+ifib1s8nPGKF+VvUzy89+kueHABtELSMAeFP8u1h7TBlEsF3roOCijj3H7ho4fFbktLkrI9ZtiU/cm5aZX1hWcSFQBb6h1M+ufoe1m+OS1O8kv1uU/I7J8rsW88zhR52paQSA+hT/DhR/2OR0UK+wpJDxi7ct/mDT9u2Je/dn5Rd9pmuR95b6nbcn7D0gbRATMn5RhLTJLr5WgI3HBj9NbSMAeFL8/87xvvClNp1G5AwKnhW+6uPtO3IKS46bVuw9lV1YfGLVhu2J6k2BtFkefQe+DN7iz9Q4AkBtxb9Fy89vmmLAoCFOdn5pXMK0uSvDk/cfzqS4e2fXvkPZb85ZESVtmSRteop+hQZSN7beR60jAFRX/H/c8vO7phkoqLdnO4VkDg6ZE752c1xCblHJSQq4b0mbnlqzMXbn4BFzItt0Csmmz8FLpeIuah4BoGrxv0lkMThQv1f7IZlTZ68I33MwI4ci7V+7D6TnTZm9PIowAC/kiFuofQQAVfybiWQGBTwV1CsscfXHMfGFZRXnKcaB3mlQfmHVhu0J6qwC+ibqYb/4NgHA7OJ/udjMYIAn+/H7DZsZkZiSmkrhdaaE3amH+g2bEcX5A/BQvPgmAcDM4t9IvMMgQB378wvGTXt/S3puQRlFVg/pOQXl46Yt3aaeHX0YdVgnGhMAzAsA4+j8qEn77qN2v7dya1RBafkZiqqeCkrLzr63Ymu0PMsU+jRqMYEAYFbxf4VOjxoKf0pUfEoyBdRd1DMlCKAWnQgAZhT/x8V5Ojwu8enM+au3FZZVVFIw3bpgsKJSPWP1rOnvuMRZ8XsCgLuL/10MflyqR//J21MzcosokmZQz1o9c/o+LqHOgbmDAODO4n+tSKOT48t9/EEjcj/aFBtPUTSTevaqDzAWcMn2wOYEAHcV/8ZiA50blnNvjJkfzrn8UH1A9QXVJxgXsKwXTQgArPiHyzzffdTeHckH0ih+qEr1CdU3GCOwTCIAuKP4t6czQxk5YXG4uqOegocaFgleCJ24OJyxAksXAoDexf9+bhGDOLNo2cYoihw8sfD9jWqB4BnGDTsD3L4zwM3F/7uCk8AM16pj8JHNUUm7KGyoj82RScnSdz5hDBmvUNxIANCr+F9hnfNMBzb6tr4RWbv2HU6noMEbO/ceypQ+lMNYMt5Wtx4X7NYAMJdOa/hivxdH70rP4fx+NMzh7Pxy6Ut7GFPGCyYA6FH829JZzdZzwJSIvJLSkxQw+EJuUcmpngMmxzC2jKZOj32EAODs4v8jcYzOaq7hYxd8LJP2eQoXfL1D4PXPzwtgnJmrVNxMAHBm8W8qdtJJzdX3tRmbKVawU5+h0zlC2GzR4jICgPMCwBQ6p7mCeoXt4Ope2C2/pOxcx15jkxlzRgsjADir+D9FpzRX284haVn5RUcoUPCHjLzCo892Dslk7BnrgniSAOCM4v99UUGnNHaff8netMwsChP8KeVgRr70vXLGoLGOiFsJAIEt/k0E38mZ60T0jj27KUgIhPDY5AOcNGq0eN3XA+geAELphOZuy/lgTUQ0hQiBtHTVtgTrlTBj0kzDCACBKf5/tfZm0gkNFPbmUlb8wxHGTHk3mjFp9H0B9xIA/Fv8rxdFdD4zte82KqWwrLyS4gMnKCgtPy99MpWxaaz96vh5AoD/AsASOp25N/sl7D54gMIDJ4nbuT9d+uY5xqexxhMA/FP8n6SzmWvE+EW8+ocjBYct5KsAs48K/j0BwN7if511PSMdzkDPdgpJ54x/OPjOgDPSR7k90FzqbIhmBAD7AsACOpm5h29sid6ZRKGBk20MT9jLWDXaHAKAPcX/cTqXufoPm7mNAgMd9H1tRixj1mhPEAB8W/y/JfLpWMae9leUyVG/0ER6bsEx6bNljF1jqR1q3yYA+C4AvE2nMtfU2cu3UFigk0lvfcAJpWZbSgDwTfF/lM5k9Kf/ipzC4mMUFegkK7/opPTdo4xhoz1GAGhY8W8uculI5ho5YTHb/qClEeMWsS3QbBniKgKA9wHgLTqR2Zf9HM7JL6GYQEepmbnqxrjTjGOjjSQAeFf8H+CSDbMNCp61lUICnQ18460YxrLZJ5eKnxAA6lf8G4sEOo/Rzu1NzcykiEBnyfsP53NpmfG2EQDqFwC60GnM1mvglEgKCNyg54DJOxjTxmtPAPD8pr9yOozZNkclJVI84AYfhyfsYUwbr0QdZU8AqDsAzKSzGL/1r5jrfuGm64KlT/OhBm8RAGov/vfyfRkGDp8VTuGAyxYDcjAQ1KL2FgSA6ot/IxFHJ8HmqKSdFA246pKgiMQUxjbEbtGEAPD1ABBE50CrjsElvP6HS78G4H4AKD0IAF8t/teKUjoGBg6fFUHBgCu/Bhg+K4oxDqvWNScA/DcAvEmnwH9e/0cmJVMs4EabIhN3M8ZhGUUA+Lz4/1RU0iGgjv4tKC07R7GAO78GKDun+jjjHOKU+D4BoMPwlXQGKB16juHTP1ytQ48xLAbEFxYZHQCkAR6iE+ALwWELt1Ek4GbDxy6IZKyjyrbAe00OAAwGfGnVhu1xFAm42Yp1UUmMdTjlnoBAFv/HefiomobTcwpKKRJws7Ss3E8Y67jE340KANahP6yIxZfadBqRQYGACaSv5zHmUcUBcZlJAaAdDx1V9R40ldv/YIReA6dwOyAu9aIRAUB+0aYikweOqkZNemczxQEmGDlhcTRjHtXcFtjMhADQm4eNSy1atokTAGGE+e9tiGfMoxpDXB0A5Be8xko6PGx8RXhsMhcAwQibo5L2M+ZRDXVl9DVuDgCv85BRnbTM3HyKA0yw71BWOWMeNRjoygAgv9i3xFEeMKrxmUyM5ykOMEFhWbnq82cY96hhLcDVbgwAQ3i4qGELYDqFAYZtBcxn7KMGfVwVAFSi4bpf1KRtl5EHKAowifR5dkKhJkXiSjcFgJd4qKhJ++6jdlMUYJL23UalMvZRi96uCADyi1wucnmgqPEWwB5jkigKMMkLPcbsY+yjFuoroivcEAA68jBRm069w+IpCjBJUO8wjkJHwE8HtLv4Nxa86kKtuvWZEENRgEm6vjJhJ2MfdchRb9B1DgDP8BBRl54DpkRRFGCSHgMmJzD24YEuOgcAUi7q9MqQaeEUBZjk5cFvxjH24QH1Br2RdgFAfuhHeXjwxIA33tpGUYBJ+g+bGcvYh4ce0zEARPLg4Im+r83gDQCM0mfo9BjGPjy0TqsAID/wgzw0eKp734mxFAWYRPo8awDgqQviTp0CwCIeGjw+B6DnmGSKAkzSoceYFMY+6mGKFgFAftAbxGkeGDzVrmvoQYoCTCJ9nu3RqA91kV4zHQLAIB4W6hcARqZRFGBWABiZxthHoI8HtuPgHy65AAEAIADAt9J8vSXQ1wHgCR4SCAAAAQDO3xLo6wCwjgcEAgBAAIAt1jsyAMgPdrs4zwMCAQAgAMC2LYE/dmIAGMvDAQEAIADAVpMcFQDkB7pClPFgQAAACACwVZmvbgn0VQB4nocCAgBAAIBfPO2kABDPAwEBACAAwC/WOCIAyA9yNw8DBACAAAC/OSdudEIAGMnDAAEAIADAr/o5IQBw8h8IAAABAP61L6ABQH6A3/AQQAAACAAIiF8HMgBM5wGAAAAQABAQ0wMSANQ+RPb+gwAAEAAQMEfUOTyBCAB/p/FBAAAIAAioVoEIAO/R8CAAAAQA6HlBkLfF/xpxgoYHAQAgACCgKsUN/gwA7Wl0EAAAAgAcIcifAeBjGhwEAIAAAEdY65cAoI4ftF450OggAAAEAATeadHMHwGgM40NAgBAAICjtPZHAFhDQ4MAABAA4ChLbQ0A8h+4SpykoUEAAAgAcJRj9T0UqL4B4EkaGQQAgAAAR3rCzgAwhwYGAQAgAMCR3rYlAMhf3EgU0cAgAAAEADiSup+niR0B4AEaFwQAgAAAR/ujHQEghIYFAQAgAMDRptoRAFJoWBAAAAIAHC3DpwFA/sJbaVQQAAACALRwuy8DQC8aFAQAgAAALXTxZQDYSIOCAAAQAKCFZT4JAPIXNeX0PxAAAAIAtFGutu77IgD8jsYEAQAgAEAr9/oiALxGQ4IAABAAoJWBvggAW2hIEAAAAgC0sqlBAUD+gsvFCRoSBACAAACtqLV7VzQkADxMI4IAABAAoKU/NyQADKEBQQAACADQ0qiGBIBNNCAIAAABAFpK8CoAWN//H6cBQQAACADQ0nnRzJsA8BCNBwIAQACAO9cB1BYAXqXhQAAACADQ2qveBICPaTgQAAACALS2ol4BQJ0hLI7ScCAAAAQAaC2/vgHgThoNBACAAABX+F59AkBrGgwEAIAAAFf4Z30CwFgaDP4LAKEHKQowKwCEHmTsw49G1ycAcAEQ/OXM+q07kigKMInq86rvM/7hJ1vrEwAqaDD445CKd1ds3U5BgIlU37cOamEugN3Uov5GdQYA+UO30Vjwh+lvr9pGIYDJ1BhgLoCf3O1JAPg3DQW7BYct3EIBACr+MxaYE+AHL3gSAEJpKNipbZeRaQWl5eeY/IGKi2osyJg4xNwAm033JABsoKFgowtboney6A+oYnNUUjJzA2wW6UkAKKGhYJfeg6ZGMOEDX9dr4JQY5gjYqLTWACB/4BYaCXauRE3NzC1gsge+7mB6TnFLrmCHvb5dWwB4kgaCXULGL9rERA/UuiAwirkCNvptbQFgIA0Eu+zce+gAkzxQsx3JBzKZK2CjLrUFgNk0EGxa+c9xv4AH2nYOyWLOgE0m1hYAwmkg2GHMlHc3M7kDdRs16Z1o5gzYZENtASCfBoIdkvcf5sY/wAOJKak5zBmwSXa1AUD+xdVqjzYNBF9r02lEBhM74DkZMwXMHbDjHBbxzeoCwM9pHNghqFdYApM64LmOvcamMHfAJvdVFwC4AwC26DN0Oof/APXwypBpHAoEuzxXXQB4lYaBHUZOWMytf0A9hIxfFMncAZuEVhcA3qZhYIc5i9dGMqkDnpu96CN2AsAuH1QXADiBCrZYszGWNQBAPazZGJPI3AGbxFcXAIpoGNhhU2TibiZ1wHNqzDB3wCb5XwkA8j9cQ6OAAAAQAOB6laJJ1QDwCxoFBACAAAAj3FI1ADxGg4AAABAAYIQWVQNABxoEBACAAAAjPFM1AHAGAAgAAAEAZnilagCYTIOAAAAQAGCE8VUDwFIaBAQAgAAAIyytGgAiaBAQAAACAIywvWoASKVBQAAACAAwQnbVAPApDQICAEAAgBHOisaq+F9JY4AAABAAYJQbVAC4jYYAAQAgAMAoP1IBoAUNAQIAQACAUe5TAeCfNAQIAAABAEb5swoAXWkIEAAAAgCM8rQKAP1oCBAAAAIAjNJRBYDXaQgQAAACAIzSRwWAsTQECAAAAQBGGa4CwDQaAgQAgAAAo0xSAWA+DQECAEAAgFHmqwCwjIYAAQAgAMAoK1QAWEtDgAAAEABglG0qAITTECAAAAQAGGWnCgAJNAQIAAABAEZJVQFgPw0BAgBAAIBRDqkAkE1DgAAAEABglHQVAMpoCBAAAAIAjJKpAsAJGgIEAIAAAKNkEQBAAAAIADBPjgoAR2kIEAAAAgCMkqcCwBEaAgQAgAAAoxSwCBAEAIAAAPMUqQBQTEOAAAAQAGCUYhUACmgI2Gnl+ugdTOqA5z7aFJvE3AGblaoAkENDwE5vzl0ZwaQOeG7h+xtjmDtgs3IVADJpCNhpSMjccCZ1wHMTZ34QxdwBmx1RAeAwDQE7dX1lQhyTOuC5YaPnRTN3wGYVKgCk0hCwU9suI1OZ1AHP9eg/OZG5AzbL5TZA+MMxmdQuMLEDdSssq7jYqmNwOfMGbHZQBYAUGgJ2O5iRk8vkDtQtYXcqN7TCHxJVANhFQ8BuE2cs28LkDtRtxrzVfP8PfwhXAYDvmmC7Np1GZBaWVZxnggdq1/nlcZwBAH9YqwJALA0Bf1i/dUc8EzxQs137DqtzWS4wX8APlqoAsIGGgD907zsxhkkeqNmrwbPZ/w9/masCwLs0BPzk3MGMnAImeuDrMvIKj8kYOcE8AT+ZogLANBoC/hIctmArkz3A4T8IuFAVAEJoCPjzLcC2mOQUJnzgv7Yn7j0kY6OS+QF+NFgFgL40BPypddCI/IzcgiNM/EDFxYLSssp2XUMPMTfAz15SAaADDQF/69Z3IjsCADFywmJe/SMQglQAeIqGQCDMmLeKa4JhtPnvfcw2bARKKxUAfkdDIEBOR8Tt3kshgInWbo7bqdbEMA8gQB5XAeAeGgIBdHLpym2xFASYZFNk4m7p+8cZ/wig+1UAuJmGQIBdCJ24JLywjBsD4X4z56+O4ZM/HOAWFQCuoiHgBD36T47NLSo5SZGAG+WXlFb2f31mHGMdTvjQJS77xsWLF1UIOE2DwAme6xZ6ICu/6DMKBtxkw7Yde9t2GZnFGIdDlKja/0UAKKRB4BTvrw5nTQBcYd+hrKIe/SfvYFzDYXZXDQD7aRA4Rd+h06MoHtDZ5qide3sPmhrL21U41IaqASCCBoFzTgoMLqKIQEerNmzf+WznkGzGMRzu7aoBYAENAifZsftgGgUFumnXdSRH+kIHI6sGgDdoEDjJxJkfhFNQoJP45APpjF1oomfVAPA8DQIn6dhz7E6KCnTy+uj5kYxdaOJfVQPA72kQOMyZ7MJitgNCC4Vl5edbBwUXM26hiRZVA8D3aRA4zcr10XEUF2iyzz+ZMQuN3Fo1ADQWZ2kUOMnAN97itkBo4eXB07YzZqGRpl8GACsEsIAFjtImaEQOxQVOl1NYcrIlF/tAH+Vf1P2qAWAzDQOn2bXvcDpFBk625MPNMYxVaCSxugAwh4aB07w5d8U2igycrPNL45IYq9DI4uoCwBAaBk4jk+sOigycKi0zt1T6aSVjFRoZWl0AaEvDwIFOZeQVVlBs4ERT56xg7z908+/qAsBDNAycaOaC1XwNAEd6rlvoQcYoNPOz6gLATTQMnEgm2b0UGzhN0p60DMYnNFP5xRbASwNAI3GSBoITJaakplJ04CSDQ+Zwiyp0c+iLmv+VAGCFAFazwpFeC317K0UHTpGRV/gpe/+hoTW1BYC5NBCcqFXH4NKC0rIzFB84wYTpy1j8Bx2F1RYAetFAcKoV66JjKT4ItPySsnNc/ANNBdUWAH5LA8GpuvWZQABAwC1atjGW8QhN/aa2ANBcXKCR4FBnD2XllVCEEEjtuoamMRahqetqDABWCGBrCxxryqzlLAZEwHwcnrCHcQhNlVxa76sLAMtpKDhV2y4j2Q6IgOny8vidjENoKtKTADCMhoKTbU/Yu4diBH9LTEnNZvxBY1M8CQBP0lBwsn7DZkZQkOBv/YbNYPEfdNbWkwDwfRoKDncqLTO3mKIEf0nNzP1E+t1pxh409sM6A4AVAipoLDjZ8LELuCAIfhM6cUkM4w4aK6uu1tcUALbRYHC4o1n5RUcpTrBbTmHJmVYdg48w5qCxdfUJABNpMDjd+Onv8xYAtps6eznf/UN3r9cnADxPg8Hp5FNZSV5x6SmKFGy79Ce34IT0s08Zb9Dco/UJAD+mwaCD2Ys+iqRQwS7BYQv57h+6u3DpCYC1BgArBBTRcHC6Np1GZBeWlVdSrOBr+w9nl6sdJ4wzaC6tpjpfWwB4n4aDDt5buTWGggWf7/t/bUYc4wsusMibANCThoMO2nUNPUjBgi8l7D6YI33rPOMLLtDTmwBwDw0HXazbEp9E4YKvdO0zgTP/4Ra/9iYANBLlNB508MKLo1MoXPCFzVFJBxhTcMupqeLyegcAKwSspAGhixXrouMpYGio518cTQCAW8TUVuPrCgCv0IDQxbOdQzIKSsvPUcTgrWVrIpIYS3CREQ0JAPfSgNDJrIWcCwDv5JeUVUqIzGEcwUV+15AA0FhwCha0Oh0wu6D4OAUN9fXWgjUc+Qs3OSYu8zoAWCFgHQ0JnYROXMIdAaiXrPyikxIeyxg/cJHVddV3TwLAQBoSmjmempFbRGGDp14Nns2RvzBm/399AsCDNCR002/YDNYCwCNbo3fut85LZ+zATe70RQC4TH2iojGhmcqkPWmHKXCoTW5x6ZlnO4dkM17gMll11XaPAoAVAlbToNBNl5fH76DIoY7b/qIZK3Ch2b4MAEE0KHT0/urw7RQ6VCc2aV+6elPEOIELPePLAPCdllyMAT23BZZm5BZUUPBQVUFpWeVzXUMPMUbgQqpWX+ezAGCFAFbJQksvD34ziqKHqsZNW8qrf7hVvKd1vT4BgO2A0NbazXGsB8B/7Nx7SJ32d5pxAROP//U2ANxFw0JXrYNG5GUXFn9GATRbYVn5xRd6jNnHmICpx/96FQCsEJBG40JXrwbP5oRAw82Yv5qvMuFm5XUd/9uQABBGA0PnxTHhMcnJFEIz7UvLLOZME7jcnPrU9PoGgIdpYOjs2c4h6XklpacoiObp/PK4XYwBuNwjdgYAdTtgKY0MnY0Yt2gLBdEsE2d+sJ2+D17/NyAAWCFgHg0NzZ2N27V/P4XRDBsjEvdy4A8MMLe+9dybAPAUDQ3dPdc1dH9Bafk5CqS7HTicXdaqY3A5fR4GeNQfAeBqcZLGhu4mzFjGVwEull9SWvn8i6MP0NdhgIr6vv73KgBYIWAVDQ4XOLn7QHo6xdKdXh0xO5Y+DkO87U0t9zYAPEODwxVfBXQL3ceuAPdZ8uHmRPo3DPKYPwPAFeIIjQ43GPDGW+EUTfeITz6QxdeUMIiqxZf7LQBYIWAmDQ+3kE+MXBvsAhl5hSee7RySS5+GQeZ5W8cbEgBa0PBwkeOJKakZFFGdz/mvuNi970QO+4FpHvd7AOBuALjwlMDM/JIytgZqaurs5Sz6g2k+8fb1vy8CwFAeANwkI6/wKMVUT70HTd1BH4ZhZjekhjc0APxAXOAhgAAAAgDgd/cHLABYIWAbDwEEABAAAL9KaWj99kUAeIEHAQIACACAX/V2QgC4piV3bIMAAAIA4C+nxHUBDwBWCFjEAwEBAAQAwC+W+KJ2+yoA/JUHAgIACACAX/zRSQGgseD0LRAAQAAA7HXIF3XbZwGAMwFAAAABAPCLQU4MAP9jLUzgAYEAAAIA4HvnxI2OCwBWCJjHAwIBAAQAwBYrfFmzfR0AfskDAgEABADAFo87NgBYISCShwQCAAgAgE+phfaNnR4AnuZBgQAAAgDgUwN9Xa/tCABNRDYPCwQAEAAAnzgqvuX4AGCFgAE8MBAAQAAAfGKcHbXargBwnTjBQwMBAAQAoEHOilu0CQBWCJjJgwMBAAQAoEEW2lWn7QwAd/PgQAAAAQBokHu0CwBWCNjEwwMBAAQAwCvr7azRdgeAJ3iAIACAAAB45U86B4BGIpmHCAIACABAvSTaWZ9tDwBWCPgnDxIEABAAgHpp5YYAwFsAEABAAAA8l6EO1dM+APAWAAQAEACAeunpj9rsrwDAWwAQAEAAAOpWLK52TQDgLQAIACAAAB7p7a+67M8AwFsAEABAAABqliOaui4A8BYABAAQAIBaBfmzJvs7APAWAAQAEACAr0vzx8r/gAUA3gKAAAACAFCtNv6ux4EIALwFgGPlFZeepphqGwDi6cPQVIqqja4PALwFgIOdpJDqq//rM2Pow9DUk4GoxYEKAOotQAIPHU7SOii4mEKqr+CwhdH0Y2goLhB1OGABwAoBD/Pg4SRtu4w8TCHV16SZHxAAoKO/GBcArBDwPg8fTtGpd1gShVRfb7+zPpZ+DM1sDWQNDnQAuFWcohPACYLDFoZTSPW1fuuOFPoxNNPC2ABghYBQOgGc4MOPIuMppPrKyC04Ls/xAn0ZmlgZ6PrrhABwjSiiMyDQ9h/OLqSQ6u3ZziHZ9GVoQL35vt34AGCFgCA6BAKpTdCIPAqo/l4ePC2O/gwNDHdC7XVKAGgsdtEpEChvjF0QQQHV39wl6wgAcLoscRUB4Ksh4A90DARK3K79aRRQ/aXnFhyV53mGPg0H+5dT6q5jAoAVApbTOeD3/f+dQ9Ipnu7Rvd9E7gSAU210Us11WgC4Q5ymk8Cfpsxezut/F1m+NpI7AeBEZ8VdBIDaQ8BYOgr8pVXH4JLcohLuAHCR/JKyM/Jci+nfcJgwp9VbJwaA5mwLhL+8OXdlFEXTfWbOXx1B/4aDFKgt7wQAz0LA03QY2K11UHCRfPrn+l93vgU426bTiDz6ORyinRNrrSMDgBUCPqTTwOaT/xIplu618P2NbAmEE0Q5tc46OQDcJI7QeWCHV4ZMi6VIultBafmF518cvZ/+jgCqFL8gAHgXAjrQgeD7V/8jCjPzCj+jSLrfntSMwlYdhx+j34OFf5oFACsEbKITwYdOb4neuY/iaI53lm9JoN8jAA6KKwkADQsAt4njdCb4wPllayJ2UBTN0/e1GbH0f/hzrmkZ4Kt+XREArBDwEh0KDTVzwRq2/Jm7K+Bcl5fH72QcgFf/+gUAdVkQCR7eujB++vuc9mc4teWzQ88xexgPMP3Vv1YBwAoBd3PJB7xwcunKbaz4x39k5RedaN991EHGBUx+9a9dALBCwDA6GOpzzG9UfAoL/vAVOYUlp3oNnMJ9ATD21b+uAeBykUInQ1269Z0YfzAjp5iCh5pMnvVhtLVPmzEDo179axkArBDwK74KQI17/DsGFy9bExFHgYMnNkYkpnBkMEx79a9tALBCQB86HC5x9tXg2ZEZeYWfUthQr8WBxaVnxk59L0r60AnGEUx49a97AGgk1tPpoPToPzl294HD2RQzNMT+Q1lFvQZOUfcHXGBcwc2v/rUOAFYI+E5Lrg022gs9xqREssgPPrYj+WB6j/6T4gkC8OTNo7hf1zqqbQCwQsAjDFLzPNs5JGPF+ugEihUIAgiwPjrXUK0DgBUCwuiE5izwm7N4bVRBaXklBQoEAQTYat3rpxsCgNoamEhndLXPxkx5NzynsOQEBQkEAThAjrieAOCMEPAjwZWfLvx+bVDw7MhD2XnlFCAQBOAQ58RDbqidrggAVghoT8d008r+SXGs7AdBAA40wC110zUBwAoBi+mcrOwHCAKwyTq1DZ0A4MwA0Eyk00lZ2Q8QBOBj6sTIG9xUM10VAKwQ8Gtxms6qycr+oOCSOYvXRrOyHwQBOJi6M+K3bquXrgsAVgjoQIfVYmV/BCv7QRCABoa4sVa6MgBYIWASnda5K/vTsljZD3OCwIsEAZ1tdNP3/qYEgCZiC53XWSv7k/ezsh8EAeYDbWS67Xt/IwKAFQKuFxl04sCv7I+I283KfoAgoBN1tszP3FwjXR0ArBBwj/q+mc7Myn6AIAAPnRdPuL0+uj4AWCHgXwwyVvYDBAF4qL8JtdGIAGCFgDfo1P5Z2Z9dWMzKfoAgoKv5ptRFkwJAI7GCzm3P2dis7AcIAi6wXTQlALgzBFwj9tLJfefFfpPiWdkPEARcIFv8j0k10agAYIWAO0QFnb3BK/v3sLIfIAi45etL8b+m1UPjAoAVAv4kztDpvVrZn7liXRQr+wGCgJtW/P/DxFpoZACwQkAr68EzADxZ2d+Rlf2AY4JAP4KADw0ytQ4aGwCsENCTzl+n46zsBwgCLjXP5BpodACwQkAIg6CGlf3DZ0Wxsh9wfBA4TBDwyip1ZDwBgBAwh8HAyn6AIGCMcHGl6bWPAPDfi4NWsbJ/zJ7IuN37mUwBgoCL7RTNqX0EgKoh4EoRzcp+AAQB10ozba8/AcDzEHCtSQcFqZX9sxexsh8gCBghT/yAWkcAqC0E3CxyXL+yf/K7kazsBwgChigXd1PjCACehIC7rA7Dyn4ABAH9T/m7n9pGAKhPCHjQ6jiuWdm/ax8r+wEYFQTUia9/oaYRALwJAQ+LY3qv7B+tzuxnZT+A2oJAnAuDQKX4N7WMANCQEPAbHUOAWtm/nJX9AMwMAuqY9w7UMAKAL0LAQ+KoXiv7y1jZD8DEIKA++T9H7SIA+DIEtHB4CGBlPwDTg8A50ZqaRQCwa2Hgp07r8APVyv7MXFb2A7AhCBw4pEkQOCueplYRAOwMAQ84JQSwsh8AQeDL1f5PUqMIAP4IAfeLT1jZD4AgEHCnxN+oTQQAf4aAX4sjrOwHQBAIWPE/Kf6PmkQACEQIuM8fIYCV/QAIAl9f+Cz+SC0iAAQyBPxKlNjVwUdPfoeV/QAIAl+lzmb5LTWIAOCEEPBDcciXHbxH/8lxBzNySplYAOgWBLr1mbDDxuKv1l+1oPYQAJwUAm4Q8Q1+3R80omD1xzGJTCQAdLZ+645dbTuHZPi4+KubWn9KzSEAODEEXC3WeHt61dCRcyOyC4uPM3kAcIP8krJzU2Yvj2rV0SfHqSeL71FrCABODgFNxFv16djtuoYe2J64l219AFwpLTO3os/Q6bENWB+wUTSjxhAAdAkCQz3p2MNGz4soKC0/xyQBwO0i41PSnusWWt/1UvPEZdQVAoBuIeB563jK6jr1iXdXbI1lUgBg1tcCpecGj5gT62HxH04tIQDoHAIeufQ64TadRuTF7zpwmMkAgKmWrtyWaO3lr+lSnyBqCAHALWcFFKqO3al3WHJ6bsGnTAAATLdr36Hcdl1GHq5mj/+j1A4CgJtCwK0jJyxeW1Bafp6BDwCfyyksOWUtELxofVD6FTWDAOA60tlvFZzlDwCXmLNk3Sop/j+gVhAA3BwCrhAzGfAA8KW14jpqBAHAlCDQXnDGPwCTqQvOBotG1AUCgGkh4H/FISYBAAYqFn+iFhAATA4BzcVyJgMABokU36UGEADweRDoLzgREICbXRBjBSf7EQBwSQj4vShikgDgQp+Ip5jrCQCoOQTcZL0eY8IA4Ba7xB3M8QQA1B0CLhPjmDQAuMBscSVzOwEA9QsCT4ujTCAANKS2OT/PXE4AgPch4E6xh8kEgEbSxD3M4QQANDwEXC0WMakA0MAy0Yy5mwAA3waB7uI0EwwABzorXmKuJgDAvhDwS2tFLRMOAKfIES2YowkA8M8ugUHiFBMPgABS15tP45U/AQCBWSAYwSQEIAD2iYeYiwkACFwIaCS6ik+ZkAD4gVqHNEw0ZQ4mAMAZQeBmsZrJCYCNosRPmHMJAHBmEGglSpioAPiQesPYTb1xZJ4lAMDZIeB6sYBJC4APqOvKubqXAADNgsAjIosJDIAX8sU/mUsJANA3BHxTTLa26zCpAajLBTFDNGcOJQDAHUHgQWvbDhMcgJocEA8zZxIA4L4Q0FS8Ic4w0QGoQs0Jw9naRwCA+4PAz0Qckx4AsV3czdxIAIA5IaCxeE5kMgECRiqxLhhjax8BAIYGgctFT1HMhAgY4RMxVC0QZg4kAABf7BYYypHCgGudEKPFdcx5IACgpkOEwsRJJkzANQv83hQ3MceBAABP7xaYJc4xgQJaqrROBL2NOQ0EAHh75fBS63AQJlVADx+ysh8EAPgqCPxKbGBiBRxto7iPOQsEANgRBP4gYploAUeJUWOTOQoEAPgjCPxD7GXiBQJqt3iCOQkEAATiMKH23DgI+N0h0YZDfEAAgBPuGOjGZUOA7TJEZ3EZcw8IAHBaGPiTWGFtQWLCBnxzPe968bh668Y8AwIAnB4Evi9GiTImcMDrI3sniB8yp4AAAB2DwBXiBZHIhA54vLCvi7iaOQQEALglDLQQS6yjSZnogf86ax249VvmChAA4OYgcKMYJgqY+GG4QvGG+C5zAwgAMCkIXCZaiSgKAQyj+nxrdR03cwEIADA9DPxCzLGuLKVAwK3X8c4WP2fMgwAAfD0IXCf6WfudKRpwg8Oij7iWMQ4CAFB3EGhkLRocRxiAhorETPEXTusDAQBoWCD4pQgRBygucKgsa9/+wxzYAwIAYE8Y+IkYKnZRdBBgKpCOVNdlMzZBAAD8GwZut9YMxFpHplKUYLckMUQFUcYgCACAM8LA90RPsY27COBD50W0tZDvVsYaCACAs8PADaKTdYkKJw/Cm5P5Nlq3XN7ImAIBANAzDHxLtLNuKfyM4oYanBSrxPNqOypjBwQAwH2nD6rthYOtT3jHKXzGKhYrxQBr5f6VjBEQAABzAsHl1uSvdhVssT4FUhzdp9K6ZW+GeE7cQf8HAYBGAKoGgqbid9ZlRRtEGcVTS59Yz2+YdRjPNfRvgAAA1DcU3CZairHWDoOjFFhHUds/U8U80Vn8lNP3AAIAYNcxxXdZr5KniBgWF/qVautwESqeENfTLwECABDIYHCL+D/RW0y33hYUUrC9Vmi1ofre/iXxiPgBn+4BAgCg0zbEB8ULYoxYLhJFieGnF16wVuInWW0yytqC94BoTt8BCACAm8PBFeKH4k9W8XtNzLIOMNqn+XqDCmvl/UfWp/jB1tcmf1Cr8NXvTh8ACAAAat+q+B3rEqSHxONWIVVfNbwuJomFYo2IsO5FUJ+qU8RBkS5yrCtqy8Uxcco64va89c/HrH9XZP3ZdOuimxTrbUWs9b27OihnvphohRV19PKz4jHrLced1imMTXh2gLP9P2pbYb+i0ji9AAAAAElFTkSuQmCC",mm={name:"UserAutocomplete",props:{modelValue:{type:[String,Array]},required:{type:Boolean,required:!1},filter:{type:Boolean,default:!1},variant:{type:String},density:{type:String},prependInnerIcon:{type:String},filled:{type:Boolean,default:!1},solo:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},chips:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},color:{type:String,default:"blue-grey lighten-2"},backgroundColor:{type:String},label:{type:String,default:"user.users"},placeholder:{type:String,default:"user.users"},defaultAvatar:{type:String},roleName:{type:String},roleNames:{type:Array}},emits:["update:modelValue"],data(){return{users:[],loading:!1,defaultAvatarAsset:um}},computed:{rules(){return this.required?[i=>!!i||i===0||this.$t("common.required")]:[]},userValue:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){this.loadUsers()},methods:{remove(i){if(this.multiple){const e=this.userValue.indexOf(i);if(e>=0){let t=[...this.userValue];t.splice(e,1),this.userValue=t}}else this.userValue=null},async loadUsers(){try{this.loading=!0;let i;this.roleName?(i=await Mi.usersByRole(this.roleName),this.users=i.data.usersByRole):this.roleNames&&this.roleNames.length>0?(i=await Mi.usersByRoles(this.roleNames),this.users=i.data.usersByRoles):(i=await Mi.users(),this.users=i.data.users)}catch(i){console.log("An error happened while loading users at the userAutoComplete component: ",i)}finally{this.loading=!1}}}};function fm(i,e,t,a,s,o){return n.openBlock(),n.createBlock(za.VAutocomplete,{modelValue:o.userValue,"onUpdate:modelValue":e[0]||(e[0]=r=>o.userValue=r),items:s.users,chips:t.chips,color:t.color,label:i.$t(t.label),placeholder:i.$t(t.placeholder),"item-title":"username","item-value":"id",multiple:t.multiple,loading:s.loading,clearable:t.clearable,rules:o.rules,"hide-details":t.hideDetails,variant:t.variant||(t.filter?"underlined":void 0),density:t.density||(t.filter?"compact":void 0),"prepend-inner-icon":t.prependInnerIcon||(t.filter?"mdi-account-search-outline":void 0)},{item:n.withCtx(({props:r,item:l})=>[n.createVNode(ue.VListItem,n.mergeProps(r,{title:l.raw.username,subtitle:l.raw.name}),{prepend:n.withCtx(()=>[n.createVNode(lt.VAvatar,{size:"32"},{default:n.withCtx(()=>[l.raw.avatarurl?(n.openBlock(),n.createBlock(dt.VImg,{key:0,src:l.raw.avatarurl},null,8,["src"])):(n.openBlock(),n.createBlock(dt.VImg,{key:1,src:s.defaultAvatarAsset},null,8,["src"]))]),_:2},1024)]),_:2},1040,["title","subtitle"])]),_:1},8,["modelValue","items","chips","color","label","placeholder","multiple","loading","clearable","rules","hide-details","variant","density","prepend-inner-icon"])}const Pi=no(mm,[["render",fm]]),hm=`query myGroups{
407
+ myGroups{
408
+ id
409
+ name
410
+ color
411
+ users{
412
+ id
413
+ name
414
+ username
415
+ email
416
+ phone
417
+ active
418
+ avatarurl
419
+ }
420
+ }
421
+ }
422
+
423
+ `,pm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"myGroups"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"myGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:270,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:hm}}},gm=`query groupsPaginate($limit:Int!, $pageNumber: Int, $search: String, $orderBy: String, $orderDesc: Boolean, $myGroups: Boolean, $showDeletedUsers: Boolean){
424
+ groupsPaginate(limit: $limit, pageNumber: $pageNumber, search: $search, orderBy: $orderBy, orderDesc: $orderDesc, myGroups: $myGroups, showDeletedUsers: $showDeletedUsers){
425
+ totalItems
426
+ page
427
+ items{
428
+ id
429
+ name
430
+ color
431
+ users{
432
+ id
433
+ username
434
+ }
435
+ }
436
+ }
437
+ }
438
+ `,km={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"groupsPaginate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pageNumber"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"search"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderBy"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderDesc"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"myGroups"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"showDeletedUsers"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupsPaginate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"pageNumber"},value:{kind:"Variable",name:{kind:"Name",value:"pageNumber"}}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"search"}}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"Variable",name:{kind:"Name",value:"orderBy"}}},{kind:"Argument",name:{kind:"Name",value:"orderDesc"},value:{kind:"Variable",name:{kind:"Name",value:"orderDesc"}}},{kind:"Argument",name:{kind:"Name",value:"myGroups"},value:{kind:"Variable",name:{kind:"Name",value:"myGroups"}}},{kind:"Argument",name:{kind:"Name",value:"showDeletedUsers"},value:{kind:"Variable",name:{kind:"Name",value:"showDeletedUsers"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:564,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:gm}}},ym=`query group($id:ID!){
439
+ group(id:$id){
440
+ id
441
+ name
442
+ color
443
+ users{
444
+ id
445
+ name
446
+ username
447
+ email
448
+ phone
449
+ active
450
+ avatarurl
451
+ }
452
+ }
453
+ }
454
+ `,bm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"group"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"group"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:280,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:ym}}},vm=`query groupByName($name:String!){
455
+ groupByName(name:$name){
456
+ id
457
+ name
458
+ color
459
+ users{
460
+ id
461
+ name
462
+ username
463
+ email
464
+ phone
465
+ active
466
+ avatarurl
467
+ }
468
+ }
469
+ }
470
+ `,Am={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"groupByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupByName"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"active"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarurl"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:302,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:vm}}},xm=`mutation groupCreate($name:String!, $color:String, $users: [String]){
471
+ groupCreate(input: {name: $name, color: $color, users:$users }){
472
+ id
473
+ name
474
+ color
475
+ users{
476
+ id
477
+ username
478
+ }
479
+ }
480
+ }
481
+
482
+ `,Nm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"groupCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"color"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"users"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"color"},value:{kind:"Variable",name:{kind:"Name",value:"color"}}},{kind:"ObjectField",name:{kind:"Name",value:"users"},value:{kind:"Variable",name:{kind:"Name",value:"users"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:285,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:xm}}},Sm=`mutation groupUpdate($id: ID!, $name:String!, $color:String, $users: [String]){
483
+ groupUpdate(id: $id, input: {name: $name, color: $color, users: $users }){
484
+ id
485
+ name
486
+ color
487
+ users{
488
+ id
489
+ username
490
+ }
491
+ }
492
+ }
493
+
494
+ `,Cm={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"groupUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"color"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"users"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"ObjectField",name:{kind:"Name",value:"color"},value:{kind:"Variable",name:{kind:"Name",value:"color"}}},{kind:"ObjectField",name:{kind:"Name",value:"users"},value:{kind:"Variable",name:{kind:"Name",value:"users"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:305,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:Sm}}},wm=`mutation groupDelete($id: ID!){
495
+ groupDelete(id: $id){
496
+ id
497
+ deleteSuccess
498
+ }
499
+ }
500
+
501
+ `,Em={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"groupDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"groupDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deleteSuccess"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:138,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:wm}}};class _m{constructor(){this.gqlc=null}setGqlc(e){this.gqlc=e}groups(){return this.gqlc.query({query:so,fetchPolicy:"network-only"})}myGroups(){return this.gqlc.query({query:pm,fetchPolicy:"network-only"})}paginateGroups(e,t,a=null,s=null,o=!1,r=!1,l=!1){return this.gqlc.query({query:km,variables:{limit:e,pageNumber:t,search:a,orderBy:s,orderDesc:o,myGroups:r,showDeletedUsers:l},fetchPolicy:"network-only"})}group(e){return this.gqlc.query({query:bm,variables:{id:e},fetchPolicy:"network-only"})}groupByName(e){return this.gqlc.query({query:Am,variables:{name:e},fetchPolicy:"network-only"})}createGroup(e){return this.gqlc.mutate({mutation:Nm,variables:e})}updateGroup(e){return this.gqlc.mutate({mutation:Cm,variables:e})}deleteGroup(e){return this.gqlc.mutate({mutation:Em,variables:{id:e}})}}const oo=new _m,Vm={name:"GroupAutocomplete",props:{modelValue:{type:[String,Array]},filter:{type:Boolean,default:!1},variant:{type:String},density:{type:String},prependInnerIcon:{type:String},filled:{type:Boolean,default:!1},solo:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},hideDetails:{type:Boolean,default:!1},chips:{type:Boolean,default:!1},color:{type:String,default:"blue-grey lighten-2"},clearable:{type:Boolean,default:!0},backgroundColor:{type:String},label:{type:String,default:"group.groups"},placeholder:{type:String,default:"group.groups"}},emits:["update:modelValue"],data(){return{groups:[],loading:!1}},computed:{getAvatar(){return i=>i&&i.name&&i.name.length>=2?i.name.charAt(0)+i.name.charAt(1):i&&i.name&&i.name.length>=1?i.name.charAt(0):""},groupValue:{get(){return this.modelValue},set(i){this.$emit("update:modelValue",i)}}},mounted(){this.loadGroups()},methods:{remove(i){if(this.multiple){const e=this.groupValue.indexOf(i);if(e>=0){let t=[...this.groupValue];t.splice(e,1),this.groupValue=t}}else this.groupValue=null},loadGroups(){this.loading=!0,oo.groups().then(i=>{this.groups=i.data.groups}).catch(i=>{console.error(i)}).finally(()=>this.loading=!1)}}},Dm={class:"text-white text-caption"},Tm={class:"text-white"};function Fm(i,e,t,a,s,o){return n.openBlock(),n.createBlock(za.VAutocomplete,{modelValue:o.groupValue,"onUpdate:modelValue":e[0]||(e[0]=r=>o.groupValue=r),items:s.groups,chips:t.chips,color:t.color,label:i.$t(t.label),placeholder:i.$t(t.placeholder),"item-title":"name","item-value":"id",multiple:t.multiple,loading:s.loading,clearable:t.clearable,"hide-details":t.hideDetails,variant:t.variant||(t.filter?"underlined":void 0),density:t.density||(t.filter?"compact":void 0),"prepend-inner-icon":t.prependInnerIcon||(t.filter?"mdi-account-group-outline":void 0)},{chip:n.withCtx(({props:r,item:l})=>[t.chips?(n.openBlock(),n.createBlock(Li.VChip,n.mergeProps({key:0},r,{closable:"","onClick:close":d=>o.remove(l.raw.id)}),{prepend:n.withCtx(()=>[n.createVNode(lt.VAvatar,{color:l.raw.color?l.raw.color:"grey"},{default:n.withCtx(()=>[n.createElementVNode("span",Dm,n.toDisplayString(o.getAvatar(l.raw)),1)]),_:2},1032,["color"])]),default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(l.raw.name),1)]),_:2},1040,["onClick:close"])):n.createCommentVNode("",!0)]),item:n.withCtx(({props:r,item:l})=>[n.createVNode(ue.VListItem,n.mergeProps(r,{title:l.raw.name}),{prepend:n.withCtx(()=>[n.createVNode(lt.VAvatar,{size:"36px",color:l.raw.color?l.raw.color:"grey"},{default:n.withCtx(()=>[n.createElementVNode("span",Tm,n.toDisplayString(o.getAvatar(l.raw)),1)]),_:2},1032,["color"])]),_:2},1040,["title"])]),_:1},8,["modelValue","items","chips","color","label","placeholder","multiple","loading","clearable","hide-details","variant","density","prepend-inner-icon"])}const ro=no(Vm,[["render",Fm]]),Mm={en:{common:{name:"Name",lastname:"Lastname",user:"User",required:"Required",search:"Search",cancel:"Cancel",loading:"Loading",processing:"Processing",noData:"No data",add:"Add",submit:"Submit",save:"Save",start:"Start",create:"Create",update:"Update",delete:"Delete",created:"Created",updated:"Updated",deleted:"Deleted",show:"show",close:"Close",send:"Send",confirm:"Confirm",next:"Next",previous:"Previous",actions:"Actions",itemsPerPageText:"Items per page",areYouSureDeleteRecord:"Are you sure you want to blur this record?",networkError:"Network error. The server does not respond.",export:"Export",import:"Import",title:"Title",subtitle:"Subtitle",true:"True",false:"False",consult:"Consult",detail:"Detail | Details",filter:"Filter | Filters",applyFilters:"Apply filters",clearFilters:"Clear filters",selectAll:"Select all",clearAll:"Clear all",noResults:"No results found",operation:{success:"Operation success",fail:"Operation fail"},doc:{overview:"Overview",howToUse:"How to use",userBenefits:"Capabilities",faq:"Frequently Asked Questions"}}},es:{common:{name:"Nombre",lastname:"Apellido",user:"Usuario",required:"Requerido",search:"Buscar",cancel:"Cancelar",loading:"Cargando",processing:"Procesando",noData:"Sin datos",add:"Agregar",submit:"Enviar",save:"Guardar",create:"Crear",start:"Comenzar",update:"Actualizar",delete:"Borrar",created:"Creado",updated:"Actualizado",deleted:"Eliminado",show:"Mostrar",close:"Cerrar",send:"Enviar",confirm:"Confirmar",next:"Siguiente",previous:"Anterior",actions:"Acciones",itemsPerPageText:"Elementos por página",areYouSureDeleteRecord:"¿Esta seguro que desea borrar este registro?",networkError:"Error de red. El servidor no responde.",export:"Exportar",import:"Importar",title:"Titulo",subtitle:"Subtitulo",true:"Verdadero",false:"Falso",consult:"Consultar",detail:"Detalle | Detalles",filter:"Filtro | Filtros",applyFilters:"Aplicar filtros",clearFilters:"Limpiar filtros",selectAll:"Seleccionar todo",clearAll:"Limpiar todo",noResults:"No se encontraron resultados",operation:{success:"Operación exitosa",fail:"Operación fallida"},doc:{overview:"Resumen",howToUse:"Cómo utilizar",userBenefits:"Capacidades",faq:"Preguntas Frecuentes"}}},pt:{common:{name:"Nome",lastname:"Último nome",user:"User",required:"Requeridos",search:"Procurar",cancel:"Cancelar",loading:"Carregando",processing:"Em processamento",noData:"Não há dados",add:"Adicionar",submit:"Submit",save:"Salve",start:"Começar",create:"Criar",update:"Atualizar",delete:"Excluir",created:"Criado",updated:"Atualizado",deleted:"Excluído",show:"Mostrar",close:"Fechar",send:"Enviar",confirm:"Confirme",next:"Próximo",previous:"Anterior",actions:"Actions",itemsPerPageText:"Itens por página",areYouSureDeleteRecord:"Tem certeza de que deseja excluir este registro?",networkError:"Erro de vermelho. O servidor não responde.",export:"Exportar",import:"Importar",title:"Título",subtitle:"Subtítulo",true:"Verdade",false:"Falso",consult:"Consultar",detail:"Detalhe | Detalhes",filter:"Filtro | Filtros",applyFilters:"Aplicar filtros",clearFilters:"Limpar filtros",selectAll:"Selecionar tudo",clearAll:"Limpar tudo",noResults:"Nenhum resultado encontrado",operation:{success:"Operação bem sucedida",fail:"Operação falhou"},doc:{overview:"Resumo",howToUse:"Como usar",userBenefits:"Capacidades",faq:"Perguntas Frequentes"}}}},Pm={en:{$vuetify:{badge:"Badge",close:"Close",dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},datePicker:{itemsSelected:"{0} selected",nextMonthAriaLabel:"Next month",nextYearAriaLabel:"Next year",prevMonthAriaLabel:"Previous month",prevYearAriaLabel:"Previous year"},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Goto Page {0}",currentPage:"Current Page, Page {0}"}},rating:{ariaLabel:{icon:"Rating {0} of {1}"}}}},es:{$vuetify:{badge:"Placa",close:"Cerrar",dataIterator:{noResultsText:"Ningún elemento coincide con la búsqueda",loadingText:"Cargando..."},dataTable:{itemsPerPageText:"Filas por página:",ariaLabel:{sortDescending:"Orden descendente.",sortAscending:"Orden ascendente.",sortNone:"Sin ordenar.",activateNone:"Pulse para quitar orden.",activateDescending:"Pulse para ordenar descendente.",activateAscending:"Pulse para ordenar ascendente."},sortBy:"Ordenado por"},dataFooter:{itemsPerPageText:"Elementos por página:",itemsPerPageAll:"Todos",nextPage:"Página siguiente",prevPage:"Página anterior",firstPage:"Primer página",lastPage:"Última página",pageText:"{0}-{1} de {2}"},datePicker:{itemsSelected:"{0} seleccionados",nextMonthAriaLabel:"Próximo mes",nextYearAriaLabel:"Próximo año",prevMonthAriaLabel:"Mes anterior",prevYearAriaLabel:"Año anterior"},noDataText:"No hay datos disponibles",carousel:{prev:"Visual anterior",next:"Visual siguiente",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} más"},fileInput:{counter:"{0} archivos",counterSize:"{0} archivos ({1} en total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Navegación de paginación",next:"Página siguiente",previous:"Página anterior",page:"Ir a la página {0}",currentPage:"Página actual, página {0}"}},rating:{ariaLabel:{icon:"Rating {0} of {1}"}}}},pt:{$vuetify:{badge:"Distintivo",close:"Fechar",dataIterator:{noResultsText:"Nenhum dado encontrado",loadingText:"Carregando itens..."},dataTable:{itemsPerPageText:"Linhas por página:",ariaLabel:{sortDescending:"Ordenado decrescente.",sortAscending:"Ordenado crescente.",sortNone:"Não ordenado.",activateNone:"Ative para remover a ordenação.",activateDescending:"Ative para ordenar decrescente.",activateAscending:"Ative para ordenar crescente."},sortBy:"Ordenar por"},dataFooter:{itemsPerPageText:"Itens por página:",itemsPerPageAll:"Todos",nextPage:"Próxima página",prevPage:"Página anterior",firstPage:"Primeira página",lastPage:"Última página",pageText:"{0}-{1} de {2}"},datePicker:{itemsSelected:"{0} selecionado(s)",nextMonthAriaLabel:"Próximo mês",nextYearAriaLabel:"Próximo ano",prevMonthAriaLabel:"Mês anterior",prevYearAriaLabel:"Ano anterior"},noDataText:"Não há dados disponíveis",carousel:{prev:"Visão anterior",next:"Próxima visão",ariaLabel:{delimiter:"Slide {0} de {1} do carrossel"}},calendar:{moreEvents:"Mais {0}"},fileInput:{counter:"{0} arquivo(s)",counterSize:"{0} arquivo(s) ({1} no total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{wrapper:"Navegação de paginação",next:"Próxima página",previous:"Página anterior",page:"Ir à página {0}",currentPage:"Página atual, página {0}"}},rating:{ariaLabel:{icon:"Rating {0} of {1}"}}}}},Bm={en:{client:{error:{unauthenticated:"Authentication required",forbidden:"Forbidden",validation:"Validation Errors",networkError:"Network error. The server does not respond.",unexpectedError:"An unexpected error has occurred",roleNameAlreadyExists:"The name chosen for the new role was already taken"}}},es:{client:{error:{unauthenticated:"Autenticación requerida",forbidden:"Prohibido",validation:"Error de validación.",networkError:"Error de Red. El servidor no responde",unexpectedError:"Ha ocurrido un error inesperado",roleNameAlreadyExists:"El nombre elegido para el nuevo rol ya fue tomado"}}},pt:{client:{error:{unauthenticated:"Authentication required",forbidden:"Forbidden",validationError:"Validation Error",networkError:"networkError",unexpectedError:"Ocorreu um erro inesperado",roleNameAlreadyExists:"O nome escolhido para o novo papel já foi assumido"}}}},Om={en:{error:{LIST_MAX_REACHED:"List max reached",LIST_MIN_REACHED:"List min reached",MAX_FILE_SIZE_EXCEEDED:"Maxium file size exceeded",MIMETYPE_NOT_ALLOWED:"File type not allowed"}},es:{error:{LIST_MAX_REACHED:"Máximo alcanzado",LIST_MIN_REACHED:"Mínimo alcanzado",MAX_FILE_SIZE_EXCEEDED:"Se superó el tamaño máximo de archivo",MIMETYPE_NOT_ALLOWED:"Tipo de archivo no permitido"}},pt:{error:{LIST_MAX_REACHED:"List max reached",LIST_MIN_REACHED:"List min reached",MAX_FILE_SIZE_EXCEEDED:"Tamanho máximo do arquivo excedido",MIMETYPE_NOT_ALLOWED:"Tipo de arquivo não permitido"}}},Lm={en:{common:{multiLang:{en:"English",es:"Spanish",pt:"Portuguese",image:"Image",audio:"Audio"}}},es:{common:{multiLang:{en:"Ingles",es:"Español",pt:"Portugués",image:"Imagen",audio:"Audio"}}},pt:{common:{multiLang:{en:"Inglês",es:"Espanhol",pt:"Português",image:"Imagem",audio:"Audio"}}}};jt.all([Mm,Lm,Pm,Bm,Om]),{...ne.mapGetters(["hasPermission"])},{...ne.mapGetters(["hasPermission"])},{...ne.mapGetters(["hasPermission"])},{...ne.mapGetters(["hasPermission"])},{...ne.mapState({me:i=>i.user.me}),...ne.mapGetters(["isAuth"])},{...ne.mapActions(["login"])},{...ne.mapActions(["verifyToken"])},{...ne.mapActions(["verifyToken"])},{...ne.mapGetters(["getAvatarUrl"])},{...ne.mapGetters(["isAuth","me"])},$t.register(Sa,Ca,Na,lu,wa),$t.register(Sa,Ca,Na,Bs,wa,Gs),$t.register(Sa,Ca,Na,Bs,wa,Gs);function qt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ea={exports:{}},Im=Ea.exports,lo;function Rm(){return lo||(lo=1,(function(i,e){(function(t,a){i.exports=a()})(Im,(function(){var t=1e3,a=6e4,s=36e5,o="millisecond",r="second",l="minute",d="hour",c="day",u="week",f="month",m="quarter",p="year",k="date",g="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var b=["th","st","nd","rd"],x=N%100;return"["+N+(b[(x-20)%10]||b[x]||b[0])+"]"}},A=function(N,b,x){var E=String(N);return!E||E.length>=b?N:""+Array(b+1-E.length).join(x)+N},w={s:A,z:function(N){var b=-N.utcOffset(),x=Math.abs(b),E=Math.floor(x/60),C=x%60;return(b<=0?"+":"-")+A(E,2,"0")+":"+A(C,2,"0")},m:function N(b,x){if(b.date()<x.date())return-N(x,b);var E=12*(x.year()-b.year())+(x.month()-b.month()),C=b.clone().add(E,f),P=x-C<0,M=b.clone().add(E+(P?-1:1),f);return+(-(E+(x-C)/(P?C-M:M-C))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:p,w:u,d:c,D:k,h:d,m:l,s:r,ms:o,Q:m}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},S="en",B={};B[S]=v;var D="$isDayjsObject",T=function(N){return N instanceof R||!(!N||!N[D])},V=function N(b,x,E){var C;if(!b)return S;if(typeof b=="string"){var P=b.toLowerCase();B[P]&&(C=P),x&&(B[P]=x,C=P);var M=b.split("-");if(!C&&M.length>1)return N(M[0])}else{var L=b.name;B[L]=b,C=L}return!E&&C&&(S=C),C||!E&&S},F=function(N,b){if(T(N))return N.clone();var x=typeof b=="object"?b:{};return x.date=N,x.args=arguments,new R(x)},_=w;_.l=V,_.i=T,_.w=function(N,b){return F(N,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var R=(function(){function N(x){this.$L=V(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[D]=!0}var b=N.prototype;return b.parse=function(x){this.$d=(function(E){var C=E.date,P=E.utc;if(C===null)return new Date(NaN);if(_.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var M=C.match(h);if(M){var L=M[2]-1||0,U=(M[7]||"0").substring(0,3);return P?new Date(Date.UTC(M[1],L,M[3]||1,M[4]||0,M[5]||0,M[6]||0,U)):new Date(M[1],L,M[3]||1,M[4]||0,M[5]||0,M[6]||0,U)}}return new Date(C)})(x),this.init()},b.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},b.$utils=function(){return _},b.isValid=function(){return this.$d.toString()!==g},b.isSame=function(x,E){var C=F(x);return this.startOf(E)<=C&&C<=this.endOf(E)},b.isAfter=function(x,E){return F(x)<this.startOf(E)},b.isBefore=function(x,E){return this.endOf(E)<F(x)},b.$g=function(x,E,C){return _.u(x)?this[E]:this.set(C,x)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(x,E){var C=this,P=!!_.u(E)||E,M=_.p(x),L=function(re,W){var ie=_.w(C.$u?Date.UTC(C.$y,W,re):new Date(C.$y,W,re),C);return P?ie:ie.endOf(c)},U=function(re,W){return _.w(C.toDate()[re].apply(C.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(W)),C)},z=this.$W,q=this.$M,j=this.$D,te="set"+(this.$u?"UTC":"");switch(M){case p:return P?L(1,0):L(31,11);case f:return P?L(1,q):L(0,q+1);case u:var de=this.$locale().weekStart||0,be=(z<de?z+7:z)-de;return L(P?j-be:j+(6-be),q);case c:case k:return U(te+"Hours",0);case d:return U(te+"Minutes",1);case l:return U(te+"Seconds",2);case r:return U(te+"Milliseconds",3);default:return this.clone()}},b.endOf=function(x){return this.startOf(x,!1)},b.$set=function(x,E){var C,P=_.p(x),M="set"+(this.$u?"UTC":""),L=(C={},C[c]=M+"Date",C[k]=M+"Date",C[f]=M+"Month",C[p]=M+"FullYear",C[d]=M+"Hours",C[l]=M+"Minutes",C[r]=M+"Seconds",C[o]=M+"Milliseconds",C)[P],U=P===c?this.$D+(E-this.$W):E;if(P===f||P===p){var z=this.clone().set(k,1);z.$d[L](U),z.init(),this.$d=z.set(k,Math.min(this.$D,z.daysInMonth())).$d}else L&&this.$d[L](U);return this.init(),this},b.set=function(x,E){return this.clone().$set(x,E)},b.get=function(x){return this[_.p(x)]()},b.add=function(x,E){var C,P=this;x=Number(x);var M=_.p(E),L=function(q){var j=F(P);return _.w(j.date(j.date()+Math.round(q*x)),P)};if(M===f)return this.set(f,this.$M+x);if(M===p)return this.set(p,this.$y+x);if(M===c)return L(1);if(M===u)return L(7);var U=(C={},C[l]=a,C[d]=s,C[r]=t,C)[M]||1,z=this.$d.getTime()+x*U;return _.w(z,this)},b.subtract=function(x,E){return this.add(-1*x,E)},b.format=function(x){var E=this,C=this.$locale();if(!this.isValid())return C.invalidDate||g;var P=x||"YYYY-MM-DDTHH:mm:ssZ",M=_.z(this),L=this.$H,U=this.$m,z=this.$M,q=C.weekdays,j=C.months,te=C.meridiem,de=function(W,ie,ce,he){return W&&(W[ie]||W(E,P))||ce[ie].slice(0,he)},be=function(W){return _.s(L%12||12,W,"0")},re=te||function(W,ie,ce){var he=W<12?"AM":"PM";return ce?he.toLowerCase():he};return P.replace(y,(function(W,ie){return ie||(function(ce){switch(ce){case"YY":return String(E.$y).slice(-2);case"YYYY":return _.s(E.$y,4,"0");case"M":return z+1;case"MM":return _.s(z+1,2,"0");case"MMM":return de(C.monthsShort,z,j,3);case"MMMM":return de(j,z);case"D":return E.$D;case"DD":return _.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return de(C.weekdaysMin,E.$W,q,2);case"ddd":return de(C.weekdaysShort,E.$W,q,3);case"dddd":return q[E.$W];case"H":return String(L);case"HH":return _.s(L,2,"0");case"h":return be(1);case"hh":return be(2);case"a":return re(L,U,!0);case"A":return re(L,U,!1);case"m":return String(U);case"mm":return _.s(U,2,"0");case"s":return String(E.$s);case"ss":return _.s(E.$s,2,"0");case"SSS":return _.s(E.$ms,3,"0");case"Z":return M}return null})(W)||M.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(x,E,C){var P,M=this,L=_.p(E),U=F(x),z=(U.utcOffset()-this.utcOffset())*a,q=this-U,j=function(){return _.m(M,U)};switch(L){case p:P=j()/12;break;case f:P=j();break;case m:P=j()/3;break;case u:P=(q-z)/6048e5;break;case c:P=(q-z)/864e5;break;case d:P=q/s;break;case l:P=q/a;break;case r:P=q/t;break;default:P=q}return C?P:_.a(P)},b.daysInMonth=function(){return this.endOf(f).$D},b.$locale=function(){return B[this.$L]},b.locale=function(x,E){if(!x)return this.$L;var C=this.clone(),P=V(x,E,!0);return P&&(C.$L=P),C},b.clone=function(){return _.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},N})(),I=R.prototype;return F.prototype=I,[["$ms",o],["$s",r],["$m",l],["$H",d],["$W",c],["$M",f],["$y",p],["$D",k]].forEach((function(N){I[N[1]]=function(b){return this.$g(b,N[0],N[1])}})),F.extend=function(N,b){return N.$i||(N(b,R,F),N.$i=!0),F},F.locale=V,F.isDayjs=T,F.unix=function(N){return F(1e3*N)},F.en=B[S],F.Ls=B,F.p={},F}))})(Ea)),Ea.exports}var Um=Rm();const Bi=qt(Um);var _a={exports:{}},$m=_a.exports,co;function zm(){return co||(co=1,(function(i,e){(function(t,a){i.exports=a()})($m,(function(){var t="minute",a=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(o,r,l){var d=r.prototype;l.utc=function(g){var h={date:g,utc:!0,args:arguments};return new r(h)},d.utc=function(g){var h=l(this.toDate(),{locale:this.$L,utc:!0});return g?h.add(this.utcOffset(),t):h},d.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var c=d.parse;d.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var u=d.init;d.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else u.call(this)};var f=d.utcOffset;d.utcOffset=function(g,h){var y=this.$utils().u;if(y(g))return this.$u?0:y(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=(function(S){S===void 0&&(S="");var B=S.match(a);if(!B)return null;var D=(""+B[0]).match(s)||["-",0,0],T=D[0],V=60*+D[1]+ +D[2];return V===0?0:T==="+"?V:-V})(g),g===null))return this;var v=Math.abs(g)<=16?60*g:g;if(v===0)return this.utc(h);var A=this.clone();if(h)return A.$offset=v,A.$u=!1,A;var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(A=this.local().add(v+w,t)).$offset=v,A.$x.$localOffset=w,A};var m=d.format;d.format=function(g){var h=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,h)},d.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var p=d.toDate;d.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var k=d.diff;d.diff=function(g,h,y){if(g&&this.$u===g.$u)return k.call(this,g,h,y);var v=this.local(),A=l(g).local();return k.call(v,A,h,y)}}}))})(_a)),_a.exports}var qm=zm();const Ym=qt(qm);var Va={exports:{}},Hm=Va.exports,uo;function jm(){return uo||(uo=1,(function(i,e){(function(t,a){i.exports=a()})(Hm,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},a={};return function(s,o,r){var l,d=function(m,p,k){k===void 0&&(k={});var g=new Date(m),h=(function(y,v){v===void 0&&(v={});var A=v.timeZoneName||"short",w=y+"|"+A,S=a[w];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:A}),a[w]=S),S})(p,k);return h.formatToParts(g)},c=function(m,p){for(var k=d(m,p),g=[],h=0;h<k.length;h+=1){var y=k[h],v=y.type,A=y.value,w=t[v];w>=0&&(g[w]=parseInt(A,10))}var S=g[3],B=S===24?0:S,D=g[0]+"-"+g[1]+"-"+g[2]+" "+B+":"+g[4]+":"+g[5]+":000",T=+m;return(r.utc(D).valueOf()-(T-=T%1e3))/6e4},u=o.prototype;u.tz=function(m,p){m===void 0&&(m=l);var k,g=this.utcOffset(),h=this.toDate(),y=h.toLocaleString("en-US",{timeZone:m}),v=Math.round((h-new Date(y))/1e3/60),A=15*-Math.round(h.getTimezoneOffset()/15)-v;if(!Number(A))k=this.utcOffset(0,p);else if(k=r(y,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(A,!0),p){var w=k.utcOffset();k=k.add(g-w,"minute")}return k.$x.$timezone=m,k},u.offsetName=function(m){var p=this.$x.$timezone||r.tz.guess(),k=d(this.valueOf(),p,{timeZoneName:m}).find((function(g){return g.type.toLowerCase()==="timezonename"}));return k&&k.value};var f=u.startOf;u.startOf=function(m,p){if(!this.$x||!this.$x.$timezone)return f.call(this,m,p);var k=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(k,m,p).tz(this.$x.$timezone,!0)},r.tz=function(m,p,k){var g=k&&p,h=k||p||l,y=c(+r(),h);if(typeof m!="string")return r(m).tz(h);var v=(function(B,D,T){var V=B-60*D*1e3,F=c(V,T);if(D===F)return[V,D];var _=c(V-=60*(F-D)*1e3,T);return F===_?[V,F]:[B-60*Math.min(F,_)*1e3,Math.max(F,_)]})(r.utc(m,g).valueOf(),y,h),A=v[0],w=v[1],S=r(A).utcOffset(w);return S.$x.$timezone=h,S},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(m){l=m}}}))})(Va)),Va.exports}var Wm=jm();const Qm=qt(Wm);var Da={exports:{}},Gm=Da.exports,mo;function Xm(){return mo||(mo=1,(function(i,e){(function(t,a){i.exports=a()})(Gm,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,d={},c=function(h){return(h=+h)+(h>68?1900:2e3)},u=function(h){return function(y){this[h]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),A=60*v[1]+(+v[2]||0);return A===0?0:v[0]==="+"?-A:A})(h)}],m=function(h){var y=d[h];return y&&(y.indexOf?y:y.s.concat(y.f))},p=function(h,y){var v,A=d.meridiem;if(A){for(var w=1;w<=24;w+=1)if(h.indexOf(A(w,0,y))>-1){v=w>12;break}}else v=h===(y?"pm":"PM");return v},k={A:[l,function(h){this.afternoon=p(h,!1)}],a:[l,function(h){this.afternoon=p(h,!0)}],Q:[s,function(h){this.month=3*(h-1)+1}],S:[s,function(h){this.milliseconds=100*+h}],SS:[o,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(h){var y=d.ordinal,v=h.match(/\d+/);if(this.day=v[0],y)for(var A=1;A<=31;A+=1)y(A).replace(/\[|\]/g,"")===h&&(this.day=A)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(h){var y=m("months"),v=(m("monthsShort")||y.map((function(A){return A.slice(0,3)}))).indexOf(h)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[l,function(h){var y=m("months").indexOf(h)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(h){this.year=c(h)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function g(h){var y,v;y=h,v=d&&d.formats;for(var A=(h=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(F,_,R){var I=R&&R.toUpperCase();return _||v[R]||t[R]||v[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,b,x){return b||x.slice(1)}))}))).match(a),w=A.length,S=0;S<w;S+=1){var B=A[S],D=k[B],T=D&&D[0],V=D&&D[1];A[S]=V?{regex:T,parser:V}:B.replace(/^\[|\]$/g,"")}return function(F){for(var _={},R=0,I=0;R<w;R+=1){var N=A[R];if(typeof N=="string")I+=N.length;else{var b=N.regex,x=N.parser,E=F.slice(I),C=b.exec(E)[0];x.call(_,C),F=F.replace(C,"")}}return(function(P){var M=P.afternoon;if(M!==void 0){var L=P.hours;M?L<12&&(P.hours+=12):L===12&&(P.hours=0),delete P.afternoon}})(_),_}}return function(h,y,v){v.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(c=h.parseTwoDigitYear);var A=y.prototype,w=A.parse;A.parse=function(S){var B=S.date,D=S.utc,T=S.args;this.$u=D;var V=T[1];if(typeof V=="string"){var F=T[2]===!0,_=T[3]===!0,R=F||_,I=T[2];_&&(I=T[2]),d=this.$locale(),!F&&I&&(d=v.Ls[I]),this.$d=(function(E,C,P,M){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*E);var L=g(C)(E),U=L.year,z=L.month,q=L.day,j=L.hours,te=L.minutes,de=L.seconds,be=L.milliseconds,re=L.zone,W=L.week,ie=new Date,ce=q||(U||z?1:ie.getDate()),he=U||ie.getFullYear(),Re=0;U&&!z||(Re=z>0?z-1:ie.getMonth());var Ue,at=j||0,nt=te||0,st=de||0,ot=be||0;return re?new Date(Date.UTC(he,Re,ce,at,nt,st,ot+60*re.offset*1e3)):P?new Date(Date.UTC(he,Re,ce,at,nt,st,ot)):(Ue=new Date(he,Re,ce,at,nt,st,ot),W&&(Ue=M(Ue).week(W).toDate()),Ue)}catch{return new Date("")}})(B,V,D,v),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),R&&B!=this.format(V)&&(this.$d=new Date("")),d={}}else if(V instanceof Array)for(var N=V.length,b=1;b<=N;b+=1){T[1]=V[b-1];var x=v.apply(this,T);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}b===N&&(this.$d=new Date(""))}else w.call(this,S)}}}))})(Da)),Da.exports}var Km=Xm();const Zm=qt(Km);var Ta={exports:{}},Jm=Ta.exports,fo;function ef(){return fo||(fo=1,(function(i,e){(function(t,a){i.exports=a()})(Jm,(function(){return function(t,a,s){var o=a.prototype,r=function(m){var p,k=m.date,g=m.utc,h={};if(!((p=k)===null||p instanceof Date||p instanceof Array||o.$utils().u(p)||p.constructor.name!=="Object")){if(!Object.keys(k).length)return new Date;var y=g?s.utc():s();Object.keys(k).forEach((function(V){var F,_;h[F=V,_=o.$utils().p(F),_==="date"?"day":_]=k[V]}));var v=h.day||(h.year||h.month>=0?1:y.date()),A=h.year||y.year(),w=h.month>=0?h.month:h.year||h.day?0:y.month(),S=h.hour||0,B=h.minute||0,D=h.second||0,T=h.millisecond||0;return g?new Date(Date.UTC(A,w,v,S,B,D,T)):new Date(A,w,v,S,B,D,T)}return k},l=o.parse;o.parse=function(m){m.date=r.bind(this)(m),l.bind(this)(m)};var d=o.set,c=o.add,u=o.subtract,f=function(m,p,k,g){g===void 0&&(g=1);var h=Object.keys(p),y=this;return h.forEach((function(v){y=m.bind(y)(p[v]*g,v)})),y};o.set=function(m,p){return p=p===void 0?m:p,m.constructor.name==="Object"?f.bind(this)((function(k,g){return d.bind(this)(g,k)}),p,m):d.bind(this)(m,p)},o.add=function(m,p){return m.constructor.name==="Object"?f.bind(this)(c,m,p):c.bind(this)(m,p)},o.subtract=function(m,p){return m.constructor.name==="Object"?f.bind(this)(c,m,p,-1):u.bind(this)(m,p)}}}))})(Ta)),Ta.exports}var tf=ef();const af=qt(tf);Bi.extend(Ym),Bi.extend(Qm),Bi.extend(Zm),Bi.extend(af);const nf={en:{user:{user:"User",users:"Users",title:"Users management",description:"View, search, create, edit and delete Users",createTitle:"Creating user",updateTitle:"Updating user",showTitle:"User details",deleteTitle:"Deleting user",apikeyTitle:"Getting user apikey",getApikey:"Get APIKEY",deleteConfirm:"Are you sure you want to delete this user?",changePasswordTitle:"Changing user password",changeAvatarTitle:"Changing user avatar",changeYourPassword:"Change your password",created:"User created",updated:"User updated",update:"Update",deleted:"User deleted",passwordChanged:"User password changed",avatarChanged:"User avatar changed",notFound:"User not found",onlyActiveUsers:"Only active Users",mandatoryText:"Required field",filters:"Filters",active:"Active",inactive:"Inactive",validation:{required:"Required field",number:"Only Numbers",emailVerify:"Email does not match",emailFormat:"The email has an invalid format",passwordVerify:"Password does not match"},label:{username:"Username",password:"Password",fullname:"Fullname",email:"Email",phone:"Phone",role:"Role",groups:"Groups",active:"Active",actions:"Actions",repeatEmail:"Confirm email",repeatPassword:"Confirm password",newPassword:"New password",currentPassword:"Current password"},profile:{changePhoto:"Change Photo"}}},es:{user:{user:"Usuario",users:"Usuarios",title:"Administración de Usuarios",description:"Ver, buscar, crear, editar, y borrar usuarios del sistema ",adminTitle:"Administración de Usuarios",createTitle:"Creando usuario",updateTitle:"Actualizando usuario",showTitle:"Detalles de usuario",deleteTitle:"Borrando usuario",apikeyTitle:"Obteniendo apikey de usuario",getApikey:"Obtener APIKEY",deleteConfirm:"¿Esta seguro que desea eliminar este usuario?",changePasswordTitle:"Cambiando contraseña de usuario",changeAvatarTitle:"Cambiando avatar de usuario",changeYourPassword:"Cambiar tu contraseña",created:"Usuario creado",updated:"Usuario actualizado",update:"Actualizar",deleted:"Usuario eliminado",passwordChanged:"Contraseña de usuario modificada",avatarChanged:"Avatar de usuario modificado",notFound:"Usuario no encontrado",onlyActiveUsers:"Solo usuarios activos",mandatoryText:"Campo obligatorio",filters:"Filtros",active:"Activo",inactive:"Inactivo",validation:{required:"Campo requerido",emailVerify:"El email no coincide",number:"Sólo Números",emailFormat:"El email tiene un formato invalido",passwordVerify:"La contraseña no coincide"},label:{username:"Usuario",password:"Contraseña",fullname:"Nombre y Apellido",email:"Email",phone:"Telefono",role:"Rol",groups:"Grupos",active:"Activo",actions:"Acciones",repeatEmail:"Confirmar email",repeatPassword:"Confirmar contraseña",newPassword:"Contraseña nueva",currentPassword:"Contraseña actual"},profile:{changePhoto:"Cambiar Foto"}}},pt:{user:{user:"Usuário",users:"Usuários",title:"Administração de Usuários",description:"Ver, buscar, criar, editar e usar empréstimos do sistema",createTitle:"Criando usuário",updateTitle:"Atualizando usuário",showTitle:"Detalhes do usuario",deleteTitle:"Excluindo usuário",apikeyTitle:"Obtendo o apikey do usuário",getApikey:"Obter APIKEY",deleteConfirm:"Tem certeza de que desea excluir este usuário?",changePasswordTitle:"Alterando a senha do usuário",changeAvatarTitle:"Alterando avatar do usuário",changeYourPassword:"Mude sua senha",created:"Usuário criado",updated:"Usuário atualizado",update:"Atualizar",deleted:"Usuário removido",passwordChanged:"Senha de usuário modificada",avatarChanged:"Avatar de usuário modificado",notFound:"Usuário não encontrado",onlyActiveUsers:"Apenas usuários activos",mandatoryText:"Campo obrigatório",filters:"Filtros",active:"Ativo",inactive:"Inativo",validation:{required:"Campo obrigatório",emailVerify:"O email não corresponde",number:"Apenas números",emailFormat:"O email tem um formato inválido",passwordVerify:"Senha não corresponde"},label:{username:"Usuário",password:"senha",fullname:"Nome completo",email:"Email",phone:"Telefone",role:"Função",groups:"Grupos",active:"Ativo",actions:"Ações",repeatEmail:"Confirmar o e-mail",repeatPassword:"Confirmar a senha",newPassword:"Nova senha",currentPassword:"Senha atual"},profile:{changePhoto:"Alterar foto"}}}},sf={en:{group:{group:"Group",groups:"Groups",title:"Groups management",description:"View, search, create, edit and delete Groups",createTitle:"Creating group",updateTitle:"Updating group",deleteTitle:"Deleting group",showTitle:"Group details",created:"Group created",updated:"Group updated",deleted:"Group deleted",myGroups:"My groups",label:{avatar:"Avatar",name:"Name",color:"Color",users:"Users"}}},es:{group:{group:"Grupo",groups:"Grupos",title:"Administración de Grupos",description:"Ver, buscar, crear, editar, y borrar grupos del sistema",createTitle:"Creando grupo",updateTitle:"Editando grupo",deleteTitle:"Eliminando grupo",showTitle:"Detalles del grupo",created:"Grupo creado",updated:"Grupo actualizado",deleted:"Grupo eliminado",myGroups:"Mis grupos",label:{avatar:"Avatar",name:"Nombre",color:"Color",users:"Usuarios"}}},pt:{group:{group:"Grupo",groups:"Grupos",title:"Administração de Grupos",description:"Ver, buscar, criar, editar e usar grupos del sistema",createTitle:"Criando grupo",updateTitle:"Atualizando grupo",deleteTitle:"Excluindo groupo",showTitle:"Detalhes do grupo",created:"Grupo criado",updated:"Grupo atualizado",deleted:"Grupo removido",myGroups:"Meus grupos",label:{avatar:"Avatar",name:"Nome",color:"Cor",users:"Usuários"}}}},of={en:{role:{role:"role",roles:"roles",title:"Roles management",subtitle:"View, search, create, edit and delete roles",description:"View, search, create, edit and delete roles",deleteTitle:"Deleting role",createTitle:"Creating role",updateTitle:"Updating role",copyTitle:"Copying role",copy:"Copy",created:"Role created",updated:"Role updated",deleted:"Role deleted",roleNameAlreadyTaken:"Role name already taken",showTitle:"Roles and Permissions",permission:"Permission",rolDuplicate:"Duplicated Role",noChildRoles:"No child roles",label:{name:"Name",childRoles:"Child Roles",permissions:"Permissions"},permissions:{SECURITY_USER_CREATE:"User creation",SECURITY_USER_EDIT:"User edition",SECURITY_USER_DELETE:"User deletion",SECURITY_USER_SHOW:"User display",SECURITY_GROUP_CREATE:"Group creation",SECURITY_GROUP_EDIT:"Group Edition",SECURITY_GROUP_DELETE:"Group deletion",SECURITY_GROUP_SHOW:"Group display",SECURITY_ROLE_SHOW:"Role display",SECURITY_ROLE_SHOW_CHILD:"Child role display",SECURITY_ROLE_CREATE:"Role creation",SECURITY_ROLE_EDIT:"Role edition",SECURITY_ROLE_DELETE:"Role deletion",SECURITY_DASHBOARD_SHOW:"Show admin dashboard",SECURITY_ADMIN_MENU:"Show admin menu",ENVIRONMENTVARIABLE_SHOW:"Environment variables show",ENVIRONMENTVARIABLE_UPDATE:"Environment variables edition",ENVIRONMENTVARIABLE_CREATE:"Environment variables creation",ENVIRONMENTVARIABLE_DELETE:"Environment variables deletion",CAMPAIGN_CREATE:"Campaign creation",CAMPAIGN_SHOW:"Campaign display",CAMPAIGN_UPDATE:"Campaign edition",CAMPAIGN_DELETE:"Campaign deletion",CUSTOMFIELDS_SHOW:"Custom fields display",CUSTOMFIELDS_UPDATE:"Custom fields edition",CUSTOMFIELDS_CREATE:"Custom fields creation",CUSTOMFIELDS_DELETE:"Custom fields deletion",PERSON_SHOW:"Person display",PERSON_UPDATE:"Person edition",PERSON_DELETE:"Person deletion",PERSON_CREATE:"Person creation",IMPORT_CSV:"Import CSV",SOCIOECONOMICLEVEL_UPDATE:"Socioeconomic level edition",SOCIOECONOMICLEVEL_CREATE:"Socioeconomic level creation",LIVINGPLACETYPE_UPDATE:"Living place type edition",SOCIOECONOMICLEVEL_DELETE:"Socioeconomic level deletion",LIVINGPLACETYPE_CREATE:"Living place type creation",LIVINGPLACETYPE_DELETE:"Living place type deletion",CATEGORYCOMPANY_SHOW:"Category company display",CATEGORYCOMPANY_CREATE:"Category company creation",CATEGORYCOMPANY_DELETE:"Category company deletion",CATEGORYCOMPANY_UPDATE:"Category company edition",COMPANY_CREATE:"Company creation",COMPANY_DELETE:"Company deletion",COMPANY_UPDATE:"Company edition",COMPANY_SHOW:"Company display",MT_SMS_BY_CMP:"MT by CMP",INTERACTIONS_EXPORT:"Export interactions",CAMPAIGN_EXPORT:"Export campaigns",CAMPAIGN_UPLOADAUDIO:"Upload campaign audio",SHOW_MULTICHANNEL_MSG:"Multichannel message display",REDMINE_SHOW:"Redmine ticket display",REDMINE_CREATE:"Redmine ticket create",PERSONS_EXPORT:"Export people",SOCIOECONOMICLEVEL_SHOW:"Socioeconomic level display",LIVINGPLACETYPE_SHOW:"Living place type display",COMPANY_EXPORT:"Export companies",REDMINE_UPDATE:"Redmine Update",REDMINE_DELETE:"Redmine Delete",AUDIT_CREATE:"Audit create",AUDIT_MENU:"Audits menu display",AUDIT_SHOW:"Audit display"}}},es:{role:{role:"rol",roles:"roles",title:"Administración de Roles",subtitle:"Ver, buscar, crear, editar, y borrar roles del sistema",description:"Ver, buscar, crear, editar, y borrar roles del sistema",deleteTitle:"Borrando role",createTitle:"Creando rol",updateTitle:"Editando rol",copyTitle:"Copiando rol",copy:"Copiar",created:"Rol creado",updated:"Rol actualizado",deleted:"Rol eliminado",roleNameAlreadyTaken:"Ya existe un rol con ese nombre",showTitle:"Roles y Permisos",permission:"Permiso",rolDuplicate:"Rol ya Existente",noChildRoles:"Sin roles hijos",label:{name:"Nombre",childRoles:"Roles hijos",permissions:"Permisos"},permissions:{SECURITY_USER_CREATE:"Creación de usuarios",SECURITY_USER_EDIT:"Edición de usuarios",SECURITY_USER_DELETE:"Eliminación de usuarios",SECURITY_USER_SHOW:"Visualización de usuarios",SECURITY_GROUP_CREATE:"Creación de grupos",SECURITY_GROUP_EDIT:"Edición de grupos",SECURITY_GROUP_DELETE:"Eliminación de grupos",SECURITY_GROUP_SHOW:"Visualización de grupos",SECURITY_ROLE_SHOW:"Visualización de roles",SECURITY_ROLE_SHOW_CHILD:"Visualización de roles hijos",SECURITY_ROLE_CREATE:"Creación de roles",SECURITY_ROLE_EDIT:"Edición de roles",SECURITY_ROLE_DELETE:"Eliminación de roles",SECURITY_DASHBOARD_SHOW:"Visualización de panel de administración",SECURITY_ADMIN_MENU:"Visualización de menu de administración",ENVIRONMENTVARIABLE_SHOW:"Visualización de variables de entorno",ENVIRONMENTVARIABLE_UPDATE:"Edición de variables de entorno",ENVIRONMENTVARIABLE_CREATE:"Creación de variables de entorno",ENVIRONMENTVARIABLE_DELETE:"Eliminación de variables de entorno",CAMPAIGN_CREATE:"Creación de campañas",CAMPAIGN_SHOW:"Visualización de campañas",CAMPAIGN_UPDATE:"Edición de campañas",CAMPAIGN_DELETE:"Eliminación de campañas",CUSTOMFIELDS_SHOW:"Visualización de campos personalizables",CUSTOMFIELDS_UPDATE:"Edición de campos personalizables",CUSTOMFIELDS_CREATE:"Creación de campos personalizables",CUSTOMFIELDS_DELETE:"Eliminación de campos personalizables",PERSON_SHOW:"Visualización de personas",PERSON_UPDATE:"Edición de personas",PERSON_DELETE:"Eliminación de personas",PERSON_CREATE:"Creación de personas",IMPORT_CSV:"Importar CSV",SOCIOECONOMICLEVEL_UPDATE:"Edición de nivel socioeconomico",SOCIOECONOMICLEVEL_CREATE:"Creación de nivel socioeconomico",LIVINGPLACETYPE_UPDATE:"Edición de tipo de vivienda",SOCIOECONOMICLEVEL_DELETE:"Eliminación de nivel socioeconomico",LIVINGPLACETYPE_CREATE:"Creación de tipo de vivienda",LIVINGPLACETYPE_DELETE:"Eliminación de tipo de vivienda",CATEGORYCOMPANY_SHOW:"Visualización de categorias de empresa",CATEGORYCOMPANY_CREATE:"Creación de categorias de empresa",CATEGORYCOMPANY_DELETE:"Eliminación de categorias de empresa",CATEGORYCOMPANY_UPDATE:"Edición de categorias de empresa",COMPANY_CREATE:"Creación de empresas",COMPANY_DELETE:"Eliminación de empresas",COMPANY_UPDATE:"Edición de empresas",COMPANY_SHOW:"Visualización de empresas",MT_SMS_BY_CMP:"MT por CMP",INTERACTIONS_EXPORT:"Exportar interacciones",CAMPAIGN_EXPORT:"Exportar campañas",CAMPAIGN_UPLOADAUDIO:"Cargar audio de campaña",SHOW_MULTICHANNEL_MSG:"Visualización mensaje Multichannel",REDMINE_SHOW:"Visualización tickets Redmine",REDMINE_CREATE:"Creacion tickets Redmine",PERSONS_EXPORT:"Exportar personas",SOCIOECONOMICLEVEL_SHOW:"Visualización nivel socioeconomico",LIVINGPLACETYPE_SHOW:"Visualización tipo de vivienda",COMPANY_EXPORT:"Exportar empresas",REDMINE_UPDATE:"Edición de Redmine",REDMINE_DELETE:"Eliminación de Redmine",AUDIT_CREATE:"Creación de Auditoria",AUDIT_MENU:"Visualizacion de menu de auditorias",AUDIT_SHOW:"Visualización de Auditoria"}}},pt:{role:{role:"rol",roles:"roles",title:"Administração de função",subtitle:"Ver, buscar, criar, editar e usar função del sistema",description:"Ver, buscar, criar, editar e usar função del sistema",deleteTitle:"Eliminar role",createTitle:"Criando função",updateTitle:"Atualizando função",copyTitle:"Copiando função",copy:"Copiar",created:"Função criado",updated:"Função atualizado",deleted:"Função removido",roleNameAlreadyTaken:"O nome da função já existe",showTitle:"Funções e Permissões",permission:"Permissão",rolDuplicate:"Função duplicada",noChildRoles:"Sem funções filhas",label:{name:"Nome",childRoles:"Funções filhas",permissions:"Permissões"},permissions:{SECURITY_USER_CREATE:"Criação do usuário",SECURITY_USER_EDIT:"Edição do usuário",SECURITY_USER_DELETE:"exclusão do usuário",SECURITY_USER_SHOW:"Visualização do usuário",SECURITY_GROUP_CREATE:"Criação em grupos",SECURITY_GROUP_EDIT:"Edição em grupos",SECURITY_GROUP_DELETE:"Exclusão em grupos",SECURITY_GROUP_SHOW:"Visualização em grupos",SECURITY_ROLE_SHOW:"Visualização de roles",SECURITY_ROLE_SHOW_CHILD:"Visualização de roles crianças",SECURITY_ROLE_CREATE:"Criação de roles",SECURITY_ROLE_EDIT:"Edição de roles",SECURITY_ROLE_DELETE:"Exclusão de roles",SECURITY_DASHBOARD_SHOW:"Visor do painel de segurança",SECURITY_ADMIN_MENU:"Visor do menu de segurança",ENVIRONMENTVARIABLE_SHOW:"Visor do Variáveis ​​ambientais",ENVIRONMENTVARIABLE_UPDATE:"Edição em Variáveis ​​ambientais",ENVIRONMENTVARIABLE_CREATE:"Criação em Variáveis ​​ambientais",ENVIRONMENTVARIABLE_DELETE:"Exclusão em Variáveis ​​ambientais",CAMPAIGN_CREATE:"Criação em Campanha",CAMPAIGN_SHOW:"Visor do Campanha",CAMPAIGN_UPDATE:"Edição em Campanha",CAMPAIGN_DELETE:"Exclusão em Campanha",CUSTOMFIELDS_SHOW:"Visor do Campo customizado",CUSTOMFIELDS_UPDATE:"Edição em Campo customizado",CUSTOMFIELDS_CREATE:"Criação em Campo customizado",CUSTOMFIELDS_DELETE:"Exclusão em Campo customizado",PERSON_SHOW:"Visor do pessoa",PERSON_UPDATE:"Edição em pessoa",PERSON_DELETE:"Exclusão em pessoa",PERSON_CREATE:"Criação em pessoa",IMPORT_CSV:"Importar CSV",SOCIOECONOMICLEVEL_UPDATE:"Edição em nível socioeconômico",SOCIOECONOMICLEVEL_CREATE:"Criação em nível socioeconômico",LIVINGPLACETYPE_UPDATE:"Edição em tipo de moradia",SOCIOECONOMICLEVEL_DELETE:"Exclusão em nível socioeconômico",LIVINGPLACETYPE_CREATE:"Criação em tipo de moradia",LIVINGPLACETYPE_DELETE:"Exclusão em tipo de moradia",CATEGORYCOMPANY_SHOW:"Visor do categoria empresa",CATEGORYCOMPANY_CREATE:"Criação em categoria empresa",CATEGORYCOMPANY_DELETE:"Exclusão em categoria empresa",CATEGORYCOMPANY_UPDATE:"Edição em categoria empresa",COMPANY_CREATE:"Criação em empresa",COMPANY_DELETE:"Exclusão em empresa",COMPANY_UPDATE:"Edição em empresa",COMPANY_SHOW:"Visor do empresa",MT_SMS_BY_CMP:"MT por CMP",INTERACTIONS_EXPORT:"Exportar interações",CAMPAIGN_EXPORT:"Exportar campanhas",CAMPAIGN_UPLOADAUDIO:"Carregar áudio da campanha",SHOW_MULTICHANNEL_MSG:"Exibição de mensagem Multichannel",REDMINE_SHOW:"Visor de tíquetes do Redmine",REDMINE_CREATE:"Criação de tíquete Redmine",PERSONS_EXPORT:"Exportar pessoa",SOCIOECONOMICLEVEL_SHOW:"Visor de nível socioeconômico",LIVINGPLACETYPE_SHOW:"Exibição do tipo de moradia",COMPANY_EXPORT:"Exportar empresas",REDMINE_UPDATE:"Edição do Redmine",REDMINE_DELETE:"Exclusão do Redmine",AUDIT_CREATE:"Criação de Auditoria",AUDIT_MENU:"Exibição do menu de auditoria",AUDIT_SHOW:"Visor de Auditoria"}}}},rf={en:{auth:{badCredentials:"Bad credentials",signIn:"Sign in",signUp:"sign up",logout:"Logout",profile:"Profile",createAccount:"Create an account",stillNotUser:"Still you do not have user? ",alreadyAccount:"Do you already have an account? ",forgotPassword:"Forgot your password? ",activationSent:"We have sent an email to {email} to validate and complete the creation of your account.",activatingUser:"Activating User. Please Wait.",activationSuccessful:"Activation successful",invalidToken:"The token is invalid or has expired",passwordRecovery:"Password recovery",recoverySent:"We have sent an email to {email} with the steps to recover the password",recoverySuccess:"Password recovery successful",changePasswordSuccessfully:"Password changed successfully",wrongPassword:"Wrong Password",validatingToken:"Validating Token",messagePasswordIsEqual:"New password must be different from the current password",changePassword:"Change Password",passwordChanged:"Password changed successfully"}},es:{auth:{badCredentials:"Credenciales Invalidas",signIn:"Iniciar sesión",signUp:"Registrarse",logout:"Cerrar sesión",profile:"Perfil",createAccount:"Crear una cuenta",stillNotUser:"Aun no tienes usuario? ",alreadyAccount:"Ya tienes una cuenta? ",forgotPassword:"Olvido su contraseña? ",activationSent:"Hemos enviado un correo a {email} para validar y finalizar la creación de su cuenta.",activatingUser:"Activando Usuario. Por favor espere.",activationSuccessful:"Activación exitosa",invalidToken:"El token es inválido o ha expirado",passwordRecovery:"Recuperación de contraseña",recoverySent:"Hemos enviado un correo a {email} con los pasos para recuperar la contraseña",recoverySuccess:"Recuperación de contraseña exitosa",changePasswordSuccessfully:"contraseña modificada con exito",wrongPassword:"Contraseña incorrecta",validatingToken:"Validando Token",messagePasswordIsEqual:"La contraseña nueva debe ser diferente de la actual",changePassword:"Cambiar contraseña",passwordChanged:"Contraseña modificada con exito"}},pt:{auth:{badCredentials:"Credenciais ruins",signIn:"Assinar em",signUp:"Inscrever-se",logout:"Fechar Sessão",profile:"Perfil",createAccount:"Criar uma conta",stillNotUser:"Você ainda não tem um usuário? ",alreadyAccount:"Você já tem uma conta? ",forgotPassword:"Esqueceu sua senha? ",activationSent:"Enviamos um email para {email} para validar e concluir a criação da sua conta.",activatingUser:"Ativando Usuário. Por favor espere.",activationSuccessful:"Ativação bem sucedida",invalidToken:"O token é inválido ou expirou",passwordRecovery:"Recuperação de senha",recoverySent:"Enviamos um email para {email} com as etapas para recuperar a senha",recoverySuccess:"Recuperação de senha bem-sucedida",changePasswordSuccessfully:"Senha modificada com sucesso",wrongPassword:"Senha incorreta",validatingToken:"Token de validação",messagePasswordIsEqual:"A nova senha deve ser diferente da senha atual",changePassword:"Alterar senha",passwordChanged:"Senha modificada com sucesso"}}},lf={en:{user:{audit:{userAudit:"User audit",when:"When",actionBy:"Action By",actionFor:"Action For",action:"Action",today:"Today",yesterday:"Yesterday",userRecoveryPasswordChange:"user {username} has recovered his password",userPasswordChange:"user {username} has modified his password",adminPasswordChange:"user {username}'s password was changed by administrator",changePasswordAdmin:"user {username}'s password was changed by administrator",userCreated:"user {username} has been created",userModified:"user {username} has been modified",userDeleted:"user {username} has been deleted",userRestored:"user {username} has been restored",passwordRecovery:"user {username} has requested to recover password",userRegistered:"user {username} has registered",userActivated:"user {username} has activated his account",avatarChange:"user {username} has modified his avatar",failedLogins:"Failed logins",nofailedLogins:"No failed logins "}}},es:{user:{audit:{userAudit:"Auditoria de usuario",when:"Cuando",actionBy:"Acción Por",actionFor:"Acción Para",action:"Acción",today:"Hoy",yesterday:"ayer",userRecoveryPasswordChange:"usuario {username} ha recuperado su contraseña",userPasswordChange:"usuario {username} ha modificado su contraseña",adminPasswordChange:"la contraseña de {username} fue modificada por administrator",changePasswordAdmin:"la contraseña de {username} fue modificada por administrator",userCreated:"usuario {username} ha sido creado",userModified:"usuario {username} ha sido modificado",userDeleted:"usuario {username} ha sido borrado",userRestored:"usuario {username} ha sido restaurado",passwordRecovery:"usuario {username} ha solicitado recuperar su contraseña",userRegistered:"usuario {username} se ha registrado",userActivated:"usuario {username} ha activado su cuenta",avatarChange:"usuario {username} ha modificado su avatar",failedLogins:"Inicios de sesión fallidos",nofailedLogins:"Sin inicios de sesión fallidos"}}},pt:{user:{audit:{userAudit:"Auditoria de Usuário",when:"Quando",actionBy:"Ação por",actionFor:"Ação Para",action:"Ação",today:"hoje",yesterday:"ontem",userRecoveryPasswordChange:"O usuário {username} recuperou sua senha",userPasswordChange:"Usuário {username} mudou sua senha",adminPasswordChange:"a senha de {username} foi alterada pelo administrador",changePasswordAdmin:"a senha de {username} foi alterada pelo administrador",userCreated:"Usuário {username} foi criado",userModified:"Usuário {username} foi modificado",userDeleted:"Usuário {username} foi excluído",userRestored:"Usuário {username} foi restaurado",passwordRecovery:"Usuário {username} solicitou recuperar sua senha",userRegistered:"Usuário {username} se cadastrou",userActivated:"Usuário {username} ativou sua conta",avatarChange:"Usuário {username} mudou sua avatar",failedLogins:"Logins com falha",nofailedLogins:"Sem logins com falha"}}}},df={en:{user:{metrics:{loginFailed:"Logins Failed",noLoginFail:"No failed login found",sessionsByUser:"Users sessions",sessionsByDeviceType:"Device type sessions",sessionsByOs:"OS sessions",sessionsByClient:"Client sessions",sessionsByCity:"City sessions",sessionsByCountry:"Country sessions",duration:"Duration",sessions:"Sessions",request:"Request",avg:"Avg",min:"Min",max:"Max",sum:"Sum",last:"Last",qty:"Qty",attempts:"Attempts"}}},es:{user:{metrics:{loginFailed:"Logins fallidos",noLoginFail:"No se encontraron inicios fallidos",sessionsByUser:"Sesiones por usuario",sessionsByDeviceType:"Sesiones por Dispositivo",sessionsByOs:"Sesiones por SO",sessionsByClient:"Sesiones por Cliente",sessionsByCity:"Sesiones por Ciudad",sessionsByCountry:"Sesiones por País",duration:"Duración",sessions:"Sesión",request:"Solicitud",avg:"Prom",min:"Min",max:"Max",sum:"Sum",last:"Últ",qty:"Cant",attempts:"Intentos"}}},pt:{user:{metrics:{loginFailed:"Falha no login",noLoginFail:"Nenhum login com falha encontrado",sessionsByUser:"Sessões por usuário",sessionsByDeviceType:"Sessões por Dispositivo",sessionsByOs:"Sessões por SO",sessionsByClient:"Sessões por cliente",sessionsByCity:"Sessões por cidade",sessionsByCountry:"Sessões por país",duration:"Duração",sessions:"Sessão",request:"Solicitação",avg:"Med",sum:"Sum",min:"Min",max:"Max",last:"Últ",qty:"Quant",attempts:"Tentativas"}}}},cf={en:{session:{card:{summaryByUser:"Summary user sessions",sessionsByDeviceType:"Device type sessions",sessionsByOs:"OS sessions",sessionsByClient:"Client sessions",sessionsByCity:"City sessions",sessionsByCountry:"Country sessions"}}},es:{session:{card:{summaryByUser:"Resumen sesiones de usuario",sessionsByDeviceType:"Sesiones por Dispositivo",sessionsByOs:"Sesiones por SO",sessionsByClient:"Sesiones por Cliente",sessionsByCity:"Sesiones por Ciudad",sessionsByCountry:"Sesiones por País"}}},pt:{session:{card:{summaryByUser:"Resumo de sessões do usuário",sessionsByDeviceType:"Sessões por Dispositivo",sessionsByOs:"Sessões por SO",sessionsByClient:"Sessões por cliente",sessionsByCity:"Sessões por cidade",sessionsByCountry:"Sessões por país"}}}},uf={en:{validation:{required:"Field Required",unique:"Field must be unique",emailFormat:"The email has an invalid format",passwordRequirements:"The password does not meet the requirements",onlyLetters:"Only letters",invalidHexColor:"Invalid hex color"}},es:{validation:{required:"Campo requerido",unique:"El campo debe ser unico",emailFormat:"El email tiene un formato invalido",passwordRequirements:"La password no cumple con los requisitos",onlyLetters:"Solo letras",invalidHexColor:"Hex invalido"}},pt:{validation:{required:"Campo requerido",unique:"O campo deve ser exclusivo",emailFormat:"O email tem um formato inválido",passwordRequirements:"A senha não atende aos requisitos",onlyLetters:"Apenas letras",invalidHexColor:"Hex invalido"}}},mf={en:{error:{MAX_FILE_SIZE_EXCEEDED:"Maxium file size exceeded",MIMETYPE_NOT_ALLOWED:"File type not allowed"}},es:{error:{MAX_FILE_SIZE_EXCEEDED:"Se superó el tamaño máximo de archivo",MIMETYPE_NOT_ALLOWED:"Tipo de archivo no permitido"}},pt:{error:{MAX_FILE_SIZE_EXCEEDED:"Tamanho máximo do arquivo excedido",MIMETYPE_NOT_ALLOWED:"Tipo de arquivo não permitido"}}},ff={en:{client:{error:{unauthenticated:"Authentication required",forbidden:"Forbidden",validation:"Validation Errors",networkError:"Network error. The server does not respond.",unexpectedError:"An unexpected error has occurred"}}},es:{client:{error:{unauthenticated:"Autenticación requerida",forbidden:"Prohibido",validation:"Error de validación.",networkError:"Error de Red. El servidor no responde",unexpectedError:"Ha ocurrido un error inesperado"}}},pt:{client:{error:{unauthenticated:"Authentication required",forbidden:"Forbidden",validationError:"Validation Error",networkError:"networkError",unexpectedError:"Ocorreu um erro inesperado"}}}},hf={en:{user:{doc:{title:"User Manual",subtitle:"Access and Security",swagger:"See REST API (Swagger)"}}},es:{user:{doc:{title:"Manual de Usuario",subtitle:"Acceso y Seguridad",swagger:"Ver API REST (Swagger)"}}},pt:{user:{doc:{title:"Manual do Usuário",subtitle:"Acesso e Segurança",swagger:"Ver API REST (Swagger)"}}}};jt.all([nf,sf,of,rf,lf,df,cf,uf,mf,ff,hf]),{...ne.mapGetters(["isAuth","me"])};const Yt=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t},Fa=Yt({__name:"FileForm",props:{modelValue:{type:Object,required:!0},creating:{type:Boolean,default:!1},updating:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},oldFileExtension:{type:String}},emits:["update:modelValue","fileSelected","save"],setup(i,{expose:e,emit:t}){const a=i,s=t,{t:o}=se.useI18n(),r=n.ref(null),l=n.ref(null),d=n.ref(null),c=n.computed({get(){return a.modelValue},set(g){s("update:modelValue",g)}}),u=n.computed(()=>{if(c.value.expirationDate){const g=G(),h=G(c.value.expirationDate);return h.isValid()?h.diff(g,"day"):null}return null}),f=n.computed(()=>[()=>u.value===null?!0:u.value<0?o("media.userStorage.fileExpirationTimeOlderThanToday"):l.value&&u.value!==null?u.value<=l.value||`${o("media.userStorage.fileExpirationLimitExceeded")} ${l.value} ${o("media.file.days")}`:!0]),m=async()=>{if(d.value){const{valid:g}=await d.value.validate();return g}return!1},p=g=>{s("fileSelected",g)},k=()=>We.findUserStorageByUser().then(g=>{g.data.userStorageFindByUser&&g.data.userStorageFindByUser.maxFileSize&&(r.value=g.data.userStorageFindByUser.maxFileSize,l.value=g.data.userStorageFindByUser.fileExpirationTime)}).catch(g=>console.error(g));return n.onMounted(()=>{k()}),e({validate:m}),(g,h)=>(n.openBlock(),n.createBlock($a.VForm,{ref_key:"formRef",ref:d,autocomplete:"off",onSubmit:h[6]||(h[6]=n.withModifiers(y=>g.$emit("save"),["prevent"]))},{default:n.withCtx(()=>[n.createVNode(O.VRow,{class:"mt-2"},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",md:"6",sm:"12"},{default:n.withCtx(()=>[n.createVNode(Y.VCard,{variant:"outlined",color:"secondary",class:"pa-2"},{default:n.withCtx(()=>[n.createVNode(n.unref(rn),{modelValue:c.value.expirationDate,"onUpdate:modelValue":h[0]||(h[0]=y=>c.value.expirationDate=y),label:g.$t("media.file.expirationDate"),"prepend-inner-icon":"mdi-calendar-clock","persistent-hint":"",color:"secondary",variant:"filled",density:"comfortable",rules:f.value},null,8,["modelValue","label","rules"]),h[7]||(h[7]=n.createElementVNode("div",{class:"text-caption mt-1 px-2 text-grey-darken-1"}," La fecha y hora en que el archivo será eliminado automáticamente. ",-1))]),_:1})]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",sm:"12"},{default:n.withCtx(()=>[n.createVNode(rt.VSelect,{"prepend-inner-icon":"mdi-eye",modelValue:c.value.isPublic,"onUpdate:modelValue":h[1]||(h[1]=y=>c.value.isPublic=y),items:[{title:"Público",value:!0},{title:"Privado",value:!1}],label:g.$t("media.file.visibility"),variant:"underlined",density:"compact"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"12",md:"12"},{default:n.withCtx(()=>[n.createVNode(Ua.VCombobox,{"prepend-inner-icon":"mdi-tag-multiple",modelValue:c.value.tags,"onUpdate:modelValue":h[2]||(h[2]=y=>c.value.tags=y),label:g.$t("media.file.tags"),chips:"",multiple:"",color:"secondary",variant:"underlined",density:"compact"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"12"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{"prepend-inner-icon":"mdi-text-box",name:"filename",modelValue:c.value.description,"onUpdate:modelValue":h[3]||(h[3]=y=>c.value.description=y),label:g.$t("media.file.description"),placeholder:g.$t("media.file.description"),color:"secondary",variant:"underlined",density:"compact"},null,8,["modelValue","label","placeholder"])]),_:1}),n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[n.createVNode(n.unref(ro),{modelValue:c.value.groups,"onUpdate:modelValue":h[4]||(h[4]=y=>c.value.groups=y),multiple:"",label:"media.file.groups"},null,8,["modelValue"])]),_:1}),n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[n.createVNode(n.unref(Pi),{modelValue:c.value.users,"onUpdate:modelValue":h[5]||(h[5]=y=>c.value.users=y),multiple:"",label:"media.file.users"},null,8,["modelValue"])]),_:1}),i.creating||i.updating?(n.openBlock(),n.createBlock(O.VCol,{key:0,cols:"12","align-self":"center",class:"text-center mt-4"},{default:n.withCtx(()=>[n.createVNode(Pe.VDivider,{class:"mb-4"}),n.createVNode(n.unref(ln),{updating:i.updating,onFileSelected:p,"max-file-size":r.value,loading:i.loading,"old-file-extension":i.oldFileExtension},null,8,["updating","max-file-size","loading","old-file-extension"])]),_:1})):n.createCommentVNode("",!0)]),_:1})]),_:1},512))}},[["__scopeId","data-v-6a00e54a"]]),ho={__name:"FileUpdate",props:{open:{type:Boolean,default:!0},item:{type:Object,required:!0}},emits:["close","itemUpdated"],setup(i,{emit:e}){const t=i,a=e,s=n.ref("media.file.editing"),o=n.ref(""),r=n.ref({}),l=n.ref(!1),d=n.ref({id:t.item.id,description:t.item.description,tags:t.item.tags,expirationDate:t.item.expirationDate,isPublic:t.item.isPublic?t.item.isPublic:!1,groups:t.item.groups?t.item.groups:[],users:t.item.users?t.item.users:[]}),c=n.ref(null),u=n.ref(t.item.extension),f=n.ref(null),m=n.ref(!1),p=n.ref(null),k=n.computed(()=>JSON.stringify(d.value)!==JSON.stringify(f.value)),g=n.computed(()=>k.value||m.value);n.onBeforeMount(()=>{f.value=JSON.parse(JSON.stringify(d.value))});const h=()=>{p.value?.validate()&&(l.value=!0,xt.updateFile(d.value,c.value).then(v=>{v&&(a("itemUpdated",v.data.fileUpdate),a("close"))}).catch(v=>{let A=new Zt(v);r.value=A.inputErrors,o.value=A.i18nMessage}).finally(()=>l.value=!1))},y=v=>{v?"."+v.name.split(".").pop()==u.value&&(c.value=v,m.value=!0):(c.value=null,m.value=!1)};return(v,A)=>(n.openBlock(),n.createBlock(n.unref(Wa),{open:i.open,loading:l.value,title:s.value,"error-message":o.value,"disable-submit":!g.value,onUpdate:h,onClose:A[1]||(A[1]=w=>v.$emit("close"))},{default:n.withCtx(()=>[n.createVNode(Y.VCard,{flat:"",class:"mb-3"},{default:n.withCtx(()=>[n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.createVNode(n.unref(Fa),{updating:"","old-file-extension":u.value,ref_key:"formRef",ref:p,modelValue:d.value,"onUpdate:modelValue":A[0]||(A[0]=w=>d.value=w),"input-errors":r.value,onFileSelected:y,onSave:h},null,8,["old-file-extension","modelValue","input-errors"])]),_:1})]),_:1})]),_:1},8,["open","loading","title","error-message","disable-submit"]))}},pf={__name:"FileShowData",props:{item:{type:Object,required:!0}},setup(i){return(e,t)=>(n.openBlock(),n.createBlock(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"6",md:"4"},{default:n.withCtx(()=>[n.createVNode(ue.VList,null,{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.item.filename,label:e.$t("media.file.filename"),icon:"mdi-text-box"},null,8,["model-value","label"]),n.createVNode(n.unref(ke),{"model-value":i.item.absolutePath,label:e.$t("media.file.absolutePath"),icon:"mdi-folder"},null,8,["model-value","label"]),n.createVNode(n.unref(ke),{"model-value":i.item.createdAt,label:e.$t("media.file.createdAt"),icon:"mdi-calendar"},null,8,["model-value","label"])]),_:1})]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"4"},{default:n.withCtx(()=>[n.createVNode(ue.VList,null,{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.item.extension,label:e.$t("media.file.extension"),icon:"mdi-file"},null,8,["model-value","label"]),n.createVNode(n.unref(ke),{"model-value":i.item.size.toString(),label:e.$t("media.file.size"),icon:"mdi-image-size-select-actual"},null,8,["model-value","label"]),n.createVNode(n.unref(ke),{"model-value":i.item.createdBy?.user?.name,label:e.$t("media.file.createdBy"),icon:"mdi-account-circle"},null,8,["model-value","label"])]),_:1})]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"4"},{default:n.withCtx(()=>[n.createVNode(ue.VList,null,{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.item.relativePath,label:e.$t("media.file.relativePath"),icon:"mdi-folder-open"},null,8,["model-value","label"]),n.createVNode(n.unref(ke),{"model-value":i.item.url,label:e.$t("media.file.url"),icon:"mdi-link"},null,8,["model-value","label"])]),_:1})]),_:1})]),_:1}))}},gf={class:"title"},po={__name:"FileDelete",props:{open:{type:Boolean,default:!0},item:{type:Object,required:!0}},emits:["close","itemDeleted"],setup(i,{emit:e}){const t=i,a=e,{t:s}=se.useI18n();n.ref(!1);const o=n.ref("media.file.deleting"),r=n.ref(s("common.areYouSureDeleteRecord")),l=n.ref(""),d=n.ref(!1),c=()=>{d.value=!0,xt.deleteFile(t.item.id).then(u=>{u.data.fileDelete.success?(a("itemDeleted",u.data.fileDelete),a("close")):l.value="Error on Delete"}).catch(u=>{let f=new Zt(u);l.value=f.showMessage}).finally(()=>d.value=!1)};return(u,f)=>(n.openBlock(),n.createBlock(n.unref(rr),{open:i.open,loading:d.value,title:o.value,"error-message":l.value,onDelete:c,onClose:f[0]||(f[0]=m=>u.$emit("close"))},{default:n.withCtx(()=>[n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.createVNode(n.unref(pf),{item:i.item},null,8,["item"])]),_:1}),n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.createVNode(O.VRow,{justify:"center"},{default:n.withCtx(()=>[n.createElementVNode("span",gf,n.toDisplayString(r.value),1)]),_:1})]),_:1})]),_:1},8,["open","loading","title","error-message"]))}},go=globalThis||void 0||self,kf={id:"app",class:"pdfViewer"},yf={class:"app-header"},bf={key:1,class:"d-flex"},vf={__name:"PdfWebViewer",props:{url:{type:String},width:{type:String}},setup(i){go.Buffer=go.Buffer||To.Buffer;const e=i,t=ne.useStore(),a=n.ref(e.url),s=n.ref(1),o=n.ref(null),r=n.ref(!0),l=n.ref(null),d=n.computed(()=>t.getters.me),c=()=>{r.value=!1,o.value=l.value.pageCount},u=()=>{d.value?.role?.permissions.includes("FILE_SHOW_OWN")||(window.onbeforeprint=()=>{let f=window.location.href;window.location.href=f,alert("No tiene permisos para imprimir")})};return watch(()=>e.url,f=>{a.value=f}),n.onMounted(()=>{u()}),(f,m)=>(n.openBlock(),n.createElementBlock("div",kf,[n.createElementVNode("div",yf,[r.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(" Loading... ")],64)):(n.openBlock(),n.createElementBlock("span",bf,[n.createVNode(O.VSpacer),n.createVNode(H.VBtn,{disabled:s.value<=1,onClick:m[0]||(m[0]=p=>s.value--)},{default:n.withCtx(()=>[...m[2]||(m[2]=[n.createTextVNode("❮",-1)])]),_:1},8,["disabled"]),n.createVNode(O.VSpacer),n.createTextVNode(" "+n.toDisplayString(s.value)+" / "+n.toDisplayString(o.value)+" ",1),n.createVNode(O.VSpacer),n.createVNode(H.VBtn,{disabled:s.value>=o.value,onClick:m[1]||(m[1]=p=>s.value++)},{default:n.withCtx(()=>[...m[3]||(m[3]=[n.createTextVNode("❯",-1)])]),_:1},8,["disabled"]),n.createVNode(O.VSpacer)]))]),n.createVNode(Y.VCard,{height:"100%",flat:""},{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(n.unref(Fo),{ref_key:"pdfRef",ref:l,source:a.value,page:s.value,onRendered:c},null,8,["source","page"])]),_:1})]))}},Af={__name:"GroupsShow",props:{fileIdGroups:{type:Array}},setup(i){const e=i,t=n.ref([]),a=n.ref("");return n.onMounted(()=>{oo.groups().then(s=>{if(e.fileIdGroups)if(t.value=s.data.groups.filter(o=>e.fileIdGroups.includes(o.id)),t.value.length>1)for(let o=0;o<t.value.length;o++)o==0?a.value+=`${t.value[o].name}`:a.value+=`, ${t.value[o].name}`;else t.value.length==1?a.value=t.value[0].name:a.value="-"})}),(s,o)=>(n.openBlock(),n.createBlock(n.unref(Ri),{chips:t.value,label:s.$t("media.file.groups"),icon:"mdi-account-group"},null,8,["chips","label"]))}},xf={__name:"UsersShow",props:{fileIdUsers:{type:Array}},setup(i){const e=i,t=n.ref([]),a=n.ref("");return n.onMounted(()=>{Mi.users().then(s=>{if(t.value=s.data.users.filter(o=>e.fileIdUsers.includes(o.id)),t.value.length>1)for(let o=0;o<t.value.length;o++)o==0?a.value+=`${t.value[o].name}`:a.value+=`, ${t.value[o].name}`;else t.value.length==1?a.value=t.value[0].name:a.value="-"})}),(s,o)=>(n.openBlock(),n.createBlock(n.unref(Ri),{chips:t.value,label:s.$t("media.file.users"),icon:"mdi-account"},null,8,["chips","label"]))}},Nf={__name:"CsvWebViewer",props:{url:{type:String}},setup(i){const{t:e}=se.useI18n(),t=i,a=n.ref([]),s=n.ref([]),o=n.ref(""),r=n.ref(""),l=n.ref(3e3),d=n.ref("No se pudo procesar la información del csv. Por favor intente nuevamente más tarde!"),c=n.computed(()=>s.value.length>10),u=()=>{Mo.parse(t.url,{download:!0,delimiter:"",header:!0,skipEmptyLines:!0,complete:function(f){f.errors.length==0?(f.meta.fields.forEach(m=>{let p=m.length*6;f.data.forEach(g=>{p<(g[m]?.length||0)*6&&(p=(g[m]?.length||0)*6)});const k={title:m,value:m,width:p};a.value.push(k)}),s.value=f.data):(o.value="error",r.value=e("media.file.errorCsvMessage"),console.log("Error al parsear el archivo csv, error: ",f.errors[0]))}})};return n.onMounted(()=>{u()}),(f,m)=>(n.openBlock(),n.createElementBlock("div",null,[n.createVNode(bt.VDataTable,{class:"mx-auto elevation-1",height:"50vh","fixed-header":"","hide-default-footer":!c.value,"items-per-page":10,"disable-pagination":!c.value,headers:a.value,items:s.value,"no-data-text":d.value},null,8,["hide-default-footer","disable-pagination","headers","items","no-data-text"]),n.createVNode(n.unref(Ii),{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>r.value=p),m[1]||(m[1]=p=>!p&&(r.value=null))],color:o.value,timeout:l.value},null,8,["modelValue","color","timeout"])]))}},Sf={__name:"XlsxWebViewer",props:{url:{type:String}},setup(i){const e=i,t=n.ref([]),a=n.ref([]),s=n.ref(""),o=n.ref(""),r=n.ref(3e3),l=n.ref("No se pudo procesar la información del xlsx. Por favor intente nuevamente más tarde!"),d=n.computed(()=>a.value.length>10),c=async()=>{try{const f=await(await fetch(e.url)).arrayBuffer(),m=Ya.read(new Uint8Array(f,{type:"array"})),p=Ya.utils.sheet_to_json(m.Sheets[m.SheetNames[0]]);p.length<0?l.value="No existen datos en este registro":p.forEach((k,g)=>{g===0&&Object.keys(k).forEach(h=>{let y=h?.length*6;p.forEach(v=>{y<(v[h]?.length||0)*6&&(y=(v[h]?.length||0)*6)}),t.value.push({width:y,title:h,value:h,sortable:!1})}),a.value.push(k)})}catch(u){l.value=`Error al parsear el archivo xlsx, error: ${u}`}};return n.onMounted(()=>{c()}),(u,f)=>(n.openBlock(),n.createElementBlock("div",null,[n.createVNode(bt.VDataTable,{class:"mx-auto elevation-1",height:"50vh","fixed-header":"","hide-default-footer":!d.value,"items-per-page":10,"disable-pagination":!d.value,headers:t.value,items:a.value,"no-data-text":l.value},null,8,["hide-default-footer","disable-pagination","headers","items","no-data-text"]),n.createVNode(n.unref(Ii),{modelValue:o.value,"onUpdate:modelValue":[f[0]||(f[0]=m=>o.value=m),f[1]||(f[1]=m=>!m&&(o.value=null))],color:s.value,timeout:r.value},null,8,["modelValue","color","timeout"])]))}},Cf={key:0},wf=["src","type"],Ef=["src","type"],_f=["value"],Ma=Yt({__name:"FileView",props:{file:{type:Object}},setup(i){const e=i,{t}=se.useI18n(),a=ne.useStore(),{getDateTimeFormat:s}=Ct(),o=n.ref(!1),r=n.ref(""),l=n.ref(null),d=n.ref(null),c=n.ref(!1),u=n.ref(!1),f=n.computed(()=>!e.file||!e.file.fileReplaces?[]:e.file.fileReplaces.map(N=>({...N,date:B(N.date)}))),m=N=>a.getters.hasPermission(N),p=n.computed(()=>e.file&&e.file.type==="image"),k=n.computed(()=>e.file&&e.file.type==="audio"),g=n.computed(()=>e.file&&e.file.type==="video"),h=n.computed(()=>e.file&&e.file.mimetype==="application/pdf"),y=n.computed(()=>e.file&&e.file.extension===".csv"),v=n.computed(()=>e.file&&e.file.extension===".xlsx"),A=n.computed(()=>e.file.size.toFixed(5)+" MB"),w=n.computed(()=>e.file&&String(e.file.hits)),S=n.computed(()=>e.file.isPublic?"Público":"Privado"),B=N=>s(N,!0),D=async(N=!1)=>{const b=a.state.user.access_token;if(!b||!e.file.url)return null;const x=await fetch(e.file.url,{method:"GET",headers:{Authorization:`Bearer ${b}`},cache:"no-store"});if(!x.ok)throw new Error(`Error fetching file: ${x.status} ${x.statusText}`);const E=await x.blob(),C=E&&E.type?E:new Blob([E],{type:e.file.mimetype||"application/octet-stream"});return N?{response:x,blob:C}:C},T=async()=>{if(!(!e.file||!e.file.url)){c.value=!0,u.value=!1,V();try{const N=await D();if(!N){u.value=!0;return}d.value=URL.createObjectURL(N)}catch(N){console.error("Error loading file as blob:",N),u.value=!0}finally{c.value=!1}}},V=()=>{d.value&&(URL.revokeObjectURL(d.value),d.value=null)},F=async()=>{try{const{response:N,blob:b}=await D(!0);if(!N)return;const x=N.headers.get("content-disposition")||"",C=_(x)||e.file.filename||"download",P=URL.createObjectURL(b),M=document.createElement("a");M.href=P,M.download=C,document.body.appendChild(M),M.click(),document.body.removeChild(M),setTimeout(()=>URL.revokeObjectURL(P),150)}catch(N){console.error("Error downloading file:",N)}},_=N=>{if(!N)return null;const b=N.match(/filename\*?=(?:UTF-8'')?["']?([^;"']+)/i);if(!b)return null;try{return decodeURIComponent(b[1].replace(/["']/g,""))}catch{return b[1].replace(/["']/g,"")}},R=async()=>{if(d.value){window.open(d.value,"_blank");return}try{const N=await D();if(N){const b=URL.createObjectURL(N);window.open(b,"_blank")}}catch(N){console.error("Could not open file in new tab:",N)}},I=async()=>{const N=e.file.url||"";try{await navigator.clipboard.writeText(N),r.value="URL copiada al portapapeles",o.value=!0}catch(b){r.value="Error al copiar la URL",o.value=!0,console.error("Failed to copy to clipboard:",b)}};return n.watch(()=>e.file?.url,(N,b)=>{N!==b&&T()}),n.onMounted(()=>{T()}),n.onBeforeUnmount(()=>{V()}),(N,b)=>i.file?(n.openBlock(),n.createBlock(O.VContainer,{key:0,class:"pt-0 mt-0 mainContainer"},{default:n.withCtx(()=>[n.createVNode(vt.VTabs,{modelValue:l.value,"onUpdate:modelValue":b[0]||(b[0]=x=>l.value=x),color:"primary"},{default:n.withCtx(()=>[n.createVNode(vt.VTab,{value:"previewTab"},{default:n.withCtx(()=>[...b[4]||(b[4]=[n.createTextVNode("Previsualización",-1)])]),_:1}),n.createVNode(vt.VTab,{value:"metadataTab"},{default:n.withCtx(()=>[...b[5]||(b[5]=[n.createTextVNode("Metadata",-1)])]),_:1}),n.createVNode(vt.VTab,{value:"privacyTab"},{default:n.withCtx(()=>[...b[6]||(b[6]=[n.createTextVNode("Privacidad",-1)])]),_:1}),n.createVNode(vt.VTab,{value:"fileHistoryTab"},{default:n.withCtx(()=>[...b[7]||(b[7]=[n.createTextVNode("Historial",-1)])]),_:1})]),_:1},8,["modelValue"]),n.createVNode(Pe.VDivider,{class:"mb-4"}),n.createVNode(At.VWindow,{modelValue:l.value,"onUpdate:modelValue":b[3]||(b[3]=x=>l.value=x)},{default:n.withCtx(()=>[n.createVNode(At.VWindowItem,{value:"previewTab"},{default:n.withCtx(()=>[!p.value&&!k.value&&!g.value&&!h.value?(n.openBlock(),n.createElementBlock("div",Cf,[y.value&&d.value?(n.openBlock(),n.createBlock(n.unref(Nf),{key:0,url:d.value},null,8,["url"])):n.createCommentVNode("",!0),v.value&&d.value?(n.openBlock(),n.createBlock(n.unref(Sf),{key:1,url:d.value},null,8,["url"])):n.createCommentVNode("",!0),m("FILE_DOWNLOAD")?(n.openBlock(),n.createBlock(H.VBtn,{key:2,block:"",onClick:F,class:"text-uppercase mb-2",color:"success"},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,{icon:"mdi-arrow-down-bold-circle"}),n.createTextVNode(" "+n.toDisplayString(N.$t("media.file.download")),1)]),_:1})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),p.value&&d.value?(n.openBlock(),n.createBlock(dt.VImg,{key:1,src:d.value,width:"100%"},null,8,["src"])):n.createCommentVNode("",!0),k.value&&d.value?(n.openBlock(),n.createElementBlock("audio",{key:2,controls:"",src:d.value,type:i.file.mimetype,width:"100%"},null,8,wf)):n.createCommentVNode("",!0),g.value&&d.value?(n.openBlock(),n.createElementBlock("video",{key:3,width:"100%",controls:"",src:d.value,type:i.file.mimetype},null,8,Ef)):n.createCommentVNode("",!0),n.createVNode(O.VContainer,{fluid:""},{default:n.withCtx(()=>[u.value?(n.openBlock(),n.createBlock($e.VAlert,{key:0,type:"error",density:"compact"},{default:n.withCtx(()=>[...b[8]||(b[8]=[n.createTextVNode(" Error al cargar el archivo (CORS o permisos). ",-1)])]),_:1})):n.createCommentVNode("",!0),h.value&&d.value?(n.openBlock(),n.createBlock(n.unref(vf),{key:1,url:d.value,style:{"max-height":"50vh",overflow:"auto"}},null,8,["url"])):n.createCommentVNode("",!0)]),_:1})]),_:1}),n.createVNode(At.VWindowItem,{value:"metadataTab"},{default:n.withCtx(()=>[n.createVNode(ue.VList,{lines:"two"},{default:n.withCtx(()=>[n.createVNode(O.VRow,{dense:""},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.file.id,label:N.$t("media.file.id"),icon:"mdi-badge"},null,8,["model-value","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.file.filename,label:N.$t("media.file.filename"),icon:"mdi-text-short"},null,8,["model-value","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.file.description,label:N.$t("media.file.description"),icon:"mdi-text-box"},null,8,["model-value","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":i.file.mimetype,label:N.$t("media.file.mimetype"),icon:"mdi-folder"},null,8,["model-value","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":A.value,label:N.$t("media.file.size"),icon:"mdi-weight"},null,8,["model-value","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ri),{chips:i.file.tags,label:N.$t("media.file.tags"),icon:"mdi-tag"},null,8,["chips","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":w.value,label:N.$t("media.file.hits"),icon:"mdi-eye"},null,8,["model-value","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[m("FILE_DOWNLOAD")?(n.openBlock(),n.createBlock(ue.VListItem,{key:0},{prepend:n.withCtx(()=>[n.createVNode(H.VBtn,{size:"small",icon:"",onClick:I,class:"mr-4"},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,{color:"black"},{default:n.withCtx(()=>[...b[9]||(b[9]=[n.createTextVNode("mdi-content-copy",-1)])]),_:1})]),_:1}),n.createElementVNode("input",{type:"hidden",id:"url",value:i.file.url},null,8,_f)]),default:n.withCtx(()=>[n.createVNode(ue.VListItemTitle,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.file.url)+" ",1),n.createVNode(H.VBtn,{size:"x-small",icon:"",color:"blue",variant:"text",onClick:R,class:"ml-2"},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[...b[10]||(b[10]=[n.createTextVNode("mdi-launch",-1)])]),_:1})]),_:1})]),_:1}),n.createVNode(ue.VListItemSubtitle,null,{default:n.withCtx(()=>[...b[11]||(b[11]=[n.createTextVNode("URL del archivo",-1)])]),_:1})]),_:1})):(n.openBlock(),n.createBlock(ue.VListItem,{key:1},{prepend:n.withCtx(()=>[n.createVNode(Q.VIcon,{color:"black",class:"mr-5"},{default:n.withCtx(()=>[...b[12]||(b[12]=[n.createTextVNode("mdi-book-open",-1)])]),_:1})]),default:n.withCtx(()=>[h.value?(n.openBlock(),n.createBlock(ue.VListItemTitle,{key:0},{default:n.withCtx(()=>[b[14]||(b[14]=n.createTextVNode(" Abrir en nueva pestaña ",-1)),n.createVNode(H.VBtn,{size:"x-small",icon:"",color:"blue",variant:"text",onClick:R,class:"ml-2"},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[...b[13]||(b[13]=[n.createTextVNode("mdi-launch",-1)])]),_:1})]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1}))]),_:1})]),_:1})]),_:1}),n.createVNode(Oi.VSnackbar,{modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=x=>o.value=x),timeout:2e3},{actions:n.withCtx(()=>[n.createVNode(H.VBtn,{color:"pink",variant:"text",onClick:b[1]||(b[1]=x=>o.value=!1)},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[...b[15]||(b[15]=[n.createTextVNode("mdi-close",-1)])]),_:1})]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.value)+" ",1)]),_:1},8,["modelValue"])]),_:1}),n.createVNode(At.VWindowItem,{value:"privacyTab"},{default:n.withCtx(()=>[n.createVNode(ue.VList,{lines:"two"},{default:n.withCtx(()=>[n.createVNode(n.unref(ke),{"model-value":S.value,label:"Privacidad del archivo",icon:"mdi-cctv"},null,8,["model-value"]),n.createVNode(Pe.VDivider,{class:"my-2"}),m("SECURITY_GROUP_SHOW")?(n.openBlock(),n.createBlock(n.unref(Af),{key:0,fileIdGroups:i.file.groups},null,8,["fileIdGroups"])):n.createCommentVNode("",!0),n.createVNode(Pe.VDivider,{class:"my-2"}),m("SECURITY_USER_SHOW")?(n.openBlock(),n.createBlock(n.unref(xf),{key:1,fileIdUsers:i.file.users},null,8,["fileIdUsers"])):n.createCommentVNode("",!0)]),_:1})]),_:1}),n.createVNode(At.VWindowItem,{value:"fileHistoryTab"},{default:n.withCtx(()=>[n.createVNode(bt.VDataTable,{headers:[{title:n.unref(t)("media.file.history.date"),key:"date",sortable:!0,align:"center"},{title:n.unref(t)("media.file.history.user"),key:"username",sortable:!0,align:"center"}],items:f.value,"items-per-page":5,"items-per-page-options":[5,10,25,50],"items-per-page-text":n.unref(t)("common.itemsPerPageText"),class:"elevation-1",density:"compact"},null,8,["headers","items","items-per-page-text"])]),_:1})]),_:1},8,["modelValue"])]),_:1})):n.createCommentVNode("",!0)}},[["__scopeId","data-v-355e0897"]]),ko={__name:"FileShow",props:{open:{type:Boolean,default:!0},item:{type:Object,required:!0}},emits:["close"],setup(i){const e=n.ref("media.file.showing");return(t,a)=>(n.openBlock(),n.createBlock(n.unref(Qa),{title:e.value,open:i.open,onClose:a[0]||(a[0]=s=>t.$emit("close"))},{default:n.withCtx(()=>[n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.createVNode(n.unref(Ma),{file:i.item},null,8,["file"])]),_:1})]),_:1},8,["title","open"]))}},Vf={class:"text-subtitle-2 mt-n2 pa-0 text-white-50"},Df={class:"d-flex mb-2 justify-end"},Tf={key:0,class:"error-message"},Ff={__name:"FileEditButton",props:{file:{type:Object,required:!0}},emits:["file-updated","itemUpdated"],setup(i,{emit:e}){const t=i,a=e,s=ne.useStore(),{t:o}=se.useI18n(),r=n.ref(!1),l=n.ref(""),d=n.ref(""),c=n.ref(!1),u=n.ref(!1),f=n.ref([]),m=n.ref([]),p=n.ref([]),k=n.ref(null),g=n.computed(()=>f.value.length>0),h=n.computed(()=>{if(!t.file?.extension)return!1;const I=t.file.extension.toLowerCase();return(I===".json"||I==="json")&&l.value.trim()!==""}),y=async(I=3)=>{try{const N=s.state.user.access_token;if(!t.file.url)throw new Error("File URL is missing");const b=`t=${Date.now()}`,x=t.file.url.includes("?")?`${t.file.url}&${b}`:`${t.file.url}?${b}`,E={method:"GET",headers:{}};N&&(E.headers.Authorization=`Bearer ${N}`);let C=await fetch(x,E);if(!C.ok&&N&&(delete E.headers.Authorization,C=await fetch(x,E)),!C.ok)throw new Error(`HTTP error! Status: ${C.status}`);l.value=await C.text(),d.value=l.value,c.value=!1,m.value=[],p.value=[],v(),await n.nextTick(),setTimeout(()=>_(),150)}catch(N){console.error(`Load attempt failed (${I} retries left):`,N),I>0?setTimeout(()=>y(I-1),1e3):(l.value="",f.value=[`Error cargando el contenido: ${N.message}. Intenta de nuevo en unos segundos.`])}},v=()=>{if(f.value=[],h.value)try{JSON.parse(l.value)}catch{f.value=["Formato JSON inválido"]}},A=()=>{if(h.value)try{const I=JSON.parse(l.value);B(),c.value?(l.value=JSON.stringify(I),c.value=!1):(l.value=JSON.stringify(I,null,2),c.value=!0),v(),_()}catch(I){console.error("Format error:",I),f.value=["No se pudo formatear: JSON inválido"]}},w=()=>{if(k.value){const I=k.value.innerText;I!==l.value&&(m.value.push(l.value),p.value=[],l.value=I,c.value=!1,v())}},S=()=>{_()},B=()=>{m.value.push(l.value),p.value=[]},D=()=>{m.value.length&&(p.value.push(l.value),l.value=m.value.pop(),v(),_())},T=()=>{p.value.length&&(m.value.push(l.value),l.value=p.value.pop(),v(),_())},V=async()=>{try{await navigator.clipboard.writeText(l.value)}catch(I){console.error("Fallo al copiar: ",I)}},F=()=>{B(),l.value="",v(),_()},_=()=>{if(!k.value)return;let N=(l.value||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");h.value&&(N=N.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"\s*?)(?=:)/g,'<span class="json-key" style="color: #c5a5c5 !important; font-weight: bold !important;">$1</span>').replace(/(:\s*)("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*")/g,'$1<span class="json-string" style="color: #8dc891 !important;">$2</span>').replace(/\b(true|false|null)\b/g,'<span class="json-boolean" style="color: #f99157 !important; font-weight: bold !important;">$1</span>').replace(/\b(-?\d+\.?\d*)\b(?![^<]*>)/g,'<span class="json-number" style="color: #f99157 !important;">$1</span>')),k.value.innerHTML=N},R=async()=>{if(!g.value){u.value=!0,f.value=[];try{const I=t.file.extension?.toLowerCase()===".json"?"application/json":"text/plain",N=new Blob([l.value],{type:I}),b=t.file.filename||"file.txt",x=new File([N],b,{type:I,lastModified:Date.now()}),E={id:t.file.id,description:t.file.description||"",tags:t.file.tags||[],expirationDate:t.file.expirationDate||null,isPublic:t.file.isPublic||!1,groups:t.file.groups||[],users:t.file.users||[]},C=await xt.updateFile(E,x);if(C?.errors&&C.errors.length>0)throw new Error(C.errors[0].message||"Error en la respuesta del servidor");if(C?.data?.fileUpdate)r.value=!1,a("file-updated",C.data.fileUpdate),setTimeout(()=>{a("itemUpdated")},800);else throw new Error("La respuesta del servidor no fue exitosa")}catch(I){console.error("Error guardando archivo:",I);const N=I.message.includes("fetch")?"Error de conexión con el servidor (posible reinicio)":I.message;f.value=[N]}finally{u.value=!1}}};return n.watch(r,async I=>{I&&(f.value=[],await y())}),(I,N)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(Ve.VTooltip,{location:"bottom"},{activator:n.withCtx(({props:b})=>[n.createVNode(H.VBtn,n.mergeProps({icon:"mdi-note-edit",size:"x-small",color:"primary",variant:"text",class:"mx-1"},b,{onClick:N[0]||(N[0]=x=>r.value=!0)}),null,16)]),default:n.withCtx(()=>[N[3]||(N[3]=n.createElementVNode("span",null,"Editar archivo",-1))]),_:1}),n.createVNode(yt.VDialog,{modelValue:r.value,"onUpdate:modelValue":N[2]||(N[2]=b=>r.value=b),"max-width":"80vw",persistent:""},{default:n.withCtx(()=>[n.createVNode(Y.VCard,{style:{"max-height":"80vh",display:"flex","flex-direction":"column"}},{default:n.withCtx(()=>[n.createVNode(_e.VToolbar,{color:"primary",theme:"dark"},{default:n.withCtx(()=>[n.createVNode(_e.VToolbarTitle,{class:"mt-3"},{default:n.withCtx(()=>[N[4]||(N[4]=n.createTextVNode(" Editar archivo ",-1)),n.createElementVNode("div",Vf,n.toDisplayString(i.file.filename),1)]),_:1})]),_:1}),n.createVNode(Y.VCardText,{class:"flex-grow-1 overflow-y-auto pa-4",style:{"min-height":"0"}},{default:n.withCtx(()=>[n.createElementVNode("div",Df,[n.createVNode(Ve.VTooltip,{location:"bottom"},{activator:n.withCtx(({props:b})=>[n.createVNode(H.VBtn,n.mergeProps({size:"small",icon:"mdi-content-copy",variant:"text"},b,{onClick:V,disabled:!l.value}),null,16,["disabled"])]),default:n.withCtx(()=>[N[5]||(N[5]=n.createElementVNode("span",null,"Copiar",-1))]),_:1}),n.createVNode(Ve.VTooltip,{location:"bottom"},{activator:n.withCtx(({props:b})=>[n.createVNode(H.VBtn,n.mergeProps({size:"small",icon:"mdi-backspace-outline",variant:"text",class:"ml-2"},b,{onClick:F,disabled:!l.value}),null,16,["disabled"])]),default:n.withCtx(()=>[N[6]||(N[6]=n.createElementVNode("span",null,"Limpiar",-1))]),_:1}),n.createVNode(Ve.VTooltip,{location:"bottom"},{activator:n.withCtx(({props:b})=>[n.createVNode(H.VBtn,n.mergeProps({size:"small",icon:"mdi-undo",variant:"text",class:"ml-2"},b,{onClick:D,disabled:m.value.length===0}),null,16,["disabled"])]),default:n.withCtx(()=>[N[7]||(N[7]=n.createElementVNode("span",null,"Deshacer",-1))]),_:1}),n.createVNode(Ve.VTooltip,{location:"bottom"},{activator:n.withCtx(({props:b})=>[n.createVNode(H.VBtn,n.mergeProps({size:"small",icon:"mdi-redo",variant:"text",class:"ml-2"},b,{onClick:T,disabled:p.value.length===0}),null,16,["disabled"])]),default:n.withCtx(()=>[N[8]||(N[8]=n.createElementVNode("span",null,"Rehacer",-1))]),_:1}),n.createVNode(O.VSpacer),n.createVNode(Ve.VTooltip,{location:"bottom"},{activator:n.withCtx(({props:b})=>[n.createVNode(H.VBtn,n.mergeProps({size:"small",icon:c.value?"mdi-format-letter-case":"mdi-format-align-left",variant:"text"},b,{onClick:A,disabled:!h.value}),null,16,["icon","disabled"])]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(c.value?"Minificar JSON":"Formatear JSON"),1)]),_:1})]),n.createElementVNode("div",{ref_key:"editor",ref:k,class:n.normalizeClass(["dracul-json-editor",{"json-editor-error":g.value}]),contenteditable:"true",spellcheck:"false",autocorrect:"off",autocomplete:"off",autocapitalize:"off",onInput:w,onBlur:S,style:{background:"#2e2e2e !important",color:"#ccc !important","white-space":"pre-wrap !important","word-break":"break-all !important","font-family":"'Fira Code', 'Consolas', monospace !important",outline:"none !important","min-height":"300px !important",padding:"12px !important","border-radius":"4px !important","font-size":"14px !important","line-height":"1.5 !important",border:"1px solid #444 !important"}},null,34),g.value?(n.openBlock(),n.createElementBlock("div",Tf,n.toDisplayString(f.value[0]),1)):n.createCommentVNode("",!0)]),_:1}),n.createVNode(Pe.VDivider),n.createVNode(Y.VCardActions,null,{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(H.VBtn,{variant:"text",onClick:N[1]||(N[1]=b=>r.value=!1),disabled:u.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(o)("common.cancel")),1)]),_:1},8,["disabled"]),n.createVNode(H.VBtn,{disabled:g.value||u.value,color:"primary",variant:"flat",onClick:R,loading:u.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(o)("common.update")),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}},Mf={__name:"FileFilters",props:{modelValue:Array},emits:["updateFilters","clearFilter","update:modelValue"],setup(i,{emit:e}){const t=i,a=e,s=ne.useStore(),o=n.computed({get(){return t.modelValue},set(u){a("update:modelValue",u)}});n.computed(()=>s.getters.me);const r=[{title:"text",value:"text"},{title:"image",value:"image"},{title:"application",value:"application"},{title:"audio",value:"audio"}],l=()=>{a("updateFilters",o.value)},d=()=>{a("clearFilter",o.value)},c=u=>s.getters.hasPermission(u);return(u,f)=>(n.openBlock(),n.createBlock(n.unref(lr),{title:"media.file.filters",onClear:f[10]||(f[10]=m=>d()),onApply:f[11]||(f[11]=m=>l()),"apply-button":""},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"6",md:"4"},{default:n.withCtx(()=>[o.value[0].field=="dateFrom"?(n.openBlock(),n.createBlock(n.unref(Hi),{key:0,modelValue:o.value[0].value,"onUpdate:modelValue":f[0]||(f[0]=m=>o.value[0].value=m),label:u.$t("media.file.from"),"prepend-inner-icon":"mdi-calendar",color:"secondary","hide-details":"",variant:"underlined",dense:""},null,8,["modelValue","label"])):n.createCommentVNode("",!0)]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"4"},{default:n.withCtx(()=>[n.createVNode(n.unref(Hi),{modelValue:o.value[1].value,"onUpdate:modelValue":f[1]||(f[1]=m=>o.value[1].value=m),label:u.$t("media.file.until"),"prepend-inner-icon":"mdi-calendar",color:"secondary","hide-details":"",variant:"underlined",dense:""},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"4",sm:"6"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:o.value[2].value,"onUpdate:modelValue":f[2]||(f[2]=m=>o.value[2].value=m),label:u.$t("media.file.filename"),"prepend-inner-icon":"mdi-text",color:"secondary","hide-details":"",variant:"underlined",density:"compact"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(rt.VSelect,{modelValue:o.value[4].value,"onUpdate:modelValue":f[3]||(f[3]=m=>o.value[4].value=m),label:u.$t("media.file.type"),items:r,"prepend-inner-icon":"mdi-file",color:"secondary",variant:"underlined",density:"compact","hide-details":""},null,8,["modelValue","label"])]),_:1}),c("FILE_SHOW_OWN")?(n.openBlock(),n.createBlock(O.VCol,{key:0,cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(rt.VSelect,{"prepend-inner-icon":"mdi-eye",modelValue:o.value[7].value,"onUpdate:modelValue":f[4]||(f[4]=m=>o.value[7].value=m),items:[{title:"Público",value:"true"},{title:"Privado",value:"false"}],label:u.$t("media.file.visibility"),variant:"underlined",density:"compact","hide-details":""},null,8,["modelValue","label"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:o.value[5].value,"onUpdate:modelValue":f[5]||(f[5]=m=>o.value[5].value=m),label:u.$t("media.file.sizeGt")+" (MB)","prepend-inner-icon":"mdi-arrow-up-bold-circle-outline",color:"secondary",variant:"underlined",density:"compact","hide-details":""},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:o.value[6].value,"onUpdate:modelValue":f[6]||(f[6]=m=>o.value[6].value=m),label:u.$t("media.file.sizeLt")+" (MB)","prepend-inner-icon":"mdi-arrow-down-bold-circle-outline",color:"secondary",variant:"underlined",density:"compact","hide-details":""},null,8,["modelValue","label"])]),_:1}),c("FILE_SHOW_ALL")?(n.openBlock(),n.createBlock(O.VCol,{key:1,cols:"12",md:"4",sm:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(Pi),{modelValue:o.value[3].value,"onUpdate:modelValue":f[7]||(f[7]=m=>o.value[3].value=m),label:"media.file.createdBy"},null,8,["modelValue"])]),_:1})):n.createCommentVNode("",!0),c("FILE_SHOW_ALL")?(n.openBlock(),n.createBlock(O.VCol,{key:2,cols:"12",md:"4",sm:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(ro),{modelValue:o.value[8].value,"onUpdate:modelValue":f[8]||(f[8]=m=>o.value[8].value=m),label:"media.file.group"},null,8,["modelValue"])]),_:1})):n.createCommentVNode("",!0),c("FILE_SHOW_ALL")?(n.openBlock(),n.createBlock(O.VCol,{key:3,cols:"12",md:"4",sm:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(Pi),{modelValue:o.value[9].value,"onUpdate:modelValue":f[9]||(f[9]=m=>o.value[9].value=m),label:"media.file.user"},null,8,["modelValue"])]),_:1})):n.createCommentVNode("",!0)]),_:1}))}},Pf={key:0},Bf={key:1},Of={class:"text-center"},yo={__name:"FileList",emits:["update","delete","show","itemUpdated"],setup(i,{expose:e,emit:t}){const{t:a}=se.useI18n(),s=ne.useStore(),{getDateTimeFormat:o}=Ct(),r=n.ref([]),l=n.ref(0),d=n.ref(!1),c=n.ref([]),u=n.ref(5),f=n.ref(1),m=n.ref(""),p=n.ref([{field:"dateFrom",operator:"$gte",value:null},{field:"dateTo",operator:"$lte",value:null},{field:"filename",operator:"$regex",value:null},{field:"createdBy.user",operator:"$eq",value:null},{field:"type",operator:"$regex",value:null},{field:"minSize",operator:"$gte",value:null},{field:"maxSize",operator:"$lte",value:null},{field:"isPublic",operator:"$eq",value:null},{field:"groups",operator:"$eq",value:null},{field:"users",operator:"$eq",value:null}]),k=D=>s.getters.hasPermission(D),g=n.computed(()=>s.getters.me),h=n.computed(()=>[{title:a("media.file.filename"),key:"filename"},{title:a("media.file.type"),key:"type"},{title:a("media.file.size"),key:"size"},{title:a("media.file.createdAt"),key:"createdAt"},{title:a("media.file.lastAccess"),key:"lastAccess"},{title:a("media.file.createdBy"),key:"createdBy.username"},{title:a("media.file.isPublic"),key:"isPublic"},{title:a("media.file.hits"),key:"hits"},{title:a("common.actions"),key:"action",sortable:!1}]),y=n.computed(()=>c.value.length>0?c.value[0].key:null),v=n.computed(()=>c.value.length>0?c.value[0].order==="desc":!1),A=()=>{d.value=!0,xt.paginateFiles(f.value,u.value,m.value,p.value,y.value,v.value).then(D=>{r.value=D.data.filePaginate.items,l.value=D.data.filePaginate.totalItems}).catch(D=>{console.error(D)}).finally(()=>d.value=!1)},w=D=>{p.value=D,A()},S=()=>{p.value.forEach(D=>{D.value=null}),A()},B=D=>D===".json"||D===".md"||D===".txt";return n.onBeforeMount(()=>{A()}),e({fetch:A}),(D,T)=>(n.openBlock(),n.createBlock(O.VRow,{row:"",wrap:""},{default:n.withCtx(()=>[n.createVNode(n.unref(Mf),{onUpdateFilters:w,onClearFilter:S,modelValue:p.value,"onUpdate:modelValue":T[0]||(T[0]=V=>p.value=V)},null,8,["modelValue"]),n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[n.createVNode(bt.VDataTableServer,{class:"mt-3",headers:h.value,items:r.value,search:m.value,"items-length":l.value,loading:d.value,page:f.value,"onUpdate:page":T[2]||(T[2]=V=>f.value=V),"items-per-page":u.value,"onUpdate:itemsPerPage":T[3]||(T[3]=V=>u.value=V),"sort-by":c.value,"onUpdate:sortBy":T[4]||(T[4]=V=>c.value=V),"items-per-page-options":[5,10,25,50,100],"items-per-page-text":n.unref(a)("common.itemsPerPageText"),"onUpdate:options":A,density:"compact",hover:""},{"item.isPublic":n.withCtx(({item:V})=>[V.isPublic?(n.openBlock(),n.createElementBlock("div",Pf,[n.createVNode(Q.VIcon,{color:"success"},{default:n.withCtx(()=>[...T[5]||(T[5]=[n.createTextVNode("mdi-check-circle",-1)])]),_:1})])):(n.openBlock(),n.createElementBlock("div",Bf,[n.createVNode(Q.VIcon,{color:"error"},{default:n.withCtx(()=>[...T[6]||(T[6]=[n.createTextVNode("mdi-close-circle",-1)])]),_:1})]))]),"no-data":n.withCtx(()=>[n.createElementVNode("div",Of,n.toDisplayString(n.unref(a)("common.noData")),1)]),"item.size":n.withCtx(({item:V})=>[n.createTextVNode(n.toDisplayString(V.size.toFixed(2))+" Mb ",1)]),"item.type":n.withCtx(({item:V})=>[n.createTextVNode(n.toDisplayString(n.unref(a)(`media.file.${V.type}`)),1)]),"item.createdAt":n.withCtx(({item:V})=>[n.createTextVNode(n.toDisplayString(n.unref(o)(V.createdAt,!0)),1)]),"item.lastAccess":n.withCtx(({item:V})=>[n.createTextVNode(n.toDisplayString(n.unref(o)(V.lastAccess,!0)),1)]),"item.action":n.withCtx(({item:V})=>[n.createVNode(n.unref(er),{onClick:F=>D.$emit("show",V)},null,8,["onClick"]),k("FILE_UPDATE_ALL")||k("FILE_UPDATE_OWN")&&V.createdBy.user?.id===g.value?.id?(n.openBlock(),n.createBlock(n.unref(Zo),{key:0,onClick:F=>D.$emit("update",V)},null,8,["onClick"])):n.createCommentVNode("",!0),B(V.extension)&&(k("FILE_UPDATE_ALL")||k("FILE_UPDATE_OWN")&&V.createdBy.user?.id===g.value?.id)?(n.openBlock(),n.createBlock(Ff,{key:1,file:V,onItemUpdated:T[1]||(T[1]=F=>D.$emit("itemUpdated"))},null,8,["file"])):n.createCommentVNode("",!0),k("FILE_DELETE_ALL")||k("FILE_DELETE_OWN")&&V.createdBy.user?.id===g.value?.id?(n.openBlock(),n.createBlock(n.unref(Jo),{key:2,onClick:F=>D.$emit("delete",V)},null,8,["onClick"])):n.createCommentVNode("",!0)]),_:2},1032,["headers","items","search","items-length","loading","page","items-per-page","sort-by","items-per-page-text"])]),_:1})]),_:1}))}},Lf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"fileUpload"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Upload"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"expirationDate"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isPublic"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"description"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tags"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"groups"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"users"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileUpload"},arguments:[{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}},{kind:"Argument",name:{kind:"Name",value:"expirationDate"},value:{kind:"Variable",name:{kind:"Name",value:"expirationDate"}}},{kind:"Argument",name:{kind:"Name",value:"isPublic"},value:{kind:"Variable",name:{kind:"Name",value:"isPublic"}}},{kind:"Argument",name:{kind:"Name",value:"description"},value:{kind:"Variable",name:{kind:"Name",value:"description"}}},{kind:"Argument",name:{kind:"Name",value:"tags"},value:{kind:"Variable",name:{kind:"Name",value:"tags"}}},{kind:"Argument",name:{kind:"Name",value:"groups"},value:{kind:"Variable",name:{kind:"Name",value:"groups"}}},{kind:"Argument",name:{kind:"Name",value:"users"},value:{kind:"Variable",name:{kind:"Name",value:"users"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extension"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relativePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absolutePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expirationDate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPublic"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"groups"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:775,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`mutation fileUpload( $file: Upload!, $expirationDate: String, $isPublic: Boolean, $description: String, $tags: [String], $groups: [ID], $users: [ID] ){
502
+ fileUpload(file: $file, expirationDate: $expirationDate, isPublic: $isPublic, description: $description, tags: $tags, groups: $groups, users: $users){
503
+ id
504
+ filename
505
+ description
506
+ tags
507
+ mimetype
508
+ type
509
+ extension
510
+ relativePath
511
+ absolutePath
512
+ size
513
+ url
514
+ createdAt
515
+ createdBy{
516
+ user {
517
+ id
518
+ username
519
+ }
520
+ username
521
+ }
522
+ lastAccess
523
+ expirationDate
524
+ isPublic
525
+ hits
526
+ groups
527
+ users
528
+ }
529
+ }
530
+ `}}},If={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"fileUploadAnonymous"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"file"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Upload"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileUploadAnonymous"},arguments:[{kind:"Argument",name:{kind:"Name",value:"file"},value:{kind:"Variable",name:{kind:"Name",value:"file"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"filename"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mimetype"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"extension"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"relativePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"absolutePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"size"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastAccess"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expirationDate"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:494,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`mutation fileUploadAnonymous( $file: Upload!){
531
+ fileUploadAnonymous(file: $file){
532
+ id
533
+ filename
534
+ description
535
+ tags
536
+ mimetype
537
+ type
538
+ extension
539
+ relativePath
540
+ absolutePath
541
+ size
542
+ url
543
+ createdAt
544
+ createdBy{
545
+ user {
546
+ id
547
+ username
548
+ }
549
+ username
550
+ }
551
+ lastAccess
552
+ expirationDate
553
+ }
554
+ }
555
+ `}}};class Rf{constructor(){this.gqlc=null}setGqlc(e){this.gqlc=e}uploadFile(e,t,a,s,o,r,l){return this.gqlc.mutate({mutation:Lf,variables:{file:e,expirationDate:t,isPublic:a,description:s,tags:o,groups:r,users:l}})}uploadFileAnonymous(e){return this.gqlc.mutate({mutation:If,variables:{file:e}})}}const Ht=new Rf,Uf={class:"text-center"},bo={__name:"FileCreate",props:{open:{type:Boolean,default:!0}},emits:["close","itemCreated"],setup(i,{emit:e}){const t=e,{t:a}=se.useI18n(),s=n.ref("media.file.creating"),o=n.ref(""),r=n.ref({}),l=n.ref(!1),d=n.ref({file:null,expirationDate:null,isPublic:!1,description:"",tags:[],groups:[],users:[]}),c=n.ref(null),u=n.ref(null),f=p=>{d.value.file=p},m=async()=>{d.value.file?(l.value=!0,o.value="",await Ht.uploadFile(d.value.file,d.value.expirationDate,d.value.isPublic,d.value.description,d.value.tags,d.value.groups,d.value.users).then(p=>{c.value=p.data.fileUpload,t("itemCreated")}).catch(p=>{if(!!p.message.includes("Expiration date must be older than current date"))o.value=a("media.file.wrongExpirationDate");else{let g=new Zt(p);r.value=g.inputErrors,o.value=g.i18nMessage}}).finally(()=>l.value=!1)):o.value=a("media.file.noFile")};return(p,k)=>c.value?(n.openBlock(),n.createBlock(n.unref(Qa),{key:0,open:i.open,title:s.value,onClose:k[0]||(k[0]=g=>p.$emit("close"))},{default:n.withCtx(()=>[c.value?(n.openBlock(),n.createBlock(n.unref(Ma),{key:0,file:c.value},null,8,["file"])):n.createCommentVNode("",!0)]),_:1},8,["open","title"])):(n.openBlock(),n.createBlock(n.unref(nr),{key:1,open:i.open,loading:l.value,title:s.value,"error-message":o.value,onClose:k[2]||(k[2]=g=>p.$emit("close")),onCreate:m,fullscreen:!1},{default:n.withCtx(()=>[n.createElementVNode("div",Uf,[n.createVNode(n.unref(Fa),{modelValue:d.value,"onUpdate:modelValue":k[1]||(k[1]=g=>d.value=g),"input-errors":r.value,ref_key:"formRef",ref:u,onFileSelected:f,onSave:m,creating:""},null,8,["modelValue","input-errors"])])]),_:1},8,["open","loading","title","error-message"]))}},vo={__name:"FileCrud",props:{topAddButton:Boolean},emits:[],setup(i,{emit:e}){const{t}=se.useI18n(),a=ne.useStore(),s=n.ref("media.file.title"),o=n.ref("media.file.subtitle"),r=n.ref(null),l=n.ref(!1),d=n.ref(!1),c=n.ref(!1),u=n.ref(!1),f=n.ref(null),m=n.ref(null),p=n.ref(null);n.ref(1e4);const k=n.ref(null),g=T=>a.getters.hasPermission(T),h=n.computed(()=>a.getters.getRole);n.onBeforeMount(()=>{h.value==="visualizer"&&(o.value="media.file.visualizerSubtitle")});const y=()=>{k.value?.fetch(),r.value=t("common.created")},v=()=>{k.value?.fetch(),r.value=t("common.updated")},A=()=>{k.value?.fetch(),r.value=t("common.deleted")},w=()=>{l.value=!0},S=T=>{d.value=!0,f.value=T},B=T=>{u.value=!0,p.value=T},D=T=>{c.value=!0,m.value=T};return(T,V)=>(n.openBlock(),n.createBlock(n.unref(Ha),{title:s.value,subtitle:o.value,"add-button":i.topAddButton&&g("FILE_CREATE"),onAdd:w},{list:n.withCtx(()=>[n.createVNode(n.unref(yo),{ref_key:"listRef",ref:k,onUpdate:S,onDelete:D,onShow:B,onItemUpdated:v},null,512)]),default:n.withCtx(()=>[!i.topAddButton&&g("FILE_CREATE")?(n.openBlock(),n.createBlock(n.unref(Ko),{key:0,onClick:w})):n.createCommentVNode("",!0),l.value?(n.openBlock(),n.createBlock(n.unref(bo),{key:1,open:l.value,onItemCreated:y,onClose:V[0]||(V[0]=F=>l.value=!1)},null,8,["open"])):n.createCommentVNode("",!0),d.value?(n.openBlock(),n.createBlock(n.unref(ho),{key:2,open:d.value,item:f.value,onItemUpdated:v,onClose:V[1]||(V[1]=F=>d.value=!1)},null,8,["open","item"])):n.createCommentVNode("",!0),u.value?(n.openBlock(),n.createBlock(n.unref(ko),{key:3,open:u.value,item:p.value,onClose:V[2]||(V[2]=F=>u.value=!1)},null,8,["open","item"])):n.createCommentVNode("",!0),c.value?(n.openBlock(),n.createBlock(n.unref(po),{key:4,open:c.value,item:m.value,onItemDeleted:A,onClose:V[3]||(V[3]=F=>c.value=!1)},null,8,["open","item"])):n.createCommentVNode("",!0),n.createVNode(n.unref(Ii),{modelValue:r.value,"onUpdate:modelValue":V[4]||(V[4]=F=>r.value=F)},null,8,["modelValue"])]),_:1},8,["title","subtitle","add-button"]))}},$f={name:"File",components:{FileCrud:vo}};function zf(i,e,t,a,s,o){const r=n.resolveComponent("file-crud");return n.openBlock(),n.createBlock(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[n.createVNode(r,{topAddButton:!0})]),_:1})]),_:1})}const Ao=Yt($f,[["render",zf]]),qf={class:"text-h5"},Yf={class:"text-subtitle-1"},Hf={class:"text-subtitle-1"},jf={class:"text-subtitle-1"},Wf={class:"text-subtitle-1"},Qf={class:"text-subtitle-1"},Gf={class:"text-subtitle-1"},Xf={__name:"UserStorageForm",props:{modelValue:{type:Object,required:!0},inputErrors:Object,fileSizeLimit:Number,fileExpirationLimit:Number},emits:["update:modelValue","save"],setup(i,{emit:e}){const{t}=se.useI18n(),a=i,s=e,o=n.ref(null),r=n.computed({get(){return a.modelValue},set(m){s("update:modelValue",m)}}),l=n.computed(()=>[{title:t("media.userStorage.privacy.public"),value:"public"},{title:t("media.userStorage.privacy.private"),value:"private"}]),d=m=>m.capacity>0?parseFloat(m.usedSpace*100/m.capacity).toFixed(2)+"%":"-",c=n.computed(()=>[m=>parseFloat(m)>=r.value.usedSpace||t("media.userStorage.insufficientCapacity")]),u=n.computed(()=>[m=>a.fileSizeLimit!=0?parseFloat(m)<=a.fileSizeLimit&&parseFloat(m)>0||t("media.userStorage.sizeLimitExceeded"):!0]),f=n.computed(()=>[m=>a.fileExpirationLimit!=0?parseInt(m)<=a.fileExpirationLimit&&parseFloat(m)>0||t("media.userStorage.fileExpirationTimeExceeded"):!0]);return n.watch(()=>r.value.deleteByCreatedAt,(m,p)=>{p==!1&&m==!0&&r.value.deleteByLastAccess?r.value.deleteByLastAccess=!1:p==!0&&m==!1&&r.value.deleteByLastAccess==!1&&(r.value.deleteByLastAccess=!0)}),n.watch(()=>r.value.deleteByLastAccess,(m,p)=>{p==!1&&m==!0&&r.value.deleteByCreatedAt?r.value.deleteByCreatedAt=!1:p==!0&&m==!1&&r.value.deleteByCreatedAt==!1&&(r.value.deleteByCreatedAt=!0)}),(m,p)=>(n.openBlock(),n.createBlock(O.VContainer,null,{default:n.withCtx(()=>[n.createVNode($a.VForm,{ref_key:"formRef",ref:o,autocomplete:"off",onSubmit:p[6]||(p[6]=n.withModifiers(k=>m.$emit("save"),["prevent"]))},{default:n.withCtx(()=>[n.createVNode(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12"},{default:n.withCtx(()=>[n.createElementVNode("span",qf,n.toDisplayString(n.unref(t)("media.userStorage.cliente"))+": "+n.toDisplayString(r.value.name),1)]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:r.value.capacity,"onUpdate:modelValue":p[0]||(p[0]=k=>r.value.capacity=k),type:"number",label:n.unref(t)("media.userStorage.capacity"),variant:"underlined",density:"compact",suffix:"MB",rules:c.value,required:""},null,8,["modelValue","label","rules"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",class:"d-flex align-center"},{default:n.withCtx(()=>[n.createElementVNode("span",Yf,n.toDisplayString(n.unref(t)("media.userStorage.usedPercentage"))+" "+n.toDisplayString(d(r.value)),1)]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:r.value.maxFileSize,"onUpdate:modelValue":p[1]||(p[1]=k=>r.value.maxFileSize=k),type:"number",label:n.unref(t)("media.userStorage.maxFileSize"),variant:"underlined",density:"compact",suffix:"MB",rules:u.value,required:"",hint:"Max "+i.fileSizeLimit+" Mb","persistent-hint":""},null,8,["modelValue","label","rules","hint"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",class:"d-flex align-center"},{default:n.withCtx(()=>[n.createElementVNode("span",Hf,n.toDisplayString(n.unref(t)("media.userStorage.fileSizeLimit")),1)]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:r.value.fileExpirationTime,"onUpdate:modelValue":p[2]||(p[2]=k=>r.value.fileExpirationTime=k),type:"number",label:n.unref(t)("media.userStorage.fileExpirationTime"),variant:"underlined",density:"compact",suffix:n.unref(t)("media.userStorage.days"),rules:f.value,required:"",hint:"Max "+i.fileExpirationLimit,"persistent-hint":""},null,8,["modelValue","label","suffix","rules","hint"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",class:"d-flex align-center"},{default:n.withCtx(()=>[n.createElementVNode("span",jf,n.toDisplayString(n.unref(t)("media.userStorage.fileExpirationLimit")),1)]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(rt.VSelect,{modelValue:r.value.filesPrivacy,"onUpdate:modelValue":p[3]||(p[3]=k=>r.value.filesPrivacy=k),items:l.value,"item-title":"title","item-value":"value",label:n.unref(t)("media.userStorage.filesPrivacy"),variant:"underlined",density:"compact",required:""},null,8,["modelValue","items","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",class:"d-flex align-center"},{default:n.withCtx(()=>[n.createElementVNode("span",Wf,n.toDisplayString(n.unref(t)("media.userStorage.filesPrivacyLabel")),1)]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(qa.VSwitch,{color:"success",label:r.value.deleteByLastAccess?n.unref(t)("media.userStorage.active"):n.unref(t)("media.userStorage.inactive"),modelValue:r.value.deleteByLastAccess,"onUpdate:modelValue":p[4]||(p[4]=k=>r.value.deleteByLastAccess=k),"hide-details":"",inset:"",density:"compact"},null,8,["label","modelValue"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",class:"d-flex align-center"},{default:n.withCtx(()=>[n.createElementVNode("span",Qf,n.toDisplayString(n.unref(t)("media.userStorage.deleteByLastAccess")),1)]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6"},{default:n.withCtx(()=>[n.createVNode(qa.VSwitch,{color:"success",label:r.value.deleteByCreatedAt?n.unref(t)("media.userStorage.active"):n.unref(t)("media.userStorage.inactive"),modelValue:r.value.deleteByCreatedAt,"onUpdate:modelValue":p[5]||(p[5]=k=>r.value.deleteByCreatedAt=k),"hide-details":"",inset:"",density:"compact"},null,8,["label","modelValue"])]),_:1}),n.createVNode(O.VCol,{cols:"12",md:"6",class:"d-flex align-center"},{default:n.withCtx(()=>[n.createElementVNode("span",Gf,n.toDisplayString(n.unref(t)("media.userStorage.deleteByDateCreated")),1)]),_:1})]),_:1})]),_:1},512)]),_:1}))}},Kf={__name:"UserStorageUpdate",props:{userStorageForm:Object,open:{type:Boolean,default:!0}},emits:["close","roleUpdated"],setup(i,{emit:e}){const t=i,a=e,{t:s}=se.useI18n(),o=n.ref(s("media.userStorage.editTitle")),r=n.ref(""),l=n.ref({}),d=n.ref(!1),c=n.ref(null),u=n.ref({id:t.userStorageForm.id,name:t.userStorageForm.user.name,capacity:t.userStorageForm.capacity,usedSpace:t.userStorageForm.usedSpace,maxFileSize:t.userStorageForm.maxFileSize,fileExpirationTime:t.userStorageForm.fileExpirationTime,deleteByLastAccess:t.userStorageForm.deleteByLastAccess,deleteByCreatedAt:t.userStorageForm.deleteByCreatedAt,filesPrivacy:t.userStorageForm.filesPrivacy}),f=n.ref(0),m=n.ref(0),p=n.ref(null),k=n.computed(()=>f.value),g=()=>{c.value=null,y()?We.updateUserStorage(u.value).then(a("roleUpdated"),a("close")).catch(v=>console.error(v)):(c.value="Valores Invalidos",console.warn("Valores Invalidos"))},h=()=>We.fetchMediaVariables().then(v=>{f.value=v.data.fetchMediaVariables.maxFileSize,m.value=v.data.fetchMediaVariables.fileExpirationTime}).catch(v=>console.error(v)),y=()=>(u.value.capacity=parseFloat(u.value.capacity),u.value.maxFileSize=parseFloat(u.value.maxFileSize),u.value.fileExpirationTime=parseInt(u.value.fileExpirationTime),u.value.capacity>=0&&u.value.maxFileSize>0&&u.value.fileExpirationTime>0&&u.value.capacity>u.value.usedSpace&&f.value>=u.value.maxFileSize&&m.value>=u.value.fileExpirationTime);return n.onBeforeMount(()=>{h()}),(v,A)=>(n.openBlock(),n.createBlock(n.unref(Wa),{open:i.open,loading:d.value,title:o.value,"error-message":r.value,onUpdate:g,onClose:A[1]||(A[1]=w=>v.$emit("close"))},{default:n.withCtx(()=>[c.value?(n.openBlock(),n.createBlock($e.VAlert,{key:0,type:"error"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(c.value),1)]),_:1})):n.createCommentVNode("",!0),n.createVNode(Xf,{ref_key:"formRef",ref:p,modelValue:u.value,"onUpdate:modelValue":A[0]||(A[0]=w=>u.value=w),"file-size-limit":k.value,"file-expiration-limit":m.value,"input-errors":l.value,onSave:g},null,8,["modelValue","file-size-limit","file-expiration-limit","input-errors"])]),_:1},8,["open","loading","title","error-message"]))}},Zf={__name:"UserStorage",setup(i){const{t:e}=se.useI18n(),t={user:null,visibility:null,capacityMin:null,capacityMax:null,maxFileSizeMin:null,maxFileSizeMax:null,percentageMin:null,percentageMax:null,fileExpirationTimeMin:null,fileExpirationTimeMax:null},a=n.ref({...t}),s=n.ref([]),o=n.ref(!0),r=n.ref(null),l=n.ref(!1),d=n.ref(""),c=n.ref(3e3),u=n.computed(()=>[{title:e("media.userStorage.privacy.public"),value:"public"},{title:e("media.userStorage.privacy.private"),value:"private"}]),f=n.computed(()=>[{title:e("media.userStorage.user"),align:"start",sortable:!1,key:"user.name"},{title:e("media.userStorage.fileExpirationTime"),key:"fileExpirationTime",align:"center"},{title:e("media.userStorage.maxFileSize"),key:"maxFileSize",align:"center"},{title:e("media.userStorage.capacity"),key:"capacity",align:"center"},{title:e("media.userStorage.percentage"),key:"usedSpace",align:"center"},{title:e("media.userStorage.filesPrivacy"),key:"filesPrivacy",align:"center"},{title:e("media.userStorage.actions"),key:"actions",sortable:!1,align:"center"}]),m=A=>A.capacity>0?parseFloat(A.usedSpace*100/A.capacity):0,p=A=>A.capacity>0?m(A).toFixed(2)+"%":"-",k=n.computed(()=>s.value.filter(A=>{const w=m(A),S=!a.value.user||A.user.id===a.value.user,B=!a.value.visibility||A.filesPrivacy===a.value.visibility,D=!a.value.capacityMin||A.capacity>=parseFloat(a.value.capacityMin),T=!a.value.capacityMax||A.capacity<=parseFloat(a.value.capacityMax),V=!a.value.maxFileSizeMin||A.maxFileSize>=parseFloat(a.value.maxFileSizeMin),F=!a.value.maxFileSizeMax||A.maxFileSize<=parseFloat(a.value.maxFileSizeMax),_=!a.value.percentageMin||w>=parseFloat(a.value.percentageMin),R=!a.value.percentageMax||w<=parseFloat(a.value.percentageMax),I=!a.value.fileExpirationTimeMin||A.fileExpirationTime>=parseInt(a.value.fileExpirationTimeMin),N=!a.value.fileExpirationTimeMax||A.fileExpirationTime<=parseInt(a.value.fileExpirationTimeMax);return S&&B&&D&&T&&V&&F&&_&&R&&I&&N})),g=()=>{a.value={...t}},h=()=>{s.value=[],o.value=!0,We.fetchUserStorage().then(A=>{s.value=A.data.userStorageFetch}).catch(A=>console.error(A)).finally(()=>o.value=!1)},y=()=>{h(),d.value="success",l.value=!0},v=A=>{r.value=A};return n.onBeforeMount(()=>{h()}),(A,w)=>(n.openBlock(),n.createBlock(n.unref(Ha),{title:n.unref(e)("media.userStorage.title"),subtitle:n.unref(e)("media.userStorage.subtitle")},{list:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanels,{class:"mb-4"},{default:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanel,{elevation:"2"},{default:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanelTitle,null,{default:n.withCtx(()=>[n.createVNode(Q.VIcon,{icon:"mdi-filter-variant",class:"mr-2"}),n.createTextVNode(" "+n.toDisplayString(n.unref(e)("media.userStorage.filters")),1)]),_:1}),n.createVNode(Ne.VExpansionPanelText,null,{default:n.withCtx(()=>[n.createVNode(O.VRow,{dense:""},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(n.unref(Pi),{modelValue:a.value.user,"onUpdate:modelValue":w[0]||(w[0]=S=>a.value.user=S),label:n.unref(e)("media.userStorage.user"),filter:""},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(rt.VSelect,{modelValue:a.value.visibility,"onUpdate:modelValue":w[1]||(w[1]=S=>a.value.visibility=S),items:u.value,label:n.unref(e)("media.userStorage.filesPrivacy"),variant:"underlined",density:"compact",clearable:"","prepend-inner-icon":"mdi-eye"},null,8,["modelValue","items","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.capacityMin,"onUpdate:modelValue":w[2]||(w[2]=S=>a.value.capacityMin=S),type:"number",label:n.unref(e)("media.userStorage.capacityMin"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-arrow-up-bold-circle-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.capacityMax,"onUpdate:modelValue":w[3]||(w[3]=S=>a.value.capacityMax=S),type:"number",label:n.unref(e)("media.userStorage.capacityMax"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-arrow-down-bold-circle-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.maxFileSizeMin,"onUpdate:modelValue":w[4]||(w[4]=S=>a.value.maxFileSizeMin=S),type:"number",label:n.unref(e)("media.userStorage.maxFileSizeMin"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-file-upload-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.maxFileSizeMax,"onUpdate:modelValue":w[5]||(w[5]=S=>a.value.maxFileSizeMax=S),type:"number",label:n.unref(e)("media.userStorage.maxFileSizeMax"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-file-upload-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.percentageMin,"onUpdate:modelValue":w[6]||(w[6]=S=>a.value.percentageMin=S),type:"number",label:n.unref(e)("media.userStorage.percentageMin"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-percent-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.percentageMax,"onUpdate:modelValue":w[7]||(w[7]=S=>a.value.percentageMax=S),type:"number",label:n.unref(e)("media.userStorage.percentageMax"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-percent-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.fileExpirationTimeMin,"onUpdate:modelValue":w[8]||(w[8]=S=>a.value.fileExpirationTimeMin=S),type:"number",label:n.unref(e)("media.userStorage.fileExpirationTimeMin"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-clock-outline"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"3"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{modelValue:a.value.fileExpirationTimeMax,"onUpdate:modelValue":w[9]||(w[9]=S=>a.value.fileExpirationTimeMax=S),type:"number",label:n.unref(e)("media.userStorage.fileExpirationTimeMax"),variant:"underlined",density:"compact","prepend-inner-icon":"mdi-clock-outline"},null,8,["modelValue","label"])]),_:1})]),_:1}),n.createVNode(O.VRow,{dense:""},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",class:"text-right"},{default:n.withCtx(()=>[n.createVNode(H.VBtn,{size:"small",variant:"text",color:"secondary",onClick:g},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)("common.clearFilters")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),o.value?(n.openBlock(),n.createBlock(n.unref(Go),{key:0})):(n.openBlock(),n.createBlock(bt.VDataTable,{key:1,headers:f.value,items:k.value,class:"elevation-0",density:"compact",hover:"","items-per-page-options":[5,10,25,50,100],"items-per-page-text":n.unref(e)("common.itemsPerPageText")},{top:n.withCtx(()=>[n.createVNode(_e.VToolbar,{flat:"",color:"transparent"},{default:n.withCtx(()=>[n.createVNode(_e.VToolbarTitle,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)("media.userStorage.title2")),1)]),_:1}),n.createVNode(O.VSpacer),r.value?(n.openBlock(),n.createBlock(Kf,{key:0,open:!!r.value,"user-storage-form":r.value,onClose:w[10]||(w[10]=S=>r.value=null),onRoleUpdated:y},null,8,["open","user-storage-form"])):n.createCommentVNode("",!0)]),_:1})]),"item.fileExpirationTime":n.withCtx(({item:S})=>[n.createTextVNode(n.toDisplayString(S.fileExpirationTime)+" "+n.toDisplayString(n.unref(e)("media.userStorage.days")),1)]),"item.maxFileSize":n.withCtx(({item:S})=>[n.createTextVNode(n.toDisplayString(S.maxFileSize.toFixed(2))+" MB ",1)]),"item.capacity":n.withCtx(({item:S})=>[n.createTextVNode(n.toDisplayString(S.usedSpace.toFixed(2))+"/"+n.toDisplayString(S.capacity)+" MB ",1)]),"item.usedSpace":n.withCtx(({item:S})=>[n.createTextVNode(n.toDisplayString(p(S)),1)]),"item.filesPrivacy":n.withCtx(({item:S})=>[n.createTextVNode(n.toDisplayString(n.unref(e)("media.userStorage.privacy."+S.filesPrivacy)),1)]),"item.actions":n.withCtx(({item:S})=>[n.createVNode(H.VBtn,{variant:"outlined",size:"small",color:"secondary",onClick:B=>v(S)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)("media.userStorage.edit")),1)]),_:1},8,["onClick"])]),_:2},1032,["headers","items","items-per-page-text"])),n.createVNode(Oi.VSnackbar,{modelValue:l.value,"onUpdate:modelValue":w[12]||(w[12]=S=>l.value=S),timeout:c.value,color:d.value},{actions:n.withCtx(()=>[n.createVNode(H.VBtn,{color:"white",variant:"text",onClick:w[11]||(w[11]=S=>l.value=!1)},{default:n.withCtx(()=>[...w[13]||(w[13]=[n.createTextVNode(" X ",-1)])]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(e)("media.userStorage.updated"))+" ",1)]),_:1},8,["modelValue","timeout","color"])]),_:1},8,["title","subtitle"]))}},Jf={__name:"index",setup(i){return(e,t)=>(n.openBlock(),n.createBlock(O.VContainer,{fluid:""},{default:n.withCtx(()=>[n.createVNode(Zf)]),_:1}))}},eh={name:"MediaDocPage",components:{DocLayout:Sr}};function th(i,e,t,a,s,o){const r=n.resolveComponent("doc-layout");return n.openBlock(),n.createBlock(r,{title:i.$t("media.doc.title"),icon:"mdi-folder-information",color:"info",swagger:"","swagger-label":i.$t("media.doc.swagger")},{overview:n.withCtx(()=>[...e[0]||(e[0]=[n.createElementVNode("p",null," La Gestión de Medios es su centro de control para archivos y documentos. Aquí puede cargar imágenes, PDFs y otros archivos, organizarlos mediante etiquetas y controlar quién puede verlos. El sistema se encarga automáticamente de optimizar el espacio eliminando archivos temporales cuando ya no son necesarios. ",-1)])]),"how-to-use":n.withCtx(()=>[n.createVNode(Qt.VTimeline,{side:"end",align:"start",density:"compact"},{default:n.withCtx(()=>[n.createVNode(Qt.VTimelineItem,{"dot-color":"info",size:"x-small"},{default:n.withCtx(()=>[...e[1]||(e[1]=[n.createElementVNode("div",{class:"font-weight-bold"},"Subir Archivos",-1),n.createElementVNode("div",{class:"text-caption"},'Use el botón "Subir" en la gestión de archivos. Puede definir una fecha de expiración si el archivo es temporal.',-1)])]),_:1}),n.createVNode(Qt.VTimelineItem,{"dot-color":"info",size:"x-small"},{default:n.withCtx(()=>[...e[2]||(e[2]=[n.createElementVNode("div",{class:"font-weight-bold"},"Gestionar Almacenamiento",-1),n.createElementVNode("div",{class:"text-caption"},'Desde "Mi Almacenamiento" puede ver cuánto espacio está ocupando y sus límites permitidos.',-1)])]),_:1}),n.createVNode(Qt.VTimelineItem,{"dot-color":"info",size:"x-small"},{default:n.withCtx(()=>[...e[3]||(e[3]=[n.createElementVNode("div",{class:"font-weight-bold"},"Compartir y Previsualizar",-1),n.createElementVNode("div",{class:"text-caption"},"Haga clic en cualquier archivo para ver su contenido, obtener su enlace público o descargar una copia.",-1)])]),_:1})]),_:1})]),benefits:n.withCtx(()=>[n.createVNode(O.VRow,{"no-gutters":""},{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"6"},{default:n.withCtx(()=>[n.createVNode(ue.VListItem,{title:"Organización Inteligente",subtitle:"Etiquete sus archivos para encontrarlos rápidamente."})]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6"},{default:n.withCtx(()=>[n.createVNode(ue.VListItem,{title:"Limpieza Automática",subtitle:"Los archivos con fecha de expiración se borran solos al vencer."})]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6"},{default:n.withCtx(()=>[n.createVNode(ue.VListItem,{title:"Seguridad de Datos",subtitle:"Solo usted y los usuarios autorizados pueden acceder a sus archivos privados."})]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6"},{default:n.withCtx(()=>[n.createVNode(ue.VListItem,{title:"Multi-dispositivo",subtitle:"Acceda a sus documentos desde cualquier navegador o dispositivo."})]),_:1})]),_:1})]),faq:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanels,{variant:"accordion"},{default:n.withCtx(()=>[n.createVNode(Ne.VExpansionPanel,{title:"¿Qué pasa cuando un archivo expira?",text:"El sistema detecta automáticamente la fecha vencida y elimina el archivo físicamente para liberar espacio. Recibirá una notificación si el archivo era crítico."}),n.createVNode(Ne.VExpansionPanel,{title:"¿Hay un límite de tamaño?",text:"Sí, cada usuario tiene una cuota máxima asignada por el administrador. Puede verificar su estado en la sección de Almacenamiento."}),n.createVNode(Ne.VExpansionPanel,{title:"¿Quién puede ver mis archivos públicos?",text:"Cualquier persona que tenga el enlace directo, incluso si no ha iniciado sesión en el sistema."})]),_:1})]),_:1},8,["title","swagger-label"])}const xo=Yt(eh,[["render",th]]),ih=[{name:"FileManagementPage",path:"/file-management",component:Ao},{name:"UserStoragePage",path:"/user-storage",component:Jf,meta:{requeresAuth:!0,permission:"USER_STORAGE_SHOW_ALL"}},{name:"MediaDocPage",path:"/media-doc",component:xo,meta:{requiresAuth:!0}}],ah={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fileGlobalMetrics"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileGlobalMetrics"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"count"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"weight"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:122,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query fileGlobalMetrics{
556
+ fileGlobalMetrics{
557
+ count
558
+ weight
559
+ }
560
+ }`}}},nh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fileUserMetrics"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileUserMetrics"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:166,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query fileUserMetrics{
561
+ fileUserMetrics{
562
+ labels
563
+ dataset{
564
+ label
565
+ data
566
+ }
567
+ }
568
+ }`}}},sh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"almacenamientoPorUsuario"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"almacenamientoPorUsuario"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:212,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query almacenamientoPorUsuario{
569
+ almacenamientoPorUsuario{
570
+ labels
571
+ dataset{
572
+ label
573
+ data
574
+ backgroundColor
575
+ }
576
+ }
577
+ }`}}},oh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"cantidadArchivosPorUsuario"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cantidadArchivosPorUsuario"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dataset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"data"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:216,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:`query cantidadArchivosPorUsuario{
578
+ cantidadArchivosPorUsuario{
579
+ labels
580
+ dataset{
581
+ label
582
+ data
583
+ backgroundColor
584
+ }
585
+ }
586
+ }`}}};class rh{constructor(){this.gqlc=null}setGqlc(e){this.gqlc=e}fileGlobalMetrics(){return this.gqlc.query({query:ah,fetchPolicy:"network-only"})}fileUserMetrics(){return this.gqlc.query({query:nh,fetchPolicy:"network-only"})}almacenamientoPorUsuario(){return this.gqlc.query({query:sh,fetchPolicy:"network-only"})}cantidadArchivosPorUsuario(){return this.gqlc.query({query:oh,fetchPolicy:"network-only"})}}const lh=new rh,dh=["accept","disabled"],ch={class:"mb-0 mt-5"},Pa="initial",No="selected",Ba="uploaded",Oa="error",uh={__name:"FileUploadExpiration",props:{autoSubmit:{type:Boolean,default:!1},accept:{type:String,default:"*"},xLarge:{type:Boolean,default:!1}},emits:["filePicked","fileUploaded"],setup(i,{emit:e}){const{t}=se.useI18n(),a=i,s=e,o=n.ref(!1);n.ref(null);const r=n.ref(null),l=n.ref(null);n.ref({});const d=n.ref(null);n.ref(null);const c=n.ref(null),u=n.ref(Pa),f=n.ref(0),m=n.ref(null),p=n.ref(null),k=n.ref(!1),g=n.ref(!1),h=n.ref(!1),y=n.ref(null),v=n.ref([]),A=n.ref(null),w={initial:{color:"blue-grey",icon:"mdi-cloud-upload"},selected:{color:"cyan-darken-3",icon:"mdi-publish"},loading:{color:"amber-darken-3",icon:""},uploaded:{color:"green-darken-3",icon:"mdi-magnify-plus"},error:{color:"red-darken-3",icon:"mdi-alert"}},S=n.computed(()=>g.value?w.loading:w[u.value]),B=n.computed(()=>!!(c.value&&c.value.type==="image")),D=n.computed(()=>!!(c.value&&c.value.type==="audio")),T=n.computed(()=>!!(c.value&&c.value.type==="video")),V=n.computed(()=>c.value&&c.value.url?c.value.url:null),F=n.computed(()=>{if(m.value){const M=G(),L=G(m.value);return L.isValid()?L.diff(M,"day"):null}return null}),_=n.computed(()=>[()=>(k.value=!0,F.value===null?(k.value=!1,!0):F.value<0?t("media.userStorage.fileExpirationTimeOlderThanToday"):p.value&&F.value>=p.value?`${t("media.userStorage.fileExpirationLimitExceeded")} ${p.value} ${t("media.file.days")}`:(k.value=!1,!0))]),R=()=>{u.value===Pa?A.value.click():u.value===No?b():(u.value===Ba||u.value===Oa)&&(o.value=!0)},I=M=>{d.value=M.target.files[0],u.value=No;const L=M.target.files[0].size?M.target.files[0].size/(1024*1024):null;s("filePicked",L),a.autoSubmit&&b(L)},N=()=>We.findUserStorageByUser().then(M=>{M.data.userStorageFindByUser&&M.data.userStorageFindByUser.maxFileSize&&(f.value=M.data.userStorageFindByUser.maxFileSize,p.value=M.data.userStorageFindByUser.fileExpirationTime)}).catch(M=>console.error(M)),b=async M=>{if(d.value&&u.value!==Ba&&M<=f.value){g.value=!0;let L=m.value;if(L){const U=G(L);U.hour()===0&&U.minute()===0&&(L=U.hour(23).minute(59).toISOString())}return await Ht.uploadFile(d.value,L,h.value,y.value,v.value).then(U=>{c.value=U.data.fileUpload,C(Ba)}).catch(U=>{console.error("ERROR",U),C(Oa),P(U.message),l.value=!0}).finally(()=>g.value=!1),s("fileUploaded",c.value),c.value}else E()},x=()=>{l.value=!1,C(Pa)},E=()=>{C(Oa),P(`${t("media.file.fileSizeExceeded")} ${f.value} Mb`),l.value=!0},C=M=>{u.value=M},P=M=>{r.value=M};return n.onMounted(()=>{N()}),(M,L)=>(n.openBlock(),n.createBlock(O.VContainer,null,{default:n.withCtx(()=>[n.createVNode(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"6",md:"6"},{default:n.withCtx(()=>[n.createVNode(n.unref(rn),{modelValue:m.value,"onUpdate:modelValue":L[0]||(L[0]=U=>m.value=U),label:M.$t("media.file.expirationDate"),"prepend-inner-icon":"mdi-calendar-clock",color:"secondary","hide-details":"",rules:_.value},null,8,["modelValue","label","rules"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"6",md:"6"},{default:n.withCtx(()=>[n.createVNode(rt.VSelect,{"prepend-inner-icon":"mdi-eye",modelValue:h.value,"onUpdate:modelValue":L[1]||(L[1]=U=>h.value=U),items:[{title:"Público",value:!0},{title:"Privado",value:!1}],label:M.$t("media.file.visibility")},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"12",md:"12"},{default:n.withCtx(()=>[n.createVNode(Ua.VCombobox,{"prepend-inner-icon":"mdi-tag-multiple",modelValue:v.value,"onUpdate:modelValue":L[2]||(L[2]=U=>v.value=U),label:M.$t("media.file.tags"),multiple:"",chips:"",color:"secondary","item-color":"secondary"},null,8,["modelValue","label"])]),_:1}),n.createVNode(O.VCol,{cols:"12",sm:"12",md:"12"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{"prepend-inner-icon":"mdi-text-box",name:"filename",modelValue:y.value,"onUpdate:modelValue":L[3]||(L[3]=U=>y.value=U),label:M.$t("media.file.description"),placeholder:M.$t("media.file.description"),color:"secondary"},null,8,["modelValue","label","placeholder"])]),_:1})]),_:1}),n.createVNode(O.VContainer,{class:"mb-0 pb-0"},{default:n.withCtx(()=>[n.createElementVNode("input",{type:"file",style:{display:"none"},ref_key:"fileInput",ref:A,accept:i.accept,onChange:I,disabled:k.value},null,40,dh),n.createVNode(Wt.VMenu,{modelValue:l.value,"onUpdate:modelValue":L[5]||(L[5]=U=>l.value=U),"min-width":200,"close-on-content-click":!1,"close-on-click":!1,"offset-x":""},{activator:n.withCtx(({props:U})=>[n.createVNode(H.VBtn,n.mergeProps({onClick:L[4]||(L[4]=z=>R()),fab:"",color:S.value.color,loading:g.value,size:i.xLarge?"x-large":void 0},U),{default:n.withCtx(()=>[B.value?(n.openBlock(),n.createBlock(lt.VAvatar,{key:0},{default:n.withCtx(()=>[n.createVNode(dt.VImg,{src:V.value,alt:"image"},null,8,["src"])]),_:1})):D.value?(n.openBlock(),n.createBlock(Q.VIcon,{key:1},{default:n.withCtx(()=>[...L[6]||(L[6]=[n.createTextVNode("mdi-headset",-1)])]),_:1})):T.value?(n.openBlock(),n.createBlock(Q.VIcon,{key:2},{default:n.withCtx(()=>[...L[7]||(L[7]=[n.createTextVNode("mdi-videocam",-1)])]),_:1})):(n.openBlock(),n.createBlock(Q.VIcon,{key:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(S.value.icon),1)]),_:1}))]),_:1},16,["color","loading","size"])]),default:n.withCtx(()=>[n.createVNode(Y.VCard,{style:{width:"280px"},elevation:"0"},{default:n.withCtx(()=>[n.createVNode(Y.VCardText,{class:"pb-0 pa-0"},{default:n.withCtx(()=>[n.createVNode($e.VAlert,{class:"mb-0",border:"start",type:"error",variant:"outlined"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.value),1)]),_:1})]),_:1}),n.createVNode(Y.VCardActions,{class:"justify-center"},{default:n.withCtx(()=>[n.createVNode(H.VBtn,{text:"",color:"primary",onClick:x,class:"ml-2"},{default:n.withCtx(()=>[...L[8]||(L[8]=[n.createTextVNode("OK",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),n.createElementVNode("p",ch,n.toDisplayString(d.value==null?M.$t("media.file.chooseFile"):d.value.name),1)]),_:1})]),_:1}))}},mh=["accept"],La="initial",So="selected",Ia="uploaded",Ra="error",Co={__name:"FileUploadExpress",props:{autoSubmit:{type:Boolean,default:!1},accept:{type:String,default:"*"},xLarge:{type:Boolean,default:!1}},emits:["fileUploaded"],setup(i,{emit:e}){const{t}=se.useI18n(),a=i,s=e,o=n.ref(!1);n.ref(null);const r=n.ref(!1),l=n.ref("");n.ref({});const d=n.ref(null);n.ref(null);const c=n.ref(null),u=n.ref(La),f=n.ref(0),m=n.ref(!1),p=n.ref(null),k={initial:{color:"blue-grey",icon:"mdi-cloud-upload"},selected:{color:"cyan-darken-3",icon:"mdi-publish"},loading:{color:"amber-darken-3",icon:""},uploaded:{color:"green-darken-3",icon:"mdi-check"},error:{color:"red-darken-3",icon:"mdi-alert"}},g=n.computed(()=>m.value?k.loading:k[u.value]),h=n.computed(()=>!!(c.value&&c.value.type==="image")),y=n.computed(()=>!!(c.value&&c.value.type==="audio")),v=n.computed(()=>!!(c.value&&c.value.type==="video")),A=n.computed(()=>c.value&&c.value.url?c.value.url:null),w=()=>{u.value===La?p.value.click():u.value===So?D():(u.value===Ia||u.value===Ra)&&(o.value=!0)},S=R=>{d.value=R.target.files[0],u.value=So;const I=R.target.files[0].size?R.target.files[0].size/(1024*1024):null;a.autoSubmit&&D(I)},B=()=>We.findUserStorageByUser().then(R=>{R.data.userStorageFindByUser&&R.data.userStorageFindByUser.maxFileSize&&(f.value=R.data.userStorageFindByUser.maxFileSize)}).catch(R=>console.error(R)),D=R=>{d.value&&u.value!=Ia&&R<=f.value?(m.value=!0,Ht.uploadFile(d.value).then(I=>{F(Ia),c.value=I.data.fileUpload,s("fileUploaded",I.data.fileUpload)}).catch(I=>{console.log("ERROR",I),F(Ra),_(I.message),r.value=!0}).finally(()=>m.value=!1)):V()},T=()=>{r.value=!1,F(La)},V=()=>{F(Ra),_(`${t("media.file.fileSizeExceeded")} ${f.value} Mb`),r.value=!0},F=R=>{u.value=R},_=R=>{l.value=R};return n.onMounted(()=>{B()}),(R,I)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("input",{type:"file",style:{display:"none"},ref_key:"fileInput",ref:p,accept:i.accept,onChange:S},null,40,mh),n.createVNode(Wt.VMenu,{modelValue:r.value,"onUpdate:modelValue":I[1]||(I[1]=N=>r.value=N),"min-width":200,"close-on-content-click":!1,"close-on-click":!1,"offset-x":""},{activator:n.withCtx(({props:N})=>[n.createVNode(H.VBtn,n.mergeProps({onClick:I[0]||(I[0]=b=>w()),fab:"",color:g.value.color,loading:m.value,size:i.xLarge?"x-large":void 0},N),{default:n.withCtx(()=>[h.value?(n.openBlock(),n.createBlock(lt.VAvatar,{key:0},{default:n.withCtx(()=>[n.createVNode(dt.VImg,{src:A.value,alt:"image"},null,8,["src"])]),_:1})):y.value?(n.openBlock(),n.createBlock(Q.VIcon,{key:1},{default:n.withCtx(()=>[...I[2]||(I[2]=[n.createTextVNode("mdi-headset",-1)])]),_:1})):v.value?(n.openBlock(),n.createBlock(Q.VIcon,{key:2},{default:n.withCtx(()=>[...I[3]||(I[3]=[n.createTextVNode("mdi-videocam",-1)])]),_:1})):(n.openBlock(),n.createBlock(Q.VIcon,{key:3},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(g.value.icon),1)]),_:1}))]),_:1},16,["color","loading","size"])]),default:n.withCtx(()=>[n.createVNode(Y.VCard,{style:{width:"280px"},elevation:"0"},{default:n.withCtx(()=>[n.createVNode(Y.VCardText,{class:"pb-0 pa-0"},{default:n.withCtx(()=>[n.createVNode($e.VAlert,{class:"mb-0",border:"start",type:"error",variant:"outlined"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(l.value),1)]),_:1})]),_:1}),n.createVNode(Y.VCardActions,{class:"justify-center"},{default:n.withCtx(()=>[n.createVNode(H.VBtn,{text:"",color:"primary",onClick:T,class:"ml-2"},{default:n.withCtx(()=>[...I[4]||(I[4]=[n.createTextVNode("OK",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}},fh=["accept"],hh={__name:"FileUpload",props:{autoSubmit:{type:Boolean,default:!1}},emits:["fileUploaded"],setup(i,{expose:e,emit:t}){const a=i,s=t,o=n.ref("");n.ref({});const r=n.ref(null),l=n.ref("blue-grey"),d=n.ref("cloud_upload"),c=n.ref(!1),u=n.ref(null),f=n.ref("*"),m=n.ref(null),p=()=>{m.value.click()},k=h=>{r.value=h.target.files[0],l.value="green",d.value="publish",a.autoSubmit&&g()},g=()=>{r.value&&(c.value=!0,Ht.uploadFile(r.value).then(h=>{u.value=h,s("fileUploaded")}).catch(h=>{let y=new Zt(h);o.value=y.i18nMessage}).finally(()=>c.value=!1))};return e({upload:g}),(h,y)=>(n.openBlock(),n.createBlock(Y.VCard,{outlined:""},{default:n.withCtx(()=>[n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[n.createVNode(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{cols:"12",sm:"12"},{default:n.withCtx(()=>[n.createVNode(H.VBtn,{onClick:p,class:"mx-3",fab:"",color:l.value,loading:c.value},{default:n.withCtx(()=>[n.createVNode(Q.VIcon,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(d.value),1)]),_:1})]),_:1},8,["color","loading"]),n.createElementVNode("input",{type:"file",style:{display:"none"},ref_key:"fileInput",ref:m,accept:f.value,onChange:k},null,40,fh)]),_:1}),r.value&&r.value.name?(n.openBlock(),n.createBlock(O.VCol,{key:0,cols:"12",sm:"12"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.value.name),1)]),_:1})):n.createCommentVNode("",!0),o.value?(n.openBlock(),n.createBlock(O.VCol,{key:1,cols:"12"},{default:n.withCtx(()=>[n.createVNode($e.VAlert,{type:"error",variant:"outlined"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(h.$t(o.value)),1)]),_:1})]),_:1})):n.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1}))}},ph={__name:"MediaField",props:{fieldName:{type:String,required:!1,default:"file"},modelValue:{type:String,required:!0},label:{type:String,required:!1,default:"media.file.chooseFile"},accept:{type:String,default:"*"},icon:{type:String,required:!1,default:"mdi-paperclip"},isRequired:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update:modelValue","fileUploaded"],setup(i,{emit:e}){const t=i,a=e,s=n.computed({get(){return t.modelValue},set(r){a("update:modelValue",r)}}),o=r=>{a("fileUploaded",r),s.value=r.url};return(r,l)=>(n.openBlock(),n.createBlock(O.VRow,null,{default:n.withCtx(()=>[n.createVNode(O.VCol,{class:"flex-grow-1 flex-shrink-0"},{default:n.withCtx(()=>[n.createVNode(le.VTextField,{"prepend-inner-icon":i.icon,name:i.fieldName,modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=d=>s.value=d),label:r.$te(i.label)?r.$t(i.label):i.label,placeholder:i.label,error:r.hasInputErrors(i.fieldName),"error-messages":r.getInputErrors(i.fieldName),color:"secondary",rules:i.isRequired?r.required:[],readonly:i.readOnly},null,8,["prepend-inner-icon","name","modelValue","label","placeholder","error","error-messages","rules","readonly"])]),_:1}),n.createVNode(O.VCol,{class:"flex-shrink-0 flex-grow-0"},{default:n.withCtx(()=>[n.createVNode(n.unref(Co),{accept:i.accept,"auto-submit":!0,onFileUploaded:o},null,8,["accept"])]),_:1})]),_:1}))}},gh={name:"MediaDocCard"};function kh(i,e,t,a,s,o){return n.openBlock(),n.createBlock(Y.VCard,{class:"fill-height hover-card",onClick:e[0]||(e[0]=r=>i.$router.push({name:"MediaDocPage"}))},{default:n.withCtx(()=>[n.createVNode(Y.VCardItem,null,{prepend:n.withCtx(()=>[n.createVNode(Q.VIcon,{color:"info",size:"x-large"},{default:n.withCtx(()=>[...e[1]||(e[1]=[n.createTextVNode("mdi-folder-information",-1)])]),_:1})]),default:n.withCtx(()=>[n.createVNode(Y.VCardTitle,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.$t("media.doc.title")),1)]),_:1}),n.createVNode(Y.VCardSubtitle,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.$t("media.doc.subtitle")),1)]),_:1})]),_:1}),n.createVNode(Y.VCardText,null,{default:n.withCtx(()=>[...e[2]||(e[2]=[n.createTextVNode(" Manual de usuario para la carga, organización y gestión de archivos multimedia. ",-1)])]),_:1}),n.createVNode(Y.VCardActions,null,{default:n.withCtx(()=>[n.createVNode(O.VSpacer),n.createVNode(H.VBtn,{variant:"text",color:"info"},{default:n.withCtx(()=>[...e[3]||(e[3]=[n.createTextVNode("Ver Manual",-1)])]),_:1})]),_:1})]),_:1})}const yh=Yt(gh,[["render",kh],["__scopeId","data-v-0e37e224"]]),bh=function(i){var e=Math.floor(Math.log(i)/Math.log(1024)),t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];return(i/Math.pow(1024,e)).toFixed(2)*1+" "+t[e]},vh={computed:{redeableBytes(){return i=>bh(i)}}};$.FileCreate=bo,$.FileCrud=vo,$.FileDelete=po,$.FileForm=Fa,$.FileList=yo,$.FileManagementPage=Ao,$.FileMetricsProvider=lh,$.FileProvider=xt,$.FileShow=ko,$.FileUpdate=ho,$.FileUpload=hh,$.FileUploadButton=ln,$.FileUploadExpiration=uh,$.FileUploadExpress=Co,$.FileView=Ma,$.MediaDocCard=yh,$.MediaDocPage=xo,$.MediaField=ph,$.UploadProvider=Ht,$.UserStorageProvider=We,$.i18nMessages=zo,$.readableBytesMixin=vh,$.routes=ih,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}));