import * as ort from 'onnxruntime-web'; import { bq as PolicyActionChunk } from './types-Bu8Aki_j.js'; import 'react'; import '@react-three/fiber'; import 'three'; /** * @license * SPDX-License-Identifier: Apache-2.0 * * Optional ONNX Runtime Web helpers for browser policy demos. * * This entry point is exported as `mujoco-react/onnx` so the main package does * not import or bundle `onnxruntime-web`. */ type OnnxPolicyDtype = 'float32' | 'float64' | 'int32' | 'int64' | 'bool' | string; interface OnnxPolicyTensorSpec { name: string; shape: number[]; dtype: OnnxPolicyDtype; } interface OnnxPolicyImageSpec { width: number; height: number; channels?: number; layout?: 'CHW' | 'HWC' | string; range?: readonly [number, number]; } interface OnnxPolicyManifest { model: string; variants?: Record; fps?: number; joints?: string[]; cameras?: string[]; image?: OnnxPolicyImageSpec; chunk_size?: number; n_action_steps?: number; inputs: OnnxPolicyTensorSpec[]; output: OnnxPolicyTensorSpec & { units?: string; }; [key: string]: unknown; } interface LoadOnnxPolicyManifestResult { manifest: TManifest; manifestUrl: URL; modelUrl: URL; } interface CreateOnnxPolicySessionOptions { manifestUrl: string | URL; variant?: string; runtime: typeof ort; sessionOptions?: ort.InferenceSession.SessionOptions; fetcher?: typeof fetch; readManifest?: (response: Response) => Promise; } interface OnnxPolicySession extends LoadOnnxPolicyManifestResult { session: ort.InferenceSession; } declare function loadOnnxPolicyManifest(manifestUrlInput: string | URL, options?: Pick, 'variant' | 'fetcher' | 'readManifest'>): Promise>; declare function createOnnxPolicySession(options: CreateOnnxPolicySessionOptions): Promise>; declare function onnxTensorToPolicyActionChunk(tensor: ort.Tensor, actionSize?: number, maxActions?: number): PolicyActionChunk; export { type CreateOnnxPolicySessionOptions, type LoadOnnxPolicyManifestResult, type OnnxPolicyDtype, type OnnxPolicyImageSpec, type OnnxPolicyManifest, type OnnxPolicySession, type OnnxPolicyTensorSpec, createOnnxPolicySession, loadOnnxPolicyManifest, onnxTensorToPolicyActionChunk };