{
  "version": 3,
  "sources": ["../src/index.ts", "../src/register-devices.ts", "../src/create-test-device.ts", "../src/null-device/null-adapter.ts", "../src/null-device/null-device.ts", "../src/null-device/null-device-info.ts", "../src/null-device/null-device-features.ts", "../src/null-device/null-canvas-context.ts", "../src/null-device/resources/null-framebuffer.ts", "../src/null-device/resources/null-buffer.ts", "../src/null-device/resources/null-shader.ts", "../src/null-device/resources/null-command-encoder.ts", "../src/null-device/resources/null-command-buffer.ts", "../src/null-device/resources/null-render-pass.ts", "../src/null-device/resources/null-sampler.ts", "../src/null-device/resources/null-texture.ts", "../src/null-device/resources/null-texture-view.ts", "../src/null-device/resources/null-render-pipeline.ts", "../src/null-device/resources/null-vertex-array.ts", "../src/null-device/resources/null-transform-feedback.ts", "../src/null-device/resources/null-query-set.ts", "../src/deprecated/classic-animation-loop.ts", "../src/test-runner.ts", "../src/utils/get-bounding-box.ts", "../src/snapshot-test-runner.ts", "../src/performance-test-runner.ts", "../src/utils/check-type.ts", "../src/utils/deep-copy.ts", "../src/utils/resource-tracker.ts", "../src/deprecated/sync-test-device.ts"],
  "sourcesContent": ["import './register-devices';\n\n// TEST RUNNERS\nexport type {TestRunnerTestCase} from './test-runner';\nexport type {SnapshotTestRunnerTestCase} from './snapshot-test-runner';\n\nexport {SnapshotTestRunner} from './snapshot-test-runner';\nexport {PerformanceTestRunner} from './performance-test-runner';\n\n// TEST DEVICES\nexport {\n  getTestDevices,\n  getTestDevice,\n  getWebGLTestDevice,\n  getWebGPUTestDevice,\n  getNullTestDevice\n} from './create-test-device';\n\n// Null device\nexport {nullAdapter, NullAdapter} from './null-device/null-adapter';\nexport {NullDevice} from './null-device/null-device';\n\n// UTILS\nexport {checkType} from './utils/check-type';\nexport {deepCopy} from './utils/deep-copy';\nexport {getResourceCounts, getLeakedResources} from './utils/resource-tracker';\n\n// DEPRECATED\nexport {createTestDevice, webglDevice} from './deprecated/sync-test-device';\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {luma} from '@luma.gl/core';\nimport {webgl2Adapter} from '@luma.gl/webgl';\nimport {webgpuAdapter} from '@luma.gl/webgpu';\n\nluma.registerAdapters([webgl2Adapter, webgpuAdapter]);\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Device, CanvasContextProps} from '@luma.gl/core';\nimport {luma, log} from '@luma.gl/core';\nimport {webgl2Adapter, WebGLDevice} from '@luma.gl/webgl';\nimport {webgpuAdapter, WebGPUDevice} from '@luma.gl/webgpu';\nimport {nullAdapter} from './null-device/null-adapter';\nimport {NullDevice} from './null-device/null-device';\n\nconst DEFAULT_CANVAS_CONTEXT_PROPS: CanvasContextProps = {width: 1, height: 1};\n\n/** A null device intended for testing - @note Only available after getTestDevices() has completed */\nlet nullDevicePromise = makeNullTestDevice();\n/** This WebGL Device can be used directly but will not have WebGL debugging initialized */\nconst webglDevicePromise = makeWebGLTestDevice();\n/** A WebGL 2 Device intended for testing - @note Only available after getTestDevices() has completed */\nconst webgpuDevicePromise = makeWebGPUTestDevice();\n\n/** Includes WebGPU device if available */\nexport async function getTestDevices(\n  types: Readonly<('webgl' | 'webgpu' | 'null' | 'unknown')[]> = ['webgl', 'webgpu']\n): Promise<Device[]> {\n  const promises = types.map(type => getTestDevice(type));\n  const devices = await Promise.all(promises);\n  return devices.filter(device => device !== null);\n}\n\nexport async function getTestDevice(\n  type: 'webgl' | 'webgpu' | 'null' | 'unknown'\n): Promise<Device | null> {\n  switch (type) {\n    case 'webgl':\n      return webglDevicePromise;\n    case 'webgpu':\n      return webgpuDevicePromise;\n    case 'null':\n      return nullDevicePromise;\n    case 'unknown':\n      return null;\n  }\n}\n\n/** returns WebGPU device promise, if available */\nexport function getWebGPUTestDevice(): Promise<WebGPUDevice | null> {\n  return webgpuDevicePromise;\n}\n\n/** returns WebGL device promise, if available */\nexport async function getWebGLTestDevice(): Promise<WebGLDevice> {\n  return webglDevicePromise;\n}\n\n/** returns null device promise, if available */\nexport async function getNullTestDevice(): Promise<NullDevice> {\n  return nullDevicePromise;\n}\n\nasync function makeWebGPUTestDevice(): Promise<WebGPUDevice | null> {\n  const webgpuDeviceResolvers = withResolvers<WebGPUDevice | null>();\n  try {\n    const webgpuDevice = (await luma.createDevice({\n      id: 'webgpu-test-device',\n      type: 'webgpu',\n      adapters: [webgpuAdapter],\n      createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n      debug: true\n    })) as unknown as WebGPUDevice;\n    webgpuDeviceResolvers.resolve(webgpuDevice);\n  } catch (error) {\n    log.error(String(error))();\n    // @ts-ignore TODO\n    webgpuDeviceResolvers.resolve(null);\n  }\n  return webgpuDeviceResolvers.promise;\n}\n\n/** returns WebGL device promise, if available */\nasync function makeWebGLTestDevice(): Promise<WebGLDevice> {\n  const webglDeviceResolvers = withResolvers<WebGLDevice>();\n  try {\n    const webglDevice = (await luma.createDevice({\n      id: 'webgl-test-device',\n      type: 'webgl',\n      adapters: [webgl2Adapter],\n      createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n      debug: true,\n      debugWebGL: true\n    })) as unknown as WebGLDevice;\n    webglDeviceResolvers.resolve(webglDevice);\n  } catch (error) {\n    log.error(String(error))();\n    // @ts-ignore TODO\n    webglDeviceResolvers.resolve(null);\n  }\n  return webglDeviceResolvers.promise;\n}\n\n/** returns null device promise, if available */\nasync function makeNullTestDevice(): Promise<NullDevice> {\n  const nullDeviceResolvers = withResolvers<NullDevice>();\n  try {\n    const nullDevice = (await luma.createDevice({\n      id: 'null-test-device',\n      type: 'null',\n      adapters: [nullAdapter],\n      createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS,\n      debug: true,\n      debugWebGL: true\n    })) as unknown as NullDevice;\n    nullDeviceResolvers.resolve(nullDevice);\n  } catch (error) {\n    log.error(String(error))();\n    // @ts-ignore TODO\n    nullDevicePromise = Promise.resolve(null);\n  }\n  return nullDeviceResolvers.promise;\n}\n\n// HELPERS\n\n// TODO - replace with Promise.withResolvers once we upgrade TS baseline\nfunction withResolvers<T>(): {\n  promise: Promise<T>;\n  resolve: (t: T) => void;\n  reject: (error: Error) => void;\n} {\n  let resolve;\n  let reject;\n  const promise = new Promise<T>((_resolve, _reject) => {\n    resolve = _resolve;\n    reject = _reject;\n  });\n  // @ts-ignore Assigned in callback.\n  return {promise, resolve, reject};\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Adapter, DeviceProps} from '@luma.gl/core';\nimport {NullDevice} from './null-device';\n\nexport class NullAdapter extends Adapter {\n  /** type of device's created by this adapter */\n  readonly type: NullDevice['type'] = 'null';\n\n  constructor() {\n    super();\n    // @ts-ignore DEPRECATED For backwards compatibility luma.registerDevices\n    NullDevice.adapter = this;\n  }\n\n  isSupported(): boolean {\n    return true;\n  }\n\n  isDeviceHandle(handle: any): boolean {\n    return handle === null;\n  }\n\n  async attach(handle: null): Promise<NullDevice> {\n    return new NullDevice({});\n  }\n\n  async create(props: DeviceProps = {}): Promise<NullDevice> {\n    return new NullDevice(props);\n  }\n}\n\nexport const nullAdapter = new NullAdapter();\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n  DeviceProps,\n  CanvasContextProps,\n  VertexArray,\n  VertexArrayProps,\n  BufferProps,\n  ShaderProps,\n  SamplerProps,\n  TextureProps,\n  ExternalTexture,\n  ExternalTextureProps,\n  FramebufferProps,\n  RenderPipelineProps,\n  ComputePipeline,\n  ComputePipelineProps,\n  CommandEncoderProps,\n  TransformFeedbackProps,\n  QuerySetProps\n} from '@luma.gl/core';\nimport {Device, DeviceFeatures} from '@luma.gl/core';\n\nimport {NullDeviceInfo} from './null-device-info';\nimport {NullDeviceLimits} from './null-device-features';\nimport {NullCanvasContext} from './null-canvas-context';\nimport {NullBuffer} from './resources/null-buffer';\nimport {NullFramebuffer} from './resources/null-framebuffer';\nimport {NullShader} from './resources/null-shader';\nimport {NullCommandEncoder} from './resources/null-command-encoder';\nimport {NullSampler} from './resources/null-sampler';\nimport {NullTexture} from './resources/null-texture';\nimport {NullRenderPass} from './resources/null-render-pass';\nimport {NullRenderPipeline} from './resources/null-render-pipeline';\nimport {NullVertexArray} from './resources/null-vertex-array';\nimport {NullTransformFeedback} from './resources/null-transform-feedback';\nimport {NullQuerySet} from './resources/null-query-set';\n\n/** Do-nothing device implementation for testing */\nexport class NullDevice extends Device {\n  static isSupported(): boolean {\n    return true;\n  }\n  readonly type = 'null';\n  readonly handle = null;\n\n  readonly preferredColorFormat = 'rgba8unorm';\n  readonly preferredDepthFormat = 'depth24plus';\n\n  features: DeviceFeatures = new DeviceFeatures([], this.props._disabledFeatures);\n  limits: NullDeviceLimits = new NullDeviceLimits();\n  readonly info = NullDeviceInfo;\n\n  readonly canvasContext: NullCanvasContext;\n  override commandEncoder: NullCommandEncoder;\n\n  readonly lost: Promise<{reason: 'destroyed'; message: string}>;\n\n  constructor(props: DeviceProps) {\n    super({...props, id: props.id || 'null-device'});\n\n    const canvasContextProps = Device._getCanvasContextProps(props);\n    this.canvasContext = new NullCanvasContext(this, canvasContextProps);\n    this.lost = new Promise(resolve => {});\n    this.commandEncoder = new NullCommandEncoder(this, {id: 'null-command-encoder'});\n  }\n\n  /**\n   * Destroys the context\n   * @note Has no effect for null contexts\n   */\n  destroy(): void {}\n\n  get isLost(): boolean {\n    return false;\n  }\n\n  // IMPLEMENTATION OF ABSTRACT DEVICE\n\n  getTextureByteAlignment(): number {\n    return 1;\n  }\n\n  createCanvasContext(props: CanvasContextProps): NullCanvasContext {\n    return new NullCanvasContext(this, props);\n  }\n\n  createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): NullBuffer {\n    const newProps = this._normalizeBufferProps(props);\n    return new NullBuffer(this, newProps);\n  }\n\n  getDefaultRenderPass(): NullRenderPass {\n    return new NullRenderPass(this, {});\n  }\n\n  createTexture(props: TextureProps): NullTexture {\n    return new NullTexture(this, props);\n  }\n\n  createExternalTexture(props: ExternalTextureProps): ExternalTexture {\n    throw new Error('createExternalTexture() not implemented'); // return new Program(props);\n  }\n\n  createSampler(props: SamplerProps): NullSampler {\n    return new NullSampler(this, props);\n  }\n\n  createShader(props: ShaderProps): NullShader {\n    return new NullShader(this, props);\n  }\n\n  createFramebuffer(props: FramebufferProps): NullFramebuffer {\n    return new NullFramebuffer(this, props);\n  }\n\n  createVertexArray(props: VertexArrayProps): VertexArray {\n    return new NullVertexArray(this, props);\n  }\n\n  createTransformFeedback(props: TransformFeedbackProps): NullTransformFeedback {\n    return new NullTransformFeedback(this, props);\n  }\n\n  createQuerySet(props: QuerySetProps): NullQuerySet {\n    return new NullQuerySet(this, props);\n  }\n\n  createRenderPipeline(props: RenderPipelineProps): NullRenderPipeline {\n    return new NullRenderPipeline(this, props);\n  }\n\n  createComputePipeline(props?: ComputePipelineProps): ComputePipeline {\n    throw new Error('ComputePipeline not supported in WebGL');\n  }\n\n  override createCommandEncoder(props: CommandEncoderProps = {}): NullCommandEncoder {\n    return new NullCommandEncoder(this, props);\n  }\n\n  submit(): void {}\n\n  override setParametersWebGL(parameters: any): void {}\n\n  override getParametersWebGL(parameters: any): any {}\n\n  override withParametersWebGL(parameters: any, func: any): any {\n    const {nocatch = true} = parameters;\n    let value: any;\n    if (nocatch) {\n      // Avoid try catch to minimize stack size impact for safe execution paths\n      return func();\n    }\n    // Wrap in a try-catch to ensure that parameters are restored on exceptions\n    try {\n      value = func();\n    } catch {\n      // ignore\n    }\n    return value;\n  }\n\n  override _getDeviceSpecificTextureFormatCapabilities(format: any): any {\n    return format;\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {DeviceInfo} from '@luma.gl/core';\n\nexport const NullDeviceInfo = {\n  type: 'unknown',\n  gpu: 'software',\n  gpuType: 'unknown',\n  gpuBackend: 'unknown',\n  vendor: 'no one',\n  renderer: 'none',\n  version: '1.0',\n  shadingLanguage: 'glsl',\n  shadingLanguageVersion: 300\n} as const satisfies DeviceInfo;\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {DeviceLimits} from '@luma.gl/core';\n\nexport class NullDeviceLimits extends DeviceLimits {\n  maxTextureDimension1D = 0;\n  maxTextureDimension2D = 2048;\n  maxTextureDimension3D = 256;\n  maxTextureArrayLayers = 256;\n  maxBindGroups = 0;\n  maxDynamicUniformBuffersPerPipelineLayout = 0;\n  maxDynamicStorageBuffersPerPipelineLayout = 0;\n  maxSampledTexturesPerShaderStage = 8;\n  maxSamplersPerShaderStage = 16;\n  maxStorageBuffersPerShaderStage = 0;\n  maxStorageTexturesPerShaderStage = 0;\n  maxUniformBuffersPerShaderStage = 20;\n  maxUniformBufferBindingSize = 16384;\n  maxStorageBufferBindingSize = 0;\n  minUniformBufferOffsetAlignment = 0;\n  minStorageBufferOffsetAlignment = 0;\n  maxVertexBuffers = 16;\n  maxVertexAttributes = 16;\n  maxVertexBufferArrayStride = 2048;\n  maxInterStageShaderVariables = 60;\n  maxComputeWorkgroupStorageSize = 0;\n  maxComputeInvocationsPerWorkgroup = 0;\n  maxComputeWorkgroupSizeX = 0;\n  maxComputeWorkgroupSizeY = 0;\n  maxComputeWorkgroupSizeZ = 0;\n  maxComputeWorkgroupsPerDimension = 0;\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {CanvasContextProps} from '@luma.gl/core';\nimport {CanvasContext} from '@luma.gl/core';\nimport type {NullDevice} from './null-device';\nimport {NullFramebuffer} from './resources/null-framebuffer';\n\n/**\n * A WebGL Canvas Context which manages the canvas and handles drawing buffer resizing etc\n */\nexport class NullCanvasContext extends CanvasContext {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  presentationSize: [number, number] = [1, 1];\n  private _framebuffer: NullFramebuffer | null = null;\n\n  get [Symbol.toStringTag]() {\n    return 'NullCanvasContext';\n  }\n\n  constructor(device: NullDevice, props?: CanvasContextProps) {\n    // Note: Base class creates / looks up the canvas (unless under Node.js)\n    super(props);\n    this.device = device;\n\n    // Base class constructor cannot access derived methods/fields, so we need to call these functions in the subclass constructor\n    this._setAutoCreatedCanvasId(`${this.device.id}-canvas`);\n    this._updateDevice();\n  }\n\n  getCurrentFramebuffer(): NullFramebuffer {\n    // Setting handle to null returns a reference to the default framebuffer\n    this._framebuffer = this._framebuffer || new NullFramebuffer(this.device, {handle: null});\n    return this._framebuffer;\n  }\n\n  _updateDevice() {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {FramebufferProps} from '@luma.gl/core';\nimport {Framebuffer} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\nimport type {NullTextureView} from './null-texture-view';\n\nexport class NullFramebuffer extends Framebuffer {\n  device: NullDevice;\n  readonly handle = null;\n\n  colorAttachments: NullTextureView[] = [];\n  depthStencilAttachment: NullTextureView | null = null;\n\n  constructor(device: NullDevice, props: FramebufferProps) {\n    super(device, props);\n    this.device = device;\n  }\n\n  protected override updateAttachments(): void {\n    // Null framebuffers are JS only objects, nothing to\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Buffer, type BufferProps, type BufferMapCallback} from '@luma.gl/core';\nimport {type NullDevice} from '../null-device';\n\nexport class NullBuffer extends Buffer {\n  device: NullDevice;\n  readonly handle: 'null' | null = 'null';\n\n  byteLength: number;\n  private _storage: ArrayBuffer;\n\n  constructor(device: NullDevice, props: BufferProps = {}) {\n    super(device, props);\n    this.device = device;\n\n    const byteOffset = props.byteOffset || 0;\n    const byteLength = props.byteLength ?? (props.data ? props.data.byteLength + byteOffset : 0);\n\n    this.byteLength = byteLength;\n    this._storage = new ArrayBuffer(byteLength);\n\n    // If initial data is provided, copy it in\n    if (props.data) {\n      this.write(props.data, byteOffset);\n    }\n\n    this.trackAllocatedMemory(byteLength);\n  }\n\n  override destroy(): void {\n    if (!this.destroyed) {\n      super.destroy();\n      this.trackDeallocatedMemory();\n      // @ts-expect-error\n      this.handle = null;\n      // Clear internal storage\n      this._storage = new ArrayBuffer(0);\n    }\n  }\n\n  write(data: ArrayBufferLike | ArrayBufferView, byteOffset: number = 0): void {\n    const source = ArrayBuffer.isView(data)\n      ? new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n      : new Uint8Array(data);\n    const target = new Uint8Array(this._storage, byteOffset, source.byteLength);\n\n    if (byteOffset + source.byteLength > this.byteLength) {\n      throw new RangeError(`NullBuffer.write(): write would overflow buffer`);\n    }\n\n    target.set(source);\n    this._setDebugData(data, byteOffset, source.byteLength);\n  }\n\n  async mapAndWriteAsync(\n    callback: BufferMapCallback<void>,\n    byteOffset = 0,\n    byteLength = this.byteLength - byteOffset\n  ): Promise<void> {\n    const view = new Uint8Array(this._storage, byteOffset, byteLength);\n    const tempBuffer = new Uint8Array(view.length); // safe scratch copy\n    callback(tempBuffer.buffer, 'copied');\n    view.set(tempBuffer);\n    this._setDebugData(view, byteOffset, byteLength);\n  }\n\n  async readAsync(byteOffset = 0, byteLength?: number): Promise<Uint8Array> {\n    byteLength = byteLength ?? this.byteLength - byteOffset;\n\n    if (byteOffset + byteLength > this.byteLength) {\n      throw new RangeError(`NullBuffer.readAsync(): read would overflow buffer`);\n    }\n\n    const view = new Uint8Array(this._storage, byteOffset, byteLength);\n    return new Uint8Array(view); // return a copy\n  }\n\n  async mapAndReadAsync<T>(\n    callback: BufferMapCallback<T>,\n    byteOffset = 0,\n    byteLength = this.byteLength - byteOffset\n  ): Promise<T> {\n    const view = new Uint8Array(this._storage, byteOffset, byteLength);\n    const copy = new Uint8Array(view); // copy to protect memory\n    return callback(copy.buffer, 'copied');\n  }\n\n  readSyncWebGL(): Uint8Array {\n    throw new Error('NullBuffer.readSyncWebGL() not implemented');\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Shader, ShaderProps, CompilerMessage} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullShader extends Shader {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  constructor(device: NullDevice, props: ShaderProps) {\n    super(device, props);\n    this.device = device;\n  }\n\n  get asyncCompilationStatus(): Promise<any> {\n    return this.getCompilationInfo().then(() => 'success');\n  }\n\n  async getCompilationInfo(): Promise<readonly CompilerMessage[]> {\n    return [];\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {CommandEncoder, CommandEncoderProps} from '@luma.gl/core';\nimport type {\n  CommandBufferProps,\n  RenderPassProps,\n  ComputePass,\n  ComputePassProps,\n  QuerySet,\n  CopyBufferToBufferOptions,\n  CopyBufferToTextureOptions,\n  CopyTextureToBufferOptions,\n  CopyTextureToTextureOptions\n} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\nimport {NullCommandBuffer} from './null-command-buffer';\nimport {NullRenderPass} from './null-render-pass';\n\nexport class NullCommandEncoder extends CommandEncoder {\n  readonly device: NullDevice;\n  readonly handle: null = null;\n\n  constructor(device: NullDevice, props: CommandEncoderProps) {\n    super(device, props);\n    this.device = device;\n  }\n\n  finish(props: CommandBufferProps): NullCommandBuffer {\n    return new NullCommandBuffer(this.device, props);\n  }\n\n  beginRenderPass(props: RenderPassProps): NullRenderPass {\n    return new NullRenderPass(this.device, props);\n  }\n\n  beginComputePass(props: ComputePassProps): ComputePass {\n    throw new Error('ComputePass not supported in WebGL');\n  }\n\n  copyBufferToBuffer(options: CopyBufferToBufferOptions): void {}\n\n  copyBufferToTexture(options: CopyBufferToTextureOptions) {}\n\n  copyTextureToBuffer(options: CopyTextureToBufferOptions): void {}\n\n  copyTextureToTexture(options: CopyTextureToTextureOptions): void {}\n\n  resolveQuerySet(querySet: QuerySet): void {}\n\n  pushDebugGroup(groupLabel: string): void {}\n  popDebugGroup() {}\n  insertDebugMarker(markerLabel: string): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n  CommandBufferProps,\n  CopyBufferToBufferOptions,\n  CopyBufferToTextureOptions,\n  CopyTextureToBufferOptions,\n  CopyTextureToTextureOptions,\n  QuerySet\n} from '@luma.gl/core';\nimport {CommandBuffer} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullCommandBuffer extends CommandBuffer {\n  device: NullDevice;\n  handle: null = null;\n\n  constructor(device: NullDevice, props: CommandBufferProps) {\n    super(device, props);\n    this.device = device;\n  }\n\n  copyBufferToBuffer(options: CopyBufferToBufferOptions): void {}\n\n  copyBufferToTexture(options: CopyBufferToTextureOptions) {}\n\n  copyTextureToBuffer(options: CopyTextureToBufferOptions): void {}\n\n  copyTextureToTexture(options: CopyTextureToTextureOptions): void {}\n\n  pushDebugGroup(groupLabel: string): void {}\n  popDebugGroup() {}\n\n  insertDebugMarker(markerLabel: string): void {}\n  resolveQuerySet(querySet: QuerySet): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {RenderPass, RenderPassProps, RenderPassParameters} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullRenderPass extends RenderPass {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  constructor(device: NullDevice, props: RenderPassProps) {\n    super(device, props);\n    this.device = device;\n  }\n\n  end(): void {}\n\n  pushDebugGroup(groupLabel: string): void {}\n  popDebugGroup(): void {}\n  insertDebugMarker(markerLabel: string): void {}\n\n  setParameters(parameters: RenderPassParameters = {}): void {}\n\n  beginOcclusionQuery(queryIndex: number): void {}\n  endOcclusionQuery(): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Sampler, SamplerProps} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullSampler extends Sampler {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  constructor(device: NullDevice, props: SamplerProps) {\n    super(device, props);\n    this.device = device;\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n  TextureProps,\n  TextureViewProps,\n  CopyExternalImageOptions,\n  CopyImageDataOptions,\n  Sampler,\n  SamplerProps\n} from '@luma.gl/core';\n\nimport {Texture} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\nimport {NullSampler} from './null-sampler';\nimport {NullTextureView} from './null-texture-view';\n\nexport class NullTexture extends Texture {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  sampler: NullSampler;\n  view: NullTextureView;\n\n  constructor(device: NullDevice, props: TextureProps) {\n    super(device, props);\n\n    this.device = device;\n\n    // const data = props.data;\n    // this.setImageData(props);\n\n    if (props.sampler) {\n      this.setSampler(props.sampler);\n    }\n\n    this.sampler = new NullSampler(this.device, this.props.sampler);\n\n    this.view = new NullTextureView(this.device, {\n      ...props,\n      texture: this,\n      mipLevelCount: 1,\n      arrayLayerCount: 1\n    });\n\n    Object.seal(this);\n  }\n\n  override destroy(): void {\n    if (!this.destroyed) {\n      super.destroy();\n      this.trackDeallocatedMemory('Texture');\n    }\n  }\n\n  createView(props: TextureViewProps): NullTextureView {\n    return new NullTextureView(this.device, {...props, texture: this});\n  }\n\n  copyExternalImage(options: CopyExternalImageOptions): {width: number; height: number} {\n    this.trackDeallocatedMemory('Texture');\n\n    const {image: data} = options;\n\n    // if (data && data.byteLength) {\n    //   this.trackAllocatedMemory(data.byteLength, 'Texture');\n    // } else {\n    const bytesPerPixel = 4;\n    this.trackAllocatedMemory(this.width * this.height * bytesPerPixel, 'Texture');\n    // }\n\n    const width = options.width ?? (data as ImageBitmap).width;\n    const height = options.height ?? (data as ImageBitmap).height;\n\n    this.width = width;\n    this.height = height;\n\n    return {width, height};\n  }\n\n  override setSampler(sampler?: Sampler | SamplerProps): void {\n    // ignore\n  }\n\n  copyImageData(options: CopyImageDataOptions): void {\n    throw new Error('copyImageData not implemented');\n  }\n\n  generateMipmapsWebGL(): void {\n    // ignore\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {TextureViewProps} from '@luma.gl/core';\nimport {TextureView, Texture} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\nimport type {NullTexture} from './null-texture';\n\nexport class NullTextureView extends TextureView {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  readonly texture: NullTexture;\n\n  constructor(device: NullDevice, props: TextureViewProps & {texture: NullTexture}) {\n    super(device, {...Texture.defaultProps, ...props});\n\n    this.device = device;\n    this.texture = props.texture;\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n  UniformValue,\n  RenderPipelineProps,\n  Binding,\n  RenderPass,\n  VertexArray\n} from '@luma.gl/core';\nimport {RenderPipeline} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\nimport {NullShader} from './null-shader';\n\n/** Creates a new render pipeline */\nexport class NullRenderPipeline extends RenderPipeline {\n  device: NullDevice;\n  readonly handle = null;\n\n  vs: NullShader;\n  fs: NullShader;\n\n  uniforms: Record<string, UniformValue> = {};\n  bindings: Record<string, Binding> = {};\n\n  constructor(device: NullDevice, props: RenderPipelineProps) {\n    super(device, props);\n    this.device = device;\n\n    this.vs = props.vs as NullShader;\n    this.fs = props.fs as NullShader;\n\n    this.shaderLayout = props.shaderLayout || {\n      attributes: [],\n      bindings: [],\n      uniforms: []\n    };\n  }\n\n  setBindings(bindings: Record<string, Binding>): void {\n    Object.assign(this.bindings, bindings);\n  }\n\n  draw(options: {\n    renderPass: RenderPass;\n    vertexArray: VertexArray;\n    vertexCount?: number;\n    instanceCount?: number;\n  }): boolean {\n    const {renderPass, vertexArray} = options;\n    vertexArray.bindBeforeRender(renderPass);\n    vertexArray.unbindAfterRender(renderPass);\n    return true;\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {TypedArray} from '@math.gl/types';\nimport type {Buffer, VertexArrayProps} from '@luma.gl/core';\nimport {VertexArray} from '@luma.gl/core';\n\nimport type {NullDevice} from '../null-device';\n\nexport class NullVertexArray extends VertexArray {\n  device: NullDevice;\n  readonly handle = null;\n\n  // Create a VertexArray\n  constructor(device: NullDevice, props: VertexArrayProps) {\n    super(device, props);\n    this.device = device;\n  }\n\n  setIndexBuffer(indexBuffer: Buffer | null): void {\n    this.indexBuffer = indexBuffer;\n  }\n\n  /** Set a location in vertex attributes array to a buffer, enables the location, sets divisor */\n  setBuffer(location: number, attributeBuffer: Buffer): void {\n    const attributeInfo = this.attributeInfos[location];\n    if (!attributeInfo) {\n      throw new Error(`Unknown attribute location ${location}`);\n    }\n    this.attributes[location] = attributeBuffer;\n  }\n\n  bindBeforeRender(): void {}\n\n  unbindAfterRender(): void {}\n\n  override setConstantWebGL(location: number, value: TypedArray | null): void {}\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {PrimitiveTopology, ShaderLayout, TransformFeedbackProps} from '@luma.gl/core';\nimport {TransformFeedback, Buffer, BufferRange} from '@luma.gl/core';\nimport type {NullDevice} from '../null-device';\n\nexport class NullTransformFeedback extends TransformFeedback {\n  readonly device: NullDevice;\n  readonly handle = null;\n\n  readonly layout: ShaderLayout;\n  buffers: Record<string, Buffer | BufferRange> = {};\n\n  constructor(device: NullDevice, props: TransformFeedbackProps) {\n    super(device, props);\n    this.device = device;\n    this.layout = this.props.layout;\n\n    if (props.buffers) {\n      this.setBuffers(props.buffers);\n    }\n\n    Object.seal(this);\n  }\n\n  begin(topology: PrimitiveTopology = 'point-list'): void {}\n\n  end(): void {}\n\n  setBuffers(buffers: Record<string, Buffer | BufferRange>): void {\n    this.buffers = {};\n\n    for (const bufferName in buffers) {\n      this.setBuffer(bufferName, buffers[bufferName]);\n    }\n  }\n\n  setBuffer(locationOrName: string | number, bufferOrRange: Buffer | BufferRange): void {\n    this.buffers[locationOrName] = bufferOrRange;\n  }\n\n  getBuffer(locationOrName: string | number): Buffer | BufferRange | null {\n    return this.buffers[locationOrName] || null;\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {QuerySet, QuerySetProps} from '@luma.gl/core';\nimport {NullDevice} from '../null-device';\n\nexport class NullQuerySet extends QuerySet {\n  device: NullDevice;\n  readonly handle = null;\n\n  constructor(device: NullDevice, props: QuerySetProps) {\n    super(device, props);\n    this.device = device;\n  }\n}\n", "// luma.gl\n// SPDX-License\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck This should be replaced with model animation loop\n\n// TODO - replace createGLContext, instrumentGLContext, resizeGLContext?\n// TODO - remove dependency on framebuffer (bundle size impact)\nimport {luma, Device, DeviceProps, log} from '@luma.gl/core';\nimport {\n  requestAnimationFramePolyfill,\n  cancelAnimationFramePolyfill,\n  Timeline,\n  AnimationProps\n} from '@luma.gl/engine';\nimport {Stats, Stat} from '@probe.gl/stats';\nimport {isBrowser} from '@probe.gl/env';\n\nimport {resetGLParameters} from '@luma.gl/webgl';\n// import {default as Query} from '../classic/query';\n// import {ClassicFramebuffer} from '../classic/framebuffer';\n\ntype ContextProps = DeviceProps;\n\nconst isPage = isBrowser() && typeof document !== 'undefined';\nfunction getHTMLCanvasElement(\n  canvas: HTMLCanvasElement | OffscreenCanvas\n): HTMLCanvasElement | null {\n  return typeof HTMLCanvasElement !== 'undefined' && canvas instanceof HTMLCanvasElement\n    ? canvas\n    : null;\n}\n\nlet statIdCounter = 0;\n\n/**\n * Classic Animation Props.\n * Contain a number of deprecated fields\n * @deprecated Use new AnimationLoop in `@luma.gl/engine`\n */\nexport type ClassicAnimationProps = AnimationProps & {\n  animationLoop: ClassicAnimationLoop;\n\n  /** @deprecated Use .device */\n  stop: () => ClassicAnimationLoop;\n\n  /** @deprecated Use .device */\n  gl: WebGL2RenderingContext;\n  /** @deprecated Will be removed */\n  framebuffer: unknown;\n\n  /** @deprecated Use .timeline */\n  _timeline: Timeline;\n  /** @deprecated Use .animationLoop */\n  _loop: ClassicAnimationLoop;\n  /** @deprecated Use .animationLoop */\n  _animationLoop: ClassicAnimationLoop;\n};\n\n/** ClassicAnimationLoop properties */\nexport type ClassicAnimationLoopProps = {\n  onCreateDevice?: (props: DeviceProps) => Promise<Device>;\n  onCreateContext?: (props: ContextProps) => WebGL2RenderingContext; // TODO: signature from createGLContext\n  onAddHTML?: (div: HTMLDivElement) => string; // innerHTML\n  onInitialize?: (animationProps: ClassicAnimationProps) => {} | void | Promise<{} | void>;\n  onRender?: (animationProps: ClassicAnimationProps) => void;\n  onFinalize?: (animationProps: ClassicAnimationProps) => void;\n  onError?: (reason: any) => void;\n\n  stats?: Stats;\n\n  device?: Device;\n  glOptions?: ContextProps; // createGLContext options\n  // debug?: boolean;\n\n  // view parameters\n  autoResizeViewport?: boolean;\n  autoResizeDrawingBuffer?: boolean;\n  useDevicePixels?: number | boolean;\n\n  /** @deprecated Use .device */\n  gl?: WebGL2RenderingContext | null;\n  /** @deprecated Will be removed */\n  createFramebuffer?: boolean;\n};\n\nconst DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS: Required<ClassicAnimationLoopProps> = {\n  onCreateDevice: (props: DeviceProps) => luma.createDevice({...props, debug: true}),\n  onCreateContext: undefined,\n  onAddHTML: undefined,\n  onInitialize: () => ({}),\n  onRender: () => {},\n  onFinalize: () => {},\n  onError: error => console.error(error), // eslint-disable-line no-console\n\n  device: null,\n  // debug: true,\n\n  // view parameters\n  useDevicePixels: true,\n  autoResizeViewport: true,\n  autoResizeDrawingBuffer: true,\n  stats: luma.stats.get(`animation-loop-${statIdCounter++}`),\n\n  // deprecated\n  // onCreateContext: (opts) => createGLContext(opts),\n  gl: undefined,\n  glOptions: {},\n  createFramebuffer: false\n};\n\n/**\n * Convenient animation loop\n * @deprecated Use `@luma.gl/engine` AnimationLoop\n */\nexport class ClassicAnimationLoop {\n  device: Device;\n  canvas?: HTMLCanvasElement | OffscreenCanvas;\n\n  props: Required<ClassicAnimationLoopProps>;\n  animationProps: ClassicAnimationProps;\n  // framebuffer: ClassicFramebuffer = null;\n  timeline: Timeline = null;\n  stats: Stats;\n  cpuTime: Stat;\n  gpuTime: Stat;\n  frameRate: Stat;\n\n  display: any;\n\n  needsRedraw: string | null = 'initialized';\n\n  _initialized: boolean = false;\n  _running: boolean = false;\n  _animationFrameId: any = null;\n  _pageLoadPromise: Promise<{}> | null = null;\n  _nextFramePromise: Promise<ClassicAnimationLoop> | null = null;\n  _resolveNextFrame: ((loop: ClassicAnimationLoop) => void) | null = null;\n  _cpuStartTime: number = 0;\n\n  // _gpuTimeQuery: Query | null = null;\n\n  /** @deprecated */\n  gl: WebGL2RenderingContext;\n\n  /*\n   */\n  constructor(props: ClassicAnimationLoopProps = {}) {\n    this.props = {...DEFAULT_CLASSIC_ANIMATION_LOOP_PROPS, ...props};\n    props = this.props;\n\n    let {useDevicePixels = true} = this.props;\n\n    if ('useDevicePixelRatio' in props) {\n      log.deprecated('useDevicePixelRatio', 'useDevicePixels')();\n      // @ts-expect-error\n      useDevicePixels = props.useDevicePixelRatio;\n    }\n\n    // state\n    this.device = props.device;\n    // @ts-expect-error\n    this.gl = (this.device && this.device.gl) || props.gl;\n\n    this.stats = props.stats;\n    this.cpuTime = this.stats.get('CPU Time');\n    this.gpuTime = this.stats.get('GPU Time');\n    this.frameRate = this.stats.get('Frame Rate');\n\n    this.setProps({\n      autoResizeViewport: props.autoResizeViewport,\n      autoResizeDrawingBuffer: props.autoResizeDrawingBuffer,\n      useDevicePixels\n    });\n\n    // Bind methods\n    this.start = this.start.bind(this);\n    this.stop = this.stop.bind(this);\n\n    this._onMousemove = this._onMousemove.bind(this);\n    this._onMouseleave = this._onMouseleave.bind(this);\n  }\n\n  destroy(): void {\n    this.stop();\n    this._setDisplay(null);\n  }\n\n  /** @deprecated Use .destroy() */\n  delete(): void {\n    this.destroy();\n  }\n\n  setNeedsRedraw(reason: string): this {\n    this.needsRedraw = this.needsRedraw || reason;\n    return this;\n  }\n\n  setProps(props: ClassicAnimationLoopProps): this {\n    if ('autoResizeViewport' in props) {\n      this.props.autoResizeViewport = props.autoResizeViewport;\n    }\n    if ('autoResizeDrawingBuffer' in props) {\n      this.props.autoResizeDrawingBuffer = props.autoResizeDrawingBuffer;\n    }\n    if ('useDevicePixels' in props) {\n      this.props.useDevicePixels = props.useDevicePixels;\n    }\n    return this;\n  }\n\n  start(opts = {}) {\n    this._start(opts);\n    return this;\n  }\n\n  /** Starts a render loop if not already running */\n  async _start(props) {\n    if (this._running) {\n      return this;\n    }\n    this._running = true;\n\n    // console.debug(`Starting ${this.constructor.name}`);\n    // Wait for start promise before rendering frame\n    try {\n      await this._getPageLoadPromise();\n\n      // check that we haven't been stopped\n      if (!this._running) {\n        return null;\n      }\n\n      let appContext;\n      if (!this._initialized) {\n        this._initialized = true;\n        // Create the WebGL context\n        await this._createDevice(props);\n        this._initialize(props);\n\n        // Note: onIntialize can return a promise (in case app needs to load resources)\n        // eslint-disable-next-line  @typescript-eslint/await-thenable\n        appContext = await this.onInitialize(this.animationProps);\n        this._addCallbackData(appContext || {});\n      }\n\n      // check that we haven't been stopped\n      if (!this._running) {\n        return null;\n      }\n\n      // Start the loop\n      if (appContext !== false) {\n        // cancel any pending renders to ensure only one loop can ever run\n        this._cancelAnimationFrame();\n        this._requestAnimationFrame();\n      }\n\n      return this;\n    } catch (error) {\n      this.props.onError(error);\n      // this._running = false; // TODO\n      return null;\n    }\n  }\n\n  /** Explicitly draw a frame */\n  redraw(): this {\n    if (this.isContextLost()) {\n      return this;\n    }\n\n    this._beginTimers();\n\n    this._setupFrame();\n    this._updateCallbackData();\n\n    this._renderFrame(this.animationProps);\n\n    // clear needsRedraw flag\n    this._clearNeedsRedraw();\n\n    if (this._resolveNextFrame) {\n      this._resolveNextFrame(this);\n      this._nextFramePromise = null;\n      this._resolveNextFrame = null;\n    }\n\n    this._endTimers();\n\n    return this;\n  }\n\n  // Stops a render loop if already running, finalizing\n  stop() {\n    // console.debug(`Stopping ${this.constructor.name}`);\n    if (this._running) {\n      this._finalizeCallbackData();\n      this._cancelAnimationFrame();\n      this._nextFramePromise = null;\n      this._resolveNextFrame = null;\n      this._running = false;\n    }\n    return this;\n  }\n\n  attachTimeline(timeline: Timeline): Timeline {\n    this.timeline = timeline;\n    return this.timeline;\n  }\n\n  detachTimeline(): void {\n    this.timeline = null;\n  }\n\n  waitForRender(): Promise<ClassicAnimationLoop> {\n    this.setNeedsRedraw('waitForRender');\n\n    if (!this._nextFramePromise) {\n      this._nextFramePromise = new Promise(resolve => {\n        this._resolveNextFrame = resolve;\n      });\n    }\n    return this._nextFramePromise;\n  }\n\n  async toDataURL() {\n    this.setNeedsRedraw('toDataURL');\n\n    await this.waitForRender();\n\n    return getHTMLCanvasElement(this.gl.canvas)?.toDataURL();\n  }\n\n  isContextLost(): boolean {\n    return this.gl.isContextLost();\n  }\n\n  onCreateDevice(deviceProps: DeviceProps): Promise<Device> {\n    const {onCreateDevice} = this.props;\n    return onCreateDevice(deviceProps);\n  }\n\n  onInitialize(animationProps: ClassicAnimationProps): {} | void {\n    const {onInitialize} = this.props;\n    return onInitialize(animationProps);\n  }\n\n  onRender(animationProps: ClassicAnimationProps) {\n    const {onRender} = this.props;\n    return onRender(animationProps);\n  }\n\n  onFinalize(animationProps: ClassicAnimationProps) {\n    const {onFinalize} = this.props;\n    return onFinalize(animationProps);\n  }\n\n  // DEPRECATED/REMOVED METHODS\n\n  /** @deprecated Use .onCreateDevice() */\n  onCreateContext(props: ContextProps) {\n    const {onCreateContext} = this.props;\n    return onCreateContext(props);\n  }\n\n  /** @deprecated */\n  getHTMLControlValue(id, defaultValue = 1) {\n    const element = document.getElementById(id);\n    // @ts-expect-error Not all html elements have value\n    return element ? Number(element.value) : defaultValue;\n  }\n\n  // PRIVATE METHODS\n\n  _initialize(props: ClassicAnimationLoopProps) {\n    this._createFramebuffer();\n    this._startEventHandling();\n\n    // Initialize the callback data\n    this._initializeCallbackData();\n    this._updateCallbackData();\n\n    // Default viewport setup, in case onInitialize wants to render\n    this._resizeCanvasDrawingBuffer();\n    this._resizeViewport();\n\n    // this._gpuTimeQuery = Query.isSupported(this.gl, ['timers']) ? new Query(this.gl) : null;\n  }\n\n  _getPageLoadPromise() {\n    if (!this._pageLoadPromise) {\n      this._pageLoadPromise = isPage\n        ? new Promise((resolve, reject) => {\n            if (isPage && document.readyState === 'complete') {\n              resolve(document);\n              return;\n            }\n            window.addEventListener('load', () => {\n              resolve(document);\n            });\n          })\n        : Promise.resolve({});\n    }\n    return this._pageLoadPromise;\n  }\n\n  _setDisplay(display: any) {\n    if (this.display) {\n      this.display.destroy();\n      this.display.animationLoop = null;\n    }\n\n    // store animation loop on the display\n    if (display) {\n      display.animationLoop = this;\n    }\n\n    this.display = display;\n  }\n\n  _requestAnimationFrame() {\n    if (!this._running) {\n      return;\n    }\n\n    // VR display has a separate animation frame to sync with headset\n    // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n    // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n    // if (this.display && this.display.requestAnimationFrame) {\n    //   this._animationFrameId = this.display.requestAnimationFrame(this._animationFrame.bind(this));\n    // }\n    this._animationFrameId = requestAnimationFramePolyfill(this._animationFrame.bind(this));\n  }\n\n  _cancelAnimationFrame() {\n    if (this._animationFrameId !== null) {\n      return;\n    }\n\n    // VR display has a separate animation frame to sync with headset\n    // TODO WebVR API discontinued, replaced by WebXR: https://immersive-web.github.io/webxr/\n    // See https://developer.mozilla.org/en-US/docs/Web/API/VRDisplay/requestAnimationFrame\n    // if (this.display && this.display.cancelAnimationFrame) {\n    //   this.display.cancelAnimationFrame(this._animationFrameId);\n    // }\n    cancelAnimationFramePolyfill(this._animationFrameId);\n    this._animationFrameId = null;\n  }\n\n  _animationFrame() {\n    if (!this._running) {\n      return;\n    }\n    this.redraw();\n    this._requestAnimationFrame();\n  }\n\n  // Called on each frame, can be overridden to call onRender multiple times\n  // to support e.g. stereoscopic rendering\n  _renderFrame(props: ClassicAnimationProps) {\n    // Allow e.g. VR display to render multiple frames.\n    if (this.display) {\n      this.display._renderFrame(props);\n      return;\n    }\n\n    // call callback\n    this.onRender(props);\n    // end callback\n  }\n\n  _clearNeedsRedraw() {\n    this.needsRedraw = null;\n  }\n\n  _setupFrame() {\n    this._resizeCanvasDrawingBuffer();\n    this._resizeViewport();\n    this._resizeFramebuffer();\n  }\n\n  /* eslint-disable @typescript-eslint/unbound-method */\n\n  // Initialize the  object that will be passed to app callbacks\n  _initializeCallbackData() {\n    this.animationProps = {\n      device: this.device,\n      gl: this.gl,\n\n      stop: this.stop,\n      canvas: this.gl.canvas,\n\n      // Initial values\n      useDevicePixels: this.props.useDevicePixels,\n      needsRedraw: null,\n\n      // Animation props\n      startTime: Date.now(),\n      engineTime: 0,\n      tick: 0,\n      tock: 0,\n\n      timeline: this.timeline,\n      // @ts-ignore\n      animationLoop: this,\n\n      // Timeline time for back compatibility\n      time: 0,\n\n      // Experimental\n      _mousePosition: null, // Event props\n\n      /** @deprecated */\n      // framebuffer: this.framebuffer,\n      /** @deprecated */\n      _timeline: this.timeline,\n      /** @deprecated */\n      _loop: this,\n      /** @deprecated */\n      _animationLoop: this\n    };\n  }\n\n  // Update the context object that will be passed to app callbacks\n  _updateCallbackData() {\n    const {width, height, aspect} = this._getSizeAndAspect();\n    if (width !== this.animationProps.width || height !== this.animationProps.height) {\n      this.setNeedsRedraw('drawing buffer resized');\n    }\n    if (aspect !== this.animationProps.aspect) {\n      this.setNeedsRedraw('drawing buffer aspect changed');\n    }\n\n    this.animationProps.width = width;\n    this.animationProps.height = height;\n    this.animationProps.aspect = aspect;\n\n    this.animationProps.needsRedraw = this.needsRedraw;\n\n    // Update time properties\n    this.animationProps.engineTime = Date.now() - this.animationProps.startTime;\n\n    if (this.timeline) {\n      this.timeline.update(this.animationProps.engineTime);\n    }\n\n    this.animationProps.tick = Math.floor((this.animationProps.time / 1000) * 60);\n    this.animationProps.tock++;\n\n    // For back compatibility\n    this.animationProps.time = this.timeline\n      ? this.timeline.getTime()\n      : this.animationProps.engineTime;\n  }\n\n  _finalizeCallbackData() {\n    // call callback\n    this.onFinalize(this.animationProps);\n    // end callback\n  }\n\n  /** Add application's data to the app context object */\n  _addCallbackData(appContext) {\n    if (typeof appContext === 'object' && appContext !== null) {\n      this.animationProps = Object.assign({}, this.animationProps, appContext);\n    }\n  }\n\n  /** Either uses supplied or existing context, or calls provided callback to create one */\n  async _createDevice(props: DeviceProps) {\n    const deviceProps = {...this.props, ...props, ...this.props.glOptions};\n\n    // TODO - support this.onCreateContext\n    // Create the WebGL context if necessary\n    // this.gl = this.props.gl ? instrumentGLContext(this.props.gl, deviceProps) : this.onCreateContext(deviceProps);\n\n    this.device = await this.onCreateDevice(deviceProps);\n    // @ts-expect-error\n    this.gl = this.device.gl;\n\n    // Reset the WebGL context.\n    resetGLParameters(this.gl);\n\n    this._createInfoDiv();\n  }\n\n  _createInfoDiv() {\n    const canvas = getHTMLCanvasElement(this.gl.canvas);\n    if (canvas && this.props.onAddHTML) {\n      const wrapperDiv = document.createElement('div');\n      document.body.appendChild(wrapperDiv);\n      wrapperDiv.style.position = 'relative';\n      const div = document.createElement('div');\n      div.style.position = 'absolute';\n      div.style.left = '10px';\n      div.style.bottom = '10px';\n      div.style.width = '300px';\n      div.style.background = 'white';\n      if (canvas) {\n        wrapperDiv.appendChild(canvas);\n      }\n      wrapperDiv.appendChild(div);\n      const html = this.props.onAddHTML(div);\n      if (html) {\n        div.innerHTML = html;\n      }\n    }\n  }\n\n  _getSizeAndAspect() {\n    // https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html\n    const width = this.gl.drawingBufferWidth;\n    const height = this.gl.drawingBufferHeight;\n\n    // https://webglfundamentals.org/webgl/lessons/webgl-anti-patterns.html\n    let aspect = 1;\n\n    const canvas = getHTMLCanvasElement(this.gl.canvas);\n    if (canvas && canvas.clientHeight) {\n      aspect = canvas.clientWidth / canvas.clientHeight;\n    } else if (width > 0 && height > 0) {\n      aspect = width / height;\n    }\n\n    return {width, height, aspect};\n  }\n\n  /** Default viewport setup */\n  _resizeViewport() {\n    if (this.props.autoResizeViewport) {\n      this.gl.viewport(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight);\n    }\n  }\n\n  /**\n   * Resize the render buffer of the canvas to match canvas client size\n   * Optionally multiplying with devicePixel ratio\n   */\n  _resizeCanvasDrawingBuffer() {\n    if (this.props.autoResizeDrawingBuffer) {\n      this.device.getDefaultCanvasContext().resize({useDevicePixels: this.props.useDevicePixels});\n    }\n  }\n\n  _beginTimers() {\n    this.frameRate.timeEnd();\n    this.frameRate.timeStart();\n\n    // Check if timer for last frame has completed.\n    // GPU timer results are never available in the same\n    // frame they are captured.\n    // if (\n    //   this._gpuTimeQuery &&\n    //   this._gpuTimeQuery.isResultAvailable() &&\n    //   !this._gpuTimeQuery.isTimerDisjoint()\n    // ) {\n    //   this.stats.get('GPU Time').addTime(this._gpuTimeQuery.getTimerMilliseconds());\n    // }\n\n    // if (this._gpuTimeQuery) {\n    //   // GPU time query start\n    //   this._gpuTimeQuery.beginTimeElapsedQuery();\n    // }\n\n    this.cpuTime.timeStart();\n  }\n\n  _endTimers() {\n    this.cpuTime.timeEnd();\n\n    // if (this._gpuTimeQuery) {\n    //   // GPU time query end. Results will be available on next frame.\n    //   this._gpuTimeQuery.end();\n    // }\n  }\n\n  // Event handling\n\n  _startEventHandling() {\n    const {canvas} = this.gl;\n    if (canvas) {\n      canvas.addEventListener('mousemove', this._onMousemove);\n      canvas.addEventListener('mouseleave', this._onMouseleave);\n    }\n  }\n\n  _onMousemove(e) {\n    this.animationProps._mousePosition = [e.offsetX, e.offsetY];\n  }\n  _onMouseleave(e) {\n    this.animationProps._mousePosition = null;\n  }\n\n  // Deprecated\n\n  /** @deprecated */\n  _createFramebuffer() {\n    // Setup default framebuffer\n    if (this.props.createFramebuffer) {\n      // this.framebuffer = new ClassicFramebuffer(this.gl);\n    }\n  }\n\n  /** @deprecated */\n  _resizeFramebuffer() {\n    // if (this.framebuffer) {\n    //   this.framebuffer.resize({\n    //     width: this.gl.drawingBufferWidth,\n    //     height: this.gl.drawingBufferHeight\n    //   });\n    // }\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// @ts-nocheck\n/* eslint-disable */\n\nimport {AnimationProps} from '@luma.gl/engine';\nimport {getWebGLTestDevice} from './create-test-device';\n\n// TODO - Replace with new AnimationLoop from `@luma.gl/engine`\nimport {ClassicAnimationLoop as AnimationLoop} from './deprecated/classic-animation-loop';\n\n/** Describes a test case */\nexport type TestRunnerTestCase = {\n  /** Name of the test case (for logging) */\n  name: string;\n  /** Initialize the test case. Can return a promise */\n  onInitialize: (props: AnimationProps) => Promise<void | {}>;\n  /** Perform rendering */\n  onRender: (props: AnimationProps & {done}) => void;\n  /** Clean up after the test case */\n  onFinalize: (props: AnimationProps) => void;\n  animationLoop?: AnimationLoop;\n};\n\nconst DEFAULT_TEST_CASE: TestRunnerTestCase = {\n  name: 'Unnamed test',\n  onInitialize: async () => {},\n  onRender: ({done}) => done(),\n  onFinalize: () => {}\n};\n\n/** Options for a TestRunner */\nexport type TestRunnerProps = {\n  width?: number;\n  height?: number;\n  // test lifecycle callback\n  onTestStart?: (testCase: TestRunnerTestCase) => void;\n  onTestPass?: (testCase: TestRunnerTestCase, result?: unknown) => void;\n  onTestFail?: (testCase: TestRunnerTestCase, error?: unknown) => void;\n  /** milliseconds to wait for each test case before aborting */\n  timeout?: number;\n  maxFramesToRender?: number;\n  // HACK - this is for the snapshot test runner\n  imageDiffOptions?: any;\n};\n\nconst DEFAULT_TEST_PROPS: Required<TestRunnerProps> = {\n  width: undefined,\n  height: undefined,\n\n  // test lifecycle callback\n  onTestStart: (testCase: TestRunnerTestCase) => console.log(`# ${testCase.name}`),\n  onTestPass: (testCase: TestRunnerTestCase, result?: unknown) =>\n    console.log(`ok ${testCase.name} passed`),\n  onTestFail: (testCase: TestRunnerTestCase, error?: unknown) =>\n    console.log(`not ok ${testCase.name} failed`),\n\n  // milliseconds to wait for each test case before aborting\n  timeout: 2000,\n  maxFramesToRender: undefined,\n  imageDiffOptions: undefined\n};\n\n/** Runs an array of test cases */\nexport class TestRunner {\n  device = webglDevice;\n  props: Record<string, any>;\n  isRunning: boolean = false;\n  testOptions: Required<TestRunnerProps> = {...DEFAULT_TEST_PROPS};\n  readonly _animationProps?: AnimationProps;\n  private _animationLoop: AnimationLoop | null;\n  private _testCases: TestRunnerTestCase[] = [];\n  private _testCaseData: any = null;\n  private _currentTestCase: TestRunnerTestCase | null;\n  private _currentTestCaseStartTime: number;\n  private _currentTestCaseStartTick: number;\n\n  // should be defined in snapshot-test-runner\n  isDiffing: boolean = false;\n\n  // @ts-expect-error\n  isHeadless: boolean = Boolean(window.browserTestDriver_isHeadless);\n\n  /**\n   * props\n   *   AnimationLoop props\n   */\n  constructor(props: Record<string, any> = {}) {\n    this.props = props;\n  }\n\n  /**\n   * Add testCase(s)\n   */\n  add(testCases: TestRunnerTestCase[]): this {\n    if (!Array.isArray(testCases)) {\n      testCases = [testCases];\n    }\n    for (const testCase of testCases) {\n      this._testCases.push(testCase);\n    }\n    return this;\n  }\n\n  /**\n   * Returns a promise that resolves when all the test cases are done\n   */\n  async run(options: object = {}): Promise<void> {\n    this.testOptions = {...this.testOptions, ...options};\n\n    const device = await getWebGLTestDevice();\n\n    return new Promise<void>((resolve, reject) => {\n      this._animationLoop = new AnimationLoop({\n        ...this.props,\n        device: this.device,\n        onRender: this._onRender.bind(this),\n        onFinalize: () => {\n          this.isRunning = false;\n          resolve();\n        }\n      });\n      this._animationLoop.start(this.props);\n\n      this.isRunning = true;\n      this.isDiffing = false;\n      this._currentTestCase = null;\n    }).catch(error => {\n      this._fail({error: error.message});\n      // reject(error);\n    });\n  }\n\n  /* Lifecycle methods for subclassing */\n\n  initTestCase(testCase: TestRunnerTestCase) {\n    const {animationLoop} = testCase;\n    if (animationLoop) {\n      testCase.onInitialize = animationLoop.props.onInitialize.bind(animationLoop);\n      testCase.onRender = animationLoop.props.onRender.bind(animationLoop);\n      testCase.onFinalize = animationLoop.props.onFinalize.bind(animationLoop);\n    }\n    for (const key in DEFAULT_TEST_CASE) {\n      testCase[key] = testCase[key] || DEFAULT_TEST_CASE[key];\n    }\n  }\n\n  shouldRender(animationProps): boolean {\n    return true;\n  }\n\n  assert(testCase: TestRunnerTestCase): void {\n    this._pass(testCase);\n    this._next();\n  }\n\n  /* Utilities */\n\n  _pass(result: unknown): void {\n    this.testOptions.onTestPass(this._currentTestCase, result);\n    // this._animationLoop?.stop();\n  }\n\n  _fail(result: unknown): void {\n    this.testOptions.onTestFail(this._currentTestCase, result);\n    // this._animationLoop?.stop();\n  }\n\n  _next(): void {\n    this._nextTestCase();\n  }\n\n  /* Private methods */\n\n  _onRender(animationProps): void {\n    this._animationProps = animationProps;\n\n    const testCase = this._currentTestCase || this._nextTestCase();\n    if (!testCase) {\n      // all test cases are done\n      this._animationLoop.stop();\n      return;\n    }\n\n    let isDone = false;\n    const testCaseAnimationProps: AnimationProps = {\n      ...animationProps,\n      ...this._testCaseData,\n      // tick/time starts from 0 for each test case\n      startTime: this._currentTestCaseStartTime,\n      time: animationProps.time - this._currentTestCaseStartTime,\n      tick: animationProps.tick - this._currentTestCaseStartTick,\n      // called by the test case when it is done rendering and ready for capture and diff\n      done: () => {\n        isDone = true;\n      }\n    };\n\n    if (this._testCaseData && this.shouldRender(testCaseAnimationProps)) {\n      // try {\n      // test case is initialized, render frame\n      testCase.onRender(testCaseAnimationProps);\n      // } catch {\n      //   isDone = true;\n      // }\n    }\n\n    const timeout = testCase.timeout || this.testOptions.timeout;\n    if (timeout && testCaseAnimationProps.time > timeout) {\n      isDone = true;\n    }\n\n    if (isDone) {\n      this.assert(testCase);\n    }\n  }\n\n  _nextTestCase(): Promise<TestRunnerTestCase> {\n    const animationProps = this._animationProps;\n\n    // finalize the current test case\n    if (this._testCaseData) {\n      for (const key in this._testCaseData) {\n        const value = this._testCaseData[key];\n        if (value && value.delete) {\n          value.destroy();\n        }\n      }\n      this._currentTestCase.onFinalize(Object.assign({}, animationProps, this._testCaseData));\n\n      // reset WebGL context\n      this.device.popState();\n\n      this._currentTestCase = null;\n      this._testCaseData = null;\n    }\n\n    // get the next test case\n    const testCase = this._testCases.shift();\n    if (testCase) {\n      // start new test case\n      this._currentTestCase = testCase;\n      this._currentTestCaseStartTime = animationProps.time;\n      this._currentTestCaseStartTick = animationProps.tick;\n      this.initTestCase(testCase);\n\n      // initialize test case\n\n      // save WebGL context\n      this.device.pushState();\n\n      // aligned with the behavior of AnimationLoop.onInitialized\n      // onInitialized could return a plain object or a promise\n      const initProps = {\n        ...animationProps,\n        // tick/time starts from 0 for each test case\n        startTime: animationProps.time,\n        time: 0,\n        tick: 0\n      };\n\n      // aligned with the behavior of AnimationLoop.onInitialized\n      // onInitialized could return a plain object or a promise\n      Promise.resolve(testCase.onInitialize(initProps)).then(userData => {\n        this._testCaseData = userData || {};\n      });\n\n      // invoke user callback\n      this.testOptions.onTestStart(testCase);\n    }\n    return testCase;\n  }\n}\n", "// Get the bounding box of a DOMElement relative to the page\nexport function getBoundingBoxInPage(domElement: HTMLElement): {\n  x: number;\n  y: number;\n  width: number;\n  height: number;\n} {\n  const bbox = domElement.getBoundingClientRect();\n  return {\n    x: window.scrollX + bbox.x,\n    y: window.scrollY + bbox.y,\n    width: bbox.width,\n    height: bbox.height\n  };\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {TestRunner, TestRunnerProps, TestRunnerTestCase} from './test-runner';\nimport {getBoundingBoxInPage} from './utils/get-bounding-box';\n\n/** A snapshot test case */\nexport type SnapshotTestRunnerTestCase = TestRunnerTestCase & {\n  /** URL to golden image */\n  goldenImage: string;\n  /** Diff options */\n  imageDiffOptions?: {[key: string]: any};\n};\n\nexport type SnapshotTestRunnerProps = TestRunnerProps;\n\nexport class SnapshotTestRunner extends TestRunner {\n  // should be defined here but hack access in TestRunner\n  // private isDiffing: boolean = false;\n\n  constructor(props: SnapshotTestRunnerProps) {\n    super(props);\n    this.testOptions.imageDiffOptions = {};\n  }\n\n  override initTestCase(testCase: SnapshotTestRunnerTestCase): void {\n    super.initTestCase(testCase);\n    if (!testCase.goldenImage) {\n      throw new Error(`Test case ${testCase.name} does not have golden image`);\n    }\n  }\n\n  override shouldRender(): boolean {\n    // wait for the current diffing to finish\n    return !this.isDiffing;\n  }\n\n  override async assert(testCase: SnapshotTestRunnerTestCase): Promise<void> {\n    if (this.isDiffing) {\n      // Already performing diffing\n      return;\n    }\n    this.isDiffing = true;\n\n    const canvas = this._animationProps?.canvas;\n    if (!(canvas instanceof HTMLCanvasElement)) {\n      throw new Error('canvas');\n    }\n\n    const diffOptions = {\n      ...this.testOptions.imageDiffOptions,\n      ...testCase.imageDiffOptions,\n      goldenImage: testCase.goldenImage,\n      region: getBoundingBoxInPage(canvas)\n    };\n\n    // Take screenshot and compare\n    // @ts-ignore implicit any\n    const result = await globalThis.browserTestDriver_captureAndDiffScreen(diffOptions);\n\n    // invoke user callback\n    if (result.success) {\n      this._pass(result);\n    } else {\n      this._fail(result);\n    }\n\n    this.isDiffing = false;\n    this._next();\n  }\n}\n", "// luma.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {Stats, Stat} from '@probe.gl/stats';\nimport {TestRunner, TestRunnerProps, TestRunnerTestCase} from './test-runner';\n\nexport type PerformanceTestRunnerProps = TestRunnerProps;\n\nexport class PerformanceTestRunner extends TestRunner {\n  private _stats: Stats | null = null;\n  private _fps: Stat | null = null;\n\n  constructor(props: PerformanceTestRunnerProps) {\n    super(props);\n\n    Object.assign(this.testOptions, {\n      maxFramesToRender: 60,\n      targetFPS: 50\n    });\n  }\n\n  override initTestCase(testCase: TestRunnerTestCase): void {\n    super.initTestCase(testCase);\n    this._stats = new Stats({id: testCase.name});\n    this._fps = this._stats.get('fps');\n  }\n\n  override shouldRender(animationProps: Record<string, any>): boolean {\n    this._fps?.timeEnd();\n    this._fps?.timeStart();\n\n    // @ts-ignore TODO\n    if (this._fps.count > this.testOptions.maxFramesToRender) {\n      animationProps['done']();\n    }\n\n    return true;\n  }\n\n  override assert(testCase: TestRunnerTestCase): void {\n    // @ts-expect-error\n    const targetFPS = testCase.targetFPS || this.testOptions.targetFPS;\n    const count = this._fps?.count;\n    const fps = this._fps?.getHz() || 0;\n\n    if (fps >= targetFPS) {\n      this._pass({fps, framesRendered: count});\n    } else {\n      this._fail({fps, framesRendered: count});\n    }\n    this._next();\n  }\n}\n", "/**\n * Tests that an argument matches the type.\n * @note fails during typescript type check, not during runtime.\n */\nexport function checkType<T>(value: T): void {}\n", "/** Recursively copies objects */\nexport function deepCopy(object: any): any {\n  if (Array.isArray(object)) {\n    return object.map(element => deepCopy(element));\n  }\n\n  if (object !== null && typeof object === 'object') {\n    const newObject: Record<string, any> = {};\n    for (const key in object) {\n      newObject[key] = deepCopy(object[key]);\n    }\n    return newObject;\n  }\n\n  return object;\n}\n", "/* global luma */\nexport function getResourceCounts() {\n  // @ts-ignore\n  const resourceStats = luma.stats.get('Resource Counts');\n  return {\n    Texture2D: resourceStats.get('Texture2Ds Active').count,\n    Buffer: resourceStats.get('Buffers Active').count\n  };\n}\n\nexport function getLeakedResources(\n  startCounts: Record<string, number>,\n  endCounts: Record<string, number>\n): number | null {\n  let leakedResources = null;\n  const info = 'leaking: ';\n  for (const resourceName in endCounts) {\n    const leakCount = endCounts[resourceName] - startCounts[resourceName];\n    if (leakCount !== 0) {\n      leakedResources = Object.assign({}, leakedResources, {\n        [resourceName]: leakCount,\n        info: `${info} ${resourceName}: ${leakCount}, `\n      });\n    }\n  }\n  return leakedResources;\n}\n", "// luma.gl\n// SPDX-License\n// Copyright (c) vis.gl contributors\n\nimport type {CanvasContextProps} from '@luma.gl/core';\nimport {WebGLDevice} from '@luma.gl/webgl';\n\nconst DEFAULT_CANVAS_CONTEXT_PROPS: CanvasContextProps = {\n  width: 1,\n  height: 1\n};\n\n/**\n * Create a test WebGLDevice\n * @note This WebGL Device is create synchronously and can be used directly but will not have WebGL debugging initialized\n * @deprecated Use getWebGLTestDevice().\n */\nexport function createTestDevice(): WebGLDevice | null {\n  try {\n    // TODO - We do not use luma.createDevice since createTestDevice currently expect WebGL context to be created synchronously\n    return new WebGLDevice({createCanvasContext: DEFAULT_CANVAS_CONTEXT_PROPS});\n  } catch (error) {\n    // eslint-disable-next-line no-console\n    console.error(`Failed to created device: ${(error as Error).message}`);\n    debugger; // eslint-disable-line no-debugger\n    return null;\n  }\n}\n\n/**\n * A pre-created WebGLDevice\n * @note This WebGL Device is create synchronously and can be used directly but will not have WebGL debugging initialized\n * @deprecated Use getWebGLTestDevice().\n */\nexport const webglDevice = createTestDevice();\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;qBAAAA;;AAAA;;;ACIA,kBAAmB;AACnB,mBAA4B;AAC5B,oBAA4B;AAE5B,iBAAK,iBAAiB,CAAC,4BAAe,2BAAa,CAAC;;;ACHpD,IAAAC,gBAAwB;AACxB,IAAAC,gBAAyC;AACzC,IAAAC,iBAA0C;;;ACH1C,IAAAC,gBAAmC;;;ACmBnC,IAAAC,gBAAqC;;;ACjB9B,IAAM,iBAAiB;EAC5B,MAAM;EACN,KAAK;EACL,SAAS;EACT,YAAY;EACZ,QAAQ;EACR,UAAU;EACV,SAAS;EACT,iBAAiB;EACjB,wBAAwB;;;;ACX1B,IAAAC,eAA2B;AAErB,IAAO,mBAAP,cAAgC,0BAAY;EAChD,wBAAwB;EACxB,wBAAwB;EACxB,wBAAwB;EACxB,wBAAwB;EACxB,gBAAgB;EAChB,4CAA4C;EAC5C,4CAA4C;EAC5C,mCAAmC;EACnC,4BAA4B;EAC5B,kCAAkC;EAClC,mCAAmC;EACnC,kCAAkC;EAClC,8BAA8B;EAC9B,8BAA8B;EAC9B,kCAAkC;EAClC,kCAAkC;EAClC,mBAAmB;EACnB,sBAA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G;AACzB,WAAO,OAAO,IAAI,aAAW,SAAS,OAAO,CAAC;EAChD;AAEA,MAAI,WAAW,QAAQ,OAAO,WAAW,UAAU;AACjD,UAAM,YAAiC,CAAA;AACvC,eAAW,OAAO,QAAQ;AACxB,gBAAU,GAAG,IAAI,SAAS,OAAO,GAAG,CAAC;IACvC;AACA,WAAO;EACT;AAEA,SAAO;AACT;;;ACdM,SAAU,oBAAiB;AAE/B,QAAM,gBAAgB,KAAK,MAAM,IAAI,iBAAiB;AACtD,SAAO;IACL,WAAW,cAAc,IAAI,mBAAmB,EAAE;IAClD,QAAQ,cAAc,IAAI,gBAAgB,EAAE;;AAEhD;AAEM,SAAU,mBACd,aACA,WAAiC;AAEjC,MAAI,kBAAkB;AACtB,QAAM,OAAO;AACb,aAAW,gBAAgB,WAAW;AACpC,UAAM,YAAY,UAAU,YAAY,IAAI,YAAY,YAAY;AACpE,QAAI,cAAc,GAAG;AACnB,wBAAkB,OAAO,OAAO,CAAA,GAAI,iBAAiB;QACnD,CAAC,YAAY,GAAG;QAChB,MAAM,GAAG,QAAQ,iBAAiB;OACnC;IACH;EACF;AACA,SAAO;AACT;;;ACrBA,IAAAC,gBAA0B;AAE1B,IAAMC,gCAAmD;EACvD,OAAO;EACP,QAAQ;;AAQJ,SAAU,mBAAgB;AAC9B,MAAI;AAEF,WAAO,IAAI,0BAAY,EAAC,qBAAqBA,8BAA4B,CAAC;EAC5E,SAAS,OAAP;AAEA,YAAQ,MAAM,6BAA8B,MAAgB,SAAS;AACrE;AACA,WAAO;EACT;AACF;AAOO,IAAMC,eAAc,iBAAgB;",
  "names": ["webglDevice", "import_core", "import_webgl", "import_webgpu", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "import_core", "webglDevice", "import_core", "import_webgl", "import_webgl", "DEFAULT_CANVAS_CONTEXT_PROPS", "webglDevice"]
}
