{"propias":["src/client/components/pages/authenticated-pages/index-page/index-page.scss","src/client/components/pages/authenticated-pages/index-page/index-page.tsx","src/client/types/auth.ts"],"entrada":"src/client/components/pages/authenticated-pages/index-page/index-page.tsx","alcance":".admmpreviaviva__lienzo","modulos":[{"ruta":"src/client/components/layouts/main-layout/main-layout.scss","tipo":"css","codigo":"@keyframes showElementBelow {\n  0% {\n    z-index: 99;\n    opacity: 0;\n  }\n  100% {\n    z-index: 99;\n    opacity: 1;\n  }\n}\n@keyframes hideElementBelow {\n  0% {\n    z-index: 1;\n    opacity: 1;\n  }\n  100% {\n    z-index: -1;\n    opacity: 0;\n  }\n}\n:root {\n  --sm: 576px;\n  --md: 768px;\n  --lg: 992px;\n  --xl: 1200px;\n}\n\n.mainlayout aside {\n  position: fixed;\n  height: calc(100vh - 68px - 60px);\n  background: #ffffff 0% 0% no-repeat padding-box;\n  background: #ffffff;\n  overflow: hidden;\n  opacity: 1;\n  width: 100%;\n  padding: 0;\n  transition: 400ms width;\n  animation: hideElementBelow 0.2s forwards;\n}\n.mainlayout aside li > * {\n  min-width: 280px;\n}\n@media (max-width: 768px) {\n  .mainlayout aside {\n    position: fixed;\n    top: 0;\n    left: 0;\n    width: 93%;\n    transform: translateX(-100%);\n    z-index: -1;\n    transition: transform 0.3s ease-in-out;\n  }\n  .mainlayout aside .sidebaritemlist__item--normal,\n  .mainlayout aside .sidebaritemlist__item--selected {\n    border-left: none;\n  }\n  .mainlayout aside .reusablesidebar__logoutbutton {\n    justify-content: start;\n    padding: 0px 40px;\n  }\n  .mainlayout aside .reusablesidebar__logoutbutton .linkwithicon i {\n    margin-right: 10px !important;\n  }\n  .mainlayout aside ul {\n    padding-top: 0px;\n  }\n}\n@media (min-width: 769px) {\n  .mainlayout aside {\n    position: absolute;\n    top: 0;\n    left: 0;\n    z-index: 1000 !important;\n    width: 56px;\n    transform: none;\n    animation: showElementBelow 0.2s forwards;\n  }\n}\n.mainlayout__sidebar--minimode {\n  transition: 400ms width;\n}\n@media (min-width: 769px) {\n  .mainlayout__sidebar--minimode aside {\n    width: 56px;\n  }\n  .mainlayout__sidebar--minimode aside:hover {\n    width: 280px;\n    transition: 400ms width;\n  }\n}\n.mainlayout__sidebar--show aside {\n  transform: translateX(0);\n}\n@media (max-width: 768px) {\n  .mainlayout__sidebar--show aside {\n    position: fixed;\n    box-shadow: none;\n    top: 0;\n    z-index: 1000 !important;\n    width: 93%;\n    height: 100%;\n    animation: none;\n    opacity: 1;\n  }\n}\n\n@keyframes fadeIn {\n  from {\n    opacity: 0;\n  }\n  to {\n    opacity: 1;\n  }\n}\n.mainlayout {\n  display: flex;\n  flex-direction: column;\n  position: relative;\n  height: 100vh;\n  height: 100dvh;\n  animation: fadeIn 300ms ease-in-out;\n}\n.mainlayout > .loadingmainlayout {\n  z-index: 2;\n  height: 100vh;\n  height: 100dvh;\n}\n.mainlayout__lowercomponents {\n  flex-direction: column;\n}\n.mainlayout__lowercomponents .loadingmainlayout {\n  height: calc(100vh - 68px - 60px);\n  height: calc(100dvh - 68px - 60px);\n  background-color: #fcfcfc;\n}\n@media (max-width: 576px) {\n  .mainlayout__lowercomponents .loadingmainlayout {\n    height: calc(100vh - 56px - 0px - 110px);\n    height: calc(100dvh - 56px - 0px - 110px);\n  }\n}\n.mainlayout main {\n  height: calc(100vh - 68px - 60px);\n  height: calc(100dvh - 68px - 60px);\n  max-height: calc(100vh - 68px - 60px);\n  max-height: calc(100dvh - 68px - 60px);\n  overflow-y: auto;\n  overflow-x: hidden;\n  animation: fadeIn 300ms ease-in-out;\n}\n@media (max-width: 576px) {\n  .mainlayout main {\n    height: calc(100vh - 56px - 0px - 110px);\n    height: calc(100dvh - 56px - 0px - 110px);\n  }\n}\n.mainlayout--newfooter main {\n  height: calc(100vh - 68px);\n  height: calc(100dvh - 68px);\n  max-height: calc(100vh - 68px);\n  max-height: calc(100dvh - 68px);\n}\n.mainlayout .mainlayoutmodalerror {\n  height: calc(100% - 60px);\n}\n@media (max-width: 576px) {\n  .mainlayout .mainlayoutmodalerror {\n    height: 100%;\n  }\n}\n.mainlayout__sidebar--show .headermobile {\n  z-index: 1;\n}\n.mainlayout__sidebar--show .upperheader {\n  position: relative;\n  z-index: 2;\n}\n.mainlayout__contentcomponents {\n  position: relative;\n  width: 100vw;\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  z-index: 0;\n  background-color: #fcfcfc;\n}\n@media (max-height: 599px) and (min-width: 577px) {\n  .mainlayout__contentcomponents {\n    z-index: 2;\n  }\n}\n@media (min-width: 769px) {\n  .mainlayout__contentcomponents {\n    width: calc(100vw - 56px);\n    margin-left: 56px;\n  }\n}\n.mainlayout .reusablefooter {\n  height: 110px;\n  border: none;\n  border-top: 1px solid #e6e6e6;\n}\n@media (min-width: 577px) {\n  .mainlayout .reusablefooter {\n    height: 60px;\n  }\n}\n.mainlayout__lowercomponents {\n  display: flex;\n  position: relative;\n  flex: 1;\n}\n.mainlayout__lowercomponents .lowercomponent__mirrorComponent {\n  width: 56px;\n}\n@media (max-width: 768px) {\n  .mainlayout__lowercomponents .lowercomponent__mirrorComponent {\n    display: none;\n  }\n}\n.mainlayout__overlay {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100vw;\n  height: 100vh;\n  background: rgba(0, 0, 0, 0.5);\n  z-index: 90;\n}\n.mainlayout__onlycontentcontainer {\n  height: 100%;\n  width: 100%;\n}\n.mainlayout__onlycontentcontainer > * {\n  height: 100% !important;\n}","imports":[]},{"ruta":"src/client/components/pages/authenticated-pages/index-page/index-page.tsx","tipo":"js","codigo":"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_page_exports = {};\n__export(index_page_exports, {\n  default: () => IndexPage\n});\nmodule.exports = __toCommonJS(index_page_exports);\nvar import_jsx_dev_runtime = require(\"previa-jsx/jsx-dev-runtime\");\nvar import_index_page = require(\"./index-page.scss\");\nvar import_auth_store = require(\"@client/config/auth/store/auth-store\");\nvar import_use_app_menu = require(\"@client/utils/menu/use-app-menu\");\nvar import_react = require(\"react\");\nvar import_react_i18next = require(\"react-i18next\");\nvar import_react_router_dom = require(\"react-router-dom\");\nvar import_zustand = require(\"zustand\");\nfunction IndexPage() {\n  const { authData, setAuthenticating } = (0, import_zustand.useStore)(import_auth_store.storeAuth);\n  const { lang, country } = (0, import_react_router_dom.useParams)();\n  const { i18n } = (0, import_react_i18next.useTranslation)();\n  const { loggedIn } = (0, import_auth_store.storeAuth)();\n  const { paths } = (0, import_use_app_menu.useAppMenu)();\n  console.log(paths);\n  const iframe = (0, import_react.useRef)();\n  const navigate = (0, import_react_router_dom.useNavigate)();\n  (0, import_react.useEffect)(() => {\n  }, [navigate]);\n  (0, import_react.useEffect)(() => {\n    setTimeout(() => setAuthenticating(false), 100);\n  }, [setAuthenticating]);\n  (0, import_react.useEffect)(() => {\n    const alRecibir = (e) => {\n      var _a;\n      console.log(\"evento\", e.data);\n      if (e.data.tipo === \"scroll\" || e.data.tipo === \"feedback\") {\n        console.log(document.querySelector('[data-testid=\"survey-root\"]  button'));\n        const isHidden = ((_a = document.querySelector('[data-testid=\"survey-root\"] [aria-hidden]')) == null ? void 0 : _a.ariaHidden) === \"true\";\n        if (isHidden) document.querySelector('[data-testid=\"survey-root\"]  button').click();\n        return;\n      }\n      if (!e.data || e.data.tipo !== \"navegar\") return;\n      let finalRuta = \"\";\n      const { ruta, idioma, subsidiaria } = e.data;\n      finalRuta = ruta;\n      if (ruta == \"/store\" && !paths.includes(\"store\")) {\n        window.location.href = `https://storedvlp.intcomex.com/${i18n.language.toUpperCase()}-${country}/${loggedIn ? \"AccountAjax/SignIn\" : \"Home\"}`;\n      }\n      if ([\"/selfservice\"].includes(ruta)) finalRuta = \"/selfservice/edit-contact-form-admin\";\n      if ([\"/registration\", \"/leads\"].includes(ruta)) finalRuta = \"/leads\";\n      navigate(`/${lang != null ? lang : i18n.language}/${country}${finalRuta}`);\n    };\n    window.addEventListener(\"message\", alRecibir);\n    return () => window.removeEventListener(\"message\", alRecibir);\n  }, [paths, lang, country, i18n.language, navigate]);\n  const { t } = (0, import_react_i18next.useTranslation)();\n  const className = \"indexpageauthenticated\";\n  return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(\n    \"iframe\",\n    {\n      ref: iframe,\n      className,\n      src: `https://rgintcomexftprepodata.blob.core.windows.net/portales/PortalServicios/home-temp-${i18n.language}.html?auth=${loggedIn ? \"authenticated\" : \"unauthenticated\"}`,\n      title: \"Banner Portal\",\n      frameBorder: \"0\",\n      allowFullScreen: true\n    },\n    void 0,\n    false,\n    {\n      fileName: \"src/client/components/pages/authenticated-pages/index-page/index-page.tsx\",\n      lineNumber: 78,\n      columnNumber: 9\n    },\n    this\n  );\n}\n","imports":[{"especificador":"./index-page.scss","ruta":"src/client/components/pages/authenticated-pages/index-page/index-page.scss","nombres":[]},{"especificador":"@client/config/auth/store/auth-store","ruta":"src/client/config/auth/store/auth-store.ts","nombres":["storeAuth"]},{"especificador":"@client/utils/menu/use-app-menu","nombres":["useAppMenu"]},{"especificador":"react","nombres":["useEffect","useRef"]},{"especificador":"react-i18next","nombres":["useTranslation"]},{"especificador":"react-router-dom","nombres":["useNavigate","useParams"]},{"especificador":"zustand","nombres":["useStore"]}]},{"ruta":"src/client/components/pages/authenticated-pages/index-page/index-page.scss","tipo":"css","codigo":"@keyframes showElementBelow {\n  0% {\n    z-index: 99;\n    opacity: 0;\n  }\n  100% {\n    z-index: 99;\n    opacity: 1;\n  }\n}\n@keyframes hideElementBelow {\n  0% {\n    z-index: 1;\n    opacity: 1;\n  }\n  100% {\n    z-index: -1;\n    opacity: 0;\n  }\n}\n:root {\n  --sm: 576px;\n  --md: 768px;\n  --lg: 992px;\n  --xl: 1200px;\n}\n\n.indexpageauthenticated {\n  /*padding: 5px 24px 15px;*/\n  flex: 1;\n  overflow-y: hidden !important;\n}\n@media (max-width: 576px) {\n  .indexpageauthenticated {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n    padding-bottom: 0px;\n  }\n}\n.indexpageauthenticated h1 {\n  flex: 1;\n  margin-top: 20px;\n  text-align: center;\n  display: flex;\n  align-items: center;\n  font: normal normal bold 30px/36px Overpass;\n}\n@media (min-width: 769px) {\n  .indexpageauthenticated h1 {\n    text-align: start;\n    padding-left: 0px;\n    font: normal normal bold 32px/36px Overpass;\n  }\n}\n.indexpageauthenticated > iframe {\n  width: 100%;\n  height: calc(100% - 70px);\n  border: none;\n}\n@media (max-width: 576px) {\n  .indexpageauthenticated > iframe {\n    padding-bottom: 15px;\n  }\n}\n.indexpageauthenticated > footer {\n  width: 100vw;\n}\n\n.indexpageauthenticated {\n  min-height: 0;\n  overflow-y: auto;\n}\n.indexpageauthenticated img,\n.indexpageauthenticated svg,\n.indexpageauthenticated video,\n.indexpageauthenticated iframe {\n  max-inline-size: 100%;\n}","imports":[]},{"ruta":"src/client/config/auth/store/auth-store.ts","tipo":"js","codigo":"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_store_exports = {};\n__export(auth_store_exports, {\n  storeAuth: () => storeAuth\n});\nmodule.exports = __toCommonJS(auth_store_exports);\nvar import_zustand = require(\"zustand\");\nvar import_middleware = require(\"zustand/middleware\");\nconst storeAuth = (0, import_zustand.create)()(\n  (0, import_middleware.persist)(\n    (set) => ({\n      country: \"\",\n      setCountry: (country) => set(() => ({ country })),\n      authenticating: false,\n      setAuthenticating: (authenticating) => set(() => ({ authenticating })),\n      finishedMsalLoad: false,\n      setFinishedMsalLoad: (finishedMsalLoad) => set(() => ({ finishedMsalLoad })),\n      domainEmail: \"\",\n      allowedToAddOrder: false,\n      loggedIn: false,\n      currency: \"\",\n      // Devolver `state` tal cual hace que zustand NO notifique (`Object.is(next, state)`).\n      // Sin esto, reescribir la MISMA moneda re-renderiza todo el host, y con él se\n      // reconstruyen los literales `accountInfo`/`traxCredentials`/`locations` que bajan al\n      // remote. La reconciliación de DT 6.2 reescribe la moneda que ya está activa más de una\n      // vez por flujo, así que esa notificación vacía llegaba en ráfagas.\n      setCurrency: (currency) => set(\n        (state) => state.currency === currency ? state : { currency }\n      ),\n      currencySymbol: \"\",\n      setCurrencySymbol: (currencySymbol) => set(() => ({ currencySymbol })),\n      setLoggedIn: (loggedIn) => set(() => ({ loggedIn })),\n      traxCredentials: void 0,\n      setTraxCredentials: (traxCredentials) => set(() => ({ traxCredentials })),\n      authData: {},\n      setAuthData: (authData) => set(() => ({ authData })),\n      cleanCredentials: () => {\n        console.info(\"cleaned cred\");\n        return set(() => ({\n          authData: {},\n          traxCredentials: void 0,\n          domainEmail: \"\",\n          traxCredentialsCounter: 0,\n          currency: \"\",\n          currencySymbol: \"\"\n        }));\n      },\n      traxCredentialsCounter: 0,\n      setTraxCredentialsCounter: (traxCredentialsCounter) => set(() => ({ traxCredentialsCounter }))\n    }),\n    {\n      name: \"auth-storage\",\n      storage: (0, import_middleware.createJSONStorage)(() => localStorage),\n      // `authenticating` es un flag TRANSITORIO de la transicion de\n      // login: persistirlo era un bug. Si el flujo terminaba mal (sesion\n      // cerrada a mitad de login), quedaba true en localStorage y el\n      // menu se quedaba cargando PARA SIEMPRE en modo no autenticado,\n      // aunque get-app-menu respondiera bien — nada lo apagaba alla.\n      partialize: (state) => Object.fromEntries(\n        Object.entries(state).filter(\n          ([key]) => key !== \"authenticating\"\n        )\n      )\n    }\n  )\n);\n","imports":[{"especificador":"@client/types/auth","ruta":"src/client/types/auth.ts","nombres":["CustomAccountInfo","TraxCredentials"]},{"especificador":"zustand","nombres":["create"]},{"especificador":"zustand/middleware","nombres":["createJSONStorage","persist"]}]},{"ruta":"src/client/types/auth.ts","tipo":"js","codigo":"var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar auth_exports = {};\nmodule.exports = __toCommonJS(auth_exports);\n","imports":[]}],"externos":["@client/utils/menu/use-app-menu","react","react-i18next","react-router-dom","zustand","zustand/middleware"],"faltantesCss":[],"truncado":false}