{"version":3,"sources":["node_modules/@arcgis/core/geometry/HeightModelInfo.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 e } from \"../chunks/tslib.es6.js\";\nimport { removeUnordered as t } from \"../core/arrayUtils.js\";\nimport { strict as r } from \"../core/jsonMap.js\";\nimport { JSONSupport as o } from \"../core/JSONSupport.js\";\nimport { unitFromRESTJSON as i, getVerticalUnitStringForSR as s } from \"../core/unitUtils.js\";\nimport n from \"../core/Warning.js\";\nimport { property as a } from \"../core/accessorSupport/decorators/property.js\";\nimport \"../core/has.js\";\nimport \"../core/Logger.js\";\nimport { reader as l } from \"../core/accessorSupport/decorators/reader.js\";\nimport { subclass as h } from \"../core/accessorSupport/decorators/subclass.js\";\nimport { writer as c } from \"../core/accessorSupport/decorators/writer.js\";\nvar d;\nconst p = r()({\n orthometric: \"gravity-related-height\",\n gravity_related_height: \"gravity-related-height\",\n ellipsoidal: \"ellipsoidal\"\n }),\n u = p.jsonValues.slice();\nt(u, \"orthometric\");\nconst g = r()({\n meter: \"meters\",\n foot: \"feet\",\n \"us-foot\": \"us-feet\",\n \"clarke-foot\": \"clarke-feet\",\n \"clarke-yard\": \"clarke-yards\",\n \"clarke-link\": \"clarke-links\",\n \"sears-yard\": \"sears-yards\",\n \"sears-foot\": \"sears-feet\",\n \"sears-chain\": \"sears-chains\",\n \"benoit-1895-b-chain\": \"benoit-1895-b-chains\",\n \"indian-yard\": \"indian-yards\",\n \"indian-1937-yard\": \"indian-1937-yards\",\n \"gold-coast-foot\": \"gold-coast-feet\",\n \"sears-1922-truncated-chain\": \"sears-1922-truncated-chains\",\n \"50-kilometers\": \"50-kilometers\",\n \"150-kilometers\": \"150-kilometers\"\n});\nlet m = d = class extends o {\n constructor(e) {\n super(e), this.heightModel = \"gravity-related-height\", this.heightUnit = \"meters\", this.vertCRS = null;\n }\n writeHeightModel(e, t, r) {\n return p.write(e, t, r);\n }\n readHeightModel(e, t, r) {\n const o = p.read(e);\n return o || (r?.messages && r.messages.push(f(e, {\n context: r\n })), null);\n }\n readHeightUnit(e, t, r) {\n const o = g.read(e);\n return o || (r?.messages && r.messages.push(y(e, {\n context: r\n })), null);\n }\n readHeightUnitService(e, t, r) {\n const o = i(e) || g.read(e);\n return o || (r?.messages && r.messages.push(y(e, {\n context: r\n })), null);\n }\n readVertCRS(e, t) {\n return t.vertCRS || t.ellipsoid || t.geoid;\n }\n clone() {\n return new d({\n heightModel: this.heightModel,\n heightUnit: this.heightUnit,\n vertCRS: this.vertCRS\n });\n }\n equals(e) {\n return !!e && (this === e || this.heightModel === e.heightModel && this.heightUnit === e.heightUnit && this.vertCRS === e.vertCRS);\n }\n static deriveUnitFromSR(e, t) {\n const r = s(t);\n return new d({\n heightModel: e.heightModel,\n heightUnit: r ?? void 0,\n vertCRS: e.vertCRS\n });\n }\n write(e, t) {\n return t = {\n origin: \"web-scene\",\n ...t\n }, super.write(e, t);\n }\n static fromJSON(e) {\n if (!e) return null;\n const t = new d();\n return t.read(e, {\n origin: \"web-scene\"\n }), t;\n }\n};\nfunction y(e, t) {\n return new n(\"height-unit:unsupported\", `Height unit of value '${e}' is not supported`, t);\n}\nfunction f(e, t) {\n return new n(\"height-model:unsupported\", `Height model of value '${e}' is not supported`, t);\n}\ne([a({\n type: p.apiValues,\n constructOnly: !0,\n json: {\n origins: {\n \"web-scene\": {\n type: u,\n default: \"ellipsoidal\"\n }\n }\n }\n})], m.prototype, \"heightModel\", void 0), e([c(\"web-scene\", \"heightModel\")], m.prototype, \"writeHeightModel\", null), e([l([\"web-scene\", \"service\"], \"heightModel\")], m.prototype, \"readHeightModel\", null), e([a({\n type: g.apiValues,\n constructOnly: !0,\n json: {\n origins: {\n \"web-scene\": {\n type: g.jsonValues,\n write: g.write\n }\n }\n }\n})], m.prototype, \"heightUnit\", void 0), e([l(\"web-scene\", \"heightUnit\")], m.prototype, \"readHeightUnit\", null), e([l(\"service\", \"heightUnit\")], m.prototype, \"readHeightUnitService\", null), e([a({\n type: String,\n constructOnly: !0,\n json: {\n origins: {\n \"web-scene\": {\n write: !0\n }\n }\n }\n})], m.prototype, \"vertCRS\", void 0), e([l(\"service\", \"vertCRS\", [\"vertCRS\", \"ellipsoid\", \"geoid\"])], m.prototype, \"readVertCRS\", null), m = d = e([h(\"esri.geometry.HeightModelInfo\")], m);\nconst v = m;\nexport { v as default };"],"mappings":"gaAgBA,IAAIA,EACEC,EAAIC,EAAE,EAAE,CACV,YAAa,yBACb,uBAAwB,yBACxB,YAAa,aACf,CAAC,EACDC,EAAIF,EAAE,WAAW,MAAM,EACzBG,EAAED,EAAG,aAAa,EAClB,IAAME,EAAIH,EAAE,EAAE,CACZ,MAAO,SACP,KAAM,OACN,UAAW,UACX,cAAe,cACf,cAAe,eACf,cAAe,eACf,aAAc,cACd,aAAc,aACd,cAAe,eACf,sBAAuB,uBACvB,cAAe,eACf,mBAAoB,oBACpB,kBAAmB,kBACnB,6BAA8B,8BAC9B,gBAAiB,gBACjB,iBAAkB,gBACpB,CAAC,EACGI,EAAIN,EAAI,cAAcO,CAAE,CAC1B,YAAY,EAAG,CACb,MAAM,CAAC,EAAG,KAAK,YAAc,yBAA0B,KAAK,WAAa,SAAU,KAAK,QAAU,IACpG,CACA,iBAAiB,EAAG,EAAG,EAAG,CACxB,OAAON,EAAE,MAAM,EAAG,EAAG,CAAC,CACxB,CACA,gBAAgB,EAAG,EAAG,EAAG,CAEvB,OADUA,EAAE,KAAK,CAAC,IACL,GAAG,UAAY,EAAE,SAAS,KAAKM,EAAE,EAAG,CAC/C,QAAS,CACX,CAAC,CAAC,EAAG,KACP,CACA,eAAe,EAAG,EAAG,EAAG,CAEtB,OADUF,EAAE,KAAK,CAAC,IACL,GAAG,UAAY,EAAE,SAAS,KAAKG,EAAE,EAAG,CAC/C,QAAS,CACX,CAAC,CAAC,EAAG,KACP,CACA,sBAAsB,EAAG,EAAG,EAAG,CAE7B,OADUC,EAA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