ImageryLayerView2D-K3NIEDQI.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. import {
  2. n as n2
  3. } from "./chunk-BQAJGDUA.js";
  4. import {
  5. v
  6. } from "./chunk-IX6RALEM.js";
  7. import {
  8. d as d4,
  9. y as y3
  10. } from "./chunk-3HF3HY4M.js";
  11. import {
  12. a
  13. } from "./chunk-EUHDLMVO.js";
  14. import {
  15. oe
  16. } from "./chunk-QXIGWYMQ.js";
  17. import "./chunk-BU4ZNN5N.js";
  18. import "./chunk-RODWSCDL.js";
  19. import "./chunk-T6DJ6UAT.js";
  20. import {
  21. i as i4
  22. } from "./chunk-MQOWDNF7.js";
  23. import {
  24. u,
  25. y as y2
  26. } from "./chunk-ZOTXRPGC.js";
  27. import "./chunk-KGI3YKHP.js";
  28. import "./chunk-WOGDHLUJ.js";
  29. import {
  30. i as i3
  31. } from "./chunk-QQTL25WV.js";
  32. import "./chunk-J2PY6ANL.js";
  33. import {
  34. d as d3,
  35. o
  36. } from "./chunk-MH3GGTFP.js";
  37. import {
  38. i as i2
  39. } from "./chunk-2ZACOQZJ.js";
  40. import "./chunk-JBMHQ5RK.js";
  41. import "./chunk-WBWQJQK4.js";
  42. import {
  43. s as s3
  44. } from "./chunk-F2YXWZUP.js";
  45. import "./chunk-DBT4KOKX.js";
  46. import "./chunk-2GP5D74I.js";
  47. import "./chunk-6XIF2YUL.js";
  48. import "./chunk-UB42CXQV.js";
  49. import "./chunk-AIG57VB7.js";
  50. import "./chunk-7Y5RTA5Y.js";
  51. import "./chunk-A22ACVMF.js";
  52. import {
  53. J
  54. } from "./chunk-BQIDHLG4.js";
  55. import {
  56. d as d2,
  57. x as x3
  58. } from "./chunk-NSDRZKZG.js";
  59. import {
  60. A
  61. } from "./chunk-SCZJ2KEY.js";
  62. import "./chunk-ST53DRNI.js";
  63. import "./chunk-PCYFSSBL.js";
  64. import "./chunk-ADR6I4L4.js";
  65. import "./chunk-7EM3ZPV7.js";
  66. import "./chunk-WPDBODJM.js";
  67. import "./chunk-5IVP3KUS.js";
  68. import "./chunk-JXYBFGFY.js";
  69. import "./chunk-EPMXCACW.js";
  70. import "./chunk-UCPKJYXN.js";
  71. import "./chunk-KFLNKWNF.js";
  72. import "./chunk-R24MO4IV.js";
  73. import "./chunk-YQBYWPBD.js";
  74. import "./chunk-XBFCIW4K.js";
  75. import "./chunk-T2SKWJGU.js";
  76. import "./chunk-UO3LS2M5.js";
  77. import "./chunk-H2VOWDMO.js";
  78. import "./chunk-QISOH77W.js";
  79. import "./chunk-UWKVAZQ6.js";
  80. import "./chunk-3WXSWAUV.js";
  81. import "./chunk-27YO3FKC.js";
  82. import {
  83. I
  84. } from "./chunk-EQNT4A7P.js";
  85. import "./chunk-4HL6BBWO.js";
  86. import "./chunk-KUO7OCMN.js";
  87. import "./chunk-XO5VJRK4.js";
  88. import "./chunk-DMVKVC5I.js";
  89. import "./chunk-3ZJXLJLL.js";
  90. import "./chunk-4OM3EX6P.js";
  91. import "./chunk-3OFVLRSL.js";
  92. import "./chunk-AFVJXEUJ.js";
  93. import "./chunk-FZSI6IGI.js";
  94. import "./chunk-YFDOPEEZ.js";
  95. import {
  96. i
  97. } from "./chunk-PFY67F6P.js";
  98. import "./chunk-IQBIGNPU.js";
  99. import "./chunk-QU433TMZ.js";
  100. import "./chunk-K7B6OWCU.js";
  101. import "./chunk-YW3ZWYRO.js";
  102. import "./chunk-TFW2HQCV.js";
  103. import "./chunk-BPRMPSTX.js";
  104. import "./chunk-PQGNKUMB.js";
  105. import "./chunk-JEA4MMTV.js";
  106. import "./chunk-RG3AHHRL.js";
  107. import "./chunk-UDYHZLTE.js";
  108. import "./chunk-XHRNCFJT.js";
  109. import "./chunk-DGINNG7Z.js";
  110. import "./chunk-KK6FUQQU.js";
  111. import "./chunk-JQUWFKNU.js";
  112. import "./chunk-RWQH5X3O.js";
  113. import "./chunk-6334AFGG.js";
  114. import "./chunk-IASFQ7K7.js";
  115. import "./chunk-TFHLTN6F.js";
  116. import "./chunk-4VZNS7N2.js";
  117. import "./chunk-O3JQY77G.js";
  118. import "./chunk-IIAN3QNN.js";
  119. import "./chunk-VYQHMPYW.js";
  120. import "./chunk-E3G7BRZB.js";
  121. import "./chunk-WXUHXYJK.js";
  122. import "./chunk-NTERQTPO.js";
  123. import "./chunk-EDHROVWI.js";
  124. import "./chunk-3IRT3YKJ.js";
  125. import "./chunk-SOSOZIX6.js";
  126. import "./chunk-TU7WVKU4.js";
  127. import "./chunk-2QIZS77U.js";
  128. import "./chunk-O2PIYIHJ.js";
  129. import "./chunk-HPD2S4QL.js";
  130. import "./chunk-3HCJD762.js";
  131. import "./chunk-GR4RKUNH.js";
  132. import "./chunk-LTQAWUCK.js";
  133. import "./chunk-W3SLJVWY.js";
  134. import "./chunk-PK4W65H4.js";
  135. import {
  136. g
  137. } from "./chunk-KJZ6SS3P.js";
  138. import "./chunk-OER54WCN.js";
  139. import "./chunk-HOCLACFL.js";
  140. import "./chunk-3MLCBRBA.js";
  141. import "./chunk-WTRZAXRY.js";
  142. import {
  143. x as x2
  144. } from "./chunk-K6QDYFZU.js";
  145. import "./chunk-EY2WJSAJ.js";
  146. import "./chunk-YMULPZCD.js";
  147. import "./chunk-4PNYPUDB.js";
  148. import {
  149. d
  150. } from "./chunk-RDMCXRET.js";
  151. import "./chunk-BQHWPTT7.js";
  152. import "./chunk-ZSW35JPD.js";
  153. import "./chunk-DAWQAVQO.js";
  154. import "./chunk-73AMYZFU.js";
  155. import "./chunk-NKMX5M3L.js";
  156. import "./chunk-MGUVQY3Q.js";
  157. import "./chunk-QEWF7QPH.js";
  158. import "./chunk-PJNBFKPF.js";
  159. import "./chunk-C7742RNZ.js";
  160. import "./chunk-SQ2SY4BX.js";
  161. import "./chunk-VLG7MMVR.js";
  162. import "./chunk-TV3CFJQR.js";
  163. import {
  164. U,
  165. l,
  166. w
  167. } from "./chunk-BWATQC2Y.js";
  168. import "./chunk-6URCZZA6.js";
  169. import "./chunk-U2WD23Z5.js";
  170. import {
  171. g as g2
  172. } from "./chunk-KG45D2XL.js";
  173. import "./chunk-3HZQM2NK.js";
  174. import "./chunk-AR2YN3E2.js";
  175. import "./chunk-U3LEOWJX.js";
  176. import "./chunk-4ONPMX2F.js";
  177. import "./chunk-47NSA4T4.js";
  178. import "./chunk-FUODOQDM.js";
  179. import "./chunk-3WQOA5CB.js";
  180. import "./chunk-FZQZIM7U.js";
  181. import "./chunk-CZBRZ6SU.js";
  182. import "./chunk-VGWC3IKZ.js";
  183. import "./chunk-SWMSD4RP.js";
  184. import "./chunk-UKEN2UNL.js";
  185. import "./chunk-UVVU4UUO.js";
  186. import "./chunk-O6VYMEIX.js";
  187. import "./chunk-X4SA4ELJ.js";
  188. import "./chunk-XJCUT65M.js";
  189. import "./chunk-PE24J2I5.js";
  190. import "./chunk-P3XKUGLS.js";
  191. import "./chunk-U7RKABRB.js";
  192. import "./chunk-X7CNGECX.js";
  193. import "./chunk-PSEI52P3.js";
  194. import "./chunk-ZLNEXZAN.js";
  195. import "./chunk-5UVJ64RB.js";
  196. import "./chunk-AUOH2VSO.js";
  197. import "./chunk-ZYRIJWLX.js";
  198. import "./chunk-RYY6632W.js";
  199. import "./chunk-DW42UVIT.js";
  200. import "./chunk-TJNOJH33.js";
  201. import "./chunk-YAEIHDJH.js";
  202. import "./chunk-OSHI574D.js";
  203. import "./chunk-44GMIOGP.js";
  204. import "./chunk-75U5LM2V.js";
  205. import "./chunk-ZHRAUKVQ.js";
  206. import "./chunk-RZK6A2GY.js";
  207. import {
  208. j as j2
  209. } from "./chunk-4NQ74ZR6.js";
  210. import "./chunk-X4LLOW7U.js";
  211. import "./chunk-BDA6VH2A.js";
  212. import "./chunk-Z4JTBD7M.js";
  213. import "./chunk-MSBIHK67.js";
  214. import "./chunk-HZRKBTHJ.js";
  215. import {
  216. U as U2
  217. } from "./chunk-5DMBXPN2.js";
  218. import "./chunk-QANZ6BFY.js";
  219. import "./chunk-VEGAOVMY.js";
  220. import {
  221. w as w2,
  222. w2 as w3
  223. } from "./chunk-CXCDYJ5R.js";
  224. import "./chunk-GAOW3WRZ.js";
  225. import "./chunk-QCKFNSN2.js";
  226. import {
  227. e,
  228. m,
  229. n5 as n,
  230. y3 as y
  231. } from "./chunk-6SOHRC7T.js";
  232. import "./chunk-U2XHEJM7.js";
  233. import "./chunk-SQOPWYIT.js";
  234. import "./chunk-6KZ2LTDA.js";
  235. import {
  236. j,
  237. x
  238. } from "./chunk-V6P2MAQQ.js";
  239. import {
  240. s2 as s,
  241. s3 as s2
  242. } from "./chunk-E5O6P5I2.js";
  243. import "./chunk-SPWQ3AWG.js";
  244. import "./chunk-2TIUKVZN.js";
  245. import {
  246. e as e2,
  247. r,
  248. t
  249. } from "./chunk-YXWMMD76.js";
  250. import "./chunk-S5KM4IGW.js";
  251. // node_modules/@arcgis/core/views/2d/layers/imagery/ImageryView2D.js
  252. var d5 = class extends m {
  253. constructor() {
  254. super(...arguments), this.attached = false, this.container = new i2(), this.updateRequested = false, this.type = "imagery", this._bitmapView = new a();
  255. }
  256. destroy() {
  257. this.attached && (this.detach(), this.attached = false), this.updateRequested = false;
  258. }
  259. get updating() {
  260. return !this.attached || this.isUpdating();
  261. }
  262. update(e3) {
  263. this.strategy.update(e3).catch((e4) => {
  264. j(e4) || s.getLogger(this.declaredClass).error(e4);
  265. });
  266. }
  267. hitTest(e3) {
  268. return new g({ attributes: {}, geometry: e3.clone(), layer: this.layer });
  269. }
  270. attach() {
  271. this.container.addChild(this._bitmapView);
  272. const e3 = this.layer.version >= 10, t3 = this.layer.version >= 10.1 ? this.layer.imageMaxHeight : 2048, r2 = this.layer.version >= 10.1 ? this.layer.imageMaxWidth : 2048;
  273. this.strategy = new v({ container: this._bitmapView, imageNormalizationSupported: e3, imageMaxHeight: t3, imageMaxWidth: r2, fetchSource: this._fetchImage.bind(this), requestUpdate: () => this.requestUpdate() });
  274. }
  275. detach() {
  276. this.strategy.destroy(), this._bitmapView.removeAllChildren(), this.container.removeAllChildren(), this.updateRequested = false;
  277. }
  278. redraw() {
  279. this.strategy.updateExports(async (e3) => {
  280. var _a;
  281. if (e3.source instanceof HTMLImageElement)
  282. return;
  283. const t3 = await this.layer.applyRenderer({ extent: e3.source.extent, pixelBlock: (_a = e3.source.originalPixelBlock) != null ? _a : e3.source.pixelBlock }), r2 = e3.source;
  284. r2.filter = (e4) => this.layer.pixelFilter ? this.layer.applyFilter(e4) : { ...t3, extent: r2.extent };
  285. }).catch((e3) => {
  286. j(e3) || s.getLogger(this.declaredClass).error(e3);
  287. });
  288. }
  289. requestUpdate() {
  290. this.updateRequested || (this.updateRequested = true, this.view.requestUpdate());
  291. }
  292. isUpdating() {
  293. return this.strategy.updating || this.updateRequested;
  294. }
  295. getPixelData() {
  296. if (this.updating)
  297. return null;
  298. const e3 = this.strategy.bitmaps;
  299. if (1 === e3.length && e3[0].source)
  300. return { extent: e3[0].source.extent, pixelBlock: e3[0].source.originalPixelBlock };
  301. if (e3.length > 1) {
  302. const t3 = this.view.extent, r2 = e3.map((e4) => e4.source).filter((e4) => e4.extent && e4.extent.intersects(t3)).map((e4) => ({ extent: e4.extent, pixelBlock: e4.originalPixelBlock })), i5 = A(r2, t3);
  303. return r(i5) ? { extent: i5.extent, pixelBlock: i5.pixelBlock } : null;
  304. }
  305. return null;
  306. }
  307. _fetchImage(e3, t3, r2, i5) {
  308. return (i5 = i5 || {}).timeExtent = this.timeExtent, i5.requestAsImageElement = true, this.layer.fetchImage(e3, t3, r2, i5).then((e4) => e4.imageOrCanvasElement ? e4.imageOrCanvasElement : this.layer.applyRenderer(e4.pixelData, { signal: i5.signal }).then((t4) => {
  309. const r3 = new i3(t4.pixelBlock, t4.extent.clone(), e4.pixelData.pixelBlock);
  310. return r3.filter = (e5) => this.layer.applyFilter(e5), r3;
  311. }));
  312. }
  313. };
  314. e([y()], d5.prototype, "attached", void 0), e([y()], d5.prototype, "container", void 0), e([y()], d5.prototype, "layer", void 0), e([y()], d5.prototype, "strategy", void 0), e([y()], d5.prototype, "timeExtent", void 0), e([y()], d5.prototype, "view", void 0), e([y()], d5.prototype, "updateRequested", void 0), e([y()], d5.prototype, "updating", null), e([y()], d5.prototype, "type", void 0), d5 = e([n("esri.views.2d.layers.imagery.ImageryView2D")], d5);
  315. var u2 = d5;
  316. // node_modules/@arcgis/core/views/2d/engine/imagery/RasterVFContainer.js
  317. var t2 = class extends o {
  318. constructor() {
  319. super(...arguments), this.symbolTypes = ["triangle"];
  320. }
  321. get requiresDedicatedFBO() {
  322. return false;
  323. }
  324. prepareRenderPasses(s4) {
  325. const t3 = s4.registerRenderPass({ name: "imagery (vf)", brushes: [d3], target: () => this.children, drawPhase: I.MAP });
  326. return [...super.prepareRenderPasses(s4), t3];
  327. }
  328. doRender(e3) {
  329. this.visible && e3.drawPhase === I.MAP && this.symbolTypes.forEach((r2) => {
  330. e3.renderPass = r2, super.doRender(e3);
  331. });
  332. }
  333. };
  334. // node_modules/@arcgis/core/views/2d/layers/imagery/ImageryVFStrategy.js
  335. var p = class extends m {
  336. constructor(e3) {
  337. super(e3), this.update = x((e4, t3) => this._update(e4, t3).catch((e5) => {
  338. j(e5) || s.getLogger(this.declaredClass).error(e5);
  339. }));
  340. }
  341. get updating() {
  342. return !!this._loading;
  343. }
  344. redraw(e3) {
  345. if (!this.container.children.length)
  346. return;
  347. const t3 = this.container.children[0];
  348. t3.symbolizerParameters = e3, t3.invalidateVAO(), this.container.symbolTypes = "wind_speed" === e3.style ? ["scalar", "triangle"] : "simple_scalar" === e3.style ? ["scalar"] : ["triangle"], this.container.requestRender();
  349. }
  350. async _update(e3, t3, r2) {
  351. if (!e3.stationary)
  352. return;
  353. const { extent: i5, spatialReference: s4 } = e3.state, o2 = new w3({ xmin: i5.xmin, ymin: i5.ymin, xmax: i5.xmax, ymax: i5.ymax, spatialReference: s4 }), [a2, n3] = e3.state.size;
  354. this._loading = this.fetchPixels(o2, a2, n3, r2);
  355. const c = await this._loading;
  356. this._addToDisplay(c, t3, e3.state), this._loading = null;
  357. }
  358. _addToDisplay(e3, t3, r2) {
  359. if (t(e3.pixelBlock))
  360. return this.container.children.forEach((e4) => e4.destroy()), void this.container.removeAllChildren();
  361. const { extent: s4, pixelBlock: o2 } = e3, a2 = new y3(o2);
  362. a2.offset = [0, 0], a2.symbolizerParameters = t3, a2.rawPixelData = e3, a2.invalidateVAO(), a2.x = s4.xmin, a2.y = s4.ymax, a2.pixelRatio = r2.pixelRatio, a2.rotation = r2.rotation, a2.resolution = r2.resolution, a2.width = o2.width * t3.symbolTileSize, a2.height = o2.height * t3.symbolTileSize, this.container.children.forEach((e4) => e4.destroy()), this.container.removeAllChildren(), this.container.symbolTypes = "wind_speed" === t3.style ? ["scalar", "triangle"] : "simple_scalar" === t3.style ? ["scalar"] : ["triangle"], this.container.addChild(a2);
  363. }
  364. };
  365. e([y()], p.prototype, "fetchPixels", void 0), e([y()], p.prototype, "container", void 0), e([y()], p.prototype, "_loading", void 0), e([y()], p.prototype, "updating", null), p = e([n("esri.views.2d.layers.imagery.ImageryVFStrategy")], p);
  366. var m2 = p;
  367. // node_modules/@arcgis/core/views/2d/layers/imagery/VectorFieldView2D.js
  368. var f = class extends d {
  369. constructor() {
  370. super(...arguments), this.attached = false, this.container = new t2(), this.type = "imageryVF", this._dataParameters = { exportParametersVersion: 0, bbox: "", symbolTileSize: 0, time: "" }, this._fetchpixels = async (e3, t3, r2, i5) => {
  371. const n3 = await this._projectFullExtentPromise, { symbolTileSize: l2 } = this.layer.renderer, { extent: c, width: m4, height: p2 } = x3(e3, t3, r2, l2, n3);
  372. if (r(n3) && !n3.intersects(e3))
  373. return { extent: c, pixelBlock: null };
  374. const h = { bbox: `${c.xmin}, ${c.ymin}, ${c.xmax}, ${c.ymax}`, exportParametersVersion: this.layer.exportImageServiceParameters.version, symbolTileSize: l2, time: JSON.stringify(this.timeExtent || "") };
  375. if (this._canReuseVectorFieldData(h)) {
  376. const e4 = this.getPixelData();
  377. if (r(e4)) {
  378. if (`${e4.extent.xmin}, ${e4.extent.ymin}, ${e4.extent.xmax}, ${e4.extent.ymax}` === h.bbox)
  379. return e4;
  380. }
  381. }
  382. const { pixelData: u3 } = await this.layer.fetchImage(c, m4, p2, { timeExtent: this.timeExtent, requestAsImageElement: false, signal: i5 });
  383. if (this._dataParameters = h, t(u3.pixelBlock))
  384. return { extent: c, pixelBlock: null };
  385. return { extent: c, pixelBlock: "vector-uv" === this.layer.rasterInfo.dataType ? e2(d2(u3.pixelBlock, "vector-uv")) : u3.pixelBlock };
  386. };
  387. }
  388. get updating() {
  389. return !this.attached || this._strategy.updating;
  390. }
  391. attach() {
  392. this._projectFullExtentPromise = this._getProjectedFullExtent(this.view.spatialReference), this._strategy = new m2({ container: this.container, fetchPixels: this._fetchpixels }), this.handles.add(l(() => this.layer.renderer, (e3) => this._updateSymbolizerParams(e3), w), "vector-field-view-update");
  393. }
  394. detach() {
  395. this._strategy.destroy(), this.container.children.forEach((e3) => e3.destroy()), this.container.removeAllChildren(), this.handles.remove("vector-field-view-update"), this._strategy = this.container = this._projectFullExtentPromise = null;
  396. }
  397. getPixelData() {
  398. if (this.updating || !this.container.children.length)
  399. return null;
  400. const { extent: e3, pixelBlock: t3 } = this.container.children[0].rawPixelData;
  401. return { extent: e3, pixelBlock: t3 };
  402. }
  403. hitTest(e3) {
  404. return new g({ attributes: {}, geometry: e3.clone(), layer: this.layer });
  405. }
  406. update(e3) {
  407. this._strategy.update(e3, this._symbolizerParams);
  408. }
  409. redraw() {
  410. this._updateSymbolizerParams(this.layer.renderer), this._strategy.redraw(this._symbolizerParams);
  411. }
  412. _canReuseVectorFieldData(e3) {
  413. const t3 = this._dataParameters.exportParametersVersion === e3.exportParametersVersion, r2 = this._dataParameters.time === e3.time, i5 = this._dataParameters.symbolTileSize === e3.symbolTileSize, s4 = this._dataParameters.bbox === e3.bbox;
  414. return t3 && r2 && i5 && s4;
  415. }
  416. async _getProjectedFullExtent(e3) {
  417. try {
  418. return await J(this.layer.fullExtent, e3);
  419. } catch (t3) {
  420. try {
  421. const t4 = (await U2(this.layer.url, { query: { option: "footprints", outSR: e3.wkid || JSON.stringify(e3.toJSON()), f: "json" } })).data.featureCollection.layers[0].layerDefinition.extent;
  422. return t4 ? w3.fromJSON(t4) : null;
  423. } catch {
  424. return null;
  425. }
  426. }
  427. }
  428. _updateSymbolizerParams(e3) {
  429. "vector-field" === e3.type && (this._symbolizerParams = this.layer.symbolizer.generateWebGLParameters({ pixelBlock: null }));
  430. }
  431. };
  432. e([y()], f.prototype, "attached", void 0), e([y()], f.prototype, "container", void 0), e([y()], f.prototype, "layer", void 0), e([y()], f.prototype, "timeExtent", void 0), e([y()], f.prototype, "type", void 0), e([y()], f.prototype, "view", void 0), e([y()], f.prototype, "updating", null), f = e([n("esri.views.2d.layers.imagery.VectorFieldView2D")], f);
  433. var g3 = f;
  434. // node_modules/@arcgis/core/views/layers/ImageryLayerView.js
  435. var m3 = (m4) => {
  436. let c = class extends m4 {
  437. constructor() {
  438. super(...arguments), this.view = null;
  439. }
  440. async fetchPopupFeatures(e3, s4) {
  441. const { layer: p2 } = this;
  442. if (!e3)
  443. throw new s2("imagerylayerview:fetchPopupFeatures", "Nothing to fetch without area", { layer: p2 });
  444. const { popupEnabled: a2 } = p2, m5 = s3(p2, s4);
  445. if (!a2 || t(m5))
  446. throw new s2("imagerylayerview:fetchPopupFeatures", "Missing required popupTemplate or popupEnabled", { popupEnabled: a2, popupTemplate: m5 });
  447. const c2 = await m5.getRequiredFields(), l2 = new x2();
  448. l2.timeExtent = this.timeExtent, l2.geometry = e3, l2.outFields = c2, l2.outSpatialReference = e3.spatialReference;
  449. const y4 = this.view.resolution, w4 = "2d" === this.view.type ? new w2(y4, y4, this.view.spatialReference) : new w2(0.5 * y4, 0.5 * y4, this.view.spatialReference), { returnTopmostRaster: d6, showNoDataRecords: h } = m5.layerOptions || { returnTopmostRaster: true, showNoDataRecords: false }, f2 = { returnDomainValues: true, returnTopmostRaster: d6, pixelSize: w4, showNoDataRecords: h, signal: r(s4) ? s4.signal : null };
  450. return p2.queryVisibleRasters(l2, f2).then((e4) => e4);
  451. }
  452. canResume() {
  453. var _a;
  454. return !!super.canResume() && !((_a = this.timeExtent) == null ? void 0 : _a.isEmpty);
  455. }
  456. };
  457. return e([y()], c.prototype, "layer", void 0), e([y()], c.prototype, "suspended", void 0), e([y(g2)], c.prototype, "timeExtent", void 0), e([y()], c.prototype, "view", void 0), c = e([n("esri.views.layers.ImageryLayerView")], c), c;
  458. };
  459. // node_modules/@arcgis/core/views/2d/layers/ImageryLayerView2D.js
  460. var g4 = class extends m3(i4(y2(u))) {
  461. constructor() {
  462. super(...arguments), this._exportImageVersion = -1, this._highlightGraphics = new i(), this.subview = null;
  463. }
  464. get pixelData() {
  465. return this.updating ? null : "getPixelData" in this.subview ? this.subview.getPixelData() : null;
  466. }
  467. async hitTest(e3, i5) {
  468. return this.subview ? [{ type: "graphic", graphic: this.subview.hitTest(e3), layer: this.layer, mapPoint: e3 }] : null;
  469. }
  470. update(e3) {
  471. var _a;
  472. (_a = this.subview) == null ? void 0 : _a.update(e3);
  473. }
  474. attach() {
  475. this.layer.increaseRasterJobHandlerUsage(), this._setSubView(), this.view && (this._highlightView = new oe({ view: this.view, graphics: this._highlightGraphics, requestUpdateCallback: () => this.requestUpdate(), container: new n2(this.view.featuresTilingScheme) }), this.container.addChild(this._highlightView.container)), this.handles.add([l(() => {
  476. var _a;
  477. return (_a = this.layer.blendMode) != null ? _a : "normal";
  478. }, (e3) => this.subview.container.blendMode = e3, w), l(() => {
  479. var _a;
  480. return (_a = this.layer.effect) != null ? _a : null;
  481. }, (e3) => this.subview.container.effect = e3, w), l(() => this.layer.exportImageServiceParameters.version, (e3) => {
  482. e3 && this._exportImageVersion !== e3 && (this._exportImageVersion = e3, this.requestUpdate());
  483. }, U), l(() => this.timeExtent, (e3) => {
  484. this.subview.timeExtent = e3, "redraw" in this.subview ? this.requestUpdate() : this.subview.redrawOrRefetch();
  485. }, U), this.layer.on("redraw", () => {
  486. "redraw" in this.subview ? this.subview.redraw() : this.subview.redrawOrRefetch();
  487. }), l(() => this.layer.renderer, () => this._setSubView())], "imagerylayerview-update");
  488. }
  489. detach() {
  490. var _a, _b;
  491. this.layer.decreaseRasterJobHandlerUsage(), this.container.removeAllChildren(), this._detachSubview(this.subview), (_a = this.subview) == null ? void 0 : _a.destroy(), this.handles.remove("imagerylayerview-update"), this.subview = null, (_b = this._highlightView) == null ? void 0 : _b.destroy(), this._exportImageVersion = -1;
  492. }
  493. moveStart() {
  494. }
  495. viewChange() {
  496. }
  497. moveEnd() {
  498. this.requestUpdate();
  499. }
  500. highlight(e3, r2) {
  501. if (!((Array.isArray(e3) ? e3[0] : j2.isCollection(e3) ? e3.getItemAt(0) : e3) instanceof g))
  502. return { remove: () => {
  503. } };
  504. let s4 = [];
  505. return Array.isArray(e3) || j2.isCollection(e3) ? s4 = e3.map((e4) => e4.clone()) : e3 instanceof g && (s4 = [e3.clone()]), this._highlightGraphics.addMany(s4), { remove: () => {
  506. this._highlightGraphics.removeMany(s4);
  507. } };
  508. }
  509. async doRefresh() {
  510. this.requestUpdate();
  511. }
  512. isUpdating() {
  513. return !this.subview || this.subview.updating;
  514. }
  515. _setSubView() {
  516. var _a, _b;
  517. if (!this.view)
  518. return;
  519. const e3 = (_a = this.layer.renderer) == null ? void 0 : _a.type;
  520. let i5 = "imagery";
  521. if ("vector-field" === e3 ? i5 = "imageryVF" : "flow" === e3 && (i5 = "flow"), this.subview) {
  522. const { type: e4 } = this.subview;
  523. if (e4 === i5)
  524. return this._attachSubview(this.subview), void ("flow" === e4 ? this.subview.redrawOrRefetch() : "imagery" === e4 && "lerc" === this.layer.format ? this.subview.redraw() : this.requestUpdate());
  525. this._detachSubview(this.subview), (_b = this.subview) == null ? void 0 : _b.destroy();
  526. }
  527. this.subview = "imagery" === i5 ? new u2({ layer: this.layer, view: this.view, timeExtent: this.timeExtent }) : "imageryVF" === i5 ? new g3({ layer: this.layer, view: this.view, timeExtent: this.timeExtent }) : new d4({ layer: this.layer, layerView: this }), this._attachSubview(this.subview), this.requestUpdate();
  528. }
  529. _attachSubview(e3) {
  530. e3 && !e3.attached && (e3.attach(), e3.attached = true, this.container.addChildAt(e3.container, 0), e3.container.blendMode = this.layer.blendMode, e3.container.effect = this.layer.effect);
  531. }
  532. _detachSubview(e3) {
  533. (e3 == null ? void 0 : e3.attached) && (this.container.removeChild(e3.container), e3.detach(), e3.attached = false);
  534. }
  535. };
  536. e([y()], g4.prototype, "pixelData", null), e([y()], g4.prototype, "subview", void 0), g4 = e([n("esri.views.2d.layers.ImageryLayerView2D")], g4);
  537. var b = g4;
  538. export {
  539. b as default
  540. };
  541. //# sourceMappingURL=ImageryLayerView2D-K3NIEDQI.js.map