@viasoftbr/shared-ui 0.0.4 → 0.0.5
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/dist/components/encoder/DvB.d.ts +5 -2
- package/dist/components/encoder/Livecast.d.ts +4 -2
- package/dist/components/index.d.ts +1 -2
- package/dist/components.cjs +247 -378
- package/dist/components.js +261 -392
- package/dist/context/AuthContext.d.ts +10 -2
- package/dist/context/ThemeContext.d.ts +3 -1
- package/dist/context/index.d.ts +3 -3
- package/dist/context.cjs +51 -90
- package/dist/context.js +54 -93
- package/dist/hooks.cjs +0 -73
- package/dist/hooks.js +0 -63
- package/dist/index.cjs +310 -420
- package/dist/index.js +319 -429
- package/dist/services/index.d.ts +0 -2
- package/dist/services.cjs +0 -147
- package/dist/services.js +0 -137
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -22728,10 +22728,10 @@ var Accordion = ({ title, children, defaultOpen = false }) => {
|
|
|
22728
22728
|
var Accordion_default = Accordion;
|
|
22729
22729
|
|
|
22730
22730
|
// src/components/display/Section.tsx
|
|
22731
|
-
import { useEffect as useEffect2, useRef, createContext as createContext2,
|
|
22731
|
+
import { useEffect as useEffect2, useRef, createContext as createContext2, use as use2 } from "react";
|
|
22732
22732
|
|
|
22733
22733
|
// src/context/AuthContext.tsx
|
|
22734
|
-
import { createContext,
|
|
22734
|
+
import { createContext, use, useEffect, useState as useState2 } from "react";
|
|
22735
22735
|
|
|
22736
22736
|
// node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/helpers/bind.js
|
|
22737
22737
|
function bind(fn, thisArg) {
|
|
@@ -25591,140 +25591,6 @@ function subscribeToWebsocket(url, onMessage) {
|
|
|
25591
25591
|
};
|
|
25592
25592
|
}
|
|
25593
25593
|
|
|
25594
|
-
// src/services/loadRemoteModule.ts
|
|
25595
|
-
import * as React2 from "react";
|
|
25596
|
-
import * as ReactDOM from "react-dom";
|
|
25597
|
-
var sharedScopeInitialized = false;
|
|
25598
|
-
function getSharedScope() {
|
|
25599
|
-
if (!globalThis.__federation_shared__) {
|
|
25600
|
-
globalThis.__federation_shared__ = {};
|
|
25601
|
-
}
|
|
25602
|
-
if (!sharedScopeInitialized) {
|
|
25603
|
-
globalThis.__federation_shared__["react"] = {
|
|
25604
|
-
"18.3.1": {
|
|
25605
|
-
get: () => Promise.resolve(() => React2),
|
|
25606
|
-
loaded: true,
|
|
25607
|
-
from: "core",
|
|
25608
|
-
scope: "default"
|
|
25609
|
-
}
|
|
25610
|
-
};
|
|
25611
|
-
globalThis.__federation_shared__["react-dom"] = {
|
|
25612
|
-
"18.3.1": {
|
|
25613
|
-
get: () => Promise.resolve(() => ReactDOM),
|
|
25614
|
-
loaded: true,
|
|
25615
|
-
from: "core",
|
|
25616
|
-
scope: "default"
|
|
25617
|
-
}
|
|
25618
|
-
};
|
|
25619
|
-
sharedScopeInitialized = true;
|
|
25620
|
-
}
|
|
25621
|
-
return globalThis.__federation_shared__;
|
|
25622
|
-
}
|
|
25623
|
-
var loadedContainers = /* @__PURE__ */ new Map();
|
|
25624
|
-
var initializedContainers = /* @__PURE__ */ new Set();
|
|
25625
|
-
async function loadContainer(url) {
|
|
25626
|
-
if (loadedContainers.has(url)) {
|
|
25627
|
-
return loadedContainers.get(url);
|
|
25628
|
-
}
|
|
25629
|
-
const loadPromise = (async () => {
|
|
25630
|
-
try {
|
|
25631
|
-
const container = await import(
|
|
25632
|
-
/* @vite-ignore */
|
|
25633
|
-
url
|
|
25634
|
-
);
|
|
25635
|
-
if (container.init && !initializedContainers.has(url)) {
|
|
25636
|
-
await container.init(getSharedScope());
|
|
25637
|
-
initializedContainers.add(url);
|
|
25638
|
-
}
|
|
25639
|
-
return container;
|
|
25640
|
-
} catch (error2) {
|
|
25641
|
-
loadedContainers.delete(url);
|
|
25642
|
-
initializedContainers.delete(url);
|
|
25643
|
-
throw error2;
|
|
25644
|
-
}
|
|
25645
|
-
})();
|
|
25646
|
-
loadedContainers.set(url, loadPromise);
|
|
25647
|
-
return loadPromise;
|
|
25648
|
-
}
|
|
25649
|
-
async function loadRemoteModule(config) {
|
|
25650
|
-
const container = await loadContainer(config.url);
|
|
25651
|
-
if (!container || typeof container.get !== "function") {
|
|
25652
|
-
throw new Error(`Container inv\xE1lido ou sem m\xE9todo get: ${config.scope}`);
|
|
25653
|
-
}
|
|
25654
|
-
if (typeof container.dynamicLoadingCss === "function") {
|
|
25655
|
-
try {
|
|
25656
|
-
await container.dynamicLoadingCss([]);
|
|
25657
|
-
} catch (err) {
|
|
25658
|
-
console.warn(`Aviso: Falha ao carregar CSS global do remote ${config.scope}`, err);
|
|
25659
|
-
}
|
|
25660
|
-
}
|
|
25661
|
-
const factory2 = await container.get(config.module);
|
|
25662
|
-
const moduleExports = await factory2();
|
|
25663
|
-
if (moduleExports && typeof moduleExports === "object" && "default" in moduleExports) {
|
|
25664
|
-
return moduleExports.default;
|
|
25665
|
-
}
|
|
25666
|
-
return moduleExports;
|
|
25667
|
-
}
|
|
25668
|
-
|
|
25669
|
-
// src/services/metadataLoader.ts
|
|
25670
|
-
var MetadataLoader = class {
|
|
25671
|
-
constructor() {
|
|
25672
|
-
__publicField(this, "metadataCache", /* @__PURE__ */ new Map());
|
|
25673
|
-
}
|
|
25674
|
-
async loadMetadata(metadataUrl) {
|
|
25675
|
-
if (this.metadataCache.has(metadataUrl)) {
|
|
25676
|
-
return this.metadataCache.get(metadataUrl) || [];
|
|
25677
|
-
}
|
|
25678
|
-
try {
|
|
25679
|
-
const response = await fetch(metadataUrl);
|
|
25680
|
-
console.log(response);
|
|
25681
|
-
if (!response.ok) {
|
|
25682
|
-
throw new Error(`Failed to fetch metadata: ${response.statusText}`);
|
|
25683
|
-
}
|
|
25684
|
-
const data = await response.json();
|
|
25685
|
-
let metadata;
|
|
25686
|
-
if (Array.isArray(data)) {
|
|
25687
|
-
metadata = data;
|
|
25688
|
-
} else if (data.pages && Array.isArray(data.pages)) {
|
|
25689
|
-
metadata = data.pages;
|
|
25690
|
-
} else {
|
|
25691
|
-
throw new Error(
|
|
25692
|
-
"Invalid metadata format: expected array or object with pages property"
|
|
25693
|
-
);
|
|
25694
|
-
}
|
|
25695
|
-
metadata.forEach((page, index3) => {
|
|
25696
|
-
if (!page.id || !page.name || !page.path || !page.url) {
|
|
25697
|
-
throw new Error(
|
|
25698
|
-
`Invalid page metadata at index ${index3}: missing required fields`
|
|
25699
|
-
);
|
|
25700
|
-
}
|
|
25701
|
-
});
|
|
25702
|
-
this.metadataCache.set(metadataUrl, metadata);
|
|
25703
|
-
return metadata;
|
|
25704
|
-
} catch (error2) {
|
|
25705
|
-
console.warn(`Failed to load metadata from ${metadataUrl}:`, error2);
|
|
25706
|
-
return [];
|
|
25707
|
-
}
|
|
25708
|
-
}
|
|
25709
|
-
async loadFromDirectory(directoryUrl) {
|
|
25710
|
-
try {
|
|
25711
|
-
const manifestUrl = `${directoryUrl}/manifest.json`;
|
|
25712
|
-
return await this.loadMetadata(manifestUrl);
|
|
25713
|
-
} catch (error2) {
|
|
25714
|
-
throw new Error(
|
|
25715
|
-
`Directory manifest not found at ${directoryUrl}/manifest.json: ${error2}`
|
|
25716
|
-
);
|
|
25717
|
-
}
|
|
25718
|
-
}
|
|
25719
|
-
clearCache() {
|
|
25720
|
-
this.metadataCache.clear();
|
|
25721
|
-
}
|
|
25722
|
-
getCachedMetadata(metadataUrl) {
|
|
25723
|
-
return this.metadataCache.get(metadataUrl);
|
|
25724
|
-
}
|
|
25725
|
-
};
|
|
25726
|
-
var metadataLoader = new MetadataLoader();
|
|
25727
|
-
|
|
25728
25594
|
// src/services/registry.ts
|
|
25729
25595
|
var PluginRegistryImpl = class {
|
|
25730
25596
|
constructor() {
|
|
@@ -25822,7 +25688,7 @@ var saveConfig = async (payload, basePath = "./php") => {
|
|
|
25822
25688
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
25823
25689
|
var AuthContext = createContext(void 0);
|
|
25824
25690
|
function useAuth() {
|
|
25825
|
-
const ctx =
|
|
25691
|
+
const ctx = use(AuthContext);
|
|
25826
25692
|
if (!ctx)
|
|
25827
25693
|
throw new Error("useAuth must be used within AuthProvider");
|
|
25828
25694
|
return ctx;
|
|
@@ -25862,7 +25728,7 @@ var SkeletonBlock = ({ lines = 3, className = "" }) => {
|
|
|
25862
25728
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
25863
25729
|
var SectionContext = createContext2(void 0);
|
|
25864
25730
|
function useSection() {
|
|
25865
|
-
const ctx =
|
|
25731
|
+
const ctx = use2(SectionContext);
|
|
25866
25732
|
return ctx ?? { readonly: false };
|
|
25867
25733
|
}
|
|
25868
25734
|
var Section2 = ({ id, title, icon, expanded, onToggle, children, readonly, loading = false }) => {
|
|
@@ -25907,7 +25773,7 @@ var Section2 = ({ id, title, icon, expanded, onToggle, children, readonly, loadi
|
|
|
25907
25773
|
overflow-hidden
|
|
25908
25774
|
${expanded ? "max-h-fit opacity-100" : "max-h-0 opacity-0"}
|
|
25909
25775
|
`,
|
|
25910
|
-
children: /* @__PURE__ */ jsx4("div", { className: "px-6 py-4 border-t transition-all transition-discrete border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50", children: /* @__PURE__ */ jsx4(SectionContext
|
|
25776
|
+
children: /* @__PURE__ */ jsx4("div", { className: "px-6 py-4 border-t transition-all transition-discrete border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50", children: /* @__PURE__ */ jsx4(SectionContext, { value: { readonly: !!effectiveReadonly }, children: loading ? /* @__PURE__ */ jsx4(SkeletonBlock, { lines: 5 }) : children }) })
|
|
25911
25777
|
}
|
|
25912
25778
|
)
|
|
25913
25779
|
] });
|
|
@@ -28066,7 +27932,7 @@ function m6(u16, t15) {
|
|
|
28066
27932
|
}
|
|
28067
27933
|
|
|
28068
27934
|
// node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
28069
|
-
import * as
|
|
27935
|
+
import * as React5 from "react";
|
|
28070
27936
|
import { useLayoutEffect as useLayoutEffect2, useEffect as useEffect5, useRef as useRef4 } from "react";
|
|
28071
27937
|
|
|
28072
27938
|
// node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
@@ -28371,7 +28237,7 @@ function rectToClientRect(rect) {
|
|
|
28371
28237
|
}
|
|
28372
28238
|
|
|
28373
28239
|
// node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
28374
|
-
import * as
|
|
28240
|
+
import * as ReactDOM2 from "react-dom";
|
|
28375
28241
|
|
|
28376
28242
|
// node_modules/.pnpm/@floating-ui+core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
28377
28243
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
@@ -29574,9 +29440,9 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
29574
29440
|
};
|
|
29575
29441
|
|
|
29576
29442
|
// node_modules/.pnpm/@floating-ui+react-dom@2.1.7_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
29577
|
-
import * as
|
|
29443
|
+
import * as React4 from "react";
|
|
29578
29444
|
import { useLayoutEffect } from "react";
|
|
29579
|
-
import * as
|
|
29445
|
+
import * as ReactDOM from "react-dom";
|
|
29580
29446
|
var isClient = typeof document !== "undefined";
|
|
29581
29447
|
var noop2 = function noop3() {
|
|
29582
29448
|
};
|
|
@@ -29641,7 +29507,7 @@ function roundByDPR(element, value) {
|
|
|
29641
29507
|
return Math.round(value * dpr) / dpr;
|
|
29642
29508
|
}
|
|
29643
29509
|
function useLatestRef(value) {
|
|
29644
|
-
const ref =
|
|
29510
|
+
const ref = React4.useRef(value);
|
|
29645
29511
|
index(() => {
|
|
29646
29512
|
ref.current = value;
|
|
29647
29513
|
});
|
|
@@ -29664,7 +29530,7 @@ function useFloating(options) {
|
|
|
29664
29530
|
whileElementsMounted,
|
|
29665
29531
|
open
|
|
29666
29532
|
} = options;
|
|
29667
|
-
const [data, setData] =
|
|
29533
|
+
const [data, setData] = React4.useState({
|
|
29668
29534
|
x: 0,
|
|
29669
29535
|
y: 0,
|
|
29670
29536
|
strategy,
|
|
@@ -29672,19 +29538,19 @@ function useFloating(options) {
|
|
|
29672
29538
|
middlewareData: {},
|
|
29673
29539
|
isPositioned: false
|
|
29674
29540
|
});
|
|
29675
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
29541
|
+
const [latestMiddleware, setLatestMiddleware] = React4.useState(middleware);
|
|
29676
29542
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
29677
29543
|
setLatestMiddleware(middleware);
|
|
29678
29544
|
}
|
|
29679
|
-
const [_reference, _setReference] =
|
|
29680
|
-
const [_floating, _setFloating] =
|
|
29681
|
-
const setReference =
|
|
29545
|
+
const [_reference, _setReference] = React4.useState(null);
|
|
29546
|
+
const [_floating, _setFloating] = React4.useState(null);
|
|
29547
|
+
const setReference = React4.useCallback((node) => {
|
|
29682
29548
|
if (node !== referenceRef.current) {
|
|
29683
29549
|
referenceRef.current = node;
|
|
29684
29550
|
_setReference(node);
|
|
29685
29551
|
}
|
|
29686
29552
|
}, []);
|
|
29687
|
-
const setFloating =
|
|
29553
|
+
const setFloating = React4.useCallback((node) => {
|
|
29688
29554
|
if (node !== floatingRef.current) {
|
|
29689
29555
|
floatingRef.current = node;
|
|
29690
29556
|
_setFloating(node);
|
|
@@ -29692,14 +29558,14 @@ function useFloating(options) {
|
|
|
29692
29558
|
}, []);
|
|
29693
29559
|
const referenceEl = externalReference || _reference;
|
|
29694
29560
|
const floatingEl = externalFloating || _floating;
|
|
29695
|
-
const referenceRef =
|
|
29696
|
-
const floatingRef =
|
|
29697
|
-
const dataRef =
|
|
29561
|
+
const referenceRef = React4.useRef(null);
|
|
29562
|
+
const floatingRef = React4.useRef(null);
|
|
29563
|
+
const dataRef = React4.useRef(data);
|
|
29698
29564
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
29699
29565
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
29700
29566
|
const platformRef = useLatestRef(platform2);
|
|
29701
29567
|
const openRef = useLatestRef(open);
|
|
29702
|
-
const update =
|
|
29568
|
+
const update = React4.useCallback(() => {
|
|
29703
29569
|
if (!referenceRef.current || !floatingRef.current) {
|
|
29704
29570
|
return;
|
|
29705
29571
|
}
|
|
@@ -29722,7 +29588,7 @@ function useFloating(options) {
|
|
|
29722
29588
|
};
|
|
29723
29589
|
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
29724
29590
|
dataRef.current = fullData;
|
|
29725
|
-
|
|
29591
|
+
ReactDOM.flushSync(() => {
|
|
29726
29592
|
setData(fullData);
|
|
29727
29593
|
});
|
|
29728
29594
|
}
|
|
@@ -29737,7 +29603,7 @@ function useFloating(options) {
|
|
|
29737
29603
|
}));
|
|
29738
29604
|
}
|
|
29739
29605
|
}, [open]);
|
|
29740
|
-
const isMountedRef =
|
|
29606
|
+
const isMountedRef = React4.useRef(false);
|
|
29741
29607
|
index(() => {
|
|
29742
29608
|
isMountedRef.current = true;
|
|
29743
29609
|
return () => {
|
|
@@ -29756,17 +29622,17 @@ function useFloating(options) {
|
|
|
29756
29622
|
update();
|
|
29757
29623
|
}
|
|
29758
29624
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
29759
|
-
const refs =
|
|
29625
|
+
const refs = React4.useMemo(() => ({
|
|
29760
29626
|
reference: referenceRef,
|
|
29761
29627
|
floating: floatingRef,
|
|
29762
29628
|
setReference,
|
|
29763
29629
|
setFloating
|
|
29764
29630
|
}), [setReference, setFloating]);
|
|
29765
|
-
const elements =
|
|
29631
|
+
const elements = React4.useMemo(() => ({
|
|
29766
29632
|
reference: referenceEl,
|
|
29767
29633
|
floating: floatingEl
|
|
29768
29634
|
}), [referenceEl, floatingEl]);
|
|
29769
|
-
const floatingStyles =
|
|
29635
|
+
const floatingStyles = React4.useMemo(() => {
|
|
29770
29636
|
const initialStyles = {
|
|
29771
29637
|
position: strategy,
|
|
29772
29638
|
left: 0,
|
|
@@ -29792,7 +29658,7 @@ function useFloating(options) {
|
|
|
29792
29658
|
top: y8
|
|
29793
29659
|
};
|
|
29794
29660
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
29795
|
-
return
|
|
29661
|
+
return React4.useMemo(() => ({
|
|
29796
29662
|
...data,
|
|
29797
29663
|
update,
|
|
29798
29664
|
refs,
|
|
@@ -29819,12 +29685,12 @@ var size3 = (options, deps) => ({
|
|
|
29819
29685
|
|
|
29820
29686
|
// node_modules/.pnpm/@floating-ui+react@0.26.28_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
29821
29687
|
var SafeReact = {
|
|
29822
|
-
...
|
|
29688
|
+
...React5
|
|
29823
29689
|
};
|
|
29824
29690
|
var useInsertionEffect = SafeReact.useInsertionEffect;
|
|
29825
29691
|
var useSafeInsertionEffect = useInsertionEffect || ((fn) => fn());
|
|
29826
29692
|
function useEffectEvent(callback) {
|
|
29827
|
-
const ref =
|
|
29693
|
+
const ref = React5.useRef(() => {
|
|
29828
29694
|
if (true) {
|
|
29829
29695
|
throw new Error("Cannot call an event handler while rendering.");
|
|
29830
29696
|
}
|
|
@@ -29832,7 +29698,7 @@ function useEffectEvent(callback) {
|
|
|
29832
29698
|
useSafeInsertionEffect(() => {
|
|
29833
29699
|
ref.current = callback;
|
|
29834
29700
|
});
|
|
29835
|
-
return
|
|
29701
|
+
return React5.useCallback(function() {
|
|
29836
29702
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29837
29703
|
args[_key] = arguments[_key];
|
|
29838
29704
|
}
|
|
@@ -29855,13 +29721,13 @@ var genId = () => (
|
|
|
29855
29721
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + count++
|
|
29856
29722
|
);
|
|
29857
29723
|
function useFloatingId() {
|
|
29858
|
-
const [id, setId] =
|
|
29724
|
+
const [id, setId] = React5.useState(() => serverHandoffComplete ? genId() : void 0);
|
|
29859
29725
|
index2(() => {
|
|
29860
29726
|
if (id == null) {
|
|
29861
29727
|
setId(genId());
|
|
29862
29728
|
}
|
|
29863
29729
|
}, []);
|
|
29864
|
-
|
|
29730
|
+
React5.useEffect(() => {
|
|
29865
29731
|
serverHandoffComplete = true;
|
|
29866
29732
|
}, []);
|
|
29867
29733
|
return id;
|
|
@@ -29912,13 +29778,13 @@ function createPubSub() {
|
|
|
29912
29778
|
}
|
|
29913
29779
|
};
|
|
29914
29780
|
}
|
|
29915
|
-
var FloatingNodeContext = /* @__PURE__ */
|
|
29916
|
-
var FloatingTreeContext = /* @__PURE__ */
|
|
29781
|
+
var FloatingNodeContext = /* @__PURE__ */ React5.createContext(null);
|
|
29782
|
+
var FloatingTreeContext = /* @__PURE__ */ React5.createContext(null);
|
|
29917
29783
|
var useFloatingParentNodeId = () => {
|
|
29918
29784
|
var _React$useContext;
|
|
29919
|
-
return ((_React$useContext =
|
|
29785
|
+
return ((_React$useContext = React5.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
29920
29786
|
};
|
|
29921
|
-
var useFloatingTree = () =>
|
|
29787
|
+
var useFloatingTree = () => React5.useContext(FloatingTreeContext);
|
|
29922
29788
|
var FOCUSABLE_ATTRIBUTE = "data-floating-ui-focusable";
|
|
29923
29789
|
function useFloatingRootContext(options) {
|
|
29924
29790
|
const {
|
|
@@ -29927,8 +29793,8 @@ function useFloatingRootContext(options) {
|
|
|
29927
29793
|
elements: elementsProp
|
|
29928
29794
|
} = options;
|
|
29929
29795
|
const floatingId = useId();
|
|
29930
|
-
const dataRef =
|
|
29931
|
-
const [events] =
|
|
29796
|
+
const dataRef = React5.useRef({});
|
|
29797
|
+
const [events] = React5.useState(() => createPubSub());
|
|
29932
29798
|
const nested = useFloatingParentNodeId() != null;
|
|
29933
29799
|
if (true) {
|
|
29934
29800
|
const optionDomReference = elementsProp.reference;
|
|
@@ -29936,7 +29802,7 @@ function useFloatingRootContext(options) {
|
|
|
29936
29802
|
error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
29937
29803
|
}
|
|
29938
29804
|
}
|
|
29939
|
-
const [positionReference, setPositionReference] =
|
|
29805
|
+
const [positionReference, setPositionReference] = React5.useState(elementsProp.reference);
|
|
29940
29806
|
const onOpenChange = useEffectEvent((open2, event, reason) => {
|
|
29941
29807
|
dataRef.current.openEvent = open2 ? event : void 0;
|
|
29942
29808
|
events.emit("openchange", {
|
|
@@ -29947,15 +29813,15 @@ function useFloatingRootContext(options) {
|
|
|
29947
29813
|
});
|
|
29948
29814
|
onOpenChangeProp == null || onOpenChangeProp(open2, event, reason);
|
|
29949
29815
|
});
|
|
29950
|
-
const refs =
|
|
29816
|
+
const refs = React5.useMemo(() => ({
|
|
29951
29817
|
setPositionReference
|
|
29952
29818
|
}), []);
|
|
29953
|
-
const elements =
|
|
29819
|
+
const elements = React5.useMemo(() => ({
|
|
29954
29820
|
reference: positionReference || elementsProp.reference || null,
|
|
29955
29821
|
floating: elementsProp.floating || null,
|
|
29956
29822
|
domReference: elementsProp.reference
|
|
29957
29823
|
}), [positionReference, elementsProp.reference, elementsProp.floating]);
|
|
29958
|
-
return
|
|
29824
|
+
return React5.useMemo(() => ({
|
|
29959
29825
|
dataRef,
|
|
29960
29826
|
open,
|
|
29961
29827
|
onOpenChange,
|
|
@@ -29982,11 +29848,11 @@ function useFloating2(options) {
|
|
|
29982
29848
|
});
|
|
29983
29849
|
const rootContext = options.rootContext || internalRootContext;
|
|
29984
29850
|
const computedElements = rootContext.elements;
|
|
29985
|
-
const [_domReference, setDomReference] =
|
|
29986
|
-
const [positionReference, _setPositionReference] =
|
|
29851
|
+
const [_domReference, setDomReference] = React5.useState(null);
|
|
29852
|
+
const [positionReference, _setPositionReference] = React5.useState(null);
|
|
29987
29853
|
const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;
|
|
29988
29854
|
const domReference = optionDomReference || _domReference;
|
|
29989
|
-
const domReferenceRef =
|
|
29855
|
+
const domReferenceRef = React5.useRef(null);
|
|
29990
29856
|
const tree = useFloatingTree();
|
|
29991
29857
|
index2(() => {
|
|
29992
29858
|
if (domReference) {
|
|
@@ -30002,7 +29868,7 @@ function useFloating2(options) {
|
|
|
30002
29868
|
}
|
|
30003
29869
|
}
|
|
30004
29870
|
});
|
|
30005
|
-
const setPositionReference =
|
|
29871
|
+
const setPositionReference = React5.useCallback((node) => {
|
|
30006
29872
|
const computedPositionReference = isElement(node) ? {
|
|
30007
29873
|
getBoundingClientRect: () => node.getBoundingClientRect(),
|
|
30008
29874
|
contextElement: node
|
|
@@ -30010,7 +29876,7 @@ function useFloating2(options) {
|
|
|
30010
29876
|
_setPositionReference(computedPositionReference);
|
|
30011
29877
|
position.refs.setReference(computedPositionReference);
|
|
30012
29878
|
}, [position.refs]);
|
|
30013
|
-
const setReference =
|
|
29879
|
+
const setReference = React5.useCallback((node) => {
|
|
30014
29880
|
if (isElement(node) || node === null) {
|
|
30015
29881
|
domReferenceRef.current = node;
|
|
30016
29882
|
setDomReference(node);
|
|
@@ -30022,17 +29888,17 @@ function useFloating2(options) {
|
|
|
30022
29888
|
position.refs.setReference(node);
|
|
30023
29889
|
}
|
|
30024
29890
|
}, [position.refs]);
|
|
30025
|
-
const refs =
|
|
29891
|
+
const refs = React5.useMemo(() => ({
|
|
30026
29892
|
...position.refs,
|
|
30027
29893
|
setReference,
|
|
30028
29894
|
setPositionReference,
|
|
30029
29895
|
domReference: domReferenceRef
|
|
30030
29896
|
}), [position.refs, setReference, setPositionReference]);
|
|
30031
|
-
const elements =
|
|
29897
|
+
const elements = React5.useMemo(() => ({
|
|
30032
29898
|
...position.elements,
|
|
30033
29899
|
domReference
|
|
30034
29900
|
}), [position.elements, domReference]);
|
|
30035
|
-
const context =
|
|
29901
|
+
const context = React5.useMemo(() => ({
|
|
30036
29902
|
...position,
|
|
30037
29903
|
...rootContext,
|
|
30038
29904
|
refs,
|
|
@@ -30046,7 +29912,7 @@ function useFloating2(options) {
|
|
|
30046
29912
|
node.context = context;
|
|
30047
29913
|
}
|
|
30048
29914
|
});
|
|
30049
|
-
return
|
|
29915
|
+
return React5.useMemo(() => ({
|
|
30050
29916
|
...position,
|
|
30051
29917
|
context,
|
|
30052
29918
|
refs,
|
|
@@ -30118,22 +29984,22 @@ function useInteractions(propsList) {
|
|
|
30118
29984
|
const referenceDeps = propsList.map((key) => key == null ? void 0 : key.reference);
|
|
30119
29985
|
const floatingDeps = propsList.map((key) => key == null ? void 0 : key.floating);
|
|
30120
29986
|
const itemDeps = propsList.map((key) => key == null ? void 0 : key.item);
|
|
30121
|
-
const getReferenceProps =
|
|
29987
|
+
const getReferenceProps = React5.useCallback(
|
|
30122
29988
|
(userProps) => mergeProps(userProps, propsList, "reference"),
|
|
30123
29989
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30124
29990
|
referenceDeps
|
|
30125
29991
|
);
|
|
30126
|
-
const getFloatingProps =
|
|
29992
|
+
const getFloatingProps = React5.useCallback(
|
|
30127
29993
|
(userProps) => mergeProps(userProps, propsList, "floating"),
|
|
30128
29994
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30129
29995
|
floatingDeps
|
|
30130
29996
|
);
|
|
30131
|
-
const getItemProps =
|
|
29997
|
+
const getItemProps = React5.useCallback(
|
|
30132
29998
|
(userProps) => mergeProps(userProps, propsList, "item"),
|
|
30133
29999
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30134
30000
|
itemDeps
|
|
30135
30001
|
);
|
|
30136
|
-
return
|
|
30002
|
+
return React5.useMemo(() => ({
|
|
30137
30003
|
getReferenceProps,
|
|
30138
30004
|
getFloatingProps,
|
|
30139
30005
|
getItemProps
|
|
@@ -30204,7 +30070,7 @@ var inner = (props) => ({
|
|
|
30204
30070
|
scrollEl.scrollTop = diffY;
|
|
30205
30071
|
if (onFallbackChange) {
|
|
30206
30072
|
const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;
|
|
30207
|
-
|
|
30073
|
+
ReactDOM2.flushSync(() => onFallbackChange(shouldFallback));
|
|
30208
30074
|
}
|
|
30209
30075
|
if (overflowRef) {
|
|
30210
30076
|
overflowRef.current = await detectOverflow2(getArgsWithCustomFloatingHeight({
|
|
@@ -30229,10 +30095,10 @@ function useInnerOffset(context, props) {
|
|
|
30229
30095
|
onChange: unstable_onChange
|
|
30230
30096
|
} = props;
|
|
30231
30097
|
const onChange = useEffectEvent(unstable_onChange);
|
|
30232
|
-
const controlledScrollingRef =
|
|
30233
|
-
const prevScrollTopRef =
|
|
30234
|
-
const initialOverflowRef =
|
|
30235
|
-
|
|
30098
|
+
const controlledScrollingRef = React5.useRef(false);
|
|
30099
|
+
const prevScrollTopRef = React5.useRef(null);
|
|
30100
|
+
const initialOverflowRef = React5.useRef(null);
|
|
30101
|
+
React5.useEffect(() => {
|
|
30236
30102
|
if (!enabled)
|
|
30237
30103
|
return;
|
|
30238
30104
|
function onWheel(e10) {
|
|
@@ -30250,7 +30116,7 @@ function useInnerOffset(context, props) {
|
|
|
30250
30116
|
}
|
|
30251
30117
|
if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {
|
|
30252
30118
|
e10.preventDefault();
|
|
30253
|
-
|
|
30119
|
+
ReactDOM2.flushSync(() => {
|
|
30254
30120
|
onChange((d9) => d9 + Math[method](dY, remainingScroll * sign));
|
|
30255
30121
|
});
|
|
30256
30122
|
} else if (/firefox/i.test(getUserAgent())) {
|
|
@@ -30275,7 +30141,7 @@ function useInnerOffset(context, props) {
|
|
|
30275
30141
|
};
|
|
30276
30142
|
}
|
|
30277
30143
|
}, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);
|
|
30278
|
-
const floating =
|
|
30144
|
+
const floating = React5.useMemo(() => ({
|
|
30279
30145
|
onKeyDown() {
|
|
30280
30146
|
controlledScrollingRef.current = true;
|
|
30281
30147
|
},
|
|
@@ -30293,7 +30159,7 @@ function useInnerOffset(context, props) {
|
|
|
30293
30159
|
if (prevScrollTopRef.current !== null) {
|
|
30294
30160
|
const scrollDiff = el.scrollTop - prevScrollTopRef.current;
|
|
30295
30161
|
if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {
|
|
30296
|
-
|
|
30162
|
+
ReactDOM2.flushSync(() => onChange((d9) => d9 + scrollDiff));
|
|
30297
30163
|
}
|
|
30298
30164
|
}
|
|
30299
30165
|
requestAnimationFrame(() => {
|
|
@@ -30301,7 +30167,7 @@ function useInnerOffset(context, props) {
|
|
|
30301
30167
|
});
|
|
30302
30168
|
}
|
|
30303
30169
|
}), [elements.floating, onChange, overflowRef, scrollRef]);
|
|
30304
|
-
return
|
|
30170
|
+
return React5.useMemo(() => enabled ? {
|
|
30305
30171
|
floating
|
|
30306
30172
|
} : {}, [enabled, floating]);
|
|
30307
30173
|
}
|
|
@@ -32659,7 +32525,7 @@ var MiddlewareServiceGroup = ({ expanded, onToggle, loading, settings, onChange
|
|
|
32659
32525
|
var Service_default = MiddlewareServiceGroup;
|
|
32660
32526
|
|
|
32661
32527
|
// src/components/encoder/DvB.tsx
|
|
32662
|
-
import { useState as useState12, useEffect as useEffect9
|
|
32528
|
+
import { useState as useState12, useEffect as useEffect9 } from "react";
|
|
32663
32529
|
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
32664
32530
|
var defaultDvBSettings = {
|
|
32665
32531
|
engine: "cpu",
|
|
@@ -32804,7 +32670,8 @@ var normalizeDvBData = (data) => {
|
|
|
32804
32670
|
protocol: parseProtocolUrl(data.output_url || defaultProtocolSettings.ffurl)
|
|
32805
32671
|
};
|
|
32806
32672
|
};
|
|
32807
|
-
var DvB =
|
|
32673
|
+
var DvB = function DvB2(props) {
|
|
32674
|
+
const { settings, setSettings, encoderId, isLoading, setIsLoading, ref } = props;
|
|
32808
32675
|
const [internalSettings, setInternalSettings] = useState12(defaultDvBSettings);
|
|
32809
32676
|
const [expandedSections, setExpandedSections] = useState12({
|
|
32810
32677
|
video: true,
|
|
@@ -32865,13 +32732,33 @@ var DvB = forwardRef4(function DvB2({ settings, setSettings, encoderId, isLoadin
|
|
|
32865
32732
|
newTracks[idx] = { label: newTracks[idx].label, value: !newTracks[idx].value };
|
|
32866
32733
|
setTracks(newTracks);
|
|
32867
32734
|
};
|
|
32868
|
-
|
|
32869
|
-
|
|
32870
|
-
|
|
32871
|
-
|
|
32872
|
-
|
|
32873
|
-
|
|
32874
|
-
|
|
32735
|
+
useEffect9(() => {
|
|
32736
|
+
if (!ref)
|
|
32737
|
+
return;
|
|
32738
|
+
const impl = {
|
|
32739
|
+
getSettings: () => ({ ...effectiveSettings, output_url: buildProtocolUrl(effectiveSettings.protocol) }),
|
|
32740
|
+
reset: () => {
|
|
32741
|
+
effectiveSetSettings(savedSettings);
|
|
32742
|
+
},
|
|
32743
|
+
isDirty: () => JSON.stringify(effectiveSettings) !== JSON.stringify(savedSettings)
|
|
32744
|
+
};
|
|
32745
|
+
try {
|
|
32746
|
+
if (typeof ref === "function")
|
|
32747
|
+
ref(impl);
|
|
32748
|
+
else if ("current" in ref)
|
|
32749
|
+
ref.current = impl;
|
|
32750
|
+
} catch {
|
|
32751
|
+
}
|
|
32752
|
+
return () => {
|
|
32753
|
+
try {
|
|
32754
|
+
if (typeof ref === "function")
|
|
32755
|
+
ref(null);
|
|
32756
|
+
else if ("current" in ref)
|
|
32757
|
+
ref.current = null;
|
|
32758
|
+
} catch {
|
|
32759
|
+
}
|
|
32760
|
+
};
|
|
32761
|
+
}, [ref, effectiveSettings, savedSettings, effectiveSetSettings]);
|
|
32875
32762
|
return /* @__PURE__ */ jsxs15("div", { className: "space-y-4 pl-4 border-l-[1px] border-gray-600 custom-scroll overflow-y-auto max-h-[670px]", children: [
|
|
32876
32763
|
/* @__PURE__ */ jsxs15(VideoGroup_default, { expanded: expandedSections.video, onToggle: toggleSection, loading: isLoading ?? false, children: [
|
|
32877
32764
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
@@ -33218,11 +33105,11 @@ var DvB = forwardRef4(function DvB2({ settings, setSettings, encoderId, isLoadin
|
|
|
33218
33105
|
}
|
|
33219
33106
|
)
|
|
33220
33107
|
] });
|
|
33221
|
-
}
|
|
33108
|
+
};
|
|
33222
33109
|
var DvB_default = DvB;
|
|
33223
33110
|
|
|
33224
33111
|
// src/components/encoder/Livecast.tsx
|
|
33225
|
-
import { useState as useState13, useEffect as useEffect10
|
|
33112
|
+
import { useState as useState13, useEffect as useEffect10 } from "react";
|
|
33226
33113
|
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
33227
33114
|
var defaultLivecastSettings = {
|
|
33228
33115
|
service_label: "Encoder 2",
|
|
@@ -33346,7 +33233,8 @@ var normalizeLivecastData = (data) => {
|
|
|
33346
33233
|
protocol: parsed
|
|
33347
33234
|
};
|
|
33348
33235
|
};
|
|
33349
|
-
var Livecast =
|
|
33236
|
+
var Livecast = function Livecast2(props) {
|
|
33237
|
+
const { settings, setSettings, encoderId, isLoading, setIsLoading, ref } = props;
|
|
33350
33238
|
const [expandedSections, setExpandedSections] = useState13({
|
|
33351
33239
|
video: true,
|
|
33352
33240
|
audio: false,
|
|
@@ -33402,16 +33290,33 @@ var Livecast = forwardRef5(function Livecast2({ settings, setSettings, encoderId
|
|
|
33402
33290
|
const next = { ...effectiveSettings, [key]: !effectiveSettings[key] };
|
|
33403
33291
|
effectiveSetSettings(next);
|
|
33404
33292
|
};
|
|
33405
|
-
|
|
33406
|
-
|
|
33407
|
-
|
|
33408
|
-
|
|
33409
|
-
|
|
33410
|
-
|
|
33411
|
-
|
|
33412
|
-
|
|
33413
|
-
|
|
33414
|
-
|
|
33293
|
+
useEffect10(() => {
|
|
33294
|
+
if (!ref)
|
|
33295
|
+
return;
|
|
33296
|
+
const impl = {
|
|
33297
|
+
getSettings: () => ({ ...effectiveSettings, send_url: buildProtocolUrl2(effectiveSettings.protocol) }),
|
|
33298
|
+
reset: () => {
|
|
33299
|
+
effectiveSetSettings(savedSettings);
|
|
33300
|
+
},
|
|
33301
|
+
isDirty: () => JSON.stringify(effectiveSettings) !== JSON.stringify(savedSettings)
|
|
33302
|
+
};
|
|
33303
|
+
try {
|
|
33304
|
+
if (typeof ref === "function")
|
|
33305
|
+
ref(impl);
|
|
33306
|
+
else if ("current" in ref)
|
|
33307
|
+
ref.current = impl;
|
|
33308
|
+
} catch {
|
|
33309
|
+
}
|
|
33310
|
+
return () => {
|
|
33311
|
+
try {
|
|
33312
|
+
if (typeof ref === "function")
|
|
33313
|
+
ref(null);
|
|
33314
|
+
else if ("current" in ref)
|
|
33315
|
+
ref.current = null;
|
|
33316
|
+
} catch {
|
|
33317
|
+
}
|
|
33318
|
+
};
|
|
33319
|
+
}, [ref, effectiveSettings, savedSettings, effectiveSetSettings]);
|
|
33415
33320
|
return /* @__PURE__ */ jsxs16("div", { className: "space-y-4 px-4 border-x-[1px] border-gray-500 custom-scroll overflow-y-auto max-h-[670px]", children: [
|
|
33416
33321
|
/* @__PURE__ */ jsx19(VideoGroup_default, { expanded: expandedSections.video, onToggle: toggleSection, loading: isLoading ?? false, children: /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 md:grid-cols-4 gap-4", children: [
|
|
33417
33322
|
/* @__PURE__ */ jsx19(
|
|
@@ -33562,7 +33467,7 @@ var Livecast = forwardRef5(function Livecast2({ settings, setSettings, encoderId
|
|
|
33562
33467
|
}
|
|
33563
33468
|
)
|
|
33564
33469
|
] });
|
|
33565
|
-
}
|
|
33470
|
+
};
|
|
33566
33471
|
var Livecast_default = Livecast;
|
|
33567
33472
|
|
|
33568
33473
|
// src/components/encoder/ViewLog.tsx
|
|
@@ -34345,11 +34250,11 @@ var EditInPlaceField = ({ initialValue, onSave }) => {
|
|
|
34345
34250
|
var EditInPlaceField_default = EditInPlaceField;
|
|
34346
34251
|
|
|
34347
34252
|
// src/context/ThemeContext.tsx
|
|
34348
|
-
import { createContext as createContext4,
|
|
34253
|
+
import { createContext as createContext4, use as use3, useEffect as useEffect14, useState as useState18 } from "react";
|
|
34349
34254
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
34350
34255
|
var ThemeContext = createContext4(void 0);
|
|
34351
34256
|
function useTheme() {
|
|
34352
|
-
const context =
|
|
34257
|
+
const context = use3(ThemeContext);
|
|
34353
34258
|
if (context === void 0) {
|
|
34354
34259
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
34355
34260
|
}
|
|
@@ -35326,18 +35231,18 @@ var Footer = () => {
|
|
|
35326
35231
|
var Footer_default = Footer;
|
|
35327
35232
|
|
|
35328
35233
|
// src/components/main/Header.tsx
|
|
35329
|
-
import
|
|
35234
|
+
import React18, { useEffect as useEffect15, useState as useState21 } from "react";
|
|
35330
35235
|
import { Link as Link3 } from "react-router-dom";
|
|
35331
35236
|
import { Fragment as Fragment3, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
35332
35237
|
function classNames(...classes) {
|
|
35333
35238
|
return classes.filter(Boolean).join(" ");
|
|
35334
35239
|
}
|
|
35335
35240
|
var Header = ({ isSidebarOpen, setSidebarOpen, onNavigate }) => {
|
|
35336
|
-
const [status, setStatus] =
|
|
35337
|
-
const [loading, setLoading] =
|
|
35338
|
-
const [error2, setError] =
|
|
35241
|
+
const [status, setStatus] = React18.useState(null);
|
|
35242
|
+
const [loading, setLoading] = React18.useState(true);
|
|
35243
|
+
const [error2, setError] = React18.useState(null);
|
|
35339
35244
|
const { theme, toggleTheme } = useTheme();
|
|
35340
|
-
|
|
35245
|
+
React18.useEffect(() => {
|
|
35341
35246
|
let active = true;
|
|
35342
35247
|
(async () => {
|
|
35343
35248
|
try {
|
|
@@ -35696,7 +35601,7 @@ var Header = ({ isSidebarOpen, setSidebarOpen, onNavigate }) => {
|
|
|
35696
35601
|
var Header_default = Header;
|
|
35697
35602
|
|
|
35698
35603
|
// src/components/main/PageHeader.tsx
|
|
35699
|
-
import
|
|
35604
|
+
import React19 from "react";
|
|
35700
35605
|
import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
35701
35606
|
var PageHeader = ({
|
|
35702
35607
|
icon,
|
|
@@ -35706,7 +35611,7 @@ var PageHeader = ({
|
|
|
35706
35611
|
hasStates = false,
|
|
35707
35612
|
children
|
|
35708
35613
|
}) => {
|
|
35709
|
-
const [currentState, setState] =
|
|
35614
|
+
const [currentState, setState] = React19.useState(state);
|
|
35710
35615
|
const startStop = () => {
|
|
35711
35616
|
setState(currentState == "start" ? "stop" : "start");
|
|
35712
35617
|
console.log("here", currentState);
|
|
@@ -36625,7 +36530,7 @@ var RequireAuth_default = RequireAuth;
|
|
|
36625
36530
|
import { useEffect as useEffect19, useState as useState26 } from "react";
|
|
36626
36531
|
|
|
36627
36532
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/Trans.js
|
|
36628
|
-
import { useContext as
|
|
36533
|
+
import { useContext as useContext2 } from "react";
|
|
36629
36534
|
|
|
36630
36535
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/TransWithoutContext.js
|
|
36631
36536
|
import { Fragment as Fragment7, isValidElement, cloneElement as cloneElement2, createElement as createElement5, Children } from "react";
|
|
@@ -39018,7 +38923,7 @@ var dir = instance.dir;
|
|
|
39018
38923
|
var init = instance.init;
|
|
39019
38924
|
var loadResources = instance.loadResources;
|
|
39020
38925
|
var reloadResources = instance.reloadResources;
|
|
39021
|
-
var
|
|
38926
|
+
var use4 = instance.use;
|
|
39022
38927
|
var changeLanguage = instance.changeLanguage;
|
|
39023
38928
|
var getFixedT = instance.getFixedT;
|
|
39024
38929
|
var t14 = instance.t;
|
|
@@ -39185,10 +39090,10 @@ var ReportNamespaces = class {
|
|
|
39185
39090
|
};
|
|
39186
39091
|
|
|
39187
39092
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTrans.js
|
|
39188
|
-
import { useContext as
|
|
39093
|
+
import { useContext as useContext3 } from "react";
|
|
39189
39094
|
|
|
39190
39095
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTransWithoutContext.js
|
|
39191
|
-
import
|
|
39096
|
+
import React24 from "react";
|
|
39192
39097
|
|
|
39193
39098
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTransUtils/TranslationParserError.js
|
|
39194
39099
|
var TranslationParserError = class _TranslationParserError extends Error {
|
|
@@ -39470,7 +39375,7 @@ var tokenize = (translation) => {
|
|
|
39470
39375
|
};
|
|
39471
39376
|
|
|
39472
39377
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/IcuTransUtils/renderTranslation.js
|
|
39473
|
-
import
|
|
39378
|
+
import React23 from "react";
|
|
39474
39379
|
var renderDeclarationNode = (declaration, children, childDeclarations) => {
|
|
39475
39380
|
const {
|
|
39476
39381
|
type,
|
|
@@ -39481,15 +39386,15 @@ var renderDeclarationNode = (declaration, children, childDeclarations) => {
|
|
|
39481
39386
|
children: _childrenToRemove,
|
|
39482
39387
|
...propsWithoutChildren
|
|
39483
39388
|
} = props;
|
|
39484
|
-
return
|
|
39389
|
+
return React23.createElement(type, propsWithoutChildren, ...children);
|
|
39485
39390
|
}
|
|
39486
39391
|
if (children.length === 0) {
|
|
39487
|
-
return
|
|
39392
|
+
return React23.createElement(type, props);
|
|
39488
39393
|
}
|
|
39489
39394
|
if (children.length === 1) {
|
|
39490
|
-
return
|
|
39395
|
+
return React23.createElement(type, props, children[0]);
|
|
39491
39396
|
}
|
|
39492
|
-
return
|
|
39397
|
+
return React23.createElement(type, props, ...children);
|
|
39493
39398
|
};
|
|
39494
39399
|
var renderTranslation = (translation, declarations = []) => {
|
|
39495
39400
|
if (!translation) {
|
|
@@ -39589,7 +39494,7 @@ function IcuTransWithoutContext({
|
|
|
39589
39494
|
warnOnce(i18n, "NO_I18NEXT_INSTANCE", `IcuTrans: You need to pass in an i18next instance using i18nextReactModule`, {
|
|
39590
39495
|
i18nKey
|
|
39591
39496
|
});
|
|
39592
|
-
return
|
|
39497
|
+
return React24.createElement(React24.Fragment, {}, defaultTranslation);
|
|
39593
39498
|
}
|
|
39594
39499
|
const t15 = tFromProps || i18n.t?.bind(i18n) || ((k11) => k11);
|
|
39595
39500
|
let namespaces = ns || t15.ns || i18n.options?.defaultNS;
|
|
@@ -39610,13 +39515,13 @@ function IcuTransWithoutContext({
|
|
|
39610
39515
|
});
|
|
39611
39516
|
try {
|
|
39612
39517
|
const rendered = renderTranslation(translation, content);
|
|
39613
|
-
return
|
|
39518
|
+
return React24.createElement(React24.Fragment, {}, ...rendered);
|
|
39614
39519
|
} catch (error2) {
|
|
39615
39520
|
warn2(i18n, "ICU_TRANS_RENDER_ERROR", `IcuTrans component error for key "${i18nKey}": ${error2.message}`, {
|
|
39616
39521
|
i18nKey,
|
|
39617
39522
|
error: error2
|
|
39618
39523
|
});
|
|
39619
|
-
return
|
|
39524
|
+
return React24.createElement(React24.Fragment, {}, translation);
|
|
39620
39525
|
}
|
|
39621
39526
|
}
|
|
39622
39527
|
IcuTransWithoutContext.displayName = "IcuTransWithoutContext";
|
|
@@ -39634,7 +39539,7 @@ function IcuTrans({
|
|
|
39634
39539
|
const {
|
|
39635
39540
|
i18n: i18nFromContext,
|
|
39636
39541
|
defaultNS: defaultNSFromContext
|
|
39637
|
-
} =
|
|
39542
|
+
} = useContext3(I18nContext) || {};
|
|
39638
39543
|
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
39639
39544
|
const t15 = tFromProps || i18n?.t.bind(i18n);
|
|
39640
39545
|
return IcuTransWithoutContext({
|
|
@@ -39650,7 +39555,7 @@ function IcuTrans({
|
|
|
39650
39555
|
IcuTrans.displayName = "IcuTrans";
|
|
39651
39556
|
|
|
39652
39557
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/useTranslation.js
|
|
39653
|
-
import { useContext as
|
|
39558
|
+
import { useContext as useContext4, useCallback as useCallback3, useMemo as useMemo6, useEffect as useEffect18, useRef as useRef9, useState as useState25 } from "react";
|
|
39654
39559
|
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
|
39655
39560
|
var notReadyT = (k11, optsOrDefaultValue) => {
|
|
39656
39561
|
if (isString3(optsOrDefaultValue))
|
|
@@ -39672,7 +39577,7 @@ var useTranslation = (ns, props = {}) => {
|
|
|
39672
39577
|
const {
|
|
39673
39578
|
i18n: i18nFromContext,
|
|
39674
39579
|
defaultNS: defaultNSFromContext
|
|
39675
|
-
} =
|
|
39580
|
+
} = useContext4(I18nContext) || {};
|
|
39676
39581
|
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
39677
39582
|
if (i18n && !i18n.reportNamespaces)
|
|
39678
39583
|
i18n.reportNamespaces = new ReportNamespaces();
|
|
@@ -39822,7 +39727,7 @@ import { createElement as createElement7, useMemo as useMemo7 } from "react";
|
|
|
39822
39727
|
import { createElement as createElement8 } from "react";
|
|
39823
39728
|
|
|
39824
39729
|
// node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.2_typescript@5.9.3__react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/react-i18next/dist/es/useSSR.js
|
|
39825
|
-
import { useContext as
|
|
39730
|
+
import { useContext as useContext5 } from "react";
|
|
39826
39731
|
|
|
39827
39732
|
// src/locales/pt/translation.json
|
|
39828
39733
|
var translation_default = {
|
|
@@ -40059,7 +39964,7 @@ instance.use(initReactI18next).init({
|
|
|
40059
39964
|
var i18n_default = instance;
|
|
40060
39965
|
|
|
40061
39966
|
// src/context/SharedUiProvider.tsx
|
|
40062
|
-
import
|
|
39967
|
+
import React25 from "react";
|
|
40063
39968
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
40064
39969
|
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
40065
39970
|
|
|
@@ -40302,48 +40207,13 @@ var ConfigWizard = ({ basePath = "./config-xcoder-wizard/php", onComplete }) =>
|
|
|
40302
40207
|
};
|
|
40303
40208
|
var Wizard_default = ConfigWizard;
|
|
40304
40209
|
|
|
40305
|
-
// src/components/RemoteModule.tsx
|
|
40306
|
-
import { useEffect as useEffect20, useState as useState27 } from "react";
|
|
40307
|
-
import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
40308
|
-
function RemoteModule({ scope, url, module, fallback }) {
|
|
40309
|
-
const [Component2, setComponent] = useState27(null);
|
|
40310
|
-
const [error2, setError] = useState27(null);
|
|
40311
|
-
const [loading, setLoading] = useState27(true);
|
|
40312
|
-
useEffect20(() => {
|
|
40313
|
-
setLoading(true);
|
|
40314
|
-
setError(null);
|
|
40315
|
-
loadRemoteModule({ scope, url, module }).then((mod) => {
|
|
40316
|
-
setComponent(() => mod);
|
|
40317
|
-
}).catch((err) => {
|
|
40318
|
-
console.error("Erro ao carregar m\xF3dulo:", err);
|
|
40319
|
-
setError(err.message);
|
|
40320
|
-
}).finally(() => {
|
|
40321
|
-
setLoading(false);
|
|
40322
|
-
});
|
|
40323
|
-
}, [scope, url, module]);
|
|
40324
|
-
if (loading) {
|
|
40325
|
-
return /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx43("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-primary dark:border-primary-purple" }) });
|
|
40326
|
-
}
|
|
40327
|
-
if (error2) {
|
|
40328
|
-
return /* @__PURE__ */ jsxs38("div", { className: "p-6 bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 rounded-lg", children: [
|
|
40329
|
-
/* @__PURE__ */ jsx43("h3", { className: "text-lg font-semibold text-red-800 dark:text-red-300 mb-2", children: "Erro ao carregar m\xF3dulo" }),
|
|
40330
|
-
/* @__PURE__ */ jsx43("p", { className: "text-red-600 dark:text-red-400", children: error2 }),
|
|
40331
|
-
/* @__PURE__ */ jsx43("p", { className: "text-sm text-red-500 dark:text-red-500 mt-2", children: "Verifique se o m\xF3dulo est\xE1 instalado e o servidor est\xE1 rodando." })
|
|
40332
|
-
] });
|
|
40333
|
-
}
|
|
40334
|
-
if (!Component2) {
|
|
40335
|
-
return /* @__PURE__ */ jsx43(Fragment8, { children: fallback || /* @__PURE__ */ jsx43("div", { className: "p-4 text-neutral-500 dark:text-neutral-400", children: "M\xF3dulo n\xE3o encontrado" }) });
|
|
40336
|
-
}
|
|
40337
|
-
return /* @__PURE__ */ jsx43(Component2, {});
|
|
40338
|
-
}
|
|
40339
|
-
|
|
40340
40210
|
// src/components/xcoder/Fflog.tsx
|
|
40341
|
-
import { useEffect as
|
|
40342
|
-
import { jsx as
|
|
40211
|
+
import { useEffect as useEffect20, useState as useState27 } from "react";
|
|
40212
|
+
import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
40343
40213
|
var Fflog = ({ index: index3 }) => {
|
|
40344
|
-
const [message, setMessage] =
|
|
40345
|
-
const [tooltip, setTooltip] =
|
|
40346
|
-
|
|
40214
|
+
const [message, setMessage] = useState27("");
|
|
40215
|
+
const [tooltip, setTooltip] = useState27("Copy to Clipboard");
|
|
40216
|
+
useEffect20(() => {
|
|
40347
40217
|
const cleanupSocket = subscribeToWebsocket(buildWsUrl("/ws"), (data) => {
|
|
40348
40218
|
const aux = data?.logs[index3 - 1];
|
|
40349
40219
|
setMessage(aux.log);
|
|
@@ -40356,7 +40226,7 @@ var Fflog = ({ index: index3 }) => {
|
|
|
40356
40226
|
cleanupSocket();
|
|
40357
40227
|
};
|
|
40358
40228
|
}, []);
|
|
40359
|
-
return /* @__PURE__ */
|
|
40229
|
+
return /* @__PURE__ */ jsxs38(
|
|
40360
40230
|
"div",
|
|
40361
40231
|
{
|
|
40362
40232
|
"data-tooltip-id": "tooltip",
|
|
@@ -40371,8 +40241,8 @@ var Fflog = ({ index: index3 }) => {
|
|
|
40371
40241
|
},
|
|
40372
40242
|
onMouseLeave: () => message == "" ? setTooltip("Copy to Clipboard") : "",
|
|
40373
40243
|
children: [
|
|
40374
|
-
/* @__PURE__ */
|
|
40375
|
-
/* @__PURE__ */
|
|
40244
|
+
/* @__PURE__ */ jsx43(M10, { id: "tooltip" }),
|
|
40245
|
+
/* @__PURE__ */ jsx43("p", { className: "relative mt-[-10px] text-justify text-gray-900 dark:text-slate-200 font-mono", style: { overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis" }, children: message })
|
|
40376
40246
|
]
|
|
40377
40247
|
}
|
|
40378
40248
|
);
|
|
@@ -40380,7 +40250,7 @@ var Fflog = ({ index: index3 }) => {
|
|
|
40380
40250
|
var Fflog_default = Fflog;
|
|
40381
40251
|
|
|
40382
40252
|
// src/components/xcoder/Metrics.tsx
|
|
40383
|
-
import { jsx as
|
|
40253
|
+
import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
40384
40254
|
var MetricBar = ({ label, value, suffix, color }) => {
|
|
40385
40255
|
const colorClasses = {
|
|
40386
40256
|
blue: "bg-blue-500",
|
|
@@ -40389,15 +40259,15 @@ var MetricBar = ({ label, value, suffix, color }) => {
|
|
|
40389
40259
|
cyan: "bg-cyan-500",
|
|
40390
40260
|
pink: "bg-pink-500"
|
|
40391
40261
|
};
|
|
40392
|
-
return /* @__PURE__ */
|
|
40393
|
-
/* @__PURE__ */
|
|
40394
|
-
/* @__PURE__ */
|
|
40395
|
-
/* @__PURE__ */
|
|
40262
|
+
return /* @__PURE__ */ jsxs39("div", { className: "space-y-1", children: [
|
|
40263
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between text-sm", children: [
|
|
40264
|
+
/* @__PURE__ */ jsx44("span", { className: "text-gray-900 dark:text-slate-400", children: label }),
|
|
40265
|
+
/* @__PURE__ */ jsxs39("span", { className: "text-gray-900 dark:text-white font-mono", children: [
|
|
40396
40266
|
Math.round(value),
|
|
40397
40267
|
suffix
|
|
40398
40268
|
] })
|
|
40399
40269
|
] }),
|
|
40400
|
-
/* @__PURE__ */
|
|
40270
|
+
/* @__PURE__ */ jsx44("div", { className: "h-2 bg-slate-300 dark:bg-slate-800 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx44(
|
|
40401
40271
|
"div",
|
|
40402
40272
|
{
|
|
40403
40273
|
className: `h-full transition-all duration-300 ${colorClasses[color]}`,
|
|
@@ -40409,8 +40279,8 @@ var MetricBar = ({ label, value, suffix, color }) => {
|
|
|
40409
40279
|
var Metrics_default = MetricBar;
|
|
40410
40280
|
|
|
40411
40281
|
// src/components/xcoder/Panel.tsx
|
|
40412
|
-
import { useState as
|
|
40413
|
-
import { Fragment as
|
|
40282
|
+
import { useState as useState28, useEffect as useEffect21 } from "react";
|
|
40283
|
+
import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
40414
40284
|
var convertServiceToOption = (serviceString) => {
|
|
40415
40285
|
const match = serviceString.match(/^([^@]+)@/);
|
|
40416
40286
|
if (!match) {
|
|
@@ -40424,12 +40294,12 @@ var convertServiceToOption = (serviceString) => {
|
|
|
40424
40294
|
return { label, value: rawValue };
|
|
40425
40295
|
};
|
|
40426
40296
|
var EncoderDecoderPanel = ({ index: index3 }) => {
|
|
40427
|
-
const [status, setStatus] =
|
|
40428
|
-
const [modes, setModes] =
|
|
40429
|
-
const [oldModes, setOldModes] =
|
|
40430
|
-
const [open, setOpen] =
|
|
40431
|
-
const [optionsList, setOptionsList] =
|
|
40432
|
-
|
|
40297
|
+
const [status, setStatus] = useState28("idle");
|
|
40298
|
+
const [modes, setModes] = useState28([]);
|
|
40299
|
+
const [oldModes, setOldModes] = useState28(modes);
|
|
40300
|
+
const [open, setOpen] = useState28(false);
|
|
40301
|
+
const [optionsList, setOptionsList] = useState28([]);
|
|
40302
|
+
useEffect21(() => {
|
|
40433
40303
|
const cleanupSocket = subscribeToWebsocket(buildWsUrl("/"), (data) => {
|
|
40434
40304
|
setStatus(data?.services[`xcoder_${index3}`].status);
|
|
40435
40305
|
});
|
|
@@ -40463,52 +40333,52 @@ var EncoderDecoderPanel = ({ index: index3 }) => {
|
|
|
40463
40333
|
m: state ? "stop" : "start"
|
|
40464
40334
|
});
|
|
40465
40335
|
};
|
|
40466
|
-
return /* @__PURE__ */
|
|
40467
|
-
/* @__PURE__ */
|
|
40468
|
-
/* @__PURE__ */
|
|
40469
|
-
/* @__PURE__ */
|
|
40470
|
-
/* @__PURE__ */
|
|
40336
|
+
return /* @__PURE__ */ jsxs40("div", { className: "bg-gray-200 dark:bg-slate-900/50 border bg-gray-200 border-gray-400 dark:border-slate-800 rounded-lg", children: [
|
|
40337
|
+
/* @__PURE__ */ jsxs40("div", { className: "px-6 py-3 border-b border-slate-800 flex items-center justify-between", children: [
|
|
40338
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-3", children: [
|
|
40339
|
+
/* @__PURE__ */ jsx45(Radio, { className: "w-5 h-5 text-blue-500" }),
|
|
40340
|
+
/* @__PURE__ */ jsx45("h1", { className: "text-base font-medium text-gray-800 dark:text-white hover:underline", children: /* @__PURE__ */ jsxs40("a", { href: `/page/${modes[index3 - 1]?.split("@")[0] ?? "encoder-dvb"}?channel=${index3}`, children: [
|
|
40471
40341
|
"Xcoder BMD Video Interface (",
|
|
40472
40342
|
index3,
|
|
40473
40343
|
")"
|
|
40474
40344
|
] }) })
|
|
40475
40345
|
] }),
|
|
40476
|
-
/* @__PURE__ */
|
|
40477
|
-
/* @__PURE__ */
|
|
40346
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-4", children: [
|
|
40347
|
+
/* @__PURE__ */ jsx45(
|
|
40478
40348
|
"button",
|
|
40479
40349
|
{
|
|
40480
40350
|
onClick: () => startStop(status == "running"),
|
|
40481
40351
|
className: `flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-all ${status == "running" ? "bg-red-600 hover:bg-red-700 text-white" : "bg-blue-600 hover:bg-blue-700 text-white"}`,
|
|
40482
|
-
children: status == "running" ? /* @__PURE__ */
|
|
40483
|
-
/* @__PURE__ */
|
|
40352
|
+
children: status == "running" ? /* @__PURE__ */ jsxs40(Fragment8, { children: [
|
|
40353
|
+
/* @__PURE__ */ jsx45(Pause, { className: "w-4 h-4" }),
|
|
40484
40354
|
"Stop"
|
|
40485
|
-
] }) : /* @__PURE__ */
|
|
40486
|
-
/* @__PURE__ */
|
|
40355
|
+
] }) : /* @__PURE__ */ jsxs40(Fragment8, { children: [
|
|
40356
|
+
/* @__PURE__ */ jsx45(Play, { className: "w-4 h-4" }),
|
|
40487
40357
|
"Start"
|
|
40488
40358
|
] })
|
|
40489
40359
|
}
|
|
40490
40360
|
),
|
|
40491
|
-
/* @__PURE__ */
|
|
40492
|
-
/* @__PURE__ */
|
|
40493
|
-
/* @__PURE__ */
|
|
40361
|
+
/* @__PURE__ */ jsxs40("div", { className: `flex w-[100px] justify-center items-center gap-2 px-4 py-2 rounded-md ${status == "running" ? "bg-yellow-600" : "bg-slate-700"}`, children: [
|
|
40362
|
+
/* @__PURE__ */ jsx45("div", { className: `w-2 h-2 rounded-full bg-white ${status == "running" ? "block" : "hidden"}` }),
|
|
40363
|
+
/* @__PURE__ */ jsx45("span", { className: "text-sm text-slate-100 font-mono font-bold", children: status == "running" ? "READY" : "STANDBY" })
|
|
40494
40364
|
] }),
|
|
40495
|
-
/* @__PURE__ */
|
|
40365
|
+
/* @__PURE__ */ jsx45(
|
|
40496
40366
|
"button",
|
|
40497
40367
|
{
|
|
40498
40368
|
onClick: () => setOpen(true),
|
|
40499
40369
|
className: "p-2 rounded-md transition-colors",
|
|
40500
|
-
children: /* @__PURE__ */
|
|
40370
|
+
children: /* @__PURE__ */ jsx45(Settings, { className: "w-5 h-5 text-slate-400 hover:text-blue-400" })
|
|
40501
40371
|
}
|
|
40502
40372
|
)
|
|
40503
40373
|
] })
|
|
40504
40374
|
] }),
|
|
40505
|
-
/* @__PURE__ */
|
|
40375
|
+
/* @__PURE__ */ jsx45(
|
|
40506
40376
|
Modal_default,
|
|
40507
40377
|
{
|
|
40508
40378
|
open,
|
|
40509
40379
|
setOpen,
|
|
40510
40380
|
title: "Switching Operation Mode",
|
|
40511
|
-
element: /* @__PURE__ */
|
|
40381
|
+
element: /* @__PURE__ */ jsx45("div", { children: optionsList[index3 - 1] && /* @__PURE__ */ jsx45("div", { className: "relative p-6", children: /* @__PURE__ */ jsx45(
|
|
40512
40382
|
SelectField_default,
|
|
40513
40383
|
{
|
|
40514
40384
|
label: "New Mode",
|
|
@@ -40529,15 +40399,15 @@ var EncoderDecoderPanel = ({ index: index3 }) => {
|
|
|
40529
40399
|
}
|
|
40530
40400
|
}
|
|
40531
40401
|
),
|
|
40532
|
-
/* @__PURE__ */
|
|
40402
|
+
/* @__PURE__ */ jsx45("div", { className: "p-6", children: /* @__PURE__ */ jsx45(Preview_default, { index: index3, setVuPts: () => {
|
|
40533
40403
|
} }) })
|
|
40534
40404
|
] });
|
|
40535
40405
|
};
|
|
40536
40406
|
var Panel_default = EncoderDecoderPanel;
|
|
40537
40407
|
|
|
40538
40408
|
// src/components/xcoder/Preview.tsx
|
|
40539
|
-
import { useEffect as
|
|
40540
|
-
import { jsx as
|
|
40409
|
+
import { useEffect as useEffect22, useLayoutEffect as useLayoutEffect3, useMemo as useMemo8, useRef as useRef10, useState as useState29 } from "react";
|
|
40410
|
+
import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
40541
40411
|
var Preview = ({
|
|
40542
40412
|
index: index3,
|
|
40543
40413
|
setVuPts,
|
|
@@ -40547,8 +40417,8 @@ var Preview = ({
|
|
|
40547
40417
|
orientation = "horizontal"
|
|
40548
40418
|
}) => {
|
|
40549
40419
|
const logEndRef = useRef10(null);
|
|
40550
|
-
const [message, setMessage] =
|
|
40551
|
-
|
|
40420
|
+
const [message, setMessage] = useState29([]);
|
|
40421
|
+
useEffect22(() => {
|
|
40552
40422
|
const cleanupSocket = subscribeToWebsocket(buildWsUrl("/"), (data) => {
|
|
40553
40423
|
const aux = data?.services[`xcoder_${index3}`];
|
|
40554
40424
|
setMessage(aux.decklinkEvents.split("\n"));
|
|
@@ -40557,21 +40427,21 @@ var Preview = ({
|
|
|
40557
40427
|
cleanupSocket();
|
|
40558
40428
|
};
|
|
40559
40429
|
}, []);
|
|
40560
|
-
|
|
40430
|
+
useEffect22(() => {
|
|
40561
40431
|
if (logEndRef.current) {
|
|
40562
40432
|
logEndRef.current.scrollTop = logEndRef.current.scrollHeight;
|
|
40563
40433
|
}
|
|
40564
40434
|
}, [message]);
|
|
40565
|
-
const [vuChannels, setVuChannels] =
|
|
40435
|
+
const [vuChannels, setVuChannels] = useState29(
|
|
40566
40436
|
Array(8).fill({ left: 0, right: 0 })
|
|
40567
40437
|
);
|
|
40568
40438
|
const channelCount = 8;
|
|
40569
40439
|
const vuBars = useMemo8(() => {
|
|
40570
|
-
return Array.from({ length: channelCount }, (_7, i14) => /* @__PURE__ */
|
|
40440
|
+
return Array.from({ length: channelCount }, (_7, i14) => /* @__PURE__ */ jsx46(VUMeter_default, { index: i14, volume: vuChannels }, `vu-bar-${i14}`));
|
|
40571
40441
|
}, [channelCount, vuChannels]);
|
|
40572
40442
|
const playerRef = useRef10(null);
|
|
40573
40443
|
const vuRef = useRef10(null);
|
|
40574
|
-
const [height, setHeight] =
|
|
40444
|
+
const [height, setHeight] = useState29("auto");
|
|
40575
40445
|
useLayoutEffect3(() => {
|
|
40576
40446
|
const p8 = playerRef.current;
|
|
40577
40447
|
const v6 = vuRef.current;
|
|
@@ -40586,15 +40456,15 @@ var Preview = ({
|
|
|
40586
40456
|
}
|
|
40587
40457
|
;
|
|
40588
40458
|
}, []);
|
|
40589
|
-
const [isOpen, setIsOpen] =
|
|
40590
|
-
const logData = message.map((log, i14) => /* @__PURE__ */
|
|
40591
|
-
return /* @__PURE__ */
|
|
40592
|
-
/* @__PURE__ */
|
|
40459
|
+
const [isOpen, setIsOpen] = useState29(false);
|
|
40460
|
+
const logData = message.map((log, i14) => /* @__PURE__ */ jsx46("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx46("span", { className: "text-slate-900 dark:text-slate-300 break-words", children: log }) }, i14));
|
|
40461
|
+
return /* @__PURE__ */ jsxs41("div", { className: `"w-full h-full" ${orientation === "horizontal" ? "" : "py-6"}`, children: [
|
|
40462
|
+
/* @__PURE__ */ jsxs41(
|
|
40593
40463
|
"div",
|
|
40594
40464
|
{
|
|
40595
40465
|
className: `grid gap-6 mb-5 ${orientation === "horizontal" ? "grid-cols-[1fr_300px] items-start" : "grid-cols-1"}`,
|
|
40596
40466
|
children: [
|
|
40597
|
-
/* @__PURE__ */
|
|
40467
|
+
/* @__PURE__ */ jsx46("div", { ref: playerRef, className: "bg-black rounded-lg overflow-hidden aspect-video", children: /* @__PURE__ */ jsx46("div", { className: "w-full h-full relative flex items-center justify-center", children: /* @__PURE__ */ jsx46(
|
|
40598
40468
|
VideoPlayer_default,
|
|
40599
40469
|
{
|
|
40600
40470
|
pgmIndex: index3,
|
|
@@ -40603,10 +40473,10 @@ var Preview = ({
|
|
|
40603
40473
|
setVuChannels
|
|
40604
40474
|
}
|
|
40605
40475
|
) }) }),
|
|
40606
|
-
/* @__PURE__ */
|
|
40607
|
-
/* @__PURE__ */
|
|
40608
|
-
showStreamControl && /* @__PURE__ */
|
|
40609
|
-
showDlog && /* @__PURE__ */
|
|
40476
|
+
/* @__PURE__ */ jsxs41("div", { className: `flex flex-col ${orientation === "horizontal" ? "h-full" : "h-[200px]"}`, children: [
|
|
40477
|
+
/* @__PURE__ */ jsx46("div", { ref: vuRef, className: `bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-4 ${showDlog || showStreamControl ? "mb-5" : "flex-1"}`, children: /* @__PURE__ */ jsx46("div", { className: `flex justify-between items-end ${showDlog || showStreamControl ? "h-32" : "h-full"}`, children: vuBars }) }),
|
|
40478
|
+
showStreamControl && /* @__PURE__ */ jsx46(StreamControl_default, { index: index3 }),
|
|
40479
|
+
showDlog && /* @__PURE__ */ jsx46("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg overflow-hidden flex-1", children: /* @__PURE__ */ jsxs41(
|
|
40610
40480
|
"div",
|
|
40611
40481
|
{
|
|
40612
40482
|
ref: logEndRef,
|
|
@@ -40617,7 +40487,7 @@ var Preview = ({
|
|
|
40617
40487
|
style: { height },
|
|
40618
40488
|
onClick: () => setIsOpen(true),
|
|
40619
40489
|
children: [
|
|
40620
|
-
/* @__PURE__ */
|
|
40490
|
+
/* @__PURE__ */ jsx46(M10, { id: "tooltip" }),
|
|
40621
40491
|
logData
|
|
40622
40492
|
]
|
|
40623
40493
|
}
|
|
@@ -40626,15 +40496,15 @@ var Preview = ({
|
|
|
40626
40496
|
]
|
|
40627
40497
|
}
|
|
40628
40498
|
),
|
|
40629
|
-
showFflog && /* @__PURE__ */
|
|
40630
|
-
/* @__PURE__ */
|
|
40499
|
+
showFflog && /* @__PURE__ */ jsx46(Fflog_default, { index: index3 }),
|
|
40500
|
+
/* @__PURE__ */ jsx46(
|
|
40631
40501
|
Modal_default,
|
|
40632
40502
|
{
|
|
40633
40503
|
open: isOpen,
|
|
40634
40504
|
setOpen: () => setIsOpen(!isOpen),
|
|
40635
40505
|
title: "Log Message",
|
|
40636
|
-
element: /* @__PURE__ */
|
|
40637
|
-
icon: /* @__PURE__ */
|
|
40506
|
+
element: /* @__PURE__ */ jsx46("div", { className: "custom-scroll overflow-y-auto p-3 h-[300px]", children: logData }),
|
|
40507
|
+
icon: /* @__PURE__ */ jsx46(FileClock, { "aria-hidden": "true", className: "size-6 text-yellow-600" }),
|
|
40638
40508
|
positiveLabel: "Copy",
|
|
40639
40509
|
positiveCommand: () => {
|
|
40640
40510
|
navigator.clipboard.writeText(message.join("\n"));
|
|
@@ -40646,11 +40516,11 @@ var Preview = ({
|
|
|
40646
40516
|
var Preview_default = Preview;
|
|
40647
40517
|
|
|
40648
40518
|
// src/components/xcoder/StreamControl.tsx
|
|
40649
|
-
import { useState as
|
|
40650
|
-
import { jsx as
|
|
40519
|
+
import { useState as useState30 } from "react";
|
|
40520
|
+
import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
40651
40521
|
var StreamControl = ({ index: index3 }) => {
|
|
40652
|
-
const [bufferValue, setBufferValue] =
|
|
40653
|
-
const [syncValue, setSyncValue] =
|
|
40522
|
+
const [bufferValue, setBufferValue] = useState30(0);
|
|
40523
|
+
const [syncValue, setSyncValue] = useState30(0);
|
|
40654
40524
|
const minBuffer = 0;
|
|
40655
40525
|
const maxBuffer = 100;
|
|
40656
40526
|
const minSync = -30;
|
|
@@ -40663,45 +40533,45 @@ var StreamControl = ({ index: index3 }) => {
|
|
|
40663
40533
|
true,
|
|
40664
40534
|
1e3
|
|
40665
40535
|
);
|
|
40666
|
-
return /* @__PURE__ */
|
|
40667
|
-
/* @__PURE__ */
|
|
40668
|
-
/* @__PURE__ */
|
|
40669
|
-
/* @__PURE__ */
|
|
40670
|
-
/* @__PURE__ */
|
|
40671
|
-
/* @__PURE__ */
|
|
40536
|
+
return /* @__PURE__ */ jsxs42("div", { className: "w-80 space-y-3", children: [
|
|
40537
|
+
/* @__PURE__ */ jsx47("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-3 max-h-[300px] min-h-[100px] overflow-auto", children: /* @__PURE__ */ jsxs42("div", { className: "text-xs space-y-2 text-gray-800 dark:text-slate-200", children: [
|
|
40538
|
+
/* @__PURE__ */ jsxs42("div", { className: "space-y-1", children: [
|
|
40539
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex gap-2", children: [
|
|
40540
|
+
/* @__PURE__ */ jsx47("span", { className: "font-medium", children: "Service Name:" }),
|
|
40541
|
+
/* @__PURE__ */ jsx47("span", { className: "truncate", children: data?.service_name ?? "\u2014" })
|
|
40672
40542
|
] }),
|
|
40673
|
-
/* @__PURE__ */
|
|
40674
|
-
/* @__PURE__ */
|
|
40675
|
-
/* @__PURE__ */
|
|
40543
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex gap-2", children: [
|
|
40544
|
+
/* @__PURE__ */ jsx47("span", { className: "font-medium", children: "Service Provider:" }),
|
|
40545
|
+
/* @__PURE__ */ jsx47("span", { className: "truncate", children: data?.service_provider ?? "\u2014" })
|
|
40676
40546
|
] })
|
|
40677
40547
|
] }),
|
|
40678
|
-
/* @__PURE__ */
|
|
40679
|
-
/* @__PURE__ */
|
|
40680
|
-
/* @__PURE__ */
|
|
40681
|
-
/* @__PURE__ */
|
|
40548
|
+
/* @__PURE__ */ jsxs42("div", { className: "space-y-1.5 pt-2", children: [
|
|
40549
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
|
|
40550
|
+
/* @__PURE__ */ jsx47(Video, { className: "w-4 h-4 text-sky-400" }),
|
|
40551
|
+
/* @__PURE__ */ jsxs42("span", { className: "truncate", children: [
|
|
40682
40552
|
"Video 0: ",
|
|
40683
40553
|
data?.input_streans[1].input_stream.type
|
|
40684
40554
|
] })
|
|
40685
40555
|
] }),
|
|
40686
|
-
/* @__PURE__ */
|
|
40687
|
-
/* @__PURE__ */
|
|
40688
|
-
/* @__PURE__ */
|
|
40556
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
|
|
40557
|
+
/* @__PURE__ */ jsx47(Volume2, { className: "w-4 h-4 text-emerald-400" }),
|
|
40558
|
+
/* @__PURE__ */ jsxs42("span", { className: "truncate", children: [
|
|
40689
40559
|
"Audio 1: ",
|
|
40690
40560
|
data?.input_streans[0].input_stream.type
|
|
40691
40561
|
] })
|
|
40692
40562
|
] })
|
|
40693
40563
|
] })
|
|
40694
40564
|
] }) }),
|
|
40695
|
-
/* @__PURE__ */
|
|
40696
|
-
/* @__PURE__ */
|
|
40697
|
-
/* @__PURE__ */
|
|
40698
|
-
/* @__PURE__ */
|
|
40699
|
-
/* @__PURE__ */
|
|
40565
|
+
/* @__PURE__ */ jsx47("div", { className: "bg-gray-100 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-lg p-3", children: /* @__PURE__ */ jsxs42("div", { className: "space-y-3 text-slate-200 text-xs", children: [
|
|
40566
|
+
/* @__PURE__ */ jsx47(SliderField_default, { value: bufferValue, setValue: setBufferValue, label: "Fifo Size:", min: minBuffer, max: maxBuffer }),
|
|
40567
|
+
/* @__PURE__ */ jsx47(SliderField_default, { value: syncValue, setValue: setSyncValue, label: "A/V Sync:", min: minSync, max: maxSync, content: ["<", ">"], step: 10 }),
|
|
40568
|
+
/* @__PURE__ */ jsxs42("div", { className: "pt-2 border-t border-slate-700 text-xs text-gray-700 dark:text-slate-300 flex justify-between", children: [
|
|
40569
|
+
/* @__PURE__ */ jsxs42("span", { children: [
|
|
40700
40570
|
"Buffer: ",
|
|
40701
40571
|
bufferValue,
|
|
40702
40572
|
" frames"
|
|
40703
40573
|
] }),
|
|
40704
|
-
/* @__PURE__ */
|
|
40574
|
+
/* @__PURE__ */ jsxs42("span", { children: [
|
|
40705
40575
|
"Sync: ",
|
|
40706
40576
|
syncValue > 0 ? "+" : "",
|
|
40707
40577
|
syncValue,
|
|
@@ -40714,8 +40584,8 @@ var StreamControl = ({ index: index3 }) => {
|
|
|
40714
40584
|
var StreamControl_default = StreamControl;
|
|
40715
40585
|
|
|
40716
40586
|
// src/components/xcoder/VideoPlayer.tsx
|
|
40717
|
-
import { useEffect as
|
|
40718
|
-
import { jsx as
|
|
40587
|
+
import { useEffect as useEffect23, useMemo as useMemo9, useRef as useRef11 } from "react";
|
|
40588
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
40719
40589
|
var VideoPlayer = ({
|
|
40720
40590
|
pgmIndex,
|
|
40721
40591
|
vuChannels,
|
|
@@ -40726,7 +40596,7 @@ var VideoPlayer = ({
|
|
|
40726
40596
|
const videoRef = useRef11(dummyCanvas);
|
|
40727
40597
|
const prevRawChannelsRef = useRef11(null);
|
|
40728
40598
|
const playerRef = useRef11(null);
|
|
40729
|
-
|
|
40599
|
+
useEffect23(() => {
|
|
40730
40600
|
let cancelled = false;
|
|
40731
40601
|
if (!videoRef.current) {
|
|
40732
40602
|
console.warn("Video canvas not ready yet");
|
|
@@ -40847,7 +40717,7 @@ var VideoPlayer = ({
|
|
|
40847
40717
|
initPlayer();
|
|
40848
40718
|
}
|
|
40849
40719
|
}, [pgmIndex]);
|
|
40850
|
-
return /* @__PURE__ */
|
|
40720
|
+
return /* @__PURE__ */ jsx48(
|
|
40851
40721
|
"canvas",
|
|
40852
40722
|
{
|
|
40853
40723
|
ref: videoRef,
|
|
@@ -40858,15 +40728,15 @@ var VideoPlayer = ({
|
|
|
40858
40728
|
var VideoPlayer_default = VideoPlayer;
|
|
40859
40729
|
|
|
40860
40730
|
// src/components/xcoder/VUMeter.tsx
|
|
40861
|
-
import { useRef as useRef12, useEffect as
|
|
40862
|
-
import { jsx as
|
|
40731
|
+
import { useRef as useRef12, useEffect as useEffect24, useCallback as useCallback4, useState as useState31 } from "react";
|
|
40732
|
+
import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
40863
40733
|
var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) => {
|
|
40864
|
-
const [tickerTarget, setTickerTarget] =
|
|
40865
|
-
const [tickerTransition, setTickerTransition] =
|
|
40734
|
+
const [tickerTarget, setTickerTarget] = useState31({ left: 0, right: 0 });
|
|
40735
|
+
const [tickerTransition, setTickerTransition] = useState31({
|
|
40866
40736
|
left: 0,
|
|
40867
40737
|
right: 0
|
|
40868
40738
|
});
|
|
40869
|
-
const [resetVUTimeout, setResetVUTimeout] =
|
|
40739
|
+
const [resetVUTimeout, setResetVUTimeout] = useState31(0);
|
|
40870
40740
|
const tickerLeftRef = useRef12(null);
|
|
40871
40741
|
const tickerRightRef = useRef12(null);
|
|
40872
40742
|
const blockerLeftRef = useRef12(null);
|
|
@@ -40921,7 +40791,7 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
|
|
|
40921
40791
|
} catch (e10) {
|
|
40922
40792
|
}
|
|
40923
40793
|
}, []);
|
|
40924
|
-
|
|
40794
|
+
useEffect24(() => {
|
|
40925
40795
|
calcVolume();
|
|
40926
40796
|
if (resetVUTimeout) {
|
|
40927
40797
|
clearTimeout(resetVUTimeout);
|
|
@@ -40936,9 +40806,9 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
|
|
|
40936
40806
|
const MIN_DB = -70;
|
|
40937
40807
|
const MAX_DB = 0;
|
|
40938
40808
|
const measures = [0, -10, -20, -30, -40, -50, -60, -70];
|
|
40939
|
-
return /* @__PURE__ */
|
|
40940
|
-
/* @__PURE__ */
|
|
40941
|
-
return /* @__PURE__ */
|
|
40809
|
+
return /* @__PURE__ */ jsxs43("div", { className: "flex w-full h-full justify-center", children: [
|
|
40810
|
+
/* @__PURE__ */ jsx49("div", { className: displayMarks ? "mt-[60px]" : "hidden", children: measures.map((db) => {
|
|
40811
|
+
return /* @__PURE__ */ jsxs43(
|
|
40942
40812
|
"div",
|
|
40943
40813
|
{
|
|
40944
40814
|
style: { marginBottom: `${(db - MIN_DB) / (MAX_DB - MIN_DB) * 100}px`, marginRight: "25px", textAlignLast: "center" },
|
|
@@ -40959,15 +40829,15 @@ var VUBar = ({ index: index3, volume, width = "15px", displayMarks = false }) =>
|
|
|
40959
40829
|
db
|
|
40960
40830
|
);
|
|
40961
40831
|
}) }),
|
|
40962
|
-
/* @__PURE__ */
|
|
40963
|
-
/* @__PURE__ */
|
|
40964
|
-
/* @__PURE__ */
|
|
40965
|
-
/* @__PURE__ */
|
|
40966
|
-
/* @__PURE__ */
|
|
40832
|
+
/* @__PURE__ */ jsxs43("div", { className: `h-full w-full text-xs text-center text-white`, style: { maxWidth: `${width}` }, children: [
|
|
40833
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex border border-gray-400 w-full h-[96%] rotate-180 scale-x-[-1]", children: [
|
|
40834
|
+
/* @__PURE__ */ jsxs43("div", { ref: fillerRef, className: "w-1/2 h-full", style: { background: "linear-gradient(180deg, rgba(0, 187, 0, 1) 0%, rgba(255, 162, 0, 1) 50%, rgba(255, 0, 0, 1) 100%)", borderRadius: "inherit" }, children: [
|
|
40835
|
+
/* @__PURE__ */ jsx49("div", { ref: blockerLeftRef, className: "absolute bg-gray-200 dark:bg-[#18191d] bottom-0 w-1/2", style: { height: `${100 - volume[index3].left}%`, transition: "height 0.1s ease-out" } }),
|
|
40836
|
+
/* @__PURE__ */ jsx49("div", { ref: tickerLeftRef, className: "absolute h-[5px] w-1/2 bg-white border border-black", style: { top: `${tickerTarget.left}%`, transition: `top ${tickerTransition.left}s ease-out` } })
|
|
40967
40837
|
] }),
|
|
40968
|
-
/* @__PURE__ */
|
|
40969
|
-
/* @__PURE__ */
|
|
40970
|
-
/* @__PURE__ */
|
|
40838
|
+
/* @__PURE__ */ jsxs43("div", { className: "w-1/2 h-full", style: { background: "linear-gradient(180deg, rgba(0, 187, 0, 1) 0%, rgba(255, 162, 0, 1) 50%, rgba(255, 0, 0, 1) 100%)", borderRadius: "inherit" }, children: [
|
|
40839
|
+
/* @__PURE__ */ jsx49("div", { ref: blockerRightRef, className: "absolute bg-gray-200 dark:bg-[#18191d] bottom-0 w-1/2", style: { height: `${100 - volume[index3].right}%`, transition: "height 0.1s ease-out" } }),
|
|
40840
|
+
/* @__PURE__ */ jsx49("div", { ref: tickerRightRef, className: "absolute h-[5px] w-1/2 bg-white border border-black", style: { top: `${tickerTarget.right}%`, transition: `top ${tickerTransition.right}s ease-out` } })
|
|
40971
40841
|
] })
|
|
40972
40842
|
] }),
|
|
40973
40843
|
index3 + 1
|
|
@@ -41008,7 +40878,6 @@ export {
|
|
|
41008
40878
|
Protocol_default as Protocol,
|
|
41009
40879
|
ProtocolGroup_default as ProtocolGroup,
|
|
41010
40880
|
RangeField_default as RangeField,
|
|
41011
|
-
RemoteModule,
|
|
41012
40881
|
RequireAuth_default as RequireAuth,
|
|
41013
40882
|
SaveDiscard_default as SaveDiscard,
|
|
41014
40883
|
Section_default as Section,
|