import { A, S, S2, b, b2, b3, c, h, k, m, m2, n, y } from "./chunk-EN7YGJWG.js"; import { s3 as s } from "./chunk-EMJ4ZSM2.js"; import { r, t } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/symbols/support/symbolConversion.js var p = { retainId: false, ignoreDrivers: false, hasLabelingContext: true }; function a(a3, S3 = p) { if (!a3) return { symbol: null }; const { retainId: c3 = p.retainId, ignoreDrivers: u = p.ignoreDrivers, hasLabelingContext: d = p.hasLabelingContext, retainCIM: j = p.retainCIM } = S3; let D; if (c(a3) || a3 instanceof b3) D = a3.clone(); else if (a3.type === "cim") { const o = a3.data?.symbol?.type; if (o !== "CIMPointSymbol") return { error: new s("symbol-conversion:unsupported-cim-symbol", `CIM symbol of type '${o || "unknown"}' is unsupported in 3D`, { symbol: a3 }) }; D = j ? a3.clone() : h.fromCIMSymbol(a3); } else if (a3 instanceof m) D = b2.fromSimpleLineSymbol(a3); else if (a3 instanceof y) D = h.fromSimpleMarkerSymbol(a3); else if (a3 instanceof n) D = h.fromPictureMarkerSymbol(a3); else if (a3 instanceof S2) D = S.fromSimpleFillSymbol(a3); else { if (!(a3 instanceof m2)) return { error: new s("symbol-conversion:unsupported-2d-symbol", `2D symbol of type '${a3.type || a3.declaredClass}' is unsupported in 3D`, { symbol: a3 }) }; D = d ? b.fromTextSymbol(a3) : h.fromTextSymbol(a3); } if (c3 && D.type !== "cim" && (D.id = a3.id), u && c(D)) for (let o = 0; o < D.symbolLayers.length; ++o) D.symbolLayers.getItemAt(o)._ignoreDrivers = true; return { symbol: D }; } // node_modules/@arcgis/core/symbols/support/jsonUtils.js var l = ["building-scene", "integrated-mesh", "point-cloud", "scene"]; function m3(e, o, t2, s2) { const r2 = a2(e, {}, { context: s2, isLabelSymbol: false }); r(r2) && (o[t2] = r2); } function b4(e, o, t2, s2) { const r2 = a2(e, {}, { context: s2, isLabelSymbol: true }); r(r2) && (o[t2] = r2); } function c2(e) { return e instanceof A || e instanceof b3; } function a2(e, s2, i) { if (t(e)) return null; const { context: m4, isLabelSymbol: b5 } = i, a3 = m4?.origin, p3 = m4?.messages; if (a3 === "web-scene" && !c2(e)) { const t2 = a(e, { retainCIM: true, hasLabelingContext: b5 }); return r(t2.symbol) ? t2.symbol.write(s2, m4) : (p3?.push(new s("symbol:unsupported", `Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`, { symbol: e, context: m4, error: t2.error })), null); } return (a3 === "web-map" || a3 === "portal-item" && !l.includes(m4?.layer?.type)) && c2(e) ? (p3?.push(new s("symbol:unsupported", `Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`, { symbol: e, context: m4 })), null) : e.write(s2, m4); } function p2(o, n2) { return k(o, null, n2); } export { m3 as m, b4 as b, p2 as p }; //# sourceMappingURL=chunk-27P5ZSC7.js.map