import{otelTelemetry as l}from"./app/telemetry/otel/telemetry";l.init();import e from"react";import{hydrateRoot as p}from"react-dom/client";import{RouterProvider as s,createBrowserRouter as f}from"react-router-dom";import{HelmetProvider as m}from"@dr.pogodin/react-helmet";import{getLocaleFromPathname as d,withoutPathPrefix as u,withPathPrefix as R}from"@redocly/theme/core/utils";import{DEFAULT_LOCALE_PLACEHOLDER as L}from"../constants/index.js";import{initL10n as E}from"../shared/l10n/initL10n";import{Loader as x,useRefresh as O,globalData as r}from"./runtime/loader";import{App as h,routes as D}from"./App";import{PRODUCT_NAME as g}from"../config/product-gates";import"./polyfills";import{ServerStyleSheet as F,StyleSheetManager as H}from"styled-components";function b(){return O(),e.createElement(m,{context:{}},e.createElement(h,null))}function P(){r?.removeAttribution&&process.env.REDOCLY_PORTAL_VERSION?console.log(`
%c Version: ${process.env.REDOCLY_PORTAL_VERSION} %c
`,"background:#ffffff ; padding: 1px; border:1px solid #0044D4; border-radius: 3px; color: #0044D4","background:transparent"):process.env.REDOCLY_PORTAL_VERSION&&console.log(`
%c Redocly ${g} %c ${process.env.REDOCLY_PORTAL_VERSION} %c

%chttps://redocly.com
`,"background:#0044D4 ; padding: 1px; border-radius: 3px 0 0 3px;  color: #fff; border:1px solid #0044D4","background:#ffffff ; padding: 1px; border:1px solid #0044D4; border-radius: 0 3px 3px 0; color: #0044D4","background:transparent","font-size: 10px; font-style: italic;")}async function _(){process.env.NODE_ENV!=="production"&&import("./runtime/ws-client").then(c=>c.listenWs()),await x.load(window.location.pathname),P();const o=r?.l10n,t=o?.locales||[],n=o?.defaultLocale||L,a=d(u(location.pathname),n,t);await E(o,a);const i=f([{Component:b,path:R("/*"),children:D}]);p(document.getElementById("app_root"),e.createElement(s,{router:i}))}_();export{F as ServerStyleSheet,H as StyleSheetManager};
