mapViewDeps-F36EWNMM.js 172 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303
  1. import {
  2. T as T2,
  3. o as o6,
  4. y as y3
  5. } from "./chunk-SBZKLPXX.js";
  6. import {
  7. i as i5
  8. } from "./chunk-54V4THCX.js";
  9. import {
  10. oe
  11. } from "./chunk-DTSCAH2R.js";
  12. import "./chunk-B5WNDDCF.js";
  13. import {
  14. n as n10
  15. } from "./chunk-267VUXDM.js";
  16. import "./chunk-DXEPL3XQ.js";
  17. import "./chunk-E5TKVDJT.js";
  18. import "./chunk-XYIYXU3I.js";
  19. import "./chunk-T6DJ6UAT.js";
  20. import "./chunk-WOGDHLUJ.js";
  21. import {
  22. m as m3,
  23. n as n11,
  24. n2 as n12,
  25. n3 as n13,
  26. t as t7,
  27. t2 as t8
  28. } from "./chunk-264YGWEE.js";
  29. import {
  30. i as i4,
  31. r as r8
  32. } from "./chunk-ZLQP3WDC.js";
  33. import {
  34. c as c2,
  35. o as o5
  36. } from "./chunk-4O76IJGT.js";
  37. import "./chunk-42RTSVHV.js";
  38. import {
  39. n as n9
  40. } from "./chunk-WCLXPK5D.js";
  41. import {
  42. e as e7,
  43. e2 as e8
  44. } from "./chunk-JBMHQ5RK.js";
  45. import "./chunk-KHMWUB3W.js";
  46. import {
  47. t as t6
  48. } from "./chunk-YBHZ7PMT.js";
  49. import "./chunk-LDMWL65U.js";
  50. import {
  51. E as E4,
  52. a as a7,
  53. s as s7,
  54. x
  55. } from "./chunk-WBWQJQK4.js";
  56. import "./chunk-A22ACVMF.js";
  57. import "./chunk-TDS6IBMU.js";
  58. import "./chunk-DBT4KOKX.js";
  59. import {
  60. T
  61. } from "./chunk-L553EHL3.js";
  62. import "./chunk-2GP5D74I.js";
  63. import "./chunk-T5IRDDBF.js";
  64. import "./chunk-ZELEU5PN.js";
  65. import "./chunk-O7E4VYJT.js";
  66. import "./chunk-AIG57VB7.js";
  67. import {
  68. t as t5
  69. } from "./chunk-PHAKVYRM.js";
  70. import {
  71. s as s6
  72. } from "./chunk-22KBQSDB.js";
  73. import {
  74. e2 as e3
  75. } from "./chunk-IDINBHDV.js";
  76. import "./chunk-6LE4RPMZ.js";
  77. import {
  78. e as e2,
  79. n as n6,
  80. o as o4
  81. } from "./chunk-67RFR4NT.js";
  82. import {
  83. o as o3
  84. } from "./chunk-WPDBODJM.js";
  85. import {
  86. i as i2
  87. } from "./chunk-5IVP3KUS.js";
  88. import "./chunk-JXYBFGFY.js";
  89. import {
  90. P as P2
  91. } from "./chunk-EPMXCACW.js";
  92. import "./chunk-UCPKJYXN.js";
  93. import {
  94. t as t4
  95. } from "./chunk-KFLNKWNF.js";
  96. import "./chunk-R24MO4IV.js";
  97. import "./chunk-YQBYWPBD.js";
  98. import "./chunk-UWKVAZQ6.js";
  99. import "./chunk-XBFCIW4K.js";
  100. import {
  101. Ae,
  102. Be,
  103. De,
  104. Ee,
  105. Ie,
  106. Me,
  107. Ne,
  108. Te,
  109. Ue,
  110. _e,
  111. ve,
  112. we
  113. } from "./chunk-T2SKWJGU.js";
  114. import "./chunk-UO3LS2M5.js";
  115. import {
  116. E as E3
  117. } from "./chunk-H2VOWDMO.js";
  118. import {
  119. d as d3
  120. } from "./chunk-QISOH77W.js";
  121. import "./chunk-4HL6BBWO.js";
  122. import "./chunk-KUO7OCMN.js";
  123. import {
  124. B as B2,
  125. C as C2,
  126. I as I2,
  127. J,
  128. N,
  129. O as O2,
  130. U as U2,
  131. V as V2,
  132. Y as Y2,
  133. bt,
  134. et,
  135. wt,
  136. xt,
  137. y as y2,
  138. z
  139. } from "./chunk-XO5VJRK4.js";
  140. import "./chunk-ST53DRNI.js";
  141. import "./chunk-3WXSWAUV.js";
  142. import "./chunk-27YO3FKC.js";
  143. import {
  144. E as E2,
  145. I as I3,
  146. O as O3,
  147. S
  148. } from "./chunk-EQNT4A7P.js";
  149. import {
  150. t as t3
  151. } from "./chunk-4OM3EX6P.js";
  152. import {
  153. B,
  154. C,
  155. D as D2,
  156. E,
  157. F,
  158. G,
  159. I,
  160. L,
  161. M,
  162. O,
  163. P,
  164. R,
  165. V,
  166. Y
  167. } from "./chunk-3OFVLRSL.js";
  168. import "./chunk-DMVKVC5I.js";
  169. import "./chunk-VEJPYAE4.js";
  170. import "./chunk-UMUHMVL4.js";
  171. import "./chunk-FZSI6IGI.js";
  172. import {
  173. P as P3,
  174. e as e6,
  175. e2 as e9,
  176. m as m4
  177. } from "./chunk-4NE3ZC7B.js";
  178. import {
  179. $,
  180. Gt,
  181. Rt,
  182. St,
  183. bt as bt2,
  184. nt,
  185. pt,
  186. u as u2
  187. } from "./chunk-PTEMIS7J.js";
  188. import "./chunk-YFDOPEEZ.js";
  189. import {
  190. e as e5
  191. } from "./chunk-IQBIGNPU.js";
  192. import "./chunk-AJFR3FGC.js";
  193. import {
  194. n as n8,
  195. r as r7
  196. } from "./chunk-K7B6OWCU.js";
  197. import "./chunk-LXOC7SMQ.js";
  198. import "./chunk-QU433TMZ.js";
  199. import "./chunk-L5DZVCCW.js";
  200. import "./chunk-WNPL3C7R.js";
  201. import "./chunk-E7ZLMIQ7.js";
  202. import "./chunk-JEA4MMTV.js";
  203. import "./chunk-RG3AHHRL.js";
  204. import "./chunk-XHRNCFJT.js";
  205. import {
  206. n as n7
  207. } from "./chunk-UDYHZLTE.js";
  208. import {
  209. l as l3
  210. } from "./chunk-QC7NCR5N.js";
  211. import "./chunk-VQXMCZYH.js";
  212. import "./chunk-JQUWFKNU.js";
  213. import {
  214. o as o2,
  215. r as r6
  216. } from "./chunk-RWQH5X3O.js";
  217. import "./chunk-6334AFGG.js";
  218. import {
  219. e as e4
  220. } from "./chunk-6FXLJAMI.js";
  221. import "./chunk-CC74Y7ET.js";
  222. import "./chunk-TFHLTN6F.js";
  223. import {
  224. M as M2,
  225. f as f3,
  226. h as h2,
  227. l as l2
  228. } from "./chunk-O3JQY77G.js";
  229. import {
  230. a as a5,
  231. r as r5,
  232. s as s5
  233. } from "./chunk-E3G7BRZB.js";
  234. import {
  235. n as n5
  236. } from "./chunk-CFVLY6NB.js";
  237. import "./chunk-KOKTANE6.js";
  238. import "./chunk-JKFWEHNK.js";
  239. import "./chunk-IIAN3QNN.js";
  240. import "./chunk-P24XEEHY.js";
  241. import "./chunk-WOXHUQGM.js";
  242. import "./chunk-FMPQIGFA.js";
  243. import "./chunk-EDHROVWI.js";
  244. import "./chunk-3IRT3YKJ.js";
  245. import "./chunk-SAJAEMIJ.js";
  246. import "./chunk-TU7WVKU4.js";
  247. import "./chunk-JAUFBT5U.js";
  248. import "./chunk-ZOO4I2U4.js";
  249. import "./chunk-HZ2WKB3G.js";
  250. import "./chunk-3HCJD762.js";
  251. import "./chunk-RVCE264D.js";
  252. import "./chunk-HKJ7X3BD.js";
  253. import "./chunk-Y74D3LKQ.js";
  254. import {
  255. i as i3
  256. } from "./chunk-PK4W65H4.js";
  257. import "./chunk-7C23ILQ4.js";
  258. import "./chunk-P6VVVEX6.js";
  259. import "./chunk-3Z755LKF.js";
  260. import "./chunk-LTZ5XXDV.js";
  261. import "./chunk-IEU3AM37.js";
  262. import "./chunk-DLMAGHHC.js";
  263. import "./chunk-JOYXMSKE.js";
  264. import {
  265. a as a6
  266. } from "./chunk-YZVAB3DF.js";
  267. import "./chunk-JLYTER4T.js";
  268. import "./chunk-CRHRHOXH.js";
  269. import "./chunk-ZSW35JPD.js";
  270. import "./chunk-JLSNMUQJ.js";
  271. import "./chunk-ECY35CJI.js";
  272. import "./chunk-PT62335L.js";
  273. import "./chunk-PJNBFKPF.js";
  274. import "./chunk-C7742RNZ.js";
  275. import "./chunk-FNA5GLRW.js";
  276. import "./chunk-MCWCB5IY.js";
  277. import "./chunk-TV3CFJQR.js";
  278. import {
  279. f as f2,
  280. h,
  281. l
  282. } from "./chunk-TJV6ODRM.js";
  283. import {
  284. m as m2
  285. } from "./chunk-3LVSQLWJ.js";
  286. import "./chunk-4ONPMX2F.js";
  287. import "./chunk-CRGY2SDS.js";
  288. import "./chunk-4T5ZGMEN.js";
  289. import "./chunk-3WQOA5CB.js";
  290. import "./chunk-FZQZIM7U.js";
  291. import "./chunk-CZBRZ6SU.js";
  292. import "./chunk-VGWC3IKZ.js";
  293. import "./chunk-2H5MD622.js";
  294. import "./chunk-3RSFVUKZ.js";
  295. import {
  296. c,
  297. i,
  298. u
  299. } from "./chunk-UVVU4UUO.js";
  300. import "./chunk-O6VYMEIX.js";
  301. import "./chunk-X4SA4ELJ.js";
  302. import "./chunk-5N7JLUJJ.js";
  303. import "./chunk-ZAY3CMAZ.js";
  304. import "./chunk-P3XKUGLS.js";
  305. import {
  306. j as j2
  307. } from "./chunk-2ZSOO377.js";
  308. import "./chunk-LU5IJZB4.js";
  309. import "./chunk-7IBV2TRE.js";
  310. import "./chunk-ZLNEXZAN.js";
  311. import "./chunk-5UVJ64RB.js";
  312. import "./chunk-SFEFRQCL.js";
  313. import "./chunk-3GZSQU56.js";
  314. import "./chunk-ZYRIJWLX.js";
  315. import {
  316. a as a4
  317. } from "./chunk-RYY6632W.js";
  318. import {
  319. g,
  320. o,
  321. s as s4
  322. } from "./chunk-DW42UVIT.js";
  323. import "./chunk-YAEIHDJH.js";
  324. import {
  325. n as n4,
  326. r as r3
  327. } from "./chunk-TJNOJH33.js";
  328. import {
  329. r as r4
  330. } from "./chunk-OSHI574D.js";
  331. import "./chunk-ETGAZ7LF.js";
  332. import "./chunk-75U5LM2V.js";
  333. import "./chunk-RMDDCMKS.js";
  334. import "./chunk-VCH45Q2I.js";
  335. import "./chunk-LBW34VZ2.js";
  336. import "./chunk-GSSTTHIT.js";
  337. import "./chunk-YFSLJIO4.js";
  338. import {
  339. n as n3
  340. } from "./chunk-IM3LVQXV.js";
  341. import "./chunk-55RWC67C.js";
  342. import "./chunk-HZRKBTHJ.js";
  343. import {
  344. U
  345. } from "./chunk-DVUG3KID.js";
  346. import "./chunk-FWSQEIAR.js";
  347. import {
  348. It
  349. } from "./chunk-VEGAOVMY.js";
  350. import {
  351. w
  352. } from "./chunk-6T6G6LCQ.js";
  353. import "./chunk-YEJL5NEF.js";
  354. import "./chunk-PQFTYGF5.js";
  355. import {
  356. A,
  357. e,
  358. m,
  359. n4 as n,
  360. n5 as n2,
  361. t2,
  362. y3 as y
  363. } from "./chunk-2Z2TG5CU.js";
  364. import "./chunk-6KZ2LTDA.js";
  365. import "./chunk-U2XHEJM7.js";
  366. import "./chunk-SQOPWYIT.js";
  367. import {
  368. D,
  369. a as a3,
  370. b,
  371. d as d2,
  372. f,
  373. j,
  374. r2,
  375. v
  376. } from "./chunk-V6P2MAQQ.js";
  377. import {
  378. s,
  379. s2,
  380. s3
  381. } from "./chunk-E5O6P5I2.js";
  382. import {
  383. has
  384. } from "./chunk-SPWQ3AWG.js";
  385. import {
  386. a as a2
  387. } from "./chunk-2TIUKVZN.js";
  388. import {
  389. a,
  390. d,
  391. r,
  392. t
  393. } from "./chunk-YXWMMD76.js";
  394. import "./chunk-S5KM4IGW.js";
  395. // node_modules/@arcgis/core/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js
  396. var e10 = { background: { "background.frag": "#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main() {\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = u_opacity * color;\n#else\ngl_FragColor = u_color;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "background.vert": "precision mediump float;\nattribute vec2 a_pos;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr = u_tlbr / u_mosaicSize.xyxy;\n#endif\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\n}" }, circle: { "circle.frag": "precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\nmediump float dist = length(v_offset);\nmediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "circle.vert": "precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_stroke_color = stroke_color * stroke_opacity;\nv_stroke_width = stroke_width;\nv_radius = radius;\nv_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset = offset;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}" }, fill: { "fill.frag": "precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = v_color[3] * color;\n#else\ngl_FragColor = v_color;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "fill.vert": "precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include <util/util.glsl>\nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\n#ifdef PATTERN\nfloat patternWidth = nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight = nextPOT(tlbr.w - tlbr.y);\nfloat scaleX = 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY = 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat = mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr = tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}" }, icon: { "icon.frag": "precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\n#endif\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump flaot v_halo_width;\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\n#include <util/encoding.glsl>\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor = v_color;\nfloat d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio = 0.248062016;\nfloat size = max(v_size.x, v_size.y);\nfloat dist = d * softEdgeRatio * size;\nfillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width > 0.25) {\nlowp vec4 outlinePixelColor = u_outlineColor;\nconst float outlineLimitRatio = (16.0 / 86.0);\nfloat clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor = v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor = texture2D(u_texture, v_tex);\ngl_FragColor = v_opacity * texColor;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "icon.vert": "attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION = 1.0 / 8.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float tileCoordRatio = 1.0 / 8.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color = color;\nv_opacity = opacity;\n#ifdef SDF\nv_halo_width = halo_width;\n#endif\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float delta_z = 0.0;\nmediump float rotated = mod(a_angle + u_mapRotation, 256.0);\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_opacity, 0.0);\nvec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\nv_size = abs(offset);\n#ifdef SDF\noffset = (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nv_tex = a_tex.xy / u_mosaicSize;\n}" }, line: { "line.frag": "precision lowp float;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include <util/encoding.glsl>\n#endif\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\nmediump float fragDist = length(v_normal) * v_lineHalfWidth;\nlowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color = texture2D(u_texture, texCoord);\ngl_FragColor = alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor = alpha * v_color;\n#endif\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "line.vert": "precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale = 1.0 / 31.0;\nconst mediump float tileCoordRatio = 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth = 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_blur = blur + u_antialiasing;\nv_normal = a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr = tlbr / u_mosaicSize.xyxy;\nv_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio = width / v_patternSize.y;\n#else\nv_widthRatio = width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth = (width + u_antialiasing) * 0.5;\nmediump vec2 dir = a_dir_normal.xy * scale;\nmediump vec2 offset_ = a_extrude_offset.zw * scale * offset;\nmediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\n}" }, outline: { "outline.frag": "varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\nlowp float dist = abs(v_normal.y);\nlowp float alpha = smoothstep(1.0, 0.0, dist);\ngl_FragColor = alpha * v_color;\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "outline.vert": "attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale = 1.0 / 15.0;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nv_normal = a_xnormal;\nmediump vec2 dist = u_outline_width * scale * a_offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}" }, text: { "text.frag": "uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\n#ifdef ID\nvarying mediump vec4 v_id;\n#endif\nvoid main()\n{\nlowp float dist = texture2D(u_texture, v_tex).a;\nmediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor = alpha * v_color;\n#ifdef ID\nif (gl_FragColor.a < 1.0 / 255.0) {\ndiscard;\n}\ngl_FragColor = v_id;\n#endif\n}", "text.vert": "attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef ID\nuniform mediump vec4 u_id;\nvarying mediump vec4 v_id;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale = 1.0 / 24.0;\nconst float sdfPixel = 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo > 0.5)\n{\nv_color = halo_color * opacity;\nhalo_width *= sdfPixel;\nhalo_blur *= sdfPixel;\n}\nelse\n{\nv_color = color * opacity;\nhalo_width = 0.0;\nhalo_blur = 0.0;\n}\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float a_visMinAngle = a_texAngleRange.z;\nmediump float a_visMaxAngle = a_texAngleRange.w;\nmediump float delta_z = 0.0;\nmediump float angle = mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle < a_visMaxAngle)\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_color[3], 0.0);\nv_tex = a_tex.xy / u_mosaicSize;\n#ifdef ID\nv_id = u_id / 255.0;\n#endif\nv_edgeDistance = edgePos - halo_width / size;\nv_edgeWidth = (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}" }, util: { "encoding.glsl": "const vec4 rgba2float_factors = vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}", "util.glsl": "float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}" } };
  397. // node_modules/@arcgis/core/views/2d/engine/vectorTiles/shaders/sources/resolver.js
  398. function o7(e16) {
  399. let o17 = e10;
  400. return e16.split("/").forEach((r18) => {
  401. o17 && (o17 = o17[r18]);
  402. }), o17;
  403. }
  404. var t9 = new e7(o7);
  405. function n14(r18) {
  406. return t9.resolveIncludes(r18);
  407. }
  408. // node_modules/@arcgis/core/views/2d/engine/vectorTiles/shaders/Programs.js
  409. var t10 = (e16) => n9({ ID: e16.id, PATTERN: e16.pattern });
  410. var a8 = { shaders: (r18) => ({ vertexShader: t10(r18) + n14("background/background.vert"), fragmentShader: t10(r18) + n14("background/background.frag") }) };
  411. var d4 = (e16) => n9({ ID: e16.id });
  412. var i6 = { shaders: (r18) => ({ vertexShader: d4(r18) + n14("circle/circle.vert"), fragmentShader: d4(r18) + n14("circle/circle.frag") }) };
  413. var n15 = (e16) => n9({ ID: e16.id, PATTERN: e16.pattern });
  414. var l4 = { shaders: (r18) => ({ vertexShader: n15(r18) + n14("fill/fill.vert"), fragmentShader: n15(r18) + n14("fill/fill.frag") }) };
  415. var s8 = (e16) => n9({ ID: e16.id });
  416. var f4 = { shaders: (r18) => ({ vertexShader: s8(r18) + n14("outline/outline.vert"), fragmentShader: s8(r18) + n14("outline/outline.frag") }) };
  417. var h3 = (e16) => n9({ ID: e16.id, SDF: e16.sdf });
  418. var o8 = { shaders: (r18) => ({ vertexShader: h3(r18) + n14("icon/icon.vert"), fragmentShader: h3(r18) + n14("icon/icon.frag") }) };
  419. var g2 = (e16) => n9({ ID: e16.id, PATTERN: e16.pattern, SDF: e16.sdf });
  420. var c3 = { shaders: (r18) => ({ vertexShader: g2(r18) + n14("line/line.vert"), fragmentShader: g2(r18) + n14("line/line.frag") }) };
  421. var S2 = (e16) => n9({ ID: e16.id });
  422. var v2 = { shaders: (r18) => ({ vertexShader: S2(r18) + n14("text/text.vert"), fragmentShader: S2(r18) + n14("text/text.frag") }) };
  423. // node_modules/@arcgis/core/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js
  424. var o9 = class {
  425. constructor() {
  426. this._programByKey = /* @__PURE__ */ new Map();
  427. }
  428. dispose() {
  429. this._programByKey.forEach((e16) => e16.dispose()), this._programByKey.clear();
  430. }
  431. getMaterialProgram(e16, r18, t18) {
  432. const a18 = r18.key << 3 | this._getMaterialOptionsValue(r18.type, t18);
  433. if (this._programByKey.has(a18))
  434. return this._programByKey.get(a18);
  435. const s16 = this._getProgramTemplate(r18.type), { shaders: n23 } = s16, { vertexShader: c13, fragmentShader: i16 } = n23(t18), o17 = r18.getShaderHeader(), u10 = r18.getShaderMain(), p6 = c13.replace("#pragma header", o17).replace("#pragma main", u10), g8 = e16.programCache.acquire(p6, i16, r18.getAttributeLocations());
  436. return this._programByKey.set(a18, g8), g8;
  437. }
  438. _getMaterialOptionsValue(r18, t18) {
  439. switch (r18) {
  440. case T.BACKGROUND: {
  441. const e16 = t18;
  442. return (e16.pattern ? 1 : 0) << 1 | (e16.id ? 1 : 0);
  443. }
  444. case T.FILL: {
  445. const e16 = t18;
  446. return (e16.pattern ? 1 : 0) << 1 | (e16.id ? 1 : 0);
  447. }
  448. case T.OUTLINE:
  449. return t18.id ? 1 : 0;
  450. case T.LINE: {
  451. const e16 = t18;
  452. return (e16.sdf ? 1 : 0) << 2 | (e16.pattern ? 1 : 0) << 1 | (e16.id ? 1 : 0);
  453. }
  454. case T.ICON: {
  455. const e16 = t18;
  456. return (e16.sdf ? 1 : 0) << 1 | (e16.id ? 1 : 0);
  457. }
  458. case T.CIRCLE:
  459. return t18.id ? 1 : 0;
  460. case T.TEXT:
  461. return t18.id ? 1 : 0;
  462. default:
  463. return 0;
  464. }
  465. }
  466. _getProgramTemplate(o17) {
  467. switch (o17) {
  468. case T.BACKGROUND:
  469. return a8;
  470. case T.CIRCLE:
  471. return i6;
  472. case T.FILL:
  473. return l4;
  474. case T.ICON:
  475. return o8;
  476. case T.LINE:
  477. return c3;
  478. case T.OUTLINE:
  479. return f4;
  480. case T.TEXT:
  481. return v2;
  482. default:
  483. return null;
  484. }
  485. }
  486. };
  487. // node_modules/@arcgis/core/views/2d/engine/webgl/shaders/BitBlitPrograms.js
  488. var e11 = { shaders: { vertexShader: n12("bitBlit/bitBlit.vert"), fragmentShader: n12("bitBlit/bitBlit.frag") }, attributes: /* @__PURE__ */ new Map([["a_pos", 0], ["a_tex", 1]]) };
  489. // node_modules/@arcgis/core/views/2d/engine/webgl/BitBlitRenderer.js
  490. var _ = class {
  491. constructor() {
  492. this._initialized = false;
  493. }
  494. dispose() {
  495. this._program = a(this._program), this._vertexArrayObject = a(this._vertexArrayObject);
  496. }
  497. render(r18, t18, e16, i16) {
  498. r18 && (this._initialized || this._initialize(r18), r18.setBlendFunctionSeparate(R.ONE, R.ONE_MINUS_SRC_ALPHA, R.ONE, R.ONE_MINUS_SRC_ALPHA), r18.bindVAO(this._vertexArrayObject), r18.useProgram(this._program), t18.setSamplingMode(e16), r18.bindTexture(t18, 0), this._program.setUniform1i("u_tex", 0), this._program.setUniform1f("u_opacity", i16), r18.drawArrays(E.TRIANGLE_STRIP, 0, 4), r18.bindTexture(null, 0), r18.bindVAO());
  499. }
  500. _initialize(r18) {
  501. if (this._initialized)
  502. return true;
  503. const s16 = e8(r18, e11);
  504. if (!s16)
  505. return false;
  506. const o17 = new Int8Array(16);
  507. o17[0] = -1, o17[1] = -1, o17[2] = 0, o17[3] = 0, o17[4] = 1, o17[5] = -1, o17[6] = 1, o17[7] = 0, o17[8] = -1, o17[9] = 1, o17[10] = 0, o17[11] = 1, o17[12] = 1, o17[13] = 1, o17[14] = 1, o17[15] = 1;
  508. const _9 = e11.attributes, p6 = new a7(r18, _9, t8, { geometry: E4.createVertex(r18, F.STATIC_DRAW, o17) });
  509. return this._program = s16, this._vertexArrayObject = p6, this._initialized = true, true;
  510. }
  511. };
  512. // node_modules/@arcgis/core/views/2d/engine/webgl/MaterialManager.js
  513. var a9 = (r18) => r18 === I3.HITTEST || r18 === I3.LABEL_ALPHA;
  514. var s9 = (r18) => (a9(r18) ? 1 : 0) | (r18 === I3.HIGHLIGHT ? 2 : 0);
  515. var o10 = ({ rendererInfo: e16, drawPhase: t18 }, a18, o17, i16) => `${a18.getVariationHash()}-${i16.join(".")}-${s9(t18)}-${e16.getVariationHash()}-${r(o17) && o17.join(".")}`;
  516. var i7 = (t18, s16, o17, i16) => {
  517. const h9 = i16.reduce((r18, e16) => ({ ...r18, [e16]: t18.context.driverTest[e16] }), {}), n23 = { ...s16.getVariation(), ...t18.rendererInfo.getVariation(), highlight: t18.drawPhase === I3.HIGHLIGHT, id: a9(t18.drawPhase), ...h9 };
  518. if (r(o17))
  519. for (const r18 of o17)
  520. n23[r18] = true;
  521. return n23;
  522. };
  523. var h4 = class {
  524. constructor(r18) {
  525. this._rctx = r18, this._programByKey = /* @__PURE__ */ new Map();
  526. }
  527. dispose() {
  528. this._programByKey.forEach((r18) => r18.dispose()), this._programByKey.clear();
  529. }
  530. getProgram(r18, e16 = [], a18 = []) {
  531. const s16 = r18.vsPath + "." + r18.fsPath + JSON.stringify(e16) + a18.join(".");
  532. if (this._programByKey.has(s16))
  533. return this._programByKey.get(s16);
  534. const o17 = a18.reduce((r19, e17) => ({ ...r19, [e17]: this._rctx.driverTest[e17] }), {}), i16 = { ...e16.map((r19) => "string" == typeof r19 ? { name: r19, value: true } : r19).reduce((r19, e17) => ({ ...r19, [e17.name]: e17.value }), {}), ...o17 }, { vsPath: h9, fsPath: n23, attributes: g8 } = r18, m10 = o6(h9, n23, g8, i16), c13 = this._rctx.programCache.acquire(m10.shaders.vertexShader, m10.shaders.fragmentShader, m10.attributes);
  535. if (!c13)
  536. throw new Error("Unable to get program for key: ${key}");
  537. return this._programByKey.set(s16, c13), c13;
  538. }
  539. getMaterialProgram(r18, e16, a18, s16, h9, n23 = ["ignoresSamplerPrecision"]) {
  540. const g8 = o10(r18, e16, h9, n23);
  541. if (this._programByKey.has(g8))
  542. return this._programByKey.get(g8);
  543. const m10 = i7(r18, e16, h9, n23), c13 = o6(a18, a18, s16, m10), y5 = this._rctx.programCache.acquire(c13.shaders.vertexShader, c13.shaders.fragmentShader, c13.attributes);
  544. if (!y5)
  545. throw new Error("Unable to get program for key: ${key}");
  546. return this._programByKey.set(g8, y5), y5;
  547. }
  548. };
  549. // node_modules/@arcgis/core/views/2d/engine/webgl/RectangleBinPack.js
  550. var t11 = class {
  551. constructor(t18, e16) {
  552. this._width = 0, this._height = 0, this._free = [], this._width = t18, this._height = e16, this._free.push(new t4(0, 0, t18, e16));
  553. }
  554. get width() {
  555. return this._width;
  556. }
  557. get height() {
  558. return this._height;
  559. }
  560. allocate(t18, e16) {
  561. if (t18 > this._width || e16 > this._height)
  562. return new t4();
  563. let i16 = null, s16 = -1;
  564. for (let h9 = 0; h9 < this._free.length; ++h9) {
  565. const r18 = this._free[h9];
  566. t18 <= r18.width && e16 <= r18.height && (null === i16 || r18.y <= i16.y && r18.x <= i16.x) && (i16 = r18, s16 = h9);
  567. }
  568. return null === i16 ? new t4() : (this._free.splice(s16, 1), i16.width < i16.height ? (i16.width > t18 && this._free.push(new t4(i16.x + t18, i16.y, i16.width - t18, e16)), i16.height > e16 && this._free.push(new t4(i16.x, i16.y + e16, i16.width, i16.height - e16))) : (i16.width > t18 && this._free.push(new t4(i16.x + t18, i16.y, i16.width - t18, i16.height)), i16.height > e16 && this._free.push(new t4(i16.x, i16.y + e16, t18, i16.height - e16))), new t4(i16.x, i16.y, t18, e16));
  569. }
  570. release(h9) {
  571. for (let t18 = 0; t18 < this._free.length; ++t18) {
  572. const e16 = this._free[t18];
  573. if (e16.y === h9.y && e16.height === h9.height && e16.x + e16.width === h9.x)
  574. e16.width += h9.width;
  575. else if (e16.x === h9.x && e16.width === h9.width && e16.y + e16.height === h9.y)
  576. e16.height += h9.height;
  577. else if (h9.y === e16.y && h9.height === e16.height && h9.x + h9.width === e16.x)
  578. e16.x = h9.x, e16.width += h9.width;
  579. else {
  580. if (h9.x !== e16.x || h9.width !== e16.width || h9.y + h9.height !== e16.y)
  581. continue;
  582. e16.y = h9.y, e16.height += h9.height;
  583. }
  584. this._free.splice(t18, 1), this.release(h9);
  585. }
  586. this._free.push(h9);
  587. }
  588. };
  589. // node_modules/@arcgis/core/views/2d/engine/webgl/GlyphMosaic.js
  590. var a10 = 256;
  591. var n16 = (t18) => Math.floor(t18 / 256);
  592. function c4(t18) {
  593. const e16 = /* @__PURE__ */ new Set();
  594. for (const i16 of t18)
  595. e16.add(n16(i16));
  596. return e16;
  597. }
  598. function o11(e16, i16, h9) {
  599. return e16.has(i16) || e16.set(i16, h9().then(() => {
  600. e16.delete(i16);
  601. }).catch((h10) => {
  602. e16.delete(i16), b(h10);
  603. })), e16.get(i16);
  604. }
  605. var l5 = (t18) => ({ rect: new t4(0, 0, 0, 0), page: 0, metrics: { left: 0, width: 0, height: 0, advance: 0, top: 0 }, code: t18, sdf: true });
  606. var g3 = class {
  607. constructor(t18, e16, h9) {
  608. this.width = 0, this.height = 0, this._dirties = [], this._glyphData = [], this._currentPage = 0, this._glyphCache = {}, this._textures = [], this._rangePromises = /* @__PURE__ */ new Map(), this.width = t18, this.height = e16, this._glyphSource = h9, this._binPack = new t11(t18 - 4, e16 - 4), this._glyphData.push(new Uint8Array(t18 * e16)), this._dirties.push(true), this._textures.push(null), this._initDecorationGlyph();
  609. }
  610. dispose() {
  611. this._binPack = null;
  612. for (const t18 of this._textures)
  613. t18 && t18.dispose();
  614. this._textures.length = 0, this._glyphData.length = 0;
  615. }
  616. _initDecorationGlyph() {
  617. const t18 = [117, 149, 181, 207, 207, 181, 149, 117], e16 = [];
  618. for (let h9 = 0; h9 < t18.length; h9++) {
  619. const i17 = t18[h9];
  620. for (let t19 = 0; t19 < 11; t19++)
  621. e16.push(i17);
  622. }
  623. const i16 = { metrics: { width: 5, height: 2, left: 0, top: 0, advance: 0 }, bitmap: new Uint8Array(e16) };
  624. this._recordGlyph(i16);
  625. }
  626. async getGlyphItems(t18, e16, i16) {
  627. const h9 = this._getGlyphCache(t18);
  628. return await this._fetchRanges(t18, e16, i16), e16.map((e17) => this._getMosaicItem(h9, t18, e17));
  629. }
  630. bind(t18, e16, i16, h9) {
  631. const s16 = this._getTexture(t18, i16);
  632. s16.setSamplingMode(e16), this._dirties[i16] && (s16.setData(this._glyphData[i16]), this._dirties[i16] = false), t18.bindTexture(s16, h9);
  633. }
  634. _getGlyphCache(t18) {
  635. return this._glyphCache[t18] || (this._glyphCache[t18] = {}), this._glyphCache[t18];
  636. }
  637. _getTexture(t18, e16) {
  638. return this._textures[e16] || (this._textures[e16] = new E3(t18, { pixelFormat: P.ALPHA, dataType: G.UNSIGNED_BYTE, width: this.width, height: this.height }, new Uint8Array(this.width * this.height))), this._textures[e16];
  639. }
  640. _invalidate() {
  641. this._dirties[this._currentPage] = true;
  642. }
  643. async _fetchRanges(t18, e16, i16) {
  644. const h9 = c4(e16), s16 = [];
  645. h9.forEach((e17) => {
  646. s16.push(this._fetchRange(t18, e17, i16));
  647. }), await Promise.all(s16);
  648. }
  649. async _fetchRange(t18, e16, i16) {
  650. if (e16 > a10)
  651. return null;
  652. const h9 = t18 + e16;
  653. return o11(this._rangePromises, h9, () => this._glyphSource.getRange(t18, e16, i16));
  654. }
  655. _getMosaicItem(t18, e16, i16) {
  656. if (!t18[i16]) {
  657. const h9 = this._glyphSource.getGlyph(e16, i16);
  658. if (!h9 || !h9.metrics)
  659. return l5(i16);
  660. const s16 = this._recordGlyph(h9), r18 = this._currentPage, a18 = h9.metrics;
  661. t18[i16] = { rect: s16, page: r18, metrics: a18, code: i16, sdf: true }, this._invalidate();
  662. }
  663. return t18[i16];
  664. }
  665. _recordGlyph(t18) {
  666. const h9 = t18.metrics;
  667. let s16;
  668. if (0 === h9.width)
  669. s16 = new t4(0, 0, 0, 0);
  670. else {
  671. const e16 = 3, r18 = h9.width + 2 * e16, a18 = h9.height + 2 * e16;
  672. s16 = this._binPack.allocate(r18, a18), s16.isEmpty && (this._dirties[this._currentPage] || (this._glyphData[this._currentPage] = null), this._currentPage = this._glyphData.length, this._glyphData.push(new Uint8Array(this.width * this.height)), this._dirties.push(true), this._textures.push(null), this._initDecorationGlyph(), this._binPack = new t11(this.width - 4, this.height - 4), s16 = this._binPack.allocate(r18, a18));
  673. const n23 = this._glyphData[this._currentPage], c13 = t18.bitmap;
  674. let o17, l17;
  675. if (c13)
  676. for (let t19 = 0; t19 < a18; t19++) {
  677. o17 = r18 * t19, l17 = this.width * (s16.y + t19) + s16.x;
  678. for (let t20 = 0; t20 < r18; t20++)
  679. n23[l17 + t20] = c13[o17 + t20];
  680. }
  681. has("esri-glyph-debug") && this._showDebugPage(n23);
  682. }
  683. return s16;
  684. }
  685. _showDebugPage(t18) {
  686. const e16 = document.createElement("canvas"), i16 = e16.getContext("2d"), h9 = new ImageData(this.width, this.height), s16 = h9.data;
  687. e16.width = this.width, e16.height = this.height, e16.style.border = "1px solid black";
  688. for (let r18 = 0; r18 < t18.length; ++r18)
  689. s16[4 * r18 + 0] = t18[r18], s16[4 * r18 + 1] = 0, s16[4 * r18 + 2] = 0, s16[4 * r18 + 3] = 255;
  690. i16.putImageData(h9, 0, 0), document.body.appendChild(e16);
  691. }
  692. };
  693. // node_modules/@arcgis/core/views/2d/engine/webgl/GlyphSource.js
  694. var s10 = class {
  695. constructor(t18) {
  696. for (this._metrics = [], this._bitmaps = []; t18.next(); )
  697. switch (t18.tag()) {
  698. case 1: {
  699. const e16 = t18.getMessage();
  700. for (; e16.next(); )
  701. switch (e16.tag()) {
  702. case 3: {
  703. const t19 = e16.getMessage();
  704. let s16, a18, r18, n23, i16, c13, g8;
  705. for (; t19.next(); )
  706. switch (t19.tag()) {
  707. case 1:
  708. s16 = t19.getUInt32();
  709. break;
  710. case 2:
  711. a18 = t19.getBytes();
  712. break;
  713. case 3:
  714. r18 = t19.getUInt32();
  715. break;
  716. case 4:
  717. n23 = t19.getUInt32();
  718. break;
  719. case 5:
  720. i16 = t19.getSInt32();
  721. break;
  722. case 6:
  723. c13 = t19.getSInt32();
  724. break;
  725. case 7:
  726. g8 = t19.getUInt32();
  727. break;
  728. default:
  729. t19.skip();
  730. }
  731. t19.release(), s16 && (this._metrics[s16] = { width: r18, height: n23, left: i16, top: c13, advance: g8 }, this._bitmaps[s16] = a18);
  732. break;
  733. }
  734. default:
  735. e16.skip();
  736. }
  737. e16.release();
  738. break;
  739. }
  740. default:
  741. t18.skip();
  742. }
  743. }
  744. getMetrics(t18) {
  745. return this._metrics[t18];
  746. }
  747. getBitmap(t18) {
  748. return this._bitmaps[t18];
  749. }
  750. };
  751. var a11 = class {
  752. constructor() {
  753. this._ranges = [];
  754. }
  755. getRange(t18) {
  756. return this._ranges[t18];
  757. }
  758. addRange(t18, e16) {
  759. this._ranges[t18] = e16;
  760. }
  761. };
  762. var r9 = class {
  763. constructor(t18) {
  764. this._glyphInfo = {}, this._baseURL = t18;
  765. }
  766. getRange(a18, r18, n23) {
  767. const i16 = this._getFontStack(a18);
  768. if (i16.getRange(r18))
  769. return Promise.resolve();
  770. const c13 = 256 * r18, g8 = c13 + 255, o17 = this._baseURL.replace("{fontstack}", a18).replace("{range}", c13 + "-" + g8);
  771. return U(o17, { responseType: "array-buffer", ...n23 }).then((t18) => {
  772. i16.addRange(r18, new s10(new n5(new Uint8Array(t18.data), new DataView(t18.data))));
  773. });
  774. }
  775. getGlyph(t18, e16) {
  776. const s16 = this._getFontStack(t18);
  777. if (!s16)
  778. return;
  779. const a18 = Math.floor(e16 / 256);
  780. if (a18 > 256)
  781. return;
  782. const r18 = s16.getRange(a18);
  783. return r18 ? { metrics: r18.getMetrics(e16), bitmap: r18.getBitmap(e16) } : void 0;
  784. }
  785. _getFontStack(t18) {
  786. let e16 = this._glyphInfo[t18];
  787. return e16 || (e16 = this._glyphInfo[t18] = new a11()), e16;
  788. }
  789. };
  790. // node_modules/@arcgis/core/views/2d/engine/webgl/SDFConverter.js
  791. var i8 = 1e20;
  792. var r10 = class {
  793. constructor(t18) {
  794. this._svg = null, this.size = t18;
  795. const e16 = document.createElement("canvas");
  796. e16.width = e16.height = t18, this._context = e16.getContext("2d"), this._gridOuter = new Float64Array(t18 * t18), this._gridInner = new Float64Array(t18 * t18), this._f = new Float64Array(t18), this._d = new Float64Array(t18), this._z = new Float64Array(t18 + 1), this._v = new Int16Array(t18);
  797. }
  798. dispose() {
  799. this._context = this._gridOuter = this._gridInner = this._f = this._d = this._z = this._v = null, this._svg && (document.body.removeChild(this._svg), this._svg = null);
  800. }
  801. draw(r18, h9, n23 = 31) {
  802. this._initSVG();
  803. const o17 = this.createSVGString(r18);
  804. return new Promise((r19, a18) => {
  805. const d15 = new Image();
  806. d15.src = "data:image/svg+xml; charset=utf8, " + encodeURIComponent(o17), d15.onload = () => {
  807. d15.onload = null, this._context.clearRect(0, 0, this.size, this.size), this._context.drawImage(d15, 0, 0, this.size, this.size);
  808. const e16 = this._context.getImageData(0, 0, this.size, this.size), s16 = new Uint8Array(this.size * this.size * 4);
  809. for (let t18 = 0; t18 < this.size * this.size; t18++) {
  810. const s17 = e16.data[4 * t18 + 3] / 255;
  811. this._gridOuter[t18] = 1 === s17 ? 0 : 0 === s17 ? i8 : Math.max(0, 0.5 - s17) ** 2, this._gridInner[t18] = 1 === s17 ? i8 : 0 === s17 ? 0 : Math.max(0, s17 - 0.5) ** 2;
  812. }
  813. this._edt(this._gridOuter, this.size, this.size), this._edt(this._gridInner, this.size, this.size);
  814. for (let i16 = 0; i16 < this.size * this.size; i16++) {
  815. const e17 = this._gridOuter[i16] - this._gridInner[i16];
  816. o3(0.5 - e17 / (2 * n23), s16, 4 * i16);
  817. }
  818. r19(s16);
  819. };
  820. const l17 = h9 && h9.signal;
  821. l17 && v(l17, () => a18(a3()));
  822. });
  823. }
  824. _initSVG() {
  825. if (!this._svg) {
  826. const t18 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  827. t18.setAttribute("style", "position: absolute;"), t18.setAttribute("width", "0"), t18.setAttribute("height", "0"), t18.setAttribute("aria-hidden", "true"), t18.setAttribute("role", "presentation"), document.body.appendChild(t18), this._svg = t18;
  828. }
  829. return this._svg;
  830. }
  831. createSVGString(t18) {
  832. const e16 = this._initSVG(), s16 = document.createElementNS("http://www.w3.org/2000/svg", "path");
  833. s16.setAttribute("d", t18), e16.appendChild(s16);
  834. const i16 = s16.getBBox(), r18 = i16.width / i16.height, h9 = this.size / 2;
  835. let n23, o17, a18, d15;
  836. if (r18 > 1) {
  837. o17 = n23 = h9 / i16.width;
  838. const t19 = h9 * (1 / r18);
  839. a18 = this.size / 4, d15 = h9 - t19 / 2;
  840. } else {
  841. n23 = o17 = h9 / i16.height;
  842. a18 = h9 - h9 * r18 / 2, d15 = this.size / 4;
  843. }
  844. const l17 = -i16.x * n23 + a18, _9 = -i16.y * o17 + d15;
  845. s16.setAttribute("style", `transform: matrix(${n23}, 0, 0, ${o17}, ${l17}, ${_9})`);
  846. const g8 = `<svg style="fill:red;" height="${this.size}" width="${this.size}" xmlns="http://www.w3.org/2000/svg">${e16.innerHTML}</svg>`;
  847. return e16.removeChild(s16), g8;
  848. }
  849. _edt(t18, e16, s16) {
  850. const i16 = this._f, r18 = this._d, h9 = this._v, n23 = this._z;
  851. for (let o17 = 0; o17 < e16; o17++) {
  852. for (let r19 = 0; r19 < s16; r19++)
  853. i16[r19] = t18[r19 * e16 + o17];
  854. this._edt1d(i16, r18, h9, n23, s16);
  855. for (let i17 = 0; i17 < s16; i17++)
  856. t18[i17 * e16 + o17] = r18[i17];
  857. }
  858. for (let o17 = 0; o17 < s16; o17++) {
  859. for (let s17 = 0; s17 < e16; s17++)
  860. i16[s17] = t18[o17 * e16 + s17];
  861. this._edt1d(i16, r18, h9, n23, e16);
  862. for (let s17 = 0; s17 < e16; s17++)
  863. t18[o17 * e16 + s17] = Math.sqrt(r18[s17]);
  864. }
  865. }
  866. _edt1d(t18, e16, s16, r18, h9) {
  867. s16[0] = 0, r18[0] = -i8, r18[1] = +i8;
  868. for (let n23 = 1, o17 = 0; n23 < h9; n23++) {
  869. let e17 = (t18[n23] + n23 * n23 - (t18[s16[o17]] + s16[o17] * s16[o17])) / (2 * n23 - 2 * s16[o17]);
  870. for (; e17 <= r18[o17]; )
  871. o17--, e17 = (t18[n23] + n23 * n23 - (t18[s16[o17]] + s16[o17] * s16[o17])) / (2 * n23 - 2 * s16[o17]);
  872. o17++, s16[o17] = n23, r18[o17] = e17, r18[o17 + 1] = +i8;
  873. }
  874. for (let i16 = 0, n23 = 0; i16 < h9; i16++) {
  875. for (; r18[n23 + 1] < i16; )
  876. n23++;
  877. e16[i16] = (i16 - s16[n23]) * (i16 - s16[n23]) + t18[s16[n23]];
  878. }
  879. }
  880. };
  881. // node_modules/@arcgis/core/views/2d/engine/webgl/SpriteMosaic.js
  882. function g4(t18) {
  883. return t18 && "static" === t18.type;
  884. }
  885. var p = class {
  886. constructor(t18, e16, i16 = 0) {
  887. this._mosaicPages = [], this._maxItemSize = 0, this._currentPage = 0, this._pageWidth = 0, this._pageHeight = 0, this._mosaicRects = /* @__PURE__ */ new Map(), this._spriteCopyQueue = [], this.pixelRatio = 1, (t18 <= 0 || e16 <= 0) && console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"), this._pageWidth = t18, this._pageHeight = e16, i16 > 0 && (this._maxItemSize = i16), this.pixelRatio = window.devicePixelRatio || 1, this._binPack = new t11(this._pageWidth, this._pageHeight);
  888. const s16 = Math.floor(this._pageWidth), r18 = Math.floor(this._pageHeight);
  889. this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(s16 * r18) }, size: [this._pageWidth, this._pageHeight], dirty: true, texture: void 0 });
  890. }
  891. getWidth(t18) {
  892. return t18 >= this._mosaicPages.length ? -1 : this._mosaicPages[t18].size[0];
  893. }
  894. getHeight(t18) {
  895. return t18 >= this._mosaicPages.length ? -1 : this._mosaicPages[t18].size[1];
  896. }
  897. getPageTexture(t18) {
  898. return t18 < this._mosaicPages.length ? this._mosaicPages[t18].texture : null;
  899. }
  900. has(t18) {
  901. return this._mosaicRects.has(t18);
  902. }
  903. get itemCount() {
  904. return this._mosaicRects.size;
  905. }
  906. getSpriteItem(t18) {
  907. return this._mosaicRects.get(t18);
  908. }
  909. addSpriteItem(t18, i16, a18, r18, o17, h9, c13 = 1) {
  910. if (this._mosaicRects.has(t18))
  911. return this._mosaicRects.get(t18);
  912. let n23, p6, m10;
  913. if (g4(a18))
  914. [n23, p6, m10] = this._allocateImage(i16[0], i16[1]);
  915. else {
  916. n23 = new t4(0, 0, i16[0], i16[1]), p6 = this._mosaicPages.length;
  917. const t19 = void 0;
  918. this._mosaicPages.push({ mosaicsData: a18, size: [i16[0] + 2 * et, i16[1] + 2 * et], dirty: true, texture: t19 });
  919. }
  920. if (n23.width <= 0 || n23.height <= 0)
  921. return null;
  922. const _9 = { rect: n23, width: i16[0], height: i16[1], sdf: o17, simplePattern: h9, pixelRatio: c13, page: p6 };
  923. return this._mosaicRects.set(t18, _9), g4(a18) && this._copy({ rect: n23, spriteSize: i16, spriteData: a18.data, page: p6, pageSize: m10, repeat: r18, sdf: o17 }), _9;
  924. }
  925. hasItemsToProcess() {
  926. return 0 !== this._spriteCopyQueue.length;
  927. }
  928. processNextItem() {
  929. const t18 = this._spriteCopyQueue.pop();
  930. t18 && this._copy(t18);
  931. }
  932. getSpriteItems(t18) {
  933. const e16 = {};
  934. for (const i16 of t18)
  935. e16[i16] = this.getSpriteItem(i16);
  936. return e16;
  937. }
  938. getMosaicItemPosition(t18) {
  939. const i16 = this.getSpriteItem(t18), s16 = i16 && i16.rect;
  940. if (!s16)
  941. return null;
  942. s16.width = i16.width, s16.height = i16.height;
  943. const a18 = i16.width, r18 = i16.height, o17 = et, h9 = this._mosaicPages[i16.page];
  944. return { size: [i16.width, i16.height], tl: [(s16.x + o17) / h9[0], (s16.y + o17) / h9[1]], br: [(s16.x + o17 + a18) / h9[0], (s16.y + o17 + r18) / h9[1]], page: i16.page };
  945. }
  946. bind(t18, e16, i16 = 0, s16 = 0) {
  947. const a18 = this._mosaicPages[i16], r18 = a18.mosaicsData;
  948. let o17 = a18.texture;
  949. if (o17 || (o17 = m5(t18, r18, a18.size), a18.texture = o17), o17.setSamplingMode(e16), g4(r18))
  950. t18.bindTexture(o17, s16), a18.dirty && (o17.setData(new Uint8Array(r18.data.buffer)), o17.generateMipmap());
  951. else {
  952. r18.data.bindFrame(t18, o17, s16);
  953. }
  954. a18.dirty = false;
  955. }
  956. static _copyBits(t18, e16, i16, s16, a18, r18, o17, h9, c13, n23, g8) {
  957. let p6 = s16 * e16 + i16, m10 = h9 * r18 + o17;
  958. if (g8) {
  959. m10 -= r18;
  960. for (let o18 = -1; o18 <= n23; o18++, p6 = ((o18 + n23) % n23 + s16) * e16 + i16, m10 += r18)
  961. for (let e17 = -1; e17 <= c13; e17++)
  962. a18[m10 + e17] = t18[p6 + (e17 + c13) % c13];
  963. } else
  964. for (let _9 = 0; _9 < n23; _9++) {
  965. for (let e17 = 0; e17 < c13; e17++)
  966. a18[m10 + e17] = t18[p6 + e17];
  967. p6 += e16, m10 += r18;
  968. }
  969. }
  970. _copy(i16) {
  971. if (i16.page >= this._mosaicPages.length)
  972. return;
  973. const s16 = this._mosaicPages[i16.page], a18 = s16.mosaicsData;
  974. if (!g4(s16.mosaicsData))
  975. throw new s3("mapview-invalid-resource", "unsuitable data type!");
  976. const r18 = i16.spriteData, o17 = a18.data;
  977. o17 && r18 || console.error("Source or target images are uninitialized!"), p._copyBits(r18, i16.spriteSize[0], 0, 0, o17, i16.pageSize[0], i16.rect.x + et, i16.rect.y + et, i16.spriteSize[0], i16.spriteSize[1], i16.repeat), s16.dirty = true;
  978. }
  979. _allocateImage(t18, r18) {
  980. t18 += 2 * et, r18 += 2 * et;
  981. const o17 = Math.max(t18, r18);
  982. if (this._maxItemSize && this._maxItemSize < o17) {
  983. const e16 = 2 ** Math.ceil(P2(t18)), a18 = 2 ** Math.ceil(P2(r18)), o18 = new t4(0, 0, t18, r18);
  984. return this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(e16 * a18) }, size: [e16, a18], dirty: true, texture: void 0 }), [o18, this._mosaicPages.length - 1, [e16, a18]];
  985. }
  986. const h9 = this._binPack.allocate(t18, r18);
  987. if (h9.width <= 0) {
  988. const e16 = this._mosaicPages[this._currentPage];
  989. return !e16.dirty && g4(e16.mosaicsData) && (e16.mosaicsData.data = null), this._currentPage = this._mosaicPages.length, this._mosaicPages.push({ mosaicsData: { type: "static", data: new Uint32Array(this._pageWidth * this._pageHeight) }, size: [this._pageWidth, this._pageHeight], dirty: true, texture: void 0 }), this._binPack = new t11(this._pageWidth, this._pageHeight), this._allocateImage(t18, r18);
  990. }
  991. return [h9, this._currentPage, [this._pageWidth, this._pageHeight]];
  992. }
  993. dispose() {
  994. this._binPack = null;
  995. for (const t18 of this._mosaicPages) {
  996. const e16 = t18.texture;
  997. e16 && e16.dispose();
  998. const i16 = t18.mosaicsData;
  999. if (!g4(i16)) {
  1000. i16.data.destroy();
  1001. }
  1002. }
  1003. this._mosaicPages = null, this._mosaicRects.clear();
  1004. }
  1005. };
  1006. function m5(t18, e16, i16) {
  1007. return g4(e16) ? new E3(t18, { pixelFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, width: i16[0], height: i16[1] }, new Uint8Array(e16.data.buffer)) : new E3(t18, { pixelFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, samplingMode: L.LINEAR, wrapMode: D2.CLAMP_TO_EDGE, width: i16[0], height: i16[1] }, null);
  1008. }
  1009. // node_modules/@arcgis/core/views/2d/engine/webgl/animatedFormats/utils.js
  1010. function a12(e16) {
  1011. return n(e16.frameDurations.reduce((t18, e17) => t18 + e17, 0));
  1012. }
  1013. function n17(t18) {
  1014. const { width: e16, height: r18 } = t18;
  1015. return { frameDurations: t18.frameDurations.reverse(), getFrame: (e17) => {
  1016. const r19 = t18.frameDurations.length - 1 - e17;
  1017. return t18.getFrame(r19);
  1018. }, width: e16, height: r18 };
  1019. }
  1020. function s11(e16, r18) {
  1021. const { width: i16, height: n23, getFrame: s16 } = e16, o17 = r18 / a12(e16);
  1022. return { frameDurations: e16.frameDurations.map((e17) => n(e17 * o17)), getFrame: s16, width: i16, height: n23 };
  1023. }
  1024. function o12(e16, r18) {
  1025. const { width: i16, height: a18, getFrame: n23 } = e16, s16 = e16.frameDurations.slice(), o17 = s16.shift();
  1026. return s16.unshift(n(o17 + r18)), { frameDurations: s16, getFrame: n23, width: i16, height: a18 };
  1027. }
  1028. function m6(e16, r18) {
  1029. const { width: i16, height: a18, getFrame: n23 } = e16, s16 = e16.frameDurations.slice(), o17 = s16.pop();
  1030. return s16.push(n(o17 + r18)), { frameDurations: s16, getFrame: n23, width: i16, height: a18 };
  1031. }
  1032. var h5 = class {
  1033. constructor(t18, e16, r18, i16) {
  1034. this._animation = t18, this._repeatType = r18, this._onFrameData = i16, this._direction = 1, this._currentFrame = 0, this.timeToFrame = this._animation.frameDurations[this._currentFrame];
  1035. let a18 = 0;
  1036. for (; e16 > a18; )
  1037. a18 += this.timeToFrame, this.nextFrame();
  1038. const n23 = this._animation.getFrame(this._currentFrame);
  1039. this._onFrameData(n23);
  1040. }
  1041. nextFrame() {
  1042. if (this._currentFrame += this._direction, this._direction > 0) {
  1043. if (this._currentFrame === this._animation.frameDurations.length)
  1044. switch (this._repeatType) {
  1045. case d3.None:
  1046. this._currentFrame -= this._direction;
  1047. break;
  1048. case d3.Loop:
  1049. this._currentFrame = 0;
  1050. break;
  1051. case d3.Oscillate:
  1052. this._currentFrame -= this._direction, this._direction = -1;
  1053. }
  1054. } else if (-1 === this._currentFrame)
  1055. switch (this._repeatType) {
  1056. case d3.None:
  1057. this._currentFrame -= this._direction;
  1058. break;
  1059. case d3.Loop:
  1060. this._currentFrame = this._animation.frameDurations.length - 1;
  1061. break;
  1062. case d3.Oscillate:
  1063. this._currentFrame -= this._direction, this._direction = 1;
  1064. }
  1065. this.timeToFrame = this._animation.frameDurations[this._currentFrame];
  1066. const t18 = this._animation.getFrame(this._currentFrame);
  1067. this._onFrameData(t18);
  1068. }
  1069. };
  1070. function c5(c13, u10, f10, l17) {
  1071. let _9, { repeatType: F3 } = u10;
  1072. if (null == F3 && (F3 = d3.Loop), true === u10.reverseAnimation && (c13 = n17(c13)), null != u10.duration && (c13 = s11(c13, n(1e3 * u10.duration))), null != u10.repeatDelay) {
  1073. const r18 = 1e3 * u10.repeatDelay;
  1074. F3 === d3.Loop ? c13 = m6(c13, n(r18)) : F3 === d3.Oscillate && (c13 = o12(m6(c13, n(r18 / 2)), n(r18 / 2)));
  1075. }
  1076. if (null != u10.startTimeOffset)
  1077. _9 = n(1e3 * u10.startTimeOffset);
  1078. else if (null != u10.randomizeStartTime) {
  1079. const e16 = o4(f10), n23 = 82749913, s16 = null != u10.randomizeStartSeed ? u10.randomizeStartSeed : n23, o17 = e2(e16, s16);
  1080. _9 = n(o17 * a12(c13));
  1081. } else
  1082. _9 = n(0);
  1083. return new h5(c13, _9, F3, l17);
  1084. }
  1085. function u3(t18, e16, r18, i16) {
  1086. const a18 = null == e16.playAnimation || e16.playAnimation, n23 = c5(t18, e16, r18, i16);
  1087. let s16, o17 = n23.timeToFrame;
  1088. function m10() {
  1089. s16 = a18 && setTimeout(() => {
  1090. n23.nextFrame(), o17 = n23.timeToFrame, m10();
  1091. }, o17);
  1092. }
  1093. return m10(), { remove: () => {
  1094. a18 && clearTimeout(s16);
  1095. } };
  1096. }
  1097. // node_modules/@arcgis/core/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource.js
  1098. var e12 = class {
  1099. constructor(t18, a18, e16, s16) {
  1100. this._animation = t18, this._frameData = null;
  1101. const h9 = (t19) => {
  1102. this._frameData = t19, a18.requestRender();
  1103. };
  1104. this.frameCount = this._animation.frameDurations.length, this.width = this._animation.width, this.height = this._animation.height, this._playHandle = u3(this._animation, e16, s16, h9);
  1105. }
  1106. destroy() {
  1107. this._playHandle.remove();
  1108. }
  1109. bindFrame(i16, e16, s16) {
  1110. i16.bindTexture(e16, s16), t(this._frameData) || (e16.updateData(0, et, et, this._frameData.width, this._frameData.height, this._frameData), this._frameData = null);
  1111. }
  1112. };
  1113. // node_modules/@arcgis/core/views/2d/engine/webgl/util/symbolUtils.js
  1114. function e13(e16) {
  1115. switch (e16.type) {
  1116. case "esriSMS":
  1117. return `${e16.style}.${e16.path}`;
  1118. case "esriSLS":
  1119. return `${e16.style}.${e16.cap}`;
  1120. case "esriSFS":
  1121. return `${e16.style}`;
  1122. case "esriPFS":
  1123. case "esriPMS":
  1124. return e16.imageData ? `${e16.imageData}${e16.width}${e16.height}` : `${e16.url}${e16.width}${e16.height}`;
  1125. default:
  1126. return "mosaicHash" in e16 ? e16.mosaicHash : JSON.stringify(e16);
  1127. }
  1128. }
  1129. // node_modules/@arcgis/core/views/2d/engine/webgl/TextureManager.js
  1130. var F2 = n7();
  1131. var $2 = "arial-unicode-ms-regular";
  1132. var N2 = 126;
  1133. var k = s2.getLogger("esri.views.2d.engine.webgl.TextureManager");
  1134. function H(e16, t18) {
  1135. const i16 = Math.round(u(t18) * window.devicePixelRatio), s16 = i16 >= 128 ? 2 : 4;
  1136. return Math.min(e16, i16 * s16);
  1137. }
  1138. var Q = (e16, t18, i16) => k.error(new s3(e16, t18, i16));
  1139. var O4 = class {
  1140. constructor(e16, t18, i16) {
  1141. this.mosaicType = e16, this.page = t18, this.sdf = i16;
  1142. }
  1143. static fromMosaic(e16, t18) {
  1144. return new O4(e16, t18.page, t18.sdf);
  1145. }
  1146. };
  1147. var V3 = class {
  1148. constructor(i16, r18) {
  1149. this._requestRender = i16, this.resourceManager = r18, this._invalidFontsMap = /* @__PURE__ */ new Map(), this._sdfConverter = new r10(N2), this._bindingInfos = new Array(), this._hashToBindingIndex = /* @__PURE__ */ new Map(), this._ongoingRasterizations = /* @__PURE__ */ new Map(), this._imageRequestQueue = new l3({ concurrency: 10, process: async (e16, i17) => {
  1150. f(i17);
  1151. try {
  1152. return await U(e16, { responseType: "image", signal: i17 });
  1153. } catch (r19) {
  1154. if (!j(r19))
  1155. throw new s3("mapview-invalid-resource", `Could not fetch requested resource at ${e16}`, r19);
  1156. throw r19;
  1157. }
  1158. } }), this._spriteMosaic = new p(2048, 2048, 500), this._glyphSource = new r9(`${s.fontsUrl}/{fontstack}/{range}.pbf`), this._glyphMosaic = new g3(1024, 1024, this._glyphSource), this._rasterizer = new c2(r18);
  1159. }
  1160. dispose() {
  1161. this._spriteMosaic.dispose(), this._glyphMosaic.dispose(), this._rasterizer.dispose(), this._sdfConverter.dispose(), this._spriteMosaic = null, this._glyphMosaic = null, this._sdfConverter = null, this._hashToBindingIndex.clear(), this._hashToBindingIndex = null, this._bindingInfos = null, this._ongoingRasterizations.clear(), this._ongoingRasterizations = null, this._imageRequestQueue.clear(), this._imageRequestQueue = null;
  1162. }
  1163. get sprites() {
  1164. return this._spriteMosaic;
  1165. }
  1166. get glyphs() {
  1167. return this._glyphMosaic;
  1168. }
  1169. async rasterizeItem(e16, t18, i16, s16) {
  1170. if (t(e16))
  1171. return Q("mapview-null-resource", "Unable to rasterize null resource"), null;
  1172. switch (e16.type) {
  1173. case "text":
  1174. case "esriTS": {
  1175. const t19 = await this._rasterizeText(e16, i16, s16);
  1176. return t19.forEach((e17) => this._setTextureBinding(O3.GLYPH, e17)), { glyphMosaicItems: t19 };
  1177. }
  1178. default: {
  1179. if (Ne(e16))
  1180. return Q("mapview-invalid-type", `MapView does not support symbol type: ${e16.type}`, e16), null;
  1181. const i17 = await this._rasterizeSpriteSymbol(e16, t18, s16);
  1182. return e3(i17) && i17 && this._setTextureBinding(O3.SPRITE, i17), { spriteMosaicItem: i17 };
  1183. }
  1184. }
  1185. }
  1186. bindTextures(e16, t18, i16, s16 = false) {
  1187. if (0 === i16.textureBinding)
  1188. return;
  1189. const r18 = this._bindingInfos[i16.textureBinding - 1], n23 = r18.page, o17 = s16 ? L.LINEAR_MIPMAP_LINEAR : L.LINEAR;
  1190. switch (r18.mosaicType) {
  1191. case O3.SPRITE: {
  1192. const i17 = this.sprites.getWidth(n23), s17 = this.sprites.getHeight(n23), r19 = r5(F2, i17, s17);
  1193. return this._spriteMosaic.bind(e16, o17, n23, y2), t18.setUniform1i("u_texture", y2), void t18.setUniform2fv("u_mosaicSize", r19);
  1194. }
  1195. case O3.GLYPH: {
  1196. const i17 = this.glyphs.width, s17 = this.glyphs.height, r19 = r5(F2, i17, s17);
  1197. return this._glyphMosaic.bind(e16, o17, n23, z), t18.setUniform1i("u_texture", z), void t18.setUniform2fv("u_mosaicSize", r19);
  1198. }
  1199. default:
  1200. k.error("mapview-texture-manager", `Cannot handle unknown type ${r18.mosaicType}`);
  1201. }
  1202. }
  1203. _hashMosaic(e16, t18) {
  1204. return 1 | e16 << 1 | (t18.sdf ? 1 : 0) << 2 | t18.page << 3;
  1205. }
  1206. _setTextureBinding(e16, t18) {
  1207. const i16 = this._hashMosaic(e16, t18);
  1208. if (!this._hashToBindingIndex.has(i16)) {
  1209. const s16 = O4.fromMosaic(e16, t18), r18 = this._bindingInfos.length + 1;
  1210. this._hashToBindingIndex.set(i16, r18), this._bindingInfos.push(s16);
  1211. }
  1212. t18.textureBinding = this._hashToBindingIndex.get(i16);
  1213. }
  1214. async _rasterizeText(e16, t18, s16) {
  1215. let n23, o17;
  1216. if ("cim" in e16) {
  1217. const t19 = e16;
  1218. n23 = t19.fontName, o17 = t19.text;
  1219. } else {
  1220. const t19 = e16;
  1221. n23 = i2(t19.font), o17 = t19.text;
  1222. }
  1223. const a18 = this._invalidFontsMap.has(n23), h9 = t18 || ve(n6(o17)[0]);
  1224. try {
  1225. return await this._glyphMosaic.getGlyphItems(a18 ? $2 : n23, h9, s16);
  1226. } catch (c13) {
  1227. return Q("mapview-invalid-resource", `Couldn't find font ${n23}. Falling back to Arial Unicode MS Regular`), this._invalidFontsMap.set(n23, true), this._glyphMosaic.getGlyphItems($2, h9, s16);
  1228. }
  1229. }
  1230. async _rasterizeSpriteSymbol(e16, t18, i16) {
  1231. if (Me(e16))
  1232. return null;
  1233. const r18 = e13(e16);
  1234. if (this._spriteMosaic.has(r18))
  1235. return this._spriteMosaic.getSpriteItem(r18);
  1236. if (Ie(e16) || Te(e16) && !Be(e16))
  1237. return this._handleAsyncResource(r18, e16, i16);
  1238. const n23 = bt, o17 = this._rasterizer.rasterizeJSONResource(e16, n23);
  1239. if (o17) {
  1240. const { size: t19, image: i17, sdf: s16, simplePattern: n24, rasterizationScale: a18 } = o17;
  1241. return this._addItemToMosaic(r18, t19, { type: "static", data: i17 }, _e(e16), s16, n24, a18);
  1242. }
  1243. return new s3("TextureManager", "unrecognized or null rasterized image");
  1244. }
  1245. async _handleAsyncResource(e16, t18, i16) {
  1246. if (this._ongoingRasterizations.has(e16))
  1247. return this._ongoingRasterizations.get(e16);
  1248. let s16;
  1249. s16 = Ie(t18) ? this._handleSVG(t18, e16, i16) : this._handleImage(t18, e16, i16), this._ongoingRasterizations.set(e16, s16);
  1250. try {
  1251. await s16, this._ongoingRasterizations.delete(e16);
  1252. } catch {
  1253. this._ongoingRasterizations.delete(e16);
  1254. }
  1255. return s16;
  1256. }
  1257. async _handleSVG(e16, t18, i16) {
  1258. const s16 = [N2, N2], r18 = await this._sdfConverter.draw(e16.path, i16);
  1259. return this._addItemToMosaic(t18, s16, { type: "static", data: new Uint32Array(r18.buffer) }, false, true, true);
  1260. }
  1261. async _handleGIFOrPNG(e16, t18, i16) {
  1262. const r18 = Ee(e16);
  1263. await this.resourceManager.fetchResource(r18, i16);
  1264. const n23 = this.resourceManager.getResource(r18);
  1265. if (t(n23))
  1266. return new s3("mapview-invalid-resource", `Could not fetch requested resource at ${r18}.`);
  1267. if (n23 instanceof HTMLImageElement) {
  1268. let i17 = n23.width, s16 = n23.height;
  1269. "esriPMS" === e16.type && (i17 = Math.round(H(n23.width, Ue(e16))), s16 = Math.round(n23.height * (i17 / n23.width)));
  1270. const r19 = "cim" in e16 ? e16.cim.colorSubstitutions : void 0, { size: o17, sdf: a19, image: h10 } = this._rasterizer.rasterizeImageResource(i17, s16, n23, r19);
  1271. return this._addItemToMosaic(t18, o17, { type: "static", data: h10 }, _e(e16), a19, false);
  1272. }
  1273. const a18 = e16.animatedSymbolProperties || {}, h9 = e16.objectId, c13 = new e12(n23, this._requestRender, a18, h9);
  1274. return this._addItemToMosaic(t18, [c13.width, c13.height], { type: "animated", data: c13 }, _e(e16), false, false);
  1275. }
  1276. async _handleImage(e16, t18, i16) {
  1277. var _a;
  1278. if (we(e16) || Ae(e16))
  1279. return this._handleGIFOrPNG(e16, t18, i16);
  1280. const r18 = Ee(e16);
  1281. try {
  1282. let s16;
  1283. const n23 = this.resourceManager.getResource(r18);
  1284. if (r(n23) && n23 instanceof HTMLImageElement)
  1285. s16 = n23;
  1286. else {
  1287. const { data: e17 } = await this._imageRequestQueue.push(r18, { ...i16 });
  1288. s16 = e17;
  1289. }
  1290. if (De(r18)) {
  1291. if ("width" in e16 && "height" in e16)
  1292. s16.width = u(e16.width), s16.height = u(e16.height);
  1293. else if ("cim" in e16) {
  1294. const t19 = e16.cim;
  1295. s16.width = u((_a = t19.width) != null ? _a : t19.scaleX * t19.size), s16.height = u(t19.size);
  1296. }
  1297. }
  1298. if (!s16.width || !s16.height)
  1299. return null;
  1300. let o17 = s16.width, h9 = s16.height;
  1301. "esriPMS" === e16.type && (o17 = Math.round(H(s16.width, Ue(e16))), h9 = Math.round(s16.height * (o17 / s16.width)));
  1302. const c13 = "cim" in e16 ? e16.cim.colorSubstitutions : void 0, { size: d15, sdf: m10, image: l17 } = this._rasterizer.rasterizeImageResource(o17, h9, s16, c13);
  1303. return this._addItemToMosaic(t18, d15, { type: "static", data: l17 }, _e(e16), m10, false);
  1304. } catch (n23) {
  1305. if (!j(n23))
  1306. return new s3("mapview-invalid-resource", `Could not fetch requested resource at ${r18}. ${n23.message}`);
  1307. }
  1308. }
  1309. _addItemToMosaic(e16, t18, i16, s16, r18, n23, o17) {
  1310. return this._spriteMosaic.addSpriteItem(e16, t18, i16, s16, r18, n23, o17);
  1311. }
  1312. };
  1313. // node_modules/@arcgis/core/views/2d/engine/webgl/TextureUploadManager.js
  1314. var i9 = class {
  1315. constructor(e16, t18) {
  1316. this._queue = [], this._context = e16, this._refreshable = t18;
  1317. }
  1318. destroy() {
  1319. this._queue = [];
  1320. }
  1321. enqueueTextureUpdate(e16, r18) {
  1322. const i16 = D(), h9 = e16, a18 = wt, c13 = Math.ceil(h9.height / a18);
  1323. if (f(r18), this._context.type === r6.WEBGL1)
  1324. this._queue.push({ type: "no-chunk", request: e16, resolver: i16, options: r18 });
  1325. else
  1326. for (let t18 = 0; t18 < c13; t18++) {
  1327. const s16 = t18 * a18, o17 = t18 === c13 - 1, u10 = o17 ? h9.height - a18 * t18 : a18;
  1328. this._queue.push({ type: "chunk", request: e16, resolver: i16, chunk: t18, chunkOffset: s16, destHeight: u10, chunkIsLast: o17, options: r18 });
  1329. }
  1330. return d2(r18, (e17) => i16.reject(e17)), i16.promise;
  1331. }
  1332. upload() {
  1333. let t18 = 0;
  1334. for (; this._queue.length; ) {
  1335. const s16 = performance.now(), o17 = this._queue.shift();
  1336. if (o17) {
  1337. if (r(o17.options.signal) && o17.options.signal.aborted)
  1338. continue;
  1339. switch (o17.type) {
  1340. case "chunk":
  1341. this._uploadChunk(o17);
  1342. break;
  1343. case "no-chunk":
  1344. this._uploadNoChunk(o17);
  1345. }
  1346. const u10 = performance.now() - s16;
  1347. if (t18 += u10, t18 + u10 >= xt)
  1348. break;
  1349. }
  1350. }
  1351. this._queue.length && this._refreshable.requestRender();
  1352. }
  1353. _uploadChunk(t18) {
  1354. const { request: s16, resolver: o17, chunkOffset: r18, chunkIsLast: u10, destHeight: n23 } = t18, { data: i16, texture: h9, width: a18 } = s16;
  1355. r(i16) && (h9.updateData(0, 0, r18, a18, n23, i16, r18), u10 && o17.resolve());
  1356. }
  1357. _uploadNoChunk(e16) {
  1358. const { request: t18, resolver: s16 } = e16, { data: o17, texture: r18 } = t18;
  1359. r18.setData(o17), s16.resolve();
  1360. }
  1361. };
  1362. // node_modules/@arcgis/core/views/2d/engine/webgl/shaders/StencilPrograms.js
  1363. var r11 = { shaders: { vertexShader: n12("stencil/stencil.vert"), fragmentShader: n12("stencil/stencil.frag") }, attributes: /* @__PURE__ */ new Map([["a_pos", 0]]) };
  1364. // node_modules/@arcgis/core/views/2d/engine/webgl/WorldExtentClipRenderer.js
  1365. var u4 = r7(-0.5, -0.5);
  1366. var f5 = class {
  1367. constructor() {
  1368. this._centerNdc = n4(), this._pxToNdc = n4(), this._worldDimensionsPx = n4(), this._mat3 = e5(), this._initialized = false;
  1369. }
  1370. dispose() {
  1371. this._program = a(this._program), this._quad = a(this._quad);
  1372. }
  1373. render(t18, s16) {
  1374. const { context: i16 } = t18;
  1375. return !!this._updateGeometry(t18, s16) && (this._initialized || this._initialize(i16), i16.setDepthWriteEnabled(false), i16.setDepthTestEnabled(false), i16.setColorMask(false, false, false, false), i16.setBlendingEnabled(false), i16.setStencilOp(O.KEEP, O.KEEP, O.REPLACE), i16.setStencilFunction(I.ALWAYS, 1, 255), i16.setStencilTestEnabled(true), i16.useProgram(this._program), this._program.setUniformMatrix3fv("u_worldExtent", this._mat3), this._quad.draw(), this._quad.unbind(), true);
  1376. }
  1377. _initialize(t18) {
  1378. if (this._initialized)
  1379. return;
  1380. const s16 = e8(t18, r11);
  1381. s16 && (this._program = s16, this._quad = new n11(t18, [0, 0, 1, 0, 0, 1, 1, 1]), this._initialized = true);
  1382. }
  1383. _updateGeometry(t18, a18) {
  1384. const { state: n23, pixelRatio: m10 } = t18, { size: c13, rotation: d15 } = n23, p6 = Math.round(c13[0] * m10), _9 = Math.round(c13[1] * m10);
  1385. if (!n23.spatialReference.isWrappable)
  1386. return false;
  1387. const l17 = r4(d15), f10 = Math.abs(Math.cos(l17)), b4 = Math.abs(Math.sin(l17)), g8 = Math.round(p6 * f10 + _9 * b4), j6 = Math.round(n23.worldScreenWidth);
  1388. if (g8 <= j6)
  1389. return false;
  1390. const x2 = p6 * b4 + _9 * f10, E5 = j6 * m10, M4 = (a18.left - a18.right) * m10 / p6, w3 = (a18.bottom - a18.top) * m10 / _9;
  1391. o(this._worldDimensionsPx, E5, x2, 1), o(this._pxToNdc, 2 / p6, -2 / _9, 1), o(this._centerNdc, M4, w3, 1);
  1392. const P5 = this._mat3;
  1393. return l2(P5, this._centerNdc), f3(P5, P5, this._pxToNdc), 0 !== d15 && h2(P5, P5, l17), f3(P5, P5, this._worldDimensionsPx), M2(P5, P5, u4), true;
  1394. }
  1395. };
  1396. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/AnimationEffect.js
  1397. var o13 = class extends t7 {
  1398. constructor() {
  1399. super(...arguments), this.defines = [], this._desc = { vsPath: "fx/integrate", fsPath: "fx/integrate", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) };
  1400. }
  1401. dispose() {
  1402. this._quad && this._quad.dispose();
  1403. }
  1404. bind() {
  1405. }
  1406. unbind() {
  1407. }
  1408. draw(r18, i16) {
  1409. if (!i16.size)
  1410. return;
  1411. const { context: a18, renderingOptions: o17 } = r18;
  1412. this._quad || (this._quad = new n11(a18, [0, 0, 1, 0, 0, 1, 1, 1]));
  1413. const n23 = a18.getBoundFramebufferObject(), { x: u10, y: m10, width: d15, height: f10 } = a18.getViewport();
  1414. i16.bindTextures(a18);
  1415. const c13 = i16.getBlock(N);
  1416. if (t(c13))
  1417. return;
  1418. const _9 = c13.getFBO(a18), l17 = c13.getFBO(a18, 1);
  1419. a18.setViewport(0, 0, i16.size, i16.size), this._computeDelta(r18, l17, o17.labelsAnimationTime), this._updateAnimationState(r18, l17, _9), a18.bindFramebuffer(n23), a18.setViewport(u10, m10, d15, f10);
  1420. }
  1421. _computeDelta(e16, t18, s16) {
  1422. const { context: a18, painter: o17, displayLevel: n23 } = e16, u10 = o17.materialManager.getProgram(this._desc, ["delta"]);
  1423. a18.bindFramebuffer(t18), a18.setClearColor(0, 0, 0, 0), a18.clear(a18.gl.COLOR_BUFFER_BIT), a18.useProgram(u10), u10.setUniform1i("u_maskTexture", B2), u10.setUniform1i("u_sourceTexture", C2), u10.setUniform1f("u_timeDelta", e16.deltaTime), u10.setUniform1f("u_animationTime", s16), u10.setUniform1f("u_zoomLevel", Math.round(10 * n23)), this._quad.draw();
  1424. }
  1425. _updateAnimationState(e16, t18, r18) {
  1426. const { context: i16, painter: s16 } = e16, a18 = s16.materialManager.getProgram(this._desc, ["update"]);
  1427. i16.bindTexture(t18.colorTexture, 1), i16.useProgram(a18), a18.setUniform1i("u_sourceTexture", 1), i16.bindFramebuffer(r18), i16.setClearColor(0, 0, 0, 0), i16.clear(i16.gl.COLOR_BUFFER_BIT), this._quad.draw();
  1428. }
  1429. };
  1430. // node_modules/@arcgis/core/views/2d/engine/webgl/shaders/BlendPrograms.js
  1431. var r12 = (e16) => e16.replace("-", "_").toUpperCase();
  1432. var t12 = (e16) => `#define ${r12(e16)}
  1433. `;
  1434. function n18(r18) {
  1435. return { attributes: /* @__PURE__ */ new Map([["a_pos", 0], ["a_tex", 1]]), shaders: { vertexShader: t12(r18) + n12("blend/blend.vert"), fragmentShader: t12(r18) + n12("blend/blend.frag") } };
  1436. }
  1437. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/BlendEffect.js
  1438. var l6 = s2.getLogger("esri.views.2d.engine.webgl.effects.blendEffects.BlendEffect");
  1439. var _2 = class {
  1440. constructor() {
  1441. this._size = [0, 0];
  1442. }
  1443. dispose(e16) {
  1444. this._backBufferTexture = a(this._backBufferTexture), this._quad = a(this._quad);
  1445. }
  1446. draw(r18, t18, s16, a18, d15) {
  1447. const { context: u10, drawPhase: f10 } = r18;
  1448. if (this._setupShader(u10), a18 && "normal" !== a18 && f10 !== I3.LABEL)
  1449. return void this._drawBlended(r18, t18, s16, a18, d15);
  1450. const c13 = n18("normal"), m10 = u10.programCache.acquire(c13.shaders.vertexShader, c13.shaders.fragmentShader, c13.attributes);
  1451. if (!m10)
  1452. return void l6.error(new s3("mapview-BlendEffect", 'Error creating shader program for blend mode "normal"'));
  1453. u10.useProgram(m10), t18.setSamplingMode(s16), u10.bindTexture(t18, 0), m10.setUniform1i("u_layerTexture", 0), m10.setUniform1f("u_opacity", d15), u10.setBlendingEnabled(true), u10.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA);
  1454. const h9 = this._quad;
  1455. h9.draw(), h9.unbind(), m10.dispose();
  1456. }
  1457. _drawBlended(r18, t18, i16, a18, d15) {
  1458. const { context: u10, state: f10, pixelRatio: c13, inFadeTransition: m10 } = r18, { size: h9 } = f10, _9 = u10.getBoundFramebufferObject();
  1459. let p6, b4;
  1460. if (r(_9)) {
  1461. const e16 = _9.descriptor;
  1462. p6 = e16.width, b4 = e16.height;
  1463. } else
  1464. p6 = Math.round(c13 * h9[0]), b4 = Math.round(c13 * h9[1]);
  1465. this._createOrResizeTexture(r18, p6, b4);
  1466. const g8 = this._backBufferTexture;
  1467. _9.copyToTexture(0, 0, p6, b4, 0, 0, g8), u10.setStencilTestEnabled(false), u10.setStencilWriteMask(0), u10.setBlendingEnabled(true), u10.setDepthTestEnabled(false), u10.setDepthWriteEnabled(false);
  1468. const x2 = n18(a18), E5 = u10.programCache.acquire(x2.shaders.vertexShader, x2.shaders.fragmentShader, x2.attributes);
  1469. if (!E5)
  1470. return void l6.error(new s3("mapview-BlendEffect", `Error creating shader program for blend mode ${a18}`));
  1471. u10.useProgram(E5), g8.setSamplingMode(i16), u10.bindTexture(g8, 0), E5.setUniform1i("u_backbufferTexture", 0), t18.setSamplingMode(i16), u10.bindTexture(t18, 1), E5.setUniform1i("u_layerTexture", 1), E5.setUniform1f("u_opacity", d15), E5.setUniform1f("u_inFadeOpacity", m10 ? 1 : 0), u10.setBlendFunction(R.ONE, R.ZERO);
  1472. const T4 = this._quad;
  1473. T4.draw(), T4.unbind(), E5.dispose(), u10.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA);
  1474. }
  1475. _setupShader(e16) {
  1476. this._quad || (this._quad = new n11(e16, [-1, -1, 1, -1, -1, 1, 1, 1]));
  1477. }
  1478. _createOrResizeTexture(e16, r18, t18) {
  1479. const { context: s16 } = e16;
  1480. null !== this._backBufferTexture && r18 === this._size[0] && t18 === this._size[1] || (this._backBufferTexture ? this._backBufferTexture.resize(r18, t18) : this._backBufferTexture = new E3(s16, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: r18, height: t18 }), this._size[0] = r18, this._size[1] = t18);
  1481. }
  1482. };
  1483. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/FeatureEffect.js
  1484. var r13 = class extends t7 {
  1485. constructor(e16) {
  1486. super(), this.name = this.constructor.name, this.defines = [e16];
  1487. }
  1488. dispose() {
  1489. }
  1490. bind({ context: e16, painter: t18 }) {
  1491. this._prev = e16.getBoundFramebufferObject();
  1492. const { width: r18, height: s16 } = e16.getViewport(), o17 = t18.getFbos(r18, s16).effect0;
  1493. e16.bindFramebuffer(o17), e16.setColorMask(true, true, true, true), e16.setClearColor(0, 0, 0, 0), e16.clear(e16.gl.COLOR_BUFFER_BIT);
  1494. }
  1495. unbind() {
  1496. }
  1497. draw(e16, r18) {
  1498. const { context: s16, painter: o17 } = e16, n23 = o17.getPostProcessingEffects(r18), c13 = s16.getBoundFramebufferObject();
  1499. for (const { postProcessingEffect: t18, effect: f10 } of n23)
  1500. t18.draw(e16, c13, f10);
  1501. s16.bindFramebuffer(this._prev), s16.setStencilTestEnabled(false), o17.blitTexture(s16, c13.colorTexture, L.NEAREST), s16.setStencilTestEnabled(true);
  1502. }
  1503. };
  1504. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/highlight/parameters.js
  1505. var o14 = 1;
  1506. var t13 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1];
  1507. var i10 = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
  1508. var n19 = 256;
  1509. var e14 = { outlineWidth: 1.3, outerHaloWidth: 0.4, innerHaloWidth: 0.4, outlinePosition: 0 };
  1510. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/highlight/HighlightGradient.js
  1511. var u5 = s2.getLogger("esri.views.2d.engine.webgl.painter.highlight.HighlightGradient");
  1512. function C3(o17, i16) {
  1513. i16.fillColor[0] = o17.color.r / 255, i16.fillColor[1] = o17.color.g / 255, i16.fillColor[2] = o17.color.b / 255, i16.fillColor[3] = o17.color.a, o17.haloColor ? (i16.outlineColor[0] = o17.haloColor.r / 255, i16.outlineColor[1] = o17.haloColor.g / 255, i16.outlineColor[2] = o17.haloColor.b / 255, i16.outlineColor[3] = o17.haloColor.a) : (i16.outlineColor[0] = i16.fillColor[0], i16.outlineColor[1] = i16.fillColor[1], i16.outlineColor[2] = i16.fillColor[2], i16.outlineColor[3] = i16.fillColor[3]), i16.fillColor[3] *= o17.fillOpacity, i16.outlineColor[3] *= o17.haloOpacity, i16.fillColor[0] *= i16.fillColor[3], i16.fillColor[1] *= i16.fillColor[3], i16.fillColor[2] *= i16.fillColor[3], i16.outlineColor[0] *= i16.outlineColor[3], i16.outlineColor[1] *= i16.outlineColor[3], i16.outlineColor[2] *= i16.outlineColor[3], i16.outlineWidth = e14.outlineWidth, i16.outerHaloWidth = e14.outerHaloWidth, i16.innerHaloWidth = e14.innerHaloWidth, i16.outlinePosition = e14.outlinePosition;
  1514. }
  1515. var g5 = [0, 0, 0, 0];
  1516. var f6 = class {
  1517. constructor() {
  1518. this._convertedHighlightOptions = { fillColor: [0.2 * 0.75, 0.6 * 0.75, 0.675, 0.75], outlineColor: [0.2 * 0.9, 0.54, 0.81, 0.9], outlinePosition: e14.outlinePosition, outlineWidth: e14.outlineWidth, innerHaloWidth: e14.innerHaloWidth, outerHaloWidth: e14.outerHaloWidth }, this._shadeTexChanged = true, this._texelData = new Uint8Array(4 * n19), this._minMaxDistance = [0, 0];
  1519. }
  1520. setHighlightOptions(o17) {
  1521. const i16 = this._convertedHighlightOptions;
  1522. C3(o17, i16);
  1523. const t18 = i16.outlinePosition - i16.outlineWidth / 2 - i16.outerHaloWidth, r18 = i16.outlinePosition - i16.outlineWidth / 2, n23 = i16.outlinePosition + i16.outlineWidth / 2, h9 = i16.outlinePosition + i16.outlineWidth / 2 + i16.innerHaloWidth, a18 = Math.sqrt(Math.PI / 2) * o14, s16 = Math.abs(t18) > a18 ? Math.round(10 * (Math.abs(t18) - a18)) / 10 : 0, d15 = Math.abs(h9) > a18 ? Math.round(10 * (Math.abs(h9) - a18)) / 10 : 0;
  1524. let f10;
  1525. s16 && !d15 ? u5.error("The outer rim of the highlight is " + s16 + "px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards).") : !s16 && d15 ? u5.error("The inner rim of the highlight is " + d15 + "px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards).") : s16 && d15 && u5.error("The highlight is " + Math.max(s16, d15) + "px away from the edge of the feature; consider reducing some width values.");
  1526. const c13 = [void 0, void 0, void 0, void 0];
  1527. function m10(o18, i17, t19) {
  1528. c13[0] = (1 - t19) * o18[0] + t19 * i17[0], c13[1] = (1 - t19) * o18[1] + t19 * i17[1], c13[2] = (1 - t19) * o18[2] + t19 * i17[2], c13[3] = (1 - t19) * o18[3] + t19 * i17[3];
  1529. }
  1530. const { _texelData: p6 } = this;
  1531. for (let l17 = 0; l17 < n19; ++l17)
  1532. f10 = t18 + l17 / (n19 - 1) * (h9 - t18), f10 < t18 ? (c13[4 * l17 + 0] = 0, c13[4 * l17 + 1] = 0, c13[4 * l17 + 2] = 0, c13[4 * l17 + 3] = 0) : f10 < r18 ? m10(g5, i16.outlineColor, (f10 - t18) / (r18 - t18)) : f10 < n23 ? [c13[0], c13[1], c13[2], c13[3]] = i16.outlineColor : f10 < h9 ? m10(i16.outlineColor, i16.fillColor, (f10 - n23) / (h9 - n23)) : [c13[4 * l17 + 0], c13[4 * l17 + 1], c13[4 * l17 + 2], c13[4 * l17 + 3]] = i16.fillColor, p6[4 * l17 + 0] = 255 * c13[0], p6[4 * l17 + 1] = 255 * c13[1], p6[4 * l17 + 2] = 255 * c13[2], p6[4 * l17 + 3] = 255 * c13[3];
  1533. this._minMaxDistance[0] = t18, this._minMaxDistance[1] = h9, this._shadeTexChanged = true;
  1534. }
  1535. applyHighlightOptions(o17, t18) {
  1536. this._shadeTex || (this._shadeTex = new E3(o17, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, width: n19, height: 1, samplingMode: L.LINEAR })), this._shadeTexChanged && (this._shadeTex.updateData(0, 0, 0, n19, 1, this._texelData), this._shadeTexChanged = false), o17.bindTexture(this._shadeTex, J), t18.setUniform2fv("u_minMaxDistance", this._minMaxDistance);
  1537. }
  1538. destroy() {
  1539. this._shadeTex && (this._shadeTex.dispose(), this._shadeTex = null);
  1540. }
  1541. };
  1542. // node_modules/@arcgis/core/views/2d/engine/webgl/shaders/HighlightPrograms.js
  1543. var t14 = { shaders: { vertexShader: n12("highlight/textured.vert"), fragmentShader: n12("highlight/highlight.frag") }, attributes: /* @__PURE__ */ new Map([["a_position", 0], ["a_texcoord", 1]]) };
  1544. var r14 = { shaders: { vertexShader: n12("highlight/textured.vert"), fragmentShader: n12("highlight/blur.frag") }, attributes: /* @__PURE__ */ new Map([["a_position", 0], ["a_texcoord", 1]]) };
  1545. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js
  1546. var c6 = class {
  1547. constructor() {
  1548. this._width = void 0, this._height = void 0, this._resources = null;
  1549. }
  1550. dispose() {
  1551. this._resources && (this._resources.quadGeometry.dispose(), this._resources.quadVAO.dispose(), this._resources.highlightProgram.dispose(), this._resources.blurProgram.dispose(), this._resources = null);
  1552. }
  1553. preBlur(e16, i16) {
  1554. e16.bindTexture(i16, I2), e16.useProgram(this._resources.blurProgram), this._resources.blurProgram.setUniform4fv("u_direction", [1, 0, 1 / this._width, 0]), this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector", t13), e16.bindVAO(this._resources.quadVAO), e16.drawArrays(E.TRIANGLE_STRIP, 0, 4), e16.bindVAO();
  1555. }
  1556. finalBlur(e16, s16) {
  1557. e16.bindTexture(s16, I2), e16.useProgram(this._resources.blurProgram), this._resources.blurProgram.setUniform4fv("u_direction", [0, 1, 0, 1 / this._height]), this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector", i10), e16.bindVAO(this._resources.quadVAO), e16.drawArrays(E.TRIANGLE_STRIP, 0, 4), e16.bindVAO();
  1558. }
  1559. renderHighlight(e16, s16, i16) {
  1560. e16.bindTexture(s16, I2), e16.useProgram(this._resources.highlightProgram), i16.applyHighlightOptions(e16, this._resources.highlightProgram), e16.bindVAO(this._resources.quadVAO), e16.setBlendingEnabled(true), e16.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), e16.drawArrays(E.TRIANGLE_STRIP, 0, 4), e16.bindVAO();
  1561. }
  1562. _initialize(s16, i16, a18) {
  1563. this._width = i16, this._height = a18;
  1564. const m10 = E4.createVertex(s16, F.STATIC_DRAW, new Int8Array([-1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1]).buffer), c13 = new a7(s16, /* @__PURE__ */ new Map([["a_position", 0], ["a_texcoord", 1]]), { geometry: [new t3("a_position", 2, C.BYTE, 0, 4), new t3("a_texcoord", 2, C.UNSIGNED_BYTE, 2, 4)] }, { geometry: m10 }), f10 = e8(s16, t14), b4 = e8(s16, r14);
  1565. s16.useProgram(f10), f10.setUniform1i("u_texture", I2), f10.setUniform1i("u_shade", J), f10.setUniform1f("u_sigma", o14), s16.useProgram(b4), b4.setUniform1i("u_texture", I2), b4.setUniform1f("u_sigma", o14), this._resources = { quadGeometry: m10, quadVAO: c13, highlightProgram: f10, blurProgram: b4 };
  1566. }
  1567. setup(r18, e16, s16) {
  1568. this._resources ? (this._width = e16, this._height = s16) : this._initialize(r18, e16, s16);
  1569. }
  1570. };
  1571. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/highlight/HighlightSurfaces.js
  1572. function l7(e16, l17, _9) {
  1573. const c13 = new E3(e16, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, width: l17, height: _9, samplingMode: L.LINEAR });
  1574. return [c13, new x(e16, { colorTarget: Y.TEXTURE, depthStencilTarget: V.STENCIL_RENDER_BUFFER }, c13)];
  1575. }
  1576. var _3 = class {
  1577. constructor() {
  1578. this._width = void 0, this._height = void 0, this._resources = null;
  1579. }
  1580. dispose() {
  1581. this._resources && (this._resources.sharedBlur1Tex.dispose(), this._resources.sharedBlur1Fbo.dispose(), this._resources.sharedBlur2Tex.dispose(), this._resources.sharedBlur2Fbo.dispose(), this._resources = d(this._resources));
  1582. }
  1583. _initialize(e16, s16, r18) {
  1584. this._width = s16, this._height = r18;
  1585. const [t18, i16] = l7(e16, s16, r18), [h9, o17] = l7(e16, s16, r18);
  1586. this._resources = { sharedBlur1Tex: t18, sharedBlur1Fbo: i16, sharedBlur2Tex: h9, sharedBlur2Fbo: o17 };
  1587. }
  1588. setup(e16, s16, r18) {
  1589. !this._resources || this._width === s16 && this._height === r18 || this.dispose(), this._resources || this._initialize(e16, s16, r18);
  1590. }
  1591. get sharedBlur1Tex() {
  1592. return this._resources.sharedBlur1Tex;
  1593. }
  1594. get sharedBlur1Fbo() {
  1595. return this._resources.sharedBlur1Fbo;
  1596. }
  1597. get sharedBlur2Tex() {
  1598. return this._resources.sharedBlur2Tex;
  1599. }
  1600. get sharedBlur2Fbo() {
  1601. return this._resources.sharedBlur2Fbo;
  1602. }
  1603. };
  1604. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/HighlightEffect.js
  1605. var l8 = 4;
  1606. var d5 = 4 / l8;
  1607. var n20 = class extends t7 {
  1608. constructor() {
  1609. super(...arguments), this.defines = ["highlight"], this._hlRenderer = new c6(), this._hlGradient = new f6(), this._width = void 0, this._height = void 0, this._hlSurfaces = new _3(), this._adjustedWidth = void 0, this._adjustedHeight = void 0, this._blitRenderer = new _();
  1610. }
  1611. dispose() {
  1612. this._hlSurfaces && this._hlSurfaces.dispose(), this._hlRenderer && this._hlRenderer.dispose(), this._hlGradient && this._hlGradient.destroy(), this._boundFBO = null;
  1613. }
  1614. bind(e16) {
  1615. const { context: t18, painter: s16 } = e16, { width: i16, height: h9 } = t18.getViewport(), r18 = s16.getFbos(i16, h9).effect0;
  1616. this.setup(e16, i16, h9), t18.bindFramebuffer(r18), t18.setColorMask(true, true, true, true), t18.setClearColor(0, 0, 0, 0), t18.clear(t18.gl.COLOR_BUFFER_BIT);
  1617. }
  1618. unbind() {
  1619. }
  1620. setup({ context: e16 }, t18, s16) {
  1621. this._width = t18, this._height = s16;
  1622. const i16 = t18 % l8, h9 = s16 % l8;
  1623. t18 += i16 < l8 / 2 ? -i16 : l8 - i16, s16 += h9 < l8 / 2 ? -h9 : l8 - h9, this._adjustedWidth = t18, this._adjustedHeight = s16, this._boundFBO = e16.getBoundFramebufferObject();
  1624. const r18 = Math.round(t18 * d5), n23 = Math.round(s16 * d5);
  1625. this._hlRenderer.setup(e16, r18, n23), this._hlSurfaces.setup(e16, r18, n23);
  1626. }
  1627. draw({ context: e16 }) {
  1628. const t18 = e16.getBoundFramebufferObject();
  1629. e16.setViewport(0, 0, this._adjustedWidth * d5, this._adjustedHeight * d5), e16.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo), e16.setStencilTestEnabled(false), e16.setClearColor(0, 0, 0, 0), e16.clear(e16.gl.COLOR_BUFFER_BIT), this._blitRenderer.render(e16, t18.colorTexture, L.NEAREST, 1), e16.setStencilTestEnabled(false), e16.setBlendingEnabled(false), e16.setColorMask(false, false, false, true), e16.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo), e16.setClearColor(0, 0, 0, 0), e16.clear(e16.gl.COLOR_BUFFER_BIT), this._hlRenderer.preBlur(e16, this._hlSurfaces.sharedBlur1Tex), e16.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo), e16.setClearColor(0, 0, 0, 0), e16.clear(e16.gl.COLOR_BUFFER_BIT), this._hlRenderer.finalBlur(e16, this._hlSurfaces.sharedBlur2Tex), e16.bindFramebuffer(this._boundFBO), e16.setBlendingEnabled(true), e16.setColorMask(true, true, true, true), e16.setViewport(0, 0, this._width, this._height), this._hlRenderer.renderHighlight(e16, this._hlSurfaces.sharedBlur1Tex, this._hlGradient), this._boundFBO = null;
  1630. }
  1631. setHighlightOptions(e16) {
  1632. this._hlGradient.setHighlightOptions(e16);
  1633. }
  1634. };
  1635. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/HittestEffect.js
  1636. var c7 = class extends t7 {
  1637. constructor() {
  1638. super(...arguments), this.name = this.constructor.name, this.defines = ["hittest"];
  1639. }
  1640. dispose() {
  1641. r(this._fbo) && this._fbo.dispose();
  1642. }
  1643. createOptions({ pixelRatio: t18 }, e16, s16 = Y2) {
  1644. if (!e16.length)
  1645. return null;
  1646. const r18 = e16.shift(), o17 = r18.x, n23 = r18.y;
  1647. return this._outstanding = r18, { type: "hittest", distance: s16 * t18, position: [o17, n23] };
  1648. }
  1649. bind(t18) {
  1650. const { context: i16, attributeView: r18 } = t18;
  1651. if (!r18.size)
  1652. return;
  1653. const o17 = r18.getBlock(O2);
  1654. if (t(o17))
  1655. return;
  1656. const n23 = o17.getFBO(i16);
  1657. i16.setViewport(0, 0, r18.size, r18.size), i16.bindFramebuffer(n23), i16.setColorMask(true, true, true, true), i16.setClearColor(0, 0, 0, 0), i16.clear(i16.gl.COLOR_BUFFER_BIT | i16.gl.DEPTH_BUFFER_BIT);
  1658. }
  1659. unbind(t18) {
  1660. }
  1661. draw(t18) {
  1662. if (t(this._outstanding))
  1663. return;
  1664. const i16 = this._outstanding;
  1665. this._outstanding = null, this._resolve(t18, i16.resolvers);
  1666. }
  1667. async _resolve(t18, i16) {
  1668. const { context: r18, attributeView: c13 } = t18, a18 = c13.getBlock(O2);
  1669. if (t(a18))
  1670. return void i16.forEach((t19) => t19.resolve([]));
  1671. const d15 = a18.getFBO(r18), h9 = new Uint8Array(d15.width * d15.height * 4);
  1672. try {
  1673. await d15.readPixelsAsync(0, 0, d15.width, d15.height, P.RGBA, G.UNSIGNED_BYTE, h9);
  1674. } catch (u10) {
  1675. return void i16.forEach((t19) => t19.resolve([]));
  1676. }
  1677. const l17 = [];
  1678. for (let e16 = 0; e16 < h9.length; e16 += 4) {
  1679. const t19 = h9[e16], i17 = h9[e16 + 3];
  1680. t19 && l17.push({ id: e16 / 4, directHits: i17 });
  1681. }
  1682. l17.sort((t19, e16) => e16.directHits === t19.directHits ? e16.id - t19.id : e16.directHits - t19.directHits);
  1683. const f10 = l17.map((t19) => t19.id);
  1684. i16.forEach((t19) => t19.resolve(f10));
  1685. }
  1686. };
  1687. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/HittestEffectVTL.js
  1688. var i11 = class extends t7 {
  1689. constructor() {
  1690. super(...arguments), this.name = this.constructor.name, this.defines = ["id"], this._lastSize = 0;
  1691. }
  1692. dispose() {
  1693. r(this._fbo) && this._fbo.dispose();
  1694. }
  1695. bind({ context: t18, painter: e16 }) {
  1696. const { width: s16, height: o17 } = t18.getViewport();
  1697. this._boundFBO = t18.getBoundFramebufferObject();
  1698. const r18 = e16.getFbos(s16, o17).effect0;
  1699. t18.bindFramebuffer(r18), t18.setColorMask(true, true, true, true), t18.setClearColor(0, 0, 0, 0), t18.clear(t18.gl.COLOR_BUFFER_BIT);
  1700. }
  1701. unbind({ context: t18 }) {
  1702. t18.bindFramebuffer(this._boundFBO), this._boundFBO = null;
  1703. }
  1704. draw(t18, s16, o17 = 2 * Y2) {
  1705. this._resolve(t18, s16, o17);
  1706. }
  1707. async _resolve({ context: t18, state: e16, pixelRatio: s16 }, i16, n23) {
  1708. const f10 = t18.getBoundFramebufferObject(), a18 = e16.size[1] * s16, h9 = Math.round(n23 * s16), u10 = h9 / 2, b4 = h9 / 2;
  1709. this._ensureBuffer(h9), i16.forEach(async (t19, e17) => {
  1710. const n24 = /* @__PURE__ */ new Map(), c13 = Math.floor(e17.x * s16 - h9 / 2), l17 = Math.floor(a18 - e17.y * s16 - h9 / 2);
  1711. await f10.readPixelsAsync(c13, l17, h9, h9, P.RGBA, G.UNSIGNED_BYTE, this._buf);
  1712. for (let s17 = 0; s17 < this._buf32.length; s17++) {
  1713. const t20 = this._buf32[s17];
  1714. if (4294967295 !== t20 && 0 !== t20) {
  1715. const e18 = s17 % h9, o17 = h9 - Math.floor(s17 / h9), r18 = (u10 - e18) * (u10 - e18) + (b4 - o17) * (b4 - o17), i17 = n24.has(t20) ? n24.get(t20) : 4294967295;
  1716. n24.set(t20, Math.min(r18, i17));
  1717. }
  1718. }
  1719. const _9 = Array.from(n24).sort((t20, e18) => t20[1] - e18[1]).map((t20) => t20[0]);
  1720. t19.resolve(_9), i16.delete(e17);
  1721. });
  1722. }
  1723. _ensureBuffer(t18) {
  1724. this._lastSize !== t18 && (this._lastSize = t18, this._buf = new Uint8Array(4 * t18 * t18), this._buf32 = new Uint32Array(this._buf.buffer));
  1725. }
  1726. };
  1727. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/post-processing/Bloom.js
  1728. var u6 = 5;
  1729. var p2 = [1, 0];
  1730. var _4 = [0, 1];
  1731. var m7 = [1, 0.8, 0.6, 0.4, 0.2];
  1732. var d6 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
  1733. var c8 = class {
  1734. constructor() {
  1735. this._intensityFBO = null, this._compositeFBO = null, this._mipsFBOs = new Array(u6), this._nMips = u6, this._kernelSizeArray = [3, 5, 7, 9, 11], this._size = [0, 0], this._programDesc = { luminosityHighPass: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/luminosityHighPass", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, gaussianBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, composite: { vsPath: "post-processing/pp", fsPath: "post-processing/bloom/composite", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
  1736. }
  1737. dispose() {
  1738. if (this._quad && (this._quad.dispose(), this._quad = null), this._intensityFBO && (this._intensityFBO.dispose(), this._intensityFBO = null), this._compositeFBO && (this._compositeFBO.dispose(), this._compositeFBO = null), this._mipsFBOs) {
  1739. for (let t18 = 0; t18 < this._nMips; t18++)
  1740. this._mipsFBOs[t18] && (this._mipsFBOs[t18].horizontal.dispose(), this._mipsFBOs[t18].vertical.dispose());
  1741. this._mipsFBOs = null;
  1742. }
  1743. }
  1744. draw(i16, s16, r18) {
  1745. const { width: o17, height: n23 } = s16, { context: a18, painter: l17 } = i16, { materialManager: h9 } = l17, c13 = a18.gl, T4 = this._programDesc, { strength: f10, radius: g8, threshold: B3 } = r18;
  1746. this._quad || (this._quad = new n11(a18, [-1, -1, 1, -1, -1, 1, 1, 1])), this._createOrResizeResources(i16, o17, n23), a18.setStencilTestEnabled(false), a18.setBlendingEnabled(true), a18.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), a18.setStencilWriteMask(0);
  1747. const O6 = this._quad;
  1748. O6.bind(), a18.bindFramebuffer(this._intensityFBO);
  1749. const F3 = h9.getProgram(T4.luminosityHighPass);
  1750. a18.useProgram(F3), a18.bindTexture(s16.colorTexture, 0), F3.setUniform1i("u_texture", 0), F3.setUniform3fv("u_defaultColor", [0, 0, 0]), F3.setUniform1f("u_defaultOpacity", 0), F3.setUniform1f("u_luminosityThreshold", B3), F3.setUniform1f("u_smoothWidth", 0.01);
  1751. const b4 = [Math.round(o17 / 2), Math.round(n23 / 2)];
  1752. a18.setViewport(0, 0, b4[0], b4[1]), a18.setClearColor(0, 0, 0, 0), a18.clear(c13.COLOR_BUFFER_BIT), O6.draw(), a18.setBlendingEnabled(false);
  1753. let E5 = this._intensityFBO.colorTexture;
  1754. for (let t18 = 0; t18 < this._nMips; t18++) {
  1755. const e16 = h9.getProgram(T4.gaussianBlur, [{ name: "radius", value: this._kernelSizeArray[t18] }]);
  1756. a18.useProgram(e16), a18.bindTexture(E5, t18 + 1), e16.setUniform1i("u_colorTexture", t18 + 1), e16.setUniform2fv("u_texSize", b4), e16.setUniform2fv("u_direction", p2), a18.setViewport(0, 0, b4[0], b4[1]);
  1757. const i17 = this._mipsFBOs[t18];
  1758. a18.bindFramebuffer(i17.horizontal), O6.draw(), E5 = i17.horizontal.colorTexture, a18.bindFramebuffer(i17.vertical), a18.bindTexture(E5, t18 + 1), e16.setUniform2fv("u_direction", _4), O6.draw(), E5 = i17.vertical.colorTexture, b4[0] = Math.round(b4[0] / 2), b4[1] = Math.round(b4[1] / 2);
  1759. }
  1760. a18.setViewport(0, 0, o17, n23);
  1761. const x2 = h9.getProgram(T4.composite, [{ name: "nummips", value: u6 }]);
  1762. a18.bindFramebuffer(this._compositeFBO), a18.useProgram(x2), x2.setUniform1f("u_bloomStrength", f10), x2.setUniform1f("u_bloomRadius", g8), x2.setUniform1fv("u_bloomFactors", m7), x2.setUniform3fv("u_bloomTintColors", d6), a18.bindTexture(this._mipsFBOs[0].vertical.colorTexture, 1), x2.setUniform1i("u_blurTexture1", 1), a18.bindTexture(this._mipsFBOs[1].vertical.colorTexture, 2), x2.setUniform1i("u_blurTexture2", 2), a18.bindTexture(this._mipsFBOs[2].vertical.colorTexture, 3), x2.setUniform1i("u_blurTexture3", 3), a18.bindTexture(this._mipsFBOs[3].vertical.colorTexture, 4), x2.setUniform1i("u_blurTexture4", 4), a18.bindTexture(this._mipsFBOs[4].vertical.colorTexture, 5), x2.setUniform1i("u_blurTexture5", 5), O6.draw(), a18.bindFramebuffer(s16), a18.setBlendingEnabled(true);
  1763. const w3 = h9.getProgram(T4.blit);
  1764. a18.useProgram(w3), a18.bindTexture(this._compositeFBO.colorTexture, 6), w3.setUniform1i("u_texture", 6), a18.setBlendFunction(R.ONE, R.ONE), O6.draw(), O6.unbind(), a18.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), a18.setStencilTestEnabled(true);
  1765. }
  1766. _createOrResizeResources(t18, e16, u10) {
  1767. const { context: p6 } = t18;
  1768. if (this._compositeFBO && this._size[0] === e16 && this._size[1] === u10)
  1769. return;
  1770. this._size[0] = e16, this._size[1] = u10;
  1771. const _9 = [Math.round(e16 / 2), Math.round(u10 / 2)];
  1772. this._compositeFBO ? this._compositeFBO.resize(e16, u10) : this._compositeFBO = new x(p6, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: e16, height: u10 }), this._intensityFBO ? this._intensityFBO.resize(_9[0], _9[1]) : this._intensityFBO = new x(p6, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: _9[0], height: _9[1] }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: _9[0], height: _9[1] });
  1773. for (let m10 = 0; m10 < this._nMips; m10++)
  1774. this._mipsFBOs[m10] ? (this._mipsFBOs[m10].horizontal.resize(_9[0], _9[1]), this._mipsFBOs[m10].vertical.resize(_9[0], _9[1])) : this._mipsFBOs[m10] = { horizontal: new x(p6, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: _9[0], height: _9[1] }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: _9[0], height: _9[1] }), vertical: new x(p6, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: _9[0], height: _9[1] }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: _9[0], height: _9[1] }) }, _9[0] = Math.round(_9[0] / 2), _9[1] = Math.round(_9[1] / 2);
  1775. }
  1776. };
  1777. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/post-processing/Blur.js
  1778. var d7 = [1, 0];
  1779. var _5 = [0, 1];
  1780. var b2 = class {
  1781. constructor() {
  1782. this._blurFBO = null, this._size = [0, 0], this._programDesc = { gaussianBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, radialBlur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/radial-blur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
  1783. }
  1784. dispose() {
  1785. this._blurFBO && (this._blurFBO.dispose(), this._blurFBO = null);
  1786. }
  1787. draw(t18, r18, s16) {
  1788. const { context: i16 } = t18, { type: a18, radius: n23 } = s16;
  1789. if (0 === n23)
  1790. return;
  1791. this._createOrResizeResources(t18), this._quad || (this._quad = new n11(i16, [-1, -1, 1, -1, -1, 1, 1, 1]));
  1792. const o17 = this._quad;
  1793. o17.bind(), "blur" === a18 ? this._gaussianBlur(t18, r18, n23) : this._radialBlur(t18, r18), o17.unbind();
  1794. }
  1795. _gaussianBlur(e16, r18, s16) {
  1796. const { context: i16, state: a18, painter: n23, pixelRatio: o17 } = e16, { size: u10 } = a18, { materialManager: l17 } = n23, b4 = this._programDesc, p6 = this._quad, c13 = [Math.round(o17 * u10[0]), Math.round(o17 * u10[1])], h9 = this._blurFBO, g8 = l17.getProgram(b4.gaussianBlur, [{ name: "radius", value: Math.ceil(s16) }]);
  1797. i16.useProgram(g8), i16.setBlendingEnabled(false), i16.bindFramebuffer(h9), i16.bindTexture(r18.colorTexture, 4), g8.setUniform1i("u_colorTexture", 4), g8.setUniform2fv("u_texSize", c13), g8.setUniform2fv("u_direction", d7), g8.setUniform1f("u_sigma", s16), p6.draw(), i16.bindFramebuffer(r18), i16.setStencilWriteMask(0), i16.setStencilTestEnabled(false), i16.setDepthWriteEnabled(false), i16.setDepthTestEnabled(false), i16.bindTexture(h9.colorTexture, 5), g8.setUniform1i("u_colorTexture", 5), g8.setUniform2fv("u_direction", _5), p6.draw(), i16.setBlendingEnabled(true), i16.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), i16.setStencilTestEnabled(true);
  1798. }
  1799. _radialBlur(e16, r18) {
  1800. const { context: s16, painter: i16 } = e16, { materialManager: a18 } = i16, n23 = this._programDesc, o17 = this._quad, u10 = this._blurFBO;
  1801. s16.bindFramebuffer(u10);
  1802. const l17 = a18.getProgram(n23.radialBlur);
  1803. s16.useProgram(l17), s16.setBlendingEnabled(false), s16.bindTexture(r18.colorTexture, 4), l17.setUniform1i("u_colorTexture", 4), o17.draw(), s16.bindFramebuffer(r18), s16.setStencilWriteMask(0), s16.setStencilTestEnabled(false), s16.setDepthWriteEnabled(false), s16.setDepthTestEnabled(false), s16.setBlendingEnabled(true);
  1804. const d15 = a18.getProgram(n23.blit);
  1805. s16.useProgram(d15), s16.bindTexture(u10.colorTexture, 5), d15.setUniform1i("u_texture", 5), s16.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), o17.draw();
  1806. }
  1807. _createOrResizeResources(e16) {
  1808. const { context: t18, state: d15, pixelRatio: _9 } = e16, { size: b4 } = d15, p6 = Math.round(_9 * b4[0]), c13 = Math.round(_9 * b4[1]);
  1809. this._blurFBO && this._size[0] === p6 && this._size[1] === c13 || (this._size[0] = p6, this._size[1] = c13, this._blurFBO ? this._blurFBO.resize(p6, c13) : this._blurFBO = new x(t18, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: p6, height: c13 }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: p6, height: c13 }));
  1810. }
  1811. };
  1812. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/post-processing/Colorize.js
  1813. var l9 = class {
  1814. constructor() {
  1815. this._size = [0, 0], this._programDesc = { vsPath: "post-processing/pp", fsPath: "post-processing/filterEffect", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) };
  1816. }
  1817. dispose() {
  1818. this._layerFBOTexture && (this._layerFBOTexture.dispose(), this._layerFBOTexture = null);
  1819. }
  1820. draw(e16, s16, r18) {
  1821. const { width: i16, height: a18 } = s16;
  1822. this._createOrResizeResources(e16, i16, a18);
  1823. const { context: o17, painter: n23 } = e16, { materialManager: l17 } = n23, _9 = this._programDesc, c13 = this._quad, h9 = r18.colorMatrix;
  1824. c13.bind();
  1825. const u10 = this._layerFBOTexture;
  1826. o17.bindFramebuffer(s16), s16.copyToTexture(0, 0, i16, a18, 0, 0, u10), o17.setBlendingEnabled(false), o17.setStencilTestEnabled(false);
  1827. const d15 = l17.getProgram(_9);
  1828. o17.useProgram(d15), o17.bindTexture(u10, 2), d15.setUniformMatrix4fv("u_coefficients", h9), d15.setUniform1i("u_colorTexture", 2), c13.draw(), o17.setBlendingEnabled(true), o17.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), o17.setStencilTestEnabled(true), c13.unbind();
  1829. }
  1830. _createOrResizeResources(t18, l17, _9) {
  1831. const { context: c13 } = t18;
  1832. this._layerFBOTexture && this._size[0] === l17 && this._size[1] === _9 || (this._size[0] = l17, this._size[1] = _9, this._layerFBOTexture ? this._layerFBOTexture.resize(l17, _9) : this._layerFBOTexture = new E3(c13, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: l17, height: _9 }), this._quad || (this._quad = new n11(c13, [-1, -1, 1, -1, -1, 1, 1, 1])));
  1833. }
  1834. };
  1835. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/post-processing/DropShadow.js
  1836. var _6 = [1, 0];
  1837. var d8 = [0, 1];
  1838. var c9 = class {
  1839. constructor() {
  1840. this._horizontalBlurFBO = null, this._verticalBlurFBO = null, this._size = [0, 0], this._programDesc = { blur: { vsPath: "post-processing/pp", fsPath: "post-processing/blur/gaussianBlur", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, composite: { vsPath: "post-processing/pp", fsPath: "post-processing/drop-shadow/composite", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) }, blit: { vsPath: "post-processing/pp", fsPath: "post-processing/blit", attributes: /* @__PURE__ */ new Map([["a_position", 0]]) } };
  1841. }
  1842. dispose() {
  1843. this._layerFBOTexture && (this._layerFBOTexture.dispose(), this._layerFBOTexture = null), this._horizontalBlurFBO && (this._horizontalBlurFBO.dispose(), this._horizontalBlurFBO = null), this._verticalBlurFBO && (this._verticalBlurFBO.dispose(), this._verticalBlurFBO = null);
  1844. }
  1845. draw(i16, s16, o17) {
  1846. const { context: a18, state: l17, painter: n23 } = i16, { materialManager: u10 } = n23, h9 = this._programDesc, p6 = s16.width, c13 = s16.height, B3 = [Math.round(p6), Math.round(c13)], { blurRadius: m10, offsetX: T4, offsetY: f10, color: g8 } = o17, F3 = [u(T4), u(f10)];
  1847. this._createOrResizeResources(i16, p6, c13, B3);
  1848. const O6 = this._horizontalBlurFBO, E5 = this._verticalBlurFBO;
  1849. a18.setStencilWriteMask(0), a18.setStencilTestEnabled(false), a18.setDepthWriteEnabled(false), a18.setDepthTestEnabled(false);
  1850. const b4 = this._layerFBOTexture;
  1851. s16.copyToTexture(0, 0, p6, c13, 0, 0, b4), this._quad || (this._quad = new n11(a18, [-1, -1, 1, -1, -1, 1, 1, 1])), a18.setViewport(0, 0, B3[0], B3[1]);
  1852. const w3 = this._quad;
  1853. w3.bind(), a18.setBlendingEnabled(false);
  1854. const x2 = u10.getProgram(h9.blur, [{ name: "radius", value: Math.ceil(m10) }]);
  1855. a18.useProgram(x2), a18.bindFramebuffer(O6), a18.bindTexture(s16.colorTexture, 4), x2.setUniform1i("u_colorTexture", 4), x2.setUniform2fv("u_texSize", B3), x2.setUniform2fv("u_direction", _6), x2.setUniform1f("u_sigma", m10), w3.draw(), a18.bindFramebuffer(E5), a18.bindTexture(O6.colorTexture, 5), x2.setUniform1i("u_colorTexture", 5), x2.setUniform2fv("u_direction", d8), w3.draw(), a18.bindFramebuffer(s16), a18.setViewport(0, 0, p6, c13);
  1856. const M4 = u10.getProgram(h9.composite);
  1857. a18.useProgram(M4), a18.bindTexture(E5.colorTexture, 2), M4.setUniform1i("u_blurTexture", 2), a18.bindTexture(b4, 3), M4.setUniform1i("u_layerFBOTexture", 3), M4.setUniform4fv("u_shadowColor", [g8[3] * (g8[0] / 255), g8[3] * (g8[1] / 255), g8[3] * (g8[2] / 255), g8[3]]), M4.setUniformMatrix3fv("u_displayViewMat3", l17.displayMat3), M4.setUniform2fv("u_shadowOffset", F3), w3.draw(), a18.setBlendingEnabled(true), a18.setStencilTestEnabled(true), a18.setBlendFunction(R.ONE, R.ONE_MINUS_SRC_ALPHA), w3.unbind();
  1858. }
  1859. _createOrResizeResources(e16, t18, r18, _9) {
  1860. const { context: d15 } = e16;
  1861. this._horizontalBlurFBO && this._size[0] === t18 && this._size[1] === r18 || (this._size[0] = t18, this._size[1] = r18, this._horizontalBlurFBO ? this._horizontalBlurFBO.resize(_9[0], _9[1]) : this._horizontalBlurFBO = new x(d15, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: _9[0], height: _9[1] }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: _9[0], height: _9[1] }), this._verticalBlurFBO ? this._verticalBlurFBO.resize(_9[0], _9[1]) : this._verticalBlurFBO = new x(d15, { colorTarget: Y.TEXTURE, depthStencilTarget: V.NONE, width: _9[0], height: _9[1] }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: _9[0], height: _9[1] }), this._layerFBOTexture ? this._layerFBOTexture.resize(t18, r18) : this._layerFBOTexture = new E3(d15, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: t18, height: r18 }));
  1862. }
  1863. };
  1864. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/post-processing/Opacity.js
  1865. var l10 = class {
  1866. constructor() {
  1867. this._size = [0, 0];
  1868. }
  1869. dispose() {
  1870. this._layerFBOTexture && (this._layerFBOTexture.dispose(), this._layerFBOTexture = null);
  1871. }
  1872. draw(t18, s16, r18) {
  1873. const { width: i16, height: a18 } = s16;
  1874. this._createOrResizeResources(t18, i16, a18);
  1875. const { context: l17, painter: o17 } = t18, { amount: T4 } = r18, h9 = l17.gl, n23 = this._layerFBOTexture;
  1876. l17.bindFramebuffer(s16), s16.copyToTexture(0, 0, i16, a18, 0, 0, n23), l17.setBlendingEnabled(true), l17.setStencilTestEnabled(false), l17.setDepthTestEnabled(false), l17.setClearColor(0, 0, 0, 0), l17.clear(h9.COLOR_BUFFER_BIT), o17.blitTexture(l17, n23, L.NEAREST, T4);
  1877. }
  1878. _createOrResizeResources(l17, o17, T4) {
  1879. const { context: h9 } = l17;
  1880. this._layerFBOTexture && this._size[0] === o17 && this._size[1] === T4 || (this._size[0] = o17, this._size[1] = T4, this._layerFBOTexture ? this._layerFBOTexture.resize(o17, T4) : this._layerFBOTexture = new E3(h9, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.NEAREST, flipped: false, width: o17, height: T4 }));
  1881. }
  1882. };
  1883. // node_modules/@arcgis/core/views/2d/engine/webgl/effects/post-processing/EffectManager.js
  1884. function c10(o17) {
  1885. switch (o17) {
  1886. case "bloom":
  1887. case "blur":
  1888. case "opacity":
  1889. case "drop-shadow":
  1890. return o17;
  1891. default:
  1892. return "colorize";
  1893. }
  1894. }
  1895. var f7 = { colorize: () => new l9(), blur: () => new b2(), bloom: () => new c8(), opacity: () => new l10(), "drop-shadow": () => new c9() };
  1896. var i12 = class {
  1897. constructor() {
  1898. this._effectMap = /* @__PURE__ */ new Map();
  1899. }
  1900. dispose() {
  1901. this._effectMap.forEach((o17) => o17.dispose()), this._effectMap.clear();
  1902. }
  1903. getPostProcessingEffects(o17) {
  1904. if (!o17 || 0 === o17.length)
  1905. return [];
  1906. const e16 = [];
  1907. for (const t18 of o17) {
  1908. const o18 = c10(t18.type);
  1909. let s16 = this._effectMap.get(o18);
  1910. s16 || (s16 = f7[o18](), this._effectMap.set(o18, s16)), e16.push({ postProcessingEffect: s16, effect: t18 });
  1911. }
  1912. return e16;
  1913. }
  1914. };
  1915. // node_modules/@arcgis/core/views/2d/engine/webgl/painter/RenderPass.js
  1916. var a13 = class {
  1917. constructor(e16, t18) {
  1918. var _a2;
  1919. this.brushes = e16, this.name = t18.name, this.drawPhase = t18.drawPhase || I3.MAP, this._targetFn = t18.target, this.effects = t18.effects || [], this.enableDefaultDraw = (_a2 = t18.enableDefaultDraw) != null ? _a2 : () => true;
  1920. }
  1921. render(e16) {
  1922. const { context: t18, profiler: r18 } = e16, s16 = this._targetFn(), a18 = this.drawPhase & e16.drawPhase;
  1923. if (r18.recordPassStart(this.name), a18) {
  1924. this.enableDefaultDraw() && this._doRender(e16, s16), r18.recordPassEnd();
  1925. for (const r19 of this.effects) {
  1926. if (!r19.enable())
  1927. continue;
  1928. const a19 = r19.apply, n23 = r19.args && r19.args(), i16 = t18.getViewport(), o17 = t18.getBoundFramebufferObject(), f10 = e16.passOptions;
  1929. this._bindEffect(e16, a19, n23), this._doRender(e16, s16, a19.defines), this._drawAndUnbindEffect(e16, a19, i16, o17, f10, n23);
  1930. }
  1931. }
  1932. }
  1933. _doRender(e16, s16, a18) {
  1934. if (t(s16))
  1935. return;
  1936. const { profiler: n23, context: i16 } = e16;
  1937. for (const t18 of this.brushes) {
  1938. if (n23.recordBrushStart(t18.name), r(t18.brushEffect)) {
  1939. const r18 = i16.getViewport(), n24 = i16.getBoundFramebufferObject(), o17 = e16.passOptions;
  1940. this._bindEffect(e16, t18.brushEffect), this._drawWithBrush(t18, e16, s16, a18), this._drawAndUnbindEffect(e16, t18.brushEffect, r18, n24, o17);
  1941. } else
  1942. this._drawWithBrush(t18, e16, s16, a18);
  1943. n23.recordBrushEnd();
  1944. }
  1945. }
  1946. _drawWithBrush(t18, r18, s16, a18) {
  1947. a2(s16) ? (t18.prepareState(r18, a18), t18.drawMany(r18, s16, a18)) : s16.visible && (t18.prepareState(r18, a18), t18.draw(r18, s16, a18));
  1948. }
  1949. _bindEffect(e16, t18, r18) {
  1950. const { profiler: s16 } = e16;
  1951. s16.recordPassStart(this.name + "." + t18.name), t18.bind(e16, r18);
  1952. const a18 = t18.createOptions(e16, r18);
  1953. e16.passOptions = a18;
  1954. }
  1955. _drawAndUnbindEffect(e16, t18, r18, s16, a18, n23) {
  1956. const { profiler: i16, context: o17 } = e16;
  1957. e16.passOptions = a18, i16.recordBrushStart(t18.name), t18.draw(e16, n23), t18.unbind(e16, n23), o17.bindFramebuffer(s16);
  1958. const { x: f10, y: d15, width: h9, height: c13 } = r18;
  1959. o17.setViewport(f10, d15, h9, c13), i16.recordBrushEnd(), i16.recordPassEnd();
  1960. }
  1961. };
  1962. // node_modules/@arcgis/core/views/2d/engine/webgl/Painter.js
  1963. function D3(e16, t18) {
  1964. switch (e16) {
  1965. case E2.LINE:
  1966. return n13.line;
  1967. case E2.TEXT:
  1968. return n13.text;
  1969. case E2.LABEL:
  1970. return n13.label;
  1971. case E2.FILL:
  1972. return t18 === S.DOT_DENSITY ? n13.dotDensity : n13.fill;
  1973. case E2.MARKER:
  1974. switch (t18) {
  1975. case S.HEATMAP:
  1976. return n13.heatmap;
  1977. case S.PIE_CHART:
  1978. return n13.pieChart;
  1979. default:
  1980. return n13.marker;
  1981. }
  1982. }
  1983. }
  1984. var I4 = class {
  1985. constructor(e16, t18, s16) {
  1986. this.context = e16, this._blitRenderer = new _(), this._worldExtentClipRenderer = new f5(), this._isClippedToWorldExtent = false, this._brushCache = /* @__PURE__ */ new Map(), this._vtlMaterialManager = new o9(), this._blendEffect = new _2(), this._fboPool = [], this.effects = { highlight: new n20(), hittest: new c7(), hittestVTL: new i11(), integrate: new o13(), insideEffect: new r13("inside"), outsideEffect: new r13("outside") }, this.materialManager = new h4(e16), this.textureManager = new V3(t18, s16), this.textureUploadManager = new i9(e16, t18), this._effectsManager = new i12();
  1987. }
  1988. get vectorTilesMaterialManager() {
  1989. return this._vtlMaterialManager;
  1990. }
  1991. getRenderTarget() {
  1992. return this._renderTarget;
  1993. }
  1994. setRenderTarget(e16) {
  1995. this._renderTarget = e16;
  1996. }
  1997. getFbos(e16, t18) {
  1998. if (e16 !== this._lastWidth || t18 !== this._lastHeight) {
  1999. if (this._lastWidth = e16, this._lastHeight = t18, this._fbos) {
  2000. for (const s17 in this._fbos)
  2001. this._fbos[s17].resize(e16, t18);
  2002. return this._fbos;
  2003. }
  2004. const s16 = { target: M.TEXTURE_2D, pixelFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, samplingMode: L.NEAREST, wrapMode: D2.CLAMP_TO_EDGE, width: e16, height: t18 }, r18 = { colorTarget: Y.TEXTURE, depthStencilTarget: V.DEPTH_STENCIL_RENDER_BUFFER }, i16 = new s7(this.context, { width: e16, height: t18, internalFormat: B.DEPTH_STENCIL });
  2005. this._stencilBuf = i16, this._fbos = { output: new x(this.context, r18, s16, i16), blend: new x(this.context, r18, s16, i16), effect0: new x(this.context, r18, s16, i16) };
  2006. }
  2007. return this._fbos;
  2008. }
  2009. acquireFbo(e16, t18) {
  2010. let s16;
  2011. s16 = this._fboPool.length > 0 ? this._fboPool.pop() : new x(this.context, { colorTarget: Y.TEXTURE, depthStencilTarget: V.DEPTH_STENCIL_RENDER_BUFFER }, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, samplingMode: L.NEAREST, wrapMode: D2.CLAMP_TO_EDGE, width: e16, height: t18 }, this._stencilBuf);
  2012. const r18 = s16.descriptor;
  2013. return r18.width === e16 && r18.height === t18 || s16.resize(e16, t18), s16;
  2014. }
  2015. releaseFbo(e16) {
  2016. this._fboPool.push(e16);
  2017. }
  2018. getSharedStencilBuffer() {
  2019. return this._stencilBuf;
  2020. }
  2021. beforeRenderLayers(t18, s16 = null) {
  2022. const { width: r18, height: i16 } = t18.getViewport();
  2023. this._prevFBO = t18.getBoundFramebufferObject();
  2024. const n23 = this.getFbos(r18, i16);
  2025. if (t18.bindFramebuffer(n23.output), t18.setColorMask(true, true, true, true), r(s16)) {
  2026. const { r: e16, g: r19, b: i17, a: n24 } = s16.color;
  2027. t18.setClearColor(n24 * e16 / 255, n24 * r19 / 255, n24 * i17 / 255, n24);
  2028. } else
  2029. t18.setClearColor(0, 0, 0, 0);
  2030. t18.setDepthWriteEnabled(true), t18.setClearDepth(1), t18.clear(t18.gl.COLOR_BUFFER_BIT | t18.gl.DEPTH_BUFFER_BIT), t18.setDepthWriteEnabled(false);
  2031. }
  2032. beforeRenderLayer(e16, t18, s16) {
  2033. const { context: r18, blendMode: i16, effects: n23, requireFBO: o17, drawPhase: a18 } = e16;
  2034. if (o17 || j3(a18, i16, n23, s16))
  2035. r18.bindFramebuffer(this._fbos.blend), r18.setColorMask(true, true, true, true), r18.setClearColor(0, 0, 0, 0), r18.setDepthWriteEnabled(true), r18.setClearDepth(1), r18.clear(r18.gl.COLOR_BUFFER_BIT | r18.gl.DEPTH_BUFFER_BIT), r18.setDepthWriteEnabled(false);
  2036. else {
  2037. const e17 = this._getOutputFBO();
  2038. r18.bindFramebuffer(e17);
  2039. }
  2040. r18.setDepthWriteEnabled(false), r18.setDepthTestEnabled(false), r18.setStencilTestEnabled(true), r18.setClearStencil(t18), r18.setStencilWriteMask(255), r18.clear(r18.gl.STENCIL_BUFFER_BIT);
  2041. }
  2042. compositeLayer(s16, r18) {
  2043. const { context: i16, blendMode: n23, effects: a18, requireFBO: h9, drawPhase: l17 } = s16;
  2044. if (h9 || j3(l17, n23, a18, r18)) {
  2045. r(a18) && a18.length > 0 && l17 === I3.MAP && this._applyEffects(s16, a18);
  2046. const h10 = this._getOutputFBO();
  2047. i16.bindFramebuffer(h10), i16.setStencilTestEnabled(false), i16.setStencilWriteMask(0), i16.setBlendingEnabled(true), i16.setBlendFunctionSeparate(R.ONE, R.ONE_MINUS_SRC_ALPHA, R.ONE, R.ONE_MINUS_SRC_ALPHA), i16.setColorMask(true, true, true, true);
  2048. const f10 = t(n23) || l17 === I3.HIGHLIGHT ? "normal" : n23;
  2049. this._blendEffect.draw(s16, this._fbos.blend.colorTexture, L.NEAREST, f10, r18);
  2050. }
  2051. }
  2052. renderLayers(e16) {
  2053. if (e16.bindFramebuffer(this._prevFBO), !this._fbos)
  2054. return;
  2055. const t18 = this._getOutputFBO();
  2056. e16.setDepthTestEnabled(false), e16.setStencilWriteMask(0), this._isClippedToWorldExtent ? (e16.setStencilTestEnabled(true), e16.setStencilFunction(I.EQUAL, 1, 255)) : e16.setStencilTestEnabled(false), this.blitTexture(e16, t18.colorTexture, L.NEAREST);
  2057. }
  2058. prepareDisplay(t18, s16, r18) {
  2059. const { context: i16 } = t18;
  2060. if (i16.bindFramebuffer(this._prevFBO), i16.setColorMask(true, true, true, true), r(s16)) {
  2061. const { r: e16, g: t19, b: r19, a: n23 } = s16.color;
  2062. i16.setClearColor(n23 * e16 / 255, n23 * t19 / 255, n23 * r19 / 255, n23);
  2063. } else
  2064. i16.setClearColor(0, 0, 0, 0);
  2065. i16.setStencilWriteMask(255), i16.setClearStencil(0), i16.clear(i16.gl.COLOR_BUFFER_BIT | i16.gl.STENCIL_BUFFER_BIT), this._isClippedToWorldExtent = this._worldExtentClipRenderer.render(t18, r18);
  2066. }
  2067. dispose() {
  2068. if (this.materialManager.dispose(), this.textureManager.dispose(), this.textureUploadManager.destroy(), this._blitRenderer = a(this._blitRenderer), this._worldExtentClipRenderer = a(this._worldExtentClipRenderer), this._brushCache && (this._brushCache.forEach((e16) => e16.dispose()), this._brushCache.clear(), this._brushCache = null), this._fbos)
  2069. for (const e16 in this._fbos)
  2070. this._fbos[e16] && this._fbos[e16].dispose();
  2071. for (const e16 of this._fboPool)
  2072. e16.dispose();
  2073. if (this._fboPool.length = 0, this.effects)
  2074. for (const e16 in this.effects)
  2075. this.effects[e16] && this.effects[e16].dispose();
  2076. this._effectsManager.dispose(), this._vtlMaterialManager = a(this._vtlMaterialManager), this._prevFBO = null;
  2077. }
  2078. getBrush(e16, t18) {
  2079. const s16 = D3(e16, t18);
  2080. let r18 = this._brushCache.get(s16);
  2081. return void 0 === r18 && (r18 = new s16(), this._brushCache.set(s16, r18)), this._brushCache.get(s16);
  2082. }
  2083. renderObject(e16, t18, s16, i16) {
  2084. const n23 = n13[s16];
  2085. if (!n23)
  2086. return null;
  2087. let o17 = this._brushCache.get(n23);
  2088. void 0 === o17 && (o17 = new n23(), this._brushCache.set(n23, o17)), o17.prepareState(e16, i16), o17.draw(e16, t18, i16);
  2089. }
  2090. renderObjects(e16, t18, s16, i16) {
  2091. const n23 = n13[s16];
  2092. if (!n23)
  2093. return null;
  2094. let o17 = this._brushCache.get(n23);
  2095. void 0 === o17 && (o17 = new n23(), this._brushCache.set(n23, o17)), o17.drawMany(e16, t18, i16);
  2096. }
  2097. registerRenderPass(e16) {
  2098. const t18 = e16.brushes.map((e17) => (this._brushCache.has(e17) || this._brushCache.set(e17, new e17()), this._brushCache.get(e17)));
  2099. return new a13(t18, e16);
  2100. }
  2101. setHighlightOptions(e16) {
  2102. this.effects.highlight.setHighlightOptions(e16);
  2103. }
  2104. blitTexture(e16, t18, s16, r18 = 1) {
  2105. e16.setBlendingEnabled(true), e16.setBlendFunctionSeparate(R.ONE, R.ONE_MINUS_SRC_ALPHA, R.ONE, R.ONE_MINUS_SRC_ALPHA), e16.setColorMask(true, true, true, true), this._blitRenderer.render(e16, t18, s16, r18);
  2106. }
  2107. getPostProcessingEffects(e16) {
  2108. return this._effectsManager.getPostProcessingEffects(e16);
  2109. }
  2110. _getOutputFBO() {
  2111. return null != this._renderTarget ? this._renderTarget : this._fbos.output;
  2112. }
  2113. _applyEffects(e16, t18) {
  2114. const { context: s16 } = e16, r18 = this._effectsManager.getPostProcessingEffects(t18);
  2115. for (const { postProcessingEffect: i16, effect: n23 } of r18)
  2116. s16.bindFramebuffer(this._fbos.blend), i16.draw(e16, this._fbos.blend, n23);
  2117. }
  2118. };
  2119. function j3(t18, s16, r18, i16) {
  2120. return t18 !== I3.HIGHLIGHT && (1 !== i16 || r(s16) && "normal" !== s16 || r(r18) && r18.length > 0);
  2121. }
  2122. // node_modules/@arcgis/core/views/2d/engine/webgl/Profiler.js
  2123. var n21 = has("esri-2d-profiler");
  2124. var i13 = class {
  2125. constructor(s16, i16) {
  2126. if (this._events = new n3(), this._entries = /* @__PURE__ */ new Map(), this._timings = new s6(10), this._currentContainer = null, this._currentPass = null, this._currentBrush = null, this._currentSummary = null, !n21)
  2127. return;
  2128. this._ext = T2(s16.gl, {}), this._debugOutput = i16;
  2129. const o17 = s16.gl;
  2130. if (this.enableCommandLogging) {
  2131. for (const e16 in o17)
  2132. if ("function" == typeof o17[e16]) {
  2133. const t18 = o17[e16], s17 = e16.includes("draw");
  2134. o17[e16] = (...r18) => (this._events.emit("command", { container: this._currentContainer, pass: this._currentPass, brush: this._currentBrush, method: e16, args: r18, isDrawCommand: s17 }), this._currentSummary && (this._currentSummary.commands++, s17 && this._currentSummary.drawCommands++), t18.apply(o17, r18));
  2135. }
  2136. }
  2137. }
  2138. get enableCommandLogging() {
  2139. return !("object" == typeof n21 && n21.disableCommands);
  2140. }
  2141. recordContainerStart(e16) {
  2142. n21 && (this._currentContainer = e16);
  2143. }
  2144. recordContainerEnd() {
  2145. n21 && (this._currentContainer = null);
  2146. }
  2147. recordPassStart(e16) {
  2148. n21 && (this._currentPass = e16, this._initSummary());
  2149. }
  2150. recordPassEnd() {
  2151. n21 && (this._currentPass = null, this._emitSummary());
  2152. }
  2153. recordBrushStart(e16) {
  2154. n21 && (this._currentBrush = e16);
  2155. }
  2156. recordBrushEnd() {
  2157. n21 && (this._currentBrush = null);
  2158. }
  2159. recordStart(e16) {
  2160. if (n21 && r(this._ext)) {
  2161. if (this._entries.has(e16)) {
  2162. const t19 = this._entries.get(e16), r18 = this._ext.resultAvailable(t19.query), n23 = this._ext.disjoint();
  2163. if (r18 && !n23) {
  2164. const r19 = this._ext.getResult(t19.query) / 1e6;
  2165. let n24 = 0;
  2166. if (r(this._timings.enqueue(r19))) {
  2167. const e17 = this._timings.entries, t20 = e17.length;
  2168. let s16 = 0;
  2169. for (const r20 of e17)
  2170. s16 += r20;
  2171. n24 = s16 / t20;
  2172. }
  2173. const i16 = r19.toFixed(2), o17 = n24 ? n24.toFixed(2) : "--";
  2174. this.enableCommandLogging ? (console.groupCollapsed(`Frame report for ${e16}, ${i16} ms (${o17} last 10 avg)
  2175. ${t19.commandsLen} Commands (${t19.drawCommands} draw)`), console.log("RenderPass breakdown: "), console.table(t19.summaries), console.log("Commands: ", t19.commands), console.groupEnd()) : console.log(`Frame report for ${e16}, ${i16} ms (${o17} last 10 avg)`), this._debugOutput.innerHTML = `${i16} (${o17})`;
  2176. }
  2177. for (const e17 of t19.handles)
  2178. e17.remove();
  2179. this._ext.deleteQuery(t19.query), this._entries.delete(e16);
  2180. }
  2181. const t18 = { name: e16, query: this._ext.createQuery(), commands: [], commandsLen: 0, drawCommands: 0, summaries: [], handles: [] };
  2182. this.enableCommandLogging && (t18.handles.push(this._events.on("command", (e17) => {
  2183. t18.commandsLen++, t18.commands.push(e17), e17.isDrawCommand && t18.drawCommands++;
  2184. })), t18.handles.push(this._events.on("summary", (e17) => {
  2185. t18.summaries.push(e17);
  2186. }))), this._ext.beginTimeElapsed(t18.query), this._entries.set(e16, t18);
  2187. }
  2188. }
  2189. recordEnd(e16) {
  2190. n21 && r(this._ext) && this._entries.has(e16) && this._ext.endTimeElapsed();
  2191. }
  2192. _initSummary() {
  2193. this.enableCommandLogging && (this._currentSummary = { container: this._currentContainer, pass: this._currentPass, drawCommands: 0, commands: 0 });
  2194. }
  2195. _emitSummary() {
  2196. this.enableCommandLogging && this._currentSummary && this._events.emit("summary", this._currentSummary);
  2197. }
  2198. };
  2199. // node_modules/@arcgis/core/views/2d/engine/Stage.js
  2200. var O5 = 2e3;
  2201. var P4 = class extends i4 {
  2202. constructor(s16, i16) {
  2203. super(), this._trash = /* @__PURE__ */ new Set(), this._renderRemainingTime = 0, this._lastFrameRenderTime = 0, this.renderRequested = false, this.stage = this, this._stationary = true;
  2204. const { canvas: a18 = document.createElement("canvas"), alpha: h9 = true, stencil: l17 = true, contextOptions: m10 = {} } = i16;
  2205. this._canvas = a18;
  2206. const g8 = o2("2d", a18, { alpha: h9, antialias: false, depth: true, stencil: l17 });
  2207. this.context = new y3(r(g8) ? g8 : null, m10), this.resourceManager = new o5(), this.painter = new I4(this.context, this, this.resourceManager), has("esri-2d-profiler") && (this._debugOutput = document.createElement("div"), this._debugOutput.setAttribute("style", "margin: 24px 64px; position: absolute; color: red;"), s16.appendChild(this._debugOutput)), this._renderParameters = { drawPhase: 0, state: this.state, pixelRatio: window.devicePixelRatio, stationary: false, globalOpacity: 1, blendMode: null, deltaTime: -1, time: 0, inFadeTransition: false, effects: null, context: this.context, painter: this.painter, timeline: i16.timeline || new e9(), renderingOptions: i16.renderingOptions, requestRender: () => this.requestRender(), allowDelayedRender: false, requireFBO: false, profiler: new i13(this.context, this._debugOutput), dataUploadCounter: 0 }, this._taskHandle = A({ render: (e16) => this.renderFrame(e16) }), this._taskHandle.pause(), this._lostWebGLContextHandle = r2(a18, "webglcontextlost", () => {
  2208. this.emit("webgl-error", { error: new s3("webgl-context-lost") });
  2209. }), this._bufferPool = new n10(), a18.setAttribute("style", "width: 100%; height:100%; display:block;"), s16.appendChild(a18);
  2210. }
  2211. destroy() {
  2212. this.removeAllChildren(), this._emptyTrash(), this._taskHandle.remove(), this._taskHandle = null, this._lostWebGLContextHandle && (this._lostWebGLContextHandle.remove(), this._lostWebGLContextHandle = null), this._canvas.parentNode && this._canvas.parentNode.removeChild(this._canvas), this._debugOutput && this._debugOutput.parentNode && this._debugOutput.parentNode.removeChild(this._debugOutput), this._bufferPool.destroy(), this.highlightOptions = null, this.resourceManager.destroy(), this.painter.dispose(), this.context.dispose(), this._canvas = null;
  2213. }
  2214. get background() {
  2215. return this._background;
  2216. }
  2217. set background(e16) {
  2218. this._background = e16, this.requestRender();
  2219. }
  2220. get bufferPool() {
  2221. return this._bufferPool;
  2222. }
  2223. get highlightOptions() {
  2224. return this._highlightOptions;
  2225. }
  2226. set highlightOptions(e16) {
  2227. this._highlightOptionsHandle && (this._highlightOptionsHandle.remove(), this._highlightOptionsHandle = null), this._highlightOptions = e16, this._highlightOptions && (this._highlightOptionsHandle = l(() => {
  2228. var _a;
  2229. return (_a = this._highlightOptions) == null ? void 0 : _a.version;
  2230. }, () => {
  2231. this.painter.setHighlightOptions(e16), this.requestRender();
  2232. }, h));
  2233. }
  2234. get renderingOptions() {
  2235. return this._renderingOptions;
  2236. }
  2237. set renderingOptions(e16) {
  2238. this._renderingOptions = e16, this.requestRender();
  2239. }
  2240. get state() {
  2241. return this._state;
  2242. }
  2243. set state(e16) {
  2244. this._state = e16, this.requestRender();
  2245. }
  2246. get stationary() {
  2247. return this._stationary;
  2248. }
  2249. set stationary(e16) {
  2250. this._stationary !== e16 && (this._stationary = e16, this.requestRender());
  2251. }
  2252. trashDisplayObject(e16) {
  2253. this._trash.add(e16), this.requestRender();
  2254. }
  2255. untrashDisplayObject(e16) {
  2256. return this._trash.delete(e16);
  2257. }
  2258. requestRender() {
  2259. this._renderRemainingTime = O5, this.renderRequested || (this.renderRequested = true, this.emit("will-render"), this._taskHandle.resume());
  2260. }
  2261. renderFrame(e16) {
  2262. const t18 = this._lastFrameRenderTime ? e16.time - this._lastFrameRenderTime : 0;
  2263. this._renderRemainingTime -= t18, this._renderRemainingTime <= 0 && this._taskHandle.pause(), this._lastFrameRenderTime = e16.time, this.renderRequested = false, this._renderParameters.state = this._state, this._renderParameters.stationary = this.stationary, this._renderParameters.pixelRatio = window.devicePixelRatio, this._renderParameters.globalOpacity = 1, this._renderParameters.time = e16.time, this._renderParameters.deltaTime = e16.deltaTime, this._renderParameters.effects = null, this.processRender(this._renderParameters), this._emptyTrash(), this.emit("post-render");
  2264. }
  2265. _createTransforms() {
  2266. return { dvs: e5() };
  2267. }
  2268. renderChildren(e16) {
  2269. for (const t18 of this.children)
  2270. t18.beforeRender(e16);
  2271. this._renderChildren(this.children, e16);
  2272. for (const t18 of this.children)
  2273. t18.afterRender(e16);
  2274. }
  2275. _renderChildren(e16, t18) {
  2276. const r18 = this.context;
  2277. this.painter.textureUploadManager.upload(), r18.resetInfo(), t18.profiler.recordStart("drawLayers"), t18.dataUploadCounter = 0, t18.drawPhase = I3.MAP, this.painter.beforeRenderLayers(r18, this.background);
  2278. for (const s16 of e16)
  2279. s16.processRender(t18);
  2280. this.painter.prepareDisplay(t18, this.background, this.state.padding), this.painter.renderLayers(r18), t18.drawPhase = I3.HIGHLIGHT, this.painter.beforeRenderLayers(r18);
  2281. for (const s16 of e16)
  2282. s16.processRender(t18);
  2283. this.painter.renderLayers(r18);
  2284. if (this._isLabelDrawPhaseRequired(e16)) {
  2285. t18.drawPhase = I3.LABEL, this.painter.beforeRenderLayers(r18);
  2286. for (const r19 of e16)
  2287. r19.processRender(t18);
  2288. this.painter.renderLayers(r18);
  2289. }
  2290. if (has("esri-tiles-debug")) {
  2291. t18.drawPhase = I3.DEBUG, this.painter.beforeRenderLayers(r18);
  2292. for (const r19 of e16)
  2293. r19.processRender(t18);
  2294. this.painter.renderLayers(r18);
  2295. }
  2296. t18.profiler.recordEnd("drawLayers"), r18.logInfo();
  2297. }
  2298. doRender(e16) {
  2299. const t18 = this.context, { state: r18, pixelRatio: s16 } = e16;
  2300. this._resizeCanvas(e16), t18.setViewport(0, 0, s16 * r18.size[0], s16 * r18.size[1]), t18.setDepthWriteEnabled(true), t18.setStencilWriteMask(255), super.doRender(e16);
  2301. }
  2302. async takeScreenshot(e16) {
  2303. const { framebufferWidth: t18, framebufferHeight: r18 } = { framebufferWidth: Math.round(this.state.size[0] * e16.resolutionScale), framebufferHeight: Math.round(this.state.size[1] * e16.resolutionScale) }, s16 = 1, i16 = this.context, n23 = this._state.clone();
  2304. if (null != e16.rotation) {
  2305. const t19 = n23.viewpoint;
  2306. n23.viewpoint.rotation = e16.rotation, n23.viewpoint = t19;
  2307. }
  2308. const a18 = { ...this._renderParameters, drawPhase: null, globalOpacity: 1, stationary: true, state: n23, pixelRatio: s16, time: performance.now(), deltaTime: 0, blendMode: null, effects: null, inFadeTransition: false }, o17 = new x(i16, { colorTarget: Y.TEXTURE, depthStencilTarget: V.DEPTH_STENCIL_RENDER_BUFFER, width: t18, height: r18 }), h9 = i16.getBoundFramebufferObject(), d15 = i16.getViewport();
  2309. i16.bindFramebuffer(o17), i16.setViewport(0, 0, t18, r18), this._renderChildren(e16.children, a18);
  2310. const l17 = this._readbackScreenshot(o17, { ...e16.cropArea, y: r18 - (e16.cropArea.y + e16.cropArea.height) });
  2311. i16.bindFramebuffer(h9), i16.setViewport(d15.x, d15.y, d15.width, d15.height), this.requestRender();
  2312. const p6 = await l17;
  2313. let u10;
  2314. return 1 === e16.outputScale ? u10 = p6 : (u10 = new ImageData(Math.round(p6.width * e16.outputScale), Math.round(p6.height * e16.outputScale)), m4(p6, u10, true)), u10;
  2315. }
  2316. async _readbackScreenshot(e16, t18) {
  2317. const r18 = e4(t18.width, t18.height, document.createElement("canvas"));
  2318. return await e16.readPixelsAsync(t18.x, t18.y, t18.width, t18.height, P.RGBA, G.UNSIGNED_BYTE, new Uint8Array(r18.data.buffer)), r18;
  2319. }
  2320. _resizeCanvas(e16) {
  2321. const t18 = this._canvas, r18 = t18.style, { state: { size: s16 }, pixelRatio: i16 } = e16, n23 = s16[0], a18 = s16[1], o17 = Math.round(n23 * i16), h9 = Math.round(a18 * i16);
  2322. t18.width === o17 && t18.height === h9 || (t18.width = o17, t18.height = h9), r18.width = n23 + "px", r18.height = a18 + "px";
  2323. }
  2324. _emptyTrash() {
  2325. for (; this._trash.size > 0; ) {
  2326. const e16 = Array.from(this._trash);
  2327. this._trash.clear();
  2328. for (const t18 of e16)
  2329. t18.processDetach();
  2330. }
  2331. }
  2332. _isLabelDrawPhaseRequired(e16) {
  2333. let t18 = false;
  2334. for (const r18 of e16) {
  2335. if (!(r18 instanceof i4)) {
  2336. t18 = t18 || false;
  2337. break;
  2338. }
  2339. if (r18.hasLabels)
  2340. return true;
  2341. t18 = t18 || this._isLabelDrawPhaseRequired(r18.children);
  2342. }
  2343. return t18;
  2344. }
  2345. };
  2346. // node_modules/@arcgis/core/views/2d/engine/webgl/collisions/CollisionGrid.js
  2347. var e15 = 2;
  2348. var i14 = 1;
  2349. var o15 = 0;
  2350. var h6 = 1;
  2351. var r15 = 2;
  2352. var l11 = class {
  2353. constructor(t18, e16, o17) {
  2354. this._debugMap = /* @__PURE__ */ new Map(), this._width = t18 * o17, this._height = e16 * o17, this._pixelRatio = o17;
  2355. const h9 = Math.ceil(this._width / i14), r18 = Math.ceil(this._height / i14);
  2356. this._cols = h9, this._rows = r18, this._cells = t5.create(h9 * r18);
  2357. }
  2358. insertMetrics(t18) {
  2359. const s16 = this._hasCollision(t18);
  2360. return s16 === o15 && this._markMetrics(t18), s16;
  2361. }
  2362. getCellId(t18, s16) {
  2363. return t18 + s16 * this._cols;
  2364. }
  2365. has(t18) {
  2366. return this._cells.has(t18);
  2367. }
  2368. hasRange(t18, s16) {
  2369. return this._cells.hasRange(t18, s16);
  2370. }
  2371. set(t18) {
  2372. this._cells.set(t18);
  2373. }
  2374. setRange(t18, s16) {
  2375. this._cells.setRange(t18, s16);
  2376. }
  2377. _collide(s16, e16, l17, n23) {
  2378. const c13 = s16 - l17 / 2, a18 = e16 - n23 / 2, _9 = c13 + l17, d15 = a18 + n23;
  2379. if (_9 < 0 || d15 < 0 || c13 > this._width || a18 > this._height)
  2380. return h6;
  2381. const u10 = a4(Math.floor(c13 / i14), 0, this._cols), p6 = a4(Math.floor(a18 / i14), 0, this._rows), M4 = a4(Math.ceil(_9 / i14), 0, this._cols), f10 = a4(Math.ceil(d15 / i14), 0, this._rows);
  2382. for (let t18 = p6; t18 <= f10; t18++)
  2383. for (let s17 = u10; s17 <= M4; s17++) {
  2384. const e17 = this.getCellId(s17, t18);
  2385. if (this.has(e17))
  2386. return r15;
  2387. }
  2388. return o15;
  2389. }
  2390. _mark(s16, e16, o17, h9, r18) {
  2391. const l17 = s16 - o17 / 2, n23 = e16 - h9 / 2, c13 = l17 + o17, a18 = n23 + h9, _9 = a4(Math.floor(l17 / i14), 0, this._cols), d15 = a4(Math.floor(n23 / i14), 0, this._rows), u10 = a4(Math.ceil(c13 / i14), 0, this._cols), p6 = a4(Math.ceil(a18 / i14), 0, this._rows);
  2392. for (let t18 = d15; t18 <= p6; t18++)
  2393. for (let s17 = _9; s17 <= u10; s17++) {
  2394. const e17 = this.getCellId(s17, t18);
  2395. this._debugMap.set(e17, r18), this.set(e17);
  2396. }
  2397. return false;
  2398. }
  2399. _hasCollision(t18) {
  2400. const s16 = t18.id;
  2401. let i16 = 0, l17 = 0;
  2402. t18.save();
  2403. do {
  2404. const s17 = t18.boundsCount;
  2405. i16 += s17;
  2406. for (let i17 = 0; i17 < s17; i17++) {
  2407. const s18 = t18.boundsComputedAnchorX(i17), o17 = t18.boundsComputedAnchorY(i17), n23 = (t18.boundsWidth(i17) + e15) * this._pixelRatio, c13 = (t18.boundsHeight(i17) + e15) * this._pixelRatio;
  2408. switch (this._collide(s18, o17, n23, c13)) {
  2409. case r15:
  2410. return r15;
  2411. case h6:
  2412. l17++;
  2413. }
  2414. }
  2415. } while (t18.peekId() === s16 && t18.next());
  2416. return t18.restore(), i16 === l17 ? h6 : o15;
  2417. }
  2418. _markMetrics(t18) {
  2419. const s16 = t18.id;
  2420. t18.save();
  2421. do {
  2422. const s17 = t18.boundsCount;
  2423. for (let i16 = 0; i16 < s17; i16++) {
  2424. const s18 = t18.boundsComputedAnchorX(i16), o17 = t18.boundsComputedAnchorY(i16), h9 = (t18.boundsWidth(i16) + e15) * this._pixelRatio, r18 = (t18.boundsHeight(i16) + e15) * this._pixelRatio;
  2425. this._mark(s18, o17, h9, r18, t18.id);
  2426. }
  2427. } while (t18.peekId() === s16 && t18.next());
  2428. t18.restore();
  2429. }
  2430. };
  2431. // node_modules/@arcgis/core/views/2d/engine/webgl/collisions/visualVariableSimpleUtils.js
  2432. var r16 = Math.PI;
  2433. function a14(e16, t18) {
  2434. switch (t18.transformationType) {
  2435. case i3.Additive:
  2436. return s12(e16, t18);
  2437. case i3.Constant:
  2438. return u7(t18, e16);
  2439. case i3.ClampedLinear:
  2440. return o16(e16, t18);
  2441. case i3.Proportional:
  2442. return l12(e16, t18);
  2443. case i3.Stops:
  2444. return c11(e16, t18);
  2445. case i3.RealWorldSize:
  2446. return m8(e16, t18);
  2447. case i3.Identity:
  2448. return e16;
  2449. case i3.Unknown:
  2450. return null;
  2451. }
  2452. }
  2453. function i15(e16, t18) {
  2454. return "number" == typeof e16 ? e16 : a14(t18, e16);
  2455. }
  2456. function s12(e16, t18) {
  2457. return e16 + (i15(t18.minSize, e16) || t18.minDataValue);
  2458. }
  2459. function u7(e16, t18) {
  2460. const n23 = e16.stops;
  2461. let r18 = n23 && n23.length && n23[0].size;
  2462. return null == r18 && (r18 = e16.minSize), i15(r18, t18);
  2463. }
  2464. function o16(e16, t18) {
  2465. const n23 = (e16 - t18.minDataValue) / (t18.maxDataValue - t18.minDataValue), r18 = i15(t18.minSize, e16), a18 = i15(t18.maxSize, e16);
  2466. return e16 <= t18.minDataValue ? r18 : e16 >= t18.maxDataValue ? a18 : r18 + n23 * (a18 - r18);
  2467. }
  2468. function l12(t18, n23) {
  2469. const r18 = t18 / n23.minDataValue, a18 = i15(n23.minSize, t18), s16 = i15(n23.maxSize, t18);
  2470. let u10 = null;
  2471. return u10 = r18 * a18, a4(u10, a18, s16);
  2472. }
  2473. function c11(e16, t18) {
  2474. const [n23, r18, a18] = p3(e16, t18.cache.ipData);
  2475. if (n23 === r18)
  2476. return i15(t18.stops[n23].size, e16);
  2477. {
  2478. const s16 = i15(t18.stops[n23].size, e16);
  2479. return s16 + (i15(t18.stops[r18].size, e16) - s16) * a18;
  2480. }
  2481. }
  2482. function m8(n23, a18) {
  2483. const s16 = m2[a18.valueUnit], u10 = i15(a18.minSize, n23), o17 = i15(a18.maxSize, n23), { valueRepresentation: l17 } = a18;
  2484. let c13 = null;
  2485. return c13 = "area" === l17 ? 2 * Math.sqrt(n23 / r16) / s16 : "radius" === l17 || "distance" === l17 ? 2 * n23 / s16 : n23 / s16, a4(c13, u10, o17);
  2486. }
  2487. function p3(e16, t18) {
  2488. if (!t18)
  2489. return;
  2490. let n23 = 0, r18 = t18.length - 1;
  2491. return t18.some((t19, a18) => e16 < t19 ? (r18 = a18, true) : (n23 = a18, false)), [n23, r18, (e16 - t18[n23]) / (t18[r18] - t18[n23])];
  2492. }
  2493. // node_modules/@arcgis/core/views/2d/engine/webgl/collisions/CollisionEngine.js
  2494. var d9 = 254;
  2495. var u8 = 255;
  2496. var f8 = 0;
  2497. function b3(e16, i16) {
  2498. const o17 = [];
  2499. e16.forEachTile((e17) => o17.push(e17)), o17.sort((e17, t18) => e17.instanceId - t18.instanceId), o17.forEach((e17) => {
  2500. r(e17.labelMetrics) && e17.isReady && i16(e17, e17.labelMetrics.getCursor());
  2501. });
  2502. }
  2503. function y4(e16) {
  2504. return e16.layer && ("feature" === e16.layer.type || "csv" === e16.layer.type || "geojson" === e16.layer.type || "ogc-feature" === e16.layer.type || "stream" === e16.layer.type || "subtype-group" === e16.layer.type || "wfs" === e16.layer.type);
  2505. }
  2506. function p4(e16) {
  2507. return (t18) => u(a14(t18, e16));
  2508. }
  2509. function m9(e16) {
  2510. const t18 = "visualVariables" in e16 && e16.visualVariables;
  2511. if (!t18)
  2512. return null;
  2513. for (const i16 of t18)
  2514. if ("size" === i16.type)
  2515. return p4(i16);
  2516. return null;
  2517. }
  2518. function h7(e16) {
  2519. for (const t18 of e16) {
  2520. const e17 = "featureReduction" in t18 && t18.featureReduction && "labelingInfo" in t18.featureReduction && t18.featureReduction, i16 = [...t18.labelingInfo || [], ...(e17 == null ? void 0 : e17.labelingInfo) || []];
  2521. if (!t18.labelsVisible || !i16.length)
  2522. continue;
  2523. if (i16.some((e18) => "none" === e18.deconflictionStrategy))
  2524. return true;
  2525. }
  2526. return false;
  2527. }
  2528. function M3(t18, i16) {
  2529. var _a;
  2530. if (!y4(i16))
  2531. return;
  2532. const o17 = "subtype-group" === i16.layer.type ? i16.layer.sublayers.items : [i16.layer], r18 = i16.layer.geometryType, n23 = !h7(o17), s16 = {};
  2533. if ("subtype-group" !== i16.layer.type) {
  2534. if ("heatmap" === ((_a = i16.tileRenderer) == null ? void 0 : _a.type))
  2535. return;
  2536. const e16 = m9(i16.layer.renderer);
  2537. s16[0] = e16;
  2538. }
  2539. const l17 = i16.tileRenderer;
  2540. if (t(l17))
  2541. return;
  2542. const a18 = i16.layer.visible && !i16.suspended;
  2543. t18.push({ tileRenderer: l17, vvEvaluators: s16, deconflictionEnabled: n23, geometryType: r18, visible: a18 });
  2544. }
  2545. var g6 = class {
  2546. run(e16, t18, i16) {
  2547. const o17 = [];
  2548. for (let r18 = e16.length - 1; r18 >= 0; r18--) {
  2549. M3(o17, e16[r18]);
  2550. }
  2551. this._transformMetrics(o17), this._runCollision(o17, t18, i16);
  2552. }
  2553. _runCollision(e16, t18, i16) {
  2554. const [o17, r18] = t18.state.size, s16 = new l11(o17, r18, t18.pixelRatio);
  2555. for (const { tileRenderer: n23, deconflictionEnabled: l17, visible: a18 } of e16) {
  2556. const e17 = n23.featuresView.attributeView;
  2557. l17 ? a18 ? (this._prepare(n23), this._collideVisible(s16, n23, i16), this._collideInvisible(s16, n23)) : b3(n23, (t19, i17) => {
  2558. for (; i17.nextId(); )
  2559. e17.setLabelMinZoom(i17.id, u8);
  2560. }) : b3(n23, (t19, i17) => {
  2561. for (; i17.nextId(); )
  2562. e17.setLabelMinZoom(i17.id, f8), a18 && s16.insertMetrics(i17);
  2563. });
  2564. }
  2565. }
  2566. _isFiltered(t18, i16, n23) {
  2567. const s16 = i16.getFilterFlags(t18), l17 = !n23.hasFilter || !!(s16 & U2), a18 = t(n23.featureEffect) || n23.featureEffect.excludedLabelsVisible || !!(s16 & V2);
  2568. return !(l17 && a18);
  2569. }
  2570. _prepare(e16) {
  2571. const t18 = e16.featuresView.attributeView, i16 = /* @__PURE__ */ new Set();
  2572. b3(e16, (o17, r18) => {
  2573. for (; r18.nextId(); ) {
  2574. if (i16.has(r18.id))
  2575. continue;
  2576. if (i16.add(r18.id), this._isFiltered(r18.id, t18, e16.layerView)) {
  2577. t18.setLabelMinZoom(r18.id, d9);
  2578. continue;
  2579. }
  2580. t18.getLabelMinZoom(r18.id) !== f8 ? t18.setLabelMinZoom(r18.id, u8) : t18.setLabelMinZoom(r18.id, f8);
  2581. }
  2582. });
  2583. }
  2584. _collideVisible(e16, t18, i16) {
  2585. const o17 = t18.featuresView.attributeView, r18 = /* @__PURE__ */ new Set();
  2586. b3(t18, (t19, n23) => {
  2587. for (; n23.nextId(); )
  2588. if (!r18.has(n23.id))
  2589. if (t19.key.level === i16) {
  2590. if (0 === o17.getLabelMinZoom(n23.id)) {
  2591. switch (e16.insertMetrics(n23)) {
  2592. case h6:
  2593. break;
  2594. case r15:
  2595. o17.setLabelMinZoom(n23.id, d9), r18.add(n23.id);
  2596. break;
  2597. case o15:
  2598. o17.setLabelMinZoom(n23.id, f8), r18.add(n23.id);
  2599. }
  2600. }
  2601. } else
  2602. o17.setLabelMinZoom(n23.id, d9);
  2603. });
  2604. }
  2605. _collideInvisible(e16, t18) {
  2606. const i16 = t18.featuresView.attributeView, o17 = /* @__PURE__ */ new Set();
  2607. b3(t18, (t19, r18) => {
  2608. for (; r18.nextId(); )
  2609. if (!o17.has(r18.id) && i16.getLabelMinZoom(r18.id) === u8) {
  2610. switch (e16.insertMetrics(r18)) {
  2611. case h6:
  2612. break;
  2613. case r15:
  2614. i16.setLabelMinZoom(r18.id, u8), o17.add(r18.id);
  2615. break;
  2616. case o15:
  2617. i16.setLabelMinZoom(r18.id, f8), o17.add(r18.id);
  2618. }
  2619. }
  2620. });
  2621. }
  2622. _transformMetrics(e16) {
  2623. for (const { tileRenderer: i16, geometryType: o17, vvEvaluators: r18 } of e16)
  2624. b3(i16, (e17, n23) => {
  2625. const s16 = i16.featuresView.attributeView, l17 = e17.transforms.labelMat2d;
  2626. l17[4] = Math.round(l17[4]), l17[5] = Math.round(l17[5]);
  2627. const a18 = "polyline" === o17;
  2628. for (; n23.next(); ) {
  2629. const e18 = n23.boundsCount, i17 = n23.anchorX, o18 = n23.anchorY;
  2630. let c13 = n23.size;
  2631. const d15 = r18[0];
  2632. if (r(d15)) {
  2633. const e19 = d15(s16.getVVSize(n23.id));
  2634. c13 = isNaN(e19) || null == e19 || e19 === 1 / 0 ? c13 : e19;
  2635. }
  2636. const u10 = n23.directionX * (c13 / 2), f10 = n23.directionY * (c13 / 2);
  2637. for (let t18 = 0; t18 < e18; t18++) {
  2638. let e19 = i17, r19 = n23.anchorY;
  2639. if (a18) {
  2640. let i18 = e19 + n23.boundsX(t18) + u10, o19 = r19 + n23.boundsY(t18) + f10;
  2641. i18 = l17[0] * i18 + l17[2] * o19 + l17[4], o19 = l17[1] * i18 + l17[3] * o19 + l17[5], n23.setBoundsComputedAnchorX(t18, Math.floor(i18)), n23.setBoundsComputedAnchorY(t18, Math.floor(o19));
  2642. } else {
  2643. e19 = l17[0] * i17 + l17[2] * o18 + l17[4], r19 = l17[1] * i17 + l17[3] * o18 + l17[5];
  2644. const s17 = e19 + n23.boundsX(t18) + u10, a19 = r19 + n23.boundsY(t18) + f10;
  2645. n23.setBoundsComputedAnchorX(t18, s17), n23.setBoundsComputedAnchorY(t18, a19);
  2646. }
  2647. }
  2648. }
  2649. });
  2650. }
  2651. };
  2652. // node_modules/@arcgis/core/views/2d/LabelManager.js
  2653. var p5 = 32;
  2654. var l13 = class extends a6(m) {
  2655. constructor(e16) {
  2656. super(e16), this._applyVisibilityPassThrottled = e6(this._applyVisibilityPass, p5, this), this.lastUpdateId = -1, this.updateRequested = false, this.view = null;
  2657. }
  2658. initialize() {
  2659. this.collisionEngine = new g6();
  2660. }
  2661. destroy() {
  2662. this.collisionEngine = null, this._applyVisibilityPassThrottled.remove(), this._applyVisibilityPassThrottled = null;
  2663. }
  2664. get updating() {
  2665. return has("esri-2d-log-updating") && console.log(`Updating LabelManager ${this.updateRequested}:
  2666. -> updateRequested: ${this.updateRequested}`), this.updateRequested;
  2667. }
  2668. update(e16) {
  2669. this._applyVisibilityPassThrottled(e16);
  2670. }
  2671. viewChange() {
  2672. this.requestUpdate();
  2673. }
  2674. requestUpdate() {
  2675. this.updateRequested || (this.updateRequested = true, this.view.requestUpdate());
  2676. }
  2677. processUpdate(e16) {
  2678. this._set("updateParameters", e16), this.updateRequested && (this.updateRequested = false, this.update(e16));
  2679. }
  2680. _applyVisibilityPass(e16) {
  2681. try {
  2682. const t18 = this.view.featuresTilingScheme.getClosestInfoForScale(e16.state.scale).level;
  2683. this.collisionEngine.run(this.view.allLayerViews.items, e16, t18);
  2684. } catch (t18) {
  2685. }
  2686. }
  2687. };
  2688. e([y()], l13.prototype, "updateRequested", void 0), e([y({ readOnly: true })], l13.prototype, "updateParameters", void 0), e([y()], l13.prototype, "updating", null), e([y()], l13.prototype, "view", void 0), l13 = e([n2("esri.views.2d.layers.labels.LabelManager")], l13);
  2689. var d10 = l13;
  2690. // node_modules/@arcgis/core/views/2d/navigation/ZoomBox.js
  2691. var a15 = { container: "esri-zoom-box__container", overlay: "esri-zoom-box__overlay", background: "esri-zoom-box__overlay-background", box: "esri-zoom-box__outline" };
  2692. var n22 = { zoom: "Shift", counter: "Ctrl" };
  2693. var h8 = class extends m {
  2694. constructor(t18) {
  2695. super(t18), this._container = null, this._overlay = null, this._backgroundShape = null, this._boxShape = null, this._box = { x: 0, y: 0, width: 0, height: 0 }, this._redraw = this._redraw.bind(this);
  2696. }
  2697. destroy() {
  2698. this.view = null;
  2699. }
  2700. set view(t18) {
  2701. this._handles && this._handles.forEach((t19) => {
  2702. t19.remove();
  2703. }), this._handles = null, this._destroyOverlay(), this._set("view", t18), t18 && (t18.on("drag", [n22.zoom], (t19) => this._handleDrag(t19, 1), P3.INTERNAL), t18.on("drag", [n22.zoom, n22.counter], (t19) => this._handleDrag(t19, -1), P3.INTERNAL));
  2704. }
  2705. _start() {
  2706. this._createContainer(), this._createOverlay(), this.navigation.begin();
  2707. }
  2708. _update(t18, e16, i16, r18) {
  2709. this._box.x = t18, this._box.y = e16, this._box.width = i16, this._box.height = r18, this._rafId || (this._rafId = requestAnimationFrame(this._redraw));
  2710. }
  2711. _end(t18, e16, r18, o17, s16) {
  2712. const a18 = this.view, n23 = a18.toMap(c(t18 + 0.5 * r18, e16 + 0.5 * o17));
  2713. let h9 = Math.max(r18 / a18.width, o17 / a18.height);
  2714. -1 === s16 && (h9 = 1 / h9), this._destroyOverlay(), this.navigation.end(), a18.goTo({ center: n23, scale: a18.scale * h9 });
  2715. }
  2716. _updateBox(t18, e16, i16, r18) {
  2717. const o17 = this._boxShape;
  2718. o17.setAttributeNS(null, "x", "" + t18), o17.setAttributeNS(null, "y", "" + e16), o17.setAttributeNS(null, "width", "" + i16), o17.setAttributeNS(null, "height", "" + r18), o17.setAttributeNS(null, "class", a15.box);
  2719. }
  2720. _updateBackground(t18, e16, i16, r18) {
  2721. this._backgroundShape.setAttributeNS(null, "d", this._toSVGPath(t18, e16, i16, r18, this.view.width, this.view.height));
  2722. }
  2723. _createContainer() {
  2724. const t18 = document.createElement("div");
  2725. t18.className = a15.container, this.view.root.appendChild(t18), this._container = t18;
  2726. }
  2727. _createOverlay() {
  2728. const t18 = this.view.width, e16 = this.view.height, i16 = document.createElementNS("http://www.w3.org/2000/svg", "path");
  2729. i16.setAttributeNS(null, "d", "M 0 0 L " + t18 + " 0 L " + t18 + " " + e16 + " L 0 " + e16 + " Z"), i16.setAttributeNS(null, "class", a15.background);
  2730. const r18 = document.createElementNS("http://www.w3.org/2000/svg", "rect"), o17 = document.createElementNS("http://www.w3.org/2000/svg", "svg");
  2731. o17.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), o17.setAttributeNS(null, "class", a15.overlay), o17.appendChild(i16), o17.appendChild(r18), this._container.appendChild(o17), this._backgroundShape = i16, this._boxShape = r18, this._overlay = o17;
  2732. }
  2733. _destroyOverlay() {
  2734. this._container && this._container.parentNode && this._container.parentNode.removeChild(this._container), this._container = this._backgroundShape = this._boxShape = this._overlay = null;
  2735. }
  2736. _toSVGPath(t18, e16, i16, r18, o17, s16) {
  2737. const a18 = t18 + i16, n23 = e16 + r18;
  2738. return "M 0 0 L " + o17 + " 0 L " + o17 + " " + s16 + " L 0 " + s16 + " ZM " + t18 + " " + e16 + " L " + t18 + " " + n23 + " L " + a18 + " " + n23 + " L " + a18 + " " + e16 + " Z";
  2739. }
  2740. _handleDrag(t18, e16) {
  2741. const i16 = t18.x, r18 = t18.y, o17 = t18.origin.x, s16 = t18.origin.y;
  2742. let a18, n23, h9, l17;
  2743. switch (i16 > o17 ? (a18 = o17, h9 = i16 - o17) : (a18 = i16, h9 = o17 - i16), r18 > s16 ? (n23 = s16, l17 = r18 - s16) : (n23 = r18, l17 = s16 - r18), t18.action) {
  2744. case "start":
  2745. this._start();
  2746. break;
  2747. case "update":
  2748. this._update(a18, n23, h9, l17);
  2749. break;
  2750. case "end":
  2751. this._end(a18, n23, h9, l17, e16);
  2752. }
  2753. t18.stopPropagation();
  2754. }
  2755. _redraw() {
  2756. if (!this._rafId)
  2757. return;
  2758. if (this._rafId = null, !this._overlay)
  2759. return;
  2760. const { x: t18, y: e16, width: i16, height: r18 } = this._box;
  2761. this._updateBox(t18, e16, i16, r18), this._updateBackground(t18, e16, i16, r18), this._rafId = requestAnimationFrame(this._redraw);
  2762. }
  2763. };
  2764. e([y()], h8.prototype, "navigation", void 0), e([y()], h8.prototype, "view", null), h8 = e([n2("esri.views.2d.navigation.ZoomBox")], h8);
  2765. var l14 = h8;
  2766. // node_modules/@arcgis/core/views/navigation/FilteredFiniteDifference.js
  2767. var t15 = class {
  2768. constructor(t18) {
  2769. this._gain = t18, this.lastValue = void 0, this.filteredDelta = void 0;
  2770. }
  2771. update(t18) {
  2772. if (this.hasLastValue()) {
  2773. const e16 = this.computeDelta(t18);
  2774. this._updateDelta(e16);
  2775. }
  2776. this.lastValue = t18;
  2777. }
  2778. reset() {
  2779. this.lastValue = void 0, this.filteredDelta = void 0;
  2780. }
  2781. hasLastValue() {
  2782. return void 0 !== this.lastValue;
  2783. }
  2784. hasFilteredDelta() {
  2785. return void 0 !== this.filteredDelta;
  2786. }
  2787. computeDelta(t18) {
  2788. return void 0 === this.lastValue ? NaN : t18 - this.lastValue;
  2789. }
  2790. _updateDelta(t18) {
  2791. void 0 !== this.filteredDelta ? this.filteredDelta = (1 - this._gain) * this.filteredDelta + this._gain * t18 : this.filteredDelta = t18;
  2792. }
  2793. };
  2794. // node_modules/@arcgis/core/views/navigation/Momentum.js
  2795. var t16 = class {
  2796. constructor(t18, i16, o17) {
  2797. this._initialVelocity = t18, this._stopVelocity = i16, this._friction = o17, this._duration = Math.abs(Math.log(Math.abs(this._initialVelocity) / this._stopVelocity) / Math.log(1 - this._friction));
  2798. }
  2799. get duration() {
  2800. return this._duration;
  2801. }
  2802. isFinished(t18) {
  2803. return t18 > this.duration;
  2804. }
  2805. get friction() {
  2806. return this._friction;
  2807. }
  2808. value(t18) {
  2809. return this.valueFromInitialVelocity(this._initialVelocity, t18);
  2810. }
  2811. valueDelta(t18, i16) {
  2812. const o17 = this.value(t18);
  2813. return this.value(t18 + i16) - o17;
  2814. }
  2815. valueFromInitialVelocity(t18, i16) {
  2816. i16 = Math.min(i16, this.duration);
  2817. const o17 = 1 - this.friction;
  2818. return t18 * (o17 ** i16 - 1) / Math.log(o17);
  2819. }
  2820. };
  2821. // node_modules/@arcgis/core/views/navigation/PanPlanarMomentumEstimator.js
  2822. var c12 = class extends t16 {
  2823. constructor(e16, t18, i16, s16, n23) {
  2824. super(e16, t18, i16), this._sceneVelocity = s16, this.direction = n23;
  2825. }
  2826. value(e16) {
  2827. return super.valueFromInitialVelocity(this._sceneVelocity, e16);
  2828. }
  2829. };
  2830. var l15 = class {
  2831. constructor(e16 = 300, t18 = 12, i16 = 0.84) {
  2832. this._minimumInitialVelocity = e16, this._stopVelocity = t18, this._friction = i16, this.enabled = true, this._time = new t15(0.6), this._screen = [new t15(0.4), new t15(0.4)], this._scene = [new t15(0.6), new t15(0.6), new t15(0.6)], this._tmpDirection = n4();
  2833. }
  2834. add(e16, t18, i16) {
  2835. if (this.enabled) {
  2836. if (this._time.hasLastValue()) {
  2837. if (this._time.computeDelta(i16) < 0.015)
  2838. return;
  2839. }
  2840. this._screen[0].update(e16[0]), this._screen[1].update(e16[1]), this._scene[0].update(t18[0]), this._scene[1].update(t18[1]), this._scene[2].update(t18[2]), this._time.update(i16);
  2841. }
  2842. }
  2843. reset() {
  2844. this._screen[0].reset(), this._screen[1].reset(), this._scene[0].reset(), this._scene[1].reset(), this._scene[2].reset(), this._time.reset();
  2845. }
  2846. evaluateMomentum() {
  2847. if (!this.enabled || !this._screen[0].hasFilteredDelta() || !this._time.hasFilteredDelta())
  2848. return null;
  2849. const e16 = this._screen[0].filteredDelta, t18 = this._screen[1].filteredDelta, i16 = null == e16 || null == t18 ? 0 : Math.sqrt(e16 * e16 + t18 * t18), s16 = this._time.filteredDelta, n23 = null == s16 || null == i16 ? 0 : i16 / s16;
  2850. return Math.abs(n23) < this._minimumInitialVelocity ? null : this.createMomentum(n23, this._stopVelocity, this._friction);
  2851. }
  2852. createMomentum(s16, n23, r18) {
  2853. var _a, _b, _c;
  2854. o(this._tmpDirection, (_a = this._scene[0].filteredDelta) != null ? _a : 0, (_b = this._scene[1].filteredDelta) != null ? _b : 0, (_c = this._scene[2].filteredDelta) != null ? _c : 0);
  2855. const l17 = s4(this._tmpDirection);
  2856. l17 > 0 && g(this._tmpDirection, this._tmpDirection, 1 / l17);
  2857. const h9 = this._time.filteredDelta;
  2858. return new c12(s16, n23, r18, null == h9 ? 0 : l17 / h9, this._tmpDirection);
  2859. }
  2860. };
  2861. // node_modules/@arcgis/core/views/2d/navigation/actions/Pan.js
  2862. var d11 = class extends m {
  2863. constructor(t18) {
  2864. super(t18), this.animationTime = 0, this.momentumEstimator = new l15(500, 6, 0.92), this.momentum = null, this.tmpMomentum = n4(), this.momentumFinished = false, this.viewpoint = new u2({ targetGeometry: new w(), scale: 0, rotation: 0 }), f2(() => this.momentumFinished, () => this.navigation.stop());
  2865. }
  2866. begin(t18, i16) {
  2867. this.navigation.begin(), this.momentumEstimator.reset(), this.addToEstimator(i16), this._previousDrag = i16;
  2868. }
  2869. update(t18, i16) {
  2870. this.addToEstimator(i16);
  2871. let o17 = i16.center.x, m10 = i16.center.y;
  2872. const s16 = this._previousDrag;
  2873. o17 = s16 ? s16.center.x - o17 : -o17, m10 = s16 ? m10 - s16.center.y : m10, t18.viewpoint = St(this.viewpoint, t18.viewpoint, [o17 || 0, m10 || 0]), this._previousDrag = i16;
  2874. }
  2875. end(t18, i16) {
  2876. this.addToEstimator(i16);
  2877. const o17 = t18.navigation.momentumEnabled;
  2878. this.momentum = o17 ? this.momentumEstimator.evaluateMomentum() : null, this.animationTime = 0, this.momentum && this.onAnimationUpdate(t18), this._previousDrag = null, this.navigation.end();
  2879. }
  2880. addToEstimator(t18) {
  2881. const i16 = t18.center.x, o17 = t18.center.y, m10 = i(-i16, o17), e16 = r3(-i16, o17, 0);
  2882. this.momentumEstimator.add(m10, e16, 1e-3 * t18.timestamp);
  2883. }
  2884. onAnimationUpdate(t18) {
  2885. this.navigation.animationManager.animateContinous(t18.viewpoint, (i16, o17) => {
  2886. this.momentumFinished = !this.momentum || this.momentum.isFinished(this.animationTime);
  2887. const m10 = 1e-3 * o17;
  2888. if (!this.momentumFinished) {
  2889. const o18 = this.momentum.valueDelta(this.animationTime, m10);
  2890. g(this.tmpMomentum, this.momentum.direction, o18), St(i16, i16, this.tmpMomentum), t18.constraints.constrainByGeometry(i16);
  2891. }
  2892. this.animationTime += m10;
  2893. });
  2894. }
  2895. stopMomentumNavigation() {
  2896. this.momentum && (this.momentumEstimator.reset(), this.momentum = null, this.navigation.stop());
  2897. }
  2898. };
  2899. e([y()], d11.prototype, "momentumFinished", void 0), e([y()], d11.prototype, "viewpoint", void 0), e([y()], d11.prototype, "navigation", void 0), d11 = e([n2("esri.views.2d.navigation.actions.Pan")], d11);
  2900. var v3 = d11;
  2901. // node_modules/@arcgis/core/views/navigation/MomentumEstimator.js
  2902. var s13 = class {
  2903. constructor(t18 = 2.5, i16 = 0.01, s16 = 0.95, l17 = 12) {
  2904. this._minimumInitialVelocity = t18, this._stopVelocity = i16, this._friction = s16, this._maxVelocity = l17, this.enabled = true, this.value = new t15(0.8), this.time = new t15(0.3);
  2905. }
  2906. add(t18, e16) {
  2907. if (this.enabled && null != e16) {
  2908. if (this.time.hasLastValue()) {
  2909. if (this.time.computeDelta(e16) < 0.01)
  2910. return;
  2911. if (this.value.hasFilteredDelta()) {
  2912. const e17 = this.value.computeDelta(t18);
  2913. this.value.filteredDelta * e17 < 0 && this.value.reset();
  2914. }
  2915. }
  2916. this.time.update(e16), this.value.update(t18);
  2917. }
  2918. }
  2919. reset() {
  2920. this.value.reset(), this.time.reset();
  2921. }
  2922. evaluateMomentum() {
  2923. if (!this.enabled || !this.value.hasFilteredDelta() || !this.time.hasFilteredDelta())
  2924. return null;
  2925. let e16 = this.value.filteredDelta / this.time.filteredDelta;
  2926. return e16 = a4(e16, -this._maxVelocity, this._maxVelocity), Math.abs(e16) < this._minimumInitialVelocity ? null : this.createMomentum(e16, this._stopVelocity, this._friction);
  2927. }
  2928. createMomentum(t18, e16, s16) {
  2929. return new t16(t18, e16, s16);
  2930. }
  2931. };
  2932. // node_modules/@arcgis/core/views/navigation/RotationMomentumEstimator.js
  2933. var a16 = class extends s13 {
  2934. constructor(t18 = 3, a18 = 0.01, s16 = 0.95, o17 = 12) {
  2935. super(t18, a18, s16, o17);
  2936. }
  2937. add(t18, a18) {
  2938. const s16 = this.value.lastValue;
  2939. if (null != s16) {
  2940. let a19 = t18 - s16;
  2941. for (; a19 > Math.PI; )
  2942. a19 -= 2 * Math.PI;
  2943. for (; a19 < -Math.PI; )
  2944. a19 += 2 * Math.PI;
  2945. t18 = s16 + a19;
  2946. }
  2947. super.add(t18, a18);
  2948. }
  2949. };
  2950. // node_modules/@arcgis/core/views/navigation/ZoomMomentumEstimator.js
  2951. var r17 = class extends t16 {
  2952. constructor(e16, t18, r18) {
  2953. super(e16, t18, r18);
  2954. }
  2955. value(e16) {
  2956. const t18 = super.value(e16);
  2957. return Math.exp(t18);
  2958. }
  2959. valueDelta(e16, t18) {
  2960. const r18 = super.value(e16), s16 = super.value(e16 + t18) - r18;
  2961. return Math.exp(s16);
  2962. }
  2963. };
  2964. var s14 = class extends s13 {
  2965. constructor(e16 = 2.5, t18 = 0.01, r18 = 0.95, s16 = 12) {
  2966. super(e16, t18, r18, s16);
  2967. }
  2968. add(e16, t18) {
  2969. super.add(Math.log(e16), t18);
  2970. }
  2971. createMomentum(e16, t18, s16) {
  2972. return new r17(e16, t18, s16);
  2973. }
  2974. };
  2975. // node_modules/@arcgis/core/views/2d/navigation/actions/Pinch.js
  2976. var _7 = class extends m {
  2977. constructor(t18) {
  2978. super(t18), this._animationTime = 0, this._momentumFinished = false, this._rotationMomentumEstimator = new a16(0.6, 0.15, 0.95), this._rotationDirection = 1, this._zoomDirection = 1, this._zoomMomentumEstimator = new s14(), this._zoomOnly = null, this.zoomMomentum = null, this.rotateMomentum = null, this.viewpoint = new u2({ targetGeometry: new w(), scale: 0, rotation: 0 }), this.addHandles(f2(() => this._momentumFinished, () => this.navigation.stop()));
  2979. }
  2980. begin(t18, o17) {
  2981. this.navigation.begin(), this._rotationMomentumEstimator.reset(), this._zoomMomentumEstimator.reset(), this._zoomOnly = null, this._previousAngle = this._startAngle = o17.angle, this._previousRadius = this._startRadius = o17.radius, this._previousCenter = o17.center, this._updateTimestamp = null, t18.constraints.rotationEnabled && this.addToRotateEstimator(0, o17.timestamp), this.addToZoomEstimator(o17, 1);
  2982. }
  2983. update(t18, o17) {
  2984. null === this._updateTimestamp && (this._updateTimestamp = o17.timestamp);
  2985. const i16 = o17.angle, s16 = o17.radius, e16 = o17.center, n23 = Math.abs(180 * (i16 - this._startAngle) / Math.PI), m10 = Math.abs(s16 - this._startRadius), a18 = this._startRadius / s16;
  2986. if (this._previousRadius) {
  2987. const r18 = s16 / this._previousRadius;
  2988. let h9 = 180 * (i16 - this._previousAngle) / Math.PI;
  2989. this._rotationDirection = h9 >= 0 ? 1 : -1, this._zoomDirection = r18 >= 1 ? 1 : -1, t18.constraints.rotationEnabled ? (null === this._zoomOnly && o17.timestamp - this._updateTimestamp > 200 && (this._zoomOnly = m10 - n23 > 0), null === this._zoomOnly || this._zoomOnly ? h9 = 0 : this.addToRotateEstimator(i16 - this._startAngle, o17.timestamp)) : h9 = 0, this.addToZoomEstimator(o17, a18), this.navigation.setViewpoint([e16.x, e16.y], 1 / r18, h9, [this._previousCenter.x - e16.x, e16.y - this._previousCenter.y]);
  2990. }
  2991. this._previousAngle = i16, this._previousRadius = s16, this._previousCenter = e16;
  2992. }
  2993. end(t18) {
  2994. this.rotateMomentum = this._rotationMomentumEstimator.evaluateMomentum(), this.zoomMomentum = this._zoomMomentumEstimator.evaluateMomentum(), this._animationTime = 0, (this.rotateMomentum || this.zoomMomentum) && this.onAnimationUpdate(t18), this.navigation.end();
  2995. }
  2996. addToRotateEstimator(t18, o17) {
  2997. this._rotationMomentumEstimator.add(t18, 1e-3 * o17);
  2998. }
  2999. addToZoomEstimator(t18, o17) {
  3000. this._zoomMomentumEstimator.add(o17, 1e-3 * t18.timestamp);
  3001. }
  3002. canZoomIn(t18) {
  3003. const o17 = t18.scale, i16 = t18.constraints.effectiveMaxScale;
  3004. return 0 === i16 || o17 > i16;
  3005. }
  3006. canZoomOut(t18) {
  3007. const o17 = t18.scale, i16 = t18.constraints.effectiveMinScale;
  3008. return 0 === i16 || o17 < i16;
  3009. }
  3010. onAnimationUpdate(t18) {
  3011. this.navigation.animationManager.animateContinous(t18.viewpoint, (o17, i16) => {
  3012. const s16 = !this.canZoomIn(t18) && this._zoomDirection > 1 || !this.canZoomOut(t18) && this._zoomDirection < 1, e16 = !this.rotateMomentum || this.rotateMomentum.isFinished(this._animationTime), n23 = s16 || !this.zoomMomentum || this.zoomMomentum.isFinished(this._animationTime), p6 = 1e-3 * i16;
  3013. if (this._momentumFinished = e16 && n23, !this._momentumFinished) {
  3014. const i17 = this.rotateMomentum ? Math.abs(this.rotateMomentum.valueDelta(this._animationTime, p6)) * this._rotationDirection * 180 / Math.PI : 0;
  3015. let s17 = this.zoomMomentum ? Math.abs(this.zoomMomentum.valueDelta(this._animationTime, p6)) : 1;
  3016. const e17 = n8(), n24 = n8();
  3017. if (this._previousCenter) {
  3018. r5(e17, this._previousCenter.x, this._previousCenter.y), nt(n24, t18.size, t18.padding), s5(e17, e17, n24);
  3019. const { constraints: r18, scale: p7 } = t18, c13 = p7 * s17;
  3020. s17 < 1 && !r18.canZoomInTo(c13) ? (s17 = p7 / r18.effectiveMaxScale, this.zoomMomentum = null, this.rotateMomentum = null) : s17 > 1 && !r18.canZoomOutTo(c13) && (s17 = p7 / r18.effectiveMinScale, this.zoomMomentum = null, this.rotateMomentum = null), Gt(o17, t18.viewpoint, s17, i17, e17, t18.size), t18.constraints.constrainByGeometry(o17);
  3021. }
  3022. }
  3023. this._animationTime += p6;
  3024. });
  3025. }
  3026. stopMomentumNavigation() {
  3027. (this.rotateMomentum || this.zoomMomentum) && (this.rotateMomentum && (this._rotationMomentumEstimator.reset(), this.rotateMomentum = null), this.zoomMomentum && (this._zoomMomentumEstimator.reset(), this.zoomMomentum = null), this.navigation.stop());
  3028. }
  3029. };
  3030. e([y()], _7.prototype, "_momentumFinished", void 0), e([y()], _7.prototype, "viewpoint", void 0), e([y()], _7.prototype, "navigation", void 0), _7 = e([n2("esri.views.2d.navigation.actions.Pinch")], _7);
  3031. var d12 = _7;
  3032. // node_modules/@arcgis/core/views/2d/navigation/actions/Rotate.js
  3033. var u9 = n8();
  3034. var d13 = n8();
  3035. var j4 = class extends m {
  3036. constructor(t18) {
  3037. super(t18), this._previousCenter = n8(), this.viewpoint = new u2({ targetGeometry: new w(), scale: 0, rotation: 0 });
  3038. }
  3039. begin(t18, e16) {
  3040. this.navigation.begin(), r5(this._previousCenter, e16.center.x, e16.center.y);
  3041. }
  3042. update(t18, e16) {
  3043. const { state: { size: o17, padding: r18 } } = t18;
  3044. r5(u9, e16.center.x, e16.center.y), $(d13, o17, r18), t18.viewpoint = bt2(this.viewpoint, t18.state.paddedViewState.viewpoint, pt(d13, this._previousCenter, u9)), a5(this._previousCenter, u9);
  3045. }
  3046. end() {
  3047. this.navigation.end();
  3048. }
  3049. };
  3050. e([y()], j4.prototype, "viewpoint", void 0), e([y()], j4.prototype, "navigation", void 0), j4 = e([n2("esri.views.2d.actions.Rotate")], j4);
  3051. var f9 = j4;
  3052. // node_modules/@arcgis/core/views/2d/navigation/MapViewNavigation.js
  3053. var l16 = 10;
  3054. var w2 = 1;
  3055. var v4 = new u2({ targetGeometry: new w() });
  3056. var d14 = [0, 0];
  3057. var g7 = 250;
  3058. var _8 = class extends m {
  3059. constructor(t18) {
  3060. super(t18), this._endTimer = null, this.animationManager = null;
  3061. }
  3062. initialize() {
  3063. this.pan = new v3({ navigation: this }), this.rotate = new f9({ navigation: this }), this.pinch = new d12({ navigation: this }), this.zoomBox = new l14({ view: this.view, navigation: this });
  3064. }
  3065. destroy() {
  3066. this.pan.destroy(), this.rotate.destroy(), this.pinch.destroy(), this.zoomBox.destroy(), this.pan = this.rotate = this.pinch = this.zoomBox = this.animationManager = null;
  3067. }
  3068. begin() {
  3069. this._set("interacting", true);
  3070. }
  3071. end() {
  3072. this._lastEventTimestamp = performance.now(), this._startTimer(g7);
  3073. }
  3074. async zoom(t18, i16 = this._getDefaultAnchor()) {
  3075. if (this.stop(), this.begin(), this.view.constraints.snapToZoom && this.view.constraints.effectiveLODs)
  3076. return t18 < 1 ? this.zoomIn(i16) : this.zoomOut(i16);
  3077. this.setViewpoint(i16, t18, 0, [0, 0]);
  3078. }
  3079. async zoomIn(t18) {
  3080. const i16 = this.view, o17 = i16.constraints.snapToNextScale(i16.scale);
  3081. return this._zoomToScale(o17, t18);
  3082. }
  3083. async zoomOut(t18) {
  3084. const i16 = this.view, o17 = i16.constraints.snapToPreviousScale(i16.scale);
  3085. return this._zoomToScale(o17, t18);
  3086. }
  3087. setViewpoint(t18, i16, o17, n23) {
  3088. this.begin(), this.view.state.viewpoint = this._scaleRotateTranslateViewpoint(this.view.viewpoint, t18, i16, o17, n23), this.end();
  3089. }
  3090. setViewpointImmediate(t18, i16 = 0, o17 = [0, 0], n23 = this._getDefaultAnchor()) {
  3091. this.view.state.viewpoint = this._scaleRotateTranslateViewpoint(this.view.viewpoint, n23, t18, i16, o17);
  3092. }
  3093. continousRotateClockwise() {
  3094. const t18 = this.get("view.viewpoint");
  3095. this.animationManager.animateContinous(t18, (t19) => {
  3096. bt2(t19, t19, -w2);
  3097. });
  3098. }
  3099. continousRotateCounterclockwise() {
  3100. const t18 = this.get("view.viewpoint");
  3101. this.animationManager.animateContinous(t18, (t19) => {
  3102. bt2(t19, t19, w2);
  3103. });
  3104. }
  3105. resetRotation() {
  3106. this.view.rotation = 0;
  3107. }
  3108. continousPanLeft() {
  3109. this._continuousPan([-l16, 0]);
  3110. }
  3111. continousPanRight() {
  3112. this._continuousPan([l16, 0]);
  3113. }
  3114. continousPanUp() {
  3115. this._continuousPan([0, l16]);
  3116. }
  3117. continousPanDown() {
  3118. this._continuousPan([0, -l16]);
  3119. }
  3120. stop() {
  3121. this.pan.stopMomentumNavigation(), this.animationManager.stop(), this.end(), null !== this._endTimer && (clearTimeout(this._endTimer), this._endTimer = null, this._set("interacting", false));
  3122. }
  3123. _continuousPan(t18) {
  3124. const i16 = this.view.viewpoint;
  3125. this.animationManager.animateContinous(i16, (i17) => {
  3126. St(i17, i17, t18), this.view.constraints.constrainByGeometry(i17);
  3127. });
  3128. }
  3129. _startTimer(t18) {
  3130. return null !== this._endTimer || (this._endTimer = setTimeout(() => {
  3131. this._endTimer = null;
  3132. const t19 = performance.now() - this._lastEventTimestamp;
  3133. t19 < g7 ? this._endTimer = this._startTimer(t19) : this._set("interacting", false);
  3134. }, t18)), this._endTimer;
  3135. }
  3136. _getDefaultAnchor() {
  3137. const { size: t18, padding: { left: i16, right: o17, top: n23, bottom: e16 } } = this.view;
  3138. return d14[0] = 0.5 * (t18[0] - o17 + i16), d14[1] = 0.5 * (t18[1] - e16 + n23), d14;
  3139. }
  3140. async _zoomToScale(t18, i16 = this._getDefaultAnchor()) {
  3141. const { view: o17 } = this, { constraints: n23, scale: e16, viewpoint: s16, size: a18, padding: r18 } = o17, h9 = n23.canZoomInTo(t18), m10 = n23.canZoomOutTo(t18);
  3142. if (!(t18 < e16 && !h9 || t18 > e16 && !m10))
  3143. return Rt(v4, s16, t18 / e16, 0, i16, a18, r18), n23.constrainByGeometry(v4), o17.goTo(v4, { animate: true });
  3144. }
  3145. _scaleRotateTranslateViewpoint(t18, i16, o17, n23, e16) {
  3146. const { view: s16 } = this, { size: a18, padding: h9, constraints: m10, scale: p6, viewpoint: u10 } = s16, l17 = p6 * o17, w3 = m10.canZoomInTo(l17), v5 = m10.canZoomOutTo(l17);
  3147. return (o17 < 1 && !w3 || o17 > 1 && !v5) && (o17 = 1), St(u10, u10, e16), Rt(t18, u10, o17, n23, i16, a18, h9), m10.constrainByGeometry(t18);
  3148. }
  3149. };
  3150. e([y()], _8.prototype, "animationManager", void 0), e([y({ type: Boolean, readOnly: true })], _8.prototype, "interacting", void 0), e([y()], _8.prototype, "pan", void 0), e([y()], _8.prototype, "pinch", void 0), e([y()], _8.prototype, "rotate", void 0), e([y()], _8.prototype, "view", void 0), e([y()], _8.prototype, "zoomBox", void 0), _8 = e([n2("esri.views.2d.navigation.MapViewNavigation")], _8);
  3151. var T3 = _8;
  3152. // node_modules/@arcgis/core/views/2d/engine/webgl/shaders/MagnifierPrograms.js
  3153. var a17 = { shaders: { vertexShader: n12("magnifier/magnifier.vert"), fragmentShader: n12("magnifier/magnifier.frag") }, attributes: /* @__PURE__ */ new Map([["a_pos", 0]]) };
  3154. function t17(r18) {
  3155. return e8(r18, a17);
  3156. }
  3157. // node_modules/@arcgis/core/views/magnifier/resources.js
  3158. async function s15(s16) {
  3159. const r18 = import("./mask-svg-SZLKFQYX.js"), i16 = import("./overlay-svg-RSROLRUP.js"), o17 = t6((await r18).default, { signal: s16 }), e16 = t6((await i16).default, { signal: s16 }), m10 = { mask: await o17, overlay: await e16 };
  3160. return f(s16), m10;
  3161. }
  3162. // node_modules/@arcgis/core/views/2d/magnifier/MagnifierView2D.js
  3163. var j5 = class extends r8 {
  3164. constructor() {
  3165. super(), this._handles = new t2(), this._resourcePixelRatio = 1, this.visible = false;
  3166. }
  3167. destroy() {
  3168. this._handles.destroy(), this._handles = null, this._disposeRenderResources(), this._resourcesTask && (this._resourcesTask.abort(), this._resourcesTask = null);
  3169. }
  3170. get background() {
  3171. return this._background;
  3172. }
  3173. set background(e16) {
  3174. this._background = e16, this.requestRender();
  3175. }
  3176. get magnifier() {
  3177. return this._magnifier;
  3178. }
  3179. set magnifier(e16) {
  3180. this._magnifier = e16, this._handles.removeAll(), this._handles.add([l(() => e16.version, () => {
  3181. this.visible = e16.visible && r(e16.position) && e16.size > 0, this.requestRender();
  3182. }, h), l(() => [e16.maskUrl, e16.overlayUrl], () => this._reloadResources()), l(() => e16.size, () => {
  3183. this._disposeRenderResources(), this.requestRender();
  3184. })]);
  3185. }
  3186. _createTransforms() {
  3187. return { dvs: e5() };
  3188. }
  3189. doRender(e16) {
  3190. var _a;
  3191. const r18 = e16.context;
  3192. if (!this._resourcesTask)
  3193. return void this._reloadResources();
  3194. if (e16.drawPhase !== I3.MAP || !this._canRender())
  3195. return;
  3196. this._updateResources(e16);
  3197. const s16 = this._magnifier;
  3198. if (t(s16.position))
  3199. return;
  3200. const a18 = e16.pixelRatio, o17 = s16.size * a18, n23 = 1 / s16.factor, l17 = Math.ceil(n23 * o17);
  3201. this._readbackTexture.resize(l17, l17);
  3202. const { size: h9 } = e16.state, m10 = a18 * h9[0], u10 = a18 * h9[1], c13 = 0.5 * l17, _9 = 0.5 * l17, p6 = a4(a18 * s16.position.x, c13, m10 - c13 - 1), f10 = a4(u10 - a18 * s16.position.y, _9, u10 - _9 - 1);
  3203. r18.setBlendingEnabled(true);
  3204. const g8 = p6 - c13, b4 = f10 - _9, x2 = this._readbackTexture;
  3205. r18.bindTexture(x2, 0), r18.gl.copyTexImage2D(x2.descriptor.target, 0, x2.descriptor.pixelFormat, g8, b4, l17, l17, 0);
  3206. const R2 = (_a = this.background) == null ? void 0 : _a.color, y5 = R2 ? [R2.a * R2.r / 255, R2.a * R2.g / 255, R2.a * R2.b / 255, R2.a] : [1, 1, 1, 1], k2 = (p6 + s16.offset.x * a18) / m10 * 2 - 1, A2 = (f10 - s16.offset.y * a18) / u10 * 2 - 1, v5 = o17 / m10 * 2, E5 = o17 / u10 * 2, j6 = this._program;
  3207. r18.bindVAO(this._vertexArrayObject), r18.bindTexture(this._overlayTexture, 6), r18.bindTexture(this._maskTexture, 7), r18.useProgram(j6), j6.setUniform4fv("u_background", y5), j6.setUniform1i("u_readbackTexture", 0), j6.setUniform1i("u_overlayTexture", 6), j6.setUniform1i("u_maskTexture", 7), j6.setUniform4f("u_drawPos", k2, A2, v5, E5), j6.setUniform1i("u_maskEnabled", s16.maskEnabled ? 1 : 0), j6.setUniform1i("u_overlayEnabled", s16.overlayEnabled ? 1 : 0), r18.setStencilTestEnabled(false), r18.setColorMask(true, true, true, true), r18.drawArrays(E.TRIANGLE_STRIP, 0, 4), r18.bindVAO();
  3208. }
  3209. _canRender() {
  3210. return this.mask && this.overlay && null != this._magnifier;
  3211. }
  3212. _reloadResources() {
  3213. this._resourcesTask && this._resourcesTask.abort();
  3214. const s16 = r(this._magnifier) ? this._magnifier.maskUrl : null, t18 = r(this._magnifier) ? this._magnifier.overlayUrl : null;
  3215. this._resourcesTask = j2(async (r18) => {
  3216. const o17 = t(s16) || t(t18) ? s15(r18) : null, n23 = r(s16) ? U(s16, { responseType: "image", signal: r18 }).then((e16) => e16.data) : o17.then((e16) => e16.mask), l17 = r(t18) ? U(t18, { responseType: "image", signal: r18 }).then((e16) => e16.data) : o17.then((e16) => e16.overlay), [h9, m10] = await Promise.all([n23, l17]);
  3217. this.mask = h9, this.overlay = m10, this._disposeRenderResources(), this.requestRender();
  3218. });
  3219. }
  3220. _disposeRenderResources() {
  3221. this._readbackTexture = a(this._readbackTexture), this._overlayTexture = a(this._overlayTexture), this._maskTexture = a(this._maskTexture), this._vertexArrayObject = a(this._vertexArrayObject), this._program = a(this._program);
  3222. }
  3223. _updateResources(e16) {
  3224. if (e16.pixelRatio !== this._resourcePixelRatio && this._disposeRenderResources(), this._readbackTexture)
  3225. return;
  3226. const r18 = e16.context;
  3227. this._resourcePixelRatio = e16.pixelRatio;
  3228. const s16 = Math.ceil(this._magnifier.size * e16.pixelRatio);
  3229. this._program = t17(r18);
  3230. const t18 = new Uint16Array([0, 1, 0, 0, 1, 1, 1, 0]), i16 = a17.attributes;
  3231. this._vertexArrayObject = new a7(r18, i16, m3, { geometry: E4.createVertex(r18, F.STATIC_DRAW, t18) }), this.overlay.width = s16, this.overlay.height = s16, this._overlayTexture = new E3(r18, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.NEAREST, flipped: true, preMultiplyAlpha: !It(this.overlay.src) || !e16.context.driverTest.svgAlwaysPremultipliesAlpha }, this.overlay), this.mask.width = s16, this.mask.height = s16, this._maskTexture = new E3(r18, { target: M.TEXTURE_2D, pixelFormat: P.ALPHA, internalFormat: P.ALPHA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.NEAREST, flipped: true }, this.mask);
  3232. const a18 = 1 / this._magnifier.factor;
  3233. this._readbackTexture = new E3(r18, { target: M.TEXTURE_2D, pixelFormat: P.RGBA, internalFormat: P.RGBA, dataType: G.UNSIGNED_BYTE, wrapMode: D2.CLAMP_TO_EDGE, samplingMode: L.LINEAR, flipped: false, width: Math.ceil(a18 * s16), height: Math.ceil(a18 * s16) });
  3234. }
  3235. };
  3236. export {
  3237. i5 as GraphicContainer,
  3238. oe as GraphicsView2D,
  3239. d10 as LabelManager,
  3240. j5 as MagnifierView2D,
  3241. T3 as MapViewNavigation,
  3242. P4 as Stage
  3243. };
  3244. //# sourceMappingURL=mapViewDeps-F36EWNMM.js.map