chunk-X42TFXOU.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. import {
  2. w
  3. } from "./chunk-JFSMKLAQ.js";
  4. import {
  5. a,
  6. d
  7. } from "./chunk-LXOC7SMQ.js";
  8. import {
  9. j2 as j
  10. } from "./chunk-JAUFBT5U.js";
  11. import {
  12. o as o4,
  13. p,
  14. p2
  15. } from "./chunk-RHFU6KWO.js";
  16. import {
  17. C
  18. } from "./chunk-3FNKD2EB.js";
  19. import {
  20. k
  21. } from "./chunk-P6VVVEX6.js";
  22. import {
  23. D,
  24. M
  25. } from "./chunk-3Z755LKF.js";
  26. import {
  27. m,
  28. p as p3
  29. } from "./chunk-GLSWDDR3.js";
  30. import {
  31. o as o3
  32. } from "./chunk-UVVU4UUO.js";
  33. import {
  34. r as r2
  35. } from "./chunk-5N7JLUJJ.js";
  36. import {
  37. o as o2
  38. } from "./chunk-6T6G6LCQ.js";
  39. import {
  40. r
  41. } from "./chunk-PQFTYGF5.js";
  42. import {
  43. e,
  44. l3 as l,
  45. n5 as n,
  46. s5 as s,
  47. y3 as y2
  48. } from "./chunk-2Z2TG5CU.js";
  49. import {
  50. o,
  51. y
  52. } from "./chunk-SPWQ3AWG.js";
  53. // node_modules/@arcgis/core/layers/mixins/FeatureEffectLayer.js
  54. var s2 = { write: { allowNull: true } };
  55. var p4 = (p6) => {
  56. let c2 = class extends p6 {
  57. constructor() {
  58. super(...arguments), this.featureEffect = null;
  59. }
  60. };
  61. return e([y2({ type: w, json: { origins: { "web-map": s2, "portal-item": s2 } } })], c2.prototype, "featureEffect", void 0), c2 = e([n("esri.layers.mixins.FeatureEffectLayer")], c2), c2;
  62. };
  63. // node_modules/@arcgis/core/layers/support/FeatureReduction.js
  64. var t = class extends l {
  65. constructor() {
  66. super(...arguments), this.type = null;
  67. }
  68. };
  69. e([y2({ type: ["selection", "cluster", "binning"], readOnly: true, json: { read: false, write: true } })], t.prototype, "type", void 0), t = e([n("esri.layers.support.FeatureReduction")], t);
  70. // node_modules/@arcgis/core/layers/support/FeatureReductionSelection.js
  71. var t2;
  72. var c = t2 = class extends t {
  73. constructor(r4) {
  74. super(r4), this.type = "selection";
  75. }
  76. clone() {
  77. return new t2();
  78. }
  79. };
  80. e([y2({ type: ["selection"] })], c.prototype, "type", void 0), c = t2 = e([n("esri.layers.support.FeatureReductionSelection")], c);
  81. var p5 = c;
  82. // node_modules/@arcgis/core/layers/support/FeatureReductionBinning.js
  83. var v;
  84. var w2 = s({ types: M });
  85. var I = "esri.layers.support.FeatureReductionBinning";
  86. var S = v = class extends t {
  87. constructor(e2) {
  88. super(e2), this.type = "binning", this.binType = "geohash", this.fixedBinLevel = 3, this.labelingInfo = null, this.labelsVisible = true, this.popupEnabled = true, this.popupTemplate = null, this.fields = [], this.renderer = null;
  89. }
  90. writeFields(e2, r4, o6) {
  91. const t3 = e2.filter((e3) => "avg_angle" !== e3.statisticType).map((e3) => e3.toJSON());
  92. o(o6, t3, r4);
  93. }
  94. readRenderer(e2, r4, i) {
  95. var _a, _b;
  96. const p6 = (_a = r4.drawingInfo) == null ? void 0 : _a.renderer;
  97. return p6 ? (_b = o4(p6, r4, i)) != null ? _b : void 0 : r4.defaultSymbol ? r4.types && r4.types.length ? new C({ defaultSymbol: w2(r4.defaultSymbol, r4, i), field: r4.typeIdField, uniqueValueInfos: r4.types.map((e3) => ({ id: e3.id, symbol: w2(e3.symbol, e3, i) })) }) : new p({ symbol: w2(r4.defaultSymbol, r4, i) }) : null;
  98. }
  99. clone() {
  100. return new v({ fields: y(this.fields), fixedBinLevel: this.fixedBinLevel, labelingInfo: y(this.labelingInfo), labelsVisible: this.labelsVisible, popupEnabled: this.popupEnabled, popupTemplate: y(this.popupTemplate), renderer: y(this.renderer) });
  101. }
  102. };
  103. e([r2({ binning: "binning" })], S.prototype, "type", void 0), e([r2({ geohash: "geohash" })], S.prototype, "binType", void 0), e([y2({ type: Number, range: { min: 1, max: 9 }, json: { write: true } })], S.prototype, "fixedBinLevel", void 0), e([y2({ type: [j], json: { read: { source: "drawingInfo.labelingInfo" }, write: { target: "drawingInfo.labelingInfo" } } })], S.prototype, "labelingInfo", void 0), e([y2(m)], S.prototype, "labelsVisible", void 0), e([y2(p3)], S.prototype, "popupEnabled", void 0), e([y2({ type: k, json: { name: "popupInfo", write: true } })], S.prototype, "popupTemplate", void 0), e([y2({ type: [a], json: { write: true } })], S.prototype, "fields", void 0), e([r("fields")], S.prototype, "writeFields", null), e([y2({ types: p2, json: { write: { target: "drawingInfo.renderer" } } })], S.prototype, "renderer", void 0), e([o2("renderer", ["drawingInfo.renderer"])], S.prototype, "readRenderer", null), S = v = e([n(I)], S);
  104. var R = S;
  105. // node_modules/@arcgis/core/layers/support/FeatureReductionCluster.js
  106. var w3;
  107. var I2 = s({ types: M });
  108. var v2 = "esri.layers.support.FeatureReductionCluster";
  109. function R2(e2) {
  110. var _a;
  111. return "simple" === e2.type && !((_a = e2.visualVariables) == null ? void 0 : _a.length);
  112. }
  113. var x = w3 = class extends l {
  114. constructor(e2) {
  115. super(e2), this.type = "cluster", this.clusterRadius = o3("80px"), this.clusterMinSize = o3("12px"), this.clusterMaxSize = o3("50px"), this.popupEnabled = true, this.popupTemplate = null, this.renderer = null, this.symbol = null, this.labelingInfo = null, this.labelsVisible = true, this.fields = null;
  116. }
  117. readRenderer(e2, r4, i) {
  118. var _a, _b, _c;
  119. const p6 = (_a = r4.drawingInfo) == null ? void 0 : _a.renderer;
  120. return ((_b = p6 == null ? void 0 : p6.authoringInfo) == null ? void 0 : _b.isAutoGenerated) ? null : p6 ? R2(p6) ? null : (_c = o4(p6, r4, i)) != null ? _c : void 0 : r4.defaultSymbol ? r4.types && r4.types.length ? new C({ defaultSymbol: I2(r4.defaultSymbol, r4, i), field: r4.typeIdField, uniqueValueInfos: r4.types.map((e3) => ({ id: e3.id, symbol: I2(e3.symbol, e3, i) })) }) : new p({ symbol: I2(r4.defaultSymbol, r4, i) }) : null;
  121. }
  122. readSymbol(e2, r4, o6) {
  123. var _a, _b, _c;
  124. const t3 = (_a = r4.drawingInfo) == null ? void 0 : _a.renderer;
  125. if ((_b = t3 == null ? void 0 : t3.authoringInfo) == null ? void 0 : _b.isAutoGenerated)
  126. return null;
  127. if (t3 && R2(t3)) {
  128. return (_c = o4(t3, r4, o6)) == null ? void 0 : _c.symbol;
  129. }
  130. return null;
  131. }
  132. writeSymbol(e2, r4, t3, s3) {
  133. var _a, _b;
  134. const i = (_b = (_a = this.renderer) == null ? void 0 : _a.authoringInfo) == null ? void 0 : _b.isAutoGenerated;
  135. if (!this.renderer || i) {
  136. const t4 = new p({ symbol: e2 });
  137. r4.drawingInfo = { renderer: t4.write({}, s3) };
  138. }
  139. }
  140. writeFields(e2, r4, o6) {
  141. const t3 = e2.filter((e3) => "avg_angle" !== e3.statisticType).map((e3) => e3.toJSON());
  142. o(o6, t3, r4);
  143. }
  144. readFields(e2, r4, o6) {
  145. return e2.filter((e3) => !e3.isAutoGenerated).map((e3) => a.fromJSON(e3));
  146. }
  147. clone() {
  148. return new w3({ clusterRadius: this.clusterRadius, clusterMinSize: this.clusterMinSize, clusterMaxSize: this.clusterMaxSize, labelingInfo: y(this.labelingInfo), labelsVisible: this.labelsVisible, fields: y(this.fields), renderer: y(this.renderer), symbol: y(this.symbol), popupEnabled: this.popupEnabled, popupTemplate: y(this.popupTemplate) });
  149. }
  150. };
  151. e([y2({ type: ["cluster"], readOnly: true, json: { write: true } })], x.prototype, "type", void 0), e([y2({ type: Number, cast: (e2) => "auto" === e2 ? e2 : o3(e2), json: { write: true } })], x.prototype, "clusterRadius", void 0), e([y2({ type: Number, cast: o3, json: { write: true } })], x.prototype, "clusterMinSize", void 0), e([y2({ type: Number, cast: o3, json: { write: true } })], x.prototype, "clusterMaxSize", void 0), e([y2(p3)], x.prototype, "popupEnabled", void 0), e([y2({ type: k, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], x.prototype, "popupTemplate", void 0), e([y2({ types: p2, json: { write: { target: "drawingInfo.renderer" } } })], x.prototype, "renderer", void 0), e([o2("renderer", ["drawingInfo.renderer"])], x.prototype, "readRenderer", null), e([y2({ types: D })], x.prototype, "symbol", void 0), e([o2("symbol", ["drawingInfo.renderer"])], x.prototype, "readSymbol", null), e([r("symbol")], x.prototype, "writeSymbol", null), e([y2({ type: [j], json: { read: { source: "drawingInfo.labelingInfo" }, write: { target: "drawingInfo.labelingInfo" } } })], x.prototype, "labelingInfo", void 0), e([y2(m)], x.prototype, "labelsVisible", void 0), e([y2({ type: [a], json: { write: true } })], x.prototype, "fields", void 0), e([r("fields")], x.prototype, "writeFields", null), e([o2("fields")], x.prototype, "readFields", null), x = w3 = e([n(v2)], x);
  152. var z = x;
  153. // node_modules/@arcgis/core/layers/support/featureReductionUtils.js
  154. var o5 = { key: "type", base: t, typeMap: { cluster: z, binning: R } };
  155. var r3 = { types: { key: "type", base: t, typeMap: { selection: p5, cluster: z, binning: R } }, json: { name: "layerDefinition.featureReduction", write: { allowNull: true }, origins: { "web-map": { types: o5 }, "portal-item": { types: o5 }, "web-scene": { types: { key: "type", base: t, typeMap: { selection: p5 } } } } } };
  156. // node_modules/@arcgis/core/layers/mixins/FeatureReductionLayer.js
  157. var n2 = (n3) => {
  158. let u = class extends n3 {
  159. constructor(...e2) {
  160. super(...e2), this.own(this.watch("renderer", () => {
  161. if (this.featureReduction) {
  162. const e3 = this._normalizeFeatureReduction(this.featureReduction);
  163. this._set("featureReduction", e3);
  164. }
  165. }, true));
  166. }
  167. set featureReduction(e2) {
  168. const r4 = this._normalizeFeatureReduction(e2);
  169. this._set("featureReduction", r4);
  170. }
  171. set renderer(e2) {
  172. }
  173. _normalizeFeatureReduction(e2) {
  174. var _a, _b;
  175. if ("cluster" !== (e2 == null ? void 0 : e2.type))
  176. return e2;
  177. const r4 = e2.clone(), t3 = [new a({ name: "cluster_count", isAutoGenerated: true, statisticType: "count" })], o6 = ((_a = r4.fields) != null ? _a : []).filter((e3) => !e3.isAutoGenerated);
  178. if (e2.renderer && !((_b = e2.renderer.authoringInfo) == null ? void 0 : _b.isAutoGenerated))
  179. return r4.fields = [...t3, ...o6], r4;
  180. if (e2.symbol)
  181. return r4.fields = [...t3, ...o6], r4.renderer = null, r4;
  182. if (!this.renderer)
  183. return e2;
  184. const n4 = d(t3, this.renderer, e2, null, false);
  185. return r4.fields = [...t3, ...o6], r4.renderer = n4, r4;
  186. }
  187. };
  188. return e([y2(r3)], u.prototype, "featureReduction", null), u = e([n("esri.layers.mixins.FeatureReductionLayer")], u), u;
  189. };
  190. export {
  191. p4 as p,
  192. t,
  193. p5 as p2,
  194. n2 as n
  195. };
  196. //# sourceMappingURL=chunk-X42TFXOU.js.map