import { j as _0x5ae9a7 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f775.js";
import { Q as _0x17e096, R as _0x295e75, T as _0x606240, U as _0x25d5cd, V as _0x3352f6, W as _0x14ea57, X as _0x773874, Y as _0x35a0b3, Z as _0x355d8a, A as _0x1497eb, _ as _0x4122e8, $ as _0x1a50d8, a0 as _0x40049c, a1 as _0x4c6a80, a2 as _0x17dcef, a3 as _0x2f3402, a4 as _0x383150, a5 as _0x58ec30, a6 as _0x55c08a, a7 as _0x323726, a8 as _0x5602a9, a9 as _0x5ef15b, aa as _0x313079, ab as _0x280b08, m as _0x13e074, n as _0x2f9dc5, F as _0x3ab59e, s as _0x527b75 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7723.js";
import { u as _0x32b9a1, r as _0x2ad7f2, P as _0x407939, t as _0x5ed473, p as _0x409ae4, j as _0x5092bb, k as _0x49e3e7, b as _0x336cc5, e as _0x247b40 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f774.js";
import { f as _0x4118cb, u as _0x2e0041, g as _0x1a5016, h as _0x54679c } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7722.js";
import { u as _0x35f842 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77105.js";
import { b as _0x30d8e0, r as _0x28487f } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77.js";
import { u as _0x5d14d2, a as _0x3f6aa1, E as _0x31e134, C as _0x2da570 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77106.js";
import { O as _0x4e3966, Q as _0x709514, U as _0x393e7e, V as _0x8a1497, W as _0x34a0df, I as _0x14349b, _ as _0x46916d, X as _0x22af40, Y as _0xaa2ea9, Z as _0x70b320, j as _0x3523aa, $ as _0x499961, a0 as _0x27450e, a1 as _0x47823a, a2 as _0x8bfabe, a3 as _0x448a07, a4 as _0x28068e, a5 as _0x17e2cb, a6 as _0x2de06e, a7 as _0x1d2301, C as _0x4dd3ae } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f777.js";
import { W as _0x12329e, V as _0xccfecc } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f772.js";
import { a as _0x5780a2 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7737.js";
import { j as _0x5659ff } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7760.js";
import { B as _0x53a3e6 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77107.js";
import { I as _0xc44cbd } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77108.js";
import { u as _0x5cd8aa } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7747.js";
import { i as _0x426f72, g as _0x1f105d } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f776.js";
import { w as _0xc52947 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77109.js";
import { d as _0x554432 } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7735.js";
import { S as _0x4d9f8f } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7736.js";
import { V as _0x202ade } from "./v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77110.js";
const ne = _0x30d8e0((_0x6869f8, _0x5a789a) => ({
  steps: [{
    key: "contatos",
    label: _0x32b9a1.getState().language.step_contatos,
    icon: _0x4e3966
  }, {
    key: "acoes",
    label: _0x32b9a1.getState().language.step_acoes,
    icon: _0x709514
  }, {
    key: "revisao",
    label: _0x32b9a1.getState().language.step_revisao,
    icon: _0x393e7e
  }, {
    key: "envio",
    label: _0x32b9a1.getState().language.step_envio,
    icon: _0x8a1497
  }, {
    key: "resultados",
    label: _0x32b9a1.getState().language.step_resultados,
    icon: _0x34a0df
  }],
  currentStep: "contatos",
  setCurrentStep: _0x332b87 => _0x6869f8({
    currentStep: _0x332b87
  }),
  updateStepsLabels: _0xbfb1af => _0x6869f8({
    steps: [{
      key: "contatos",
      label: _0xbfb1af.step_contatos,
      icon: _0x4e3966
    }, {
      key: "acoes",
      label: _0xbfb1af.step_acoes,
      icon: _0x709514
    }, {
      key: "revisao",
      label: _0xbfb1af.step_revisao,
      icon: _0x393e7e
    }, {
      key: "envio",
      label: _0xbfb1af.step_envio,
      icon: _0x8a1497
    }, {
      key: "resultados",
      label: _0xbfb1af.step_resultados,
      icon: _0x34a0df
    }]
  })
}));
_0x32b9a1.subscribe((_0x500a31, _0x411673) => {
  if (_0x500a31.language !== _0x411673.language) {
    ne.getState().updateStepsLabels(_0x500a31.language);
  }
});
function la(_0x1d01a5) {
  return _0x1d01a5 != null && _0x1d01a5.trim().length > 0;
}
function A(_0x407425, _0x357a9e) {
  _0x5d14d2.setState(_0x556ab9 => {
    const _0x35b945 = new Map(_0x556ab9.executions);
    const _0x16bbed = _0x35b945.get(_0x407425);
    if (_0x16bbed) {
      _0x35b945.set(_0x407425, {
        ..._0x16bbed,
        ..._0x357a9e
      });
    }
    return {
      executions: _0x35b945
    };
  });
}
function T(_0x98bd5a) {
  return _0x5d14d2.getState().executions.get(_0x98bd5a);
}
function ua(_0x1240c9) {
  const {
    campaigns: _0x5ecf74
  } = _0x3f6aa1.getState();
  return _0x5ecf74.find(_0x13f495 => _0x13f495.id === _0x1240c9);
}
const J = _0x1260c2 => new Promise(_0x35ae4d => setTimeout(_0x35ae4d, _0x1260c2));
const da = async () => {
  try {
    const _0x4d0bcb = await _0x12329e.Conn("getMyUserId");
    if (!_0x4d0bcb) {
      throw new Error("ID do usuário não encontrado");
    }
    const _0x45e744 = await _0x12329e.Contact("get", _0x4d0bcb);
    if (!_0x45e744) {
      throw new Error("Não foi possível obter o contato do usuário");
    }
    const _0x4a9a6b = await _0x12329e.Contact("getProfilePictureUrl", _0x4d0bcb);
    return {
      id: _0x45e744.id.toString(),
      name: _0x45e744.name || _0x45e744.pushname || "Eu",
      avatarUrl: _0x4a9a6b || "",
      phone: _0x45e744.id.user
    };
  } catch (_0x5ac200) {
    console.error("Erro ao obter contato do usuário:", _0x5ac200);
    throw new Error("Falha ao carregar informações do usuário: " + (_0x5ac200 instanceof Error ? _0x5ac200.message : "Erro desconhecido"));
  }
};
async function pa({
  userID: _0x325532,
  acao: _0x3df7bd,
  assiantura: _0x3d138d,
  remetente: _0x152078,
  campaignId: _0x3a1a83,
  resumeFromActionIndex: _0x516bad = 0
}) {
  const {
    addMonitor: _0x15532b,
    deleteMonitor: _0xf81178,
    updateMonitor: _0x3594d0
  } = _0x17e096.getState();
  const _0x3012c4 = [];
  const _0x4f0e77 = _0x2ad7f2();
  _0x15532b({
    id: _0x4f0e77,
    userID: _0x325532,
    sendAction: "Actived",
    remetente: _0x152078,
    actionsTam: _0x3df7bd.length,
    actionIndice: _0x516bad,
    activeAction: _0x3df7bd[_0x516bad]
  });
  try {
    for (const [_0x3d2aa7, _0x163c40] of _0x3df7bd.entries()) {
      if (_0x3d2aa7 < _0x516bad) {
        continue;
      }
      const _0x44470f = _0x5d14d2.getState();
      if (_0x3a1a83) {
        if (!_0x44470f.executions.get(_0x3a1a83)) {
          _0xf81178(_0x4f0e77);
          return {
            status: "execution_not_found"
          };
        }
        if (_0x44470f.shouldCancelExecution(_0x3a1a83)) {
          _0xf81178(_0x4f0e77);
          return {
            status: "cancelled"
          };
        }
        if (_0x44470f.shouldPauseExecution(_0x3a1a83)) {
          A(_0x3a1a83, {
            currentActionIndex: _0x3d2aa7,
            status: _0x31e134.PAUSED,
            pausedAt: new Date(),
            shouldPause: !1,
            isAutoPause: !1,
            autoPauseEndsAt: undefined
          });
          _0xf81178(_0x4f0e77);
          return {
            status: "paused",
            actionIndex: _0x3d2aa7
          };
        }
      }
      if (!_0x3594d0(_0x4f0e77, _0x3d2aa7, _0x163c40)) {
        _0x3012c4.push(!1);
        break;
      }
      if (_0x3a1a83) {
        A(_0x3a1a83, {
          currentActionIndex: _0x3d2aa7
        });
      }
      try {
        switch (_0x163c40.type) {
          case "txt":
            _0x3012c4.push(await _0x280b08(_0x407939(_0x325532), _0x163c40.propriedades, _0x3d138d));
            break;
          case "image":
            _0x3012c4.push(await _0x313079(_0x407939(_0x325532), _0x163c40.propriedades, _0x3d138d));
            break;
          case "video":
            _0x3012c4.push(await _0x5ef15b(_0x407939(_0x325532), _0x163c40.propriedades, _0x3d138d));
            break;
          case "audio":
            _0x3012c4.push(await _0x5602a9(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "doc":
            _0x3012c4.push(await _0x323726(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "pix":
            _0x3012c4.push(await _0x55c08a(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "groupInvite":
            _0x3012c4.push(await _0x58ec30(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "contact":
            _0x3012c4.push(await _0x383150(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "linkPreview":
            _0x3012c4.push(await _0x2f3402(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "sticker":
            _0x3012c4.push(await _0x17dcef(_0x407939(_0x325532), _0x163c40.propriedades));
            break;
          case "addCRM":
            await _0x4c6a80(_0x5ed473(_0x325532), _0x163c40.propriedades.crmID, _0x163c40.propriedades.abaID);
            break;
          case "removeCRM":
            await _0x40049c(_0x5ed473(_0x325532), !1, _0x163c40.propriedades.crmID, _0x163c40.propriedades.abaID);
            break;
          case "removeAllCRM":
            await _0x40049c(_0x5ed473(_0x325532), !0);
            break;
          case "addLabel":
            await _0x1a50d8(_0x407939(_0x325532), _0x163c40.propriedades.labelID, "add");
            break;
          case "removeLabel":
            await _0x1a50d8(_0x407939(_0x325532), _0x163c40.propriedades.labelID, "remove");
            break;
          case "removeAllLabel":
            await _0x4122e8(_0x407939(_0x325532));
            break;
          case "timer":
            await _0x1497eb(_0x163c40.propriedades.segundos);
            break;
          case "composing":
            await _0x355d8a(_0x407939(_0x325532), _0x163c40.propriedades.segundos, "txt");
            break;
          case "recording":
            await _0x355d8a(_0x407939(_0x325532), _0x163c40.propriedades.segundos, "audio");
            break;
          case "arquivar":
            await _0x35a0b3(_0x407939(_0x325532));
            break;
          case "desarquivar":
            await _0x35a0b3(_0x407939(_0x325532), !0);
            break;
          case "fixarChat":
            await _0x773874(_0x407939(_0x325532), "pin");
            break;
          case "desfixarChat":
            await _0x773874(_0x407939(_0x325532), "unpin");
            break;
          case "marcarNaoLido":
            await _0x14ea57(_0x407939(_0x325532));
            break;
          case "transferir":
            await _0x3352f6(_0x407939(_0x325532), _0x163c40.propriedades);
            break;
          case "bloquear":
            await _0x25d5cd(_0x407939(_0x325532));
            break;
          case "respostaRapida":
            await _0x606240(_0x407939(_0x325532), _0x163c40.propriedades.respostaRapidaID, _0x3d138d);
            break;
          case "list":
            await _0x295e75(_0x407939(_0x325532), _0x163c40.propriedades);
            break;
          default:
            console.warn("No handler found for action type: " + _0x163c40.type);
            break;
        }
      } catch (_0x37fb7d) {
        const _0x398dc4 = _0x37fb7d instanceof Error ? _0x37fb7d.message : "Erro desconhecido na ação";
        console.error("Erro na ação " + _0x163c40.type + " (índice " + _0x3d2aa7 + ") para " + _0x325532 + ":", _0x37fb7d);
        _0xf81178(_0x4f0e77);
        return {
          status: "error",
          message: "Erro na ação \"" + _0x163c40.type + "\": " + _0x398dc4
        };
      }
    }
    _0xf81178(_0x4f0e77);
    if (_0x3012c4.length === 0 || _0x3012c4.every(_0x26a214 => _0x26a214 && _0x26a214.id)) {
      return {
        status: "success"
      };
    } else {
      return {
        status: "error",
        message: "Erro ao executar uma ou mais ações."
      };
    }
  } catch (_0x4b1950) {
    const _0x4f2840 = _0x4b1950 instanceof Error ? _0x4b1950.message : "Erro desconhecido";
    console.error("Erro geral ao executar ações para " + _0x325532 + ":", _0x4b1950);
    _0xf81178(_0x4f0e77);
    return {
      status: "error",
      message: "Erro geral: " + _0x4f2840
    };
  }
}
async function $({
  campaign: _0xe83f60,
  type: _0x2f3ac1,
  resumeFromIndex: _0x21f4aa = 0,
  isResume: _0x2f4370 = !1
}) {
  const _0x29c6b6 = _0x32b9a1.getState().language;
  const {
    actions: _0x1de4d9,
    config: _0x5ebb48,
    id: _0x46d3ad
  } = _0xe83f60;
  const {
    interval: _0x10903f,
    pause: _0x2ed331,
    signature: _0x4f5006
  } = _0x5ebb48;
  const {
    seconds: _0x241cf3
  } = _0x10903f;
  const {
    every: _0x390359,
    durationSeconds: _0x2b14bb
  } = _0x2ed331;
  const {
    disabled: _0x140bbc,
    useCustomName: _0x4d7c74,
    customName: _0x298791
  } = _0x4f5006;
  const {
    updateCampaign: _0x43b7e2
  } = _0x3f6aa1.getState();
  const _0xc0c414 = _0x5d14d2.getState();
  const _0x4a467a = T(_0x46d3ad);
  if (_0x4a467a && _0x4a467a.status === _0x31e134.RUNNING && !_0x2f4370) {
    _0x14349b({
      type: "Info",
      message: _0x29c6b6.send_campanha_ja_em_execucao
    });
    return;
  }
  if (_0x2f4370 && _0x4a467a && _0x4a467a.status === _0x31e134.RUNNING) {
    return;
  }
  const _0x3631f1 = _0x2f3ac1 === "test" ? [await da()] : _0xe83f60.selectedContacts;
  const _0x1b37cd = _0x4a467a?.currentActionIndex || 0;
  if (_0x2f4370) {
    A(_0x46d3ad, {
      status: _0x31e134.RUNNING,
      shouldPause: false,
      shouldCancel: false,
      isAutoPause: false,
      autoPauseEndsAt: undefined
    });
  } else {
    _0xc0c414.startExecution(_0x46d3ad, _0x3631f1.length, _0x1de4d9.length, _0x2f3ac1);
  }
  _0x43b7e2(_0x46d3ad, {
    status: _0x2da570.SENDING
  });
  ne.getState().setCurrentStep("envio");
  _0x14349b({
    type: "Info",
    message: _0x2f4370 ? _0x29c6b6.send_retomando_envio : _0x29c6b6.send_iniciando_envio
  });
  try {
    for (let _0x3e7635 = _0x21f4aa; _0x3e7635 < _0x3631f1.length; _0x3e7635++) {
      const _0x2142b7 = _0x3631f1[_0x3e7635];
      if (_0xc0c414.shouldCancelExecution(_0x46d3ad)) {
        A(_0x46d3ad, {
          status: _0x31e134.CANCELLED,
          completedAt: new Date(),
          shouldCancel: !1
        });
        _0x43b7e2(_0x46d3ad, {
          status: _0x2da570.DRAFT
        });
        _0x14349b({
          type: "Info",
          message: _0x29c6b6.send_campanha_cancelada
        });
        return;
      }
      const _0x1bfb1c = {
        desativar: _0x140bbc,
        personalizar: _0x4d7c74 && la(_0x298791),
        nome: _0x298791?.trim() || ""
      };
      const _0x574e46 = _0x3e7635 === _0x21f4aa ? _0x1b37cd : 0;
      switch ((await pa({
        userID: _0x2142b7.id,
        acao: _0x1de4d9,
        assiantura: _0x1bfb1c,
        remetente: "useAcaoEnvioEmMassaNew",
        campaignId: _0x46d3ad,
        resumeFromActionIndex: _0x574e46
      })).status) {
        case "cancelled":
          A(_0x46d3ad, {
            status: _0x31e134.CANCELLED,
            completedAt: new Date(),
            shouldCancel: !1
          });
          _0x43b7e2(_0x46d3ad, {
            status: _0x2da570.DRAFT
          });
          _0x14349b({
            type: "Info",
            message: _0x29c6b6.send_campanha_cancelada
          });
          return;
        case "paused":
          _0x43b7e2(_0x46d3ad, {
            status: _0x2da570.PAUSED
          });
          _0x14349b({
            type: "Info",
            message: _0x29c6b6.campanha_pausada
          });
          return;
        case "execution_not_found":
          _0x43b7e2(_0x46d3ad, {
            status: _0x2da570.DRAFT
          });
          _0x14349b({
            type: "Error",
            message: _0x29c6b6.send_erro_desconhecido || "Execução não encontrada"
          });
          return;
        case "error":
          _0xc0c414.updateProgress(_0x46d3ad, _0x3e7635 + 1, !1, _0x2142b7);
          break;
        case "success":
          _0xc0c414.updateProgress(_0x46d3ad, _0x3e7635 + 1, !0, _0x2142b7);
          break;
      }
      if (_0x3e7635 < _0x3631f1.length - 1) {
        await J(_0x241cf3 * 1000);
        if (_0xc0c414.shouldCancelExecution(_0x46d3ad)) {
          A(_0x46d3ad, {
            status: _0x31e134.CANCELLED,
            completedAt: new Date(),
            shouldCancel: !1
          });
          _0x43b7e2(_0x46d3ad, {
            status: _0x2da570.DRAFT
          });
          _0x14349b({
            type: "Info",
            message: _0x29c6b6.send_campanha_cancelada
          });
          return;
        }
        if ((_0x3e7635 + 1) % _0x390359 === 0) {
          const _0x48d0ca = new Date(Date.now() + _0x2b14bb * 1000);
          A(_0x46d3ad, {
            status: _0x31e134.PAUSED,
            isAutoPause: !0,
            autoPauseEndsAt: _0x48d0ca,
            pausedAt: new Date()
          });
          _0x14349b({
            type: "Info",
            message: _0x29c6b6.send_pausa_apos_envios + " " + _0x2b14bb + "s " + _0x29c6b6.send_apos + " " + _0x390359 + " " + _0x29c6b6.send_envios
          });
          await J(_0x2b14bb * 1000);
          if (_0xc0c414.shouldCancelExecution(_0x46d3ad)) {
            A(_0x46d3ad, {
              status: _0x31e134.CANCELLED,
              completedAt: new Date(),
              shouldCancel: !1
            });
            _0x43b7e2(_0x46d3ad, {
              status: _0x2da570.DRAFT
            });
            _0x14349b({
              type: "Info",
              message: _0x29c6b6.send_campanha_cancelada
            });
            return;
          }
          if (_0xc0c414.shouldPauseExecution(_0x46d3ad)) {
            A(_0x46d3ad, {
              isAutoPause: !1,
              autoPauseEndsAt: undefined
            });
            return;
          }
          A(_0x46d3ad, {
            status: _0x31e134.RUNNING,
            isAutoPause: !1,
            autoPauseEndsAt: undefined
          });
        }
      }
    }
    _0xc0c414.completeExecution(_0x46d3ad);
    _0x43b7e2(_0x46d3ad, {
      status: _0x2da570.SENT
    });
    _0x14349b({
      type: "Success",
      message: _0x29c6b6.send_campanha_concluida + " " + _0x3631f1.length + " " + _0x29c6b6.send_contatos_processados
    });
  } catch (_0x9a3002) {
    const _0x5785fd = _0x9a3002 instanceof Error ? _0x9a3002 : new Error(_0x29c6b6.send_erro_desconhecido);
    _0xc0c414.failExecution(_0x46d3ad, _0x5785fd.message);
    _0x43b7e2(_0x46d3ad, {
      status: _0x2da570.FAILED
    });
    _0x14349b({
      type: "Error",
      message: _0x29c6b6.send_erro_ao_enviar + " " + _0x5785fd.message
    });
  }
}
async function ma(_0x21308c) {
  const _0x18cc80 = _0x32b9a1.getState().language;
  const _0x3115a1 = ua(_0x21308c);
  const _0x38e9ef = T(_0x21308c);
  if (!_0x3115a1) {
    _0x14349b({
      type: "Error",
      message: _0x18cc80.resume_campanha_nao_encontrada
    });
    return;
  }
  if (!_0x38e9ef) {
    _0x14349b({
      type: "Error",
      message: _0x18cc80.resume_estado_execucao_nao_encontrado
    });
    return;
  }
  if (_0x38e9ef.status !== _0x31e134.PAUSED) {
    _0x14349b({
      type: "Info",
      message: _0x18cc80.resume_campanha_nao_pausada
    });
    return;
  }
  await $({
    campaign: _0x3115a1,
    type: "full",
    resumeFromIndex: _0x38e9ef.currentContactIndex,
    isResume: !0
  });
}
function ga(_0x3f3ee6) {
  const _0x293aa3 = _0x32b9a1.getState().language;
  const _0x21880b = T(_0x3f3ee6);
  if (!_0x21880b) {
    _0x14349b({
      type: "Error",
      message: _0x293aa3.pause_campanha_nao_encontrada
    });
    return;
  }
  if (_0x21880b.status !== _0x31e134.RUNNING) {
    _0x14349b({
      type: "Info",
      message: _0x293aa3.pause_campanha_nao_em_execucao
    });
    return;
  }
  if (_0x21880b.shouldPause) {
    _0x14349b({
      type: "Info",
      message: _0x293aa3.pause_pausa_ja_solicitada
    });
    return;
  }
  _0x5d14d2.getState().requestPause(_0x3f3ee6);
  _0x14349b({
    type: "Info",
    message: _0x293aa3.pause_pausando_apos_acao_atual
  });
}
function K(_0x41ba98, _0x3c806c = !1) {
  const _0x411627 = _0x32b9a1.getState().language;
  const _0xd75205 = T(_0x41ba98);
  if (_0x3c806c) {
    _0x5d14d2.getState().forceCancel(_0x41ba98);
    _0x14349b({
      type: "Info",
      message: _0x411627.sua_campanha_foi_cancelada
    });
    return;
  }
  if (!_0xd75205) {
    _0x14349b({
      type: "Error",
      message: _0x411627.cancel_campanha_nao_encontrada
    });
    return;
  }
  if (_0xd75205.status === _0x31e134.COMPLETED || _0xd75205.status === _0x31e134.CANCELLED) {
    _0x14349b({
      type: "Info",
      message: _0x411627.cancel_campanha_ja_finalizada
    });
    return;
  }
  if (_0xd75205.shouldCancel) {
    _0x14349b({
      type: "Info",
      message: _0x411627.cancel_cancelamento_ja_solicitado
    });
    return;
  }
  _0x5d14d2.getState().requestCancel(_0x41ba98);
  _0x14349b({
    type: "Info",
    message: _0x411627.cancel_cancelando_apos_acao_atual
  });
}
const fa = _0x30d8e0()(_0x409ae4(_0x8f3ff2 => ({
  reports: [],
  addReport: _0x5f00ab => _0x8f3ff2(_0x401f0e => ({
    reports: [..._0x401f0e.reports, _0x5f00ab]
  })),
  removeReport: _0xf1e927 => _0x8f3ff2(_0x3582cf => ({
    reports: _0x3582cf.reports.filter(_0x4d6e47 => _0x4d6e47.campaignId !== _0xf1e927)
  }))
}), {
  name: "useReportCampaign-store",
  storage: _0x5092bb(() => _0x49e3e7("ReportCampaignDB", "useReportCampaignStore"))
}));
function ee(_0x39422c) {
  const _0x14ce49 = {
    campaignId: _0x39422c.campaignId,
    startedAt: _0x39422c.startedAt,
    totalActions: _0x39422c.totalActions,
    totalContacts: _0x39422c.totalContacts,
    successContacts: _0x39422c.successContacts,
    failedContacts: _0x39422c.failedContacts,
    completedAt: _0x39422c.completedAt,
    totalExecutions: _0x39422c.totalContacts * _0x39422c.totalActions
  };
  fa.getState().addReport(_0x14ce49);
}
function xa(_0x4bd40c) {
  const [_0x20893c, _0x5be727] = _0x28487f.useState(!1);
  const _0x1d6146 = _0x32b9a1(_0x1539ed => _0x1539ed.language);
  const _0x2b4bb2 = _0x3f6aa1(_0x5d5f05 => _0x5d5f05.campaigns.find(_0x26b408 => _0x26b408.id === _0x4bd40c));
  const {
    updateCampaign: _0x1706a1
  } = _0x3f6aa1.getState();
  const _0x410ac9 = _0x5d14d2(_0x25486e => _0x25486e.executions.get(_0x4bd40c));
  const _0xa6808b = !_0x336cc5(_0x140cd1 => _0x140cd1.session).is_premium;
  const _0x463a72 = !_0x410ac9 || _0x410ac9.status === _0x31e134.COMPLETED || _0x410ac9.status === _0x31e134.CANCELLED || _0x410ac9.status === _0x31e134.FAILED;
  const {
    clearExecution: _0x48bff9
  } = _0x5d14d2.getState();
  return {
    campaign: _0x2b4bb2,
    execution: _0x410ac9,
    isLoading: _0x20893c,
    actions: {
      sendTest: async () => {
        if (_0x2b4bb2) {
          _0x5be727(!0);
          try {
            if (!_0x463a72) {
              _0x14349b({
                type: "Error",
                message: _0x1d6146.erro_iniciar_campanha
              });
              throw new Error("Cannot start campaign: Campaign is already running or paused.");
            }
            _0x48bff9(_0x2b4bb2.id);
            const _0x192529 = _0x3f6aa1.getState().campaigns.find(_0x205194 => _0x205194.id === _0x2b4bb2.id);
            await $({
              campaign: _0x192529,
              type: "test"
            });
            ee(_0x5d14d2.getState().executions.get(_0x192529.id));
          } finally {
            _0x5be727(!1);
          }
        }
      },
      sendFull: async () => {
        if (_0x2b4bb2) {
          _0x5be727(!0);
          try {
            if (!_0x463a72) {
              _0x14349b({
                type: "Error",
                message: _0x1d6146.erro_iniciar_campanha
              });
              throw new Error("Cannot start campaign: Campaign is already running or paused.");
            }
            if (_0xa6808b && _0x2b4bb2.selectedContacts.length > 5) {
              const _0x3903f6 = _0x2b4bb2.selectedContacts.slice(0, 5);
              _0x1706a1(_0x2b4bb2.id, {
                selectedContacts: _0x3903f6
              });
            }
            _0x48bff9(_0x2b4bb2.id);
            const _0xe72cf8 = _0x3f6aa1.getState().campaigns.find(_0x51f7b4 => _0x51f7b4.id === _0x2b4bb2.id);
            await $({
              campaign: _0xe72cf8,
              type: "full"
            });
            ee(_0x5d14d2.getState().executions.get(_0xe72cf8.id));
          } finally {
            _0x5be727(!1);
          }
        }
      },
      pause: () => {
        ga(_0x4bd40c);
      },
      resume: async () => {
        _0x5be727(!0);
        try {
          await ma(_0x4bd40c);
        } finally {
          _0x5be727(!1);
        }
      },
      cancel: () => {
        K(_0x4bd40c);
      },
      forceCancel: () => {
        K(_0x4bd40c, !0);
        _0x1706a1(_0x4bd40c, {
          status: _0x2da570.DRAFT
        });
      }
    },
    canStart: _0x463a72,
    isRunning: _0x410ac9?.status === _0x31e134.RUNNING,
    isPaused: _0x410ac9?.status === _0x31e134.PAUSED,
    isCompleted: _0x410ac9?.status === _0x31e134.COMPLETED,
    isCancelled: _0x410ac9?.status === _0x31e134.CANCELLED
  };
}
const _a = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7792.js")), []));
function ha() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(_a, {})
  });
}
const Ea = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7793.js")).then(_0x372787 => _0x372787.i), []));
function Ca() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(Ea, {})
  });
}
const ba = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7794.js")), []));
function va() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(ba, {})
  });
}
const ya = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7795.js")), []));
function ja() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(ya, {})
  });
}
const Sa = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7796.js")), []));
function wa() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(Sa, {})
  });
}
const Aa = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7797.js")), []));
function La() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(Aa, {})
  });
}
const ka = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7798.js")).then(_0x43f6ab => _0x43f6ab.i), []));
function Pa() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(ka, {})
  });
}
const za = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f7799.js")), []));
function Na() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(za, {})
  });
}
const Ma = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77100.js")), []));
function Ra() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(Ma, {})
  });
}
const Fa = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77101.js")), []));
function Da() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(Fa, {})
  });
}
function Ta(_0x2e6ae3) {
  return _0x22af40({
    attr: {
      version: "1.1",
      x: "0px",
      y: "0px",
      viewBox: "0 0 48 48",
      enableBackground: "new 0 0 48 48"
    },
    child: [{
      tag: "path",
      attr: {
        fill: "#FFC107",
        d: "M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n\tc0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n\tc0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"
      },
      child: []
    }, {
      tag: "path",
      attr: {
        fill: "#FF3D00",
        d: "M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n\tC34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"
      },
      child: []
    }, {
      tag: "path",
      attr: {
        fill: "#4CAF50",
        d: "M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n\tc-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"
      },
      child: []
    }, {
      tag: "path",
      attr: {
        fill: "#1976D2",
        d: "M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n\tc0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"
      },
      child: []
    }]
  })(_0x2e6ae3);
}
function Ia() {
  return _0x5ae9a7.jsx("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    fill: "currentColor",
    width: "20",
    height: "20",
    viewBox: "0 0 24 24",
    style: {
      display: "inline-block"
    },
    children: _0x5ae9a7.jsx("path", {
      fill: "currentColor",
      d: "M2.001 9.352c0 1.873.849 2.943 1.683 3.943.031 1 .085 1.668-.333 3.183 1.748-.558 2.038-.778 3.008-1.374 1 .244 1.474.381 2.611.491-.094.708-.081 1.275.055 2.023-.752-.06-1.528-.178-2.33-.374-1.397.857-4.481 1.725-6.649 2.115.811-1.595 1.708-3.785 1.661-5.312-1.09-1.305-1.705-2.984-1.705-4.695-.001-4.826 4.718-8.352 9.999-8.352 5.237 0 9.977 3.484 9.998 8.318-.644-.175-1.322-.277-2.021-.314-.229-3.34-3.713-6.004-7.977-6.004-4.411 0-8 2.85-8 6.352zm20.883 10.169c-.029 1.001.558 2.435 1.088 3.479-1.419-.258-3.438-.824-4.352-1.385-.772.188-1.514.274-2.213.274-3.865 0-6.498-2.643-6.498-5.442 0-3.174 3.11-5.467 6.546-5.467 3.457 0 6.546 2.309 6.546 5.467 0 1.12-.403 2.221-1.117 3.074zm-7.563-3.021c0-.453-.368-.82-.82-.82s-.82.367-.82.82.368.82.82.82.82-.367.82-.82zm3 0c0-.453-.368-.82-.82-.82s-.82.367-.82.82.368.82.82.82.82-.367.82-.82zm3 0c0-.453-.368-.82-.82-.82s-.82.367-.82.82.368.82.82.82.82-.367.82-.82z"
    })
  });
}
function Oa() {
  const {
    language: _0x3c5280
  } = _0x32b9a1();
  const {
    statusEnvio: _0x360883,
    chats: _0x2939b3
  } = _0x35f842();
  const _0x30e7cf = _0x3f6aa1(_0x160fdd => _0x160fdd.campaigns).find(_0x193227 => _0x193227.status === _0x2da570.SENDING);
  const {
    isRunning: _0x1a4251,
    execution: _0x12b8aa,
    isPaused: _0xff9bea
  } = xa(_0x30e7cf?.id);
  const {
    open: _0x5430df
  } = _0x13e074.getState();
  const {
    open: _0x4bac18
  } = _0x2f9dc5.getState();
  const {
    open: _0xcdeb77
  } = _0x4118cb.getState();
  const _0x3f1f00 = _0x336cc5(_0x496931 => _0x496931.session);
  const {
    setMenuContent: _0x243f86
  } = _0x3ab59e.getState();
  const {
    iawascript: _0x34ab6e,
    referral: _0x371838
  } = _0x247b40(_0x5cd8aa(_0x360131 => ({
    iawascript: _0x360131.getUrl("principais", "iawascript"),
    referral: _0x360131.getUrl("principais", "referral")
  })));
  const _0xbbae99 = _0x1a4251 || _0xff9bea || _0x360883.estado === "Atived" || _0x360883.estado === "Paused";
  const _0x51a6cf = (_0x12b8aa?.totalContacts ?? 0) - (_0x12b8aa?.currentContactIndex ?? 0);
  const _0x564599 = _0x5ae9a7.jsxs(_0x5ae9a7.Fragment, {
    children: [_0xbbae99 && _0x5ae9a7.jsx("div", {
      className: "relative",
      children: _0x5ae9a7.jsx("div", {
        className: "absolute -top-[10px] left-[20px]",
        children: _0x5ae9a7.jsx("span", {
          className: "abaTam border border-[#ffffff52] border-solid rounded-full p-1 shadow-lg text-[12px] bg-[var(--primaria)]",
          children: _0x5ae9a7.jsx("em", {
            className: "text-[#ffffffd4] font-bold",
            children: _0x2939b3?.length || _0x51a6cf
          })
        })
      })
    }), _0x5ae9a7.jsx("span", {
      id: "icoCampaign",
      children: _0x5ae9a7.jsx(_0x5780a2, {
        size: 20,
        className: _0xaa2ea9((_0x360883.estado === "Atived" || _0x1a4251) && "text-[var(--wds-teal-500)]", (_0x360883.estado === "Paused" || _0xff9bea) && "text-[goldenrod]", _0x1a4251 && "text-[var(--wds-teal-500)]")
      })
    })]
  });
  return [{
    id: "crm",
    name: "CRM",
    icon: _0x5ae9a7.jsx(_0x70b320, {
      size: 22
    }),
    function: () => chrome.runtime.sendMessage({
      message: "CRM"
    })
  }, {
    id: "quick_replies",
    name: _0x3c5280.quickReply,
    icon: _0x5ae9a7.jsx(_0x3523aa, {
      size: 20
    }),
    function: () => _0x243f86("children", "respostasRapidas")
  }, {
    id: "env_massa",
    name: _0x3c5280.envioMassa,
    icon: _0x564599,
    function: () => _0xcdeb77(_0x5ae9a7.jsx(Ca, {}))
  }, {
    id: "ia",
    name: "Agente IA",
    icon: _0x5ae9a7.jsx(_0xc44cbd, {
      color: "var(--ico-color)"
    }),
    disabled: !_0x34ab6e.active,
    function: () => window.open("" + _0x34ab6e.link + (_0x3f1f00.is_premium ? "/?clientePremium" : ""), "_blank")
  }, {
    id: "calendar",
    name: _0x3c5280.centralDeAgendamentos,
    icon: _0x5ae9a7.jsx(_0x426f72, {
      size: 20
    }),
    function: () => _0xcdeb77(_0x5ae9a7.jsx(ha, {}))
  }, {
    id: "flow",
    name: _0x3c5280.fluxo,
    icon: _0x5ae9a7.jsx(_0x499961, {
      size: 20
    }),
    function: () => chrome.runtime.sendMessage({
      message: "FLOW"
    })
  }, {
    id: "funnil_crm",
    name: _0x3c5280.funilCRM,
    icon: _0x5ae9a7.jsx(_0x27450e, {
      size: 20
    }),
    function: () => chrome.runtime.sendMessage({
      message: "funnil"
    })
  }, {
    id: "att_atendimento",
    name: _0x3c5280.autoAtendimento,
    icon: _0x5ae9a7.jsx(_0x47823a, {
      size: 22
    }),
    function: () => _0x5430df(_0x5ae9a7.jsx(va, {}))
  }, {
    id: "follow_up",
    name: _0x3c5280.followUp,
    icon: _0x5ae9a7.jsx(_0x8bfabe, {
      size: 22
    }),
    function: () => _0x5430df(_0x5ae9a7.jsx(ja, {}))
  }, {
    id: "status",
    name: _0x3c5280.status,
    icon: _0x5ae9a7.jsx(_0x448a07, {
      size: 22
    }),
    function: () => _0x5430df(_0x5ae9a7.jsx(Pa, {}))
  },
//   {
//     id: "api",
//     name: "API",
//     icon: _0x5ae9a7.jsx(_0x28068e, {
//       size: 22
//     }),
//     function: () => _0x5430df(_0x5ae9a7.jsx(Ra, {}), !1)
//   }, {
//     id: "webhook",
//     name: "WebHook",
//     icon: _0x5ae9a7.jsx(_0x17e2cb, {
//       size: 20
//     }),
//     function: () => _0x5430df(_0x5ae9a7.jsx(Na, {}))
//   },
  {
    id: "links",
    name: _0x3c5280.links,
    icon: _0x5ae9a7.jsx(_0x5659ff, {
      size: 20
    }),
    function: () => _0x5430df(_0x5ae9a7.jsx(La, {}))
  }, {
    id: "start_chat",
    name: _0x3c5280.start_chat,
    icon: _0x5ae9a7.jsx(Ia, {}),
    function: () => _0x5430df(_0x5ae9a7.jsx(wa, {}))
  }, {
    id: "afiliate_link",
    name: _0x3c5280.indiqueEGanhe,
    icon: _0x5ae9a7.jsx(_0x53a3e6, {
      size: 20
    }),
    disabled: !_0x371838.active,
    function: () => window.open(_0x371838.link, "_blank")
  }, {
    id: "google_funcs",
    name: _0x3c5280.att_google,
    icon: _0x5ae9a7.jsx(Ta, {
      size: 20
    }),
    function: _0x5351c6 => _0x4bac18(_0x5ae9a7.jsx(Da, {}), {
      placement: "right"
    }, _0x5351c6.target)
  }];
}
function Ua() {
  const {
    activeMenu: _0x869ad0
  } = _0x527b75();
  const {
    config: _0x2c892f
  } = _0x247b40(_0x5cd8aa(_0x173479 => ({
    config: _0x173479.config
  })));
  const {
    openWithGetEvents: _0x291ff9
  } = _0x2e0041(_0x5cd8aa(_0x4f475a => ({
    openWithGetEvents: _0x4f475a.openWithGetEvents
  })));
  return _0x5ae9a7.jsxs("div", {
    className: "flex flex-col items-center gap-2",
    children: [_0x5ae9a7.jsx("div", {
      className: "lg:tooltip  lg:tooltip-right mb-2",
      "data-tip": _0x2c892f.name,
      children: _0x5ae9a7.jsx("div", {
        className: "pulse cursor-pointer rounded-full w-9 h-9 shadow-lg",
        children: _0x5ae9a7.jsx("span", {
          children: _0x5ae9a7.jsx("img", {
            src: chrome.runtime.getURL("label/icons/plugin/icon.png"),
            className: "w-10 rounded-full select-none",
            draggable: !1
          })
        })
      })
    }), _0x5ae9a7.jsx("div", {
      className: "flex flex-col items-center gap-2 w-full overflow-y-auto overflow-x-hidden scroll_bar",
      style: {
        height: "calc(100vh - 350px)"
      },
      children: Oa().map(_0x849a95 => !_0x849a95.disabled && _0x869ad0[_0x849a95.id] !== !1 && _0x5ae9a7.jsx("div", {
        onClick: _0x56b212 => {
          _0x849a95.function(_0x56b212);
          _0xc52947(_0x849a95.id);
        },
        ..._0x291ff9(_0x849a95.name, {
          placement: "right"
        }),
        children: _0x5ae9a7.jsx("div", {
          className: "menu-item pulse cursor-pointer rounded-[10px] bg-[var(--ico-border-color)] p-2 text-[var(--ico-color)]",
          children: _0x849a95.icon
        })
      }, _0x849a95.id))
    })]
  });
}
const $a = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77102.js")), []));
function Va() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx($a, {})
  });
}
const Ga = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77103.js")), []));
function Wa() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(Ga, {})
  });
}
const qa = _0x28487f.lazy(() => __vitePreload(() => import(chrome.runtime.getURL("content/assets/js/v_7_4_3_25_2ff64573-14a6-4762-a634-9cd350f14f77104.js")), []));
function Ba() {
  return _0x5ae9a7.jsx(_0x28487f.Suspense, {
    fallback: _0x5ae9a7.jsx(_0x5ae9a7.Fragment, {}),
    children: _0x5ae9a7.jsx(qa, {})
  });
}
const Ha = () => {
  const {
    user: _0x58760c,
    session: _0x2697e2
  } = _0x336cc5.getState();
  const {
    config: _0x58a480
  } = _0x247b40.getState();
  const _0x3e453c = _0x2697e2.is_auth ? "https://user.xxyz.be/login.php" : "https://user.xxyz.be/login.php";
  window.open(_0x3e453c, "_blank");
};
function Ya() {
  const _0x21114d = _0x32b9a1(_0x22e198 => _0x22e198.language);
  const _0x26954c = _0x13e074(_0x2da559 => _0x2da559.openRendertype);
  const _0x5f2f7a = _0x1a5016(_0x2bc4ee => _0x2bc4ee.open);
  const _0x2d49ef = _0x54679c(_0x161125 => _0x161125.notifyNotVisualized);
  const {
    youtube: _0x2ed4a5
  } = _0x247b40(_0x5cd8aa(_0x3144f7 => ({
    youtube: _0x3144f7.getUrl("redes_sociais", "youtube")
  })));
  const {
    session: _0x321bd3,
    user: _0x5469bc,
    logout: _0x2af6ca
  } = _0x336cc5(_0x5cd8aa(_0x1005ea => ({
    session: _0x1005ea.session,
    user: _0x1005ea.user,
    logout: _0x1005ea.logout
  })));
  const {
    openWithGetEvents: _0x29a071
  } = _0x2e0041(_0x5cd8aa(_0x3da71e => ({
    openWithGetEvents: _0x3da71e.openWithGetEvents
  })));
  const _0x3aa249 = () => {
    _0x4dd3ae({
      content: _0x5ae9a7.jsxs(_0x5ae9a7.Fragment, {
        children: [_0x21114d.gostariaDeRemoverLogin, "?", _0x5ae9a7.jsx("br", {}), " ", _0x21114d.usuarioLogado, _0x5ae9a7.jsx("strong", {
          children: _0x5469bc.email
        })]
      }),
      confirmText: _0x21114d.confirm,
      submit: () => {
        _0x2af6ca();
      }
    });
  };
  const _0x32bf5d = _0x5ae9a7.jsxs("div", {
    children: [_0x2d49ef > 0 && _0x5ae9a7.jsx("div", {
      className: "relative",
      children: _0x5ae9a7.jsx("div", {
        className: "absolute -top-3 -right-4",
        children: _0x5ae9a7.jsx("span", {
          className: "abaTam border border-[#ffffff52] border-solid rounded-full p-1 shadow-lg text-[12px] bg-[var(--primaria)] ",
          children: _0x5ae9a7.jsx("em", {
            className: "text-[#ffffffd4] font-bold",
            children: _0x2d49ef
          })
        })
      })
    }), _0x5ae9a7.jsx(_0x4d9f8f, {
      size: 20
    })]
  });
  const _0x34146b = [{
    id: 1,
    name: _0x321bd3.is_auth ? _0x5469bc.email : _0x21114d.logar,
    icon: _0x5ae9a7.jsx(_0x1f105d, {
      className: _0x321bd3.is_auth ? "text-[var(--wds-teal-500)]" : "text-red-500 user-icon-circle-man",
      size: 20
    }),
    function: () => _0x321bd3.is_auth ? _0x3aa249() : _0x26954c("login")
  }, {
    id: 2,
    name: _0x21114d.configAgendamento_title,
    icon: _0x5ae9a7.jsx(_0x554432, {
      size: 20
    }),
    function: () => _0x5f2f7a(_0x5ae9a7.jsx(Va, {}))
  }, {
    id: 3,
    name: _0x21114d.notifications,
    icon: _0x32bf5d,
    function: () => _0x5f2f7a(_0x5ae9a7.jsx(Ba, {}))
  }, {
    id: 4,
    name: _0x21114d.func_menu,
    icon: _0x5ae9a7.jsx(_0x202ade, {
      size: 20
    }),
    function: () => _0x5f2f7a(_0x5ae9a7.jsx(Wa, {}))
  },
  // {
  //   id: 5,
  //   name: "Painel Clientes",
  //   icon: _0x5ae9a7.jsx(_0x2de06e, {
  //     size: 20
  //   }),
  //   function: () => Ha()
  // }
  ];
  return _0x5ae9a7.jsxs("div", {
    className: "flex flex-col items-center gap-2 mb-4",
    children: [_0x2ed4a5.active && _0x5ae9a7.jsx("div", {
      onClick: () => window.open(_0x2ed4a5.link, "_blank"),
      className: "lg:tooltip lg:tooltip-right cursor-pointer",
      "data-tip": _0x21114d.tutoriais,
      children: _0x5ae9a7.jsx("span", {
        className: "pulse",
        children: _0x5ae9a7.jsx(_0x1d2301, {
          className: "text-[red]",
          size: 26
        })
      })
    }), _0x34146b.reverse().map(_0x2dd97c => _0x5ae9a7.jsx("div", {
      onClick: _0x2dd97c.function,
      ..._0x29a071(_0x2dd97c.name, {
        placement: "right"
      }),
      children: _0x5ae9a7.jsx("div", {
        className: "menu-item pulse cursor-pointer rounded-[10px]  bg-[var(--ico-border-color)] p-2 text-[var(--ico-color)]",
        children: _0x2dd97c.icon
      })
    }, _0x2dd97c.id)), _0x5ae9a7.jsx("div", {
      className: "badge badge-sm badge-ghost text-xs text-base-content/60 font-semibold font-rounded",
      children: _0xccfecc.version
    })]
  });
}
function Qa() {
  return _0x5ae9a7.jsx("section", {
    "data-id": "Menu",
    children: _0x5ae9a7.jsx("div", {
      className: "w-[60px] h-[100vh] absolute z-[112] bg-[var(--menu-color)]",
      children: _0x5ae9a7.jsxs("div", {
        className: "animate__animated animate__fadeInLeft h-full my-2 flex flex-col justify-between gap-2",
        children: [_0x5ae9a7.jsx(Ua, {}), _0x5ae9a7.jsx(Ya, {})]
      })
    })
  });
}
const xt = Object.freeze(Object.defineProperty({
  "__proto__": null,
  default: Qa
}, Symbol.toStringTag, {
  value: "Module"
}));
export { va as A, Ca as E, ja as F, Oa as R, Pa as S, xa as a, fa as b, da as g, xt as i, Ha as o, ne as u };