See https://bugzilla.mozilla.org/show_bug.cgi?id=1735738 for reference.
};
          AnnotationLayer.render(parameters);
          
          await resolveImages(div);
          foreignObject.appendChild(div);
          svg.appendChild(foreignObject);
          writeSVG(svg, ctx, resolve, reject);
        })
        .catch(reason => {
          reject(new Error(`rasterizeAnnotationLayer: "${reason?.message}".`));
        });
    });
  }
  return rasterizeAnnotationLayer;
})();
/**
 * @class
 */
var rasterizeXfaLayer = (function rasterizeXfaLayerClosure() {
  const styles = {
    common: {
      file: "../web/xfa_layer_builder.css",
      promise: null,
    },
  };
  function getXfaLayerStyle() {
    return loadStyles(styles);
  }
  
  function rasterizeXfaLayer(