chunk-54X4RLMR.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. import {
  2. A,
  3. Z,
  4. a,
  5. o,
  6. r as r2,
  7. t,
  8. te,
  9. x
  10. } from "./chunk-MWIFVNKP.js";
  11. import {
  12. e as e2,
  13. i,
  14. n
  15. } from "./chunk-YLVXZ2PS.js";
  16. import {
  17. dt
  18. } from "./chunk-WFSV2B2I.js";
  19. import {
  20. B,
  21. C,
  22. q,
  23. v
  24. } from "./chunk-Q34L5KZA.js";
  25. import {
  26. C as C2,
  27. M,
  28. e as e3,
  29. i as i2,
  30. n as n2,
  31. o as o2,
  32. p
  33. } from "./chunk-TRK7CKWP.js";
  34. import {
  35. l
  36. } from "./chunk-7XXXCK2A.js";
  37. import {
  38. i as i3,
  39. o as o3
  40. } from "./chunk-LRDX4TO7.js";
  41. import {
  42. e,
  43. u
  44. } from "./chunk-WEMIK25H.js";
  45. import {
  46. c as c2,
  47. s as s3,
  48. y
  49. } from "./chunk-2Z6LERTI.js";
  50. import {
  51. s,
  52. s3 as s2
  53. } from "./chunk-EMJ4ZSM2.js";
  54. import {
  55. c,
  56. m
  57. } from "./chunk-IKP3YN53.js";
  58. import {
  59. r
  60. } from "./chunk-GZT4BVFP.js";
  61. // node_modules/@arcgis/core/views/2d/arcade/callExpressionWithFeature.js
  62. function s4(e6, t3, o5, n5, a3) {
  63. const s6 = e6.referencesGeometry() && a3 ? u2(t3, n5, a3) : t3, i6 = e6.repurposeFeature(s6);
  64. try {
  65. return e6.evaluate({ ...o5, $feature: i6 });
  66. } catch (c7) {
  67. return s.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:", c7), null;
  68. }
  69. }
  70. var i4 = new Map();
  71. function u2(e6, r5, t3) {
  72. const { transform: o5, hasZ: n5, hasM: a3 } = t3;
  73. i4.has(r5) || i4.set(r5, c3(r5));
  74. const s6 = i4.get(r5)(e6.geometry, o5, n5, a3);
  75. return { ...e6, geometry: s6 };
  76. }
  77. function c3(s6) {
  78. const i6 = {};
  79. switch (s6) {
  80. case "esriGeometryPoint":
  81. return (e6, r5, t3, o5) => v(r5, i6, e6, t3, o5);
  82. case "esriGeometryPolygon":
  83. return (e6, r5, t3, o5) => B(r5, i6, e6, t3, o5);
  84. case "esriGeometryPolyline":
  85. return (e6, r5, t3, n5) => C(r5, i6, e6, t3, n5);
  86. case "esriGeometryMultipoint":
  87. return (e6, r5, o5, n5) => q(r5, i6, e6, o5, n5);
  88. default:
  89. return s.getLogger("esri.views.2d.support.arcadeOnDemand").error(new s2("mapview-arcade", `Unable to handle geometryType: ${s6}`)), (e6) => e6;
  90. }
  91. }
  92. // node_modules/@arcgis/core/symbols/cim/SDFHelper.js
  93. function r3(t3) {
  94. if (!t3)
  95. return null;
  96. switch (t3.type) {
  97. case "CIMPointSymbol": {
  98. const n5 = t3.symbolLayers;
  99. return n5 && n5.length === 1 ? r3(n5[0]) : null;
  100. }
  101. case "CIMVectorMarker": {
  102. const n5 = t3.markerGraphics;
  103. if (!n5 || n5.length !== 1)
  104. return null;
  105. const o5 = n5[0];
  106. if (!o5)
  107. return null;
  108. const r5 = o5.geometry;
  109. if (!r5)
  110. return null;
  111. const l2 = o5.symbol;
  112. return !l2 || l2.type !== "CIMPolygonSymbol" && l2.type !== "CIMLineSymbol" || l2.symbolLayers?.some((t4) => !!t4.effects) ? null : { geom: r5, asFill: l2.type === "CIMPolygonSymbol" };
  113. }
  114. case "sdf":
  115. return { geom: t3.geom, asFill: t3.asFill };
  116. }
  117. return null;
  118. }
  119. function e4(t3) {
  120. return t3 ? t3.rings ? t3.rings : t3.paths ? t3.paths : t3.xmin !== void 0 && t3.ymin !== void 0 && t3.xmax !== void 0 && t3.ymax !== void 0 ? [[[t3.xmin, t3.ymin], [t3.xmin, t3.ymax], [t3.xmax, t3.ymax], [t3.xmax, t3.ymin], [t3.xmin, t3.ymin]]] : null : null;
  121. }
  122. function s5(t3) {
  123. let n5 = 1 / 0, r5 = -1 / 0, l2 = 1 / 0, e6 = -1 / 0;
  124. for (const o5 of t3)
  125. for (const t4 of o5)
  126. t4[0] < n5 && (n5 = t4[0]), t4[0] > r5 && (r5 = t4[0]), t4[1] < l2 && (l2 = t4[1]), t4[1] > e6 && (e6 = t4[1]);
  127. return new t(n5, l2, r5 - n5, e6 - l2);
  128. }
  129. function i5(t3) {
  130. let n5 = 1 / 0, o5 = -1 / 0, r5 = 1 / 0, l2 = -1 / 0;
  131. for (const e6 of t3)
  132. for (const t4 of e6)
  133. t4[0] < n5 && (n5 = t4[0]), t4[0] > o5 && (o5 = t4[0]), t4[1] < r5 && (r5 = t4[1]), t4[1] > l2 && (l2 = t4[1]);
  134. return [n5, r5, o5, l2];
  135. }
  136. function f(t3) {
  137. return t3 ? t3.rings ? i5(t3.rings) : t3.paths ? i5(t3.paths) : s3(t3) ? [t3.xmin, t3.ymin, t3.xmax, t3.ymax] : null : null;
  138. }
  139. function m2(t3, n5, o5, r5, l2) {
  140. const [e6, s6, i6, f3] = t3;
  141. if (i6 < e6 || f3 < s6)
  142. return [0, 0, 0];
  143. const m3 = i6 - e6, a3 = f3 - s6, u5 = 128, c7 = 1, y3 = Math.floor(0.5 * (0.5 * u5 - c7)), h = (u5 - 2 * (y3 + c7)) / Math.max(m3, a3), x3 = Math.round(m3 * h) + 2 * y3, M2 = Math.round(a3 * h) + 2 * y3;
  144. let g = 1;
  145. if (n5) {
  146. g = M2 / h / (n5.ymax - n5.ymin);
  147. }
  148. let p2 = 0, d = 0;
  149. if (r5)
  150. if (l2) {
  151. if (n5 && o5 && n5.ymax - n5.ymin > 0) {
  152. const t4 = (n5.xmax - n5.xmin) / (n5.ymax - n5.ymin);
  153. p2 = r5.x / (o5 * t4), d = r5.y / o5;
  154. }
  155. } else
  156. p2 = r5.x, d = r5.y;
  157. p2 = 0.5 * (n5.xmax + n5.xmin) + p2 * (n5.xmax - n5.xmin), d = 0.5 * (n5.ymax + n5.ymin) + d * (n5.ymax - n5.ymin), p2 -= e6, d -= s6, p2 *= h, d *= h, p2 += y3, d += y3;
  158. return [g, p2 / x3 - 0.5, -(d / M2 - 0.5)];
  159. }
  160. function a2(t3) {
  161. const n5 = e4(t3.geom), o5 = s5(n5), r5 = 128, l2 = 1, i6 = Math.floor(0.5 * (0.5 * r5 - l2)), f3 = (r5 - 2 * (i6 + l2)) / Math.max(o5.width, o5.height), m3 = Math.round(o5.width * f3) + 2 * i6, a3 = Math.round(o5.height * f3) + 2 * i6, h = [];
  162. for (const e6 of n5)
  163. if (e6 && e6.length > 1) {
  164. const n6 = [];
  165. for (const r6 of e6) {
  166. let [l3, e7] = r6;
  167. l3 -= o5.x, e7 -= o5.y, l3 *= f3, e7 *= f3, l3 += i6 - 0.5, e7 += i6 - 0.5, t3.asFill ? n6.push([l3, e7]) : n6.push([Math.round(l3), Math.round(e7)]);
  168. }
  169. if (t3.asFill) {
  170. const t4 = n6.length - 1;
  171. n6[0][0] === n6[t4][0] && n6[0][1] === n6[t4][1] || n6.push(n6[0]);
  172. }
  173. h.push(n6);
  174. }
  175. const x3 = u3(h, m3, a3, i6);
  176. return t3.asFill && c4(h, m3, a3, i6, x3), [y2(x3, i6), m3, a3];
  177. }
  178. function u3(t3, n5, o5, r5) {
  179. const l2 = n5 * o5, e6 = new Array(l2), s6 = r5 * r5 + 1;
  180. for (let i6 = 0; i6 < l2; ++i6)
  181. e6[i6] = s6;
  182. for (const i6 of t3) {
  183. const t4 = i6.length;
  184. for (let l3 = 1; l3 < t4; ++l3) {
  185. const t5 = i6[l3 - 1], s7 = i6[l3];
  186. let f3, m3, a3, u5;
  187. t5[0] < s7[0] ? (f3 = t5[0], m3 = s7[0]) : (f3 = s7[0], m3 = t5[0]), t5[1] < s7[1] ? (a3 = t5[1], u5 = s7[1]) : (a3 = s7[1], u5 = t5[1]);
  188. let c7 = Math.floor(f3) - r5, y3 = Math.floor(m3) + r5, h = Math.floor(a3) - r5, x3 = Math.floor(u5) + r5;
  189. c7 < 0 && (c7 = 0), y3 > n5 && (y3 = n5), h < 0 && (h = 0), x3 > o5 && (x3 = o5);
  190. const M2 = s7[0] - t5[0], g = s7[1] - t5[1], p2 = M2 * M2 + g * g;
  191. for (let r6 = c7; r6 < y3; r6++)
  192. for (let l4 = h; l4 < x3; l4++) {
  193. let i7, f4, m4 = (r6 - t5[0]) * M2 + (l4 - t5[1]) * g;
  194. m4 < 0 ? (i7 = t5[0], f4 = t5[1]) : m4 > p2 ? (i7 = s7[0], f4 = s7[1]) : (m4 /= p2, i7 = t5[0] + m4 * M2, f4 = t5[1] + m4 * g);
  195. const a4 = (r6 - i7) * (r6 - i7) + (l4 - f4) * (l4 - f4), u6 = (o5 - l4 - 1) * n5 + r6;
  196. a4 < e6[u6] && (e6[u6] = a4);
  197. }
  198. }
  199. }
  200. for (let i6 = 0; i6 < l2; ++i6)
  201. e6[i6] = Math.sqrt(e6[i6]);
  202. return e6;
  203. }
  204. function c4(t3, n5, o5, r5, l2) {
  205. for (const e6 of t3) {
  206. const t4 = e6.length;
  207. for (let s6 = 1; s6 < t4; ++s6) {
  208. const t5 = e6[s6 - 1], i6 = e6[s6];
  209. let f3, m3, a3, u5;
  210. t5[0] < i6[0] ? (f3 = t5[0], m3 = i6[0]) : (f3 = i6[0], m3 = t5[0]), t5[1] < i6[1] ? (a3 = t5[1], u5 = i6[1]) : (a3 = i6[1], u5 = t5[1]);
  211. let c7 = Math.floor(f3), y3 = Math.floor(m3) + 1, h = Math.floor(a3), x3 = Math.floor(u5) + 1;
  212. c7 < r5 && (c7 = r5), y3 > n5 - r5 && (y3 = n5 - r5), h < r5 && (h = r5), x3 > o5 - r5 && (x3 = o5 - r5);
  213. for (let e7 = h; e7 < x3; ++e7) {
  214. if (t5[1] > e7 == i6[1] > e7)
  215. continue;
  216. const s7 = (o5 - e7 - 1) * n5;
  217. for (let n6 = c7; n6 < y3; ++n6)
  218. n6 < (i6[0] - t5[0]) * (e7 - t5[1]) / (i6[1] - t5[1]) + t5[0] && (l2[s7 + n6] = -l2[s7 + n6]);
  219. for (let t6 = r5; t6 < c7; ++t6)
  220. l2[s7 + t6] = -l2[s7 + t6];
  221. }
  222. }
  223. }
  224. }
  225. function y2(n5, o5) {
  226. const r5 = 2 * o5, l2 = n5.length, e6 = new Uint8Array(4 * l2);
  227. for (let s6 = 0; s6 < l2; ++s6) {
  228. const o6 = 0.5 - n5[s6] / r5;
  229. o(o6, e6, 4 * s6);
  230. }
  231. return e6;
  232. }
  233. // node_modules/@arcgis/core/symbols/cim/effects/CIMEffectHelper.js
  234. var c5 = 96 / 72;
  235. var f2 = class {
  236. static executeEffects(t3, s6, r5) {
  237. const f3 = a(s6), p2 = c5;
  238. let u5 = new r2(f3);
  239. for (const e6 of t3) {
  240. const t4 = A(e6);
  241. t4 && (u5 = t4.execute(u5, e6, p2, r5));
  242. }
  243. return u5;
  244. }
  245. static next(t3) {
  246. const s6 = t3.next();
  247. return x(s6), s6;
  248. }
  249. static applyEffects(e6, r5, c7) {
  250. if (!e6)
  251. return r5;
  252. let f3 = new r2(r5);
  253. for (const t3 of e6) {
  254. const s6 = A(t3);
  255. s6 && (f3 = s6.execute(f3, t3, 1, c7));
  256. }
  257. let p2, u5 = null;
  258. for (; p2 = f3.next(); )
  259. u5 ? y(u5) ? y(p2) && u5.paths.push(...p2.paths) : c2(u5) && c2(p2) && u5.rings.push(...p2.rings) : u5 = p2;
  260. return u5;
  261. }
  262. };
  263. // node_modules/@arcgis/core/views/2d/engine/webgl/fontUtils.js
  264. function t2(e6) {
  265. const r5 = e6.toLowerCase().split(" ").join("-");
  266. switch (r5) {
  267. case "serif":
  268. return "noto-serif";
  269. case "sans-serif":
  270. return "arial-unicode-ms";
  271. case "monospace":
  272. return "ubuntu-mono";
  273. case "fantasy":
  274. return "cabin-sketch";
  275. case "cursive":
  276. return "redressed";
  277. default:
  278. return r5;
  279. }
  280. }
  281. function n3(e6) {
  282. const r5 = u4(e6) + c6(e6);
  283. return t2(e6.family) + (r5.length > 0 ? r5 : "-regular");
  284. }
  285. function u4(e6) {
  286. if (!e6.weight)
  287. return "";
  288. switch (e6.weight.toLowerCase()) {
  289. case "bold":
  290. case "bolder":
  291. return "-bold";
  292. }
  293. return "";
  294. }
  295. function c6(e6) {
  296. if (!e6.style)
  297. return "";
  298. switch (e6.style.toLowerCase()) {
  299. case "italic":
  300. case "oblique":
  301. return "-italic";
  302. }
  303. return "";
  304. }
  305. // node_modules/@arcgis/core/views/2d/engine/webgl/grouping.js
  306. function e5(e6, o5) {
  307. let r5;
  308. if (typeof e6 == "string")
  309. r5 = c(e6 + `-seed(${o5})`);
  310. else {
  311. let t3 = 12;
  312. r5 = e6 ^ o5;
  313. do {
  314. r5 = 107 * (r5 >> 8 ^ r5) + t3 | 0;
  315. } while (--t3 != 0);
  316. }
  317. return (1 + r5 / (1 << 31)) / 2;
  318. }
  319. function o4(t3) {
  320. return Math.floor(e5(t3, r4) * n4);
  321. }
  322. var r4 = 53290320;
  323. var n4 = 10;
  324. // node_modules/@arcgis/core/symbols/cim/cimAnalyzer.js
  325. var w = s.getLogger("esri.symbols.cim.cimAnalyzer");
  326. function L(e6) {
  327. switch (e6) {
  328. case "Butt":
  329. return e2.BUTT;
  330. case "Square":
  331. return e2.SQUARE;
  332. default:
  333. return e2.ROUND;
  334. }
  335. }
  336. function X(e6) {
  337. switch (e6) {
  338. case "Bevel":
  339. return n.BEVEL;
  340. case "Miter":
  341. return n.MITER;
  342. default:
  343. return n.ROUND;
  344. }
  345. }
  346. function z(e6) {
  347. switch (e6) {
  348. case "Left":
  349. default:
  350. return "left";
  351. case "Right":
  352. return "right";
  353. case "Center":
  354. return "center";
  355. case "Justify":
  356. return w.warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."), "center";
  357. }
  358. }
  359. function A2(e6) {
  360. switch (e6) {
  361. case "Top":
  362. default:
  363. return "top";
  364. case "Center":
  365. return "middle";
  366. case "Baseline":
  367. return "baseline";
  368. case "Bottom":
  369. return "bottom";
  370. }
  371. }
  372. function R(e6) {
  373. let t3 = "", i6 = "";
  374. if (e6) {
  375. const o5 = e6.toLowerCase();
  376. o5.includes("italic") ? t3 = "italic" : o5.includes("oblique") && (t3 = "oblique"), o5.includes("bold") ? i6 = "bold" : o5.includes("light") && (i6 = "lighter");
  377. }
  378. return { style: t3, weight: i6 };
  379. }
  380. function J(e6) {
  381. return e6.underline ? "underline" : e6.strikethrough ? "line-through" : "none";
  382. }
  383. function x2(e6, t3, i6, o5) {
  384. let r5;
  385. e6[t3] ? r5 = e6[t3] : (r5 = {}, e6[t3] = r5), r5[i6] = o5;
  386. }
  387. function H(e6) {
  388. const t3 = e6.markerPlacement;
  389. return t3 && t3.angleToLine ? i.MAP : i.SCREEN;
  390. }
  391. async function Y(e6, t3, i6, o5, r5) {
  392. const n5 = o5 ?? [];
  393. if (!e6)
  394. return n5;
  395. let l2, s6;
  396. const c7 = {};
  397. if (e6.type !== "CIMSymbolReference")
  398. return w.error("Expect cim type to be 'CIMSymbolReference'"), n5;
  399. if (l2 = e6.symbol, s6 = e6.primitiveOverrides, s6) {
  400. const e7 = [];
  401. for (const i7 of s6) {
  402. const o6 = i7.valueExpressionInfo;
  403. if (o6 && t3) {
  404. const r6 = o6.expression, n6 = i3(r6, t3.spatialReference, t3.fields).then((e8) => {
  405. e8 && x2(c7, i7.primitiveName, i7.propertyName, e8);
  406. });
  407. e7.push(n6);
  408. } else
  409. i7.value != null && x2(c7, i7.primitiveName, i7.propertyName, i7.value);
  410. }
  411. e7.length > 0 && await Promise.all(e7);
  412. }
  413. const f3 = [];
  414. switch (fe(l2, i6, f3), f3.length > 0 && await Promise.all(f3), l2.type) {
  415. case "CIMPointSymbol":
  416. case "CIMLineSymbol":
  417. case "CIMPolygonSymbol":
  418. $(l2, s6, c7, t3, n5, i6, r5);
  419. }
  420. return n5;
  421. }
  422. function $(e6, t3, i6, o5, r5, n5, l2) {
  423. if (!e6)
  424. return;
  425. const a3 = e6.symbolLayers;
  426. if (!a3)
  427. return;
  428. const s6 = e6.effects;
  429. let p2;
  430. const u5 = Z.getSize(e6);
  431. e6.type === "CIMPointSymbol" && e6.angleAlignment === "Map" && (p2 = i.MAP);
  432. let y3 = a3.length;
  433. for (; y3--; ) {
  434. const c7 = a3[y3];
  435. if (!c7 || c7.enable === false)
  436. continue;
  437. let m3;
  438. s6 && s6.length && (m3 = [...s6]);
  439. const h = c7.effects;
  440. h && h.length && (s6 ? m3.push(...h) : m3 = [...h]);
  441. const g = [];
  442. let d;
  443. te.findEffectOverrides(m3, t3, g), d = g.length > 0 ? re(m3, g, i6, o5) : m3;
  444. const S = [];
  445. switch (te.findApplicableOverrides(c7, t3, S), c7.type) {
  446. case "CIMSolidFill":
  447. E(c7, d, i6, S, o5, r5);
  448. break;
  449. case "CIMPictureFill":
  450. T(c7, d, i6, S, o5, n5, r5);
  451. break;
  452. case "CIMHatchFill":
  453. j(c7, d, i6, S, o5, r5);
  454. break;
  455. case "CIMGradientFill":
  456. F(c7, d, i6, S, o5, r5);
  457. break;
  458. case "CIMSolidStroke":
  459. W(c7, d, i6, S, o5, r5, e6.type === "CIMPolygonSymbol", u5);
  460. break;
  461. case "CIMPictureStroke":
  462. D(c7, d, i6, S, o5, r5, e6.type === "CIMPolygonSymbol", u5);
  463. break;
  464. case "CIMGradientStroke":
  465. U(c7, d, i6, S, o5, r5, e6.type === "CIMPolygonSymbol", u5);
  466. break;
  467. case "CIMCharacterMarker":
  468. if (G(c7, d, i6, S, o5, r5))
  469. break;
  470. break;
  471. case "CIMPictureMarker":
  472. if (G(c7, d, i6, S, o5, r5))
  473. break;
  474. e6.type === "CIMLineSymbol" && (p2 = H(c7)), B2(c7, d, i6, S, o5, n5, r5, p2, u5);
  475. break;
  476. case "CIMVectorMarker":
  477. if (G(c7, d, i6, S, o5, r5))
  478. break;
  479. e6.type === "CIMLineSymbol" && (p2 = H(c7)), q2(c7, d, i6, S, o5, r5, n5, p2, u5, l2);
  480. break;
  481. default:
  482. w.error("Cannot analyze CIM layer", c7.type);
  483. }
  484. }
  485. }
  486. function E(e6, t3, i6, o5, r5, n5) {
  487. const a3 = e6.primitiveName, s6 = i2(e6.color), [c7, f3] = ce(o5, a3, t3, null, null), m3 = c(JSON.stringify(e6) + f3).toString();
  488. n5.push({ type: "fill", templateHash: m3, materialHash: c7 ? () => m3 : m3, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, color: ie(a3, i6, "Color", r5, s6, te2), height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, effects: t3, applyRandomOffset: false, sampleAlphaOnly: true });
  489. }
  490. function T(e6, t3, i6, r5, n5, a3, s6) {
  491. const c7 = e6.primitiveName, f3 = e6.tintColor ? i2(e6.tintColor) : { r: 255, g: 255, b: 255, a: 1 }, [m3, p2] = ce(r5, c7, t3, null, null), u5 = c(JSON.stringify(e6) + p2).toString(), y3 = c(`${e6.url}${JSON.stringify(e6.colorSubstitutions)}`).toString();
  492. let h = M(e6.scaleX);
  493. if ("width" in e6) {
  494. const t4 = e6.width;
  495. let i7 = 1;
  496. const r6 = a3.getResource(e6.url);
  497. r(r6) && (i7 = r6.width / r6.height), h /= i7 * (e6.height / t4);
  498. }
  499. s6.push({ type: "fill", templateHash: u5, materialHash: m3 ? () => y3 : y3, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, color: ie(c7, i6, "TintColor", n5, f3, te2), height: ie(c7, i6, "Height", n5, e6.height), scaleX: ie(c7, i6, "ScaleX", n5, h), angle: ie(c7, i6, "Rotation", n5, M(e6.rotation)), offsetX: ie(c7, i6, "OffsetX", n5, M(e6.offsetX)), offsetY: ie(c7, i6, "OffsetY", n5, M(e6.offsetY)), url: e6.url, applyRandomOffset: false, sampleAlphaOnly: false });
  500. }
  501. function j(e6, t3, i6, o5, r5, n5) {
  502. const a3 = ["Rotation", "OffsetX", "OffsetY"], s6 = o5.filter((t4) => t4.primitiveName !== e6.primitiveName && !a3.includes(t4.propertyName)), c7 = e6.primitiveName, [f3, m3] = ce(o5, c7, t3, null, null), p2 = c(JSON.stringify(e6) + m3).toString(), u5 = c(`${e6.separation}${JSON.stringify(e6.lineSymbol)}`).toString();
  503. let y3 = { r: 255, g: 255, b: 255, a: 1 };
  504. if (e6.lineSymbol) {
  505. const t4 = e6.lineSymbol?.symbolLayers.find((e7) => e7.type === "CIMSolidStroke");
  506. t4 && (y3 = i2(t4.color));
  507. }
  508. n5.push({ type: "fill", templateHash: p2, materialHash: f3 ? ae(u5, i6, s6, r5) : u5, cim: e6, materialOverrides: s6, colorLocked: e6.colorLocked, effects: t3, color: y3, height: ie(c7, i6, "Separation", r5, e6.separation), scaleX: 1, angle: ie(c7, i6, "Rotation", r5, M(e6.rotation)), offsetX: ie(c7, i6, "OffsetX", r5, M(e6.offsetX)), offsetY: ie(c7, i6, "OffsetY", r5, M(e6.offsetY)), applyRandomOffset: false, sampleAlphaOnly: true });
  509. }
  510. function F(e6, t3, i6, o5, r5, n5) {
  511. const a3 = e6.primitiveName, [s6, c7] = ce(o5, a3, t3, null, null), f3 = c(JSON.stringify(e6) + c7).toString();
  512. n5.push({ type: "fill", templateHash: f3, materialHash: s6 ? ae(f3, i6, o5, r5) : f3, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, color: { r: 128, g: 128, b: 128, a: 1 }, height: 0, angle: 0, offsetX: 0, offsetY: 0, scaleX: 1, applyRandomOffset: false, sampleAlphaOnly: false });
  513. }
  514. function W(e6, t3, i6, o5, r5, n5, a3, s6) {
  515. const c7 = e6.primitiveName, f3 = i2(e6.color), m3 = e6.width !== void 0 ? e6.width : 4, p2 = L(e6.capStyle), u5 = X(e6.joinStyle), y3 = e6.miterLimit, [h, d] = ce(o5, c7, t3, null, null), S = c(JSON.stringify(e6) + d).toString();
  516. let v2, N;
  517. if (t3 && t3 instanceof Array && t3.length > 0) {
  518. const e7 = t3[t3.length - 1];
  519. if (e7.type === "CIMGeometricEffectDashes" && e7.lineDashEnding === "NoConstraint" && e7.offsetAlongLine === null) {
  520. const e8 = (t3 = [...t3]).pop();
  521. v2 = e8.dashTemplate, N = e8.scaleDash;
  522. }
  523. }
  524. n5.push({ type: "line", templateHash: S, materialHash: h ? () => S : S, cim: e6, materialOverrides: null, isOutline: a3, colorLocked: e6.colorLocked, effects: t3, color: ie(c7, i6, "Color", r5, f3, te2), width: ie(c7, i6, "Width", r5, m3), cap: ie(c7, i6, "CapStyle", r5, p2), join: ie(c7, i6, "JoinStyle", r5, u5), miterLimit: ie(c7, i6, "MiterLimit", r5, y3), referenceWidth: s6, zOrder: ee(e6.name), dashTemplate: v2, scaleDash: N, sampleAlphaOnly: true });
  525. }
  526. function D(e6, t3, i6, o5, r5, n5, a3, s6) {
  527. const c7 = c(`${e6.url}${JSON.stringify(e6.colorSubstitutions)}`).toString(), f3 = e6.primitiveName, m3 = i2(e6.tintColor), p2 = e6.width !== void 0 ? e6.width : 4, u5 = L(e6.capStyle), y3 = X(e6.joinStyle), h = e6.miterLimit, [d, S] = ce(o5, f3, t3, null, null), v2 = c(JSON.stringify(e6) + S).toString();
  528. n5.push({ type: "line", templateHash: v2, materialHash: d ? () => c7 : c7, cim: e6, materialOverrides: null, isOutline: a3, colorLocked: e6.colorLocked, effects: t3, color: ie(f3, i6, "TintColor", r5, m3, te2), width: ie(f3, i6, "Width", r5, p2), cap: ie(f3, i6, "CapStyle", r5, u5), join: ie(f3, i6, "JoinStyle", r5, y3), miterLimit: ie(f3, i6, "MiterLimit", r5, h), referenceWidth: s6, zOrder: ee(e6.name), dashTemplate: null, scaleDash: false, url: e6.url, sampleAlphaOnly: false });
  529. }
  530. function U(e6, t3, i6, o5, r5, n5, a3, s6) {
  531. const c7 = e6.primitiveName, f3 = e6.width !== void 0 ? e6.width : 4, m3 = L(e6.capStyle), p2 = X(e6.joinStyle), u5 = e6.miterLimit, [y3, h] = ce(o5, c7, t3, null, null), g = c(JSON.stringify(e6) + h).toString();
  532. n5.push({ type: "line", templateHash: g, materialHash: y3 ? ae(g, i6, o5, r5) : g, cim: e6, materialOverrides: null, isOutline: a3, colorLocked: e6.colorLocked, effects: t3, color: { r: 128, g: 128, b: 128, a: 1 }, width: ie(c7, i6, "Width", r5, f3), cap: ie(c7, i6, "CapStyle", r5, m3), join: ie(c7, i6, "JoinStyle", r5, p2), miterLimit: ie(c7, i6, "MiterLimit", r5, u5), referenceWidth: s6, zOrder: ee(e6.name), dashTemplate: null, scaleDash: false, sampleAlphaOnly: false });
  533. }
  534. function G(e6, t3, i6, o5, r5, a3) {
  535. const s6 = e6.markerPlacement;
  536. if (!s6 || s6.type !== "CIMMarkerPlacementInsidePolygon")
  537. return false;
  538. const c7 = s6, f3 = Math.abs(c7.stepX), m3 = Math.abs(c7.stepY);
  539. if (f3 === 0 || m3 === 0)
  540. return true;
  541. const p2 = ["Rotation", "OffsetX", "OffsetY"], u5 = o5.filter((t4) => t4.primitiveName !== e6.primitiveName && !p2.includes(t4.propertyName)), y3 = "url" in e6 ? e6.url : null, [h, S] = ce(o5, c7.primitiveName, t3, null, null), v2 = c(JSON.stringify(e6) + S).toString();
  542. let N, b, O = null;
  543. if (s6.gridType === "Random") {
  544. const e7 = e(dt), t4 = Math.max(Math.floor(e7 / f3), 1), i7 = Math.max(Math.floor(e7 / m3), 1);
  545. N = m3 * i7, O = (e8) => e8 ? e8 * i7 : 0;
  546. b = t4 * f3 / N;
  547. } else
  548. s6.shiftOddRows ? (N = 2 * m3, O = (e7) => e7 ? 2 * e7 : 0, b = f3 / m3 * 0.5) : (N = m3, O = null, b = f3 / m3);
  549. let C3 = { r: 255, g: 255, b: 255, a: 1 };
  550. return "tintColor" in e6 && (C3 = i2(e6.tintColor)), a3.push({ type: "fill", templateHash: v2, materialHash: h ? ae(v2, i6, u5, r5) : v2, cim: e6, materialOverrides: u5, colorLocked: e6.colorLocked, effects: t3, color: ie(c7.primitiveName, i6, "TintColor", r5, C3, te2), height: ie(c7.primitiveName, i6, "StepY", r5, N, O), scaleX: b, angle: ie(c7.primitiveName, i6, "GridAngle", r5, c7.gridAngle), offsetX: ie(c7.primitiveName, i6, "OffsetX", r5, M(c7.offsetX)), offsetY: ie(c7.primitiveName, i6, "OffsetY", r5, M(c7.offsetY)), url: y3, applyRandomOffset: s6.gridType === "Random", sampleAlphaOnly: !y3 }), true;
  551. }
  552. function B2(e6, t3, i6, r5, n5, a3, s6, c7, f3) {
  553. const m3 = e6.primitiveName, p2 = M(e6.size);
  554. let u5 = M(e6.scaleX);
  555. const y3 = M(e6.rotation), h = M(e6.offsetX), S = M(e6.offsetY), v2 = e6.tintColor ? i2(e6.tintColor) : { r: 255, g: 255, b: 255, a: 1 }, b = c(`${e6.url}${JSON.stringify(e6.colorSubstitutions)}${JSON.stringify(e6.animatedSymbolProperties)}`).toString(), O = ne(e6.markerPlacement, r5, i6, n5), C3 = le(e6.animatedSymbolProperties, r5, i6, n5), [k, P] = ce(r5, m3, t3, O, C3), M2 = c(JSON.stringify(e6) + P).toString(), w2 = e6.anchorPoint ?? { x: 0, y: 0 };
  556. if ("width" in e6) {
  557. const t4 = e6.width;
  558. let i7 = 1;
  559. const r6 = a3.getResource(e6.url);
  560. r(r6) && (i7 = r6.width / r6.height), u5 /= i7 * (p2 / t4);
  561. }
  562. function L2(e7, t4) {
  563. return e3(C3, e7, t4);
  564. }
  565. const X2 = e6.animatedSymbolProperties && e6.animatedSymbolProperties.randomizeStartTime === true ? (e7, t4, i7, o5) => {
  566. const r6 = o4(o5), n6 = L2(e7, t4);
  567. return b + `-MATERIALGROUP(${r6})-ASP(${JSON.stringify(n6)})`;
  568. } : k ? (e7, t4) => {
  569. const i7 = L2(e7, t4);
  570. return b + `-ASP(${JSON.stringify(i7)})`;
  571. } : b;
  572. s6.push({ type: "marker", templateHash: M2, materialHash: X2, cim: e6, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: false, alignment: c7, size: ie(m3, i6, "Size", n5, p2), scaleX: ie(m3, i6, "ScaleX", n5, u5), rotation: ie(m3, i6, "Rotation", n5, y3), offsetX: ie(m3, i6, "OffsetX", n5, h), offsetY: ie(m3, i6, "OffsetY", n5, S), color: ie(m3, i6, "TintColor", n5, v2, te2), anchorPoint: { x: w2.x, y: -w2.y }, isAbsoluteAnchorPoint: e6.anchorPointUnits !== "Relative", outlineColor: { r: 0, g: 0, b: 0, a: 0 }, outlineWidth: 0, frameHeight: 0, rotateClockwise: e6.rotateClockwise, referenceSize: f3, sizeRatio: 1, markerPlacement: O, url: e6.url, animatedSymbolProperties: C3 });
  573. }
  574. function q2(e6, t3, i6, o5, r5, n5, l2, a3, s6, c7) {
  575. const f3 = e6.markerGraphics;
  576. if (!f3)
  577. return;
  578. let m3 = 0;
  579. if (e6.scaleSymbolsProportionally) {
  580. const t4 = e6.frame;
  581. t4 && (m3 = t4.ymax - t4.ymin);
  582. }
  583. const p2 = ne(e6.markerPlacement, o5, i6, r5);
  584. for (const u5 of f3)
  585. if (u5) {
  586. const f4 = u5.symbol;
  587. if (!f4)
  588. continue;
  589. switch (f4.type) {
  590. case "CIMPointSymbol":
  591. case "CIMLineSymbol":
  592. case "CIMPolygonSymbol":
  593. K(e6, t3, p2, null, u5, o5, i6, r5, n5, l2, a3, s6, m3, c7);
  594. break;
  595. case "CIMTextSymbol":
  596. V(e6, t3, p2, u5, i6, o5, r5, n5, a3, s6, m3);
  597. }
  598. }
  599. }
  600. function V(e6, t3, i6, o5, r5, n5, a3, s6, m3, p2, u5) {
  601. const y3 = [];
  602. te.findApplicableOverrides(o5, n5, y3);
  603. const h = o5.geometry;
  604. if (!("x" in h) || !("y" in h))
  605. return;
  606. const b = o5.symbol, O = J(b), C3 = R(b.fontStyleName), k = t2(b.fontFamilyName);
  607. b.font = { family: k, decoration: O, ...C3 };
  608. const P = e6.frame, I = h.x - 0.5 * (P.xmin + P.xmax), w2 = h.y - 0.5 * (P.ymin + P.ymax), L2 = e6.size / u5, X2 = e6.primitiveName, x3 = M(b.height) * L2, H2 = M(b.angle), Y2 = M(e6.offsetX) + (M(b.offsetX) + I) * L2, $2 = M(e6.offsetY) + (M(b.offsetY) + w2) * L2, E2 = i2(Z.getFillColor(b));
  609. let T2 = i2(Z.getStrokeColor(b)), j2 = Z.getStrokeWidth(b);
  610. j2 || (T2 = i2(Z.getFillColor(b.haloSymbol)), j2 = b.haloSize * L2);
  611. const [F2, W2] = ce(n5, X2, t3, i6, null), D2 = JSON.stringify(e6.effects) + Number(e6.colorLocked) + JSON.stringify(e6.anchorPoint) + e6.anchorPointUnits + JSON.stringify(e6.markerPlacement), U2 = c(JSON.stringify(o5) + D2 + W2).toString();
  612. let G2 = ie(o5.primitiveName, r5, "TextString", a3, o5.textString, o2, b.textCase);
  613. if (G2 == null)
  614. return;
  615. const { fontStyleName: B3 } = b, q3 = k + (B3 ? "-" + B3.toLowerCase() : "-regular"), V2 = q3;
  616. typeof G2 == "string" && G2.includes("[") && b.fieldMap && (G2 = n2(b.fieldMap, G2, b.textCase)), s6.push({ type: "text", templateHash: U2, materialHash: F2 || typeof G2 == "function" || G2.match(/\[(.*?)\]/) ? (e7, t4, i7) => V2 + "-" + e3(G2, e7, t4, i7) : V2 + "-" + c(G2), cim: b, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, alignment: m3, anchorPoint: { x: e6.anchorPoint ? e6.anchorPoint.x : 0, y: e6.anchorPoint ? e6.anchorPoint.y : 0 }, isAbsoluteAnchorPoint: e6.anchorPointUnits !== "Relative", fontName: q3, decoration: O, weight: ie(X2, r5, "Weight", a3, C3.weight), style: ie(X2, r5, "Size", a3, C3.style), size: ie(X2, r5, "Size", a3, x3), angle: ie(X2, r5, "Rotation", a3, H2), offsetX: ie(X2, r5, "OffsetX", a3, Y2), offsetY: ie(X2, r5, "OffsetY", a3, $2), horizontalAlignment: z(b.horizontalAlignment), verticalAlignment: A2(b.verticalAlignment), text: G2, color: E2, outlineColor: T2, outlineSize: j2, referenceSize: p2, sizeRatio: 1, markerPlacement: i6 });
  617. }
  618. function K(e6, t3, i6, r5, n5, a3, s6, f3, m3, p2, u5, S, v2, N) {
  619. const b = n5.symbol, O = b.symbolLayers;
  620. if (!O)
  621. return;
  622. if (N)
  623. return void _(e6, t3, i6, r5, n5, s6, a3, f3, m3, p2, u5, S, v2);
  624. let k = O.length;
  625. if (me(O))
  626. return void Q(e6, t3, i6, r5, n5, O, a3, s6, f3, m3, u5, S, v2);
  627. const P = f2.applyEffects(b.effects, n5.geometry, p2.geometryEngine);
  628. if (P)
  629. for (; k--; ) {
  630. const N2 = O[k];
  631. if (N2 && N2.enable !== false)
  632. switch (N2.type) {
  633. case "CIMSolidFill":
  634. case "CIMSolidStroke": {
  635. const b2 = f2.applyEffects(N2.effects, P, p2.geometryEngine), O2 = f(b2);
  636. if (!O2)
  637. continue;
  638. const [k2, M2, I] = m2(O2, e6.frame, e6.size, e6.anchorPoint, e6.anchorPointUnits !== "Relative"), w2 = N2.type === "CIMSolidFill", L2 = { type: "sdf", geom: b2, asFill: w2 }, X2 = e6.primitiveName, z2 = M(e6.size) ?? 10, A3 = M(e6.rotation), R2 = M(e6.offsetX), J2 = M(e6.offsetY), x3 = N2.path, H2 = N2.primitiveName, Y2 = i2(w2 ? Z.getFillColor(N2) : Z.getStrokeColor(N2)), $2 = w2 ? { r: 0, g: 0, b: 0, a: 0 } : i2(Z.getStrokeColor(N2)), E2 = Z.getStrokeWidth(N2);
  639. if (!w2 && !E2)
  640. break;
  641. let T2 = false, j2 = "";
  642. for (const e7 of a3)
  643. e7.primitiveName !== H2 && e7.primitiveName !== X2 || (e7.value !== void 0 ? j2 += `-${e7.primitiveName}-${e7.propertyName}-${JSON.stringify(e7.value)}` : e7.valueExpressionInfo && (T2 = true));
  644. r(t3) && typeof t3 == "function" && (T2 = true);
  645. const F2 = JSON.stringify({ ...e6, markerGraphics: null }), W2 = c(JSON.stringify(L2) + x3).toString(), D2 = { type: "marker", templateHash: c(JSON.stringify(n5) + JSON.stringify(N2) + F2 + j2).toString(), materialHash: T2 ? () => W2 : W2, cim: L2, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: e6.scaleSymbolsProportionally, alignment: u5, anchorPoint: { x: M2, y: I }, isAbsoluteAnchorPoint: false, size: ie(e6.primitiveName, s6, "Size", f3, z2), rotation: ie(e6.primitiveName, s6, "Rotation", f3, A3), offsetX: ie(e6.primitiveName, s6, "OffsetX", f3, R2), offsetY: ie(e6.primitiveName, s6, "OffsetY", f3, J2), scaleX: 1, frameHeight: v2, rotateClockwise: e6.rotateClockwise, referenceSize: S, sizeRatio: k2, color: ie(H2, s6, "Color", f3, Y2, te2), outlineColor: ie(H2, s6, "Color", f3, $2, te2), outlineWidth: ie(H2, s6, "Width", f3, E2), markerPlacement: i6, animatedSymbolProperties: r5, path: x3 };
  646. m3.push(D2);
  647. break;
  648. }
  649. default:
  650. _(e6, t3, i6, r5, n5, s6, a3, f3, m3, p2, u5, S, v2);
  651. }
  652. }
  653. }
  654. function Q(e6, t3, i6, o5, r5, n5, a3, s6, f3, m3, p2, u5, S) {
  655. const v2 = r5.geometry, N = n5[0], b = n5[1], O = f(v2);
  656. if (!O)
  657. return;
  658. const [C3, k, P] = m2(O, e6.frame, e6.size, e6.anchorPoint, e6.anchorPointUnits !== "Relative"), M2 = { type: "sdf", geom: v2, asFill: true }, I = e6.primitiveName, w2 = M(e6.size), L2 = M(e6.rotation), X2 = M(e6.offsetX), z2 = M(e6.offsetY), A3 = b.path, R2 = b.primitiveName, J2 = N.primitiveName, x3 = i2(Z.getFillColor(b)), H2 = i2(Z.getStrokeColor(N)), Y2 = Z.getStrokeWidth(N);
  659. let $2 = false, E2 = "";
  660. for (const l2 of a3)
  661. l2.primitiveName !== R2 && l2.primitiveName !== J2 && l2.primitiveName !== I || (l2.value !== void 0 ? E2 += `-${l2.primitiveName}-${l2.propertyName}-${JSON.stringify(l2.value)}` : l2.valueExpressionInfo && ($2 = true));
  662. const T2 = JSON.stringify({ ...e6, markerGraphics: null }), j2 = c(JSON.stringify(M2) + A3).toString(), F2 = { type: "marker", templateHash: c(JSON.stringify(r5) + JSON.stringify(b) + JSON.stringify(N) + T2 + E2).toString(), materialHash: $2 ? () => j2 : j2, cim: M2, materialOverrides: null, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: e6.scaleSymbolsProportionally, alignment: p2, anchorPoint: { x: k, y: P }, isAbsoluteAnchorPoint: false, size: ie(e6.primitiveName, s6, "Size", f3, w2), rotation: ie(e6.primitiveName, s6, "Rotation", f3, L2), offsetX: ie(e6.primitiveName, s6, "OffsetX", f3, X2), offsetY: ie(e6.primitiveName, s6, "OffsetY", f3, z2), scaleX: 1, frameHeight: S, rotateClockwise: e6.rotateClockwise, referenceSize: u5, sizeRatio: C3, color: ie(R2, s6, "Color", f3, x3, te2), outlineColor: ie(J2, s6, "Color", f3, H2, te2), outlineWidth: ie(J2, s6, "Width", f3, Y2), markerPlacement: i6, path: A3, animatedSymbolProperties: o5 };
  663. m3.push(F2);
  664. }
  665. function _(e6, t3, i6, n5, a3, s6, f3, m3, p2, u5, y3, h, g) {
  666. const S = Z2(e6, a3);
  667. let v2 = [];
  668. const N = ["Rotation", "OffsetX", "OffsetY"];
  669. v2 = f3.filter((t4) => t4.primitiveName !== e6.primitiveName || !N.includes(t4.propertyName));
  670. let b = "";
  671. for (const o5 of f3)
  672. o5.value !== void 0 && (b += `-${o5.primitiveName}-${o5.propertyName}-${JSON.stringify(o5.value)}`);
  673. const [O, C3, k] = Z.getTextureAnchor(S, u5), P = e6.primitiveName, M2 = M(e6.rotation), I = M(e6.offsetX), w2 = M(e6.offsetY), L2 = c(JSON.stringify(S) + b).toString(), X2 = { type: "marker", templateHash: L2, materialHash: v2.length > 0 || r(t3) && typeof t3 == "function" ? ae(L2, s6, v2, m3) : L2, cim: S, materialOverrides: v2, colorLocked: e6.colorLocked, effects: t3, scaleSymbolsProportionally: e6.scaleSymbolsProportionally, alignment: y3, anchorPoint: { x: O, y: C3 }, isAbsoluteAnchorPoint: false, size: e6.size, rotation: ie(P, s6, "Rotation", m3, M2), offsetX: ie(P, s6, "OffsetX", m3, I), offsetY: ie(P, s6, "OffsetY", m3, w2), color: { r: 255, g: 255, b: 255, a: 1 }, outlineColor: { r: 0, g: 0, b: 0, a: 0 }, outlineWidth: 0, scaleX: 1, frameHeight: g, rotateClockwise: e6.rotateClockwise, referenceSize: h, sizeRatio: k / u(e6.size), markerPlacement: i6, animatedSymbolProperties: n5 };
  674. p2.push(X2);
  675. }
  676. function Z2(e6, t3) {
  677. return { type: e6.type, enable: true, name: e6.name, colorLocked: e6.colorLocked, primitiveName: e6.primitiveName, anchorPoint: e6.anchorPoint, anchorPointUnits: e6.anchorPointUnits, offsetX: 0, offsetY: 0, rotateClockwise: e6.rotateClockwise, rotation: 0, size: e6.size, billboardMode3D: e6.billboardMode3D, depth3D: e6.depth3D, frame: e6.frame, markerGraphics: [t3], scaleSymbolsProportionally: e6.scaleSymbolsProportionally, respectFrame: e6.respectFrame, clippingPath: e6.clippingPath };
  678. }
  679. function ee(e6) {
  680. if (e6 && e6.indexOf("Level_") === 0) {
  681. const t3 = parseInt(e6.substr(6), 10);
  682. if (!isNaN(t3))
  683. return t3;
  684. }
  685. return 0;
  686. }
  687. function te2(t3) {
  688. if (!t3 || t3.length === 0)
  689. return null;
  690. const i6 = new l(t3).toRgba();
  691. return { r: i6[0], g: i6[1], b: i6[2], a: i6[3] };
  692. }
  693. function ie(e6, t3, i6, o5, r5, n5, l2) {
  694. const a3 = t3[e6];
  695. if (a3) {
  696. const e7 = a3[i6];
  697. if (typeof e7 == "string" || typeof e7 == "number" || e7 instanceof Array)
  698. return n5 ? n5.call(null, e7, l2) : e7;
  699. if (e7 != null && e7 instanceof o3)
  700. return (t4, i7, a4) => {
  701. let s6 = s4(e7, t4, { $view: a4 }, o5.geometryType, i7);
  702. return s6 !== null && n5 && (s6 = n5.call(null, s6, l2)), s6 !== null ? s6 : r5;
  703. };
  704. }
  705. return r5;
  706. }
  707. function oe(e6) {
  708. return e6 ? e6.charAt(0).toLowerCase() + e6.substr(1) : e6;
  709. }
  710. function re(e6, i6, o5, r5) {
  711. for (const t3 of i6) {
  712. if (t3.valueExpressionInfo) {
  713. const e7 = o5[t3.primitiveName] && o5[t3.primitiveName][t3.propertyName];
  714. e7 instanceof o3 && (t3.fn = (t4, i7, o6) => s4(e7, t4, { $view: o6 }, r5.geometryType, i7));
  715. }
  716. }
  717. return (o6, r6, n5) => {
  718. for (const e7 of i6)
  719. e7.fn && (e7.value = e7.fn(o6, r6, n5));
  720. const l2 = [];
  721. for (let a3 of e6) {
  722. const e7 = a3?.primitiveName;
  723. if (e7) {
  724. let o7 = false;
  725. for (const r7 of i6)
  726. if (r7.primitiveName === e7) {
  727. const e8 = oe(r7.propertyName);
  728. r7.value != null && r7.value !== a3[e8] && (o7 || (a3 = m(a3), o7 = true), a3[e8] = r7.value);
  729. }
  730. }
  731. l2.push(a3);
  732. }
  733. return l2;
  734. };
  735. }
  736. function ne(e6, i6, o5, r5) {
  737. const n5 = [];
  738. if (te.findApplicableOverrides(e6, i6, n5), n5.length === 0)
  739. return e6;
  740. for (const t3 of n5) {
  741. if (t3.valueExpressionInfo) {
  742. const e7 = o5[t3.primitiveName] && o5[t3.primitiveName][t3.propertyName];
  743. e7 instanceof o3 && (t3.fn = (t4, i7, o6) => s4(e7, t4, { $view: o6 }, r5.geometryType, i7));
  744. }
  745. }
  746. return (i7, o6, r6) => {
  747. for (const e7 of n5)
  748. e7.fn && (e7.value = e7.fn(i7, o6, r6));
  749. const l2 = m(e6), a3 = e6.primitiveName;
  750. for (const e7 of n5)
  751. if (e7.primitiveName === a3) {
  752. const t3 = oe(e7.propertyName);
  753. e7.value != null && e7.value !== l2[t3] && (l2[t3] = e7.value);
  754. }
  755. return l2;
  756. };
  757. }
  758. function le(e6, i6, o5, r5) {
  759. const n5 = [];
  760. if (te.findApplicableOverrides(e6, i6, n5), n5.length === 0)
  761. return e6;
  762. for (const t3 of n5) {
  763. if (t3.valueExpressionInfo) {
  764. const e7 = o5[t3.primitiveName] && o5[t3.primitiveName][t3.propertyName];
  765. e7 instanceof o3 && (t3.fn = (t4, i7, o6) => s4(e7, t4, { $view: o6 }, r5.geometryType, i7));
  766. }
  767. }
  768. return (i7, o6, r6) => {
  769. for (const e7 of n5)
  770. e7.fn && (e7.value = e7.fn(i7, o6, r6));
  771. const l2 = m(e6), a3 = e6.primitiveName;
  772. for (const e7 of n5)
  773. if (e7.primitiveName === a3) {
  774. const t3 = oe(e7.propertyName);
  775. e7.value != null && e7.value !== l2[t3] && (l2[t3] = e7.value);
  776. }
  777. return l2;
  778. };
  779. }
  780. function ae(e6, t3, i6, o5) {
  781. for (const r5 of i6) {
  782. if (r5.valueExpressionInfo) {
  783. const e7 = t3[r5.primitiveName] && t3[r5.primitiveName][r5.propertyName];
  784. e7 instanceof o3 && (r5.fn = (t4, i7, r6) => s4(e7, t4, { $view: r6 }, o5.geometryType, i7));
  785. }
  786. }
  787. return (t4, o6, r5) => {
  788. for (const e7 of i6)
  789. e7.fn && (e7.value = e7.fn(t4, o6, r5));
  790. return c(e6 + te.buildOverrideKey(i6)).toString();
  791. };
  792. }
  793. function se(e6, t3) {
  794. if (!t3 || t3.length === 0)
  795. return e6;
  796. const i6 = JSON.parse(JSON.stringify(e6));
  797. return te.applyOverrides(i6, t3), i6;
  798. }
  799. function ce(e6, t3, i6, r5, n5) {
  800. let l2 = false, a3 = "";
  801. for (const o5 of e6)
  802. o5.primitiveName === t3 && (o5.value !== void 0 ? a3 += `-${o5.primitiveName}-${o5.propertyName}-${JSON.stringify(o5.value)}` : o5.valueExpressionInfo && (l2 = true));
  803. return r(i6) && typeof i6 == "function" && (l2 = true), r(r5) && typeof r5 == "function" && (l2 = true), r(n5) && typeof n5 == "function" && (l2 = true), [l2, a3];
  804. }
  805. function fe(e6, t3, i6) {
  806. if (e6 && t3)
  807. switch (e6.type) {
  808. case "CIMPointSymbol":
  809. case "CIMLineSymbol":
  810. case "CIMPolygonSymbol": {
  811. const o5 = e6.symbolLayers;
  812. if (!o5)
  813. return;
  814. for (const e7 of o5)
  815. switch (ue(e7, t3, i6), e7.type) {
  816. case "CIMPictureFill":
  817. case "CIMHatchFill":
  818. case "CIMGradientFill":
  819. case "CIMPictureStroke":
  820. case "CIMGradientStroke":
  821. case "CIMCharacterMarker":
  822. case "CIMPictureMarker":
  823. "url" in e7 && e7.url && i6.push(t3.fetchResource(e7.url, null));
  824. break;
  825. case "CIMVectorMarker": {
  826. const o6 = e7.markerGraphics;
  827. if (!o6)
  828. continue;
  829. for (const e8 of o6)
  830. if (e8) {
  831. const o7 = e8.symbol;
  832. o7 && fe(o7, t3, i6);
  833. }
  834. }
  835. }
  836. }
  837. }
  838. }
  839. var me = (e6) => e6 && e6.length === 2 && e6[0].enable && e6[1].enable && e6[0].type === "CIMSolidStroke" && e6[1].type === "CIMSolidFill" && !e6[0].effects && !e6[1].effects;
  840. var pe;
  841. function ue(e6, t3, i6) {
  842. if (!e6.effects || r(t3.geometryEngine))
  843. return;
  844. if (pe)
  845. return void i6.push(pe);
  846. p(e6.effects) && (pe = C2(), i6.push(pe), pe.then((e7) => t3.geometryEngine = e7));
  847. }
  848. export {
  849. f2 as f,
  850. r3 as r,
  851. a2 as a,
  852. s4 as s,
  853. n3 as n,
  854. e5 as e,
  855. o4 as o,
  856. Y,
  857. se
  858. };
  859. //# sourceMappingURL=chunk-54X4RLMR.js.map