busybits 2.3.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +12 -0
- package/README.md +6 -0
- package/dist/build.json +2 -2
- package/dist/cli/busybits.js +33 -6
- package/dist/client/bundle/{app-DatmLMV4.js → app-B_jk_lPZ.js} +4 -4
- package/dist/client/bundle/{city-Obp81Tgi.js → city-DKO2ZZPJ.js} +1 -1
- package/dist/client/bundle/{daystats-Da82sNh9.js → daystats-CqDMjh5a.js} +1 -1
- package/dist/client/bundle/{dom-DPKsIT1T.js → dom-BnYE5zIh.js} +1 -1
- package/dist/client/bundle/{en-D6p_-oC0.js → en-BD-d_FWo.js} +1 -1
- package/dist/client/bundle/{es-aBALBWWq.js → es-ZgMlZ_LY.js} +1 -1
- package/dist/client/bundle/{format-DS9qjIGc.js → format-CnTSBxgP.js} +1 -1
- package/dist/client/bundle/{fr-BE8l2fLL.js → fr-DOSCFvER.js} +1 -1
- package/dist/client/bundle/{main-Bv-qstsh.js → main-7JfOGPBD.js} +2 -2
- package/dist/client/bundle/{ptypane-C7Nw8-Dx.js → ptypane-DBg26wgg.js} +1 -1
- package/dist/client/bundle/{room-name-Bf-U1Fyo.js → room-name-Cb8-ffEK.js} +1 -1
- package/dist/client/bundle/{simulator-B4Usk2yH.js → simulator-DeHOlOye.js} +1 -1
- package/dist/client/bundle/{world-model-CkevAUmh.js → world-model-C3GVcyT7.js} +1 -1
- package/dist/client/bundle/{world-stream-CuZouXr_.js → world-stream-DZkepWt9.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/index.js +234 -23
- package/mod/habblaud/.claude-plugin/plugin.json +1 -1
- package/mod/habblaud-mensagens/.claude-plugin/plugin.json +1 -1
- package/mod/habblaud-permissoes/.claude-plugin/plugin.json +1 -1
- package/mod/habblaud-pi/package.json +1 -1
- package/package.json +1 -1
|
@@ -121,7 +121,7 @@ Active l'accès depuis le téléphone (https://<nom>.local) avec nom d'utilisate
|
|
|
121
121
|
--no-pi n'installe pas l'extension de Gentle Shell/Pi
|
|
122
122
|
--rebuild reconstruit même si dist/ est à jour
|
|
123
123
|
--ignore-node continue même avec un Node non pris en charge
|
|
124
|
-
--purge (uninstall) supprime aussi le fichier d'environnement`,"npm install falhou: nada foi ativado":`npm install a échoué : rien n'a été activé`,"instalar a versão {0} em {1}":`installer la version {0} dans {1}`,"versão {0} instalada em {1}":`version {0} installée dans {1}`,"versão {0} em uso ({1})":`version {0} en cours d'utilisation ({1})`,"versão em uso {0}, anterior {1}":`version en cours {0}, précédente {1}`,"Busybits ainda não instalado em {0}":`Busybits n'est pas encore installé dans {0}`,"Codex: aprove os hooks do Busybits de novo em /hooks (o caminho mudou).":`Codex : approuvez de nouveau les hooks de Busybits dans /hooks (le chemin a changé).`,"instalação a partir do clone em {0}: assumida por ~/.busybits":`installation depuis le clone dans {0} : reprise par ~/.busybits`,"Claude Code não encontrado no PATH: o mod fica para depois (busybits setup)":`Claude Code introuvable dans le PATH : le mod est laissé pour plus tard (busybits setup)`,"nenhuma conta do Claude Code encontrada: o mod fica para depois (busybits setup)":`aucun compte Claude Code trouvé : le mod est laissé pour plus tard (busybits setup)`,"instalar o mod do Claude Code ({0} conta(s))":`installer le mod Claude Code ({0} compte(s))`,"{0} mantido porque um passo do uninstall falhou: rode o uninstall de novo":`{0} conservé car une étape de l'uninstall a échoué : relancez l'uninstall`,"{0} não foi apagado: não parece a pasta do Busybits, ou contém os dados ou o clone":`{0} n'a pas été supprimé : ce n'est pas le dossier de Busybits, ou il contient les données ou le clone`,"{0} removido (os dados em ~/.habblaud ficam)":`{0} supprimé (les données dans ~/.habblaud restent)`,"Para tirar o comando: npm rm -g busybits":`Pour retirer la commande : npm rm -g busybits`,"Node {0}":`Node {0}`,"Node {0} não serve: o Habblaud pede o Node 22.12+ ou 24. Com o nvm (https://github.com/nvm-sh/nvm): nvm install 24 && nvm use 24, e rode {1} de novo.":`Node {0} ne convient pas : Busybits demande Node 22.12+ ou 24. Avec nvm (https://github.com/nvm-sh/nvm) : nvm install 24 && nvm use 24, puis relancez {1}.`,"# Edite fora deste bloco: o npm run setup reescreve só o que está entre as marcas.":`# Éditez en dehors de ce bloc : npm run setup ne réécrit que ce qui est entre les marques.`,"--port precisa de um número de porta (ex.: --port 4747).":`--port demande un numéro de port (ex. --port 4747).`,"{0} falhou (código {1})":`{0} a échoué (code {1})`,"instalar as dependências: npm ci":`installer les dépendances : npm ci`,"dependências instaladas":`dépendances installées`,"dependências em dia (node_modules)":`dépendances à jour (node_modules)`,"construir o Habblaud: npm run build":`construire Busybits : npm run build`,"Habblaud construído (dist/)":`Busybits construit (dist/)`,"Habblaud construído e em dia (dist/)":`Busybits construit et à jour (dist/)`,"ambiente em dia: {0}":`environnement à jour : {0}`,"gravar o ambiente em {0}: {1}":`écrire l'environnement dans {0} : {1}`,"ambiente gravado em {0} ({1} conta(s) do Claude Code)":`environnement écrit dans {0} ({1} compte(s) Claude Code)`,"Claude Code não encontrado no PATH: o mod fica para depois (npm run mod:install)":`Claude Code introuvable dans le PATH : le mod est remis à plus tard (npm run mod:install)`,"nenhuma conta do Claude Code encontrada: o mod fica para depois (npm run mod:install)":`aucun compte Claude Code trouvé : le mod est remis à plus tard (npm run mod:install)`,"→ mod do Claude Code (npm run mod:status):":`→ mod de Claude Code (npm run mod:status) :`,"instalar o mod do Claude Code: npm run mod:install ({0} conta(s))":`installer le mod de Claude Code : npm run mod:install ({0} compte(s))`,"mod do Claude Code: npm run mod:install":`mod de Claude Code : npm run mod:install`,"Habblaud no ar: http://localhost:{0}":`Busybits tourne : http://localhost:{0}`,"Para subir: npm start (ou o serviço, com npm run setup -- --service) e abra http://localhost:{0}":`Pour le lancer : npm start (ou le service, avec npm run setup -- --service) puis ouvrez http://localhost:{0}`,"Habblaud fora do ar nesta porta ({0})":`Busybits ne tourne pas sur ce port ({0})`,"serviço {0}: {1}":`service {0} : {1}`,"serviço não instalado (npm run setup -- --service)":`service non installé (npm run setup -- --service)`,"instalar o serviço de usuário {0} (systemd) e ligá-lo":`installer le service utilisateur {0} (systemd) et le démarrer`,"systemctl --user enable --now {0} falhou: rode-o à mão":`systemctl --user enable --now {0} a échoué : lancez-le à la main`,"serviço {0} instalado e ligado ({1})":`service {0} installé et démarré ({1})`,"serviço {0} em dia":`service {0} à jour`,"serviço {0} instalado ({1})":`service {0} installé ({1})`,"instalar o LaunchAgent {0} e ligá-lo":`installer le LaunchAgent {0} et le charger`,"launchctl load -w {0} falhou: rode-o à mão":`launchctl load -w {0} a échoué : lancez-le à la main`,"serviço de usuário só existe no Linux (systemd) e no macOS (launchd): neste sistema use npm start":`le service utilisateur n'existe que sous Linux (systemd) et macOS (launchd) : sur ce système utilisez npm start`,"simulação: tiraria o serviço {0}":`simulation : retirerait le service {0}`,"serviço removido ({0})":`service supprimé ({0})`,"nenhum serviço instalado":`aucun service installé`,"Claude Code não encontrado no PATH: o mod não foi tocado":`Claude Code introuvable dans le PATH : le mod n'a pas été touché`,"simulação: rodaria npm run mod:uninstall":`simulation : lancerait npm run mod:uninstall`,"npm run mod:uninstall falhou":`npm run mod:uninstall a échoué`,"simulação: apagaria {0}":`simulation : supprimerait {0}`,"ambiente apagado ({0})":`environnement supprimé ({0})`,"ambiente mantido em {0} (--purge apaga)":`environnement conservé dans {0} (--purge le supprime)`,"[setup] Erro: {0}":`[setup] Erreur : {0}`,"[setup] Erro inesperado: {0}":`[setup] Erreur inattendue : {0}`,Você:`Vous`,"avatar.json ilegível ({0}); usando o avatar padrão.":`avatar.json illisible ({0}) ; avatar par défaut utilisé.`,"avatar inválido":`avatar invalide`,"o avatar só vale pelo próprio computador ou pelo acesso remoto com login":`l'avatar ne compte que depuis cet ordinateur ou par l'accès distant avec connexion`,"editar o avatar desligado: só funciona com o Habblaud acessível apenas pelo próprio computador":`la modification de l'avatar est désactivée : elle ne fonctionne qu'avec Busybits accessible uniquement depuis cet ordinateur`,"o avatar só é editado pelo próprio computador (http://localhost ou http://127.0.0.1)":`l'avatar ne se modifie que depuis cet ordinateur (http://localhost ou http://127.0.0.1)`,"a atenção só vale pelo próprio computador ou pelo acesso remoto com login":`l'attention ne compte que depuis cet ordinateur ou par l'accès distant avec connexion`,"atenção inválida":`événement d'attention invalide`,"presença inválida":`signal de présence invalide`,"Falha na atenção do usuário: {0}":`Échec de l'attention de l'utilisateur : {0}`,Eu:`Moi`,"Meu avatar":`Mon avatar`,"Só o próprio computador edita o avatar: aqui você vê o visual atual.":`Seul cet ordinateur modifie l'avatar : ici, vous voyez l'apparence actuelle.`,"Café depois de (min)":`Café après (min)`,"Cochilo depois de (min)":`Sieste après (min)`,"Minutos parado até o avatar ir tomar um café (1 a 60).":`Minutes d'inactivité avant que l'avatar aille prendre un café (1 à 60).`,"Minutos parado até o avatar tirar um cochilo (maior que o do café, até 240).":`Minutes d'inactivité avant que l'avatar fasse une sieste (plus que pour le café, jusqu'à 240).`,"Avatar salvo: {0}.":`Avatar enregistré : {0}.`,"O avatar voltou ao sorteio.":`L'avatar est revenu au tirage au sort.`,"Não foi possível salvar o avatar (erro {0}).":`Impossible d'enregistrer l'avatar (erreur {0}).`,"Não foi possível carregar o avatar. Vamos tentar de novo em instantes.":`Impossible de charger l'avatar. Nouvelle tentative dans un instant.`,"+{0} esperando":`+{0} en attente`,"aguardando resposta":`en attente de réponse`,"Terminaram: {0}":`Terminé : {0}`,"Esperando por você: {0}":`Vous attendent : {0}`,"{0} (há {1})":`{0} (depuis {1})`,"Nada aconteceu enquanto você estava fora.":`Rien ne s'est passé pendant votre absence.`,"Parte do período não está coberta.":`Une partie de la période n'est pas couverte.`,"só imagens PNG, JPEG, GIF ou WebP":`seulement des images PNG, JPEG, GIF ou WebP`,"Enviando imagens…":`Envoi des images…`,"{0} imagem não subiu: tente de novo ou tire-a":`{0} image n'a pas été envoyée : réessayez ou retirez-la`,"{0} imagens não subiram: tente de novo ou tire-as":`{0} images n'ont pas été envoyées : réessayez ou retirez-les`,"No máximo {0} imagens por mensagem.":`{0} images maximum par message.`,"{0} não é uma imagem PNG, JPEG, GIF ou WebP.":`{0} n'est pas une image PNG, JPEG, GIF ou WebP.`,"Comandos de barra não levam imagens.":`Les commandes avec barre ne portent pas d'images.`,"Cole ou anexe imagens: o agente recebe o caminho dos arquivos.":`Collez ou joignez des images : l'agent reçoit les chemins des fichiers.`,"imagens só funcionam com o escritório ao vivo":`les images ne fonctionnent qu'avec le bureau en direct`,"Anexar imagens":`Joindre des images`,"Imagem {0} (anexo da mensagem)":`Image {0} (pièce jointe du message)`,"Editar a limpeza dos anexos só funciona com o escritório ao vivo.":`Modifier le nettoyage des pièces jointes ne fonctionne qu'avec le bureau en direct.`,"Não foi possível salvar a limpeza dos anexos (erro {0}).":`Impossible d'enregistrer le nettoyage des pièces jointes (erreur {0}).`,"1 dia":`1 jour`,"3 dias":`3 jours`,"7 dias (padrão)":`7 jours (par défaut)`,"30 dias":`30 jours`,"Nunca apagar":`Ne jamais supprimer`,"Apagar anexos salvos depois de":`Supprimer les pièces jointes enregistrées après`,"Anexos salvos":`Pièces jointes enregistrées`,"Apagar depois de":`Supprimer après`,"Imagens e arquivos enviados pelo escritório ficam em ~/.habblaud/attachments/. As pastas mais velhas que o prazo são apagadas ao iniciar e a cada hora.":`Les images et fichiers envoyés depuis le bureau sont conservés dans ~/.habblaud/attachments/. Les dossiers plus anciens que ce délai sont supprimés au démarrage et toutes les heures.`,"a limpeza dos anexos só vale pelo próprio computador ou pelo acesso remoto com login":`le nettoyage des pièces jointes ne vaut que depuis cet ordinateur ou par l'accès à distance avec connexion`,"editar a limpeza dos anexos desligado: só funciona com o Habblaud acessível apenas pelo próprio computador":`modification du nettoyage des pièces jointes désactivée : elle ne fonctionne qu'avec Busybits accessible uniquement depuis cet ordinateur`,"a limpeza dos anexos só é editada pelo próprio computador (http://localhost ou http://127.0.0.1)":`le nettoyage des pièces jointes ne se modifie que depuis cet ordinateur (http://localhost ou http://127.0.0.1)`,"attachments.json ilegível ({0}); usando o padrão de {1} dias.":`attachments.json illisible ({0}) ; valeur par défaut de {1} jours utilisée.`,"prazo inválido (use 1, 3, 7, 30 ou null)":`délai invalide (utilisez 1, 3, 7, 30 ou null)`,"Não consegui rodar a limpeza dos anexos: {0}":`Impossible de lancer le nettoyage des pièces jointes : {0}`,"Não consegui apagar o anexo antigo {0}: {1}":`Impossible de supprimer l'ancienne pièce jointe {0} : {1}`,"herdr: saída inválida":`herdr : sortie invalide`,"herdr: tempo esgotado":`herdr : délai dépassé`,"herdr: falhou":`herdr : échec`,"herdr: resposta sem a aba criada":`herdr : la réponse ne contient pas l’onglet créé`,"herdr: resposta sem o painel criado":`herdr : la réponse ne contient pas le panneau créé`,"o painel {0} do herdr foi criado, mas o agente não começou: {1}":`le panneau {0} de herdr a été créé, mais l’agent n’a pas démarré : {1}`,"o painel {0} do herdr foi criado e o Gentle Shell começou, mas o pedido não foi enviado: {1}":`le panneau {0} de herdr a été créé et Gentle Shell a démarré, mais la demande n’a pas été envoyée : {1}`,"o escritório não tem a caixa de entrada de mensagens ligada":`la boîte de réception des messages du bureau est désactivée`,"não achei a sessão do Gentle Shell no escritório (a extensão habblaud-pi está instalada e a sessão aberta?)":`session Gentle Shell introuvable dans le bureau (l’extension habblaud-pi est-elle installée et la session ouverte ?)`,"o agente já tem mensagens demais esperando":`l’agent a déjà trop de messages en attente`,"o agente não foi achado":`agent introuvable`,"o destino no herdr não existe mais: escolha de novo":`la destination dans herdr n’existe plus : choisissez à nouveau`,"o herdr não respondeu a tempo":`herdr n’a pas répondu à temps`,"provedor desconhecido":`fournisseur inconnu`,"destino inválido":`destination invalide`,"{0} só abre no herdr (não tem modo em segundo plano)":`{0} ne s’ouvre que dans herdr (pas de mode en arrière-plan)`,"no Docker o agente novo só abre em segundo plano, com o Claude Code":`dans Docker, le nouvel agent ne s’ouvre qu’en arrière-plan, avec Claude Code`,"o herdr não está disponível":`herdr n’est pas disponible`,"indisponível no Docker":`indisponible dans Docker`,"o herdr não respondeu: {0}":`herdr n’a pas répondu : {0}`,"agente inválido":`agent invalide`,"Esta sessão não foi aberta pelo herdr.":`Cette session n’a pas été ouverte par herdr.`,"o herdr não está aberto":`herdr n’est pas ouvert`," herdr: {0} (socket {1}{2}).":` herdr : {0} (socket {1}{2}).`,", ainda não aberto":`, pas encore ouvert`," herdr: {0}.":` herdr : {0}.`,"não encontrado no PATH":`introuvable dans le PATH`,"Espaço do herdr":`Espace herdr`,"Painel para dividir":`Panneau à diviser`,Direção:`Direction`,"à direita":`à droite`,"para baixo":`vers le bas`,"Abra o herdr para escolher onde abrir":`Ouvrez herdr pour choisir où ouvrir`,"O chat do Gentle Shell não volta quando o herdr reinicia (veja herdr integration install pi)":`Le chat de Gentle Shell ne revient pas quand herdr redémarre (voir herdr integration install pi)`,"Nova aba em":`Nouvel onglet dans`,"Dividir painel":`Diviser le panneau`,"Onde abrir":`Où ouvrir`,"Começa na hora uma sessão nova no computador, na pasta, com a ferramenta e no lugar escolhidos; as permissões chegam aqui. Em segundo plano, pasta que o Claude Code ainda não conhece abre no app do Claude e espera o Enter lá. Anexos vão para ~/.habblaud/attachments e o pedido leva os caminhos.":`Lance tout de suite une nouvelle session sur l'ordinateur, dans le dossier, avec l'outil et à l'endroit choisis ; les permissions arrivent ici. En arrière-plan, un dossier que Claude Code ne connaît pas encore s'ouvre dans l'app Claude et y attend Entrée. Les pièces jointes vont dans ~/.habblaud/attachments et la demande indique leurs chemins.`,"Escolha onde abrir.":`Choisissez où ouvrir.`,"Aberto no herdr (painel {0}).":`Ouvert dans herdr (panneau {0}).`,"Agente novo aberto no herdr.":`Nouvel agent ouvert dans herdr.`,"Esse lugar do herdr não existe mais; a lista foi atualizada, escolha de novo.":`Cet endroit de herdr n'existe plus ; la liste a été actualisée, choisissez à nouveau.`,"Mostra no herdr o painel onde esta sessão roda":`Affiche dans herdr le panneau où tourne cette session`,"arquivo de máquinas pareadas corrompido: ninguém é aceito até parear de novo; o arquivo antigo será guardado ao lado":`le fichier des machines appairées est corrompu : personne n'est accepté avant un nouvel appairage ; l'ancien fichier sera conservé à part`,"o modo central/satélite não funciona no Docker: fica desligado":`le mode central/satellite ne fonctionne pas dans Docker : il reste désactivé`,"um servidor não pode ser central e satélite ao mesmo tempo":`un serveur ne peut pas être central et satellite en même temps`,"HABBLAUD_CENTRAL_URL não é um endereço válido":`HABBLAUD_CENTRAL_URL n'est pas une adresse valide`,"HABBLAUD_CENTRAL_URL precisa começar com https://":`HABBLAUD_CENTRAL_URL doit commencer par https://`,"HABBLAUD_CENTRAL_URL deve ter só o endereço do servidor (sem caminho, usuário, senha ou parâmetros)":`HABBLAUD_CENTRAL_URL ne doit contenir que l'adresse du serveur (sans chemin, utilisateur, mot de passe ni paramètres)`,"HABBLAUD_CENTRAL_BIND precisa ser um endereço IP específico (não 0.0.0.0 nem ::)":`HABBLAUD_CENTRAL_BIND doit être une adresse IP précise (ni 0.0.0.0 ni ::)`,"HABBLAUD_CENTRAL_BIND precisa ser o endereço do Tailscale ou de loopback ({0})":`HABBLAUD_CENTRAL_BIND doit être l'adresse Tailscale ou une adresse loopback ({0})`,"endereço do Tailscale não encontrado":`adresse Tailscale introuvable`,"o listener central precisa de TLS":`l'écouteur central a besoin de TLS`,"o listener central só escuta em loopback ou no Tailscale ({0})":`l'écouteur central n'écoute que sur loopback ou Tailscale ({0})`,"envie code, machineId e label":`envoyez code, machineId et label`,"máquina inválida":`machine invalide`,"código inválido ou vencido":`code invalide ou expiré`,"não encontrado":`introuvable`,"Listener central: erro na rota ({0}).":`Écouteur central : erreur de route ({0}).`,"Listener central: não deu para escutar em {0}:{1} ({2}).":`Écouteur central : impossible d'écouter sur {0}:{1} ({2}).`,"o texto de pareamento precisa começar com {0}":`le texte d'appairage doit commencer par {0}`,"o texto de pareamento está incompleto: faltam o endereço, o código ou a impressão digital":`le texte d'appairage est incomplet : l'adresse, le code ou l'empreinte manque`,"o endereço da central no pareamento não é válido":`l'adresse de la centrale dans l'appairage n'est pas valide`,"o endereço da central no pareamento precisa ser https:// só com servidor e porta":`l'adresse de la centrale dans l'appairage doit être https:// avec seulement serveur et port`,"o código de pareamento não é válido":`le code d'appairage n'est pas valide`,"a impressão digital no pareamento precisa ter 32 pares de hexadecimais":`l'empreinte dans l'appairage doit avoir 32 paires hexadécimales`,"terminou com erro":`a échoué`,"não consegui restringir o acesso ao arquivo {0} ({1})":`impossible de restreindre l'accès au fichier {0} ({1})`,"a central não respondeu a tempo":`la centrale n'a pas répondu à temps`,"a resposta da central é grande demais":`la réponse de la centrale est trop grande`,"a central não mandou a cadeia de certificados com a CA":`la centrale n'a pas envoyé la chaîne de certificats avec la CA`,"o nome da máquina não pode ficar vazio":`le nom de la machine ne peut pas être vide`,"não consegui falar com a central ({0})":`impossible de joindre la centrale ({0})`,"a impressão digital da central não confere":`l'empreinte de la centrale ne correspond pas`,"a conexão com a central não confere com a CA fixada ou falhou ({0})":`la connexion à la centrale ne correspond pas à la CA épinglée ou a échoué ({0})`,"a central respondeu {0}":`la centrale a répondu {0}`,"A central não reconhece mais esta máquina: pareie de novo (npm run satellite:pair).":`La centrale ne reconnaît plus cette machine : appairez-la de nouveau (npm run satellite:pair).`,"a central não reconhece mais esta máquina":`la centrale ne reconnaît plus cette machine`,"--pairing precisa do texto que a central mostra":`--pairing a besoin du texte affiché par la centrale`,"--label precisa de um nome":`--label a besoin d'un nom`,"[satélite] Erro: {0}":`[satellite] Erreur : {0}`,"[satélite] Não consegui parear: {0}":`[satellite] Impossible d'appairer : {0}`,'Pareado com a central {0} como "{1}".':`Appairé avec la centrale {0} sous le nom "{1}".`,"Impressão digital da CA da central: {0}":`Empreinte de la CA de la centrale : {0}`,"Adicione estas linhas ao ambiente do servidor desta máquina e reinicie-o:":`Ajoutez ces lignes à l'environnement du serveur de cette machine et redémarrez-le :`,"--codex-wait: nenhuma pasta do Codex encontrada (~/.codex ou CODEX_HOME); nada foi instalado.":`--codex-wait : aucun dossier Codex trouvé (~/.codex ou CODEX_HOME) ; rien n'a été installé.`,"[satélite] A instalação dos hooks do Codex terminou com erro; o pareamento está feito.":`[satellite] L'installation des hooks Codex a échoué ; l'appairage est fait.`,"[satélite] Erro inesperado: {0}":`[satellite] Erreur inattendue : {0}`,'Uso: echo "<texto da central>" | npm run satellite:pair -- [--label <nome>] [--codex-wait]\n\n O texto busybits-pair:1:... que a central mostra é lido da entrada padrão (assim o código não aparece no ps nem no\n histórico do shell); sem pipe, o comando pergunta.\n --pairing <texto> alternativa: o texto como argumento (fica visível no ps e no histórico); "-" lê da entrada padrão\n --stdin lê da entrada padrão (é o padrão)\n --label <nome> como esta máquina aparece no escritório (padrão: o nome do computador)\n --codex-wait instala os hooks do Codex com espera de {0} s pela sua resposta no escritório (mantém a porta do hook já configurada)':`Utilisation : echo "<texte de la centrale>" | npm run satellite:pair -- [--label <nom>] [--codex-wait]
|
|
124
|
+
--purge (uninstall) supprime aussi le fichier d'environnement`,"npm install falhou: nada foi ativado":`npm install a échoué : rien n'a été activé`,"instalar a versão {0} em {1}":`installer la version {0} dans {1}`,"versão {0} instalada em {1}":`version {0} installée dans {1}`,"versão {0} em uso ({1})":`version {0} en cours d'utilisation ({1})`,"versão em uso {0}, anterior {1}":`version en cours {0}, précédente {1}`,"Busybits ainda não instalado em {0}":`Busybits n'est pas encore installé dans {0}`,"Codex: aprove os hooks do Busybits de novo em /hooks (o caminho mudou).":`Codex : approuvez de nouveau les hooks de Busybits dans /hooks (le chemin a changé).`,"instalação a partir do clone em {0}: assumida por ~/.busybits":`installation depuis le clone dans {0} : reprise par ~/.busybits`,"Claude Code não encontrado no PATH: o mod fica para depois (busybits setup)":`Claude Code introuvable dans le PATH : le mod est laissé pour plus tard (busybits setup)`,"nenhuma conta do Claude Code encontrada: o mod fica para depois (busybits setup)":`aucun compte Claude Code trouvé : le mod est laissé pour plus tard (busybits setup)`,"instalar o mod do Claude Code ({0} conta(s))":`installer le mod Claude Code ({0} compte(s))`,"{0} mantido porque um passo do uninstall falhou: rode o uninstall de novo":`{0} conservé car une étape de l'uninstall a échoué : relancez l'uninstall`,"{0} não foi apagado: não parece a pasta do Busybits, ou contém os dados ou o clone":`{0} n'a pas été supprimé : ce n'est pas le dossier de Busybits, ou il contient les données ou le clone`,"{0} removido (os dados em ~/.habblaud ficam)":`{0} supprimé (les données dans ~/.habblaud restent)`,"Para tirar o comando: npm rm -g busybits":`Pour retirer la commande : npm rm -g busybits`,"Node {0}":`Node {0}`,"Node {0} não serve: o Habblaud pede o Node 22.12+ ou 24. Com o nvm (https://github.com/nvm-sh/nvm): nvm install 24 && nvm use 24, e rode {1} de novo.":`Node {0} ne convient pas : Busybits demande Node 22.12+ ou 24. Avec nvm (https://github.com/nvm-sh/nvm) : nvm install 24 && nvm use 24, puis relancez {1}.`,"# Edite fora deste bloco: o npm run setup reescreve só o que está entre as marcas.":`# Éditez en dehors de ce bloc : npm run setup ne réécrit que ce qui est entre les marques.`,"--port precisa de um número de porta (ex.: --port 4747).":`--port demande un numéro de port (ex. --port 4747).`,"{0} falhou (código {1})":`{0} a échoué (code {1})`,"instalar as dependências: npm ci":`installer les dépendances : npm ci`,"dependências instaladas":`dépendances installées`,"dependências em dia (node_modules)":`dépendances à jour (node_modules)`,"construir o Habblaud: npm run build":`construire Busybits : npm run build`,"Habblaud construído (dist/)":`Busybits construit (dist/)`,"Habblaud construído e em dia (dist/)":`Busybits construit et à jour (dist/)`,"ambiente em dia: {0}":`environnement à jour : {0}`,"gravar o ambiente em {0}: {1}":`écrire l'environnement dans {0} : {1}`,"ambiente gravado em {0} ({1} conta(s) do Claude Code)":`environnement écrit dans {0} ({1} compte(s) Claude Code)`,"Claude Code não encontrado no PATH: o mod fica para depois (npm run mod:install)":`Claude Code introuvable dans le PATH : le mod est remis à plus tard (npm run mod:install)`,"nenhuma conta do Claude Code encontrada: o mod fica para depois (npm run mod:install)":`aucun compte Claude Code trouvé : le mod est remis à plus tard (npm run mod:install)`,"→ mod do Claude Code (npm run mod:status):":`→ mod de Claude Code (npm run mod:status) :`,"instalar o mod do Claude Code: npm run mod:install ({0} conta(s))":`installer le mod de Claude Code : npm run mod:install ({0} compte(s))`,"mod do Claude Code: npm run mod:install":`mod de Claude Code : npm run mod:install`,"Habblaud no ar: http://localhost:{0}":`Busybits tourne : http://localhost:{0}`,"Para subir: npm start (ou o serviço, com npm run setup -- --service) e abra http://localhost:{0}":`Pour le lancer : npm start (ou le service, avec npm run setup -- --service) puis ouvrez http://localhost:{0}`,"Habblaud fora do ar nesta porta ({0})":`Busybits ne tourne pas sur ce port ({0})`,"serviço {0}: {1}":`service {0} : {1}`,"serviço não instalado (npm run setup -- --service)":`service non installé (npm run setup -- --service)`,"instalar o serviço de usuário {0} (systemd) e ligá-lo":`installer le service utilisateur {0} (systemd) et le démarrer`,"systemctl --user enable --now {0} falhou: rode-o à mão":`systemctl --user enable --now {0} a échoué : lancez-le à la main`,"serviço {0} instalado e ligado ({1})":`service {0} installé et démarré ({1})`,"serviço {0} em dia":`service {0} à jour`,"serviço {0} instalado ({1})":`service {0} installé ({1})`,"instalar o LaunchAgent {0} e ligá-lo":`installer le LaunchAgent {0} et le charger`,"launchctl load -w {0} falhou: rode-o à mão":`launchctl load -w {0} a échoué : lancez-le à la main`,"serviço de usuário só existe no Linux (systemd) e no macOS (launchd): neste sistema use npm start":`le service utilisateur n'existe que sous Linux (systemd) et macOS (launchd) : sur ce système utilisez npm start`,"simulação: tiraria o serviço {0}":`simulation : retirerait le service {0}`,"serviço removido ({0})":`service supprimé ({0})`,"nenhum serviço instalado":`aucun service installé`,"Claude Code não encontrado no PATH: o mod não foi tocado":`Claude Code introuvable dans le PATH : le mod n'a pas été touché`,"simulação: rodaria npm run mod:uninstall":`simulation : lancerait npm run mod:uninstall`,"npm run mod:uninstall falhou":`npm run mod:uninstall a échoué`,"simulação: apagaria {0}":`simulation : supprimerait {0}`,"ambiente apagado ({0})":`environnement supprimé ({0})`,"ambiente mantido em {0} (--purge apaga)":`environnement conservé dans {0} (--purge le supprime)`,"[setup] Erro: {0}":`[setup] Erreur : {0}`,"[setup] Erro inesperado: {0}":`[setup] Erreur inattendue : {0}`,Você:`Vous`,"avatar.json ilegível ({0}); usando o avatar padrão.":`avatar.json illisible ({0}) ; avatar par défaut utilisé.`,"avatar inválido":`avatar invalide`,"o avatar só vale pelo próprio computador ou pelo acesso remoto com login":`l'avatar ne compte que depuis cet ordinateur ou par l'accès distant avec connexion`,"editar o avatar desligado: só funciona com o Habblaud acessível apenas pelo próprio computador":`la modification de l'avatar est désactivée : elle ne fonctionne qu'avec Busybits accessible uniquement depuis cet ordinateur`,"o avatar só é editado pelo próprio computador (http://localhost ou http://127.0.0.1)":`l'avatar ne se modifie que depuis cet ordinateur (http://localhost ou http://127.0.0.1)`,"a atenção só vale pelo próprio computador ou pelo acesso remoto com login":`l'attention ne compte que depuis cet ordinateur ou par l'accès distant avec connexion`,"atenção inválida":`événement d'attention invalide`,"presença inválida":`signal de présence invalide`,"Falha na atenção do usuário: {0}":`Échec de l'attention de l'utilisateur : {0}`,Eu:`Moi`,"Meu avatar":`Mon avatar`,"Só o próprio computador edita o avatar: aqui você vê o visual atual.":`Seul cet ordinateur modifie l'avatar : ici, vous voyez l'apparence actuelle.`,"Café depois de (min)":`Café après (min)`,"Cochilo depois de (min)":`Sieste après (min)`,"Minutos parado até o avatar ir tomar um café (1 a 60).":`Minutes d'inactivité avant que l'avatar aille prendre un café (1 à 60).`,"Minutos parado até o avatar tirar um cochilo (maior que o do café, até 240).":`Minutes d'inactivité avant que l'avatar fasse une sieste (plus que pour le café, jusqu'à 240).`,"Avatar salvo: {0}.":`Avatar enregistré : {0}.`,"O avatar voltou ao sorteio.":`L'avatar est revenu au tirage au sort.`,"Não foi possível salvar o avatar (erro {0}).":`Impossible d'enregistrer l'avatar (erreur {0}).`,"Não foi possível carregar o avatar. Vamos tentar de novo em instantes.":`Impossible de charger l'avatar. Nouvelle tentative dans un instant.`,"+{0} esperando":`+{0} en attente`,"aguardando resposta":`en attente de réponse`,"Terminaram: {0}":`Terminé : {0}`,"Esperando por você: {0}":`Vous attendent : {0}`,"{0} (há {1})":`{0} (depuis {1})`,"Nada aconteceu enquanto você estava fora.":`Rien ne s'est passé pendant votre absence.`,"Parte do período não está coberta.":`Une partie de la période n'est pas couverte.`,"só imagens PNG, JPEG, GIF ou WebP":`seulement des images PNG, JPEG, GIF ou WebP`,"Enviando imagens…":`Envoi des images…`,"{0} imagem não subiu: tente de novo ou tire-a":`{0} image n'a pas été envoyée : réessayez ou retirez-la`,"{0} imagens não subiram: tente de novo ou tire-as":`{0} images n'ont pas été envoyées : réessayez ou retirez-les`,"No máximo {0} imagens por mensagem.":`{0} images maximum par message.`,"{0} não é uma imagem PNG, JPEG, GIF ou WebP.":`{0} n'est pas une image PNG, JPEG, GIF ou WebP.`,"Comandos de barra não levam imagens.":`Les commandes avec barre ne portent pas d'images.`,"Cole ou anexe imagens: o agente recebe o caminho dos arquivos.":`Collez ou joignez des images : l'agent reçoit les chemins des fichiers.`,"imagens só funcionam com o escritório ao vivo":`les images ne fonctionnent qu'avec le bureau en direct`,"Anexar imagens":`Joindre des images`,"Imagem {0} (anexo da mensagem)":`Image {0} (pièce jointe du message)`,"Editar a limpeza dos anexos só funciona com o escritório ao vivo.":`Modifier le nettoyage des pièces jointes ne fonctionne qu'avec le bureau en direct.`,"Não foi possível salvar a limpeza dos anexos (erro {0}).":`Impossible d'enregistrer le nettoyage des pièces jointes (erreur {0}).`,"1 dia":`1 jour`,"3 dias":`3 jours`,"7 dias (padrão)":`7 jours (par défaut)`,"30 dias":`30 jours`,"Nunca apagar":`Ne jamais supprimer`,"Apagar anexos salvos depois de":`Supprimer les pièces jointes enregistrées après`,"Anexos salvos":`Pièces jointes enregistrées`,"Apagar depois de":`Supprimer après`,"Imagens e arquivos enviados pelo escritório ficam em ~/.habblaud/attachments/. As pastas mais velhas que o prazo são apagadas ao iniciar e a cada hora.":`Les images et fichiers envoyés depuis le bureau sont conservés dans ~/.habblaud/attachments/. Les dossiers plus anciens que ce délai sont supprimés au démarrage et toutes les heures.`,"a limpeza dos anexos só vale pelo próprio computador ou pelo acesso remoto com login":`le nettoyage des pièces jointes ne vaut que depuis cet ordinateur ou par l'accès à distance avec connexion`,"editar a limpeza dos anexos desligado: só funciona com o Habblaud acessível apenas pelo próprio computador":`modification du nettoyage des pièces jointes désactivée : elle ne fonctionne qu'avec Busybits accessible uniquement depuis cet ordinateur`,"a limpeza dos anexos só é editada pelo próprio computador (http://localhost ou http://127.0.0.1)":`le nettoyage des pièces jointes ne se modifie que depuis cet ordinateur (http://localhost ou http://127.0.0.1)`,"attachments.json ilegível ({0}); usando o padrão de {1} dias.":`attachments.json illisible ({0}) ; valeur par défaut de {1} jours utilisée.`,"prazo inválido (use 1, 3, 7, 30 ou null)":`délai invalide (utilisez 1, 3, 7, 30 ou null)`,"Não consegui rodar a limpeza dos anexos: {0}":`Impossible de lancer le nettoyage des pièces jointes : {0}`,"Não consegui apagar o anexo antigo {0}: {1}":`Impossible de supprimer l'ancienne pièce jointe {0} : {1}`,"herdr: saída inválida":`herdr : sortie invalide`,"herdr: tempo esgotado":`herdr : délai dépassé`,"herdr: falhou":`herdr : échec`,"herdr: resposta sem a aba criada":`herdr : la réponse ne contient pas l’onglet créé`,"herdr: resposta sem o painel criado":`herdr : la réponse ne contient pas le panneau créé`,"o painel {0} do herdr foi criado, mas o agente não começou: {1}":`le panneau {0} de herdr a été créé, mais l’agent n’a pas démarré : {1}`,"o painel {0} do herdr foi criado e o Gentle Shell começou, mas o pedido não foi enviado: {1}":`le panneau {0} de herdr a été créé et Gentle Shell a démarré, mais la demande n’a pas été envoyée : {1}`,"o escritório não tem a caixa de entrada de mensagens ligada":`la boîte de réception des messages du bureau est désactivée`,"não achei a sessão do Gentle Shell no escritório (a extensão habblaud-pi está instalada e a sessão aberta?)":`session Gentle Shell introuvable dans le bureau (l’extension habblaud-pi est-elle installée et la session ouverte ?)`,"o agente já tem mensagens demais esperando":`l’agent a déjà trop de messages en attente`,"o agente não foi achado":`agent introuvable`,"o destino no herdr não existe mais: escolha de novo":`la destination dans herdr n’existe plus : choisissez à nouveau`,"o herdr não respondeu a tempo":`herdr n’a pas répondu à temps`,"provedor desconhecido":`fournisseur inconnu`,"destino inválido":`destination invalide`,"{0} só abre no herdr (não tem modo em segundo plano)":`{0} ne s’ouvre que dans herdr (pas de mode en arrière-plan)`,"no Docker o agente novo só abre em segundo plano, com o Claude Code":`dans Docker, le nouvel agent ne s’ouvre qu’en arrière-plan, avec Claude Code`,"o herdr não está disponível":`herdr n’est pas disponible`,"indisponível no Docker":`indisponible dans Docker`,"o herdr não respondeu: {0}":`herdr n’a pas répondu : {0}`,"agente inválido":`agent invalide`,"Esta sessão não foi aberta pelo herdr.":`Cette session n’a pas été ouverte par herdr.`,"o herdr não está aberto":`herdr n’est pas ouvert`," herdr: {0} (socket {1}{2}).":` herdr : {0} (socket {1}{2}).`,", ainda não aberto":`, pas encore ouvert`," herdr: {0}.":` herdr : {0}.`,"não encontrado no PATH":`introuvable dans le PATH`,"Espaço do herdr":`Espace herdr`,"Painel para dividir":`Panneau à diviser`,Direção:`Direction`,"à direita":`à droite`,"para baixo":`vers le bas`,"Para abrir em abas e painéis, abra o herdr":`Pour ouvrir dans des onglets et panneaux, ouvrez herdr`,"O chat do Gentle Shell não volta quando o herdr reinicia (veja herdr integration install pi)":`Le chat de Gentle Shell ne revient pas quand herdr redémarre (voir herdr integration install pi)`,"Nova aba em":`Nouvel onglet dans`,"Em uma nova janela de terminal":`Dans une nouvelle fenêtre de terminal`,"Aberto em uma nova janela de terminal.":`Ouvert dans une nouvelle fenêtre de terminal.`,"Agente novo aberto numa janela de terminal.":`Nouvel agent ouvert dans une fenêtre de terminal.`,"não há terminal disponível para abrir uma janela":`aucun terminal disponible pour ouvrir une fenêtre`,"não achei o osascript para abrir o Terminal":`osascript introuvable pour ouvrir Terminal`,"sem ambiente gráfico (DISPLAY ou WAYLAND_DISPLAY) para abrir um terminal":`pas d'environnement graphique (DISPLAY ou WAYLAND_DISPLAY) pour ouvrir un terminal`,"não achei um terminal (defina $TERMINAL ou instale gnome-terminal, konsole, kitty, alacritty, wezterm, xfce4-terminal ou xterm)":`aucun terminal trouvé (définissez $TERMINAL ou installez gnome-terminal, konsole, kitty, alacritty, wezterm, xfce4-terminal ou xterm)`,"o pedido ou a pasta tem caracteres (aspas, % ou quebra de linha) que o cmd.exe não aceita com segurança":`la demande ou le dossier contient des caractères (guillemets, % ou sauts de ligne) que cmd.exe ne gère pas en sécurité`,"o pedido ou a pasta tem caracteres de controle que o Terminal não aceita com segurança":`la demande ou le dossier contient des caractères de contrôle que Terminal ne gère pas en sécurité`,"Dividir painel":`Diviser le panneau`,"Onde abrir":`Où ouvrir`,'Começa na hora uma sessão nova no computador, na pasta, com a ferramenta e no lugar escolhidos; as permissões chegam aqui. Em segundo plano, pasta que o Claude Code ainda não conhece abre no app do Claude e espera o Enter lá. Sem herdr, "Em uma nova janela de terminal" abre o terminal do computador já com a ferramenta rodando. Anexos vão para ~/.habblaud/attachments e o pedido leva os caminhos.':`Lance tout de suite une nouvelle session sur l'ordinateur, dans le dossier, avec l'outil et à l'endroit choisis ; les permissions arrivent ici. En arrière-plan, un dossier que Claude Code ne connaît pas encore s'ouvre dans l'app Claude et y attend Entrée. Sans herdr, « Dans une nouvelle fenêtre de terminal » ouvre le terminal de l'ordinateur avec l'outil déjà lancé. Les pièces jointes vont dans ~/.habblaud/attachments et la demande indique leurs chemins.`,"Escolha onde abrir.":`Choisissez où ouvrir.`,"Aberto no herdr (painel {0}).":`Ouvert dans herdr (panneau {0}).`,"Agente novo aberto no herdr.":`Nouvel agent ouvert dans herdr.`,"Esse lugar do herdr não existe mais; a lista foi atualizada, escolha de novo.":`Cet endroit de herdr n'existe plus ; la liste a été actualisée, choisissez à nouveau.`,"Mostra no herdr o painel onde esta sessão roda":`Affiche dans herdr le panneau où tourne cette session`,"arquivo de máquinas pareadas corrompido: ninguém é aceito até parear de novo; o arquivo antigo será guardado ao lado":`le fichier des machines appairées est corrompu : personne n'est accepté avant un nouvel appairage ; l'ancien fichier sera conservé à part`,"o modo central/satélite não funciona no Docker: fica desligado":`le mode central/satellite ne fonctionne pas dans Docker : il reste désactivé`,"um servidor não pode ser central e satélite ao mesmo tempo":`un serveur ne peut pas être central et satellite en même temps`,"HABBLAUD_CENTRAL_URL não é um endereço válido":`HABBLAUD_CENTRAL_URL n'est pas une adresse valide`,"HABBLAUD_CENTRAL_URL precisa começar com https://":`HABBLAUD_CENTRAL_URL doit commencer par https://`,"HABBLAUD_CENTRAL_URL deve ter só o endereço do servidor (sem caminho, usuário, senha ou parâmetros)":`HABBLAUD_CENTRAL_URL ne doit contenir que l'adresse du serveur (sans chemin, utilisateur, mot de passe ni paramètres)`,"HABBLAUD_CENTRAL_BIND precisa ser um endereço IP específico (não 0.0.0.0 nem ::)":`HABBLAUD_CENTRAL_BIND doit être une adresse IP précise (ni 0.0.0.0 ni ::)`,"HABBLAUD_CENTRAL_BIND precisa ser o endereço do Tailscale ou de loopback ({0})":`HABBLAUD_CENTRAL_BIND doit être l'adresse Tailscale ou une adresse loopback ({0})`,"endereço do Tailscale não encontrado":`adresse Tailscale introuvable`,"o listener central precisa de TLS":`l'écouteur central a besoin de TLS`,"o listener central só escuta em loopback ou no Tailscale ({0})":`l'écouteur central n'écoute que sur loopback ou Tailscale ({0})`,"envie code, machineId e label":`envoyez code, machineId et label`,"máquina inválida":`machine invalide`,"código inválido ou vencido":`code invalide ou expiré`,"não encontrado":`introuvable`,"Listener central: erro na rota ({0}).":`Écouteur central : erreur de route ({0}).`,"Listener central: não deu para escutar em {0}:{1} ({2}).":`Écouteur central : impossible d'écouter sur {0}:{1} ({2}).`,"o texto de pareamento precisa começar com {0}":`le texte d'appairage doit commencer par {0}`,"o texto de pareamento está incompleto: faltam o endereço, o código ou a impressão digital":`le texte d'appairage est incomplet : l'adresse, le code ou l'empreinte manque`,"o endereço da central no pareamento não é válido":`l'adresse de la centrale dans l'appairage n'est pas valide`,"o endereço da central no pareamento precisa ser https:// só com servidor e porta":`l'adresse de la centrale dans l'appairage doit être https:// avec seulement serveur et port`,"o código de pareamento não é válido":`le code d'appairage n'est pas valide`,"a impressão digital no pareamento precisa ter 32 pares de hexadecimais":`l'empreinte dans l'appairage doit avoir 32 paires hexadécimales`,"terminou com erro":`a échoué`,"não consegui restringir o acesso ao arquivo {0} ({1})":`impossible de restreindre l'accès au fichier {0} ({1})`,"a central não respondeu a tempo":`la centrale n'a pas répondu à temps`,"a resposta da central é grande demais":`la réponse de la centrale est trop grande`,"a central não mandou a cadeia de certificados com a CA":`la centrale n'a pas envoyé la chaîne de certificats avec la CA`,"o nome da máquina não pode ficar vazio":`le nom de la machine ne peut pas être vide`,"não consegui falar com a central ({0})":`impossible de joindre la centrale ({0})`,"a impressão digital da central não confere":`l'empreinte de la centrale ne correspond pas`,"a conexão com a central não confere com a CA fixada ou falhou ({0})":`la connexion à la centrale ne correspond pas à la CA épinglée ou a échoué ({0})`,"a central respondeu {0}":`la centrale a répondu {0}`,"A central não reconhece mais esta máquina: pareie de novo (npm run satellite:pair).":`La centrale ne reconnaît plus cette machine : appairez-la de nouveau (npm run satellite:pair).`,"a central não reconhece mais esta máquina":`la centrale ne reconnaît plus cette machine`,"--pairing precisa do texto que a central mostra":`--pairing a besoin du texte affiché par la centrale`,"--label precisa de um nome":`--label a besoin d'un nom`,"[satélite] Erro: {0}":`[satellite] Erreur : {0}`,"[satélite] Não consegui parear: {0}":`[satellite] Impossible d'appairer : {0}`,'Pareado com a central {0} como "{1}".':`Appairé avec la centrale {0} sous le nom "{1}".`,"Impressão digital da CA da central: {0}":`Empreinte de la CA de la centrale : {0}`,"Adicione estas linhas ao ambiente do servidor desta máquina e reinicie-o:":`Ajoutez ces lignes à l'environnement du serveur de cette machine et redémarrez-le :`,"--codex-wait: nenhuma pasta do Codex encontrada (~/.codex ou CODEX_HOME); nada foi instalado.":`--codex-wait : aucun dossier Codex trouvé (~/.codex ou CODEX_HOME) ; rien n'a été installé.`,"[satélite] A instalação dos hooks do Codex terminou com erro; o pareamento está feito.":`[satellite] L'installation des hooks Codex a échoué ; l'appairage est fait.`,"[satélite] Erro inesperado: {0}":`[satellite] Erreur inattendue : {0}`,'Uso: echo "<texto da central>" | npm run satellite:pair -- [--label <nome>] [--codex-wait]\n\n O texto busybits-pair:1:... que a central mostra é lido da entrada padrão (assim o código não aparece no ps nem no\n histórico do shell); sem pipe, o comando pergunta.\n --pairing <texto> alternativa: o texto como argumento (fica visível no ps e no histórico); "-" lê da entrada padrão\n --stdin lê da entrada padrão (é o padrão)\n --label <nome> como esta máquina aparece no escritório (padrão: o nome do computador)\n --codex-wait instala os hooks do Codex com espera de {0} s pela sua resposta no escritório (mantém a porta do hook já configurada)':`Utilisation : echo "<texte de la centrale>" | npm run satellite:pair -- [--label <nom>] [--codex-wait]
|
|
125
125
|
|
|
126
126
|
Le texte busybits-pair:1:... affiché par la centrale est lu sur l'entrée standard (ainsi le code n'apparaît ni dans ps ni
|
|
127
127
|
dans l'historique du shell) ; sans pipe, la commande le demande.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["bundle/app-
|
|
2
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={},t=[{id:`pt-BR`,name:`Português`},{id:`en`,name:`English`},{id:`es`,name:`Español`},{id:`fr`,name:`Français`}],n=`habblaud:locale`,r={...e};function i(e,t){r[e]=t}function a(e){let t=(e??``).trim().toLowerCase().replace(`_`,`-`);if(t){if(t===`fr`||t.startsWith(`fr-`))return`fr`;if(t===`pt`||t.startsWith(`pt-`))return`pt-BR`;if(t===`en`||t.startsWith(`en-`))return`en`;if(t===`es`||t.startsWith(`es-`))return`es`}}function o(e,t){let n=a(e.HABBLAUD_LANG);if(n)return n;for(let n of[e.LC_ALL,e.LC_MESSAGES,e.LANG,t]){let e=a(n);if(e)return e}return`en`}function s(e,t){let n=a(e);if(n)return n;for(let e of t){let t=a(e);if(t)return t}return`en`}function c(){let e=globalThis;if(e.window!==void 0){let t=null;try{t=e.localStorage?.getItem(`habblaud:locale`)??null}catch{}return s(t,e.navigator?.languages??[e.navigator?.language??``])}let t=e.process?.env??{};if(t.VITEST)return a(t.HABBLAUD_LANG_TEST)??`pt-BR`;let n;try{n=Intl.DateTimeFormat().resolvedOptions().locale}catch{n=void 0}return o(t,n)}var l=c();function u(){return l}var d=/\bHabblaud\b(?!\s*World)/g;function f(e,t){let n=r[l],i=n&&n[e]||e.replace(d,`Busybits`);return!t||t.length===0?i:i.replace(/\{(\d+)\}/g,(e,n)=>Number(n)<t.length?String(t[Number(n)]):e)}function p(){return l===`fr`?`fr-FR`:l===`en`?`en-US`:l===`es`?`es`:`pt-BR`}var m=`modulepreload`,h=function(e){return`/`+e},g={},_=function(e){return e.pathname.endsWith(`.css`)},v=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=h(t,n);let r=s(t),i=_(r);return v(g,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:m,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},b={en:()=>y(()=>import(`./en-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["bundle/app-B_jk_lPZ.js","bundle/simulator-DeHOlOye.js","bundle/world-model-C3GVcyT7.js","bundle/format-CnTSBxgP.js","bundle/room-name-Cb8-ffEK.js","bundle/dom-BnYE5zIh.js","bundle/app-Cn3BvqjA.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={},t=[{id:`pt-BR`,name:`Português`},{id:`en`,name:`English`},{id:`es`,name:`Español`},{id:`fr`,name:`Français`}],n=`habblaud:locale`,r={...e};function i(e,t){r[e]=t}function a(e){let t=(e??``).trim().toLowerCase().replace(`_`,`-`);if(t){if(t===`fr`||t.startsWith(`fr-`))return`fr`;if(t===`pt`||t.startsWith(`pt-`))return`pt-BR`;if(t===`en`||t.startsWith(`en-`))return`en`;if(t===`es`||t.startsWith(`es-`))return`es`}}function o(e,t){let n=a(e.HABBLAUD_LANG);if(n)return n;for(let n of[e.LC_ALL,e.LC_MESSAGES,e.LANG,t]){let e=a(n);if(e)return e}return`en`}function s(e,t){let n=a(e);if(n)return n;for(let e of t){let t=a(e);if(t)return t}return`en`}function c(){let e=globalThis;if(e.window!==void 0){let t=null;try{t=e.localStorage?.getItem(`habblaud:locale`)??null}catch{}return s(t,e.navigator?.languages??[e.navigator?.language??``])}let t=e.process?.env??{};if(t.VITEST)return a(t.HABBLAUD_LANG_TEST)??`pt-BR`;let n;try{n=Intl.DateTimeFormat().resolvedOptions().locale}catch{n=void 0}return o(t,n)}var l=c();function u(){return l}var d=/\bHabblaud\b(?!\s*World)/g;function f(e,t){let n=r[l],i=n&&n[e]||e.replace(d,`Busybits`);return!t||t.length===0?i:i.replace(/\{(\d+)\}/g,(e,n)=>Number(n)<t.length?String(t[Number(n)]):e)}function p(){return l===`fr`?`fr-FR`:l===`en`?`en-US`:l===`es`?`es`:`pt-BR`}var m=`modulepreload`,h=function(e){return`/`+e},g={},_=function(e){return e.pathname.endsWith(`.css`)},v=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=h(t,n);let r=s(t),i=_(r);return v(g,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:m,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},b={en:()=>y(()=>import(`./en-BD-d_FWo.js`).then(e=>e.EN),[]),es:()=>y(()=>import(`./es-ZgMlZ_LY.js`).then(e=>e.ES),[]),fr:()=>y(()=>import(`./fr-DOSCFvER.js`).then(e=>e.FR),[])},x=u(),S=b[x];(S?S().then(e=>i(x,e)).catch(()=>void 0):Promise.resolve()).then(()=>y(()=>import(`./app-B_jk_lPZ.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6]))).then(e=>e.start());export{p as a,u as i,t as n,a as o,n as r,f as s,y as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e}from"./main-Bv-qstsh.js";import{p as t}from"./app-DatmLMV4.js";var n=2,r=1,i=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(i.getPropertyValue(`height`)),o=Math.max(0,parseInt(i.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),c={top:parseInt(s.getPropertyValue(`padding-top`)),bottom:parseInt(s.getPropertyValue(`padding-bottom`)),right:parseInt(s.getPropertyValue(`padding-right`)),left:parseInt(s.getPropertyValue(`padding-left`))},l=c.top+c.bottom,u=c.right+c.left,d=a-l,f=o-u-t;return{cols:Math.max(n,Math.floor(f/e.css.cell.width)),rows:Math.max(r,Math.floor(d/e.css.cell.height))}}},a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},c=(e,t,n,r)=>{for(var i=r>1?void 0:r?o(t,n):t,s=e.length-1,c;s>=0;s--)(c=e[s])&&(i=(r?c(t,n,i):c(i))||i);return r&&i&&a(t,n,i),i},l=(e,t)=>(n,r)=>t(n,r,e),u=`Terminal input`,d={get:()=>u,set:e=>u=e},f=`Too much output to announce, navigate to rows manually to read`,p={get:()=>f,set:e=>f=e};function m(e){return e.replace(/\r?\n/g,`\r`)}function h(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function g(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function _(e,t,n,r){e.stopPropagation(),e.clipboardData&&ee(e.clipboardData.getData(`text/plain`),t,n,r)}function ee(e,t,n,r){e=m(e),e=h(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function te(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ne(e,t,n,r,i){te(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function re(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ie(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var ae=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},oe=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},se=``,ce=` `,le=class e{constructor(){this.fg=0,this.bg=0,this.extended=new ue}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ue=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},v=class e extends le{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new ue,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?re(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},de=`di$target`,y=`di$dependencies`,fe=new Map;function pe(e){return e[y]||[]}function b(e){if(fe.has(e))return fe.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);x(t,e,r)};return t._id=e,fe.set(e,t),t}function x(e,t,n){t[de]===t?t[y].push({id:e,index:n}):(t[y]=[{id:e,index:n}],t[de]=t)}var S=b(`BufferService`),me=b(`CoreMouseService`),he=b(`CoreService`),ge=b(`CharsetService`),_e=b(`InstantiationService`),C=b(`LogService`),w=b(`OptionsService`),T=b(`OscLinkService`),ve=b(`UnicodeService`),ye=b(`DecorationService`),be=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new v,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):xe(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};be=c([l(0,S),l(1,w),l(2,T)],be);function xe(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
1
|
+
import{s as e}from"./main-7JfOGPBD.js";import{p as t}from"./app-B_jk_lPZ.js";var n=2,r=1,i=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(i.getPropertyValue(`height`)),o=Math.max(0,parseInt(i.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),c={top:parseInt(s.getPropertyValue(`padding-top`)),bottom:parseInt(s.getPropertyValue(`padding-bottom`)),right:parseInt(s.getPropertyValue(`padding-right`)),left:parseInt(s.getPropertyValue(`padding-left`))},l=c.top+c.bottom,u=c.right+c.left,d=a-l,f=o-u-t;return{cols:Math.max(n,Math.floor(f/e.css.cell.width)),rows:Math.max(r,Math.floor(d/e.css.cell.height))}}},a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},c=(e,t,n,r)=>{for(var i=r>1?void 0:r?o(t,n):t,s=e.length-1,c;s>=0;s--)(c=e[s])&&(i=(r?c(t,n,i):c(i))||i);return r&&i&&a(t,n,i),i},l=(e,t)=>(n,r)=>t(n,r,e),u=`Terminal input`,d={get:()=>u,set:e=>u=e},f=`Too much output to announce, navigate to rows manually to read`,p={get:()=>f,set:e=>f=e};function m(e){return e.replace(/\r?\n/g,`\r`)}function h(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function g(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function _(e,t,n,r){e.stopPropagation(),e.clipboardData&&ee(e.clipboardData.getData(`text/plain`),t,n,r)}function ee(e,t,n,r){e=m(e),e=h(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function te(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ne(e,t,n,r,i){te(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function re(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ie(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var ae=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},oe=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},se=``,ce=` `,le=class e{constructor(){this.fg=0,this.bg=0,this.extended=new ue}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return!(this.fg&50331648)}isBgDefault(){return!(this.bg&50331648)}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?!(this.extended.underlineColor&50331648):this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ue=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},v=class e extends le{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new ue,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?re(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},de=`di$target`,y=`di$dependencies`,fe=new Map;function pe(e){return e[y]||[]}function b(e){if(fe.has(e))return fe.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);x(t,e,r)};return t._id=e,fe.set(e,t),t}function x(e,t,n){t[de]===t?t[y].push({id:e,index:n}):(t[y]=[{id:e,index:n}],t[de]=t)}var S=b(`BufferService`),me=b(`CoreMouseService`),he=b(`CoreService`),ge=b(`CharsetService`),_e=b(`InstantiationService`),C=b(`LogService`),w=b(`OptionsService`),T=b(`OscLinkService`),ve=b(`UnicodeService`),ye=b(`DecorationService`),be=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new v,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(c!==-1||n.hasContent(t)){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(c===-1){c=t,s=a.extended.urlId;continue}l=a.extended.urlId!==s}else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+ +(!l&&t===o-1),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):xe(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};be=c([l(0,S),l(1,w),l(2,T)],be);function xe(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
2
2
|
|
|
3
3
|
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Se=b(`CharSizeService`),E=b(`CoreBrowserService`),Ce=b(`MouseService`),we=b(`RenderService`),Te=b(`SelectionService`),Ee=b(`CharacterJoinerService`),De=b(`ThemeService`),Oe=b(`LinkProviderService`),ke=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Fe.isErrorNoTelemetry(e)?new Fe(e.message+`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./main-
|
|
1
|
+
import{s as e}from"./main-7JfOGPBD.js";var t=/^[a-z2-7]{12}$/;function n(e){if(e.charCodeAt(0)!==64||e.charCodeAt(13)!==46)return;let n=e.slice(1,13),r=e.slice(14);if(t.test(n)&&r)return{machine:n,local:r}}function r(e){return(typeof e==`string`?e:``).replace(/[\u0000-\u001f\u007f-\u009f\p{Cf}]/gu,``).trim()}var i=e=>e===`agent-hub`||e===`gentle-shell-delegated`;function a(t){return t.id===`agent-hub`?e(`Agent Hub`):t.id===`gentle-shell-delegated`?e(`Gentle Shell`):t.custom&&(!t.name.trim()||t.name.trim()===t.id)?e(`Favoritos`):t.name}export{n as i,a as n,r,i as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as e}from"./main-Bv-qstsh.js";var t=4,n=6;function r(e){let r=(e,t)=>typeof e==`string`&&e.trim()?o(p(e.slice(0,t*4)),t):``,i=e=>!!e&&typeof e==`object`;return(Array.isArray(e)?e.slice(0,t):[]).flatMap((e,t)=>{if(!i(e))return[];let a=r(e.question,300);if(!a)return[];let o=(Array.isArray(e.options)?e.options.slice(0,n):[]).flatMap((e,t)=>{if(!i(e))return[];let n=r(e.label,80);if(!n)return[];let a=r(e.description,200);return[{index:t,label:n,...a?{description:a}:{}}]}),s=r(e.header,30);return[{index:t,question:a,...s?{header:s}:{},...e.multiSelect===!0?{multiSelect:!0}:{},options:o}]})}var i=46,a=300;function o(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,Math.max(1,t-1)).trimEnd()}…`:n}function s(e){let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n>=0?t.slice(n+1):t}function c(e){try{return new URL(e).hostname.replace(/^www\./,``)}catch{return o(e,30)}}function l(e){return typeof e==`string`?e:``}function u(e,t,n,r){return{kind:e,icon:t,text:o(p(n.slice(0,368)),i),...r?{detail:o(p(r.slice(0,a*4)),a)}:{}}}var d=/\.(png|jpe?g|gif|webp|svg|bmp|ico|heic)$/i,f=[[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g,e(`[chave privada]`)],[/\b(authorization|proxy-authorization|cookie|set-cookie|x-api-key|api-key|x-auth-token|private-token)(\s*:\s*)[^'"\n]+/gi,`$1$2***`],[/\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{6,}/g,`$1 ***`],[/(\b[a-z][a-z0-9+.-]*:\/\/[^\s:@/'"]+:)[^\s@/'"]+@/gi,`$1***@`],[/(\bhttps?:\/\/hooks\.slack\.com\/services\/)T[A-Z0-9]+\/B[A-Z0-9]+\/[A-Za-z0-9]+/gi,`$1***`],[/(\bhttps?:\/\/(?:discordapp|discord)\.com\/api\/webhooks\/)\d+\/[A-Za-z0-9_-]+/gi,`$1***`],[/(\bhttps?:\/\/api\.telegram\.org\/bot)\d+:[A-Za-z0-9_-]+/gi,`$1***`],[/((?:^|\s)(?:-u|--user)\s+['"]?[^\s:'"]+:)[^\s'"]+/g,`$1***`],[/((?:^|\s)--?(?:token|password|passwd|pass|secret|api-key|apikey|access-token|auth-token)(?:\s+|=))(['"]?)[^\s'"]+\2/gi,`$1$2***$2`],[/\b([A-Za-z0-9_.-]*?(?:token|secret|passw(?:or)?d|pwd|api[_-]?key|access[_-]?key|private[_-]?key|_key|credentials?))(["']?\s*[=:]\s*)(["']?)([^\s"'&;|,}]+)\3/gi,`$1$2$3***$3`],[/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{8,}/g,`sk-***`],[/\bgh[pousr]_[A-Za-z0-9]{16,}/g,`gh*_***`],[/\bgithub_pat_[A-Za-z0-9_]{16,}/g,`github_pat_***`],[/\bglpat-[A-Za-z0-9_-]{16,}/g,`glpat-***`],[/\bxox[abposr]-[A-Za-z0-9-]{8,}/g,`xox*-***`],[/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,`AKIA***`],[/\bAIza[0-9A-Za-z_-]{30,}/g,`AIza***`],[/\b(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9]{10,}/g,`sk_***`],[/\bnpm_[A-Za-z0-9]{30,}/g,`npm_***`],[/\bhf_[A-Za-z0-9]{30,}/g,`hf_***`],[/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,`eyJ***`]];function p(e){let t=e;for(let[e,n]of f)t=t.replace(e,n);return t}function m(e){let t=[],n=``,r=!1,i=null,a=0,o=!1;for(let s=0;s<e.length;s++){let c=e[s];if(i===`'`){c===`'`?i=null:n+=c;continue}if(i===`"`){c===`"`?i=null:c===`\\`&&s+1<e.length&&'"\\$`'.includes(e[s+1])?n+=e[++s]:n+=c;continue}c===`'`||c===`"`?(i=c,r=!0):c===`\\`&&s+1<e.length?(n+=e[++s],r=!0):c==="`"?(o=!o,n+=c,r=!0):c===`$`&&e[s+1]===`(`?(a++,n+=`$(`,s++,r=!0):a&&c===`(`?(a++,n+=c):a&&c===`)`?(a--,n+=c):/\s/.test(c)&&!a&&!o?(r&&t.push(n),n=``,r=!1):(n+=c,r=!0)}return r&&t.push(n),t}function h(e){let t=[],n=0,r=null,i=0;for(let a=0;a<e.length;a++){let o=e[a];if(r){o===`\\`&&r!==`'`?a++:o===r&&(r=null);continue}if(o===`\\`){a++;continue}if(o===`'`||o===`"`||o==="`"){r=o;continue}if(o===`(`?i++:o===`)`&&(i=Math.max(0,i-1)),i)continue;let s=0;o===`&`&&e[a+1]===`&`||o===`|`&&e[a+1]===`|`?s=2:(o===`|`||o===`;`||o===`&`&&e[a-1]!==`>`&&e[a-1]!==`<`&&e[a+1]!==`>`)&&(s=1),s&&(t.push(e.slice(n,a)),a+=s-1,n=a+1)}return t.push(e.slice(n)),t.map(e=>e.trim()).filter(Boolean)}var g=/^[A-Za-z_][A-Za-z0-9_]*=/,_={sudo:new Set([`-u`,`-g`,`-p`,`-C`,`-h`,`-U`]),time:new Set,nohup:new Set,exec:new Set([`-a`]),builtin:new Set,nice:new Set([`-n`]),caffeinate:new Set([`-t`,`-w`]),stdbuf:new Set,unbuffer:new Set,command:new Set,npx:new Set([`-p`,`--package`,`-c`,`--call`]),bunx:new Set([`-p`,`--package`]),env:new Set([`-u`,`-C`,`-S`,`--unset`,`--chdir`])};function v(e){let t=e.slice();for(let e=0;e<12&&t.length;e++){let e=t[0];if(g.test(e)){t=t.slice(1);continue}if(e===`(`||e===`{`||e===`!`){t=t.slice(1);continue}if(e===`command`&&(t[1]===`-v`||t[1]===`-V`))break;if(e===`timeout`||e===`gtimeout`){let e=1;for(;e<t.length&&t[e].startsWith(`-`);)e+=t[e]===`-s`||t[e]===`-k`?2:1;t=t.slice(e+1);continue}if((e===`pnpm`||e===`yarn`)&&(t[1]===`dlx`||t[1]===`exec`)){t=t.slice(2);continue}if(e===`npm`&&t[1]===`exec`){t=t.slice(2);continue}let n=Object.hasOwn(_,e)?_[e]:void 0;if(!n||t.length===1)break;let r=1;for(;r<t.length&&t[r].startsWith(`-`)&&t[r]!==`--`;)r+=n.has(t[r])?2:1;t[r]===`--`&&r++,t=t.slice(r)}for(;t.length&&/^[)}]$/.test(t[t.length-1]);)t=t.slice(0,-1);return t}function y(e){for(let t=0;t<e.length;t++){let n=/^1?(>>?)(.*)$/.exec(e[t]);if(n)return n[2]||e[t+1]}}function b(e){if(!e.length)return!0;let[t]=e;return e.every(e=>g.test(e))?!0:t===`export`||t===`unset`||t===`local`||t===`readonly`?e.slice(1).every(e=>g.test(e)||/^[A-Za-z_]\w*$/.test(e)||e.startsWith(`-`)):(t===`echo`||t===`printf`)&&y(e.slice(1))?!1:/^(cd|pushd|popd|set|shopt|source|\.|true|false|:|trap|ulimit|umask|clear|sleep|echo|printf|do|done|then|fi|else|esac)$/.test(t)}function x(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(/^\d*(?:>>?|<<?<?|>&|&>)$/.test(r)){n++;continue}/^\d*(?:>>?|<<?<?|>&|&>)/.test(r)||t.push(r)}return t}function S(e,t=new Set){let n=[],r=x(e);for(let e=0;e<r.length;e++){let i=r[e];if(i===`--`){n.push(...r.slice(e+1));break}if(i.startsWith(`-`)&&i.length>1){t.has(i)&&e++;continue}n.push(i)}return n}var C=e=>!!e&&!e.includes(`$`)&&!/^\d+$/.test(e)&&e!==`-`;function ee(t){let n=t.filter(C).map(e=>s(e)||e);if(n.length)return n.length===1?n[0]:n.length===2?`${n[0]} e ${n[1]}`:e(`{0} e mais {1}`,[n[0],n.length-1])}var te=new Set([`-e`,`-f`,`-A`,`-B`,`-C`,`-m`,`-d`,`-D`,`--regexp`,`--file`,`--max-count`,`--context`,`--include`,`--exclude`,`--exclude-dir`,`-g`,`-t`,`-T`,`--glob`,`--type`,`--type-not`,`-j`,`--threads`,`-M`,`--max-columns`]),ne=new Set(`-H.-d.-X.-o.-u.-A.-e.-b.-c.-F.-T.-w.-m.-x.-K.-r.-E.-U.-Y.-y.-z.-P.-Q.--header.--data.--data-raw.--data-binary.--data-urlencode.--json.--request.--output.--user.--user-agent.--referer.--cookie.--cookie-jar.--form.--upload-file.--write-out.--max-time.--connect-timeout.--proxy.--retry.--retry-delay.--cacert.--cert.--key.--resolve.--interface.--limit-rate.--range.--config.-O.-P.-t.-T.--output-document.--directory-prefix.--tries.--timeout.--password.--http-user.--http-password`.split(`.`));function re(t){let n,r=x(t);for(let e=0;e<r.length;e++){let t=r[e];if(t===`--url`){n=r[e+1];break}if(t.startsWith(`-`)){ne.has(t)&&e++;continue}if(/^(?:https?:\/\/)?(?:localhost|\[[0-9a-f:]+\]|[\w-]+(?:\.[\w-]+)+)(?::\d+)?(?:[/?#]\S*)?$/i.test(t)){n=t;break}}if(!n)return e(`Fazendo uma requisição HTTP`);let i;try{i=new URL(/^https?:\/\//i.test(n)?n:`http://${n}`)}catch{return e(`Fazendo uma requisição HTTP`)}let a=i.hostname.replace(/^\[|\]$/g,``);if(a===`localhost`||a===`0.0.0.0`||a===`::1`||/^127\./.test(a)){let t=`${i.port?`:${i.port}`:``}${i.pathname===`/`&&!i.port?`/`:i.pathname}`;return`${i.pathname.startsWith(`/api`)?e(`Testando a API local`):e(`Testando o servidor local`)} (${o(t,22)})`}return e(`Chamando {0}`,[a.replace(/^www\./,``)])}function ie(e){let t=(e.match(/\b(de|da|do|das|dos|para|pra|com|em|no|na|nos|nas|um|uma|os|as|que|por|sem|ao|aos|pelo|pela|e|o)\b/gi)??[]).length,n=(e.match(/[ãõçáéíóúâêôà]/gi)??[]).length,r=(e.match(/\b\w+(?:ando|endo|indo)\b/gi)??[]).length,i=(e.match(/\b(the|of|to|for|with|and|in|on|from|an|by|into|all|its|is|are|run|check|start|stop|show|list|get|read|count|find|kill|build|test|verify|wait|open|print|fetch|install|update|create|remove|screenshot)\b/gi)??[]).length;return t+r+n*2>i}var ae={node:`Node`,python:`Python`,python3:`Python`,ruby:`Ruby`,php:`PHP`,deno:`Deno`,bun:`Bun`,tsx:`TypeScript`,"ts-node":`TypeScript`,perl:`Perl`},oe={commit:[`📦`,e(`Fazendo commit`)],push:[`🚀`,e(`Enviando commits (git push)`)],pull:[`⬇️`,e(`Atualizando do remoto (git pull)`)],fetch:[`⬇️`,e(`Buscando do remoto (git fetch)`)],checkout:[`🌿`,e(`Trocando de branch`)],switch:[`🌿`,e(`Trocando de branch`)],merge:[`🔀`,e(`Fazendo merge`)],rebase:[`🔀`,e(`Fazendo rebase`)],status:[`🌿`,e(`Conferindo o git status`)],diff:[`🌿`,e(`Conferindo as mudanças (diff)`)],show:[`🌿`,e(`Olhando um commit (git show)`)],log:[`🌿`,e(`Lendo o histórico do git`)],add:[`🌿`,e(`Preparando arquivos (git add)`)],stash:[`🌿`,e(`Guardando mudanças (stash)`)],clone:[`⬇️`,e(`Clonando repositório`)],branch:[`🌿`,e(`Conferindo as branches`)],worktree:[`🌿`,e(`Mexendo nas worktrees`)],reset:[`🌿`,e(`Desfazendo mudanças (git reset)`)],restore:[`🌿`,e(`Restaurando arquivos (git restore)`)],tag:[`🏷️`,e(`Mexendo nas tags`)],blame:[`🌿`,e(`Vendo quem mudou cada linha`)],"cherry-pick":[`🍒`,e(`Trazendo um commit (cherry-pick)`)]},se={head:new Set([`-n`,`-c`,`--lines`,`--bytes`]),tail:new Set([`-n`,`-c`,`-s`,`--lines`,`--bytes`]),sed:new Set([`-e`,`-f`,`-l`]),gsed:new Set([`-e`,`-f`,`-l`]),awk:new Set([`-F`,`-v`,`-f`]),gawk:new Set([`-F`,`-v`,`-f`]),jq:new Set([`-f`,`--indent`,`--tab`]),sort:new Set([`-k`,`-t`,`-o`,`-S`,`-T`]),cut:new Set([`-d`,`-f`,`-c`,`-b`]),column:new Set([`-s`,`-c`,`-o`]),bat:new Set([`-l`,`--language`,`-r`,`--line-range`,`-H`,`--highlight-line`,`--style`]),less:new Set([`-p`,`-x`,`-y`,`-z`])};function ce(t,n){if(!t.length)return;let r=s(t[0]),i=t.slice(1),a=t.join(` `),c=(e,t,n)=>u(e,t,n);if(/\b(vitest|jest|pytest|phpunit|mocha|ava|rspec)\b|\b(go|cargo|deno|bun)\s+test\b|playwright\s+test|\b(npm|pnpm|yarn|bun)\s+(run\s+)?test\b|\bnode\s+--test\b|-m\s+(pytest|unittest)\b/.test(a))return c(`test`,`🧪`,e(`Rodando testes`));if(r===`git`){let t=0;for(;t<i.length&&i[t].startsWith(`-`);)t+=i[t]===`-C`||i[t]===`-c`?2:1;let n=i[t]??``,[r,a]=oe[n]??[`🌿`,n?`git ${n}`:e(`Usando o git`)];return c(`git`,r,a)}if(r===`gh`)return c(`git`,`🐙`,e(`GitHub CLI: gh {0}`,[i.slice(0,2).join(` `)]).trim());if(/\b(npm|pnpm|yarn|bun)\s+(i|install|add|ci)\b|\bpip3?\s+install\b|\bbrew\s+install\b|\bcomposer\s+(install|require)\b|\bpoetry\s+(add|install)\b|\bcargo\s+add\b|\bgo\s+get\b|\buv\s+(add|sync|pip\s+install)\b/.test(a))return c(`run`,`📦`,e(`Instalando dependências`));if(r===`tsc`&&i.includes(`--noEmit`)||/\b(npm|pnpm|yarn|bun)\s+(run\s+)?(typecheck|type-check|check-types)\b/.test(a))return c(`run`,`🔍`,e(`Conferindo os tipos (TypeScript)`));if(/\b(npm|pnpm|yarn|bun)\s+(run\s+)?build\b|\bvite\s+build\b|^tsc\b|\bwebpack\b|\bcargo\s+build\b|\bgo\s+build\b|^make\b|\bgradle\b|\bmvn\b|\besbuild\b|\brollup\b/.test(a))return c(`run`,`🏗️`,e(`Compilando o projeto`));if(/\b(npm|pnpm|yarn|bun)\s+(run\s+)?(dev|start|serve|preview)\b|^vite(\s|$)(?!build)|^(next|nuxt|astro)\s+dev\b|^expo\s+start\b|^nodemon\b|^tsx\s+watch\b/.test(a))return c(`run`,`▶️`,/\bpreview\b/.test(a)?e(`Subindo o preview do build`):e(`Subindo o servidor de dev`));if(/\b(eslint|prettier|ruff|black|biome|rubocop|phpcs|stylelint|oxlint)\b|\b(npm|pnpm|yarn)\s+(run\s+)?(lint|format)\b/.test(a))return c(`run`,`🧹`,e(`Rodando o linter`));if(/^(npm|pnpm|yarn|bun)$/.test(r)&&i[0]===`run`&&i[1])return c(`run`,`▶️`,e(`Rodando o script {0}`,[i[1]]));if(r===`docker`||r===`docker-compose`)return c(`run`,`🐳`,e(`Docker: {0}`,[i.filter(e=>!e.startsWith(`-`)).slice(0,2).join(` `)]).trim());if(/^(kubectl|helm|terraform|aws|gcloud|az|flyctl|fly|vercel|wrangler|netlify|railway)$/.test(r))return c(`run`,`☁️`,e(`Mexendo na nuvem ({0})`,[r]));if(/^(curl|wget|http|https|xh)$/.test(r))return c(`web`,`🌐`,re(i));if(/^(psql|mysql|sqlite3|redis-cli|mongosh|mongo|duckdb)$/.test(r))return c(`run`,`🗄️`,e(`Consultando o banco de dados`));if(/^(rg|grep|egrep|fgrep|ag|ack|git-grep)$/.test(r)){let t=i.findIndex(e=>e===`-e`||e===`--regexp`),n=(t>=0?i[t+1]:S(i,te)[0])?.replace(/\\\|/g,` | `).replace(/\\([.()[\]{}+?*^$])/g,`$1`);return c(`search`,`🔎`,n?e(`Buscando “{0}”`,[o(n,24)]):e(`Buscando no código`))}if(/^(ls|find|tree|fd|du|df|eza|exa)$/.test(r))return c(`read`,`📂`,e(`Explorando pastas`));if(r===`cd`||r===`pushd`)return c(`read`,`📂`,e(`Mudando de pasta`));if(r===`cat`||r===`tee`||r===`echo`||r===`printf`){let t=r===`tee`?S(i)[0]:y(i);if(t&&C(t)&&t!==`/dev/null`)return c(`write`,`📝`,e(`Escrevendo {0}`,[s(t)]));if(r===`tee`)return c(`write`,`📝`,e(`Escrevendo um arquivo`));if(r!==`cat`)return c(`run`,`💬`,e(`Mostrando texto no terminal`))}if(/^(sed|gsed|perl)$/.test(r)&&i.some(e=>/^-i|^--in-place|^-pi/.test(e))){let t=S(i,new Set([`-e`,`-f`])).pop();return c(`edit`,`✏️`,t&&C(t)&&/[./]/.test(t)?e(`Editando {0}`,[s(t)]):e(`Editando via terminal`))}if(/^(cat|head|tail|less|more|bat|nl|sed|gsed|awk|gawk|jq|wc|strings|xxd|od|hexdump|column|sort|uniq|cut)$/.test(r)){let t=S(r===`jq`?i.filter((e,t)=>!/^--(arg|argjson|slurpfile|rawfile)$/.test(i[t-1]??``)&&!/^--(arg|argjson|slurpfile|rawfile)$/.test(i[t-2]??``)):i,se[r]);/^(sed|gsed|awk|gawk|jq)$/.test(r)&&!i.includes(`-e`)&&!i.includes(`-f`)&&(t=t.slice(1));let n=ee(t);if(r===`wc`){let r=t.filter(C).length;return c(`read`,`🔢`,r>2?e(`Contando linhas de {0} arquivos`,[r]):n?e(`Contando linhas de {0}`,[n]):e(`Contando linhas`))}return r===`tail`&&i.some(e=>e===`-f`||e===`-F`)?c(`read`,`📜`,n?e(`Acompanhando {0}`,[n]):e(`Acompanhando um log`)):r===`jq`&&!n?c(`read`,`🔎`,e(`Filtrando JSON`)):/^(sort|uniq|cut|column)$/.test(r)&&!n?void 0:c(`read`,`📖`,n?e(`Lendo {0}`,[n]):e(`Lendo arquivo`))}if(/^(rm|mv|cp|mkdir|rmdir|touch|chmod|chown|ln|rsync|tar|zip|unzip|gzip|gunzip|xattr)$/.test(r))return c(`run`,`🗂️`,e(`Organizando arquivos`));if(r===`sleep`||r===`wait`)return c(`wait`,`⏳`,e(`Aguardando um pouco`));if(r===`open`||r===`xdg-open`)return c(`run`,`🖥️`,e(`Abrindo no computador`));if(/^(code|cursor|subl|vim|nvim|nano|emacs)$/.test(r))return c(`edit`,`✏️`,e(`Abrindo no editor`));if(/^(pkill|kill|killall)$/.test(r))return c(`run`,`🛑`,e(`Parando um processo`));if(r===`lsof`){let t=i.map(e=>/^(?:-i)?(?:tcp)?:(\d{2,5})$/i.exec(e)?.[1]).find(Boolean);return c(`run`,`🔌`,t?e(`Conferindo quem usa a porta {0}`,[t]):e(`Conferindo processos e portas`))}if(/^(ps|pgrep|top|htop|jobs)$/.test(r))return c(`run`,`🔍`,e(`Conferindo processos`));if(/^(which|whereis|type)$/.test(r)||r===`command`&&/^-[vV]$/.test(i[0]??``))return c(`search`,`🔎`,e(`Procurando um programa`));if(/^(diff|cmp|comm|colordiff|delta)$/.test(r))return c(`read`,`🔀`,e(`Comparando arquivos`));if(r===`date`)return c(`run`,`🕒`,e(`Conferindo a data e a hora`));if(r===`env`||r===`printenv`)return c(`run`,`🔍`,e(`Conferindo variáveis de ambiente`));if(/^(stat|file|md5|md5sum|shasum|sha256sum|realpath|readlink)$/.test(r))return c(`read`,`🔍`,e(`Conferindo um arquivo`));if(r===`claude`)return c(`run`,`🤖`,e(`Rodando o Claude Code`));if(/^(pbcopy|pbpaste)$/.test(r))return c(`run`,`📋`,e(`Usando a área de transferência`));if(/^(bash|sh|zsh|fish)$/.test(r)){let t=i.indexOf(`-c`);if(t>=0&&i[t+1]&&n<3)return w(i[t+1],n+1).desc;let r=S(i).find(C);return c(`run`,`▶️`,r?e(`Executando {0}`,[s(r)]):e(`Executando um script de shell`))}if(/^(node|python3?|ruby|php|deno|bun|tsx|ts-node|perl|java)$/.test(r)||r===`go`&&i[0]===`run`){let t=x(r===`go`?i.slice(1):i),n=t.find((e,n)=>!e.startsWith(`-`)&&!/^-[ecpr]$|^--(eval|print|import|require|loader)$/.test(t[n-1]??``)&&/[./]/.test(e)&&!/^\d+(\.\d+)*$/.test(e));return n&&!/^(-m|-c)$/.test(t[0]??``)?c(`run`,`▶️`,e(`Executando {0}`,[s(n)])):t[0]===`-m`&&t[1]?c(`run`,`▶️`,e(`Executando o módulo {0}`,[t[1]])):c(`run`,`▶️`,e(`Executando um script {0}`,[ae[r]??r]))}if(/^(\.{0,2}\/|~\/)/.test(t[0])||/\.(sh|bash|zsh|py|rb|mjs|js|ts)$/.test(t[0]))return c(`run`,`▶️`,e(`Executando {0}`,[r]))}function w(t,n){let r=t.replace(/\\\r?\n/g,` `).split(/\r?\n/);for(let t=0;t<r.length;t++){let i=r[t].trim();if(!i||i.startsWith(`#`))continue;let a=h(i),o,s=-1;for(let e=0;e<a.length;e++){let t=a[e];if(/^\(.*\)$/.test(t)&&n<3){let e=w(t.slice(1,-1),n+1);if(e.desc||e.prog)return e;continue}t=t.replace(/^\{\s*/,``);let r=v(m(t));if(!b(r)){o=r,s=e;break}}if(!o){if(r.slice(t+1).some(e=>e.trim()&&!e.trim().startsWith(`#`)))continue;let e=v(m(a[0]??``));return{desc:ce(e,n),prog:e[0]}}if(/^(for|while|until|if|select)$/.test(o[0])&&n<3){let i=a.slice(s+1).join(`; `),o=[/^(?:do|then)\b\s*(.*)$/s.exec(i.replace(/^.*?;\s*(?=(do|then)\b)/s,``))?.[1]?.trim(),...r.slice(t+1)].filter(e=>e&&e.trim()&&!/^(done|fi|else|esac)\b/.test(e.trim())).join(`
|
|
1
|
+
import{s as e}from"./main-7JfOGPBD.js";var t=4,n=6;function r(e){let r=(e,t)=>typeof e==`string`&&e.trim()?o(p(e.slice(0,t*4)),t):``,i=e=>!!e&&typeof e==`object`;return(Array.isArray(e)?e.slice(0,t):[]).flatMap((e,t)=>{if(!i(e))return[];let a=r(e.question,300);if(!a)return[];let o=(Array.isArray(e.options)?e.options.slice(0,n):[]).flatMap((e,t)=>{if(!i(e))return[];let n=r(e.label,80);if(!n)return[];let a=r(e.description,200);return[{index:t,label:n,...a?{description:a}:{}}]}),s=r(e.header,30);return[{index:t,question:a,...s?{header:s}:{},...e.multiSelect===!0?{multiSelect:!0}:{},options:o}]})}var i=46,a=300;function o(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,Math.max(1,t-1)).trimEnd()}…`:n}function s(e){let t=e.replace(/[\\/]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return n>=0?t.slice(n+1):t}function c(e){try{return new URL(e).hostname.replace(/^www\./,``)}catch{return o(e,30)}}function l(e){return typeof e==`string`?e:``}function u(e,t,n,r){return{kind:e,icon:t,text:o(p(n.slice(0,368)),i),...r?{detail:o(p(r.slice(0,a*4)),a)}:{}}}var d=/\.(png|jpe?g|gif|webp|svg|bmp|ico|heic)$/i,f=[[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g,e(`[chave privada]`)],[/\b(authorization|proxy-authorization|cookie|set-cookie|x-api-key|api-key|x-auth-token|private-token)(\s*:\s*)[^'"\n]+/gi,`$1$2***`],[/\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{6,}/g,`$1 ***`],[/(\b[a-z][a-z0-9+.-]*:\/\/[^\s:@/'"]+:)[^\s@/'"]+@/gi,`$1***@`],[/(\bhttps?:\/\/hooks\.slack\.com\/services\/)T[A-Z0-9]+\/B[A-Z0-9]+\/[A-Za-z0-9]+/gi,`$1***`],[/(\bhttps?:\/\/(?:discordapp|discord)\.com\/api\/webhooks\/)\d+\/[A-Za-z0-9_-]+/gi,`$1***`],[/(\bhttps?:\/\/api\.telegram\.org\/bot)\d+:[A-Za-z0-9_-]+/gi,`$1***`],[/((?:^|\s)(?:-u|--user)\s+['"]?[^\s:'"]+:)[^\s'"]+/g,`$1***`],[/((?:^|\s)--?(?:token|password|passwd|pass|secret|api-key|apikey|access-token|auth-token)(?:\s+|=))(['"]?)[^\s'"]+\2/gi,`$1$2***$2`],[/\b([A-Za-z0-9_.-]*?(?:token|secret|passw(?:or)?d|pwd|api[_-]?key|access[_-]?key|private[_-]?key|_key|credentials?))(["']?\s*[=:]\s*)(["']?)([^\s"'&;|,}]+)\3/gi,`$1$2$3***$3`],[/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{8,}/g,`sk-***`],[/\bgh[pousr]_[A-Za-z0-9]{16,}/g,`gh*_***`],[/\bgithub_pat_[A-Za-z0-9_]{16,}/g,`github_pat_***`],[/\bglpat-[A-Za-z0-9_-]{16,}/g,`glpat-***`],[/\bxox[abposr]-[A-Za-z0-9-]{8,}/g,`xox*-***`],[/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,`AKIA***`],[/\bAIza[0-9A-Za-z_-]{30,}/g,`AIza***`],[/\b(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9]{10,}/g,`sk_***`],[/\bnpm_[A-Za-z0-9]{30,}/g,`npm_***`],[/\bhf_[A-Za-z0-9]{30,}/g,`hf_***`],[/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,`eyJ***`]];function p(e){let t=e;for(let[e,n]of f)t=t.replace(e,n);return t}function m(e){let t=[],n=``,r=!1,i=null,a=0,o=!1;for(let s=0;s<e.length;s++){let c=e[s];if(i===`'`){c===`'`?i=null:n+=c;continue}if(i===`"`){c===`"`?i=null:c===`\\`&&s+1<e.length&&'"\\$`'.includes(e[s+1])?n+=e[++s]:n+=c;continue}c===`'`||c===`"`?(i=c,r=!0):c===`\\`&&s+1<e.length?(n+=e[++s],r=!0):c==="`"?(o=!o,n+=c,r=!0):c===`$`&&e[s+1]===`(`?(a++,n+=`$(`,s++,r=!0):a&&c===`(`?(a++,n+=c):a&&c===`)`?(a--,n+=c):/\s/.test(c)&&!a&&!o?(r&&t.push(n),n=``,r=!1):(n+=c,r=!0)}return r&&t.push(n),t}function h(e){let t=[],n=0,r=null,i=0;for(let a=0;a<e.length;a++){let o=e[a];if(r){o===`\\`&&r!==`'`?a++:o===r&&(r=null);continue}if(o===`\\`){a++;continue}if(o===`'`||o===`"`||o==="`"){r=o;continue}if(o===`(`?i++:o===`)`&&(i=Math.max(0,i-1)),i)continue;let s=0;o===`&`&&e[a+1]===`&`||o===`|`&&e[a+1]===`|`?s=2:(o===`|`||o===`;`||o===`&`&&e[a-1]!==`>`&&e[a-1]!==`<`&&e[a+1]!==`>`)&&(s=1),s&&(t.push(e.slice(n,a)),a+=s-1,n=a+1)}return t.push(e.slice(n)),t.map(e=>e.trim()).filter(Boolean)}var g=/^[A-Za-z_][A-Za-z0-9_]*=/,_={sudo:new Set([`-u`,`-g`,`-p`,`-C`,`-h`,`-U`]),time:new Set,nohup:new Set,exec:new Set([`-a`]),builtin:new Set,nice:new Set([`-n`]),caffeinate:new Set([`-t`,`-w`]),stdbuf:new Set,unbuffer:new Set,command:new Set,npx:new Set([`-p`,`--package`,`-c`,`--call`]),bunx:new Set([`-p`,`--package`]),env:new Set([`-u`,`-C`,`-S`,`--unset`,`--chdir`])};function v(e){let t=e.slice();for(let e=0;e<12&&t.length;e++){let e=t[0];if(g.test(e)){t=t.slice(1);continue}if(e===`(`||e===`{`||e===`!`){t=t.slice(1);continue}if(e===`command`&&(t[1]===`-v`||t[1]===`-V`))break;if(e===`timeout`||e===`gtimeout`){let e=1;for(;e<t.length&&t[e].startsWith(`-`);)e+=t[e]===`-s`||t[e]===`-k`?2:1;t=t.slice(e+1);continue}if((e===`pnpm`||e===`yarn`)&&(t[1]===`dlx`||t[1]===`exec`)){t=t.slice(2);continue}if(e===`npm`&&t[1]===`exec`){t=t.slice(2);continue}let n=Object.hasOwn(_,e)?_[e]:void 0;if(!n||t.length===1)break;let r=1;for(;r<t.length&&t[r].startsWith(`-`)&&t[r]!==`--`;)r+=n.has(t[r])?2:1;t[r]===`--`&&r++,t=t.slice(r)}for(;t.length&&/^[)}]$/.test(t[t.length-1]);)t=t.slice(0,-1);return t}function y(e){for(let t=0;t<e.length;t++){let n=/^1?(>>?)(.*)$/.exec(e[t]);if(n)return n[2]||e[t+1]}}function b(e){if(!e.length)return!0;let[t]=e;return e.every(e=>g.test(e))?!0:t===`export`||t===`unset`||t===`local`||t===`readonly`?e.slice(1).every(e=>g.test(e)||/^[A-Za-z_]\w*$/.test(e)||e.startsWith(`-`)):(t===`echo`||t===`printf`)&&y(e.slice(1))?!1:/^(cd|pushd|popd|set|shopt|source|\.|true|false|:|trap|ulimit|umask|clear|sleep|echo|printf|do|done|then|fi|else|esac)$/.test(t)}function x(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(/^\d*(?:>>?|<<?<?|>&|&>)$/.test(r)){n++;continue}/^\d*(?:>>?|<<?<?|>&|&>)/.test(r)||t.push(r)}return t}function S(e,t=new Set){let n=[],r=x(e);for(let e=0;e<r.length;e++){let i=r[e];if(i===`--`){n.push(...r.slice(e+1));break}if(i.startsWith(`-`)&&i.length>1){t.has(i)&&e++;continue}n.push(i)}return n}var C=e=>!!e&&!e.includes(`$`)&&!/^\d+$/.test(e)&&e!==`-`;function ee(t){let n=t.filter(C).map(e=>s(e)||e);if(n.length)return n.length===1?n[0]:n.length===2?`${n[0]} e ${n[1]}`:e(`{0} e mais {1}`,[n[0],n.length-1])}var te=new Set([`-e`,`-f`,`-A`,`-B`,`-C`,`-m`,`-d`,`-D`,`--regexp`,`--file`,`--max-count`,`--context`,`--include`,`--exclude`,`--exclude-dir`,`-g`,`-t`,`-T`,`--glob`,`--type`,`--type-not`,`-j`,`--threads`,`-M`,`--max-columns`]),ne=new Set(`-H.-d.-X.-o.-u.-A.-e.-b.-c.-F.-T.-w.-m.-x.-K.-r.-E.-U.-Y.-y.-z.-P.-Q.--header.--data.--data-raw.--data-binary.--data-urlencode.--json.--request.--output.--user.--user-agent.--referer.--cookie.--cookie-jar.--form.--upload-file.--write-out.--max-time.--connect-timeout.--proxy.--retry.--retry-delay.--cacert.--cert.--key.--resolve.--interface.--limit-rate.--range.--config.-O.-P.-t.-T.--output-document.--directory-prefix.--tries.--timeout.--password.--http-user.--http-password`.split(`.`));function re(t){let n,r=x(t);for(let e=0;e<r.length;e++){let t=r[e];if(t===`--url`){n=r[e+1];break}if(t.startsWith(`-`)){ne.has(t)&&e++;continue}if(/^(?:https?:\/\/)?(?:localhost|\[[0-9a-f:]+\]|[\w-]+(?:\.[\w-]+)+)(?::\d+)?(?:[/?#]\S*)?$/i.test(t)){n=t;break}}if(!n)return e(`Fazendo uma requisição HTTP`);let i;try{i=new URL(/^https?:\/\//i.test(n)?n:`http://${n}`)}catch{return e(`Fazendo uma requisição HTTP`)}let a=i.hostname.replace(/^\[|\]$/g,``);if(a===`localhost`||a===`0.0.0.0`||a===`::1`||/^127\./.test(a)){let t=`${i.port?`:${i.port}`:``}${i.pathname===`/`&&!i.port?`/`:i.pathname}`;return`${i.pathname.startsWith(`/api`)?e(`Testando a API local`):e(`Testando o servidor local`)} (${o(t,22)})`}return e(`Chamando {0}`,[a.replace(/^www\./,``)])}function ie(e){let t=(e.match(/\b(de|da|do|das|dos|para|pra|com|em|no|na|nos|nas|um|uma|os|as|que|por|sem|ao|aos|pelo|pela|e|o)\b/gi)??[]).length,n=(e.match(/[ãõçáéíóúâêôà]/gi)??[]).length,r=(e.match(/\b\w+(?:ando|endo|indo)\b/gi)??[]).length,i=(e.match(/\b(the|of|to|for|with|and|in|on|from|an|by|into|all|its|is|are|run|check|start|stop|show|list|get|read|count|find|kill|build|test|verify|wait|open|print|fetch|install|update|create|remove|screenshot)\b/gi)??[]).length;return t+r+n*2>i}var ae={node:`Node`,python:`Python`,python3:`Python`,ruby:`Ruby`,php:`PHP`,deno:`Deno`,bun:`Bun`,tsx:`TypeScript`,"ts-node":`TypeScript`,perl:`Perl`},oe={commit:[`📦`,e(`Fazendo commit`)],push:[`🚀`,e(`Enviando commits (git push)`)],pull:[`⬇️`,e(`Atualizando do remoto (git pull)`)],fetch:[`⬇️`,e(`Buscando do remoto (git fetch)`)],checkout:[`🌿`,e(`Trocando de branch`)],switch:[`🌿`,e(`Trocando de branch`)],merge:[`🔀`,e(`Fazendo merge`)],rebase:[`🔀`,e(`Fazendo rebase`)],status:[`🌿`,e(`Conferindo o git status`)],diff:[`🌿`,e(`Conferindo as mudanças (diff)`)],show:[`🌿`,e(`Olhando um commit (git show)`)],log:[`🌿`,e(`Lendo o histórico do git`)],add:[`🌿`,e(`Preparando arquivos (git add)`)],stash:[`🌿`,e(`Guardando mudanças (stash)`)],clone:[`⬇️`,e(`Clonando repositório`)],branch:[`🌿`,e(`Conferindo as branches`)],worktree:[`🌿`,e(`Mexendo nas worktrees`)],reset:[`🌿`,e(`Desfazendo mudanças (git reset)`)],restore:[`🌿`,e(`Restaurando arquivos (git restore)`)],tag:[`🏷️`,e(`Mexendo nas tags`)],blame:[`🌿`,e(`Vendo quem mudou cada linha`)],"cherry-pick":[`🍒`,e(`Trazendo um commit (cherry-pick)`)]},se={head:new Set([`-n`,`-c`,`--lines`,`--bytes`]),tail:new Set([`-n`,`-c`,`-s`,`--lines`,`--bytes`]),sed:new Set([`-e`,`-f`,`-l`]),gsed:new Set([`-e`,`-f`,`-l`]),awk:new Set([`-F`,`-v`,`-f`]),gawk:new Set([`-F`,`-v`,`-f`]),jq:new Set([`-f`,`--indent`,`--tab`]),sort:new Set([`-k`,`-t`,`-o`,`-S`,`-T`]),cut:new Set([`-d`,`-f`,`-c`,`-b`]),column:new Set([`-s`,`-c`,`-o`]),bat:new Set([`-l`,`--language`,`-r`,`--line-range`,`-H`,`--highlight-line`,`--style`]),less:new Set([`-p`,`-x`,`-y`,`-z`])};function ce(t,n){if(!t.length)return;let r=s(t[0]),i=t.slice(1),a=t.join(` `),c=(e,t,n)=>u(e,t,n);if(/\b(vitest|jest|pytest|phpunit|mocha|ava|rspec)\b|\b(go|cargo|deno|bun)\s+test\b|playwright\s+test|\b(npm|pnpm|yarn|bun)\s+(run\s+)?test\b|\bnode\s+--test\b|-m\s+(pytest|unittest)\b/.test(a))return c(`test`,`🧪`,e(`Rodando testes`));if(r===`git`){let t=0;for(;t<i.length&&i[t].startsWith(`-`);)t+=i[t]===`-C`||i[t]===`-c`?2:1;let n=i[t]??``,[r,a]=oe[n]??[`🌿`,n?`git ${n}`:e(`Usando o git`)];return c(`git`,r,a)}if(r===`gh`)return c(`git`,`🐙`,e(`GitHub CLI: gh {0}`,[i.slice(0,2).join(` `)]).trim());if(/\b(npm|pnpm|yarn|bun)\s+(i|install|add|ci)\b|\bpip3?\s+install\b|\bbrew\s+install\b|\bcomposer\s+(install|require)\b|\bpoetry\s+(add|install)\b|\bcargo\s+add\b|\bgo\s+get\b|\buv\s+(add|sync|pip\s+install)\b/.test(a))return c(`run`,`📦`,e(`Instalando dependências`));if(r===`tsc`&&i.includes(`--noEmit`)||/\b(npm|pnpm|yarn|bun)\s+(run\s+)?(typecheck|type-check|check-types)\b/.test(a))return c(`run`,`🔍`,e(`Conferindo os tipos (TypeScript)`));if(/\b(npm|pnpm|yarn|bun)\s+(run\s+)?build\b|\bvite\s+build\b|^tsc\b|\bwebpack\b|\bcargo\s+build\b|\bgo\s+build\b|^make\b|\bgradle\b|\bmvn\b|\besbuild\b|\brollup\b/.test(a))return c(`run`,`🏗️`,e(`Compilando o projeto`));if(/\b(npm|pnpm|yarn|bun)\s+(run\s+)?(dev|start|serve|preview)\b|^vite(\s|$)(?!build)|^(next|nuxt|astro)\s+dev\b|^expo\s+start\b|^nodemon\b|^tsx\s+watch\b/.test(a))return c(`run`,`▶️`,/\bpreview\b/.test(a)?e(`Subindo o preview do build`):e(`Subindo o servidor de dev`));if(/\b(eslint|prettier|ruff|black|biome|rubocop|phpcs|stylelint|oxlint)\b|\b(npm|pnpm|yarn)\s+(run\s+)?(lint|format)\b/.test(a))return c(`run`,`🧹`,e(`Rodando o linter`));if(/^(npm|pnpm|yarn|bun)$/.test(r)&&i[0]===`run`&&i[1])return c(`run`,`▶️`,e(`Rodando o script {0}`,[i[1]]));if(r===`docker`||r===`docker-compose`)return c(`run`,`🐳`,e(`Docker: {0}`,[i.filter(e=>!e.startsWith(`-`)).slice(0,2).join(` `)]).trim());if(/^(kubectl|helm|terraform|aws|gcloud|az|flyctl|fly|vercel|wrangler|netlify|railway)$/.test(r))return c(`run`,`☁️`,e(`Mexendo na nuvem ({0})`,[r]));if(/^(curl|wget|http|https|xh)$/.test(r))return c(`web`,`🌐`,re(i));if(/^(psql|mysql|sqlite3|redis-cli|mongosh|mongo|duckdb)$/.test(r))return c(`run`,`🗄️`,e(`Consultando o banco de dados`));if(/^(rg|grep|egrep|fgrep|ag|ack|git-grep)$/.test(r)){let t=i.findIndex(e=>e===`-e`||e===`--regexp`),n=(t>=0?i[t+1]:S(i,te)[0])?.replace(/\\\|/g,` | `).replace(/\\([.()[\]{}+?*^$])/g,`$1`);return c(`search`,`🔎`,n?e(`Buscando “{0}”`,[o(n,24)]):e(`Buscando no código`))}if(/^(ls|find|tree|fd|du|df|eza|exa)$/.test(r))return c(`read`,`📂`,e(`Explorando pastas`));if(r===`cd`||r===`pushd`)return c(`read`,`📂`,e(`Mudando de pasta`));if(r===`cat`||r===`tee`||r===`echo`||r===`printf`){let t=r===`tee`?S(i)[0]:y(i);if(t&&C(t)&&t!==`/dev/null`)return c(`write`,`📝`,e(`Escrevendo {0}`,[s(t)]));if(r===`tee`)return c(`write`,`📝`,e(`Escrevendo um arquivo`));if(r!==`cat`)return c(`run`,`💬`,e(`Mostrando texto no terminal`))}if(/^(sed|gsed|perl)$/.test(r)&&i.some(e=>/^-i|^--in-place|^-pi/.test(e))){let t=S(i,new Set([`-e`,`-f`])).pop();return c(`edit`,`✏️`,t&&C(t)&&/[./]/.test(t)?e(`Editando {0}`,[s(t)]):e(`Editando via terminal`))}if(/^(cat|head|tail|less|more|bat|nl|sed|gsed|awk|gawk|jq|wc|strings|xxd|od|hexdump|column|sort|uniq|cut)$/.test(r)){let t=S(r===`jq`?i.filter((e,t)=>!/^--(arg|argjson|slurpfile|rawfile)$/.test(i[t-1]??``)&&!/^--(arg|argjson|slurpfile|rawfile)$/.test(i[t-2]??``)):i,se[r]);/^(sed|gsed|awk|gawk|jq)$/.test(r)&&!i.includes(`-e`)&&!i.includes(`-f`)&&(t=t.slice(1));let n=ee(t);if(r===`wc`){let r=t.filter(C).length;return c(`read`,`🔢`,r>2?e(`Contando linhas de {0} arquivos`,[r]):n?e(`Contando linhas de {0}`,[n]):e(`Contando linhas`))}return r===`tail`&&i.some(e=>e===`-f`||e===`-F`)?c(`read`,`📜`,n?e(`Acompanhando {0}`,[n]):e(`Acompanhando um log`)):r===`jq`&&!n?c(`read`,`🔎`,e(`Filtrando JSON`)):/^(sort|uniq|cut|column)$/.test(r)&&!n?void 0:c(`read`,`📖`,n?e(`Lendo {0}`,[n]):e(`Lendo arquivo`))}if(/^(rm|mv|cp|mkdir|rmdir|touch|chmod|chown|ln|rsync|tar|zip|unzip|gzip|gunzip|xattr)$/.test(r))return c(`run`,`🗂️`,e(`Organizando arquivos`));if(r===`sleep`||r===`wait`)return c(`wait`,`⏳`,e(`Aguardando um pouco`));if(r===`open`||r===`xdg-open`)return c(`run`,`🖥️`,e(`Abrindo no computador`));if(/^(code|cursor|subl|vim|nvim|nano|emacs)$/.test(r))return c(`edit`,`✏️`,e(`Abrindo no editor`));if(/^(pkill|kill|killall)$/.test(r))return c(`run`,`🛑`,e(`Parando um processo`));if(r===`lsof`){let t=i.map(e=>/^(?:-i)?(?:tcp)?:(\d{2,5})$/i.exec(e)?.[1]).find(Boolean);return c(`run`,`🔌`,t?e(`Conferindo quem usa a porta {0}`,[t]):e(`Conferindo processos e portas`))}if(/^(ps|pgrep|top|htop|jobs)$/.test(r))return c(`run`,`🔍`,e(`Conferindo processos`));if(/^(which|whereis|type)$/.test(r)||r===`command`&&/^-[vV]$/.test(i[0]??``))return c(`search`,`🔎`,e(`Procurando um programa`));if(/^(diff|cmp|comm|colordiff|delta)$/.test(r))return c(`read`,`🔀`,e(`Comparando arquivos`));if(r===`date`)return c(`run`,`🕒`,e(`Conferindo a data e a hora`));if(r===`env`||r===`printenv`)return c(`run`,`🔍`,e(`Conferindo variáveis de ambiente`));if(/^(stat|file|md5|md5sum|shasum|sha256sum|realpath|readlink)$/.test(r))return c(`read`,`🔍`,e(`Conferindo um arquivo`));if(r===`claude`)return c(`run`,`🤖`,e(`Rodando o Claude Code`));if(/^(pbcopy|pbpaste)$/.test(r))return c(`run`,`📋`,e(`Usando a área de transferência`));if(/^(bash|sh|zsh|fish)$/.test(r)){let t=i.indexOf(`-c`);if(t>=0&&i[t+1]&&n<3)return w(i[t+1],n+1).desc;let r=S(i).find(C);return c(`run`,`▶️`,r?e(`Executando {0}`,[s(r)]):e(`Executando um script de shell`))}if(/^(node|python3?|ruby|php|deno|bun|tsx|ts-node|perl|java)$/.test(r)||r===`go`&&i[0]===`run`){let t=x(r===`go`?i.slice(1):i),n=t.find((e,n)=>!e.startsWith(`-`)&&!/^-[ecpr]$|^--(eval|print|import|require|loader)$/.test(t[n-1]??``)&&/[./]/.test(e)&&!/^\d+(\.\d+)*$/.test(e));return n&&!/^(-m|-c)$/.test(t[0]??``)?c(`run`,`▶️`,e(`Executando {0}`,[s(n)])):t[0]===`-m`&&t[1]?c(`run`,`▶️`,e(`Executando o módulo {0}`,[t[1]])):c(`run`,`▶️`,e(`Executando um script {0}`,[ae[r]??r]))}if(/^(\.{0,2}\/|~\/)/.test(t[0])||/\.(sh|bash|zsh|py|rb|mjs|js|ts)$/.test(t[0]))return c(`run`,`▶️`,e(`Executando {0}`,[r]))}function w(t,n){let r=t.replace(/\\\r?\n/g,` `).split(/\r?\n/);for(let t=0;t<r.length;t++){let i=r[t].trim();if(!i||i.startsWith(`#`))continue;let a=h(i),o,s=-1;for(let e=0;e<a.length;e++){let t=a[e];if(/^\(.*\)$/.test(t)&&n<3){let e=w(t.slice(1,-1),n+1);if(e.desc||e.prog)return e;continue}t=t.replace(/^\{\s*/,``);let r=v(m(t));if(!b(r)){o=r,s=e;break}}if(!o){if(r.slice(t+1).some(e=>e.trim()&&!e.trim().startsWith(`#`)))continue;let e=v(m(a[0]??``));return{desc:ce(e,n),prog:e[0]}}if(/^(for|while|until|if|select)$/.test(o[0])&&n<3){let i=a.slice(s+1).join(`; `),o=[/^(?:do|then)\b\s*(.*)$/s.exec(i.replace(/^.*?;\s*(?=(do|then)\b)/s,``))?.[1]?.trim(),...r.slice(t+1)].filter(e=>e&&e.trim()&&!/^(done|fi|else|esac)\b/.test(e.trim())).join(`
|
|
2
2
|
`),c=o?w(o,n+1):{};return c.desc?c:{desc:u(`run`,`🔁`,e(`Repetindo um comando em lote`))}}return{desc:ce(o,n),prog:o[0]}}return{}}function T(t,n){let r=t.trim(),i={};try{i=w(r.slice(0,8e3),0)}catch{i={}}if(i.desc)return u(i.desc.kind,i.desc.icon,i.desc.text,r);let a=n?.trim();if(a&&ie(a))return u(`run`,`💻`,a,r);let o=s(i.prog??``);return u(`run`,`💻`,/^[A-Za-z][\w.+-]{0,23}$/.test(o)?e(`Rodando {0}`,[o]):e(`Rodando um comando no terminal`),a?`${a} — ${r}`:r)}function E(e){return e.replace(/[_-]+/g,` `).replace(/([a-z])([A-Z])/g,`$1 $2`).trim().toLowerCase()}function le(t,n){let[,r=``,...i]=t.split(`__`),a=i.join(`__`),o=r.replace(/^claude_ai_/,``);if(/playwright|chrome|browser|puppeteer/i.test(o)){let t=l(n.url);return/navigate/.test(a)?u(`browser`,`🧭`,t?e(`Abrindo {0}`,[c(t)]):e(`Navegando no navegador`),t):/screenshot/.test(a)?u(`browser`,`📸`,e(`Tirando print da página`)):/click/.test(a)?u(`browser`,`🖱️`,e(`Clicando na página`)):/type|fill|form/.test(a)?u(`browser`,`⌨️`,e(`Preenchendo formulário`)):/snapshot|read|get_page|find/.test(a)?u(`browser`,`🧭`,e(`Lendo a página`)):u(`browser`,`🧭`,e(`Navegador: {0}`,[E(a)]))}return/github/i.test(o)?u(`mcp`,`🐙`,`GitHub: ${E(a)}`):/gmail|mail/i.test(o)?u(`mcp`,`✉️`,`E-mail: ${E(a)}`):/drive|docs|notion|confluence/i.test(o)?u(`mcp`,`📄`,`${o}: ${E(a)}`):/sql|postgres|mysql|mongo|elastic|redis|db/i.test(o)?u(`mcp`,`🗄️`,e(`Banco ({0}): {1}`,[o,E(a)])):u(`mcp`,`🔌`,`${o}: ${E(a)}`)}function D(t,n){let i=n&&typeof n==`object`?n:{},a=l(i.file_path)||l(i.notebook_path)||l(i.path);switch(t){case`Read`:return d.test(a)?u(`read`,`🖼️`,e(`Olhando {0}`,[s(a)]),a):/\.pdf$/i.test(a)?u(`read`,`📕`,e(`Lendo {0}`,[s(a)]),a):u(`read`,`📖`,a?e(`Lendo {0}`,[s(a)]):e(`Lendo arquivo`),a);case`Edit`:case`MultiEdit`:return u(`edit`,`✏️`,a?e(`Editando {0}`,[s(a)]):e(`Editando arquivo`),a);case`Write`:return u(`write`,`📝`,a?e(`Escrevendo {0}`,[s(a)]):e(`Escrevendo arquivo`),a);case`NotebookEdit`:return u(`edit`,`📓`,e(`Editando notebook {0}`,[s(a)]),a);case`Glob`:return u(`search`,`🔎`,e(`Procurando {0}`,[o(l(i.pattern)||e(`arquivos`),30)]),l(i.pattern));case`Grep`:{let t=l(i.pattern);return u(`search`,`🔎`,t?e(`Buscando “{0}”`,[o(t,26)]):e(`Buscando no código`),t)}case`LS`:return u(`read`,`📂`,e(`Listando {0}`,[s(a)||e(`pasta`)]),a);case`Bash`:return T(l(i.command),l(i.description));case`BashOutput`:case`TaskOutput`:return u(`run`,`📟`,e(`Conferindo saída do terminal`));case`Monitor`:return u(`run`,`📟`,e(`Monitorando um processo`),l(i.description)||l(i.command));case`KillShell`:case`KillBash`:case`TaskStop`:return u(`run`,`🛑`,e(`Parando um processo`));case`WebSearch`:{let t=l(i.query);return u(`web`,`🌐`,t?e(`Pesquisando “{0}”`,[o(t,28)]):e(`Pesquisando na web`),t)}case`WebFetch`:{let t=l(i.url);return u(`web`,`🌐`,t?e(`Lendo {0}`,[c(t)]):e(`Lendo uma página`),t)}case`TodoWrite`:{let t=Array.isArray(i.todos)?i.todos.filter(e=>!!e&&typeof e==`object`):[],n=t.filter(e=>e.status===`completed`).length;return u(`plan`,`🗒️`,e(`Atualizando a lista de tarefas`),t.length?e(`{0}/{1} concluídas`,[n,t.length]):void 0)}case`TaskCreate`:return u(`plan`,`🗒️`,e(`Nova tarefa: {0}`,[l(i.subject)||e(`sem título`)]),l(i.description));case`TaskUpdate`:{let t=l(i.status);return t===`completed`?u(`plan`,`✅`,e(`Concluiu a tarefa #{0}`,[l(i.taskId)])):t===`in_progress`?u(`plan`,`🗒️`,e(`Começou a tarefa #{0}`,[l(i.taskId)])):u(`plan`,`🗒️`,e(`Atualizando a tarefa #{0}`,[l(i.taskId)]))}case`TaskList`:case`TaskGet`:return u(`plan`,`🗒️`,e(`Revisando as tarefas`));case`EnterPlanMode`:return u(`plan`,`🧭`,e(`Entrando no modo de planejamento`));case`ExitPlanMode`:return u(`plan`,`🧭`,e(`Apresentando o plano`));case`Agent`:case`Task`:{let t=l(i.description),n=l(i.subagent_type);return u(`delegate`,`👥`,t?e(`Delegando: {0}`,[t]):e(`Chamando um subagente`),[n,l(i.prompt)].filter(Boolean).join(` — `))}case`Workflow`:return u(`delegate`,`🕸️`,e(`Orquestrando um workflow`));case`StructuredOutput`:return u(`communicate`,`📤`,e(`Entregando o resultado`));case`ListAgents`:return u(`communicate`,`👥`,e(`Conferindo a equipe`));case`SendMessage`:return u(`communicate`,`💬`,e(`Mensagem para {0}`,[l(i.to)||e(`outro agente`)]),l(i.message));case`AskUserQuestion`:{let t=Array.isArray(i.questions)?i.questions:[],n=r(t);return{...u(`ask`,`❓`,e(`Fazendo uma pergunta a você`),t[0]?l(t[0].question):void 0),...n.length?{questions:n}:{}}}case`Skill`:return u(`skill`,`🧩`,e(`Usando a skill {0}`,[l(i.skill)||l(i.command)]));case`SlashCommand`:return u(`skill`,`⌨️`,e(`Rodando {0}`,[l(i.command)]));case`ToolSearch`:return u(`other`,`🧰`,e(`Procurando ferramentas`));case`ListMcpResourcesTool`:case`ReadMcpResourceTool`:return u(`mcp`,`🔌`,e(`Lendo recursos MCP`));case`Artifact`:return u(`other`,`🖼️`,e(`Publicando uma página`));case`ArtifactData`:case`ArtifactComments`:return u(`other`,`🖼️`,e(`Atualizando uma página publicada`));case`CronCreate`:case`CronDelete`:case`CronList`:case`ScheduleWakeup`:case`RemoteTrigger`:return u(`plan`,`⏰`,e(`Agendando uma tarefa`));case`EnterWorktree`:case`ExitWorktree`:return u(`git`,`🌿`,e(`Trocando de worktree`));case`PushNotification`:case`SendUserFile`:return u(`communicate`,`📣`,e(`Enviando algo para você`));default:return t.startsWith(`mcp__`)?le(t,i):u(`other`,`🛠️`,e(`Usando {0}`,[t]))}}function O(t){return u(`prompt`,`📨`,e(`Nova tarefa: “{0}”`,[o(t,30)]),t)}function ue(e){let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}min${t%60?` ${t%60}s`:``}`:`${Math.floor(n/60)}h${n%60?` ${n%60}min`:``}`}var k=`ShellDone`,de=`ShellWait`;function A(t,n){let r=n&&typeof n==`object`?n:{},s=t===`Monitor`?`monitor`:`shell`,u=r.ws&&typeof r.ws==`object`?l(r.ws.url):``,d=l(r.command).trim()||u.trim(),f=l(r.description).trim(),m;m=f?o(p(f.slice(0,368)),i):s===`monitor`?u?e(`Escutando {0}`,[c(u)]):e(`Monitorando um processo`):d?T(d).text:e(`Comando no terminal`);let h={label:m,kind:s};return d&&(h.command=o(p(d.slice(0,a*4)),a)),h}function j(e,t,n=``){return t?`${e}${o(t,Math.max(8,i-e.length-n.length))}${n}`:`${e.replace(/:\s*$/,``)}${n}`}var M={think:()=>u(`think`,`💭`,e(`Pensando…`)),respond:t=>u(`respond`,`💬`,e(`Escrevendo a resposta`),t),turnDone:t=>u(`done`,`✅`,t?e(`Concluiu em {0}`,[ue(t)]):e(`Concluiu`)),error:(t,n)=>u(`error`,`⚠️`,t?e(`Erro em {0}`,[t]):e(`Algo deu errado`),n),interrupted:()=>u(`wait`,`✋`,e(`Interrompido por você`)),compact:()=>u(`compact`,`🧹`,e(`Organizando a memória (compactando)`)),waiting:t=>u(`wait`,`✋`,t?e(`Precisa de você: {0}`,[t]):e(`Precisa de você`)),backgroundResult:t=>u(`other`,`📬`,e(`Recebeu resultado em segundo plano`),t),apiRetry:()=>u(`wait`,`🔁`,e(`Instabilidade na API, tentando de novo`)),rejected:t=>u(`wait`,`🚫`,t?e(`Você recusou: {0}`,[t]):e(`Você recusou a ação`)),cleared:()=>u(`compact`,`🧽`,e(`Começou uma conversa nova (/clear)`)),supervising:()=>u(`delegate`,`👥`,e(`Acompanhando os subagentes`)),answered:t=>u(`ask`,`💬`,e(`Recebeu a sua resposta`),t),waitingShell:(t,n=1,r)=>({...u(`wait`,`⏳`,j(n>1?e(`Esperando {0} shells: `,[n]):e(`Esperando o shell: `),t),r),tool:de}),shellDone:(t,n,r,i)=>{if(n===`failed`)return{...u(`run`,`❌`,j(e(`Shell falhou: `),t),i),tool:k,error:!0};if(n===`killed`)return{...u(`run`,`🛑`,j(e(`Shell interrompido: `),t),i),tool:k,error:!0};let a=r!==void 0&&r>=1e3?` (${ue(r)})`:``;return{...u(`run`,`✅`,j(e(`Shell terminou: `),t,a),i),tool:k}}},N=2e3,P=`AskUserQuestion`,fe=300;function F(e,t){if(!e.length||!Array.isArray(t)||t.length!==e.length)return;let n=new Map;for(let e of t){if(!e||typeof e!=`object`||n.has(e.question))return;n.set(e.question,e)}let r=[];for(let t of e){let e=n.get(t.index);if(!e)return;let i=Array.isArray(e.options)?e.options:[],a=[...new Set(i)].sort((e,t)=>e-t);if(a.length!==i.length||a.some(e=>!t.options.some(t=>t.index===e)))return;let o=typeof e.other==`string`?e.other.trim():``;if(o.length>2e3)return;let s=a.length+ +!!o;if(t.multiSelect?s<1:s!==1)return;r.push({question:t.index,...a.length?{options:a}:{},...o?{other:o}:{}})}return r}function pe(t,n){return o(n.flatMap(n=>{let r=t.find(e=>e.index===n.question);if(!r)return[];let i=(n.options??[]).map(t=>r.options.find(e=>e.index===t)?.label??e(`opção {0}`,[t+1]));return n.other&&i.push(`“${o(p(n.other.slice(0,N)),80)}”`),[`${r.header??o(r.question,40)}: ${i.join(`, `)}`]}).join(` · `),fe)}var me=`GitHub`,he=12e3,ge=6e5,_e=46,ve=30;function I(e,t){return o(p(e.slice(0,t*4)),t)}function L(e){return e.branch?I(e.branch,28):e.number===void 0?e.workflow?I(e.workflow,28):void 0:`PR #${e.number}`}function ye(e){return e.workflow&&!/^ci$/i.test(e.workflow.trim())?e.workflow:L(e)}function R(t){let n=t.number===void 0?`PR`:`PR #${t.number}`;switch(t.kind){case`pr_opened`:return e(`{0} aberto!`,[n]);case`pr_merged`:return e(`{0} mergeado!`,[n]);case`release`:return t.tag?I(e(`Release {0} no ar!`,[t.tag]),ve):e(`Release no ar!`);case`ci_failed`:{let n=L(t);return I(n?e(`CI falhou ({0})`,[n]):e(`CI falhou`),ve)}case`ci_passed`:return e(`CI verde de novo!`);default:return}}function be(t,n,r){let i=t.number===void 0?e(`um PR`):e(`o PR #{0}`,[t.number]),a=(e,n,r,i=!1)=>{let a={kind:`git`,icon:e,text:I(n,_e),tool:me},o=r??t.url??t.repo;return o&&(a.detail=I(o,300)),i&&(a.error=!0),a};switch(t.kind){case`pr_opened`:return{notice:e(`🎉 {0} abriu {1} em {2}`,[n,i,r]),level:`success`,activity:a(`🎉`,e(`Abriu {0}`,[i]))};case`pr_merged`:return{notice:e(`🎉 {0} mergeou {1} em {2}`,[n,i,r]),level:`success`,activity:a(`🎉`,e(`Mergeou {0}`,[i]))};case`release`:{let i=t.tag?I(t.tag,24):void 0;return{notice:e(`🎉 {0} publicou {1} em {2}`,[n,i?e(`a release {0}`,[i]):e(`uma release`),r]),level:`success`,activity:a(`🎉`,i?e(`Publicou a release {0}`,[i]):e(`Publicou uma release`))}}case`push`:{let i=t.branch?I(t.branch,28):void 0;return{notice:e(`🚀 {0} enviou commits {1}em {2}`,[n,i?e(`para {0} `,[i]):``,r]),level:`info`,activity:a(`🚀`,i?e(`Enviou commits para {0}`,[i]):e(`Enviou commits ao GitHub`))}}case`ci_failed`:{let n=L(t),i=ye(t);return{notice:e(`🚨 CI falhou em {0}{1}`,[r,n?` (${n})`:``]),level:`warn`,activity:a(`🚨`,i?e(`CI falhou: {0}`,[i]):e(`CI falhou`),[t.workflow,t.branch,t.url].filter(Boolean).join(` — `)||void 0,!0)}}case`ci_passed`:{let n=L(t),i=ye(t);return{notice:e(`✅ CI passou em {0}{1}`,[r,n?` (${n})`:``]),level:`success`,activity:a(`✅`,i?e(`CI passou: {0}`,[i]):e(`CI passou`),[t.workflow,t.branch,t.url].filter(Boolean).join(` — `)||void 0)}}}}var xe=class{rooms=new Map;apply(e,t,n,r){let i=this.rooms.get(e)??{},a=(e,t,i)=>{let a={kind:e,text:t,at:n,until:n+i};return r&&(a.agentId=r),a};switch(t.kind){case`pr_opened`:case`pr_merged`:case`release`:i.party=a(`party`,R(t),he);break;case`ci_failed`:i.alarm=a(`alarm`,R(t),ge),delete i.party;break;case`ci_passed`:if(!i.alarm||i.alarm.until<=n)return!1;delete i.alarm,i.party=a(`party`,R(t),he);break;default:return!1}return this.rooms.set(e,i),!0}get(e,t){let n=this.rooms.get(e);if(n){if(n.party&&n.party.until>t)return n.party;if(n.alarm&&n.alarm.until>t)return n.alarm}}prune(e){let t=!1;for(let[n,r]of this.rooms)r.party&&r.party.until<=e&&(delete r.party,t=!0),r.alarm&&r.alarm.until<=e&&(delete r.alarm,t=!0),!r.party&&!r.alarm&&this.rooms.delete(n);return t}};function z(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function B(e){let t=e>>>0;return()=>{t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}var Se=2e4,Ce=`HabblaudMessage`,V=300;function H(t,n=0){let r=o(p(t.slice(0,V*4)),V),i=n>0?n===1?e(`com 1 imagem`):e(`com {0} imagens`,[n]):``,a=r&&i?`${r} · ${i}`:r||i;return{kind:`communicate`,icon:`✉️`,text:e(`Mensagem pelo Habblaud`),tool:Ce,...a?{detail:a}:{}}}var we=15728640,Te=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`];function Ee(e){return/^\s*\/[^\s/]+(?:\s[\s\S]*)?$/.test(e)}var De=`Ana.Beatriz.Camila.Daniela.Eduarda.Fernanda.Gabriela.Helena.Isabela.Júlia.Larissa.Mariana.Natália.Olívia.Paula.Rebeca.Sofia.Tatiana.Valentina.Yasmin.Alice.Bianca.Cecília.Débora.Elisa.Flávia.Giovana.Heloísa.Iara.Jéssica.Lívia.Manuela.Melissa.Nina.Priscila.Rafaela.Sabrina.Teresa.Vitória.Zoe.Aline.Bruna.Clara.Estela.Fabiana.Glória.Ingrid.Joana.Kátia.Lara.Maitê.Mirela.Noemi.Pietra.Renata.Simone.Sara.Vanessa.Luana.Marina`.split(`.`),U=`Arthur.Bruno.Caio.Diego.Enzo.Felipe.Gustavo.Henrique.Igor.João.Kauã.Lucas.Mateus.Nicolas.Otávio.Pedro.Rafael.Samuel.Thiago.Vinícius.Bernardo.Danilo.Davi.Emanuel.Fábio.Gael.Heitor.Hugo.Joaquim.Jorge.Leonardo.Lorenzo.Luan.Marcelo.Murilo.Noah.Otto.Raul.Renato.Ricardo.Rodrigo.Sérgio.Theo.Tomás.Ulisses.Vicente.Wagner.Yuri.Augusto.Benício.César.Douglas.Elias.Francisco.Guilherme.Ícaro.Jonas.Leandro.Miguel.Paulo`.split(`.`),W=Object.freeze(De.flatMap((e,t)=>[{name:e,look:`f`},...U[t]?[{name:U[t],look:`m`}]:[]]));function G(e,t){let n=W.length,r=z(e)%n;for(let e=0;e<n;e++){let i=W[(r+e)%n];if(!t.has(i.name))return i}let i=W[r];for(let e=2;;e++){let n=`${i.name} ${e}`;if(!t.has(n))return{name:n,look:i.look}}}var K=[`CI`,`build-test`,e(`Testes`),e(`Lint e tipos`),`Deploy`];function Oe(e,t){let n=t.branch??`main`,r=K[Math.floor(e()*K.length)];if(t.alarm&&e()<.75)return{kind:`ci_passed`,branch:n,workflow:r};let i=e();return i<.32?{kind:`pr_opened`,number:t.pr}:i<.58?{kind:`pr_merged`,number:Math.max(1,t.pr-1-Math.floor(e()*3))}:i<.84?{kind:`ci_failed`,branch:n,workflow:r}:i<.92?{kind:`ci_passed`,branch:n,workflow:r}:{kind:`release`,tag:`v${1+Math.floor(e()*3)}.${Math.floor(e()*10)}.${Math.floor(e()*10)}`}}var ke=3e5,q=[[`- const total = items.reduce((s, i) => s + i.price, 0);`,`+ const total = items.reduce((s, i) => s + i.price * i.qty, 0);`,`+ if (total < 0) throw new Error("total inválido");`],[`- export const TIMEOUT = 5_000;`,`+ export const TIMEOUT = 15_000;`],[`- <button onClick={save}>Salvar</button>`,`+ <button onClick={save} disabled={saving}>`,`+ {saving ? "Salvando…" : "Salvar"}`,`+ </button>`]],Ae=[[{header:`Cache`,question:e(`Onde guardo o cache das sessões de login?`),options:[{label:`Redis`,description:e(`Rápido, e já roda no docker-compose do projeto`)},{label:`PostgreSQL`,description:e(`Uma tabela a mais no banco que já existe`)},{label:e(`Memória`),description:e(`Mais simples, mas some quando o servidor reinicia`)}]},{header:e(`Testes`),question:e(`Quais testes eu rodo antes do commit?`),multiSelect:!0,options:[{label:e(`Unidade`),description:e(`npm test, cerca de 40 s`)},{label:e(`Integração`),description:e(`Sobe um banco de teste no Docker`)},{label:`E2E`,description:e(`Playwright no navegador, uns 5 min`)}]}],[{header:e(`Erro de rede`),question:e(`Como trato a falha de rede no checkout?`),options:[{label:e(`Tentar de novo`),description:e(`Até 3 tentativas, com espera crescente`)},{label:e(`Avisar o cliente`),description:e(`Mensagem com um botão para tentar de novo`)},{label:e(`Guardar e enviar depois`),description:e(`Fila local até a conexão voltar`)}]},{header:e(`Telas`),question:e(`Em quais telas aplico a mudança?`),multiSelect:!0,options:[{label:e(`Carrinho`)},{label:e(`Pagamento`)},{label:e(`Confirmação do pedido`)}]}]];function je(e){return e.map(e=>[e.question,...e.options.map(e=>` - ${e.label}${e.description?`: ${e.description}`:``}`)].join(`
|
|
3
3
|
`)).join(`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./main-Bv-qstsh.js";import{l as t,n}from"./simulator-B4Usk2yH.js";import{c as r,g as i}from"./format-DS9qjIGc.js";var a=e=>new TextEncoder().encode(e).length;function o(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}var s=e=>typeof e==`object`&&!!e&&!Array.isArray(e),c=e=>typeof e==`number`&&Number.isFinite(e);function l(e){if(s(e)){if(e.kind===`agent`&&typeof e.agentId==`string`&&e.agentId)return{kind:`agent`,agentId:e.agentId};if(e.kind===`script`&&(e.name===void 0||typeof e.name==`string`))return{kind:`script`,...typeof e.name==`string`?{name:e.name}:{}}}}function u(e){if(!s(e))return;let t=l(e.from);if(typeof e.id!=`string`||!e.id||typeof e.title!=`string`||!e.title||!t||e.status!==`open`&&e.status!==`resolved`||!c(e.createdAt)||!c(e.updatedAt))return;let n={id:e.id,title:e.title.slice(0,200),from:t,scope:`local`,status:e.status,createdAt:e.createdAt,updatedAt:e.updatedAt};return typeof e.key==`string`&&e.key&&(n.key=e.key.slice(0,128)),typeof e.body==`string`&&a(e.body)<=8192&&(n.body=e.body),typeof e.link==`string`&&e.link.length<=2048&&o(e.link)&&(n.link=e.link),c(e.resolvedAt)&&(n.resolvedAt=e.resolvedAt),typeof e.machine==`string`&&e.machine&&(n.machine=e.machine),n}var d=32768;function f(e){let t=e.toBase64;if(typeof t==`function`)return t.call(e);let n=[];for(let t=0;t<e.length;t+=d)n.push(String.fromCharCode.apply(null,e.subarray(t,t+d)));return btoa(n.join(``))}async function p(t){try{return f(new Uint8Array(await t.arrayBuffer()))}catch{throw Error(e(`não deu para ler o arquivo`))}}function m(e=import.meta.url){try{return/\/bundle\/(main-[\w-]+)\.js$/.exec(new URL(e).pathname)?.[1]}catch{return}}function h(e){return e.behavior}var g=2,ee=2e3,_=3e4;function v(e){return Math.min(_,ee*2**Math.max(0,e))}function te(e){let t=new URLSearchParams(e),n=e=>{let n=t.get(e);if(n===null||n.trim()===``)return null;let r=Number(n);return Number.isFinite(r)?r:null},r=n(`speed`),i=n(`sessions`),a=n(`seed`);return{speed:r!==null&&r>0?Math.min(r,50):1,sessions:i!==null&&i>=0?Math.min(Math.floor(i),40):4,...a!==null&&a>=0?{seed:Math.floor(a)}:{},...t.get(`noquota`)===`1`?{codexNoQuota:!0}:{}}}var ne=[{name:`compact`,description:e(`Resume a conversa para liberar contexto`),source:`builtin`},{name:`context`,description:e(`Mostra o uso do contexto`),source:`builtin`},{name:`review`,description:e(`Revisa um pull request`),source:`plugin`,plugin:`code-review`}],re=class{snapshot=null;feed=[];connection=`connecting`;mock;inboxFrame={items:[]};listeners=new Map;agentIndex=new Map;roomIndex=new Map;source=null;mockTimer=null;search;openStream;attempts=0;retryTimer=null;retryAt=null;stopped=!0;onOnline=()=>{!this.stopped&&this.connection===`closed`&&this.reconnectNow()};replay=!1;live=null;constructor(e={}){this.mock=!!e.mock,this.search=e.search??(typeof location<`u`?location.search:``),this.openStream=e.eventSource??(e=>new EventSource(e))}on(e,t){let n=this.listeners.get(e);return n||this.listeners.set(e,n=new Set),n.add(t),()=>void n.delete(t)}connect(){if(this.stopped){if(this.stopped=!1,this.mock)return this.startMock();this.startSSE()}}disconnect(){this.stopped=!0,typeof removeEventListener==`function`&&removeEventListener(`online`,this.onOnline),this.clearRetry(),this.closeSource(),this.mockTimer&&clearInterval(this.mockTimer),this.mockTimer=null}reconnectNow(){this.mock||(this.clearRetry(),this.closeSource(),this.stopped=!1,this.startSSE())}get nextRetryAt(){return this.retryAt}agent(e){return this.agentIndex.get(e)}room(e){return this.roomIndex.get(e)}agentsInRoom(e){return(this.snapshot?.agents??[]).filter(t=>t.roomId===e)}async agentHistory(e){if(this.mock||this.replay)return this.agent(e)?.recent??[];let t=await fetch(`/api/agents/${encodeURIComponent(e)}`);return t.ok?(await t.json()).history:this.agent(e)?.recent??[]}async setDemo(e){return this.mock?!0:(await fetch(`/api/demo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})})).ok}async checkUpdates(){return!this.mock&&(await fetch(`/api/updates/check`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`})).ok}async applyUpdate(){if(this.mock)return{ok:!1};let e=await fetch(`/api/updates/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`});if(e.ok)return{ok:!0};let t=await e.json().catch(()=>({}));return t.error?{ok:!1,error:t.error}:{ok:!1}}get replaying(){return this.replay}get liveSnapshot(){return this.replay?this.live?.snap??null:this.snapshot}pushReplay(e){this.replay||(this.replay=!0,this.live=this.snapshot?{snap:this.snapshot,at:Date.now()}:null),this.setSnapshot(e)}stopReplay(){if(!this.replay)return;this.replay=!1;let e=this.live;this.live=null,e?this.setSnapshot({...e.snap,serverTime:e.snap.serverTime+(Date.now()-e.at)}):(this.snapshot=null,this.agentIndex=new Map,this.roomIndex=new Map)}async permissionDetail(e,t){let n=this.agent(e)?.permission;if(n?.id===t&&n.input!==void 0)return n;if(this.mock)return n?.id===t?n:void 0;let r=await fetch(`/api/permissions/${encodeURIComponent(t)}`);if(r.ok)return await r.json()}async decidePermission(t,n){let r=this.snapshot?.agents.find(e=>e.permission?.id===t)?.id,i=()=>{r&&this.emit(`decided`,{agentId:r,verdict:h(n)})};if(this.mock){let r=this.mockSim;if(!r?.decidePermission(t,n))return e(`Este pedido já foi respondido.`);this.applySnapshot(r.snapshot()),i();return}let a=await fetch(`/api/permissions/${encodeURIComponent(t)}/decision`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});if(a.ok){i();return}try{let e=await a.json();if(typeof e.error==`string`)return e.error}catch{}return e(`Não foi possível responder (erro {0}).`,[a.status])}async saveCharacter(e,t){return this.characterRequest(e,`PUT`,t)}async resetCharacter(e){return this.characterRequest(e,`DELETE`,{})}async characterRequest(t,n,r){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/agents/${encodeURIComponent(t)}/character`,n,r,t=>e(`Não foi possível salvar o personagem (erro {0}).`,[t]))}async writeRequest(t,n,r,i){let a;try{a=await fetch(t,{method:n,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})}catch{return e(`Sem conexão com o Habblaud.`)}if(!a.ok){try{let e=await a.json();if(typeof e.error==`string`)return e.error}catch{}return i(a.status)}}async loadAvatar(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/avatar`);return e.ok?await e.json():null}catch{return null}}async saveAvatar(e){return this.avatarRequest(`PUT`,e)}async resetAvatar(){return this.avatarRequest(`DELETE`,{})}async avatarRequest(t,n){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/avatar`,t,n,t=>e(`Não foi possível salvar o avatar (erro {0}).`,[t]))}get inboxItems(){return this.inboxFrame.items}async resolveInbox(t){return this.mock||this.replay?e(`A mesa só funciona com o escritório ao vivo.`):this.writeRequest(`/api/inbox/${encodeURIComponent(t)}/resolve`,`POST`,{},t=>e(`Não foi possível resolver o item (erro {0}).`,[t]))}applyInbox(e){if(!e||!Array.isArray(e.items))return;let t=e.items.map(u).filter(e=>!!e),n=e.arrived?u(e.arrived):void 0;this.inboxFrame={items:t},this.emit(`inbox`,n?{items:t,arrived:n}:{items:t})}get defaultLook(){return(this.liveSnapshot??this.snapshot)?.defaultLook??{parts:{},since:0}}async loadDefaultLook(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/settings/default-look`);return e.ok?await e.json():null}catch{return null}}async saveDefaultLook(t){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/settings/default-look`,`PUT`,t,t=>e(`Não foi possível salvar o estilo padrão (erro {0}).`,[t]))}async resetDefaultLook(){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/settings/default-look`,`DELETE`,{},t=>e(`Não foi possível salvar o estilo padrão (erro {0}).`,[t]))}async loadAttachmentSettings(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/settings/attachments`);if(!e.ok)return null;let t=(await e.json()).retentionDays;return t===null||typeof t==`number`?{retentionDays:t}:null}catch{return null}}async saveAttachmentSettings(t){return this.mock||this.replay?e(`Editar a limpeza dos anexos só funciona com o escritório ao vivo.`):this.writeRequest(`/api/settings/attachments`,`PUT`,t,t=>e(`Não foi possível salvar a limpeza dos anexos (erro {0}).`,[t]))}async loadMachines(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/central/machines`,{cache:`no-store`});if(!e.ok)return null;let t=(await e.json()).machines;return Array.isArray(t)?t:null}catch{return null}}async createPairing(){if(this.mock||this.replay)return{error:e(`Parear máquinas só funciona com o escritório ao vivo.`)};let t;try{t=await fetch(`/api/central/pairing`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`,cache:`no-store`})}catch{return{error:e(`Sem conexão com o Habblaud.`)}}try{let e=await t.json();if(t.ok&&typeof e.pairing==`string`&&typeof e.code==`string`&&typeof e.expiresAt==`number`&&typeof e.fingerprint==`string`)return{pairing:e.pairing,code:e.code,expiresAt:e.expiresAt,fingerprint:e.fingerprint};if(typeof e.error==`string`)return{error:e.error}}catch{}return{error:e(`Não foi possível gerar o código (erro {0}).`,[t.status])}}async revokeMachine(t){return this.mock||this.replay?e(`Revogar máquinas só funciona com o escritório ao vivo.`):this.writeRequest(`/api/central/machines/${encodeURIComponent(t)}/revoke`,`POST`,{},t=>e(`Não foi possível revogar a máquina (erro {0}).`,[t]))}async loadSatelliteLink(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/satellite/status`,{cache:`no-store`});if(!e.ok)return null;let t=await e.json();return(t.status===`up`||t.status===`down`||t.status===`revoked`||t.status===`unpaired`)&&typeof t.url==`string`&&typeof t.label==`string`?{status:t.status,url:t.url,label:t.label}:null}catch{return null}}async sendMessage(t,n,r=[]){if(this.mock){let e=this.mockSend(t,n);return`message`in e&&this.emit(`sent`,{agentId:t}),e}let i=r.length?{agentId:t,text:n,attachments:r}:{agentId:t,text:n},a=await fetch(`/api/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),o;try{o=await a.json()}catch{}if(a.status===201&&o&&typeof o==`object`)return this.emit(`sent`,{agentId:t}),{message:o};let s=o?.error,c=typeof s==`string`?s:e(`erro {0}`,[a.status]);if(r.length>0&&a.status===410){let e=o?.expired,t=Array.isArray(e)?e.filter(e=>typeof e==`string`):[];return{error:c,expired:t.length?t:r}}return r.length>0&&a.status===500?{error:c,expired:r}:{error:c}}async uploadMessageImage(t){if(this.mock)return{error:e(`imagens só funcionam com o escritório ao vivo`)};let n=await p(t),r=await fetch(`/api/messages/attachments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:t.name,type:t.type,data:n})}),i;try{i=await r.json()}catch{}let a=i;return r.ok&&typeof a?.id==`string`?{id:a.id}:{error:typeof a?.error==`string`?a.error:e(`erro {0}`,[r.status])}}async dropMessageImage(e){if(!this.mock)try{await fetch(`/api/messages/attachments/${encodeURIComponent(e)}`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:`{}`})}catch{}}async messageStatus(t){if(this.mock){let e=this.mockOutbox.get(t);return e?{...e}:null}let n=await fetch(`/api/messages/${encodeURIComponent(t)}`);if(n.status===404)return null;if(!n.ok)throw Error(e(`erro {0}`,[n.status]));return await n.json()}async slashCommands(e){if(this.mock)return ne.map(e=>({...e}));try{let t=await fetch(`/api/messages/commands/${encodeURIComponent(e)}`);if(!t.ok)return[];let n=await t.json();return Array.isArray(n.commands)?n.commands:[]}catch{return[]}}mockOutbox=new Map;mockSeq=0;mockSend(t,n){let r=this.agent(t);if(!r)return{error:e(`agente desconhecido: ele já saiu do escritório?`)};if(!r.canMessage||r.kind!==`main`||r.status===`offline`)return{error:e(`este agente não recebe mensagens agora`)};let i=Date.now(),a={id:`mock-${i.toString(36)}-${++this.mockSeq}`,agentId:t,status:`queued`,createdAt:i,updatedAt:i};return this.mockOutbox.set(a.id,a),setTimeout(()=>{let r=this.mockSim,i=!!r?.receiveMessage(t,n);Object.assign(a,{status:i?`delivered`:`failed`,updatedAt:Date.now()},i?{}:{error:e(`o agente saiu do escritório`)}),i&&r&&this.applySnapshot(r.snapshot())},1e3),{message:{...a}}}emit(e,t){this.listeners.get(e)?.forEach(n=>{try{n(t)}catch(t){console.error(`[store] listener de "${e}" falhou`,t)}})}setConnection(e){this.connection!==e&&(this.connection=e,this.emit(`connection`,e))}applySnapshot(e){let t=this.replay?this.live?.snap:this.snapshot;t&&e.rev<t.rev&&e.meta.startedAt===t.meta.startedAt||(this.replay?this.live={snap:e,at:Date.now()}:this.setSnapshot(e),this.checkBuild(e.meta.build))}setSnapshot(e){this.snapshot=e,this.agentIndex=new Map(e.agents.map(e=>[e.id,e])),this.roomIndex=new Map(e.rooms.map(e=>[e.id,e])),this.emit(`snapshot`,e),this.emit(`defaultLook`,e.defaultLook??{parts:{},since:0})}updateAnnounced=!1;pageBuildId=m();checkBuild(e){if(this.updateAnnounced||this.mock||!e)return;let t=this.pageBuildId;t&&t!==e&&(this.updateAnnounced=!0,this.emit(`update`,{build:e,current:t}))}applyFeed(e){if(!e.length)return;let t=new Set(this.feed.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));n.length&&(this.feed=[...this.feed,...n].slice(-200),this.emit(`feed`,n))}parse(e,t){try{return JSON.parse(e.data)}catch(e){return console.warn(`[store] ${t} inválido ignorado`,e),null}}startSSE(){typeof addEventListener==`function`&&addEventListener(`online`,this.onOnline),this.setConnection(`connecting`);let e;try{e=this.openStream(`/api/stream`)}catch(e){console.error(`[store] não foi possível abrir o stream`,e),this.setConnection(`closed`),this.scheduleRetry();return}this.source=e;let t=()=>this.source===e;e.addEventListener(`open`,()=>{t()&&(this.attempts=0,this.clearRetry(),this.setConnection(`open`))}),e.addEventListener(`error`,()=>{t()&&(e.readyState===g?(this.setConnection(`closed`),this.scheduleRetry()):this.setConnection(`connecting`))}),e.addEventListener(`snapshot`,e=>{if(!t())return;let n=this.parse(e,`snapshot`);n&&this.applySnapshot(n)}),e.addEventListener(`feed`,e=>{if(!t())return;let n=this.parse(e,`feed`);n&&this.applyFeed(n)}),e.addEventListener(`notice`,e=>{if(!t())return;let n=this.parse(e,`aviso`);n&&this.emit(`notice`,n)}),e.addEventListener(`attention`,e=>{if(!t())return;let n=this.parse(e,`attention`);n&&this.emit(`attention`,n)}),e.addEventListener(`presence`,e=>{if(!t())return;let n=this.parse(e,`presence`);n&&this.emit(`presence`,n)}),e.addEventListener(`avatar`,e=>{if(!t())return;let n=this.parse(e,`avatar`);n&&this.emit(`avatar`,n)}),e.addEventListener(`inbox`,e=>{if(!t())return;let n=this.parse(e,`inbox`);n&&this.applyInbox(n)}),e.addEventListener(`defaultLook`,e=>{if(!t())return;let n=this.parse(e,`defaultLook`);n&&this.emit(`defaultLook`,n)})}closeSource(){this.source?.close(),this.source=null}scheduleRetry(){if(this.retryTimer||this.mock||this.stopped)return;let e=v(this.attempts);this.attempts++,this.retryAt=Date.now()+e,this.retryTimer=setTimeout(()=>{this.retryTimer=null,this.retryAt=null,!this.stopped&&this.connection===`closed`&&(this.closeSource(),this.startSSE())},e)}clearRetry(){this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=null,this.retryAt=null}mockSim=null;startMock(){if(this.mockTimer)return;this.setConnection(`mock`);let e=new n({...te(this.search),crowd:!0});this.mockSim=e,this.applySnapshot(e.snapshot()),this.mockTimer=setInterval(()=>{let t=Date.now(),n=e.tick(t);n.changed&&this.applySnapshot(e.snapshot(t)),this.applyFeed(n.feed),n.notices.forEach(e=>this.emit(`notice`,e))},250)}},y=[`short`,`buzz`,`spiky`,`side_part`,`curly`,`afro`,`bob`,`long`,`ponytail`,`bun`,`pigtails`,`mohawk`,`bald`,`wavy`],b=[`tshirt`,`hoodie`,`shirt_tie`,`sweater`,`jacket`,`blouse`,`polo`],x=[`none`,`glasses`,`sunglasses`,`headphones`,`cap`,`beanie`,`earrings`,`bow`],S=[`none`,`stubble`,`beard`,`mustache`,`goatee`],ie=[`pants`,`shorts`,`skirt`],C=[`skin`,`hair`,`hairStyle`,`eyes`,`top`,`topAccent`,`topStyle`,`bottom`,`bottomStyle`,`shoes`,`accessory`,`accessoryColor`,`facialHair`],ae={hairStyle:y,topStyle:b,bottomStyle:ie,accessory:x,facialHair:S},oe=/^#[0-9a-f]{6}$/i,se=/[\p{Cc}\u2028\u2029\u200e\u200f\u202a-\u202e\u2066-\u2069]/u;function ce(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;for(let e of Object.keys(t))if(!C.includes(e))return null;let n={};for(let e of C){let r=t[e];if(r===void 0)continue;if(typeof r!=`string`)return null;let i=ae[e];if(i?!i.includes(r):!oe.test(r))return null;n[e]=i?r:r.toLowerCase()}return n}function le(e){if(typeof e!=`string`)return null;let t=e.normalize(`NFC`).replace(/\s+/g,` `).trim();return!t||se.test(t)||[...t].length>24?null:t}function ue(e){return e?C.map(t=>e[t]??``).join(`,`):``}function de(e,t){return e.custom||!t||typeof t.since!=`number`?!1:e.startedAt>=t.since}function fe(e,t){if(typeof e.startedAt!=`number`||!t||!de({custom:e.custom,startedAt:e.startedAt},t))return e.parts;let n={};for(let r of C){let i=e.parts?.[r]??t.parts?.[r];i!==void 0&&(n[r]=i)}return Object.keys(n).length?n:void 0}var pe=[`#ffe2cc`,`#f6cfb0`,`#eab894`,`#d69f78`,`#bd8560`,`#9a6444`,`#7a4a31`,`#5a3623`],me=[[`#2b2530`,5],[`#3f2c22`,5],[`#5f3c28`,4],[`#87593a`,2.5],[`#b0703c`,1.2],[`#8e3b2b`,1],[`#d6ae68`,1.8],[`#ebdcb0`,.7],[`#8f929b`,.7],[`#d9dbe0`,.5]],he=[`#e47aa8`,`#5b8fe0`,`#8f6ad8`,`#3fb3a0`,`#e0584e`,`#7cc45a`,`#f0a24a`],ge=[`#2b2236`,`#2b2236`,`#4a2f22`,`#5a3b22`,`#2f5f9e`,`#3c7a52`],w=[`#e2604f`,`#4a86d8`,`#4bab72`,`#efb54a`,`#8d66cf`,`#36b0b0`,`#e47aa8`,`#3d4352`,`#f1efe9`,`#8a96a3`,`#2f4c7d`,`#c9713f`,`#76913f`,`#e3d3b2`,`#f29b72`,`#5bc0de`,`#b04a5a`,`#f2d16b`],_e=[`#f4f4f0`,`#d3e3f4`,`#f3d6de`,`#dfe3e8`,`#e9f1dc`,`#fbf0d6`],ve=[`#c0392b`,`#2f4c7d`,`#7b2d44`,`#2e7d4f`,`#d9a42e`,`#5b3a8c`,`#3d4352`],ye=[`#2f3b55`,`#3d4352`,`#6b4a35`,`#55613b`,`#262a33`,`#b08a5e`,`#7a2f3a`,`#4a6a8a`],T=[`#f4f4f0`,`#e8e3d6`,`#dfe7ef`,`#f6e7c8`,`#c9ced6`],be=[[`#3f5f8c`,5],[`#2e3e5e`,4],[`#2c2c35`,4],[`#b49c72`,2],[`#6d7480`,2],[`#6e4c38`,1.5],[`#5f6845`,1.2],[`#2c3655`,2],[`#7f9cc4`,1.5],[`#e2ded5`,.5],[`#9b3b3b`,.4]],xe=[[`#2b2b33`,5],[`#6b4630`,3],[`#ececec`,3],[`#d04848`,1],[`#3f63a8`,1],[`#b88752`,1.5],[`#7d8592`,1]],Se={none:[`#2b2b33`],glasses:[`#2b2b33`,`#5a3a28`,`#3f63a8`,`#b03a3a`,`#8a8f99`],sunglasses:[`#22232b`],headphones:[`#2b2b33`,`#f1efe9`,`#e2604f`,`#4a86d8`,`#efb54a`,`#36b0b0`],cap:[`#e2604f`,`#4a86d8`,`#2b2b33`,`#4bab72`,`#efb54a`,`#f1efe9`,`#2f4c7d`],beanie:[`#e2604f`,`#efb54a`,`#4bab72`,`#8d66cf`,`#3d4352`,`#36b0b0`],earrings:[`#f2c14e`,`#d9dde3`],bow:[`#e2604f`,`#e47aa8`,`#efb54a`,`#4a86d8`,`#8d66cf`]},E=[`#f2b33d`,`#e2604f`,`#4a86d8`,`#4bab72`,`#8d66cf`,`#36b0b0`],Ce={m:{short:16,buzz:9,spiky:9,side_part:12,curly:9,afro:6,bob:2,long:4,ponytail:3,bun:4,pigtails:.4,mohawk:4,bald:5,wavy:9},f:{short:4,buzz:1.2,spiky:2,side_part:4,curly:9,afro:7,bob:13,long:16,ponytail:13,bun:10,pigtails:6,mohawk:1,bald:.4,wavy:13}},we={m:{tshirt:20,hoodie:16,shirt_tie:10,sweater:13,jacket:13,blouse:2,polo:14},f:{tshirt:17,hoodie:14,shirt_tie:5,sweater:14,jacket:12,blouse:20,polo:8}},Te={m:{none:40,glasses:18,sunglasses:4,headphones:13,cap:7,beanie:6,earrings:2,bow:.3},f:{none:36,glasses:16,sunglasses:4,headphones:11,cap:4,beanie:5,earrings:13,bow:7}},Ee={none:62,stubble:12,beard:13,mustache:7,goatee:6},De={m:{pants:88,shorts:12,skirt:0},f:{pants:62,shorts:10,skirt:28}};function Oe(e){let t=(e^2654435769)>>>0;return t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),(t^t>>>16)>>>0}function D(e,n={}){let r=t(Oe(e)),i=e=>e[Math.floor(r()*e.length)%e.length],a=e=>{let t=Object.entries(e),n=t.reduce((e,[,t])=>e+t,0),i=r()*n;for(let[e,n]of t)if(i-=n,i<0)return e;return t[t.length-1][0]},o=e=>a(Object.fromEntries(e)),s=r(),c=n.look??(s<.5?`f`:`m`),l=i(pe),u=r()<.08?i(he):o(me),d=a(Ce[c]),f=i(ge),p=a(we[c]),m,h;switch(p){case`shirt_tie`:m=i(_e),h=i(ve);break;case`jacket`:m=i(ye),h=r()<.7?i(T):i(w);break;case`hoodie`:case`polo`:m=i(w),h=r()<.6?i(T):i(w);break;default:m=i(w),h=i(w)}h===m&&(h=i(T));let g=o(be),ee=o(xe),_=a(Te[c]);(_===`cap`||_===`beanie`)&&(d===`afro`||d===`bun`||d===`mohawk`||d===`pigtails`)&&(_=`glasses`),_===`bow`&&(d===`bald`||d===`buzz`)&&(_=`earrings`);let v=i(Se[_]),te=r(),ne=a(Ee),re=c===`m`?ne:`none`,y=a(De[c]);c===`f`&&d===`bald`&&(d=`buzz`);let b={skin:l,hair:u,hairStyle:d,eyes:f,top:m,topAccent:h,topStyle:p,bottom:g,shoes:ee,accessory:_,accessoryColor:v,lanyard:n.sub?E[Math.floor(te*E.length)%E.length]:null,look:c,facialHair:re,bottomStyle:y},x=n.parts;if(!x)return b;let S=Object.fromEntries(C.filter(e=>x[e]!==void 0).map(e=>[e,x[e]]));return{...b,...S}}function ke(e,t,n){let r=D(e,{look:n,parts:t}),i={};for(let e of C){let t=r[e];t!==void 0&&(i[e]=t)}return i}function Ae(e){return[e.skin,e.hair,e.hairStyle,e.eyes,e.top,e.topAccent,e.topStyle,e.bottom,e.shoes,e.accessory,e.accessoryColor,e.lanyard??`-`,e.look,e.facialHair??`-`,e.bottomStyle??`-`].join(`|`)}var O=e=>[...new Set(e)],k=e=>e.map(([e])=>e),A=O([...T,...w]);function je(e){switch(e){case`shirt_tie`:return{top:_e,topAccent:ve};case`jacket`:return{top:ye,topAccent:A};default:return{top:w,topAccent:A}}}function Me(e){let t=je(e.topStyle);return{skin:pe,hair:[...k(me),...he],hairStyle:y,eyes:O(ge),top:t.top,topAccent:t.topAccent,topStyle:b,bottom:k(be),bottomStyle:ie,shoes:k(xe),accessory:x,accessoryColor:Se[e.accessory],facialHair:S}}var Ne=[`afro`,`bun`,`mohawk`,`pigtails`],Pe=[`bald`,`buzz`];function Fe(t,n,r){if(n===`accessory`&&((r===`cap`||r===`beanie`)&&Ne.includes(t.hairStyle)||r===`bow`&&Pe.includes(t.hairStyle)))return e(`Não combina com este cabelo`);if(n===`hairStyle`){if((t.accessory===`cap`||t.accessory===`beanie`)&&Ne.includes(r))return e(`Não combina com o boné ou o gorro`);if(t.accessory===`bow`&&Pe.includes(r))return e(`Não combina com o laço`)}}function Ie(e){let t=Me(e),n=(e,t)=>t.includes(e)?e:t[0];return{...e,top:n(e.top,t.top),topAccent:n(e.topAccent,t.topAccent),accessoryColor:n(e.accessoryColor,t.accessoryColor)}}function Le(e,t){if(e&&e!==`auto`)return e;let n=t.getMonth();return n===9?`halloween`:n===10||n===11&&t.getDate()<=26?`christmas`:`none`}var Re={showNames:!0,bubbles:`important`,liveliness:`normal`,followSelected:!1,dayNight:!0,theme:`auto`},ze=[`competicao`,`apostas`,`games`,`series`,`fofoca`,`vaidade`,`cafeina`,`piadas`,`esporte`,`timidez`,`economia`,`sonecas`,`calma`,`leitura`],Be=[[`timidez`,`piadas`],[`timidez`,`fofoca`],[`apostas`,`economia`],[`esporte`,`sonecas`],[`calma`,`competicao`]],j={min:2,max:3},Ve=[`night_owl`,`early_bird`,`coffee`,`tea`,`tabs`,`spaces`,`dark_mode`,`light_mode`,`vim`,`tests_first`,`ship_fast`,`refactor`,`pixel_art`,`music`,`silence`,`cats`,`dogs`,`open_source`,`learning`,`hello`],He=[`hello`,`nice_building`,`coffee`,`congrats`,`nice_to_meet`,`bye`,`thanks`,`good_luck`,`wave`,`clap`],Ue=[`offensive_name`,`impersonation`,`harassment`,`greeting_spam`,`fake_building`,`other`],We=[`visited`,`nice_building`,`keep_going`,`coffee`,`wave`,`star`,`heart`,`rocket`],Ge=[`agent_hours_10k`,`agent_hours_50k`,`agent_hours_100k`],Ke=[`deploy`,`other-device`,`banned`,`suspended`,`waiting`,`update`,`unauthorized`,`no_player`,`deleted`],qe=[`schema`,`limits`,`name_pool`,`parts`,`ids`,`rate`,`internal`,`left`,`implausible`],Je={floors:64,agentsPerFloor:64,agentsTotal:256,bytes:65536},M={min:3,max:20},Ye=[`habblaud`,`admin`,`staff`,`claude`,`anthropic`,`codex`,`openai`,`moderador`,`moderator`,`suporte`,`support`,`system`,`world`],Xe=`invalid.invalid_code.invalid_credentials.email_not_verified.banned.suspended.unauthorized.name_taken.name_invalid.name_blocked.name_cooldown.password_invalid.password_weak.password_pwned.altcha_required.altcha_invalid.device_limit.rate_limited.not_found.no_player.unavailable.maintenance.invalid_json.too_large.unsupported_media_type.method_not_allowed.internal`.split(`.`),Ze={competicao:{id:`competicao`,emoji:`🏆`,label:e(`Competição`),desc:e(`Adora competir: desafia os colegas no ping-pong, no videogame e no jokenpô.`)},apostas:{id:`apostas`,emoji:`🎲`,label:e(`Apostas`),desc:e(`Topa qualquer aposta e aposta alto no jokenpô.`)},games:{id:`games`,emoji:`🎮`,label:e(`Games`),desc:e(`Vive no videogame do lounge e nos fliperamas — e costuma ganhar.`)},series:{id:`series`,emoji:`📺`,label:e(`Séries e TV`),desc:e(`Não perde um programa na TV do lounge (de preferência com pipoca).`)},fofoca:{id:`fofoca`,emoji:`🗣️`,label:e(`Fofoca`),desc:e(`Puxa papo na copa e sabe de tudo o que acontece nas salas.`)},vaidade:{id:`vaidade`,emoji:`💄`,label:e(`Vaidade`),desc:e(`Passa no espelho do banheiro para se arrumar sempre que pode.`)},cafeina:{id:`cafeina`,emoji:`☕`,label:e(`Cafeína`),desc:e(`Movido a café: a cafeteira da copa é a segunda casa.`)},piadas:{id:`piadas`,emoji:`😂`,label:e(`Piadas`),desc:e(`Conta piada em toda conversa e faz a roda rir.`)},esporte:{id:`esporte`,emoji:`🏓`,label:e(`Esporte`),desc:e(`Joga ping-pong, se alonga e vibra com o futebol na TV.`)},timidez:{id:`timidez`,emoji:`🙈`,label:e(`Timidez`),desc:e(`Prefere ficar na sua: lê, olha a janela e entra menos nas rodas.`)},economia:{id:`economia`,emoji:`💰`,label:e(`Economia`),desc:e(`Pão-duro: aposta pouco e às vezes foge da aposta.`)},sonecas:{id:`sonecas`,emoji:`😴`,label:e(`Sonecas`),desc:e(`Qualquer sofá ou puff vira cama.`)},calma:{id:`calma`,emoji:`🧘`,label:e(`Calma`),desc:e(`Zen: alongamentos, janela e conversas tranquilas.`)},leitura:{id:`leitura`,emoji:`📚`,label:e(`Leitura`),desc:e(`Sempre com um livro da estante (ou o celular) na mão.`)}};function Qe(e){return typeof e==`string`&&ze.includes(e)}function N(e,t){return Be.some(([n,r])=>n===e&&r===t||n===t&&r===e)}function $e(e){if(!Array.isArray(e)||e.length<j.min||e.length>j.max)return null;let t=[];for(let n of e){if(!Qe(n)||t.includes(n)||t.some(e=>N(e,n)))return null;t.push(n)}return t}var et=[`auto`,`none`,`halloween`,`christmas`];function tt(e){return typeof e==`string`&&et.includes(e)}var nt={cmdsPerBatch:20,batchesPerSec:5,streams:4},rt=[`area`,`area.patch`,`players`,`player.join`,`player.leave`,`pos`,`minimap`,`afk`,`profile`,`notice`,`like.update`,`greeting`,`building`,`building.patch`,`visitors`,`city`,`city.fireworks`,`likes.today`,`away.summary`,`knock`],it=[`not_configured`,`local_only`,`terminal_off`,`not_logged_in`,`session_expired`,`invalid_email`,`altcha_failed`,`world_unreachable`,`world_timeout`,`world_bad_response`,`world_error`,`storage_failed`,`too_many_streams`,`no_stream`,`not_connected`,`account_deleted`,`network`,`unknown`],at=[...new Set([...Xe,...it])];function ot(e){return typeof e==`string`&&at.includes(e)}var st=3,ct=/[\p{C}\p{Zl}\p{Zp}\p{Default_Ignorable_Code_Point}\p{Bidi_Control}]/u,lt=/(?! )[\p{Zs}\s]/u,ut=/^\p{L}$/u,dt=/^\p{M}$/u,ft=/^[0-9 _.-]$/,pt=`Latin.Greek.Cyrillic.Armenian.Hebrew.Arabic.Syriac.Thaana.Devanagari.Bengali.Gurmukhi.Gujarati.Oriya.Tamil.Telugu.Kannada.Malayalam.Sinhala.Thai.Lao.Tibetan.Myanmar.Georgian.Hangul.Ethiopic.Khmer.Mongolian.Hiragana.Katakana.Bopomofo.Han`.split(`.`),mt=pt.map(e=>[e,RegExp(`^\\p{Script_Extensions=${e}}$`,`u`)]),ht=`Other`,gt=[...pt.map(e=>[e]),[`Han`,`Hiragana`,`Katakana`],[`Hangul`,`Han`],[`Han`,`Bopomofo`],[ht]];function _t(e){let t=mt.filter(([,t])=>t.test(e)).map(([e])=>e);return t.length?t:[ht]}function vt(e){let t=[...new Set(e)].map(_t);return gt.some(e=>t.every(t=>t.some(t=>e.includes(t))))}function yt(e){return e.normalize(`NFC`).trim().replace(/ {2,}/g,` `)}function bt(e){return e.normalize(`NFKC`).toLowerCase().normalize(`NFD`).replace(/[\p{Mn}\p{Me}]/gu,``).normalize(`NFC`).replace(/\s+/g,` `).trim()}function xt(e){return e.replace(/[ _.-]/g,``)}var P=e=>({ok:!1,code:`name_invalid`,problem:e});function St(e){if(typeof e!=`string`)return P(`type`);if(e.length>M.max*8)return P(`length`);let t=yt(e);if(ct.test(t)||lt.test(t))return P(`invisible`);let n=[...t];if(n.length<M.min||n.length>M.max)return P(`length`);let r=[],i=0,a=!1;for(let e of n)if(ut.test(e))r.push(e),i=0,a=!0;else if(dt.test(e)){if(!a||++i>st)return P(`chars`)}else if(ft.test(e))i=0,a=!1;else return P(`chars`);if(!r.length)return P(`no_letter`);if(!vt(r))return P(`scripts`);let o=bt(t);return Ye.includes(xt(o))?{ok:!1,code:`name_blocked`,problem:`reserved`}:{ok:!0,name:t,key:o}}var F={w:14,h:12},I={w:3,h:2},L={w:F.w*I.w,h:F.h*I.h},R={x:L.w+4+5,y:L.h+4+5},Ct={w:2,h:2},z={x:0,y:0},B={x:19,y:10,w:4,h:3},V={x:21,y:15},H={dx:6,w:2},U=(e,t)=>Math.floor(e/t);function*wt(){let e=0,t=0;yield{x:e,y:t};let n=[[1,0],[0,1],[-1,0],[0,-1]];for(let r=1,i=0;;r++)for(let a=0;a<2;a++,i++){let a=n[i%4]??n[0];for(let n=0;n<r;n++)e+=a[0],t+=a[1],yield{x:e,y:t}}}function W(e){return e.x===z.x&&e.y===z.y}function*Tt(){for(let e of wt())if(!W(e))for(let t=0;t<I.h;t++)for(let n=0;n<I.w;n++)yield{x:e.x*I.w+n,y:e.y*I.h+t}}function G(e){return{x:U(e.x,I.w),y:U(e.y,I.h)}}function Et(e){return{x:e.x*R.x,y:e.y*R.y}}function Dt(e){let t=G(e),n=Et(t);return{x:n.x+F.w*(e.x-I.w*t.x),y:n.y+F.h*(e.y-I.h*t.y)}}function Ot(e){let t=Dt(e),n=e.y-I.h*G(e).y===0,r=n?t.y:t.y+F.h-1;return{side:n?`n`:`s`,tiles:[{x:t.x+H.dx,y:r},{x:t.x+H.dx+1,y:r}],front:{x:t.x+H.dx+H.w/2,y:n?t.y-1:t.y+F.h}}}function kt(e,t){let n=(R.x-L.w)/2,r=(R.y-L.h)/2;return{x:U(e+n,R.x),y:U(t+r,R.y)}}function At(e){return{x:U(e.x,Ct.w),y:U(e.y,Ct.h)}}function jt(e,t){return`${e}:${t.x},${t.y}`}function Mt(e){let t=/^([a-z0-9_-]{1,32}):(-?\d{1,6}),(-?\d{1,6})$/.exec(e);return t?{district:t[1]??``,chunk:{x:Number(t[2]),y:Number(t[3])}}:null}function Nt(e,t=1){let n=[];for(let r=-t;r<=t;r++)for(let i=-t;i<=t;i++)n.push({x:e.x+i,y:e.y+r});return n}function Pt(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t))return!1;let r=Math.floor(e),i=Math.floor(t),a=U(r,R.x),o=U(i,R.y),s=r-a*R.x,c=i-o*R.y;return s>=L.w||c>=L.h?!0:W({x:a,y:o})?!(s>=B.x&&s<B.x+B.w&&c>=B.y&&c<B.y+B.h):!1}function Ft(){return{x:V.x,y:V.y}}var K=e=>!!e&&typeof e==`object`&&!Array.isArray(e),q=e=>typeof e==`number`&&Number.isFinite(e),J=e=>q(e)&&Number.isInteger(e)&&e>=0&&e<=1e9;function It(e){if(!K(e)||!J(e.lit))return;let t={lit:e.lit},n=e.goal;return K(n)&&typeof n.id==`string`&&n.id.length<=64&&Ge.includes(n.label)&&q(n.target)&&n.target>0&&q(n.progress)&&n.progress>=0&&q(n.until)&&(t.goal={id:n.id,label:n.label,target:n.target,progress:n.progress,until:n.until}),q(e.tokensBand)&&Number.isInteger(e.tokensBand)&&e.tokensBand>=0&&e.tokensBand<=5&&(t.tokensBand=e.tokensBand),t}function Lt(e){if(!K(e)||typeof e.since!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e.since)||!J(e.visits)||!J(e.likes))return;let t=[];for(let n of Array.isArray(e.stamps)?e.stamps:[])K(n)&&We.includes(n.stampId)&&J(n.count)&&n.count!==0&&(t.some(e=>e.stampId===n.stampId)||t.push({stampId:n.stampId,count:n.count}));return{since:e.since,visits:e.visits,likes:e.likes,stamps:t}}function Rt(e){return!!e&&(e.visits>0||e.likes>0||e.stamps.some(e=>e.count>0))}function zt(e){let t=-1;return e.forEach((e,n)=>{e.t===`move`&&(t=n)}),e.filter((e,n)=>e.t!==`move`||n===t)}var Bt={night_owl:()=>e(`Codo de madrugada`),early_bird:()=>e(`Acordo cedo para codar`),coffee:()=>e(`Movido a café`),tea:()=>e(`Time do chá`),tabs:()=>e(`Time dos tabs`),spaces:()=>e(`Time dos espaços`),dark_mode:()=>e(`Modo escuro sempre`),light_mode:()=>e(`Modo claro, sem medo`),vim:()=>e(`Vim até o fim`),tests_first:()=>e(`Testo antes de escrever`),ship_fast:()=>e(`Entrego rápido`),refactor:()=>e(`Refatorar é meu hobby`),pixel_art:()=>e(`Fã de pixel art`),music:()=>e(`Codo ouvindo música`),silence:()=>e(`Codo em silêncio`),cats:()=>e(`Gente de gato`),dogs:()=>e(`Gente de cachorro`),open_source:()=>e(`Vivo de código aberto`),learning:()=>e(`Sempre aprendendo`),hello:()=>e(`Oi, prazer!`)};function Vt(e){return typeof e==`string`&&Ve.includes(e)}function Ht(e){return Bt[e]?.()??String(e)}function Y(e,t){return!e?.enabled||!e.configured||e.state===`off`||t.remote?`hidden`:!t.fake&&(!t.local||!t.terminal)?`local_only`:`active`}function Ut(e){return!!e&&(e.scene!==void 0||e.building!==void 0)}var Wt=`habblaud:world-invite-seen`,Gt=`habblaud:world-launch`,Kt=`habblaud:world-waitlist-seen`,qt=`habblaud:world-approved-seen`,Jt={launch:null,waitlistSeen:!1,approvedSeen:!1};function Yt(e){let t=null;if(e.launch===`never`||e.legacy===`never`)t=`never`;else if(e.launch)try{let n=JSON.parse(e.launch);n&&typeof n==`object`&&typeof n.shown==`number`&&typeof n.last==`number`&&Number.isFinite(n.shown)&&Number.isFinite(n.last)&&(t={shown:Math.max(0,Math.floor(n.shown)),last:Math.max(0,n.last)})}catch{}return{launch:t,waitlistSeen:e.waitlist!==null,approvedSeen:e.approved!==null}}function Xt(e){return{launch:e.launch===`never`?`never`:e.launch?JSON.stringify(e.launch):null,waitlist:e.waitlistSeen?`1`:null,approved:e.approvedSeen?`1`:null}}function Zt(e,t,n,r){if(t.fake||t.replaying||Y(e,t)!==`active`||!e)return{show:null,memory:null};if(e.state===`logged_out`){let e=n.launch;return e===`never`||e&&(e.shown>=3||r-e.last<2592e5)?{show:null,memory:null}:{show:`launch`,memory:{...n,launch:{shown:(e?.shown??0)+1,last:r}}}}let i=n.launch===`never`?n:{...n,launch:`never`},a=i!==n;return e.state===`waiting`&&!n.waitlistSeen?{show:`waitlist`,memory:{...i,waitlistSeen:!0}}:e.state===`approved`&&!n.approvedSeen&&!Ut(e)?{show:`approved`,memory:{...i,approvedSeen:!0}}:{show:null,memory:a?i:null}}var Qt=[`welcome`,`register`,`login`,`verify`,`forgot`,`reset`],$t=[`home`,`character`,`visibility`,`devices`,`account`,`blocked`];function en(e){return e===`waiting`||e===`approved`?$t:e===`logged_out`?Qt:[]}function tn(){return{server:null,screen:`welcome`,email:``,name:``,flash:null}}function X(e){if(!e.server)return e;let t=en(e.server);return!t.length||t.includes(e.screen)?e:{...e,screen:t[0]}}function nn(e,t){switch(t.type){case`server`:return X({...e,server:t.state});case`go`:return X({...e,screen:t.screen,flash:null});case`code_sent`:return X({...e,screen:`verify`,email:t.email,name:t.name??e.name,flash:`code_sent`});case`reset_code_sent`:return X({...e,screen:`reset`,email:t.email,flash:`code_sent`});case`password_changed`:return X({...e,screen:`login`,flash:`password_changed`});case`signed_in`:return{...e,flash:null};case`flash`:return{...e,flash:t.flash}}}function Z(e){return e.normalize(`NFC`).trim()}function rn(e){let t=Z(e);return t.length<=254&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function an(e){return e.replace(/\D/g,``).slice(0,6)}function on(e){return/^\d{6}$/.test(an(e))}function sn(e,t=``){let n=e.normalize(`NFC`),r=[...n].length;if(r<12)return`short`;if(r>128)return`long`;let i=Z(t).toLowerCase(),a=n.toLowerCase();return i&&(a===i||a===i.split(`@`)[0])?`email`:/^(.+?)\1+$/su.test(n)?`repeated`:null}function cn(t){switch(t){case`short`:return e(`A senha precisa ter pelo menos 12 caracteres.`);case`long`:return e(`A senha pode ter no máximo 128 caracteres.`);case`email`:return e(`A senha não pode ser o seu e-mail.`);case`repeated`:return e(`A senha não pode ser só uma repetição (como "aaaaaaaaaaaa").`)}}function ln(t){switch(t){case`type`:case`length`:return e(`O nome precisa ter de 3 a 20 caracteres.`);case`invisible`:return e(`Tire do nome os caracteres invisíveis e os espaços especiais.`);case`chars`:return e(`Use só letras, números, espaço, _ - e . no nome.`);case`scripts`:return e(`Use letras de um só alfabeto no nome.`);case`no_letter`:return e(`O nome precisa ter pelo menos uma letra.`);case`reserved`:return e(`Este nome é reservado. Escolha outro.`)}}function un(e,t){if(e.includes(t))return null;let n=e.find(e=>N(e,t));return n?{reason:`clash`,with:n}:e.length>=j.max?{reason:`full`}:null}function dn(e,t){return e.includes(t)?e.filter(e=>e!==t):un(e,t)?[...e]:[...e,t]}function fn(e){return $e(e)!==null}var pn=24301;function mn(e){let t={};for(let n of C)t[n]=n===`facialHair`?e.facialHair??`none`:n===`bottomStyle`?e.bottomStyle??`pants`:e[n];return t}function hn(e,t,n=pn){return D(n,{look:e,parts:t})}function gn(e){let t=St(e.name);return t.ok?fn(e.traits)?!e.intro||!Vt(e.intro)?{field:`intro`}:null:{field:`traits`}:{field:`name`,problem:t.problem}}var _n={mode:`live`,closed:!1,hideCountry:!1,tokensVisible:!0,leaderboard:!1,compactions:!1,knocks:!1},vn=[`closed`,`hideCountry`,`tokensVisible`,`leaderboard`,`compactions`,`knocks`];function yn(e){return e?.notifyInactivity!==!1}var bn=`habblaud-world-dados.json`,Q=`privacidade@habblaud.com`,xn=`Recurso Habblaud World`;function Sn(e){let t=e&&/^[A-Za-z0-9_-]{1,64}$/.test(e)?e:``;return`mailto:${Q}?subject=${encodeURIComponent(t?`${xn} ${t}`:xn)}`}function Cn(t,n){switch(ot(t)||t===`offline`||t===`forbidden`?t:`unknown`){case`invalid_code`:return e(`Código errado ou vencido. Confira o e-mail ou peça outro código.`);case`invalid_credentials`:return e(`E-mail ou senha não conferem.`);case`email_not_verified`:return e(`Falta confirmar o e-mail: mandamos um código novo.`);case`banned`:return e(`Esta conta foi banida do Habblaud World. Para recorrer, responda ao e-mail do banimento.`);case`suspended`:return e(`Esta conta está suspensa no Habblaud World por enquanto.`);case`unauthorized`:case`not_logged_in`:case`session_expired`:return e(`A sessão do Habblaud World neste computador terminou. Entre de novo.`);case`name_taken`:return e(`Este nome já está em uso no mundo. Escolha outro.`);case`name_invalid`:return e(`Nome inválido: de 3 a 20 caracteres, com letras de um só alfabeto, números, espaço, _ - e .`);case`name_blocked`:return e(`Este nome não é permitido. Escolha outro.`);case`name_cooldown`:return e(`O nome só pode ser trocado uma vez a cada 30 dias.`);case`password_invalid`:return e(`A senha precisa ter de 12 a 128 caracteres.`);case`password_weak`:return e(`Senha fraca: não use o e-mail, o nome de jogador nem só repetição.`);case`password_pwned`:return e(`Esta senha aparece em vazamentos de dados conhecidos. Escolha outra.`);case`invalid_email`:return e(`E-mail inválido. Confira o endereço.`);case`altcha_required`:case`altcha_invalid`:case`altcha_failed`:return e(`A verificação anti-robô não passou. Tente de novo em instantes.`);case`device_limit`:return e(`Esta conta já tem 3 computadores; revogue um em Dispositivos.`);case`no_player`:return e(`Crie o personagem primeiro.`);case`unavailable`:return e(`O Habblaud World está em manutenção. Tente de novo mais tarde.`);case`maintenance`:return e(`O mundo está em manutenção; tentamos de novo em instantes.`);case`not_found`:return e(n===`revoke`?`Este dispositivo não está mais na conta.`:`O servidor do Habblaud World não encontrou o que foi pedido.`);case`invalid_json`:case`too_large`:case`unsupported_media_type`:case`method_not_allowed`:return e(`O pedido saiu num formato que o servidor não aceita. Atualize o Habblaud e tente de novo.`);case`not_configured`:return e(`O Habblaud World não está ligado neste Habblaud (HABBLAUD_WORLD_URL recusada; veja o log do servidor).`);case`rate_limited`:return e(n===`export`?`Dá para baixar os dados uma vez por dia. Tente de novo amanhã.`:`Muitas tentativas seguidas. Espere alguns minutos e tente de novo.`);case`network`:case`world_unreachable`:case`world_timeout`:return e(`O servidor do Habblaud World não respondeu. Tente de novo em instantes.`);case`world_bad_response`:return e(`O servidor do Habblaud World respondeu algo inesperado. Tente de novo em instantes.`);case`account_deleted`:return e(`A conta do Habblaud World foi excluída. O prédio e o perfil saíram do mundo na hora; o resto é apagado do banco em 7 dias e dos backups em até 30.`);case`storage_failed`:return e(`Não deu para gravar a sessão neste computador: ela vale só até o Habblaud reiniciar.`);case`too_many_streams`:return e(`A cidade já está aberta em outras abas do Habblaud. Feche uma delas para abrir aqui.`);case`no_stream`:return e(`A cena Mundo perdeu a conexão com o Habblaud. Abra a cidade de novo.`);case`not_connected`:return e(n===`unblock`?`Sem conexão com o Habblaud World agora: desbloquear precisa do prédio aceso ou da cidade aberta.`:`Sem conexão com o Habblaud World agora; o Habblaud tenta de novo sozinho.`);case`offline`:return e(`Sem conexão com o Habblaud.`);case`forbidden`:case`local_only`:return e(`A conta do World só pode ser mexida pelo próprio computador, com o Habblaud aberto em localhost.`);case`terminal_off`:return e(`A conta do World só pode ser mexida com o Habblaud acessível apenas pelo próprio computador (acesso local, bind 127.0.0.1).`);case`invalid`:switch(n){case`register`:case`reset`:return e(`O servidor recusou o e-mail ou a senha. A senha precisa ter de 12 a 128 caracteres e não pode estar numa lista de senhas vazadas.`);case`character`:return e(`O servidor recusou o personagem. Confira o nome, os traços (2 ou 3) e a frase de apresentação.`);case`visibility`:case`inactivity`:return e(`O servidor recusou as opções de visibilidade.`);default:return e(`O servidor recusou o pedido. Confira os dados e tente de novo.`)}case`internal`:return e(`O servidor do mundo teve um erro; tente de novo.`);case`world_error`:case`unknown`:return e(`Algo deu errado. Tente de novo em instantes.`)}}function wn(e,t){return t?e?.left?`left`:e?.paused?`paused`:e?.stopped?`stopped`:e?.connected?`connected`:`reconnecting`:`no_player`}function Tn(t){switch(t){case`update`:return{label:e(`Atualize o Habblaud`),desc:e(`Esta versão do Habblaud não entra mais no mundo. Atualize para o prédio voltar a acender.`),toggle:null};case`other-device`:return{label:e(`Conectado em outro computador`),desc:e(`A sua conta conectou o prédio em outro computador, e este parou de enviar.`),toggle:{action:`resume`,text:e(`Trazer para este computador`),hint:e(`O prédio volta a subir daqui, e o outro computador para de enviar.`)}};case`banned`:return{label:e(`Conta banida`),desc:e(`O Habblaud World baniu esta conta: o prédio saiu do mundo e nada mais sai deste computador.`),toggle:null};case`suspended`:return{label:e(`Conta suspensa`),desc:e(`Esta conta está suspensa no Habblaud World: o prédio fica apagado e nada sai deste computador.`),toggle:{action:`resume`,text:e(`Tentar de novo`),hint:e(`Se a suspensão já acabou, o prédio volta a acender.`)}};case`waiting`:return{label:e(`Na lista de espera`),desc:e(`A conta voltou para a lista de espera: o prédio sai do mundo até o acesso ser liberado de novo.`),toggle:null};case`no_player`:return{label:e(`Sem personagem`),desc:e(`O mundo não encontrou o seu personagem: crie de novo para o prédio voltar.`),toggle:null};case`unauthorized`:return{label:e(`Entre de novo`),desc:e(`O servidor do mundo não reconheceu este computador: entre de novo na conta.`),toggle:null};case`deleted`:return{label:e(`Conta excluída`),desc:e(`A conta do Habblaud World foi excluída: o prédio e o perfil saíram do mundo e nada mais sai deste computador.`),toggle:null}}}function En(t){switch(t){case`schema`:return e(`O pacote saiu fora do formato do protocolo. Atualize o Habblaud.`);case`limits`:return e(`O escritório passou dos limites do mundo (64 andares, 64 agentes por andar, 256 agentes ou 64 KB).`);case`name_pool`:return e(`Um nome de personagem não está na lista de nomes do mundo.`);case`parts`:return e(`Uma peça de aparência está fora das paletas do editor.`);case`ids`:return e(`Um código de andar ou de agente está fora do formato.`);case`rate`:return e(`Remessas demais em pouco tempo (o limite é 12 por minuto). A próxima vai normalmente.`);case`internal`:return e(`Um erro no servidor do mundo. A próxima remessa tenta de novo.`);case`left`:return e(`A conta saiu do mundo (por este ou por outro computador): nada mais sai até você voltar ao mundo.`);case`implausible`:return e(`O pacote contradiz o anterior de um jeito que o Habblaud não produz: o mundo o descartou, e o prédio fica com o último aceito. As próximas remessas vão normalmente.`);default:return e(`Um motivo que esta versão do Habblaud não conhece.`)}}function Dn(t){return t===`appeal`?{text:e(`Recorrer por e-mail`),hint:e(`Abre um e-mail para {0}: conte o que aconteceu, e uma pessoa revê o caso.`,[Q])}:{text:e(`Contestar por e-mail`),hint:e(`Abre um e-mail para {0}: se for engano, uma pessoa revê os números e tira o selo.`,[Q])}}function $(t){return t===1?e(`1 byte`):e(`{0} bytes`,[r(t)])}function On(t){return t===1?e(`1 andar`):e(`{0} andares`,[r(t)])}function kn(t){return t===1?e(`1 agente`):e(`{0} agentes`,[r(t)])}function An(t){return t===1?e(`1 visitante agora`):e(`{0} visitantes agora`,[r(t)])}var jn={started:!1,last:void 0,notified:!1};function Mn(e,t,n){let r=typeof t==`number`&&t>0?t:t===0?0:void 0;if(!e.started)return{state:{started:!0,last:r,notified:r!==void 0&&r>0},notify:!1};if(r===void 0)return{state:{started:!0,last:void 0,notified:!1},notify:!1};let i=r>0&&(e.last??0)===0,a=i&&!e.notified&&n;return{state:{started:!0,last:r,notified:e.notified||i},notify:a}}function Nn(t,n,r,i={}){let a=Pn(t,n,r,i);return a.state===`stopped`&&(t?.stopped===`banned`||t?.stopped===`suspended`)?{...a,appeal:Dn(`appeal`)}:t?.unverified&&a.state!==`stopped`&&a.state!==`left`&&a.state!==`no_player`?{...a,unverified:e(`O mundo marcou o seu prédio como "não verificado": os números pareceram fora do normal e estão em revisão. Ele continua no mundo, mas fora de placares e destaques.`),appeal:Dn(`contest`)}:a}function Pn(t,n,r,a){let o=wn(t,n),s={unverified:null,appeal:null},c=t?.floors??0,l=t?.agents??0,u=o===`no_player`||o===`left`?[]:[On(c),kn(l),t?.lastUplinkAt?e(`Última remessa: {0}`,[i(t.lastUplinkAt,r)]):e(`Nenhuma remessa ainda`),...t?.visitors?[`👀 ${An(t.visitors)}`]:[]],d=(o===`connected`||o===`reconnecting`||o===`paused`)&&t?.lastAck?.ok===!1?En(t.lastAck.error):null,f=e(`Pausado por 30 dias, o prédio some do mapa e, 30 dias depois, é retirado; retomar antes disso traz de volta, no mesmo lote.`);switch(o){case`no_player`:return{state:o,label:e(`Sem personagem`),desc:e(`Crie o seu personagem: o prédio entra no mundo junto com ele.`),stats:u,rejected:d,toggle:null,leave:!1,...s};case`left`:return{state:o,label:e(`Fora do mundo`),desc:e(`Você saiu do mundo: o prédio foi retirado e o lote, liberado. Dá para andar pela cidade; nada do escritório sai deste computador.`),stats:u,rejected:null,toggle:{action:`join`,text:e(`Voltar ao mundo`),hint:e(`Voltar cria um prédio novo, em outro lote; a conta e o personagem são os mesmos.`)},leave:!1,...s};case`stopped`:{let e=t.stopped;return{state:o,...Tn(e),stats:u,rejected:d,leave:e===`update`||e===`other-device`||e===`suspended`,...s}}case`paused`:return{state:o,label:e(`Pausado`),desc:e(`Pausado: seu prédio está apagado, mas você pode andar pela cidade. Nada do escritório sai deste computador.`),stats:u,rejected:d,toggle:{action:`resume`,text:e(`Retomar`),hint:`${e(`Retomar volta a enviar e acende o prédio.`)} ${f}`},leave:!0,...s};case`connected`:case`reconnecting`:{let n=o===`connected`,r=!t?.lastUplinkAt,i=!n&&!!a.maintenance;return{state:o,label:e(n?`Conectado`:i?`Em manutenção`:r?`Conectando…`:`Reconectando…`),desc:e(n?`Aceso no mundo: um andar por sala aberta e cada personagem no status de agora. Os tokens, se você deixar, aparecem só em faixas, no medidor da fachada.`:i?`O mundo está em manutenção; tentamos de novo em instantes.`:r?`O prédio acende com a primeira remessa.`:`Sem conexão com o mundo agora: o Habblaud tenta de novo sozinho. Com 2 minutos sem notícias, o prédio apaga.`),stats:u,rejected:d,toggle:{action:`pause`,text:e(`Pausar`),hint:`${e(`Pausar interrompe o envio na hora e apaga o prédio no mundo.`)} ${f}`},leave:!0,...s}}}}function Fn(){return e(`Pausar apaga o prédio e guarda o lote: retomar traz de volta, no mesmo lugar. Sair do mundo retira o prédio na hora e libera o lote; a conta e o personagem continuam, e voltar depois cria um prédio novo, em outro lote.`)}function In(t,n){if(!t)return{kind:`pending`,label:e(`Sem resposta do mundo ainda.`),reason:null};if(t.ok){let r=t.bytes===void 0?null:t.bytes===n?e(`O mundo recebeu os mesmos {0}.`,[$(t.bytes)]):e(`O mundo contou {0}.`,[$(t.bytes)]);return{kind:`accepted`,label:e(`Aceita pelo mundo.`),reason:r}}return{kind:`rejected`,label:e(`Recusada pelo mundo.`),reason:En(t.error)}}function Ln(e){return JSON.stringify(e,null,2)}function Rn(e,t){return Y(e,t)===`active`&&e?.state===`approved`}function zn(e,t){let n=e?.building;return!n||n.left||e.state!==`approved`||Y(e,t)===`hidden`?null:n.paused?`paused`:n.stopped?`stopped`:n.connected?`live`:n.lastUplinkAt?`reconnecting`:null}export{H as $,p as $t,Yt as A,Ve as At,zn as B,Fe as Bt,Fn as C,tt as Ct,an as D,Ge as Dt,Zt as E,N as Et,Rn as F,qe as Ft,Vt as G,C as Gt,nn as H,Ie as Ht,dn as I,Je as It,zt as J,ce as Jt,Lt as K,de as Kt,un as L,Re as Lt,cn as M,Ue as Mt,Ln as N,We as Nt,Z as O,Ke as Ot,Xt as P,ze as Pt,L as Q,v as Qt,fn as R,Le as Rt,tn as S,et as St,Mn as T,Qe as Tt,Y as U,D as Ut,Cn as V,Me as Vt,Ht as W,ke as Wt,I as X,ue as Xt,Rt as Y,le as Yt,R as Z,re as Zt,on as _,St as _t,bn as a,G as at,On as b,nt as bt,vn as c,At as ct,In as d,Pt as dt,o as en,B as et,kn as f,Ot as ft,gn as g,Ft as gt,$ as h,Mt as ht,Jt as i,kt as it,sn as j,M as jt,yn as k,He as kt,jn as l,Nt as lt,Nn as m,Tt as mt,qt as n,z as nt,Wt as o,Et as ot,Sn as p,Dt as pt,It as q,fe as qt,_n as r,V as rt,Gt as s,jt as st,Q as t,F as tt,Kt as u,W as ut,hn as v,bt as vt,ln as w,Ze as wt,mn as x,rt as xt,rn as y,at as yt,An as z,Ae as zt};
|
|
1
|
+
import{s as e}from"./main-7JfOGPBD.js";import{l as t,n}from"./simulator-DeHOlOye.js";import{c as r,g as i}from"./format-CnTSBxgP.js";var a=e=>new TextEncoder().encode(e).length;function o(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}var s=e=>typeof e==`object`&&!!e&&!Array.isArray(e),c=e=>typeof e==`number`&&Number.isFinite(e);function l(e){if(s(e)){if(e.kind===`agent`&&typeof e.agentId==`string`&&e.agentId)return{kind:`agent`,agentId:e.agentId};if(e.kind===`script`&&(e.name===void 0||typeof e.name==`string`))return{kind:`script`,...typeof e.name==`string`?{name:e.name}:{}}}}function u(e){if(!s(e))return;let t=l(e.from);if(typeof e.id!=`string`||!e.id||typeof e.title!=`string`||!e.title||!t||e.status!==`open`&&e.status!==`resolved`||!c(e.createdAt)||!c(e.updatedAt))return;let n={id:e.id,title:e.title.slice(0,200),from:t,scope:`local`,status:e.status,createdAt:e.createdAt,updatedAt:e.updatedAt};return typeof e.key==`string`&&e.key&&(n.key=e.key.slice(0,128)),typeof e.body==`string`&&a(e.body)<=8192&&(n.body=e.body),typeof e.link==`string`&&e.link.length<=2048&&o(e.link)&&(n.link=e.link),c(e.resolvedAt)&&(n.resolvedAt=e.resolvedAt),typeof e.machine==`string`&&e.machine&&(n.machine=e.machine),n}var d=32768;function f(e){let t=e.toBase64;if(typeof t==`function`)return t.call(e);let n=[];for(let t=0;t<e.length;t+=d)n.push(String.fromCharCode.apply(null,e.subarray(t,t+d)));return btoa(n.join(``))}async function p(t){try{return f(new Uint8Array(await t.arrayBuffer()))}catch{throw Error(e(`não deu para ler o arquivo`))}}function m(e=import.meta.url){try{return/\/bundle\/(main-[\w-]+)\.js$/.exec(new URL(e).pathname)?.[1]}catch{return}}function h(e){return e.behavior}var g=2,ee=2e3,_=3e4;function v(e){return Math.min(_,ee*2**Math.max(0,e))}function te(e){let t=new URLSearchParams(e),n=e=>{let n=t.get(e);if(n===null||n.trim()===``)return null;let r=Number(n);return Number.isFinite(r)?r:null},r=n(`speed`),i=n(`sessions`),a=n(`seed`);return{speed:r!==null&&r>0?Math.min(r,50):1,sessions:i!==null&&i>=0?Math.min(Math.floor(i),40):4,...a!==null&&a>=0?{seed:Math.floor(a)}:{},...t.get(`noquota`)===`1`?{codexNoQuota:!0}:{}}}var ne=[{name:`compact`,description:e(`Resume a conversa para liberar contexto`),source:`builtin`},{name:`context`,description:e(`Mostra o uso do contexto`),source:`builtin`},{name:`review`,description:e(`Revisa um pull request`),source:`plugin`,plugin:`code-review`}],re=class{snapshot=null;feed=[];connection=`connecting`;mock;inboxFrame={items:[]};listeners=new Map;agentIndex=new Map;roomIndex=new Map;source=null;mockTimer=null;search;openStream;attempts=0;retryTimer=null;retryAt=null;stopped=!0;onOnline=()=>{!this.stopped&&this.connection===`closed`&&this.reconnectNow()};replay=!1;live=null;constructor(e={}){this.mock=!!e.mock,this.search=e.search??(typeof location<`u`?location.search:``),this.openStream=e.eventSource??(e=>new EventSource(e))}on(e,t){let n=this.listeners.get(e);return n||this.listeners.set(e,n=new Set),n.add(t),()=>void n.delete(t)}connect(){if(this.stopped){if(this.stopped=!1,this.mock)return this.startMock();this.startSSE()}}disconnect(){this.stopped=!0,typeof removeEventListener==`function`&&removeEventListener(`online`,this.onOnline),this.clearRetry(),this.closeSource(),this.mockTimer&&clearInterval(this.mockTimer),this.mockTimer=null}reconnectNow(){this.mock||(this.clearRetry(),this.closeSource(),this.stopped=!1,this.startSSE())}get nextRetryAt(){return this.retryAt}agent(e){return this.agentIndex.get(e)}room(e){return this.roomIndex.get(e)}agentsInRoom(e){return(this.snapshot?.agents??[]).filter(t=>t.roomId===e)}async agentHistory(e){if(this.mock||this.replay)return this.agent(e)?.recent??[];let t=await fetch(`/api/agents/${encodeURIComponent(e)}`);return t.ok?(await t.json()).history:this.agent(e)?.recent??[]}async setDemo(e){return this.mock?!0:(await fetch(`/api/demo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})})).ok}async checkUpdates(){return!this.mock&&(await fetch(`/api/updates/check`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`})).ok}async applyUpdate(){if(this.mock)return{ok:!1};let e=await fetch(`/api/updates/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`});if(e.ok)return{ok:!0};let t=await e.json().catch(()=>({}));return t.error?{ok:!1,error:t.error}:{ok:!1}}get replaying(){return this.replay}get liveSnapshot(){return this.replay?this.live?.snap??null:this.snapshot}pushReplay(e){this.replay||(this.replay=!0,this.live=this.snapshot?{snap:this.snapshot,at:Date.now()}:null),this.setSnapshot(e)}stopReplay(){if(!this.replay)return;this.replay=!1;let e=this.live;this.live=null,e?this.setSnapshot({...e.snap,serverTime:e.snap.serverTime+(Date.now()-e.at)}):(this.snapshot=null,this.agentIndex=new Map,this.roomIndex=new Map)}async permissionDetail(e,t){let n=this.agent(e)?.permission;if(n?.id===t&&n.input!==void 0)return n;if(this.mock)return n?.id===t?n:void 0;let r=await fetch(`/api/permissions/${encodeURIComponent(t)}`);if(r.ok)return await r.json()}async decidePermission(t,n){let r=this.snapshot?.agents.find(e=>e.permission?.id===t)?.id,i=()=>{r&&this.emit(`decided`,{agentId:r,verdict:h(n)})};if(this.mock){let r=this.mockSim;if(!r?.decidePermission(t,n))return e(`Este pedido já foi respondido.`);this.applySnapshot(r.snapshot()),i();return}let a=await fetch(`/api/permissions/${encodeURIComponent(t)}/decision`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});if(a.ok){i();return}try{let e=await a.json();if(typeof e.error==`string`)return e.error}catch{}return e(`Não foi possível responder (erro {0}).`,[a.status])}async saveCharacter(e,t){return this.characterRequest(e,`PUT`,t)}async resetCharacter(e){return this.characterRequest(e,`DELETE`,{})}async characterRequest(t,n,r){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/agents/${encodeURIComponent(t)}/character`,n,r,t=>e(`Não foi possível salvar o personagem (erro {0}).`,[t]))}async writeRequest(t,n,r,i){let a;try{a=await fetch(t,{method:n,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})}catch{return e(`Sem conexão com o Habblaud.`)}if(!a.ok){try{let e=await a.json();if(typeof e.error==`string`)return e.error}catch{}return i(a.status)}}async loadAvatar(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/avatar`);return e.ok?await e.json():null}catch{return null}}async saveAvatar(e){return this.avatarRequest(`PUT`,e)}async resetAvatar(){return this.avatarRequest(`DELETE`,{})}async avatarRequest(t,n){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/avatar`,t,n,t=>e(`Não foi possível salvar o avatar (erro {0}).`,[t]))}get inboxItems(){return this.inboxFrame.items}async resolveInbox(t){return this.mock||this.replay?e(`A mesa só funciona com o escritório ao vivo.`):this.writeRequest(`/api/inbox/${encodeURIComponent(t)}/resolve`,`POST`,{},t=>e(`Não foi possível resolver o item (erro {0}).`,[t]))}applyInbox(e){if(!e||!Array.isArray(e.items))return;let t=e.items.map(u).filter(e=>!!e),n=e.arrived?u(e.arrived):void 0;this.inboxFrame={items:t},this.emit(`inbox`,n?{items:t,arrived:n}:{items:t})}get defaultLook(){return(this.liveSnapshot??this.snapshot)?.defaultLook??{parts:{},since:0}}async loadDefaultLook(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/settings/default-look`);return e.ok?await e.json():null}catch{return null}}async saveDefaultLook(t){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/settings/default-look`,`PUT`,t,t=>e(`Não foi possível salvar o estilo padrão (erro {0}).`,[t]))}async resetDefaultLook(){return this.mock||this.replay?e(`Editar o personagem só funciona com o escritório ao vivo.`):this.writeRequest(`/api/settings/default-look`,`DELETE`,{},t=>e(`Não foi possível salvar o estilo padrão (erro {0}).`,[t]))}async loadAttachmentSettings(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/settings/attachments`);if(!e.ok)return null;let t=(await e.json()).retentionDays;return t===null||typeof t==`number`?{retentionDays:t}:null}catch{return null}}async saveAttachmentSettings(t){return this.mock||this.replay?e(`Editar a limpeza dos anexos só funciona com o escritório ao vivo.`):this.writeRequest(`/api/settings/attachments`,`PUT`,t,t=>e(`Não foi possível salvar a limpeza dos anexos (erro {0}).`,[t]))}async loadMachines(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/central/machines`,{cache:`no-store`});if(!e.ok)return null;let t=(await e.json()).machines;return Array.isArray(t)?t:null}catch{return null}}async createPairing(){if(this.mock||this.replay)return{error:e(`Parear máquinas só funciona com o escritório ao vivo.`)};let t;try{t=await fetch(`/api/central/pairing`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`,cache:`no-store`})}catch{return{error:e(`Sem conexão com o Habblaud.`)}}try{let e=await t.json();if(t.ok&&typeof e.pairing==`string`&&typeof e.code==`string`&&typeof e.expiresAt==`number`&&typeof e.fingerprint==`string`)return{pairing:e.pairing,code:e.code,expiresAt:e.expiresAt,fingerprint:e.fingerprint};if(typeof e.error==`string`)return{error:e.error}}catch{}return{error:e(`Não foi possível gerar o código (erro {0}).`,[t.status])}}async revokeMachine(t){return this.mock||this.replay?e(`Revogar máquinas só funciona com o escritório ao vivo.`):this.writeRequest(`/api/central/machines/${encodeURIComponent(t)}/revoke`,`POST`,{},t=>e(`Não foi possível revogar a máquina (erro {0}).`,[t]))}async loadSatelliteLink(){if(this.mock||this.replay)return null;try{let e=await fetch(`/api/satellite/status`,{cache:`no-store`});if(!e.ok)return null;let t=await e.json();return(t.status===`up`||t.status===`down`||t.status===`revoked`||t.status===`unpaired`)&&typeof t.url==`string`&&typeof t.label==`string`?{status:t.status,url:t.url,label:t.label}:null}catch{return null}}async sendMessage(t,n,r=[]){if(this.mock){let e=this.mockSend(t,n);return`message`in e&&this.emit(`sent`,{agentId:t}),e}let i=r.length?{agentId:t,text:n,attachments:r}:{agentId:t,text:n},a=await fetch(`/api/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),o;try{o=await a.json()}catch{}if(a.status===201&&o&&typeof o==`object`)return this.emit(`sent`,{agentId:t}),{message:o};let s=o?.error,c=typeof s==`string`?s:e(`erro {0}`,[a.status]);if(r.length>0&&a.status===410){let e=o?.expired,t=Array.isArray(e)?e.filter(e=>typeof e==`string`):[];return{error:c,expired:t.length?t:r}}return r.length>0&&a.status===500?{error:c,expired:r}:{error:c}}async uploadMessageImage(t){if(this.mock)return{error:e(`imagens só funcionam com o escritório ao vivo`)};let n=await p(t),r=await fetch(`/api/messages/attachments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:t.name,type:t.type,data:n})}),i;try{i=await r.json()}catch{}let a=i;return r.ok&&typeof a?.id==`string`?{id:a.id}:{error:typeof a?.error==`string`?a.error:e(`erro {0}`,[r.status])}}async dropMessageImage(e){if(!this.mock)try{await fetch(`/api/messages/attachments/${encodeURIComponent(e)}`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:`{}`})}catch{}}async messageStatus(t){if(this.mock){let e=this.mockOutbox.get(t);return e?{...e}:null}let n=await fetch(`/api/messages/${encodeURIComponent(t)}`);if(n.status===404)return null;if(!n.ok)throw Error(e(`erro {0}`,[n.status]));return await n.json()}async slashCommands(e){if(this.mock)return ne.map(e=>({...e}));try{let t=await fetch(`/api/messages/commands/${encodeURIComponent(e)}`);if(!t.ok)return[];let n=await t.json();return Array.isArray(n.commands)?n.commands:[]}catch{return[]}}mockOutbox=new Map;mockSeq=0;mockSend(t,n){let r=this.agent(t);if(!r)return{error:e(`agente desconhecido: ele já saiu do escritório?`)};if(!r.canMessage||r.kind!==`main`||r.status===`offline`)return{error:e(`este agente não recebe mensagens agora`)};let i=Date.now(),a={id:`mock-${i.toString(36)}-${++this.mockSeq}`,agentId:t,status:`queued`,createdAt:i,updatedAt:i};return this.mockOutbox.set(a.id,a),setTimeout(()=>{let r=this.mockSim,i=!!r?.receiveMessage(t,n);Object.assign(a,{status:i?`delivered`:`failed`,updatedAt:Date.now()},i?{}:{error:e(`o agente saiu do escritório`)}),i&&r&&this.applySnapshot(r.snapshot())},1e3),{message:{...a}}}emit(e,t){this.listeners.get(e)?.forEach(n=>{try{n(t)}catch(t){console.error(`[store] listener de "${e}" falhou`,t)}})}setConnection(e){this.connection!==e&&(this.connection=e,this.emit(`connection`,e))}applySnapshot(e){let t=this.replay?this.live?.snap:this.snapshot;t&&e.rev<t.rev&&e.meta.startedAt===t.meta.startedAt||(this.replay?this.live={snap:e,at:Date.now()}:this.setSnapshot(e),this.checkBuild(e.meta.build))}setSnapshot(e){this.snapshot=e,this.agentIndex=new Map(e.agents.map(e=>[e.id,e])),this.roomIndex=new Map(e.rooms.map(e=>[e.id,e])),this.emit(`snapshot`,e),this.emit(`defaultLook`,e.defaultLook??{parts:{},since:0})}updateAnnounced=!1;pageBuildId=m();checkBuild(e){if(this.updateAnnounced||this.mock||!e)return;let t=this.pageBuildId;t&&t!==e&&(this.updateAnnounced=!0,this.emit(`update`,{build:e,current:t}))}applyFeed(e){if(!e.length)return;let t=new Set(this.feed.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));n.length&&(this.feed=[...this.feed,...n].slice(-200),this.emit(`feed`,n))}parse(e,t){try{return JSON.parse(e.data)}catch(e){return console.warn(`[store] ${t} inválido ignorado`,e),null}}startSSE(){typeof addEventListener==`function`&&addEventListener(`online`,this.onOnline),this.setConnection(`connecting`);let e;try{e=this.openStream(`/api/stream`)}catch(e){console.error(`[store] não foi possível abrir o stream`,e),this.setConnection(`closed`),this.scheduleRetry();return}this.source=e;let t=()=>this.source===e;e.addEventListener(`open`,()=>{t()&&(this.attempts=0,this.clearRetry(),this.setConnection(`open`))}),e.addEventListener(`error`,()=>{t()&&(e.readyState===g?(this.setConnection(`closed`),this.scheduleRetry()):this.setConnection(`connecting`))}),e.addEventListener(`snapshot`,e=>{if(!t())return;let n=this.parse(e,`snapshot`);n&&this.applySnapshot(n)}),e.addEventListener(`feed`,e=>{if(!t())return;let n=this.parse(e,`feed`);n&&this.applyFeed(n)}),e.addEventListener(`notice`,e=>{if(!t())return;let n=this.parse(e,`aviso`);n&&this.emit(`notice`,n)}),e.addEventListener(`attention`,e=>{if(!t())return;let n=this.parse(e,`attention`);n&&this.emit(`attention`,n)}),e.addEventListener(`presence`,e=>{if(!t())return;let n=this.parse(e,`presence`);n&&this.emit(`presence`,n)}),e.addEventListener(`avatar`,e=>{if(!t())return;let n=this.parse(e,`avatar`);n&&this.emit(`avatar`,n)}),e.addEventListener(`inbox`,e=>{if(!t())return;let n=this.parse(e,`inbox`);n&&this.applyInbox(n)}),e.addEventListener(`defaultLook`,e=>{if(!t())return;let n=this.parse(e,`defaultLook`);n&&this.emit(`defaultLook`,n)})}closeSource(){this.source?.close(),this.source=null}scheduleRetry(){if(this.retryTimer||this.mock||this.stopped)return;let e=v(this.attempts);this.attempts++,this.retryAt=Date.now()+e,this.retryTimer=setTimeout(()=>{this.retryTimer=null,this.retryAt=null,!this.stopped&&this.connection===`closed`&&(this.closeSource(),this.startSSE())},e)}clearRetry(){this.retryTimer&&clearTimeout(this.retryTimer),this.retryTimer=null,this.retryAt=null}mockSim=null;startMock(){if(this.mockTimer)return;this.setConnection(`mock`);let e=new n({...te(this.search),crowd:!0});this.mockSim=e,this.applySnapshot(e.snapshot()),this.mockTimer=setInterval(()=>{let t=Date.now(),n=e.tick(t);n.changed&&this.applySnapshot(e.snapshot(t)),this.applyFeed(n.feed),n.notices.forEach(e=>this.emit(`notice`,e))},250)}},y=[`short`,`buzz`,`spiky`,`side_part`,`curly`,`afro`,`bob`,`long`,`ponytail`,`bun`,`pigtails`,`mohawk`,`bald`,`wavy`],b=[`tshirt`,`hoodie`,`shirt_tie`,`sweater`,`jacket`,`blouse`,`polo`],x=[`none`,`glasses`,`sunglasses`,`headphones`,`cap`,`beanie`,`earrings`,`bow`],S=[`none`,`stubble`,`beard`,`mustache`,`goatee`],ie=[`pants`,`shorts`,`skirt`],C=[`skin`,`hair`,`hairStyle`,`eyes`,`top`,`topAccent`,`topStyle`,`bottom`,`bottomStyle`,`shoes`,`accessory`,`accessoryColor`,`facialHair`],ae={hairStyle:y,topStyle:b,bottomStyle:ie,accessory:x,facialHair:S},oe=/^#[0-9a-f]{6}$/i,se=/[\p{Cc}\u2028\u2029\u200e\u200f\u202a-\u202e\u2066-\u2069]/u;function ce(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;for(let e of Object.keys(t))if(!C.includes(e))return null;let n={};for(let e of C){let r=t[e];if(r===void 0)continue;if(typeof r!=`string`)return null;let i=ae[e];if(i?!i.includes(r):!oe.test(r))return null;n[e]=i?r:r.toLowerCase()}return n}function le(e){if(typeof e!=`string`)return null;let t=e.normalize(`NFC`).replace(/\s+/g,` `).trim();return!t||se.test(t)||[...t].length>24?null:t}function ue(e){return e?C.map(t=>e[t]??``).join(`,`):``}function de(e,t){return e.custom||!t||typeof t.since!=`number`?!1:e.startedAt>=t.since}function fe(e,t){if(typeof e.startedAt!=`number`||!t||!de({custom:e.custom,startedAt:e.startedAt},t))return e.parts;let n={};for(let r of C){let i=e.parts?.[r]??t.parts?.[r];i!==void 0&&(n[r]=i)}return Object.keys(n).length?n:void 0}var pe=[`#ffe2cc`,`#f6cfb0`,`#eab894`,`#d69f78`,`#bd8560`,`#9a6444`,`#7a4a31`,`#5a3623`],me=[[`#2b2530`,5],[`#3f2c22`,5],[`#5f3c28`,4],[`#87593a`,2.5],[`#b0703c`,1.2],[`#8e3b2b`,1],[`#d6ae68`,1.8],[`#ebdcb0`,.7],[`#8f929b`,.7],[`#d9dbe0`,.5]],he=[`#e47aa8`,`#5b8fe0`,`#8f6ad8`,`#3fb3a0`,`#e0584e`,`#7cc45a`,`#f0a24a`],ge=[`#2b2236`,`#2b2236`,`#4a2f22`,`#5a3b22`,`#2f5f9e`,`#3c7a52`],w=[`#e2604f`,`#4a86d8`,`#4bab72`,`#efb54a`,`#8d66cf`,`#36b0b0`,`#e47aa8`,`#3d4352`,`#f1efe9`,`#8a96a3`,`#2f4c7d`,`#c9713f`,`#76913f`,`#e3d3b2`,`#f29b72`,`#5bc0de`,`#b04a5a`,`#f2d16b`],_e=[`#f4f4f0`,`#d3e3f4`,`#f3d6de`,`#dfe3e8`,`#e9f1dc`,`#fbf0d6`],ve=[`#c0392b`,`#2f4c7d`,`#7b2d44`,`#2e7d4f`,`#d9a42e`,`#5b3a8c`,`#3d4352`],ye=[`#2f3b55`,`#3d4352`,`#6b4a35`,`#55613b`,`#262a33`,`#b08a5e`,`#7a2f3a`,`#4a6a8a`],T=[`#f4f4f0`,`#e8e3d6`,`#dfe7ef`,`#f6e7c8`,`#c9ced6`],be=[[`#3f5f8c`,5],[`#2e3e5e`,4],[`#2c2c35`,4],[`#b49c72`,2],[`#6d7480`,2],[`#6e4c38`,1.5],[`#5f6845`,1.2],[`#2c3655`,2],[`#7f9cc4`,1.5],[`#e2ded5`,.5],[`#9b3b3b`,.4]],xe=[[`#2b2b33`,5],[`#6b4630`,3],[`#ececec`,3],[`#d04848`,1],[`#3f63a8`,1],[`#b88752`,1.5],[`#7d8592`,1]],Se={none:[`#2b2b33`],glasses:[`#2b2b33`,`#5a3a28`,`#3f63a8`,`#b03a3a`,`#8a8f99`],sunglasses:[`#22232b`],headphones:[`#2b2b33`,`#f1efe9`,`#e2604f`,`#4a86d8`,`#efb54a`,`#36b0b0`],cap:[`#e2604f`,`#4a86d8`,`#2b2b33`,`#4bab72`,`#efb54a`,`#f1efe9`,`#2f4c7d`],beanie:[`#e2604f`,`#efb54a`,`#4bab72`,`#8d66cf`,`#3d4352`,`#36b0b0`],earrings:[`#f2c14e`,`#d9dde3`],bow:[`#e2604f`,`#e47aa8`,`#efb54a`,`#4a86d8`,`#8d66cf`]},E=[`#f2b33d`,`#e2604f`,`#4a86d8`,`#4bab72`,`#8d66cf`,`#36b0b0`],Ce={m:{short:16,buzz:9,spiky:9,side_part:12,curly:9,afro:6,bob:2,long:4,ponytail:3,bun:4,pigtails:.4,mohawk:4,bald:5,wavy:9},f:{short:4,buzz:1.2,spiky:2,side_part:4,curly:9,afro:7,bob:13,long:16,ponytail:13,bun:10,pigtails:6,mohawk:1,bald:.4,wavy:13}},we={m:{tshirt:20,hoodie:16,shirt_tie:10,sweater:13,jacket:13,blouse:2,polo:14},f:{tshirt:17,hoodie:14,shirt_tie:5,sweater:14,jacket:12,blouse:20,polo:8}},Te={m:{none:40,glasses:18,sunglasses:4,headphones:13,cap:7,beanie:6,earrings:2,bow:.3},f:{none:36,glasses:16,sunglasses:4,headphones:11,cap:4,beanie:5,earrings:13,bow:7}},Ee={none:62,stubble:12,beard:13,mustache:7,goatee:6},De={m:{pants:88,shorts:12,skirt:0},f:{pants:62,shorts:10,skirt:28}};function Oe(e){let t=(e^2654435769)>>>0;return t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),(t^t>>>16)>>>0}function D(e,n={}){let r=t(Oe(e)),i=e=>e[Math.floor(r()*e.length)%e.length],a=e=>{let t=Object.entries(e),n=t.reduce((e,[,t])=>e+t,0),i=r()*n;for(let[e,n]of t)if(i-=n,i<0)return e;return t[t.length-1][0]},o=e=>a(Object.fromEntries(e)),s=r(),c=n.look??(s<.5?`f`:`m`),l=i(pe),u=r()<.08?i(he):o(me),d=a(Ce[c]),f=i(ge),p=a(we[c]),m,h;switch(p){case`shirt_tie`:m=i(_e),h=i(ve);break;case`jacket`:m=i(ye),h=r()<.7?i(T):i(w);break;case`hoodie`:case`polo`:m=i(w),h=r()<.6?i(T):i(w);break;default:m=i(w),h=i(w)}h===m&&(h=i(T));let g=o(be),ee=o(xe),_=a(Te[c]);(_===`cap`||_===`beanie`)&&(d===`afro`||d===`bun`||d===`mohawk`||d===`pigtails`)&&(_=`glasses`),_===`bow`&&(d===`bald`||d===`buzz`)&&(_=`earrings`);let v=i(Se[_]),te=r(),ne=a(Ee),re=c===`m`?ne:`none`,y=a(De[c]);c===`f`&&d===`bald`&&(d=`buzz`);let b={skin:l,hair:u,hairStyle:d,eyes:f,top:m,topAccent:h,topStyle:p,bottom:g,shoes:ee,accessory:_,accessoryColor:v,lanyard:n.sub?E[Math.floor(te*E.length)%E.length]:null,look:c,facialHair:re,bottomStyle:y},x=n.parts;if(!x)return b;let S=Object.fromEntries(C.filter(e=>x[e]!==void 0).map(e=>[e,x[e]]));return{...b,...S}}function ke(e,t,n){let r=D(e,{look:n,parts:t}),i={};for(let e of C){let t=r[e];t!==void 0&&(i[e]=t)}return i}function Ae(e){return[e.skin,e.hair,e.hairStyle,e.eyes,e.top,e.topAccent,e.topStyle,e.bottom,e.shoes,e.accessory,e.accessoryColor,e.lanyard??`-`,e.look,e.facialHair??`-`,e.bottomStyle??`-`].join(`|`)}var O=e=>[...new Set(e)],k=e=>e.map(([e])=>e),A=O([...T,...w]);function je(e){switch(e){case`shirt_tie`:return{top:_e,topAccent:ve};case`jacket`:return{top:ye,topAccent:A};default:return{top:w,topAccent:A}}}function Me(e){let t=je(e.topStyle);return{skin:pe,hair:[...k(me),...he],hairStyle:y,eyes:O(ge),top:t.top,topAccent:t.topAccent,topStyle:b,bottom:k(be),bottomStyle:ie,shoes:k(xe),accessory:x,accessoryColor:Se[e.accessory],facialHair:S}}var Ne=[`afro`,`bun`,`mohawk`,`pigtails`],Pe=[`bald`,`buzz`];function Fe(t,n,r){if(n===`accessory`&&((r===`cap`||r===`beanie`)&&Ne.includes(t.hairStyle)||r===`bow`&&Pe.includes(t.hairStyle)))return e(`Não combina com este cabelo`);if(n===`hairStyle`){if((t.accessory===`cap`||t.accessory===`beanie`)&&Ne.includes(r))return e(`Não combina com o boné ou o gorro`);if(t.accessory===`bow`&&Pe.includes(r))return e(`Não combina com o laço`)}}function Ie(e){let t=Me(e),n=(e,t)=>t.includes(e)?e:t[0];return{...e,top:n(e.top,t.top),topAccent:n(e.topAccent,t.topAccent),accessoryColor:n(e.accessoryColor,t.accessoryColor)}}function Le(e,t){if(e&&e!==`auto`)return e;let n=t.getMonth();return n===9?`halloween`:n===10||n===11&&t.getDate()<=26?`christmas`:`none`}var Re={showNames:!0,bubbles:`important`,liveliness:`normal`,followSelected:!1,dayNight:!0,theme:`auto`},ze=[`competicao`,`apostas`,`games`,`series`,`fofoca`,`vaidade`,`cafeina`,`piadas`,`esporte`,`timidez`,`economia`,`sonecas`,`calma`,`leitura`],Be=[[`timidez`,`piadas`],[`timidez`,`fofoca`],[`apostas`,`economia`],[`esporte`,`sonecas`],[`calma`,`competicao`]],j={min:2,max:3},Ve=[`night_owl`,`early_bird`,`coffee`,`tea`,`tabs`,`spaces`,`dark_mode`,`light_mode`,`vim`,`tests_first`,`ship_fast`,`refactor`,`pixel_art`,`music`,`silence`,`cats`,`dogs`,`open_source`,`learning`,`hello`],He=[`hello`,`nice_building`,`coffee`,`congrats`,`nice_to_meet`,`bye`,`thanks`,`good_luck`,`wave`,`clap`],Ue=[`offensive_name`,`impersonation`,`harassment`,`greeting_spam`,`fake_building`,`other`],We=[`visited`,`nice_building`,`keep_going`,`coffee`,`wave`,`star`,`heart`,`rocket`],Ge=[`agent_hours_10k`,`agent_hours_50k`,`agent_hours_100k`],Ke=[`deploy`,`other-device`,`banned`,`suspended`,`waiting`,`update`,`unauthorized`,`no_player`,`deleted`],qe=[`schema`,`limits`,`name_pool`,`parts`,`ids`,`rate`,`internal`,`left`,`implausible`],Je={floors:64,agentsPerFloor:64,agentsTotal:256,bytes:65536},M={min:3,max:20},Ye=[`habblaud`,`admin`,`staff`,`claude`,`anthropic`,`codex`,`openai`,`moderador`,`moderator`,`suporte`,`support`,`system`,`world`],Xe=`invalid.invalid_code.invalid_credentials.email_not_verified.banned.suspended.unauthorized.name_taken.name_invalid.name_blocked.name_cooldown.password_invalid.password_weak.password_pwned.altcha_required.altcha_invalid.device_limit.rate_limited.not_found.no_player.unavailable.maintenance.invalid_json.too_large.unsupported_media_type.method_not_allowed.internal`.split(`.`),Ze={competicao:{id:`competicao`,emoji:`🏆`,label:e(`Competição`),desc:e(`Adora competir: desafia os colegas no ping-pong, no videogame e no jokenpô.`)},apostas:{id:`apostas`,emoji:`🎲`,label:e(`Apostas`),desc:e(`Topa qualquer aposta e aposta alto no jokenpô.`)},games:{id:`games`,emoji:`🎮`,label:e(`Games`),desc:e(`Vive no videogame do lounge e nos fliperamas — e costuma ganhar.`)},series:{id:`series`,emoji:`📺`,label:e(`Séries e TV`),desc:e(`Não perde um programa na TV do lounge (de preferência com pipoca).`)},fofoca:{id:`fofoca`,emoji:`🗣️`,label:e(`Fofoca`),desc:e(`Puxa papo na copa e sabe de tudo o que acontece nas salas.`)},vaidade:{id:`vaidade`,emoji:`💄`,label:e(`Vaidade`),desc:e(`Passa no espelho do banheiro para se arrumar sempre que pode.`)},cafeina:{id:`cafeina`,emoji:`☕`,label:e(`Cafeína`),desc:e(`Movido a café: a cafeteira da copa é a segunda casa.`)},piadas:{id:`piadas`,emoji:`😂`,label:e(`Piadas`),desc:e(`Conta piada em toda conversa e faz a roda rir.`)},esporte:{id:`esporte`,emoji:`🏓`,label:e(`Esporte`),desc:e(`Joga ping-pong, se alonga e vibra com o futebol na TV.`)},timidez:{id:`timidez`,emoji:`🙈`,label:e(`Timidez`),desc:e(`Prefere ficar na sua: lê, olha a janela e entra menos nas rodas.`)},economia:{id:`economia`,emoji:`💰`,label:e(`Economia`),desc:e(`Pão-duro: aposta pouco e às vezes foge da aposta.`)},sonecas:{id:`sonecas`,emoji:`😴`,label:e(`Sonecas`),desc:e(`Qualquer sofá ou puff vira cama.`)},calma:{id:`calma`,emoji:`🧘`,label:e(`Calma`),desc:e(`Zen: alongamentos, janela e conversas tranquilas.`)},leitura:{id:`leitura`,emoji:`📚`,label:e(`Leitura`),desc:e(`Sempre com um livro da estante (ou o celular) na mão.`)}};function Qe(e){return typeof e==`string`&&ze.includes(e)}function N(e,t){return Be.some(([n,r])=>n===e&&r===t||n===t&&r===e)}function $e(e){if(!Array.isArray(e)||e.length<j.min||e.length>j.max)return null;let t=[];for(let n of e){if(!Qe(n)||t.includes(n)||t.some(e=>N(e,n)))return null;t.push(n)}return t}var et=[`auto`,`none`,`halloween`,`christmas`];function tt(e){return typeof e==`string`&&et.includes(e)}var nt={cmdsPerBatch:20,batchesPerSec:5,streams:4},rt=[`area`,`area.patch`,`players`,`player.join`,`player.leave`,`pos`,`minimap`,`afk`,`profile`,`notice`,`like.update`,`greeting`,`building`,`building.patch`,`visitors`,`city`,`city.fireworks`,`likes.today`,`away.summary`,`knock`],it=[`not_configured`,`local_only`,`terminal_off`,`not_logged_in`,`session_expired`,`invalid_email`,`altcha_failed`,`world_unreachable`,`world_timeout`,`world_bad_response`,`world_error`,`storage_failed`,`too_many_streams`,`no_stream`,`not_connected`,`account_deleted`,`network`,`unknown`],at=[...new Set([...Xe,...it])];function ot(e){return typeof e==`string`&&at.includes(e)}var st=3,ct=/[\p{C}\p{Zl}\p{Zp}\p{Default_Ignorable_Code_Point}\p{Bidi_Control}]/u,lt=/(?! )[\p{Zs}\s]/u,ut=/^\p{L}$/u,dt=/^\p{M}$/u,ft=/^[0-9 _.-]$/,pt=`Latin.Greek.Cyrillic.Armenian.Hebrew.Arabic.Syriac.Thaana.Devanagari.Bengali.Gurmukhi.Gujarati.Oriya.Tamil.Telugu.Kannada.Malayalam.Sinhala.Thai.Lao.Tibetan.Myanmar.Georgian.Hangul.Ethiopic.Khmer.Mongolian.Hiragana.Katakana.Bopomofo.Han`.split(`.`),mt=pt.map(e=>[e,RegExp(`^\\p{Script_Extensions=${e}}$`,`u`)]),ht=`Other`,gt=[...pt.map(e=>[e]),[`Han`,`Hiragana`,`Katakana`],[`Hangul`,`Han`],[`Han`,`Bopomofo`],[ht]];function _t(e){let t=mt.filter(([,t])=>t.test(e)).map(([e])=>e);return t.length?t:[ht]}function vt(e){let t=[...new Set(e)].map(_t);return gt.some(e=>t.every(t=>t.some(t=>e.includes(t))))}function yt(e){return e.normalize(`NFC`).trim().replace(/ {2,}/g,` `)}function bt(e){return e.normalize(`NFKC`).toLowerCase().normalize(`NFD`).replace(/[\p{Mn}\p{Me}]/gu,``).normalize(`NFC`).replace(/\s+/g,` `).trim()}function xt(e){return e.replace(/[ _.-]/g,``)}var P=e=>({ok:!1,code:`name_invalid`,problem:e});function St(e){if(typeof e!=`string`)return P(`type`);if(e.length>M.max*8)return P(`length`);let t=yt(e);if(ct.test(t)||lt.test(t))return P(`invisible`);let n=[...t];if(n.length<M.min||n.length>M.max)return P(`length`);let r=[],i=0,a=!1;for(let e of n)if(ut.test(e))r.push(e),i=0,a=!0;else if(dt.test(e)){if(!a||++i>st)return P(`chars`)}else if(ft.test(e))i=0,a=!1;else return P(`chars`);if(!r.length)return P(`no_letter`);if(!vt(r))return P(`scripts`);let o=bt(t);return Ye.includes(xt(o))?{ok:!1,code:`name_blocked`,problem:`reserved`}:{ok:!0,name:t,key:o}}var F={w:14,h:12},I={w:3,h:2},L={w:F.w*I.w,h:F.h*I.h},R={x:L.w+4+5,y:L.h+4+5},Ct={w:2,h:2},z={x:0,y:0},B={x:19,y:10,w:4,h:3},V={x:21,y:15},H={dx:6,w:2},U=(e,t)=>Math.floor(e/t);function*wt(){let e=0,t=0;yield{x:e,y:t};let n=[[1,0],[0,1],[-1,0],[0,-1]];for(let r=1,i=0;;r++)for(let a=0;a<2;a++,i++){let a=n[i%4]??n[0];for(let n=0;n<r;n++)e+=a[0],t+=a[1],yield{x:e,y:t}}}function W(e){return e.x===z.x&&e.y===z.y}function*Tt(){for(let e of wt())if(!W(e))for(let t=0;t<I.h;t++)for(let n=0;n<I.w;n++)yield{x:e.x*I.w+n,y:e.y*I.h+t}}function G(e){return{x:U(e.x,I.w),y:U(e.y,I.h)}}function Et(e){return{x:e.x*R.x,y:e.y*R.y}}function Dt(e){let t=G(e),n=Et(t);return{x:n.x+F.w*(e.x-I.w*t.x),y:n.y+F.h*(e.y-I.h*t.y)}}function Ot(e){let t=Dt(e),n=e.y-I.h*G(e).y===0,r=n?t.y:t.y+F.h-1;return{side:n?`n`:`s`,tiles:[{x:t.x+H.dx,y:r},{x:t.x+H.dx+1,y:r}],front:{x:t.x+H.dx+H.w/2,y:n?t.y-1:t.y+F.h}}}function kt(e,t){let n=(R.x-L.w)/2,r=(R.y-L.h)/2;return{x:U(e+n,R.x),y:U(t+r,R.y)}}function At(e){return{x:U(e.x,Ct.w),y:U(e.y,Ct.h)}}function jt(e,t){return`${e}:${t.x},${t.y}`}function Mt(e){let t=/^([a-z0-9_-]{1,32}):(-?\d{1,6}),(-?\d{1,6})$/.exec(e);return t?{district:t[1]??``,chunk:{x:Number(t[2]),y:Number(t[3])}}:null}function Nt(e,t=1){let n=[];for(let r=-t;r<=t;r++)for(let i=-t;i<=t;i++)n.push({x:e.x+i,y:e.y+r});return n}function Pt(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t))return!1;let r=Math.floor(e),i=Math.floor(t),a=U(r,R.x),o=U(i,R.y),s=r-a*R.x,c=i-o*R.y;return s>=L.w||c>=L.h?!0:W({x:a,y:o})?!(s>=B.x&&s<B.x+B.w&&c>=B.y&&c<B.y+B.h):!1}function Ft(){return{x:V.x,y:V.y}}var K=e=>!!e&&typeof e==`object`&&!Array.isArray(e),q=e=>typeof e==`number`&&Number.isFinite(e),J=e=>q(e)&&Number.isInteger(e)&&e>=0&&e<=1e9;function It(e){if(!K(e)||!J(e.lit))return;let t={lit:e.lit},n=e.goal;return K(n)&&typeof n.id==`string`&&n.id.length<=64&&Ge.includes(n.label)&&q(n.target)&&n.target>0&&q(n.progress)&&n.progress>=0&&q(n.until)&&(t.goal={id:n.id,label:n.label,target:n.target,progress:n.progress,until:n.until}),q(e.tokensBand)&&Number.isInteger(e.tokensBand)&&e.tokensBand>=0&&e.tokensBand<=5&&(t.tokensBand=e.tokensBand),t}function Lt(e){if(!K(e)||typeof e.since!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e.since)||!J(e.visits)||!J(e.likes))return;let t=[];for(let n of Array.isArray(e.stamps)?e.stamps:[])K(n)&&We.includes(n.stampId)&&J(n.count)&&n.count!==0&&(t.some(e=>e.stampId===n.stampId)||t.push({stampId:n.stampId,count:n.count}));return{since:e.since,visits:e.visits,likes:e.likes,stamps:t}}function Rt(e){return!!e&&(e.visits>0||e.likes>0||e.stamps.some(e=>e.count>0))}function zt(e){let t=-1;return e.forEach((e,n)=>{e.t===`move`&&(t=n)}),e.filter((e,n)=>e.t!==`move`||n===t)}var Bt={night_owl:()=>e(`Codo de madrugada`),early_bird:()=>e(`Acordo cedo para codar`),coffee:()=>e(`Movido a café`),tea:()=>e(`Time do chá`),tabs:()=>e(`Time dos tabs`),spaces:()=>e(`Time dos espaços`),dark_mode:()=>e(`Modo escuro sempre`),light_mode:()=>e(`Modo claro, sem medo`),vim:()=>e(`Vim até o fim`),tests_first:()=>e(`Testo antes de escrever`),ship_fast:()=>e(`Entrego rápido`),refactor:()=>e(`Refatorar é meu hobby`),pixel_art:()=>e(`Fã de pixel art`),music:()=>e(`Codo ouvindo música`),silence:()=>e(`Codo em silêncio`),cats:()=>e(`Gente de gato`),dogs:()=>e(`Gente de cachorro`),open_source:()=>e(`Vivo de código aberto`),learning:()=>e(`Sempre aprendendo`),hello:()=>e(`Oi, prazer!`)};function Vt(e){return typeof e==`string`&&Ve.includes(e)}function Ht(e){return Bt[e]?.()??String(e)}function Y(e,t){return!e?.enabled||!e.configured||e.state===`off`||t.remote?`hidden`:!t.fake&&(!t.local||!t.terminal)?`local_only`:`active`}function Ut(e){return!!e&&(e.scene!==void 0||e.building!==void 0)}var Wt=`habblaud:world-invite-seen`,Gt=`habblaud:world-launch`,Kt=`habblaud:world-waitlist-seen`,qt=`habblaud:world-approved-seen`,Jt={launch:null,waitlistSeen:!1,approvedSeen:!1};function Yt(e){let t=null;if(e.launch===`never`||e.legacy===`never`)t=`never`;else if(e.launch)try{let n=JSON.parse(e.launch);n&&typeof n==`object`&&typeof n.shown==`number`&&typeof n.last==`number`&&Number.isFinite(n.shown)&&Number.isFinite(n.last)&&(t={shown:Math.max(0,Math.floor(n.shown)),last:Math.max(0,n.last)})}catch{}return{launch:t,waitlistSeen:e.waitlist!==null,approvedSeen:e.approved!==null}}function Xt(e){return{launch:e.launch===`never`?`never`:e.launch?JSON.stringify(e.launch):null,waitlist:e.waitlistSeen?`1`:null,approved:e.approvedSeen?`1`:null}}function Zt(e,t,n,r){if(t.fake||t.replaying||Y(e,t)!==`active`||!e)return{show:null,memory:null};if(e.state===`logged_out`){let e=n.launch;return e===`never`||e&&(e.shown>=3||r-e.last<2592e5)?{show:null,memory:null}:{show:`launch`,memory:{...n,launch:{shown:(e?.shown??0)+1,last:r}}}}let i=n.launch===`never`?n:{...n,launch:`never`},a=i!==n;return e.state===`waiting`&&!n.waitlistSeen?{show:`waitlist`,memory:{...i,waitlistSeen:!0}}:e.state===`approved`&&!n.approvedSeen&&!Ut(e)?{show:`approved`,memory:{...i,approvedSeen:!0}}:{show:null,memory:a?i:null}}var Qt=[`welcome`,`register`,`login`,`verify`,`forgot`,`reset`],$t=[`home`,`character`,`visibility`,`devices`,`account`,`blocked`];function en(e){return e===`waiting`||e===`approved`?$t:e===`logged_out`?Qt:[]}function tn(){return{server:null,screen:`welcome`,email:``,name:``,flash:null}}function X(e){if(!e.server)return e;let t=en(e.server);return!t.length||t.includes(e.screen)?e:{...e,screen:t[0]}}function nn(e,t){switch(t.type){case`server`:return X({...e,server:t.state});case`go`:return X({...e,screen:t.screen,flash:null});case`code_sent`:return X({...e,screen:`verify`,email:t.email,name:t.name??e.name,flash:`code_sent`});case`reset_code_sent`:return X({...e,screen:`reset`,email:t.email,flash:`code_sent`});case`password_changed`:return X({...e,screen:`login`,flash:`password_changed`});case`signed_in`:return{...e,flash:null};case`flash`:return{...e,flash:t.flash}}}function Z(e){return e.normalize(`NFC`).trim()}function rn(e){let t=Z(e);return t.length<=254&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function an(e){return e.replace(/\D/g,``).slice(0,6)}function on(e){return/^\d{6}$/.test(an(e))}function sn(e,t=``){let n=e.normalize(`NFC`),r=[...n].length;if(r<12)return`short`;if(r>128)return`long`;let i=Z(t).toLowerCase(),a=n.toLowerCase();return i&&(a===i||a===i.split(`@`)[0])?`email`:/^(.+?)\1+$/su.test(n)?`repeated`:null}function cn(t){switch(t){case`short`:return e(`A senha precisa ter pelo menos 12 caracteres.`);case`long`:return e(`A senha pode ter no máximo 128 caracteres.`);case`email`:return e(`A senha não pode ser o seu e-mail.`);case`repeated`:return e(`A senha não pode ser só uma repetição (como "aaaaaaaaaaaa").`)}}function ln(t){switch(t){case`type`:case`length`:return e(`O nome precisa ter de 3 a 20 caracteres.`);case`invisible`:return e(`Tire do nome os caracteres invisíveis e os espaços especiais.`);case`chars`:return e(`Use só letras, números, espaço, _ - e . no nome.`);case`scripts`:return e(`Use letras de um só alfabeto no nome.`);case`no_letter`:return e(`O nome precisa ter pelo menos uma letra.`);case`reserved`:return e(`Este nome é reservado. Escolha outro.`)}}function un(e,t){if(e.includes(t))return null;let n=e.find(e=>N(e,t));return n?{reason:`clash`,with:n}:e.length>=j.max?{reason:`full`}:null}function dn(e,t){return e.includes(t)?e.filter(e=>e!==t):un(e,t)?[...e]:[...e,t]}function fn(e){return $e(e)!==null}var pn=24301;function mn(e){let t={};for(let n of C)t[n]=n===`facialHair`?e.facialHair??`none`:n===`bottomStyle`?e.bottomStyle??`pants`:e[n];return t}function hn(e,t,n=pn){return D(n,{look:e,parts:t})}function gn(e){let t=St(e.name);return t.ok?fn(e.traits)?!e.intro||!Vt(e.intro)?{field:`intro`}:null:{field:`traits`}:{field:`name`,problem:t.problem}}var _n={mode:`live`,closed:!1,hideCountry:!1,tokensVisible:!0,leaderboard:!1,compactions:!1,knocks:!1},vn=[`closed`,`hideCountry`,`tokensVisible`,`leaderboard`,`compactions`,`knocks`];function yn(e){return e?.notifyInactivity!==!1}var bn=`habblaud-world-dados.json`,Q=`privacidade@habblaud.com`,xn=`Recurso Habblaud World`;function Sn(e){let t=e&&/^[A-Za-z0-9_-]{1,64}$/.test(e)?e:``;return`mailto:${Q}?subject=${encodeURIComponent(t?`${xn} ${t}`:xn)}`}function Cn(t,n){switch(ot(t)||t===`offline`||t===`forbidden`?t:`unknown`){case`invalid_code`:return e(`Código errado ou vencido. Confira o e-mail ou peça outro código.`);case`invalid_credentials`:return e(`E-mail ou senha não conferem.`);case`email_not_verified`:return e(`Falta confirmar o e-mail: mandamos um código novo.`);case`banned`:return e(`Esta conta foi banida do Habblaud World. Para recorrer, responda ao e-mail do banimento.`);case`suspended`:return e(`Esta conta está suspensa no Habblaud World por enquanto.`);case`unauthorized`:case`not_logged_in`:case`session_expired`:return e(`A sessão do Habblaud World neste computador terminou. Entre de novo.`);case`name_taken`:return e(`Este nome já está em uso no mundo. Escolha outro.`);case`name_invalid`:return e(`Nome inválido: de 3 a 20 caracteres, com letras de um só alfabeto, números, espaço, _ - e .`);case`name_blocked`:return e(`Este nome não é permitido. Escolha outro.`);case`name_cooldown`:return e(`O nome só pode ser trocado uma vez a cada 30 dias.`);case`password_invalid`:return e(`A senha precisa ter de 12 a 128 caracteres.`);case`password_weak`:return e(`Senha fraca: não use o e-mail, o nome de jogador nem só repetição.`);case`password_pwned`:return e(`Esta senha aparece em vazamentos de dados conhecidos. Escolha outra.`);case`invalid_email`:return e(`E-mail inválido. Confira o endereço.`);case`altcha_required`:case`altcha_invalid`:case`altcha_failed`:return e(`A verificação anti-robô não passou. Tente de novo em instantes.`);case`device_limit`:return e(`Esta conta já tem 3 computadores; revogue um em Dispositivos.`);case`no_player`:return e(`Crie o personagem primeiro.`);case`unavailable`:return e(`O Habblaud World está em manutenção. Tente de novo mais tarde.`);case`maintenance`:return e(`O mundo está em manutenção; tentamos de novo em instantes.`);case`not_found`:return e(n===`revoke`?`Este dispositivo não está mais na conta.`:`O servidor do Habblaud World não encontrou o que foi pedido.`);case`invalid_json`:case`too_large`:case`unsupported_media_type`:case`method_not_allowed`:return e(`O pedido saiu num formato que o servidor não aceita. Atualize o Habblaud e tente de novo.`);case`not_configured`:return e(`O Habblaud World não está ligado neste Habblaud (HABBLAUD_WORLD_URL recusada; veja o log do servidor).`);case`rate_limited`:return e(n===`export`?`Dá para baixar os dados uma vez por dia. Tente de novo amanhã.`:`Muitas tentativas seguidas. Espere alguns minutos e tente de novo.`);case`network`:case`world_unreachable`:case`world_timeout`:return e(`O servidor do Habblaud World não respondeu. Tente de novo em instantes.`);case`world_bad_response`:return e(`O servidor do Habblaud World respondeu algo inesperado. Tente de novo em instantes.`);case`account_deleted`:return e(`A conta do Habblaud World foi excluída. O prédio e o perfil saíram do mundo na hora; o resto é apagado do banco em 7 dias e dos backups em até 30.`);case`storage_failed`:return e(`Não deu para gravar a sessão neste computador: ela vale só até o Habblaud reiniciar.`);case`too_many_streams`:return e(`A cidade já está aberta em outras abas do Habblaud. Feche uma delas para abrir aqui.`);case`no_stream`:return e(`A cena Mundo perdeu a conexão com o Habblaud. Abra a cidade de novo.`);case`not_connected`:return e(n===`unblock`?`Sem conexão com o Habblaud World agora: desbloquear precisa do prédio aceso ou da cidade aberta.`:`Sem conexão com o Habblaud World agora; o Habblaud tenta de novo sozinho.`);case`offline`:return e(`Sem conexão com o Habblaud.`);case`forbidden`:case`local_only`:return e(`A conta do World só pode ser mexida pelo próprio computador, com o Habblaud aberto em localhost.`);case`terminal_off`:return e(`A conta do World só pode ser mexida com o Habblaud acessível apenas pelo próprio computador (acesso local, bind 127.0.0.1).`);case`invalid`:switch(n){case`register`:case`reset`:return e(`O servidor recusou o e-mail ou a senha. A senha precisa ter de 12 a 128 caracteres e não pode estar numa lista de senhas vazadas.`);case`character`:return e(`O servidor recusou o personagem. Confira o nome, os traços (2 ou 3) e a frase de apresentação.`);case`visibility`:case`inactivity`:return e(`O servidor recusou as opções de visibilidade.`);default:return e(`O servidor recusou o pedido. Confira os dados e tente de novo.`)}case`internal`:return e(`O servidor do mundo teve um erro; tente de novo.`);case`world_error`:case`unknown`:return e(`Algo deu errado. Tente de novo em instantes.`)}}function wn(e,t){return t?e?.left?`left`:e?.paused?`paused`:e?.stopped?`stopped`:e?.connected?`connected`:`reconnecting`:`no_player`}function Tn(t){switch(t){case`update`:return{label:e(`Atualize o Habblaud`),desc:e(`Esta versão do Habblaud não entra mais no mundo. Atualize para o prédio voltar a acender.`),toggle:null};case`other-device`:return{label:e(`Conectado em outro computador`),desc:e(`A sua conta conectou o prédio em outro computador, e este parou de enviar.`),toggle:{action:`resume`,text:e(`Trazer para este computador`),hint:e(`O prédio volta a subir daqui, e o outro computador para de enviar.`)}};case`banned`:return{label:e(`Conta banida`),desc:e(`O Habblaud World baniu esta conta: o prédio saiu do mundo e nada mais sai deste computador.`),toggle:null};case`suspended`:return{label:e(`Conta suspensa`),desc:e(`Esta conta está suspensa no Habblaud World: o prédio fica apagado e nada sai deste computador.`),toggle:{action:`resume`,text:e(`Tentar de novo`),hint:e(`Se a suspensão já acabou, o prédio volta a acender.`)}};case`waiting`:return{label:e(`Na lista de espera`),desc:e(`A conta voltou para a lista de espera: o prédio sai do mundo até o acesso ser liberado de novo.`),toggle:null};case`no_player`:return{label:e(`Sem personagem`),desc:e(`O mundo não encontrou o seu personagem: crie de novo para o prédio voltar.`),toggle:null};case`unauthorized`:return{label:e(`Entre de novo`),desc:e(`O servidor do mundo não reconheceu este computador: entre de novo na conta.`),toggle:null};case`deleted`:return{label:e(`Conta excluída`),desc:e(`A conta do Habblaud World foi excluída: o prédio e o perfil saíram do mundo e nada mais sai deste computador.`),toggle:null}}}function En(t){switch(t){case`schema`:return e(`O pacote saiu fora do formato do protocolo. Atualize o Habblaud.`);case`limits`:return e(`O escritório passou dos limites do mundo (64 andares, 64 agentes por andar, 256 agentes ou 64 KB).`);case`name_pool`:return e(`Um nome de personagem não está na lista de nomes do mundo.`);case`parts`:return e(`Uma peça de aparência está fora das paletas do editor.`);case`ids`:return e(`Um código de andar ou de agente está fora do formato.`);case`rate`:return e(`Remessas demais em pouco tempo (o limite é 12 por minuto). A próxima vai normalmente.`);case`internal`:return e(`Um erro no servidor do mundo. A próxima remessa tenta de novo.`);case`left`:return e(`A conta saiu do mundo (por este ou por outro computador): nada mais sai até você voltar ao mundo.`);case`implausible`:return e(`O pacote contradiz o anterior de um jeito que o Habblaud não produz: o mundo o descartou, e o prédio fica com o último aceito. As próximas remessas vão normalmente.`);default:return e(`Um motivo que esta versão do Habblaud não conhece.`)}}function Dn(t){return t===`appeal`?{text:e(`Recorrer por e-mail`),hint:e(`Abre um e-mail para {0}: conte o que aconteceu, e uma pessoa revê o caso.`,[Q])}:{text:e(`Contestar por e-mail`),hint:e(`Abre um e-mail para {0}: se for engano, uma pessoa revê os números e tira o selo.`,[Q])}}function $(t){return t===1?e(`1 byte`):e(`{0} bytes`,[r(t)])}function On(t){return t===1?e(`1 andar`):e(`{0} andares`,[r(t)])}function kn(t){return t===1?e(`1 agente`):e(`{0} agentes`,[r(t)])}function An(t){return t===1?e(`1 visitante agora`):e(`{0} visitantes agora`,[r(t)])}var jn={started:!1,last:void 0,notified:!1};function Mn(e,t,n){let r=typeof t==`number`&&t>0?t:t===0?0:void 0;if(!e.started)return{state:{started:!0,last:r,notified:r!==void 0&&r>0},notify:!1};if(r===void 0)return{state:{started:!0,last:void 0,notified:!1},notify:!1};let i=r>0&&(e.last??0)===0,a=i&&!e.notified&&n;return{state:{started:!0,last:r,notified:e.notified||i},notify:a}}function Nn(t,n,r,i={}){let a=Pn(t,n,r,i);return a.state===`stopped`&&(t?.stopped===`banned`||t?.stopped===`suspended`)?{...a,appeal:Dn(`appeal`)}:t?.unverified&&a.state!==`stopped`&&a.state!==`left`&&a.state!==`no_player`?{...a,unverified:e(`O mundo marcou o seu prédio como "não verificado": os números pareceram fora do normal e estão em revisão. Ele continua no mundo, mas fora de placares e destaques.`),appeal:Dn(`contest`)}:a}function Pn(t,n,r,a){let o=wn(t,n),s={unverified:null,appeal:null},c=t?.floors??0,l=t?.agents??0,u=o===`no_player`||o===`left`?[]:[On(c),kn(l),t?.lastUplinkAt?e(`Última remessa: {0}`,[i(t.lastUplinkAt,r)]):e(`Nenhuma remessa ainda`),...t?.visitors?[`👀 ${An(t.visitors)}`]:[]],d=(o===`connected`||o===`reconnecting`||o===`paused`)&&t?.lastAck?.ok===!1?En(t.lastAck.error):null,f=e(`Pausado por 30 dias, o prédio some do mapa e, 30 dias depois, é retirado; retomar antes disso traz de volta, no mesmo lote.`);switch(o){case`no_player`:return{state:o,label:e(`Sem personagem`),desc:e(`Crie o seu personagem: o prédio entra no mundo junto com ele.`),stats:u,rejected:d,toggle:null,leave:!1,...s};case`left`:return{state:o,label:e(`Fora do mundo`),desc:e(`Você saiu do mundo: o prédio foi retirado e o lote, liberado. Dá para andar pela cidade; nada do escritório sai deste computador.`),stats:u,rejected:null,toggle:{action:`join`,text:e(`Voltar ao mundo`),hint:e(`Voltar cria um prédio novo, em outro lote; a conta e o personagem são os mesmos.`)},leave:!1,...s};case`stopped`:{let e=t.stopped;return{state:o,...Tn(e),stats:u,rejected:d,leave:e===`update`||e===`other-device`||e===`suspended`,...s}}case`paused`:return{state:o,label:e(`Pausado`),desc:e(`Pausado: seu prédio está apagado, mas você pode andar pela cidade. Nada do escritório sai deste computador.`),stats:u,rejected:d,toggle:{action:`resume`,text:e(`Retomar`),hint:`${e(`Retomar volta a enviar e acende o prédio.`)} ${f}`},leave:!0,...s};case`connected`:case`reconnecting`:{let n=o===`connected`,r=!t?.lastUplinkAt,i=!n&&!!a.maintenance;return{state:o,label:e(n?`Conectado`:i?`Em manutenção`:r?`Conectando…`:`Reconectando…`),desc:e(n?`Aceso no mundo: um andar por sala aberta e cada personagem no status de agora. Os tokens, se você deixar, aparecem só em faixas, no medidor da fachada.`:i?`O mundo está em manutenção; tentamos de novo em instantes.`:r?`O prédio acende com a primeira remessa.`:`Sem conexão com o mundo agora: o Habblaud tenta de novo sozinho. Com 2 minutos sem notícias, o prédio apaga.`),stats:u,rejected:d,toggle:{action:`pause`,text:e(`Pausar`),hint:`${e(`Pausar interrompe o envio na hora e apaga o prédio no mundo.`)} ${f}`},leave:!0,...s}}}}function Fn(){return e(`Pausar apaga o prédio e guarda o lote: retomar traz de volta, no mesmo lugar. Sair do mundo retira o prédio na hora e libera o lote; a conta e o personagem continuam, e voltar depois cria um prédio novo, em outro lote.`)}function In(t,n){if(!t)return{kind:`pending`,label:e(`Sem resposta do mundo ainda.`),reason:null};if(t.ok){let r=t.bytes===void 0?null:t.bytes===n?e(`O mundo recebeu os mesmos {0}.`,[$(t.bytes)]):e(`O mundo contou {0}.`,[$(t.bytes)]);return{kind:`accepted`,label:e(`Aceita pelo mundo.`),reason:r}}return{kind:`rejected`,label:e(`Recusada pelo mundo.`),reason:En(t.error)}}function Ln(e){return JSON.stringify(e,null,2)}function Rn(e,t){return Y(e,t)===`active`&&e?.state===`approved`}function zn(e,t){let n=e?.building;return!n||n.left||e.state!==`approved`||Y(e,t)===`hidden`?null:n.paused?`paused`:n.stopped?`stopped`:n.connected?`live`:n.lastUplinkAt?`reconnecting`:null}export{H as $,p as $t,Yt as A,Ve as At,zn as B,Fe as Bt,Fn as C,tt as Ct,an as D,Ge as Dt,Zt as E,N as Et,Rn as F,qe as Ft,Vt as G,C as Gt,nn as H,Ie as Ht,dn as I,Je as It,zt as J,ce as Jt,Lt as K,de as Kt,un as L,Re as Lt,cn as M,Ue as Mt,Ln as N,We as Nt,Z as O,Ke as Ot,Xt as P,ze as Pt,L as Q,v as Qt,fn as R,Le as Rt,tn as S,et as St,Mn as T,Qe as Tt,Y as U,D as Ut,Cn as V,Me as Vt,Ht as W,ke as Wt,I as X,ue as Xt,Rt as Y,le as Yt,R as Z,re as Zt,on as _,St as _t,bn as a,G as at,On as b,nt as bt,vn as c,At as ct,In as d,Pt as dt,o as en,B as et,kn as f,Ot as ft,gn as g,Ft as gt,$ as h,Mt as ht,Jt as i,kt as it,sn as j,M as jt,yn as k,He as kt,jn as l,Nt as lt,Nn as m,Tt as mt,qt as n,z as nt,Wt as o,Et as ot,Sn as p,Dt as pt,It as q,fe as qt,_n as r,V as rt,Gt as s,jt as st,Q as t,F as tt,Kt as u,W as ut,hn as v,bt as vt,ln as w,Ze as wt,mn as x,rt as xt,rn as y,at as yt,An as z,Ae as zt};
|