chunk-FUD7XO3N.js 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. import {
  2. d as d2,
  3. j as j2
  4. } from "./chunk-6EU7GFUT.js";
  5. import {
  6. a as a3
  7. } from "./chunk-MFUAILAT.js";
  8. import {
  9. p as p2
  10. } from "./chunk-HZJYXMI6.js";
  11. import {
  12. m as m4
  13. } from "./chunk-27P5ZSC7.js";
  14. import {
  15. c as c3
  16. } from "./chunk-UPD4MTCL.js";
  17. import {
  18. M,
  19. S as S2,
  20. b3 as b2,
  21. g,
  22. h2 as h,
  23. j2 as j
  24. } from "./chunk-EN7YGJWG.js";
  25. import {
  26. m as m3
  27. } from "./chunk-LY74KTXV.js";
  28. import {
  29. m as m2,
  30. p
  31. } from "./chunk-EOSZHC5H.js";
  32. import {
  33. a as a2
  34. } from "./chunk-C43UE3Z5.js";
  35. import {
  36. r as r2
  37. } from "./chunk-7ZIDBK7B.js";
  38. import {
  39. c as c2,
  40. i
  41. } from "./chunk-65BYCSII.js";
  42. import {
  43. F,
  44. b as b3
  45. } from "./chunk-WZQZRKNH.js";
  46. import {
  47. a as a4
  48. } from "./chunk-LRDX4TO7.js";
  49. import {
  50. n as n3,
  51. r as r3
  52. } from "./chunk-6A4U74YA.js";
  53. import {
  54. B
  55. } from "./chunk-4NKD334K.js";
  56. import {
  57. s as s5
  58. } from "./chunk-PDKDCAAD.js";
  59. import {
  60. o
  61. } from "./chunk-ECW2QABR.js";
  62. import {
  63. s as s4
  64. } from "./chunk-GCDJLKH4.js";
  65. import {
  66. r
  67. } from "./chunk-MRJEICT6.js";
  68. import {
  69. d,
  70. e,
  71. l3 as l,
  72. n2,
  73. s2 as s3,
  74. t as t2,
  75. y3 as y
  76. } from "./chunk-Y3WMVFTW.js";
  77. import {
  78. S,
  79. a,
  80. b,
  81. u
  82. } from "./chunk-IHXECKQQ.js";
  83. import {
  84. s,
  85. s3 as s2
  86. } from "./chunk-EMJ4ZSM2.js";
  87. import {
  88. m,
  89. n
  90. } from "./chunk-IKP3YN53.js";
  91. import {
  92. c,
  93. e as e2,
  94. t
  95. } from "./chunk-GZT4BVFP.js";
  96. // node_modules/@arcgis/core/renderers/support/AuthoringInfoClassBreakInfo.js
  97. var t3;
  98. var p3 = t3 = class extends l {
  99. constructor(r4) {
  100. super(r4), this.minValue = 0, this.maxValue = 0;
  101. }
  102. clone() {
  103. return new t3({ minValue: this.minValue, maxValue: this.maxValue });
  104. }
  105. };
  106. e([d({ type: Number, json: { write: true } })], p3.prototype, "minValue", void 0), e([d({ type: Number, json: { write: true } })], p3.prototype, "maxValue", void 0), p3 = t3 = e([n2("esri.renderer.support.AuthoringInfoClassBreakInfo")], p3);
  107. // node_modules/@arcgis/core/renderers/support/AuthoringInfoFieldInfo.js
  108. var n4;
  109. var p4 = n4 = class extends l {
  110. constructor(o3) {
  111. super(o3), this.field = "", this.normalizationField = "", this.label = "", this.classBreakInfos = [];
  112. }
  113. clone() {
  114. return new n4({ field: this.field, normalizationField: this.normalizationField, label: this.label, classBreakInfos: m(this.classBreakInfos) });
  115. }
  116. };
  117. e([d({ type: String, json: { write: true } })], p4.prototype, "field", void 0), e([d({ type: String, json: { write: true } })], p4.prototype, "normalizationField", void 0), e([d({ type: String, json: { write: true } })], p4.prototype, "label", void 0), e([d({ type: [p3], json: { write: true } })], p4.prototype, "classBreakInfos", void 0), p4 = n4 = e([n2("esri.renderers.support.AuthoringInfoFieldInfo")], p4);
  118. // node_modules/@arcgis/core/renderers/support/AuthoringInfoVisualVariable.js
  119. var n5;
  120. var l2 = new s5({ percentTotal: "percent-of-total", ratio: "ratio", percent: "percent" });
  121. var p5 = new s5({ sizeInfo: "size", colorInfo: "color", transparencyInfo: "opacity", rotationInfo: "rotation" });
  122. var a5 = { key: (e3) => typeof e3 == "number" ? "number" : "string", typeMap: { number: Number, string: String }, base: null };
  123. var u2 = ["high-to-low", "above-and-below", "centered-on", "extremes"];
  124. var m5 = [...new Set([...["high-to-low", "above-and-below", "centered-on", "extremes", "90-10", "above", "below"], ...["high-to-low", "above-and-below", "90-10", "above", "below"]])];
  125. var y2 = ["seconds", "minutes", "hours", "days", "months", "years"];
  126. var c4 = n5 = class extends l {
  127. constructor(e3) {
  128. super(e3), this.endTime = null, this.field = null, this.maxSliderValue = null, this.minSliderValue = null, this.startTime = null, this.type = null, this.units = null;
  129. }
  130. castEndTime(e3) {
  131. return typeof e3 == "string" || typeof e3 == "number" ? e3 : null;
  132. }
  133. castStartTime(e3) {
  134. return typeof e3 == "string" || typeof e3 == "number" ? e3 : null;
  135. }
  136. get style() {
  137. return this.type === "color" ? this._get("style") : null;
  138. }
  139. set style(e3) {
  140. this._set("style", e3);
  141. }
  142. get theme() {
  143. return this.type === "color" || this.type === "size" ? this._get("theme") || "high-to-low" : null;
  144. }
  145. set theme(e3) {
  146. this._set("theme", e3);
  147. }
  148. clone() {
  149. return new n5({ endTime: this.endTime, field: this.field, maxSliderValue: this.maxSliderValue, minSliderValue: this.minSliderValue, startTime: this.startTime, style: this.style, theme: this.theme, type: this.type, units: this.units });
  150. }
  151. };
  152. e([d({ types: a5, json: { write: true } })], c4.prototype, "endTime", void 0), e([s4("endTime")], c4.prototype, "castEndTime", null), e([d({ type: String, json: { write: true } })], c4.prototype, "field", void 0), e([d({ type: Number, json: { write: true } })], c4.prototype, "maxSliderValue", void 0), e([d({ type: Number, json: { write: true } })], c4.prototype, "minSliderValue", void 0), e([d({ types: a5, json: { write: true } })], c4.prototype, "startTime", void 0), e([s4("startTime")], c4.prototype, "castStartTime", null), e([d({ type: l2.apiValues, value: null, json: { type: l2.jsonValues, read: l2.read, write: l2.write } })], c4.prototype, "style", null), e([d({ type: m5, value: null, json: { type: m5, origins: { "web-scene": { type: u2, write: { writer: (e3, t4) => {
  153. u2.includes(e3) && (t4.theme = e3);
  154. } } } }, write: true } })], c4.prototype, "theme", null), e([d({ type: p5.apiValues, json: { type: p5.jsonValues, read: p5.read, write: p5.write } })], c4.prototype, "type", void 0), e([d({ type: y2, json: { type: y2, write: true } })], c4.prototype, "units", void 0), c4 = n5 = e([n2("esri.renderers.support.AuthoringInfoVisualVariable")], c4);
  155. var d3 = c4;
  156. // node_modules/@arcgis/core/renderers/support/AuthoringInfo.js
  157. var d4;
  158. var h2 = new s5({ esriClassifyDefinedInterval: "defined-interval", esriClassifyEqualInterval: "equal-interval", esriClassifyManual: "manual", esriClassifyNaturalBreaks: "natural-breaks", esriClassifyQuantile: "quantile", esriClassifyStandardDeviation: "standard-deviation" });
  159. var m6 = new s5({ pieChart: "pie-chart", classedSize: "class-breaks-size", classedColor: "class-breaks-color", univariateColorSize: "univariate-color-size", relationship: "relationship", predominance: "predominance", dotDensity: "dot-density", flow: "flow" });
  160. var y3 = new s5({ classedSize: "class-breaks-size", classedColor: "class-breaks-color", univariateColorSize: "univariate-color-size", relationship: "relationship", predominance: "predominance", dotDensity: "dot-density" });
  161. var f = ["inches", "feet", "yards", "miles", "nautical-miles", "millimeters", "centimeters", "decimeters", "meters", "kilometers", "decimal-degrees"];
  162. var v = ["high-to-low", "above-and-below", "above", "below", "90-10"];
  163. var w = ["flow-line", "wave-front"];
  164. var b4 = ["caret", "circle-caret", "arrow", "circle-arrow", "plus-minus", "circle-plus-minus", "square", "circle", "triangle", "happy-sad", "thumb", "custom"];
  165. var g2 = d4 = class extends l {
  166. constructor(e3) {
  167. super(e3), this.colorRamp = null, this.lengthUnit = null, this.maxSliderValue = null, this.minSliderValue = null, this.visualVariables = null;
  168. }
  169. get classificationMethod() {
  170. const e3 = this._get("classificationMethod"), t4 = this.type;
  171. return t4 && t4 !== "relationship" ? t4 === "class-breaks-size" || t4 === "class-breaks-color" ? e3 || "manual" : null : e3;
  172. }
  173. set classificationMethod(e3) {
  174. this._set("classificationMethod", e3);
  175. }
  176. readColorRamp(e3) {
  177. if (e3)
  178. return p(e3);
  179. }
  180. get fields() {
  181. return this.type && this.type !== "predominance" ? null : this._get("fields");
  182. }
  183. set fields(e3) {
  184. this._set("fields", e3);
  185. }
  186. get field1() {
  187. return this.type && this.type !== "relationship" ? null : this._get("field1");
  188. }
  189. set field1(e3) {
  190. this._set("field1", e3);
  191. }
  192. get field2() {
  193. return this.type && this.type !== "relationship" ? null : this._get("field2");
  194. }
  195. set field2(e3) {
  196. this._set("field2", e3);
  197. }
  198. get flowTheme() {
  199. return this.type === "flow" ? this._get("flowTheme") : null;
  200. }
  201. set flowTheme(e3) {
  202. this._set("flowTheme", e3);
  203. }
  204. get focus() {
  205. return this.type && this.type !== "relationship" ? null : this._get("focus");
  206. }
  207. set focus(e3) {
  208. this._set("focus", e3);
  209. }
  210. get numClasses() {
  211. return this.type && this.type !== "relationship" ? null : this._get("numClasses");
  212. }
  213. set numClasses(e3) {
  214. this._set("numClasses", e3);
  215. }
  216. get statistics() {
  217. return this.type === "univariate-color-size" && this.univariateTheme === "above-and-below" ? this._get("statistics") : null;
  218. }
  219. set statistics(e3) {
  220. this._set("statistics", e3);
  221. }
  222. get standardDeviationInterval() {
  223. const e3 = this.type;
  224. return e3 && e3 !== "relationship" && e3 !== "class-breaks-size" && e3 !== "class-breaks-color" || this.classificationMethod && this.classificationMethod !== "standard-deviation" ? null : this._get("standardDeviationInterval");
  225. }
  226. set standardDeviationInterval(e3) {
  227. this._set("standardDeviationInterval", e3);
  228. }
  229. get type() {
  230. return this._get("type");
  231. }
  232. set type(e3) {
  233. let t4 = e3;
  234. e3 === "classed-size" ? t4 = "class-breaks-size" : e3 === "classed-color" && (t4 = "class-breaks-color"), this._set("type", t4);
  235. }
  236. get univariateSymbolStyle() {
  237. return this.type === "univariate-color-size" && this.univariateTheme === "above-and-below" ? this._get("univariateSymbolStyle") : null;
  238. }
  239. set univariateSymbolStyle(e3) {
  240. this._set("univariateSymbolStyle", e3);
  241. }
  242. get univariateTheme() {
  243. return this.type === "univariate-color-size" ? this._get("univariateTheme") : null;
  244. }
  245. set univariateTheme(e3) {
  246. this._set("univariateTheme", e3);
  247. }
  248. clone() {
  249. return new d4({ classificationMethod: this.classificationMethod, colorRamp: m(this.colorRamp), fields: this.fields && this.fields.slice(0), field1: m(this.field1), field2: m(this.field2), focus: this.focus, numClasses: this.numClasses, maxSliderValue: this.maxSliderValue, minSliderValue: this.minSliderValue, lengthUnit: this.lengthUnit, statistics: this.statistics, standardDeviationInterval: this.standardDeviationInterval, type: this.type, visualVariables: this.visualVariables && this.visualVariables.map((e3) => e3.clone()), univariateSymbolStyle: this.univariateSymbolStyle, univariateTheme: this.univariateTheme, flowTheme: this.flowTheme });
  250. }
  251. };
  252. e([d({ type: h2.apiValues, value: null, json: { type: h2.jsonValues, read: h2.read, write: h2.write, origins: { "web-document": { default: "manual", type: h2.jsonValues, read: h2.read, write: h2.write } } } })], g2.prototype, "classificationMethod", null), e([d({ types: m2, json: { write: true } })], g2.prototype, "colorRamp", void 0), e([o("colorRamp")], g2.prototype, "readColorRamp", null), e([d({ type: [String], value: null, json: { write: true } })], g2.prototype, "fields", null), e([d({ type: p4, value: null, json: { write: true } })], g2.prototype, "field1", null), e([d({ type: p4, value: null, json: { write: true } })], g2.prototype, "field2", null), e([d({ type: w, value: null, json: { write: true, origins: { "web-scene": { write: false } } } })], g2.prototype, "flowTheme", null), e([d({ type: ["HH", "HL", "LH", "LL"], value: null, json: { write: true } })], g2.prototype, "focus", null), e([d({ type: Number, value: null, json: { type: S, write: true } })], g2.prototype, "numClasses", null), e([d({ type: f, json: { type: f, read: false, write: false, origins: { "web-scene": { read: true, write: true } } } })], g2.prototype, "lengthUnit", void 0), e([d({ type: Number, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], g2.prototype, "maxSliderValue", void 0), e([d({ type: Number, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], g2.prototype, "minSliderValue", void 0), e([d({ type: Object, value: null, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], g2.prototype, "statistics", null), e([d({ type: [0.25, 0.33, 0.5, 1], value: null, json: { type: [0.25, 0.33, 0.5, 1], write: true } })], g2.prototype, "standardDeviationInterval", null), e([d({ type: m6.apiValues, value: null, json: { type: m6.jsonValues, read: m6.read, write: m6.write, origins: { "web-scene": { type: y3.jsonValues, write: { writer: y3.write, overridePolicy: (e3) => ({ enabled: e3 !== "flow" }) } } } } })], g2.prototype, "type", null), e([d({ type: [d3], json: { write: true } })], g2.prototype, "visualVariables", void 0), e([d({ type: b4, value: null, json: { write: true, origins: { "web-scene": { write: false } } } })], g2.prototype, "univariateSymbolStyle", null), e([d({ type: v, value: null, json: { write: true, origins: { "web-scene": { write: false } } } })], g2.prototype, "univariateTheme", null), g2 = d4 = e([n2("esri.renderers.support.AuthoringInfo")], g2);
  253. var j3 = g2;
  254. // node_modules/@arcgis/core/renderers/Renderer.js
  255. var n6 = new s5({ simple: "simple", uniqueValue: "unique-value", classBreaks: "class-breaks", heatmap: "heatmap", dotDensity: "dot-density", dictionary: "dictionary", pieChart: "pie-chart" }, { ignoreUnknown: true });
  256. var a6 = class extends l {
  257. constructor(r4) {
  258. super(r4), this.authoringInfo = null, this.type = null;
  259. }
  260. async getRequiredFields(r4) {
  261. if (!this.collectRequiredFields)
  262. return [];
  263. const e3 = new Set();
  264. return await this.collectRequiredFields(e3, r4), Array.from(e3).sort();
  265. }
  266. getSymbol(r4, e3) {
  267. }
  268. async getSymbolAsync(r4, e3) {
  269. }
  270. getSymbols() {
  271. return [];
  272. }
  273. getAttributeHash() {
  274. return JSON.stringify(this);
  275. }
  276. getMeshHash() {
  277. return JSON.stringify(this);
  278. }
  279. };
  280. e([d({ type: j3, json: { write: true } })], a6.prototype, "authoringInfo", void 0), e([d({ type: n6.apiValues, readOnly: true, json: { type: n6.jsonValues, read: false, write: { writer: n6.write, ignoreOrigin: true } } })], a6.prototype, "type", void 0), a6 = e([n2("esri.renderers.Renderer")], a6);
  281. var p6 = a6;
  282. // node_modules/@arcgis/core/renderers/visualVariables/ColorVariable.js
  283. var i2;
  284. var p7 = i2 = class extends d2 {
  285. constructor(t4) {
  286. super(t4), this.type = "color", this.normalizationField = null;
  287. }
  288. get cache() {
  289. return { ipData: this._interpolateData(), hasExpression: !!this.valueExpression, compiledFunc: null };
  290. }
  291. set stops(t4) {
  292. t4 && Array.isArray(t4) && (t4 = t4.filter((t5) => !!t5)).sort((t5, s6) => t5.value - s6.value), this._set("stops", t4);
  293. }
  294. clone() {
  295. return new i2({ field: this.field, normalizationField: this.normalizationField, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, stops: this.stops && this.stops.map((t4) => t4.clone()), legendOptions: this.legendOptions && this.legendOptions.clone() });
  296. }
  297. getAttributeHash() {
  298. return `${super.getAttributeHash()}-${this.normalizationField}`;
  299. }
  300. _interpolateData() {
  301. return this.stops && this.stops.map((t4) => t4.value || 0);
  302. }
  303. };
  304. e([d({ readOnly: true })], p7.prototype, "cache", null), e([d({ type: ["color"], json: { type: ["colorInfo"] } })], p7.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], p7.prototype, "normalizationField", void 0), e([d({ type: [a3], json: { write: true } })], p7.prototype, "stops", null), p7 = i2 = e([n2("esri.renderers.visualVariables.ColorVariable")], p7);
  305. var a7 = p7;
  306. // node_modules/@arcgis/core/renderers/visualVariables/support/OpacityStop.js
  307. var l3;
  308. var u3 = l3 = class extends l {
  309. constructor(r4) {
  310. super(r4), this.label = null, this.opacity = null, this.value = null;
  311. }
  312. readOpacity(r4, t4) {
  313. return r3(t4.transparency);
  314. }
  315. writeOpacity(r4, t4, o3) {
  316. t4[o3] = n3(r4);
  317. }
  318. clone() {
  319. return new l3({ label: this.label, opacity: this.opacity, value: this.value });
  320. }
  321. };
  322. e([d({ type: String, json: { write: true } })], u3.prototype, "label", void 0), e([d({ type: Number, json: { type: S, write: { target: "transparency" } } })], u3.prototype, "opacity", void 0), e([o("opacity", ["transparency"])], u3.prototype, "readOpacity", null), e([r("opacity")], u3.prototype, "writeOpacity", null), e([d({ type: Number, json: { write: true } })], u3.prototype, "value", void 0), u3 = l3 = e([n2("esri.renderers.visualVariables.support.OpacityStop")], u3);
  323. var y4 = u3;
  324. // node_modules/@arcgis/core/renderers/visualVariables/OpacityVariable.js
  325. var i3;
  326. var p8 = i3 = class extends d2 {
  327. constructor(t4) {
  328. super(t4), this.type = "opacity", this.normalizationField = null;
  329. }
  330. get cache() {
  331. return { ipData: this._interpolateData(), hasExpression: !!this.valueExpression, compiledFunc: null };
  332. }
  333. set stops(t4) {
  334. t4 && Array.isArray(t4) && (t4 = t4.filter((t5) => !!t5)).sort((t5, s6) => t5.value - s6.value), this._set("stops", t4);
  335. }
  336. clone() {
  337. return new i3({ field: this.field, normalizationField: this.normalizationField, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, stops: this.stops && this.stops.map((t4) => t4.clone()), legendOptions: this.legendOptions && this.legendOptions.clone() });
  338. }
  339. getAttributeHash() {
  340. return `${super.getAttributeHash()}-${this.normalizationField}`;
  341. }
  342. _interpolateData() {
  343. return this.stops && this.stops.map((t4) => t4.value || 0);
  344. }
  345. };
  346. e([d({ readOnly: true })], p8.prototype, "cache", null), e([d({ type: ["opacity"], json: { type: ["transparencyInfo"] } })], p8.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], p8.prototype, "normalizationField", void 0), e([d({ type: [y4], json: { write: true } })], p8.prototype, "stops", null), p8 = i3 = e([n2("esri.renderers.visualVariables.OpacityVariable")], p8);
  347. var a8 = p8;
  348. // node_modules/@arcgis/core/renderers/visualVariables/RotationVariable.js
  349. var p9;
  350. var a9 = p9 = class extends d2 {
  351. constructor(e3) {
  352. super(e3), this.axis = null, this.type = "rotation", this.rotationType = "geographic", this.valueExpressionTitle = null;
  353. }
  354. get cache() {
  355. return { hasExpression: !!this.valueExpression, compiledFunc: null };
  356. }
  357. writeValueExpressionTitleWebScene(e3, s6, o3, r4) {
  358. if (r4 && r4.messages) {
  359. const e4 = `visualVariables[${this.index}]`;
  360. r4.messages.push(new s2("property:unsupported", this.type + "VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.", { instance: this, propertyName: e4 + ".valueExpressionTitle", context: r4 }));
  361. }
  362. }
  363. clone() {
  364. return new p9({ axis: this.axis, rotationType: this.rotationType, field: this.field, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, legendOptions: this.legendOptions && this.legendOptions.clone() });
  365. }
  366. };
  367. e([d({ readOnly: true })], a9.prototype, "cache", null), e([d({ type: ["heading", "tilt", "roll"], json: { origins: { "web-scene": { default: "heading", write: true } } } })], a9.prototype, "axis", void 0), e([d({ type: ["rotation"], json: { type: ["rotationInfo"] } })], a9.prototype, "type", void 0), e([d({ type: ["geographic", "arithmetic"], json: { write: true, origins: { "web-document": { write: true, default: "geographic" } } } })], a9.prototype, "rotationType", void 0), e([d({ type: String, json: { write: true } })], a9.prototype, "valueExpressionTitle", void 0), e([r("web-scene", "valueExpressionTitle")], a9.prototype, "writeValueExpressionTitleWebScene", null), a9 = p9 = e([n2("esri.renderers.visualVariables.RotationVariable")], a9);
  368. var n7 = a9;
  369. // node_modules/@arcgis/core/renderers/visualVariables/VisualVariableFactory.js
  370. var u4 = s.getLogger("esri.renderers.visualVariables.VisualVariableFactory");
  371. var b5 = { color: a7, size: j2, opacity: a8, rotation: n7 };
  372. var V = new s5({ colorInfo: "color", transparencyInfo: "opacity", rotationInfo: "rotation", sizeInfo: "size" });
  373. var h3 = /^\[([^\]]+)\]$/i;
  374. var m7 = class extends y {
  375. constructor() {
  376. super(...arguments), this.colorVariables = null, this.opacityVariables = null, this.rotationVariables = null, this.sizeVariables = null;
  377. }
  378. set visualVariables(r4) {
  379. if (this._resetVariables(), (r4 = r4 && r4.filter((r5) => !!r5)) && r4.length) {
  380. for (const s6 of r4)
  381. switch (s6.type) {
  382. case "color":
  383. this.colorVariables.push(s6);
  384. break;
  385. case "opacity":
  386. this.opacityVariables.push(s6);
  387. break;
  388. case "rotation":
  389. this.rotationVariables.push(s6);
  390. break;
  391. case "size":
  392. this.sizeVariables.push(s6);
  393. }
  394. if (this.sizeVariables.length) {
  395. this.sizeVariables.some((r5) => !!r5.target) && r4.sort((r5, s6) => {
  396. let e3 = null;
  397. return e3 = r5.target === s6.target ? 0 : r5.target ? 1 : -1, e3;
  398. });
  399. }
  400. for (let s6 = 0; s6 < r4.length; s6++) {
  401. r4[s6].index = s6;
  402. }
  403. this._set("visualVariables", r4);
  404. } else
  405. this._set("visualVariables", r4);
  406. }
  407. readVariables(r4, s6, e3) {
  408. const { rotationExpression: a11, rotationType: t4 } = s6, i5 = a11 && a11.match(h3), l7 = i5 && i5[1];
  409. if (l7 && (r4 || (r4 = []), r4.push({ type: "rotationInfo", rotationType: t4, field: l7 })), r4)
  410. return r4.map((r5) => {
  411. const s7 = V.read(r5.type), a12 = b5[s7];
  412. a12 || (u4.warn(`Unknown variable type: ${s7}`), e3 && e3.messages && e3.messages.push(new t2("visual-variable:unsupported", `visualVariable of type '${s7}' is not supported`, { definition: r5, context: e3 })));
  413. const t5 = new a12();
  414. return t5.read(r5, e3), t5;
  415. });
  416. }
  417. writeVariables(r4, s6) {
  418. const e3 = [];
  419. for (const a11 of r4) {
  420. const r5 = a11.toJSON(s6);
  421. r5 && e3.push(r5);
  422. }
  423. return e3;
  424. }
  425. _resetVariables() {
  426. this.colorVariables = [], this.opacityVariables = [], this.rotationVariables = [], this.sizeVariables = [];
  427. }
  428. };
  429. e([d()], m7.prototype, "visualVariables", null), m7 = e([n2("esri.renderers.visualVariables.VisualVariableFactory")], m7);
  430. var f2 = m7;
  431. // node_modules/@arcgis/core/renderers/mixins/VisualVariablesMixin.js
  432. var b6 = { base: d2, key: "type", typeMap: { opacity: a8, color: a7, rotation: n7, size: j2 } };
  433. var v2 = (l7) => {
  434. let u5 = class extends l7 {
  435. constructor() {
  436. super(...arguments), this._vvFactory = new f2();
  437. }
  438. set visualVariables(r4) {
  439. this._vvFactory.visualVariables = r4, this._set("visualVariables", this._vvFactory.visualVariables);
  440. }
  441. readVisualVariables(r4, a11, s6) {
  442. return this._vvFactory.readVariables(r4, a11, s6);
  443. }
  444. writeVisualVariables(r4, a11, s6, i5) {
  445. a11[s6] = this._vvFactory.writeVariables(r4, i5);
  446. }
  447. get arcadeRequiredForVisualVariables() {
  448. if (!this.visualVariables)
  449. return false;
  450. for (const r4 of this.visualVariables)
  451. if (r4.arcadeRequired)
  452. return true;
  453. return false;
  454. }
  455. hasVisualVariables(r4, a11) {
  456. return r4 ? this.getVisualVariablesForType(r4, a11).length > 0 : this.getVisualVariablesForType("size", a11).length > 0 || this.getVisualVariablesForType("color", a11).length > 0 || this.getVisualVariablesForType("opacity", a11).length > 0 || this.getVisualVariablesForType("rotation", a11).length > 0;
  457. }
  458. getVisualVariablesForType(r4, a11) {
  459. const s6 = this.visualVariables;
  460. return s6 ? s6.filter((s7) => s7.type === r4 && (typeof a11 == "string" ? s7.target === a11 : a11 !== false || !s7.target)) : [];
  461. }
  462. async collectVVRequiredFields(r4, a11) {
  463. let s6 = [];
  464. this.visualVariables && (s6 = s6.concat(this.visualVariables));
  465. for (const i5 of s6)
  466. i5 && (i5.field && F(r4, a11, i5.field), i5.normalizationField && F(r4, a11, i5.normalizationField), i5.valueExpression && await b3(r4, a11, i5.valueExpression));
  467. }
  468. };
  469. return e([d({ types: [b6], value: null, json: { write: true } })], u5.prototype, "visualVariables", null), e([o("visualVariables", ["visualVariables", "rotationType", "rotationExpression"])], u5.prototype, "readVisualVariables", null), e([r("visualVariables")], u5.prototype, "writeVisualVariables", null), u5 = e([n2("esri.renderers.mixins.VisualVariablesMixin")], u5), u5;
  470. };
  471. // node_modules/@arcgis/core/renderers/support/commonProperties.js
  472. var l4 = { types: M, json: { write: { writer: m4 }, origins: { "web-scene": { types: h, write: { writer: m4 }, read: { reader: s3({ types: h }) } } } } };
  473. var y5 = { types: { base: a2, key: "type", typeMap: { "simple-fill": j.typeMap["simple-fill"], "picture-fill": j.typeMap["picture-fill"], "polygon-3d": j.typeMap["polygon-3d"] } }, json: { write: { writer: m4 }, origins: { "web-scene": { type: S2, write: { writer: m4 } } } } };
  474. // node_modules/@arcgis/core/renderers/support/ClassBreakInfo.js
  475. var i4;
  476. var l5 = i4 = class extends l {
  477. constructor(s6) {
  478. super(s6), this.description = null, this.label = null, this.minValue = null, this.maxValue = 0, this.symbol = null;
  479. }
  480. clone() {
  481. return new i4({ description: this.description, label: this.label, minValue: this.minValue, maxValue: this.maxValue, symbol: this.symbol ? this.symbol.clone() : null });
  482. }
  483. getMeshHash() {
  484. const s6 = JSON.stringify(this.symbol);
  485. return `${this.minValue}.${this.maxValue}.${s6}`;
  486. }
  487. };
  488. e([d({ type: String, json: { write: true } })], l5.prototype, "description", void 0), e([d({ type: String, json: { write: true } })], l5.prototype, "label", void 0), e([d({ type: Number, json: { read: { source: "classMinValue" }, write: { target: "classMinValue" } } })], l5.prototype, "minValue", void 0), e([d({ type: Number, json: { read: { source: "classMaxValue" }, write: { target: "classMaxValue" } } })], l5.prototype, "maxValue", void 0), e([d(l4)], l5.prototype, "symbol", void 0), l5 = i4 = e([n2("esri.renderers.support.ClassBreakInfo")], l5);
  489. var a10 = l5;
  490. // node_modules/@arcgis/core/renderers/ClassBreaksRenderer.js
  491. var F2;
  492. var E = s.getLogger("esri.renderers.ClassBreaksRenderer");
  493. var j4 = "log";
  494. var w2 = "percent-of-total";
  495. var z = "field";
  496. var T = new s5({ esriNormalizeByLog: j4, esriNormalizeByPercentOfTotal: w2, esriNormalizeByField: z });
  497. var _ = b(a10);
  498. var C = F2 = class extends v2(p6) {
  499. constructor(e3) {
  500. super(e3), this._compiledValueExpression = { valueExpression: null, compiledFunction: null }, this.backgroundFillSymbol = null, this.classBreakInfos = null, this.defaultLabel = null, this.defaultSymbol = null, this.field = null, this.isMaxInclusive = true, this.legendOptions = null, this.normalizationField = null, this.normalizationTotal = null, this.type = "class-breaks", this.valueExpression = null, this.valueExpressionTitle = null, this._set("classBreakInfos", []);
  501. }
  502. readClassBreakInfos(e3, s6, t4) {
  503. if (!Array.isArray(e3))
  504. return;
  505. let o3 = s6.minValue;
  506. return e3.map((e4) => {
  507. const s7 = new a10();
  508. return s7.read(e4, t4), s7.minValue == null && (s7.minValue = o3), s7.maxValue == null && (s7.maxValue = s7.minValue), o3 = s7.maxValue, s7;
  509. });
  510. }
  511. writeClassBreakInfos(e3, s6, t4, o3) {
  512. const r4 = e3.map((e4) => e4.write({}, o3));
  513. this._areClassBreaksConsecutive() && r4.forEach((e4) => delete e4.classMinValue), s6[t4] = r4;
  514. }
  515. castField(e3) {
  516. return e3 == null ? e3 : typeof e3 == "function" ? (E.error(".field: field must be a string value"), null) : u(e3);
  517. }
  518. get minValue() {
  519. return this.classBreakInfos && this.classBreakInfos[0] && this.classBreakInfos[0].minValue || 0;
  520. }
  521. get normalizationType() {
  522. let e3 = this._get("normalizationType");
  523. const s6 = !!this.normalizationField, t4 = this.normalizationTotal != null;
  524. return s6 || t4 ? (e3 = s6 && z || t4 && w2 || null, s6 && t4 && E.warn("warning: both normalizationField and normalizationTotal are set!")) : e3 !== z && e3 !== w2 || (e3 = null), e3;
  525. }
  526. set normalizationType(e3) {
  527. this._set("normalizationType", e3);
  528. }
  529. addClassBreakInfo(e3, t4, r4) {
  530. let i5 = null;
  531. i5 = typeof e3 == "number" ? new a10({ minValue: e3, maxValue: t4, symbol: g(r4) }) : _(m(e3)), this.classBreakInfos.push(i5), this.classBreakInfos.length === 1 && this.notifyChange("minValue");
  532. }
  533. removeClassBreakInfo(e3, s6) {
  534. const t4 = this.classBreakInfos.length;
  535. for (let o3 = 0; o3 < t4; o3++) {
  536. const t5 = [this.classBreakInfos[o3].minValue, this.classBreakInfos[o3].maxValue];
  537. if (t5[0] === e3 && t5[1] === s6) {
  538. this.classBreakInfos.splice(o3, 1);
  539. break;
  540. }
  541. }
  542. }
  543. getBreakIndex(e3, s6) {
  544. return this.valueExpression && (t(s6) || t(s6.arcade)) && E.warn(""), this.valueExpression ? this._getBreakIndexForExpression(e3, s6) : this._getBreakIndexForField(e3);
  545. }
  546. async getClassBreakInfo(e3, s6) {
  547. let t4 = s6;
  548. this.valueExpression && (t(s6) || t(s6.arcade)) && (t4 = { ...t4, arcade: await a4() });
  549. const o3 = this.getBreakIndex(e3, t4);
  550. return o3 !== -1 ? this.classBreakInfos[o3] : null;
  551. }
  552. getSymbol(e3, s6) {
  553. if (this.valueExpression && (t(s6) || t(s6.arcade)))
  554. return void E.error("#getSymbol()", "Please use getSymbolAsync if valueExpression is used");
  555. const t4 = this.getBreakIndex(e3, s6);
  556. return t4 > -1 ? this.classBreakInfos[t4].symbol : this.defaultSymbol;
  557. }
  558. async getSymbolAsync(e3, s6) {
  559. let t4 = s6;
  560. if (this.valueExpression && (t(s6) || t(s6.arcade))) {
  561. const e4 = await a4(), { arcadeUtils: s7 } = e4;
  562. s7.hasGeometryOperations(this.valueExpression) && await s7.enableGeometryOperations(), t4 = { ...t4, arcade: e4 };
  563. }
  564. const o3 = this.getBreakIndex(e3, t4);
  565. return o3 > -1 ? this.classBreakInfos[o3].symbol : this.defaultSymbol;
  566. }
  567. getSymbols() {
  568. const e3 = [];
  569. return this.classBreakInfos.forEach((s6) => {
  570. s6.symbol && e3.push(s6.symbol);
  571. }), this.defaultSymbol && e3.push(this.defaultSymbol), e3;
  572. }
  573. getAttributeHash() {
  574. return this.visualVariables && this.visualVariables.reduce((e3, s6) => e3 + s6.getAttributeHash(), "");
  575. }
  576. getMeshHash() {
  577. const e3 = JSON.stringify(this.backgroundFillSymbol), s6 = JSON.stringify(this.defaultSymbol), t4 = `${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;
  578. return `${e3}.${s6}.${this.classBreakInfos.reduce((e4, s7) => e4 + s7.getMeshHash(), "")}.${t4}.${this.field}.${this.valueExpression}`;
  579. }
  580. get arcadeRequired() {
  581. return this.arcadeRequiredForVisualVariables || !!this.valueExpression;
  582. }
  583. clone() {
  584. return new F2({ field: this.field, backgroundFillSymbol: this.backgroundFillSymbol && this.backgroundFillSymbol.clone(), defaultLabel: this.defaultLabel, defaultSymbol: this.defaultSymbol && this.defaultSymbol.clone(), valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, classBreakInfos: m(this.classBreakInfos), isMaxInclusive: this.isMaxInclusive, normalizationField: this.normalizationField, normalizationTotal: this.normalizationTotal, normalizationType: this.normalizationType, visualVariables: m(this.visualVariables), legendOptions: m(this.legendOptions), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
  585. }
  586. async collectRequiredFields(e3, s6) {
  587. const t4 = [this.collectVVRequiredFields(e3, s6), this.collectSymbolFields(e3, s6)];
  588. await Promise.all(t4);
  589. }
  590. async collectSymbolFields(e3, s6) {
  591. const t4 = [...this.getSymbols().map((t5) => t5.collectRequiredFields(e3, s6)), b3(e3, s6, this.valueExpression)];
  592. F(e3, s6, this.field), F(e3, s6, this.normalizationField), await Promise.all(t4);
  593. }
  594. _getBreakIndexForExpression(e3, s6) {
  595. const { viewingMode: t4, scale: o3, spatialReference: r4, arcade: i5 } = c(s6, {});
  596. let n9 = this._compiledValueExpression.valueExpression === this.valueExpression ? this._compiledValueExpression.compiledFunction : null;
  597. const u5 = e2(i5).arcadeUtils;
  598. if (!n9) {
  599. const e4 = u5.createSyntaxTree(this.valueExpression);
  600. n9 = u5.createFunction(e4), this._compiledValueExpression.compiledFunction = n9;
  601. }
  602. this._compiledValueExpression.valueExpression = this.valueExpression;
  603. const c5 = u5.executeFunction(n9, u5.createExecContext(e3, u5.getViewInfo({ viewingMode: t4, scale: o3, spatialReference: r4 })));
  604. return this._getBreakIndexfromInfos(c5);
  605. }
  606. _getBreakIndexForField(e3) {
  607. const s6 = this.field, t4 = e3.attributes, o3 = this.normalizationType;
  608. let r4 = parseFloat(t4[s6]);
  609. if (o3) {
  610. const e4 = this.normalizationTotal, s7 = parseFloat(t4[this.normalizationField]);
  611. if (o3 === j4)
  612. r4 = Math.log(r4) * Math.LOG10E;
  613. else if (o3 !== w2 || isNaN(e4)) {
  614. if (o3 === z && !isNaN(s7)) {
  615. if (isNaN(r4) || isNaN(s7))
  616. return -1;
  617. r4 /= s7;
  618. }
  619. } else
  620. r4 = r4 / e4 * 100;
  621. }
  622. return this._getBreakIndexfromInfos(r4);
  623. }
  624. _getBreakIndexfromInfos(e3) {
  625. const s6 = this.isMaxInclusive;
  626. if (e3 != null && typeof e3 == "number" && !isNaN(e3))
  627. for (let t4 = 0; t4 < this.classBreakInfos.length; t4++) {
  628. const o3 = [this.classBreakInfos[t4].minValue, this.classBreakInfos[t4].maxValue];
  629. if (o3[0] <= e3 && (s6 ? e3 <= o3[1] : e3 < o3[1]))
  630. return t4;
  631. }
  632. return -1;
  633. }
  634. _areClassBreaksConsecutive() {
  635. const e3 = this.classBreakInfos, s6 = e3.length;
  636. for (let t4 = 1; t4 < s6; t4++)
  637. if (e3[t4 - 1].maxValue !== e3[t4].minValue)
  638. return false;
  639. return true;
  640. }
  641. };
  642. e([d(y5)], C.prototype, "backgroundFillSymbol", void 0), e([d({ type: [a10] })], C.prototype, "classBreakInfos", void 0), e([o("classBreakInfos")], C.prototype, "readClassBreakInfos", null), e([r("classBreakInfos")], C.prototype, "writeClassBreakInfos", null), e([d({ type: String, json: { write: true } })], C.prototype, "defaultLabel", void 0), e([d(l4)], C.prototype, "defaultSymbol", void 0), e([d({ type: String, json: { write: true } })], C.prototype, "field", void 0), e([s4("field")], C.prototype, "castField", null), e([d({ type: Boolean })], C.prototype, "isMaxInclusive", void 0), e([d({ type: p2, json: { write: true } })], C.prototype, "legendOptions", void 0), e([d({ type: Number, readOnly: true, value: null, json: { read: false, write: { overridePolicy() {
  643. return this.classBreakInfos.length !== 0 && this._areClassBreaksConsecutive() ? { enabled: true } : { enabled: false };
  644. } } } })], C.prototype, "minValue", null), e([d({ type: String, json: { write: true } })], C.prototype, "normalizationField", void 0), e([d({ type: Number, cast: (e3) => a(e3), json: { write: true } })], C.prototype, "normalizationTotal", void 0), e([d({ type: T.apiValues, value: null, json: { type: T.jsonValues, read: T.read, write: T.write } })], C.prototype, "normalizationType", null), e([r2({ classBreaks: "class-breaks" })], C.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], C.prototype, "valueExpression", void 0), e([d({ type: String, json: { write: true } })], C.prototype, "valueExpressionTitle", void 0), C = F2 = e([n2("esri.renderers.ClassBreaksRenderer")], C);
  645. var N = C;
  646. // node_modules/@arcgis/core/renderers/support/UniqueValueInfo.js
  647. var l6;
  648. var p10 = l6 = class extends l {
  649. constructor(o3) {
  650. super(o3), this.description = null, this.label = null, this.symbol = null, this.value = null;
  651. }
  652. castValue(o3) {
  653. return o3 == null || typeof o3 == "string" || typeof o3 == "number" ? o3 : `${o3}`;
  654. }
  655. clone() {
  656. return new l6({ value: this.value, description: this.description, label: this.label, symbol: this.symbol ? this.symbol.clone() : null });
  657. }
  658. getMeshHash() {
  659. const o3 = JSON.stringify(this.symbol && this.symbol.toJSON());
  660. return `${this.value}.${o3}`;
  661. }
  662. };
  663. e([d({ type: String, json: { write: true } })], p10.prototype, "description", void 0), e([d({ type: String, json: { write: true } })], p10.prototype, "label", void 0), e([d(l4)], p10.prototype, "symbol", void 0), e([d({ json: { type: String, write: { writer: (o3, t4) => {
  664. t4.value = o3?.toString();
  665. } } } })], p10.prototype, "value", void 0), e([s4("value")], p10.prototype, "castValue", null), p10 = l6 = e([n2("esri.renderers.support.UniqueValueInfo")], p10);
  666. var n8 = p10;
  667. // node_modules/@arcgis/core/renderers/UniqueValueRenderer.js
  668. var E2;
  669. var M2 = s.getLogger("esri.renderers.UniqueValueRenderer");
  670. var N2 = b(n8);
  671. var R = E2 = class extends v2(p6) {
  672. constructor(e3) {
  673. super(e3), this._valueInfoMap = {}, this._isDefaultSymbolDerived = false, this.type = "unique-value", this.backgroundFillSymbol = null, this.field = null, this.field2 = null, this.field3 = null, this.valueExpression = null, this.valueExpressionTitle = null, this.legendOptions = null, this.defaultLabel = null, this.fieldDelimiter = null, this.portal = null, this.styleOrigin = null, this.diff = { uniqueValueInfos(e4, t4) {
  674. if (!e4 && !t4)
  675. return;
  676. if (!e4 || !t4)
  677. return { type: "complete", oldValue: e4, newValue: t4 };
  678. let i5 = false;
  679. const r4 = { type: "collection", added: [], removed: [], changed: [], unchanged: [] };
  680. for (let s6 = 0; s6 < t4.length; s6++) {
  681. const l7 = e4.find((e5) => e5.value === t4[s6].value);
  682. l7 ? m3(l7, t4[s6]) ? (r4.changed.push({ type: "complete", oldValue: l7, newValue: t4[s6] }), i5 = true) : r4.unchanged.push({ oldValue: l7, newValue: t4[s6] }) : (r4.added.push(t4[s6]), i5 = true);
  683. }
  684. for (let s6 = 0; s6 < e4.length; s6++) {
  685. t4.find((t5) => t5.value === e4[s6].value) || (r4.removed.push(e4[s6]), i5 = true);
  686. }
  687. return i5 ? r4 : void 0;
  688. } }, this._set("uniqueValueInfos", []);
  689. }
  690. get _cache() {
  691. return { compiledFunc: null };
  692. }
  693. castField(e3) {
  694. return e3 == null || typeof e3 == "function" ? e3 : u(e3);
  695. }
  696. writeField(e3, t4, r4, s6) {
  697. typeof e3 == "string" ? t4[r4] = e3 : s6 && s6.messages ? s6.messages.push(new s2("property:unsupported", "UniqueValueRenderer.field set to a function cannot be written to JSON")) : M2.error(".field: cannot write field to JSON since it's not a string value");
  698. }
  699. set defaultSymbol(e3) {
  700. this._isDefaultSymbolDerived = false, this._set("defaultSymbol", e3);
  701. }
  702. readPortal(e3, t4, i5) {
  703. return i5.portal || B.getDefault();
  704. }
  705. readStyleOrigin(e3, t4, i5) {
  706. if (t4.styleName)
  707. return Object.freeze({ styleName: t4.styleName });
  708. if (t4.styleUrl) {
  709. const e4 = i(t4.styleUrl, i5);
  710. return Object.freeze({ styleUrl: e4 });
  711. }
  712. }
  713. writeStyleOrigin(e3, t4, i5, r4) {
  714. e3.styleName ? t4.styleName = e3.styleName : e3.styleUrl && (t4.styleUrl = c2(e3.styleUrl, r4));
  715. }
  716. set uniqueValueInfos(e3) {
  717. this.styleOrigin ? M2.error("#uniqueValueInfos=", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style") : (this._set("uniqueValueInfos", e3), this._updateValueInfoMap());
  718. }
  719. addUniqueValueInfo(e3, i5) {
  720. if (this.styleOrigin)
  721. return void M2.error("#addUniqueValueInfo()", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
  722. let r4;
  723. r4 = typeof e3 == "object" ? N2(e3) : new n8({ value: e3, symbol: g(i5) }), this.uniqueValueInfos.push(r4), this._valueInfoMap[r4.value] = r4;
  724. }
  725. removeUniqueValueInfo(e3) {
  726. if (this.styleOrigin)
  727. M2.error("#removeUniqueValueInfo()", "Cannot modify unique value infos of a UniqueValueRenderer created from a web style");
  728. else
  729. for (let t4 = 0; t4 < this.uniqueValueInfos.length; t4++) {
  730. if (this.uniqueValueInfos[t4].value === e3 + "") {
  731. delete this._valueInfoMap[e3], this.uniqueValueInfos.splice(t4, 1);
  732. break;
  733. }
  734. }
  735. }
  736. async getUniqueValueInfo(e3, t4) {
  737. let i5 = t4;
  738. return this.valueExpression && (t(t4) || t(t4.arcade)) && (i5 = { ...i5, arcade: await a4() }), this._getUniqueValueInfo(e3, i5);
  739. }
  740. getSymbol(e3, t4) {
  741. if (this.valueExpression && (t(t4) || t(t4.arcade)))
  742. return void M2.error("#getSymbol()", "Please use getSymbolAsync if valueExpression is used");
  743. const i5 = this._getUniqueValueInfo(e3, t4);
  744. return i5 && i5.symbol || this.defaultSymbol;
  745. }
  746. async getSymbolAsync(e3, t4) {
  747. let i5 = t4;
  748. if (this.valueExpression && (t(i5) || t(i5.arcade))) {
  749. const e4 = await a4(), { arcadeUtils: t5 } = e4;
  750. t5.hasGeometryOperations(this.valueExpression) && await t5.enableGeometryOperations(), i5 = { ...i5, arcade: e4 };
  751. }
  752. const r4 = this._getUniqueValueInfo(e3, i5);
  753. return r4 && r4.symbol || this.defaultSymbol;
  754. }
  755. getSymbols() {
  756. const e3 = [];
  757. for (const t4 of this.uniqueValueInfos)
  758. t4.symbol && e3.push(t4.symbol);
  759. return this.defaultSymbol && e3.push(this.defaultSymbol), e3;
  760. }
  761. getAttributeHash() {
  762. return this.visualVariables && this.visualVariables.reduce((e3, t4) => e3 + t4.getAttributeHash(), "");
  763. }
  764. getMeshHash() {
  765. return `${JSON.stringify(this.backgroundFillSymbol)}.${JSON.stringify(this.defaultSymbol)}.${this.uniqueValueInfos.reduce((e3, t4) => e3 + t4.getMeshHash(), "")}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`;
  766. }
  767. clone() {
  768. const e3 = new E2({ field: this.field, field2: this.field2, field3: this.field3, defaultLabel: this.defaultLabel, defaultSymbol: m(this.defaultSymbol), valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, fieldDelimiter: this.fieldDelimiter, visualVariables: m(this.visualVariables), legendOptions: m(this.legendOptions), authoringInfo: this.authoringInfo && this.authoringInfo.clone(), backgroundFillSymbol: m(this.backgroundFillSymbol) });
  769. this._isDefaultSymbolDerived && (e3._isDefaultSymbolDerived = true), e3._set("portal", this.portal);
  770. const t4 = m(this.uniqueValueInfos);
  771. return this.styleOrigin && (e3._set("styleOrigin", Object.freeze(m(this.styleOrigin))), Object.freeze(t4)), e3._set("uniqueValueInfos", t4), e3._updateValueInfoMap(), e3;
  772. }
  773. get arcadeRequired() {
  774. return this.arcadeRequiredForVisualVariables || !!this.valueExpression;
  775. }
  776. async collectRequiredFields(e3, t4) {
  777. const i5 = [this.collectVVRequiredFields(e3, t4), this.collectSymbolFields(e3, t4)];
  778. await Promise.all(i5);
  779. }
  780. async collectSymbolFields(e3, t4) {
  781. const i5 = [...this.getSymbols().map((i6) => i6.collectRequiredFields(e3, t4)), b3(e3, t4, this.valueExpression)];
  782. F(e3, t4, this.field), F(e3, t4, this.field2), F(e3, t4, this.field3), await Promise.all(i5);
  783. }
  784. populateFromStyle() {
  785. return c3(this.styleOrigin, { portal: this.portal }).then((e3) => {
  786. const t4 = [];
  787. return this._valueInfoMap = {}, e3 && e3.data && Array.isArray(e3.data.items) && e3.data.items.forEach((i5) => {
  788. const r4 = new b2({ styleUrl: e3.styleUrl, styleName: e3.styleName, portal: this.portal, name: i5.name });
  789. this.defaultSymbol || i5.name !== e3.data.defaultItem || (this.defaultSymbol = r4, this._isDefaultSymbolDerived = true);
  790. const s6 = new n8({ value: i5.name, symbol: r4 });
  791. t4.push(s6), this._valueInfoMap[i5.name] = s6;
  792. }), this._set("uniqueValueInfos", Object.freeze(t4)), !this.defaultSymbol && this.uniqueValueInfos.length && (this.defaultSymbol = this.uniqueValueInfos[0].symbol, this._isDefaultSymbolDerived = true), this;
  793. });
  794. }
  795. _updateValueInfoMap() {
  796. this._valueInfoMap = {}, this.uniqueValueInfos.forEach((e3) => this._valueInfoMap[e3.value + ""] = e3);
  797. }
  798. _getUniqueValueInfo(e3, t4) {
  799. return this.valueExpression ? this._getUnqiueValueInfoForExpression(e3, t4) : this._getUnqiueValueInfoForFields(e3);
  800. }
  801. _getUnqiueValueInfoForExpression(e3, t4) {
  802. const { viewingMode: i5, scale: r4, spatialReference: s6, arcade: l7 } = c(t4, {});
  803. let a11 = this._cache.compiledFunc;
  804. const u5 = e2(l7).arcadeUtils;
  805. if (!a11) {
  806. const e4 = u5.createSyntaxTree(this.valueExpression);
  807. a11 = u5.createFunction(e4), this._cache.compiledFunc = a11;
  808. }
  809. const p11 = u5.executeFunction(a11, u5.createExecContext(e3, u5.getViewInfo({ viewingMode: i5, scale: r4, spatialReference: s6 })));
  810. return this._valueInfoMap[p11 + ""];
  811. }
  812. _getUnqiueValueInfoForFields(e3) {
  813. const t4 = this.field, i5 = e3.attributes;
  814. let r4;
  815. if (typeof t4 != "function" && this.field2) {
  816. const e4 = this.field2, s6 = this.field3, l7 = [];
  817. t4 && l7.push(i5[t4]), e4 && l7.push(i5[e4]), s6 && l7.push(i5[s6]), r4 = l7.join(this.fieldDelimiter || "");
  818. } else
  819. typeof t4 == "function" ? r4 = t4(e3) : t4 && (r4 = i5[t4]);
  820. return this._valueInfoMap[r4 + ""];
  821. }
  822. static fromPortalStyle(e3, t4) {
  823. const i5 = new E2(t4 && t4.properties);
  824. i5._set("styleOrigin", Object.freeze({ styleName: e3 })), i5._set("portal", t4 && t4.portal || B.getDefault());
  825. const r4 = i5.populateFromStyle();
  826. return r4.catch((t5) => {
  827. M2.error(`#fromPortalStyle('${e3}'[, ...])`, "Failed to create unique value renderer from style name", t5);
  828. }), r4;
  829. }
  830. static fromStyleUrl(e3, t4) {
  831. const i5 = new E2(t4 && t4.properties);
  832. i5._set("styleOrigin", Object.freeze({ styleUrl: e3 }));
  833. const r4 = i5.populateFromStyle();
  834. return r4.catch((t5) => {
  835. M2.error(`#fromStyleUrl('${e3}'[, ...])`, "Failed to create unique value renderer from style URL", t5);
  836. }), r4;
  837. }
  838. };
  839. e([d({ readOnly: true })], R.prototype, "_cache", null), e([r2({ uniqueValue: "unique-value" })], R.prototype, "type", void 0), e([d(y5)], R.prototype, "backgroundFillSymbol", void 0), e([d({ json: { type: String, read: { source: "field1" }, write: { target: "field1" } } })], R.prototype, "field", void 0), e([s4("field")], R.prototype, "castField", null), e([r("field")], R.prototype, "writeField", null), e([d({ type: String, json: { write: true } })], R.prototype, "field2", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "field3", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "valueExpression", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "valueExpressionTitle", void 0), e([d({ type: p2, json: { write: true } })], R.prototype, "legendOptions", void 0), e([d({ type: String, json: { write: true } })], R.prototype, "defaultLabel", void 0), e([d(n({ ...l4 }, { json: { write: { overridePolicy() {
  840. return { enabled: !this._isDefaultSymbolDerived };
  841. } }, origins: { "web-scene": { write: { overridePolicy() {
  842. return { enabled: !this._isDefaultSymbolDerived };
  843. } } } } } }))], R.prototype, "defaultSymbol", null), e([d({ type: String, json: { write: true } })], R.prototype, "fieldDelimiter", void 0), e([d({ type: B, readOnly: true })], R.prototype, "portal", void 0), e([o("portal", ["styleName"])], R.prototype, "readPortal", null), e([d({ readOnly: true, json: { write: { enabled: false, overridePolicy: () => ({ enabled: true }) } } })], R.prototype, "styleOrigin", void 0), e([o("styleOrigin", ["styleName", "styleUrl"])], R.prototype, "readStyleOrigin", null), e([r("styleOrigin", { styleName: { type: String }, styleUrl: { type: String } })], R.prototype, "writeStyleOrigin", null), e([d({ type: [n8], json: { write: { overridePolicy() {
  844. return this.styleOrigin ? { enabled: false } : { enabled: true };
  845. } } } })], R.prototype, "uniqueValueInfos", null), R = E2 = e([n2("esri.renderers.UniqueValueRenderer")], R);
  846. var P = R;
  847. // node_modules/@arcgis/core/core/accessorSupport/decorators/aliasOf.js
  848. function o2(o3, t4) {
  849. const e3 = t4 ? { ...t4, source: o3 } : o3;
  850. return d({ aliasOf: e3 });
  851. }
  852. export {
  853. j3 as j,
  854. p6 as p,
  855. n7 as n,
  856. v2 as v,
  857. l4 as l,
  858. a10 as a,
  859. N,
  860. o2 as o,
  861. n8 as n2,
  862. P
  863. };
  864. //# sourceMappingURL=chunk-FUD7XO3N.js.map