{"version":3,"sources":["node_modules/@arcgis/core/Graphic.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { _ as t } from \"./chunks/tslib.es6.js\";\nimport { geometryTypes as e } from \"./geometry.js\";\nimport r from \"./PopupTemplate.js\";\nimport { symbolTypes as s } from \"./symbols.js\";\nimport { ClonableMixin as i } from \"./core/Clonable.js\";\nimport { deprecatedConstructorSignature as o } from \"./core/deprecate.js\";\nimport { isSerializable as a, JSONSupport as l } from \"./core/JSONSupport.js\";\nimport n from \"./core/Logger.js\";\nimport { when as p } from \"./core/reactiveUtils.js\";\nimport { generateUID as h } from \"./core/uid.js\";\nimport { property as u } from \"./core/accessorSupport/decorators/property.js\";\nimport \"./core/has.js\";\nimport \"./core/RandomLCG.js\";\nimport { subclass as m } from \"./core/accessorSupport/decorators/subclass.js\";\nimport { fromJSON as g } from \"./geometry/support/jsonUtils.js\";\nvar y;\nfunction c(t) {\n if (!t) return null;\n const e = {};\n for (const r in t) {\n const s = g(t[r]);\n s && (e[r] = s);\n }\n return 0 !== Object.keys(e).length ? e : null;\n}\nfunction f(t) {\n if (null == t) return null;\n const e = {};\n for (const r in t) {\n const s = t[r];\n s && (e[r] = s.toJSON());\n }\n return 0 !== Object.keys(e).length ? e : null;\n}\nlet b = y = class extends i(l) {\n constructor(t) {\n super(t), this.isAggregate = !1, this.layer = null, this.origin = null, this.popupTemplate = null, this.sourceLayer = null, this._version = 0, Object.defineProperty(this, \"uid\", {\n value: h(),\n configurable: !0\n }), Object.defineProperty(this, \"_lastMeshTransform\", {\n value: {},\n configurable: !0,\n writable: !0,\n enumerable: !1\n }), arguments.length > 1 && o(n.getLogger(this), \"Graphic\", {\n version: \"4.30\"\n });\n }\n initialize() {\n this._watchMeshGeometryChanges();\n }\n set aggregateGeometries(t) {\n const e = this._get(\"aggregateGeometries\");\n JSON.stringify(e) !== JSON.stringify(t) && this._set(\"aggregateGeometries\", t);\n }\n set attributes(t) {\n const e = this._get(\"attributes\");\n e !== t && (this._set(\"attributes\", t), this._notifyLayer(\"attributes\", e, t));\n }\n set geometry(t) {\n const e = this._get(\"geometry\");\n e !== t && (this._set(\"geometry\", t), \"mesh\" !== t?.type && this._notifyLayer(\"geometry\", e, t));\n }\n set symbol(t) {\n const e = this._get(\"symbol\");\n e !== t && (this._set(\"symbol\", t), this._notifyLayer(\"symbol\", e, t));\n }\n get version() {\n return this._version;\n }\n set visible(t) {\n const e = this._get(\"visible\");\n e !== t && (this._set(\"visible\", t), this._notifyLayer(\"visible\", e, t));\n }\n cloneShallow() {\n return new y({\n aggregateGeometries: this.aggregateGeometries,\n attributes: this.attributes,\n geometry: this.geometry,\n isAggregate: this.isAggregate,\n layer: this.layer,\n popupTemplate: this.popupTemplate,\n sourceLayer: this.sourceLayer,\n symbol: this.symbol,\n visible: this.visible,\n origin: this.origin\n });\n }\n getEffectivePopupTemplate(t = !1) {\n if (this.popupTemplate) return this.popupTemplate;\n const e = this.origin && \"layer\" in this.origin ? this.origin.layer : null;\n for (const r of [e, this.sourceLayer, this.layer]) if (r) {\n if (\"popupTemplate\" in r && r.popupTemplate) return r.popupTemplate;\n if (t && \"defaultPopupTemplate\" in r && null != r.defaultPopupTemplate) return r.defaultPopupTemplate;\n }\n return null;\n }\n getAttribute(t) {\n return this.attributes?.[t];\n }\n setAttribute(t, e) {\n if (this.attributes) {\n const r = this.getAttribute(t);\n this.attributes[t] = e, this._notifyLayer(\"attributes\", r, e, t);\n } else this.attributes = {\n [t]: e\n }, this._notifyLayer(\"attributes\", void 0, e, t);\n }\n getObjectId() {\n return this.sourceLayer && \"objectIdField\" in this.sourceLayer && this.sourceLayer.objectIdField ? this.getAttribute(this.sourceLayer.objectIdField) : null;\n }\n toJSON() {\n return {\n aggregateGeometries: f(this.aggregateGeometries),\n geometry: null != this.geometry ? this.geometry.toJSON() : null,\n symbol: null != this.symbol ? this.symbol.toJSON() : null,\n attributes: a(this.attributes) ? this.attributes.toJSON() : {\n ...this.attributes\n },\n popupTemplate: this.popupTemplate?.toJSON() ?? null\n };\n }\n notifyMeshTransformChanged(t = {}) {\n const {\n geometry: e\n } = this;\n if (\"mesh\" === e?.type) {\n const r = {\n origin: e.origin,\n transform: e.transform\n };\n this._notifyLayer(\"origin-transform\", r, r, t.action);\n }\n }\n _notifyLayer(t, e, r, s) {\n if (this._version++, !this.layer || !(\"graphicChanged\" in this.layer)) return;\n const i = {\n graphic: this,\n property: t,\n oldValue: e,\n newValue: r\n };\n \"origin-transform\" === t && (i.action = s), \"attributes\" === t && (i.attributeName = s), this.layer.graphicChanged(i);\n }\n _watchMeshGeometryChanges() {\n this.addHandles([p(() => \"mesh\" === this.geometry?.type && this.geometry.vertexSpace.origin ? {\n localMatrix: this.geometry.transform?.localMatrix,\n origin: this.geometry.vertexSpace.origin\n } : void 0, ({\n localMatrix: t,\n origin: e\n }) => {\n this._lastMeshTransform.localMatrix === t && this._lastMeshTransform.origin === e || (this._lastMeshTransform.localMatrix = t, this._lastMeshTransform.origin = e, this.notifyMeshTransformChanged());\n }), p(() => \"mesh\" === this.geometry?.type ? {\n vertexAttributes: this.geometry.vertexAttributes\n } : void 0, () => {\n const t = this.geometry;\n \"mesh\" === t?.type && t.vertexSpace.origin ? (this._lastMeshTransform.localMatrix = t.transform?.localMatrix, this._lastMeshTransform.origin = t.vertexSpace.origin) : (this._lastMeshTransform.localMatrix = void 0, this._lastMeshTransform.origin = void 0), this._notifyLayer(\"geometry\", this.geometry, this.geometry);\n }, {\n equals: (t, e) => t === e,\n sync: !0\n })]);\n }\n};\nt([u({\n value: null,\n json: {\n read: c\n }\n})], b.prototype, \"aggregateGeometries\", null), t([u({\n value: null\n})], b.prototype, \"attributes\", null), t([u({\n value: null,\n types: e,\n json: {\n read: g\n }\n})], b.prototype, \"geometry\", null), t([u({\n type: Boolean\n})], b.prototype, \"isAggregate\", void 0), t([u({\n clonable: \"reference\"\n})], b.prototype, \"layer\", void 0), t([u({\n clonable: \"reference\"\n})], b.prototype, \"origin\", void 0), t([u({\n type: r\n})], b.prototype, \"popupTemplate\", void 0), t([u({\n clonable: \"reference\"\n})], b.prototype, \"sourceLayer\", void 0), t([u({\n value: null,\n types: s\n})], b.prototype, \"symbol\", null), t([u({\n clonable: !1,\n json: {\n read: !1,\n write: !1\n }\n})], b.prototype, \"_version\", void 0), t([u({\n type: Boolean,\n value: !0\n})], b.prototype, \"visible\", null), b = y = t([m(\"esri.Graphic\")], b);\nconst d = b;\nexport { d as default };"],"mappings":"qfAmBA,IAAIA,EACJ,SAASC,EAAEC,EAAG,CACZ,GAAI,CAACA,EAAG,OAAO,KACf,IAAMC,EAAI,CAAC,EACX,QAAW,KAAKD,EAAG,CACjB,IAAME,EAAIC,EAAEH,EAAE,CAAC,CAAC,EAChBE,IAAMD,EAAE,CAAC,EAAIC,EACf,CACA,OAAa,OAAO,KAAKD,CAAC,EAAE,SAArB,EAA8BA,EAAI,IAC3C,CACA,SAASE,EAAEH,EAAG,CACZ,GAAYA,GAAR,KAAW,OAAO,KACtB,IAAMC,EAAI,CAAC,EACX,QAAW,KAAKD,EAAG,CACjB,IAAME,EAAIF,EAAE,CAAC,EACbE,IAAMD,EAAE,CAAC,EAAIC,EAAE,OAAO,EACxB,CACA,OAAa,OAAO,KAAKD,CAAC,EAAE,SAArB,EAA8BA,EAAI,IAC3C,CACA,IAAIG,EAAIN,EAAI,cAAcO,EAAEF,CAAC,CAAE,CAC7B,YAAYH,EAAG,CACb,MAAMA,CAAC,EAAG,KAAK,YAAc,GAAI,KAAK,MAAQ,KAAM,KAAK,OAAS,KAAM,KAAK,cAAgB,KAAM,KAAK,YAAc,KAAM,KAAK,SAAW,EAAG,OAAO,eAAe,KAAM,MAAO,CAChL,MAAOC,EAAE,EACT,aAAc,EAChB,CAAC,EAAG,OAAO,eAAe,KAAM,qBAAsB,CACpD,MAAO,CAAC,EACR,aAAc,GACd,SAAU,GACV,WAAY,EACd,CAAC,EAAG,UAAU,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