"use strict"; function resolveAsset(manifestUrl, manifest, id = "main") { const asset = manifest.assets.find((candidate) => candidate.id === id); if (!asset) throw new Error(`Unknown asset '${id}'`); return new URL(asset.uri, manifestUrl).href; } function placement(manifest) { return { ...manifest.placement, coordinateSystem: manifest.coordinateSystem }; } module.exports = { resolveAsset, placement };