objectResourceUtils-KV6RC3N7.js 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644
  1. import {
  2. A as A3,
  3. S as S3,
  4. a as a7,
  5. c as c7,
  6. l as l3
  7. } from "./chunk-KHMWUB3W.js";
  8. import {
  9. R as R2
  10. } from "./chunk-C6RQ734D.js";
  11. import {
  12. X as X2,
  13. i as i8
  14. } from "./chunk-7OWXIDS3.js";
  15. import {
  16. E as E5,
  17. L as L3,
  18. d,
  19. d2,
  20. d3,
  21. e as e15,
  22. e5 as e17,
  23. e7 as e18,
  24. f as f6,
  25. h as h3,
  26. h2 as h4,
  27. i as i7,
  28. i2 as i9,
  29. o3 as o8,
  30. o5 as o10,
  31. o6 as o11,
  32. r as r10,
  33. t2 as t9,
  34. t3 as t10,
  35. u as u5,
  36. x2 as x3
  37. } from "./chunk-VDPG2V67.js";
  38. import {
  39. t as t6
  40. } from "./chunk-W5NACXEJ.js";
  41. import {
  42. C,
  43. W,
  44. _ as _3,
  45. a as a4,
  46. a2 as a6,
  47. c as c6,
  48. e as e14,
  49. h as h5,
  50. n as n9,
  51. o2 as o9,
  52. t as t7
  53. } from "./chunk-LDMWL65U.js";
  54. import {
  55. _ as _2,
  56. n as n11,
  57. x as x2
  58. } from "./chunk-WBWQJQK4.js";
  59. import "./chunk-2UEXES4O.js";
  60. import {
  61. e as e16
  62. } from "./chunk-UUVY36LI.js";
  63. import {
  64. a as a5,
  65. f as f5,
  66. n as n10,
  67. o as o6,
  68. o2 as o7,
  69. t as t8
  70. } from "./chunk-FQZKJNXZ.js";
  71. import "./chunk-L5R6EFI6.js";
  72. import {
  73. n as n8
  74. } from "./chunk-A22ACVMF.js";
  75. import {
  76. v as v2
  77. } from "./chunk-6EMDGCNH.js";
  78. import {
  79. e as e12
  80. } from "./chunk-QHWZYJGI.js";
  81. import {
  82. R,
  83. s as s4
  84. } from "./chunk-6H6IOAKG.js";
  85. import {
  86. e as e11,
  87. f2 as f4,
  88. i as i6,
  89. m,
  90. n2 as n5,
  91. n3 as n6,
  92. n4 as n7,
  93. o as o3,
  94. o3 as o4,
  95. o4 as o5,
  96. r as r7,
  97. r2 as r8,
  98. t as t4,
  99. u as u4
  100. } from "./chunk-3AFXMP6W.js";
  101. import {
  102. E as E4,
  103. n as n4
  104. } from "./chunk-H2VOWDMO.js";
  105. import {
  106. a as a3
  107. } from "./chunk-4HL6BBWO.js";
  108. import {
  109. T
  110. } from "./chunk-AGGGC2FA.js";
  111. import {
  112. O as O4
  113. } from "./chunk-RUM3DXFX.js";
  114. import "./chunk-X6GHUY4U.js";
  115. import "./chunk-4OM3EX6P.js";
  116. import {
  117. D,
  118. E as E3,
  119. G as G2,
  120. I,
  121. L as L2,
  122. M,
  123. O as O3,
  124. P as P2,
  125. V as V2,
  126. Y,
  127. u as u3
  128. } from "./chunk-3OFVLRSL.js";
  129. import {
  130. e2 as e9,
  131. f as f3,
  132. r as r5,
  133. t as t3
  134. } from "./chunk-IRQMHCT3.js";
  135. import {
  136. S as S2
  137. } from "./chunk-MP62QTGD.js";
  138. import {
  139. e as e7
  140. } from "./chunk-44FMXGSC.js";
  141. import {
  142. e as e8
  143. } from "./chunk-XFDO4CMR.js";
  144. import {
  145. e as e6
  146. } from "./chunk-GHN7C53L.js";
  147. import {
  148. E as E2,
  149. L,
  150. O as O2,
  151. c as c4,
  152. i as i3,
  153. u as u2,
  154. x
  155. } from "./chunk-HIELTLML.js";
  156. import {
  157. e as e13,
  158. t as t5
  159. } from "./chunk-IQBIGNPU.js";
  160. import {
  161. l as l2
  162. } from "./chunk-ZCAE6QVH.js";
  163. import "./chunk-K7B6OWCU.js";
  164. import {
  165. c as c5,
  166. i as i5
  167. } from "./chunk-UDYHZLTE.js";
  168. import {
  169. r as r6
  170. } from "./chunk-RWQH5X3O.js";
  171. import {
  172. g as g2,
  173. i as i4
  174. } from "./chunk-O3JQY77G.js";
  175. import "./chunk-E3G7BRZB.js";
  176. import {
  177. e as e10
  178. } from "./chunk-OJ2HHY2O.js";
  179. import {
  180. r as r9
  181. } from "./chunk-GGGVIS2U.js";
  182. import {
  183. A as A2,
  184. c as c3
  185. } from "./chunk-NKMX5M3L.js";
  186. import {
  187. r as r4
  188. } from "./chunk-C7742RNZ.js";
  189. import "./chunk-FZQZIM7U.js";
  190. import {
  191. G,
  192. h as h2
  193. } from "./chunk-VGWC3IKZ.js";
  194. import "./chunk-SWMSD4RP.js";
  195. import {
  196. n as n3
  197. } from "./chunk-O6VYMEIX.js";
  198. import {
  199. b
  200. } from "./chunk-PIFOHNWC.js";
  201. import {
  202. a as a2
  203. } from "./chunk-ZLNEXZAN.js";
  204. import {
  205. c as c2,
  206. i as i2
  207. } from "./chunk-RYY6632W.js";
  208. import {
  209. A,
  210. E,
  211. O,
  212. P,
  213. S,
  214. _,
  215. e as e5,
  216. g,
  217. i,
  218. o as o2,
  219. p,
  220. r as r3,
  221. s as s3,
  222. u,
  223. z
  224. } from "./chunk-DW42UVIT.js";
  225. import {
  226. e as e4,
  227. n as n2,
  228. r as r2,
  229. t as t2
  230. } from "./chunk-TJNOJH33.js";
  231. import "./chunk-YAEIHDJH.js";
  232. import "./chunk-OSHI574D.js";
  233. import {
  234. n
  235. } from "./chunk-Z4JTBD7M.js";
  236. import {
  237. U,
  238. c
  239. } from "./chunk-5DMBXPN2.js";
  240. import "./chunk-QANZ6BFY.js";
  241. import {
  242. V,
  243. X
  244. } from "./chunk-VEGAOVMY.js";
  245. import "./chunk-CXCDYJ5R.js";
  246. import "./chunk-GAOW3WRZ.js";
  247. import "./chunk-QCKFNSN2.js";
  248. import {
  249. e,
  250. l
  251. } from "./chunk-6SOHRC7T.js";
  252. import "./chunk-U2XHEJM7.js";
  253. import "./chunk-SQOPWYIT.js";
  254. import "./chunk-6KZ2LTDA.js";
  255. import {
  256. a,
  257. f as f2,
  258. v,
  259. w
  260. } from "./chunk-V6P2MAQQ.js";
  261. import {
  262. s2 as s,
  263. s3 as s2
  264. } from "./chunk-E5O6P5I2.js";
  265. import {
  266. has
  267. } from "./chunk-SPWQ3AWG.js";
  268. import {
  269. e as e3,
  270. o
  271. } from "./chunk-2TIUKVZN.js";
  272. import {
  273. e as e2,
  274. f,
  275. h,
  276. q,
  277. r,
  278. t
  279. } from "./chunk-YXWMMD76.js";
  280. import "./chunk-S5KM4IGW.js";
  281. // node_modules/@arcgis/core/views/3d/glTF/internal/TextureTransformUtils.js
  282. function c8(c16) {
  283. if (t(c16))
  284. return null;
  285. const m7 = r(c16.offset) ? c16.offset : c5, e20 = r(c16.rotation) ? c16.rotation : 0, i15 = r(c16.scale) ? c16.scale : i5, h9 = t5(1, 0, 0, 0, 1, 0, m7[0], m7[1], 1), u11 = t5(Math.cos(e20), -Math.sin(e20), 0, Math.sin(e20), Math.cos(e20), 0, 0, 0, 1), p4 = t5(i15[0], 0, 0, 0, i15[1], 0, 0, 0, 1), j4 = e13();
  286. return i4(j4, u11, p4), i4(j4, h9, j4), j4;
  287. }
  288. // node_modules/@arcgis/core/views/3d/layers/graphics/ProcessedObjectResource.js
  289. var s5 = class {
  290. constructor(s10, t12, e20, h9, i15) {
  291. this.name = s10, this.stageResources = t12, this.lodThreshold = e20, this.pivotOffset = h9, this.numberOfVertices = i15;
  292. }
  293. };
  294. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/BoundingInfo.js
  295. var a8 = class {
  296. constructor(i15, s10, a10, c16) {
  297. this.primitiveIndices = i15, this._numIndexPerPrimitive = s10, this.indices = a10, this.position = c16, this.center = n2(), this._children = void 0, e12(i15.length >= 1), e12(a10.length % this._numIndexPerPrimitive == 0), e12(a10.length >= i15.length * this._numIndexPerPrimitive), e12(3 === c16.size || 4 === c16.size);
  298. const { data: o14, size: d9 } = c16, l9 = i15.length;
  299. let M6 = d9 * a10[this._numIndexPerPrimitive * i15[0]];
  300. b2.clear(), b2.push(M6), this.bbMin = r2(o14[M6], o14[M6 + 1], o14[M6 + 2]), this.bbMax = t2(this.bbMin);
  301. for (let t12 = 0; t12 < l9; ++t12) {
  302. const s11 = this._numIndexPerPrimitive * i15[t12];
  303. for (let i16 = 0; i16 < this._numIndexPerPrimitive; ++i16) {
  304. M6 = d9 * a10[s11 + i16], b2.push(M6);
  305. let t13 = o14[M6];
  306. this.bbMin[0] = Math.min(t13, this.bbMin[0]), this.bbMax[0] = Math.max(t13, this.bbMax[0]), t13 = o14[M6 + 1], this.bbMin[1] = Math.min(t13, this.bbMin[1]), this.bbMax[1] = Math.max(t13, this.bbMax[1]), t13 = o14[M6 + 2], this.bbMin[2] = Math.min(t13, this.bbMin[2]), this.bbMax[2] = Math.max(t13, this.bbMax[2]);
  307. }
  308. }
  309. A(this.center, this.bbMin, this.bbMax, 0.5), this.radius = 0.5 * Math.max(Math.max(this.bbMax[0] - this.bbMin[0], this.bbMax[1] - this.bbMin[1]), this.bbMax[2] - this.bbMin[2]);
  310. let m7 = this.radius * this.radius;
  311. for (let t12 = 0; t12 < b2.length; ++t12) {
  312. M6 = b2.getItemAt(t12);
  313. const i16 = o14[M6] - this.center[0], s11 = o14[M6 + 1] - this.center[1], e20 = o14[M6 + 2] - this.center[2], n13 = i16 * i16 + s11 * s11 + e20 * e20;
  314. if (n13 <= m7)
  315. continue;
  316. const r11 = Math.sqrt(n13), h9 = 0.5 * (r11 - this.radius);
  317. this.radius = this.radius + h9, m7 = this.radius * this.radius;
  318. const a11 = h9 / r11;
  319. this.center[0] += i16 * a11, this.center[1] += s11 * a11, this.center[2] += e20 * a11;
  320. }
  321. b2.clear();
  322. }
  323. getCenter() {
  324. return this.center;
  325. }
  326. getBSRadius() {
  327. return this.radius;
  328. }
  329. getBBMin() {
  330. return this.bbMin;
  331. }
  332. getBBMax() {
  333. return this.bbMax;
  334. }
  335. getChildren() {
  336. if (this._children)
  337. return this._children;
  338. if (p(this.bbMin, this.bbMax) > 1) {
  339. const i15 = A(n2(), this.bbMin, this.bbMax, 0.5), s10 = this.primitiveIndices.length, n13 = new Uint8Array(s10), r11 = new Array(8);
  340. for (let t12 = 0; t12 < 8; ++t12)
  341. r11[t12] = 0;
  342. const { data: h9, size: b5 } = this.position;
  343. for (let t12 = 0; t12 < s10; ++t12) {
  344. let s11 = 0;
  345. const e20 = this._numIndexPerPrimitive * this.primitiveIndices[t12];
  346. let a10 = b5 * this.indices[e20], c17 = h9[a10], o15 = h9[a10 + 1], d9 = h9[a10 + 2];
  347. for (let i16 = 1; i16 < this._numIndexPerPrimitive; ++i16) {
  348. a10 = b5 * this.indices[e20 + i16];
  349. const t13 = h9[a10], s12 = h9[a10 + 1], n14 = h9[a10 + 2];
  350. t13 < c17 && (c17 = t13), s12 < o15 && (o15 = s12), n14 < d9 && (d9 = n14);
  351. }
  352. c17 < i15[0] && (s11 |= 1), o15 < i15[1] && (s11 |= 2), d9 < i15[2] && (s11 |= 4), n13[t12] = s11, ++r11[s11];
  353. }
  354. let c16 = 0;
  355. for (let t12 = 0; t12 < 8; ++t12)
  356. r11[t12] > 0 && ++c16;
  357. if (c16 < 2)
  358. return;
  359. const o14 = new Array(8);
  360. for (let t12 = 0; t12 < 8; ++t12)
  361. o14[t12] = r11[t12] > 0 ? new Uint32Array(r11[t12]) : void 0;
  362. for (let t12 = 0; t12 < 8; ++t12)
  363. r11[t12] = 0;
  364. for (let t12 = 0; t12 < s10; ++t12) {
  365. const i16 = n13[t12];
  366. o14[i16][r11[i16]++] = this.primitiveIndices[t12];
  367. }
  368. this._children = new Array(8);
  369. for (let t12 = 0; t12 < 8; ++t12)
  370. void 0 !== o14[t12] && (this._children[t12] = new a8(o14[t12], this._numIndexPerPrimitive, this.indices, this.position));
  371. }
  372. return this._children;
  373. }
  374. static prune() {
  375. b2.prune();
  376. }
  377. };
  378. var b2 = new l({ deallocator: null });
  379. // node_modules/@arcgis/core/geometry/support/triangle.js
  380. function j(t12) {
  381. return t12 ? { p0: t2(t12.p0), p1: t2(t12.p1), p2: t2(t12.p2) } : { p0: n2(), p1: n2(), p2: n2() };
  382. }
  383. function w2(t12, n13, o14) {
  384. return e5(O5, n13, t12), e5(V3, o14, t12), s3(_(O5, O5, V3)) / 2;
  385. }
  386. var M3 = new s4(v2);
  387. var x4 = new s4(() => j());
  388. var O5 = n2();
  389. var V3 = n2();
  390. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/geometryDataUtils.js
  391. function c10(o14, r11, c16) {
  392. if (!o14 || !r11)
  393. return false;
  394. const { size: a10, data: f9 } = o14;
  395. o2(c16, 0, 0, 0), o2(g3, 0, 0, 0);
  396. let m7 = 0, h9 = 0;
  397. for (let p4 = 0; p4 < r11.length - 2; p4 += 3) {
  398. const o15 = r11[p4 + 0] * a10, j4 = r11[p4 + 1] * a10, d9 = r11[p4 + 2] * a10;
  399. o2(i10, f9[o15 + 0], f9[o15 + 1], f9[o15 + 2]), o2(u6, f9[j4 + 0], f9[j4 + 1], f9[j4 + 2]), o2(l4, f9[d9 + 0], f9[d9 + 1], f9[d9 + 2]);
  400. const z4 = w2(i10, u6, l4);
  401. z4 ? (u(i10, i10, u6), u(i10, i10, l4), g(i10, i10, 1 / 3 * z4), u(c16, c16, i10), m7 += z4) : (u(g3, g3, i10), u(g3, g3, u6), u(g3, g3, l4), h9 += 3);
  402. }
  403. return (0 !== h9 || 0 !== m7) && (0 !== m7 ? (g(c16, c16, 1 / m7), true) : 0 !== h9 && (g(c16, g3, 1 / h9), true));
  404. }
  405. function a9(n13, o14, r11) {
  406. if (!n13 || !o14)
  407. return false;
  408. const { size: s10, data: c16 } = n13;
  409. o2(r11, 0, 0, 0);
  410. let a10 = -1, f9 = 0;
  411. for (let t12 = 0; t12 < o14.length; t12++) {
  412. const n14 = o14[t12] * s10;
  413. a10 !== n14 && (r11[0] += c16[n14 + 0], r11[1] += c16[n14 + 1], r11[2] += c16[n14 + 2], f9++), a10 = n14;
  414. }
  415. return f9 > 1 && g(r11, r11, 1 / f9), f9 > 0;
  416. }
  417. var i10 = n2();
  418. var u6 = n2();
  419. var l4 = n2();
  420. var g3 = n2();
  421. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/Geometry.js
  422. var d4 = class extends r10 {
  423. constructor(t12, i15 = [], n13 = a4.Triangle, r11 = null, o14 = -1) {
  424. super(), this._primitiveType = n13, this.objectAndLayerIdColor = r11, this.edgeIndicesLength = o14, this.type = e15.Geometry, this._vertexAttributes = /* @__PURE__ */ new Map(), this._indices = /* @__PURE__ */ new Map(), this._boundingInfo = null;
  425. for (const [e20, s10] of t12)
  426. s10 && this._vertexAttributes.set(e20, { ...s10 });
  427. if (null == i15 || 0 === i15.length) {
  428. const t13 = l5(this._vertexAttributes), e20 = u4(t13);
  429. this.edgeIndicesLength = this.edgeIndicesLength < 0 ? t13 : this.edgeIndicesLength;
  430. for (const i16 of this._vertexAttributes.keys())
  431. this._indices.set(i16, e20);
  432. } else
  433. for (const [e20, s10] of i15)
  434. s10 && (this._indices.set(e20, n7(s10)), e20 === O4.POSITION && (this.edgeIndicesLength = this.edgeIndicesLength < 0 ? this._indices.get(e20).length : this.edgeIndicesLength));
  435. }
  436. cloneShallow() {
  437. const t12 = new d4([], void 0, this._primitiveType, this.objectAndLayerIdColor, void 0), { _vertexAttributes: e20, _indices: i15 } = t12;
  438. return this._vertexAttributes.forEach((t13, i16) => e20.set(i16, t13)), this._indices.forEach((t13, e21) => i15.set(e21, t13)), t12.screenToWorldRatio = this.screenToWorldRatio, t12._boundingInfo = this._boundingInfo, t12;
  439. }
  440. get vertexAttributes() {
  441. return this._vertexAttributes;
  442. }
  443. getMutableAttribute(t12) {
  444. const e20 = this._vertexAttributes.get(t12);
  445. return e20 && !e20.exclusive && (e20.data = Array.from(e20.data), e20.exclusive = true), e20;
  446. }
  447. get indices() {
  448. return this._indices;
  449. }
  450. get indexCount() {
  451. const t12 = this._indices.values().next().value;
  452. return t12 ? t12.length : 0;
  453. }
  454. get primitiveType() {
  455. return this._primitiveType;
  456. }
  457. get faceCount() {
  458. return this.indexCount / 3;
  459. }
  460. get boundingInfo() {
  461. return t(this._boundingInfo) && (this._boundingInfo = this._calculateBoundingInfo()), this._boundingInfo;
  462. }
  463. computeAttachmentOrigin(t12) {
  464. return this.primitiveType === a4.Triangle ? this._computeAttachmentOriginTriangles(t12) : this._computeAttachmentOriginPoints(t12);
  465. }
  466. _computeAttachmentOriginTriangles(t12) {
  467. const e20 = this.indices.get(O4.POSITION), i15 = this.vertexAttributes.get(O4.POSITION);
  468. return c10(i15, e20, t12);
  469. }
  470. _computeAttachmentOriginPoints(t12) {
  471. const e20 = this.indices.get(O4.POSITION), i15 = this.vertexAttributes.get(O4.POSITION);
  472. return a9(i15, e20, t12);
  473. }
  474. invalidateBoundingInfo() {
  475. this._boundingInfo = null;
  476. }
  477. _calculateBoundingInfo() {
  478. const t12 = this.indices.get(O4.POSITION);
  479. if (!t12 || 0 === t12.length)
  480. return null;
  481. const n13 = this.primitiveType === a4.Triangle ? 3 : 1;
  482. e12(t12.length % n13 == 0, "Indexing error: " + t12.length + " not divisible by " + n13);
  483. const s10 = u4(t12.length / n13), r11 = this.vertexAttributes.get(O4.POSITION);
  484. return r11 ? new a8(s10, n13, t12, r11) : null;
  485. }
  486. };
  487. function l5(t12) {
  488. const e20 = t12.values().next().value;
  489. return null == e20 ? 0 : e20.data.length / e20.size;
  490. }
  491. // node_modules/@arcgis/core/chunks/TextureOnly.glsl.js
  492. var i11 = class extends t8 {
  493. constructor() {
  494. super(...arguments), this.color = r4(1, 1, 1, 1);
  495. }
  496. };
  497. function l6() {
  498. const e20 = new o7();
  499. return e20.include(o6), e20.fragment.uniforms.add([new f5("tex", (e21) => e21.texture), new e16("uColor", (e21) => e21.color)]), e20.fragment.code.add(n10`void main() {
  500. vec4 texColor = texture2D(tex, uv);
  501. gl_FragColor = texColor * uColor;
  502. }`), e20;
  503. }
  504. var d5 = Object.freeze(Object.defineProperty({ __proto__: null, TextureOnlyPassParameters: i11, build: l6 }, Symbol.toStringTag, { value: "Module" }));
  505. // node_modules/@arcgis/core/libs/basisu/BasisU.js
  506. function s6() {
  507. if (t(i12)) {
  508. const t12 = (t13) => a2(`esri/libs/basisu/${t13}`);
  509. i12 = import("./basis_transcoder-NDVUP4EN.js").then((e20) => e20.b).then(({ default: e20 }) => e20({ locateFile: t12 }).then((e21) => (e21.initializeBasis(), delete e21.then, e21)));
  510. }
  511. return i12;
  512. }
  513. var i12;
  514. // node_modules/@arcgis/core/libs/basisu/TextureFormat.js
  515. var _4;
  516. !function(_8) {
  517. _8[_8.ETC1_RGB = 0] = "ETC1_RGB", _8[_8.ETC2_RGBA = 1] = "ETC2_RGBA", _8[_8.BC1_RGB = 2] = "BC1_RGB", _8[_8.BC3_RGBA = 3] = "BC3_RGBA", _8[_8.BC4_R = 4] = "BC4_R", _8[_8.BC5_RG = 5] = "BC5_RG", _8[_8.BC7_M6_RGB = 6] = "BC7_M6_RGB", _8[_8.BC7_M5_RGBA = 7] = "BC7_M5_RGBA", _8[_8.PVRTC1_4_RGB = 8] = "PVRTC1_4_RGB", _8[_8.PVRTC1_4_RGBA = 9] = "PVRTC1_4_RGBA", _8[_8.ASTC_4x4_RGBA = 10] = "ASTC_4x4_RGBA", _8[_8.ATC_RGB = 11] = "ATC_RGB", _8[_8.ATC_RGBA = 12] = "ATC_RGBA", _8[_8.FXT1_RGB = 17] = "FXT1_RGB", _8[_8.PVRTC2_4_RGB = 18] = "PVRTC2_4_RGB", _8[_8.PVRTC2_4_RGBA = 19] = "PVRTC2_4_RGBA", _8[_8.ETC2_EAC_R11 = 20] = "ETC2_EAC_R11", _8[_8.ETC2_EAC_RG11 = 21] = "ETC2_EAC_RG11", _8[_8.RGBA32 = 13] = "RGBA32", _8[_8.RGB565 = 14] = "RGB565", _8[_8.BGR565 = 15] = "BGR565", _8[_8.RGBA4444 = 16] = "RGBA4444";
  518. }(_4 || (_4 = {}));
  519. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/BasisUtil.js
  520. var g4 = null;
  521. var l7 = null;
  522. async function c11() {
  523. return t(l7) && (l7 = s6(), g4 = await l7), l7;
  524. }
  525. function u7(t12, n13) {
  526. if (t(g4))
  527. return t12.byteLength;
  528. const r11 = new g4.BasisFile(new Uint8Array(t12)), s10 = T2(r11) ? E6(r11.getNumLevels(0), r11.getHasAlpha(), r11.getImageWidth(0, 0), r11.getImageHeight(0, 0), n13) : 0;
  529. return r11.close(), r11.delete(), s10;
  530. }
  531. function m3(t12, n13) {
  532. if (t(g4))
  533. return t12.byteLength;
  534. const r11 = new g4.KTX2File(new Uint8Array(t12)), s10 = _5(r11) ? E6(r11.getLevels(), r11.getHasAlpha(), r11.getWidth(), r11.getHeight(), n13) : 0;
  535. return r11.close(), r11.delete(), s10;
  536. }
  537. function E6(e20, t12, n13, s10, i15) {
  538. const a10 = _2(t12 ? u3.COMPRESSED_RGBA8_ETC2_EAC : u3.COMPRESSED_RGB8_ETC2), g8 = i15 && e20 > 1 ? (4 ** e20 - 1) / (3 * 4 ** (e20 - 1)) : 1;
  539. return Math.ceil(n13 * s10 * a10 * g8);
  540. }
  541. function T2(e20) {
  542. return e20.getNumImages() >= 1 && !e20.isUASTC();
  543. }
  544. function _5(e20) {
  545. return e20.getFaces() >= 1 && e20.isETC1S();
  546. }
  547. async function h6(t12, n13, r11) {
  548. t(g4) && (g4 = await c11());
  549. const s10 = new g4.BasisFile(new Uint8Array(r11));
  550. if (!T2(s10))
  551. return null;
  552. s10.startTranscoding();
  553. const i15 = p2(t12, n13, s10.getNumLevels(0), s10.getHasAlpha(), s10.getImageWidth(0, 0), s10.getImageHeight(0, 0), (e20, t13) => s10.getImageTranscodedSizeInBytes(0, e20, t13), (e20, t13, n14) => s10.transcodeImage(n14, 0, e20, t13, 0, 0));
  554. return s10.close(), s10.delete(), i15;
  555. }
  556. async function A4(t12, n13, r11) {
  557. t(g4) && (g4 = await c11());
  558. const s10 = new g4.KTX2File(new Uint8Array(r11));
  559. if (!_5(s10))
  560. return null;
  561. s10.startTranscoding();
  562. const i15 = p2(t12, n13, s10.getLevels(), s10.getHasAlpha(), s10.getWidth(), s10.getHeight(), (e20, t13) => s10.getImageTranscodedSizeInBytes(e20, 0, 0, t13), (e20, t13, n14) => s10.transcodeImage(n14, e20, 0, 0, t13, 0, -1, -1));
  563. return s10.close(), s10.delete(), i15;
  564. }
  565. function p2(e20, t12, o14, g8, l9, c16, u11, m7) {
  566. const { compressedTextureETC: E10, compressedTextureS3TC: T6 } = e20.capabilities, [_8, h9] = E10 ? g8 ? [_4.ETC2_RGBA, u3.COMPRESSED_RGBA8_ETC2_EAC] : [_4.ETC1_RGB, u3.COMPRESSED_RGB8_ETC2] : T6 ? g8 ? [_4.BC3_RGBA, u3.COMPRESSED_RGBA_S3TC_DXT5_EXT] : [_4.BC1_RGB, u3.COMPRESSED_RGB_S3TC_DXT1_EXT] : [_4.RGBA32, P2.RGBA], A7 = t12.hasMipmap ? o14 : Math.min(1, o14), p4 = [];
  567. for (let n13 = 0; n13 < A7; n13++)
  568. p4.push(new Uint8Array(u11(n13, _8))), m7(n13, _8, p4[n13]);
  569. const C4 = p4.length > 1, d9 = C4 ? L2.LINEAR_MIPMAP_LINEAR : L2.LINEAR, R4 = { ...t12, samplingMode: d9, hasMipmap: C4, internalFormat: h9, width: l9, height: c16 };
  570. return new E4(e20, R4, { type: "compressed", levels: p4 });
  571. }
  572. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/DDSUtil.js
  573. var i13 = s.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");
  574. var s7 = 542327876;
  575. var l8 = 131072;
  576. var m4 = 4;
  577. function u8(e20) {
  578. return e20.charCodeAt(0) + (e20.charCodeAt(1) << 8) + (e20.charCodeAt(2) << 16) + (e20.charCodeAt(3) << 24);
  579. }
  580. function c12(e20) {
  581. return String.fromCharCode(255 & e20, e20 >> 8 & 255, e20 >> 16 & 255, e20 >> 24 & 255);
  582. }
  583. var h7 = u8("DXT1");
  584. var p3 = u8("DXT3");
  585. var d6 = u8("DXT5");
  586. var g5 = 31;
  587. var f7 = 0;
  588. var C2 = 1;
  589. var w3 = 2;
  590. var D2 = 3;
  591. var _6 = 4;
  592. var T3 = 7;
  593. var A5 = 20;
  594. var E7 = 21;
  595. function S4(e20, r11, n13) {
  596. var _a;
  597. const { textureData: i15, internalFormat: s10, width: l9, height: m7 } = f(M4(n13, (_a = r11.hasMipmap) != null ? _a : false));
  598. return r11.samplingMode = i15.levels.length > 1 ? L2.LINEAR_MIPMAP_LINEAR : L2.LINEAR, r11.hasMipmap = i15.levels.length > 1, r11.internalFormat = s10, r11.width = l9, r11.height = m7, new E4(e20, r11, i15);
  599. }
  600. function M4(e20, t12) {
  601. const o14 = new Int32Array(e20, 0, g5);
  602. if (o14[f7] !== s7)
  603. return i13.error("Invalid magic number in DDS header"), null;
  604. if (!(o14[A5] & m4))
  605. return i13.error("Unsupported format, must contain a FourCC code"), null;
  606. const a10 = o14[E7];
  607. let u11, S7;
  608. switch (a10) {
  609. case h7:
  610. u11 = 8, S7 = u3.COMPRESSED_RGB_S3TC_DXT1_EXT;
  611. break;
  612. case p3:
  613. u11 = 16, S7 = u3.COMPRESSED_RGBA_S3TC_DXT3_EXT;
  614. break;
  615. case d6:
  616. u11 = 16, S7 = u3.COMPRESSED_RGBA_S3TC_DXT5_EXT;
  617. break;
  618. default:
  619. return i13.error("Unsupported FourCC code:", c12(a10)), null;
  620. }
  621. let M6 = 1, R4 = o14[_6], b5 = o14[D2];
  622. 0 == (3 & R4) && 0 == (3 & b5) || (i13.warn("Rounding up compressed texture size to nearest multiple of 4."), R4 = R4 + 3 & -4, b5 = b5 + 3 & -4);
  623. const x6 = R4, X3 = b5;
  624. let I4, j4;
  625. o14[w3] & l8 && false !== t12 && (M6 = Math.max(1, o14[T3])), 1 === M6 || c2(R4) && c2(b5) || (i13.warn("Ignoring mipmaps of non power of two sized compressed texture."), M6 = 1);
  626. let v5 = o14[C2] + 4;
  627. const F = [];
  628. for (let r11 = 0; r11 < M6; ++r11)
  629. j4 = (R4 + 3 >> 2) * (b5 + 3 >> 2) * u11, I4 = new Uint8Array(e20, v5, j4), F.push(I4), v5 += j4, R4 = Math.max(1, R4 >> 1), b5 = Math.max(1, b5 >> 1);
  630. return { textureData: { type: "compressed", levels: F }, internalFormat: S7, width: x6, height: X3 };
  631. }
  632. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/Texture.js
  633. var L4 = class extends r10 {
  634. constructor(t12, e20) {
  635. super(), this._data = t12, this.type = e15.Texture, this._glTexture = null, this._powerOfTwoStretchInfo = null, this._loadingPromise = null, this._loadingController = null, this.events = new n(), this._passParameters = new i11(), this.params = e20 || {}, this.params.mipmap = false !== this.params.mipmap, this.params.noUnpackFlip = this.params.noUnpackFlip || false, this.params.preMultiplyAlpha = this.params.preMultiplyAlpha || false, this.params.wrap = this.params.wrap || { s: D.REPEAT, t: D.REPEAT }, this.params.powerOfTwoResizeMode = this.params.powerOfTwoResizeMode || c6.STRETCH, this.estimatedTexMemRequired = L4._estimateTexMemRequired(this._data, this.params), this._startPreload();
  636. }
  637. _startPreload() {
  638. const t12 = this._data;
  639. t(t12) || (t12 instanceof HTMLVideoElement ? this._startPreloadVideoElement(t12) : t12 instanceof HTMLImageElement && this._startPreloadImageElement(t12));
  640. }
  641. _startPreloadVideoElement(t12) {
  642. if (!(V(t12.src) || "auto" === t12.preload && t12.crossOrigin)) {
  643. t12.preload = "auto", t12.crossOrigin = "anonymous";
  644. const e20 = !t12.paused;
  645. if (t12.src = t12.src, e20 && t12.autoplay) {
  646. const e21 = () => {
  647. t12.removeEventListener("canplay", e21), t12.play();
  648. };
  649. t12.addEventListener("canplay", e21);
  650. }
  651. }
  652. }
  653. _startPreloadImageElement(t12) {
  654. X(t12.src) || V(t12.src) || t12.crossOrigin || (t12.crossOrigin = "anonymous", t12.src = t12.src);
  655. }
  656. static _getDataDimensions(t12) {
  657. return t12 instanceof HTMLVideoElement ? { width: t12.videoWidth, height: t12.videoHeight } : t12;
  658. }
  659. static _estimateTexMemRequired(t12, e20) {
  660. if (t(t12))
  661. return 0;
  662. if (o(t12) || e3(t12))
  663. return e20.encoding === L4.KTX2_ENCODING ? m3(t12, e20.mipmap) : e20.encoding === L4.BASIS_ENCODING ? u7(t12, e20.mipmap) : t12.byteLength;
  664. const { width: r11, height: i15 } = t12 instanceof Image || t12 instanceof ImageData || t12 instanceof HTMLCanvasElement || t12 instanceof HTMLVideoElement ? L4._getDataDimensions(t12) : e20;
  665. return (e20.mipmap ? 4 / 3 : 1) * r11 * i15 * (e20.components || 4) || 0;
  666. }
  667. dispose() {
  668. this._data = void 0;
  669. }
  670. get width() {
  671. return this.params.width;
  672. }
  673. get height() {
  674. return this.params.height;
  675. }
  676. _createDescriptor(t12) {
  677. var _a;
  678. return { target: M.TEXTURE_2D, pixelFormat: P2.RGBA, dataType: G2.UNSIGNED_BYTE, wrapMode: this.params.wrap, flipped: !this.params.noUnpackFlip, samplingMode: this.params.mipmap ? L2.LINEAR_MIPMAP_LINEAR : L2.LINEAR, hasMipmap: this.params.mipmap, preMultiplyAlpha: this.params.preMultiplyAlpha, maxAnisotropy: (_a = this.params.maxAnisotropy) != null ? _a : this.params.mipmap ? t12.parameters.maxMaxAnisotropy : 1 };
  679. }
  680. get glTexture() {
  681. return this._glTexture;
  682. }
  683. load(t12, e20) {
  684. if (r(this._glTexture))
  685. return this._glTexture;
  686. if (r(this._loadingPromise))
  687. return this._loadingPromise;
  688. const r11 = this._data;
  689. return t(r11) ? (this._glTexture = new E4(t12, this._createDescriptor(t12), null), this._glTexture) : "string" == typeof r11 ? this._loadFromURL(t12, e20, r11) : r11 instanceof Image ? this._loadFromImageElement(t12, e20, r11) : r11 instanceof HTMLVideoElement ? this._loadFromVideoElement(t12, e20, r11) : r11 instanceof ImageData || r11 instanceof HTMLCanvasElement ? this._loadFromImage(t12, r11, e20) : (o(r11) || e3(r11)) && this.params.encoding === L4.DDS_ENCODING ? (this._data = void 0, this._loadFromDDSData(t12, r11)) : (o(r11) || e3(r11)) && this.params.encoding === L4.KTX2_ENCODING ? (this._data = void 0, this._loadFromKTX2(t12, r11)) : (o(r11) || e3(r11)) && this.params.encoding === L4.BASIS_ENCODING ? (this._data = void 0, this._loadFromBasis(t12, r11)) : e3(r11) ? this._loadFromPixelData(t12, r11) : o(r11) ? this._loadFromPixelData(t12, new Uint8Array(r11)) : null;
  690. }
  691. get requiresFrameUpdates() {
  692. return this._data instanceof HTMLVideoElement;
  693. }
  694. frameUpdate(t12, e20, r11) {
  695. if (!(this._data instanceof HTMLVideoElement) || t(this._glTexture))
  696. return r11;
  697. if (this._data.readyState < G3.HAVE_CURRENT_DATA || r11 === this._data.currentTime)
  698. return r11;
  699. if (r(this._powerOfTwoStretchInfo)) {
  700. const { framebuffer: r12, vao: i15, sourceTexture: s10 } = this._powerOfTwoStretchInfo;
  701. s10.setData(this._data), this._drawStretchedTexture(t12, e20, r12, i15, s10, this._glTexture);
  702. } else {
  703. const { videoWidth: t13, videoHeight: e21 } = this._data, { width: r12, height: i15 } = this._glTexture.descriptor;
  704. t13 !== r12 || e21 !== i15 ? this._glTexture.updateData(0, 0, 0, Math.min(t13, r12), Math.min(e21, i15), this._data) : this._glTexture.setData(this._data);
  705. }
  706. return this._glTexture.descriptor.hasMipmap && this._glTexture.generateMipmap(), this.params.updateCallback && this.params.updateCallback(), this._data.currentTime;
  707. }
  708. _loadFromDDSData(t12, e20) {
  709. return this._glTexture = S4(t12, this._createDescriptor(t12), e20), this._glTexture;
  710. }
  711. _loadFromKTX2(t12, e20) {
  712. return this._loadAsync(() => A4(t12, this._createDescriptor(t12), e20).then((t13) => (this._glTexture = t13, t13)));
  713. }
  714. _loadFromBasis(t12, e20) {
  715. return this._loadAsync(() => h6(t12, this._createDescriptor(t12), e20).then((t13) => (this._glTexture = t13, t13)));
  716. }
  717. _loadFromPixelData(t12, e20) {
  718. e12(this.params.width > 0 && this.params.height > 0);
  719. const r11 = this._createDescriptor(t12);
  720. return r11.pixelFormat = 1 === this.params.components ? P2.LUMINANCE : 3 === this.params.components ? P2.RGB : P2.RGBA, r11.width = this.params.width, r11.height = this.params.height, this._glTexture = new E4(t12, r11, e20), this._glTexture;
  721. }
  722. _loadFromURL(t12, e20, r11) {
  723. return this._loadAsync(async (i15) => {
  724. const s10 = await t6(r11, { signal: i15 });
  725. return f2(i15), this._loadFromImage(t12, s10, e20);
  726. });
  727. }
  728. _loadFromImageElement(t12, e20, r11) {
  729. return r11.complete ? this._loadFromImage(t12, r11, e20) : this._loadAsync(async (i15) => {
  730. const s10 = await c(r11, r11.src, false, i15);
  731. return f2(i15), this._loadFromImage(t12, s10, e20);
  732. });
  733. }
  734. _loadFromVideoElement(t12, e20, r11) {
  735. return r11.readyState >= G3.HAVE_CURRENT_DATA ? this._loadFromImage(t12, r11, e20) : this._loadFromVideoElementAsync(t12, e20, r11);
  736. }
  737. _loadFromVideoElementAsync(t12, r11, i15) {
  738. return this._loadAsync((s10) => new Promise((a10, o14) => {
  739. const m7 = () => {
  740. i15.removeEventListener("loadeddata", p4), i15.removeEventListener("error", d9), h(_8);
  741. }, p4 = () => {
  742. i15.readyState >= G3.HAVE_CURRENT_DATA && (m7(), a10(this._loadFromImage(t12, i15, r11)));
  743. }, d9 = (t13) => {
  744. m7(), o14(t13 || new s2("Failed to load video"));
  745. };
  746. i15.addEventListener("loadeddata", p4), i15.addEventListener("error", d9);
  747. const _8 = v(s10, () => d9(a()));
  748. }));
  749. }
  750. _loadFromImage(t12, e20, r11) {
  751. const s10 = L4._getDataDimensions(e20);
  752. this.params.width = s10.width, this.params.height = s10.height;
  753. const a10 = this._createDescriptor(t12);
  754. return a10.pixelFormat = 3 === this.params.components ? P2.RGB : P2.RGBA, !this._requiresPowerOfTwo(t12, a10) || c2(s10.width) && c2(s10.height) ? (a10.width = s10.width, a10.height = s10.height, this._glTexture = new E4(t12, a10, e20), this._glTexture) : (this._glTexture = this._makePowerOfTwoTexture(t12, e20, s10, a10, r11), this._glTexture);
  755. }
  756. _loadAsync(t12) {
  757. const e20 = new AbortController();
  758. this._loadingController = e20;
  759. const r11 = t12(e20.signal);
  760. this._loadingPromise = r11;
  761. const i15 = () => {
  762. this._loadingController === e20 && (this._loadingController = null), this._loadingPromise === r11 && (this._loadingPromise = null);
  763. };
  764. return r11.then(i15, i15), r11;
  765. }
  766. _requiresPowerOfTwo(t12, e20) {
  767. const r11 = D.CLAMP_TO_EDGE, i15 = "number" == typeof e20.wrapMode ? e20.wrapMode === r11 : e20.wrapMode.s === r11 && e20.wrapMode.t === r11;
  768. return !n4(t12.gl) && (e20.hasMipmap || !i15);
  769. }
  770. _makePowerOfTwoTexture(e20, r11, i15, a10, o14) {
  771. const { width: n13, height: m7 } = i15, h9 = i2(n13), l9 = i2(m7);
  772. let p4;
  773. switch (a10.width = h9, a10.height = l9, this.params.powerOfTwoResizeMode) {
  774. case c6.PAD:
  775. a10.textureCoordinateScaleFactor = [n13 / h9, m7 / l9], p4 = new E4(e20, a10), p4.updateData(0, 0, 0, n13, m7, r11);
  776. break;
  777. case c6.STRETCH:
  778. case null:
  779. case void 0:
  780. p4 = this._stretchToPowerOfTwo(e20, r11, a10, o14());
  781. break;
  782. default:
  783. n3(this.params.powerOfTwoResizeMode);
  784. }
  785. return a10.hasMipmap && p4.generateMipmap(), p4;
  786. }
  787. _stretchToPowerOfTwo(t12, e20, r11, i15) {
  788. const s10 = new E4(t12, r11), a10 = new x2(t12, { colorTarget: Y.TEXTURE, depthStencilTarget: V2.NONE }, s10), o14 = new E4(t12, { target: M.TEXTURE_2D, pixelFormat: r11.pixelFormat, dataType: G2.UNSIGNED_BYTE, wrapMode: D.CLAMP_TO_EDGE, samplingMode: L2.LINEAR, flipped: !!r11.flipped, maxAnisotropy: 8, preMultiplyAlpha: r11.preMultiplyAlpha }, e20), n13 = u5(t12), m7 = t12.getBoundFramebufferObject();
  789. return this._drawStretchedTexture(t12, i15, a10, n13, o14, s10), this.requiresFrameUpdates ? this._powerOfTwoStretchInfo = { vao: n13, sourceTexture: o14, framebuffer: a10 } : (n13.dispose(true), o14.dispose(), a10.detachColorTexture(), a10.dispose()), t12.bindFramebuffer(m7), s10;
  790. }
  791. _drawStretchedTexture(t12, e20, r11, i15, s10, a10) {
  792. this._passParameters.texture = s10, t12.bindFramebuffer(r11);
  793. const o14 = t12.getViewport();
  794. t12.setViewport(0, 0, a10.descriptor.width, a10.descriptor.height), t12.bindTechnique(e20, this._passParameters, null), t12.bindVAO(i15), t12.drawArrays(E3.TRIANGLE_STRIP, 0, n11(i15, "geometry")), t12.bindFramebuffer(null), t12.setViewport(o14.x, o14.y, o14.width, o14.height), this._passParameters.texture = null;
  795. }
  796. unload() {
  797. if (r(this._powerOfTwoStretchInfo)) {
  798. const { framebuffer: t12, vao: e20, sourceTexture: r11 } = this._powerOfTwoStretchInfo;
  799. e20.dispose(true), r11.dispose(), t12.dispose(), this._glTexture = null, this._powerOfTwoStretchInfo = null;
  800. }
  801. if (r(this._glTexture) && (this._glTexture.dispose(), this._glTexture = null), r(this._loadingController)) {
  802. const t12 = this._loadingController;
  803. this._loadingController = null, this._loadingPromise = null, t12.abort();
  804. }
  805. this.events.emit("unloaded");
  806. }
  807. };
  808. var G3;
  809. L4.DDS_ENCODING = "image/vnd-ms.dds", L4.KTX2_ENCODING = "image/ktx2", L4.BASIS_ENCODING = "image/x.basis", function(t12) {
  810. t12[t12.HAVE_NOTHING = 0] = "HAVE_NOTHING", t12[t12.HAVE_METADATA = 1] = "HAVE_METADATA", t12[t12.HAVE_CURRENT_DATA = 2] = "HAVE_CURRENT_DATA", t12[t12.HAVE_FUTURE_DATA = 3] = "HAVE_FUTURE_DATA", t12[t12.HAVE_ENOUGH_DATA = 4] = "HAVE_ENOUGH_DATA";
  811. }(G3 || (G3 = {}));
  812. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/RenderSlot.js
  813. var E8;
  814. !function(E10) {
  815. E10[E10.INTEGRATED_MESH = 0] = "INTEGRATED_MESH", E10[E10.OPAQUE_TERRAIN = 1] = "OPAQUE_TERRAIN", E10[E10.OPAQUE_MATERIAL = 2] = "OPAQUE_MATERIAL", E10[E10.TRANSPARENT_MATERIAL = 3] = "TRANSPARENT_MATERIAL", E10[E10.TRANSPARENT_TERRAIN = 4] = "TRANSPARENT_TERRAIN", E10[E10.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL = 5] = "TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL", E10[E10.OCCLUDED_TERRAIN = 6] = "OCCLUDED_TERRAIN", E10[E10.OCCLUDER_MATERIAL = 7] = "OCCLUDER_MATERIAL", E10[E10.TRANSPARENT_OCCLUDER_MATERIAL = 8] = "TRANSPARENT_OCCLUDER_MATERIAL", E10[E10.OCCLUSION_PIXELS = 9] = "OCCLUSION_PIXELS", E10[E10.POSTPROCESSING_ENVIRONMENT_OPAQUE = 10] = "POSTPROCESSING_ENVIRONMENT_OPAQUE", E10[E10.POSTPROCESSING_ENVIRONMENT_TRANSPARENT = 11] = "POSTPROCESSING_ENVIRONMENT_TRANSPARENT", E10[E10.LASERLINES = 12] = "LASERLINES", E10[E10.LASERLINES_CONTRAST_CONTROL = 13] = "LASERLINES_CONTRAST_CONTROL", E10[E10.HUD_MATERIAL = 14] = "HUD_MATERIAL", E10[E10.LABEL_MATERIAL = 15] = "LABEL_MATERIAL", E10[E10.LINE_CALLOUTS = 16] = "LINE_CALLOUTS", E10[E10.LINE_CALLOUTS_HUD_DEPTH = 17] = "LINE_CALLOUTS_HUD_DEPTH", E10[E10.DRAPED_MATERIAL = 18] = "DRAPED_MATERIAL", E10[E10.DRAPED_WATER = 19] = "DRAPED_WATER", E10[E10.VOXEL = 20] = "VOXEL", E10[E10.MAX_SLOTS = 21] = "MAX_SLOTS";
  816. }(E8 || (E8 = {}));
  817. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/verticalOffsetUtils.js
  818. var v3 = class {
  819. constructor(t12 = 0) {
  820. this.offset = t12, this.tmpVertex = n2();
  821. }
  822. applyToVertex(t12, s10, e20) {
  823. const i15 = t12 + this.localOrigin[0], r11 = s10 + this.localOrigin[1], a10 = e20 + this.localOrigin[2], o14 = this.offset / Math.sqrt(i15 * i15 + r11 * r11 + a10 * a10);
  824. return this.tmpVertex[0] = t12 + i15 * o14, this.tmpVertex[1] = s10 + r11 * o14, this.tmpVertex[2] = e20 + a10 * o14, this.tmpVertex;
  825. }
  826. applyToAabb(t12) {
  827. for (let r11 = 0; r11 < 3; ++r11)
  828. O6[r11] = t12[0 + r11] + this.localOrigin[r11], z2[r11] = t12[3 + r11] + this.localOrigin[r11], T4[r11] = O6[r11];
  829. const s10 = this.applyToVertex(O6[0], O6[1], O6[2]);
  830. for (let r11 = 0; r11 < 3; ++r11)
  831. t12[r11] = s10[r11], t12[r11 + 3] = s10[r11];
  832. const e20 = (s11) => {
  833. const e21 = this.applyToVertex(s11[0], s11[1], s11[2]);
  834. for (let i16 = 0; i16 < 3; ++i16)
  835. t12[i16 + 0] = Math.min(t12[i16 + 0], e21[i16]), t12[i16 + 3] = Math.max(t12[i16 + 3], e21[i16]);
  836. };
  837. for (let r11 = 1; r11 < 8; ++r11) {
  838. for (let t13 = 0; t13 < 3; ++t13)
  839. T4[t13] = 0 == (r11 & 1 << t13) ? O6[t13] : z2[t13];
  840. e20(T4);
  841. }
  842. let i15 = 0;
  843. for (let r11 = 0; r11 < 3; ++r11) {
  844. O6[r11] * z2[r11] < 0 && (i15 |= 1 << r11);
  845. }
  846. if (0 !== i15 && 7 !== i15) {
  847. for (let r11 = 0; r11 < 8; ++r11)
  848. if (0 == (i15 & r11)) {
  849. for (let t13 = 0; t13 < 3; ++t13)
  850. i15[t13] ? T4[t13] = 0 : T4[t13] = 0 != (r11 & 1 << t13) ? O6[t13] : z2[t13];
  851. e20(T4);
  852. }
  853. }
  854. for (let r11 = 0; r11 < 3; ++r11)
  855. t12[r11 + 0] -= this.localOrigin[r11], t12[r11 + 3] -= this.localOrigin[r11];
  856. return t12;
  857. }
  858. };
  859. var O6 = n2();
  860. var z2 = n2();
  861. var T4 = n2();
  862. var g6 = class {
  863. constructor(t12 = 0) {
  864. this.componentLocalOriginLength = 0, this._tmpVertex = n2(), this._mbs = R(), this._obb = { center: n2(), halfSize: n8(), quaternion: null }, this._totalOffset = 0, this._offset = 0, this._resetOffset(t12);
  865. }
  866. _resetOffset(t12) {
  867. this._offset = t12, this._totalOffset = t12;
  868. }
  869. set offset(t12) {
  870. this._resetOffset(t12);
  871. }
  872. get offset() {
  873. return this._offset;
  874. }
  875. set componentOffset(t12) {
  876. this._totalOffset = this._offset + t12;
  877. }
  878. set localOrigin(t12) {
  879. this.componentLocalOriginLength = Math.sqrt(t12[0] * t12[0] + t12[1] * t12[1] + t12[2] * t12[2]);
  880. }
  881. applyToVertex(t12, s10, e20) {
  882. const i15 = t12, r11 = s10, a10 = e20 + this.componentLocalOriginLength, o14 = this._totalOffset / Math.sqrt(i15 * i15 + r11 * r11 + a10 * a10);
  883. return this._tmpVertex[0] = t12 + i15 * o14, this._tmpVertex[1] = s10 + r11 * o14, this._tmpVertex[2] = e20 + a10 * o14, this._tmpVertex;
  884. }
  885. applyToAabb(t12) {
  886. const s10 = t12[0], e20 = t12[1], i15 = t12[2] + this.componentLocalOriginLength, r11 = t12[3], a10 = t12[4], o14 = t12[5] + this.componentLocalOriginLength, h9 = s10 * r11 < 0 ? 0 : Math.min(Math.abs(s10), Math.abs(r11)), n13 = e20 * a10 < 0 ? 0 : Math.min(Math.abs(e20), Math.abs(a10)), f9 = i15 * o14 < 0 ? 0 : Math.min(Math.abs(i15), Math.abs(o14)), l9 = Math.sqrt(h9 * h9 + n13 * n13 + f9 * f9);
  887. if (l9 < this._totalOffset)
  888. return t12[0] -= s10 < 0 ? this._totalOffset : 0, t12[1] -= e20 < 0 ? this._totalOffset : 0, t12[2] -= i15 < 0 ? this._totalOffset : 0, t12[3] += r11 > 0 ? this._totalOffset : 0, t12[4] += a10 > 0 ? this._totalOffset : 0, t12[5] += o14 > 0 ? this._totalOffset : 0, t12;
  889. const m7 = Math.max(Math.abs(s10), Math.abs(r11)), _8 = Math.max(Math.abs(e20), Math.abs(a10)), b5 = Math.max(Math.abs(i15), Math.abs(o14)), c16 = Math.sqrt(m7 * m7 + _8 * _8 + b5 * b5), p4 = this._totalOffset / c16, u11 = this._totalOffset / l9;
  890. return t12[0] += s10 * (s10 > 0 ? p4 : u11), t12[1] += e20 * (e20 > 0 ? p4 : u11), t12[2] += i15 * (i15 > 0 ? p4 : u11), t12[3] += r11 * (r11 < 0 ? p4 : u11), t12[4] += a10 * (a10 < 0 ? p4 : u11), t12[5] += o14 * (o14 < 0 ? p4 : u11), t12;
  891. }
  892. applyToMbs(t12) {
  893. const s10 = Math.sqrt(t12[0] * t12[0] + t12[1] * t12[1] + t12[2] * t12[2]), e20 = this._totalOffset / s10;
  894. return this._mbs[0] = t12[0] + t12[0] * e20, this._mbs[1] = t12[1] + t12[1] * e20, this._mbs[2] = t12[2] + t12[2] * e20, this._mbs[3] = t12[3] + t12[3] * this._totalOffset / s10, this._mbs;
  895. }
  896. applyToObb(t12) {
  897. const s10 = t12.center, e20 = this._totalOffset / Math.sqrt(s10[0] * s10[0] + s10[1] * s10[1] + s10[2] * s10[2]);
  898. this._obb.center[0] = s10[0] + s10[0] * e20, this._obb.center[1] = s10[1] + s10[1] * e20, this._obb.center[2] = s10[2] + s10[2] * e20, E(this._obb.halfSize, t12.halfSize, t12.quaternion), u(this._obb.halfSize, this._obb.halfSize, t12.center);
  899. const i15 = this._totalOffset / Math.sqrt(this._obb.halfSize[0] * this._obb.halfSize[0] + this._obb.halfSize[1] * this._obb.halfSize[1] + this._obb.halfSize[2] * this._obb.halfSize[2]);
  900. return this._obb.halfSize[0] += this._obb.halfSize[0] * i15, this._obb.halfSize[1] += this._obb.halfSize[1] * i15, this._obb.halfSize[2] += this._obb.halfSize[2] * i15, e5(this._obb.halfSize, this._obb.halfSize, t12.center), S2(I2, t12.quaternion), E(this._obb.halfSize, this._obb.halfSize, I2), this._obb.halfSize[0] *= this._obb.halfSize[0] < 0 ? -1 : 1, this._obb.halfSize[1] *= this._obb.halfSize[1] < 0 ? -1 : 1, this._obb.halfSize[2] *= this._obb.halfSize[2] < 0 ? -1 : 1, this._obb.quaternion = t12.quaternion, this._obb;
  901. }
  902. };
  903. var x5 = class {
  904. constructor(t12 = 0) {
  905. this.offset = t12, this.sphere = R(), this.tmpVertex = n2();
  906. }
  907. applyToVertex(t12, s10, e20) {
  908. const i15 = this.objectTransform.transform;
  909. let r11 = i15[0] * t12 + i15[4] * s10 + i15[8] * e20 + i15[12], a10 = i15[1] * t12 + i15[5] * s10 + i15[9] * e20 + i15[13], o14 = i15[2] * t12 + i15[6] * s10 + i15[10] * e20 + i15[14];
  910. const h9 = this.offset / Math.sqrt(r11 * r11 + a10 * a10 + o14 * o14);
  911. r11 += r11 * h9, a10 += a10 * h9, o14 += o14 * h9;
  912. const n13 = this.objectTransform.inverse;
  913. return this.tmpVertex[0] = n13[0] * r11 + n13[4] * a10 + n13[8] * o14 + n13[12], this.tmpVertex[1] = n13[1] * r11 + n13[5] * a10 + n13[9] * o14 + n13[13], this.tmpVertex[2] = n13[2] * r11 + n13[6] * a10 + n13[10] * o14 + n13[14], this.tmpVertex;
  914. }
  915. applyToMinMax(t12, s10) {
  916. const e20 = this.offset / Math.sqrt(t12[0] * t12[0] + t12[1] * t12[1] + t12[2] * t12[2]);
  917. t12[0] += t12[0] * e20, t12[1] += t12[1] * e20, t12[2] += t12[2] * e20;
  918. const i15 = this.offset / Math.sqrt(s10[0] * s10[0] + s10[1] * s10[1] + s10[2] * s10[2]);
  919. s10[0] += s10[0] * i15, s10[1] += s10[1] * i15, s10[2] += s10[2] * i15;
  920. }
  921. applyToAabb(t12) {
  922. const s10 = this.offset / Math.sqrt(t12[0] * t12[0] + t12[1] * t12[1] + t12[2] * t12[2]);
  923. t12[0] += t12[0] * s10, t12[1] += t12[1] * s10, t12[2] += t12[2] * s10;
  924. const e20 = this.offset / Math.sqrt(t12[3] * t12[3] + t12[4] * t12[4] + t12[5] * t12[5]);
  925. return t12[3] += t12[3] * e20, t12[4] += t12[4] * e20, t12[5] += t12[5] * e20, t12;
  926. }
  927. applyToBoundingSphere(t12) {
  928. const s10 = Math.sqrt(t12[0] * t12[0] + t12[1] * t12[1] + t12[2] * t12[2]), e20 = this.offset / s10;
  929. return this.sphere[0] = t12[0] + t12[0] * e20, this.sphere[1] = t12[1] + t12[1] * e20, this.sphere[2] = t12[2] + t12[2] * e20, this.sphere[3] = t12[3] + t12[3] * this.offset / s10, this.sphere;
  930. }
  931. };
  932. var S5 = new x5();
  933. function y2(s10) {
  934. return r(s10) ? (S5.offset = s10, S5) : null;
  935. }
  936. var q2 = new g6();
  937. var d7 = new v3();
  938. var I2 = e8();
  939. // node_modules/@arcgis/core/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js
  940. function c13(e20, t12, f9, o14) {
  941. const r11 = f9.typedBuffer, n13 = f9.typedBufferStride, s10 = e20.length;
  942. o14 *= n13;
  943. for (let i15 = 0; i15 < s10; ++i15) {
  944. const f10 = 2 * e20[i15];
  945. r11[o14] = t12[f10], r11[o14 + 1] = t12[f10 + 1], o14 += n13;
  946. }
  947. }
  948. function d8(e20, t12, f9, o14, r11) {
  949. const n13 = f9.typedBuffer, s10 = f9.typedBufferStride, i15 = e20.length;
  950. if (o14 *= s10, null == r11 || 1 === r11)
  951. for (let l9 = 0; l9 < i15; ++l9) {
  952. const f10 = 3 * e20[l9];
  953. n13[o14] = t12[f10], n13[o14 + 1] = t12[f10 + 1], n13[o14 + 2] = t12[f10 + 2], o14 += s10;
  954. }
  955. else
  956. for (let l9 = 0; l9 < i15; ++l9) {
  957. const f10 = 3 * e20[l9];
  958. for (let e21 = 0; e21 < r11; ++e21)
  959. n13[o14] = t12[f10], n13[o14 + 1] = t12[f10 + 1], n13[o14 + 2] = t12[f10 + 2], o14 += s10;
  960. }
  961. }
  962. function u10(e20, t12, f9, o14, r11 = 1) {
  963. const n13 = f9.typedBuffer, s10 = f9.typedBufferStride, i15 = e20.length;
  964. if (o14 *= s10, 1 === r11)
  965. for (let l9 = 0; l9 < i15; ++l9) {
  966. const f10 = 4 * e20[l9];
  967. n13[o14] = t12[f10], n13[o14 + 1] = t12[f10 + 1], n13[o14 + 2] = t12[f10 + 2], n13[o14 + 3] = t12[f10 + 3], o14 += s10;
  968. }
  969. else
  970. for (let l9 = 0; l9 < i15; ++l9) {
  971. const f10 = 4 * e20[l9];
  972. for (let e21 = 0; e21 < r11; ++e21)
  973. n13[o14] = t12[f10], n13[o14 + 1] = t12[f10 + 1], n13[o14 + 2] = t12[f10 + 2], n13[o14 + 3] = t12[f10 + 3], o14 += s10;
  974. }
  975. }
  976. function y3(e20, t12, f9, o14, r11, n13 = 1) {
  977. if (!f9)
  978. return void d8(e20, t12, o14, r11, n13);
  979. const s10 = o14.typedBuffer, i15 = o14.typedBufferStride, l9 = e20.length, c16 = f9[0], u11 = f9[1], a10 = f9[2], p4 = f9[4], y4 = f9[5], B3 = f9[6], g8 = f9[8], h9 = f9[9], b5 = f9[10], m7 = f9[12], O7 = f9[13], z4 = f9[14];
  980. r11 *= i15;
  981. let A7 = 0, L5 = 0, j4 = 0;
  982. const I4 = S6(f9) ? (e21) => {
  983. A7 = t12[e21] + m7, L5 = t12[e21 + 1] + O7, j4 = t12[e21 + 2] + z4;
  984. } : (e21) => {
  985. const f10 = t12[e21], o15 = t12[e21 + 1], r12 = t12[e21 + 2];
  986. A7 = c16 * f10 + p4 * o15 + g8 * r12 + m7, L5 = u11 * f10 + y4 * o15 + h9 * r12 + O7, j4 = a10 * f10 + B3 * o15 + b5 * r12 + z4;
  987. };
  988. if (1 === n13)
  989. for (let d9 = 0; d9 < l9; ++d9)
  990. I4(3 * e20[d9]), s10[r11] = A7, s10[r11 + 1] = L5, s10[r11 + 2] = j4, r11 += i15;
  991. else
  992. for (let d9 = 0; d9 < l9; ++d9) {
  993. I4(3 * e20[d9]);
  994. for (let e21 = 0; e21 < n13; ++e21)
  995. s10[r11] = A7, s10[r11 + 1] = L5, s10[r11 + 2] = j4, r11 += i15;
  996. }
  997. }
  998. function B(e20, f9, o14, r11, n13, s10 = 1) {
  999. if (!o14)
  1000. return void d8(e20, f9, r11, n13, s10);
  1001. const i15 = o14, l9 = r11.typedBuffer, c16 = r11.typedBufferStride, u11 = e20.length, a10 = i15[0], p4 = i15[1], y4 = i15[2], B3 = i15[4], g8 = i15[5], h9 = i15[6], b5 = i15[8], m7 = i15[9], O7 = i15[10], z4 = !G(i15), A7 = 1e-6, L5 = 1 - A7;
  1002. n13 *= c16;
  1003. let j4 = 0, I4 = 0, k4 = 0;
  1004. const C4 = S6(i15) ? (e21) => {
  1005. j4 = f9[e21], I4 = f9[e21 + 1], k4 = f9[e21 + 2];
  1006. } : (e21) => {
  1007. const t12 = f9[e21], o15 = f9[e21 + 1], r12 = f9[e21 + 2];
  1008. j4 = a10 * t12 + B3 * o15 + b5 * r12, I4 = p4 * t12 + g8 * o15 + m7 * r12, k4 = y4 * t12 + h9 * o15 + O7 * r12;
  1009. };
  1010. if (1 === s10)
  1011. if (z4)
  1012. for (let t12 = 0; t12 < u11; ++t12) {
  1013. C4(3 * e20[t12]);
  1014. const f10 = j4 * j4 + I4 * I4 + k4 * k4;
  1015. if (f10 < L5 && f10 > A7) {
  1016. const e21 = 1 / Math.sqrt(f10);
  1017. l9[n13] = j4 * e21, l9[n13 + 1] = I4 * e21, l9[n13 + 2] = k4 * e21;
  1018. } else
  1019. l9[n13] = j4, l9[n13 + 1] = I4, l9[n13 + 2] = k4;
  1020. n13 += c16;
  1021. }
  1022. else
  1023. for (let t12 = 0; t12 < u11; ++t12)
  1024. C4(3 * e20[t12]), l9[n13] = j4, l9[n13 + 1] = I4, l9[n13 + 2] = k4, n13 += c16;
  1025. else
  1026. for (let t12 = 0; t12 < u11; ++t12) {
  1027. if (C4(3 * e20[t12]), z4) {
  1028. const e21 = j4 * j4 + I4 * I4 + k4 * k4;
  1029. if (e21 < L5 && e21 > A7) {
  1030. const t13 = 1 / Math.sqrt(e21);
  1031. j4 *= t13, I4 *= t13, k4 *= t13;
  1032. }
  1033. }
  1034. for (let e21 = 0; e21 < s10; ++e21)
  1035. l9[n13] = j4, l9[n13 + 1] = I4, l9[n13 + 2] = k4, n13 += c16;
  1036. }
  1037. }
  1038. function g7(e20, f9, o14, r11, n13, s10 = 1) {
  1039. if (!o14)
  1040. return void u10(e20, f9, r11, n13, s10);
  1041. const i15 = o14, l9 = r11.typedBuffer, c16 = r11.typedBufferStride, d9 = e20.length, a10 = i15[0], p4 = i15[1], y4 = i15[2], B3 = i15[4], g8 = i15[5], h9 = i15[6], b5 = i15[8], m7 = i15[9], S7 = i15[10], O7 = !G(i15), z4 = 1e-6, A7 = 1 - z4;
  1042. if (n13 *= c16, 1 === s10)
  1043. for (let t12 = 0; t12 < d9; ++t12) {
  1044. const o15 = 4 * e20[t12], r12 = f9[o15], s11 = f9[o15 + 1], i16 = f9[o15 + 2], d10 = f9[o15 + 3];
  1045. let u11 = a10 * r12 + B3 * s11 + b5 * i16, L5 = p4 * r12 + g8 * s11 + m7 * i16, j4 = y4 * r12 + h9 * s11 + S7 * i16;
  1046. if (O7) {
  1047. const e21 = u11 * u11 + L5 * L5 + j4 * j4;
  1048. if (e21 < A7 && e21 > z4) {
  1049. const t13 = 1 / Math.sqrt(e21);
  1050. u11 *= t13, L5 *= t13, j4 *= t13;
  1051. }
  1052. }
  1053. l9[n13] = u11, l9[n13 + 1] = L5, l9[n13 + 2] = j4, l9[n13 + 3] = d10, n13 += c16;
  1054. }
  1055. else
  1056. for (let t12 = 0; t12 < d9; ++t12) {
  1057. const o15 = 4 * e20[t12], r12 = f9[o15], i16 = f9[o15 + 1], d10 = f9[o15 + 2], u11 = f9[o15 + 3];
  1058. let L5 = a10 * r12 + B3 * i16 + b5 * d10, j4 = p4 * r12 + g8 * i16 + m7 * d10, I4 = y4 * r12 + h9 * i16 + S7 * d10;
  1059. if (O7) {
  1060. const e21 = L5 * L5 + j4 * j4 + I4 * I4;
  1061. if (e21 < A7 && e21 > z4) {
  1062. const t13 = 1 / Math.sqrt(e21);
  1063. L5 *= t13, j4 *= t13, I4 *= t13;
  1064. }
  1065. }
  1066. for (let e21 = 0; e21 < s10; ++e21)
  1067. l9[n13] = L5, l9[n13 + 1] = j4, l9[n13 + 2] = I4, l9[n13 + 3] = u11, n13 += c16;
  1068. }
  1069. }
  1070. function h8(e20, t12, f9, o14, r11, n13 = 1) {
  1071. const s10 = o14.typedBuffer, i15 = o14.typedBufferStride, l9 = e20.length;
  1072. if (r11 *= i15, f9 !== t12.length || 4 !== f9)
  1073. if (1 !== n13)
  1074. if (4 !== f9)
  1075. for (let c16 = 0; c16 < l9; ++c16) {
  1076. const f10 = 3 * e20[c16];
  1077. for (let e21 = 0; e21 < n13; ++e21)
  1078. s10[r11] = t12[f10], s10[r11 + 1] = t12[f10 + 1], s10[r11 + 2] = t12[f10 + 2], s10[r11 + 3] = 255, r11 += i15;
  1079. }
  1080. else
  1081. for (let c16 = 0; c16 < l9; ++c16) {
  1082. const f10 = 4 * e20[c16];
  1083. for (let e21 = 0; e21 < n13; ++e21)
  1084. s10[r11] = t12[f10], s10[r11 + 1] = t12[f10 + 1], s10[r11 + 2] = t12[f10 + 2], s10[r11 + 3] = t12[f10 + 3], r11 += i15;
  1085. }
  1086. else {
  1087. if (4 === f9) {
  1088. for (let f10 = 0; f10 < l9; ++f10) {
  1089. const o15 = 4 * e20[f10];
  1090. s10[r11] = t12[o15], s10[r11 + 1] = t12[o15 + 1], s10[r11 + 2] = t12[o15 + 2], s10[r11 + 3] = t12[o15 + 3], r11 += i15;
  1091. }
  1092. return;
  1093. }
  1094. for (let f10 = 0; f10 < l9; ++f10) {
  1095. const o15 = 3 * e20[f10];
  1096. s10[r11] = t12[o15], s10[r11 + 1] = t12[o15 + 1], s10[r11 + 2] = t12[o15 + 2], s10[r11 + 3] = 255, r11 += i15;
  1097. }
  1098. }
  1099. else {
  1100. s10[r11] = t12[0], s10[r11 + 1] = t12[1], s10[r11 + 2] = t12[2], s10[r11 + 3] = t12[3];
  1101. const e21 = new Uint32Array(o14.typedBuffer.buffer, o14.start), f10 = i15 / 4, c16 = e21[r11 /= 4];
  1102. r11 += f10;
  1103. const d9 = l9 * n13;
  1104. for (let t13 = 1; t13 < d9; ++t13)
  1105. e21[r11] = c16, r11 += f10;
  1106. }
  1107. }
  1108. function b3(e20, t12, f9, o14, r11 = 1) {
  1109. const n13 = t12.typedBuffer, s10 = t12.typedBufferStride;
  1110. if (o14 *= s10, 1 === r11)
  1111. for (let i15 = 0; i15 < f9; ++i15)
  1112. n13[o14] = e20[0], n13[o14 + 1] = e20[1], n13[o14 + 2] = e20[2], n13[o14 + 3] = e20[3], o14 += s10;
  1113. else
  1114. for (let i15 = 0; i15 < f9; ++i15)
  1115. for (let t13 = 0; t13 < r11; ++t13)
  1116. n13[o14] = e20[0], n13[o14 + 1] = e20[1], n13[o14 + 2] = e20[2], n13[o14 + 3] = e20[3], o14 += s10;
  1117. }
  1118. function m5(t12, l9, d9, u11, a10, p4) {
  1119. for (const m7 of l9.fieldNames) {
  1120. const l10 = t12.vertexAttributes.get(m7), S7 = t12.indices.get(m7);
  1121. if (l10 && S7)
  1122. switch (m7) {
  1123. case O4.POSITION: {
  1124. e12(3 === l10.size);
  1125. const e20 = a10.getField(m7, i3);
  1126. e20 && y3(S7, l10.data, d9, e20, p4);
  1127. break;
  1128. }
  1129. case O4.NORMAL: {
  1130. e12(3 === l10.size);
  1131. const e20 = a10.getField(m7, i3);
  1132. e20 && B(S7, l10.data, u11, e20, p4);
  1133. break;
  1134. }
  1135. case O4.UV0: {
  1136. e12(2 === l10.size);
  1137. const e20 = a10.getField(m7, u2);
  1138. e20 && c13(S7, l10.data, e20, p4);
  1139. break;
  1140. }
  1141. case O4.COLOR: {
  1142. e12(3 === l10.size || 4 === l10.size);
  1143. const e20 = a10.getField(m7, x);
  1144. e20 && h8(S7, l10.data, l10.size, e20, p4);
  1145. break;
  1146. }
  1147. case O4.SYMBOLCOLOR: {
  1148. e12(3 === l10.size || 4 === l10.size);
  1149. const e20 = a10.getField(m7, x);
  1150. e20 && h8(S7, l10.data, l10.size, e20, p4);
  1151. break;
  1152. }
  1153. case O4.TANGENT: {
  1154. e12(4 === l10.size);
  1155. const e20 = a10.getField(m7, c4);
  1156. e20 && g7(S7, l10.data, u11, e20, p4);
  1157. break;
  1158. }
  1159. }
  1160. else if (m7 === O4.OBJECTANDLAYERIDCOLOR && r(t12.objectAndLayerIdColor) && 4 === t12.objectAndLayerIdColor.length) {
  1161. const e20 = t12.indices.get(O4.POSITION);
  1162. if (e20) {
  1163. const f9 = e20.length, r11 = a10.getField(m7, x);
  1164. b3(t12.objectAndLayerIdColor, r11, f9, p4);
  1165. }
  1166. }
  1167. }
  1168. }
  1169. function S6(e20) {
  1170. return 1 === e20[0] && 0 === e20[1] && 0 === e20[2] && 0 === e20[4] && 1 === e20[5] && 0 === e20[6] && 0 === e20[8] && 0 === e20[9] && 1 === e20[10];
  1171. }
  1172. // node_modules/@arcgis/core/views/3d/webgl-engine/lib/StencilUtils.js
  1173. var i14 = { func: I.LESS };
  1174. var s8 = { func: I.ALWAYS };
  1175. var e19 = { mask: 255 };
  1176. var f8 = { function: { func: I.ALWAYS, ref: t7.OutlineVisualElementMask, mask: t7.OutlineVisualElementMask }, operation: { fail: O3.KEEP, zFail: O3.KEEP, zPass: O3.ZERO } };
  1177. var o13 = { function: { func: I.ALWAYS, ref: t7.OutlineVisualElementMask, mask: t7.OutlineVisualElementMask }, operation: { fail: O3.KEEP, zFail: O3.KEEP, zPass: O3.REPLACE } };
  1178. var P3 = { function: { func: I.EQUAL, ref: t7.OutlineVisualElementMask, mask: t7.OutlineVisualElementMask }, operation: { fail: O3.KEEP, zFail: O3.KEEP, zPass: O3.KEEP } };
  1179. var m6 = { function: { func: I.NOTEQUAL, ref: t7.OutlineVisualElementMask, mask: t7.OutlineVisualElementMask }, operation: { fail: O3.KEEP, zFail: O3.KEEP, zPass: O3.KEEP } };
  1180. // node_modules/@arcgis/core/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js
  1181. var k = class extends f6 {
  1182. constructor() {
  1183. super(...arguments), this.isSchematic = false, this.usePBR = false, this.mrrFactors = r2(0, 1, 0.5), this.hasVertexColors = false, this.hasSymbolColors = false, this.doubleSided = false, this.doubleSidedType = "normal", this.cullFace = n9.Back, this.emissiveFactor = r2(0, 0, 0), this.instancedDoublePrecision = false, this.normals = "default", this.receiveSSAO = true, this.receiveShadows = true, this.castShadows = true, this.shadowMappingEnabled = false, this.ambient = r2(0.2, 0.2, 0.2), this.diffuse = r2(0.8, 0.8, 0.8), this.externalColor = r4(1, 1, 1, 1), this.colorMixMode = "multiply", this.opacity = 1, this.layerOpacity = 1, this.origin = n2(), this.hasSlicePlane = false, this.hasSliceHighlight = true, this.offsetTransparentBackfaces = false, this.vvSizeEnabled = false, this.vvSizeMinSize = [1, 1, 1], this.vvSizeMaxSize = [100, 100, 100], this.vvSizeOffset = [0, 0, 0], this.vvSizeFactor = [1, 1, 1], this.vvSizeValue = [1, 1, 1], this.vvColorEnabled = false, this.vvColorValues = [0, 0, 0, 0, 0, 0, 0, 0], this.vvColorColors = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], this.vvSymbolAnchor = [0, 0, 0], this.vvSymbolRotationMatrix = e6(), this.vvOpacityEnabled = false, this.vvOpacityValues = [], this.vvOpacityOpacities = [], this.transparent = false, this.writeDepth = true, this.customDepthTest = e14.Less, this.textureAlphaMode = C.Blend, this.textureAlphaCutoff = o10, this.textureAlphaPremultiplied = false, this.hasOccludees = false, this.renderOccluded = o8.Occlude;
  1184. }
  1185. };
  1186. var _7 = class extends e17 {
  1187. initializeConfiguration(e20, t12) {
  1188. t12.hasWebGL2Context = e20.rctx.type === r6.WEBGL2, t12.spherical = e20.viewingMode === l2.Global, t12.doublePrecisionRequiresObfuscation = i9(e20.rctx), t12.textureCoordinateType = t12.hasColorTexture || t12.hasMetallicRoughnessTexture || t12.hasEmissionTexture || t12.hasOcclusionTexture || t12.hasNormalTexture ? d.Default : d.None, t12.objectAndLayerIdColorInstanced = t12.instanced;
  1189. }
  1190. initializeProgram(e20) {
  1191. return this._initializeProgram(e20, _7.shader);
  1192. }
  1193. _initializeProgram(e20, t12) {
  1194. return new o11(e20.rctx, t12.get().build(this.configuration), E5);
  1195. }
  1196. _convertDepthTestFunction(e20) {
  1197. return e20 === e14.Lequal ? I.LEQUAL : I.LESS;
  1198. }
  1199. _makePipeline(e20, t12) {
  1200. const i15 = this.configuration, s10 = e20 === o9.NONE, r11 = e20 === o9.FrontFace;
  1201. return W({ blending: i15.output !== h3.Color && i15.output !== h3.Alpha || !i15.transparent ? null : s10 ? c7 : A3(e20), culling: V4(i15) && h5(i15.cullFace), depthTest: { func: l3(e20, this._convertDepthTestFunction(i15.customDepthTest)) }, depthWrite: s10 || r11 ? i15.writeDepth && a6 : null, colorWrite: _3, stencilWrite: i15.hasOccludees ? e19 : null, stencilTest: i15.hasOccludees ? t12 ? o13 : f8 : null, polygonOffset: s10 || r11 ? null : a7(i15.enableOffset) });
  1202. }
  1203. initializePipeline() {
  1204. return this._occludeePipelineState = this._makePipeline(this.configuration.transparencyPassType, true), this._makePipeline(this.configuration.transparencyPassType, false);
  1205. }
  1206. getPipelineState(e20, t12) {
  1207. return t12 ? this._occludeePipelineState : super.getPipelineState(e20, t12);
  1208. }
  1209. };
  1210. function V4(e20) {
  1211. return e20.cullFace !== n9.None || !e20.hasSlicePlane && (!e20.transparent && !e20.doubleSidedMode);
  1212. }
  1213. _7.shader = new t9(X2, () => import("./DefaultMaterial.glsl-ZGDAOX5L.js"));
  1214. // node_modules/@arcgis/core/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js
  1215. var s9 = class extends t10 {
  1216. constructor() {
  1217. super(...arguments), this.hasWebGL2Context = false;
  1218. }
  1219. };
  1220. e([e18({ constValue: true })], s9.prototype, "hasSliceHighlight", void 0), e([e18({ constValue: false })], s9.prototype, "hasSliceInVertexProgram", void 0), e([e18({ constValue: false })], s9.prototype, "instancedDoublePrecision", void 0), e([e18({ constValue: false })], s9.prototype, "useLegacyTerrainShading", void 0), e([e18({ constValue: false })], s9.prototype, "hasModelTransformation", void 0), e([e18({ constValue: a5.Pass })], s9.prototype, "pbrTextureBindType", void 0), e([e18()], s9.prototype, "hasWebGL2Context", void 0);
  1221. // node_modules/@arcgis/core/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js
  1222. var c15 = class extends s9 {
  1223. constructor() {
  1224. super(...arguments), this.output = h3.Color, this.alphaDiscardMode = C.Opaque, this.doubleSidedMode = i8.None, this.pbrMode = d2.Disabled, this.cullFace = n9.None, this.transparencyPassType = o9.NONE, this.normalType = i7.Attribute, this.textureCoordinateType = d.None, this.customDepthTest = e14.Less, this.spherical = false, this.hasVertexColors = false, this.hasSymbolColors = false, this.hasVerticalOffset = false, this.hasSlicePlane = false, this.hasSliceHighlight = true, this.hasColorTexture = false, this.hasMetallicRoughnessTexture = false, this.hasEmissionTexture = false, this.hasOcclusionTexture = false, this.hasNormalTexture = false, this.hasScreenSizePerspective = false, this.hasVertexTangents = false, this.hasOccludees = false, this.hasMultipassTerrain = false, this.hasModelTransformation = false, this.offsetBackfaces = false, this.vvSize = false, this.vvColor = false, this.receiveShadows = false, this.receiveAmbientOcclusion = false, this.textureAlphaPremultiplied = false, this.instanced = false, this.instancedColor = false, this.objectAndLayerIdColorInstanced = false, this.instancedDoublePrecision = false, this.doublePrecisionRequiresObfuscation = false, this.writeDepth = true, this.transparent = false, this.enableOffset = true, this.cullAboveGround = false, this.snowCover = false, this.hasColorTextureTransform = false, this.hasEmissionTextureTransform = false, this.hasNormalTextureTransform = false, this.hasOcclusionTextureTransform = false, this.hasMetallicRoughnessTextureTransform = false;
  1225. }
  1226. };
  1227. e([e18({ count: h3.COUNT })], c15.prototype, "output", void 0), e([e18({ count: C.COUNT })], c15.prototype, "alphaDiscardMode", void 0), e([e18({ count: i8.COUNT })], c15.prototype, "doubleSidedMode", void 0), e([e18({ count: d2.COUNT })], c15.prototype, "pbrMode", void 0), e([e18({ count: n9.COUNT })], c15.prototype, "cullFace", void 0), e([e18({ count: o9.COUNT })], c15.prototype, "transparencyPassType", void 0), e([e18({ count: i7.COUNT })], c15.prototype, "normalType", void 0), e([e18({ count: d.COUNT })], c15.prototype, "textureCoordinateType", void 0), e([e18({ count: e14.COUNT })], c15.prototype, "customDepthTest", void 0), e([e18()], c15.prototype, "spherical", void 0), e([e18()], c15.prototype, "hasVertexColors", void 0), e([e18()], c15.prototype, "hasSymbolColors", void 0), e([e18()], c15.prototype, "hasVerticalOffset", void 0), e([e18()], c15.prototype, "hasSlicePlane", void 0), e([e18()], c15.prototype, "hasSliceHighlight", void 0), e([e18()], c15.prototype, "hasColorTexture", void 0), e([e18()], c15.prototype, "hasMetallicRoughnessTexture", void 0), e([e18()], c15.prototype, "hasEmissionTexture", void 0), e([e18()], c15.prototype, "hasOcclusionTexture", void 0), e([e18()], c15.prototype, "hasNormalTexture", void 0), e([e18()], c15.prototype, "hasScreenSizePerspective", void 0), e([e18()], c15.prototype, "hasVertexTangents", void 0), e([e18()], c15.prototype, "hasOccludees", void 0), e([e18()], c15.prototype, "hasMultipassTerrain", void 0), e([e18()], c15.prototype, "hasModelTransformation", void 0), e([e18()], c15.prototype, "offsetBackfaces", void 0), e([e18()], c15.prototype, "vvSize", void 0), e([e18()], c15.prototype, "vvColor", void 0), e([e18()], c15.prototype, "receiveShadows", void 0), e([e18()], c15.prototype, "receiveAmbientOcclusion", void 0), e([e18()], c15.prototype, "textureAlphaPremultiplied", void 0), e([e18()], c15.prototype, "instanced", void 0), e([e18()], c15.prototype, "instancedColor", void 0), e([e18()], c15.prototype, "objectAndLayerIdColorInstanced", void 0), e([e18()], c15.prototype, "instancedDoublePrecision", void 0), e([e18()], c15.prototype, "doublePrecisionRequiresObfuscation", void 0), e([e18()], c15.prototype, "writeDepth", void 0), e([e18()], c15.prototype, "transparent", void 0), e([e18()], c15.prototype, "enableOffset", void 0), e([e18()], c15.prototype, "cullAboveGround", void 0), e([e18()], c15.prototype, "snowCover", void 0), e([e18()], c15.prototype, "hasColorTextureTransform", void 0), e([e18()], c15.prototype, "hasEmissionTextureTransform", void 0), e([e18()], c15.prototype, "hasNormalTextureTransform", void 0), e([e18()], c15.prototype, "hasOcclusionTextureTransform", void 0), e([e18()], c15.prototype, "hasMetallicRoughnessTextureTransform", void 0), e([e18({ constValue: true })], c15.prototype, "hasVvInstancing", void 0), e([e18({ constValue: false })], c15.prototype, "useCustomDTRExponentForWater", void 0), e([e18({ constValue: false })], c15.prototype, "supportsTextureAtlas", void 0), e([e18({ constValue: true })], c15.prototype, "useFillLights", void 0);
  1228. // node_modules/@arcgis/core/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js
  1229. var t11 = class extends _7 {
  1230. initializeConfiguration(i15, a10) {
  1231. super.initializeConfiguration(i15, a10), a10.hasMetallicRoughnessTexture = false, a10.hasEmissionTexture = false, a10.hasOcclusionTexture = false, a10.hasNormalTexture = false, a10.hasModelTransformation = false, a10.normalType = i7.Attribute, a10.doubleSidedMode = i8.WindingOrder, a10.hasVertexTangents = false;
  1232. }
  1233. initializeProgram(e20) {
  1234. return this._initializeProgram(e20, t11.shader);
  1235. }
  1236. };
  1237. t11.shader = new t9(R2, () => import("./RealisticTree.glsl-FSHQ4APF.js"));
  1238. // node_modules/@arcgis/core/views/3d/webgl-engine/materials/DefaultMaterial.js
  1239. var C3 = class extends d3 {
  1240. constructor(e20) {
  1241. super(e20, P4), this.supportsEdges = true, this._configuration = new c15(), this._vertexBufferLayout = j2(this.parameters), this._instanceBufferLayout = e20.instanced ? B2(this.parameters) : null;
  1242. }
  1243. isVisibleForOutput(e20) {
  1244. return e20 !== h3.Shadow && e20 !== h3.ShadowExludeHighlight && e20 !== h3.ShadowHighlight || this.parameters.castShadows;
  1245. }
  1246. isVisible() {
  1247. const t12 = this.parameters;
  1248. if (!super.isVisible() || 0 === t12.layerOpacity)
  1249. return false;
  1250. const { instanced: r11, hasVertexColors: a10, hasSymbolColors: s10, vvColorEnabled: i15 } = t12, o14 = r(r11) && r11.includes("color"), n13 = "replace" === t12.colorMixMode, h9 = t12.opacity > 0, c16 = t12.externalColor && t12.externalColor[3] > 0;
  1251. return a10 && (o14 || i15 || s10) ? !!n13 || h9 : a10 ? n13 ? c16 : h9 : o14 || i15 || s10 ? !!n13 || h9 : n13 ? c16 : h9;
  1252. }
  1253. getConfiguration(t12, r11) {
  1254. return this._configuration.output = t12, this._configuration.hasNormalTexture = !!this.parameters.normalTextureId, this._configuration.hasColorTexture = !!this.parameters.textureId, this._configuration.hasVertexTangents = this.parameters.hasVertexTangents, this._configuration.instanced = !!this.parameters.instanced, this._configuration.instancedDoublePrecision = this.parameters.instancedDoublePrecision, this._configuration.vvSize = this.parameters.vvSizeEnabled, this._configuration.hasVerticalOffset = r(this.parameters.verticalOffset), this._configuration.hasScreenSizePerspective = r(this.parameters.screenSizePerspective), this._configuration.hasSlicePlane = this.parameters.hasSlicePlane, this._configuration.hasSliceHighlight = this.parameters.hasSliceHighlight, this._configuration.alphaDiscardMode = this.parameters.textureAlphaMode, this._configuration.normalType = "screenDerivative" === this.parameters.normals ? i7.ScreenDerivative : i7.Attribute, this._configuration.transparent = this.parameters.transparent, this._configuration.writeDepth = this.parameters.writeDepth, r(this.parameters.customDepthTest) && (this._configuration.customDepthTest = this.parameters.customDepthTest), this._configuration.hasOccludees = this.parameters.hasOccludees, this._configuration.cullFace = this.parameters.hasSlicePlane ? n9.None : this.parameters.cullFace, this._configuration.hasMultipassTerrain = r11.multipassTerrain.enabled, this._configuration.cullAboveGround = r11.multipassTerrain.cullAboveGround, this._configuration.hasModelTransformation = r(this.parameters.modelTransformation), t12 !== h3.Color && t12 !== h3.Alpha || (this._configuration.hasVertexColors = this.parameters.hasVertexColors, this._configuration.hasSymbolColors = this.parameters.hasSymbolColors, this.parameters.treeRendering ? this._configuration.doubleSidedMode = i8.WindingOrder : this._configuration.doubleSidedMode = this.parameters.doubleSided && "normal" === this.parameters.doubleSidedType ? i8.View : this.parameters.doubleSided && "winding-order" === this.parameters.doubleSidedType ? i8.WindingOrder : i8.None, this._configuration.instancedColor = r(this.parameters.instanced) && this.parameters.instanced.includes("color"), this._configuration.receiveShadows = this.parameters.receiveShadows && this.parameters.shadowMappingEnabled, this._configuration.receiveAmbientOcclusion = !!r11.ssaoHelper.ready && this.parameters.receiveSSAO, this._configuration.vvColor = this.parameters.vvColorEnabled, this._configuration.textureAlphaPremultiplied = !!this.parameters.textureAlphaPremultiplied, this._configuration.pbrMode = this.parameters.usePBR ? this.parameters.isSchematic ? d2.Schematic : d2.Normal : d2.Disabled, this._configuration.hasMetallicRoughnessTexture = !!this.parameters.metallicRoughnessTextureId, this._configuration.hasEmissionTexture = !!this.parameters.emissiveTextureId, this._configuration.hasOcclusionTexture = !!this.parameters.occlusionTextureId, this._configuration.offsetBackfaces = !(!this.parameters.transparent || !this.parameters.offsetTransparentBackfaces), this._configuration.transparencyPassType = r11.transparencyPassType, this._configuration.enableOffset = r11.camera.relativeElevation < S3, this._configuration.snowCover = this.hasSnowCover(r11), this._configuration.hasColorTextureTransform = !!this.parameters.colorTextureTransformMatrix, this._configuration.hasNormalTextureTransform = !!this.parameters.normalTextureTransformMatrix, this._configuration.hasEmissionTextureTransform = !!this.parameters.emissiveTextureTransformMatrix, this._configuration.hasOcclusionTextureTransform = !!this.parameters.occlusionTextureTransformMatrix, this._configuration.hasMetallicRoughnessTextureTransform = !!this.parameters.metallicRoughnessTextureTransformMatrix), this._configuration;
  1255. }
  1256. hasSnowCover(t12) {
  1257. return r(t12.weather) && t12.weatherVisible && "snowy" === t12.weather.type && "enabled" === t12.weather.snowCover;
  1258. }
  1259. intersect(c16, u11, m7, p4, d9, f9, g8) {
  1260. if (r(this.parameters.verticalOffset)) {
  1261. const e20 = p4.camera;
  1262. o2(k2, m7[12], m7[13], m7[14]);
  1263. let c17 = null;
  1264. switch (p4.viewingMode) {
  1265. case l2.Global:
  1266. c17 = z(U3, k2);
  1267. break;
  1268. case l2.Local:
  1269. c17 = r3(U3, G4);
  1270. }
  1271. let u12 = 0;
  1272. const g9 = e5(q3, k2, e20.eye), T6 = s3(g9), _8 = g(g9, g9, 1 / T6);
  1273. let b5 = null;
  1274. this.parameters.screenSizePerspective && (b5 = P(c17, _8)), u12 += L3(e20, T6, this.parameters.verticalOffset, b5, this.parameters.screenSizePerspective), g(c17, c17, u12), S(z3, c17, p4.transform.inverseRotation), d9 = e5(V5, d9, z3), f9 = e5(H, f9, z3);
  1275. }
  1276. x3(c16, u11, p4, d9, f9, y2(p4.verticalOffset), g8);
  1277. }
  1278. requiresSlot(e20, t12) {
  1279. if (t12 === h3.Color || t12 === h3.Alpha || t12 === h3.Depth || t12 === h3.Normal || t12 === h3.Shadow || t12 === h3.ShadowHighlight || t12 === h3.ShadowExludeHighlight || t12 === h3.Highlight || t12 === h3.ObjectAndLayerIdColor) {
  1280. return e20 === (this.parameters.transparent ? this.parameters.writeDepth ? E8.TRANSPARENT_MATERIAL : E8.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL : E8.OPAQUE_MATERIAL) || e20 === E8.DRAPED_MATERIAL || t12 === h3.ObjectAndLayerIdColor;
  1281. }
  1282. return false;
  1283. }
  1284. createGLMaterial(e20) {
  1285. return new R3(e20);
  1286. }
  1287. createBufferWriter() {
  1288. return new N(this._vertexBufferLayout, this._instanceBufferLayout);
  1289. }
  1290. };
  1291. var R3 = class extends h4 {
  1292. constructor(e20) {
  1293. super({ ...e20, ...e20.material.parameters });
  1294. }
  1295. _updateParameters(e20) {
  1296. const r11 = this._material.parameters;
  1297. this.updateTexture(r11.textureId);
  1298. const a10 = e20.camera.viewInverseTransposeMatrix;
  1299. return o2(r11.origin, a10[3], a10[7], a10[11]), this._material.setParameters(this.textureBindParameters), this.ensureTechnique(r11.treeRendering ? t11 : _7, e20);
  1300. }
  1301. _updateShadowState(e20) {
  1302. e20.shadowMap.enabled !== this._material.parameters.shadowMappingEnabled && this._material.setParameters({ shadowMappingEnabled: e20.shadowMap.enabled });
  1303. }
  1304. _updateOccludeeState(e20) {
  1305. e20.hasOccludees !== this._material.parameters.hasOccludees && this._material.setParameters({ hasOccludees: e20.hasOccludees });
  1306. }
  1307. beginSlot(e20) {
  1308. return this._output !== h3.Color && this._output !== h3.Alpha || (this._updateShadowState(e20), this._updateOccludeeState(e20)), this._updateParameters(e20);
  1309. }
  1310. };
  1311. var D3 = class extends k {
  1312. constructor() {
  1313. super(...arguments), this.initTextureTransparent = false, this.treeRendering = false, this.hasVertexTangents = false;
  1314. }
  1315. };
  1316. var P4 = new D3();
  1317. var N = class {
  1318. constructor(e20, t12) {
  1319. this.vertexBufferLayout = e20, this.instanceBufferLayout = t12;
  1320. }
  1321. allocate(e20) {
  1322. return this.vertexBufferLayout.createBuffer(e20);
  1323. }
  1324. elementCount(e20) {
  1325. return e20.indices.get(O4.POSITION).length;
  1326. }
  1327. write(e20, t12, r11, a10, s10) {
  1328. m5(r11, this.vertexBufferLayout, e20, t12, a10, s10);
  1329. }
  1330. };
  1331. function j2(e20) {
  1332. const t12 = e20.textureId || e20.normalTextureId || e20.metallicRoughnessTextureId || e20.emissiveTextureId || e20.occlusionTextureId, r11 = T().vec3f(O4.POSITION).vec3f(O4.NORMAL);
  1333. return e20.hasVertexTangents && r11.vec4f(O4.TANGENT), t12 && r11.vec2f(O4.UV0), e20.hasVertexColors && r11.vec4u8(O4.COLOR), e20.hasSymbolColors && r11.vec4u8(O4.SYMBOLCOLOR), has("enable-feature:objectAndLayerId-rendering") && r11.vec4u8(O4.OBJECTANDLAYERIDCOLOR), r11;
  1334. }
  1335. function B2(t12) {
  1336. let r11 = T();
  1337. return r11 = t12.instancedDoublePrecision ? r11.vec3f(O4.MODELORIGINHI).vec3f(O4.MODELORIGINLO).mat3f(O4.MODEL).mat3f(O4.MODELNORMAL) : r11.mat4f(O4.MODEL).mat4f(O4.MODELNORMAL), r(t12.instanced) && t12.instanced.includes("color") && (r11 = r11.vec4f(O4.INSTANCECOLOR)), r(t12.instanced) && t12.instanced.includes("featureAttribute") && (r11 = r11.vec4f(O4.INSTANCEFEATUREATTRIBUTE)), r(t12.instanced) && t12.instanced.includes("objectAndLayerIdColor") && (r11 = r11.vec4u8(O4.OBJECTANDLAYERIDCOLOR_INSTANCED)), r11;
  1338. }
  1339. var V5 = n2();
  1340. var H = n2();
  1341. var G4 = r2(0, 0, 1);
  1342. var U3 = n2();
  1343. var z3 = n2();
  1344. var k2 = n2();
  1345. var q3 = n2();
  1346. // node_modules/@arcgis/core/views/3d/layers/graphics/wosrLoader.js
  1347. var w4 = s.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");
  1348. async function b4(e20, t12) {
  1349. const n13 = await v4(e20, t12), s10 = await E9(n13.textureDefinitions, t12);
  1350. let a10 = 0;
  1351. for (const r11 in s10)
  1352. if (s10.hasOwnProperty(r11)) {
  1353. const e21 = s10[r11];
  1354. a10 += (e21 == null ? void 0 : e21.image) ? e21.image.width * e21.image.height * 4 : 0;
  1355. }
  1356. return { resource: n13, textures: s10, size: a10 + e10(n13) };
  1357. }
  1358. async function v4(r11, n13) {
  1359. const s10 = r(n13) && n13.streamDataRequester;
  1360. if (s10)
  1361. return j3(r11, s10, n13);
  1362. const u11 = await b(U(r11, e2(n13)));
  1363. if (true === u11.ok)
  1364. return u11.value.data;
  1365. w(u11.error), A6(u11.error);
  1366. }
  1367. async function j3(e20, r11, n13) {
  1368. const s10 = await b(r11.request(e20, "json", n13));
  1369. if (true === s10.ok)
  1370. return s10.value;
  1371. w(s10.error), A6(s10.error.details.url);
  1372. }
  1373. function A6(e20) {
  1374. throw new s2("", `Request for object resource failed: ${e20}`);
  1375. }
  1376. function M5(e20) {
  1377. const t12 = e20.params, r11 = t12.topology;
  1378. let n13 = true;
  1379. switch (t12.vertexAttributes || (w4.warn("Geometry must specify vertex attributes"), n13 = false), t12.topology) {
  1380. case "PerAttributeArray":
  1381. break;
  1382. case "Indexed":
  1383. case null:
  1384. case void 0: {
  1385. const e21 = t12.faces;
  1386. if (e21) {
  1387. if (t12.vertexAttributes)
  1388. for (const r12 in t12.vertexAttributes) {
  1389. const t13 = e21[r12];
  1390. t13 && t13.values ? (null != t13.valueType && "UInt32" !== t13.valueType && (w4.warn(`Unsupported indexed geometry indices type '${t13.valueType}', only UInt32 is currently supported`), n13 = false), null != t13.valuesPerElement && 1 !== t13.valuesPerElement && (w4.warn(`Unsupported indexed geometry values per element '${t13.valuesPerElement}', only 1 is currently supported`), n13 = false)) : (w4.warn(`Indexed geometry does not specify face indices for '${r12}' attribute`), n13 = false);
  1391. }
  1392. } else
  1393. w4.warn("Indexed geometries must specify faces"), n13 = false;
  1394. break;
  1395. }
  1396. default:
  1397. w4.warn(`Unsupported topology '${r11}'`), n13 = false;
  1398. }
  1399. e20.params.material || (w4.warn("Geometry requires material"), n13 = false);
  1400. const s10 = e20.params.vertexAttributes;
  1401. for (const a10 in s10) {
  1402. s10[a10].values || (w4.warn("Geometries with externally defined attributes are not yet supported"), n13 = false);
  1403. }
  1404. return n13;
  1405. }
  1406. function P5(e20, t12) {
  1407. const r11 = [], n13 = [], s10 = [], o14 = [], i15 = e20.resource, c16 = r9.parse(i15.version || "1.0", "wosr");
  1408. k3.validate(c16);
  1409. const m7 = i15.model.name, p4 = i15.model.geometries, d9 = i15.materialDefinitions, h9 = e20.textures;
  1410. let w5 = 0;
  1411. const b5 = /* @__PURE__ */ new Map();
  1412. for (let u11 = 0; u11 < p4.length; u11++) {
  1413. const e21 = p4[u11];
  1414. if (!M5(e21))
  1415. continue;
  1416. const i16 = T5(e21), c17 = e21.params.vertexAttributes, m8 = [];
  1417. for (const t13 in c17) {
  1418. const e22 = c17[t13], r12 = e22.values;
  1419. m8.push([t13, { data: r12, size: e22.valuesPerElement, exclusive: true }]);
  1420. }
  1421. const v5 = [];
  1422. if ("PerAttributeArray" !== e21.params.topology) {
  1423. const t13 = e21.params.faces;
  1424. for (const e22 in t13)
  1425. v5.push([e22, t13[e22].values]);
  1426. }
  1427. const j4 = h9 && h9[i16.texture];
  1428. if (j4 && !b5.has(i16.texture)) {
  1429. const { image: e22, params: t13 } = j4, r12 = new L4(e22, t13);
  1430. o14.push(r12), b5.set(i16.texture, r12);
  1431. }
  1432. const A7 = b5.get(i16.texture), P6 = A7 ? A7.id : void 0;
  1433. let U5 = s10[i16.material] ? s10[i16.material][i16.texture] : null;
  1434. if (!U5) {
  1435. const e22 = d9[i16.material.substring(i16.material.lastIndexOf("/") + 1)].params;
  1436. 1 === e22.transparency && (e22.transparency = 0);
  1437. const r12 = j4 && j4.alphaChannelUsage, n14 = e22.transparency > 0 || "transparency" === r12 || "maskAndTransparency" === r12, o15 = j4 ? I3(j4.alphaChannelUsage) : void 0, u12 = { ambient: e4(e22.diffuse), diffuse: e4(e22.diffuse), opacity: 1 - (e22.transparency || 0), transparent: n14, textureAlphaMode: o15, textureAlphaCutoff: 0.33, textureId: P6, initTextureTransparent: true, doubleSided: true, cullFace: n9.None, colorMixMode: e22.externalColorMixMode || "tint", textureAlphaPremultiplied: !!j4 && !!j4.params.preMultiplyAlpha };
  1438. r(t12) && t12.materialParamsMixin && Object.assign(u12, t12.materialParamsMixin), U5 = new C3(u12), s10[i16.material] || (s10[i16.material] = {}), s10[i16.material][i16.texture] = U5;
  1439. }
  1440. n13.push(U5);
  1441. const E10 = new d4(m8, v5);
  1442. w5 += v5.position ? v5.position.length : 0, r11.push(E10);
  1443. }
  1444. return { engineResources: [{ name: m7, stageResources: { textures: o14, materials: n13, geometries: r11 }, pivotOffset: i15.model.pivotOffset, numberOfVertices: w5, lodThreshold: null }], referenceBoundingBox: U4(r11) };
  1445. }
  1446. function U4(e20) {
  1447. const t12 = A2();
  1448. return e20.forEach((e21) => {
  1449. const r11 = e21.boundingInfo;
  1450. r(r11) && (c3(t12, r11.getBBMin()), c3(t12, r11.getBBMax()));
  1451. }), t12;
  1452. }
  1453. async function E9(e20, t12) {
  1454. const r11 = [];
  1455. for (const o14 in e20) {
  1456. const n14 = e20[o14], s11 = n14.images[0].data;
  1457. if (!s11) {
  1458. w4.warn("Externally referenced texture data is not yet supported");
  1459. continue;
  1460. }
  1461. const i15 = n14.encoding + ";base64," + s11, u11 = "/textureDefinitions/" + o14, l9 = "rgba" === n14.channels ? n14.alphaChannelUsage || "transparency" : "none", c16 = { noUnpackFlip: true, wrap: { s: D.REPEAT, t: D.REPEAT }, preMultiplyAlpha: I3(l9) !== C.Opaque }, m7 = r(t12) && t12.disableTextures ? Promise.resolve(null) : t6(i15, t12);
  1462. r11.push(m7.then((e21) => ({ refId: u11, image: e21, params: c16, alphaChannelUsage: l9 })));
  1463. }
  1464. const n13 = await Promise.all(r11), s10 = {};
  1465. for (const a10 of n13)
  1466. s10[a10.refId] = a10;
  1467. return s10;
  1468. }
  1469. function I3(e20) {
  1470. switch (e20) {
  1471. case "mask":
  1472. return C.Mask;
  1473. case "maskAndTransparency":
  1474. return C.MaskBlend;
  1475. case "none":
  1476. return C.Opaque;
  1477. default:
  1478. return C.Blend;
  1479. }
  1480. }
  1481. function T5(e20) {
  1482. const t12 = e20.params;
  1483. return { id: 1, material: t12.material, texture: t12.texture, region: t12.texture };
  1484. }
  1485. var k3 = new r9(1, 2, "wosr");
  1486. // node_modules/@arcgis/core/views/3d/layers/graphics/objectResourceUtils.js
  1487. async function Y2(s10, o14) {
  1488. const i15 = Z(a3(s10));
  1489. if ("wosr" === i15.fileType) {
  1490. const e20 = await (o14.cache ? o14.cache.loadWOSR(i15.url, o14) : b4(i15.url, o14)), { engineResources: t12, referenceBoundingBox: r11 } = P5(e20, o14);
  1491. return { lods: t12, referenceBoundingBox: r11, isEsriSymbolResource: false, isWosr: true };
  1492. }
  1493. const n13 = await (o14.cache ? o14.cache.loadGLTF(i15.url, o14, o14.usePBR) : m(new n6(o14.streamDataRequester), i15.url, o14, o14.usePBR)), a10 = q(n13.model.meta, "ESRI_proxyEllipsoid"), u11 = n13.meta.isEsriSymbolResource && r(a10) && n13.meta.uri.includes("/RealisticTrees/");
  1494. u11 && !n13.customMeta.esriTreeRendering && (n13.customMeta.esriTreeRendering = true, ie(n13, a10));
  1495. const l9 = n13.meta.isEsriSymbolResource ? { usePBR: o14.usePBR, isSchematic: false, treeRendering: u11, mrrFactors: [0, 1, 0.2] } : { usePBR: o14.usePBR, isSchematic: false, treeRendering: false, mrrFactors: [0, 1, 0.5] }, c16 = { ...o14.materialParamsMixin, treeRendering: u11 }, { engineResources: m7, referenceBoundingBox: f9 } = ee(n13, l9, c16, o14.skipHighLods && null == i15.specifiedLodIndex ? { skipHighLods: true } : { skipHighLods: false, singleLodIndex: i15.specifiedLodIndex });
  1496. return { lods: m7, referenceBoundingBox: f9, isEsriSymbolResource: n13.meta.isEsriSymbolResource, isWosr: false };
  1497. }
  1498. function Z(e20) {
  1499. const t12 = e20.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);
  1500. if (t12)
  1501. return { fileType: "gltf", url: t12[1], specifiedLodIndex: null != t12[4] ? Number(t12[4]) : null };
  1502. return e20.match(/(.*\.(json|json\.gz))$/) ? { fileType: "wosr", url: e20, specifiedLodIndex: null } : { fileType: "unknown", url: e20, specifiedLodIndex: null };
  1503. }
  1504. function ee(e20, t12, o14, i15) {
  1505. const n13 = e20.model, a10 = new Array(), u11 = /* @__PURE__ */ new Map(), l9 = /* @__PURE__ */ new Map(), c16 = n13.lods.length, m7 = A2();
  1506. return n13.lods.forEach((e21, f9) => {
  1507. const d9 = true === i15.skipHighLods && (c16 > 1 && 0 === f9 || c16 > 3 && 1 === f9) || false === i15.skipHighLods && null != i15.singleLodIndex && f9 !== i15.singleLodIndex;
  1508. if (d9 && 0 !== f9)
  1509. return;
  1510. const p4 = new Array();
  1511. let g8 = 0;
  1512. if (e21.parts.forEach((e22) => {
  1513. const { geometry: t13, vertexCount: s10 } = te(e22);
  1514. p4.push(t13), g8 += s10;
  1515. const o15 = t13.boundingInfo;
  1516. r(o15) && 0 === f9 && (c3(m7, o15.getBBMin()), c3(m7, o15.getBBMax()));
  1517. }), d9)
  1518. return;
  1519. const h9 = new s5(e21.name, { textures: new Array(), materials: new Array(), geometries: p4 }, e21.lodThreshold, [0, 0, 0], g8);
  1520. a10.push(h9), e21.parts.forEach((e22) => {
  1521. const i16 = e22.material + (e22.attributes.normal ? "_normal" : "") + (e22.attributes.color ? "_color" : "") + (e22.attributes.texCoord0 ? "_texCoord0" : "") + (e22.attributes.tangent ? "_tangent" : ""), a11 = n13.materials.get(e22.material), c17 = r(e22.attributes.texCoord0), m8 = r(e22.attributes.normal);
  1522. if (t(a11))
  1523. return;
  1524. const f10 = se(a11.alphaMode);
  1525. if (!u11.has(i16)) {
  1526. if (c17) {
  1527. const e23 = (e24, t13 = false) => {
  1528. if (r(e24) && !l9.has(e24)) {
  1529. const s11 = n13.textures.get(e24);
  1530. r(s11) && l9.set(e24, new L4(s11.data, t13 ? { ...s11.parameters, preMultiplyAlpha: t13 } : s11.parameters));
  1531. }
  1532. };
  1533. e23(a11.textureColor, f10 !== C.Opaque), e23(a11.textureNormal), e23(a11.textureOcclusion), e23(a11.textureEmissive), e23(a11.textureMetallicRoughness);
  1534. }
  1535. const s10 = a11.color[0] ** (1 / o5), d10 = a11.color[1] ** (1 / o5), p5 = a11.color[2] ** (1 / o5), g9 = a11.emissiveFactor[0] ** (1 / o5), x6 = a11.emissiveFactor[1] ** (1 / o5), h10 = a11.emissiveFactor[2] ** (1 / o5), b5 = r(a11.textureColor) && c17 ? l9.get(a11.textureColor) : null;
  1536. u11.set(i16, new C3({ ...t12, transparent: f10 === C.Blend, customDepthTest: e14.Lequal, textureAlphaMode: f10, textureAlphaCutoff: a11.alphaCutoff, diffuse: [s10, d10, p5], ambient: [s10, d10, p5], opacity: a11.opacity, doubleSided: a11.doubleSided, doubleSidedType: "winding-order", cullFace: a11.doubleSided ? n9.None : n9.Back, hasVertexColors: !!e22.attributes.color, hasVertexTangents: !!e22.attributes.tangent, normals: m8 ? "default" : "screenDerivative", castShadows: true, receiveSSAO: true, textureId: r(b5) ? b5.id : void 0, colorMixMode: a11.colorMixMode, normalTextureId: r(a11.textureNormal) && c17 ? l9.get(a11.textureNormal).id : void 0, textureAlphaPremultiplied: r(b5) && !!b5.params.preMultiplyAlpha, occlusionTextureId: r(a11.textureOcclusion) && c17 ? l9.get(a11.textureOcclusion).id : void 0, emissiveTextureId: r(a11.textureEmissive) && c17 ? l9.get(a11.textureEmissive).id : void 0, metallicRoughnessTextureId: r(a11.textureMetallicRoughness) && c17 ? l9.get(a11.textureMetallicRoughness).id : void 0, emissiveFactor: [g9, x6, h10], mrrFactors: [a11.metallicFactor, a11.roughnessFactor, t12.mrrFactors[2]], isSchematic: false, colorTextureTransformMatrix: c8(a11.colorTextureTransform), normalTextureTransformMatrix: c8(a11.normalTextureTransform), occlusionTextureTransformMatrix: c8(a11.occlusionTextureTransform), emissiveTextureTransformMatrix: c8(a11.emissiveTextureTransform), metallicRoughnessTextureTransformMatrix: c8(a11.metallicRoughnessTextureTransform), ...o14 }));
  1537. }
  1538. if (h9.stageResources.materials.push(u11.get(i16)), c17) {
  1539. const e23 = (e24) => {
  1540. r(e24) && h9.stageResources.textures.push(l9.get(e24));
  1541. };
  1542. e23(a11.textureColor), e23(a11.textureNormal), e23(a11.textureOcclusion), e23(a11.textureEmissive), e23(a11.textureMetallicRoughness);
  1543. }
  1544. });
  1545. }), { engineResources: a10, referenceBoundingBox: m7 };
  1546. }
  1547. function te(e20) {
  1548. const t12 = oe(e20.indices || e20.attributes.position.count, e20.primitiveType), s10 = e20.attributes.position.count, i15 = r8(i3, s10);
  1549. t3(i15, e20.attributes.position, e20.transform);
  1550. const n13 = [[O4.POSITION, { data: i15.typedBuffer, size: i15.elementCount, exclusive: true }]], a10 = [[O4.POSITION, t12]];
  1551. if (r(e20.attributes.normal)) {
  1552. const r11 = r8(i3, s10);
  1553. g2(re, e20.transform), r5(r11, e20.attributes.normal, re), n13.push([O4.NORMAL, { data: r11.typedBuffer, size: r11.elementCount, exclusive: true }]), a10.push([O4.NORMAL, t12]);
  1554. }
  1555. if (r(e20.attributes.tangent)) {
  1556. const r11 = r8(c4, s10);
  1557. g2(re, e20.transform), r7(r11, e20.attributes.tangent, re), n13.push([O4.TANGENT, { data: r11.typedBuffer, size: r11.elementCount, exclusive: true }]), a10.push([O4.TANGENT, t12]);
  1558. }
  1559. if (r(e20.attributes.texCoord0)) {
  1560. const r11 = r8(u2, s10);
  1561. n5(r11, e20.attributes.texCoord0), n13.push([O4.UV0, { data: r11.typedBuffer, size: r11.elementCount, exclusive: true }]), a10.push([O4.UV0, t12]);
  1562. }
  1563. if (r(e20.attributes.color)) {
  1564. const r11 = r8(x, s10);
  1565. if (4 === e20.attributes.color.elementCount)
  1566. e20.attributes.color instanceof c4 ? o3(r11, e20.attributes.color, 255) : e20.attributes.color instanceof x ? e11(r11, e20.attributes.color) : e20.attributes.color instanceof L && o3(r11, e20.attributes.color, 1 / 256);
  1567. else {
  1568. t4(r11, 255, 255, 255, 255);
  1569. const t13 = new O2(r11.buffer, 0, 4);
  1570. e20.attributes.color instanceof i3 ? f3(t13, e20.attributes.color, 255) : e20.attributes.color instanceof O2 ? e9(t13, e20.attributes.color) : e20.attributes.color instanceof E2 && f3(t13, e20.attributes.color, 1 / 256);
  1571. }
  1572. n13.push([O4.COLOR, { data: r11.typedBuffer, size: r11.elementCount, exclusive: true }]), a10.push([O4.COLOR, t12]);
  1573. }
  1574. return { geometry: new d4(n13, a10), vertexCount: s10 };
  1575. }
  1576. var re = e6();
  1577. function se(e20) {
  1578. switch (e20) {
  1579. case "BLEND":
  1580. return C.Blend;
  1581. case "MASK":
  1582. return C.Mask;
  1583. case "OPAQUE":
  1584. case null:
  1585. case void 0:
  1586. return C.Opaque;
  1587. }
  1588. }
  1589. function oe(e20, t12) {
  1590. switch (t12) {
  1591. case E3.TRIANGLES:
  1592. return o4(e20);
  1593. case E3.TRIANGLE_STRIP:
  1594. return f4(e20);
  1595. case E3.TRIANGLE_FAN:
  1596. return i6(e20);
  1597. }
  1598. }
  1599. function ie(e20, t12) {
  1600. for (let r11 = 0; r11 < e20.model.lods.length; ++r11) {
  1601. const o14 = e20.model.lods[r11];
  1602. for (const i15 of o14.parts) {
  1603. const o15 = i15.attributes.normal;
  1604. if (t(o15))
  1605. return;
  1606. const g8 = i15.attributes.position, x6 = g8.count, b5 = n2(), T6 = n2(), v5 = n2(), M6 = r8(x, x6), y4 = r8(i3, x6), j4 = h2(e7(), i15.transform);
  1607. for (let s10 = 0; s10 < x6; s10++) {
  1608. g8.getVec(s10, T6), o15.getVec(s10, b5), O(T6, T6, i15.transform), e5(v5, T6, t12.center), i(v5, v5, t12.radius);
  1609. const n13 = v5[2], a10 = s3(v5), p4 = Math.min(0.45 + 0.55 * a10 * a10, 1);
  1610. i(v5, v5, t12.radius), null !== j4 && O(v5, v5, j4), z(v5, v5), r11 + 1 !== e20.model.lods.length && e20.model.lods.length > 1 && A(v5, v5, b5, n13 > -1 ? 0.2 : Math.min(-4 * n13 - 3.8, 1)), y4.setVec(s10, v5), M6.set(s10, 0, 255 * p4), M6.set(s10, 1, 255 * p4), M6.set(s10, 2, 255 * p4), M6.set(s10, 3, 255);
  1611. }
  1612. i15.attributes.normal = y4, i15.attributes.color = M6;
  1613. }
  1614. }
  1615. }
  1616. export {
  1617. Y2 as fetch,
  1618. ee as gltfToEngineResources,
  1619. Z as parseUrl
  1620. };
  1621. //# sourceMappingURL=objectResourceUtils-KV6RC3N7.js.map