DimensionLayer-5ON3JP7F.js 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. import {
  2. c as c2
  3. } from "./chunk-2AXHPBK3.js";
  4. import {
  5. s as s2
  6. } from "./chunk-AJFR3FGC.js";
  7. import {
  8. on
  9. } from "./chunk-VYQHMPYW.js";
  10. import "./chunk-SOSOZIX6.js";
  11. import {
  12. l as l3
  13. } from "./chunk-YMULPZCD.js";
  14. import {
  15. l,
  16. w
  17. } from "./chunk-BWATQC2Y.js";
  18. import {
  19. c
  20. } from "./chunk-VXKIGGM4.js";
  21. import "./chunk-KG45D2XL.js";
  22. import {
  23. O
  24. } from "./chunk-JYRZQPQI.js";
  25. import "./chunk-3HZQM2NK.js";
  26. import "./chunk-AR2YN3E2.js";
  27. import "./chunk-U3LEOWJX.js";
  28. import "./chunk-4ONPMX2F.js";
  29. import "./chunk-47NSA4T4.js";
  30. import "./chunk-FUODOQDM.js";
  31. import "./chunk-VGWC3IKZ.js";
  32. import "./chunk-SWMSD4RP.js";
  33. import "./chunk-UKEN2UNL.js";
  34. import {
  35. e as e3,
  36. o
  37. } from "./chunk-UVVU4UUO.js";
  38. import {
  39. l as l2
  40. } from "./chunk-X4SA4ELJ.js";
  41. import {
  42. n as n2,
  43. t as t2
  44. } from "./chunk-PE24J2I5.js";
  45. import "./chunk-P3XKUGLS.js";
  46. import "./chunk-ZLNEXZAN.js";
  47. import {
  48. b
  49. } from "./chunk-O43KLDSX.js";
  50. import "./chunk-AUOH2VSO.js";
  51. import "./chunk-ZYRIJWLX.js";
  52. import "./chunk-RYY6632W.js";
  53. import "./chunk-DW42UVIT.js";
  54. import "./chunk-TJNOJH33.js";
  55. import "./chunk-YAEIHDJH.js";
  56. import "./chunk-OSHI574D.js";
  57. import "./chunk-44GMIOGP.js";
  58. import "./chunk-75U5LM2V.js";
  59. import "./chunk-ZHRAUKVQ.js";
  60. import "./chunk-RZK6A2GY.js";
  61. import {
  62. j
  63. } from "./chunk-4NQ74ZR6.js";
  64. import "./chunk-X4LLOW7U.js";
  65. import "./chunk-BDA6VH2A.js";
  66. import "./chunk-Z4JTBD7M.js";
  67. import "./chunk-MSBIHK67.js";
  68. import "./chunk-HZRKBTHJ.js";
  69. import "./chunk-5DMBXPN2.js";
  70. import "./chunk-QANZ6BFY.js";
  71. import "./chunk-VEGAOVMY.js";
  72. import {
  73. w as w2,
  74. w2 as w3
  75. } from "./chunk-CXCDYJ5R.js";
  76. import {
  77. s
  78. } from "./chunk-GAOW3WRZ.js";
  79. import {
  80. r as r2
  81. } from "./chunk-QCKFNSN2.js";
  82. import {
  83. e,
  84. n5 as n,
  85. u2 as u,
  86. y3 as y
  87. } from "./chunk-6SOHRC7T.js";
  88. import "./chunk-U2XHEJM7.js";
  89. import {
  90. T,
  91. a
  92. } from "./chunk-SQOPWYIT.js";
  93. import "./chunk-6KZ2LTDA.js";
  94. import "./chunk-V6P2MAQQ.js";
  95. import "./chunk-E5O6P5I2.js";
  96. import "./chunk-SPWQ3AWG.js";
  97. import "./chunk-2TIUKVZN.js";
  98. import {
  99. e as e2,
  100. r,
  101. t
  102. } from "./chunk-YXWMMD76.js";
  103. import "./chunk-S5KM4IGW.js";
  104. // node_modules/@arcgis/core/analysis/DimensionSimpleStyle.js
  105. var c3 = class extends u(l3) {
  106. constructor(e4) {
  107. super(e4), this.type = "simple", this.color = new l2("black"), this.lineSize = 2, this.fontSize = 10, this.textColor = new l2("black"), this.textBackgroundColor = new l2([255, 255, 255, 0.6]);
  108. }
  109. };
  110. e([y({ type: ["simple"], readOnly: true, json: { write: { isRequired: true } } })], c3.prototype, "type", void 0), e([y({ type: l2, nonNullable: true, json: { type: [T], write: { isRequired: true } } })], c3.prototype, "color", void 0), e([y({ type: Number, cast: o, nonNullable: true, range: { min: e3(1) }, json: { write: { isRequired: true } } })], c3.prototype, "lineSize", void 0), e([y({ type: Number, cast: o, nonNullable: true, json: { write: { isRequired: true } } })], c3.prototype, "fontSize", void 0), e([y({ type: l2, nonNullable: true, json: { type: [T], write: { isRequired: true } } })], c3.prototype, "textColor", void 0), e([y({ type: l2, nonNullable: true, json: { type: [T], write: { isRequired: true } } })], c3.prototype, "textBackgroundColor", void 0), c3 = e([n("esri.analysis.DimensionSimpleStyle")], c3);
  111. var a2 = c3;
  112. // node_modules/@arcgis/core/analysis/dimensionUtils.js
  113. var t3;
  114. !function(t4) {
  115. t4.Horizontal = "horizontal", t4.Vertical = "vertical", t4.Direct = "direct";
  116. }(t3 || (t3 = {}));
  117. var r3 = [t3.Horizontal, t3.Vertical, t3.Direct];
  118. // node_modules/@arcgis/core/analysis/LengthDimension.js
  119. var l4 = class extends u(l3) {
  120. constructor(o2) {
  121. super(o2), this.type = "length", this.startPoint = null, this.endPoint = null, this.measureType = t3.Direct, this.offset = 0, this.orientation = 0;
  122. }
  123. };
  124. e([y({ type: ["length"], json: { write: { isRequired: true } } })], l4.prototype, "type", void 0), e([y({ type: w2, json: { write: true } })], l4.prototype, "startPoint", void 0), e([y({ type: w2, json: { write: true } })], l4.prototype, "endPoint", void 0), e([y({ type: r3, nonNullable: true, json: { write: { isRequired: true } } })], l4.prototype, "measureType", void 0), e([y({ type: Number, nonNullable: true, json: { write: { isRequired: true } } })], l4.prototype, "offset", void 0), e([y({ type: Number, nonNullable: true, json: { write: { isRequired: true } } }), s((o2) => s2.normalize(a(o2), 0, true))], l4.prototype, "orientation", void 0), l4 = e([n("esri.analysis.LengthDimension")], l4);
  125. var u2 = l4;
  126. // node_modules/@arcgis/core/analysis/DimensionAnalysis.js
  127. var h = j.ofType(u2);
  128. var g = class extends c2 {
  129. constructor(e4) {
  130. super(e4), this.type = "dimension", this.style = new a2(), this.extent = null;
  131. }
  132. initialize() {
  133. this.addHandles(l(() => this._computeExtent(), (e4) => {
  134. (t(e4) || t(e4.pending)) && this._set("extent", r(e4) ? e4.extent : null);
  135. }, w));
  136. }
  137. get dimensions() {
  138. return this._get("dimensions") || new h();
  139. }
  140. set dimensions(e4) {
  141. this._set("dimensions", n2(e4, this.dimensions, h));
  142. }
  143. get spatialReference() {
  144. for (const e4 of this.dimensions) {
  145. if (r(e4.startPoint))
  146. return e4.startPoint.spatialReference;
  147. if (r(e4.endPoint))
  148. return e4.endPoint.spatialReference;
  149. }
  150. return null;
  151. }
  152. get requiredPropertiesForEditing() {
  153. return this.dimensions.reduce((e4, t4) => (e4.push(t4.startPoint, t4.endPoint), e4), []);
  154. }
  155. async waitComputeExtent() {
  156. const e4 = this._computeExtent();
  157. return r(e4) ? e2(e4.pending) : null;
  158. }
  159. _computeExtent() {
  160. const e4 = this.spatialReference;
  161. if (t(e4))
  162. return { pending: null, extent: null };
  163. const t4 = [];
  164. for (const s3 of this.dimensions)
  165. r(s3.startPoint) && t4.push(s3.startPoint), r(s3.endPoint) && t4.push(s3.endPoint);
  166. const n3 = on(t4, e4);
  167. if (r(n3.pending))
  168. return { pending: n3.pending, extent: null };
  169. let o2 = null;
  170. return r(n3.geometries) && (o2 = n3.geometries.reduce((e5, t5) => t(e5) ? r(t5) ? w3.fromPoint(t5) : null : r(t5) ? e5.union(w3.fromPoint(t5)) : e5, null)), { pending: null, extent: o2 };
  171. }
  172. clear() {
  173. this.dimensions.removeAll();
  174. }
  175. };
  176. e([y({ type: ["dimension"] })], g.prototype, "type", void 0), e([y({ cast: t2, type: h, nonNullable: true })], g.prototype, "dimensions", null), e([y({ readOnly: true })], g.prototype, "spatialReference", null), e([y({ types: { key: "type", base: null, typeMap: { simple: a2 } }, nonNullable: true })], g.prototype, "style", void 0), e([y({ value: null, readOnly: true })], g.prototype, "extent", void 0), e([y({ readOnly: true })], g.prototype, "requiredPropertiesForEditing", null), g = e([n("esri.analysis.DimensionAnalysis")], g);
  177. var j2 = g;
  178. // node_modules/@arcgis/core/layers/DimensionLayer.js
  179. var h2 = class extends c(O(b)) {
  180. constructor(e4) {
  181. if (super(e4), this.type = "dimension", this.operationalLayerType = "ArcGISDimensionLayer", this.source = new j2(), this.opacity = 1, e4) {
  182. const { source: s3, style: r4 } = e4;
  183. s3 && r4 && (s3.style = r4);
  184. }
  185. }
  186. initialize() {
  187. this.addHandles([l(() => this.source, (e4, s3) => {
  188. r(s3) && s3.parent === this && (s3.parent = null), r(e4) && (e4.parent = this);
  189. }, w)]);
  190. }
  191. async load() {
  192. return this.addResolvingPromise(this.source.waitComputeExtent()), this;
  193. }
  194. get spatialReference() {
  195. return e2(this.source.spatialReference);
  196. }
  197. get style() {
  198. return this.source.style;
  199. }
  200. set style(e4) {
  201. this.source.style = e4;
  202. }
  203. get fullExtent() {
  204. return this.source.extent;
  205. }
  206. releaseAnalysis(e4) {
  207. this.source === e4 && (this.source = new j2());
  208. }
  209. get analysis() {
  210. return this.source;
  211. }
  212. set analysis(e4) {
  213. this.source = e4;
  214. }
  215. get dimensions() {
  216. return this.source.dimensions;
  217. }
  218. set dimensions(e4) {
  219. this.source.dimensions = e4;
  220. }
  221. writeDimensions(e4, s3, r4, t4) {
  222. s3.dimensions = e4.filter(({ startPoint: e5, endPoint: s4 }) => r(e5) && r(s4)).map((e5) => e5.toJSON(t4)).toJSON();
  223. }
  224. };
  225. e([y({ json: { read: false }, readOnly: true })], h2.prototype, "type", void 0), e([y({ type: ["ArcGISDimensionLayer"] })], h2.prototype, "operationalLayerType", void 0), e([y({ nonNullable: true })], h2.prototype, "source", void 0), e([y({ readOnly: true })], h2.prototype, "spatialReference", null), e([y({ types: { key: "type", base: null, typeMap: { simple: a2 } }, json: { write: { ignoreOrigin: true } } })], h2.prototype, "style", null), e([y({ readOnly: true })], h2.prototype, "fullExtent", null), e([y({ readOnly: true, json: { read: false, write: false, origins: { service: { read: false, write: false }, "portal-item": { read: false, write: false }, "web-document": { read: false, write: false } } } })], h2.prototype, "opacity", void 0), e([y({ type: ["show", "hide"] })], h2.prototype, "listMode", void 0), e([y({ type: j.ofType(u2), json: { write: { ignoreOrigin: true }, origins: { "web-scene": { write: { ignoreOrigin: true } } } } })], h2.prototype, "dimensions", null), e([r2("web-scene", "dimensions")], h2.prototype, "writeDimensions", null), h2 = e([n("esri.layers.DimensionLayer")], h2);
  226. var f = h2;
  227. export {
  228. f as default
  229. };
  230. //# sourceMappingURL=DimensionLayer-5ON3JP7F.js.map