import { t } from "./chunk-Z6GWVH7Z.js"; import "./chunk-7XXXCK2A.js"; import { u } from "./chunk-WEMIK25H.js"; import "./chunk-JXW4QTJA.js"; import "./chunk-XNLG7T2T.js"; import "./chunk-IR4PV7VK.js"; import { U } from "./chunk-VNFRAYHO.js"; import "./chunk-R5IG2D6H.js"; import "./chunk-VBRY5KJM.js"; import "./chunk-IHXECKQQ.js"; import "./chunk-ULGDPLM2.js"; import "./chunk-EMJ4ZSM2.js"; import "./chunk-IKP3YN53.js"; import "./chunk-GZT4BVFP.js"; import "./chunk-A5ICIBVI.js"; // node_modules/@arcgis/core/symbols/support/previewWebStyleSymbol.js function n(e, i, n2) { const o = e.thumbnail && e.thumbnail.url; return o ? U(o, { responseType: "image" }).then((t2) => { const e2 = h(t2.data, n2); return n2 && n2.node ? (n2.node.appendChild(e2), n2.node) : e2; }) : e.fetchSymbol().then((t2) => i(t2, n2)); } function h(t2, n2) { const h2 = !/\\.svg$/i.test(t2.src) && n2 && n2.disableUpsampling, o = Math.max(t2.width, t2.height); let r = n2 && n2.maxSize != null ? u(n2.maxSize) : t.maxSize; h2 && (r = Math.min(o, r)); const s = typeof n2?.size == "number" ? n2?.size : null, m = Math.min(r, s != null ? u(s) : o); if (m !== o) { const e = t2.width !== 0 && t2.height !== 0 ? t2.width / t2.height : 1; e >= 1 ? (t2.width = m, t2.height = m / e) : (t2.width = m * e, t2.height = m); } return t2; } export { n as previewWebStyleSymbol }; //# sourceMappingURL=previewWebStyleSymbol-G67MG6BX.js.map