diff --git a/.docker/Dockerfile b/.docker/Dockerfile deleted file mode 100644 index 5e7fd85..0000000 --- a/.docker/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -# syntax=docker/dockerfile:1 - -# Comments are provided throughout this file to help you get started. -# If you need more help, visit the Dockerfile reference guide at -# https://docs.docker.com/engine/reference/builder/ - -ARG NODE_VERSION=21.1.0 - -FROM node:${NODE_VERSION}-alpine - -# Use production node environment by default. -ENV NODE_ENV production - - -WORKDIR /usr/src/app - -# Download dependencies as a separate step to take advantage of Docker's caching. -# Leverage a cache mount to /root/.yarn to speed up subsequent builds. -# Leverage a bind mounts to package.json and yarn.lock to avoid having to copy them into -# into this layer. -RUN --mount=type=bind,source=package.json,target=package.json \ - --mount=type=bind,source=yarn.lock,target=yarn.lock \ - --mount=type=cache,target=/root/.yarn \ - yarn install --production --frozen-lockfile - -# Run the application as a non-root user. -USER node - -# Copy the rest of the source files into the image. -COPY . . - -# Expose the port that the application listens on. -EXPOSE 3000 - -# Run the application. -CMD yarn dev diff --git a/.docker/compose.yaml b/.docker/compose.yaml deleted file mode 100644 index a50bdfd..0000000 --- a/.docker/compose.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Comments are provided throughout this file to help you get started. -# If you need more help, visit the Docker compose reference guide at -# https://docs.docker.com/compose/compose-file/ - -# Here the instructions define your application as a service called "server". -# This service is built from the Dockerfile in the current directory. -# You can add other services your application may depend on here, such as a -# database or a cache. For examples, see the Awesome Compose repository: -# https://github.com/docker/awesome-compose -services: - server: - build: - context: . - environment: - NODE_ENV: production - ports: - - 3000:3000 -# The commented out section below is an example of how to define a PostgreSQL -# database that your application can use. `depends_on` tells Docker Compose to -# start the database before your application. The `db-data` volume persists the -# database data between container restarts. The `db-password` secret is used -# to set the database password. You must create `db/password.txt` and add -# a password of your choosing to it before running `docker-compose up`. -# depends_on: -# db: -# condition: service_healthy -# db: -# image: postgres -# restart: always -# user: postgres -# secrets: -# - db-password -# volumes: -# - db-data:/var/lib/postgresql/data -# environment: -# - POSTGRES_DB=example -# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password -# expose: -# - 5432 -# healthcheck: -# test: [ "CMD", "pg_isready" ] -# interval: 10s -# timeout: 5s -# retries: 5 -# volumes: -# db-data: -# secrets: -# db-password: -# file: db/password.txt - diff --git a/.eslintrc.json b/.eslintrc.json index c42fec6..b82c6ba 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,7 +25,7 @@ "no-unused-vars": "error", "linebreak-style": "off", "import/extensions": "off", - "import/prefer-default-export": ["warn", { "target": "single" }], + "import/prefer-default-export": "off", "react-in-jsx-scope": "off", "react/require-default-props": "off", "react/react-in-jsx-scope": "off", @@ -47,7 +47,6 @@ { "namedComponents": "arrow-function" } ], "arrow-body-style": ["off", "always"], - "react/jsx-wrap-multilines": "off", - // "import/no-cycle": [2, { "ignoreExternal": true }] + "react/jsx-wrap-multilines": "off" } } diff --git a/.storybook/main.ts b/.storybook/main.ts index 4ff7fd0..c292fbf 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -11,7 +11,6 @@ const config: StorybookConfig = { "@storybook/addon-onboarding", "@storybook/addon-interactions", "@storybook/addon-themes", - "@storybook/test", "storybook-addon-mock", { name: "@storybook/addon-coverage", @@ -39,14 +38,14 @@ const config: StorybookConfig = { typescript: { reactDocgen: "react-docgen" // or false if you don't need docgen at all }, - build: { - test: { - disabledAddons: [ - "@storybook/addon-docs", - "@storybook/addon-essentials/docs" - ] - } - } + // build: { + // test: { + // disabledAddons: [ + // "@storybook/addon-docs", + // "@storybook/addon-essentials/docs" + // ] + // } + // } }; export default config; diff --git a/db.json b/db.json new file mode 100644 index 0000000..1c6a25b --- /dev/null +++ b/db.json @@ -0,0 +1,681 @@ +{ + "issues": [ + { + "id": "1", + "user_id": "1", + "issue_category_id": "1", + "resolver_id": "2", + "resume": "Problema de Rede", + "description": "A conexão com a internet está instável desde a manhã.", + "date": "2022-01-01", + "priority": "Alta", + "type": "Problema com a internet", + "unity": "Sede", + "sector": "TI", + "status": "Em Progresso", + "created_at": "2022-01-01T08:00:00Z", + "updated_at": "2022-01-01T09:00:00Z", + "closed_at": null, + "created_by": "João Silva", + "updated_by": "Maria Souza", + "closed_by": null + }, + { + "id": "2", + "user_id": "2", + "issue_category_id": "2", + "resolver_id": "3", + "resume": "Computador Lento", + "description": "O computador está demorando para iniciar e abrir programas.", + "date": "2022-02-01", + "priority": "Média", + "type": "Problema com a computador pessoal", + "unity": "Filial 1", + "sector": "Financeiro", + "status": "Aberto", + "created_at": "2022-02-01T10:00:00Z", + "updated_at": "2022-02-01T11:00:00Z", + "closed_at": null, + "created_by": "Ana Pereira", + "updated_by": "Carlos Lima", + "closed_by": null + }, + { + "id": "3", + "user_id": "3", + "issue_category_id": "3", + "resolver_id": "4", + "type": "Problema com a internet", + "resume": "Impressora Quebrada", + "description": "A impressora do escritório parou de funcionar.", + "date": "2022-03-01", + "priority": "Baixa", + "unity": "Filial 2", + "sector": "Administração", + "status": "Fechado", + "created_at": "2022-03-01T12:00:00Z", + "updated_at": "2022-03-01T13:00:00Z", + "closed_at": "2022-03-02T14:00:00Z", + "created_by": "Pedro Costa", + "updated_by": "Juliana Oliveira", + "closed_by": "Pedro Costa" + }, + { + "id": "4", + "user_id": "4", + "issue_category_id": "4", + "resolver_id": "5", + "resume": "Erro no Sistema", + "description": "O sistema de gestão está apresentando erros ao salvar registros.", + "date": "2022-04-01", + "priority": "Alta", + "unity": "Sede", + "sector": "Operações", + "status": "Em Progresso", + "created_at": "2022-04-01T15:00:00Z", + "updated_at": "2022-04-01T16:00:00Z", + "closed_at": null, + "created_by": "Mariana Souza", + "updated_by": "Bruno Silva", + "closed_by": null, + "type": "Problema do sistema" + }, + { + "id": "5", + "user_id": "5", + "issue_category_id": "5", + "resolver_id": "1", + "resume": "Solicitação de Acesso", + "description": "Solicitação de acesso ao servidor de arquivos.", + "date": "2022-05-01", + "priority": "Média", + "unity": "Filial 3", + "sector": "RH", + "status": "Aberto", + "created_at": "2022-05-01T08:00:00Z", + "updated_at": "2022-05-01T09:00:00Z", + "closed_at": null, + "created_by": "Felipe Almeida", + "updated_by": "Vanessa Gomes", + "closed_by": null, + "type": "Solicitação de acesso" + } + ], + "tickets": [ + { + "id": "1", + "user_id": "1", + "issue_category_id": "1", + "resolver_id": "2", + "resume": "Problema de Rede", + "description": "A conexão com a internet está instável desde a manhã.", + "date": "2022-01-01", + "priority": "Alta", + "unity": "Sede", + "sector": "TI", + "type": "Problema com a internet", + "status": "notStarted", + "created_at": "2022-01-01T08:00:00Z", + "updated_at": "2022-01-01T09:00:00Z", + "closed_at": null, + "created_by": "João Silva", + "updated_by": "Maria Souza", + "closed_by": null + }, + { + "id": "2", + "user_id": "2", + "issue_category_id": "2", + "resolver_id": "3", + "resume": "Computador Lento", + "description": "O computador está demorando para iniciar e abrir programas.", + "date": "2022-02-01", + "priority": "Média", + "type": "Problema com a computador pessoal", + "unity": "Filial 1", + "sector": "Financeiro", + "status": "Aberto", + "created_at": "2022-02-01T10:00:00Z", + "updated_at": "2022-02-01T11:00:00Z", + "closed_at": null, + "created_by": "Ana Pereira", + "updated_by": "Carlos Lima", + "closed_by": null + }, + { + "id": "3", + "user_id": "3", + "issue_category_id": "3", + "resolver_id": "4", + "resume": "Impressora Quebrada", + "description": "A impressora do escritório parou de funcionar.", + "date": "2022-03-01", + "priority": "Baixa", + "unity": "Filial 2", + "sector": "Administração", + "status": "Fechado", + "type": "Problema com a internet", + "created_at": "2022-03-01T12:00:00Z", + "updated_at": "2022-03-01T13:00:00Z", + "closed_at": "2022-03-02T14:00:00Z", + "created_by": "Pedro Costa", + "updated_by": "Juliana Oliveira", + "closed_by": "Pedro Costa" + }, + { + "id": "4", + "user_id": "4", + "issue_category_id": "4", + "resolver_id": "5", + "resume": "Erro no Sistema", + "description": "O sistema de gestão está apresentando erros ao salvar registros.", + "date": "2022-04-01", + "priority": "Alta", + "unity": "Sede", + "type": "Problema do sistema", + "sector": "Operações", + "status": "Em Progresso", + "created_at": "2022-04-01T15:00:00Z", + "updated_at": "2022-04-01T16:00:00Z", + "closed_at": null, + "created_by": "Mariana Souza", + "updated_by": "Bruno Silva", + "closed_by": null + }, + { + "id": "5", + "user_id": "5", + "issue_category_id": "5", + "resolver_id": "1", + "resume": "Solicitação de Acesso", + "description": "Solicitação de acesso ao servidor de arquivos.", + "type": "Solicitação de acesso", + "date": "2022-05-01", + "priority": "Média", + "unity": "Filial 3", + "sector": "RH", + "status": "Aberto", + "created_at": "2022-05-01T08:00:00Z", + "updated_at": "2022-05-01T09:00:00Z", + "closed_at": null, + "created_by": "Felipe Almeida", + "updated_by": "Vanessa Gomes", + "closed_by": null + } + ], + "users": [ + { + "id": "1", + "register": "123456", + "name": "João Silva", + "email": "joao.silva@empresa.com", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z", + "last_connection": "2022-01-01T00:00:00Z", + "is_banned": false, + "can_create_issue": true, + "is_resolver": true, + "role_id": "1", + "sector_id": "1", + "unity_id": "1", + "hash": "1234567890" + }, + { + "id": "2", + "register": "654321", + "name": "Ana Pereira", + "email": "ana.pereira@empresa.com", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z", + "last_connection": "2022-02-01T00:00:00Z", + "is_banned": false, + "can_create_issue": true, + "is_resolver": true, + "role_id": "2", + "sector_id": "2", + "unity_id": "2", + "hash": "0987654321" + }, + { + "id": "3", + "register": "112233", + "name": "Pedro Costa", + "email": "pedro.costa@empresa.com", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z", + "last_connection": "2022-03-01T00:00:00Z", + "is_banned": false, + "can_create_issue": true, + "is_resolver": true, + "role_id": "3", + "sector_id": "3", + "unity_id": "3", + "hash": "1122334455" + }, + { + "id": "4", + "register": "445566", + "name": "Mariana Souza", + "email": "mariana.souza@empresa.com", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z", + "last_connection": "2022-04-01T00:00:00Z", + "is_banned": false, + "can_create_issue": true, + "is_resolver": true, + "role_id": "4", + "sector_id": "4", + "unity_id": "4", + "hash": "2233445566" + }, + { + "id": "5", + "register": "778899", + "name": "Felipe Almeida", + "email": "felipe.almeida@empresa.com", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z", + "last_connection": "2022-05-01T00:00:00Z", + "is_banned": false, + "can_create_issue": true, + "is_resolver": true, + "role_id": "5", + "sector_id": "5", + "unity_id": "5", + "hash": "3344556677" + } + ], + "scores": [ + { + "id": "1", + "owner_id": "1", + "score": 5, + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "owner_id": "2", + "score": 4, + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "owner_id": "3", + "score": 3, + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "owner_id": "4", + "score": 2, + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "owner_id": "5", + "score": 1, + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "roles": [ + { + "id": "1", + "name": "Administrador", + "description": "Pode criar, atualizar e excluir problemas.", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "name": "Gerente", + "description": "Pode gerenciar usuários e visualizar relatórios.", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "name": "Usuário", + "description": "Pode criar e visualizar problemas.", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "name": "Convidado", + "description": "Pode visualizar problemas.", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "name": "Moderador", + "description": "Pode moderar conteúdo.", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "medias": [ + { + "id": "1", + "issue_id": "1", + "was_deleted": false, + "type": "imagem", + "url": "https://www.exemplo.com/media1.png", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "issue_id": "2", + "was_deleted": false, + "type": "vídeo", + "url": "https://www.exemplo.com/media2.mp4", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "issue_id": "3", + "was_deleted": false, + "type": "áudio", + "url": "https://www.exemplo.com/media3.mp3", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "issue_id": "4", + "was_deleted": false, + "type": "documento", + "url": "https://www.exemplo.com/media4.pdf", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "issue_id": "5", + "was_deleted": false, + "type": "imagem", + "url": "https://www.exemplo.com/media5.png", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "issue_categories": [ + { + "id": "1", + "name": "Rede", + "description": "Problemas relacionados à conexão de rede.", + "base_point": 5, + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "name": "Hardware", + "description": "Problemas relacionados a equipamentos de hardware.", + "base_point": 3, + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "name": "Software", + "description": "Problemas relacionados a software e aplicativos.", + "base_point": 4, + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "name": "Sistema", + "description": "Erros ou falhas em sistemas corporativos.", + "base_point": 5, + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "name": "Acesso", + "description": "Solicitações de acesso a sistemas ou arquivos.", + "base_point": 2, + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "events": [ + { + "id": "1", + "emitter_id": "1", + "description": "Atualização de Sistema", + "type": "info", + "visibility": "public", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "emitter_id": "2", + "description": "Manutenção Programada", + "type": "warning", + "visibility": "private", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "emitter_id": "3", + "description": "Falha no Servidor", + "type": "error", + "visibility": "public", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "emitter_id": "4", + "description": "Novo Funcionário", + "type": "info", + "visibility": "private", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "emitter_id": "5", + "description": "Política de Segurança Atualizada", + "type": "warning", + "visibility": "public", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "company": { + "id": "1", + "name": "L3 Tecnologia", + "description": "Empresa especializada em soluções tecnológicas.", + "nationality": "Brasil", + "logo": "https://www.exemplo.com/logo.png", + "type": "Tecnologia", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + "theme": [ + { + "id": "1", + "name": "Tema Claro", + "primary_color": "#FFFFFF", + "secondary_color": "#000000", + "tertiary_color": "#CCCCCC", + "description": "Tema com cores claras para melhor visualização.", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "name": "Tema Escuro", + "primary_color": "#000000", + "secondary_color": "#FFFFFF", + "tertiary_color": "#333333", + "description": "Tema com cores escuras para reduzir o cansaço visual.", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "name": "Tema Azul", + "primary_color": "#0000FF", + "secondary_color": "#FFFFFF", + "tertiary_color": "#ADD8E6", + "description": "Tema com predominância de azul para tranquilidade.", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "name": "Tema Verde", + "primary_color": "#008000", + "secondary_color": "#FFFFFF", + "tertiary_color": "#00FF00", + "description": "Tema com predominância de verde para harmonia.", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "name": "Tema Vermelho", + "primary_color": "#FF0000", + "secondary_color": "#FFFFFF", + "tertiary_color": "#FFA07A", + "description": "Tema com predominância de vermelho para energia.", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "departments": [ + { + "id": "1", + "name": "TI", + "description": "Departamento de Tecnologia da Informação.", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "name": "Financeiro", + "description": "Departamento Financeiro.", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "name": "Administração", + "description": "Departamento Administrativo.", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "name": "Operações", + "description": "Departamento de Operações.", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "name": "RH", + "description": "Departamento de Recursos Humanos.", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "sectors": [ + { + "id": "1", + "name": "Infraestrutura", + "description": "Setor responsável pela infraestrutura de TI.", + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "name": "Desenvolvimento", + "description": "Setor de desenvolvimento de software.", + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "name": "Suporte", + "description": "Setor de suporte técnico.", + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "name": "Comercial", + "description": "Setor comercial e de vendas.", + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "name": "Marketing", + "description": "Setor de marketing e comunicação.", + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ], + "unities": [ + { + "id": "1", + "name": "Sede", + "description": "Unidade sede da empresa.", + "nationality": "Brasil", + "isBase": true, + "created_at": "2022-01-01T00:00:00Z", + "updated_at": "2022-01-01T00:00:00Z" + }, + { + "id": "2", + "name": "Filial 1", + "description": "Primeira filial da empresa.", + "nationality": "Brasil", + "isBase": false, + "created_at": "2022-02-01T00:00:00Z", + "updated_at": "2022-02-01T00:00:00Z" + }, + { + "id": "3", + "name": "Filial 2", + "description": "Segunda filial da empresa.", + "nationality": "Brasil", + "isBase": false, + "created_at": "2022-03-01T00:00:00Z", + "updated_at": "2022-03-01T00:00:00Z" + }, + { + "id": "4", + "name": "Filial 3", + "description": "Terceira filial da empresa.", + "nationality": "Brasil", + "isBase": false, + "created_at": "2022-04-01T00:00:00Z", + "updated_at": "2022-04-01T00:00:00Z" + }, + { + "id": "5", + "name": "Filial 4", + "description": "Quarta filial da empresa.", + "nationality": "Brasil", + "isBase": false, + "created_at": "2022-05-01T00:00:00Z", + "updated_at": "2022-05-01T00:00:00Z" + } + ] +} diff --git a/next.config.js b/next.config.js index 45f1163..db59f30 100644 --- a/next.config.js +++ b/next.config.js @@ -6,22 +6,19 @@ const nextConfig = { }, compiler: { styledComponents: true, - removeConsole: process.env.NODE_ENV === "production" + removeConsole: process.env.NODE_ENV === "production", }, pageExtensions: ["mdx", "md", "jsx", "js", "tsx", "ts"], experimental: { - webVitalsAttribution: ["CLS", "LCP", "FCP", "FID", "TTFB", "INP"] + webVitalsAttribution: ["CLS", "LCP", "FCP", "FID", "TTFB", "INP"], + serverActions: true, + optimizeCss: true, }, - // logging: { - // fetches: { - // fullUrl: true - // } - // }, optimizeFonts: true, env: { NEXT_PUBLIC_APIS_BASE_URL: process.env.NEXT_PUBLIC_APIS_BASE_URL, - NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL - } + NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL, + }, }; const withPWA = require("next-pwa")({ @@ -31,7 +28,7 @@ const withPWA = require("next-pwa")({ register: true, scope: "/", sw: "sw.js", - reloadOnOnline: true + reloadOnOnline: true, }); module.exports = withPWA(nextConfig); diff --git a/package.json b/package.json index b56600c..2321012 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "services", - "version": "0.1.0", + "version": "0.1.10", "private": true, "repository": { "type": "git", @@ -24,21 +24,21 @@ "build-storybook": "storybook build", "chromatic": "npx chromatic --project-token=chpt_79aa966e7eb4a6e --auto-accept-changes", "test-storybook": "test-storybook", - "prepare": "husky" + "json-server": "json-server --watch db.json --port 4000" }, "dependencies": { - "@emotion/is-prop-valid": "^1.2.1", + "@emotion/is-prop-valid": "~1.2.1", "@phosphor-icons/react": "^2.0.15", - "@react-spring/web": "^9.7.3", + "@react-spring/web": "~9.7.3", "@uidotdev/usehooks": "^2.4.1", - "@use-gesture/react": "^10.3.0", + "@use-gesture/react": "~10.3.0", "@vercel/analytics": "^1.1.1", "@vercel/speed-insights": "^1.0.2", - "axios": "^1.4.0", + "axios": "~1.6.4", "immer": "^10.0.3", - "next": "13.5.6", + "next": "~13.5.6", "next-pwa": "^5.6.0", - "react": "^18.2.0", + "react": "~18.2.0", "react-cookie": "^7.0.2", "react-dom": "^18.2.0", "react-hook-form": "^7.49.2", @@ -49,24 +49,23 @@ "styled-components": "^6.1.0", "swr": "^2.2.4", "usehooks-ts": "^2.14.0", - "zustand": "^4.5.0" + "zustand": "~4.5.0" }, "devDependencies": { "@babel/eslint-parser": "^7.23.3", "@babel/preset-react": "^7.23.3", "@next/eslint-plugin-next": "^14.1.0", "@playwright/test": "^1.39.0", - "@storybook/addon-coverage": "^1.0.0", - "@storybook/addon-essentials": "^7.6.7", - "@storybook/addon-interactions": "^7.6.7", - "@storybook/addon-links": "^7.6.7", - "@storybook/addon-mdx-gfm": "^7.6.7", - "@storybook/addon-onboarding": "^1.0.10", - "@storybook/addon-themes": "^7.6.7", - "@storybook/blocks": "^7.6.7", - "@storybook/nextjs": "^7.6.7", - "@storybook/react": "^7.6.7", - "@storybook/test": "^8.0.0-alpha.7", + "@storybook/addon-coverage": "~1.0.0", + "@storybook/addon-essentials": "~7.6.7", + "@storybook/addon-interactions": "~7.6.7", + "@storybook/addon-links": "~7.6.7", + "@storybook/addon-mdx-gfm": "~7.6.7", + "@storybook/addon-onboarding": "~1.0.10", + "@storybook/addon-themes": "~7.6.7", + "@storybook/blocks": "~7.6.7", + "@storybook/nextjs": "~7.6.7", + "@storybook/react": "~7.6.7", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", @@ -93,13 +92,13 @@ "eslint-plugin-sonarjs": "^0.15.0", "eslint-plugin-storybook": "^0.6.15", "eslint-plugin-tsdoc": "^0.2.17", - "husky": "^9.0.10", + "json-server": "^1.0.0-beta.1", "lint-staged": "^15.2.2", "postcss-styled-syntax": "^0.5.0", "prettier": "3.2.5", - "storybook": "^7.6.7", - "storybook-addon-mock": "^4.3.0", - "typescript": "*" + "storybook": "~7.6.7", + "storybook-addon-mock": "~4.3.0", + "typescript": "~5.4.0" }, "browserslist": { "production": [ diff --git a/public/sw.js b/public/sw.js index e025bf8..d96f6e6 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1 +1 @@ -if(!self.define){let e,a={};const i=(i,r)=>(i=new URL(i+".js",r).href,a[i]||new Promise((a=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=a,document.head.appendChild(e)}else e=i,importScripts(i),a()})).then((()=>{let e=a[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(r,o)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(a[n])return;let s={};const d=e=>i(e,n),c={module:{uri:n},exports:s,require:d};a[n]=Promise.all(r.map((e=>c[e]||d(e)))).then((e=>(o(...e),s)))}}define(["./workbox-9b4d2a02"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/Icon.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/_next/app-build-manifest.json",revision:"4c707c074c06322dbcc13a5a04422b28"},{url:"/_next/static/build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)/_buildManifest.js",revision:"50654c4134ba6f71b423498e9447ee91"},{url:"/_next/static/build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/158-34f28f1b14f67af7.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/232-a617c6beb6aaa9c0.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/241-49f7be63d5ca427a.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/248-62f24d6e291ff2da.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/46-46a75a45bd4d2ab8.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/691-aab63ddd9d72ff01.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/700-d9212dd0bd5c57ed.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/865-b45f5db445d63c9b.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/927-5de7ef95ce3c19cc.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/(form)/abrir-chamado/page-46028e2cef25f079.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/(form)/anexar-midia/page-2b87e1187df0b256.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/(form)/confirmar-chamado/page-c11bc9a119fdb108.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/(form)/template-97db1b32f4e93649.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/chamado/%5Bid%5D/page-3976fde38d86d6d4.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/chamados/page-426432dbb8003d26.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/loading-a80de03e4b4e3dea.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/pesquisa/page-e8b52438ab96bb71.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/solicitacoes/page-6e5fc7dc8f7cb743.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(app)/template-d40629b1439e1178.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/_not-found-fed15faf18f85329.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/layout-488e8cb35dc13c82.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/login/page-76e389390f908e2f.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/noMobileDevice/page-ab73df6fffb692f4.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/page-f46ab95962c65629.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/fd9d1056-bd8496758a3cc287.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/framework-e0e41f02371372fd.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/main-a3ec1f84bac1fd48.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/main-app-2e717ffa9f758063.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/pages/_app-1534f180665c857f.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/pages/_error-b646007f40c4f0a8.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js",revision:"837c0df77fd5009c9e46d446188ecfd0"},{url:"/_next/static/chunks/webpack-6b90b1575fae65ff.js",revision:"build-id-Mon Mar 25 2024 02:15:54 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/css/c9a3b95e60d92791.css",revision:"c9a3b95e60d92791"},{url:"/_next/static/media/05a31a2ca4975f99-s.woff2",revision:"f1b44860c66554b91f3b1c81556f73ca"},{url:"/_next/static/media/513657b02c5c193f-s.woff2",revision:"c4eb7f37bc4206c901ab08601f21f0f2"},{url:"/_next/static/media/51ed15f9841b9f9d-s.woff2",revision:"bb9d99fb9bbc695be80777ca2c1c2bee"},{url:"/_next/static/media/AddButtonAlt.d8e806ec.png",revision:"0a4a435e5bf43d945a705d5f4054b412"},{url:"/_next/static/media/ClearIcon.2223e2b9.png",revision:"c46b05b42c93999ec47e0242a7f8bfe0"},{url:"/_next/static/media/Lock.85654139.png",revision:"d62072be5e0c1eae7c7521ea466a3db8"},{url:"/_next/static/media/MailIcon.ff317613.png",revision:"593a57dfb3d079e6ddf7ba9ae48007cd"},{url:"/_next/static/media/android-launchericon-512-512.d1d7ef25.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2",revision:"74c3556b9dad12fb76f84af53ba69410"},{url:"/_next/static/media/d6b16ce4a6175f26-s.woff2",revision:"dd930bafc6297347be3213f22cc53d3e"},{url:"/_next/static/media/ec159349637c90ad-s.woff2",revision:"0e89df9522084290e01e4127495fae99"},{url:"/_next/static/media/eye.78eae9a0.svg",revision:"e64d226216c95f3b916eb7cc2a4700e5"},{url:"/_next/static/media/eyeClosed.f86bc0e9.svg",revision:"9d678a8064aa872cf1cacfbcd0d0e16f"},{url:"/_next/static/media/fd4db3eb5472fc27-s.woff2",revision:"71f3fcaf22131c3368d9ec28ef839831"},{url:"/_next/static/media/filter.707c6605.svg",revision:"b617ac7c1147f9afe0a71f75fc0ef9f3"},{url:"/_next/static/media/login.c7e92d00.svg",revision:"471cab323d9944b90c6727f5f705c663"},{url:"/_next/static/media/loginDisabled.01ce736c.svg",revision:"4b2a6926f3ab9f8c3d160e3953a2b60b"},{url:"/_next/static/media/qr-code.1993bbd4.png",revision:"b18a6ebe247c39cc57a806a3595c34f1"},{url:"/android/android-launchericon-144-144.png",revision:"f814235ecc1caf5721b5493bbb3e2ecc"},{url:"/android/android-launchericon-192-192.png",revision:"f9c5e294998c225573ced06412cc4b1c"},{url:"/android/android-launchericon-48-48.png",revision:"a1ecec6b5190e5455c67cd1080a9afe9"},{url:"/android/android-launchericon-512-512.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/android/android-launchericon-72-72.png",revision:"5d4d38d2d95189c321c31244bfd9a158"},{url:"/android/android-launchericon-96-96.png",revision:"5b0c8a9833a11f0f0a1323960a272ea8"},{url:"/favicon-16x16.png",revision:"86de5f3ab519bde0347886481f1ff8de"},{url:"/favicon-32x32.png",revision:"3d930ec700a41a0e9dedadc74f83e8c0"},{url:"/favicon.ico",revision:"da3885953794d5f6e393596785ead858"},{url:"/ios/100.png",revision:"b15137bed41f81dc34167b0568922d76"},{url:"/ios/1024.png",revision:"422034c42021f08f57834b86d0edd1a8"},{url:"/ios/114.png",revision:"8cb48e6afeb93c6fb35bc0c9ebb66204"},{url:"/ios/120.png",revision:"e684eea7db581517a7d2ea85436eb8d3"},{url:"/ios/128.png",revision:"23a9ddb5002bc3558bab3985dbb6bb0c"},{url:"/ios/144.png",revision:"f814235ecc1caf5721b5493bbb3e2ecc"},{url:"/ios/152.png",revision:"a27dd3af9d7e494848691da556c212c6"},{url:"/ios/16.png",revision:"f33cf92fa22b824ec414276b60623cf0"},{url:"/ios/167.png",revision:"cd7e2d1a853c7e4ac0756f84ce23763f"},{url:"/ios/180.png",revision:"95ba9140927dd56c49c5273d3756b89d"},{url:"/ios/192.png",revision:"f9c5e294998c225573ced06412cc4b1c"},{url:"/ios/20.png",revision:"e14a3647352b43851c53685f38c22300"},{url:"/ios/256.png",revision:"20a720811bcac0d346e3c08fbf80f361"},{url:"/ios/29.png",revision:"075eb72b649f1b1de54192c285c0976a"},{url:"/ios/32.png",revision:"f6eaf95bb042d3e5858f3ceb4a29084d"},{url:"/ios/40.png",revision:"db4237b5f8b7e0d9ea087061ad2693e8"},{url:"/ios/50.png",revision:"48b338c5928a745d4dff9b0c968c85d9"},{url:"/ios/512.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/ios/57.png",revision:"bb496a7607f5f1f5a2dc520ea5324495"},{url:"/ios/58.png",revision:"209dd68ff9b3115d2b5ed0d88f86e757"},{url:"/ios/60.png",revision:"3df09500abecb83facb65f6babe9a51c"},{url:"/ios/64.png",revision:"d0e2a07c3e09ade2e3c10be89c3bc6a2"},{url:"/ios/72.png",revision:"5d4d38d2d95189c321c31244bfd9a158"},{url:"/ios/76.png",revision:"49c0e46a288e4dce2e81ece4d4d3d599"},{url:"/ios/80.png",revision:"10abe399b6a6a0c371d53d70d79816eb"},{url:"/ios/87.png",revision:"e4af64735ba81d4133418c56921d163c"},{url:"/manifest.json",revision:"5d2666c2c8513398f5e17ab9f076257d"},{url:"/offline.html",revision:"a5be0e70d9b066f17379afe5b49dcd47"},{url:"/qr-code.png",revision:"b18a6ebe247c39cc57a806a3595c34f1"},{url:"/windows11/LargeTile.scale-100.png",revision:"ae5285bd15ecc80b524a194e4c392dd1"},{url:"/windows11/LargeTile.scale-125.png",revision:"916edc3bf98626787c83e1d580f4c5d6"},{url:"/windows11/LargeTile.scale-150.png",revision:"3e72e75f7ffaf33fdbde245b69f469c0"},{url:"/windows11/LargeTile.scale-200.png",revision:"23b518620fcec731dd1171ce3af41486"},{url:"/windows11/LargeTile.scale-400.png",revision:"4949d0d6e23d651230e1826e4aa144d6"},{url:"/windows11/SmallTile.scale-100.png",revision:"09ccbc2e3b1afd9b5e23b6522e927355"},{url:"/windows11/SmallTile.scale-125.png",revision:"f273a93ae2575760b7db00a496eee5dd"},{url:"/windows11/SmallTile.scale-150.png",revision:"27dcd138ad77b1834bec0dca410d62bb"},{url:"/windows11/SmallTile.scale-200.png",revision:"f812128149beca8d55d94d0d5ae26e90"},{url:"/windows11/SmallTile.scale-400.png",revision:"5451730dca3fabbbecc46986b51bf882"},{url:"/windows11/SplashScreen.scale-100.png",revision:"faad67ca14726e95962ed88ea59f72ab"},{url:"/windows11/SplashScreen.scale-125.png",revision:"94f023b55232dba0ea837fb314c4d043"},{url:"/windows11/SplashScreen.scale-150.png",revision:"5bb8a6051b717827b74c92c397c0bfab"},{url:"/windows11/SplashScreen.scale-200.png",revision:"b142148c19fd57092bcf45c5c7508219"},{url:"/windows11/SplashScreen.scale-400.png",revision:"84705a8fd5a653d9ce0957d0d675d935"},{url:"/windows11/Square150x150Logo.scale-100.png",revision:"b677c708618539a8dda4ab2e75455274"},{url:"/windows11/Square150x150Logo.scale-125.png",revision:"ebbc62c7e8632e526a27c5339d54ceff"},{url:"/windows11/Square150x150Logo.scale-150.png",revision:"f4c44c152dfdedf10cb5998f20a86a1f"},{url:"/windows11/Square150x150Logo.scale-200.png",revision:"05ec482f24af703ecf35f0b34bfaaff0"},{url:"/windows11/Square150x150Logo.scale-400.png",revision:"eb4a2f57fb734103285b1f7feae29fb6"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png",revision:"a3637e6f21ae0ae7c6c713bd4690664a"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png",revision:"09f0dbfc2f6eae3c52167817d53346d7"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png",revision:"d09294cc2aeb4f85b7f954977ce97029"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png",revision:"1551dded7e55e6bcb147215b3819a09f"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png",revision:"3a3a71e10797731c081d3746f74cd121"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png",revision:"3acb97995355f85d9051de04ec60a253"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png",revision:"87fca055afe317c6f4c0d9412d4f336e"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png",revision:"6844c3b7eedf81c1588a9fb74bda2fdb"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png",revision:"8cfb04f57e65fbe524dbf5a8a7cd4459"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png",revision:"7a775eb7ced0d61a48cdb2bd036baf0a"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png",revision:"ef14cf4a2587a355b1d1938f58926465"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png",revision:"28d528d55f33503c2edb7447a975c91e"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png",revision:"b01765ecc38181ecc9d23097af604a49"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png",revision:"a9162f8c33cb55707b22d20c974b1f98"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-16.png",revision:"a3637e6f21ae0ae7c6c713bd4690664a"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-20.png",revision:"09f0dbfc2f6eae3c52167817d53346d7"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-24.png",revision:"d09294cc2aeb4f85b7f954977ce97029"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-256.png",revision:"1551dded7e55e6bcb147215b3819a09f"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-30.png",revision:"3a3a71e10797731c081d3746f74cd121"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-32.png",revision:"3acb97995355f85d9051de04ec60a253"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-36.png",revision:"87fca055afe317c6f4c0d9412d4f336e"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-40.png",revision:"6844c3b7eedf81c1588a9fb74bda2fdb"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-44.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-48.png",revision:"8cfb04f57e65fbe524dbf5a8a7cd4459"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-60.png",revision:"7a775eb7ced0d61a48cdb2bd036baf0a"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-64.png",revision:"ef14cf4a2587a355b1d1938f58926465"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-72.png",revision:"28d528d55f33503c2edb7447a975c91e"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-80.png",revision:"b01765ecc38181ecc9d23097af604a49"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-96.png",revision:"a9162f8c33cb55707b22d20c974b1f98"},{url:"/windows11/Square44x44Logo.scale-100.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.scale-125.png",revision:"503357130173deac81a4e85345b7dbb8"},{url:"/windows11/Square44x44Logo.scale-150.png",revision:"0a6e0339336ff2a4495d5743f4bb7deb"},{url:"/windows11/Square44x44Logo.scale-200.png",revision:"882a6e664d32be7c2d903771d6f1b562"},{url:"/windows11/Square44x44Logo.scale-400.png",revision:"55911e5c72e28463d263d011b33296d9"},{url:"/windows11/Square44x44Logo.targetsize-16.png",revision:"a3637e6f21ae0ae7c6c713bd4690664a"},{url:"/windows11/Square44x44Logo.targetsize-20.png",revision:"09f0dbfc2f6eae3c52167817d53346d7"},{url:"/windows11/Square44x44Logo.targetsize-24.png",revision:"d09294cc2aeb4f85b7f954977ce97029"},{url:"/windows11/Square44x44Logo.targetsize-256.png",revision:"1551dded7e55e6bcb147215b3819a09f"},{url:"/windows11/Square44x44Logo.targetsize-30.png",revision:"3a3a71e10797731c081d3746f74cd121"},{url:"/windows11/Square44x44Logo.targetsize-32.png",revision:"3acb97995355f85d9051de04ec60a253"},{url:"/windows11/Square44x44Logo.targetsize-36.png",revision:"87fca055afe317c6f4c0d9412d4f336e"},{url:"/windows11/Square44x44Logo.targetsize-40.png",revision:"6844c3b7eedf81c1588a9fb74bda2fdb"},{url:"/windows11/Square44x44Logo.targetsize-44.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.targetsize-48.png",revision:"8cfb04f57e65fbe524dbf5a8a7cd4459"},{url:"/windows11/Square44x44Logo.targetsize-60.png",revision:"7a775eb7ced0d61a48cdb2bd036baf0a"},{url:"/windows11/Square44x44Logo.targetsize-64.png",revision:"ef14cf4a2587a355b1d1938f58926465"},{url:"/windows11/Square44x44Logo.targetsize-72.png",revision:"28d528d55f33503c2edb7447a975c91e"},{url:"/windows11/Square44x44Logo.targetsize-80.png",revision:"b01765ecc38181ecc9d23097af604a49"},{url:"/windows11/Square44x44Logo.targetsize-96.png",revision:"a9162f8c33cb55707b22d20c974b1f98"},{url:"/windows11/StoreLogo.scale-100.png",revision:"48b338c5928a745d4dff9b0c968c85d9"},{url:"/windows11/StoreLogo.scale-125.png",revision:"d4a689725e7dc6422c8855f55af15f75"},{url:"/windows11/StoreLogo.scale-150.png",revision:"fc06d5249229158ba9142f7999d0d5bf"},{url:"/windows11/StoreLogo.scale-200.png",revision:"b15137bed41f81dc34167b0568922d76"},{url:"/windows11/StoreLogo.scale-400.png",revision:"cc7b8edd1729eeb8b32d9aaa7fd45e3e"},{url:"/windows11/Wide310x150Logo.scale-100.png",revision:"69d6243a8d5059b09c9d58baf8a31e0a"},{url:"/windows11/Wide310x150Logo.scale-125.png",revision:"820b9dee006fd9718292def060d0dba4"},{url:"/windows11/Wide310x150Logo.scale-150.png",revision:"686431086b2523f11fbf0325fd2731f4"},{url:"/windows11/Wide310x150Logo.scale-200.png",revision:"faad67ca14726e95962ed88ea59f72ab"},{url:"/windows11/Wide310x150Logo.scale-400.png",revision:"b142148c19fd57092bcf45c5c7508219"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:a,event:i,state:r})=>a&&"opaqueredirect"===a.type?new Response(a.body,{status:200,statusText:"OK",headers:a.headers}):a}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const a=e.pathname;return!a.startsWith("/api/auth/")&&!!a.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")})); +if(!self.define){let e,i={};const a=(a,r)=>(a=new URL(a+".js",r).href,i[a]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=i,document.head.appendChild(e)}else e=a,importScripts(a),i()})).then((()=>{let e=i[a];if(!e)throw new Error(`Module ${a} didn’t register its module`);return e})));self.define=(r,o)=>{const d=e||("document"in self?document.currentScript.src:"")||location.href;if(i[d])return;let s={};const n=e=>a(e,d),c={module:{uri:d},exports:s,require:n};i[d]=Promise.all(r.map((e=>c[e]||n(e)))).then((e=>(o(...e),s)))}}define(["./workbox-1bb06f5e"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/Icon.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/_next/app-build-manifest.json",revision:"73b9cc7cdd61fde8f2e0ddbfa5aec8e5"},{url:"/_next/static/build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)/_buildManifest.js",revision:"50654c4134ba6f71b423498e9447ee91"},{url:"/_next/static/build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/138-98b1bae1a60a22f9.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/163-22ff19a474558e31.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/187-16296472be52aa59.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/417-14237ae6a5630dbe.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/66-0ab18631cda6f235.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/691-76bafbec71164fb6.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/771-8469d838a7907db9.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/808-d104d3f4c892ce45.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/865-8fd3f8cfbdf9aaa6.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/948-15a58dd4c013841d.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/(form)/abrir-chamado/page-c660cc7fa4115cdc.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/(form)/anexar-midia/page-e989e03047f8504d.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/(form)/confirmar-chamado/page-6392dfa61d628526.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/(form)/template-71b0f7c0aa9f1359.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/chamado/%5Bid%5D/page-dbbab6fd97d08ca9.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/chamados/page-4c0215ab96082a77.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/loading-242be2cfa290035a.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/pesquisa/page-d626f0dd10c37d11.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/solicitacoes/page-46fdd384c5574751.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/(protected)/template-18dcf8dec7f409dc.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/_not-found-7910e16191b67697.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/layout-02b9d3a20e1b0bf9.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/login/page-1e9ed1f66baecb99.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/noMobileDevice/page-7bf36f423cb087dc.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/app/page-089f622b532ee281.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/bf6a786c-079166cc51fd7d53.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/framework-a21167c8f5bb4ce2.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/main-4b51f66471fc86ca.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/main-app-12875897a12ac6b1.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/pages/_app-1534f180665c857f.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/pages/_error-b646007f40c4f0a8.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js",revision:"837c0df77fd5009c9e46d446188ecfd0"},{url:"/_next/static/chunks/webpack-6b90b1575fae65ff.js",revision:"build-id-Fri Jul 19 2024 08:39:49 GMT-0300 (Horário Padrão de Brasília)"},{url:"/_next/static/css/c9a3b95e60d92791.css",revision:"c9a3b95e60d92791"},{url:"/_next/static/media/05a31a2ca4975f99-s.woff2",revision:"f1b44860c66554b91f3b1c81556f73ca"},{url:"/_next/static/media/513657b02c5c193f-s.woff2",revision:"c4eb7f37bc4206c901ab08601f21f0f2"},{url:"/_next/static/media/51ed15f9841b9f9d-s.woff2",revision:"bb9d99fb9bbc695be80777ca2c1c2bee"},{url:"/_next/static/media/AddButtonAlt.d8e806ec.png",revision:"0a4a435e5bf43d945a705d5f4054b412"},{url:"/_next/static/media/ClearIcon.2223e2b9.png",revision:"c46b05b42c93999ec47e0242a7f8bfe0"},{url:"/_next/static/media/Lock.85654139.png",revision:"d62072be5e0c1eae7c7521ea466a3db8"},{url:"/_next/static/media/MailIcon.ff317613.png",revision:"593a57dfb3d079e6ddf7ba9ae48007cd"},{url:"/_next/static/media/android-launchericon-512-512.d1d7ef25.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2",revision:"74c3556b9dad12fb76f84af53ba69410"},{url:"/_next/static/media/d6b16ce4a6175f26-s.woff2",revision:"dd930bafc6297347be3213f22cc53d3e"},{url:"/_next/static/media/ec159349637c90ad-s.woff2",revision:"0e89df9522084290e01e4127495fae99"},{url:"/_next/static/media/eye.78eae9a0.svg",revision:"e64d226216c95f3b916eb7cc2a4700e5"},{url:"/_next/static/media/eyeClosed.f86bc0e9.svg",revision:"9d678a8064aa872cf1cacfbcd0d0e16f"},{url:"/_next/static/media/fd4db3eb5472fc27-s.woff2",revision:"71f3fcaf22131c3368d9ec28ef839831"},{url:"/_next/static/media/filter.707c6605.svg",revision:"b617ac7c1147f9afe0a71f75fc0ef9f3"},{url:"/_next/static/media/login.c7e92d00.svg",revision:"471cab323d9944b90c6727f5f705c663"},{url:"/_next/static/media/loginDisabled.01ce736c.svg",revision:"4b2a6926f3ab9f8c3d160e3953a2b60b"},{url:"/_next/static/media/qr-code.1993bbd4.png",revision:"b18a6ebe247c39cc57a806a3595c34f1"},{url:"/android/android-launchericon-144-144.png",revision:"f814235ecc1caf5721b5493bbb3e2ecc"},{url:"/android/android-launchericon-192-192.png",revision:"f9c5e294998c225573ced06412cc4b1c"},{url:"/android/android-launchericon-48-48.png",revision:"a1ecec6b5190e5455c67cd1080a9afe9"},{url:"/android/android-launchericon-512-512.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/android/android-launchericon-72-72.png",revision:"5d4d38d2d95189c321c31244bfd9a158"},{url:"/android/android-launchericon-96-96.png",revision:"5b0c8a9833a11f0f0a1323960a272ea8"},{url:"/favicon-16x16.png",revision:"86de5f3ab519bde0347886481f1ff8de"},{url:"/favicon-32x32.png",revision:"3d930ec700a41a0e9dedadc74f83e8c0"},{url:"/favicon.ico",revision:"da3885953794d5f6e393596785ead858"},{url:"/ios/100.png",revision:"b15137bed41f81dc34167b0568922d76"},{url:"/ios/1024.png",revision:"422034c42021f08f57834b86d0edd1a8"},{url:"/ios/114.png",revision:"8cb48e6afeb93c6fb35bc0c9ebb66204"},{url:"/ios/120.png",revision:"e684eea7db581517a7d2ea85436eb8d3"},{url:"/ios/128.png",revision:"23a9ddb5002bc3558bab3985dbb6bb0c"},{url:"/ios/144.png",revision:"f814235ecc1caf5721b5493bbb3e2ecc"},{url:"/ios/152.png",revision:"a27dd3af9d7e494848691da556c212c6"},{url:"/ios/16.png",revision:"f33cf92fa22b824ec414276b60623cf0"},{url:"/ios/167.png",revision:"cd7e2d1a853c7e4ac0756f84ce23763f"},{url:"/ios/180.png",revision:"95ba9140927dd56c49c5273d3756b89d"},{url:"/ios/192.png",revision:"f9c5e294998c225573ced06412cc4b1c"},{url:"/ios/20.png",revision:"e14a3647352b43851c53685f38c22300"},{url:"/ios/256.png",revision:"20a720811bcac0d346e3c08fbf80f361"},{url:"/ios/29.png",revision:"075eb72b649f1b1de54192c285c0976a"},{url:"/ios/32.png",revision:"f6eaf95bb042d3e5858f3ceb4a29084d"},{url:"/ios/40.png",revision:"db4237b5f8b7e0d9ea087061ad2693e8"},{url:"/ios/50.png",revision:"48b338c5928a745d4dff9b0c968c85d9"},{url:"/ios/512.png",revision:"32e4d53a786763240ccdfacfb5b60422"},{url:"/ios/57.png",revision:"bb496a7607f5f1f5a2dc520ea5324495"},{url:"/ios/58.png",revision:"209dd68ff9b3115d2b5ed0d88f86e757"},{url:"/ios/60.png",revision:"3df09500abecb83facb65f6babe9a51c"},{url:"/ios/64.png",revision:"d0e2a07c3e09ade2e3c10be89c3bc6a2"},{url:"/ios/72.png",revision:"5d4d38d2d95189c321c31244bfd9a158"},{url:"/ios/76.png",revision:"49c0e46a288e4dce2e81ece4d4d3d599"},{url:"/ios/80.png",revision:"10abe399b6a6a0c371d53d70d79816eb"},{url:"/ios/87.png",revision:"e4af64735ba81d4133418c56921d163c"},{url:"/manifest.json",revision:"5d2666c2c8513398f5e17ab9f076257d"},{url:"/offline.html",revision:"a5be0e70d9b066f17379afe5b49dcd47"},{url:"/qr-code.png",revision:"b18a6ebe247c39cc57a806a3595c34f1"},{url:"/windows11/LargeTile.scale-100.png",revision:"ae5285bd15ecc80b524a194e4c392dd1"},{url:"/windows11/LargeTile.scale-125.png",revision:"916edc3bf98626787c83e1d580f4c5d6"},{url:"/windows11/LargeTile.scale-150.png",revision:"3e72e75f7ffaf33fdbde245b69f469c0"},{url:"/windows11/LargeTile.scale-200.png",revision:"23b518620fcec731dd1171ce3af41486"},{url:"/windows11/LargeTile.scale-400.png",revision:"4949d0d6e23d651230e1826e4aa144d6"},{url:"/windows11/SmallTile.scale-100.png",revision:"09ccbc2e3b1afd9b5e23b6522e927355"},{url:"/windows11/SmallTile.scale-125.png",revision:"f273a93ae2575760b7db00a496eee5dd"},{url:"/windows11/SmallTile.scale-150.png",revision:"27dcd138ad77b1834bec0dca410d62bb"},{url:"/windows11/SmallTile.scale-200.png",revision:"f812128149beca8d55d94d0d5ae26e90"},{url:"/windows11/SmallTile.scale-400.png",revision:"5451730dca3fabbbecc46986b51bf882"},{url:"/windows11/SplashScreen.scale-100.png",revision:"faad67ca14726e95962ed88ea59f72ab"},{url:"/windows11/SplashScreen.scale-125.png",revision:"94f023b55232dba0ea837fb314c4d043"},{url:"/windows11/SplashScreen.scale-150.png",revision:"5bb8a6051b717827b74c92c397c0bfab"},{url:"/windows11/SplashScreen.scale-200.png",revision:"b142148c19fd57092bcf45c5c7508219"},{url:"/windows11/SplashScreen.scale-400.png",revision:"84705a8fd5a653d9ce0957d0d675d935"},{url:"/windows11/Square150x150Logo.scale-100.png",revision:"b677c708618539a8dda4ab2e75455274"},{url:"/windows11/Square150x150Logo.scale-125.png",revision:"ebbc62c7e8632e526a27c5339d54ceff"},{url:"/windows11/Square150x150Logo.scale-150.png",revision:"f4c44c152dfdedf10cb5998f20a86a1f"},{url:"/windows11/Square150x150Logo.scale-200.png",revision:"05ec482f24af703ecf35f0b34bfaaff0"},{url:"/windows11/Square150x150Logo.scale-400.png",revision:"eb4a2f57fb734103285b1f7feae29fb6"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-16.png",revision:"a3637e6f21ae0ae7c6c713bd4690664a"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-20.png",revision:"09f0dbfc2f6eae3c52167817d53346d7"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-24.png",revision:"d09294cc2aeb4f85b7f954977ce97029"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-256.png",revision:"1551dded7e55e6bcb147215b3819a09f"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-30.png",revision:"3a3a71e10797731c081d3746f74cd121"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-32.png",revision:"3acb97995355f85d9051de04ec60a253"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-36.png",revision:"87fca055afe317c6f4c0d9412d4f336e"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-40.png",revision:"6844c3b7eedf81c1588a9fb74bda2fdb"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-44.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-48.png",revision:"8cfb04f57e65fbe524dbf5a8a7cd4459"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-60.png",revision:"7a775eb7ced0d61a48cdb2bd036baf0a"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-64.png",revision:"ef14cf4a2587a355b1d1938f58926465"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-72.png",revision:"28d528d55f33503c2edb7447a975c91e"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-80.png",revision:"b01765ecc38181ecc9d23097af604a49"},{url:"/windows11/Square44x44Logo.altform-lightunplated_targetsize-96.png",revision:"a9162f8c33cb55707b22d20c974b1f98"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-16.png",revision:"a3637e6f21ae0ae7c6c713bd4690664a"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-20.png",revision:"09f0dbfc2f6eae3c52167817d53346d7"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-24.png",revision:"d09294cc2aeb4f85b7f954977ce97029"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-256.png",revision:"1551dded7e55e6bcb147215b3819a09f"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-30.png",revision:"3a3a71e10797731c081d3746f74cd121"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-32.png",revision:"3acb97995355f85d9051de04ec60a253"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-36.png",revision:"87fca055afe317c6f4c0d9412d4f336e"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-40.png",revision:"6844c3b7eedf81c1588a9fb74bda2fdb"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-44.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-48.png",revision:"8cfb04f57e65fbe524dbf5a8a7cd4459"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-60.png",revision:"7a775eb7ced0d61a48cdb2bd036baf0a"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-64.png",revision:"ef14cf4a2587a355b1d1938f58926465"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-72.png",revision:"28d528d55f33503c2edb7447a975c91e"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-80.png",revision:"b01765ecc38181ecc9d23097af604a49"},{url:"/windows11/Square44x44Logo.altform-unplated_targetsize-96.png",revision:"a9162f8c33cb55707b22d20c974b1f98"},{url:"/windows11/Square44x44Logo.scale-100.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.scale-125.png",revision:"503357130173deac81a4e85345b7dbb8"},{url:"/windows11/Square44x44Logo.scale-150.png",revision:"0a6e0339336ff2a4495d5743f4bb7deb"},{url:"/windows11/Square44x44Logo.scale-200.png",revision:"882a6e664d32be7c2d903771d6f1b562"},{url:"/windows11/Square44x44Logo.scale-400.png",revision:"55911e5c72e28463d263d011b33296d9"},{url:"/windows11/Square44x44Logo.targetsize-16.png",revision:"a3637e6f21ae0ae7c6c713bd4690664a"},{url:"/windows11/Square44x44Logo.targetsize-20.png",revision:"09f0dbfc2f6eae3c52167817d53346d7"},{url:"/windows11/Square44x44Logo.targetsize-24.png",revision:"d09294cc2aeb4f85b7f954977ce97029"},{url:"/windows11/Square44x44Logo.targetsize-256.png",revision:"1551dded7e55e6bcb147215b3819a09f"},{url:"/windows11/Square44x44Logo.targetsize-30.png",revision:"3a3a71e10797731c081d3746f74cd121"},{url:"/windows11/Square44x44Logo.targetsize-32.png",revision:"3acb97995355f85d9051de04ec60a253"},{url:"/windows11/Square44x44Logo.targetsize-36.png",revision:"87fca055afe317c6f4c0d9412d4f336e"},{url:"/windows11/Square44x44Logo.targetsize-40.png",revision:"6844c3b7eedf81c1588a9fb74bda2fdb"},{url:"/windows11/Square44x44Logo.targetsize-44.png",revision:"4fd1faa9ed507461fb10f792a0b6a44c"},{url:"/windows11/Square44x44Logo.targetsize-48.png",revision:"8cfb04f57e65fbe524dbf5a8a7cd4459"},{url:"/windows11/Square44x44Logo.targetsize-60.png",revision:"7a775eb7ced0d61a48cdb2bd036baf0a"},{url:"/windows11/Square44x44Logo.targetsize-64.png",revision:"ef14cf4a2587a355b1d1938f58926465"},{url:"/windows11/Square44x44Logo.targetsize-72.png",revision:"28d528d55f33503c2edb7447a975c91e"},{url:"/windows11/Square44x44Logo.targetsize-80.png",revision:"b01765ecc38181ecc9d23097af604a49"},{url:"/windows11/Square44x44Logo.targetsize-96.png",revision:"a9162f8c33cb55707b22d20c974b1f98"},{url:"/windows11/StoreLogo.scale-100.png",revision:"48b338c5928a745d4dff9b0c968c85d9"},{url:"/windows11/StoreLogo.scale-125.png",revision:"d4a689725e7dc6422c8855f55af15f75"},{url:"/windows11/StoreLogo.scale-150.png",revision:"fc06d5249229158ba9142f7999d0d5bf"},{url:"/windows11/StoreLogo.scale-200.png",revision:"b15137bed41f81dc34167b0568922d76"},{url:"/windows11/StoreLogo.scale-400.png",revision:"cc7b8edd1729eeb8b32d9aaa7fd45e3e"},{url:"/windows11/Wide310x150Logo.scale-100.png",revision:"69d6243a8d5059b09c9d58baf8a31e0a"},{url:"/windows11/Wide310x150Logo.scale-125.png",revision:"820b9dee006fd9718292def060d0dba4"},{url:"/windows11/Wide310x150Logo.scale-150.png",revision:"686431086b2523f11fbf0325fd2731f4"},{url:"/windows11/Wide310x150Logo.scale-200.png",revision:"faad67ca14726e95962ed88ea59f72ab"},{url:"/windows11/Wide310x150Logo.scale-400.png",revision:"b142148c19fd57092bcf45c5c7508219"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:i,event:a,state:r})=>i&&"opaqueredirect"===i.type?new Response(i.body,{status:200,statusText:"OK",headers:i.headers}):i}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const i=e.pathname;return!i.startsWith("/api/auth/")&&!!i.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")})); diff --git a/public/workbox-1bb06f5e.js b/public/workbox-1bb06f5e.js new file mode 100644 index 0000000..6cfbf5a --- /dev/null +++ b/public/workbox-1bb06f5e.js @@ -0,0 +1 @@ +define(["exports"],(function(t){"use strict";try{self["workbox:core:6.6.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.6.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}try{self["workbox:strategies:6.6.0"]&&_()}catch(t){}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null},l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=t=>[l.prefix,t,l.suffix].filter((t=>t&&t.length>0)).join("-"),w=t=>t||f(l.precache),d=t=>t||f(l.runtime);function p(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class y{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const g=new Set;function m(t){return"string"==typeof t?new Request(t):t}class R{constructor(t,e){this.h={},Object.assign(this,e),this.event=e.event,this.u=t,this.l=new y,this.p=[],this.m=[...t.plugins],this.R=new Map;for(const t of this.m)this.R.set(t,{});this.event.waitUntil(this.l.promise)}async fetch(t){const{event:e}=this;let n=m(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.u.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=m(t);let s;const{cacheName:n,matchOptions:r}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const n=m(t);var r;await(r=0,new Promise((t=>setTimeout(t,r))));const i=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=i.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.v(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.u,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const r=p(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,i);for(const e of a)if(r===p(e.url,s))return t.match(e,n)}(u,i.clone(),["__WB_REVISION__"],h):null;try{await u.put(i,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of g)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.h[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await t({mode:e,request:n,event:this.event,params:this.params}));this.h[s]=n}return this.h[s]}hasCallback(t){for(const e of this.u.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.u.plugins)if("function"==typeof e[t]){const s=this.R.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.p.push(t),t}async doneWaiting(){let t;for(;t=this.p.shift();)await t}destroy(){this.l.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class v{constructor(t={}){this.cacheName=d(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new R(this,{event:e,request:s,params:n}),i=this.q(r,s,e);return[i,this.D(i,r,s,e)]}async q(t,e,n){let r;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(r=await this.U(e,t),!r||"error"===r.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(r=await i({error:s,event:n,request:e}),r)break;if(!r)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))r=await s({event:n,request:e,response:r});return r}async D(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}function b(t){t.then((()=>{}))}function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;ee.some((e=>t instanceof e));let U,x;const L=new WeakMap,I=new WeakMap,C=new WeakMap,E=new WeakMap,N=new WeakMap;let O={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return I.get(t);if("objectStoreNames"===e)return t.objectStoreNames||C.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return B(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function T(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(x||(x=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(P(this),e),B(L.get(this))}:function(...e){return B(t.apply(P(this),e))}:function(e,...s){const n=t.call(P(this),e,...s);return C.set(n,e.sort?e.sort():[e]),B(n)}}function k(t){return"function"==typeof t?T(t):(t instanceof IDBTransaction&&function(t){if(I.has(t))return;const e=new Promise(((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",i),t.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",i),t.addEventListener("abort",i)}));I.set(t,e)}(t),D(t,U||(U=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(t,O):t)}function B(t){if(t instanceof IDBRequest)return function(t){const e=new Promise(((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",i)},r=()=>{e(B(t.result)),n()},i=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",i)}));return e.then((e=>{e instanceof IDBCursor&&L.set(e,t)})).catch((()=>{})),N.set(e,t),e}(t);if(E.has(t))return E.get(t);const e=k(t);return e!==t&&(E.set(t,e),N.set(e,t)),e}const P=t=>N.get(t);const M=["get","getKey","getAll","getAllKeys","count"],W=["put","add","delete","clear"],j=new Map;function S(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(j.get(e))return j.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=W.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!M.includes(s))return;const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),r&&i.done]))[0]};return j.set(e,i),i}O=(t=>q({},t,{get:(e,s,n)=>S(e,s)||t.get(e,s,n),has:(e,s)=>!!S(e,s)||t.has(e,s)}))(O);try{self["workbox:expiration:6.6.0"]&&_()}catch(t){}const K="cache-entries",A=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class F{constructor(t){this._=null,this.L=t}I(t){const e=t.createObjectStore(K,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}C(t){this.I(t),this.L&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",(t=>e(t.oldVersion,t))),B(s).then((()=>{}))}(this.L)}async setTimestamp(t,e){const s={url:t=A(t),timestamp:e,cacheName:this.L,id:this.N(t)},n=(await this.getDb()).transaction(K,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(K,this.N(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(K).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;n;){const s=n.value;s.cacheName===this.L&&(t&&s.timestamp=e?r.push(n.value):i++),n=await n.continue()}const a=[];for(const t of r)await s.delete(K,t.id),a.push(t.url);return a}N(t){return this.L+"|"+A(t)}async getDb(){return this._||(this._=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=B(a);return n&&a.addEventListener("upgradeneeded",(t=>{n(B(a.result),t.oldVersion,t.newVersion,B(a.transaction),t)})),s&&a.addEventListener("blocked",(t=>s(t.oldVersion,t.newVersion,t))),o.then((t=>{i&&t.addEventListener("close",(()=>i())),r&&t.addEventListener("versionchange",(t=>r(t.oldVersion,t.newVersion,t)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this.C.bind(this)})),this._}}class H{constructor(t,e={}){this.O=!1,this.T=!1,this.k=e.maxEntries,this.B=e.maxAgeSeconds,this.P=e.matchOptions,this.L=t,this.M=new F(t)}async expireEntries(){if(this.O)return void(this.T=!0);this.O=!0;const t=this.B?Date.now()-1e3*this.B:0,e=await this.M.expireEntries(t,this.k),s=await self.caches.open(this.L);for(const t of e)await s.delete(t,this.P);this.O=!1,this.T&&(this.T=!1,b(this.expireEntries()))}async updateTimestamp(t){await this.M.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.B){const e=await this.M.getTimestamp(t),s=Date.now()-1e3*this.B;return void 0===e||er||e&&e<0)throw new s("range-not-satisfiable",{size:r,end:n,start:e});let i,a;return void 0!==e&&void 0!==n?(i=e,a=n+1):void 0!==e&&void 0===n?(i=e,a=r):void 0!==n&&void 0===e&&(i=r-n,a=r),{start:i,end:a}}(i,r.start,r.end),o=i.slice(a.start,a.end),c=o.size,h=new Response(o,{status:206,statusText:"Partial Content",headers:e.headers});return h.headers.set("Content-Length",String(c)),h.headers.set("Content-Range",`bytes ${a.start}-${a.end-1}/${i.size}`),h}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}function z(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.6.0"]&&_()}catch(t){}function G(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const r=new URL(n,location.href),i=new URL(n,location.href);return r.searchParams.set("__WB_REVISION__",e),{cacheKey:r.href,url:i.href}}class V{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class J{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.W.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.W=t}}let Q,X;async function Y(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const r=t.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},a=e?e(i):i,o=function(){if(void 0===Q){const t=new Response("");if("body"in t)try{new Response(t.body),Q=!0}catch(t){Q=!1}Q=!1}return Q}()?r.body:await r.blob();return new Response(o,a)}class Z extends v{constructor(t={}){t.cacheName=w(t.cacheName),super(t),this.j=!1!==t.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async U(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.S(t,e):await this.K(t,e))}async K(t,e){let n;const r=e.params||{};if(!this.j)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=r.integrity,i=t.integrity,a=!i||i===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?i||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.A(),await e.cachePut(t,n.clone()))}return n}async S(t,e){this.A();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}A(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await Y(t):t};class tt{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.F=new Map,this.H=new Map,this.$=new Map,this.u=new Z({cacheName:w(t),plugins:[...e,new J({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.u}precache(t){this.addToCacheList(t),this.G||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.G=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:r}=G(n),i="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(r)&&this.F.get(r)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(r),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.$.has(t)&&this.$.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:r});this.$.set(t,n.integrity)}if(this.F.set(r,t),this.H.set(r,i),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return z(t,(async()=>{const e=new V;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.$.get(s),r=this.H.get(e),i=new Request(e,{integrity:n,cache:r,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return z(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const r of e)s.has(r.url)||(await t.delete(r),n.push(r.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.$.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const et=()=>(X||(X=new tt),X);class st extends r{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const r of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(i,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(r);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.CacheFirst=class extends v{async U(t,e){let n,r=await e.cacheMatch(t);if(!r)try{r=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new s("no-response",{url:t.url,error:n});return r}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const r=this.V(n),i=this.J(s);b(i.expireEntries());const a=i.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return r?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.J(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.X=t,this.B=t.maxAgeSeconds,this.Y=new Map,t.purgeOnQuotaError&&function(t){g.add(t)}((()=>this.deleteCacheAndMetadata()))}J(t){if(t===d())throw new s("expire-custom-caches-only");let e=this.Y.get(t);return e||(e=new H(t,this.X),this.Y.set(t,e)),e}V(t){if(!this.B)return!0;const e=this.Z(t);if(null===e)return!0;return e>=Date.now()-1e3*this.B}Z(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.Y)await self.caches.delete(t),await e.delete();this.Y=new Map}},t.NetworkFirst=class extends v{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u),this.tt=t.networkTimeoutSeconds||0}async U(t,e){const n=[],r=[];let i;if(this.tt){const{id:s,promise:a}=this.et({request:t,logs:n,handler:e});i=s,r.push(a)}const a=this.st({timeoutId:i,request:t,logs:n,handler:e});r.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(r))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}et({request:t,logs:e,handler:s}){let n;return{promise:new Promise((e=>{n=setTimeout((async()=>{e(await s.cacheMatch(t))}),1e3*this.tt)})),id:n}}async st({timeoutId:t,request:e,logs:s,handler:n}){let r,i;try{i=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(r=t)}return t&&clearTimeout(t),!r&&i||(i=await n.cacheMatch(e)),i}},t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await $(t,e):e}},t.StaleWhileRevalidate=class extends v{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u)}async U(t,e){const n=e.fetchAndCachePut(t).catch((()=>{}));e.waitUntil(n);let r,i=await e.cacheMatch(t);if(i);else try{i=await n}catch(t){t instanceof Error&&(r=t)}if(!i)throw new s("no-response",{url:t.url,error:r});return i}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=w();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.precacheAndRoute=function(t,e){!function(t){et().precache(t)}(t),function(t){const e=et();h(new st(e,t))}(e)},t.registerRoute=h})); diff --git a/public/workbox-9b4d2a02.js b/public/workbox-9b4d2a02.js deleted file mode 100644 index 0b5136f..0000000 --- a/public/workbox-9b4d2a02.js +++ /dev/null @@ -1 +0,0 @@ -define(["exports"],(function(t){"use strict";try{self["workbox:core:6.6.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.6.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}try{self["workbox:strategies:6.6.0"]&&_()}catch(t){}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null},l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=t=>[l.prefix,t,l.suffix].filter((t=>t&&t.length>0)).join("-"),w=t=>t||f(l.precache),d=t=>t||f(l.runtime);function p(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class y{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const g=new Set;function m(t){return"string"==typeof t?new Request(t):t}class R{constructor(t,e){this.h={},Object.assign(this,e),this.event=e.event,this.u=t,this.l=new y,this.p=[],this.m=[...t.plugins],this.R=new Map;for(const t of this.m)this.R.set(t,{});this.event.waitUntil(this.l.promise)}async fetch(t){const{event:e}=this;let n=m(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.u.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=m(t);let s;const{cacheName:n,matchOptions:r}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const n=m(t);var r;await(r=0,new Promise((t=>setTimeout(t,r))));const i=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=i.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.v(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.u,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const r=p(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,i);for(const e of a)if(r===p(e.url,s))return t.match(e,n)}(u,i.clone(),["__WB_REVISION__"],h):null;try{await u.put(i,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of g)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.h[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await t({mode:e,request:n,event:this.event,params:this.params}));this.h[s]=n}return this.h[s]}hasCallback(t){for(const e of this.u.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.u.plugins)if("function"==typeof e[t]){const s=this.R.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.p.push(t),t}async doneWaiting(){let t;for(;t=this.p.shift();)await t}destroy(){this.l.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class v{constructor(t={}){this.cacheName=d(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new R(this,{event:e,request:s,params:n}),i=this.q(r,s,e);return[i,this.D(i,r,s,e)]}async q(t,e,n){let r;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(r=await this.U(e,t),!r||"error"===r.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(r=await i({error:s,event:n,request:e}),r)break;if(!r)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))r=await s({event:n,request:e,response:r});return r}async D(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}function b(t){t.then((()=>{}))}function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;ee.some((e=>t instanceof e));let U,x;const L=new WeakMap,I=new WeakMap,C=new WeakMap,E=new WeakMap,N=new WeakMap;let O={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return I.get(t);if("objectStoreNames"===e)return t.objectStoreNames||C.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return B(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function T(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(x||(x=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(P(this),e),B(L.get(this))}:function(...e){return B(t.apply(P(this),e))}:function(e,...s){const n=t.call(P(this),e,...s);return C.set(n,e.sort?e.sort():[e]),B(n)}}function k(t){return"function"==typeof t?T(t):(t instanceof IDBTransaction&&function(t){if(I.has(t))return;const e=new Promise(((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",i),t.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",i),t.addEventListener("abort",i)}));I.set(t,e)}(t),D(t,U||(U=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(t,O):t)}function B(t){if(t instanceof IDBRequest)return function(t){const e=new Promise(((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",i)},r=()=>{e(B(t.result)),n()},i=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",i)}));return e.then((e=>{e instanceof IDBCursor&&L.set(e,t)})).catch((()=>{})),N.set(e,t),e}(t);if(E.has(t))return E.get(t);const e=k(t);return e!==t&&(E.set(t,e),N.set(e,t)),e}const P=t=>N.get(t);const M=["get","getKey","getAll","getAllKeys","count"],W=["put","add","delete","clear"],j=new Map;function S(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(j.get(e))return j.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=W.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!M.includes(s))return;const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),r&&i.done]))[0]};return j.set(e,i),i}O=(t=>q({},t,{get:(e,s,n)=>S(e,s)||t.get(e,s,n),has:(e,s)=>!!S(e,s)||t.has(e,s)}))(O);try{self["workbox:expiration:6.6.0"]&&_()}catch(t){}const K="cache-entries",A=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class F{constructor(t){this._=null,this.L=t}I(t){const e=t.createObjectStore(K,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}C(t){this.I(t),this.L&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",(t=>e(t.oldVersion,t))),B(s).then((()=>{}))}(this.L)}async setTimestamp(t,e){const s={url:t=A(t),timestamp:e,cacheName:this.L,id:this.N(t)},n=(await this.getDb()).transaction(K,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(K,this.N(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(K).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;n;){const s=n.value;s.cacheName===this.L&&(t&&s.timestamp=e?r.push(n.value):i++),n=await n.continue()}const a=[];for(const t of r)await s.delete(K,t.id),a.push(t.url);return a}N(t){return this.L+"|"+A(t)}async getDb(){return this._||(this._=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=B(a);return n&&a.addEventListener("upgradeneeded",(t=>{n(B(a.result),t.oldVersion,t.newVersion,B(a.transaction),t)})),s&&a.addEventListener("blocked",(t=>s(t.oldVersion,t.newVersion,t))),o.then((t=>{i&&t.addEventListener("close",(()=>i())),r&&t.addEventListener("versionchange",(t=>r(t.oldVersion,t.newVersion,t)))})).catch((()=>{})),o}("workbox-expiration",1,{upgrade:this.C.bind(this)})),this._}}class H{constructor(t,e={}){this.O=!1,this.T=!1,this.k=e.maxEntries,this.B=e.maxAgeSeconds,this.P=e.matchOptions,this.L=t,this.M=new F(t)}async expireEntries(){if(this.O)return void(this.T=!0);this.O=!0;const t=this.B?Date.now()-1e3*this.B:0,e=await this.M.expireEntries(t,this.k),s=await self.caches.open(this.L);for(const t of e)await s.delete(t,this.P);this.O=!1,this.T&&(this.T=!1,b(this.expireEntries()))}async updateTimestamp(t){await this.M.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.B){const e=await this.M.getTimestamp(t),s=Date.now()-1e3*this.B;return void 0===e||er||e&&e<0)throw new s("range-not-satisfiable",{size:r,end:n,start:e});let i,a;return void 0!==e&&void 0!==n?(i=e,a=n+1):void 0!==e&&void 0===n?(i=e,a=r):void 0!==n&&void 0===e&&(i=r-n,a=r),{start:i,end:a}}(i,r.start,r.end),o=i.slice(a.start,a.end),c=o.size,h=new Response(o,{status:206,statusText:"Partial Content",headers:e.headers});return h.headers.set("Content-Length",String(c)),h.headers.set("Content-Range",`bytes ${a.start}-${a.end-1}/${i.size}`),h}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}function z(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.6.0"]&&_()}catch(t){}function G(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const r=new URL(n,location.href),i=new URL(n,location.href);return r.searchParams.set("__WB_REVISION__",e),{cacheKey:r.href,url:i.href}}class V{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class J{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.W.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.W=t}}let Q,X;async function Y(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const r=t.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},a=e?e(i):i,o=function(){if(void 0===Q){const t=new Response("");if("body"in t)try{new Response(t.body),Q=!0}catch(t){Q=!1}Q=!1}return Q}()?r.body:await r.blob();return new Response(o,a)}class Z extends v{constructor(t={}){t.cacheName=w(t.cacheName),super(t),this.j=!1!==t.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async U(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.S(t,e):await this.K(t,e))}async K(t,e){let n;const r=e.params||{};if(!this.j)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=r.integrity,i=t.integrity,a=!i||i===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?i||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.A(),await e.cachePut(t,n.clone()))}return n}async S(t,e){this.A();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}A(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await Y(t):t};class tt{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.F=new Map,this.H=new Map,this.$=new Map,this.u=new Z({cacheName:w(t),plugins:[...e,new J({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.u}precache(t){this.addToCacheList(t),this.G||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.G=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:r}=G(n),i="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(r)&&this.F.get(r)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(r),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.$.has(t)&&this.$.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:r});this.$.set(t,n.integrity)}if(this.F.set(r,t),this.H.set(r,i),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return z(t,(async()=>{const e=new V;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.$.get(s),r=this.H.get(e),i=new Request(e,{integrity:n,cache:r,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return z(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const r of e)s.has(r.url)||(await t.delete(r),n.push(r.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.$.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const et=()=>(X||(X=new tt),X);class st extends r{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const r of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(i,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(r);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.CacheFirst=class extends v{async U(t,e){let n,r=await e.cacheMatch(t);if(!r)try{r=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new s("no-response",{url:t.url,error:n});return r}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const r=this.V(n),i=this.J(s);b(i.expireEntries());const a=i.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return r?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.J(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.X=t,this.B=t.maxAgeSeconds,this.Y=new Map,t.purgeOnQuotaError&&function(t){g.add(t)}((()=>this.deleteCacheAndMetadata()))}J(t){if(t===d())throw new s("expire-custom-caches-only");let e=this.Y.get(t);return e||(e=new H(t,this.X),this.Y.set(t,e)),e}V(t){if(!this.B)return!0;const e=this.Z(t);if(null===e)return!0;return e>=Date.now()-1e3*this.B}Z(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.Y)await self.caches.delete(t),await e.delete();this.Y=new Map}},t.NetworkFirst=class extends v{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u),this.tt=t.networkTimeoutSeconds||0}async U(t,e){const n=[],r=[];let i;if(this.tt){const{id:s,promise:a}=this.et({request:t,logs:n,handler:e});i=s,r.push(a)}const a=this.st({timeoutId:i,request:t,logs:n,handler:e});r.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(r))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}et({request:t,logs:e,handler:s}){let n;return{promise:new Promise((e=>{n=setTimeout((async()=>{e(await s.cacheMatch(t))}),1e3*this.tt)})),id:n}}async st({timeoutId:t,request:e,logs:s,handler:n}){let r,i;try{i=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(r=t)}return t&&clearTimeout(t),!r&&i||(i=await n.cacheMatch(e)),i}},t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await $(t,e):e}},t.StaleWhileRevalidate=class extends v{constructor(t={}){super(t),this.plugins.some((t=>"cacheWillUpdate"in t))||this.plugins.unshift(u)}async U(t,e){const n=e.fetchAndCachePut(t).catch((()=>{}));e.waitUntil(n);let r,i=await e.cacheMatch(t);if(i);else try{i=await n}catch(t){t instanceof Error&&(r=t)}if(!i)throw new s("no-response",{url:t.url,error:r});return i}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=w();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.precacheAndRoute=function(t,e){!function(t){et().precache(t)}(t),function(t){const e=et();h(new st(e,t))}(e)},t.registerRoute=h})); diff --git a/src/app/(app)/chamado/[id]/page.tsx b/src/app/(app)/chamado/[id]/page.tsx deleted file mode 100644 index a7ca6cc..0000000 --- a/src/app/(app)/chamado/[id]/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { IssuePage, IssuePageProps } from "@/screens"; - -const Issue = ({ params }: { params: IssuePageProps }) => { - return ; -}; - -export default Issue; diff --git a/src/app/(app)/(form)/abrir-chamado/page.tsx b/src/app/(protected)/(form)/abrir-chamado/page.tsx similarity index 100% rename from src/app/(app)/(form)/abrir-chamado/page.tsx rename to src/app/(protected)/(form)/abrir-chamado/page.tsx diff --git a/src/app/(app)/(form)/anexar-midia/page.tsx b/src/app/(protected)/(form)/anexar-midia/page.tsx similarity index 100% rename from src/app/(app)/(form)/anexar-midia/page.tsx rename to src/app/(protected)/(form)/anexar-midia/page.tsx diff --git a/src/app/(app)/(form)/confirmar-chamado/page.tsx b/src/app/(protected)/(form)/confirmar-chamado/page.tsx similarity index 100% rename from src/app/(app)/(form)/confirmar-chamado/page.tsx rename to src/app/(protected)/(form)/confirmar-chamado/page.tsx diff --git a/src/app/(app)/(form)/template.tsx b/src/app/(protected)/(form)/template.tsx similarity index 93% rename from src/app/(app)/(form)/template.tsx rename to src/app/(protected)/(form)/template.tsx index 144941f..1b4f9af 100644 --- a/src/app/(app)/(form)/template.tsx +++ b/src/app/(protected)/(form)/template.tsx @@ -1,7 +1,7 @@ "use client"; import { BackButton } from "@/components"; -import { IssuePageContainer } from "@/screens/chamado/styles"; +import { TicketPageContainer } from "@/screens/chamado/styles"; import { Column, Row, TitleComponent } from "@/styles"; import { FormButtons } from "@/components/Form"; import { ReactNode, useEffect, useMemo } from "react"; @@ -98,7 +98,7 @@ const Template = ({ children }: Readonly<{ children: ReactNode }>) => { {...buildTestIds("form-provider")} {...methods} key="open-ticket-form"> - @@ -139,7 +139,7 @@ const Template = ({ children }: Readonly<{ children: ReactNode }>) => { } /> - + ); }; diff --git a/src/app/(protected)/chamado/[id]/page.tsx b/src/app/(protected)/chamado/[id]/page.tsx new file mode 100644 index 0000000..977203d --- /dev/null +++ b/src/app/(protected)/chamado/[id]/page.tsx @@ -0,0 +1,26 @@ +import { ticketUrl } from "@/app/api/url"; +import { ITicket } from "@/assets"; +import { TicketPage } from "@/screens"; + +export const revalidate = 10; + +const Ticket = async ({ + params, +}: { + params: { + id: string; + }; +}) => { + const response = await fetch(`${ticketUrl}${params.id}`, { + next: { + revalidate: 60 * 1, + tags: ["ticket"], + }, + }); + + const data = (await response.json()) as ITicket; + + return ; +}; + +export default Ticket; diff --git a/src/app/(app)/chamados/page.tsx b/src/app/(protected)/chamados/page.tsx similarity index 100% rename from src/app/(app)/chamados/page.tsx rename to src/app/(protected)/chamados/page.tsx diff --git a/src/app/(app)/loading.tsx b/src/app/(protected)/loading.tsx similarity index 79% rename from src/app/(app)/loading.tsx rename to src/app/(protected)/loading.tsx index 9a456fb..85d4745 100644 --- a/src/app/(app)/loading.tsx +++ b/src/app/(protected)/loading.tsx @@ -4,7 +4,6 @@ import { PageContainer } from "@/styles"; import Image from "next/image"; const Loading = () => { - // You can add any UI inside Loading, including a Skeleton. return ( { - return ; + return ; }; export default Search; diff --git a/src/app/(app)/solicitacoes/page.tsx b/src/app/(protected)/solicitacoes/page.tsx similarity index 100% rename from src/app/(app)/solicitacoes/page.tsx rename to src/app/(protected)/solicitacoes/page.tsx diff --git a/src/app/(app)/template.tsx b/src/app/(protected)/template.tsx similarity index 72% rename from src/app/(app)/template.tsx rename to src/app/(protected)/template.tsx index 94344c7..fa9cabe 100644 --- a/src/app/(app)/template.tsx +++ b/src/app/(protected)/template.tsx @@ -3,22 +3,13 @@ import { NavigationBar } from "@/components"; import navigationOptions from "@/components/NavBar/data"; import { FlexContainer } from "@/components/PageStruct/style"; -// import { NoMobileDevice } from "@/screens/NoMobileDevice"; -// import { useAppStore } from "@/utils"; -// import { useIsClient } from "@uidotdev/usehooks"; import { usePathname } from "next/navigation"; import { ReactNode } from "react"; const Template = ({ children }: Readonly<{ children: ReactNode }>) => { - // const isClient = useIsClient(); - // const { isMobile } = useAppStore.use; const pathName = usePathname(); const isRequestsPage = pathName === "/solicitacoes"; - // if (!isMobile && isClient) { - // return ; - // } - return ( { return ( diff --git a/src/components/IssueActionButton/index.tsx b/src/components/ActionButton/index.tsx similarity index 58% rename from src/components/IssueActionButton/index.tsx rename to src/components/ActionButton/index.tsx index 662c40d..7b7bd6b 100644 --- a/src/components/IssueActionButton/index.tsx +++ b/src/components/ActionButton/index.tsx @@ -1,19 +1,26 @@ -/* eslint-disable no-nested-ternary */ -/* eslint-disable react/jsx-wrap-multilines */ +import { IssueActionOptionsType } from "@/screens/chamado/components"; import { ArrowCounterClockwise, DotsThreeOutlineVertical, Play, } from "@phosphor-icons/react"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { useTheme } from "styled-components"; -import toast from "react-hot-toast"; import { RoundedButton } from ".."; -import { ActionButtonsContainer, IssueActionButtonContainer } from "./styles"; -import { IssueActionOptionsData } from "./data"; +import { ActionButtonContainer, ActionButtonsContainer } from "./styles"; interface ActionButtonProps { - action?: () => void; + isIssueOpen: boolean; + canReopenIssue: boolean; + actionOptions: IssueActionOptionsType[]; + openAction: () => void; + reopenAction: () => void; +} + +interface PrincipalIssueButtonProps + extends Pick { + action: () => void; + $isClicked: boolean; } const PrincipalIssueButton = ({ @@ -21,11 +28,7 @@ const PrincipalIssueButton = ({ canReopenIssue, action, $isClicked, -}: ActionButtonProps & { - isIssueOpen: boolean; - $isClicked: boolean; - canReopenIssue: boolean; -}) => { +}: PrincipalIssueButtonProps) => { const theme = useTheme(); return ( { +const ActionButton = ({ + isIssueOpen = false, + canReopenIssue = false, + openAction, + reopenAction, + actionOptions, +}: ActionButtonProps) => { const theme = useTheme(); - const [isOptionsOpen, setIsOptionsOpen] = useState(false); - const [isIssueOpen, setIsIssueOpen] = useState(false); - const canReopenIssue = false; - const handleOptions = () => { - setIsOptionsOpen(!isOptionsOpen); - }; + const [isOptionsOpen, setIsOptionsOpen] = useState(isIssueOpen); + + useEffect(() => { + if (canReopenIssue) { + setIsOptionsOpen(false); + } + }, [canReopenIssue]); + + const actionCallback = () => { + if (isIssueOpen) { + setIsOptionsOpen((state) => !state); + return; + } + + if (canReopenIssue) { + reopenAction(); + setIsOptionsOpen(true); + return; + } - const startIssueExecution = () => { - setIsIssueOpen(true); - toast.success("Chamado iniciado!"); + if (!isIssueOpen) { + openAction(); + setIsOptionsOpen(true); + } }; return ( - + - {IssueActionOptionsData.toReversed() + {actionOptions + .toReversed() .filter((option) => option.isActive) .map((option) => { return ( @@ -101,10 +125,10 @@ const IssueActionButton = () => { $isClicked={isOptionsOpen} isIssueOpen={isIssueOpen} canReopenIssue={canReopenIssue} - action={isIssueOpen ? handleOptions : startIssueExecution} + action={actionCallback} /> - + ); }; -export default IssueActionButton; +export { ActionButton }; diff --git a/src/components/IssueActionButton/styles.ts b/src/components/ActionButton/styles.ts similarity index 88% rename from src/components/IssueActionButton/styles.ts rename to src/components/ActionButton/styles.ts index d0b3429..1bc19f2 100644 --- a/src/components/IssueActionButton/styles.ts +++ b/src/components/ActionButton/styles.ts @@ -1,6 +1,6 @@ import styled from "styled-components"; -export const IssueActionButtonContainer = styled.div` +export const ActionButtonContainer = styled.div` display: flex; align-items: center; justify-content: flex-end; diff --git a/src/components/IssueDisplay/index.tsx b/src/components/InfoDisplay/index.tsx similarity index 68% rename from src/components/IssueDisplay/index.tsx rename to src/components/InfoDisplay/index.tsx index 93c53cb..12a2969 100644 --- a/src/components/IssueDisplay/index.tsx +++ b/src/components/InfoDisplay/index.tsx @@ -1,21 +1,28 @@ +import { InfoDisplayProps } from "@/assets"; import { Selo } from "@/assets/Icons"; -import { IssueDisplayProps } from "@/assets"; import { buildTestIds } from "@/utils"; import { + IconeSelo, + InfoLabel, IssueContainer, IssueContent, - IssueNumber, IssueDescription, + IssueNumber, IssueState, IssueStatus, + IssueWrapper, OpeningText, StatusText, - IconeSelo, - IssueWrapper, - InfoLabel, } from "./styles"; -const IssueDisplay = ({ +/** + * Displays information based on the provided parameters. + * @param {Object} props - The properties passed to the InfoDisplay function. + * @param {string} props.id - The unique identifier for the information. + * @param {string} props.nome - The name associated with the information. + * @param {Date} props.date - The date related to the information. + */ +const InfoDisplay = ({ id, nome, date, @@ -23,21 +30,20 @@ const IssueDisplay = ({ isUpdated, color, $borderColor, -}: Readonly) => { +}: Readonly) => { return ( {isUpdated && ( )} - + @@ -63,4 +69,4 @@ const IssueDisplay = ({ ); }; -export default IssueDisplay; +export { InfoDisplay }; diff --git a/src/components/IssueDisplay/styles.ts b/src/components/InfoDisplay/styles.ts similarity index 83% rename from src/components/IssueDisplay/styles.ts rename to src/components/InfoDisplay/styles.ts index 4798640..15968b9 100644 --- a/src/components/IssueDisplay/styles.ts +++ b/src/components/InfoDisplay/styles.ts @@ -28,27 +28,26 @@ export const IssueWrapper = styled(Link)` width: 100%; height: fit-content; position: relative; - background-color: #d9f5c5; + background-color: ${({ color }) => color ?? "#D9F5C5"}; border-radius: 1rem; - border: 0.2rem solid #7ac143; + padding: 0.2rem; &:hover { box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.28); - border: 0.35rem solid ${({ $borderColor }) => $borderColor ?? "#38a914"}; + border: 0.2rem solid ${({ $borderColor }) => $borderColor ?? "#38a914"}; } &:active { box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.28); - border: 0.35rem solid ${({ $borderColor }) => $borderColor ?? "#38a914"}; + border: 0.2rem solid ${({ $borderColor }) => $borderColor ?? "#38a914"}; } - transition: 0.3s ease-in-out; + transition: 0.3s ease-in-out; `; export const IssueContainer = styled(Row)` display: flex; padding: 0.8rem; - background-color: ${({ color }) => color ?? "#D9F5C5"}; border-radius: 1rem; justify-content: space-between; transition: 0.3s ease-in-out; @@ -57,7 +56,7 @@ export const IssueContainer = styled(Row)` export const IssueContent = styled.div<{ $hasUpdate?: boolean }>` display: flex; flex-direction: column; - width: max-content; + max-height: 80px; gap: 0.8rem; flex: 6; justify-content: space-between; @@ -77,7 +76,8 @@ export const IssueContent = styled.div<{ $hasUpdate?: boolean }>` export const IssueState = styled.div` display: flex; flex-direction: column; - gap: 1rem; + gap: 0.6rem; + max-height: 80px; flex: 2; `; @@ -119,24 +119,20 @@ export const IssueStatus = styled.div` padding: 0; height: 50%; width: max-content; - + width: 100%; font-weight: 500; font-size: 0.8rem; line-height: 1rem; - overflow: hidden; `; export const OpeningText = styled.p` font-weight: 400; - font-size: 1rem; + font-size: 0.9rem; line-height: 1.25rem; color: ${({ theme }) => theme.colors.neutral.inverted}; - height: 20px; - width: 70px; + width: 100%; word-break: break-all; line-break: anywhere; - overflow-y: scroll; - overflow-x: hidden; @media (max-width: 320px) { font-size: 0.8rem; @@ -159,5 +155,4 @@ export const StatusText = styled.p` export const InfoLabel = styled.label` color: ${({ theme }) => theme.colors.neutral.inverted}; - overflow-x: hidden; `; diff --git a/src/components/InformationHistory/index.tsx b/src/components/InformationHistory/index.tsx deleted file mode 100644 index 0837e1a..0000000 --- a/src/components/InformationHistory/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { FileDashed } from "@phosphor-icons/react"; -import { useTheme } from "styled-components"; -import { InfoUnity, InfoUnityProps } from "./InfoUnity"; -import { - InfoHistoryPainelContainer, - InfoHistoryPainelContent, - InfoHistoryPainelTitle, -} from "./styles"; -import { Loading, NoContent } from ".."; - -interface InfoHistoryPainelProps { - data: InfoUnityProps[]; - isLoading?: boolean; -} - -const InfoHistoryPainel = ({ data, isLoading }: InfoHistoryPainelProps) => { - const theme = useTheme(); - return ( - - Histórico - - {isLoading ? ( - - ) : data.length ? ( - data.map((info) => ) - ) : ( - - } - title="Ops! Esse chamado ainda não possui movimentações" - fontSize="16px" - color={theme.colors.neutral["45"]} - /> - )} - - - ); -}; - -export { InfoHistoryPainel }; diff --git a/src/components/IssueActionButton/data.tsx b/src/components/IssueActionButton/data.tsx deleted file mode 100644 index e6d57b4..0000000 --- a/src/components/IssueActionButton/data.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { theme } from "@/styles"; -import { ChatCircleText, Check } from "@phosphor-icons/react"; -import { ReactNode } from "react"; - -type UserList = "resolver" | "creator" | "viewer"; - -export interface IssueActionOptionsType { - index: number; - icon: ReactNode; - title: string; - userList: UserList[]; - action: () => void; - isActive?: boolean; -} - -export const IssueActionOptionsData = [ - { - index: 1, - icon: ( - - ), - title: "Comentar", - userList: ["resolver", "creator"], - isActive: true, - action: () => { - console.log("Comentar"); - }, - }, - { - index: 2, - icon: ( - - ), - userList: ["resolver"], - isActive: true, - title: "Finalizar", - action: () => { - console.log("Finalizar"); - }, - }, -] satisfies IssueActionOptionsType[]; diff --git a/src/components/IconesDeStatus/components/CheckedVermelho/index.tsx b/src/components/StatusIcon/components/CheckedVermelho/index.tsx similarity index 100% rename from src/components/IconesDeStatus/components/CheckedVermelho/index.tsx rename to src/components/StatusIcon/components/CheckedVermelho/index.tsx diff --git a/src/components/IconesDeStatus/components/CheckedVermelho/styles.ts b/src/components/StatusIcon/components/CheckedVermelho/styles.ts similarity index 100% rename from src/components/IconesDeStatus/components/CheckedVermelho/styles.ts rename to src/components/StatusIcon/components/CheckedVermelho/styles.ts diff --git a/src/components/IconesDeStatus/components/Comentario/index.tsx b/src/components/StatusIcon/components/Comentario/index.tsx similarity index 100% rename from src/components/IconesDeStatus/components/Comentario/index.tsx rename to src/components/StatusIcon/components/Comentario/index.tsx diff --git a/src/components/IconesDeStatus/components/Comentario/styles.ts b/src/components/StatusIcon/components/Comentario/styles.ts similarity index 100% rename from src/components/IconesDeStatus/components/Comentario/styles.ts rename to src/components/StatusIcon/components/Comentario/styles.ts diff --git a/src/components/IconesDeStatus/components/Reticencias/index.tsx b/src/components/StatusIcon/components/Reticencias/index.tsx similarity index 100% rename from src/components/IconesDeStatus/components/Reticencias/index.tsx rename to src/components/StatusIcon/components/Reticencias/index.tsx diff --git a/src/components/IconesDeStatus/components/Reticencias/styles.ts b/src/components/StatusIcon/components/Reticencias/styles.ts similarity index 100% rename from src/components/IconesDeStatus/components/Reticencias/styles.ts rename to src/components/StatusIcon/components/Reticencias/styles.ts diff --git a/src/components/IconesDeStatus/components/svg/checkedVermelho.svg b/src/components/StatusIcon/components/svg/checkedVermelho.svg similarity index 100% rename from src/components/IconesDeStatus/components/svg/checkedVermelho.svg rename to src/components/StatusIcon/components/svg/checkedVermelho.svg diff --git a/src/components/IconesDeStatus/components/svg/comentario.svg b/src/components/StatusIcon/components/svg/comentario.svg similarity index 100% rename from src/components/IconesDeStatus/components/svg/comentario.svg rename to src/components/StatusIcon/components/svg/comentario.svg diff --git a/src/components/IconesDeStatus/components/svg/reticencias.svg b/src/components/StatusIcon/components/svg/reticencias.svg similarity index 100% rename from src/components/IconesDeStatus/components/svg/reticencias.svg rename to src/components/StatusIcon/components/svg/reticencias.svg diff --git a/src/components/IconesDeStatus/index.tsx b/src/components/StatusIcon/index.tsx similarity index 100% rename from src/components/IconesDeStatus/index.tsx rename to src/components/StatusIcon/index.tsx diff --git a/src/components/IconesDeStatus/styles.ts b/src/components/StatusIcon/styles.ts similarity index 100% rename from src/components/IconesDeStatus/styles.ts rename to src/components/StatusIcon/styles.ts diff --git a/src/components/common/Buttons/RoundedButton/index.tsx b/src/components/common/Buttons/RoundedButton/index.tsx index d44ef00..baa8082 100644 --- a/src/components/common/Buttons/RoundedButton/index.tsx +++ b/src/components/common/Buttons/RoundedButton/index.tsx @@ -27,4 +27,4 @@ const RoundedButton = ({ ); }; -export default RoundedButton; +export { RoundedButton }; diff --git a/src/components/common/Buttons/index.tsx b/src/components/common/Buttons/index.tsx index 3aff061..62642e0 100644 --- a/src/components/common/Buttons/index.tsx +++ b/src/components/common/Buttons/index.tsx @@ -1,8 +1,5 @@ -import RoundedButton from "./RoundedButton"; - -export * from "./BackButton"; export * from "./AddNewIssueButton"; -export * from "./IconButton"; +export * from "./BackButton"; export * from "./Button"; - -export { RoundedButton }; +export * from "./IconButton"; +export * from "./RoundedButton"; diff --git a/src/components/common/CustomSelect/index.tsx b/src/components/common/CustomSelect/index.tsx deleted file mode 100644 index 72ecc01..0000000 --- a/src/components/common/CustomSelect/index.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { ChangeEventHandler } from "react"; -import { CustomFieldset } from "@/components/Fieldset"; -import { SelectComponent, CustomOption } from "./styles"; - -interface OptionProps { - key: string; - value: string; - text: string; - isDisabled?: boolean; - isSelected?: boolean; -} - -interface SelectProps { - labelText: string; - width?: string; - placeholder?: string; - height?: string; - onChange?: ChangeEventHandler; - options?: OptionProps[]; - isRequired?: boolean; - multiple?: boolean; - form?: string; - // name?: string; - // value?: string; -} - -export const CustomSelect = ({ - labelText, - placeholder = "selecione uma opção", - width = "100%", - height = "56px", - options, - onChange, - isRequired = false, - multiple = false, - form, -}: SelectProps) => { - return ( - - - - {placeholder ?? "selecione uma opção abaixo"} - - {options?.map((option) => ( - - {option?.text} - - ))} - - - ); -}; diff --git a/src/components/common/CustomSelect/styles.ts b/src/components/common/CustomSelect/styles.ts deleted file mode 100644 index 4721175..0000000 --- a/src/components/common/CustomSelect/styles.ts +++ /dev/null @@ -1,28 +0,0 @@ -import styled from "styled-components"; - -export const SelectComponent = styled.select` - width: 100%; - height: 100%; - padding-top: 4px; - outline: 0; - border: none; - font-weight: 400; - font-size: 1rem; - line-height: 24px; - align-items: center; - letter-spacing: 0.5px; - resize: none; - background: transparent; - color: #77757b; -`; - -export const CustomOption = styled.option` - display: flex; - align-items: center; - background-color: #ebf6e3; - padding-bottom: 10px; - width: 20px; - border-radius: 0; - border: none; - font-size: 16px; -`; diff --git a/src/components/common/CustomTextArea/index.tsx b/src/components/common/CustomTextArea/index.tsx deleted file mode 100644 index e426c25..0000000 --- a/src/components/common/CustomTextArea/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { ChangeEvent } from "react"; -import { TextArea } from "./styles"; -import { CustomFieldset } from "../../Fieldset"; - -interface TextAreaProps { - labelText?: string; - width?: string; - height?: string; - placeholder: string; - value?: string; - isRequired?: boolean; - // eslint-disable-next-line no-unused-vars - onChange?: (e: ChangeEvent) => void; -} - -export const CustomTextArea = ({ - labelText, - placeholder, - width = "100%", - height = "240px", - value, - onChange, - isRequired = false, -}: TextAreaProps) => { - return ( - -