chunk-6FXLJAMI.js 856 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // node_modules/@arcgis/core/core/imageUtils.js
  2. var t = null;
  3. var n = true;
  4. function e(t2, e2, r2) {
  5. if (!t2 || !e2)
  6. throw new Error("Cannot construct image data without dimensions");
  7. if (n)
  8. try {
  9. return new ImageData(t2, e2);
  10. } catch (a2) {
  11. n = false;
  12. }
  13. return o(t2, e2, r2);
  14. }
  15. function r(t2, e2, r2, a2) {
  16. if (!e2 || !r2)
  17. throw new Error("Cannot construct image data without dimensions");
  18. if (n)
  19. try {
  20. return new ImageData(t2, e2, r2);
  21. } catch (c) {
  22. n = false;
  23. }
  24. const i = o(e2, r2, a2);
  25. return i.data.set(t2, 0), i;
  26. }
  27. function a() {
  28. return t || (t = document.createElement("canvas"), t.width = 1, t.height = 1), t;
  29. }
  30. function o(t2, n2, e2) {
  31. return e2 || (e2 = a()), e2.getContext("2d").createImageData(t2, n2);
  32. }
  33. export {
  34. e,
  35. r
  36. };
  37. //# sourceMappingURL=chunk-6FXLJAMI.js.map