windsitemap~windsitemap1.00616a98.js 3.6 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["windsitemap~windsitemap1"],{"0013":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var i=r("b50f"),n=r("38a4"),a=r("a21b"),s=r("e431"),o=r("0b2d");const c=-1;var l;function u(e,t,r,o=y){const l=e.vertices.position,u=e.vertices.componentIndex,g=Object(n["h"])(o.anglePlanar),O=Object(n["h"])(o.angleSignificantEdge),v=Math.cos(O),_=Math.cos(g),j=m.edge,w=j.position0,x=j.position1,T=j.faceNormal0,S=j.faceNormal1,E=b(e),A=f(e),C=A.length/4,R=t.allocate(C);let M=0;const P=C,I=r.allocate(P);let D=0,L=0,N=0;const F=Object(i["i"])(0,C),k=new Float32Array(C);Object(a["b"])(k,(e,t,r)=>{l.getVec(A[4*t+0],w),l.getVec(A[4*t+1],x),r[t]=Object(s["o"])(w,x)}),F.sort((e,t)=>k[t]-k[e]);const U=new Array,z=new Array;for(let i=0;i<C;i++){const e=F[i],n=k[e],a=A[4*e+0],o=A[4*e+1],f=A[4*e+2],b=A[4*e+3],m=b===c;if(l.getVec(a,w),l.getVec(o,x),m)Object(s["y"])(T,E[3*f+0],E[3*f+1],E[3*f+2]),Object(s["m"])(S,T),j.componentIndex=u.get(a),j.cosAngle=Object(s["j"])(T,S);else{if(Object(s["y"])(T,E[3*f+0],E[3*f+1],E[3*f+2]),Object(s["y"])(S,E[3*b+0],E[3*b+1],E[3*b+2]),j.componentIndex=u.get(a),j.cosAngle=Object(s["j"])(T,S),h(j,_))continue;j.cosAngle<-.9999&&Object(s["m"])(S,T)}L+=n,N++,m||d(j,v)?(t.write(R,M++,j),U.push(n)):p(j,g)&&(r.write(I,D++,j),z.push(n))}const B=new Float32Array(U.reverse()),V=new Float32Array(z.reverse());return{regular:{instancesData:t.trim(R,M),lodInfo:{lengths:B}},silhouette:{instancesData:r.trim(I,D),lodInfo:{lengths:V}},averageEdgeLength:L/N}}function d(e,t){return e.cosAngle<t}function h(e,t){return e.cosAngle>t}function p(e,t){const r=Object(n["b"])(e.cosAngle),i=m.fwd,a=m.ortho;return Object(s["x"])(i,e.position1,e.position0),r*(Object(s["j"])(Object(s["i"])(a,e.faceNormal0,e.faceNormal1),i)>0?-1:1)>t}function f(e){const t=e.faces.length/3,r=e.faces,i=e.neighbors;let n=0;for(let o=0;o<t;o++){const e=i[3*o+0],t=i[3*o+1],a=i[3*o+2],s=r[3*o+0],l=r[3*o+1],u=r[3*o+2];n+=e===c||s<l?1:0,n+=t===c||l<u?1:0,n+=a===c||u<s?1:0}const a=new Int32Array(4*n);let s=0;for(let o=0;o<t;o++){const e=i[3*o+0],t=i[3*o+1],n=i[3*o+2],l=r[3*o+0],u=r[3*o+1],d=r[3*o+2];(e===c||l<u)&&(a[s++]=l,a[s++]=u,a[s++]=o,a[s++]=e),(t===c||u<d)&&(a[s++]=u,a[s++]=d,a[s++]=o,a[s++]=t),(n===c||d<l)&&(a[s++]=d,a[s++]=l,a[s++]=o,a[s++]=n)}return a}function b(e){const t=e.faces.length/3,r=e.vertices.position,i=e.faces,n=g.v0,a=g.v1,o=g.v2,c=new Float32Array(3*t);for(let l=0;l<t;l++){const e=i[3*l+0],t=i[3*l+1],u=i[3*l+2];r.getVec(e,n),r.getVec(t,a),r.getVec(u,o),Object(s["l"])(a,a,n),Object(s["l"])(o,o,n),Object(s["i"])(n,a,o),Object(s["t"])(n,n),c[3*l+0]=n[0],c[3*l+1]=n[1],c[3*l+2]=n[2]}return c}!function(e){e[e.SOLID=0]="SOLID",e[e.SKETCH=1]="SKETCH"}(l||(l={}));const m={edge:{position0:Object(o["f"])(),position1:Object(o["f"])(),faceNormal0:Object(o["f"])(),faceNormal1:Object(o["f"])(),componentIndex:0,cosAngle:0},ortho:Object(o["f"])(),fwd:Object(o["f"])()},g={v0:Object(o["f"])(),v1:Object(o["f"])(),v2:Object(o["f"])()},y={anglePlanar:4,angleSignificantEdge:35}},"0028":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3423");class n extends i["a"]{constructor(e,t,r){if(super(e,t,r),!(this instanceof n))return new n(e,t,r)}}n.prototype.type="warning"},"003a":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b2b2"),n=r("8048"),a=r("7f83");function s(e,t,r){if(null==e.hasM||e.hasZ)for(const i of t)for(const e of i)e.length>2&&(e[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const i=Object(n["g"])(r);c(e,r,i),c(t,r,i)}function c(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(Object(i["j"])(e)||!e.spatialReference||Object(a["d"])(e.spatialReference,t))return;const o=Object(n["g"])(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)s(e,e.rings,o);else if("paths"in e)s(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const i of e.points)i.length>2&&(i[2]*=o)}},"003f":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("f2e0");class n{constructor(){this.id=Object(i["b"])()}unload(){}}},"008c":function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return x})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return C})),r.d(t,"f",(function(){return R})),r.d(t,"g",(function(){return M}));var i=r("b2b2"),n=r("a9ab");const a=(e,t,r)=>[t,r],s=(e,t,r)=>[t,r,e[2]],o=(e,t,r)=>[t,r,e[2],e[3]];function c(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:Object(i["k"])(e.extent)?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function l({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function u({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function d(e,t,r){const i=[];let n,a,s,o;for(let c=0;c<r.length;c++){const d=r[c];c>0?(s=l(e,d[0]),o=u(e,d[1]),s===n&&o===a||(i.push(t(d,s-n,o-a)),n=s,a=o)):(n=l(e,d[0]),a=u(e,d[1]),i.push(t(d,n,a)))}return i.length>0?i:null}function h(e,t,r,i){return d(e,r?i?o:s:i?s:a,t)}function p(e,t,r,i){const n=[],c=r?i?o:s:i?s:a;for(let a=0;a<t.length;a++){const r=d(e,c,t[a]);r&&r.length>=3&&n.push(r)}return n.length?n:null}function f(e,t,r,i){const n=[],c=r?i?o:s:i?s:a;for(let a=0;a<t.length;a++){const r=d(e,c,t[a]);r&&r.length>=2&&n.push(r)}return n.length?n:null}function b({scale:e,translate:t},r){return r*e[0]+t[0]}function m({scale:e,translate:t},r){return t[1]-r*e[1]}function g(e,t,r){const i=new Array(r.length);if(!r.length)return i;const[n,a]=e.scale;let s=b(e,r[0][0]),o=m(e,r[0][1]);i[0]=t(r[0],s,o);for(let c=1;c<r.length;c++){const e=r[c];s+=e[0]*n,o-=e[1]*a,i[c]=t(e,s,o)}return i}function y(e,t,r){const i=new Array(r.length);for(let n=0;n<r.length;n++)i[n]=g(e,t,r[n]);return i}function O(e,t,r,i){return g(e,r?i?o:s:i?s:a,t)}function v(e,t,r,i){return y(e,r?i?o:s:i?s:a,t)}function _(e,t,r,i){return y(e,r?i?o:s:i?s:a,t)}function j(e,t,r,i,n){return t.xmin=l(e,r.xmin),t.ymin=u(e,r.ymin),t.xmax=l(e,r.xmax),t.ymax=u(e,r.ymax),t!==r&&(i&&(t.zmin=r.zmin,t.zmax=r.zmax),n&&(t.mmin=r.mmin,t.mmax=r.mmax)),t}function w(e,t,r,i,n){return t.points=h(e,r.points,i,n),t}function x(e,t,r,i,n){return t.x=l(e,r.x),t.y=u(e,r.y),t!==r&&(i&&(t.z=r.z),n&&(t.m=r.m)),t}function T(e,t,r,i,n){const a=p(e,r.rings,i,n);return a?(t.rings=a,t):null}function S(e,t,r,i,n){const a=f(e,r.paths,i,n);return a?(t.paths=a,t):null}function E(e,t){return e&&t?Object(n["f"])(t)?x(e,{},t,!1,!1):Object(n["h"])(t)?S(e,{},t,!1,!1):Object(n["g"])(t)?T(e,{},t,!1,!1):Object(n["e"])(t)?w(e,{},t,!1,!1):Object(n["d"])(t)?j(e,{},t,!1,!1):null:null}function A(e,t,r,n,a){return Object(i["k"])(r)&&(t.points=O(e,r.points,n,a)),t}function C(e,t,r,n,a){return Object(i["j"])(r)||(t.x=b(e,r.x),t.y=m(e,r.y),t!==r&&(n&&(t.z=r.z),a&&(t.m=r.m))),t}function R(e,t,r,n,a){return Object(i["k"])(r)&&(t.rings=_(e,r.rings,n,a)),t}function M(e,t,r,n,a){return Object(i["k"])(r)&&(t.paths=v(e,r.paths,n,a)),t}},"00c5":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("2c4f"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386"));let l=i=class extends s["a"]{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new a["a"]}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],l.prototype,"floorField",void 0),Object(n["a"])([Object(o["b"])({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),Object(n["a"])([Object(o["b"])({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=i=Object(n["a"])([Object(c["a"])("esri.layers.support.LayerFloorInfo")],l);const u=l},"00cd":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("d386")),c=r("fdc9"),l=r("b32b");let u=i=class extends l["a"]{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new i({colorRamps:Object(a["a"])(this.colorRamps)})}};Object(n["a"])([Object(s["b"])({type:[c["a"]],json:{write:!0}})],u.prototype,"colorRamps",void 0),Object(n["a"])([Object(s["b"])({type:["multipart"]})],u.prototype,"type",void 0),u=i=Object(n["a"])([Object(o["a"])("esri.rest.support.MultipartColorRamp")],u);const d=u},"013b":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("c120"),a=r("ecd7");!function(e){e[e.varint=0]="varint",e[e.fixed64=1]="fixed64",e[e.delimited=2]="delimited",e[e.fixed32=5]="fixed32",e[e.unknown=99]="unknown"}(i||(i={}));const s=4294967296,o=new TextDecoder("utf-8"),c=Object(n["a"])("safari")||Object(n["a"])("ios")?6:Object(n["a"])("ff")?12:32;class l{constructor(e,t,r=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,r,n)}_init(e,t,r,i){this._data=e,this._dataView=t,this._pos=r,this._end=i}clone(){return new l(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*s;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*s;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,i){const n=this.getMessage(),a=e(n,t,r,i);return n.release(),a}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=l.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){l.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t,r=this._pos,i=0;if(this._end-r>=10)do{if(t=e[r++],i|=127&t,0==(128&t))break;if(t=e[r++],i|=(127&t)<<7,0==(128&t))break;if(t=e[r++],i|=(127&t)<<14,0==(128&t))break;if(t=e[r++],i|=(127&t)<<21,0==(128&t))break;if(t=e[r++],i+=268435456*(127&t),0==(128&t))break;if(t=e[r++],i+=34359738368*(127&t),0==(128&t))break;if(t=e[r++],i+=4398046511104*(127&t),0==(128&t))break;if(t=e[r++],i+=562949953421312*(127&t),0==(128&t))break;if(t=e[r++],i+=72057594037927940*(127&t),0==(128&t))break;if(t=e[r++],i+=0x8000000000000000*(127&t),0==(128&t))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;r!==this._end&&(t=e[r],0!=(128&t));)++r,i+=(127&t)*n,n*=128;if(r===this._end)throw new Error("Varint overrun!");++r,i+=t*n}return this._pos=r,i}_decodeSVarint(){const e=this._decodeVarint();return e%2?-(e+1)/2:e/2}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const i=e.subarray(t,r);return o.decode(i)}let i="",n="";for(let a=t;a<r;++a){const t=e[a];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}l.pool=new a["a"](l,null,e=>{e._data=null,e._dataView=null})},"018d":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i=r("7f83"),n=r("b2b2"),a=r("ae54");function s(e,t){return[e,t]}function o(e,t,r){return e[0]=t,e[1]=r,e}function c(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}const l=new a["a"]("0/0/0/0");class u{constructor(e,t,r,i,n,a,s,o,c,l,u,d){this.level=e,this.resolution=t,this.scale=r,this.origin=i,this.first=n,this.last=a,this.size=s,this.norm=o,this.worldStart=c,this.worldEnd=l,this.worldSize=u,this.wrap=d}static create(e,t,r=null){const a=Object(i["e"])(e.spatialReference),c=t.origin||s(e.origin.x,e.origin.y),l=s(e.size[0]*t.resolution,e.size[1]*t.resolution),d=s(-1/0,-1/0),h=s(1/0,1/0),p=s(1/0,1/0);Object(n["k"])(r)&&(o(d,Math.max(0,Math.floor((r.xmin-c[0])/l[0])),Math.max(0,Math.floor((c[1]-r.ymax)/l[1]))),o(h,Math.max(0,Math.floor((r.xmax-c[0])/l[0])),Math.max(0,Math.floor((c[1]-r.ymin)/l[1]))),o(p,h[0]-d[0]+1,h[1]-d[1]+1));const{cols:f,rows:b}=t;let m,g,y,O;return!r&&f&&b&&(o(d,f[0],b[0]),o(h,f[1],b[1]),o(p,f[1]-f[0]+1,b[1]-b[0]+1)),e.isWrappable?(m=s(Math.ceil(Math.round((a.valid[1]-a.valid[0])/t.resolution)/e.size[0]),p[1]),g=s(Math.floor((a.origin[0]-c[0])/l[0]),d[1]),y=s(m[0]+g[0]-1,h[1]),O=!0):(g=d,y=h,m=p,O=!1),new u(t.level,t.resolution,t.scale,c,d,h,p,l,g,y,m,O)}normalizeCol(e){if(!this.wrap)return e;const t=this.worldSize[0];return e<0?t-1-Math.abs((e+1)%t):e%t}denormalizeCol(e,t){return this.wrap?this.worldSize[0]*t+e:e}getWorldForColumn(e){return this.wrap?Math.floor(e/this.worldSize[0]):0}getFirstColumnForWorld(e){return e*this.worldSize[0]+this.first[0]}getLastColumnForWorld(e){return e*this.worldSize[0]+this.first[0]+this.size[0]-1}getColumnForX(e){return(e-this.origin[0])/this.norm[0]}getXForColumn(e){return this.origin[0]+e*this.norm[0]}getRowForY(e){return(this.origin[1]-e)/this.norm[1]}getYForRow(e){return this.origin[1]-e*this.norm[1]}getTileBounds(e,t,r=!1){l.set(t);const i=r?l.col:this.denormalizeCol(l.col,l.world),n=l.row;return c(e,this.getXForColumn(i),this.getYForRow(n+1),this.getXForColumn(i+1),this.getYForRow(n)),e}getTileCoords(e,t,r=!1){l.set(t);const i=r?l.col:this.denormalizeCol(l.col,l.world);return Array.isArray(e)?o(e,this.getXForColumn(i),this.getYForRow(l.row)):(e.x=this.getXForColumn(i),e.y=this.getYForRow(l.row)),e}}var d=r("ba6a");class h{constructor(e,t,r){this.row=e,this.colFrom=t,this.colTo=r}}const p=new a["a"]("0/0/0/0");class f{constructor(e,t,r,i,n,a,s,o){this.x=e,this.ymin=t,this.ymax=r,this.invM=i,this.leftAdjust=n,this.rightAdjust=a,this.leftBound=s,this.rightBound=o}static create(e,t){e[1]>t[1]&&([e,t]=[t,e]);const[r,i]=e,[n,a]=t,s=n-r,o=a-i,c=0!==o?s/o:0,l=(Math.ceil(i)-i)*c,u=(Math.floor(i)-i)*c;return new f(r,Math.floor(i),Math.ceil(a),c,s<0?l:u,s<0?u:l,s<0?n:r,s<0?r:n)}incrRow(){this.x+=this.invM}getLeftCol(){return Math.max(this.x+this.leftAdjust,this.leftBound)}getRightCol(){return Math.min(this.x+this.rightAdjust,this.rightBound)}}const b=[[0,0],[0,0],[0,0],[0,0]],m=1e-6;class g{constructor(e,t=null){this.tileInfo=e,this.fullExtent=t,this.scales=[],this._lodInfos=null,this._infoByScale={},this._infoByLevel={};const r=e.lods.slice();r.sort((function(e,t){return t.scale-e.scale}));const i=this._lodInfos=r.map(r=>u.create(e,r,t));r.forEach((e,t)=>{this._infoByLevel[e.level]=i[t],this._infoByScale[e.scale]=i[t],this.scales[t]=e.scale},this),this._wrap=e.isWrappable}get spatialReference(){return this.tileInfo.spatialReference}getLODInfoAt(e){return this._infoByLevel["number"==typeof e?e:e.level]}getTileBounds(e,t,r=!1){p.set(t);const i=this._infoByLevel[p.level];return i?i.getTileBounds(e,p,r):e}getTileCoords(e,t,r=!1){p.set(t);const i=this._infoByLevel[p.level];return i?i.getTileCoords(e,p,r):e}getTileCoverage(e,t=192,r="closest"){const i="closest"===r?this.getClosestInfoForScale(e.scale):this.getSmallestInfoForScale(e.scale),n=d["a"].pool.acquire(i),a=this._wrap;let s,o,c,l=1/0,u=-1/0;const p=n.spans;b[0][0]=b[0][1]=b[1][1]=b[3][0]=-t,b[1][0]=b[2][0]=e.size[0]+t,b[2][1]=b[3][1]=e.size[1]+t;for(const d of b)e.toMap(d,d),d[0]=i.getColumnForX(d[0]),d[1]=i.getRowForY(d[1]);const m=[];let g=3;for(let d=0;d<4;d++){if(b[d][1]===b[g][1]){g=d;continue}const e=f.create(b[d],b[g]);l=Math.min(e.ymin,l),u=Math.max(e.ymax,u),void 0===m[e.ymin]&&(m[e.ymin]=[]),m[e.ymin].push(e),g=d}if(null==l||null==u||u-l>100)return null;let y=[];for(s=l;s<u;){null!=m[s]&&(y=y.concat(m[s])),o=1/0,c=-1/0;for(let e=y.length-1;e>=0;e--){const t=y[e];o=Math.min(o,t.getLeftCol()),c=Math.max(c,t.getRightCol())}if(o=Math.floor(o),c=Math.floor(c),s>=i.first[1]&&s<=i.last[1])if(a)if(i.size[0]<i.worldSize[0]){const e=Math.floor(c/i.worldSize[0]);for(let t=Math.floor(o/i.worldSize[0]);t<=e;t++)p.push(new h(s,Math.max(i.getFirstColumnForWorld(t),o),Math.min(i.getLastColumnForWorld(t),c)))}else p.push(new h(s,o,c));else o>i.last[0]||c<i.first[0]||(o=Math.max(o,i.first[0]),c=Math.min(c,i.last[0]),p.push(new h(s,o,c)));s+=1;for(let e=y.length-1;e>=0;e--){const t=y[e];t.ymax>=s?t.incrRow():y.splice(e,1)}}return n}getTileParentId(e){p.set(e);const t=this._infoByLevel[p.level],r=this._lodInfos.indexOf(t)-1;return r<0?null:(this._getTileIdAtLOD(p,this._lodInfos[r],p),p.id)}getTileResolution(e){const t=this._infoByLevel["object"==typeof e?e.level:e];return t?t.resolution:-1}getTileScale(e){const t=this._infoByLevel[e.level];return t?t.scale:-1}intersects(e,t){p.set(t);const r=this._infoByLevel[p.level],i=e.lodInfo;if(i.resolution>r.resolution){this._getTileIdAtLOD(p,i,p);const t=i.denormalizeCol(p.col,p.world);for(const r of e.spans)if(r.row===p.row&&r.colFrom<=t&&r.colTo>=t)return!0}if(i.resolution<r.resolution){const[t,n,a,s]=e.spans.reduce((e,t)=>(e[0]=Math.min(e[0],t.row),e[1]=Math.max(e[1],t.row),e[2]=Math.min(e[2],t.colFrom),e[3]=Math.max(e[3],t.colTo),e),[1/0,-1/0,1/0,-1/0]),o=r.denormalizeCol(p.col,p.world),c=i.getColumnForX(r.getXForColumn(o)),l=i.getRowForY(r.getYForRow(p.row)),u=i.getColumnForX(r.getXForColumn(o+1))-1,d=i.getRowForY(r.getYForRow(p.row+1))-1;return!(c>s||u<a||l>n||d<t)}const n=i.denormalizeCol(p.col,p.world);return e.spans.some(e=>e.row===p.row&&e.colFrom<=n&&e.colTo>=n)}normalizeBounds(e,t,r){if(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this._wrap){const t=Object(i["e"])(this.tileInfo.spatialReference),n=-r*(t.valid[1]-t.valid[0]);e[0]+=n,e[2]+=n}return e}getSmallestInfoForScale(e){const t=this.scales;if(this._infoByScale[e])return this._infoByScale[e];if(e>t[0])return this._infoByScale[t[0]];for(let r=1;r<t.length-1;r++)if(e>t[r]+m)return this._infoByScale[t[r-1]];return this._infoByScale[t[t.length-1]]}getClosestInfoForScale(e){const t=this.scales;return this._infoByScale[e]||(e=t.reduce((t,r)=>Math.abs(r-e)<Math.abs(t-e)?r:t,t[0])),this._infoByScale[e]}scaleToLevel(e){const t=this.scales;if(this._infoByScale[e])return this._infoByScale[e].level;for(let r=t.length-1;r>=0;r--)if(e<t[r])return r===t.length-1?this._infoByScale[t[t.length-1]].level:this._infoByScale[t[r]].level+(t[r]-e)/(t[r]-t[r+1]);return this._infoByScale[t[0]].level}scaleToZoom(e){return this.tileInfo.scaleToZoom(e)}_getTileIdAtLOD(e,t,r){const i=this._infoByLevel[r.level];return e.set(r),t.resolution<i.resolution?null:(t.resolution===i.resolution||(e.level=t.level,e.col=Math.floor(r.col*i.resolution/t.resolution+.01),e.row=Math.floor(r.row*i.resolution/t.resolution+.01)),e)}}},"01f2":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return n}));var i=r("38a4");const n=(()=>{if(!("document"in globalThis))return()=>null;const e=document.createElement("canvas"),t=e.getContext("2d"),r=512;return e.height=r,e.width=1,r=>{t.clearRect(0,0,1,e.height);const i=t.createLinearGradient(0,0,0,e.height);for(const{ratio:e,color:t}of r)i.addColorStop(Math.max(e,.001),`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`);return t.fillStyle=i,t.fillRect(0,0,1,e.height),t.getImageData(0,0,1,e.height).data}})();function a(e,t,r,i){const{blurRadius:n,fieldOffset:a,field:s}=t,o=new Float64Array(r*i),u=c(n),d=Math.round(3*n);let h,p=Number.NEGATIVE_INFINITY;const f=l(s,a),b=new Set;for(const c of e){const e=c.getCursor();for(;e.next();){const t=e.getObjectId();if(b.has(t))continue;b.add(t);const n=e.readLegacyPointGeometry(),a=128;if(n.x<-a||n.x>=r+a||n.y<-a||n.y>i+a)continue;const s=+f(e),c=Math.round(n.x)-d,l=Math.round(n.y)-d,m=Math.max(0,c),g=Math.max(0,l),y=Math.min(i,Math.round(n.y)+d),O=Math.min(r,Math.round(n.x)+d);for(let e=g;e<y;e++){const t=u[e-l];for(let i=m;i<O;i++){const n=u[i-c];h=o[e*r+i]+=t*n*s,h>p&&(p=h)}}}}return{matrix:o.buffer,max:p}}function s(e,t,r,i,n,a){e.canvas.width=e.canvas.height=t,e.clearRect(0,0,t,t);const s=e.getImageData(0,0,t,t);r&&i&&s.data.set(new Uint8ClampedArray(o(t,r,i,n,a))),e.putImageData(s,0,0)}function o(e,t,r,n,a){const s=new Uint32Array(e*e),o="buffer"in t?t:new Float64Array(t),c="buffer"in r?new Uint32Array(r.buffer):new Uint32Array(new Uint8Array(r).buffer),l=c.length/(a-n);for(let u=0;u<o.length;u++){const e=o[u],t=Math.floor((e-n)*l);s[u]=c[Object(i["f"])(t,0,c.length-1)]}return s.buffer}function c(e){const t=Math.round(3*e),r=2*e*e,i=new Float64Array(2*t+1);for(let n=0;n<=i.length;n++)i[n]=Math.exp(-((n-t)**2)/r)/Math.sqrt(2*Math.PI)*(e/2);return i}function l(e,t){return null!=e?"string"==typeof t?t=>-1*+t.readAttribute(e):r=>+r.readAttribute(e)+t:e=>1}},"0224":function(e,t,r){"use strict";r.d(t,"a",(function(){return R}));var i=r("a4ee"),n=r("1325"),a=r("f7be"),s=r("2eab"),o=r("e20b"),c=r("ce50"),l=r("6a0ed"),u=r("6d5f"),d=r("e92d"),h=r("b2b2"),p=r("f4cc"),f=r("59b2"),b=(r("b50f"),r("c120"),r("cea0")),m=r("afcf"),g=r("d386"),y=r("3af1"),O=r("2035"),v=r("e9a4"),_=r("fc29");let j=class extends _["a"]{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};Object(i["a"])([Object(f["b"])()],j.prototype,"nextQueryParams",void 0),Object(i["a"])([Object(f["b"])()],j.prototype,"queryParams",void 0),Object(i["a"])([Object(f["b"])()],j.prototype,"results",void 0),Object(i["a"])([Object(f["b"])()],j.prototype,"total",void 0),j=Object(i["a"])([Object(g["a"])("esri.portal.PortalQueryResult")],j);const w=j;var x,T=r("8185"),S=r("8249");let E;const A={PortalGroup:()=>Promise.resolve().then(r.bind(null,"f1a4")),PortalItem:()=>Promise.resolve().then(r.bind(null,"a7e1")),PortalUser:()=>Promise.resolve().then(r.bind(null,"8185"))};let C=x=class extends(Object(l["b"])(u["a"])){constructor(e){super(e),this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=n["a"].portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)-1===n["a"].request.trustedServers.indexOf(t)&&n["a"].request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!e?" AND orgid:"+this.id:null}get isOrganization(){return!!this.access}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get stylesGroupQuery(){return Object(o["c"])(d["a"].getLogger(this.declaredClass),"stylesGroupQuery",{replacement:"stylesGroupQuery3d",version:"4.21"}),this.stylesGroupQuery3d}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=T["default"].fromJSON(e),t.portal=this),t}load(e){const t=Promise.resolve().then(r.bind(null,"619d")).then(({default:t})=>{Object(p["v"])(e),E=t}).then(()=>this.sourceJSON?this.sourceJSON:this._fetchSelf(this.authMode,!1,e)).then(e=>{if(a["b"]){const e=a["b"];this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==x.AUTH_MODE_AUTO||(this._esriId_credentialCreateHandle=e.on("credential-create",()=>{e.findCredential(this.restUrl)&&this._signIn()}))}this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}async createClosestFacilityTask(){Object(o["b"])(d["a"].getLogger(this.declaredClass),null,{replacement:"Use helperServices url with esri/rest/closestFacility",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("closestFacility");return new(0,(await r.e("chunk-89640008").then(r.bind(null,"b740"))).default)(e)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await r.e("chunk-15c3b8fe").then(r.bind(null,"f20e"))).default;return e?e.map(e=>new t({id:e.id,url:e.url})):[]}async createGeometryService(){Object(o["b"])(d["a"].getLogger(this.declaredClass),null,{replacement:"Use helperServices url with esri/rest/geometryService",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("geometry");return new(0,(await r.e("chunk-771a1f22").then(r.bind(null,"d44e9"))).default)({url:e})}async createPrintTask(){Object(o["b"])(d["a"].getLogger(this.declaredClass),null,{replacement:"Use helperServices url with esri/rest/print",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("printTask");return new(0,(await r.e("chunk-8ee3b352").then(r.bind(null,"f579"))).default)(e)}async createRouteTask(){Object(o["b"])(d["a"].getLogger(this.declaredClass),null,{replacement:"Use helperServices url with esri/rest/route",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("route");return new(0,(await r.e("chunk-7742c8bb").then(r.bind(null,"98bd"))).default)(e)}async createServiceAreaTask(){Object(o["b"])(d["a"].getLogger(this.declaredClass),null,{replacement:"Use helperServices url with esri/rest/serviceArea",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("serviceArea");return new(0,(await r.e("chunk-5b64ca30").then(r.bind(null,"2082"))).default)(e)}fetchBasemaps(e,t){const r=new v["a"];return r.query=e||(n["a"].apiKey&&Object(S["a"])(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,t).then(e=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',e.total){const i=e.results[0];return r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc",i.queryItems(r,t)}return null}).then(e=>{let t;return t=e&&e.total?e.results.filter(e=>"Web Map"===e.type).map(e=>new E({portalItem:e})):[],t})}fetchCategorySchema(e){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema",e).then(e=>e.categorySchema):Object(p["n"])(e)?Promise.reject(Object(p["e"])()):Promise.resolve([])}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new v["a"];if(r.num=100,r.sortField="title",t&&t.length){const i=[];for(const e of t)i.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=i.join(" OR "),this.queryGroups(r,e).then(e=>e.results)}return Object(p["n"])(e)?Promise.reject(Object(p["e"])()):Promise.resolve([])}fetchRegions(e){var t;const r=(null==(t=this.user)?void 0:t.culture)||this.culture||Object(O["b"])();return this._request(this.restUrl+"/portals/regions",{...e,query:{culture:r}})}fetchSettings(e){var t;const r=(null==(t=this.user)?void 0:t.culture)||this.culture||Object(O["b"])();return this._request(this.restUrl+"/portals/self/settings",{...e,query:{culture:r}})}static getDefault(){return x._default&&!x._default.destroyed||(x._default=new x),x._default}queryGroups(e,t){return this._queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this._queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this._queryPortal("/community/users",e,"PortalUser",t)}toJSON(){throw new c["a"]("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new x({sourceJSON:e})}_getHelperService(e){const t=this.helperServices&&this.helperServices[e];if(!t)throw new c["a"]("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}_getHelperServiceUrl(e){const t=this._getHelperService(e);if(!t.url)throw new c["a"]("portal:service-url-not-found",`The \`helperServices\` entry "${e}" does not include a \`url\` value`);return t.url}_fetchSelf(e=this.authMode,t=!1,r){const i=this.restUrl+"/portals/self",n={authMode:e,query:{culture:Object(O["b"])().toLowerCase()},...r};return"auto"===n.authMode&&(n.authMode="no-prompt"),t&&(n.query.default=!0),this._request(i,n)}_queryPortal(e,t,r,i){const n=Object(b["m"])(v["a"],t),a=t=>this._request(this.restUrl+e,{...n.toRequestOptions(this),...i}).then(e=>{const r=n.clone();return r.start=e.nextStart,new w({nextQueryParams:r,queryParams:n,total:e.total,results:x._resultsToTypedArray(t,{portal:this},e,i)})}).then(e=>Promise.all(e.results.map(t=>"function"==typeof t.when?t.when():e)).then(()=>e,t=>(Object(p["u"])(t),e)));return r&&A[r]?A[r]().then(({default:e})=>(Object(p["v"])(i),a(e))):a()}_signIn(){if(this.authMode===x.AUTH_MODE_ANONYMOUS)return Promise.reject(new c["a"]("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then(()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then(()=>null)):"loading"===this.loadStatus?this.load().then(()=>this.credential?null:(this.credential=e,this._fetchSelf("immediate"))):this.user&&this.credential===e?null:(this.credential=e,this._fetchSelf("immediate"))).then(e=>{e&&(this.sourceJSON=e,this.read(e))});return a["b"]?a["b"].getCredential(this.restUrl).then(t=>e(t)):e(this.credential)}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_normalizeUrl(e){const t=this.credential&&this.credential.token;return this._normalizeSSL(t?e+(e.indexOf("?")>-1?"&":"?")+"token="+t:e)}_requestToTypedArray(e,t,r){return this._request(e,t).then(e=>{const t=x._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map(t=>"function"==typeof t.when?t.when():e)).then(()=>t,()=>t)})}_readBasemap(e){if(e){const t=E.fromJSON(e);return t.portalItem={portal:this},t}return null}_request(e,t={}){const r={f:"json",...t.query},{authMode:i=(this.authMode===x.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:n=null,cacheBust:a=!1,method:o="auto",responseType:c="json",signal:l}=t,u={authMode:i,body:n,cacheBust:a,method:o,query:r,responseType:c,timeout:0,signal:l};return Object(s["default"])(this._normalizeSSL(e),u).then(e=>e.data)}static _resultsToTypedArray(e,t,r,i){let n;if(r){const a=Object(h["k"])(i)?i.signal:null;n=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(n=n.map(r=>{const i=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof i.load&&i.load(a),i}))}else n=[];return n}};C.AUTH_MODE_ANONYMOUS="anonymous",C.AUTH_MODE_AUTO="auto",C.AUTH_MODE_IMMEDIATE="immediate",Object(i["a"])([Object(f["b"])()],C.prototype,"access",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"allSSL",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"authMode",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"authorizedCrossOriginDomains",void 0),Object(i["a"])([Object(m["a"])("authorizedCrossOriginDomains")],C.prototype,"readAuthorizedCrossOriginDomains",null),Object(i["a"])([Object(f["b"])()],C.prototype,"basemapGalleryGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"bingKey",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canListApps",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canListData",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canListPreProvisionedItems",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canProvisionDirectPurchase",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canSearchPublic",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canShareBingPublic",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canSharePublic",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canSignInArcGIS",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"canSignInIDP",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"colorSetsGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"commentsEnabled",void 0),Object(i["a"])([Object(f["b"])({type:Date})],C.prototype,"created",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"credential",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"culture",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"currentVersion",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"customBaseUrl",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"defaultBasemap",void 0),Object(i["a"])([Object(m["a"])("defaultBasemap")],C.prototype,"readDefaultBasemap",null),Object(i["a"])([Object(f["b"])()],C.prototype,"defaultDevBasemap",void 0),Object(i["a"])([Object(m["a"])("defaultDevBasemap")],C.prototype,"readDefaultDevBasemap",null),Object(i["a"])([Object(f["b"])({type:y["a"]})],C.prototype,"defaultExtent",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"defaultVectorBasemap",void 0),Object(i["a"])([Object(m["a"])("defaultVectorBasemap")],C.prototype,"readDefaultVectorBasemap",null),Object(i["a"])([Object(f["b"])()],C.prototype,"description",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"devBasemapGalleryGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"eueiEnabled",void 0),Object(i["a"])([Object(f["b"])({readOnly:!0})],C.prototype,"extraQuery",null),Object(i["a"])([Object(f["b"])()],C.prototype,"featuredGroups",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"featuredItemsGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"galleryTemplatesGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"livingAtlasGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"hasCategorySchema",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"helpBase",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"helperServices",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"helpMap",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"homePageFeaturedContent",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"homePageFeaturedContentCount",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"httpPort",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"httpsPort",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"id",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"ipCntryCode",void 0),Object(i["a"])([Object(f["b"])({readOnly:!0})],C.prototype,"isOrganization",null),Object(i["a"])([Object(f["b"])()],C.prototype,"isPortal",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"isReadOnly",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"layerTemplatesGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"maxTokenExpirationMinutes",void 0),Object(i["a"])([Object(f["b"])({type:Date})],C.prototype,"modified",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"name",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"portalHostname",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"portalMode",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"portalProperties",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"region",void 0),Object(i["a"])([Object(f["b"])({readOnly:!0})],C.prototype,"restUrl",null),Object(i["a"])([Object(f["b"])()],C.prototype,"rotatorPanels",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"showHomePageDescription",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"sourceJSON",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"staticImagesUrl",void 0),Object(i["a"])([Object(f["b"])({readOnly:!0,json:{read:!1}})],C.prototype,"stylesGroupQuery",null),Object(i["a"])([Object(f["b"])({json:{name:"2DStylesGroupQuery"}})],C.prototype,"stylesGroupQuery2d",void 0),Object(i["a"])([Object(f["b"])({json:{name:"stylesGroupQuery"}})],C.prototype,"stylesGroupQuery3d",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"supportsHostedServices",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"symbolSetsGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"templatesGroupQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"thumbnail",void 0),Object(i["a"])([Object(f["b"])({readOnly:!0})],C.prototype,"thumbnailUrl",null),Object(i["a"])([Object(f["b"])()],C.prototype,"units",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"url",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"urlKey",void 0),Object(i["a"])([Object(m["a"])("urlKey")],C.prototype,"readUrlKey",null),Object(i["a"])([Object(f["b"])()],C.prototype,"user",void 0),Object(i["a"])([Object(m["a"])("user")],C.prototype,"readUser",null),Object(i["a"])([Object(f["b"])()],C.prototype,"useStandardizedQuery",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"useVectorBasemaps",void 0),Object(i["a"])([Object(f["b"])()],C.prototype,"vectorBasemapGalleryGroupQuery",void 0),C=x=Object(i["a"])([Object(g["a"])("esri.portal.Portal")],C);const R=C},"0278":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("b2b2"),n=r("b7c2"),a=r("b616"),s=r("003f"),o=r("2765"),c=r("1038"),l=r("1153"),u=r("b7bd");class d extends s["a"]{constructor(e,t=[],r=n["h"].Triangle,i=-1){super(),this._primitiveType=r,this.edgeIndicesLength=i,this.type=o["a"].Geometry,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[n,a]of e)a&&this._vertexAttributes.set(n,{...a});if(null==t||0===t.length){const e=h(this._vertexAttributes),t=Object(c["d"])(e);this.edgeIndicesLength=this.edgeIndicesLength<0?e:this.edgeIndicesLength;for(const r of this._vertexAttributes.keys())this._indices.set(r,t)}else for(const[n,a]of t)a&&(this._indices.set(n,p(a)),n===u["a"].POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(n).length:this.edgeIndicesLength))}cloneShallow(){const e=new d([],void 0,this._primitiveType,void 0),{_vertexAttributes:t,_indices:r}=e;return this._vertexAttributes.forEach((e,r)=>{t.set(r,e)}),this._indices.forEach((e,t)=>{r.set(t,e)}),e.screenToWorldRatio=this.screenToWorldRatio,e._boundingInfo=this._boundingInfo,e}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(e){const t=this._vertexAttributes.get(e);return t&&!t.exclusive&&(t.data=Array.from(t.data),t.exclusive=!0),t}get indices(){return this._indices}get indexCount(){const e=this._indices.values().next().value;return e?e.length:0}get primitiveType(){return this._primitiveType}get faceCount(){return this.indexCount/3}get boundingInfo(){return Object(i["j"])(this._boundingInfo)&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return this.primitiveType===n["h"].Triangle?this._computeAttachmentOriginTriangles(e):this._computeAttachmentOriginPoints(e)}_computeAttachmentOriginTriangles(e){const t=this.indices.get(u["a"].POSITION),r=this.vertexAttributes.get(u["a"].POSITION);return Object(c["c"])(r,t,e)}_computeAttachmentOriginPoints(e){const t=this.indices.get(u["a"].POSITION),r=this.vertexAttributes.get(u["a"].POSITION);return Object(c["b"])(r,t,e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.indices.get(u["a"].POSITION);if(0===e.length)return null;const t=this.primitiveType===n["h"].Triangle?3:1;Object(l["a"])(e.length%t==0,"Indexing error: "+e.length+" not divisible by "+t);const r=Object(c["d"])(e.length/t),i=this.vertexAttributes.get(u["a"].POSITION);return new a["a"](r,t,e,i)}}function h(e){const t=e.values().next().value;return null==t?0:t.data.length/t.size}function p(e){if(e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT)return e;for(const t of e)if(t>=65536)return e;return new Uint16Array(e)}},"02f1":function(e,t,r){"use strict";function i(){return[0,0]}function n(e){return[e[0],e[1]]}function a(e,t){return[e,t]}function s(e){const t=i(),r=Math.min(2,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function o(e,t){return new Float64Array(e,t,2)}function c(){return i()}function l(){return a(1,1)}function u(){return a(1,0)}function d(){return a(0,1)}r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return a}));const h=c(),p=l(),f=u(),b=d();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,fromArray:s,createView:o,zeros:c,ones:l,unitX:u,unitY:d,ZEROS:h,ONES:p,UNIT_X:f,UNIT_Y:b})},"0310":function(e,t,r){"use strict";r.d(t,"a",(function(){return L})),r.d(t,"b",(function(){return D}));var i=r("3c9c"),n=r("bd75"),a=r("17ca"),s=r("a05b"),o=r("d272"),c=r("4db9"),l=r("d539"),u=r("c332"),d=r("b09a"),h=r("6cb2"),p=r("dfaf"),f=r("6d5b"),b=r("7d11"),m=r("17b0"),g=r("7e21"),y=r("d047"),O=r("0d7a"),v=r("7088"),_=r("ea4b"),j=r("c6d7"),w=r("aab5"),x=r("5d5f"),T=r("a7d7"),S=r("d017"),E=r("be24"),A=r("ebd5"),C=r("d56e"),R=r("3626"),M=r("3886"),P=r("690a"),I=r("b7bd");function D(e){const t=new P["a"],r=t.vertex.code,D=t.fragment.code;t.include(C["a"],{name:"Default Material Shader",output:e.output}),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("cameraPosition","vec3").add("localOrigin","vec3");const L=e.hasModelTransformation;return L&&t.vertex.uniforms.add("model","mat4"),t.include(d["a"]),t.varyings.add("vpos","vec3"),t.include(E["a"],e),t.include(l["a"],e),t.include(m["a"],e),e.output!==s["a"].Color&&e.output!==s["a"].Alpha||(t.include(u["a"],e),t.include(c["a"],{linearDepth:!1,hasModelTransformation:L}),e.normalType===u["b"].Attribute&&e.offsetBackfaces&&t.include(a["a"]),t.include(O["a"],e),t.include(b["a"],e),e.instancedColor&&t.attributes.add(I["a"].INSTANCECOLOR,"vec4"),t.varyings.add("localvpos","vec3"),t.include(p["a"],e),t.include(n["a"],e),t.include(h["a"],e),t.include(f["a"],e),t.vertex.uniforms.add("externalColor","vec4"),t.varyings.add("vcolorExt","vec4"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),r.add(M["a"]`
  2. void main(void) {
  3. forwardNormalizedVertexColor();
  4. vcolorExt = externalColor;
  5. ${e.instancedColor?"vcolorExt *= instanceColor;":""}
  6. vcolorExt *= vvColor();
  7. vcolorExt *= getSymbolColor();
  8. forwardColorMixMode();
  9. if (vcolorExt.a < ${M["a"].float(A["c"])}) {
  10. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  11. }
  12. else {
  13. vpos = calculateVPos();
  14. localvpos = vpos - view[3].xyz;
  15. vpos = subtractOrigin(vpos);
  16. ${e.normalType===u["b"].Attribute?M["a"]`
  17. vNormalWorld = dpNormal(vvLocalNormal(normalModel()));`:""}
  18. vpos = addVerticalOffset(vpos, localOrigin);
  19. ${e.vertexTangents?"vTangent = dpTransformVertexTangent(tangent);":""}
  20. gl_Position = transformPosition(proj, view, ${L?"model,":""} vpos);
  21. ${e.normalType===u["b"].Attribute&&e.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""}
  22. }
  23. ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
  24. forwardLinearDepth();
  25. forwardTextureCoordinates();
  26. }
  27. `)),e.output===s["a"].Alpha&&(t.include(o["a"],e),t.include(A["a"],e),e.multipassTerrainEnabled&&(t.fragment.include(y["a"]),t.include(j["b"],e)),t.fragment.uniforms.add("cameraPosition","vec3").add("localOrigin","vec3").add("opacity","float").add("layerOpacity","float"),e.hasColorTexture&&t.fragment.uniforms.add("tex","sampler2D"),t.fragment.include(R["a"]),D.add(M["a"]`
  28. void main() {
  29. discardBySlice(vpos);
  30. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  31. ${e.hasColorTexture?M["a"]`
  32. vec4 texColor = texture2D(tex, vuv0);
  33. ${e.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
  34. discardOrAdjustAlpha(texColor);`:M["a"]`vec4 texColor = vec4(1.0);`}
  35. ${e.attributeColor?M["a"]`
  36. float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:M["a"]`
  37. float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));
  38. `}
  39. gl_FragColor = vec4(opacity_);
  40. }
  41. `)),e.output===s["a"].Color&&(t.include(o["a"],e),t.include(_["a"],e),t.include(v["a"],e),t.include(A["a"],e),e.receiveShadows&&t.include(S["a"],e),e.multipassTerrainEnabled&&(t.fragment.include(y["a"]),t.include(j["b"],e)),t.fragment.uniforms.add("cameraPosition","vec3").add("localOrigin","vec3").add("ambient","vec3").add("diffuse","vec3").add("opacity","float").add("layerOpacity","float"),e.hasColorTexture&&t.fragment.uniforms.add("tex","sampler2D"),t.include(T["c"],e),t.include(x["a"],e),t.fragment.include(R["a"]),t.include(w["a"],e),D.add(M["a"]`
  42. void main() {
  43. discardBySlice(vpos);
  44. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  45. ${e.hasColorTexture?M["a"]`
  46. vec4 texColor = texture2D(tex, vuv0);
  47. ${e.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
  48. discardOrAdjustAlpha(texColor);`:M["a"]`vec4 texColor = vec4(1.0);`}
  49. shadingParams.viewDirection = normalize(vpos - cameraPosition);
  50. ${e.normalType===u["b"].ScreenDerivative?M["a"]`
  51. vec3 normal = screenDerivativeNormal(localvpos);`:M["a"]`
  52. shadingParams.normalView = vNormalWorld;
  53. vec3 normal = shadingNormal(shadingParams);`}
  54. ${e.pbrMode===T["a"].Normal?"applyPBRFactors();":""}
  55. float ssao = evaluateAmbientOcclusionInverse();
  56. ssao *= getBakedOcclusion();
  57. float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
  58. vec3 additionalLight = ssao * lightingMainIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
  59. ${e.receiveShadows?"float shadow = readShadowMap(vpos, linearDepth);":e.viewingMode===i["a"].Global?"float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);":"float shadow = 0.0;"}
  60. vec3 matColor = max(ambient, diffuse);
  61. ${e.attributeColor?M["a"]`
  62. vec3 albedo_ = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
  63. float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:M["a"]`
  64. vec3 albedo_ = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
  65. float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));
  66. `}
  67. ${e.hasNormalTexture?M["a"]`
  68. mat3 tangentSpace = ${e.vertexTangents?"computeTangentSpace(normal);":"computeTangentSpace(normal, vpos, vuv0);"}
  69. vec3 shadedNormal = computeTextureNormal(tangentSpace, vuv0);`:"vec3 shadedNormal = normal;"}
  70. ${e.pbrMode===T["a"].Normal||e.pbrMode===T["a"].Schematic?e.viewingMode===i["a"].Global?M["a"]`vec3 normalGround = normalize(vpos + localOrigin);`:M["a"]`vec3 normalGround = vec3(0.0, 0.0, 1.0);`:M["a"]``}
  71. ${e.pbrMode===T["a"].Normal||e.pbrMode===T["a"].Schematic?M["a"]`
  72. float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * lightingMainIntensity[2];
  73. vec3 shadedColor = evaluateSceneLightingPBR(shadedNormal, albedo_, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:"vec3 shadedColor = evaluateSceneLighting(shadedNormal, albedo_, shadow, 1.0 - ssao, additionalLight);"}
  74. gl_FragColor = highlightSlice(vec4(shadedColor, opacity_), vpos);
  75. ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  76. }
  77. `)),t.include(g["a"],e),t}const L=Object.freeze({__proto__:null,build:D})},"0386":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.CGCS2000=4490]="CGCS2000",e[e.GCSMARS2000=104971]="GCSMARS2000",e[e.GCSMARS2000_SPHERE=104905]="GCSMARS2000_SPHERE",e[e.GCSMOON2000=104903]="GCSMOON2000"}(i||(i={}))},"040b":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3c9c"),n=r("3886");function a(e,t){t.viewingMode===i["a"].Global?e.vertex.code.add(n["a"]`vec3 getLocalUp(in vec3 pos, in vec3 origin) {
  78. return normalize(pos + origin);
  79. }`):e.vertex.code.add(n["a"]`vec3 getLocalUp(in vec3 pos, in vec3 origin) {
  80. return vec3(0.0, 0.0, 1.0);
  81. }`),t.viewingMode===i["a"].Global?e.vertex.code.add(n["a"]`mat3 getTBNMatrix(in vec3 n) {
  82. vec3 t = normalize(cross(vec3(0.0, 0.0, 1.0), n));
  83. vec3 b = normalize(cross(n, t));
  84. return mat3(t, b, n);
  85. }`):e.vertex.code.add(n["a"]`mat3 getTBNMatrix(in vec3 n) {
  86. vec3 t = vec3(1.0, 0.0, 0.0);
  87. vec3 b = normalize(cross(n, t));
  88. return mat3(t, b, n);
  89. }`)}},"0480":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var i=r("8190"),n=r("fc00");function a(e,t){return t.push(e.buffer),{buffer:e.buffer,layout:o(e.layout)}}function s(e){return c(e.layout).createView(e.buffer)}function o(e){const t=new Array;return e.fields.forEach((e,r)=>{const i={...e,constructor:u(e.constructor)};t.push([r,i])}),{stride:e.stride,fields:t,fieldNames:e.fieldNames}}function c(e){const t=Object(n["a"])();return t.stride=e.stride,t.fieldNames=e.fieldNames,e.fields.forEach(e=>t.fields.set(e[0],{...e[1],constructor:d(e[1].constructor)})),t}const l=[i["a"],i["m"],i["u"],i["C"],i["f"],i["h"],i["b"],i["n"],i["v"],i["D"],i["g"],i["i"],i["l"],i["t"],i["B"],i["J"],i["j"],i["r"],i["z"],i["H"],i["k"],i["s"],i["A"],i["I"],i["e"],i["q"],i["y"],i["G"],i["c"],i["o"],i["w"],i["E"],i["d"],i["p"],i["x"],i["F"]];function u(e){return`${e.ElementType}_${e.ElementCount}`}function d(e){return h.get(e)}const h=new Map;l.forEach(e=>h.set(u(e),e))},"0494":function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l}));var i=r("38a4"),n=r("b2b2"),a=r("6611");class s{constructor(e,t,r,i=2048){this.text=e,this._alignment=t,this._parameters=r,this.maxSize=i,this._textWidths=[],this._lineWidths=[],this._renderPixelRatio=null,this._displayWidth=null,this._heightMetrics=null,this.key=`TextRenderer-${this._parameters.key}-${this._alignment}--${e}`,this._lines=e.split(/\r?\n/)}get displayWidth(){return Math.ceil(this._ensureTextWidth()+2*this.backgroundHorizontalPadding)}get displayHeight(){const e=this.lineSpacing*(this._lines.length-1),t=this.lineHeight;return Math.ceil(e+t+2*this.haloSize+this.backgroundTopPadding+this.backgroundBottomPadding)}get renderedWidth(){return Math.ceil(this._toRenderUnit(this.displayWidth))}get renderedHeight(){return Math.ceil(this._toRenderUnit(this.displayHeight))}get firstRenderedBaselinePosition(){return this._toRenderUnit(this.firstLineYOffset+this.baselinePosition)}get firstLineYOffset(){return this.backgroundTopPadding+this.haloSize}get heightMetrics(){return this._ensureHeightMetrics()}get lineSpacing(){return(this.lineHeight+this.linePadding)*this._parameters.definition.lineSpacingFactor}get lineHeight(){return this.heightMetrics.lineHeight}get linePadding(){return this.lineHeight*d}get baselinePosition(){return this.heightMetrics.baselinePosition}get renderedFontSize(){return this._toRenderUnit(this.fontSize)}get fontSize(){return this._parameters.definition.size}get renderedHaloSize(){return this._toRenderUnit(this.haloSize)}get haloSize(){return this._parameters.haloSize}get backgroundHorizontalPadding(){return this.hasBackground?this._parameters.definition.background.padding[0]:0}get backgroundVerticalPadding(){return this.hasBackground?this._parameters.definition.background.padding[1]:0}get backgroundTopPadding(){return Math.max(0,this.backgroundVerticalPadding-this.heightMetrics.paddingTop)}get backgroundBottomPadding(){return Math.max(0,this.backgroundVerticalPadding-this.heightMetrics.paddingBottom)}get hasBackground(){return!!this._parameters.backgroundStyle}get renderPixelRatio(){if(Object(n["j"])(this._renderPixelRatio)){const e=this._parameters.definition.pixelRatio;this.maxSize>0?this._renderPixelRatio=Math.min(e,Math.min(this.maxSize/this.displayWidth,this.maxSize/this.displayHeight)):this._renderPixelRatio=e}return this._renderPixelRatio}_getLineXOffset(e){switch(this._alignment){case c.Left:return this.backgroundHorizontalPadding;case c.Center:return(this.displayWidth-this._lineWidths[e])/2;case c.Right:return this.displayWidth-this.backgroundHorizontalPadding-this._lineWidths[e]}}render(e,t=0,r=0){e.save();const i=t/=this.renderPixelRatio,n=r/=this.renderPixelRatio,s=this.haloSize,o=this.firstLineYOffset;t+=s,r+=o+this.baselinePosition;const c=this.haloSize>0;c&&this._renderHalo(e,i,n,s,o),this._setFontProperties(e,this.renderedFontSize);for(let a=0;a<this._lines.length;++a){const i=this._lines[a],n=this._getLineXOffset(a);c&&(e.globalCompositeOperation="destination-out",e.fillStyle="rgb(0, 0, 0)",this._fillText(e,i,t+n,r),this._renderLineDecoration(e,t+n,r,this._textWidths[a])),e.globalCompositeOperation="source-over",e.fillStyle=this._parameters.textStyle,this._fillText(e,i,t+this._getLineXOffset(a),r),this._renderLineDecoration(e,t+n,r,this._textWidths[a]),r+=this.lineSpacing}if(a["a"].TEXT_SHOW_BASELINE){e.strokeStyle=p,e.setLineDash([2,2]),e.lineWidth=1;let t=n+o;for(let r=0;r<this._lines.length;++r){const r=t+this.baselinePosition;this._drawLine(e,[i,r],[i+this.displayWidth,r]),t+=this.lineSpacing}}if(a["a"].TEXT_SHOW_BORDER&&(e.strokeStyle=p,e.setLineDash([]),e.lineWidth=1,this._drawBox(e,[i,n],[this.displayWidth,this.displayHeight])),this.hasBackground){const t=this._parameters.definition.background.borderRadius*this.renderPixelRatio;this._roundedRect(e,i,n,t),e.globalCompositeOperation="destination-over",e.fillStyle=this._parameters.backgroundStyle,e.fill()}e.restore()}_renderLineDecoration(e,t,r,i,n=!1){if("none"===this._parameters.definition.font.decoration||0===i)return;const a=1,s=Math.max(this._parameters.definition.size/16,a);switch(this._parameters.definition.font.decoration){case"underline":r+=2*s;break;case"line-through":r-=.33*this.baselinePosition}const o=n?this.haloSize:0;e.strokeStyle=n?this._parameters.haloStyle:this._parameters.textStyle,e.lineWidth=this._toRenderUnit(s+2*o),e.beginPath(),e.moveTo(this._toRenderUnit(t-o),this._toRenderUnit(r)),e.lineTo(this._toRenderUnit(t+i+o),this._toRenderUnit(r)),e.stroke()}_roundedRect(e,t,r,n){t=this._toRenderUnit(t),r=this._toRenderUnit(r);const a=this.renderedWidth,s=this.renderedHeight;0!==n?(n=Object(i["f"])(n,0,Math.floor(s/2)),e.beginPath(),e.moveTo(t,r+n),e.arcTo(t,r,t+n,r,n),e.lineTo(t+a-n,r),e.arcTo(t+a,r,t+a,r+n,n),e.lineTo(t+a,r+s-n),e.arcTo(t+a,r+s,t+a-n,r+s,n),e.lineTo(t+n,r+s),e.arcTo(t,r+s,t,r+s-n,n),e.closePath()):e.rect(t,r,a,s)}_renderHalo(e,t,r,i,n){const a=this.renderedWidth,s=this.renderedHeight,o=l(u,Math.max(a,h),Math.max(s,h)),c=o.getContext("2d");c.clearRect(0,0,a,s),this._setFontProperties(c,this.renderedFontSize),c.fillStyle=this._parameters.haloStyle,c.strokeStyle=this._parameters.haloStyle;const d=this.renderedHaloSize<3;c.lineJoin=d?"miter":"round",d?this._renderHaloEmulated(c,i,n):this._renderHaloNative(c,i,n);let p=n+this.baselinePosition;for(let l=0;l<this._lines.length;++l){const e=this._getLineXOffset(l);this._renderLineDecoration(c,i+e,p,this._textWidths[l],!0),p+=this.lineSpacing}e.globalAlpha=this._parameters.definition.halo.color[3],e.drawImage(o,0,0,a,s,this._toRenderUnit(t),this._toRenderUnit(r),a,s),e.globalAlpha=1}_renderHaloEmulated(e,t,r){r+=this.baselinePosition;for(let i=0;i<this._lines.length;++i){const n=this._lines[i],a=this._getLineXOffset(i);for(const[i,s]of o)this._fillText(e,n,t+a+this.haloSize*i,r+this.haloSize*s);r+=this.lineSpacing}}_renderHaloNative(e,t,r){const i=2*this.haloSize;r+=this.baselinePosition;for(let n=0;n<this._lines.length;++n){const a=this._lines[n],s=this._getLineXOffset(n),o=5,c=.1;for(let n=0;n<o;n++){const l=1-(o-1)*c+n*c;e.lineWidth=this._toRenderUnit(l*i),this._strokeText(e,a,t+s,r)}r+=this.lineSpacing}}_setFontProperties(e,t){e.font=this._parameters.fontString(t),e.textAlign="left",e.textBaseline="alphabetic"}_ensureTextWidth(){if(Object(n["k"])(this._displayWidth))return this._displayWidth;const e=l(u,h,h).getContext("2d");this._setFontProperties(e,this.fontSize);let t=2*this.haloSize;const r=this._parameters.definition.font;"italic"!==r.style&&"oblique"!==r.style&&"bold"!==r.weight&&"bolder"!==r.weight||(t+=.3*e.measureText("A").width),this._textWidths.length=0,this._lineWidths.length=0;let i=0;for(const n of this._lines){const r=e.measureText(n).width,a=r+t;this._textWidths.push(r),this._lineWidths.push(a),i=Math.max(i,a)}return this._displayWidth=i,this._displayWidth}_ensureHeightMetrics(){if(Object(n["j"])(this._heightMetrics)){const e=l(u,h,h).getContext("2d");this._setFontProperties(e,this.fontSize);const t=e.measureText(this.text+f),r=this.hasBackground?e.measureText(this._lines[0]):t,i=1===this._lines.length?r:this.hasBackground?e.measureText(this._lines[this._lines.length-1]):t,n=t.actualBoundingBoxAscent+t.actualBoundingBoxDescent;this._heightMetrics={paddingTop:t.actualBoundingBoxAscent-r.actualBoundingBoxAscent,paddingBottom:t.actualBoundingBoxDescent-i.actualBoundingBoxDescent,lineHeight:n,baselinePosition:t.actualBoundingBoxAscent}}return this._heightMetrics}_toRenderUnit(e){return e*this.renderPixelRatio}_toRoundedRenderUnit(e){return Math.round(e*this.renderPixelRatio)}_fillText(e,t,r,i){e.fillText(t,this._toRenderUnit(r),this._toRenderUnit(i))}_strokeText(e,t,r,i){e.strokeText(t,this._toRenderUnit(r),this._toRenderUnit(i))}_drawLine(e,t,r){e.beginPath(),e.moveTo(this._toRoundedRenderUnit(t[0])+.5,this._toRoundedRenderUnit(t[1])+.5),e.lineTo(this._toRoundedRenderUnit(r[0])+.5,this._toRoundedRenderUnit(r[1])+.5),e.stroke()}_drawBox(e,t,r){const i=this._toRenderUnit(t[0]),n=this._toRenderUnit(t[1]),a=this._toRenderUnit(r[0]),s=this._toRenderUnit(r[1]),o=Math.floor(i)+.5,c=Math.ceil(i+a)-.5,l=Math.floor(n)+.5,u=Math.ceil(n+s)-.5;e.beginPath(),e.moveTo(o,l),e.lineTo(c,l),e.lineTo(c,u),e.lineTo(o,u),e.lineTo(o,l),e.stroke()}}const o=[];{const e=16;for(let t=0;t<360;t+=360/e)o.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var c;function l(e,t,r){return e.canvas||(e.canvas=document.createElement("canvas")),e.canvas.width=t,e.canvas.height=r,e.canvas}!function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"}(c||(c={}));const u={canvas:null},d=.2,h=512,p="rgb(255, 0, 255, 0.5)",f=(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t);return e})()},"04f0":function(e,t,r){"use strict";r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return N})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return k})),r.d(t,"h",(function(){return u}));var i=r("dae5"),n=r("b139"),a=r("0b2d"),s=r("4212"),o=r("e431"),c=r("7577");function l(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function d(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>s["a"]?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function h(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=r[0],c=r[1],l=r[2],u=r[3];return e[0]=i*u+s*o+n*l-a*c,e[1]=n*u+s*c+a*o-i*l,e[2]=a*u+s*l+i*c-n*o,e[3]=s*u-i*o-n*c-a*l,e}function p(e,t,r){r*=.5;const i=t[0],n=t[1],a=t[2],s=t[3],o=Math.sin(r),c=Math.cos(r);return e[0]=i*c+s*o,e[1]=n*c+a*o,e[2]=a*c-n*o,e[3]=s*c-i*o,e}function f(e,t,r){r*=.5;const i=t[0],n=t[1],a=t[2],s=t[3],o=Math.sin(r),c=Math.cos(r);return e[0]=i*c-a*o,e[1]=n*c+s*o,e[2]=a*c+i*o,e[3]=s*c-n*o,e}function b(e,t,r){r*=.5;const i=t[0],n=t[1],a=t[2],s=t[3],o=Math.sin(r),c=Math.cos(r);return e[0]=i*c+n*o,e[1]=n*c-i*o,e[2]=a*c+s*o,e[3]=s*c-a*o,e}function m(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e}function g(e,t,r,i){const n=t[0],a=t[1],o=t[2],c=t[3];let l,u,d,h,p,f=r[0],b=r[1],m=r[2],g=r[3];return u=n*f+a*b+o*m+c*g,u<0&&(u=-u,f=-f,b=-b,m=-m,g=-g),1-u>s["a"]?(l=Math.acos(u),d=Math.sin(l),h=Math.sin((1-i)*l)/d,p=Math.sin(i*l)/d):(h=1-i,p=i),e[0]=h*n+p*f,e[1]=h*a+p*b,e[2]=h*o+p*m,e[3]=h*c+p*g,e}function y(e){const t=Object(s["b"])(),r=Object(s["b"])(),i=Object(s["b"])(),n=Math.sqrt(1-t),a=Math.sqrt(t);return e[0]=n*Math.sin(2*Math.PI*r),e[1]=n*Math.cos(2*Math.PI*r),e[2]=a*Math.sin(2*Math.PI*i),e[3]=a*Math.cos(2*Math.PI*i),e}function O(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=r*r+i*i+n*n+a*a,o=s?1/s:0;return e[0]=-r*o,e[1]=-i*o,e[2]=-n*o,e[3]=a*o,e}function v(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function _(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,a=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*a+a]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+a]-t[3*a+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[a]=(t[3*a+r]+t[3*r+a])*i}return e}function j(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const a=Math.sin(t),s=Math.cos(t),o=Math.sin(r),c=Math.cos(r),l=Math.sin(i),u=Math.cos(i);return e[0]=a*c*u-s*o*l,e[1]=s*o*u+a*c*l,e[2]=s*c*l-a*o*u,e[3]=s*c*u+a*o*l,e}function w(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}const x=c["c"],T=c["l"],S=c["a"],E=h,A=c["b"],C=c["d"],R=c["j"],M=c["e"],P=M,I=c["f"],D=I,L=c["k"],N=c["g"],F=c["h"];function k(e,t,r){const i=Object(o["j"])(t,r);return i<-.999999?(Object(o["i"])(U,z,t),Object(o["A"])(U)<1e-6&&Object(o["i"])(U,B,t),Object(o["t"])(U,U),u(e,U,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(Object(o["i"])(U,t,r),e[0]=U[0],e[1]=U[1],e[2]=U[2],e[3]=1+i,L(e,e))}const U=Object(a["f"])(),z=Object(a["h"])(1,0,0),B=Object(a["h"])(0,1,0);function V(e,t,r,i,n,a){return g(G,t,n,a),g(H,r,i,a),g(e,G,H,2*a*(1-a)),e}const G=Object(n["b"])(),H=Object(n["b"])();function q(e,t,r,i){const n=W;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],L(e,_(e,n))}const W=Object(i["b"])();Object.freeze({__proto__:null,identity:l,setAxisAngle:u,getAxisAngle:d,multiply:h,rotateX:p,rotateY:f,rotateZ:b,calculateW:m,slerp:g,random:y,invert:O,conjugate:v,fromMat3:_,fromEuler:j,str:w,copy:x,set:T,add:S,mul:E,scale:A,dot:C,lerp:R,length:M,len:P,squaredLength:I,sqrLen:D,normalize:L,exactEquals:N,equals:F,rotationTo:k,sqlerp:V,setAxes:q})},"0554":function(e,t,r){"use strict";function i(e,t,r,i){const n=3*e,a=3*(r-e)-n,s=1-n-a,o=3*t,c=3*(i-t)-o,l=1-o-c;function u(e){return((s*e+a)*e+n)*e}function d(e){return((l*e+c)*e+o)*e}function h(e){return(3*s*e+2*a)*e+n}function p(e,t){let r,i,n,a,s,o;for(n=e,o=0;o<8;o++){if(a=u(n)-e,Math.abs(a)<t)return n;if(s=h(n),Math.abs(s)<1e-6)break;n-=a/s}if(r=0,i=1,n=e,n<r)return r;if(n>i)return i;for(;r<i;){if(a=u(n),Math.abs(a-e)<t)return n;e>a?r=n:i=n,n=.5*(i-r)+r}return n}return function(e,t=1e-6){return d(p(e,t))}}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return i}));const n=/^cubic-bezier\((.*)\)/,a={};function s(e){let t=a[e]||null;if(!t){const r=n.exec(e);if(r){const e=r[1].split(",").map(e=>parseFloat(e.trim()));4!==e.length||e.some(e=>isNaN(e))||(t=i.apply(i,e))}}return t}a.ease=i(.25,.1,.25,1),a.linear=i(0,0,1,1),a.easeIn=a["ease-in"]=i(.42,0,1,1),a.easeOut=a["ease-out"]=i(0,0,.58,1),a.easeInOut=a["ease-in-out"]=i(.42,0,.58,1)},"05b7":function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i,n=r("ecc1"),a=r("a4ee"),s=r("4856"),o=r("1fd7"),c=r("6a0ed"),l=r("7ffa"),u=r("a915"),d=r("59b2"),h=(r("cea0"),r("d386"));r("b50f"),r("c120");let p=i=class extends c["a"]{constructor(){super(...arguments),this.statisticType=null,this.onStatisticField=null,this.onStatisticValueExpression=null}clone(){return new i({statisticType:this.statisticType,onStatisticField:this.onStatisticField,onStatisticValueExpression:this.onStatisticValueExpression})}};Object(a["a"])([Object(d["b"])({type:String,json:{write:!0}})],p.prototype,"statisticType",void 0),Object(a["a"])([Object(d["b"])({type:String,json:{write:!0}})],p.prototype,"onStatisticField",void 0),Object(a["a"])([Object(d["b"])({type:String,json:{write:!0}})],p.prototype,"onStatisticValueExpression",void 0),p=i=Object(a["a"])([Object(h["a"])("esri.layers.support.OutStatistic")],p);const f=p;var b;let m=b=class extends c["a"]{constructor(){super(...arguments),this.name=null}clone(){return new b({name:this.name,outStatistic:this.outStatistic.clone()})}};Object(a["a"])([Object(d["b"])({type:String,json:{write:!0}})],m.prototype,"name",void 0),Object(a["a"])([Object(d["b"])({type:f,json:{write:!0}})],m.prototype,"outStatistic",void 0),m=b=Object(a["a"])([Object(h["a"])("esri.layers.support.AggregateField")],m);const g=m;var y,O=r("22f4"),v=r("c246");let _=y=class extends c["a"]{constructor(e){super(e),this.type="cluster",this.clusterRadius=Object(u["j"])("80px"),this.clusterMinSize=Object(u["j"])("12px"),this.clusterMaxSize=Object(u["j"])("50px"),this.popupEnabled=!0,this.popupTemplate=null,this.symbol=null,this.labelingInfo=null,this.labelsVisible=!0,this.fields=null}clone(){return new y({clusterRadius:this.clusterRadius,clusterMinSize:this.clusterMinSize,clusterMaxSize:this.clusterMaxSize,labelingInfo:Object(l["a"])(this.labelingInfo),labelsVisible:this.labelsVisible,fields:Object(l["a"])(this.fields),popupEnabled:this.popupEnabled,popupTemplate:Object(l["a"])(this.popupTemplate)})}};Object(a["a"])([Object(d["b"])({type:["cluster"],readOnly:!0,json:{write:!0}})],_.prototype,"type",void 0),Object(a["a"])([Object(d["b"])({type:Number,cast:e=>"auto"===e?e:Object(u["j"])(e),json:{write:!0}})],_.prototype,"clusterRadius",void 0),Object(a["a"])([Object(d["b"])({type:Number,cast:u["j"],json:{write:!0}})],_.prototype,"clusterMinSize",void 0),Object(a["a"])([Object(d["b"])({type:Number,cast:u["j"],json:{write:!0}})],_.prototype,"clusterMaxSize",void 0),Object(a["a"])([Object(d["b"])(O["j"])],_.prototype,"popupEnabled",void 0),Object(a["a"])([Object(d["b"])({type:s["a"],json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],_.prototype,"popupTemplate",void 0),Object(a["a"])([Object(d["b"])({types:o["f"]})],_.prototype,"symbol",void 0),Object(a["a"])([Object(d["b"])({type:[v["a"]],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],_.prototype,"labelingInfo",void 0),Object(a["a"])([Object(d["b"])(O["d"])],_.prototype,"labelsVisible",void 0),Object(a["a"])([Object(d["b"])({type:[g],json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})],_.prototype,"fields",void 0),_=y=Object(a["a"])([Object(h["a"])("esri.layers.support.FeatureReductionCluster")],_);const j=_;var w=r("91b0c");const x={types:{key:"type",base:n["a"],typeMap:{selection:w["a"],cluster:j}},json:{name:"layerDefinition.featureReduction",write:{allowNull:!0},origins:{"web-map":{types:{key:"type",base:n["a"],typeMap:{selection:j}}},"web-scene":{types:{key:"type",base:n["a"],typeMap:{selection:w["a"]}}}}}}},"05c5":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("b2b2"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("448d")),c=r("d386"),l=r("961d"),u=r("f6ab"),d=r("a3af");let h=i=class extends l["a"]{constructor(e){super(e),this.type="extrude",this.size=1,this.material=null,this.castShadows=!0,this.edges=null}clone(){return new i({edges:this.edges&&this.edges.clone(),enabled:this.enabled,material:Object(a["k"])(this.material)?this.material.clone():null,castShadows:this.castShadows,size:this.size})}};Object(n["a"])([Object(o["a"])({Extrude:"extrude"},{readOnly:!0})],h.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:{enabled:!0,isRequired:!0}},nonNullable:!0})],h.prototype,"size",void 0),Object(n["a"])([Object(s["b"])({type:d["a"],json:{write:!0}})],h.prototype,"material",void 0),Object(n["a"])([Object(s["b"])({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],h.prototype,"castShadows",void 0),Object(n["a"])([Object(s["b"])(u["a"])],h.prototype,"edges",void 0),h=i=Object(n["a"])([Object(c["a"])("esri.symbols.ExtrudeSymbol3DLayer")],h);const p=h},"0613":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));const i=2.1},"0646":function(e,t,r){"use strict";r.d(t,"a",(function(){return w})),r.d(t,"b",(function(){return R})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return S})),r.d(t,"e",(function(){return C}));var i,n=r("556f"),a=r("7ffa"),s=r("7b7d"),o=r("5815"),c=r("c47a"),l=r("f2e0"),u=r("9d9d"),d=r("9efb"),h=r("4c37");!function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"}(i||(i={}));class p{constructor(){this.uid=Object(l["b"])(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(e,t,r,n,s){return this.pool.acquire(i.Untracked,e,t,r,n,s,a["b"])}static acquireTracked(e,t,r,n){return this.pool.acquire(i.Tracked,e,t,r,null,null,n)}notify(e,t){this.type===i.Untracked?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t)}acquire(e,t,r,i,n,a,s){this.uid=Object(l["b"])(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=i,this.target=n,this.path=a,this.equals=s}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=Object(l["b"])(),this.removed=!0}}p.pool=new s["a"](p);const f=new n["a"],b=new Set;let m;function g(e){b.delete(e),b.add(e),m||(m=Object(o["b"])(v))}function y(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function O(e){for(const t of b.values())t.target===e&&(t.removed=!0)}function v(){let e=10;for(;m&&e--;){m=null;const e=_(),t=f.acquire();for(const r of e){const e=r.uid;y(r),e===r.uid&&r.removed&&t.push(r)}for(const r of b)r.removed&&(t.push(r),b.delete(r));for(const r of t)p.pool.release(r);f.release(t),f.release(e),j.forEach(e=>e())}}function _(){const e=f.acquire();e.length=b.size;let t=0;for(const r of b)e[t]=r,++t;return b.clear(),e}const j=new Set;function w(e){return j.add(e),{remove(){j.delete(e)}}}function x(e,t,r){let i=Object(h["e"])(e,t,r,(e,t,r)=>{let n,a,s=Object(d["c"])(()=>Object(u["c"])(e,t),(s,o)=>{e.__accessor__.destroyed||n&&n.uid!==a?i.remove():(n||(n=p.acquireUntracked(s,r,o,e,t),a=n.uid),g(n))});return{remove:Object(h["d"])(()=>{s.remove(),n&&(n.uid!==a||n.removed||(n.removed=!0,g(n)),n=null),i=s=null})}});return i}function T(e,t,r){const i=Object(h["e"])(e,t,r,(e,t,r)=>{let n=!1;return Object(d["b"])(()=>Object(u["c"])(e,t),(s,o)=>{e.__accessor__.destroyed?i.remove():n||(n=!0,Object(a["b"])(o,s)||r.call(e,s,o,t,e),n=!1)})});return i}function S(e,t,r,i=!1){return!e.__accessor__||e.__accessor__.destroyed?{remove(){}}:i?T(e,t,r):x(e,t,r)}function E(e,t,r){let i,n,a=Object(d["c"])(e,(e,s)=>{i&&i.uid!==n?a.remove():(i||(i=p.acquireTracked(e,t,s,r),n=i.uid),g(i))});return{remove:Object(h["d"])(()=>{a.remove(),i&&(i.uid!==n||i.removed||(i.removed=!0,g(i)),i=null),a=null})}}function A(e,t,r){let i=!1;return Object(d["b"])(e,(e,n)=>{i||(i=!0,r(n,e)||t(e,n),i=!1)})}function C(e,t,r=!1,i=a["b"]){return r?A(e,t,i):E(e,t,i)}function R(e){return Object(c["a"])(b,t=>t.oldValue===e)}},"072f":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("f97e");function n(e,t){const r=Object(i["a"])(e,t),n=r.queryResult.featureResult,a=r.queryResult.queryGeometry,s=r.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=a,n.queryGeometryType=s),n}},"079ae":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return f}));var i,n=r("a4ee"),a=r("c3a4"),s=r("ca98"),o=r("da35"),c=r("fa1e"),l=r("c829"),u=r("e508"),d=r("d17d"),h=r("189c");!function(e){e[e.None=0]="None",e[e.Alpha=1]="Alpha",e[e.PremultipliedAlpha=2]="PremultipliedAlpha",e[e.COUNT=3]="COUNT"}(i||(i={}));class p extends s["a"]{initializeProgram(e){const t=p.shader.get().build(this.configuration);return new l["a"](e.rctx,t,c["a"])}initializePipeline(){if(this.configuration.function===u["a"].TransparentToHUDVisibility)return Object(h["g"])({colorWrite:{r:!1,g:!0,b:!1,a:!1}});switch(this.configuration.alphaMode){case i.None:return Object(h["g"])({colorWrite:h["d"]});case i.Alpha:return Object(h["g"])({blending:Object(h["h"])(d["b"].SRC_ALPHA,d["b"].ONE,d["b"].ONE_MINUS_SRC_ALPHA,d["b"].ONE_MINUS_SRC_ALPHA),colorWrite:h["d"]});default:return Object(h["g"])({blending:Object(h["i"])(d["b"].ONE,d["b"].ONE_MINUS_SRC_ALPHA),colorWrite:h["d"]})}}}p.shader=new a["a"](u["b"],()=>r.e("chunk-2d217e1d").then(r.bind(null,"c92c")));class f extends o["a"]{constructor(){super(...arguments),this.function=u["a"].Standard,this.alphaMode=i.None,this.hasOpacityFactor=!1}}Object(n["a"])([Object(o["b"])({count:u["a"].COUNT})],f.prototype,"function",void 0),Object(n["a"])([Object(o["b"])({count:i.COUNT})],f.prototype,"alphaMode",void 0),Object(n["a"])([Object(o["b"])()],f.prototype,"hasOpacityFactor",void 0)},"07cd":function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i=r("a4ee"),n=r("fc29"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("3349"),c=r("b541");function l(e,t){return e.length=0,t.forEach(t=>e.push(t)),e}const u=new Set,d=[],h=new Map,p=[0,0];let f=class extends n["a"]{constructor(e){super(e),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:e,process:t,strategy:r}=this;this._queue=new c["a"]({concurrency:e,process:(e,r)=>{const i=this._keyToItem.get(e);return t(i,{signal:r})},peeker:"scale-first"===r?e=>this._peekByScaleFirst(e):e=>this._peekByCenterFirst(e)})}destroy(){this.clear(),this._queue.destroy(),this._queue=null}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}get updating(){return this.length>0||this.onGoingCount>0}abort(e){const t="string"==typeof e?e:e.id;this._queue.abort(t)}clear(){this._queue.clear(),this._keyToItem.clear(),this.notifyChange("updating")}has(e){return"string"==typeof e?this._keyToItem.has(e):this._keyToItem.has(e.id)}isOngoing(e){const t="string"==typeof e?e:e.id;return this.has(t)&&this._queue.isOngoing(t)}pause(){this._queue.pause()}push(e){const t=e.key.id;if(this._queue.has(t))return this._queue.get(t);const r=this._queue.push(t),i=()=>{this._keyToItem.delete(t),this.notifyChange("updating")};return this._keyToItem.set(t,e),r.then(i,i),this.notifyChange("updating"),r}reset(){this._queue.reset()}resume(){this._queue.resume()}_peekByScaleFirst(e){if(!this.state)return e.values().next().value;const t=this.tileInfoView;let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;e.forEach(e=>{const t=this._keyToItem.get(e),n=this.tileInfoView.getTileScale(t.key);h.has(n)||(h.set(n,[]),r=Math.max(n,r),i=Math.min(n,i)),h.get(n).push(t.key),u.add(n)});let n=this.state.scale;h.has(n)||(l(d,u),d.sort((e,t)=>e-t),n=d.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,d[0])),n=Math.min(n,r),n=Math.max(n,i);const a=h.get(n),s=t.getClosestInfoForScale(n),o=s.getColumnForX(this.state.center[0]),c=s.getRowForY(this.state.center[1]);return a.sort((e,t)=>{const r=s.denormalizeCol(e.col,e.world),i=s.denormalizeCol(t.col,t.world);return Math.sqrt((o-r)*(o-r)+(c-e.row)*(c-e.row))-Math.sqrt((o-i)*(o-i)+(c-t.row)*(c-t.row))}),u.clear(),h.clear(),a[0].id}_peekByCenterFirst(e){if(!this.state)return e.values().next().value;const t=this.tileInfoView,r=this.state.center;let i=Number.POSITIVE_INFINITY,n=null;return e.forEach(e=>{const a=this._keyToItem.get(e);t.getTileCoords(p,a.key);const s=Object(o["b"])(p,r);s<i&&(i=s,n=a.key)}),n.id}};Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"concurrency",void 0),Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"process",void 0),Object(i["a"])([Object(a["b"])()],f.prototype,"state",void 0),Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"strategy",void 0),Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"tileInfoView",void 0),Object(i["a"])([Object(a["b"])({readOnly:!0})],f.prototype,"updating",null),f=Object(i["a"])([Object(s["a"])("esri.views.2d.tiling.TileQueue")],f);const b=f},"087c":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return a}));var i=r("a21b"),n=r("1038");function a(e,t=n["d"]){return"number"==typeof e?t(e):Object(i["i"])(e)||Object(i["k"])(e)?new Uint32Array(e):e}function s(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)if(n%2==0){const r=e[n],a=e[n+1],s=e[n+2];i[t++]=r,i[t++]=a,i[t++]=s}else{const r=e[n+1],a=e[n],s=e[n+2];i[t++]=r,i[t++]=a,i[t++]=s}}return i}function o(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}{const t=e[0];let n=e[1],a=0;for(let s=0;s<r;++s){const r=e[s+2];i[a++]=t,i[a++]=n,i[a++]=r,n=r}return i}}},"08f6":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n}));var i=r("9ef0");const n=new i["a"]("white"),a=(new i["a"]("black"),new i["a"]([255,255,255,0]));function s(e){return 0===e.r&&0===e.g&&0===e.b}},"0964":function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return h}));var i=r("9d9d"),n=r("4c37"),a=r("7ed0");function s(e,t,r){if(!e||!e.read||!1===e.read.enabled||!e.read.source)return!1;const n=e.read.source;if("string"==typeof n){if(n===t)return!0;if(n.indexOf(".")>-1&&0===n.indexOf(t)&&Object(i["a"])(n,r))return!0}else for(const a of n){if(a===t)return!0;if(a.indexOf(".")>-1&&0===a.indexOf(t)&&Object(i["a"])(a,r))return!0}return!1}function o(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)}function c(e,t,r,i,n){let c=Object(a["b"])(t[r],n);o(c)&&(e[r]=!0);for(const o of Object.getOwnPropertyNames(t))c=Object(a["b"])(t[o],n),s(c,r,i)&&(e[o]=!0)}function l(e,t,r,i){const n=r.metadatas,s=Object(a["a"])(n[t],"any",i),o=s&&s.default;if(void 0===o)return;const c="function"==typeof o?o.call(e,t,i):o;void 0!==c&&r.set(t,c)}const u={origin:"service"};function d(e,t,r=u){if(!t||"object"!=typeof t)return;const s=Object(n["a"])(e),o=s.metadatas,d={};for(const i of Object.getOwnPropertyNames(t))c(d,o,i,t,r);s.setDefaultOrigin(r.origin);for(const n of Object.getOwnPropertyNames(d)){const c=Object(a["b"])(o[n],r).read,l=c&&c.source;let u;u=l&&"string"==typeof l?Object(i["c"])(t,l):t[n],c&&c.reader&&(u=c.reader.call(e,u,t,r)),void 0!==u&&s.set(n,u)}if(!r||!r.ignoreDefaults){s.setDefaultOrigin("defaults");for(const t of Object.getOwnPropertyNames(o))d[t]||l(e,t,s,r)}s.setDefaultOrigin("user")}function h(e,t,r,i=u){var n;const a={...i,messages:[]};r(a),null==(n=a.messages)||n.forEach(t=>{"warning"!==t.type||e.loaded?i&&i.messages&&i.messages.push(t):e.loadWarnings.push(t)})}},"09db":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("59b2");function n(e,t,r){let n,a;return void 0===t?(a=e,n=[void 0]):"string"!=typeof t?(a=e,n=[void 0],r=t):(a=t,n=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;for(const o of n){const n=Object(i["c"])(e,o,a);n.write&&"object"==typeof n.write||(n.write={}),r&&(n.write.target=r),n.write.writer=s[t]}}}},"0a9e":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return c}));var i=r("b2b2"),n=r("a6c9");const a=64,s=a/2,o=s/5;function c(e,t){return Object(i["k"])(t)?l(e,u(t.style)):null}function l(e,t){return e.fromData(t,()=>Object(n["c"])(t,a,s,o))}function u(e){return"diamond"===e?"kite":e}},"0b2d":function(e,t,r){"use strict";function i(){return[0,0,0]}function n(e){return[e[0],e[1],e[2]]}function a(e,t,r){return[e,t,r]}function s(e){const t=i(),r=Math.min(3,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function o(e,t){return new Float64Array(e,t,3)}function c(){return i()}function l(){return a(1,1,1)}function u(){return a(1,0,0)}function d(){return a(0,1,0)}function h(){return a(0,0,1)}r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return i})),r.d(t,"g",(function(){return s})),r.d(t,"h",(function(){return a})),r.d(t,"i",(function(){return h}));const p=c(),f=l(),b=u(),m=d(),g=h();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,fromArray:s,createView:o,zeros:c,ones:l,unitX:u,unitY:d,unitZ:h,ZEROS:p,ONES:f,UNIT_X:b,UNIT_Y:m,UNIT_Z:g})},"0b86":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var i=r("e92d"),n=r("9d1d"),a=r("0028"),s=r("7af8"),o=r("74bd");const c=i["a"].getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(e,t,r){var i,a;e&&(!r&&!t.read||null!=(i=t.read)&&i.reader||!1===(null==(a=t.read)?void 0:a.enabled)||g(e)&&Object(n["c"])("read.reader",u(e),t))}function u(e){var t;const r=null!=(t=e.ndimArray)?t:0;if(r>1)return f(e);if(1===r)return b(e);if("type"in e&&m(e.type)){var i,n;const t=null==(i=e.type.prototype)||null==(n=i.itemType)?void 0:n.Type,r=b("function"==typeof t?{type:t}:{types:t});return(t,i,n)=>{const a=r(t,i,n);return a?new e.type(a):a}}return d(e)}function d(e){return"type"in e?h(e.type):v(e.types)}function h(e){return e.prototype.read?(t,r,i)=>{if(null==t)return t;const n=typeof t;if("object"!==n)return void c.error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${n}'`);const a=new e;return a.read(t,i),a}:e.fromJSON}function p(e,t,r,i){return 0!==i&&Array.isArray(t)?t.map(t=>p(e,t,r,i-1)):e(t,void 0,r)}function f(e){var t;const r=d(e),i=p.bind(null,r),n=null!=(t=e.ndimArray)?t:0;return(e,t,r)=>{if(null==e)return e;e=i(e,r,n);let a=n,s=e;for(;a>0&&Array.isArray(s);)a--,s=s[0];if(void 0!==s)for(let i=0;i<a;i++)e=[e];return e}}function b(e){const t=d(e);return(e,r,i)=>{if(null==e)return e;if(Array.isArray(e)){const r=[];for(const n of e){const e=t(n,void 0,i);void 0!==e&&r.push(e)}return r}const n=t(e,void 0,i);return void 0!==n?[n]:void 0}}function m(e){if(!Object(o["a"])(e))return!1;const t=e.prototype.itemType;return!(!t||!t.Type)&&("function"==typeof t.Type?y(t.Type):O(t.Type))}function g(e){return"types"in e?O(e.types):y(e.type)}function y(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||m(e))}function O(e){for(const t in e.typeMap)if(!y(e.typeMap[t]))return!1;return!0}function v(e){var t;let r=null;const i=null!=(t=e.errorContext)?t:"type";return(t,n,s)=>{if(null==t)return t;const o=typeof t;if("object"!==o)return void c.error(`Expected JSON value of type 'object' to deserialize, but got '${o}'`);r||(r=_(e));const l=e.key;if("string"!=typeof l)return;const u=t[l],d=u?r[u]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!d){const e=`Type '${u||"unknown"}' is not supported`;return s&&s.messages&&t&&s.messages.push(new a["a"](i+":unsupported",e,{definition:t,context:s})),void c.error(e)}const h=new d;return h.read(t,s),h}}function _(e){const t={};for(const n in e.typeMap){var r,i;const a=e.typeMap[n],o=Object(s["a"])(a.prototype);if("function"==typeof e.key)continue;const c=o.properties[e.key];if(!c)continue;null!=(r=c.json)&&r.type&&Array.isArray(c.json.type)&&1===c.json.type.length&&"string"==typeof c.json.type[0]&&(t[c.json.type[0]]=a);const l=null==(i=c.json)?void 0:i.write;if(!l||!l.writer){t[n]=a;continue}const u=l.target,d="string"==typeof u?u:e.key,h={};l.writer(n,h,d),h[d]&&(t[h[d]]=a)}return t}},"0bde":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return p}));var i,n=r("b2b2"),a=r("ecd7"),s=r("8a44"),o=r("e431"),c=r("0b2d"),l=r("d359"),u=r("d18f"),d=r("f895"),h=r("1153");class p{constructor(e,t){this._objectToBoundingSphere=e,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new f,this._objectCount=0,t&&(void 0!==t.maximumObjectsPerNode&&(this._maximumObjectsPerNode=t.maximumObjectsPerNode),void 0!==t.maximumDepth&&(this._maximumDepth=t.maximumDepth))}get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}destroy(){this._degenerateObjects.clear(),f.clearPool(),S[0]=null,P.prune(),k.prune()}add(e,t=e.length){this._objectCount+=t,this._grow(e,t);const r=f.acquire();for(let i=0;i<t;i++){const t=e[i];this._isDegenerate(t)?this._degenerateObjects.add(t):(r.init(this._root),this._add(t,r))}f.release(r)}remove(e,t=null){this._objectCount-=e.length;const r=f.acquire();for(const i of e){const e=Object(n["k"])(t)?t:Object(d["b"])(this._objectToBoundingSphere(i),I);j(e[3])?(r.init(this._root),this._remove(i,e,r)):this._degenerateObjects.delete(i)}f.release(r),this._shrink()}update(e,t){if(!j(t[3])&&this._isDegenerate(e))return;const r=E(e);this.remove(r,t),this.add(r)}forEachAlongRay(e,t,r){const i=Object(u["h"])(e,t);this._forEachNode(this._root,e=>{if(!this._intersectsNode(i,e))return!1;const t=e.node;return t.terminals.forAll(e=>{this._intersectsObject(i,e)&&r(e)}),null!==t.residents&&t.residents.forAll(e=>{this._intersectsObject(i,e)&&r(e)}),!0})}forEachAlongRayWithVerticalOffset(e,t,r,i){const n=Object(u["h"])(e,t);this._forEachNode(this._root,e=>{if(!this._intersectsNodeWithOffset(n,e,i))return!1;const t=e.node;return t.terminals.forAll(e=>{this._intersectsObjectWithOffset(n,e,i)&&r(e)}),null!==t.residents&&t.residents.forAll(e=>{this._intersectsObjectWithOffset(n,e,i)&&r(e)}),!0})}forEach(e){this._forEachNode(this._root,t=>{const r=t.node;return r.terminals.forAll(e),null!==r.residents&&r.residents.forAll(e),!0}),this._degenerateObjects.forEach(e)}forEachDegenerateObject(e){this._degenerateObjects.forEach(e)}findClosest(e,t,r,i=(()=>!0),n=1/0){let a=1/0,s=1/0,c=null;const u=v(e,t),h=o=>{if(--n,!i(o))return;const u=this._objectToBoundingSphere(o);if(!Object(l["m"])(r,u))return;const h=_(e,t,Object(d["g"])(u)),p=h-u[3],f=h+u[3];p<a&&(a=p,s=f,c=o)};return this._forEachNodeDepthOrdered(this._root,i=>{if(n<=0||!Object(l["m"])(r,i.bounds))return!1;if(Object(o["g"])(C,u,i.halfSize),Object(o["h"])(C,C,i.bounds),_(e,t,C)>s)return!1;const a=i.node;return a.terminals.forAll(e=>h(e)),null!==a.residents&&a.residents.forAll(e=>h(e)),!0},e,t),c}forEachInDepthRange(e,t,r,n,a,s,c){let u=-1/0,h=1/0;const p={setRange:e=>{r===i.FRONT_TO_BACK?(u=Math.max(u,e.near),h=Math.min(h,e.far)):(u=Math.max(u,-e.far),h=Math.min(h,-e.near))}};p.setRange(n);const f=_(t,r,e),b=v(t,r),m=v(t,-r),g=e=>{if(!c(e))return;const i=this._objectToBoundingSphere(e),n=Object(d["g"])(i),o=_(t,r,n)-f,b=o-i[3],m=o+i[3];b>h||m<u||!Object(l["m"])(s,i)||a(e,p)};this._forEachNodeDepthOrdered(this._root,e=>{if(!Object(l["m"])(s,e.bounds))return!1;if(Object(o["g"])(C,b,e.halfSize),Object(o["h"])(C,C,e.bounds),_(t,r,C)-f>h)return!1;if(Object(o["g"])(C,m,e.halfSize),Object(o["h"])(C,C,e.bounds),_(t,r,C)-f<u)return!1;const i=e.node;return i.terminals.forAll(e=>g(e)),null!==i.residents&&i.residents.forAll(e=>g(e)),!0},t,r)}forEachNode(e){this._forEachNode(this._root,t=>e(t.node,t.bounds,t.halfSize))}_intersectsNode(e,t){return g(t.bounds,2*-t.halfSize,R),g(t.bounds,2*t.halfSize,M),Object(h["j"])(e.origin,e.direction,R,M)}_intersectsNodeWithOffset(e,t,r){return g(t.bounds,2*-t.halfSize,R),g(t.bounds,2*t.halfSize,M),r.applyToMinMax(R,M),Object(h["j"])(e.origin,e.direction,R,M)}_intersectsObject(e,t){const r=this._objectToBoundingSphere(t);return!(r[3]>0)||Object(d["i"])(r,e)}_intersectsObjectWithOffset(e,t,r){const i=this._objectToBoundingSphere(t);return!(i[3]>0)||Object(d["i"])(r.applyToBoundingSphere(i),e)}_forEachNode(e,t){let r=f.acquire().init(e);const i=[r];for(;0!==i.length;){if(r=i.pop(),t(r)&&!r.isLeaf())for(let e=0;e<r.node.children.length;e++)r.node.children[e]&&i.push(f.acquire().init(r).advance(e));f.release(r)}}_forEachNodeDepthOrdered(e,t,r,n=i.FRONT_TO_BACK){let a=f.acquire().init(e);const s=[a];for(O(r,n,U);0!==s.length;){if(a=s.pop(),t(a)&&!a.isLeaf())for(let e=7;e>=0;--e){const t=U[e];a.node.children[t]&&s.push(f.acquire().init(a).advance(t))}f.release(a)}}_remove(e,t,r){P.clear();const i=r.advanceTo(t,(e,t)=>{P.push(e.node),P.push(t)})?r.node.terminals:r.node.residents;if(i.removeUnordered(e),0===i.length)for(let n=P.length-2;n>=0;n-=2){const e=P.data[n],t=P.data[n+1];if(!this._purge(e,t))break}}_nodeIsEmpty(e){if(0!==e.terminals.length)return!1;if(null!==e.residents)return 0===e.residents.length;for(let t=0;t<e.children.length;t++)if(e.children[t])return!1;return!0}_purge(e,t){return t>=0&&(e.children[t]=null),!!this._nodeIsEmpty(e)&&(null===e.residents&&(e.residents=new s["a"]({shrink:!0})),!0)}_add(e,t){t.advanceTo(this._objectToBoundingSphere(e))?t.node.terminals.push(e):(t.node.residents.push(e),t.node.residents.length>this._maximumObjectsPerNode&&t.depth<this._maximumDepth&&this._split(t))}_split(e){const t=e.node.residents;e.node.residents=null;for(let r=0;r<t.length;r++){const i=f.acquire().init(e);this._add(t.getItemAt(r),i),f.release(i)}}_grow(e,t){if(0!==t&&(y(e,t,e=>this._objectToBoundingSphere(e),D),j(D[3])&&!this._fitsInsideTree(D)))if(this._nodeIsEmpty(this._root.node))Object(d["b"])(D,this._root.bounds),this._root.halfSize=1.25*D[3];else{const e=this._rootBoundsForRootAsSubNode(D);this._placingRootViolatesMaxDepth(e)?this._rebuildTree(D,e):this._growRootAsSubNode(e),f.release(e)}}_rebuildTree(e,t){Object(o["m"])(L,t.bounds),L[3]=t.halfSize,y([e,L],2,e=>e,N);const r=f.acquire().init(this._root);this._root.initFrom(null,N,1.25*N[3]),this._forEachNode(r,e=>(this.add(e.node.terminals.data,e.node.terminals.length),null!==e.node.residents&&this.add(e.node.residents.data,e.node.residents.length),!0)),f.release(r)}_placingRootViolatesMaxDepth(e){const t=Math.log(e.halfSize/this._root.halfSize)*Math.LOG2E;let r=0;return this._forEachNode(this._root,e=>(r=Math.max(r,e.depth),r+t<=this._maximumDepth)),r+t>this._maximumDepth}_rootBoundsForRootAsSubNode(e){const t=e[3],r=e;let i=-1/0;const n=this._root.bounds,a=this._root.halfSize;for(let s=0;s<3;s++){const e=n[s]-a-(r[s]-t),o=r[s]+t-(n[s]+a),c=Math.max(0,Math.ceil(e/(2*a))),l=Math.max(0,Math.ceil(o/(2*a)))+1,u=2**Math.ceil(Math.log(c+l)*Math.LOG2E);i=Math.max(i,u),F[s].min=c,F[s].max=l}for(let s=0;s<3;s++){let e=F[s].min,t=F[s].max;const r=(i-(e+t))/2;e+=Math.ceil(r),t+=Math.floor(r);const o=n[s]-a-e*a*2;A[s]=o+(t+e)*a}return A[3]=i*a*T,f.acquire().initFrom(null,A,i*a,0)}_growRootAsSubNode(e){const t=this._root.node;Object(o["m"])(D,this._root.bounds),D[3]=this._root.halfSize,this._root.init(e),e.advanceTo(D,null,!0),e.node.children=t.children,e.node.residents=t.residents,e.node.terminals=t.terminals}_shrink(){for(;;){const e=this._findShrinkIndex();if(-1===e)break;this._root.advance(e),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let e=null;const t=this._root.node.children;let r=0,i=0;for(;i<t.length&&null==e;)r=i++,e=t[r];for(;i<t.length;)if(t[i++])return-1;return r}_isDegenerate(e){return!j(this._objectToBoundingSphere(e)[3])}_fitsInsideTree(e){const t=this._root.bounds,r=this._root.halfSize;return e[3]<=r&&e[0]>=t[0]-r&&e[0]<=t[0]+r&&e[1]>=t[1]-r&&e[1]<=t[1]+r&&e[2]>=t[2]-r&&e[2]<=t[2]+r}}class f{constructor(){this.bounds=Object(d["c"])(),this.halfSize=0,this.initFrom(null,null,0,0)}init(e){return this.initFrom(e.node,e.bounds,e.halfSize,e.depth)}initFrom(e,t,r,i=this.depth){return this.node=Object(n["k"])(e)?e:f.createEmptyNode(),Object(n["k"])(t)&&Object(d["b"])(t,this.bounds),this.halfSize=r,this.depth=i,this}advance(e){let t=this.node.children[e];t||(t=f.createEmptyNode(),this.node.children[e]=t),this.node=t,this.halfSize/=2,this.depth++;const r=w[e];return this.bounds[0]+=r[0]*this.halfSize,this.bounds[1]+=r[1]*this.halfSize,this.bounds[2]+=r[2]*this.halfSize,this.bounds[3]=this.halfSize*T,this}advanceTo(e,t,r=!1){for(;;){if(this.isTerminalFor(e))return t&&t(this,-1),!0;if(this.isLeaf()){if(!r)return t&&t(this,-1),!1;this.node.residents=null}const i=this._childIndex(e);t&&t(this,i),this.advance(i)}}isLeaf(){return null!=this.node.residents}isTerminalFor(e){return e[3]>this.halfSize/2}_childIndex(e){const t=this.bounds;return(t[0]<e[0]?1:0)+(t[1]<e[1]?2:0)+(t[2]<e[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new s["a"]({shrink:!0}),residents:new s["a"]({shrink:!0})}}static acquire(){return f._pool.acquire()}static release(e){f._pool.release(e)}static clearPool(){f._pool.prune()}}function b(e,t){e[0]=Math.min(e[0],t[0]-t[3]),e[1]=Math.min(e[1],t[1]-t[3]),e[2]=Math.min(e[2],t[2]-t[3])}function m(e,t){e[0]=Math.max(e[0],t[0]+t[3]),e[1]=Math.max(e[1],t[1]+t[3]),e[2]=Math.max(e[2],t[2]+t[3])}function g(e,t,r){r[0]=e[0]+t,r[1]=e[1]+t,r[2]=e[2]+t}function y(e,t,r,i){if(1===t){const t=r(e[0]);Object(d["b"])(t,i)}else{R[0]=1/0,R[1]=1/0,R[2]=1/0,M[0]=-1/0,M[1]=-1/0,M[2]=-1/0;for(let i=0;i<t;i++){const t=r(e[i]);j(t[3])&&(b(R,t),m(M,t))}Object(o["k"])(i,R,M,.5),i[3]=Math.max(M[0]-R[0],M[1]-R[1],M[2]-R[2])/2}}function O(e,t,r){if(!k.length)for(let i=0;i<8;++i)k.push({index:0,distance:0});for(let i=0;i<8;++i){const r=w[i];k.data[i].index=i,k.data[i].distance=_(e,t,r)}k.sort((e,t)=>e.distance-t.distance);for(let i=0;i<8;++i)r[i]=k.data[i].index}function v(e,t){let r=1/0,i=null;for(let n=0;n<8;++n){const a=_(e,t,x[n]);a<r&&(r=a,i=x[n])}return i}function _(e,t,r){return t*(e[0]*r[0]+e[1]*r[1]+e[2]*r[2])}function j(e){return!isNaN(e)&&e!==-1/0&&e!==1/0&&e>0}f._pool=new a["a"](f),function(e){e[e.FRONT_TO_BACK=1]="FRONT_TO_BACK",e[e.BACK_TO_FRONT=-1]="BACK_TO_FRONT"}(i||(i={}));const w=[Object(c["h"])(-1,-1,-1),Object(c["h"])(1,-1,-1),Object(c["h"])(-1,1,-1),Object(c["h"])(1,1,-1),Object(c["h"])(-1,-1,1),Object(c["h"])(1,-1,1),Object(c["h"])(-1,1,1),Object(c["h"])(1,1,1)],x=[Object(c["h"])(-1,-1,-1),Object(c["h"])(-1,-1,1),Object(c["h"])(-1,1,-1),Object(c["h"])(-1,1,1),Object(c["h"])(1,-1,-1),Object(c["h"])(1,-1,1),Object(c["h"])(1,1,-1),Object(c["h"])(1,1,1)],T=Math.sqrt(3),S=[null];function E(e){return S[0]=e,S}const A=Object(d["c"])(),C=Object(c["f"])(),R=Object(c["f"])(),M=Object(c["f"])(),P=new s["a"],I=Object(d["c"])(),D=Object(d["c"])(),L=Object(d["c"])(),N=Object(d["c"])(),F=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],k=new s["a"],U=[0,0,0,0,0,0,0,0]},"0c9d":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return c}));var i=r("2ebb"),n=r("fc00"),a=r("b7bd");const s=Object(n["a"])().vec3f(a["a"].POSITION).u16(a["a"].COMPONENTINDEX).u16(a["a"].U16PADDING),o=Object(n["a"])().vec2u8(a["a"].SIDENESS),c=Object(i["a"])(o),l=Object(n["a"])().vec3f(a["a"].POSITION0).vec3f(a["a"].POSITION1).u16(a["a"].COMPONENTINDEX).u8(a["a"].VARIANTOFFSET,{glNormalized:!0}).u8(a["a"].VARIANTSTROKE).u8(a["a"].VARIANTEXTENSION,{glNormalized:!0}).u8(a["a"].U8PADDING,{glPadding:!0}).u16(a["a"].U16PADDING,{glPadding:!0}),u=l.clone().vec3f(a["a"].NORMAL),d=l.clone().vec3f(a["a"].NORMALA).vec3f(a["a"].NORMALB),h=new Map([[a["a"].POSITION0,0],[a["a"].POSITION1,1],[a["a"].COMPONENTINDEX,2],[a["a"].VARIANTOFFSET,3],[a["a"].VARIANTSTROKE,4],[a["a"].VARIANTEXTENSION,5],[a["a"].NORMAL,6],[a["a"].NORMALA,6],[a["a"].NORMALB,7],[a["a"].SIDENESS,8]])},"0ca1":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e){this.gain=e}update(e){if(this.hasLastValue){const t=this.computeDelta(e);this._updateDelta(t)}this.lastValue=e}reset(){this.lastValue=void 0,this.filteredDelta=void 0}get hasLastValue(){return void 0!==this.lastValue}get hasFilteredDelta(){return void 0!==this.filteredDelta}computeDelta(e){return e-this.lastValue}_updateDelta(e){this.hasFilteredDelta?this.filteredDelta=(1-this.gain)*this.filteredDelta+this.gain*e:this.filteredDelta=e}}},"0cb9":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return s}));var i=r("b2b2"),n=r("84f4");class a{constructor(e,t=null,r=0){this.array=e,this.spatialReference=t,this.offset=r}}function s(e){return"array"in e}function o(e,t,r="ground"){if(Object(n["a"])(t))return e.getElevation(t.x,t.y,t.z||0,t.spatialReference,r);if(s(t)){let n=t.offset;return e.getElevation(t.array[n++],t.array[n++],t.array[n]||0,Object(i["u"])(t.spatialReference,e.spatialReference),r)}return e.getElevation(t[0],t[1],t[2]||0,e.spatialReference,r)}},"0d76":function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i,n=r("a4ee"),a=r("9ef0"),s=r("fa8a"),o=r("7ffa"),c=r("59b2"),l=(r("cea0"),r("448d")),u=r("d386"),d=r("2959"),h=r("db52");const p=new s["a"]({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let f=i=class extends d["a"]{constructor(...e){super(...e),this.color=new a["a"]([0,0,0,.25]),this.outline=new h["a"],this.type="simple-fill",this.style="solid"}normalizeCtorArgs(e,t,r){if(e&&"string"!=typeof e)return e;const i={};return e&&(i.style=e),t&&(i.outline=t),r&&(i.color=r),i}clone(){return new i({color:Object(o["a"])(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};Object(n["a"])([Object(c["b"])()],f.prototype,"color",void 0),Object(n["a"])([Object(c["b"])()],f.prototype,"outline",void 0),Object(n["a"])([Object(l["a"])({esriSFS:"simple-fill"},{readOnly:!0})],f.prototype,"type",void 0),Object(n["a"])([Object(c["b"])({type:p.apiValues,json:{read:p.read,write:p.write}})],f.prototype,"style",void 0),f=i=Object(n["a"])([Object(u["a"])("esri.symbols.SimpleFillSymbol")],f);const b=f},"0d7a":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("dfaf"),n=r("7cb4"),a=r("aab5"),s=r("3886"),o=r("b7bd");function c(e,t){const r=e.fragment;t.vertexTangents?(e.attributes.add(o["a"].TANGENT,"vec4"),e.varyings.add("vTangent","vec4"),t.doubleSidedMode===a["b"].WindingOrder?r.code.add(s["a"]`mat3 computeTangentSpace(vec3 normal) {
  90. float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
  91. vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
  92. vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
  93. return mat3(tangent, bitangent, normal);
  94. }`):r.code.add(s["a"]`mat3 computeTangentSpace(vec3 normal) {
  95. float tangentHeadedness = vTangent.w;
  96. vec3 tangent = normalize(vTangent.xyz);
  97. vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
  98. return mat3(tangent, bitangent, normal);
  99. }`)):(e.extensions.add("GL_OES_standard_derivatives"),r.code.add(s["a"]`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
  100. vec3 Q1 = dFdx(pos);
  101. vec3 Q2 = dFdy(pos);
  102. vec2 stx = dFdx(st);
  103. vec2 sty = dFdy(st);
  104. float det = stx.t * sty.s - sty.t * stx.s;
  105. vec3 T = stx.t * Q2 - sty.t * Q1;
  106. T = T - normal * dot(normal, T);
  107. T *= inversesqrt(max(dot(T,T), 1.e-10));
  108. vec3 B = sign(det) * cross(normal, T);
  109. return mat3(T, B, normal);
  110. }`)),t.attributeTextureCoordinates!==i["b"].None&&(e.include(n["a"],t),r.uniforms.add("normalTexture","sampler2D"),r.uniforms.add("normalTextureSize","vec2"),r.code.add(s["a"]`
  111. vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
  112. vtc.uv = uv;
  113. ${t.supportsTextureAtlas?"vtc.size = normalTextureSize;":""}
  114. vec3 rawNormal = textureLookup(normalTexture, vtc).rgb * 2.0 - 1.0;
  115. return tangentSpace * rawNormal;
  116. }
  117. `))}},"0d93":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("9ef0"),a=r("fa8a"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("afcf")),l=r("d386");const u=new a["a"]({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let d=0,h=class extends s["a"]{constructor(e){super(e),this.id="sym"+d++,this.type=null,this.color=new n["a"]([0,0,0,1])}readColor(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}async collectRequiredFields(e,t){}hash(){return JSON.stringify(this.toJSON())}clone(){}};Object(i["a"])([Object(o["b"])({type:u.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:u.write}}})],h.prototype,"type",void 0),Object(i["a"])([Object(o["b"])({type:n["a"],json:{write:{allowNull:!0}}})],h.prototype,"color",void 0),Object(i["a"])([Object(c["a"])("color")],h.prototype,"readColor",null),h=Object(i["a"])([Object(l["a"])("esri.symbols.Symbol")],h);const p=h},"0d96":function(e,t,r){"use strict";r.d(t,"a",(function(){return S})),r.d(t,"b",(function(){return _})),r.d(t,"c",(function(){return j})),r.d(t,"d",(function(){return w}));var i=r("3349"),n=r("02f1"),a=r("0fc4"),s=r("a6c9"),o=r("a05b"),c=r("d272"),l=r("7c1d"),u=r("d0cb"),d=r("7079"),h=r("6a07"),p=r("be24"),f=r("ebd5"),b=r("4377"),m=r("501b"),g=r("2f98"),y=r("3886"),O=r("690a"),v=r("b7bd");function _(e){const t=new O["a"],r=e.signedDistanceFieldEnabled;if(t.include(l["a"]),t.include(u["a"],e),t.include(c["a"],e),e.output===o["a"].Occlusion)return t.include(d["a"],e),t;t.include(g["a"]),t.fragment.include(m["a"]),t.fragment.include(b["a"]),t.include(p["a"],e),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2"),e.binaryHighlightOcclusionEnabled&&t.varyings.add("voccluded","float"),t.vertex.uniforms.add("screenOffset","vec2").add("anchorPos","vec2").add("textureCoordinateScaleFactor","vec2").add("materialColor","vec4"),r&&t.vertex.uniforms.add("outlineColor","vec4"),e.screenSizePerspectiveEnabled&&t.vertex.uniforms.add("screenSizePerspective","vec4"),(e.debugDrawLabelBorder||e.binaryHighlightOcclusionEnabled)&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add(v["a"].UV0,"vec2"),t.attributes.add(v["a"].COLOR,"vec4"),t.attributes.add(v["a"].SIZE,"vec2"),t.attributes.add(v["a"].AUXPOS2,"vec4"),t.vertex.code.add(y["a"]`
  118. void main(void) {
  119. ProjectHUDAux projectAux;
  120. vec4 posProj = projectPositionHUD(projectAux);
  121. if (rejectBySlice(projectAux.posModel)) {
  122. // Project outside of clip plane
  123. gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
  124. return;
  125. }
  126. vec2 inputSize;
  127. ${e.screenSizePerspectiveEnabled?y["a"]`
  128. inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);
  129. vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);
  130. `:y["a"]`
  131. inputSize = size;
  132. vec2 screenOffsetScaled = screenOffset;`}
  133. ${e.vvSize?"inputSize *= vvScale(auxpos2).xx;":""}
  134. vec2 combinedSize = inputSize * pixelRatio;
  135. vec4 quadOffset = vec4(0.0);
  136. ${e.occlusionTestEnabled||e.binaryHighlightOcclusionEnabled?"bool visible = testVisibilityHUD(posProj);":""}
  137. ${e.binaryHighlightOcclusionEnabled?"voccluded = visible ? 0.0 : 1.0;":""}
  138. `);const i=y["a"]`vec2 uv01 = floor(uv0);
  139. vec2 uv = uv0 - uv01;
  140. quadOffset.xy = ((uv01 - anchorPos) * 2.0 * combinedSize + screenOffsetScaled) / viewport.zw * posProj.w;`,n=e.pixelSnappingEnabled?r?y["a"]`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:y["a"]`posProj += quadOffset;
  141. if (inputSize.x == size.x) {
  142. posProj = alignToPixelOrigin(posProj, viewport.zw);
  143. }`:y["a"]`posProj += quadOffset;`;t.vertex.code.add(y["a"]`
  144. ${e.occlusionTestEnabled?"if (visible) {":""}
  145. ${i}
  146. ${e.vvColor?"vcolor = vvGetColor(auxpos2, vvColorValues, vvColorColors) * materialColor;":"vcolor = color / 255.0 * materialColor;"}
  147. bool alphaDiscard = vcolor.a < ${y["a"].float(f["c"])};
  148. ${r?`alphaDiscard = alphaDiscard && outlineColor.a < ${y["a"].float(f["c"])};`:""}
  149. if (alphaDiscard) {
  150. // "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent
  151. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  152. return;
  153. } else {
  154. ${n}
  155. gl_Position = posProj;
  156. }
  157. vtc = uv * textureCoordinateScaleFactor;
  158. ${e.debugDrawLabelBorder?"debugBorderCoords = vec4(uv01, 1.5 / combinedSize);":""}
  159. vsize = inputSize;
  160. ${e.occlusionTestEnabled?y["a"]`} else { vtc = vec2(0.0);
  161. ${e.debugDrawLabelBorder?"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);}":"}"}`:""}
  162. }
  163. `),t.fragment.uniforms.add("tex","sampler2D"),r&&(t.fragment.uniforms.add("outlineColor","vec4"),t.fragment.uniforms.add("outlineSize","float"));const a=e.debugDrawLabelBorder?y["a"]`(isBorder > 0.0 ? 0.0 : ${y["a"].float(f["b"])})`:y["a"].float(f["b"]),_=y["a"]`
  164. ${e.debugDrawLabelBorder?y["a"]`
  165. float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));`:""}
  166. ${r?y["a"]`
  167. vec4 fillPixelColor = vcolor;
  168. // Attempt to sample texel centers to avoid that thin cross outlines
  169. // disappear with large symbol sizes.
  170. // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/7058#issuecomment-603041
  171. const float txSize = ${y["a"].float(s["b"])};
  172. const float texelSize = 1.0 / txSize;
  173. // Calculate how much we have to add/subtract to/from each texel to reach the size of an onscreen pixel
  174. vec2 scaleFactor = (vsize - txSize) * texelSize;
  175. vec2 samplePos = vtc + (vec2(1.0, -1.0) * texelSize) * scaleFactor;
  176. // Get distance and map it into [-0.5, 0.5]
  177. float d = rgba2float(texture2D(tex, samplePos)) - 0.5;
  178. // Distance in output units (i.e. pixels)
  179. float dist = d * vsize.x;
  180. // Create smooth transition from the icon into its outline
  181. float fillAlphaFactor = clamp(0.5 - dist, 0.0, 1.0);
  182. fillPixelColor.a *= fillAlphaFactor;
  183. if (outlineSize > 0.25) {
  184. vec4 outlinePixelColor = outlineColor;
  185. float clampedOutlineSize = min(outlineSize, 0.5*vsize.x);
  186. // Create smooth transition around outline
  187. float outlineAlphaFactor = clamp(0.5 - (abs(dist) - 0.5*clampedOutlineSize), 0.0, 1.0);
  188. outlinePixelColor.a *= outlineAlphaFactor;
  189. if (
  190. outlineAlphaFactor + fillAlphaFactor < ${a} ||
  191. fillPixelColor.a + outlinePixelColor.a < ${y["a"].float(f["c"])}
  192. ) {
  193. discard;
  194. }
  195. // perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Description)
  196. float compositeAlpha = outlinePixelColor.a + fillPixelColor.a * (1.0 - outlinePixelColor.a);
  197. vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +
  198. vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);
  199. gl_FragColor = vec4(compositeColor, compositeAlpha);
  200. } else {
  201. if (fillAlphaFactor < ${a}) {
  202. discard;
  203. }
  204. gl_FragColor = premultiplyAlpha(fillPixelColor);
  205. }
  206. // visualize SDF:
  207. // gl_FragColor = vec4(clamp(-dist/vsize.x*2.0, 0.0, 1.0), clamp(dist/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);
  208. `:y["a"]`
  209. vec4 texColor = texture2D(tex, vtc, -0.5);
  210. if (texColor.a < ${a}) {
  211. discard;
  212. }
  213. gl_FragColor = texColor * premultiplyAlpha(vcolor);
  214. `}
  215. // Draw debug border with transparency, so that original texels along border are still partially visible
  216. ${e.debugDrawLabelBorder?y["a"]`gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);`:""}
  217. `;return e.output===o["a"].Alpha&&t.fragment.code.add(y["a"]`
  218. void main() {
  219. ${_}
  220. gl_FragColor = vec4(gl_FragColor.a);
  221. }
  222. `),e.output===o["a"].Color&&t.fragment.code.add(y["a"]`
  223. void main() {
  224. ${_}
  225. ${e.frontFacePass?"gl_FragColor.rgb /= gl_FragColor.a;":""}
  226. }
  227. `),e.output===o["a"].Highlight&&(t.include(h["a"]),t.fragment.code.add(y["a"]`
  228. void main() {
  229. ${_}
  230. ${e.binaryHighlightOcclusionEnabled?y["a"]`
  231. if (voccluded == 1.0) {
  232. gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
  233. } else {
  234. gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
  235. }`:"outputHighlight();"}
  236. }
  237. `)),t}function j(e,t,r){e.setUniform4fv("materialColor",t.color),t.textureIsSignedDistanceField&&(t.outlineColor[3]<=0||t.outlineSize<=0?(e.setUniform4fv("outlineColor",a["b"]),e.setUniform1f("outlineSize",0)):(e.setUniform4fv("outlineColor",t.outlineColor),e.setUniform1f("outlineSize",t.outlineSize))),e.setUniform2f("screenOffset",2*t.screenOffset[0]*r,2*t.screenOffset[1]*r),e.setUniform2fv("anchorPos",w(t))}function w(e,t=T){return e.textureIsSignedDistanceField?x(e.anchorPos,e.distanceFieldBoundingBox,t):Object(i["c"])(t,e.anchorPos),t}function x(e,t,r){r[0]=e[0]*(t[2]-t[0])+t[0],r[1]=e[1]*(t[3]-t[1])+t[1]}const T=Object(n["b"])(),S=Object.freeze({__proto__:null,build:_,bindHUDMaterialUniforms:j,calculateAnchorPosForRendering:w})},"0d9f":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return ne})),r.d(t,"d",(function(){return y})),r.d(t,"e",(function(){return _})),r.d(t,"f",(function(){return N})),r.d(t,"g",(function(){return j})),r.d(t,"h",(function(){return E})),r.d(t,"i",(function(){return G})),r.d(t,"j",(function(){return V})),r.d(t,"k",(function(){return B})),r.d(t,"l",(function(){return w}));r("c120");var i=r("e92d"),n=r("38a4"),a=r("2119"),s=r("d791"),o=r("afe1"),c=r("e431"),l=r("0b2d"),u=r("3a35"),d=r("bd7e"),h=r("7289"),p=r("d18f"),f=r("a1b1"),b=r("7361");const m=i["a"].getLogger("esri.views.3d.support.geometryUtils.boundedPlane");class g{constructor(){this.plane=Object(h["d"])(),this.origin=Object(l["f"])(),this.basis1=Object(l["f"])(),this.basis2=Object(l["f"])()}}function y(e=Y){return{plane:Object(h["d"])(e.plane),origin:Object(l["d"])(e.origin),basis1:Object(l["d"])(e.basis1),basis2:Object(l["d"])(e.basis2)}}function O(e,t,r){const i=ee.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=Object(h["w"])(0,0,0,0),w(i),i}function v(e,t=y()){return j(e.origin,e.basis1,e.basis2,t)}function _(e,t){Object(c["m"])(t.origin,e.origin),Object(c["m"])(t.basis1,e.basis1),Object(c["m"])(t.basis2,e.basis2),Object(h["c"])(t.plane,e.plane)}function j(e,t,r,i=y()){return Object(c["m"])(i.origin,e),Object(c["m"])(i.basis1,t),Object(c["m"])(i.basis2,r),w(i),Z(i,"fromValues()"),i}function w(e){Object(h["j"])(e.basis2,e.basis1,e.origin,e.plane)}function x(e,t,r){e!==r&&v(e,r);const i=Object(c["g"])(b["d"].get(),G(e),t);return Object(c["h"])(r.origin,r.origin,i),r.plane[3]-=t,r}function T(e,t,r){return S(t,r),x(r,k(e,e.origin),r),r}function S(e,t=y()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return Object(c["y"])(t.origin,e[0]+r,e[1]+i,0),Object(c["y"])(t.basis1,r,0,0),Object(c["y"])(t.basis2,0,i,0),Object(h["i"])(0,0,1,0,t.plane),t}function E(e,t,r){return!!Object(h["n"])(e.plane,t,r)&&q(e,r)}function A(e,t,r){if(E(e,t,r))return r;const i=C(e,t,b["d"].get());return Object(c["h"])(r,t.origin,Object(c["g"])(b["d"].get(),t.direction,Object(c["o"])(t.origin,i)/Object(c["r"])(t.direction))),r}function C(e,t,r){const i=J.get();X(e,t,i,J.get());let a=Number.POSITIVE_INFINITY;for(const s of te){const o=$(e,s,Q.get()),l=b["d"].get();if(Object(h["l"])(i,o,l)){const e=Object(c["x"])(b["d"].get(),t.origin,l),i=Math.abs(Object(n["b"])(Object(c["j"])(t.direction,e)));i<a&&(a=i,Object(c["m"])(r,l))}}return a===Number.POSITIVE_INFINITY?R(e,t,r):r}function R(e,t,r){if(E(e,t,r))return r;const i=J.get(),n=J.get();X(e,t,i,n);let a=Number.POSITIVE_INFINITY;for(const s of te){const o=$(e,s,Q.get()),l=b["d"].get();if(Object(h["m"])(i,o,l)){const e=Object(p["d"])(t,l);if(!Object(h["p"])(n,l))continue;e<a&&(a=e,Object(c["m"])(r,l))}}return I(e,t.origin)<a&&M(e,t.origin,r),r}function M(e,t,r){const i=Object(h["s"])(e.plane,t,b["d"].get()),n=Object(d["g"])(W(e,e.basis1),i,-1,1,b["d"].get()),a=Object(d["g"])(W(e,e.basis2),i,-1,1,b["d"].get());return Object(c["l"])(r,Object(c["h"])(b["d"].get(),n,a),e.origin),r}function P(e,t,r){const{origin:i,basis1:n,basis2:a}=e,s=Object(c["l"])(b["d"].get(),t,i),o=Object(f["c"])(n,s),l=Object(f["c"])(a,s),u=Object(f["c"])(G(e),s);return Object(c["y"])(r,o,l,u)}function I(e,t){const r=P(e,t,b["d"].get()),{basis1:i,basis2:n}=e,a=Object(c["r"])(i),s=Object(c["r"])(n),o=Math.max(Math.abs(r[0])-a,0),l=Math.max(Math.abs(r[1])-s,0),u=r[2];return o*o+l*l+u*u}function D(e,t){return Math.sqrt(I(e,t))}function L(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of te){const n=$(e,i,Q.get()),a=Object(d["d"])(n,t);a>r&&(r=a)}return Math.sqrt(r)}function N(e,t){return Object(h["p"])(e.plane,t)&&q(e,t)}function F(e,t,r,i){return H(e,r,i)}function k(e,t){const r=-e.plane[3];return Object(f["c"])(G(e),t)-r}function U(e,t,r,i){const n=k(e,t),a=Object(c["g"])(K,G(e),r-n);return Object(c["h"])(i,t,a),i}function z(e,t){return Object(c["q"])(e.basis1,t.basis1)&&Object(c["q"])(e.basis2,t.basis2)&&Object(c["q"])(e.origin,t.origin)}function B(e,t,r){return e!==r&&v(e,r),Object(s["b"])(re,t),Object(s["u"])(re,re),Object(c["s"])(r.basis1,e.basis1,re),Object(c["s"])(r.basis2,e.basis2,re),Object(c["s"])(Object(h["r"])(r.plane),Object(h["r"])(e.plane),re),Object(c["s"])(r.origin,e.origin,t),Object(h["u"])(r.plane,r.plane,r.origin),r}function V(e,t,r,i){return e!==i&&v(e,i),Object(s["e"])(ie,t,r),Object(c["s"])(i.basis1,e.basis1,ie),Object(c["s"])(i.basis2,e.basis2,ie),w(i),i}function G(e){return Object(h["r"])(e.plane)}function H(e,t,r){switch(t){case u["a"].X:Object(c["m"])(r,e.basis1),Object(c["t"])(r,r);break;case u["a"].Y:Object(c["m"])(r,e.basis2),Object(c["t"])(r,r);break;case u["a"].Z:Object(c["m"])(r,G(e))}return r}function q(e,t){const r=Object(c["l"])(b["d"].get(),t,e.origin),i=Object(c["v"])(e.basis1),n=Object(c["v"])(e.basis2),a=Object(c["j"])(e.basis1,r),s=Object(c["j"])(e.basis2,r);return-a-i<0&&a-i<0&&-s-n<0&&s-n<0}function W(e,t){const r=Q.get();return Object(c["m"])(r.origin,e.origin),Object(c["m"])(r.vector,t),r}function $(e,t,r){const{basis1:i,basis2:n,origin:a}=e,s=Object(c["g"])(b["d"].get(),i,t.origin[0]),o=Object(c["g"])(b["d"].get(),n,t.origin[1]);Object(c["h"])(r.origin,s,o),Object(c["h"])(r.origin,r.origin,a);const l=Object(c["g"])(b["d"].get(),i,t.direction[0]),u=Object(c["g"])(b["d"].get(),n,t.direction[1]);return Object(c["g"])(r.vector,Object(c["h"])(l,l,u),2),r}function Z(e,t){Math.abs(Object(c["j"])(e.basis1,e.basis2)/(Object(c["r"])(e.basis1)*Object(c["r"])(e.basis2)))>1e-6&&m.warn(t,"Provided basis vectors are not perpendicular"),Math.abs(Object(c["j"])(e.basis1,G(e)))>1e-6&&m.warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-Object(c["j"])(G(e),e.origin)-e.plane[3])>1e-6&&m.warn(t,"Plane offset is not consistent with plane origin")}function X(e,t,r,i){const n=G(e);Object(h["j"])(n,t.direction,t.origin,r),Object(h["j"])(Object(h["r"])(r),n,t.origin,i)}const Y={plane:Object(h["d"])(),origin:Object(l["h"])(0,0,0),basis1:Object(l["h"])(1,0,0),basis2:Object(l["h"])(0,1,0)},J=new a["a"](h["d"]),Q=new a["a"](d["c"]),K=Object(l["f"])(),ee=new a["a"](()=>({origin:null,basis1:null,basis2:null,plane:null})),te=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],re=Object(o["d"])(),ie=Object(o["d"])(),ne=Object.freeze({__proto__:null,BoundedPlaneClass:g,create:y,wrap:O,copy:v,copyWithoutVerify:_,fromValues:j,updateUnboundedPlane:w,elevate:x,setExtent:T,fromAABoundingRect:S,intersectRay:E,intersectRayClosestSilhouette:A,closestPointOnSilhouette:C,closestPoint:R,projectPoint:M,projectPointLocal:P,distance2:I,distance:D,distanceToSilhouette:L,extrusionContainsPoint:N,axisAt:F,altitudeAt:k,setAltitudeAt:U,equals:z,transform:B,rotate:V,normal:G,UP:Y})},"0db5":function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var i=r("a4ee"),n=r("f7be"),a=r("2eab"),s=r("792b"),o=r("ce50"),c=r("e92d"),l=r("b2b2"),u=r("f4cc"),d=r("e041"),h=r("59b2"),p=(r("b50f"),r("c120"),r("cea0"),r("afcf")),f=r("d386"),b=r("09db"),m=r("0224"),g=r("a7e1"),y=r("8185");const O=c["a"].getLogger("esri.layers.mixins.PortalLayer"),v=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g["default"]({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e("chunk-213fe805").then(r.bind(null,"3b92f"));return Object(u["v"])(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(i){throw Object(u["m"])(i)||O.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${i}`),i}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>(Object(u["u"])(e),!0)))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==n["b"]?void 0:n["b"].findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,Object(l["j"])(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,r;const i=null==(t=this.portalItem)||null==(r=t.portal)?void 0:r.user;if(i)return i;const o=n["b"].findServerInfo(this.url);if(null==o||!o.owningSystemUrl)return null;const c=o.owningSystemUrl+"/sharing/rest",u=m["a"].getDefault();if(u&&u.loaded&&Object(d["F"])(u.restUrl)===Object(d["F"])(c))return u.user;const h=c+"/community/self",p=Object(l["k"])(e)?e.signal:null,f=await Object(s["d"])(Object(a["default"])(h,{authMode:"no-prompt",query:{f:"json"},signal:p}));return f.ok?y["default"].fromJSON(f.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||m["a"].getDefault());return r&&i&&!Object(d["t"])(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o["a"]("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return Object(i["a"])([Object(h["b"])({type:g["default"]})],t.prototype,"portalItem",null),Object(i["a"])([Object(p["a"])("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),Object(i["a"])([Object(b["a"])("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),Object(i["a"])([Object(h["b"])({clonable:!1})],t.prototype,"resourceReferences",void 0),Object(i["a"])([Object(h["b"])({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=Object(i["a"])([Object(f["a"])("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},"0e88":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("b2b2"),n=r("f9d0");class a{constructor(e){this.technique=e,this.refCount=0,this.refZeroFrame=0}}class s{constructor(e){this._context=e,this._perConstructorInstances=new n["a"],this._frameCounter=0,this._keepAliveFrameCount=o}get viewingMode(){return this._context.viewingMode}get constructionContext(){return this._context}dispose(){this._perConstructorInstances.forEach(e=>e.forEach(e=>e.technique.destroy())),this._perConstructorInstances.clear()}acquire(e,t){const r=t.key;let n=this._perConstructorInstances.get(e,r);if(Object(i["j"])(n)){const i=new e(this._context,t,()=>this.release(i));n=new a(i),this._perConstructorInstances.set(e,r,n)}return++n.refCount,n.technique}releaseAndAcquire(e,t,r){if(Object(i["k"])(r)){if(t.key===r.key)return r;this.release(r)}return this.acquire(e,t)}release(e){if(Object(i["j"])(e)||this._perConstructorInstances.empty)return;const t=this._perConstructorInstances.get(e.constructor,e.key);Object(i["j"])(t)||(--t.refCount,0===t.refCount&&(t.refZeroFrame=this._frameCounter))}frameUpdate(){this._frameCounter++,this._keepAliveFrameCount!==o&&this._perConstructorInstances.forEach((e,t)=>{e.forEach((e,r)=>{0===e.refCount&&e.refZeroFrame+this._keepAliveFrameCount<this._frameCounter&&(e.technique.destroy(),this._perConstructorInstances.delete(t,r))})})}async reloadAll(){const e=new Array;this._perConstructorInstances.forEach((t,r)=>{const i=async(e,t)=>{const r=t.shader;r&&(await r.reload(),e.forEach(e=>{e.technique.reload(this._context)}))};e.push(i(t,r))}),await Promise.all(e)}}const o=-1},"0eb9":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("b2b2"),n=r("8076"),a=r("e9d6");class s{constructor(){this._meterUnitOffset=0,this._renderUnitOffset=0,this._unit="meters",this._metersPerElevationInfoUnit=1,this._featureExpressionInfoContext=null,this.centerPointInElevationSR=null,this.mode=null}get featureExpressionInfoContext(){return this._featureExpressionInfoContext}get meterUnitOffset(){return this._meterUnitOffset}get unit(){return this._unit}set unit(e){this._unit=e,this._metersPerElevationInfoUnit=Object(n["a"])(e)}get requiresSampledElevationInfo(){return"absolute-height"!==this.mode}reset(){this.mode=null,this._meterUnitOffset=0,this._renderUnitOffset=0,this._featureExpressionInfoContext=null,this.unit="meters"}set offsetMeters(e){this._meterUnitOffset=e,this._renderUnitOffset=0}set offsetElevationInfoUnits(e){this._meterUnitOffset=e*this._metersPerElevationInfoUnit,this._renderUnitOffset=0}addOffsetRenderUnits(e){this._renderUnitOffset+=e}geometryZWithOffset(e,t){const r=this.calculateOffsetRenderUnits(t);return null!=this.featureExpressionInfoContext?r:e+r}calculateOffsetRenderUnits(e){let t=this._meterUnitOffset;const r=this.featureExpressionInfoContext;return null!=r&&(t+=Object(a["e"])(r)*this._metersPerElevationInfoUnit),t/e.unitInMeters+this._renderUnitOffset}setFromElevationInfo(e){this.mode=e.mode,this.unit=Object(n["c"])(e.unit)?e.unit:"meters",this.offsetElevationInfoUnits=Object(i["u"])(e.offset,0)}updateFeatureExpressionInfoContext(e,t,r){if(Object(i["j"])(e))return void(this._featureExpressionInfoContext=null);const n=e&&e.arcade;n&&Object(i["k"])(t)&&Object(i["k"])(r)?(this._featureExpressionInfoContext=Object(a["a"])(e),Object(a["g"])(this._featureExpressionInfoContext,Object(a["d"])(n.modules,t,r))):this._featureExpressionInfoContext=e}static fromElevationInfo(e){const t=new s;return Object(i["k"])(e)&&t.setFromElevationInfo(e),t}}},"0f1c":function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return g}));var i=r("fc29"),n=r("2c4f"),a=r("b2b2"),s=r("4c37");const o=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function c(e){return e instanceof i["a"]}function l(e){return e instanceof n["a"]?Object.keys(e.items):c(e)?Object(s["a"])(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n["a"]?e.items[t]:e[t]}function d(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}function h(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||d(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>-1===i.indexOf(e)),f=i.filter(e=>-1===n.indexOf(e)),b=i.filter(r=>n.indexOf(r)>-1&&u(e,r)!==u(t,r)).concat(s,f).sort(),m=h(e);if(m&&o.indexOf(m)>-1&&b.length)return{type:"complete",oldValue:e,newValue:t};let g;const y=c(e)&&c(t);for(const o of b){const i=u(e,o),n=u(t,o);let s;(y||"function"!=typeof i&&"function"!=typeof n)&&i!==n&&(null==i&&null==n||(s=r&&r[o]&&"function"==typeof r[o]?r[o](i,n):"object"==typeof i&&"object"==typeof n&&h(i)===h(n)?p(i,n):{type:"complete",oldValue:i,newValue:n},Object(a["k"])(s)&&(Object(a["k"])(g)?g.diff[o]=s:g={type:"partial",diff:{[o]:s}})))}return g}function f(e,t){if(Object(a["j"])(e))return!1;const r=t.split(".");let i=e;for(const n of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const e=i.diff[n];if(!e)return!1;i=e}}return!0}function b(e,t){for(const r of t)if(f(e,r))return!0;return!1}function m(e,t){if(!("function"==typeof e||"function"==typeof t||Object(a["j"])(e)&&Object(a["j"])(t)))return Object(a["j"])(e)||Object(a["j"])(t)||"object"==typeof e&&"object"==typeof t&&h(e)!==h(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}function g(e){if(Object(a["j"])(e))return!0;switch(e.type){case"complete":return!1;case"collection":{const t=e;for(const e of t.added)if(!g(e))return!1;for(const e of t.removed)if(!g(e))return!1;for(const e of t.changed)if(!g(e))return!1;return!0}case"partial":for(const t in e.diff)if(!g(e.diff[t]))return!1;return!0}}},"0fa6":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("e92d"),n=r("b2b2"),a=r("d17d"),s=r("8539");const o=i["a"].getLogger("esri.views.webgl.VertexArrayObject");class c{constructor(e,t,r,i,n=null){this._context=e,this._locations=t,this._layout=r,this._buffers=i,this._indexBuffer=n,this._glName=null,this._initialized=!1,e.instanceCounter.increment(a["t"].VAO,this)}get glName(){return this._glName}get vertexBuffers(){return this._buffers}get indexBuffer(){return this._indexBuffer}get size(){return Object.keys(this._buffers).reduce((e,t)=>e+this._buffers[t].size,Object(n["k"])(this._indexBuffer)?this._indexBuffer.size:0)}get layout(){return this._layout}get locations(){return this._locations}dispose(e=!0){if(this._context){if(this._glName){var t,r;const e=null==(t=this._context)||null==(r=t.capabilities)?void 0:r.vao;e?(e.deleteVertexArray(this._glName),this._glName=null):o.warn("Leaked WebGL VAO")}if(this._context.getBoundVAO()===this&&this._context.bindVAO(null),e){for(const e in this._buffers)this._buffers[e].dispose(),delete this._buffers[e];this._indexBuffer=Object(n["e"])(this._indexBuffer)}this._context.instanceCounter.decrement(a["t"].VAO,this),this._context=null}else(this._glName||e&&Object.getOwnPropertyNames(this._buffers).length>0)&&o.warn("Leaked WebGL VAO")}initialize(){if(this._initialized)return;const e=this._context.capabilities.vao;if(e){const t=e.createVertexArray();e.bindVertexArray(t),this._bindLayout(),e.bindVertexArray(null),this._glName=t}this._initialized=!0}bind(){this.initialize();const e=this._context.capabilities.vao;e?e.bindVertexArray(this.glName):(this._context.bindVAO(null),this._bindLayout())}_bindLayout(){const{_buffers:e,_layout:t,_indexBuffer:r}=this;e||o.error("Vertex buffer dictionary is empty!");const i=this._context.gl;for(const n in e){const r=e[n];r||o.error("Vertex buffer is uninitialized!");const i=t[n];i||o.error("Vertex element descriptor is empty!"),Object(s["a"])(this._context,this._locations,r,i)}Object(n["k"])(r)&&(this._context.capabilities.vao?i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,r.glName):this._context.bindBuffer(r))}unbind(){this.initialize();const e=this._context.capabilities.vao;e?e.bindVertexArray(null):this._unbindLayout()}_unbindLayout(){const{_buffers:e,_layout:t}=this;e||o.error("Vertex buffer dictionary is empty!");for(const r in e){const i=e[r];i||o.error("Vertex buffer is uninitialized!");const n=t[r];Object(s["e"])(this._context,this._locations,i,n)}Object(n["k"])(this._indexBuffer)&&this._context.unbindBuffer(this._indexBuffer.bufferType)}}},"0fc4":function(e,t,r){"use strict";function i(){return[0,0,0,0]}function n(e){return[e[0],e[1],e[2],e[3]]}function a(e,t,r,i){return[e,t,r,i]}function s(e){const t=i(),r=Math.min(4,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function o(e,t){return new Float64Array(e,t,4)}function c(){return i()}function l(){return a(1,1,1,1)}function u(){return a(1,0,0,0)}function d(){return a(0,1,0,0)}function h(){return a(0,0,1,0)}function p(){return a(0,0,0,1)}r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return i})),r.d(t,"f",(function(){return s})),r.d(t,"g",(function(){return a}));const f=c(),b=l(),m=u(),g=d(),y=h(),O=p();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,fromArray:s,createView:o,zeros:c,ones:l,unitX:u,unitY:d,unitZ:h,unitW:p,ZEROS:f,ONES:b,UNIT_X:m,UNIT_Y:g,UNIT_Z:y,UNIT_W:O})},"0fe9":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("2c4f"),s=r("7ffa"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("c128"),d=r("c528");const h=a["a"].ofType({base:null,key:"type",typeMap:{fill:u["a"]}});let p=i=class extends d["a"]{constructor(e){super(e),this.symbolLayers=new h,this.type="mesh-3d"}clone(){return new i({styleOrigin:Object(s["a"])(this.styleOrigin),symbolLayers:Object(s["a"])(this.symbolLayers),thumbnail:Object(s["a"])(this.thumbnail)})}};Object(n["a"])([Object(o["b"])({type:h})],p.prototype,"symbolLayers",void 0),Object(n["a"])([Object(c["a"])({MeshSymbol3D:"mesh-3d"},{readOnly:!0})],p.prototype,"type",void 0),p=i=Object(n["a"])([Object(l["a"])("esri.symbols.MeshSymbol3D")],p);const f=p},1038:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return u}));var i=r("e431"),n=r("0b2d"),a=r("579f");let s=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const o=new Uint16Array([0]),c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function l(e){if(1===e)return o;if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>s.length){const t=Math.max(2*s.length,e);s=new Uint32Array(t);for(let e=0;e<s.length;e++)s[e]=e}return new Uint32Array(s.buffer,0,e)}function u(e){if(1===e)return new Uint16Array(o);if(e<c.length)return new Uint16Array(c.slice(0,e));if(e>s.length){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}return new Uint32Array(s.slice(0,e))}function d(e,t,r){if(!e)return!1;const{size:n,data:s}=e;Object(i["y"])(r,0,0,0),Object(i["y"])(g,0,0,0);let o=0,c=0;for(let l=0;l<t.length-2;l+=3){const e=t[l+0]*n,u=t[l+1]*n,d=t[l+2]*n;Object(i["y"])(f,s[e+0],s[e+1],s[e+2]),Object(i["y"])(b,s[u+0],s[u+1],s[u+2]),Object(i["y"])(m,s[d+0],s[d+1],s[d+2]);const h=Object(a["b"])(f,b,m);h?(Object(i["h"])(f,f,b),Object(i["h"])(f,f,m),Object(i["g"])(f,f,1/3*h),Object(i["h"])(r,r,f),o+=h):(Object(i["h"])(g,g,f),Object(i["h"])(g,g,b),Object(i["h"])(g,g,m),c+=3)}return(0!==c||0!==o)&&(0!==o?(Object(i["g"])(r,r,1/o),!0):0!==c&&(Object(i["g"])(r,g,1/c),!0))}function h(e,t,r){if(!e||!t)return!1;const{size:n,data:a}=e;Object(i["y"])(r,0,0,0);let s=-1,o=0;for(let i=0;i<t.length;i++){const e=t[i]*n;s!==e&&(r[0]+=a[e+0],r[1]+=a[e+1],r[2]+=a[e+2],o++),s=e}return o>1&&Object(i["g"])(r,r,1/o),o>0}function p(e,t,r,n){if(!e)return!1;const{size:a,data:s}=e;Object(i["y"])(n,0,0,0),Object(i["y"])(g,0,0,0);let o=0,c=0;const l=t?t.length-1:s.length/a-1,u=l+(r?2:0);for(let d=0;d<u;d+=2){const e=d<l?d:l,r=d<l?d+1:0,u=(t?t[e]:e)*a,h=(t?t[r]:r)*a;f[0]=s[u+0],f[1]=s[u+1],f[2]=s[u+2],b[0]=s[h+0],b[1]=s[h+1],b[2]=s[h+2],Object(i["g"])(f,Object(i["h"])(f,f,b),.5);const p=Object(i["p"])(f,b);p>0?(Object(i["h"])(n,n,Object(i["g"])(f,f,p)),o+=p):(Object(i["h"])(g,g,f),c++)}return 0!==o?(Object(i["g"])(n,n,1/o),!0):0!==c&&(Object(i["g"])(n,g,1/c),!0)}const f=Object(n["f"])(),b=Object(n["f"])(),m=Object(n["f"])(),g=Object(n["f"])()},1091:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return n}));var i=r("c120");const n=()=>!!Object(i["a"])("enable-feature:force-wosr"),a=()=>!!Object(i["a"])("enable-feature:direct-3d-object-feature-layer-display"),s=()=>!!Object(i["a"])("enable-feature:precipitation")},"10eb":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("c246");const n=/\[([^\[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{const a=new i["a"];if(a.read(e,r),a.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;a.labelExpression=a.labelExpression.replace(n,(t,r)=>`[${s(r,e)}]`)}return a}):null}function s(e,t){if(!t)return e;const r=e.toLowerCase();for(let i=0;i<t.length;i++){const e=t[i].name;if(e.toLowerCase()===r)return e}return e}},1153:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return O})),r.d(t,"c",(function(){return v})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return y})),r.d(t,"f",(function(){return _})),r.d(t,"g",(function(){return m})),r.d(t,"h",(function(){return f})),r.d(t,"i",(function(){return p})),r.d(t,"j",(function(){return d})),r.d(t,"k",(function(){return h})),r.d(t,"l",(function(){return b})),r.d(t,"m",(function(){return u}));var i=r("3349"),n=r("02f1"),a=r("7577"),s=r("0fc4");const o=Object(s["e"])();class c{constructor(e){this.message=e}toString(){return"AssertException: "+this.message}}function l(e,t){if(!e)throw t=t||"assert",console.log(new Error(t).stack),new c(t)}function u(e,t){e||(t=t||"",console.warn("Verify failed: "+t+"\n"+new Error("verify").stack))}function d(e,t,r,i){let n,a=(r[0]-e[0])/t[0],s=(i[0]-e[0])/t[0];a>s&&(n=a,a=s,s=n);let o=(r[1]-e[1])/t[1],c=(i[1]-e[1])/t[1];if(o>c&&(n=o,o=c,c=n),a>c||o>s)return!1;o>a&&(a=o),c<s&&(s=c);let l=(r[2]-e[2])/t[2],u=(i[2]-e[2])/t[2];return l>u&&(n=l,l=u,u=n),!(a>u||l>s)&&(u<s&&(s=u),!(s<0))}function h(e,t,r,i,a,s=Object(n["b"])()){const o=(i[a]-r[a])*(t[0]-e[0])-(i[0]-r[0])*(t[a]-e[a]),c=(i[0]-r[0])*(e[a]-r[a])-(i[a]-r[a])*(e[0]-r[0]);if(0===o)return!1;const l=c/o;return s[0]=e[0]+l*(t[0]-e[0]),s[1]=e[a]+l*(t[a]-e[a]),!0}function p(e,t,r,i,n){n||(n=e),o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=1,Object(a["m"])(o,o,t),n.length>2&&(n[2]=-o[2]),Object(a["m"])(o,o,r),l(0!==o[3]),n[0]=o[0]/o[3],n[1]=o[1]/o[3],n[2]=o[2]/o[3],n[0]=(.5*n[0]+.5)*i[2]+i[0],n[1]=(.5*n[1]+.5)*i[3]+i[1]}function f(e,t){return Math.log(e)/Math.log(t)}function b(e,t,r,i){e[12]=t,e[13]=r,e[14]=i}function m(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&1===e[15]}function g(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}function y(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}function O(e,t,r){return 2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r))}function v(e,t,r){return 2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r))}function _(e,t,r,n,a){const s=e;0===e[11]?(n[0]=2/(t*s[0]),n[1]=2/(r*s[5]),n[2]=(1+s[12])/s[0],n[3]=(1+s[13])/s[5],Object(i["s"])(a,0,1)):(n[0]=-2/(t*s[0]),n[1]=-2/(r*s[5]),n[2]=(1-s[8])/s[0],n[3]=(1-s[9])/s[5],Object(i["s"])(a,1,0))}},"11d8":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("55f0");class n extends i["a"]{constructor(e=3,t=.01,r=.95,i=12){super(e,t,r,i)}add(e,t){if(this.value.hasLastValue){const t=this.value.lastValue;let r=e-t;for(;r>Math.PI;)r-=2*Math.PI;for(;r<-Math.PI;)r+=2*Math.PI;e=t+r}super.add(e,t)}}},1219:function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i,n=r("a4ee"),a=r("b50f"),s=r("7ffa"),o=r("b2b2"),c=r("59b2"),l=(r("cea0"),r("d386")),u=r("09db"),d=r("3af1"),h=r("3760"),p=r("4ae5"),f=r("5996"),b=r("57e5"),m=r("2172"),g=r("32ed"),y=r("f8d4"),O=r("f547"),v=r("9786"),_=r("3723");function j(e){return!Array.isArray(e[0])}let w=i=class extends h["a"]{constructor(...e){super(...e),this.rings=[],this.type="polygon"}static fromExtent(e){const t=e.clone().normalize(),r=e.spatialReference;let n=!1,a=!1;for(const i of t)i.hasZ&&(n=!0),i.hasM&&(a=!0);const s={rings:t.map((function(e){const t=[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]];if(n&&e.hasZ){const r=e.zmin+.5*(e.zmax-e.zmin);for(let e=0;e<t.length;e++)t[e].push(r)}if(a&&e.hasM){const r=e.mmin+.5*(e.mmax-e.mmin);for(let e=0;e<t.length;e++)t[e].push(r)}return t})),spatialReference:r};return n&&(s.hasZ=!0),a&&(s.hasM=!0),new i(s)}normalizeCtorArgs(e,t){let r,i,n=null,a=null;return e&&!Array.isArray(e)?(n=e.rings?e.rings:null,t||(e.spatialReference?t=e.spatialReference:e.rings||(t=e)),r=e.hasZ,i=e.hasM):n=e,n=n||[],t=t||f["a"].WGS84,n.length&&n[0]&&null!=n[0][0]&&"number"==typeof n[0][0]&&(n=[n]),a=n[0]&&n[0][0],a&&(void 0===r&&void 0===i?(r=a.length>2,i=a.length>3):void 0===r?r=i?a.length>3:a.length>2:void 0===i&&(i=r?a.length>3:a.length>2)),{rings:n,spatialReference:t,hasZ:r,hasM:i}}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const e=Object(b["b"])(this);if(!e||isNaN(e[0])||isNaN(e[1])||this.hasZ&&isNaN(e[2]))return null;const t=new p["a"];return t.x=e[0],t.y=e[1],t.spatialReference=this.spatialReference,this.hasZ&&(t.z=e[2]),t}get extent(){const{spatialReference:e}=this,t=Object(y["b"])(this);if(!t)return null;const r=new d["a"](t);return r.spatialReference=e,r}get isSelfIntersecting(){return Object(O["d"])(this.rings)}writeRings(e,t){t.rings=Object(s["a"])(this.rings)}addRing(e){if(!e)return;const t=this.rings,r=t.length;if(j(e)){const i=[];for(let t=0,r=e.length;t<r;t++)i[t]=e[t].toArray();t[r]=i}else t[r]=e.concat();return this.notifyChange("rings"),this}clone(){const e=new i;return e.spatialReference=this.spatialReference,e.rings=Object(s["a"])(this.rings),e.hasZ=this.hasZ,e.hasM=this.hasM,e}equals(e){if(this===e)return!0;if(Object(o["j"])(e))return!1;const t=this.spatialReference,r=e.spatialReference;if(Object(o["k"])(t)!==Object(o["k"])(r))return!1;if(Object(o["k"])(t)&&Object(o["k"])(r)&&!t.equals(r))return!1;if(this.rings.length!==e.rings.length)return!1;const i=([e,t,r,i],[n,a,s,o])=>e===n&&t===a&&(null==r&&null==s||r===s)&&(null==i&&null==o||i===o);for(let n=0;n<this.rings.length;n++){const t=this.rings[n],r=e.rings[n];if(!Object(a["e"])(t,r,i))return!1}return!0}contains(e){if(!e)return!1;const t=Object(v["d"])(e,this.spatialReference);return Object(m["g"])(this,Object(o["k"])(t)?t:e)}isClockwise(e){let t;return t=j(e)?e.map(e=>this.hasZ?this.hasM?[e.x,e.y,e.z,e.m]:[e.x,e.y,e.z]:[e.x,e.y]):e,Object(g["f"])(t,this.hasM,this.hasZ)}getPoint(e,t){if(!this._validateInputs(e,t))return null;const r=this.rings[e][t],i=this.hasZ,n=this.hasM;return i&&!n?new p["a"](r[0],r[1],r[2],void 0,this.spatialReference):n&&!i?new p["a"](r[0],r[1],void 0,r[2],this.spatialReference):i&&n?new p["a"](r[0],r[1],r[2],r[3],this.spatialReference):new p["a"](r[0],r[1],this.spatialReference)}insertPoint(e,t,r){return this._validateInputs(e,t,!0)?(Object(_["a"])(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[e].splice(t,0,r),this.notifyChange("rings"),this):this}removePoint(e,t){if(!this._validateInputs(e,t))return null;const r=new p["a"](this.rings[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(e){if(!this._validateInputs(e,null))return null;const t=this.rings.splice(e,1)[0],r=this.spatialReference,i=t.map(e=>new p["a"](e,r));return this.notifyChange("rings"),i}setPoint(e,t,r){return this._validateInputs(e,t)?(Object(_["a"])(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[e][t]=r,this.notifyChange("rings"),this):this}_validateInputs(e,t,r=!1){if(null==e||e<0||e>=this.rings.length)return!1;if(null!=t){const i=this.rings[e];if(r&&(t<0||t>i.length))return!1;if(!r&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};Object(n["a"])([Object(c["b"])({readOnly:!0})],w.prototype,"cache",null),Object(n["a"])([Object(c["b"])({readOnly:!0})],w.prototype,"centroid",null),Object(n["a"])([Object(c["b"])({readOnly:!0})],w.prototype,"extent",null),Object(n["a"])([Object(c["b"])({readOnly:!0})],w.prototype,"isSelfIntersecting",null),Object(n["a"])([Object(c["b"])({type:[[[Number]]],json:{write:{isRequired:!0}}})],w.prototype,"rings",void 0),Object(n["a"])([Object(u["a"])("rings")],w.prototype,"writeRings",null),w=i=Object(n["a"])([Object(l["a"])("esri.geometry.Polygon")],w),w.prototype.toJSON.isDefaultToJSON=!0;const x=w},"121a":function(e,t,r){"use strict";r.d(t,"a",(function(){return $}));var i=r("a4ee"),n=(r("1b8f"),r("e20b")),a=r("cf9c"),s=r("ce6d"),o=r("af40"),c=(r("c120"),r("7ffa")),l=r("e92d"),u=r("b2b2"),d=r("fab3"),h=r("f4cc"),p=r("477c"),f=r("8eed"),b=r("59b2"),m=r("1a3e"),g=r("d386"),y=r("c0d3"),O=r("cb26"),v=r("5ab2");r("69e9");const _={handleInterceptedEvent:(e,t,r,i)=>(e.scheduleRender(),t.properties["on"+i.type].apply(t.properties.bind||r,[i]))},j={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{e.style[t]=r}},w=e=>({...j,...e}),x=(e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r},T=(e,t)=>e.find(t),S=(e,t,r=!1)=>{let i=e;return t.forEach((e,n)=>{var a;const s=null!=(a=i)&&a.children?T(i.children,t=>t.domNode===e):void 0;r&&!s&&n!==t.length-1||(i=s)}),i},E=e=>{let t;const r={..._,...e},i=w(r),n=i.performanceLogger;let a,s=!0,o=!1;const c=[],l=[],u=(e,a,s)=>{let o;i.eventHandlerInterceptor=(e,i,a,s)=>function(e){let i;n("domEvent",e);const a=x(e.currentTarget,o.domNode),s=a.some(e=>{var t;return customElements.get(null==e||null==(t=e.tagName)?void 0:t.toLowerCase())});if(e.eventPhase!==Event.CAPTURING_PHASE&&s){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(o.domNode)).filter(e=>e.getRootNode()===e.ownerDocument).reverse();i=S(o.getLastRender(),r,!0)}else a.reverse(),i=S(o.getLastRender(),a);let c;return i&&(c=r.handleInterceptedEvent(t,i,this,e)),n("domEventProcessed",e),c},null==r.postProcessProjectionOptions||r.postProcessProjectionOptions(i);const u=s();o=e(a,u,i),c.push(o),l.push(s),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(o,u)};let d=()=>{if(a=void 0,s){s=!1,n("renderStart",void 0);for(let e=0;e<c.length;e++){const t=l[e]();n("rendered",void 0),c[e].update(t),n("patched",void 0)}n("renderDone",void 0),s=!0}};return r.modifyDoRenderImplementation&&(d=r.modifyDoRenderImplementation(d,c,l)),t={renderNow:d,scheduleRender:()=>{a||o||(a=requestAnimationFrame(d))},stop:()=>{a&&(cancelAnimationFrame(a),a=void 0),o=!0},resume:()=>{o=!1,s=!0,t.scheduleRender()},append:(e,t)=>{u(v["b"].append,e,t)},insertBefore:(e,t)=>{u(v["b"].insertBefore,e,t)},merge:(e,t)=>{u(v["b"].merge,e,t)},replace:(e,t)=>{u(v["b"].replace,e,t)},detach:e=>{for(let t=0;t<l.length;t++)if(l[t]===e)return l.splice(t,1),c.splice(t,1)[0];throw new Error("renderFunction was not found")}},t};var A=r("3105"),C=r("b2cd"),R=r("e041");
  238. /*!
  239. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  240. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  241. */let M;function P(){Object(A["i"])(Object(R["C"])(Object(C["b"])(M)))}M="components/assets";var I=r("deae2"),D=r("560e"),L=r("702a"),N=r("60e6"),F=r("2035"),k=r("6323");const U="esri.widgets.Widget",z=l["a"].getLogger(U);let B=0;const V={widgetIcon:"esri-icon-checkbox-unchecked"};function G(e,t){for(const r in t)null!=e[r]&&("object"==typeof e[r]&&"object"==typeof t[r]?G(e[r],t[r]):e[r]=t[r]);return e}const H=E({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,i,n,a)=>{const s=t(e,i,n,a),o=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in n)||o){const t=e[2].toLowerCase()+e.slice(3),r=e=>s.call(n,e);n.addEventListener(t,r,o);const i=()=>n.removeEventListener(t,r,o),c=a.afterRemoved;a.afterRemoved=e=>{null==c||c(e),i()}}return s}},handleInterceptedEvent(e,t,r,i){const{eventPhase:n,type:a}=i,s=n===Event.CAPTURING_PHASE;let o=`on${a}${s?"capture":""}`;const c=t.properties;(o in c||(o=`on${a[0].toUpperCase()}${a.slice(1)}${s?"Capture":""}`,o in c))&&(Object(D["a"])(),e.scheduleRender(),c[o].call(c.bind||r,i))}});let q=!1,W=class extends(Object(d["b"])(s["a"].EventedAccessor)){constructor(e,t){super(e,t),this._attached=!1,this._internalHandles=new o["a"],this._projector=H,this._readyForTrueRender=!1,this.domNode=null,this.iconClass=V.widgetIcon,this.label=this.declaredClass.split(".").pop(),this.visible=!0,this.key=this,this._loadLocale=Object(h["i"])(async()=>{if(this._messageBundleProps&&this._messageBundleProps.length){const e=await Object(h["j"])(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{let r=await Object(k["a"])(e);this.uiStrings&&Object.keys(this.uiStrings)&&(r=G(Object(c["a"])(r),this.uiStrings)),this[t]=r}));for(const t of e)t.error&&z.error("widget-intl:locale-error",this.declaredClass,t.error)}await this.loadLocale()}),P();const r=["light","dark"],i=Object(N["b"])()||"light";r.includes(i)||Object(n["a"])(z,"The following themes are deprecated: light-blue, dark-blue, light-green, dark-green, light-purple, dark-purple, light-red, and dark-red.",{version:"4.19",warnOnce:!0,see:"https://developers.arcgis.com/javascript/latest/styling/"});const a="esri-widget-uid-"+Object(f["a"])(),s=this.render.bind(this);this._trackingTarget=new O["a"](()=>this.scheduleRender());const l=()=>{var e;if(!this._readyForTrueRender||this.destroyed)return null;if(!this.visible)return{vnodeSelector:"div",properties:{key:a,class:"",styles:{display:"none"}},domNode:void 0,children:void 0,text:void 0};const t=s();let{properties:r}=t;r||(t.properties=r={});let{key:i,styles:n}=r;i||(r.key=a),n||(r.styles=n={}),n.display||(n.display="");let o=0;return null==(e=t.children)||e.forEach(e=>{if(Object(I["b"])(e.vnodeSelector))return;let{properties:t}=e;t||(e.properties=t={}),t.key||(t.key=`${this.id}--${o++}`)}),Object(I["c"])(this,t)};this.render=()=>{if(q)return l();let e=Object(D["c"])(this);if(e)return e;this._trackingTarget.clear(),q=!0;try{e=Object(y["b"])(this._trackingTarget,l)}finally{q=!1}return Object(D["d"])(this,e),e},this.addResolvingPromise(this._resourcesFetch=this.beforeFirstRender().then(()=>{this._readyForTrueRender=!0,this._postInitialize()}))}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){return Promise.all([this.loadDependencies(),this._loadLocale()]).then(()=>{}).catch(h["w"])}async loadDependencies(){}async loadLocale(){}destroy(){this.destroyed||(this._trackingTarget=Object(u["d"])(this._trackingTarget),this.viewModel=Object(u["d"])(this.viewModel),this._detach(this.container),this._set("container",null),this._internalHandles.destroy(),this._emitter.clear(),this.render=()=>null,this._projector=null,Object(D["b"])(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return Object(a["a"])(e)}get id(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+B++}set id(e){e&&this._set("id",e)}get renderable(){return this._resourcesFetch}get test(){return{projector:this._projector,handles:this._internalHandles}}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(Object(D["b"])(this),this._projector.scheduleRender())}classes(...e){return L["a"].apply(this,e)}own(e){arguments.length>1&&(e=Array.prototype.slice.call(arguments)),this._internalHandles.add(e)}renderNow(){Object(D["b"])(this),this._projector.renderNow()}_postInitialize(){var e;if(this.destroyed)return;this.scheduleRender(),null!=(e=this._delegatedEventNames)&&e.length&&this._internalHandles.add(Object(p["e"])(()=>this.viewModel,(e,t)=>{t&&this._internalHandles.remove("delegated-events"),e&&this._internalHandles.add(this._delegatedEventNames.map(t=>e.on(t,e=>{this.emit(t,e)})),"delegated-events")},p["a"])),this.postInitialize();const t=async()=>{await this._loadLocale().catch(h["w"]),this.scheduleRender()};this._internalHandles.add([Object(F["c"])(t),Object(p["e"])(()=>this.uiStrings,t),Object(p["f"])(()=>this.container,e=>{this.destroyed||this._attach(e)},{initial:!0,once:!0})])}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){e&&this._attached&&(this._projector.detach(this.render),e.parentNode&&e.parentNode.removeChild(e),this._attached=!1)}};W[I["a"]]=!0,Object(i["a"])([Object(b["b"])()],W.prototype,"_readyForTrueRender",void 0),Object(i["a"])([Object(b["b"])({value:null})],W.prototype,"container",null),Object(i["a"])([Object(m["a"])("container")],W.prototype,"castContainer",null),Object(i["a"])([Object(b["b"])({aliasOf:"container"})],W.prototype,"domNode",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"iconClass",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"id",null),Object(i["a"])([Object(b["b"])()],W.prototype,"label",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"renderable",null),Object(i["a"])([Object(b["b"])()],W.prototype,"uiStrings",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"viewModel",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"visible",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"key",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"children",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"afterCreate",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"afterUpdate",void 0),Object(i["a"])([Object(b["b"])()],W.prototype,"afterRemoved",void 0),W=Object(i["a"])([Object(g["a"])(U)],W);const $=W},1233:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return o}));r("c120");const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function a(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}function s(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=n[r],{getter:s,setter:o,multiplier:c}=e;if("months"===r){const e=a(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[s]()+t*c)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function c(e,t,r){return 0===e?0:e*i[t]/i[r]}},1289:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("a7a7");let c=i=class extends o["a"]{constructor(e){super(e),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new i({description:this.description,displayType:this.displayType,title:this.title})}};Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],c.prototype,"description",void 0),Object(n["a"])([Object(a["b"])({type:["auto","preview","list"],json:{write:!0}})],c.prototype,"displayType",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],c.prototype,"title",void 0),Object(n["a"])([Object(a["b"])({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.popup.content.AttachmentsContent")],c);const l=c},1315:function(e,t,r){"use strict";function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},a.apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,r){return u=l()?Reflect.construct:function(e,t,r){var i=[null];i.push.apply(i,t);var n=Function.bind.apply(e,i),a=new n;return r&&c(a,r.prototype),a},u.apply(null,arguments)}function d(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function h(e){var t="function"===typeof Map?new Map:void 0;return h=function(e){if(null===e||!d(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},h(e)}function p(e,t){if(null==e)return{};var r,i,n={},a=Object.keys(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||(n[r]=e[r]);return n}function f(e,t){if(e){if("string"===typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function m(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=f(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t}(h(Error)),y=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return s(t,e),t}(g),O=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return s(t,e),t}(g),v=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return s(t,e),t}(g),_=function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t}(g),j=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return s(t,e),t}(g),w=function(e){function t(){return e.apply(this,arguments)||this}return s(t,e),t}(g),x=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return s(t,e),t}(g),T="numeric",S="short",E="long",A={year:T,month:T,day:T},C={year:T,month:S,day:T},R={year:T,month:S,day:T,weekday:S},M={year:T,month:E,day:T},P={year:T,month:E,day:T,weekday:E},I={hour:T,minute:T},D={hour:T,minute:T,second:T},L={hour:T,minute:T,second:T,timeZoneName:S},N={hour:T,minute:T,second:T,timeZoneName:E},F={hour:T,minute:T,hourCycle:"h23"},k={hour:T,minute:T,second:T,hourCycle:"h23"},U={hour:T,minute:T,second:T,hourCycle:"h23",timeZoneName:S},z={hour:T,minute:T,second:T,hourCycle:"h23",timeZoneName:E},B={year:T,month:T,day:T,hour:T,minute:T},V={year:T,month:T,day:T,hour:T,minute:T,second:T},G={year:T,month:S,day:T,hour:T,minute:T},H={year:T,month:S,day:T,hour:T,minute:T,second:T},q={year:T,month:S,day:T,weekday:S,hour:T,minute:T},W={year:T,month:E,day:T,hour:T,minute:T,timeZoneName:S},$={year:T,month:E,day:T,hour:T,minute:T,second:T,timeZoneName:S},Z={year:T,month:E,day:T,weekday:E,hour:T,minute:T,timeZoneName:E},X={year:T,month:E,day:T,weekday:E,hour:T,minute:T,second:T,timeZoneName:E};function Y(e){return"undefined"===typeof e}function J(e){return"number"===typeof e}function Q(e){return"number"===typeof e&&e%1===0}function K(e){return"string"===typeof e}function ee(e){return"[object Date]"===Object.prototype.toString.call(e)}function te(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function re(e){return Array.isArray(e)?e:[e]}function ie(e,t,r){if(0!==e.length)return e.reduce((function(e,i){var n=[t(i),i];return e&&r(e[0],n[0])===e[0]?e:n}),null)[1]}function ne(e,t){return t.reduce((function(t,r){return t[r]=e[r],t}),{})}function ae(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function se(e,t,r){return Q(e)&&e>=t&&e<=r}function oe(e,t){return e-t*Math.floor(e/t)}function ce(e,t){void 0===t&&(t=2);var r,i=e<0;return r=i?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function le(e){return Y(e)||null===e||""===e?void 0:parseInt(e,10)}function ue(e){return Y(e)||null===e||""===e?void 0:parseFloat(e)}function de(e){if(!Y(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function he(e,t,r){void 0===r&&(r=!1);var i=Math.pow(10,t),n=r?Math.trunc:Math.round;return n(e*i)/i}function pe(e){return e%4===0&&(e%100!==0||e%400===0)}function fe(e){return pe(e)?366:365}function be(e,t){var r=oe(t-1,12)+1,i=e+(t-r)/12;return 2===r?pe(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function me(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function ge(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===t||3===i?53:52}function ye(e){return e>99?e:e>60?1900+e:2e3+e}function Oe(e,t,r,i){void 0===i&&(i=null);var n=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);var o=a({timeZoneName:t},s),c=new Intl.DateTimeFormat(r,o).formatToParts(n).find((function(e){return"timezonename"===e.type.toLowerCase()}));return c?c.value:null}function ve(e,t){var r=parseInt(e,10);Number.isNaN(r)&&(r=0);var i=parseInt(t,10)||0,n=r<0||Object.is(r,-0)?-i:i;return 60*r+n}function _e(e){var t=Number(e);if("boolean"===typeof e||""===e||Number.isNaN(t))throw new w("Invalid unit value "+e);return t}function je(e,t){var r={};for(var i in e)if(ae(e,i)){var n=e[i];if(void 0===n||null===n)continue;r[t(i)]=_e(n)}return r}function we(e,t){var r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),n=e>=0?"+":"-";switch(t){case"short":return""+n+ce(r,2)+":"+ce(i,2);case"narrow":return""+n+r+(i>0?":"+i:"");case"techie":return""+n+ce(r,2)+ce(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function xe(e){return ne(e,["hour","minute","second","millisecond"])}var Te=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,Se=["January","February","March","April","May","June","July","August","September","October","November","December"],Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ae=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ce(e){switch(e){case"narrow":return[].concat(Ae);case"short":return[].concat(Ee);case"long":return[].concat(Se);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Re=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Me=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pe=["M","T","W","T","F","S","S"];function Ie(e){switch(e){case"narrow":return[].concat(Pe);case"short":return[].concat(Me);case"long":return[].concat(Re);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var De=["AM","PM"],Le=["Before Christ","Anno Domini"],Ne=["BC","AD"],Fe=["B","A"];function ke(e){switch(e){case"narrow":return[].concat(Fe);case"short":return[].concat(Ne);case"long":return[].concat(Le);default:return null}}function Ue(e){return De[e.hour<12?0:1]}function ze(e,t){return Ie(t)[e.weekday-1]}function Be(e,t){return Ce(t)[e.month-1]}function Ve(e,t){return ke(t)[e.year<0?0:1]}function Ge(e,t,r,i){void 0===r&&(r="always"),void 0===i&&(i=!1);var n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&a){var s="days"===e;switch(t){case 1:return s?"tomorrow":"next "+n[e][0];case-1:return s?"yesterday":"last "+n[e][0];case 0:return s?"today":"this "+n[e][0]}}var o=Object.is(t,-0)||t<0,c=Math.abs(t),l=1===c,u=n[e],d=i?l?u[1]:u[2]||u[1]:l?n[e][0]:e;return o?c+" "+d+" ago":"in "+c+" "+d}function He(e,t){for(var r,i="",n=m(e);!(r=n()).done;){var a=r.value;a.literal?i+=a.val:i+=t(a.val)}return i}var qe={D:A,DD:C,DDD:M,DDDD:P,t:I,tt:D,ttt:L,tttt:N,T:F,TT:k,TTT:U,TTTT:z,f:B,ff:G,fff:W,ffff:Z,F:V,FF:H,FFF:$,FFFF:X},We=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,r){return void 0===r&&(r={}),new e(t,r)},e.parseFormat=function(e){for(var t=null,r="",i=!1,n=[],a=0;a<e.length;a++){var s=e.charAt(a);"'"===s?(r.length>0&&n.push({literal:i,val:r}),t=null,r="",i=!i):i||s===t?r+=s:(r.length>0&&n.push({literal:!1,val:r}),r=s,t=s)}return r.length>0&&n.push({literal:i,val:r}),n},e.macroTokenToFormatOpts=function(e){return qe[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());var r=this.systemLoc.dtFormatter(e,a({},this.opts,t));return r.format()},t.formatDateTime=function(e,t){void 0===t&&(t={});var r=this.loc.dtFormatter(e,a({},this.opts,t));return r.format()},t.formatDateTimeParts=function(e,t){void 0===t&&(t={});var r=this.loc.dtFormatter(e,a({},this.opts,t));return r.formatToParts()},t.resolvedOptions=function(e,t){void 0===t&&(t={});var r=this.loc.dtFormatter(e,a({},this.opts,t));return r.resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ce(e,t);var r=a({},this.opts);return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)},t.formatDateTimeFromString=function(t,r){var i=this,n="en"===this.loc.listingMode(),a=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=function(e,r){return i.loc.extract(t,e,r)},o=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},c=function(){return n?Ue(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod")},l=function(e,r){return n?Be(t,e):s(r?{month:e}:{month:e,day:"numeric"},"month")},u=function(e,r){return n?ze(t,e):s(r?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(r){var n=e.macroTokenToFormatOpts(r);return n?i.formatWithSystemDefault(t,n):r},h=function(e){return n?Ve(t,e):s({era:e},"era")},p=function(e){switch(e){case"S":return i.num(t.millisecond);case"u":case"SSS":return i.num(t.millisecond,3);case"s":return i.num(t.second);case"ss":return i.num(t.second,2);case"uu":return i.num(Math.floor(t.millisecond/10),2);case"uuu":return i.num(Math.floor(t.millisecond/100));case"m":return i.num(t.minute);case"mm":return i.num(t.minute,2);case"h":return i.num(t.hour%12===0?12:t.hour%12);case"hh":return i.num(t.hour%12===0?12:t.hour%12,2);case"H":return i.num(t.hour);case"HH":return i.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return o({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:i.loc.locale});case"z":return t.zoneName;case"a":return c();case"d":return a?s({day:"numeric"},"day"):i.num(t.day);case"dd":return a?s({day:"2-digit"},"day"):i.num(t.day,2);case"c":return i.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return i.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return a?s({month:"numeric",day:"numeric"},"month"):i.num(t.month);case"LL":return a?s({month:"2-digit",day:"numeric"},"month"):i.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return a?s({month:"numeric"},"month"):i.num(t.month);case"MM":return a?s({month:"2-digit"},"month"):i.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return a?s({year:"numeric"},"year"):i.num(t.year);case"yy":return a?s({year:"2-digit"},"year"):i.num(t.year.toString().slice(-2),2);case"yyyy":return a?s({year:"numeric"},"year"):i.num(t.year,4);case"yyyyyy":return a?s({year:"numeric"},"year"):i.num(t.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return i.num(t.weekYear.toString().slice(-2),2);case"kkkk":return i.num(t.weekYear,4);case"W":return i.num(t.weekNumber);case"WW":return i.num(t.weekNumber,2);case"o":return i.num(t.ordinal);case"ooo":return i.num(t.ordinal,3);case"q":return i.num(t.quarter);case"qq":return i.num(t.quarter,2);case"X":return i.num(Math.floor(t.ts/1e3));case"x":return i.num(t.ts);default:return d(e)}};return He(e.parseFormat(r),p)},t.formatDurationFromString=function(t,r){var i=this,n=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},a=function(e){return function(t){var r=n(t);return r?i.num(e.get(r),t.length):t}},s=e.parseFormat(r),o=s.reduce((function(e,t){var r=t.literal,i=t.val;return r?e:e.concat(i)}),[]),c=t.shiftTo.apply(t,o.map(n).filter((function(e){return e})));return He(s,a(c))},e}(),$e=function(){function e(e,t){this.reason=e,this.explanation=t}var t=e.prototype;return t.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Ze=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new x},t.formatOffset=function(e,t){throw new x},t.offset=function(e){throw new x},t.equals=function(e){throw new x},n(e,[{key:"type",get:function(){throw new x}},{key:"name",get:function(){throw new x}},{key:"isUniversal",get:function(){throw new x}},{key:"isValid",get:function(){throw new x}}]),e}(),Xe=null,Ye=function(e){function t(){return e.apply(this,arguments)||this}s(t,e);var r=t.prototype;return r.offsetName=function(e,t){var r=t.format,i=t.locale;return Oe(e,r,i)},r.formatOffset=function(e,t){return we(this.offset(e),t)},r.offset=function(e){return-new Date(e).getTimezoneOffset()},r.equals=function(e){return"system"===e.type},n(t,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Xe&&(Xe=new t),Xe}}]),t}(Ze),Je={};function Qe(e){return Je[e]||(Je[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Je[e]}var Ke={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function et(e,t){var r=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),n=i[1],a=i[2],s=i[3],o=i[4],c=i[5],l=i[6],u=i[7];return[s,n,a,o,c,l,u]}function tt(e,t){for(var r=e.formatToParts(t),i=[],n=0;n<r.length;n++){var a=r[n],s=a.type,o=a.value,c=Ke[s];"era"===s?i[c]=o:Y(c)||(i[c]=parseInt(o,10))}return i}var rt={},it=function(e){function t(r){var i;return i=e.call(this)||this,i.zoneName=r,i.valid=t.isValidZone(r),i}s(t,e),t.create=function(e){return rt[e]||(rt[e]=new t(e)),rt[e]},t.resetCache=function(){rt={},Je={}},t.isValidSpecifier=function(e){return this.isValidZone(e)},t.isValidZone=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(t){return!1}};var r=t.prototype;return r.offsetName=function(e,t){var r=t.format,i=t.locale;return Oe(e,r,i,this.name)},r.formatOffset=function(e,t){return we(this.offset(e),t)},r.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var r=Qe(this.name),i=r.formatToParts?tt(r,t):et(r,t),n=i[0],a=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6];"BC"===o&&(n=1-Math.abs(n));var d=24===c?0:c,h=me({year:n,month:a,day:s,hour:d,minute:l,second:u,millisecond:0}),p=+t,f=p%1e3;return p-=f>=0?f:1e3+f,(h-p)/6e4},r.equals=function(e){return"iana"===e.type&&e.name===this.name},n(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Ze),nt=null,at=function(e){function t(t){var r;return r=e.call(this)||this,r.fixed=t,r}s(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(ve(r[1],r[2]))}return null};var r=t.prototype;return r.offsetName=function(){return this.name},r.formatOffset=function(e,t){return we(this.fixed,t)},r.offset=function(){return this.fixed},r.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},n(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+we(this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return null===nt&&(nt=new t(0)),nt}}]),t}(Ze),st=function(e){function t(t){var r;return r=e.call(this)||this,r.zoneName=t,r}s(t,e);var r=t.prototype;return r.offsetName=function(){return null},r.formatOffset=function(){return""},r.offset=function(){return NaN},r.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Ze);function ot(e,t){if(Y(e)||null===e)return t;if(e instanceof Ze)return e;if(K(e)){var r=e.toLowerCase();return"local"===r||"system"===r?t:"utc"===r||"gmt"===r?at.utcInstance:at.parseSpecifier(r)||it.create(e)}return J(e)?at.instance(e):"object"===typeof e&&e.offset&&"number"===typeof e.offset?e:new st(e)}var ct,lt=function(){return Date.now()},ut="system",dt=null,ht=null,pt=null,ft=function(){function e(){}return e.resetCaches=function(){Nt.resetCache(),it.resetCache()},n(e,null,[{key:"now",get:function(){return lt},set:function(e){lt=e}},{key:"defaultZone",get:function(){return ot(ut,Ye.instance)},set:function(e){ut=e}},{key:"defaultLocale",get:function(){return dt},set:function(e){dt=e}},{key:"defaultNumberingSystem",get:function(){return ht},set:function(e){ht=e}},{key:"defaultOutputCalendar",get:function(){return pt},set:function(e){pt=e}},{key:"throwOnInvalid",get:function(){return ct},set:function(e){ct=e}}]),e}(),bt=["base"],mt=["padTo","floor"],gt={};function yt(e,t){void 0===t&&(t={});var r=JSON.stringify([e,t]),i=gt[r];return i||(i=new Intl.ListFormat(e,t),gt[r]=i),i}var Ot={};function vt(e,t){void 0===t&&(t={});var r=JSON.stringify([e,t]),i=Ot[r];return i||(i=new Intl.DateTimeFormat(e,t),Ot[r]=i),i}var _t={};function jt(e,t){void 0===t&&(t={});var r=JSON.stringify([e,t]),i=_t[r];return i||(i=new Intl.NumberFormat(e,t),_t[r]=i),i}var wt={};function xt(e,t){void 0===t&&(t={});var r=t;r.base;var i=p(r,bt),n=JSON.stringify([e,i]),a=wt[n];return a||(a=new Intl.RelativeTimeFormat(e,t),wt[n]=a),a}var Tt=null;function St(){return Tt||(Tt=(new Intl.DateTimeFormat).resolvedOptions().locale,Tt)}function Et(e){var t=e.indexOf("-u-");if(-1===t)return[e];var r,i=e.substring(0,t);try{r=vt(e).resolvedOptions()}catch(o){r=vt(i).resolvedOptions()}var n=r,a=n.numberingSystem,s=n.calendar;return[i,a,s]}function At(e,t,r){return r||t?(e+="-u",r&&(e+="-ca-"+r),t&&(e+="-nu-"+t),e):e}function Ct(e){for(var t=[],r=1;r<=12;r++){var i=fn.utc(2016,r,1);t.push(e(i))}return t}function Rt(e){for(var t=[],r=1;r<=7;r++){var i=fn.utc(2016,11,13+r);t.push(e(i))}return t}function Mt(e,t,r,i,n){var a=e.listingMode(r);return"error"===a?null:"en"===a?i(t):n(t)}function Pt(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var It=function(){function e(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1,r.padTo,r.floor;var i=p(r,mt);if(!t||Object.keys(i).length>0){var n=a({useGrouping:!1},r);r.padTo>0&&(n.minimumIntegerDigits=r.padTo),this.inf=jt(e,n)}}var t=e.prototype;return t.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}var r=this.floor?Math.floor(e):he(e,3);return ce(r,this.padTo)},e}(),Dt=function(){function e(e,t,r){var i;if(this.opts=r,e.zone.isUniversal){var n=e.offset/60*-1,s=n>=0?"Etc/GMT+"+n:"Etc/GMT"+n;0!==e.offset&&it.create(s).valid?(i=s,this.dt=e):(i="UTC",r.timeZoneName?this.dt=e:this.dt=0===e.offset?e:fn.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);var o=a({},this.opts);i&&(o.timeZone=i),this.dtf=vt(t,o)}var t=e.prototype;return t.format=function(){return this.dtf.format(this.dt.toJSDate())},t.formatToParts=function(){return this.dtf.formatToParts(this.dt.toJSDate())},t.resolvedOptions=function(){return this.dtf.resolvedOptions()},e}(),Lt=function(){function e(e,t,r){this.opts=a({style:"long"},r),!t&&te()&&(this.rtf=xt(e,r))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):Ge(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Nt=function(){function e(e,t,r,i){var n=Et(e),a=n[0],s=n[1],o=n[2];this.locale=a,this.numberingSystem=t||s||null,this.outputCalendar=r||o||null,this.intl=At(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,r,i,n){void 0===n&&(n=!1);var a=t||ft.defaultLocale,s=a||(n?"en-US":St()),o=r||ft.defaultNumberingSystem,c=i||ft.defaultOutputCalendar;return new e(s,o,c,a)},e.resetCache=function(){Tt=null,Ot={},_t={},wt={}},e.fromObject=function(t){var r=void 0===t?{}:t,i=r.locale,n=r.numberingSystem,a=r.outputCalendar;return e.create(i,n,a)};var t=e.prototype;return t.listingMode=function(){var e=this.isEnglish(),t=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return e&&t?"en":"intl"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(a({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(a({},e,{defaultToEN:!1}))},t.months=function(e,t,r){var i=this;return void 0===t&&(t=!1),void 0===r&&(r=!0),Mt(this,e,r,Ce,(function(){var r=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return i.monthsCache[n][e]||(i.monthsCache[n][e]=Ct((function(e){return i.extract(e,r,"month")}))),i.monthsCache[n][e]}))},t.weekdays=function(e,t,r){var i=this;return void 0===t&&(t=!1),void 0===r&&(r=!0),Mt(this,e,r,Ie,(function(){var r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return i.weekdaysCache[n][e]||(i.weekdaysCache[n][e]=Rt((function(e){return i.extract(e,r,"weekday")}))),i.weekdaysCache[n][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),Mt(this,void 0,e,(function(){return De}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hourCycle:"h12"};t.meridiemCache=[fn.utc(2016,11,13,9),fn.utc(2016,11,13,19)].map((function(r){return t.extract(r,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var r=this;return void 0===t&&(t=!0),Mt(this,e,t,ke,(function(){var t={era:e};return r.eraCache[e]||(r.eraCache[e]=[fn.utc(-40,1,1),fn.utc(2017,1,1)].map((function(e){return r.extract(e,t,"era")}))),r.eraCache[e]}))},t.extract=function(e,t,r){var i=this.dtFormatter(e,t),n=i.formatToParts(),a=n.find((function(e){return e.type.toLowerCase()===r}));return a?a.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new It(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new Dt(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new Lt(this.intl,this.isEnglish(),e)},t.listFormatter=function(e){return void 0===e&&(e={}),yt(this.intl,e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},n(e,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=Pt(this)),this.fastNumbersCached}}]),e}();function Ft(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+i+"$")}function kt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduce((function(t,r){var i=t[0],n=t[1],s=t[2],o=r(e,s),c=o[0],l=o[1],u=o[2];return[a({},i,c),n||l,u]}),[{},null,1]).slice(0,2)}}function Ut(e){if(null==e)return[null,null];for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];for(var n=0,a=r;n<a.length;n++){var s=a[n],o=s[0],c=s[1],l=o.exec(e);if(l)return c(l)}return[null,null]}function zt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,r){var i,n={};for(i=0;i<t.length;i++)n[t[i]]=le(e[r+i]);return[n,null,r+i]}}var Bt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Vt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Gt=RegExp(""+Vt.source+Bt.source+"?"),Ht=RegExp("(?:T"+Gt.source+")?"),qt=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Wt=/(\d{4})-?W(\d\d)(?:-?(\d))?/,$t=/(\d{4})-?(\d{3})/,Zt=zt("weekYear","weekNumber","weekDay"),Xt=zt("year","ordinal"),Yt=/(\d{4})-(\d\d)-(\d\d)/,Jt=RegExp(Vt.source+" ?(?:"+Bt.source+"|("+Te.source+"))?"),Qt=RegExp("(?: "+Jt.source+")?");function Kt(e,t,r){var i=e[t];return Y(i)?r:le(i)}function er(e,t){var r={year:Kt(e,t),month:Kt(e,t+1,1),day:Kt(e,t+2,1)};return[r,null,t+3]}function tr(e,t){var r={hours:Kt(e,t,0),minutes:Kt(e,t+1,0),seconds:Kt(e,t+2,0),milliseconds:de(e[t+3])};return[r,null,t+4]}function rr(e,t){var r=!e[t]&&!e[t+1],i=ve(e[t+1],e[t+2]),n=r?null:at.instance(i);return[{},n,t+3]}function ir(e,t){var r=e[t]?it.create(e[t]):null;return[{},r,t+1]}var nr=RegExp("^T?"+Vt.source+"$"),ar=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function sr(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],s=e[5],o=e[6],c=e[7],l=e[8],u="-"===t[0],d=c&&"-"===c[0],h=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e};return[{years:h(ue(r)),months:h(ue(i)),weeks:h(ue(n)),days:h(ue(a)),hours:h(ue(s)),minutes:h(ue(o)),seconds:h(ue(c),"-0"===c),milliseconds:h(de(l),d)}]}var or={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function cr(e,t,r,i,n,a,s){var o={year:2===t.length?ye(le(t)):le(t),month:Ee.indexOf(r)+1,day:le(i),hour:le(n),minute:le(a)};return s&&(o.second=le(s)),e&&(o.weekday=e.length>3?Re.indexOf(e)+1:Me.indexOf(e)+1),o}var lr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ur(e){var t,r=e[1],i=e[2],n=e[3],a=e[4],s=e[5],o=e[6],c=e[7],l=e[8],u=e[9],d=e[10],h=e[11],p=cr(r,a,n,i,s,o,c);return t=l?or[l]:u?0:ve(d,h),[p,new at(t)]}function dr(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var hr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,pr=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,fr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function br(e){var t=e[1],r=e[2],i=e[3],n=e[4],a=e[5],s=e[6],o=e[7],c=cr(t,n,i,r,a,s,o);return[c,at.utcInstance]}function mr(e){var t=e[1],r=e[2],i=e[3],n=e[4],a=e[5],s=e[6],o=e[7],c=cr(t,o,r,i,n,a,s);return[c,at.utcInstance]}var gr=Ft(qt,Ht),yr=Ft(Wt,Ht),Or=Ft($t,Ht),vr=Ft(Gt),_r=kt(er,tr,rr),jr=kt(Zt,tr,rr),wr=kt(Xt,tr,rr),xr=kt(tr,rr);function Tr(e){return Ut(e,[gr,_r],[yr,jr],[Or,wr],[vr,xr])}function Sr(e){return Ut(dr(e),[lr,ur])}function Er(e){return Ut(e,[hr,br],[pr,br],[fr,mr])}function Ar(e){return Ut(e,[ar,sr])}var Cr=kt(tr);function Rr(e){return Ut(e,[nr,Cr])}var Mr=Ft(Yt,Qt),Pr=Ft(Jt),Ir=kt(er,tr,rr,ir),Dr=kt(tr,rr,ir);function Lr(e){return Ut(e,[Mr,Ir],[Pr,Dr])}var Nr="Invalid Duration",Fr={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},kr=a({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Fr),Ur=365.2425,zr=30.436875,Br=a({years:{quarters:4,months:12,weeks:Ur/7,days:Ur,hours:24*Ur,minutes:24*Ur*60,seconds:24*Ur*60*60,milliseconds:24*Ur*60*60*1e3},quarters:{months:3,weeks:Ur/28,days:Ur/4,hours:24*Ur/4,minutes:24*Ur*60/4,seconds:24*Ur*60*60/4,milliseconds:24*Ur*60*60*1e3/4},months:{weeks:zr/7,days:zr,hours:24*zr,minutes:24*zr*60,seconds:24*zr*60*60,milliseconds:24*zr*60*60*1e3}},Fr),Vr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Gr=Vr.slice(0).reverse();function Hr(e,t,r){void 0===r&&(r=!1);var i={values:r?t.values:a({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Zr(i)}function qr(e){return e<0?Math.floor(e):Math.ceil(e)}function Wr(e,t,r,i,n){var a=e[n][r],s=t[r]/a,o=Math.sign(s)===Math.sign(i[n]),c=!o&&0!==i[n]&&Math.abs(s)<=1?qr(s):Math.trunc(s);i[n]+=c,t[r]-=c*a}function $r(e,t){Gr.reduce((function(r,i){return Y(t[i])?r:(r&&Wr(e,t,r,t,i),i)}),null)}var Zr=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Nt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Br:kr,this.isLuxonDuration=!0}e.fromMillis=function(t,r){return e.fromObject({milliseconds:t},r)},e.fromObject=function(t,r){if(void 0===r&&(r={}),null==t||"object"!==typeof t)throw new w("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:je(t,e.normalizeUnit),loc:Nt.fromObject(r),conversionAccuracy:r.conversionAccuracy})},e.fromDurationLike=function(t){if(J(t))return e.fromMillis(t);if(e.isDuration(t))return t;if("object"===typeof t)return e.fromObject(t);throw new w("Unknown duration argument "+t+" of type "+typeof t)},e.fromISO=function(t,r){var i=Ar(t),n=i[0];return n?e.fromObject(n,r):e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,r){var i=Rr(t),n=i[0];return n?e.fromObject(n,r):e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,r){if(void 0===r&&(r=null),!t)throw new w("need to specify a reason the Duration is invalid");var i=t instanceof $e?t:new $e(t,r);if(ft.throwOnInvalid)throw new v(i);return new e({invalid:i})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new j(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var r=a({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?We.create(this.loc,r).formatDurationFromString(this,e):Nr},t.toHuman=function(e){var t=this;void 0===e&&(e={});var r=Vr.map((function(r){var i=t.values[r];return Y(i)?null:t.loc.numberFormatter(a({style:"unit",unitDisplay:"long"},e,{unit:r.slice(0,-1)})).format(i)})).filter((function(e){return e}));return this.loc.listFormatter(a({type:"conjunction",style:e.listStyle||"narrow"},e)).format(r)},t.toObject=function(){return this.isValid?a({},this.values):{}},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=he(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=a({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var r=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===r.milliseconds||(i+=".SSS"));var n=r.toFormat(i);return e.includePrefix&&(n="T"+n),n},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(t){if(!this.isValid)return this;for(var r,i=e.fromDurationLike(t),n={},a=m(Vr);!(r=a()).done;){var s=r.value;(ae(i.values,s)||ae(this.values,s))&&(n[s]=i.get(s)+this.get(s))}return Hr(this,{values:n},!0)},t.minus=function(t){if(!this.isValid)return this;var r=e.fromDurationLike(t);return this.plus(r.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},r=0,i=Object.keys(this.values);r<i.length;r++){var n=i[r];t[n]=_e(e(this.values[n],n))}return Hr(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){if(!this.isValid)return this;var r=a({},this.values,je(t,e.normalizeUnit));return Hr(this,{values:r})},t.reconfigure=function(e){var t=void 0===e?{}:e,r=t.locale,i=t.numberingSystem,n=t.conversionAccuracy,a=this.loc.clone({locale:r,numberingSystem:i}),s={loc:a};return n&&(s.conversionAccuracy=n),Hr(this,s)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return $r(this.matrix,e),Hr(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!this.isValid)return this;if(0===r.length)return this;r=r.map((function(t){return e.normalizeUnit(t)}));for(var n,a,s={},o={},c=this.toObject(),l=m(Vr);!(a=l()).done;){var u=a.value;if(r.indexOf(u)>=0){n=u;var d=0;for(var h in o)d+=this.matrix[h][u]*o[h],o[h]=0;J(c[u])&&(d+=c[u]);var p=Math.trunc(d);for(var f in s[u]=p,o[u]=(1e3*d-1e3*p)/1e3,c)Vr.indexOf(f)>Vr.indexOf(u)&&Wr(this.matrix,c,f,s,u)}else J(c[u])&&(o[u]=c[u])}for(var b in o)0!==o[b]&&(s[n]+=b===n?o[b]:o[b]/this.matrix[n][b]);return Hr(this,{values:s},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,r=Object.keys(this.values);t<r.length;t++){var i=r[t];e[i]=0===this.values[i]?0:-this.values[i]}return Hr(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(var r,i=m(Vr);!(r=i()).done;){var n=r.value;if(!t(this.values[n],e.values[n]))return!1}return!0},n(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),Xr="Invalid Interval";function Yr(e,t){return e&&e.isValid?t&&t.isValid?t<e?Jr.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Jr.invalid("missing or invalid end"):Jr.invalid("missing or invalid start")}var Jr=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,r){if(void 0===r&&(r=null),!t)throw new w("need to specify a reason the Interval is invalid");var i=t instanceof $e?t:new $e(t,r);if(ft.throwOnInvalid)throw new O(i);return new e({invalid:i})},e.fromDateTimes=function(t,r){var i=bn(t),n=bn(r),a=Yr(i,n);return null==a?new e({start:i,end:n}):a},e.after=function(t,r){var i=Zr.fromDurationLike(r),n=bn(t);return e.fromDateTimes(n,n.plus(i))},e.before=function(t,r){var i=Zr.fromDurationLike(r),n=bn(t);return e.fromDateTimes(n.minus(i),n)},e.fromISO=function(t,r){var i=(t||"").split("/",2),n=i[0],a=i[1];if(n&&a){var s,o,c,l;try{s=fn.fromISO(n,r),o=s.isValid}catch(a){o=!1}try{c=fn.fromISO(a,r),l=c.isValid}catch(a){l=!1}if(o&&l)return e.fromDateTimes(s,c);if(o){var u=Zr.fromISO(a,r);if(u.isValid)return e.after(s,u)}else if(l){var d=Zr.fromISO(n,r);if(d.isValid)return e.before(c,d)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),r=this.end.startOf(e);return Math.floor(r.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var r=void 0===t?{}:t,i=r.start,n=r.end;return this.isValid?e.fromDateTimes(i||this.s,n||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];var a=i.map(bn).filter((function(e){return t.contains(e)})).sort(),s=[],o=this.s,c=0;while(o<this.e){var l=a[c]||this.e,u=+l>+this.e?this.e:l;s.push(e.fromDateTimes(o,u)),o=u,c+=1}return s},t.splitBy=function(t){var r=Zr.fromDurationLike(t);if(!this.isValid||!r.isValid||0===r.as("milliseconds"))return[];var i,n=this.s,a=1,s=[];while(n<this.e){var o=this.start.plus(r.mapUnits((function(e){return e*a})));i=+o>+this.e?this.e:o,s.push(e.fromDateTimes(n,i)),n=i,a+=1}return s},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e===+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e===+this.s},t.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var r=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return r>=i?null:e.fromDateTimes(r,i)},t.union=function(t){if(!this.isValid)return this;var r=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return e.fromDateTimes(r,i)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var r=e[0],i=e[1];return i?i.overlaps(t)||i.abutsStart(t)?[r,i.union(t)]:[r.concat([i]),t]:[r,t]}),[[],null]),r=t[0],i=t[1];return i&&r.push(i),r},e.xor=function(t){for(var r,i,n=null,a=0,s=[],o=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),c=(r=Array.prototype).concat.apply(r,o),l=c.sort((function(e,t){return e.time-t.time})),u=m(l);!(i=u()).done;){var d=i.value;a+="s"===d.type?1:-1,1===a?n=d.time:(n&&+n!==+d.time&&s.push(e.fromDateTimes(n,d.time)),n=null)}return e.merge(s)},t.difference=function(){for(var t=this,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return e.xor([this].concat(i)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":Xr},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):Xr},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():Xr},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):Xr},t.toFormat=function(e,t){var r=void 0===t?{}:t,i=r.separator,n=void 0===i?" – ":i;return this.isValid?""+this.s.toFormat(e)+n+this.e.toFormat(e):Xr},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Zr.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},n(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),Qr=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=ft.defaultZone);var t=fn.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return it.isValidZone(e)},e.normalizeZone=function(e){return ot(e,ft.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,i=r.locale,n=void 0===i?null:i,a=r.numberingSystem,s=void 0===a?null:a,o=r.locObj,c=void 0===o?null:o,l=r.outputCalendar,u=void 0===l?"gregory":l;return(c||Nt.create(n,s,u)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,i=r.locale,n=void 0===i?null:i,a=r.numberingSystem,s=void 0===a?null:a,o=r.locObj,c=void 0===o?null:o,l=r.outputCalendar,u=void 0===l?"gregory":l;return(c||Nt.create(n,s,u)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,i=r.locale,n=void 0===i?null:i,a=r.numberingSystem,s=void 0===a?null:a,o=r.locObj,c=void 0===o?null:o;return(c||Nt.create(n,s,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var r=void 0===t?{}:t,i=r.locale,n=void 0===i?null:i,a=r.numberingSystem,s=void 0===a?null:a,o=r.locObj,c=void 0===o?null:o;return(c||Nt.create(n,s,null)).weekdays(e,!0)},e.meridiems=function(e){var t=void 0===e?{}:e,r=t.locale,i=void 0===r?null:r;return Nt.create(i).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var r=void 0===t?{}:t,i=r.locale,n=void 0===i?null:i;return Nt.create(n,null,"gregory").eras(e)},e.features=function(){return{relative:te()}},e}();function Kr(e,t){var r=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=r(t)-r(e);return Math.floor(Zr.fromMillis(i).as("days"))}function ei(e,t,r){for(var i,n,a=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var r=Kr(e,t);return(r-r%7)/7}],["days",Kr]],s={},o=0,c=a;o<c.length;o++){var l=c[o],u=l[0],d=l[1];if(r.indexOf(u)>=0){var h;i=u;var p,f=d(e,t);if(n=e.plus((h={},h[u]=f,h)),n>t)e=e.plus((p={},p[u]=f-1,p)),f-=1;else e=n;s[u]=f}}return[e,s,n,i]}function ti(e,t,r,i){var n=ei(e,t,r),a=n[0],s=n[1],o=n[2],c=n[3],l=t-a,u=r.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===u.length){var d;if(o<t)o=a.plus((d={},d[c]=1,d));o!==a&&(s[c]=(s[c]||0)+l/(o-a))}var h,p=Zr.fromObject(s,i);return u.length>0?(h=Zr.fromMillis(l,i)).shiftTo.apply(h,u).plus(p):p}var ri={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ii={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ni=ri.hanidec.replace(/[\[|\]]/g,"").split("");function ai(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var r=0;r<e.length;r++){var i=e.charCodeAt(r);if(-1!==e[r].search(ri.hanidec))t+=ni.indexOf(e[r]);else for(var n in ii){var a=ii[n],s=a[0],o=a[1];i>=s&&i<=o&&(t+=i-s)}}return parseInt(t,10)}return t}function si(e,t){var r=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+ri[r||"latn"]+t)}var oi="missing Intl.DateTimeFormat.formatToParts support";function ci(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var r=e[0];return t(ai(r))}}}var li=String.fromCharCode(160),ui="( |"+li+")",di=new RegExp(ui,"g");function hi(e){return e.replace(/\./g,"\\.?").replace(di,ui)}function pi(e){return e.replace(/\./g,"").replace(di," ").toLowerCase()}function fi(e,t){return null===e?null:{regex:RegExp(e.map(hi).join("|")),deser:function(r){var i=r[0];return e.findIndex((function(e){return pi(i)===pi(e)}))+t}}}function bi(e,t){return{regex:e,deser:function(e){var t=e[1],r=e[2];return ve(t,r)},groups:t}}function mi(e){return{regex:e,deser:function(e){var t=e[0];return t}}}function gi(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function yi(e,t){var r=si(t),i=si(t,"{2}"),n=si(t,"{3}"),a=si(t,"{4}"),s=si(t,"{6}"),o=si(t,"{1,2}"),c=si(t,"{1,3}"),l=si(t,"{1,6}"),u=si(t,"{1,9}"),d=si(t,"{2,4}"),h=si(t,"{4,6}"),p=function(e){return{regex:RegExp(gi(e.val)),deser:function(e){var t=e[0];return t},literal:!0}},f=function(f){if(e.literal)return p(f);switch(f.val){case"G":return fi(t.eras("short",!1),0);case"GG":return fi(t.eras("long",!1),0);case"y":return ci(l);case"yy":return ci(d,ye);case"yyyy":return ci(a);case"yyyyy":return ci(h);case"yyyyyy":return ci(s);case"M":return ci(o);case"MM":return ci(i);case"MMM":return fi(t.months("short",!0,!1),1);case"MMMM":return fi(t.months("long",!0,!1),1);case"L":return ci(o);case"LL":return ci(i);case"LLL":return fi(t.months("short",!1,!1),1);case"LLLL":return fi(t.months("long",!1,!1),1);case"d":return ci(o);case"dd":return ci(i);case"o":return ci(c);case"ooo":return ci(n);case"HH":return ci(i);case"H":return ci(o);case"hh":return ci(i);case"h":return ci(o);case"mm":return ci(i);case"m":return ci(o);case"q":return ci(o);case"qq":return ci(i);case"s":return ci(o);case"ss":return ci(i);case"S":return ci(c);case"SSS":return ci(n);case"u":return mi(u);case"uu":return mi(o);case"uuu":return ci(r);case"a":return fi(t.meridiems(),0);case"kkkk":return ci(a);case"kk":return ci(d,ye);case"W":return ci(o);case"WW":return ci(i);case"E":case"c":return ci(r);case"EEE":return fi(t.weekdays("short",!1,!1),1);case"EEEE":return fi(t.weekdays("long",!1,!1),1);case"ccc":return fi(t.weekdays("short",!0,!1),1);case"cccc":return fi(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return bi(new RegExp("([+-]"+o.source+")(?::("+i.source+"))?"),2);case"ZZZ":return bi(new RegExp("([+-]"+o.source+")("+i.source+")?"),2);case"z":return mi(/[a-z_+-/]{1,256}?/i);default:return p(f)}},b=f(e)||{invalidReason:oi};return b.token=e,b}var Oi={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function vi(e,t,r){var i=e.type,n=e.value;if("literal"===i)return{literal:!0,val:n};var a=r[i],s=Oi[i];return"object"===typeof s&&(s=s[a]),s?{literal:!1,val:s}:void 0}function _i(e){var t=e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"");return["^"+t+"$",e]}function ji(e,t,r){var i=e.match(t);if(i){var n={},a=1;for(var s in r)if(ae(r,s)){var o=r[s],c=o.groups?o.groups+1:1;!o.literal&&o.token&&(n[o.token.val[0]]=o.deser(i.slice(a,a+c))),a+=c}return[i,n]}return[i,{}]}function wi(e){var t,r=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},i=null;Y(e.z)||(i=it.create(e.z)),Y(e.Z)||(i||(i=new at(e.Z)),t=e.Z),Y(e.q)||(e.M=3*(e.q-1)+1),Y(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Y(e.u)||(e.S=de(e.u));var n=Object.keys(e).reduce((function(t,i){var n=r(i);return n&&(t[n]=e[i]),t}),{});return[n,i,t]}var xi=null;function Ti(){return xi||(xi=fn.fromMillis(1555555555555)),xi}function Si(e,t){if(e.literal)return e;var r=We.macroTokenToFormatOpts(e.val);if(!r)return e;var i=We.create(t,r),n=i.formatDateTimeParts(Ti()),a=n.map((function(e){return vi(e,t,r)}));return a.includes(void 0)?e:a}function Ei(e,t){var r;return(r=Array.prototype).concat.apply(r,e.map((function(e){return Si(e,t)})))}function Ai(e,t,r){var i=Ei(We.parseFormat(r),e),n=i.map((function(t){return yi(t,e)})),a=n.find((function(e){return e.invalidReason}));if(a)return{input:t,tokens:i,invalidReason:a.invalidReason};var s=_i(n),o=s[0],c=s[1],l=RegExp(o,"i"),u=ji(t,l,c),d=u[0],h=u[1],p=h?wi(h):[null,null,void 0],f=p[0],b=p[1],m=p[2];if(ae(h,"a")&&ae(h,"H"))throw new _("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:l,rawMatches:d,matches:h,result:f,zone:b,specificOffset:m}}function Ci(e,t,r){var i=Ai(e,t,r),n=i.result,a=i.zone,s=i.specificOffset,o=i.invalidReason;return[n,a,s,o]}var Ri=[0,31,59,90,120,151,181,212,243,273,304,334],Mi=[0,31,60,91,121,152,182,213,244,274,305,335];function Pi(e,t){return new $e("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Ii(e,t,r){var i=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);var n=i.getUTCDay();return 0===n?7:n}function Di(e,t,r){return r+(pe(e)?Mi:Ri)[t-1]}function Li(e,t){var r=pe(e)?Mi:Ri,i=r.findIndex((function(e){return e<t})),n=t-r[i];return{month:i+1,day:n}}function Ni(e){var t,r=e.year,i=e.month,n=e.day,s=Di(r,i,n),o=Ii(r,i,n),c=Math.floor((s-o+10)/7);return c<1?(t=r-1,c=ge(t)):c>ge(r)?(t=r+1,c=1):t=r,a({weekYear:t,weekNumber:c,weekday:o},xe(e))}function Fi(e){var t,r=e.weekYear,i=e.weekNumber,n=e.weekday,s=Ii(r,1,4),o=fe(r),c=7*i+n-s-3;c<1?(t=r-1,c+=fe(t)):c>o?(t=r+1,c-=fe(r)):t=r;var l=Li(t,c),u=l.month,d=l.day;return a({year:t,month:u,day:d},xe(e))}function ki(e){var t=e.year,r=e.month,i=e.day,n=Di(t,r,i);return a({year:t,ordinal:n},xe(e))}function Ui(e){var t=e.year,r=e.ordinal,i=Li(t,r),n=i.month,s=i.day;return a({year:t,month:n,day:s},xe(e))}function zi(e){var t=Q(e.weekYear),r=se(e.weekNumber,1,ge(e.weekYear)),i=se(e.weekday,1,7);return t?r?!i&&Pi("weekday",e.weekday):Pi("week",e.week):Pi("weekYear",e.weekYear)}function Bi(e){var t=Q(e.year),r=se(e.ordinal,1,fe(e.year));return t?!r&&Pi("ordinal",e.ordinal):Pi("year",e.year)}function Vi(e){var t=Q(e.year),r=se(e.month,1,12),i=se(e.day,1,be(e.year,e.month));return t?r?!i&&Pi("day",e.day):Pi("month",e.month):Pi("year",e.year)}function Gi(e){var t=e.hour,r=e.minute,i=e.second,n=e.millisecond,a=se(t,0,23)||24===t&&0===r&&0===i&&0===n,s=se(r,0,59),o=se(i,0,59),c=se(n,0,999);return a?s?o?!c&&Pi("millisecond",n):Pi("second",i):Pi("minute",r):Pi("hour",t)}var Hi="Invalid DateTime",qi=864e13;function Wi(e){return new $e("unsupported zone",'the zone "'+e.name+'" is not supported')}function $i(e){return null===e.weekData&&(e.weekData=Ni(e.c)),e.weekData}function Zi(e,t){var r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new fn(a({},r,t,{old:r}))}function Xi(e,t,r){var i=e-60*t*1e3,n=r.offset(i);if(t===n)return[i,t];i-=60*(n-t)*1e3;var a=r.offset(i);return n===a?[i,n]:[e-60*Math.min(n,a)*1e3,Math.max(n,a)]}function Yi(e,t){e+=60*t*1e3;var r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Ji(e,t,r){return Xi(me(e),t,r)}function Qi(e,t){var r=e.o,i=e.c.year+Math.trunc(t.years),n=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s=a({},e.c,{year:i,month:n,day:Math.min(e.c.day,be(i,n))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=Zr.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),c=me(s),l=Xi(c,r,e.zone),u=l[0],d=l[1];return 0!==o&&(u+=o,d=e.zone.offset(u)),{ts:u,o:d}}function Ki(e,t,r,i,n,s){var o=r.setZone,c=r.zone;if(e&&0!==Object.keys(e).length){var l=t||c,u=fn.fromObject(e,a({},r,{zone:l,specificOffset:s}));return o?u:u.setZone(c)}return fn.invalid(new $e("unparsable",'the input "'+n+"\" can't be parsed as "+i))}function en(e,t,r){return void 0===r&&(r=!0),e.isValid?We.create(Nt.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function tn(e,t){var r=e.c.year>9999||e.c.year<0,i="";return r&&e.c.year>=0&&(i+="+"),i+=ce(e.c.year,r?6:4),t?(i+="-",i+=ce(e.c.month),i+="-",i+=ce(e.c.day)):(i+=ce(e.c.month),i+=ce(e.c.day)),i}function rn(e,t,r,i,n){var a=ce(e.c.hour);return t?(a+=":",a+=ce(e.c.minute),0===e.c.second&&r||(a+=":")):a+=ce(e.c.minute),0===e.c.second&&r||(a+=ce(e.c.second),0===e.c.millisecond&&i||(a+=".",a+=ce(e.c.millisecond,3))),n&&(e.isOffsetFixed&&0===e.offset?a+="Z":e.o<0?(a+="-",a+=ce(Math.trunc(-e.o/60)),a+=":",a+=ce(Math.trunc(-e.o%60))):(a+="+",a+=ce(Math.trunc(e.o/60)),a+=":",a+=ce(Math.trunc(e.o%60)))),a}var nn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},an={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},sn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},on=["year","month","day","hour","minute","second","millisecond"],cn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ln=["year","ordinal","hour","minute","second","millisecond"];function un(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new j(e);return t}function dn(e,t){var r,i,n=ot(t.zone,ft.defaultZone),a=Nt.fromObject(t),s=ft.now();if(Y(e.year))r=s;else{for(var o,c=m(on);!(o=c()).done;){var l=o.value;Y(e[l])&&(e[l]=nn[l])}var u=Vi(e)||Gi(e);if(u)return fn.invalid(u);var d=n.offset(s),h=Ji(e,d,n);r=h[0],i=h[1]}return new fn({ts:r,zone:n,loc:a,o:i})}function hn(e,t,r){var i=!!Y(r.round)||r.round,n=function(e,n){e=he(e,i||r.calendary?0:2,!0);var a=t.loc.clone(r).relFormatter(r);return a.format(e,n)},a=function(i){return r.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i)};if(r.unit)return n(a(r.unit),r.unit);for(var s,o=m(r.units);!(s=o()).done;){var c=s.value,l=a(c);if(Math.abs(l)>=1)return n(l,c)}return n(e>t?-0:0,r.units[r.units.length-1])}function pn(e){var t,r={};return e.length>0&&"object"===typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}var fn=function(){function e(e){var t=e.zone||ft.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new $e("invalid input"):null)||(t.isValid?null:Wi(t));this.ts=Y(e.ts)?ft.now():e.ts;var i=null,n=null;if(!r){var a=e.old&&e.old.ts===this.ts&&e.old.zone.equals(t);if(a){var s=[e.old.c,e.old.o];i=s[0],n=s[1]}else{var o=t.offset(this.ts);i=Yi(this.ts,o),r=Number.isNaN(i.year)?new $e("invalid input"):null,i=r?null:i,n=r?null:o}}this._zone=t,this.loc=e.loc||Nt.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=n,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(){var e=pn(arguments),t=e[0],r=e[1],i=r[0],n=r[1],a=r[2],s=r[3],o=r[4],c=r[5],l=r[6];return dn({year:i,month:n,day:a,hour:s,minute:o,second:c,millisecond:l},t)},e.utc=function(){var e=pn(arguments),t=e[0],r=e[1],i=r[0],n=r[1],a=r[2],s=r[3],o=r[4],c=r[5],l=r[6];return t.zone=at.utcInstance,dn({year:i,month:n,day:a,hour:s,minute:o,second:c,millisecond:l},t)},e.fromJSDate=function(t,r){void 0===r&&(r={});var i=ee(t)?t.valueOf():NaN;if(Number.isNaN(i))return e.invalid("invalid input");var n=ot(r.zone,ft.defaultZone);return n.isValid?new e({ts:i,zone:n,loc:Nt.fromObject(r)}):e.invalid(Wi(n))},e.fromMillis=function(t,r){if(void 0===r&&(r={}),J(t))return t<-qi||t>qi?e.invalid("Timestamp out of range"):new e({ts:t,zone:ot(r.zone,ft.defaultZone),loc:Nt.fromObject(r)});throw new w("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,r){if(void 0===r&&(r={}),J(t))return new e({ts:1e3*t,zone:ot(r.zone,ft.defaultZone),loc:Nt.fromObject(r)});throw new w("fromSeconds requires a numerical input")},e.fromObject=function(t,r){void 0===r&&(r={}),t=t||{};var i=ot(r.zone,ft.defaultZone);if(!i.isValid)return e.invalid(Wi(i));var n=ft.now(),a=Y(r.specificOffset)?i.offset(n):r.specificOffset,s=je(t,un),o=!Y(s.ordinal),c=!Y(s.year),l=!Y(s.month)||!Y(s.day),u=c||l,d=s.weekYear||s.weekNumber,h=Nt.fromObject(r);if((u||o)&&d)throw new _("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new _("Can't mix ordinal dates with month/day");var p,f,b=d||s.weekday&&!u,g=Yi(n,a);b?(p=cn,f=an,g=Ni(g)):o?(p=ln,f=sn,g=ki(g)):(p=on,f=nn);for(var y,O=!1,v=m(p);!(y=v()).done;){var j=y.value,w=s[j];Y(w)?s[j]=O?f[j]:g[j]:O=!0}var x=b?zi(s):o?Bi(s):Vi(s),T=x||Gi(s);if(T)return e.invalid(T);var S=b?Fi(s):o?Ui(s):s,E=Ji(S,a,i),A=E[0],C=E[1],R=new e({ts:A,zone:i,o:C,loc:h});return s.weekday&&u&&t.weekday!==R.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+s.weekday+" and a date of "+R.toISO()):R},e.fromISO=function(e,t){void 0===t&&(t={});var r=Tr(e),i=r[0],n=r[1];return Ki(i,n,t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var r=Sr(e),i=r[0],n=r[1];return Ki(i,n,t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var r=Er(e),i=r[0],n=r[1];return Ki(i,n,t,"HTTP",t)},e.fromFormat=function(t,r,i){if(void 0===i&&(i={}),Y(t)||Y(r))throw new w("fromFormat requires an input string and a format");var n=i,a=n.locale,s=void 0===a?null:a,o=n.numberingSystem,c=void 0===o?null:o,l=Nt.fromOpts({locale:s,numberingSystem:c,defaultToEN:!0}),u=Ci(l,t,r),d=u[0],h=u[1],p=u[2],f=u[3];return f?e.invalid(f):Ki(d,h,i,"format "+r,t,p)},e.fromString=function(t,r,i){return void 0===i&&(i={}),e.fromFormat(t,r,i)},e.fromSQL=function(e,t){void 0===t&&(t={});var r=Lr(e),i=r[0],n=r[1];return Ki(i,n,t,"SQL",e)},e.invalid=function(t,r){if(void 0===r&&(r=null),!t)throw new w("need to specify a reason the DateTime is invalid");var i=t instanceof $e?t:new $e(t,r);if(ft.throwOnInvalid)throw new y(i);return new e({invalid:i})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOptions=function(e){void 0===e&&(e={});var t=We.create(this.loc.clone(e),e).resolvedOptions(this),r=t.locale,i=t.numberingSystem,n=t.calendar;return{locale:r,numberingSystem:i,outputCalendar:n}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(at.instance(e),t)},t.toLocal=function(){return this.setZone(ft.defaultZone)},t.setZone=function(t,r){var i=void 0===r?{}:r,n=i.keepLocalTime,a=void 0!==n&&n,s=i.keepCalendarTime,o=void 0!==s&&s;if(t=ot(t,ft.defaultZone),t.equals(this.zone))return this;if(t.isValid){var c=this.ts;if(a||o){var l=t.offset(this.ts),u=this.toObject(),d=Ji(u,l,t);c=d[0]}return Zi(this,{ts:c,zone:t})}return e.invalid(Wi(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,r=t.locale,i=t.numberingSystem,n=t.outputCalendar,a=this.loc.clone({locale:r,numberingSystem:i,outputCalendar:n});return Zi(this,{loc:a})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,r=je(e,un),i=!Y(r.weekYear)||!Y(r.weekNumber)||!Y(r.weekday),n=!Y(r.ordinal),s=!Y(r.year),o=!Y(r.month)||!Y(r.day),c=s||o,l=r.weekYear||r.weekNumber;if((c||n)&&l)throw new _("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&n)throw new _("Can't mix ordinal dates with month/day");i?t=Fi(a({},Ni(this.c),r)):Y(r.ordinal)?(t=a({},this.toObject(),r),Y(r.day)&&(t.day=Math.min(be(t.year,t.month),t.day))):t=Ui(a({},ki(this.c),r));var u=Ji(t,this.o,this.zone),d=u[0],h=u[1];return Zi(this,{ts:d,o:h})},t.plus=function(e){if(!this.isValid)return this;var t=Zr.fromDurationLike(e);return Zi(this,Qi(this,t))},t.minus=function(e){if(!this.isValid)return this;var t=Zr.fromDurationLike(e).negate();return Zi(this,Qi(this,t))},t.startOf=function(e){if(!this.isValid)return this;var t={},r=Zr.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if("weeks"===r&&(t.weekday=1),"quarters"===r){var i=Math.ceil(this.month/3);t.month=3*(i-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?We.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Hi},t.toLocaleString=function(e,t){return void 0===e&&(e=A),void 0===t&&(t={}),this.isValid?We.create(this.loc.clone(t),e).formatDateTime(this):Hi},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?We.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){var t=void 0===e?{}:e,r=t.format,i=void 0===r?"extended":r,n=t.suppressSeconds,a=void 0!==n&&n,s=t.suppressMilliseconds,o=void 0!==s&&s,c=t.includeOffset,l=void 0===c||c;if(!this.isValid)return null;var u="extended"===i,d=tn(this,u);return d+="T",d+=rn(this,u,a,o,l),d},t.toISODate=function(e){var t=void 0===e?{}:e,r=t.format,i=void 0===r?"extended":r;return this.isValid?tn(this,"extended"===i):null},t.toISOWeekDate=function(){return en(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,r=t.suppressMilliseconds,i=void 0!==r&&r,n=t.suppressSeconds,a=void 0!==n&&n,s=t.includeOffset,o=void 0===s||s,c=t.includePrefix,l=void 0!==c&&c,u=t.format,d=void 0===u?"extended":u;if(!this.isValid)return null;var h=l?"T":"";return h+rn(this,"extended"===d,a,i,o)},t.toRFC2822=function(){return en(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return en(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return this.isValid?tn(this,!0):null},t.toSQLTime=function(e){var t=void 0===e?{}:e,r=t.includeOffset,i=void 0===r||r,n=t.includeZone,a=void 0!==n&&n,s=t.includeOffsetSpace,o=void 0===s||s,c="HH:mm:ss.SSS";return(a||i)&&(o&&(c+=" "),a?c+="z":i&&(c+="ZZ")),en(this,c,!0)},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():Hi},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toUnixInteger=function(){return this.isValid?Math.floor(this.ts/1e3):NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=a({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,r){if(void 0===t&&(t="milliseconds"),void 0===r&&(r={}),!this.isValid||!e.isValid)return Zr.invalid("created by diffing an invalid DateTime");var i=a({locale:this.locale,numberingSystem:this.numberingSystem},r),n=re(t).map(Zr.normalizeUnit),s=e.valueOf()>this.valueOf(),o=s?this:e,c=s?e:this,l=ti(o,c,n,i);return s?l.negate():l},t.diffNow=function(t,r){return void 0===t&&(t="milliseconds"),void 0===r&&(r={}),this.diff(e.now(),t,r)},t.until=function(e){return this.isValid?Jr.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t)<=r&&r<=i.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var r=t.base||e.fromObject({},{zone:this.zone}),i=t.padding?this<r?-t.padding:t.padding:0,n=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(n=t.unit,s=void 0),hn(r,this.plus(i),a({},t,{numeric:"always",units:n,unit:s}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?hn(t.base||e.fromObject({},{zone:this.zone}),this,a({},t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!r.every(e.isDateTime))throw new w("min requires all arguments be DateTimes");return ie(r,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(!r.every(e.isDateTime))throw new w("max requires all arguments be DateTimes");return ie(r,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,r){void 0===r&&(r={});var i=r,n=i.locale,a=void 0===n?null:n,s=i.numberingSystem,o=void 0===s?null:s,c=Nt.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0});return Ai(c,e,t)},e.fromStringExplain=function(t,r,i){return void 0===i&&(i={}),e.fromFormatExplain(t,r,i)},n(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?$i(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?$i(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?$i(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?ki(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Qr.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Qr.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Qr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Qr.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return pe(this.year)}},{key:"daysInMonth",get:function(){return be(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?fe(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ge(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return A}},{key:"DATE_MED",get:function(){return C}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return R}},{key:"DATE_FULL",get:function(){return M}},{key:"DATE_HUGE",get:function(){return P}},{key:"TIME_SIMPLE",get:function(){return I}},{key:"TIME_WITH_SECONDS",get:function(){return D}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return N}},{key:"TIME_24_SIMPLE",get:function(){return F}},{key:"TIME_24_WITH_SECONDS",get:function(){return k}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return U}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return z}},{key:"DATETIME_SHORT",get:function(){return B}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_MED",get:function(){return G}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return q}},{key:"DATETIME_FULL",get:function(){return W}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return $}},{key:"DATETIME_HUGE",get:function(){return Z}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return X}}]),e}();function bn(e){if(fn.isDateTime(e))return e;if(e&&e.valueOf&&J(e.valueOf()))return fn.fromJSDate(e);if(e&&"object"===typeof e)return fn.fromObject(e);throw new w("Unknown datetime argument: "+e+", of type "+typeof e)}var mn="2.3.2";t.DateTime=fn,t.Duration=Zr,t.FixedOffsetZone=at,t.IANAZone=it,t.Info=Qr,t.Interval=Jr,t.InvalidZone=st,t.Settings=ft,t.SystemZone=Ye,t.VERSION=mn,t.Zone=Ze},1325:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));r("c120");var i,n=r("9d1d");const a={apiKey:void 0,applicationUrl:null==(i=globalThis.location)?void 0:i.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(Object(n["a"])(a,globalThis.esriConfig,!0),delete a.has),!a.assetsPath){const e="4.23.7";a.assetsPath=`https://js.arcgis.com/${e.slice(0,-2)}/@arcgis/core/assets`}a.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(a,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),a.request.corsEnabledServers=[],a.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},1637:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(e){super(e),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"name",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"title",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"expression",void 0),Object(n["a"])([Object(s["b"])({type:["string","number"],json:{write:!0}})],c.prototype,"returnType",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.popup.ExpressionInfo")],c);const l=c},"164a6":function(e,t,r){},1666:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return o}));var i,n=r("9812"),a=r("32ed"),s=r("8c4b");function o(e){const t=l(e.rings,e.hasZ,i.CCW_IS_HOLE),r=[];let a=0,o=0;for(const i of t.polygons){const e=i.count,s=i.index,c=new Float64Array(t.position.buffer,3*s*t.position.BYTES_PER_ELEMENT,3*e),l=i.holeIndices.map(e=>e-s),u=new Uint32Array(Object(n["a"])(c,l,3));r.push({position:c,faces:u}),a+=c.length,o+=u.length}const u=c(r,a,o),d=Object(s["a"])(u.position.buffer,6,{originalIndices:u.faces});return u.position=new Float64Array(d.buffer),u.faces=d.indices,u}function c(e,t,r){if(1===e.length)return e[0];const i=new Float64Array(t),n=new Uint32Array(r);let a=0,s=0,o=0;for(const c of e){for(let e=0;e<c.position.length;e++)i[a++]=c.position[e];for(let e=0;e<c.faces.length;e++)n[s++]=c.faces[e]+o;o=a/3}return{position:i,faces:n}}function l(e,t,r){const n=e.length,a=new Array(n),s=new Array(n),o=new Array(n);let c=0,l=0,h=0,p=0;for(let i=0;i<n;++i)p+=e[i].length;const f=new Float64Array(3*p);let b=0;for(let m=n-1;m>=0;m--){const p=e[m],g=r===i.CCW_IS_HOLE&&d(p);if(g&&1!==n)a[c++]=p;else{let e=p.length;for(let t=0;t<c;++t)e+=a[t].length;const r={index:b,pathLengths:new Array(c+1),count:e,holeIndices:new Array(c)};r.pathLengths[0]=p.length,p.length>0&&(o[h++]={index:b,count:p.length}),b=g?u(p,p.length-1,-1,f,b,p.length,t):u(p,0,1,f,b,p.length,t);for(let i=0;i<c;++i){const e=a[i];r.holeIndices[i]=b,r.pathLengths[i+1]=e.length,e.length>0&&(o[h++]={index:b,count:e.length}),b=u(e,0,1,f,b,e.length,t)}c=0,r.count>0&&(s[l++]=r)}}for(let i=0;i<c;++i){const e=a[i];e.length>0&&(o[h++]={index:b,count:e.length}),b=u(e,0,1,f,b,e.length,t)}return l<n&&(s.length=l),h<n&&(o.length=h),{position:f,polygons:s,outlines:o}}function u(e,t,r,i,n,a,s){n*=3;for(let o=0;o<a;++o){const a=e[t];i[n++]=a[0],i[n++]=a[1],i[n++]=s?a[2]:0,t+=r}return n/3}function d(e){return!Object(a["f"])(e,!1,!1)}!function(e){e[e.NONE=0]="NONE",e[e.CCW_IS_HOLE=1]="CCW_IS_HOLE"}(i||(i={}))},"16e0":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("9ef0"),s=r("7ffa"),o=r("59b2"),c=r("cea0"),l=r("448d"),u=r("d386"),d=r("961d");let h=i=class extends d["a"]{constructor(e){super(e),this.color=p.clone(),this.type="water",this.waterbodySize="medium",this.waveDirection=null,this.waveStrength="moderate"}clone(){return new i({color:Object(s["a"])(this.color),waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength})}};Object(n["a"])([Object(o["b"])({type:a["a"],nonNullable:!0,json:{type:[c["a"]],write:(e,t,r)=>t[r]=e.toArray(a["a"].AlphaMode.UNLESS_OPAQUE),default:()=>p.clone(),defaultEquals:e=>e.toCss(!0)===p.toCss(!0)}})],h.prototype,"color",void 0),Object(n["a"])([Object(l["a"])({Water:"water"},{readOnly:!0})],h.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({type:["small","medium","large"],json:{write:!0,default:"medium"}})],h.prototype,"waterbodySize",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0,default:null}})],h.prototype,"waveDirection",void 0),Object(n["a"])([Object(o["b"])({type:["calm","rippled","slight","moderate"],json:{write:!0,default:"moderate"}})],h.prototype,"waveStrength",void 0),h=i=Object(n["a"])([Object(u["a"])("esri.symbols.WaterSymbol3DLayer")],h);const p=new a["a"]([0,119,190]),f=h},"171c":function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return _}));var i=r("e92d"),n=r("38a4"),a=r("b2b2"),s=r("a915"),o=r("d791"),c=r("afe1"),l=r("3349"),u=r("02f1"),d=r("e431"),h=r("0b2d"),p=r("7577"),f=r("0fc4"),b=r("d359"),m=r("d18f"),g=r("a1b1"),y=r("3c9c"),O=r("1153");const v=i["a"].getLogger("esri.views.3d.webgl-engine.lib.Camera");class _{constructor(e=null,t=null,r=null){this._viewUp=Object(h["f"])(),this._viewForward=Object(h["f"])(),this._viewRight=Object(h["f"])(),this._ray=Object(m["c"])(),this._viewport=Object(f["g"])(0,0,1,1),this._padding=Object(f["g"])(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=Object(u["f"])(1,1e3),this._viewDirty=!0,this._viewMatrix=Object(c["d"])(),this._projectionDirty=!0,this._projectionMatrix=Object(c["d"])(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=Object(c["d"])(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=Object(c["d"])(),this._frustumDirty=!0,this._frustum=Object(b["f"])(),this._fullViewport=Object(f["e"])(),this.pixelRatio=1,this.relativeElevation=0,Object(a["k"])(e)&&Object(d["m"])(this._ray.origin,e),this._center=Object(a["k"])(t)?Object(h["d"])(t):Object(h["f"])(),this._up=Object(a["k"])(r)?Object(h["d"])(r):Object(h["h"])(0,0,1)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center)}get ray(){return Object(d["l"])(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up)}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){Object(o["d"])(this._viewMatrix,e),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get x(){return this._viewport[0]}set x(e){e+=this._padding[E.LEFT],this._viewport[0]!==e&&(this._viewport[0]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get y(){return this._viewport[1]}set y(e){e+=this._padding[E.BOTTOM],this._viewport[1]!==e&&(this._viewport[1]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get fullWidth(){return this._viewport[2]+this._padding[E.RIGHT]+this._padding[E.LEFT]}set fullWidth(e){this.width=e-(this._padding[E.RIGHT]+this._padding[E.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[E.TOP]+this._padding[E.BOTTOM]}set fullHeight(e){this.height=e-(this._padding[E.TOP]+this._padding[E.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[E.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[E.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){this._padding[E.TOP]===e[E.TOP]&&this._padding[E.RIGHT]===e[E.RIGHT]&&this._padding[E.BOTTOM]===e[E.BOTTOM]&&this._padding[E.LEFT]===e[E.LEFT]||(this._viewport[0]+=e[E.LEFT]-this._padding[E.LEFT],this._viewport[1]+=e[E.BOTTOM]-this._padding[E.BOTTOM],this._viewport[2]-=e[E.RIGHT]+e[E.LEFT]-(this._padding[E.RIGHT]+this._padding[E.LEFT]),this._viewport[3]-=e[E.TOP]+e[E.BOTTOM]-(this._padding[E.TOP]+this._padding[E.BOTTOM]),Object(p["c"])(this._padding,e),this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0)}get viewProjectionMatrix(){return this._viewProjectionDirty&&(Object(o["n"])(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){if(this._projectionDirty){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2),i=r*this.aspect;Object(o["m"])(this._projectionMatrix,-i*(1+2*this._padding[E.LEFT]/e),i*(1+2*this._padding[E.RIGHT]/e),-r*(1+2*this._padding[E.BOTTOM]/t),r*(1+2*this._padding[E.TOP]/t),this.near,this.far),this._projectionDirty=!1}return this._projectionMatrix}set projectionMatrix(e){Object(o["d"])(this._projectionMatrix,e),this._projectionDirty=!1,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fov(){return this._fov}set fov(e){this._fov=e,this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return Object(O["b"])(this._fov,this.width,this.height)}set fovX(e){this._fov=Object(O["d"])(e,this.width,this.height),this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return Object(O["c"])(this._fov,this.width,this.height)}set fovY(e){this._fov=Object(O["e"])(e,this.width,this.height),this._projectionDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return Object(d["o"])(this._center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(Object(o["b"])(this._viewInverseTransposeMatrix,this.viewMatrix),Object(o["u"])(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const t=2*e-1;return 2*this.near*this.far/(this.far+this.near-t*(this.far-this.near))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return this.relativeElevation&&this.relativeElevation>=0}copyFrom(e){Object(d["m"])(this._ray.origin,e.eye),Object(d["m"])(this._center,e.center),Object(d["m"])(this._up,e.up),Object(p["c"])(this._viewport,e.viewport),Object(p["c"])(this._padding,e.padding),Object(l["c"])(this._nearFar,e.nearFar),this._fov=e.fov,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||(Object(o["d"])(this._viewMatrix,e.viewMatrix),Object(d["m"])(this._viewRight,e.viewRight),Object(d["m"])(this._viewUp,e.viewUp),Object(d["m"])(this._viewForward,e.viewForward)),t._projectionDirty?this._projectionDirty=!0:(Object(o["d"])(this._projectionMatrix,e.projectionMatrix),this._projectionDirty=!1),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||(Object(b["e"])(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(Object(o["d"])(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),Object(p["c"])(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up}clone(){return(new _).copyFrom(this)}equals(e){return Object(d["q"])(this.eye,e.eye)&&Object(d["q"])(this._center,e.center)&&Object(d["q"])(this._up,e.up)&&Object(p["g"])(this._viewport,e.viewport)&&Object(p["g"])(this._padding,e.padding)&&Object(l["e"])(this._nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation}almostEquals(e){if(this.pixelRatio!==e.pixelRatio||Math.abs(e.fov-this._fov)>=.001)return!1;const t=5e-4,r=1-1e-10;Object(d["B"])(x,e.eye,e.center),Object(d["B"])(T,this.eye,this._center);const i=Object(d["j"])(x,T),n=Object(d["C"])(x),a=Object(d["C"])(T);return i*i>=r*n*a&&Object(d["D"])(e.eye,this.eye)<Math.max(n,a)*t*t&&Object(p["i"])(e.padding,this._padding)<.5&&Object(p["i"])(e.viewport,this._viewport)<.5}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs(Object(g["c"])(this.viewForward,Object(d["l"])(x,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=Object(s["f"])()){return e[0]=(this.padding[E.LEFT]+this.width/2)/this.pixelRatio,e[1]=(this.padding[E.TOP]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[E.LEFT]+this.width*t,e[1]=this.padding[E.BOTTOM]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t,r=!1){e!==j&&Object(d["m"])(j,e),j[3]=1,r&&(t[2]=-j[2]),Object(p["m"])(j,j,this.projectionMatrix),Object(d["g"])(j,j,1/Math.abs(j[3]));const i=this.fullViewport;return t[0]=Object(n["l"])(0,i[0]+i[2],.5+.5*j[0]),t[1]=Object(n["l"])(0,i[1]+i[3],.5+.5*j[1]),r||(t[2]=.5*(j[2]+1)),t}projectToScreen(e,t){this.projectToRenderScreen(e,S),this.renderToScreen(S,t)}projectToRenderScreen(e,t){if(j[0]=e[0],j[1]=e[1],j[2]=e[2],j[3]=1,Object(p["m"])(j,j,this.viewProjectionMatrix),0===j[3])return null;Object(d["g"])(j,j,1/Math.abs(j[3]));const r=this.fullViewport;return"x"in t?(t.x=Object(n["l"])(0,r[0]+r[2],.5+.5*j[0]),t.y=Object(n["l"])(0,r[1]+r[3],.5+.5*j[1])):(t[0]=Object(n["l"])(0,r[0]+r[2],.5+.5*j[0]),t[1]=Object(n["l"])(0,r[1]+r[3],.5+.5*j[1]),t.length>2&&(t[2]=.5*(j[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,S),t)}unprojectFromRenderScreen(e,t){if(Object(o["n"])(w,this.projectionMatrix,this.viewMatrix),!Object(o["b"])(w,w))return null;const r=this.fullViewport;return j[0]=2*(e[0]-r[0])/r[2]-1,j[1]=2*(e[1]-r[1])/r[3]-1,j[2]=2*e[2]-1,j[3]=1,Object(p["m"])(j,j,w),0===j[3]?null:(t[0]=j[0]/j[3],t[1]=j[1]/j[3],t[2]=j[2]/j[3],t)}constrainWindowSize(e,t,r,i=r){const n=e*this.pixelRatio,a=t*this.pixelRatio,s=Math.max(n-r/2,0),o=Math.max(this.fullHeight-a-i/2,0),c=-Math.min(n-r/2,0),l=-Math.min(this.fullHeight-a-i/2,0);return[s,o,r-c- -Math.min(this.fullWidth-n-r/2,0),i-l- -Math.min(a-i/2,0)]}computeUp(e){e===y["a"].Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}_computeUpGlobal(){Object(d["l"])(x,this.center,this.eye);const e=Object(d["r"])(this.center);e<1?(Object(d["y"])(this._up,0,0,1),this._markViewDirty()):Math.abs(Object(d["j"])(x,this.center))>.9999*Object(d["r"])(x)*e||(Object(d["i"])(this._up,x,this.center),Object(d["i"])(this._up,this._up,x),Object(d["t"])(this._up,this._up),this._markViewDirty())}_computeUpLocal(){Object(d["x"])(x,this.eye,this.center),Math.abs(x[2])<=.9999&&(Object(d["g"])(x,x,x[2]),Object(d["y"])(this._up,-x[0],-x[1],1-x[2]),Object(d["t"])(this._up,this._up),this._markViewDirty())}_compareAndSetView(e,t){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?Object(d["q"])(e,t)||(Object(d["m"])(t,e),this._markViewDirty()):v.warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(Object(b["h"])(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(Object(o["o"])(this._viewMatrix,this.eye,this._center,this._up),Object(d["y"])(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),Object(d["y"])(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),Object(d["y"])(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}}const j=Object(f["e"])(),w=Object(c["d"])(),x=Object(h["f"])(),T=Object(h["f"])(),S=Object(s["d"])();var E;!function(e){e[e.TOP=0]="TOP",e[e.RIGHT=1]="RIGHT",e[e.BOTTOM=2]="BOTTOM",e[e.LEFT=3]="LEFT"}(E||(E={}))},1729:function(e,t,r){"use strict";function i(e){return{setTimeout:(t,r)=>{const i=e.setTimeout(t,r);return{remove:()=>e.clearTimeout(i)}}}}r.d(t,"a",(function(){return n}));const n=i(globalThis)},1797:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return c}));r("e06a");var i=r("b50f"),n=r("b2b2"),a=r("f4cc"),s=r("9305"),o=r("57dc");class c{constructor(e,t){this.spatialReference=e,this.view=t}getElevation(e,t,r){return this.view.elevationProvider.getElevation(e,t,0,this.spatialReference,r)}async queryElevation(e,t,r,i,n){return this.view.elevationProvider.queryElevation(e,t,0,this.spatialReference,n,r,i)}}class l{constructor(e,t,r,i){this.spatialReference=t,this._getElevationQueryProvider=r,this._queries=new Array,this._queryOptions={...i,ignoreInvisibleLayers:!0},this._frameTask=e.registerTask(s["c"].ELEVATION_QUERY,this)}destroy(){this._frameTask.remove()}queryElevation(e,t,r,n=0){return new Promise((s,o)=>{const c={x:e,y:t,minDemResolution:n,result:{resolve:s,reject:o},signal:r};this._queries.push(c),Object(a["q"])(r,()=>{Object(i["j"])(this._queries,c),o(Object(a["e"])())})})}get running(){return this._queries.length>0}runTask(){const e=this._queries;this._queries=[];const t=this._getElevationQueryProvider();if(!t)return void e.forEach(e=>e.result.reject());const r=e.map(e=>[e.x,e.y]),i=e.reduce((e,t)=>Math.min(e,t.minDemResolution),1/0),s=new o["a"]({points:r,spatialReference:this.spatialReference}),c=e.length>1&&e.some(e=>!!e.signal)?new AbortController:null,l=Object(n["k"])(c)?c.signal:e[0].signal;if(Object(n["k"])(c)){let t=0;e.forEach(r=>Object(a["q"])(r.signal,()=>{t++,r.result.reject(Object(a["e"])()),t===e.length&&c.abort()}))}const u={...this._queryOptions,minDemResolution:i,signal:l};t.queryElevation(s,u).then(t=>{e.forEach((e,r)=>{Object(n["k"])(e.signal)&&e.signal.aborted?e.result.reject(Object(a["e"])()):e.result.resolve(t.geometry.points[r][2])})}).catch(t=>{e.forEach(e=>e.result.reject(t))})}get test(){const e=this;return{update:()=>e._queries.length>0&&e.runTask()}}}},"17b0":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return o}));var i=r("3c9c"),n=r("2f98"),a=r("3886");function s(e,t){const r=e.vertex.code;t.verticalOffsetEnabled?(e.vertex.uniforms.add("verticalOffset","vec4"),t.screenSizePerspectiveEnabled&&(e.include(n["a"]),e.vertex.uniforms.add("screenSizePerspectiveAlignment","vec4")),r.add(a["a"]`
  242. vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
  243. float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
  244. ${t.viewingMode===i["a"].Global?a["a"]`vec3 worldNormal = normalize(worldPos + localOrigin);`:a["a"]`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
  245. ${t.screenSizePerspectiveEnabled?a["a"]`
  246. float cosAngle = dot(worldNormal, normalize(worldPos - cameraPosition));
  247. float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:a["a"]`
  248. float verticalOffsetScreenHeight = verticalOffset.x;`}
  249. // Screen sized offset in world space, used for example for line callouts
  250. float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w);
  251. return worldNormal * worldOffset;
  252. }
  253. vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
  254. return worldPos + calculateVerticalOffset(worldPos, localOrigin);
  255. }
  256. `)):r.add(a["a"]`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}function o(e,t,r){if(!t.verticalOffset)return;const i=c(t.verticalOffset,r.camera.fovY,r.camera.fullViewport[3]),n=r.camera.pixelRatio||1;e.setUniform4f("verticalOffset",i.screenLength*n,i.perDistance,i.minWorldLength,i.maxWorldLength)}function c(e,t,r,i=l){return i.screenLength=e.screenLength,i.perDistance=Math.tan(.5*t)/(.5*r),i.minWorldLength=e.minWorldLength,i.maxWorldLength=e.maxWorldLength,i}const l={screenLength:0,perDistance:0,minWorldLength:0,maxWorldLength:0}},"17ca":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.vertex.code.add(i["a"]`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
  257. vec3 camToVert = posWorld - camPosWorld;
  258. bool isBackface = dot(camToVert, normalWorld) > 0.0;
  259. if (isBackface) {
  260. posClip.z += 0.0000003 * posClip.w;
  261. }
  262. return posClip;
  263. }`)}},1853:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var i=r("792b"),n=r("2c4f"),a=r("6d5f"),s=r("b2b2");async function o(e,t){return await e.load(),c(e,t)}async function c(e,t){const r=[],o=(...e)=>{for(const t of e)Object(s["j"])(t)||(Array.isArray(t)?o(...t):n["a"].isCollection(t)?t.forEach(e=>o(e)):a["a"].isLoadable(t)&&r.push(t))};t(o);let c=null;if(await Object(i["c"])(r,async e=>{!1!==(await Object(i["d"])(l(e)?e.loadAll():e.load())).ok||c||(c=e)}),c)throw c.loadError;return e}function l(e){return"loadAll"in e&&"function"==typeof e.loadAll}},"189c":function(e,t,r){"use strict";r.d(t,"a",(function(){return B})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return c})),r.d(t,"g",(function(){return v})),r.d(t,"h",(function(){return s})),r.d(t,"i",(function(){return a}));var i=r("b7c2"),n=r("d17d");function a(e,t,r=n["c"].ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function s(e,t,r,i,a=n["c"].ADD,s=n["c"].ADD,o=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:a,opAlpha:s,color:{r:o[0],g:o[1],b:o[2],a:o[3]}}}const o={face:n["n"].BACK,mode:n["j"].CCW},c={face:n["n"].FRONT,mode:n["j"].CCW},l=e=>e===i["c"].Back?o:e===i["c"].Front?c:null,u={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function h(e){return w.intern(e)}function p(e){return T.intern(e)}function f(e){return E.intern(e)}function b(e){return C.intern(e)}function m(e){return M.intern(e)}function g(e){return I.intern(e)}function y(e){return L.intern(e)}function O(e){return F.intern(e)}function v(e){return U.intern(e)}class _{constructor(e,t){this.makeKey=e,this.makeRef=t,this.interns=new Map}intern(e){if(!e)return null;const t=this.makeKey(e),r=this.interns;return r.has(t)||r.set(t,this.makeRef(e)),r.get(t)}}function j(e){return"["+e.join(",")+"]"}const w=new _(x,e=>({__tag:"Blending",...e}));function x(e){return e?j([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const T=new _(S,e=>({__tag:"Culling",...e}));function S(e){return e?j([e.face,e.mode]):null}const E=new _(A,e=>({__tag:"PolygonOffset",...e}));function A(e){return e?j([e.factor,e.units]):null}const C=new _(R,e=>({__tag:"DepthTest",...e}));function R(e){return e?j([e.func]):null}const M=new _(P,e=>({__tag:"StencilTest",...e}));function P(e){return e?j([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const I=new _(D,e=>({__tag:"DepthWrite",...e}));function D(e){return e?j([e.zNear,e.zFar]):null}const L=new _(N,e=>({__tag:"ColorWrite",...e}));function N(e){return e?j([e.r,e.g,e.b,e.a]):null}const F=new _(k,e=>({__tag:"StencilWrite",...e}));function k(e){return e?j([e.mask]):null}const U=new _(z,e=>({blending:h(e.blending),culling:p(e.culling),polygonOffset:f(e.polygonOffset),depthTest:b(e.depthTest),stencilTest:m(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:y(e.colorWrite),stencilWrite:O(e.stencilWrite)}));function z(e){return e?j([x(e.blending),S(e.culling),A(e.polygonOffset),R(e.depthTest),P(e.stencilTest),D(e.depthWrite),N(e.colorWrite),k(e.stencilWrite)]):null}class B{constructor(e){this._pipelineInvalid=!0,this._blendingInvalid=!0,this._cullingInvalid=!0,this._polygonOffsetInvalid=!0,this._depthTestInvalid=!0,this._stencilTestInvalid=!0,this._depthWriteInvalid=!0,this._colorWriteInvalid=!0,this._stencilWriteInvalid=!0,this._stateSetters=e}setPipeline(e){(this._pipelineInvalid||e!==this._pipeline)&&(this._setBlending(e.blending),this._setCulling(e.culling),this._setPolygonOffset(e.polygonOffset),this._setDepthTest(e.depthTest),this._setStencilTest(e.stencilTest),this._setDepthWrite(e.depthWrite),this._setColorWrite(e.colorWrite),this._setStencilWrite(e.stencilWrite),this._pipeline=e),this._pipelineInvalid=!1}invalidateBlending(){this._blendingInvalid=!0,this._pipelineInvalid=!0}invalidateCulling(){this._cullingInvalid=!0,this._pipelineInvalid=!0}invalidatePolygonOffset(){this._polygonOffsetInvalid=!0,this._pipelineInvalid=!0}invalidateDepthTest(){this._depthTestInvalid=!0,this._pipelineInvalid=!0}invalidateStencilTest(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}invalidateDepthWrite(){this._depthWriteInvalid=!0,this._pipelineInvalid=!0}invalidateColorWrite(){this._colorWriteInvalid=!0,this._pipelineInvalid=!0}invalidateStencilWrite(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}_setBlending(e){this._blending=this._setSubState(e,this._blending,this._blendingInvalid,this._stateSetters.setBlending),this._blendingInvalid=!1}_setCulling(e){this._culling=this._setSubState(e,this._culling,this._cullingInvalid,this._stateSetters.setCulling),this._cullingInvalid=!1}_setPolygonOffset(e){this._polygonOffset=this._setSubState(e,this._polygonOffset,this._polygonOffsetInvalid,this._stateSetters.setPolygonOffset),this._polygonOffsetInvalid=!1}_setDepthTest(e){this._depthTest=this._setSubState(e,this._depthTest,this._depthTestInvalid,this._stateSetters.setDepthTest),this._depthTestInvalid=!1}_setStencilTest(e){this._stencilTest=this._setSubState(e,this._stencilTest,this._stencilTestInvalid,this._stateSetters.setStencilTest),this._stencilTestInvalid=!1}_setDepthWrite(e){this._depthWrite=this._setSubState(e,this._depthWrite,this._depthWriteInvalid,this._stateSetters.setDepthWrite),this._depthWriteInvalid=!1}_setColorWrite(e){this._colorWrite=this._setSubState(e,this._colorWrite,this._colorWriteInvalid,this._stateSetters.setColorWrite),this._colorWriteInvalid=!1}_setStencilWrite(e){this._stencilWrite=this._setSubState(e,this._stencilWrite,this._stencilWriteInvalid,this._stateSetters.setStencilWrite),this._stencilTestInvalid=!1}_setSubState(e,t,r,i){return(r||e!==t)&&(i(e),this._pipelineInvalid=!0),e}}},"18bf":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("d386")),c=r("09db"),l=r("9f91"),u=r("a7a7");let d=i=class extends u["a"]{constructor(e){super(e),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(e,t){t.fieldInfos=e&&e.map(e=>e.toJSON())}clone(){return new i(Object(a["a"])({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};Object(n["a"])([Object(s["b"])({type:Object,json:{write:!0}})],d.prototype,"attributes",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],d.prototype,"description",void 0),Object(n["a"])([Object(s["b"])({type:[l["a"]]})],d.prototype,"fieldInfos",void 0),Object(n["a"])([Object(c["a"])("fieldInfos")],d.prototype,"writeFieldInfos",null),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],d.prototype,"title",void 0),Object(n["a"])([Object(s["b"])({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=i=Object(n["a"])([Object(o["a"])("esri.popup.content.FieldsContent")],d);const h=d},"191a":function(e,t,r){"use strict";r.d(t,"a",(function(){return N}));var i=r("28eb"),n=r("b2b2"),a=r("8a44"),s=r("d791"),o=r("afe1"),c=r("2ebb"),l=r("b061"),u=r("35b3"),d=r("3bd5"),h=r("614d"),p=r("1153"),f=r("1f93");class b{constructor(e){this.first=e.from,this.count=e.to-e.from}}class m{constructor(e=0,t=0){this.from=e,this.to=t}}class g extends m{constructor(e,t,r,i,n,a){super(t,r),this.id=e,this.isVisible=i,this.hasHighlights=n,this.hasOccludees=a}}function y(e){return Array.from(e.values()).sort(O)}function O(e,t){return e.from===t.from?e.to-t.to:e.from-t.from}function v(e,t){if(0===e.length)return void e.push(new b(t));const r=e[e.length-1];if(_(r,t)){const e=t.from-r.first+t.to-t.from;r.count=e}else e.push(new b(t))}function _(e,t){return e.first+e.count>=t.from}class j{constructor(e,t){this._pool=e,this._size=0,this._buffer=e.newBuffer(x(t))}dispose(){this._buffer=this._pool.deleteBuffer(this._buffer),this._size=0}release(){this.erase(0,this._size),this.dispose()}get vao(){return this._buffer.vao}get array(){return this._buffer.array}get size(){return this._size}grow(e){this._resize(this._size+e,!0).dispose()}alloc(e){return this._resize(e,!1)}_resize(e,t){let r;const i=T(this._buffer.length,this._size,e);if(this._buffer.length!==i){const e=this._pool.newBuffer(i);t&&(e.array.set(this._buffer.array.subarray(0,Math.min(this._size,i))),e.vao.vertexBuffers.geometry.setSubData(e.array,0,0,e.array.byteLength)),r=this._buffer,this._buffer=e}const n=this._size;return this._size=e,r?{dispose:()=>{r.array.fill(0,0,n),this._pool.deleteBuffer(r)},copy:(e,t,i)=>this._buffer.array.set(r.array.subarray(t,i),e),hasNewBuffer:!0}:{dispose:()=>{},copy:(e,t,r)=>{e!==t&&this._buffer.array.copyWithin(e,t,r)},hasNewBuffer:!1}}erase(e,t){this._buffer.array.fill(0,e,t)}}const w=65536;function x(e){return Math.ceil(e/w)*w}function T(e,t,r){return t<=r?e>=r?e:x(Math.max(2*e,r)):e<=2*r?e:x(r)}var S=r("aefa"),E=r("f2e0"),A=r("7ce4"),C=r("d17d"),R=r("0fa6");class M{constructor(e,t,r,i){this.vao=new R["a"](e,t,{geometry:r},{geometry:A["a"].createVertex(e,C["D"].STATIC_DRAW)}),this.array=new Float32Array(i),this.vao.vertexBuffers.geometry.setSize(this.array.byteLength)}dispose(){this.vao.dispose(!0)}get length(){return this.array.length}}const P=S["a"]+1;class I{constructor(e,t,r){this._rctx=e,this._locations=t,this._layout=r,this._cache=e.newCache("MergedRenderer pool "+Object(E["b"])(),D)}dispose(){this._cache.destroy()}newBuffer(e){const t=e.toString(),r=this._cache.pop(t);if(Object(n["k"])(r)){const e=r.pop();return r.length>0&&this._cache.put(t,r,e.array.byteLength*r.length,P),e}return new M(this._rctx,this._locations,this._layout,e)}deleteBuffer(e){const t=e.array.byteLength,r=e.array.length.toString(),i=this._cache.pop(r);return Object(n["k"])(i)?(i.push(e),this._cache.put(r,i,t*i.length,-1)):this._cache.put(r,[e],t,-1),null}}function D(e,t){if(t===S["d"].ALL)return void e.forEach(e=>e.dispose());const r=e.pop(),i=e.length*r.array.byteLength;return r.dispose(),i}var L=r("b623");class N{constructor(e,t,r){this._rctx=e,this._materialRepository=t,this._material=r,this.type="MergedRenderer",this._dataByOrigin=new Map,this._renderCommandData=new a["a"],this._hasHighlights=!1,this._hasOccludees=!1,this._glMaterials=new l["a"](this._material,this._materialRepository),this._bufferWriter=r.createBufferWriter(),this._bufferPool=new I(e,r.vertexAttributeLocations,Object(c["a"])(this._bufferWriter.vertexBufferLayout))}dispose(){this._glMaterials.destroy(),this._dataByOrigin.forEach(e=>e.buffer.dispose()),this._dataByOrigin.clear(),this._bufferPool.dispose()}get isEmpty(){return 0===this._dataByOrigin.size}get hasHighlights(){return this._hasHighlights}get hasOccludees(){return this._hasOccludees}get hasWater(){return!this.isEmpty&&this._material instanceof f["a"]}get rendersOccluded(){return!this.isEmpty&&this._material.renderOccluded!==u["c"].Occlude}modify(e){this._updateGeometries(e.updates),this._addAndRemoveGeometries(e.adds,e.removes),this._updateRenderCommands()}_addAndRemoveGeometries(e,t){const r=this._bufferWriter,i=r.vertexBufferLayout.stride/4,n=this._dataByOrigin,a=k(e,t);a.forEach((e,t)=>{a.delete(t);const s=e.toAdd.reduce((e,t)=>e+r.elementCount(t.data),0);let o=n.get(t);if(null==o)Object(p["a"])(0===e.toRemove.length),o=new G(e.origin,new j(this._bufferPool,s*i)),n.set(t,o);else if(0===e.toAdd.length&&o.instances.size===e.toRemove.length)return o.buffer.dispose(),void n.delete(t);let c=0;o.instances.forEach(e=>c+=e.to-e.from);const l=e.toRemove.reduce((e,t)=>e+r.elementCount(t.data),0),u=o.buffer.size,d=(c+s-l)*i,h=q;if(d<u/2?this._removeAndRebuild(o,e.toRemove,i,d,h):e.toRemove.length>0&&this._remove(o,e.toRemove,i,h),e.toAdd.length>0){const t=W;Object(p["l"])(t,-e.origin[0],-e.origin[1],-e.origin[2]),this._add(o,e.toAdd,i,t,h)}const f=o.buffer.vao.vertexBuffers.geometry;V(h),h.forAll(({from:e,to:t})=>{if(e<t){const r=o.buffer.array,i=4,n=e*i,a=t*i;f.setSubData(r,n,n,a)}}),h.clear(),o.drawCommandsDirty=!0})}_updateGeometries(e){const t=this._bufferWriter,r=t.vertexBufferLayout.stride/4;for(const i of e){const e=i.renderGeometry,n=this._dataByOrigin.get(e.origin.id),a=n&&n.instances.get(e.id);if(!a)return;const s=i.updateType;if(s&d["a"].State.VISIBILITIES&&(a.isVisible=e.instanceParameters.visible),s&(d["a"].State.HIGHLIGHTS|d["a"].State.VISIBILITIES)){const t=e.instanceParameters.visible;a.hasHighlights=!!e.instanceParameters.highlights&&t}if(s&d["a"].State.OCCLUDEES&&(a.hasOccludees=!!e.instanceParameters.occludees),s&(d["a"].State.VERTEXATTRS|d["a"].State.TRANSFORMATION)){const{array:i,vao:s}=n.buffer;Object(L["b"])(e,$,Z),t.write({transformation:$,invTranspTransformation:Z},e.data,t.vertexBufferLayout.createView(i.buffer),a.from),Object(p["a"])(a.from+t.elementCount(e.data)===a.to,"material VBO layout has changed"),s.vertexBuffers.geometry.setSubData(i,a.from*r*4,a.from*r*4,a.to*r*4)}n.drawCommandsDirty=!0}}_updateRenderCommands(){this._hasHighlights=!1,this._hasOccludees=!1,this._dataByOrigin.forEach(e=>{e.hasHiddenInstances=!1,e.hasHighlights=!1,e.hasOccludees=!1,Object(i["c"])(e.instances,t=>(t.isVisible?(t.hasHighlights&&(this._hasHighlights=!0,e.hasHighlights=!0),t.hasOccludees&&(this._hasOccludees=!0,e.hasOccludees=!0)):e.hasHiddenInstances=!0,e.hasHiddenInstances&&e.hasHighlights&&e.hasOccludees))});const e=e=>{if(e.drawCommandsDefault=null,e.drawCommandsHighlight=null,e.drawCommandsOccludees=null,e.drawCommandsShadowHighlightRest=null,0===e.instances.size)return;if(!z(e)){const t=this._bufferWriter.vertexBufferLayout.stride,r=4*e.buffer.size/t;return void(e.drawCommandsDefault=[{first:0,count:r}])}const t=y(e.instances);e.drawCommandsDefault=[],e.drawCommandsHighlight=[],e.drawCommandsOccludees=[],e.drawCommandsShadowHighlightRest=[];for(const r of t)r.isVisible&&(r.hasOccludees?v(e.drawCommandsOccludees,r):v(e.drawCommandsDefault,r),r.hasHighlights?v(e.drawCommandsHighlight,r):v(e.drawCommandsShadowHighlightRest,r))};this._dataByOrigin.forEach(t=>{t.drawCommandsDirty&&(e(t),t.drawCommandsDirty=!1)})}updateAnimation(e){return this._material.update(e)}requiresSlot(e,t){return null==e||this._material.requiresSlot(e,t)}render(e,t,r){if(!this.requiresSlot(e,t))return!1;const i=t===h["a"].MATERIAL_HIGHLIGHT||t===h["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT;if(i&&!this._hasHighlights)return!1;const a=t===h["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT,s=!(i||a);if(this._dataByOrigin.forEach(e=>{if(i&&!e.hasHighlights)return;const t=(i?e.drawCommandsHighlight:a&&z(e)?e.drawCommandsShadowHighlightRest:e.drawCommandsDefault)||null,r=s&&e.drawCommandsOccludees||null;(Object(n["k"])(t)||Object(n["k"])(r))&&this._renderCommandData.push(new H(e.origin,e.buffer,t,r))}),0===this._renderCommandData.length)return!1;const o=this._rctx,c=this._glMaterials.load(o,t);if(Object(n["j"])(c))return this._renderCommandData.clear(),!1;const l=c.beginSlot(r);return o.useTechnique(l,e,!1),c.bind(r,l),this._renderCommandData.forAll(({origin:t,buffer:i,renderCommands:a,occludeeCommands:s})=>{r.origin=t,l.bindDraw(r),l.ensureAttributeLocations(i.vao),o.bindVAO(i.vao);const c=l.primitiveType;Object(n["k"])(a)&&this._renderCommands(o,c,a),Object(n["k"])(s)&&(l.bindPipelineState(o,e,!0),this._renderCommands(o,c,s),l.bindPipelineState(o,e,!1))}),this._renderCommandData.clear(),!0}_renderCommands(e,t,r){for(let i=0;i<r.length;i++)e.drawArrays(t,r[i].first,r[i].count)}_removeAndRebuild(e,t,r,i,n){for(const l of t)e.instances.delete(l.id);const a=y(e.instances);e.instances.clear();const s=e.buffer.size,o=e.buffer.alloc(i);let c=0;for(const l of a){const t=l.from*r,i=l.to*r;o.copy(c,t,i),l.from=c/r,c+=i-t,l.to=c/r,e.instances.set(l.id,l)}n.push(new m(0,o.hasNewBuffer?e.buffer.array.length:s)),o.dispose(),e.buffer.erase(c,n.back().to),e.holes.clear()}_remove(e,t,r,i){for(const n of t){const t=n.id,a=e.instances.get(t),s=a.from*r,o=a.to*r;e.buffer.erase(s,o),e.holes.push(new m(a.from,a.to)),e.instances.delete(t),i.push(new m(s,o))}V(e.holes)}_add(e,t,r,i,a){if(0===t.length)return;const o=this._bufferWriter;let c=o.vertexBufferLayout.createView(e.buffer.array.buffer);const l=e.holes.length>0;let u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER;for(const h of t){const t=Object(n["k"])(h.transformation)?Object(s["n"])($,i,h.transformation):i;Object(s["b"])(Z,t);const f=Object(s["u"])(Z,Z),b=o.elementCount(h.data),y=b*r;let O=B(e.holes,b);Object(n["j"])(O)&&(O=e.buffer.size/r,e.buffer.grow(y),c=o.vertexBufferLayout.createView(e.buffer.array.buffer)),o.write({transformation:t,invTranspTransformation:f},h.data,c,O);const v=h.instanceParameters.visible,_=!!h.instanceParameters.highlights&&v,j=!!h.instanceParameters.occludees,w=new g(h.id,O,O+b,v,_,j);Object(p["a"])(null==e.instances.get(h.id)),e.instances.set(h.id,w),l?a.push(new m(w.from*r,w.to*r)):(u=Math.min(w.from,u),d=Math.max(w.to,d))}l||a.push(new m(u*r,d*r))}get test(){return{material:this._material,glMaterials:this._glMaterials,dataByOrigin:this._dataByOrigin}}}class F{constructor(e){this.origin=e,this.toAdd=new Array,this.toRemove=new Array}}function k(e,t){const r=new Map;for(const i of e)U(r,i,!0);for(const i of t)U(r,i,!1);return r}function U(e,t,r){const i=t.origin;if(Object(n["j"])(i))return;let a=e.get(i.id);null==a&&(a=new F(i.vec3),e.set(i.id,a)),r?a.toAdd.push(t):a.toRemove.push(t)}function z(e){return e.hasOccludees||e.hasHighlights||e.hasHiddenInstances}function B(e,t){let r;if(!e.some(e=>!(e.to-e.from<t)&&(r=e,!0)))return null;const i=r.from;return r.from+=t,r.from>=r.to&&e.removeUnordered(r),i}function V(e){const t=new Map;e.forAll(e=>t.set(e.from,e));let r=!0;for(;r;)r=!1,e.forEach(i=>{const n=t.get(i.to);n&&(i.to=n.to,t.delete(n.from),e.removeUnordered(n),r=!0)})}class G{constructor(e,t){this.origin=e,this.buffer=t,this.instances=new Map,this.holes=new a["a"]({deallocator:null}),this.hasHiddenInstances=!1,this.hasHighlights=!1,this.hasOccludees=!1,this.drawCommandsDirty=!1}}class H{constructor(e,t,r,i){this.origin=e,this.buffer=t,this.renderCommands=r,this.occludeeCommands=i}}const q=new a["a"]({deallocator:null}),W=Object(o["d"])(),$=Object(o["d"])(),Z=Object(o["d"])()},1942:function(e,t,r){"use strict";var i,n;r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n})),function(e){e[e.OBJECT=0]="OBJECT",e[e.HUD=1]="HUD",e[e.TERRAIN=2]="TERRAIN",e[e.OVERLAY=3]="OVERLAY",e[e.I3S=4]="I3S",e[e.PCL=5]="PCL",e[e.LOD=6]="LOD",e[e.VOXEL=7]="VOXEL"}(i||(i={}));class a{constructor(){this.verticalOffset=0,this.selectionMode=!1,this.hud=!0,this.selectOpaqueTerrainOnly=!0,this.invisibleTerrain=!1,this.backfacesTerrain=!0,this.isFiltered=!1,this.store=n.ALL}}!function(e){e[e.MIN=0]="MIN",e[e.MINMAX=1]="MINMAX",e[e.ALL=2]="ALL"}(n||(n={}))},1956:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var i=r("ce50"),n=r("c120"),a=r("e92d");const s=a["a"].getLogger("esri/views/webgl");function o(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const c=!!Object(n["a"])("enable-feature:webgl-debug");function l(){return c}function u(){return c}function d(e){if(l()){const t=e.getError();if(t){const r=o(e,t),n=(new Error).stack;s.error(new i["a"]("webgl-error","WebGL error occured",{message:r,stack:n}))}}}},1962:function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return m}));var i=r("a05b"),n=r("d272"),a=r("4db9"),s=r("6d5b"),o=r("c2d1"),c=r("6a07"),l=r("d047"),u=r("c6d7"),d=r("ebd5"),h=r("4377"),p=r("3886"),f=r("690a"),b=r("b7bd");function m(e){const t=new f["a"],r=e.output===i["a"].Depth;return t.include(a["a"],{linearDepth:r}),t.include(s["a"],e),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),t.attributes.add(b["a"].POSITION,"vec3"),t.varyings.add("vpos","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),r&&(t.include(o["a"],e),t.vertex.uniforms.add("nearFar","vec2"),t.varyings.add("linearDepth","float")),t.vertex.code.add(p["a"]`
  264. void main(void) {
  265. vpos = position;
  266. forwardNormalizedVertexColor();
  267. ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
  268. gl_Position = ${r?p["a"]`transformPositionWithDepth(proj, view, vpos, nearFar, linearDepth);`:p["a"]`transformPosition(proj, view, vpos);`}
  269. }
  270. `),t.include(n["a"],e),t.fragment.include(h["a"]),e.multipassTerrainEnabled&&(t.fragment.include(l["a"]),t.include(u["b"],e)),t.fragment.uniforms.add("eColor","vec4"),e.output===i["a"].Highlight&&t.include(c["a"]),t.fragment.code.add(p["a"]`
  271. void main() {
  272. discardBySlice(vpos);
  273. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  274. vec4 fColor = ${e.attributeColor?"vColor * eColor;":"eColor;"}
  275. if (fColor.a < ${p["a"].float(d["c"])}) {
  276. discard;
  277. }
  278. ${e.output===i["a"].Alpha?p["a"]`gl_FragColor = vec4(fColor.a);`:""}
  279. ${e.output===i["a"].Color?p["a"]`gl_FragColor = highlightSlice(fColor, vpos); ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}`:""}
  280. ${e.output===i["a"].Highlight?p["a"]`outputHighlight();`:""};
  281. ${e.output===i["a"].Depth?p["a"]`outputDepth(linearDepth);`:""};
  282. }
  283. `),t}const g=Object.freeze({__proto__:null,build:m})},"19f3":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return c}));var i,n=r("1a2b"),a=r("2aad"),s=r("3886"),o=r("690a");function c(e){const t=new o["a"];return t.include(a["a"],!1),t.fragment.uniforms.add("cloudRadius","float").add("halfCubeMapSize","float").add("power","float").add("sigmaE","float").add("density","float").add("cloudSize","float").add("detailSize","float").add("smoothness","float").add("cloudHeight","float").add("coverage","float").add("view","mat3").add("cloudShapeTexture","sampler2D"),t.fragment.code.add(s["a"]`
  284. const int STEPS = ${e.steps===i.SIXTEEN?s["a"]`16`:e.steps===i.HUNDRED?s["a"]`100`:s["a"]`200`};
  285. const int STEPS_LIGHT = 6;
  286. const float stepL = 300.0 / float(STEPS_LIGHT);
  287. const float cloudStart = 1500.0;
  288. vec3 rayDirection(vec2 fragCoord) {
  289. vec2 xy = fragCoord - halfCubeMapSize;
  290. return normalize(vec3(-xy, -halfCubeMapSize));
  291. }
  292. float remap(float x, float low1, float high1, float low2, float high2) {
  293. return low2 + (x - low1) * (high2 - low2) / (high1 - low1);
  294. }
  295. float saturate(float x) {
  296. return clamp(x, 0.0, 1.0);
  297. }`),t.fragment.code.add(s["a"]`
  298. float getCloudShape(vec3 pos, float pOffset) {
  299. const float textureWidth = ${s["a"].float(n["a"])};
  300. const float dataWidth = ${s["a"].float(n["a"])};
  301. const float tileRows = ${s["a"].float(n["d"])};
  302. const vec3 atlasDimensions = vec3(${s["a"].float(n["e"])}, ${s["a"].float(n["e"])}, tileRows * tileRows);
  303. //Change from Y being height to Z being height
  304. vec3 p = float(${s["a"].float(n["c"])}) * pos.xzy;
  305. //Pixel coordinates of point in the 3D data
  306. vec3 coord = vec3(mod(p - pOffset * atlasDimensions, atlasDimensions));
  307. float f = fract(coord.z);
  308. float level = floor(coord.z);
  309. float tileY = floor(level / tileRows);
  310. float tileX = level - tileY * tileRows;
  311. //The data coordinates are offset by the x and y tile, the two boundary cells between each tile pair and the initial boundary cell on the first row/column
  312. vec2 offset = atlasDimensions.x * vec2(tileX, tileY) + 2.0 * vec2(tileX, tileY) + 1.0;
  313. vec2 pixel = coord.xy + offset;
  314. vec2 data = texture2D(cloudShapeTexture, mod(pixel, dataWidth) / textureWidth).xy;
  315. return 1.0 - mix(data.x, data.y, f);
  316. }`),t.fragment.code.add(s["a"]`float clouds(vec3 p) {
  317. float cloudVariations = getCloudShape(0.002 * p, 0.5);
  318. float cloud = saturate(0.5 * mix(0.0, 1.0, min(2.0 * coverage, 1.0)));
  319. cloud += (cloudVariations * 0.6 - 0.3) * ( -4.0 * (coverage * coverage - coverage));
  320. float heightFraction = saturate((length(p) - cloudRadius - cloudStart) / cloudHeight);
  321. cloud *= saturate(remap(heightFraction, 0.0, 0.25, 0.0, 1.0)) * saturate(remap(heightFraction, 0.75, 1.0, 1.0, 0.0));
  322. float shape = getCloudShape(cloudSize * p, 0.0);
  323. shape *= mix(0.0, 1.0, min(2.0 * (1.0 - coverage), 1.0));
  324. cloud = saturate(remap(cloud, shape, 1.0, 0.0, 1.0));
  325. if (cloud <= 0.0) {
  326. return 0.0;
  327. }
  328. return density * saturate(remap(cloud, smoothness * getCloudShape(detailSize * p, 0.0), 1.0, 0.0, 1.0));
  329. }`),t.fragment.code.add(s["a"]`vec2 sphereIntersections(vec3 start, vec3 dir, float radius) {
  330. float a = dot(dir, dir);
  331. float b = 2.0 * dot(dir, start);
  332. float c = dot(start, start) - (radius * radius);
  333. float d = (b * b) - 4.0 * a * c;
  334. if (d < 0.0) {
  335. return vec2(1e5, -1e5);
  336. }
  337. return vec2((-b - sqrt(d)) / (2.0 * a), (-b + sqrt(d)) / (2.0 * a));
  338. }
  339. float HenyeyGreenstein(float g, float costh) {
  340. return (1.0 / (4.0 * 3.1415)) * ((1.0 - g * g) / pow(1.0 + g * g - 2.0 * g * costh, 1.5));
  341. }`),t.fragment.code.add("\n vec3 multipleOctaves(float extinction, float mu, float stepL) {\n float attenuation = 1.0;\n float contribution = 1.0;\n float phaseAttenuation = 1.0;\n vec3 luminance = vec3(0);\n\n for (int i = 0; i < 4; i++) {\n float phase = mix(HenyeyGreenstein(0.0, mu), HenyeyGreenstein(0.3 * phaseAttenuation, mu), 0.7);\n luminance += contribution * phase * exp(-stepL * extinction * sigmaE * attenuation);\n attenuation *= 0.2;\n contribution *= 0.6;\n phaseAttenuation *= 0.5;\n }\n\n return luminance;\n }"),t.fragment.code.add(s["a"]`vec3 lightRay(vec3 org, vec3 p, float phaseFunction, float mu, vec3 sunDirection) {
  342. float lightRayDensity = clouds(p);
  343. lightRayDensity += clouds(p + sunDirection * 1.0 * stepL);
  344. lightRayDensity += clouds(p + sunDirection * 2.0 * stepL);
  345. lightRayDensity += clouds(p + sunDirection * 3.0 * stepL);
  346. lightRayDensity += clouds(p + sunDirection * 4.0 * stepL);
  347. lightRayDensity += clouds(p + sunDirection * 5.0 * stepL);
  348. vec3 beersLaw = multipleOctaves(lightRayDensity, mu, stepL);
  349. return mix(beersLaw * 2.0 * (1.0 - (exp(-stepL * lightRayDensity * 2.0 * sigmaE ))), beersLaw, 0.5 + 0.5 * mu);
  350. }`),t.fragment.code.add(s["a"]`vec3 mainRay(vec3 org, vec3 dir, vec3 sunDirection, float distToStart, float totalDistance, out float totalTransmittance) {
  351. if (dir.z < 0.0) {
  352. return vec3(0);
  353. }
  354. totalTransmittance = 1.0;
  355. float stepS = totalDistance / float(STEPS);
  356. float cameraHeight = length(org);
  357. float mu = 0.5 + 0.5 * dot(sunDirection, dir);
  358. float phaseFunction = mix(HenyeyGreenstein(-0.3, mu), HenyeyGreenstein(0.3, mu), 0.7);
  359. vec3 p = org + distToStart * dir;
  360. float dist = distToStart;
  361. vec3 color = vec3(0.0);
  362. for (int i = 0; i < STEPS; i++) {
  363. float sampleDensity = clouds(p);
  364. float sampleSigmaE = sampleDensity * sigmaE;
  365. if (sampleDensity > 0.0 ) {
  366. float ambient = mix((1.2), (1.6), saturate((length(p) - cloudRadius - cloudStart) / cloudHeight));
  367. vec3 luminance = sampleDensity * (ambient + power * phaseFunction * lightRay(org, p, phaseFunction, mu, sunDirection));
  368. float transmittance = exp(-sampleSigmaE * stepS);
  369. color += totalTransmittance * (luminance - luminance * transmittance) / sampleSigmaE;
  370. totalTransmittance *= transmittance;
  371. if (totalTransmittance <= 0.001) {
  372. totalTransmittance = 0.0;
  373. break;
  374. }
  375. }
  376. dist += stepS;
  377. p = org + dir * dist;
  378. }
  379. return color;
  380. }`),t.fragment.code.add(s["a"]`void main() {
  381. vec3 rayDir = rayDirection(gl_FragCoord.xy);
  382. rayDir = normalize(view * rayDir);
  383. vec3 viewPos = vec3(0, 0, cloudRadius + 1.0);
  384. bool hitsPlanet = rayDir.z < 0.0;
  385. if (hitsPlanet) {
  386. gl_FragColor = vec4(vec3(0), 1);
  387. return;
  388. }
  389. vec2 rayStartIntersect = sphereIntersections(viewPos, rayDir, cloudRadius + cloudStart);
  390. vec2 rayEndIntersect = sphereIntersections(viewPos, rayDir, cloudRadius + cloudStart + cloudHeight);
  391. float distToStart = rayStartIntersect.y;
  392. float totalDistance = rayEndIntersect.y - distToStart;
  393. float totalTransmittance = 1.0;
  394. vec3 sunDirection = normalize(vec3(0, 0, 1));
  395. vec3 col = 0.5 * mainRay(viewPos, rayDir, sunDirection, distToStart, totalDistance, totalTransmittance).rgb;
  396. gl_FragColor = vec4(col, totalTransmittance);
  397. }`),t}!function(e){e[e.SIXTEEN=0]="SIXTEEN",e[e.HUNDRED=1]="HUNDRED",e[e.TWOHUNDRED=2]="TWOHUNDRED",e[e.COUNT=3]="COUNT"}(i||(i={}));const l=Object.freeze({__proto__:null,get RayMarchingSteps(){return i},build:c})},"1a2b":function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return O})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return b}));var i=r("c120"),n=r("b2b2"),a=r("ca67"),s=r("c3a4"),o=r("ca98"),c=r("fa1e"),l=r("c829"),u=r("d17d"),d=r("189c");class h extends o["a"]{constructor(e){super(e,null,()=>this.destroy())}initializeProgram(e){const t=h.shader.get().build();return new l["a"](e.rctx,t,c["a"])}initializePipeline(){return Object(d["g"])({blending:Object(d["i"])(u["b"].ONE,u["b"].ZERO),depthTest:{func:u["h"].LEQUAL},colorWrite:d["d"]})}}h.shader=new s["a"](a["a"],()=>r.e("chunk-2d0d3e55").then(r.bind(null,"5f5c")));var p=r("d5f7"),f=r("d267");const b=Object(i["a"])("esri-mobile")?64:128,m=b/128,g=Math.ceil(Math.sqrt(b)),y=(b+2)*g;class O{constructor(e,t){this._frameBuffer=new f["a"](e,{colorTarget:u["y"].TEXTURE,width:y,height:y},{target:u["A"].TEXTURE_2D,pixelFormat:u["p"].RGBA,dataType:u["q"].UNSIGNED_BYTE,wrapMode:u["B"].CLAMP_TO_EDGE,samplingMode:u["z"].LINEAR,hasMipmap:!1,width:y,height:y}),this._vao=Object(p["d"])(e),this._technique=new h({rctx:e,viewingMode:t.state.viewingMode})}get textureAtlas(){return this._frameBuffer.colorTexture}destroy(){this._technique=Object(n["r"])(this._technique),this._frameBuffer=Object(n["e"])(this._frameBuffer),this._vao=Object(n["e"])(this._vao)}render(e){if(Object(n["j"])(this._vao)||Object(n["j"])(this.textureAtlas))return;const t=e.getViewport();e.setViewport(0,0,y,y),e.bindFramebuffer(this._frameBuffer);const r=e.useTechnique(this._technique);r.setUniform1f("tileSize",b),r.setUniform1f("tileRows",g),e.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),e.gl.drawArrays(e.gl.TRIANGLE_STRIP,0,4),e.setViewport(t.x,t.y,t.width,t.height)}}},"1a3e":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("cea0"),n=r("7af8");const a=Object.prototype.toString;function s(e){const t="__accessorMetadata__"in e?Object(i["m"])(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return o.apply(this,e)}}function o(e,t,r,i){Object(n["b"])(e,t).cast=i}function c(e){return function(t,r){Object(n["b"])(t,e).cast=t[r]}}function l(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===a.call(e[0])?s(e[0]):1===e.length&&"string"==typeof e[0]?c(e[0]):void 0}},"1a54":function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return x})),r.d(t,"d",(function(){return T})),r.d(t,"e",(function(){return _})),r.d(t,"f",(function(){return m})),r.d(t,"g",(function(){return S})),r.d(t,"h",(function(){return f})),r.d(t,"i",(function(){return w})),r.d(t,"j",(function(){return O})),r.d(t,"k",(function(){return j}));var i=r("f0b9"),n=(r("c120"),r("b2b2")),a=r("a21b"),s=r("f2e0"),o=r("5996"),c=r("4261"),l=r("9180"),u=r("008c"),d=r("74e2"),h=r("a1f3");r("3563");class p{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}function f(e){return Object(n["k"])(e.geometry)}class b{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function m(e){const t=d["a"].fromJSON(e.geometryType),r=o["a"].fromJSON(e.spatialReference),i=e.transform,a=e.features.map(a=>{const s=g(a,t,r,e.objectIdFieldName),o=s.geometry;if(Object(n["k"])(o)&&i)switch(o.type){case"point":s.geometry=Object(u["e"])(i,o,o,o.hasZ,o.hasM);break;case"multipoint":s.geometry=Object(u["d"])(i,o,o,o.hasZ,o.hasM);break;case"polygon":s.geometry=Object(u["f"])(i,o,o,o.hasZ,o.hasM);break;case"polyline":s.geometry=Object(u["g"])(i,o,o,o.hasZ,o.hasM);break;case"extent":case"mesh":s.geometry=o}return s});return{geometryType:t,features:a,spatialReference:r,fields:e.fields?e.fields.map(e=>h["a"].fromJSON(e)):null,objectIdFieldName:e.objectIdFieldName,globalIdFieldName:e.globalIdFieldName,geohashFieldName:e.geohashFieldName,geometryProperties:e.geometryProperties,hasZ:e.hasZ,hasM:e.hasM,exceededTransferLimit:e.exceededTransferLimit,transform:null}}function g(e,t,r,i){return{uid:Object(s["b"])(),objectId:i&&e.attributes?e.attributes[i]:null,attributes:e.attributes,geometry:y(e.geometry,t,r),visible:!0}}function y(e,t,r){if(Object(n["j"])(e))return null;switch(t){case"point":{const t=e;return{x:t.x,y:t.y,z:t.z,m:t.m,hasZ:null!=t.z,hasM:null!=t.m,type:"point",spatialReference:r}}case"polyline":{const t=e;return{paths:t.paths,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polyline",spatialReference:r}}case"polygon":{const t=e;return{rings:t.rings,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polygon",spatialReference:r}}case"multipoint":{const t=e;return{points:t.points,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"multipoint",spatialReference:r}}}}function O(e,t,r,i){return{x:e,y:t,z:r,hasZ:null!=r,hasM:!1,spatialReference:i,type:"point"}}function v(e){if(Object(n["j"])(e))return 0;let t=32;switch(e.type){case"point":t+=42;break;case"polyline":case"polygon":{let r=0;const i=2+(e.hasZ?1:0)+(e.hasM?1:0),n="polyline"===e.type?e.paths:e.rings;for(const e of n)r+=e.length;t+=8*r*i+64,t+=128*r,t+=34,t+=32*(n.length+1);break}case"multipoint":{const r=2+(e.hasZ?1:0)+(e.hasM?1:0),i=e.points.length;t+=8*i*r+64,t+=128*i,t+=34,t+=32;break}case"extent":t+=98,e.hasM&&(t+=32),e.hasZ&&(t+=32);break;case"mesh":t+=Object(a["a"])(e.vertexAttributes.position),t+=Object(a["a"])(e.vertexAttributes.normal),t+=Object(a["a"])(e.vertexAttributes.uv),t+=Object(a["a"])(e.vertexAttributes.tangent)}return t}function _(e){let t=32;return t+=Object(i["b"])(e.attributes),t+=3,t+=8+v(e.geometry),t}function j(e){if(Object(n["j"])(e))return 0;switch(e.type){case"point":return 1;case"polyline":{let t=0;for(const r of e.paths)t+=r.length;return t}case"polygon":{let t=0;for(const r of e.rings)t+=r.length;return t}case"multipoint":return e.points.length;case"extent":return 2;case"mesh":{const t=e.vertexAttributes&&e.vertexAttributes.position;return t?t.length/3:0}default:return}}function w(e){if(Object(n["j"])(e))return!1;switch(e.type){case"extent":case"point":return!0;case"polyline":for(const t of e.paths)if(t.length>0)return!0;return!1;case"polygon":for(const t of e.rings)if(t.length>0)return!0;return!1;case"multipoint":return e.points.length>0;case"mesh":return!e.loaded||e.vertexAttributes.position.length>0}}function x(e,t){switch(Object(c["k"])(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(let r=0;r<e.paths.length;r++)Object(c["o"])(t,e.paths[r],e.hasZ);break;case"polygon":for(let r=0;r<e.rings.length;r++)Object(c["o"])(t,e.rings[r],e.hasZ);break;case"multipoint":Object(c["o"])(t,e.points,e.hasZ);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[3]=e.xmax,t[4]=e.ymax,null!=e.zmin&&(t[2]=e.zmin),null!=e.zmax&&(t[5]=e.zmax)}}function T(e,t){switch(Object(l["n"])(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[2]=e.x,t[1]=t[3]=e.y;break;case"polyline":for(let r=0;r<e.paths.length;r++)Object(l["r"])(t,e.paths[r]);break;case"polygon":for(let r=0;r<e.rings.length;r++)Object(l["r"])(t,e.rings[r]);break;case"multipoint":Object(l["r"])(t,e.points);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax}}function S(e,t){return null!=e.objectId?e.objectId:e.attributes&&t?e.attributes[t]:null}Object(c["h"])(),Object(l["l"])()},"1a64":function(e,t,r){"use strict";r.d(t,"a",(function(){return te}));var i=r("e92d"),n=r("38bf"),a=r("9ef0"),s=r("b2b2"),o=r("a915"),c=r("74df"),l=r("2e0f"),u=r("0eb9"),d=r("7b96"),h=r("7f60"),p=r("ba58"),f=r("5241"),b=r("a803"),m=r("b7c2"),g=r("0278"),y=r("35b3"),O=r("b7bd"),v=r("738e"),_=r("fc00"),j=r("a05b"),w=r("d0cb"),x=r("d7f7"),T=r("badc"),S=r("5957"),E=r("a4ee"),A=r("d272"),C=r("17b0"),R=r("9617"),M=r("8e97"),P=r("c3a4"),I=r("ca98"),D=r("da35"),L=r("fa1e"),N=r("c829"),F=r("7c51"),k=r("a5b5"),U=r("d17d"),z=r("189c");class B extends I["a"]{initializeProgram(e){const t=B.shader.get(),r=this.configuration,i=t.build({occlusionTestEnabled:r.occlusionTestEnabled,verticalOffsetEnabled:r.verticalOffset,screenSizePerspectiveEnabled:r.screenSizePerspective,depthHudEnabled:r.depthHudEnabled,depthHudAlignStartEnabled:r.depthHudAlignStartEnabled,screenCenterOffsetUnitsEnabled:r.screenCenterOffsetUnitsEnabled,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,viewingMode:e.viewingMode,isDraped:!1,multipassGeometryEnabled:r.multipassGeometryEnabled});return new N["a"](e.rctx,i,L["a"])}bindPass(e,t){Object(M["b"])(this.program,t.camera.projectionMatrix),Object(k["c"])(this.program,e,t.camera.pixelRatio||1),Object(C["b"])(this.program,e,t),Object(w["c"])(this.program,t),this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(R["a"])(this.program,t),this.program.bindTexture(t.hudVisibilityTexture,"hudVisibilityTexture"),this.program.setUniform1f("cameraGroundRelative",t.camera.aboveGround?1:-1),this.program.setUniform1f("polygonOffset",e.shaderPolygonOffset),Object(M["e"])(this.program,t),this.program.setUniform1f("perDistancePixelRatio",Math.tan(t.camera.fovY/2)/(t.camera.fullViewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",t.camera.viewInverseTransposeMatrix),this.program.setUniform2f("pixelToNDC",2/t.camera.fullViewport[2],2/t.camera.fullViewport[3]);const r=t.camera.pixelRatio||1;this.program.setUniform1f("lineSize",Math.ceil(e.size)*r),Object(F["a"])(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment")}bindDraw(e){Object(M["c"])(this.program,e),Object(M["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(A["c"])(this.program,this.configuration,e),this.program.rebindTextures()}setPipelineState(e){const t=e?U["h"].ALWAYS:U["h"].LESS;return this.configuration.depthHudEnabled?Object(z["g"])({depthTest:{func:t},depthWrite:z["e"]}):Object(z["g"])({blending:Object(z["h"])(U["b"].ONE,U["b"].SRC_ALPHA,U["b"].ONE_MINUS_SRC_ALPHA,U["b"].ONE_MINUS_SRC_ALPHA),depthTest:{func:t},colorWrite:z["d"]})}initializePipeline(){return this.setPipelineState(this.configuration.multipassGeometryEnabled)}}B.shader=new P["a"](k["a"],()=>r.e("chunk-2d0efcae").then(r.bind(null,"9a2b")));class V extends D["a"]{constructor(){super(...arguments),this.occlusionTestEnabled=!0,this.verticalOffset=!1,this.screenSizePerspective=!1,this.depthHudEnabled=!1,this.depthHudAlignStartEnabled=!1,this.screenCenterOffsetUnitsEnabled=w["b"].World,this.slicePlaneEnabled=!1,this.multipassGeometryEnabled=!1}}Object(E["a"])([Object(D["b"])()],V.prototype,"occlusionTestEnabled",void 0),Object(E["a"])([Object(D["b"])()],V.prototype,"verticalOffset",void 0),Object(E["a"])([Object(D["b"])()],V.prototype,"screenSizePerspective",void 0),Object(E["a"])([Object(D["b"])()],V.prototype,"depthHudEnabled",void 0),Object(E["a"])([Object(D["b"])()],V.prototype,"depthHudAlignStartEnabled",void 0),Object(E["a"])([Object(D["b"])({count:w["b"].COUNT})],V.prototype,"screenCenterOffsetUnitsEnabled",void 0),Object(E["a"])([Object(D["b"])()],V.prototype,"slicePlaneEnabled",void 0),Object(E["a"])([Object(D["b"])()],V.prototype,"multipassGeometryEnabled",void 0);class G extends y["b"]{constructor(e){super(e,q),this.techniqueConfig=new V,this._uniqueMaterialIdentifier=G.uniqueMaterialIdentifier(this.parameters)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}getPassParameters(){return this.parameters}getTechniqueConfig(e,t){const r=(null==t?void 0:t.slot)!==T["a"].LINE_CALLOUTS;return this.techniqueConfig.occlusionTestEnabled=this.parameters.occlusionTest,this.techniqueConfig.verticalOffset=!!this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=!!this.parameters.screenSizePerspective,this.techniqueConfig.depthHudEnabled=r,this.techniqueConfig.depthHudAlignStartEnabled=!!this.parameters.depthHUDAlignStart,this.techniqueConfig.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits?w["b"].Screen:w["b"].World,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.multipassGeometryEnabled=!!t&&t.multipassGeometryEnabled,this.techniqueConfig}intersect(){}requiresSlot(e){switch(e){case T["a"].LINE_CALLOUTS:case T["a"].LINE_CALLOUTS_HUD_DEPTH:return!0}return!1}createGLMaterial(e){return e.output===j["a"].Color?new H(e):null}createBufferWriter(){return new Z}validateParameters(e){const t=G.uniqueMaterialIdentifier(e);t!==this._uniqueMaterialIdentifier&&(this._uniqueMaterialIdentifier=t)}static uniqueMaterialIdentifier(e){return JSON.stringify({screenOffset:e.screenOffset||[0,0],centerOffsetUnits:e.centerOffsetUnits||"world"})}}class H extends x["a"]{updateParameters(e){return this.ensureTechnique(B,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const q={verticalOffset:null,screenSizePerspective:null,screenOffset:[0,0],color:[0,0,0,1],size:1,borderColor:null,occlusionTest:!1,shaderPolygonOffset:1e-5,depthHUDAlignStart:!1,centerOffsetUnits:"world",slicePlaneEnabled:!1,...y["a"]},W=Object(_["a"])().vec3f(O["a"].POSITION).vec3f(O["a"].NORMAL).vec2f(O["a"].UV0).vec4f(O["a"].AUXPOS1),$=[Object(v["b"])(0,0),Object(v["b"])(1,0),Object(v["b"])(0,1),Object(v["b"])(1,0),Object(v["b"])(1,1),Object(v["b"])(0,1)];class Z{constructor(){this.vertexBufferLayout=W}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return 6*e.indices.get(O["a"].POSITION).length}write(e,t,r,i){Object(S["f"])(t.indices.get(O["a"].POSITION),t.vertexAttributes.get(O["a"].POSITION).data,e.transformation,r.position,i,6),Object(S["e"])(t.indices.get(O["a"].NORMAL),t.vertexAttributes.get(O["a"].NORMAL).data,e.invTranspTransformation,r.normal,i,6),Object(S["b"])(t.indices.get(O["a"].AUXPOS1),t.vertexAttributes.get(O["a"].AUXPOS1).data,r.auxpos1,i,6);for(let n=0;n<$.length;++n)r.uv0.setVec(i+n,$[n])}}class X extends h["a"]{constructor(e,t){super(e,null,t,K),this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!1},this.ensureDrapedStatus(!1)}async doLoad(){this._material=new G(this.materialParameters),this._context.stage.add(this._material)}destroy(){super.destroy(),this._context.stage.remove(this._material),this._material=null}_perInstanceMaterialParameters(e){const t=this.materialParameters;return t.screenOffset=e.screenOffset||[0,0],t.centerOffsetUnits=e.centerOffsetUnits||"world",t}get materialParameters(){const e=this.symbol,t=e.callout,r=Object(s["k"])(t.color)?a["a"].toUnitRGBA(t.color):[0,0,0,0];r[3]*=this._getLayerOpacity();const i=Object(o["g"])(t.size||0);let n=null;if(e.verticalOffset){const{screenLength:t,minWorldLength:r,maxWorldLength:i}=e.verticalOffset;n={screenLength:Object(o["g"])(t),minWorldLength:r||0,maxWorldLength:null!=i?i:1/0}}const c=Object(s["k"])(t.border)&&Object(s["k"])(t.border.color)?a["a"].toUnitRGBA(t.border.color):null,l="object"===e.symbolLayers.getItemAt(0).type,u=!l,d=l?0:void 0,h="label-3d"===e.type;return{color:r,size:i,verticalOffset:n,screenSizePerspective:this._context.screenSizePerspectiveEnabled?this._context.sharedResources.screenSizePerspectiveSettings:null,screenOffset:[0,0],centerOffsetUnits:"world",borderColor:c,occlusionTest:u,shaderPolygonOffset:d,depthHUDAlignStart:h,slicePlaneEnabled:this._context.slicePlaneEnabled,renderOccluded:y["a"].renderOccluded}}_defaultElevationInfoNoZ(){return Q}createGraphics3DGraphic(e){const t=e.renderingInfo,r=e.graphic,i=this.setGraphicElevationContext(r,new u["a"],t.elevationOffset||0),a=t.symbol,o="on-the-ground"===this._elevationContext.mode&&("cim"===a.type||!a.symbolLayers.some(e=>"object"===e.type||"text"===e.type));if("label-3d"!==a.type&&o)return null;if("point-3d"===a.type&&a.symbolLayers.every(e=>"text"===e.type&&!Object(n["e"])(e)))return null;const c=Object(p["a"])(r.geometry);return Object(s["j"])(c)?null:this._createAs3DShape(c,i,t,r.uid)}layerOpacityChanged(){return Object(s["j"])(this._material)||this._material.setParameters(this.materialParameters),!0}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,n=Object(l["e"])(X.elevationModeChangeTypes,r,i);return n!==l["b"].UPDATE||e.forEach(e=>{const r=t(e);Object(s["k"])(r)&&this.updateGraphicElevationContext(e.graphic,r)}),n}slicePlaneEnabledChanged(){return Object(s["j"])(this._material)||this._material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}setGraphicElevationContext(e,t,r=0){const i=super.setGraphicElevationContext(e,t);return i.addOffsetRenderUnits(r),i}updateGraphicElevationContext(e,t){this.setGraphicElevationContext(e,t.elevationContext,t.metadata.elevationOffset),t.needsElevationUpdates=Object(l["h"])(t.elevationContext.mode)}computeComplexity(){return{primitivesPerFeature:2,primitivesPerCoordinate:0,drawCallsPerFeature:0,estimated:!1,memory:b["e"].memory}}_createVertexData(e){const{translation:t,centerOffset:r}=e,i=t?{size:3,data:[t[0],t[1],t[2]],exclusive:!0}:{size:3,data:[0,0,0],exclusive:!0},n=r?{size:4,data:[r[0],r[1],r[2],r[3]],exclusive:!0}:{size:4,data:[0,0,0,1],exclusive:!0};return[[O["a"].POSITION,i],[O["a"].NORMAL,{size:3,data:[0,0,1],exclusive:!0}],[O["a"].AUXPOS1,n]]}_getOrCreateMaterial(e){const t=this._perInstanceMaterialParameters(e),r=G.uniqueMaterialIdentifier(t);if(Object(s["k"])(this._material)&&r===this._material.uniqueMaterialIdentifier)return{material:this._material,isUnique:!1};if(e.materialCollection){let i=e.materialCollection.get(r);return Object(s["j"])(i)&&(i=new G(t),e.materialCollection.add(r,i)),{material:i,isUnique:!1}}return{material:new G(t),isUnique:!0}}_createAs3DShape(e,t,r,i){const n=[new g["a"](this._createVertexData(r),J,m["h"].Point)],a=this._getOrCreateMaterial(r),s=Object(f["a"])(this._context,e,n,[a.material],t,this._context.layer.uid,i);if(null===s)return null;const o=new d["a"](this,s.object,n,a.isUnique?[a.material]:null,null,c["b"],t);return o.metadata={elevationOffset:r.elevationOffset||0},o.alignedSampledElevation=s.sampledElevation,o.needsElevationUpdates=Object(l["h"])(t.mode),Object(f["b"])(o,e,this._context.elevationProvider),o}}X.elevationModeChangeTypes={definedChanged:l["b"].UPDATE,staysOnTheGround:l["b"].UPDATE,onTheGroundChanged:l["b"].RECREATE};const Y=new Uint16Array([0]),J=[[O["a"].POSITION,Y],[O["a"].NORMAL,Y],[O["a"].AUXPOS1,Y]],Q={mode:"relative-to-ground",offset:0},K={ignoreDrivers:!0,renderPriority:0,renderPriorityStep:1},ee=i["a"].getLogger("esri.views.3d.layers.graphics.Graphics3DCalloutSymbolLayerFactory");function te(e,t){if(!Object(n["b"])(e))return ee.error("Graphics3DCalloutSymbolLayerFactory#make",`symbol of type '${e.type}' does not support callouts`),null;if(!e.callout)return null;const r=re[e.callout.type];return r?new r(e,t):(ee.error("Graphics3DCalloutSymbolLayerFactory#make","unknown or unsupported callout type "+e.callout.type),null)}const re={line:X}},"1a9a":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("c514");class n{constructor(e,t,r,i,n,a,s,o){this.createQuery=e,this.resultAvailable=t,this.getResult=r,this.disjoint=i,this.beginTimeElapsed=n,this.endTimeElapsed=a,this.createTimestamp=s,this.timestampBits=o}}function a(e,t){if(t.disjointTimerQuery)return null;let r=e.getExtension("EXT_disjoint_timer_query_webgl2");return r&&Object(i["a"])(e)?new n(()=>e.createQuery(),t=>e.getQueryParameter(t,e.QUERY_RESULT_AVAILABLE),t=>e.getQueryParameter(t,e.QUERY_RESULT),()=>e.getParameter(r.GPU_DISJOINT_EXT),t=>e.beginQuery(r.TIME_ELAPSED_EXT,t),()=>e.endQuery(r.TIME_ELAPSED_EXT),e=>r.queryCounterEXT(e,r.TIMESTAMP_EXT),()=>e.getQuery(r.TIMESTAMP_EXT,r.QUERY_COUNTER_BITS_EXT)):(r=e.getExtension("EXT_disjoint_timer_query"),r?new n(()=>r.createQueryEXT(),e=>r.getQueryObjectEXT(e,r.QUERY_RESULT_AVAILABLE_EXT),e=>r.getQueryObjectEXT(e,r.QUERY_RESULT_EXT),()=>e.getParameter(r.GPU_DISJOINT_EXT),e=>r.beginQueryEXT(r.TIME_ELAPSED_EXT,e),()=>r.endQueryEXT(r.TIME_ELAPSED_EXT),e=>r.queryCounterEXT(e,r.TIMESTAMP_EXT),()=>r.getQueryEXT(r.TIMESTAMP_EXT,r.QUERY_COUNTER_BITS_EXT)):null)}},"1af8":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886"),n=r("ee2c");function a(e,t){const r=e.vertex;switch(t.mode){case n["b"].SKETCH:r.code.add(i["a"]`#define discardShortEdges(unpackedAttributes, lineLengthPixels) { if (lineLengthPixels <= 3.0) { gl_Position = vec4(10.0, 10.0, 10.0, 1.0); return; }}`);break;case n["b"].MIXED:r.code.add(i["a"]`#define discardShortEdges(unpackedAttributes, lineLengthPixels) { if (unpackedAttributes.type <= 0.0 && lineLengthPixels <= 3.0) { gl_Position = vec4(10.0, 10.0, 10.0, 1.0); return; }}`);break;case n["b"].SOLID:r.code.add(i["a"]`#define discardShortEdges(unpackedAttributes, lineLengthPixels) {}`)}}},"1b19":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("9b9d"),c=r("6a0ed"),l=r("7ffa"),u=r("a8f3");let d=i=class extends c["a"]{constructor(e){super(e),this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new i({fields:Object(l["a"])(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};Object(n["a"])([Object(a["b"])({type:[String],json:{write:!0}})],d.prototype,"fields",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],d.prototype,"normalizeField",void 0),Object(n["a"])([Object(a["b"])({type:[u["a"]],json:{read:!1}})],d.prototype,"series",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],d.prototype,"tooltipField",void 0),d=i=Object(n["a"])([Object(s["a"])("esri.popup.content.support.ChartMediaInfoValue")],d);const h=d;let p=class extends o["a"]{constructor(e){super(e),this.type=null,this.value=null}};Object(n["a"])([Object(a["b"])({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],p.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({type:h,json:{write:!0}})],p.prototype,"value",void 0),p=Object(n["a"])([Object(s["a"])("esri.popup.content.mixins.ChartMediaInfo")],p);const f=p},"1b8f":function(e,t,r){"use strict";r("4653"),r("21e2"),r("255d"),r("2035");var i=r("6323"),n=r("2eab"),a=r("ce50"),s=r("b2b2");async function o(e,t,r,n){const s=t.exec(r);if(!s)throw new a["a"]("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const o=s[1]?s[1]+"/":"",l=s[2],u=Object(i["b"])(n),d=`${o}${l}.json`,h=u?`${o}${l}_${u}.json`:d;let p;try{p=await c(e(h))}catch(f){if(h===d)throw new a["a"]("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:f});try{p=await c(e(d))}catch(f){throw new a["a"]("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:f})}}return p}async function c(e){if(Object(s["k"])(d.fetchBundleAsset))return d.fetchBundleAsset(e);const t=await Object(n["default"])(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp("^"+t):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return o(this.getAssetUrl,this.matcher,e,t)}}function u(e){return new l(e)}const d={};var h=r("b2cd");Object(i["c"])(u({pattern:"esri/",location:h["b"]}))},"1c20":function(e,t,r){"use strict";function i(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,o=r?r.count:t.count;let c=(r&&r.dstIndex?r.dstIndex:0)*n,l=(r&&r.srcIndex?r.srcIndex:0)*s;for(let u=0;u<o;++u)i[c]=a[l],i[c+1]=a[l+1],i[c+2]=a[l+2],i[c+3]=a[l+3],c+=n,l+=s}function n(e,t,r,i,n,a){var s,o;const c=e.typedBuffer,l=e.typedBufferStride,u=null!=(s=null==a?void 0:a.count)?s:e.count;let d=(null!=(o=null==a?void 0:a.dstIndex)?o:0)*l;for(let h=0;h<u;++h)c[d]=t,c[d+1]=r,c[d+2]=i,c[d+3]=n,d+=l}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));Object.freeze({__proto__:null,copy:i,fill:n})},"1c92":function(e,t,r){"use strict";r.d(t,"a",(function(){return w})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return n})),r.d(t,"g",(function(){return a})),r.d(t,"h",(function(){return _})),r.d(t,"i",(function(){return I})),r.d(t,"j",(function(){return m})),r.d(t,"k",(function(){return g})),r.d(t,"l",(function(){return h})),r.d(t,"m",(function(){return j})),r.d(t,"n",(function(){return f})),r.d(t,"o",(function(){return s})),r.d(t,"p",(function(){return c}));var i=r("4212");function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function s(e,t,r,i,n,a,s,o,c,l){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=a,e[5]=s,e[6]=o,e[7]=c,e[8]=l,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function c(e,t){if(e===t){const r=t[1],i=t[2],n=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=i,e[7]=n}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function l(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],c=t[6],l=t[7],u=t[8],d=u*s-o*l,h=-u*a+o*c,p=l*a-s*c;let f=r*d+i*h+n*p;return f?(f=1/f,e[0]=d*f,e[1]=(-u*i+n*l)*f,e[2]=(o*i-n*s)*f,e[3]=h*f,e[4]=(u*r-n*c)*f,e[5]=(-o*r+n*a)*f,e[6]=p*f,e[7]=(-l*r+i*c)*f,e[8]=(s*r-i*a)*f,e):null}function u(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],c=t[6],l=t[7],u=t[8];return e[0]=s*u-o*l,e[1]=n*l-i*u,e[2]=i*o-n*s,e[3]=o*c-a*u,e[4]=r*u-n*c,e[5]=n*a-r*o,e[6]=a*l-s*c,e[7]=i*c-r*l,e[8]=r*s-i*a,e}function d(e){const t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],s=e[5],o=e[6],c=e[7],l=e[8];return t*(l*a-s*c)+r*(-l*n+s*o)+i*(c*n-a*o)}function h(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=t[6],u=t[7],d=t[8],h=r[0],p=r[1],f=r[2],b=r[3],m=r[4],g=r[5],y=r[6],O=r[7],v=r[8];return e[0]=h*i+p*s+f*l,e[1]=h*n+p*o+f*u,e[2]=h*a+p*c+f*d,e[3]=b*i+m*s+g*l,e[4]=b*n+m*o+g*u,e[5]=b*a+m*c+g*d,e[6]=y*i+O*s+v*l,e[7]=y*n+O*o+v*u,e[8]=y*a+O*c+v*d,e}function p(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=t[6],u=t[7],d=t[8],h=r[0],p=r[1];return e[0]=i,e[1]=n,e[2]=a,e[3]=s,e[4]=o,e[5]=c,e[6]=h*i+p*s+l,e[7]=h*n+p*o+u,e[8]=h*a+p*c+d,e}function f(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=t[6],u=t[7],d=t[8],h=Math.sin(r),p=Math.cos(r);return e[0]=p*i+h*s,e[1]=p*n+h*o,e[2]=p*a+h*c,e[3]=p*s-h*i,e[4]=p*o-h*n,e[5]=p*c-h*a,e[6]=l,e[7]=u,e[8]=d,e}function b(e,t,r){const i=r[0],n=r[1],a=r[2];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=n*t[3],e[4]=n*t[4],e[5]=n*t[5],e[6]=a*t[6],e[7]=a*t[7],e[8]=a*t[8],e}function m(e,t,r){const i=r[0],n=r[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=n*t[3],e[4]=n*t[4],e[5]=n*t[5],e}function g(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function y(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function O(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function _(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=r+r,o=i+i,c=n+n,l=r*s,u=i*s,d=i*o,h=n*s,p=n*o,f=n*c,b=a*s,m=a*o,g=a*c;return e[0]=1-d-f,e[3]=u-g,e[6]=h+m,e[1]=u+g,e[4]=1-l-f,e[7]=p-b,e[2]=h-m,e[5]=p+b,e[8]=1-l-d,e}function j(e,t){const r=t[0],i=t[1],n=t[2],a=t[4],s=t[5],o=t[6],c=t[8],l=t[9],u=t[10],d=u*s-o*l,h=-u*a+o*c,p=l*a-s*c,f=r*d+i*h+n*p;if(!f)return null;const b=1/f;return e[0]=d*b,e[1]=(-u*i+n*l)*b,e[2]=(o*i-n*s)*b,e[3]=h*b,e[4]=(u*r-n*c)*b,e[5]=(-o*r+n*a)*b,e[6]=p*b,e[7]=(-l*r+i*c)*b,e[8]=(s*r-i*a)*b,e}function w(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],c=t[6],l=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],b=t[13],m=t[14],g=t[15],y=r*o-i*s,O=r*c-n*s,v=r*l-a*s,_=i*c-n*o,j=i*l-a*o,w=n*l-a*c,x=u*b-d*f,T=u*m-h*f,S=u*g-p*f,E=d*m-h*b,A=d*g-p*b,C=h*g-p*m;let R=y*C-O*A+v*E+_*S-j*T+w*x;return R?(R=1/R,e[0]=(o*C-c*A+l*E)*R,e[1]=(c*S-s*C-l*T)*R,e[2]=(s*A-o*S+l*x)*R,e[3]=(n*A-i*C-a*E)*R,e[4]=(r*C-n*S+a*T)*R,e[5]=(i*S-r*A-a*x)*R,e[6]=(b*w-m*j+g*_)*R,e[7]=(m*v-f*w-g*O)*R,e[8]=(f*j-b*v+g*y)*R,e):null}function x(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function T(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function S(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)}function E(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e}function A(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function C(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}function R(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function P(e,t){const r=e[0],n=e[1],a=e[2],s=e[3],o=e[4],c=e[5],l=e[6],u=e[7],d=e[8],h=t[0],p=t[1],f=t[2],b=t[3],m=t[4],g=t[5],y=t[6],O=t[7],v=t[8];return Math.abs(r-h)<=i["a"]*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(n-p)<=i["a"]*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(a-f)<=i["a"]*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(s-b)<=i["a"]*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(o-m)<=i["a"]*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(c-g)<=i["a"]*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(l-y)<=i["a"]*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(u-O)<=i["a"]*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(d-v)<=i["a"]*Math.max(1,Math.abs(d),Math.abs(v))}function I(e){const t=i["a"],r=e[0],n=e[1],a=e[2],s=e[3],o=e[4],c=e[5],l=e[6],u=e[7],d=e[8];return Math.abs(1-(r*r+s*s+l*l))<=t&&Math.abs(1-(n*n+o*o+u*u))<=t&&Math.abs(1-(a*a+c*c+d*d))<=t}const D=h,L=A;Object.freeze({__proto__:null,fromMat4:n,copy:a,set:s,identity:o,transpose:c,invert:l,adjoint:u,determinant:d,multiply:h,translate:p,rotate:f,scale:b,scaleByVec2:m,fromTranslation:g,fromRotation:y,fromScaling:O,fromMat2d:v,fromQuat:_,normalFromMat4Legacy:j,normalFromMat4:w,projection:x,str:T,frob:S,add:E,subtract:A,multiplyScalar:C,multiplyScalarAndAdd:R,exactEquals:M,equals:P,isOrthoNormal:I,mul:D,sub:L})},"1dc3":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d}));var i=r("a4ee"),n=r("ce50"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("66af"),c=r("45e3"),l=r("365a");let u=class extends(Object(c["a"])(Object(o["a"])(l["a"]))){constructor(){super(...arguments),this.type="elevation-3d"}initialize(){var e,t,r,i,a;const s=null==(e=this.view)||null==(t=e.map)?void 0:t.allLayers,o=s&&s.includes(this.layer),c=null==(r=this.view)||null==(i=r.map)||null==(a=i.ground)?void 0:a.layers,l=c&&c.includes(this.layer);if(o&&!l){const e=new n["a"]("layerview:elevation-layer-only","3D elevation layer '"+this.layer.id+"' can only be added to layers in map.ground");this.addResolvingPromise(Promise.reject(e))}this._addTilingSchemeMatchPromise()}};Object(i["a"])([Object(a["b"])()],u.prototype,"layer",void 0),Object(i["a"])([Object(a["b"])({readOnly:!0,aliasOf:"layer.tileInfo"})],u.prototype,"tileInfo",void 0),u=Object(i["a"])([Object(s["a"])("esri.views.3d.layers.ElevationLayerView3D")],u);const d=u},"1e2c":function(e,t,r){"use strict";r.d(t,"a",(function(){return W}));var i=r("6c97"),n=r("ce50"),a=r("ce6d"),s=r("38a4"),o=r("b2b2"),c=r("f4cc"),l=r("a21b"),u=r("e041"),d=r("2db0"),h=r("228a"),p=r("b7c2"),f=r("c15d3"),b=r("003f"),m=r("2765"),g=r("e92d"),y=r("d17d"),O=r("a1ff");const v=g["a"].getLogger("esri.views.3d.webgl-engine.lib.DDSUtil"),_=542327876,j=131072,w=4;function x(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function T(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}const S=x("DXT1"),E=x("DXT3"),A=x("DXT5"),C=31,R=0,M=1,P=2,I=3,D=4,L=7,N=20,F=21;function k(e,t,r){const{textureData:i,internalFormat:n,width:a,height:s}=U(r,t.hasMipmap);return t.samplingMode=i.levels.length>1?y["z"].LINEAR_MIPMAP_LINEAR:y["z"].LINEAR,t.hasMipmap=i.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new O["a"](e,t,i)}function U(e,t){const r=new Int32Array(e,0,C);if(r[R]!==_)return v.error("Invalid magic number in DDS header"),null;if(!(r[N]&w))return v.error("Unsupported format, must contain a FourCC code"),null;const i=r[F];let n,a;switch(i){case S:n=8,a=y["i"].COMPRESSED_RGB_S3TC_DXT1_EXT;break;case E:n=16,a=y["i"].COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case A:n=16,a=y["i"].COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return v.error("Unsupported FourCC code:",T(i)),null}let o=1,c=r[D],l=r[I];0==(3&c)&&0==(3&l)||(v.warn("Rounding up compressed texture size to nearest multiple of 4."),c=c+3&-4,l=l+3&-4);const u=c,d=l;let h,p;r[P]&j&&!1!==t&&(o=Math.max(1,r[L])),1===o||Object(s["k"])(c)&&Object(s["k"])(l)||(v.warn("Ignoring mipmaps of non power of two sized compressed texture."),o=1);let f=r[M]+4;const b=[];for(let s=0;s<o;++s)p=(c+3>>2)*(l+3>>2)*n,h=new Uint8Array(e,f,p),b.push(h),f+=p,c=Math.max(1,c>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:b},internalFormat:a,width:u,height:d}}var z,B=r("d5f7"),V=r("1153"),G=r("d267"),H=r("8539"),q=r("c514");class W extends b["a"]{constructor(e,t){super(),this.data=e,this.type=m["a"].Texture,this._glTexture=null,this._powerOfTwoStretchInfo=null,this._loadingPromise=null,this._loadingController=null,this.events=new a["a"],this.params=t||{},this.params.mipmap=!1!==this.params.mipmap,this.params.noUnpackFlip=this.params.noUnpackFlip||!1,this.params.preMultiplyAlpha=this.params.preMultiplyAlpha||!1,this.params.wrap=this.params.wrap||{s:y["B"].REPEAT,t:y["B"].REPEAT},this.params.powerOfTwoResizeMode=this.params.powerOfTwoResizeMode||p["g"].STRETCH,this.estimatedTexMemRequired=W._estimateTexMemRequired(this.data,this.params),this._startPreload()}_startPreload(){const e=this.data;Object(o["j"])(e)||(e instanceof HTMLVideoElement?this._startPreloadVideoElement(e):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){Object(u["v"])(e.src)||"auto"===e.preload&&e.crossOrigin||(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src)}_startPreloadImageElement(e){Object(u["w"])(e.src)||Object(u["v"])(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}static _getDataDimensions(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}static _estimateTexMemRequired(e,t){if(Object(o["j"])(e))return 0;if(Object(l["c"])(e)||Object(l["k"])(e))return t.encoding===W.KTX2_ENCODING?Object(f["d"])(e,t.mipmap):t.encoding===W.BASIS_ENCODING?Object(f["c"])(e,t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?W._getDataDimensions(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}dispose(){this.data=void 0}get width(){return this.params.width}get height(){return this.params.height}_createDescriptor(e){var t;return{target:y["A"].TEXTURE_2D,pixelFormat:y["p"].RGBA,dataType:y["q"].UNSIGNED_BYTE,wrapMode:this.params.wrap,flipped:!this.params.noUnpackFlip,samplingMode:this.params.mipmap?y["z"].LINEAR_MIPMAP_LINEAR:y["z"].LINEAR,hasMipmap:this.params.mipmap,preMultiplyAlpha:this.params.preMultiplyAlpha,maxAnisotropy:null!=(t=this.params.maxAnisotropy)?t:this.params.mipmap?e.parameters.maxMaxAnisotropy:1}}get glTexture(){return this._glTexture}load(e,t){if(Object(o["k"])(this._glTexture))return this._glTexture;if(Object(o["k"])(this._loadingPromise))return this._loadingPromise;const r=this.data;return Object(o["j"])(r)?(this._glTexture=new O["a"](e,this._createDescriptor(e),null),this._glTexture):"string"==typeof r?this._loadFromURL(e,t,r):r instanceof Image?this._loadFromImageElement(e,t,r):r instanceof HTMLVideoElement?this._loadFromVideoElement(e,t,r):r instanceof ImageData||r instanceof HTMLCanvasElement?this._loadFromImage(e,r,t):(Object(l["c"])(r)||Object(l["k"])(r))&&this.params.encoding===W.DDS_ENCODING?(this.data=void 0,this._loadFromDDSData(e,r)):(Object(l["c"])(r)||Object(l["k"])(r))&&this.params.encoding===W.KTX2_ENCODING?(this.data=void 0,this._loadFromKTX2(e,r)):(Object(l["c"])(r)||Object(l["k"])(r))&&this.params.encoding===W.BASIS_ENCODING?(this.data=void 0,this._loadFromBasis(e,r)):Object(l["k"])(r)?this._loadFromPixelData(e,r):Object(l["c"])(r)?this._loadFromPixelData(e,new Uint8Array(r)):null}get requiresFrameUpdates(){return this.data instanceof HTMLVideoElement}frameUpdate(e,t,r){if(!(this.data instanceof HTMLVideoElement)||Object(o["j"])(this._glTexture))return r;if(this.data.readyState<z.HAVE_CURRENT_DATA||r===this.data.currentTime)return r;if(Object(o["k"])(this._powerOfTwoStretchInfo)){const{framebuffer:r,vao:i,sourceTexture:n}=this._powerOfTwoStretchInfo;n.setData(this.data),this._drawStretchedTexture(e,t,r,i,n,this._glTexture)}else{const{width:e,height:t}=this.data,{width:r,height:i}=this._glTexture.descriptor;e!==r||t!==i?this._glTexture.updateData(0,0,0,Math.min(e,r),Math.min(t,i),this.data):this._glTexture.setData(this.data)}return this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this.data.currentTime}_loadFromDDSData(e,t){return this._glTexture=k(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync(()=>Object(f["b"])(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>Object(f["a"])(e,this._createDescriptor(e),t).then(e=>(this._glTexture=e,e)))}_loadFromPixelData(e,t){Object(V["a"])(this.params.width>0&&this.params.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this.params.components?y["p"].LUMINANCE:3===this.params.components?y["p"].RGB:y["p"].RGBA,r.width=this.params.width,r.height=this.params.height,this._glTexture=new O["a"](e,r,t),this._glTexture}_loadFromURL(e,t,r){return this._loadAsync(async i=>{const n=await Object(d["a"])(r,{signal:i});return Object(c["v"])(i),this._loadFromImage(e,n,t)})}_loadFromImageElement(e,t,r){return r.complete?this._loadFromImage(e,r,t):this._loadAsync(async i=>{const n=await Object(h["a"])(r,r.src,!1,i);return Object(c["v"])(i),this._loadFromImage(e,n,t)})}_loadFromVideoElement(e,t,r){return r.readyState>=z.HAVE_CURRENT_DATA?this._loadFromImage(e,r,t):this._loadFromVideoElementAsync(e,t,r)}_loadFromVideoElementAsync(e,t,r){return this._loadAsync(i=>new Promise((a,s)=>{const l=()=>{r.removeEventListener("loadeddata",u),r.removeEventListener("error",d),Object(o["s"])(h)},u=()=>{r.readyState>=z.HAVE_CURRENT_DATA&&(l(),a(this._loadFromImage(e,r,t)))},d=e=>{l(),s(e||new n["a"]("Failed to load video"))};r.addEventListener("loadeddata",u),r.addEventListener("error",d);const h=Object(c["q"])(i,()=>d(Object(c["e"])()))}))}_loadFromImage(e,t,r){const i=W._getDataDimensions(t);this.params.width=i.width,this.params.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this.params.components?y["p"].RGB:y["p"].RGBA,!this._requiresPowerOfTwo(e,n)||Object(s["k"])(i.width)&&Object(s["k"])(i.height)?(n.width=i.width,n.height=i.height,this._glTexture=new O["a"](e,n,t),this._glTexture):(this._glTexture=this._makePowerOfTwoTexture(e,t,i,n,r),this._glTexture)}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}_requiresPowerOfTwo(e,t){const r=y["B"].CLAMP_TO_EDGE,i="number"==typeof t.wrapMode?t.wrapMode===r:t.wrapMode.s===r&&t.wrapMode.t===r;return!Object(q["a"])(e.gl)&&(t.hasMipmap||!i)}_makePowerOfTwoTexture(e,t,r,n,a){const{width:o,height:c}=r,l=Object(s["n"])(o),u=Object(s["n"])(c);let d;switch(n.width=l,n.height=u,this.params.powerOfTwoResizeMode){case p["g"].PAD:n.textureCoordinateScaleFactor=[o/l,c/u],d=new O["a"](e,n),d.updateData(0,0,0,o,c,t);break;case p["g"].STRETCH:case null:case void 0:d=this._stretchToPowerOfTwo(e,t,n,a());break;default:Object(i["a"])(this.params.powerOfTwoResizeMode)}return n.hasMipmap&&d.generateMipmap(),d}_stretchToPowerOfTwo(e,t,r,i){const n=new O["a"](e,r),a=new G["a"](e,{colorTarget:y["y"].TEXTURE,depthStencilTarget:y["m"].NONE},n),s=new O["a"](e,{target:y["A"].TEXTURE_2D,pixelFormat:r.pixelFormat,dataType:y["q"].UNSIGNED_BYTE,wrapMode:y["B"].CLAMP_TO_EDGE,samplingMode:y["z"].LINEAR,flipped:!!r.flipped,maxAnisotropy:8,preMultiplyAlpha:r.preMultiplyAlpha},t),o=Object(B["d"])(e),c=e.getBoundFramebufferObject();return this._drawStretchedTexture(e,i,a,o,s,n),this.requiresFrameUpdates?this._powerOfTwoStretchInfo={vao:o,sourceTexture:s,framebuffer:a}:(o.dispose(!0),s.dispose(),a.detachColorTexture(),a.dispose()),e.bindFramebuffer(c),n}_drawStretchedTexture(e,t,r,i,n,a){e.bindFramebuffer(r);const s=e.getViewport();e.setViewport(0,0,a.descriptor.width,a.descriptor.height);const o=e.useTechnique(t);o.setUniform4f("uColor",1,1,1,1),o.bindTexture(n,"tex"),e.bindVAO(i),e.drawArrays(y["r"].TRIANGLE_STRIP,0,Object(H["f"])(i,"geometry")),e.bindFramebuffer(null),e.setViewport(s.x,s.y,s.width,s.height)}unload(){if(Object(o["k"])(this._powerOfTwoStretchInfo)){const{framebuffer:e,vao:t,sourceTexture:r}=this._powerOfTwoStretchInfo;t.dispose(!0),r.dispose(),e.dispose(),this._glTexture=null,this._powerOfTwoStretchInfo=null}if(Object(o["k"])(this._glTexture)&&(this._glTexture.dispose(),this._glTexture=null),Object(o["k"])(this._loadingController)){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}W.DDS_ENCODING="image/vnd-ms.dds",W.KTX2_ENCODING="image/ktx2",W.BASIS_ENCODING="image/x.basis",function(e){e[e.HAVE_NOTHING=0]="HAVE_NOTHING",e[e.HAVE_METADATA=1]="HAVE_METADATA",e[e.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",e[e.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",e[e.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"}(z||(z={}))},"1e5b":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return p})),r.d(t,"f",(function(){return c})),r.d(t,"g",(function(){return f}));var i=r("38a4"),n=r("cea0");const a=["none","underline","line-through"],s=["normal","italic","oblique"],o=["normal","lighter","bold","bolder"],c={type:Number,cast:e=>{const t=Object(n["i"])(e);return 0===t?1:Object(i["f"])(t,.1,4)},nonNullable:!0},l=["left","right","center","justify"],u=["left","right","center"],d=["baseline","top","middle","bottom"],h={type:l,nonNullable:!0},p={type:u,nonNullable:!0},f={type:d,nonNullable:!0}},"1f3b":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("ce50"),s=r("6a0ed"),o=r("b2b2"),c=r("9d1d"),l=r("59b2"),u=(r("b50f"),r("c120"),r("cea0"),r("d386")),d=r("d4e6"),h=r("96d4");let p=i=class extends s["a"]{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(null!=t&&t.origin){if(r.filter){const e=Object.keys(r.filter);var i;if(e.length>1||"where"!==e[0])return null==(i=t.messages)||i.push(new a["a"]("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}var n;if("showExcludedLabels"in r)return null==(n=t.messages)||n.push(new a["a"]("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new i({filter:Object(o["k"])(this.filter)&&this.filter.clone(),includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};Object(n["a"])([Object(l["b"])({type:h["a"],json:{write:{allowNull:!0,writer(e,t,r,i){const n=null==e?void 0:e.write({},i);n&&0!==Object.keys(n).length?Object(c["c"])(r,n,t):Object(c["c"])(r,null,t)}}}})],p.prototype,"filter",void 0),Object(n["a"])([Object(l["b"])({json:{write:!0,origins:{"web-map":{read:{reader:d["b"]},write:{writer:d["c"],overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}}}}})],p.prototype,"includedEffect",void 0),Object(n["a"])([Object(l["b"])({json:{write:!0,origins:{"web-map":{read:{reader:d["b"]},write:{writer:d["c"],overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}}}}})],p.prototype,"excludedEffect",void 0),Object(n["a"])([Object(l["b"])({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":{name:"showExcludedLabels",default:!0}}}})],p.prototype,"excludedLabelsVisible",void 0),p=i=Object(n["a"])([Object(u["a"])("esri.layers.support.FeatureEffect")],p);const f=p},"1f93":function(e,t,r){"use strict";r.d(t,"a",(function(){return N}));var i=r("a05b"),n=r("c45a"),a=r("b061"),s=r("35b3"),o=r("7438"),c=r("badc"),l=r("b7c2"),u=r("d7f7"),d=r("a4ee"),h=r("c120"),p=r("b2b2"),f=r("c8d5"),b=r("d272"),m=r("6a07"),g=r("c6d7"),y=r("a7d7"),O=r("d017"),v=r("df77"),_=r("33e2"),j=r("8e97"),w=r("c3a4"),x=r("ca98"),T=r("da35"),S=r("fa1e"),E=r("c829"),A=r("ea44"),C=r("189c");class R extends x["a"]{constructor(e,t,r){super(e,t,r),this._textureRepository=e.waterTextureRepository}initializeProgram(e){const t=R.shader.get(),r=this.configuration,i=t.build({oitEnabled:r.transparencyPassType===l["l"].Color,output:r.output,viewingMode:e.viewingMode,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:r.receiveShadows,pbrMode:y["a"].Water,useCustomDTRExponentForWater:!0,ssrEnabled:r.useSSR,cloudsReflectionsEnabled:Object(h["a"])("enable-feature:clouds-reflections"),highStepCount:!0,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new E["a"](e.rctx,i,S["a"])}bindPass(e,t){Object(j["b"])(this.program,t.camera.projectionMatrix),t.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(g["a"])(this.program,t)),this.configuration.output===i["a"].Color&&(t.lighting.setUniforms(this.program,!1,!1),Object(v["b"])(this.program,t),Object(h["a"])("enable-feature:clouds-reflections")&&Object(p["k"])(t.cloudsCompositionParams)&&Object(f["b"])(this.program,t.camera,t.cloudsCompositionParams)),this.configuration.output!==i["a"].Color&&this.configuration.output!==i["a"].Normal||(Object(_["b"])(this.program,e),this._textureRepository.bind(this.program)),this.program.setUniform4fv("waterColor",e.color),this.configuration.output===i["a"].Highlight&&Object(m["b"])(this.program,t)}bindDraw(e){Object(j["c"])(this.program,e),this.program.rebindTextures(),this.configuration.output!==i["a"].Color&&this.configuration.output!==i["a"].Alpha||Object(j["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),this.configuration.output===i["a"].Color&&Object(O["b"])(this.program,e),this.configuration.output!==i["a"].Color&&this.configuration.output!==i["a"].Alpha&&this.configuration.output!==i["a"].Highlight||Object(b["c"])(this.program,this.configuration,e)}_setPipelineState(e){const t=this.configuration,r=e===l["l"].NONE,n=e===l["l"].FrontFace;return Object(C["g"])({blending:t.output!==i["a"].Normal&&t.output!==i["a"].Highlight&&t.transparent?r?o["d"]:Object(o["f"])(e):null,depthTest:{func:Object(o["g"])(e)},depthWrite:r?t.writeDepth&&C["e"]:Object(o["h"])(e),colorWrite:C["d"],polygonOffset:r||n?null:Object(o["e"])(t.enableOffset)})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}R.shader=new w["a"](A["a"],()=>r.e("chunk-2d0a5169").then(r.bind(null,"08e0")));class M extends T["a"]{constructor(){super(...arguments),this.output=i["a"].Color,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!1,this.useSSR=!1,this.isDraped=!1,this.transparencyPassType=l["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(d["a"])([Object(T["b"])({count:i["a"].COUNT})],M.prototype,"output",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"receiveShadows",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"slicePlaneEnabled",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"transparent",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"enableOffset",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"writeDepth",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"useSSR",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"isDraped",void 0),Object(d["a"])([Object(T["b"])({count:l["l"].COUNT})],M.prototype,"transparencyPassType",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"multipassTerrainEnabled",void 0),Object(d["a"])([Object(T["b"])()],M.prototype,"cullAboveGround",void 0);class P extends u["a"]{updateParameters(e){return this.ensureTechnique(R,e)}setElapsedTimeUniform(e){const t=.001*this._material.animation.time;e.setUniform1f("timeElapsed",t*this._material.parameters.animationSpeed)}_updateShadowState(e){e.shadowMappingEnabled!==this._material.parameters.receiveShadows&&this._material.setParameters({receiveShadows:e.shadowMappingEnabled})}_updateSSRState(e){e.ssrEnabled!==this._material.parameters.ssrEnabled&&this._material.setParameters({ssrEnabled:e.ssrEnabled})}ensureResources(e){const t=this._techniqueRep.constructionContext.waterTextureRepository;return t.ready||t.updating||t.loadTextures(e),t.ready?l["j"].LOADED:l["j"].LOADING}beginSlot(e){return this._output===i["a"].Color&&(this._updateShadowState(e),this._updateSSRState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.parameters,e),this._output!==i["a"].Normal&&this._output!==i["a"].Color||this.setElapsedTimeUniform(t.program)}}var I=r("8675"),D=r("7c51"),L=r("b855");class N extends s["b"]{constructor(e){super(e,L["a"]),this._techniqueConfig=new M,this.animation=new n["a"]}getTechniqueConfig(e,t){return this._techniqueConfig.output=e,this._techniqueConfig.writeDepth=this.parameters.writeDepth,this._techniqueConfig.receiveShadows=this.parameters.receiveShadows,this._techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this._techniqueConfig.transparent=this.parameters.transparent,this._techniqueConfig.useSSR=this.parameters.ssrEnabled,this._techniqueConfig.isDraped=this.parameters.isDraped,this._techniqueConfig.transparencyPassType=t.transparencyPassType,this._techniqueConfig.enableOffset=t.camera.relativeElevation<o["b"],this._techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this._techniqueConfig.cullAboveGround=t.cullAboveGround,this._techniqueConfig}update(e){const t=Math.min(e.camera.relativeElevation,e.camera.distance);this.animation.enabled=Math.sqrt(this.parameters.waveTextureRepeat/this.parameters.waveStrength)*t<F;const r=this.animation.advance(e);return this.animation.enabled&&r}intersect(e,t,r,i,n,a,s){Object(D["i"])(e,t,i,n,a,void 0,s)}requiresSlot(e,t){switch(Object(a["b"])(t)){case i["a"].Normal:return e===c["a"].DRAPED_WATER;case i["a"].Color:if(this.parameters.isDraped)return e===c["a"].DRAPED_MATERIAL;break;case i["a"].Highlight:return e===c["a"].OPAQUE_MATERIAL||e===c["a"].DRAPED_MATERIAL}let r=c["a"].OPAQUE_MATERIAL;return this.parameters.transparent&&(r=this.parameters.writeDepth?c["a"].TRANSPARENT_MATERIAL:c["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),e===r}createGLMaterial(e){if(e.output===i["a"].Color&&this.parameters.isDraped)return e.output=i["a"].Draped,new P(e);switch(e.output){case i["a"].Color:case i["a"].Normal:case i["a"].Highlight:case i["a"].Alpha:return new P(e)}return null}createBufferWriter(){return new I["a"](I["d"])}}const F=35e3},"1fd7":function(e,t,r){"use strict";r.d(t,"a",(function(){return k})),r.d(t,"b",(function(){return C})),r.d(t,"c",(function(){return R})),r.d(t,"d",(function(){return I})),r.d(t,"e",(function(){return M})),r.d(t,"f",(function(){return P})),r.d(t,"g",(function(){return L})),r.d(t,"h",(function(){return F})),r.d(t,"i",(function(){return D})),r.d(t,"j",(function(){return N}));var i,n=r("cea0"),a=r("0b86"),s=r("4cac"),o=(r("05c5"),r("2959")),c=(r("c128"),r("9787"),r("6005"),r("9fab")),l=r("6e07"),u=(r("8d66"),r("6e4d"),r("0fe9")),d=(r("e1bb"),r("3ad7"),r("a4ee")),h=r("7ffa"),p=r("a915"),f=r("59b2"),b=r("448d"),m=r("d386"),g=r("b0e3");let y=i=class extends o["a"]{constructor(...e){super(...e),this.type="picture-fill",this.url=null,this.xscale=1,this.yscale=1,this.width=12,this.height=12,this.xoffset=0,this.yoffset=0,this.source=null}normalizeCtorArgs(e,t,r,i){if(e&&"string"!=typeof e&&null==e.imageData)return e;const n={};return e&&(n.url=e),t&&(n.outline=t),null!=r&&(n.width=Object(p["j"])(r)),null!=i&&(n.height=Object(p["j"])(i)),n}clone(){const e=new i({color:Object(h["a"])(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});return e._set("source",Object(h["a"])(this.source)),e}hash(){var e;return`${super.hash()}.${null==(e=this.color)?void 0:e.hash()}.${this.height}.${this.url}.${this.width}.${this.xoffset}.${this.xscale}.${this.yoffset}.${this.yscale}`}};Object(d["a"])([Object(b["a"])({esriPFS:"picture-fill"},{readOnly:!0})],y.prototype,"type",void 0),Object(d["a"])([Object(f["b"])(g["b"])],y.prototype,"url",void 0),Object(d["a"])([Object(f["b"])({type:Number,json:{write:!0}})],y.prototype,"xscale",void 0),Object(d["a"])([Object(f["b"])({type:Number,json:{write:!0}})],y.prototype,"yscale",void 0),Object(d["a"])([Object(f["b"])({type:Number,cast:p["j"],json:{write:!0}})],y.prototype,"width",void 0),Object(d["a"])([Object(f["b"])({type:Number,cast:p["j"],json:{write:!0}})],y.prototype,"height",void 0),Object(d["a"])([Object(f["b"])({type:Number,cast:p["j"],json:{write:!0}})],y.prototype,"xoffset",void 0),Object(d["a"])([Object(f["b"])({type:Number,cast:p["j"],json:{write:!0}})],y.prototype,"yoffset",void 0),Object(d["a"])([Object(f["b"])(g["a"])],y.prototype,"source",void 0),y=i=Object(d["a"])([Object(m["a"])("esri.symbols.PictureFillSymbol")],y);const O=y;var v=r("37e7"),_=r("7533"),j=r("35c9"),w=r("0d76"),x=r("db52"),T=r("4dc9"),S=r("0d93"),E=(r("c528"),r("961d"),r("21ba")),A=(r("a957"),r("16e0"),r("ddc2"));r("d288"),r("8f07");function C(e){if(!e)return!1;switch(e.type){case"picture-fill":case"picture-marker":case"simple-fill":case"simple-line":case"simple-marker":case"text":case"cim":return!0;default:return!1}}function R(e){if(!e)return!1;switch(e.type){case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":return!0;default:return!1}}const M={base:S["a"],key:"type",typeMap:{"simple-fill":w["a"],"picture-fill":O,"picture-marker":v["a"],"simple-line":x["a"],"simple-marker":T["a"],text:E["a"],"label-3d":c["a"],"line-3d":l["a"],"mesh-3d":u["a"],"point-3d":_["a"],"polygon-3d":j["a"],"web-style":A["a"],cim:s["a"]},errorContext:"symbol"},P={base:S["a"],key:"type",typeMap:{"picture-marker":v["a"],"simple-marker":T["a"],text:E["a"],"web-style":A["a"],cim:s["a"]},errorContext:"symbol"},I=Object(a["b"])({types:M}),D={base:S["a"],key:"type",typeMap:{"simple-fill":w["a"],"picture-fill":O,"picture-marker":v["a"],"simple-line":x["a"],"simple-marker":T["a"],text:E["a"],"line-3d":l["a"],"mesh-3d":u["a"],"point-3d":_["a"],"polygon-3d":j["a"],"web-style":A["a"],cim:s["a"]},errorContext:"symbol"},L={base:S["a"],key:"type",typeMap:{text:E["a"],"label-3d":c["a"]},errorContext:"symbol"},N=(S["a"],c["a"],l["a"],u["a"],_["a"],j["a"],A["a"],{base:S["a"],key:"type",typeMap:{"line-3d":l["a"],"mesh-3d":u["a"],"point-3d":_["a"],"polygon-3d":j["a"],"web-style":A["a"],cim:s["a"]},errorContext:"symbol"}),F={base:S["a"],key:"type",typeMap:{"label-3d":c["a"]},errorContext:"symbol"},k=Object(n["k"])(M)},2003:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return p})),r.d(t,"h",(function(){return o})),r.d(t,"i",(function(){return h})),r.d(t,"j",(function(){return s})),r.d(t,"k",(function(){return f})),r.d(t,"l",(function(){return c})),r.d(t,"m",(function(){return a}));var i,n=r("9ef0");!function(e){e[e.size=22]="size",e[e.lineWidth=50]="lineWidth",e[e.maxSize=120]="maxSize",e[e.maxOutlineSize=80]="maxOutlineSize",e[e.tallSymbolWidth=20]="tallSymbolWidth"}(i||(i={}));const a={fill:[{type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 Z"}],squareFill:[{type:"path",path:"M -10,-10 L 10,-10 L 10,10 L -10,10 L -10,-10 Z"}],pathSymbol3DLayer:[{type:"path",path:"M 3,12 L 12,0 L 11,-2 L -4,5 L -1,5 L 1,7 L 3,10 L 3,12 Z"},{type:"circle",cx:-2,cy:10,r:5}],extrudeSymbol3DLayer:[{type:"path",path:"M -7,-5 L -2,0 L -2,7 L -7,3 L -7,-5 Z"},{type:"path",path:"M -2,0 L -2,7 L 10,-3 L 10,-10 L -2,0 Z"},{type:"path",path:"M -7,-5 L -2,0 L 10,-10 L -2,-10 L -7,-5 Z"}],cone:[{type:"path",path:"M 0,-10 L -8,5 L -4,6.5 L 0,7 L 4,6.5 L 8,5 Z"}],tallCone:[{type:"path",path:"M 0,-9 L -3.5,7 L -1.5,7.8 L 0,8 L 1.5,7.8 L 3.5,7 L 0,-9 Z"}],invertedCone:[{type:"path",path:"M 0,7 L -8,-8 L 8,-8 Z"},{type:"path",path:"M -8,-8 L -4,-9.5 L 0,-10 L 4,-9.5 L 8,-8 L 4,-6.5 L 0,-6 L -4,-6.5 Z"}],cube:[{type:"path",path:"M -10,-7 L 0,-12 L 10,-7 L 0,-2 L -10,-7 Z"},{type:"path",path:"M -10,-7 L 0,-2 L 0,12 L -10,7 L -10,-7 Z"},{type:"path",path:"M 0,-2 L 10,-7 L 10,7 L 0,12 L 0,-2 Z"}],tallCube:[{type:"path",path:"M -3.5,-8.5 L 0,-9.5 L 3.5,-8.5 L 0,-7.5 L -3.5,-8.5 Z"},{type:"path",path:"M -3.5,-8.5 L 0,-7.5 L 0,9 L -3.5,8 L -3.5,-8.5 Z"},{type:"path",path:"M 0,-7.5 L 3.5,-8.5 L 3.5,8 L 0,9 L 0,-7.5 Z"}],cylinder:[{type:"path",path:"M -8,-9 L -8,7 L -4,8.5 L 0,9 L 4,8.5 L 8,7 L 8,-9 Z"},{type:"ellipse",cx:0,cy:-9,rx:8,ry:2}],tallCylinder:[{type:"path",path:"M -3.5,-9 L -3.5,7 L -1.5,7.8 L 0,8 L 1.5,7.8 L 3.5,7 L 3.5,-9 Z"},{type:"ellipse",cx:0,cy:-9,rx:3.5,ry:1}],diamond:[{type:"path",path:"M 0,-10 L 10,-1 L -1,1 L 0,-10 Z"},{type:"path",path:"M 0,-10 L -1,1 L -8,-1 L 0,-10 Z"},{type:"path",path:"M -1,1 L 0,10 L -8,-1 L -1,1 Z"},{type:"path",path:"M -1,0 L 0,10 L 10,-1 L -1,1 Z"}],tetrahedron:[{type:"path",path:"M 0,-10 L 10,7 L 0,0 L 0,-10 Z"},{type:"path",path:"M 0,-10 L 0,0 L -8,7 L 0,-10 Z"},{type:"path",path:"M 10,7 L 0,0 L -8,7 L 10,7 Z"}]};function s(e,t,r){const n=i.size;let a=n,s=n;e<1?a*=.75:e>1&&(s*=1.25);const o=0,c=0;let l=n,u=n;return t&&r&&(a=s=l=u=0),[{type:"path",path:[{command:"M",values:[l,o]},{command:"L",values:[r?l:.875*l,o]},{command:"L",values:[r?a-.5*l:c,s-.5*u]},{command:"L",values:[a-.5*l,s-.5*u]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[l,o]},{command:"L",values:[l,t?o:.125*u]},{command:"L",values:[a-.5*l,t?s-.5*u:u]},{command:"L",values:[a-.5*l,s-.5*u]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[a-.5*l,s-.5*u]},{command:"L",values:[r?a-.5*l:c,s-.5*u]},{command:"L",values:[r?a-.5*l:c,t?s-.5*u:u]},{command:"L",values:[a-.5*l,t?s-.5*u:u]},{command:"Z",values:[]}]}]}function o(e){const t=i.size,r=.5*e,n=0,a=0;return[{type:"path",path:[{command:"M",values:[a,.7*t*.5]},{command:"L",values:[.3*t,.7*t]},{command:"L",values:[.3*t,.7*t+r]},{command:"L",values:[a,.7*t+r-.7*t*.5]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.3*t,.7*t]},{command:"L",values:[.3*t,.7*t+r]},{command:"L",values:[t,r]},{command:"L",values:[t,n]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.3*t,n]},{command:"L",values:[t,n]},{command:"L",values:[.3*t,.7*t]},{command:"L",values:[a,.7*t*.5]},{command:"Z",values:[]}]}]}function c(){return[{type:"path",path:"M80,80.2v-27c-1.5,0.7-2.8,1.6-3.9,2.8c-1.8,2.1-4.4,3.3-7.1,3.5c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.4,3.6c-1.8,2.1-4.4,3.3-7.2,3.4C8.3,59.3,5.7,58,3.9,56c-1.1-1.2-2.4-2.1-3.9-2.8v27"},{type:"path",path:"M11,59.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.4-3.6s5.1,1.3,7.4,3.6c1.8,2,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.3-3.6s5.1,1.3,7.4,3.6c1.8,2.1,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c1.1-1.2,2.4-2.1,3.9-2.8v-24c-1.5,0.7-2.8,1.6-3.9,2.8c-1.8,2.1-4.4,3.3-7.1,3.5c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.4,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.7-0.1-5.3-1.4-7.1-3.4c-1.1-1.2-2.4-2.1-3.9-2.8v24c1.5,0.7,2.8,1.6,3.9,2.8C5.7,58,8.3,59.3,11,59.4z"},{type:"path",path:"M11,35.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.4-3.6s5.1,1.3,7.4,3.6c1.8,2,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.3-3.6s5.1,1.3,7.4,3.6c1.8,2.1,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c1.1-1.2,2.4-2.1,3.9-2.8V3.6c-1.5,0.7-2.8,1.6-3.9,2.8c-2.2,2.1-4.6,3.4-7.1,3.4s-5-1.3-7.1-3.4s-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6S42.5,9.9,40,9.9s-5-1.3-7.1-3.4s-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.5,0-5-1.3-7.1-3.4C2.8,5.3,1.4,4.3,0,3.6v25.6c1.5,0.7,2.8,1.6,3.9,2.8C5.7,34.1,8.3,35.3,11,35.4z"}]}function l(e,t){let r=t?i.tallSymbolWidth:e;const n=e,a=t?4:6;r<=i.size?r-=.5*a:r-=a;const s=0,o=0,c=t?.35*r:.5*r;return[{type:"path",path:[{command:"M",values:[.5*r,s]},{command:"L",values:[r,.5*c]},{command:"L",values:[.5*r,c]},{command:"L",values:[o,.5*c]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[s,.5*c]},{command:"L",values:[.5*r,c]},{command:"L",values:[.5*r,n]},{command:"L",values:[o,n-.5*c]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.5*r,c]},{command:"L",values:[.5*r,n]},{command:"L",values:[r,n-.5*c]},{command:"L",values:[r,.5*c]},{command:"Z",values:[]}]}]}function u(e,t){let r=t?i.tallSymbolWidth:e;const n=e,a=t?4:6;r<=i.size?r-=.5*a:r-=a;const s=.5*r,o=.15*r,c=0,l=n-o;return[{type:"ellipse",cx:.5*r,cy:l,rx:s,ry:o},{type:"path",path:[{command:"M",values:[c,o]},{command:"L",values:[c,l]},{command:"L",values:[r,l]},{command:"L",values:[r,o]},{command:"Z",values:[]}]},{type:"ellipse",cx:.5*r,cy:o,rx:s,ry:o}]}function d(e,t){let r=t?i.tallSymbolWidth:e;const n=e,a=t?4:6;r<=i.size?r-=.5*a:r-=a;const s=.15*r,o=n-s;return[{type:"ellipse",cx:.5*r,cy:o,rx:.5*r,ry:s},{type:"path",path:[{command:"M",values:[.5*r,0]},{command:"L",values:[r,o]},{command:"L",values:[0,o]},{command:"Z",values:[]}]}]}function h(e){let t=e;const r=e,n=6;t<i.size?t-=.5*n:t-=n;const a=.15*t,s=0;return[{type:"path",path:[{command:"M",values:[0,s]},{command:"L",values:[t,s]},{command:"L",values:[.5*t,r-a]},{command:"Z",values:[]}]},{type:"ellipse",cx:.5*t,cy:s,rx:.5*t,ry:a}]}function p(e){let t=e;const r=e,n=4;t<i.size?t-=.5*n:t-=n;const a=0,s=0,o=t,c=r,l=Math.floor(e/10)-1||1;return[{type:"path",path:[{command:"M",values:[.45*o,a]},{command:"L",values:[o,.5*c-l]},{command:"L",values:[.45*o-l,.5*c+l]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.45*o,a]},{command:"L",values:[.45*o-l,.5*c+l]},{command:"L",values:[s,.5*c-l]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[s,.5*c-l]},{command:"L",values:[.45*o-l,.5*c+l]},{command:"L",values:[.45*o,r]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.45*o,r]},{command:"L",values:[o,.5*c-l]},{command:"L",values:[.45*o-l,.5*c+l]},{command:"Z",values:[]}]}]}function f(e){const t=e,r=2;let n=e;n<i.size?n-=.5*r:n-=r;const a=0,s=0;return[{type:"path",path:[{command:"M",values:[.45*t,a]},{command:"L",values:[t,n]},{command:"L",values:[.45*t,.6*n]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.45*t,a]},{command:"L",values:[.45*t,.6*n]},{command:"L",values:[s,n]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[s,n]},{command:"L",values:[.45*t,.6*n]},{command:"L",values:[t,n]},{command:"Z",values:[]}]}]}function b(e,t){const r=.75;return Math.round(Math.min(Math.max(e+255*t*r,0),255))}function m(e,t){if("type"in e&&("linear"===e.type||"pattern"===e.type))return e;const r=new n["a"](e);return new n["a"]([b(r.r,t),b(r.g,t),b(r.b,t),r.a])}},2035:function(e,t,r){"use strict";var i,n,a;let s,o;r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return h}));const c=null!=(i=null==(n=globalThis.esriConfig)?void 0:n.locale)?i:null==(a=globalThis.dojoConfig)?void 0:a.locale;function l(){var e,t;return null!=(e=null!=c?c:null==(t=globalThis.navigator)?void 0:t.language)?e:"en"}function u(){return void 0===o&&(o=l()),o}const d=[];function h(e){return d.push(e),{remove(){d.splice(d.indexOf(e),1)}}}const p=[];function f(e){return p.push(e),{remove(){d.splice(p.indexOf(e),1)}}}function b(){var e;const t=null!=(e=s)?e:l();o!==t&&(o=t,[...p].forEach(e=>{e.call(null,t)}),[...d].forEach(e=>{e.call(null,t)}))}null==globalThis.addEventListener||globalThis.addEventListener("languagechange",b)},2119:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("2ab7");class n{constructor(e){this.allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&Object(i["a"])(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,a));e++)this._items.push(this.allocator())}}const a=1024},2172:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return a})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return d}));var i=r("b2b2");const n=[0,0];function a(e,t){return!!Object(i["k"])(t)&&u(e,t.x,t.y,t.z)}function s(e,t){if(!t.points||t.points.length)return!1;for(const r of t.points)if(!c(e,r))return!1;return!0}function o(e,t){const{xmin:r,ymin:i,zmin:n,xmax:a,ymax:s,zmax:o}=t;return e.hasZ&&t.hasZ?u(e,r,i,n)&&u(e,r,s,n)&&u(e,a,s,n)&&u(e,a,i,n)&&u(e,r,i,o)&&u(e,r,s,o)&&u(e,a,s,o)&&u(e,a,i,o):u(e,r,i)&&u(e,r,s)&&u(e,a,s)&&u(e,a,i)}function c(e,t){return u(e,t[0],t[1])}function l(e,t){return u(e,t[0],t[1],t[2])}function u(e,t,r,i){return t>=e.xmin&&t<=e.xmax&&r>=e.ymin&&r<=e.ymax&&(null==i||!e.hasZ||i>=e.zmin&&i<=e.zmax)}function d(e,t){return n[1]=t.y,n[0]=t.x,h(e,n)}function h(e,t){return p(e.rings,t)}function p(e,t){if(!e)return!1;if(f(e))return b(!1,e,t);let r=!1;for(let i=0,n=e.length;i<n;i++)r=b(r,e[i],t);return r}function f(e){return!Array.isArray(e[0][0])}function b(e,t,r){const[i,n]=r;let a=e,s=0;for(let o=0,c=t.length;o<c;o++){s++,s===c&&(s=0);const[e,r]=t[o],[l,u]=t[s];(r<n&&u>=n||u<n&&r>=n)&&e+(n-r)/(u-r)*(l-e)<i&&(a=!a)}return a}},"21ba":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("9ef0"),s=r("7ffa"),o=r("a915"),c=r("59b2"),l=r("1a3e"),u=r("448d"),d=r("d386"),h=r("09db"),p=r("9787"),f=r("0d93"),b=r("1e5b");let m=i=class extends f["a"]{constructor(...e){super(...e),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new p["a"],this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(e,t,r){if(e&&"string"!=typeof e)return e;const i={};return e&&(i.text=e),t&&(i.font=t),r&&(i.color=r),i}writeLineWidth(e,t,r,i){i&&"string"!=typeof i?i.origin:t[r]=e}castLineWidth(e){return Object(o["j"])(e)}writeLineHeight(e,t,r,i){i&&"string"!=typeof i?i.origin:t[r]=e}clone(){return new i({angle:this.angle,backgroundColor:Object(s["a"])(this.backgroundColor),borderLineColor:Object(s["a"])(this.borderLineColor),borderLineSize:this.borderLineSize,color:Object(s["a"])(this.color),font:this.font&&this.font.clone(),haloColor:Object(s["a"])(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor&&this.backgroundColor.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color.hash()}.${this.font&&this.font.hash()}.${this.haloColor&&this.haloColor.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};Object(n["a"])([Object(c["b"])({type:a["a"],json:{write:!0}})],m.prototype,"backgroundColor",void 0),Object(n["a"])([Object(c["b"])({type:a["a"],json:{write:!0}})],m.prototype,"borderLineColor",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],m.prototype,"borderLineSize",void 0),Object(n["a"])([Object(c["b"])({type:p["a"],json:{write:!0}})],m.prototype,"font",void 0),Object(n["a"])([Object(c["b"])({...b["d"],json:{write:!0}})],m.prototype,"horizontalAlignment",void 0),Object(n["a"])([Object(c["b"])({type:Boolean,json:{write:!0}})],m.prototype,"kerning",void 0),Object(n["a"])([Object(c["b"])({type:a["a"],json:{write:!0}})],m.prototype,"haloColor",void 0),Object(n["a"])([Object(c["b"])({type:Number,cast:o["j"],json:{write:!0}})],m.prototype,"haloSize",void 0),Object(n["a"])([Object(c["b"])({type:Boolean,json:{write:!0}})],m.prototype,"rightToLeft",void 0),Object(n["a"])([Object(c["b"])({type:Boolean,json:{write:!0}})],m.prototype,"rotated",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],m.prototype,"text",void 0),Object(n["a"])([Object(u["a"])({esriTS:"text"},{readOnly:!0})],m.prototype,"type",void 0),Object(n["a"])([Object(c["b"])({...b["g"],json:{write:!0}})],m.prototype,"verticalAlignment",void 0),Object(n["a"])([Object(c["b"])({type:Number,cast:o["j"],json:{write:!0}})],m.prototype,"xoffset",void 0),Object(n["a"])([Object(c["b"])({type:Number,cast:o["j"],json:{write:!0}})],m.prototype,"yoffset",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{read:e=>e&&-1*e,write:(e,t)=>t.angle=e&&-1*e}})],m.prototype,"angle",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],m.prototype,"width",void 0),Object(n["a"])([Object(c["b"])({type:Number})],m.prototype,"lineWidth",void 0),Object(n["a"])([Object(h["a"])("lineWidth")],m.prototype,"writeLineWidth",null),Object(n["a"])([Object(l["a"])("lineWidth")],m.prototype,"castLineWidth",null),Object(n["a"])([Object(c["b"])(b["f"])],m.prototype,"lineHeight",void 0),Object(n["a"])([Object(h["a"])("lineHeight")],m.prototype,"writeLineHeight",null),m=i=Object(n["a"])([Object(d["a"])("esri.symbols.TextSymbol")],m);const g=m},"21e2":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var i=r("b2b2"),n=r("2035");const a={ar:"ar-u-nu-latn"};let s=new WeakMap,o={};function c(e){const t=e||o;if(!s.has(t)){const r=Object(n["b"])(),i=a[Object(n["b"])()]||r;s.set(t,new Intl.NumberFormat(i,e))}return Object(i["c"])(s.get(t))}function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function u(e,t){return c(t).format(e)}Object(n["a"])(()=>{s=new WeakMap,o={}})},"21ed":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i}));var i,n=r("3886");function a(e,t){const r=e.vertex;switch(r.code.add(n["a"]`#define VERTEX_DISCARD_CUTOFF (1.0 - 1.0 / 255.0)`),t.vertexDiscardMode){case i.None:r.code.add(n["a"]`#define vertexDiscardByOpacity(_opacity_) {}`);break;case i.Opaque:r.code.add(n["a"]`#define vertexDiscardByOpacity(_opacity_) { if (_opacity_ > VERTEX_DISCARD_CUTOFF) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`);break;case i.Transparent:r.code.add(n["a"]`#define vertexDiscardByOpacity(_opacity_) { if (_opacity_ <= VERTEX_DISCARD_CUTOFF) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`)}}!function(e){e[e.None=0]="None",e[e.Transparent=1]="Transparent",e[e.Opaque=2]="Opaque",e[e.COUNT=3]="COUNT"}(i||(i={}))},2245:function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i=r("e431"),n=r("0b2d"),a=r("2bc9"),s=r("38a4");function o(e,t,r){(r=r||e).length=e.length;for(let i=0;i<e.length;i++)r[i]=e[i]*t[i];return r}function c(e,t,r){(r=r||e).length=e.length;for(let i=0;i<e.length;i++)r[i]=e[i]*t;return r}function l(e,t,r){(r=r||e).length=e.length;for(let i=0;i<e.length;i++)r[i]=e[i]+t[i];return r}function u(e){return(e+1)*(e+1)}function d(e){return Object(s["f"])(Math.floor(Math.sqrt(e)-1),0,2)}function h(e,t,r){const i=e[0],n=e[1],a=e[2],s=r||[];return s.length=u(t),t>=0&&(s[0]=.28209479177),t>=1&&(s[1]=.4886025119*i,s[2]=.4886025119*a,s[3]=.4886025119*n),t>=2&&(s[4]=1.09254843059*i*n,s[5]=1.09254843059*n*a,s[6]=.31539156525*(3*a*a-1),s[7]=1.09254843059*i*a,s[8]=.54627421529*(i*i-n*n)),s}function p(e,t){const r=u(e),i=t||{r:[],g:[],b:[]};i.r.length=i.g.length=i.b.length=r;for(let n=0;n<r;n++)i.r[n]=i.g[n]=i.b[n]=0;return i}function f(e,t){const r=d(t.r.length);for(const n of e)Object(i["u"])(j,n.direction),h(j,r,v),o(v,w),c(v,n.intensity[0],_),l(t.r,_),c(v,n.intensity[1],_),l(t.g,_),c(v,n.intensity[2],_),l(t.b,_);return t}function b(e,t){h(j,0,v);for(const r of e)t.r[0]+=v[0]*w[0]*r.intensity[0]*4*Math.PI,t.g[0]+=v[0]*w[0]*r.intensity[1]*4*Math.PI,t.b[0]+=v[0]*w[0]*r.intensity[2]*4*Math.PI;return t}function m(e,t,r,n){p(t,n),Object(i["y"])(r.intensity,0,0,0);let s=!1;const o=g,c=y,u=O;o.length=0,c.length=0,u.length=0;for(const l of e)l instanceof a["c"]&&!s?(Object(i["m"])(r.direction,l.direction),Object(i["m"])(r.intensity,l.intensity),r.specularStrength=l.specularStrength,r.environmentStrength=l.environmentStrength,r.castShadows=l.castShadows,s=!0):l instanceof a["c"]||l instanceof a["b"]?o.push(l):l instanceof a["a"]?c.push(l):l instanceof a["d"]&&u.push(l);f(o,n),b(c,n);for(const i of u)l(n.r,i.r),l(n.g,i.g),l(n.b,i.b)}const g=[],y=[],O=[],v=[0],_=[0],j=Object(n["f"])(),w=[3.141593,2.094395,2.094395,2.094395,.785398,.785398,.785398,.785398,.785398];class x{constructor(){this._shOrder=2,this._ambientBoost=.4,this._oldSunlight={direction:Object(n["f"])(),ambient:{color:Object(n["f"])(),intensity:1},diffuse:{color:Object(n["f"])(),intensity:1}},this.globalFactor=.5,this.groundLightingFactor=.5,this._sphericalHarmonics=new a["d"],this._mainLight={intensity:Object(n["f"])(),direction:Object(n["h"])(1,0,0),castShadows:!1,specularStrength:1,environmentStrength:1}}get lightingMainDirection(){return this._mainLight.direction}setLightDirectionUniform(e){e.setUniform3fv("lightingMainDirection",this._mainLight.direction)}setUniforms(e,t,r){const i=t?(1-this.groundLightingFactor)*(1-this.globalFactor):0;e.setUniform1f("lightingFixedFactor",i),e.setUniform1f("lightingGlobalFactor",this.globalFactor),this.setLightDirectionUniform(e),e.setUniform3fv("lightingMainIntensity",this._mainLight.intensity),e.setUniform1f("lightingSpecularStrength",this._mainLight.specularStrength),e.setUniform1f("lightingEnvironmentStrength",this._mainLight.environmentStrength),e.setUniform1f("ambientBoostFactor",this._ambientBoost),e.setUniform1b("hasFillLights",r);const n=this._sphericalHarmonics;0===this._shOrder?e.setUniform3f("lightingAmbientSH0",n.r[0],n.g[0],n.b[0]):1===this._shOrder?(e.setUniform4f("lightingAmbientSH_R",n.r[0],n.r[1],n.r[2],n.r[3]),e.setUniform4f("lightingAmbientSH_G",n.g[0],n.g[1],n.g[2],n.g[3]),e.setUniform4f("lightingAmbientSH_B",n.b[0],n.b[1],n.b[2],n.b[3])):2===this._shOrder&&(e.setUniform3f("lightingAmbientSH0",n.r[0],n.g[0],n.b[0]),e.setUniform4f("lightingAmbientSH_R1",n.r[1],n.r[2],n.r[3],n.r[4]),e.setUniform4f("lightingAmbientSH_G1",n.g[1],n.g[2],n.g[3],n.g[4]),e.setUniform4f("lightingAmbientSH_B1",n.b[1],n.b[2],n.b[3],n.b[4]),e.setUniform4f("lightingAmbientSH_R2",n.r[5],n.r[6],n.r[7],n.r[8]),e.setUniform4f("lightingAmbientSH_G2",n.g[5],n.g[6],n.g[7],n.g[8]),e.setUniform4f("lightingAmbientSH_B2",n.b[5],n.b[6],n.b[7],n.b[8]))}set(e){m(e,this._shOrder,this._mainLight,this._sphericalHarmonics),Object(i["m"])(this._oldSunlight.direction,this._mainLight.direction);const t=1/Math.PI;this._oldSunlight.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*t,this._oldSunlight.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*t,this._oldSunlight.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*t,Object(i["g"])(this._oldSunlight.diffuse.color,this._mainLight.intensity,t),Object(i["m"])(T,this._oldSunlight.diffuse.color),Object(i["g"])(T,T,this._ambientBoost*this.globalFactor),Object(i["h"])(this._oldSunlight.ambient.color,this._oldSunlight.ambient.color,T)}get old(){return this._oldSunlight}}const T=Object(n["f"])()},2255:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s}));class i{constructor(e,t,r,i){this.semiMajorAxis=e,this.flattening=t,this.outerAtmosphereRimWidth=r;const n=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*n,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=i||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}get radius(){return this.semiMajorAxis}}const n=new i(6378137,1/298.257223563,3e5,.006694379990137799),a=new i(3396190,1/169.8944472236118,23e4),s=new i(1737400,0,0)},2258:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return n}));var i=r("92ef");function n(e,t,r){const i=t.flatten(({sublayers:e})=>e).length;return i!==e.length||(!!e.some(e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r)||!s(e,t))}function a(e,t,r){return!!e.some(e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(!t.gdbVersion||t.gdbVersion===r.gdbVersion))||e.originIdOf("renderer")>i["a"].SERVICE||e.originIdOf("labelingInfo")>i["a"].SERVICE||e.originIdOf("opacity")>i["a"].SERVICE||e.originIdOf("labelsVisible")>i["a"].SERVICE})||!s(e,t)}function s(e,t){if(!e||!e.length)return!0;const r=t.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).map(e=>e.id).toArray();if(e.length>r.length)return!1;let i=0;const n=r.length;for(const{id:a}of e){for(;i<n&&r[i]!==a;)i++;if(i>=n)return!1}return!0}function o(e){return!!e&&e.some(e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale)}},"226a":function(e,t,r){"use strict";r.r(t),r.d(t,"DictionaryLoader",(function(){return b}));var i=r("9ef0"),n=r("2eab"),a=r("ce50"),s=r("e92d"),o=r("c24e"),c=r("b2b2"),l=r("f4cc"),u=r("b3b6"),d=r("82fa"),h=r("4cac");const p=s["a"].getLogger("esri.renderers.support.DictionaryLoader"),f={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class b{constructor(e,t,r){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new o["a"](100),this.url=e,this.config=t,this.fieldMap=r}getSymbolFields(){return this._symbolFields}async getSymbolAsync(e,t){let r;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{r=await this._dictionaryPromise}catch(m){if(Object(l["m"])(m))return this._dictionaryPromise=null,null}const n={};if(this.fieldMap)for(const i of this._symbolFields){const t=this.fieldMap[i];if(t&&null!=e.attributes[t]){const r=""+e.attributes[t];n[i]=r}else n[i]=""}const a=r(n,t);if(!a||"string"!=typeof a)return null;const s=Object(u["b"])(a).toString(),o=this._symbolCache.get(s);if(o)return o.catch(()=>{this._symbolCache.pop(s)}),o;const d=a.split(";"),h=[],p=[];for(const c of d)if(c)if(c.includes("po:")){const e=c.substr(3).split("|");if(3===e.length){const t=e[0],r=e[1];let n=e[2];if("DashTemplate"===r)n=n.split(" ").map(e=>Number(e));else if("Color"===r){const e=new i["a"](n).toRgba();n=[e[0],e[1],e[2],255*e[3]]}else n=Number(n);p.push({primitiveName:t,propertyName:r,value:n})}}else if(c.includes("|")){for(const e of c.split("|"))if(this._itemNames.has(e)){h.push(e);break}}else this._itemNames.has(c)&&h.push(c);const f=!Object(c["k"])(e.geometry)||!e.geometry.hasZ&&"point"===e.geometry.type,b=this._cimPartsToCIMSymbol(h,p,f,t);return this._symbolCache.put(s,b,1),b}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void p.error("no valid URL!");const t=Object(c["k"])(e)?e.abortOptions:null,r=Object(n["default"])(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...t}),[{data:i}]=await Promise.all([r,Object(d["e"])()]);if(!i)throw this._dictionaryPromise=null,new a["a"]("esri.renderers.DictionaryRenderer","Bad dictionary data!");const s=i.expression,o=i.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+i.cimRefTemplateUrl,this._itemNames=new Set(i.itemsNames),this._symbolFields=o.symbol;const l={};if(this.config){const e=this.config;for(const t in e)l[t]=e[t]}if(o.configuration)for(const n of o.configuration)l.hasOwnProperty(n.name)||(l[n.name]=n.value);const u=[];if(Object(c["k"])(e)&&e.fields&&this.fieldMap)for(const n of this._symbolFields){const t=this.fieldMap[n],r=e.fields.filter(e=>e.name===t);r.length>0&&u.push({...r[0],name:n})}return this._dictionaryPromise=Object(d["b"])(s,Object(c["k"])(e)?e.spatialReference:null,u,l).then(e=>{const t={scale:0};return(r,i)=>{const n=e.repurposeFeature({geometry:null,attributes:r});return t.scale=Object(c["k"])(i)?i.scale:void 0,e.evaluate({$feature:n,$view:t})}}).catch(e=>(p.error("Creating dictinoary expression failed:",e),null)),this._dictionaryPromise}async _cimPartsToCIMSymbol(e,t,r,i){const n=new Array(e.length);for(let o=0;o<e.length;o++)n[o]=this._getSymbolPart(e[o],i);const a=await Promise.all(n),s=this.fieldMap;for(const o of a)m(o,s);return new h["a"]({data:this._combineSymbolParts(a,t,r)})}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then(e=>e.data);const r=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=Object(n["default"])(r,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,i);try{return(await i).data}catch(a){return this._ongoingRequests.delete(e),Promise.reject(a)}}_combineSymbolParts(e,t,r){if(!e||0===e.length)return null;const i={...e[0]};if(e.length>1){i.symbolLayers=[];for(const t of e){const e=t;i.symbolLayers.unshift(...e.symbolLayers)}}return r&&(i.callout=f),{type:"CIMSymbolReference",symbol:i,primitiveOverrides:t}}}function m(e,t){if(!e)return;const r=e.symbolLayers;if(!r)return;let i=r.length;for(;i--;){const e=r[i];e&&!1!==e.enable&&"CIMVectorMarker"===e.type&&g(e,t)}}function g(e,t){const r=e.markerGraphics;if(r)for(const i of r){if(!i)continue;const e=i.symbol;if(e)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":m(e,t);break;case"CIMTextSymbol":e.fieldMap=t}}}},2273:function(e,t,r){"use strict";r.r(t),r.d(t,"work",(function(){return u})),r.d(t,"wrappedWork",(function(){return l}));var i=r("8c4b");function n(e,t,r){const i=t/3,n=new Uint32Array(r+1),a=new Uint32Array(r+1),s=(e,t)=>{e<t?n[e+1]++:a[t+1]++};for(let g=0;g<i;g++){const t=e[3*g],r=e[3*g+1],i=e[3*g+2];s(t,r),s(r,i),s(i,t)}let o=0,c=0;for(let g=0;g<r;g++){const e=n[g+1],t=a[g+1];n[g+1]=o,a[g+1]=c,o+=e,c+=t}const l=new Uint32Array(6*i),u=n[r],d=(e,t,r)=>{if(e<t){const i=n[e+1]++;l[2*i]=t,l[2*i+1]=r}else{const i=a[t+1]++;l[2*u+2*i]=e,l[2*u+2*i+1]=r}};for(let g=0;g<i;g++){const t=e[3*g],r=e[3*g+1],i=e[3*g+2];d(t,r,g),d(r,i,g),d(i,t,g)}const h=(e,t)=>{const r=2*e,i=t-e;for(let n=1;n<i;n++){const e=l[r+2*n],t=l[r+2*n+1];let i=n-1;for(;i>=0&&l[r+2*i]>e;i--)l[r+2*i+2]=l[r+2*i],l[r+2*i+3]=l[r+2*i+1];l[r+2*i+2]=e,l[r+2*i+3]=t}};for(let g=0;g<r;g++)h(n[g],n[g+1]),h(u+a[g],u+a[g+1]);const p=new Int32Array(3*i),f=(t,r)=>t===e[3*r]?0:t===e[3*r+1]?1:t===e[3*r+2]?2:-1,b=(e,t)=>{const r=f(e,t);p[3*t+r]=-1},m=(e,t,r,i)=>{const n=f(e,t);p[3*t+n]=i;const a=f(r,i);p[3*i+a]=t};for(let g=0;g<r;g++){let e=n[g];const t=n[g+1];let r=a[g];const i=a[g+1];for(;e<t&&r<i;){const t=l[2*e],i=l[2*u+2*r];t===i?(m(g,l[2*e+1],i,l[2*u+2*r+1]),e++,r++):t<i?(b(g,l[2*e+1]),e++):(b(i,l[2*u+2*r+1]),r++)}for(;e<t;)b(g,l[2*e+1]),e++;for(;r<i;)b(l[2*u+2*r],l[2*u+2*r+1]),r++}return p}var a=r("0480"),s=r("0c9d"),o=r("7e0c"),c=r("0013");async function l(e){const t=d(e),r=u(t),i=[t.data.buffer];return{result:h(r,i),transferList:i}}function u(e){const t=p(e.data,e.skipDeduplicate,e.indices,e.indicesLength);return f.updateSettings(e.writerSettings),b.updateSettings(e.writerSettings),Object(c["b"])(t,f,b)}function d(e){return{data:s["a"].createView(e.dataBuffer),indices:"Uint32Array"===e.indicesType?new Uint32Array(e.indicesBuffer):"Uint16Array"===e.indicesType?new Uint16Array(e.indicesBuffer):void 0,indicesLength:e.indicesLength,writerSettings:e.writerSettings,skipDeduplicate:e.skipDeduplicate}}function h(e,t){return t.push(e.regular.lodInfo.lengths.buffer),t.push(e.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:Object(a["a"])(e.regular.instancesData,t),lodInfo:{lengths:e.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:Object(a["a"])(e.silhouette.instancesData,t),lodInfo:{lengths:e.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:e.averageEdgeLength}}function p(e,t,r,a){if(t)return{faces:r,facesLength:a,neighbors:n(r,a,e.count),vertices:e};const o=Object(i["a"])(e.buffer,e.stride/4,{originalIndices:r,originalIndicesLength:a}),c=n(o.indices,a,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:c,vertices:s["a"].createView(o.buffer)}}const f=new o["a"],b=new o["b"]},"228a":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("c120"),n=r("b2b2"),a=r("f4cc");function s(e,t,r=!1,s){return new Promise((c,l)=>{if(Object(a["n"])(s))return void l(o());let u=()=>{p(),l(new Error("Unable to load "+t))},d=()=>{const t=e;p(),c(t)},h=()=>{if(!e)return;const t=e;p(),t.src="",l(o())};const p=()=>{Object(i["a"])("esri-image-decode")||(e.removeEventListener("error",u),e.removeEventListener("load",d)),u=null,d=null,e=null,Object(n["k"])(s)&&s.removeEventListener("abort",h),h=null,r&&URL.revokeObjectURL(t)};Object(n["k"])(s)&&s.addEventListener("abort",h),Object(i["a"])("esri-image-decode")?e.decode().then(d,u):(e.addEventListener("error",u),e.addEventListener("load",d))})}function o(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}},"22f1":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return a}));var i=r("7a2a");function n(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every((e,t)=>e.type===r[t].type)}function a(e,t){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;for(let a=n.length;a<r.length;a++)n.push(Object(i["g"])(r[a]))}function s(e){const t=e[0];return!!t&&"type"in t}},"22f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return y})),r.d(t,"c",(function(){return x})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return g})),r.d(t,"f",(function(){return S})),r.d(t,"g",(function(){return T})),r.d(t,"h",(function(){return v})),r.d(t,"i",(function(){return _})),r.d(t,"j",(function(){return f})),r.d(t,"k",(function(){return O})),r.d(t,"l",(function(){return w})),r.d(t,"m",(function(){return p})),r.d(t,"n",(function(){return m}));var i=r("658b"),n=r("3af1"),a=r("5996"),s=r("fcf2"),o=r("b2b2"),c=(r("f4cc"),r("1233"));function l(e){if(!e)return e;const{start:t,end:r}=e;return new i["a"]({start:Object(o["k"])(t)?Object(c["b"])(t,-t.getTimezoneOffset(),"minutes"):t,end:Object(o["k"])(r)?Object(c["b"])(r,-r.getTimezoneOffset(),"minutes"):r})}function u(e){if(!e)return e;const{start:t,end:r}=e;return new i["a"]({start:Object(o["k"])(t)?Object(c["b"])(t,t.getTimezoneOffset(),"minutes"):t,end:Object(o["k"])(r)?Object(c["b"])(r,r.getTimezoneOffset(),"minutes"):r})}var d=r("fd14"),h=r("42be");const p={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},f={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},b={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},m={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s["g"]}}},g={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},y={value:null,type:d["a"],json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function O(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={type:Number,json:{origins:{"web-document":{write:!0,read:!0},"portal-item":{write:!0}}}},_={...v,json:{...v.json,origins:{"web-document":{...v.json.origins["web-document"],write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?Object(h["b"])(t.layerDefinition.drawingInfo.transparency):void 0:Object(h["b"])(t.drawingInfo.transparency)}}},j={type:i["a"],readOnly:!0,get(){var e,t;if(null==(e=this.layer)||!e.timeInfo)return null;const{datesInUnknownTimezone:r,timeOffset:i,useViewTime:n}=this.layer,a=null==(t=this.view)?void 0:t.timeExtent;let s=this.layer.timeExtent;r&&(s=u(s));let o=n?a&&s?a.intersection(s):a||s:s;if(!o||o.isEmpty||o.isAllTime)return o;i&&(o=o.offset(-i.value,i.unit)),r&&(o=l(o));const c=this._get("timeExtent");return o.equals(c)?c:o}},w={type:n["a"],readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=n["a"].fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=a["a"].fromJSON(t.spatialReference)),r}}}},read:!1}},x={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},T={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},S={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}}},"22f5":function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return x}));var i=r("2eab"),n=r("792b"),a=r("ce50"),s=r("e92d"),o=r("b2b2"),c=r("f4cc"),l=r("549a"),u=r("0b2d"),d=r("4261"),h=r("2db0"),p=r("b7c2"),f=r("0278"),b=r("1e2c"),m=r("dbad"),g=r("d17d");const y=s["a"].getLogger("esri.views.3d.layers.graphics.objectResourceUtils");async function O(e,t){const r=await v(e,t);return{resource:r,textures:await S(r.textureDefinitions,t)}}async function v(e,t){const r=Object(o["k"])(t)&&t.streamDataRequester;if(r)return _(e,r,t);const a=await Object(n["d"])(Object(i["default"])(e,Object(o["t"])(t)));if(!0===a.ok)return a.value.data;Object(c["u"])(a.error),j(a.error)}async function _(e,t,r){const i=await Object(n["d"])(t.request(e,"json",r));if(!0===i.ok)return i.value;Object(c["u"])(i.error),j(i.error.details.url)}function j(e){throw new a["a"]("","Request for object resource failed: "+e)}function w(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(y.warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t&&t.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(y.warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(y.warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(y.warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else y.warn("Indexed geometries must specify faces"),i=!1;break}default:y.warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(y.warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const a in n)n[a].values||(y.warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function x(e,t){const r=[],i=[],n=[],a=[],s=e.resource,c=l["a"].parse(s.version||"1.0","wosr");C.validate(c);const d=s.model.name,h=s.model.geometries,g=s.materialDefinitions,y=e.textures;let O=0;const v=new Map;for(let l=0;l<h.length;l++){const e=h[l];if(!w(e))continue;const s=A(e),c=e.params.vertexAttributes,d=[];for(const t in c){const e=c[t],r=e.values;d.push([t,{data:r,size:e.valuesPerElement,exclusive:!0}])}const _=[];if("PerAttributeArray"!==e.params.topology){const t=e.params.faces;for(const e in t)_.push([e,new Uint32Array(t[e].values)])}const j=y&&y[s.texture];if(j&&!v.has(s.texture)){const{image:e,params:t}=j,r=new b["a"](e,t);a.push(r),v.set(s.texture,r)}const x=v.get(s.texture),T=x?x.id:void 0;let S=n[s.material]?n[s.material][s.texture]:null;if(!S){const e=g[s.material.substring(s.material.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=j&&j.alphaChannelUsage,i=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,a=j?E(j.alphaChannelUsage):void 0,c={ambient:Object(u["g"])(e.diffuse),diffuse:Object(u["g"])(e.diffuse),opacity:1-(e.transparency||0),transparent:i,textureAlphaMode:a,textureAlphaCutoff:.33,textureId:T,initTextureTransparent:!0,doubleSided:!0,cullFace:p["c"].None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:!!j&&!!j.params.preMultiplyAlpha};Object(o["k"])(t)&&t.materialParamsMixin&&Object.assign(c,t.materialParamsMixin),S=new m["a"](c),n[s.material]||(n[s.material]={}),n[s.material][s.texture]=S}i.push(S);const C=new f["a"](d,_);O+=_.position?_.position.length:0,r.push(C)}return{name:d,stageResources:{textures:a,materials:i,geometries:r},pivotOffset:s.model.pivotOffset,boundingBox:T(r),numberOfVertices:O,lodThreshold:null}}function T(e){const t=Object(d["k"])();return e.forEach(e=>{const r=e.boundingInfo;Object(o["k"])(r)&&(Object(d["r"])(t,r.getBBMin()),Object(d["r"])(t,r.getBBMax()))}),t}async function S(e,t){const r=[];for(const a in e){const i=e[a],n=i.images[0].data;if(!n){y.warn("Externally referenced texture data is not yet supported");continue}const s=i.encoding+";base64,"+n,c="/textureDefinitions/"+a,l="rgba"===i.channels?i.alphaChannelUsage||"transparency":"none",u={noUnpackFlip:!0,wrap:{s:g["B"].REPEAT,t:g["B"].REPEAT},preMultiplyAlpha:E(l)!==p["a"].Opaque},d=Object(o["k"])(t)&&t.disableTextures?Promise.resolve(null):Object(h["a"])(s,t);r.push(d.then(e=>({refId:c,image:e,params:u,alphaChannelUsage:l})))}const i=await Promise.all(r),n={};for(const a of i)n[a.refId]=a;return n}function E(e){switch(e){case"mask":return p["a"].Mask;case"maskAndTransparency":return p["a"].MaskBlend;case"none":return p["a"].Opaque;default:return p["a"].Blend}}function A(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const C=new l["a"](1,2,"wosr")},"24b4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return o}));var i,n=r("3886"),a=r("690a"),s=r("b7bd");function o(e){const t=new a["a"];return t.attributes.add(s["a"].POSITION,"vec3"),t.attributes.add(s["a"].INSTANCEFEATUREATTRIBUTE,"float"),t.vertex.uniforms.add("cameraPosition","vec3").add("offset","vec3").add("width","float").add("proj","mat4").add("view","mat4").add("time","float"),t.varyings.add("vUv","vec2"),t.vertex.code.add(n["a"]`
  398. //https://www.shadertoy.com/view/4djSRW
  399. vec3 hash31(float p){
  400. vec3 p3 = fract(vec3(p) * vec3(0.1031, 0.1030, 0.0973));
  401. p3 += dot(p3, p3.yzx + 33.33);
  402. return fract((p3.xxy + p3.yzz) * p3.zyx);
  403. }
  404. float hash11(float p){
  405. p = fract(p * 0.1031);
  406. p *= p + 33.33;
  407. p *= p + p;
  408. return fract(p);
  409. }
  410. //https://www.geeks3d.com/20141201/how-to-rotate-a-vertex-by-a-quaternion-in-glsl/
  411. vec3 rotateVectorByQuaternion(vec3 v, vec4 q){
  412. return 2.0 * cross(q.xyz, v * q.w + cross(q.xyz, v)) + v;
  413. }
  414. void main(void) {
  415. vUv = position.xz;
  416. vec3 rand = hash31(instanceFeatureAttribute);
  417. // Set random position for all particles
  418. // The hash function space is not high resolution so offset particles by an additional random value
  419. // This creates grids of 1000 particles which are shifted by random hundreths of the tile width
  420. // overlaying multiple identical but offset grids
  421. vec3 randomPosition = 2.0 * (rand + (0.01 + 0.01 * rand) * floor(0.001 * instanceFeatureAttribute)) - 1.0;
  422. // Random orientation of rain drops
  423. float angle = 3.1415 * hash11(instanceFeatureAttribute);
  424. vec3 up = vec3(0, 0, 1);
  425. // Gravity and wind direction
  426. vec3 direction = normalize(cameraPosition);
  427. vec3 tangent = normalize(cross(direction, up));
  428. // Gravity
  429. vec3 animatedPos = randomPosition + direction * -time;
  430. // Rain particles fall straight down and are randomly oriented
  431. // Snow particles have random sinusoid trajectories and are rotated to face the camera
  432. ${e.type===i.RAIN?n["a"]`
  433. // Random rotation for particle
  434. vec3 rotationAxis = up;
  435. vec4 quat = vec4(rotationAxis * sin(angle), cos(angle));
  436. vec3 transformedPos = rotateVectorByQuaternion(vec3(0.2, 0.2, 4.0) * (position - vec3(0.5, 0.0, 0.5)), quat);
  437. // Rotate particle to planetary position
  438. rotationAxis = tangent;
  439. angle = 0.5 * -acos(dot(direction, up));
  440. quat = vec4(rotationAxis * sin(angle), cos(angle));
  441. transformedPos = rotateVectorByQuaternion(transformedPos, quat);
  442. vec4 pos = mat4(mat3(view)) * vec4(transformedPos + (mod(width * animatedPos - offset, width) - 0.5 * width), 1.0);
  443. gl_Position = proj * pos;
  444. `:n["a"]`
  445. vec3 rotationAxis = direction;
  446. vec4 quat = vec4(rotationAxis * sin(angle), cos(angle));
  447. tangent = rotateVectorByQuaternion(tangent, quat);
  448. // Random sinusoid from friction
  449. animatedPos += tangent * 0.25 * sin(dot(animatedPos, direction));
  450. vec4 pos = mat4(mat3(view)) * vec4((mod(width * animatedPos - offset, width) - 0.5 * width), 1.0);
  451. gl_Position = proj * (0.5 * vec4(position.xzy, 0.0) + pos);
  452. `}
  453. }
  454. `),t.fragment.uniforms.add("opacity","float").add("particleColor","vec3"),t.fragment.code.add(n["a"]`
  455. void main() {
  456. // Cut off corners of the triangle
  457. if(vUv.x < 0.0 || vUv.y < 0.0){
  458. discard;
  459. }
  460. float d = length(vUv - vec2(0.5));
  461. ${e.type===i.RAIN?n["a"]`d = 0.5 * smoothstep(0.5, 0.0, d);`:n["a"]`d = smoothstep(0.5, 0.1, d);`}
  462. gl_FragColor = opacity * vec4(particleColor * d, d);
  463. }
  464. `),t}!function(e){e[e.RAIN=0]="RAIN",e[e.SNOW=1]="SNOW"}(i||(i={}));const c=Object.freeze({__proto__:null,get PrecipitationType(){return i},build:o})},25245:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return f}));var i=r("ce50"),n=r("e92d"),a=r("9d1d"),s=r("74bd");const o=n["a"].getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer");function c(e,t){var r;if(!t.write||t.write.writer||!1===t.write.enabled&&!t.write.overridePolicy)return;const i=null!=(r=null==e?void 0:e.ndimArray)?r:0;e&&(1===i||"type"in e&&Object(s["a"])(e.type))?t.write.writer=b:i>1?t.write.writer=g(i):t.types?Array.isArray(t.types)?t.write.writer=d(t.types[0]):t.write.writer=l(t.types):t.write.writer=h}function l(e){return(t,r,i,n)=>t?u(t,e,n)?h(t,r,i,n):void 0:h(t,r,i,n)}function u(e,t,r){for(const i in t.typeMap)if(e instanceof t.typeMap[i])return!0;if(null!=r&&r.messages){var n,a;const s=null!=(n=t.errorContext)?n:"type",c=`Values of type '${null!=(a="function"!=typeof t.key?e[t.key]:e.declaredClass)?a:"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new i["a"](s+":unsupported",c,{definition:e,context:r})),o.error(c)}return!1}function d(e){return(t,r,i,n)=>t&&Array.isArray(t)?h(t.filter(t=>u(t,e,n)),r,i,n):h(t,r,i,n)}function h(e,t,r,i){Object(a["c"])(r,p(e,i),t)}function p(e,t){return e&&"function"==typeof e.write?e.write({},t):e&&"function"==typeof e.toJSON?e.toJSON():"number"==typeof e?f(e):e}function f(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function b(e,t,r,i){let n;null===e?n=null:e&&"function"==typeof e.map?(n=e.map(e=>p(e,i)),"function"==typeof n.toArray&&(n=n.toArray())):n=[p(e,i)],Object(a["c"])(r,n,t)}function m(e,t,r){return 0!==r&&Array.isArray(e)?e.map(e=>m(e,t,r-1)):p(e,t)}function g(e){return function(t,r,i,n){let s;if(null===t)s=null;else{s=m(t,n,e);let r=e,i=s;for(;r>0&&Array.isArray(i);)r--,i=i[0];if(void 0!==i)for(let e=0;e<r;e++)s=[s]}Object(a["c"])(i,s,r)}}},2546:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("54b4");const n=[];function a(e,t){if(Object(i["c"])(e.url))return!0;const{wkid:r}=t;for(const i of n){if(e.version>=i[0])return!0;if("function"==typeof i[1]&&(i[1]=i[1]()),i[1].has(r))return!1}return!0}n.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102901;t<=102960;t++)e.add(t);return e}]),n.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),n.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),n.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),n.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);for(let t=103696;t<=103698;t++)e.add(t);return e}]),n.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),n.push([10.61,()=>new Set([102497])]),n.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),n.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),n.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},"255d":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("e92d"),n=r("9d1d"),a=r("b3b6"),s=r("4653"),o=r("21e2");const c=i["a"].getLogger("esri.intl");function l(e,t,r={}){const{format:i={}}=r;return Object(a["c"])(e,e=>u(e,t,i))}function u(e,t,r){let i,a;const s=e.indexOf(":");if(-1===s?i=e.trim():(i=e.slice(0,s).trim(),a=e.slice(s+1).trim()),!i)return"";const o=Object(n["b"])(i,t);if(null==o)return"";const c=r[a]||r[i];return c?d(o,c):a?h(o,a):p(o)}function d(e,t){switch(t.type){case"date":return Object(s["b"])(e,t.intlOptions);case"number":return Object(o["b"])(e,t.intlOptions);default:return c.warn("missing format descriptor for key {key}"),p(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return Object(s["b"])(e);case"numberformat":return Object(o["b"])(e);default:return c.warn("inline format is unsupported since 4.12: "+t),/^(dateformat|datestring)/i.test(t)?Object(s["b"])(e):/^numberformat/i.test(t)?Object(o["b"])(e):p(e)}}function p(e){switch(typeof e){case"string":return e;case"number":return Object(o["b"])(e);case"boolean":return""+e;default:return e instanceof Date?Object(s["b"])(e):""}}},2589:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return m}));var i=r("a4ee"),n=r("fc29"),a=r("e92d"),s=r("8ca7"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("767d"),u=r("7164");class d extends u["a"]{constructor(e){super(!0),this._onChange=e,this._value="mouse",this.registerIncoming("pointer-down",e=>{const t="touch"===e.data.native.pointerType;this._setValue(t?"touch":"mouse")}),this._moveHandler=this.registerIncoming("pointer-move",e=>{const t="touch"===e.data.native.pointerType;this._setValue(t?"touch":"mouse")}),this._moveHandler.pause()}_setValue(e){e!==this._value&&("touch"===e?this._moveHandler.resume():this._moveHandler.pause(),this._value=e,this._onChange(e))}}const h=a["a"].getLogger("esri.views.input.InputManager");let p=class extends n["a"]{constructor(e){super(e),this._pointerCaptures=new Map,this._nameToGroup={},this._handlers=[],this._currentPropagation=null,this._updateDependenciesAfterPropagation=!1,this._sourceEvents=new Set,this._keyModifiers=new Set,this._activeKeyModifiers=new Set,this._stoppedPropagationEventIds=new Set,this.primaryKey=l["c"],this.latestPointerType="mouse",this.test={timestamp:void 0,hasCurrentPropagation:()=>!!this._currentPropagation}}initialize(){this.eventSource.onEventReceived=this._onEventReceived.bind(this),this._installRecognizers()}destroy(){const e=Object.keys(this._nameToGroup);for(const t of e)this.uninstallHandlers(t);this.eventSource=null,this._currentPropagation=null}get hasPendingInputs(){return this._handlers.some(e=>e.handler.hasPendingInputs)}installHandlers(e,t,r=m.INTERNAL){if(this._nameToGroup[e])return void h.error("There is already an InputHandler group registered under the name `"+e+"`");if(0===t.length)return void h.error("Can't register a group of zero handlers");const i={name:e,handlers:t.map(e=>({handler:e,active:!0,removed:!1,priorityIndex:0,groupPriority:r,eventCallback:null,uninstallCallback:null}))};this._nameToGroup[e]=i;for(let n=i.handlers.length-1;n>=0;n--){const e=i.handlers[n];this._handlers.push(e),e.handler.onInstall({updateDependencies:()=>{this.updateDependencies()},emit:(t,r,i,n,a)=>{this._emitInputEvent(e.priorityIndex+1,t,r,i,a,n)},setPointerCapture:(t,r)=>{this._setPointerCapture(i,e,t,r)},setEventCallback:t=>{e.eventCallback=t},setUninstallCallback:t=>{e.uninstallCallback=t},refreshHasPendingInputs:()=>{this.notifyChange("hasPendingInputs")}})}this.updateDependencies()}uninstallHandlers(e){const t=this._nameToGroup[e];t?(t.handlers.forEach(e=>{e.removed=!0,e.uninstallCallback()}),delete this._nameToGroup[e],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):h.error("There is no InputHandler group registered under the name `"+e+"`")}hasHandlers(e){return void 0!==this._nameToGroup[e]}updateDependencies(){if(this._currentPropagation)return void(this._updateDependenciesAfterPropagation=!0);this._updateDependenciesAfterPropagation=!1;const e=new Set,t=new Set;this._handlersPriority=[];for(let r=this._handlers.length-1;r>=0;r--){const e=this._handlers[r];e.priorityIndex=r,this._handlersPriority.push(e)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(let r=this._handlersPriority.length-1;r>=0;r--){const i=this._handlersPriority[r];i.priorityIndex=r;let n=i.handler.hasSideEffects;if(!n)for(const t of i.handler.outgoingEventTypes)if(e.has(t)){n=!0;break}if(n)for(const r of i.handler.incomingEventMatches){e.add(r.eventType);for(const e of r.keyModifiers)Object(l["b"])(e)||t.add(e)}i.active=n}this._sourceEvents=e,this._keyModifiers=t,this._pointerCaptures.size>0&&this._sourceEvents.add("pointer-capture-lost"),this._keyModifiers.size>0&&(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up")),this.eventSource&&(this.eventSource.activeEvents=this._sourceEvents)}_setLatestPointerType(e){this._set("latestPointerType",e)}_onEventReceived(e,t){if("pointer-capture-lost"===e){const e=t;this._pointerCaptures.delete(e.native.pointerId)}this._updateKeyModifiers(e,t);const r=null!=this.test.timestamp?this.test.timestamp:t.native?t.native.timestamp:void 0,i=t.native?t.native.cancelable:void 0;this._emitInputEventFromSource(e,t,r,i)}_updateKeyModifiers(e,t){if(!t)return;let r=!1;const i=()=>{if(!r){const e=new Set;this._activeKeyModifiers.forEach(t=>{e.add(t)}),this._activeKeyModifiers=e,r=!0}},n=(e,t)=>{t&&!this._activeKeyModifiers.has(e)?(i(),this._activeKeyModifiers.add(e)):!t&&this._activeKeyModifiers.has(e)&&(i(),this._activeKeyModifiers.delete(e))};if("key-down"===e||"key-up"===e){const r=t.key;this._keyModifiers.has(r)&&n(r,"key-down"===e)}const a=t.native;n("Alt",!(!a||!a.altKey)),n("Ctrl",!(!a||!a.ctrlKey)),n("Shift",!(!a||!a.shiftKey)),n("Meta",!(!a||!a.metaKey)),n("Primary",this._activeKeyModifiers.has(this.primaryKey))}_installRecognizers(){this._latestPointerTypeHandler=new d(e=>this._setLatestPointerType(e)),this.recognizers.length>0&&this.installHandlers("default",this.recognizers,m.INTERNAL),this.installHandlers("input-manager-logic",[this._latestPointerTypeHandler],m.INTERNAL)}_setPointerCapture(e,t,r,i){const n=e.name+"-"+t.priorityIndex,a=this._pointerCaptures.get(r.pointerId)||new Set;this._pointerCaptures.set(r.pointerId,a),i?(a.add(n),1===a.size&&this.eventSource&&this.eventSource.setPointerCapture(r,!0)):a.has(n)&&(a.delete(n),0===a.size&&(this._pointerCaptures.delete(r.pointerId),this.eventSource&&this.eventSource.setPointerCapture(r,!1)))}_garbageCollectRemovedHandlers(){this._handlers=this._handlers.filter(e=>!e.removed),this.updateDependencies()}_emitInputEventFromSource(e,t,r,i){this._emitInputEvent(0,e,t,r,i)}_emitInputEvent(e,t,r,i,n,a){const s=void 0!==i?i:this._currentPropagation?this._currentPropagation.timestamp:performance.now(),o=void 0!==n&&n,c={event:new f(t,r,s,a||this._activeKeyModifiers,o),priorityIndex:e};this._currentPropagation?this._currentPropagation.events.push(c):this._doNewPropagation(c)}_doNewPropagation(e){this._currentPropagation={events:new s["a"],currentHandler:null,needsHandlerGarbageCollect:!1,timestamp:e.event.timestamp},this._currentPropagation.events.push(e),this._continuePropagation()}_continuePropagation(){const e=this._currentPropagation;if(e){for(;this._currentPropagation.events.length>0;){const{event:t,priorityIndex:r}=this._currentPropagation.events.pop(),i=t.data&&t.data.eventId;if(null==i||!this._stoppedPropagationEventIds.has(i))for(e.currentHandler=this._handlersPriority[r];e.currentHandler;){if(e.currentHandler.removed)e.needsHandlerGarbageCollect=!0;else{if(e.currentHandler.active&&!t.shouldStopPropagation()&&e.currentHandler.eventCallback(t),t.shouldStopPropagation()){null!=i&&this._stoppedPropagationEventIds.add(i);break}if(t.shouldPausePropagation(()=>this._continuePropagation()))return void this._pausePropagation({event:t,priorityIndex:e.currentHandler.priorityIndex+1})}e.currentHandler=this._handlersPriority[e.currentHandler.priorityIndex+1]}}e.needsHandlerGarbageCollect&&this._garbageCollectRemovedHandlers(),this.hasPendingInputs||this._stoppedPropagationEventIds.clear(),this._currentPropagation=null,this._updateDependenciesAfterPropagation&&this.updateDependencies()}}_pausePropagation(e){const t=new s["a"];for(t.push(e);this._currentPropagation.events.length;)t.push(this._currentPropagation.events.pop());this._currentPropagation.events=t,this._currentPropagation.currentHandler=null}_compareHandlerPriority(e,t){if(e.handler.hasSideEffects!==t.handler.hasSideEffects)return e.handler.hasSideEffects?1:-1;if(e.groupPriority!==t.groupPriority)return e.groupPriority>t.groupPriority?-1:1;for(const r of e.handler.incomingEventMatches)for(const e of t.handler.incomingEventMatches){if(r.eventType!==e.eventType)continue;const t=r.keyModifiers.filter(t=>-1!==e.keyModifiers.indexOf(t));if(t.length===r.keyModifiers.length!==(t.length===e.keyModifiers.length))return r.keyModifiers.length>e.keyModifiers.length?-1:1}return e.priorityIndex>t.priorityIndex?-1:1}_sortHandlersPriority(e){const t=[];for(const r of e){let e=0;for(;e<t.length&&this._compareHandlerPriority(r,t[e])>=0;)e++;t.splice(e,0,r)}return t}get debug(){const e=e=>{const t=this._setPointerCapture;this._setPointerCapture=()=>{},e(),this._setPointerCapture=t};return{injectEvent:(t,r)=>{e(()=>{this._onEventReceived(t,r)})},disablePointerCapture:e}}};Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"hasPendingInputs",null),Object(i["a"])([Object(o["b"])()],p.prototype,"eventSource",void 0),Object(i["a"])([Object(o["b"])()],p.prototype,"recognizers",void 0),Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"latestPointerType",void 0),p=Object(i["a"])([Object(c["a"])("esri.views.input.InputManager")],p);class f{constructor(e,t,r,i,n){this.type=e,this.data=t,this.timestamp=r,this.modifiers=i,this.cancelable=n,this._propagationState=b.NONE,this._resumeCallback=null}stopPropagation(){this._propagationState|=b.STOPPED}shouldStopPropagation(){return 0!=(this._propagationState&b.STOPPED)}async(e){this._propagationState|=b.PAUSED;const t=(e,t)=>{this._propagationState&=~b.PAUSED;const r=this._resumeCallback;if(this._resumeCallback=null,r&&r(),t)throw e;return e};return("function"==typeof e?e():e).then(e=>t(e,!1),e=>t(e,!0))}shouldPausePropagation(e){return!!(this._propagationState&b.PAUSED)&&(this._resumeCallback=e,!0)}preventDefault(){this.data.native.preventDefault()}}var b;!function(e){e[e.NONE=0]="NONE",e[e.STOPPED=1]="STOPPED",e[e.PAUSED=2]="PAUSED"}(b||(b={}));const m={DEFAULT:0,TOOL:-1,WIDGET:-2,INTERNAL:-3}},2603:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("a4ee"),n=r("d3ac"),a=r("6a0ed"),s=r("38a4"),o=r("59b2"),c=(r("b50f"),r("c120"),r("1a3e")),l=r("afcf"),u=r("d386"),d=r("09db"),h=r("cea0"),p=r("4ae5"),f=r("680b");let b=class extends(Object(n["a"])(a["a"])){constructor(...e){super(...e),this.position=new p["a"]([0,0,0]),this.heading=0,this.tilt=0,this.fov=55}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=Object(h["i"])(e.x||0),n.y=Object(h["i"])(e.y||0),n.z=e.hasZ?Object(h["i"])(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new p["a"];return r.read(e,t),r.x=Object(h["i"])(r.x||0),r.y=Object(h["i"])(r.y||0),r.z=r.hasZ?Object(h["i"])(r.z||0):r.z,r}equals(e){return!!e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)}};Object(i["a"])([Object(o["b"])({type:p["a"],json:{write:{isRequired:!0}}})],b.prototype,"position",void 0),Object(i["a"])([Object(d["a"])("position")],b.prototype,"writePosition",null),Object(i["a"])([Object(l["a"])("position")],b.prototype,"readPosition",null),Object(i["a"])([Object(o["b"])({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),Object(c["a"])(e=>f["e"].normalize(Object(h["i"])(e)))],b.prototype,"heading",void 0),Object(i["a"])([Object(o["b"])({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),Object(c["a"])(e=>Object(s["f"])(Object(h["i"])(e),-180,180))],b.prototype,"tilt",void 0),Object(i["a"])([Object(o["b"])({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],b.prototype,"fov",void 0),b=Object(i["a"])([Object(u["a"])("esri.Camera")],b);const m=b},"261a":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("d386")),c=r("09db"),l=r("c1da"),u=r("667b"),d=r("be4d"),h=r("226a");let p=i=class extends(Object(d["a"])(u["a"])){constructor(e){super(e),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}get _loader(){return new h["DictionaryLoader"](this.url,this.config,this.fieldMap)}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,t,r,i){null!=i&&i.origin||super.writeVisualVariables(e,t,r,i)}clone(){return new i({config:Object(a["a"])(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:Object(a["a"])(this.fieldMap),url:Object(a["a"])(this.url),visualVariables:Object(a["a"])(this.visualVariables)})}async getSymbolAsync(e,t){return this._loader.getSymbolAsync(e,t)}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await Object(l["a"])(e,t,this.scaleExpression);for(const r in this.fieldMap){const i=this.fieldMap[r];t.has(i)&&e.add(i)}}get arcadeRequired(){return!0}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._loader.getSymbolFields()}};Object(n["a"])([Object(s["b"])({type:h["DictionaryLoader"]})],p.prototype,"_loader",null),Object(n["a"])([Object(s["b"])({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],p.prototype,"config",void 0),Object(n["a"])([Object(s["b"])({type:Object,json:{write:!0}})],p.prototype,"fieldMap",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],p.prototype,"scaleExpression",void 0),Object(n["a"])([Object(c["a"])("scaleExpression")],p.prototype,"writeData",null),Object(n["a"])([Object(s["b"])({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],p.prototype,"scaleExpressionTitle",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],p.prototype,"url",void 0),Object(n["a"])([Object(c["a"])("visualVariables")],p.prototype,"writeVisualVariables",null),p=i=Object(n["a"])([Object(o["a"])("esri.renderers.DictionaryRenderer")],p);const f=p},2765:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Geometry=2]="Geometry",e[e.Material=3]="Material",e[e.Texture=4]="Texture",e[e.COUNT=5]="COUNT"}(i||(i={}))},2772:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));r("8750"),r("755e"),r("e20b"),r("c120"),r("e92d");r("feab"),r("d822"),r("702a"),r("60e6");function i(e){return e&&"function"==typeof e.render}function n(e){return e&&"function"==typeof e.postMixInProperties&&"function"==typeof e.buildRendering&&"function"==typeof e.postCreate&&"function"==typeof e.startup}},"28b1":function(e,t,r){"use strict";function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function n(e){return void 0!==e.points}function a(e){return void 0!==e.x&&void 0!==e.y}function s(e){return void 0!==e.paths}function o(e){return void 0!==e.rings}function c(e){return(t,r)=>null==t?r:null==r?t:e(t,r)}r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return p}));const l=c(Math.min),u=c(Math.max);function d(e,t){return s(t)?p(e,t.paths,!1,!1):o(t)?p(e,t.rings,!1,!1):n(t)?b(e,t.points,!1,!1,!1,!1):i(t)?f(e,t):(a(t)&&(e[0]=t.x,e[1]=t.y,e[2]=t.x,e[3]=t.y),e)}function h(e,t){return s(t)?p(e,t.paths,!0,!1):o(t)?p(e,t.rings,!0,!1):n(t)?b(e,t.points,!0,!1,!0,!1):i(t)?f(e,t,!0,!1,!0,!1):(a(t)&&(e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.x,e[4]=t.y,e[5]=t.z),e)}function p(e,t,r,i){const n=r?3:2;if(!t.length||!t[0].length)return null;let a,s,o,c,[d,h]=t[0][0],[p,f]=t[0][0];for(let b=0;b<t.length;b++){const e=t[b];for(let t=0;t<e.length;t++){const b=e[t],[m,g]=b;if(d=l(d,m),h=l(h,g),p=u(p,m),f=u(f,g),r&&b.length>2){const e=b[2];a=l(a,e),s=u(s,e)}if(i&&b.length>n){const e=b[n];o=l(a,e),c=u(s,e)}}}return r?i?(e[0]=d,e[1]=h,e[2]=a,e[3]=o,e[4]=p,e[5]=f,e[6]=s,e[7]=c,e.length=8,e):(e[0]=d,e[1]=h,e[2]=a,e[3]=p,e[4]=f,e[5]=s,e.length=6,e):i?(e[0]=d,e[1]=h,e[2]=o,e[3]=p,e[4]=f,e[5]=c,e.length=6,e):(e[0]=d,e[1]=h,e[2]=p,e[3]=f,e.length=4,e)}function f(e,t,r,i,n,a){const s=t.xmin,o=t.xmax,c=t.ymin,l=t.ymax;let u=t.zmin,d=t.zmax,h=t.mmin,p=t.mmax;return n?(u=u||0,d=d||0,a?(h=h||0,p=p||0,e[0]=s,e[1]=c,e[2]=u,e[3]=h,e[4]=o,e[5]=l,e[6]=d,e[7]=p,e):(e[0]=s,e[1]=c,e[2]=u,e[3]=o,e[4]=l,e[5]=d,e)):a?(h=h||0,p=p||0,e[0]=s,e[1]=c,e[2]=h,e[3]=o,e[4]=l,e[5]=p,e):(e[0]=s,e[1]=c,e[2]=o,e[3]=l,e)}function b(e,t,r,i,n,a){const s=r?3:2,o=i&&a,c=r&&n;if(!t.length||!t[0].length)return null;let d,h,p,f,[b,m]=t[0],[g,y]=t[0];for(let O=0;O<t.length;O++){const e=t[O],[r,i]=e;if(b=l(b,r),m=l(m,i),g=u(g,r),y=u(y,i),c&&e.length>2){const t=e[2];d=l(d,t),h=u(h,t)}if(o&&e.length>s){const t=e[s];p=l(d,t),f=u(h,t)}}return n?(d=d||0,h=h||0,a?(p=p||0,f=f||0,e[0]=b,e[1]=m,e[2]=d,e[3]=p,e[4]=g,e[5]=y,e[6]=h,e[7]=f,e):(e[0]=b,e[1]=m,e[2]=d,e[3]=g,e[4]=y,e[5]=h,e)):a?(p=p||0,f=f||0,e[0]=b,e[1]=m,e[2]=p,e[3]=g,e[4]=y,e[5]=f,e):(e[0]=b,e[1]=m,e[2]=g,e[3]=y,e)}},"28eb":function(e,t,r){"use strict";function i(e,t){for(const[r,i]of e)if(t(i,r))return!0;return!1}function n(e,t){for(const[r,i]of e)if(t(i,r))return i;return null}function a(e,t,r){const i=e.get(t);if(void 0!==i)return i;const n=r();return e.set(t,n),n}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i}))},2906:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("a7d7"),n=r("3886");function a(e,t){const r=e.fragment,a=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===a?(r.uniforms.add("lightingAmbientSH0","vec3"),r.code.add(n["a"]`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
  465. vec3 ambientLight = 0.282095 * lightingAmbientSH0;
  466. return ambientLight * (1.0 - ambientOcclusion);
  467. }`)):1===a?(r.uniforms.add("lightingAmbientSH_R","vec4"),r.uniforms.add("lightingAmbientSH_G","vec4"),r.uniforms.add("lightingAmbientSH_B","vec4"),r.code.add(n["a"]`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
  468. vec4 sh0 = vec4(
  469. 0.282095,
  470. 0.488603 * normal.x,
  471. 0.488603 * normal.z,
  472. 0.488603 * normal.y
  473. );
  474. vec3 ambientLight = vec3(
  475. dot(lightingAmbientSH_R, sh0),
  476. dot(lightingAmbientSH_G, sh0),
  477. dot(lightingAmbientSH_B, sh0)
  478. );
  479. return ambientLight * (1.0 - ambientOcclusion);
  480. }`)):2===a&&(r.uniforms.add("lightingAmbientSH0","vec3"),r.uniforms.add("lightingAmbientSH_R1","vec4"),r.uniforms.add("lightingAmbientSH_G1","vec4"),r.uniforms.add("lightingAmbientSH_B1","vec4"),r.uniforms.add("lightingAmbientSH_R2","vec4"),r.uniforms.add("lightingAmbientSH_G2","vec4"),r.uniforms.add("lightingAmbientSH_B2","vec4"),r.code.add(n["a"]`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
  481. vec3 ambientLight = 0.282095 * lightingAmbientSH0;
  482. vec4 sh1 = vec4(
  483. 0.488603 * normal.x,
  484. 0.488603 * normal.z,
  485. 0.488603 * normal.y,
  486. 1.092548 * normal.x * normal.y
  487. );
  488. vec4 sh2 = vec4(
  489. 1.092548 * normal.y * normal.z,
  490. 0.315392 * (3.0 * normal.z * normal.z - 1.0),
  491. 1.092548 * normal.x * normal.z,
  492. 0.546274 * (normal.x * normal.x - normal.y * normal.y)
  493. );
  494. ambientLight += vec3(
  495. dot(lightingAmbientSH_R1, sh1),
  496. dot(lightingAmbientSH_G1, sh1),
  497. dot(lightingAmbientSH_B1, sh1)
  498. );
  499. ambientLight += vec3(
  500. dot(lightingAmbientSH_R2, sh2),
  501. dot(lightingAmbientSH_G2, sh2),
  502. dot(lightingAmbientSH_B2, sh2)
  503. );
  504. return ambientLight * (1.0 - ambientOcclusion);
  505. }`),t.pbrMode!==i["a"].Normal&&t.pbrMode!==i["a"].Schematic||r.code.add(n["a"]`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0);
  506. vec3 calculateAmbientRadiance(float ambientOcclusion)
  507. {
  508. vec3 ambientLight = 1.2 * (0.282095 * lightingAmbientSH0) - 0.2;
  509. return ambientLight *= (1.0 - ambientOcclusion) * skyTransmittance;
  510. }`))}},2959:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),s=r("db52"),o=r("0d93");let c=class extends o["a"]{constructor(e){super(e),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline&&this.outline.hash()}`}};Object(i["a"])([Object(n["b"])({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":s["a"]}},json:{default:null,write:!0}})],c.prototype,"outline",void 0),Object(i["a"])([Object(n["b"])({type:["simple-fill","picture-fill"],readOnly:!0})],c.prototype,"type",void 0),c=Object(i["a"])([Object(a["a"])("esri.symbols.FillSymbol")],c);const l=c},"2aa2":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return a})),function(e){e[e.ELEVATION=0]="ELEVATION",e[e.BASEMAP=1]="BASEMAP",e[e.I3S_INDEX=2]="I3S_INDEX",e[e.I3S_DATA=3]="I3S_DATA",e[e.SYMBOLOGY=4]="SYMBOLOGY"}(i||(i={}));const n=(()=>{const e=new Array;return e[i.ELEVATION]=10,e[i.BASEMAP]=10,e[i.I3S_INDEX]=10,e[i.I3S_DATA]=10,e[i.SYMBOLOGY]=5,e})(),a=30},"2aad":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886"),n=r("b7bd");function a(e,t=!0){e.attributes.add(n["a"].POSITION,"vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.code.add(i["a"]`
  511. void main(void) {
  512. gl_Position = vec4(position, 0.0, 1.0);
  513. ${t?i["a"]`uv = position * 0.5 + vec2(0.5);`:""}
  514. }
  515. `)}},"2ab1":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCNjJDNjlBNEM5RDExMUVCQjBFQUYzQjgxMTY1NTc3QSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCNjJDNjlBNUM5RDExMUVCQjBFQUYzQjgxMTY1NTc3QSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkI2MkM2OUEyQzlEMTExRUJCMEVBRjNCODExNjU1NzdBIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkI2MkM2OUEzQzlEMTExRUJCMEVBRjNCODExNjU1NzdBIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+bg/TiAAABVlJREFUeNrUmHtMW3UUx097S3vb8iizsJbCYLASGIz3BqMLbJqp84WaVKNu/xn/0H8kWYLPCIkaF2OyvxajZrqYuJll6rI/RNRpMhXcE8GNwu4IHfIcMB4dfbd+f+V2Y4SNwdrS3uTk3Nvzu7/f557f+Z3f+ZX8fj+FWj4iWhuOfplIKTxXeZj6DRtwSawBx5yHs/ZJJImxBKyHpMUSsBZiiAlghIJWqVTGxQww866K5ymWQkKvVqtjClirUioplkJCr1apwwYsC6OH0+YtRLaRbIJ83+D3T0VhDKuY1gFUBfkQ922bard/Cd2O54To8zCvJCXPx9kdjvbNdXVGU93TpPD5aMhiyRobGc5Am0vRBGywCJcJsPR4fb2xsLqaaMZGPx/6igB7FPbuqAkJTPdaqIq+4WHKr6mh+ATM/o0b1HLwIJ0/depr2F5ADHvvZwwJK4pDBMtB/Vm1Z09lflkZjZw5S81HDlNhZRV1tP71KWyvNoRgMGmIYFll9qOM4yorzGZKycyi/NLSwAkBsDOwfdYQIs/ct4cBux7qxDpDeoF+ey3xiYnkHL1GvusT1NnaSjVbq+mnk7/a0OZFQJ9YVWDAboX6Yfu2bakjgOzqCaynLqlUmi+ewf6rKClJX5+ZSUePH2ex+yagP14VYMDuhvr8iYcf4S/3XqFuQWjDcz2kVxUfP+J1u8npdLK6+CXIO9Vbtmjsdgdd6Oz4Qoxnd0SAASqBamIQ8J7kbHu7gPs3IN+xOIXdmKzV9ngcTmSzmSz8ZmUlp/jOK+XFJbJz/7SfxL0ZtomwLjoMzPbcb0qLit6FHgcs82gBBj42b1FpeGzNcXJWElPgmATbGOQ13BYDtjk7M/NBtvuxjwsbMDrXQf0OeeZCR8cn0EZA7Ie4FjRNUqAelsvlN4GDF9peguzqtVp34dEtQteGHBidssKFxegVSC4G3QuZvEPzJAXzcFzAw4vWDXi3mXkbwmbqMPp/OWTA6OxJqA/EmGOp6eoSr2iYh+8GLEJ7IAdwuxGSh3HehyzJI1sC9lG2MNHxU8uYtYCHXXHyuwLPA2cztRdjbYDeDc0Wr23ZwKw0hPqFeWKZ60LDw8OOJTy8CDjLNgLG1azIw+hgdoW5fS6G5csDXuDxiBbwSfcSw9F04tAwD8vvMYYjXsDvC2x8d8zDSYvYF4bAqnqY1Q46/lYeTomqkBBrhNdZNoFcV6vVg1KOywvGMMdxO/H7NOQPcZPIWZWQAKgC6j1WnRXl5PDZRiPp8vJIlZZGB5qaKACMLKHV6+lZszlhtKfH1CcIpnPd3Y1455hY1Q1EBFjMzy1F2dmmitxcUmo0xOl0JAMsl5JKztlZCi46l8dDSkAbEKc6nO82G43S84JgPm2xPIQ+WD1xOhIh8XZxTo7JVFBACky7BItLqlKRFEAejiOZTEZWQSCbzUZupzPwO7OzdqwyLcds7CgpWYN+voXIIwH8WG56+q0nQIIyIB6fjwz5G+nv1jb6t7+f9IAL2gLtxCsvI4NSNZossQAKeww7Xe55hwUvTj6YeiYqTTI939h4m807dm3O7r39dO/Fx+FyRMLD+y9areQUof0uF/kQt76ZGfIhDG6CQbPnwO+ws3bBq62ri8anp1tw2xl2DyPRH8HCKxQGBt7aWVYm2YDplUxNkVehmPsAh30uBOBVBusdHycf7D67nUYnJ+liXx9Z+vt/Q9PnIn0IrWFqTUJC1TpkiVRkiQcMBuKRNfj4eHLCuw6ATgwO0tjQEF0dHmbAglhbH2LftpKdLhT/SxSIKaqMrSe2HUOSIZPiptED6WCpEHImCLrSrfl/AQYA6wiPm/UMzL8AAAAASUVORK5CYII="},"2ab7":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const i=[];function n(e){i.push(e),1===i.length&&queueMicrotask(()=>{const e=i.slice();i.length=0;for(const t of e)t()})}},"2b60":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("2eab"),n=r("792b"),a=r("ce50"),s=r("b2b2"),o=r("f4cc"),c=r("e041");class l{constructor(e){this.streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return Object(c["w"])(e)?(Object(o["v"])(t),Object(c["i"])(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(Object(s["j"])(this.streamDataRequester))return(await Object(i["default"])(t,{responseType:u[e]})).data;const c=await Object(n["d"])(this.streamDataRequester.request(t,e,r));if(!0===c.ok)return c.value;throw Object(o["u"])(c.error),new a["a"]("","Request for resource failed: "+c.error)}}const u={image:"image",binary:"array-buffer",json:"json"}},"2b92":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("1233"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("d81c");let u=i=class extends a["a"]{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return Object(s["a"])(this.value,this.unit,"milliseconds")}clone(){return new i({value:this.value,unit:this.unit})}};Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),Object(n["a"])([Object(o["b"])({type:l["a"].apiValues,json:{type:l["a"].jsonValues,read:l["a"].read,write:l["a"].write},nonNullable:!0})],u.prototype,"unit",void 0),u=i=Object(n["a"])([Object(c["a"])("esri.TimeInterval")],u);const d=u},"2bc9":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o}));var i=r("0b2d");class n{constructor(e=Object(i["f"])()){this.intensity=e}}class a{constructor(e=Object(i["f"])(),t=Object(i["h"])(.57735,.57735,.57735)){this.intensity=e,this.direction=t}}class s{constructor(e=Object(i["f"])(),t=Object(i["h"])(.57735,.57735,.57735),r=!0,n=1,a=1){this.intensity=e,this.direction=t,this.castShadows=r,this.specularStrength=n,this.environmentStrength=a}}class o{constructor(){this.r=[0],this.g=[0],this.b=[0]}}},"2c4f":function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var i,n=r("a4ee"),a=r("556f"),s=r("ce6d"),o=r("7ffa"),c=r("b2b2"),l=r("ecd7"),u=r("fe80"),d=r("5815"),h=r("59b2"),p=r("cea0"),f=r("cbf3"),b=r("d386"),m=r("c0d3"),g=r("9b86");class y{constructor(){this._observers=[]}observe(e){return this._observers.includes(e)||this._observers.push(e),new g["a"](this._observers,e)}notify(){const e=this._observers.slice();for(let t=0;t<e.length;++t){const r=e[t];r.onInvalidated(),r.onCommitted()}}}class O{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}const v=new l["a"](O,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}),_=()=>{};function j(e){return e?e instanceof M?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function x(e,t,r,i){const n=Math.min(e.length-r,t.length-i);let a=0;for(;a<n&&e[r+a]===t[i+a];)a++;return a}function T(e,t,r,i){t&&t.forEach((t,n,a)=>{e.push(t),T(e,r.call(i,t,n,a),r,i)})}const S=new Set,E=new Set,A=new Set,C=new Map;let R=0,M=i=class extends s["a"].EventedAccessor{constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:R++})}static isCollection(e){return null!=e&&e instanceof i}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof i?{items:e}:e:{}}destroy(){this.removeAll()}*[Symbol.iterator](){yield*this.items}get items(){return Object(m["d"])(this._observable),this._items}set items(e){this._emitBeforeChanges(u["a"].ADD)||(this._splice(0,this.length,j(e)),this._emitAfterChanges(u["a"].ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=_,r.removed=!0,e.splice(e.indexOf(r),1)}}}return this._emitter.on(e,t)}once(e,t){const r=this.on(e,t);return{remove(){r.remove()}}}add(e,t){if(Object(m["d"])(this._observable),this._emitBeforeChanges(u["a"].ADD))return this;const r=this.getNextIndex(null!=t?t:null);return this._splice(r,0,[e]),this._emitAfterChanges(u["a"].ADD),this}addMany(e,t=this._items.length){if(Object(m["d"])(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(u["a"].ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,j(e)),this._emitAfterChanges(u["a"].ADD),this}at(e){if(Object(m["d"])(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(Object(m["d"])(this._observable),!this.length||this._emitBeforeChanges(u["a"].REMOVE))return[];const e=this._splice(0,this.length)||[];return this._emitAfterChanges(u["a"].REMOVE),e}clone(){return Object(m["d"])(this._observable),this._createNewInstance({items:this._items.map(o["a"])})}concat(...e){Object(m["d"])(this._observable);const t=e.map(j);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(Object(m["d"])(this._observable),!this.length||this._emitBeforeChanges(u["a"].REMOVE))return;const r=Object(c["c"])(this._splice(0,this.length)),i=r.length;for(let n=0;n<i;n++)e.call(t,r[n],n,r);this._emitAfterChanges(u["a"].REMOVE)}every(e,t){return Object(m["d"])(this._observable),this._items.every(e,t)}filter(e,t){let r;return Object(m["d"])(this._observable),r=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return Object(m["d"])(this._observable),this._items.find(e,t)}findIndex(e,t){return Object(m["d"])(this._observable),this._items.findIndex(e,t)}flatten(e,t){Object(m["d"])(this._observable);const r=[];return T(r,this,e,t),new i(r)}forEach(e,t){return Object(m["d"])(this._observable),this._items.forEach(e,t)}getItemAt(e){return Object(m["d"])(this._observable),this._items[e]}getNextIndex(e){Object(m["d"])(this._observable);const t=this.length;return(e=null==e?t:e)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return Object(m["d"])(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return Object(m["d"])(this._observable),this._items.indexOf(e,t)}join(e=","){return Object(m["d"])(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return Object(m["d"])(this._observable),this._items.lastIndexOf(e,t)}map(e,t){Object(m["d"])(this._observable);const r=this._items.map(e,t);return new i({items:r})}reorder(e,t=this.length-1){Object(m["d"])(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(u["a"].MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(u["a"].MOVE)}return e}}pop(){if(Object(m["d"])(this._observable),!this.length||this._emitBeforeChanges(u["a"].REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(u["a"].REMOVE),e}push(...e){return Object(m["d"])(this._observable),this._emitBeforeChanges(u["a"].ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(u["a"].ADD)),this.length}reduce(e,t){Object(m["d"])(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){Object(m["d"])(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return Object(m["d"])(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(Object(m["d"])(this._observable),e<0||e>=this.length||this._emitBeforeChanges(u["a"].REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(u["a"].REMOVE),t}removeMany(e){if(Object(m["d"])(this._observable),!e||!e.length||this._emitBeforeChanges(u["a"].REMOVE))return[];const t=e instanceof i?e.toArray():e,r=this._items,n=[],a=t.length;for(let i=0;i<a;i++){const e=t[i],a=r.indexOf(e);if(a>-1){const e=1+x(t,r,i+1,a+1),s=this._splice(a,e);s&&s.length>0&&n.push.apply(n,s),i+=e-1}}return this._emitAfterChanges(u["a"].REMOVE),n}reverse(){if(Object(m["d"])(this._observable),this._emitBeforeChanges(u["a"].MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(u["a"].MOVE),this}shift(){if(Object(m["d"])(this._observable),!this.length||this._emitBeforeChanges(u["a"].REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(u["a"].REMOVE),e}slice(e=0,t=this.length){return Object(m["d"])(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return Object(m["d"])(this._observable),this._items.some(e,t)}sort(e){if(Object(m["d"])(this._observable),!this.length||this._emitBeforeChanges(u["a"].MOVE))return this;const t=Object(c["c"])(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(u["a"].MOVE),this}splice(e,t,...r){Object(m["d"])(this._observable);const i=(t?u["a"].REMOVE:0)|(r.length?u["a"].ADD:0);if(this._emitBeforeChanges(i))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(i),n}toArray(){return Object(m["d"])(this._observable),this._items.slice()}toJSON(){return Object(m["d"])(this._observable),this.toArray()}toLocaleString(){return Object(m["d"])(this._observable),this._items.toLocaleString()}toString(){return Object(m["d"])(this._observable),this._items.toString()}unshift(...e){return Object(m["d"])(this._observable),!e.length||this._emitBeforeChanges(u["a"].ADD)||(this._splice(0,0,e),this._emitAfterChanges(u["a"].ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,n=this.itemType;let a,s;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=Object(d["b"])(()=>this._dispatchChange())),t){if(s=i.splice(e,t),this.hasEventListener("before-remove")){const t=v.acquire();t.target=this,t.cancellable=!0;for(let r=0,n=s.length;r<n;r++)a=s[r],t.reset(a),this.emit("before-remove",t),t.defaultPrevented&&(s.splice(r,1),i.splice(e,0,a),e+=1,r-=1,n-=1);v.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=v.acquire();e.target=this,e.cancellable=!1;const t=s.length;for(let r=0;r<t;r++)e.reset(s[r]),this.emit("after-remove",e);v.release(e)}}if(r&&r.length){if(n){const e=[];for(const t of r){const r=n.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),a=this.hasEventListener("after-add"),s=e===this.length;if(t||a){const n=v.acquire();n.target=this,n.cancellable=!0;const o=v.acquire();o.target=this,o.cancellable=!1;for(const c of r)t?(n.reset(c),this.emit("before-add",n),n.defaultPrevented||(s?i.push(c):i.splice(e++,0,c),this._set("length",i.length),a&&(o.reset(c),this.emit("after-add",o)))):(s?i.push(c):i.splice(e++,0,c),this._set("length",i.length),o.reset(c),this.emit("after-add",o));v.release(o),v.release(n)}else{if(s)for(const e of r)i.push(e);else i.splice(e,0,...r);this._set("length",i.length)}}return(r&&r.length||s&&s.length)&&this._notifyChangeEvent(r,s),s}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=v.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,v.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=v.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),v.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;S.clear(),E.clear(),A.clear();for(const{added:t,removed:a}of e){if(t)if(0===A.size&&0===E.size)for(const e of t)S.add(e);else for(const e of t)E.has(e)?(A.add(e),E.delete(e)):A.has(e)||S.add(e);if(a)if(0===A.size&&0===S.size)for(const e of a)E.add(e);else for(const e of a)S.has(e)?S.delete(e):(A.delete(e),E.add(e))}const r=a["a"].acquire();S.forEach(e=>{r.push(e)});const i=a["a"].acquire();E.forEach(e=>{i.push(e)});const n=this._items,s=t.items,o=a["a"].acquire();if(A.forEach(e=>{s.indexOf(e)!==n.indexOf(e)&&o.push(e)}),t.listeners&&(r.length||i.length||o.length)){const e={target:this,added:r,removed:i,moved:o},n=t.listeners.length;for(let r=0;r<n;r++){const i=t.listeners[r];i.removed||i.callback.call(this,e)}}a["a"].release(r),a["a"].release(i),a["a"].release(o)}S.clear(),E.clear(),A.clear()}};M.ofType=e=>{if(!e)return i;if(C.has(e))return C.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const r=e.typeMap[i].prototype.declaredClass;t?t+=" | "+r:t=r}let r=class extends i{};return Object(n["a"])([Object(f["a"])({Type:e,ensureType:"function"==typeof e?Object(p["m"])(e):Object(p["k"])(e)})],r.prototype,"itemType",void 0),r=Object(n["a"])([Object(b["a"])(`esri.core.Collection<${t}>`)],r),C.set(e,r),r},Object(n["a"])([Object(h["b"])()],M.prototype,"length",void 0),Object(n["a"])([Object(h["b"])()],M.prototype,"items",null),M=i=Object(n["a"])([Object(b["a"])("esri.core.Collection")],M);const P=M},"2c63":function(e,t,r){"use strict";function i(){const e=new Float32Array(6);return e[0]=1,e[3]=1,e}function n(e){const t=new Float32Array(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function a(e,t,r,i,n,a){const s=new Float32Array(6);return s[0]=e,s[1]=t,s[2]=r,s[3]=i,s[4]=n,s[5]=a,s}function s(e,t){return new Float32Array(e,t,6)}function o(e,t,r,i){const n=t[i],a=t[i+1];e[i]=r[0]*n+r[2]*a+r[4],e[i+1]=r[1]*n+r[3]*a+r[5]}function c(e,t,r,i=0,n=0,a=2){const s=n||t.length/a;for(let c=i;c<s;c++)o(e,t,r,c*a)}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c}));Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,transform:o,transformMany:c})},"2c81":function(e,t,r){"use strict";let i;r.d(t,"a",(function(){return n}));const n={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,22391:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2};for(i=2e3;i<=2045;i++)n[i]=0;for(i=2056;i<=2065;i++)n[i]=0;for(i=2067;i<=2135;i++)n[i]=0;for(i=2137;i<=2154;i++)n[i]=0;for(i=2161;i<=2170;i++)n[i]=0;for(i=2172;i<=2193;i++)n[i]=0;for(i=2195;i<=2198;i++)n[i]=0;for(i=2200;i<=2203;i++)n[i]=0;for(i=2205;i<=2217;i++)n[i]=0;for(i=2222;i<=2224;i++)n[i]=1;for(i=2225;i<=2250;i++)n[i]=2;for(i=2251;i<=2253;i++)n[i]=1;for(i=2257;i<=2264;i++)n[i]=2;for(i=2274;i<=2279;i++)n[i]=2;for(i=2280;i<=2282;i++)n[i]=1;for(i=2283;i<=2289;i++)n[i]=2;for(i=2290;i<=2292;i++)n[i]=0;for(i=2308;i<=2313;i++)n[i]=0;for(i=2315;i<=2491;i++)n[i]=0;for(i=2494;i<=2866;i++)n[i]=0;for(i=2867;i<=2869;i++)n[i]=1;for(i=2870;i<=2888;i++)n[i]=2;for(i=2891;i<=2895;i++)n[i]=2;for(i=2896;i<=2898;i++)n[i]=1;for(i=2902;i<=2908;i++)n[i]=2;for(i=2915;i<=2920;i++)n[i]=2;for(i=2921;i<=2923;i++)n[i]=1;for(i=2924;i<=2930;i++)n[i]=2;for(i=2931;i<=2962;i++)n[i]=0;for(i=2964;i<=2968;i++)n[i]=2;for(i=2969;i<=2973;i++)n[i]=0;for(i=2975;i<=2991;i++)n[i]=0;for(i=2995;i<=3051;i++)n[i]=0;for(i=3054;i<=3079;i++)n[i]=0;for(i=3081;i<=3088;i++)n[i]=0;for(i=3092;i<=3101;i++)n[i]=0;for(i=3106;i<=3138;i++)n[i]=0;for(i=3146;i<=3151;i++)n[i]=0;for(i=3153;i<=3166;i++)n[i]=0;for(i=3168;i<=3172;i++)n[i]=0;for(i=3174;i<=3203;i++)n[i]=0;for(i=3294;i<=3358;i++)n[i]=0;for(i=3367;i<=3403;i++)n[i]=0;for(i=3408;i<=3416;i++)n[i]=0;for(i=3417;i<=3438;i++)n[i]=2;for(i=3441;i<=3446;i++)n[i]=2;for(i=3447;i<=3450;i++)n[i]=0;for(i=3451;i<=3459;i++)n[i]=2;for(i=3460;i<=3478;i++)n[i]=0;for(i=3554;i<=3559;i++)n[i]=0;for(i=3560;i<=3570;i++)n[i]=2;for(i=3571;i<=3581;i++)n[i]=0;for(i=3594;i<=3597;i++)n[i]=0;for(i=3601;i<=3604;i++)n[i]=0;for(i=3637;i<=3639;i++)n[i]=0;for(i=3665;i<=3667;i++)n[i]=0;for(i=3693;i<=3695;i++)n[i]=0;for(i=3701;i<=3727;i++)n[i]=0;for(i=3728;i<=3739;i++)n[i]=2;for(i=3740;i<=3751;i++)n[i]=0;for(i=3753;i<=3760;i++)n[i]=2;for(i=3761;i<=3773;i++)n[i]=0;for(i=3775;i<=3777;i++)n[i]=0;for(i=3779;i<=3781;i++)n[i]=0;for(i=3783;i<=3785;i++)n[i]=0;for(i=3788;i<=3791;i++)n[i]=0;for(i=3797;i<=3802;i++)n[i]=0;for(i=3814;i<=3816;i++)n[i]=0;for(i=3825;i<=3829;i++)n[i]=0;for(i=3832;i<=3841;i++)n[i]=0;for(i=3844;i<=3852;i++)n[i]=0;for(i=3873;i<=3885;i++)n[i]=0;for(i=3890;i<=3893;i++)n[i]=0;for(i=3907;i<=3912;i++)n[i]=0;for(i=3942;i<=3950;i++)n[i]=0;for(i=3968;i<=3970;i++)n[i]=0;for(i=3973;i<=3976;i++)n[i]=0;for(i=3986;i<=3989;i++)n[i]=0;for(i=3994;i<=3997;i++)n[i]=0;for(i=4048;i<=4051;i++)n[i]=0;for(i=4056;i<=4063;i++)n[i]=0;for(i=4093;i<=4096;i++)n[i]=0;for(i=4390;i<=4398;i++)n[i]=0;for(i=4399;i<=4413;i++)n[i]=2;for(i=4418;i<=4433;i++)n[i]=2;for(i=4455;i<=4457;i++)n[i]=2;for(i=4484;i<=4489;i++)n[i]=0;for(i=4491;i<=4554;i++)n[i]=0;for(i=4568;i<=4589;i++)n[i]=0;for(i=4652;i<=4656;i++)n[i]=0;for(i=4766;i<=4800;i++)n[i]=0;for(i=5014;i<=5016;i++)n[i]=0;for(i=5069;i<=5072;i++)n[i]=0;for(i=5105;i<=5130;i++)n[i]=0;for(i=5173;i<=5188;i++)n[i]=0;for(i=5253;i<=5259;i++)n[i]=0;for(i=5269;i<=5275;i++)n[i]=0;for(i=5292;i<=5311;i++)n[i]=0;for(i=5329;i<=5331;i++)n[i]=0;for(i=5343;i<=5349;i++)n[i]=0;for(i=5355;i<=5357;i++)n[i]=0;for(i=5387;i<=5389;i++)n[i]=0;for(i=5459;i<=5463;i++)n[i]=0;for(i=5479;i<=5482;i++)n[i]=0;for(i=5518;i<=5520;i++)n[i]=0;for(i=5530;i<=5539;i++)n[i]=0;for(i=5550;i<=5552;i++)n[i]=0;for(i=5562;i<=5583;i++)n[i]=0;for(i=5623;i<=5625;i++)n[i]=2;for(i=5631;i<=5639;i++)n[i]=0;for(i=5649;i<=5653;i++)n[i]=0;for(i=5663;i<=5680;i++)n[i]=0;for(i=5682;i<=5685;i++)n[i]=0;for(i=5875;i<=5877;i++)n[i]=0;for(i=5896;i<=5899;i++)n[i]=0;for(i=5921;i<=5940;i++)n[i]=0;for(i=6050;i<=6125;i++)n[i]=0;for(i=6244;i<=6275;i++)n[i]=0;for(i=6328;i<=6348;i++)n[i]=0;for(i=6350;i<=6356;i++)n[i]=0;for(i=6366;i<=6372;i++)n[i]=0;for(i=6381;i<=6387;i++)n[i]=0;for(i=6393;i<=6404;i++)n[i]=0;for(i=6480;i<=6483;i++)n[i]=0;for(i=6511;i<=6514;i++)n[i]=0;for(i=6579;i<=6581;i++)n[i]=0;for(i=6619;i<=6624;i++)n[i]=0;for(i=6625;i<=6627;i++)n[i]=2;for(i=6628;i<=6632;i++)n[i]=0;for(i=6634;i<=6637;i++)n[i]=0;for(i=6669;i<=6692;i++)n[i]=0;for(i=6707;i<=6709;i++)n[i]=0;for(i=6720;i<=6723;i++)n[i]=0;for(i=6732;i<=6738;i++)n[i]=0;for(i=6931;i<=6933;i++)n[i]=0;for(i=6956;i<=6959;i++)n[i]=0;for(i=7005;i<=7007;i++)n[i]=0;for(i=7057;i<=7070;i++)n[i]=2;for(i=7074;i<=7082;i++)n[i]=0;for(i=7109;i<=7118;i++)n[i]=0;for(i=7119;i<=7127;i++)n[i]=1;for(i=7374;i<=7376;i++)n[i]=0;for(i=7528;i<=7586;i++)n[i]=0;for(i=7587;i<=7645;i++)n[i]=2;for(i=7692;i<=7696;i++)n[i]=0;for(i=7755;i<=7787;i++)n[i]=0;for(i=7791;i<=7795;i++)n[i]=0;for(i=7799;i<=7801;i++)n[i]=0;for(i=7803;i<=7805;i++)n[i]=0;for(i=7825;i<=7831;i++)n[i]=0;for(i=7845;i<=7859;i++)n[i]=0;for(i=8013;i<=8032;i++)n[i]=0;for(i=8065;i<=8068;i++)n[i]=1;for(i=8518;i<=8529;i++)n[i]=2;for(i=8533;i<=8536;i++)n[i]=2;for(i=8538;i<=8540;i++)n[i]=2;for(i=8677;i<=8679;i++)n[i]=0;for(i=8836;i<=8840;i++)n[i]=0;for(i=8857;i<=8859;i++)n[i]=0;for(i=8908;i<=8910;i++)n[i]=0;for(i=9154;i<=9159;i++)n[i]=0;for(i=9205;i<=9218;i++)n[i]=0;for(i=9271;i<=9273;i++)n[i]=0;for(i=9295;i<=9297;i++)n[i]=0;for(i=9356;i<=9360;i++)n[i]=0;for(i=9404;i<=9407;i++)n[i]=0;for(i=9476;i<=9482;i++)n[i]=0;for(i=9487;i<=9494;i++)n[i]=0;for(i=9697;i<=9699;i++)n[i]=0;for(i=20002;i<=20032;i++)n[i]=0;for(i=20062;i<=20092;i++)n[i]=0;for(i=20135;i<=20138;i++)n[i]=0;for(i=20248;i<=20258;i++)n[i]=0;for(i=20348;i<=20358;i++)n[i]=0;for(i=20436;i<=20440;i++)n[i]=0;for(i=20822;i<=20824;i++)n[i]=0;for(i=20904;i<=20932;i++)n[i]=0;for(i=20934;i<=20936;i++)n[i]=0;for(i=21004;i<=21032;i++)n[i]=0;for(i=21035;i<=21037;i++)n[i]=0;for(i=21095;i<=21097;i++)n[i]=0;for(i=21148;i<=21150;i++)n[i]=0;for(i=21207;i<=21264;i++)n[i]=0;for(i=21307;i<=21364;i++)n[i]=0;for(i=21413;i<=21423;i++)n[i]=0;for(i=21453;i<=21463;i++)n[i]=0;for(i=21473;i<=21483;i++)n[i]=0;for(i=21780;i<=21782;i++)n[i]=0;for(i=21891;i<=21894;i++)n[i]=0;for(i=21896;i<=21899;i++)n[i]=0;for(i=22171;i<=22177;i++)n[i]=0;for(i=22181;i<=22187;i++)n[i]=0;for(i=22191;i<=22197;i++)n[i]=0;for(i=22234;i<=22236;i++)n[i]=0;for(i=22521;i<=22525;i++)n[i]=0;for(i=22991;i<=22994;i++)n[i]=0;for(i=23028;i<=23038;i++)n[i]=0;for(i=23830;i<=23853;i++)n[i]=0;for(i=23866;i<=23872;i++)n[i]=0;for(i=23877;i<=23884;i++)n[i]=0;for(i=23886;i<=23894;i++)n[i]=0;for(i=23946;i<=23948;i++)n[i]=0;for(i=24311;i<=24313;i++)n[i]=0;for(i=24342;i<=24347;i++)n[i]=0;for(i=24370;i<=24374;i++)n[i]=10;for(i=24375;i<=24381;i++)n[i]=0;for(i=24718;i<=24721;i++)n[i]=0;for(i=24817;i<=24821;i++)n[i]=0;for(i=24877;i<=24882;i++)n[i]=0;for(i=24891;i<=24893;i++)n[i]=0;for(i=25391;i<=25395;i++)n[i]=0;for(i=25828;i<=25838;i++)n[i]=0;for(i=26191;i<=26195;i++)n[i]=0;for(i=26391;i<=26393;i++)n[i]=0;for(i=26701;i<=26722;i++)n[i]=0;for(i=26729;i<=26799;i++)n[i]=2;for(i=26801;i<=26803;i++)n[i]=2;for(i=26811;i<=26813;i++)n[i]=2;for(i=26847;i<=26870;i++)n[i]=2;for(i=26891;i<=26899;i++)n[i]=0;for(i=26901;i<=26923;i++)n[i]=0;for(i=26929;i<=26946;i++)n[i]=0;for(i=26948;i<=26998;i++)n[i]=0;for(i=27037;i<=27040;i++)n[i]=0;for(i=27205;i<=27232;i++)n[i]=0;for(i=27258;i<=27260;i++)n[i]=0;for(i=27391;i<=27398;i++)n[i]=0;for(i=27561;i<=27564;i++)n[i]=0;for(i=27571;i<=27574;i++)n[i]=0;for(i=27581;i<=27584;i++)n[i]=0;for(i=27591;i<=27594;i++)n[i]=0;for(i=28191;i<=28193;i++)n[i]=0;for(i=28348;i<=28358;i++)n[i]=0;for(i=28402;i<=28432;i++)n[i]=0;for(i=28462;i<=28492;i++)n[i]=0;for(i=29118;i<=29122;i++)n[i]=0;for(i=29168;i<=29172;i++)n[i]=0;for(i=29177;i<=29185;i++)n[i]=0;for(i=29187;i<=29195;i++)n[i]=0;for(i=29900;i<=29903;i++)n[i]=0;for(i=30161;i<=30179;i++)n[i]=0;for(i=30491;i<=30494;i++)n[i]=0;for(i=30729;i<=30732;i++)n[i]=0;for(i=31251;i<=31259;i++)n[i]=0;for(i=31265;i<=31268;i++)n[i]=0;for(i=31275;i<=31279;i++)n[i]=0;for(i=31281;i<=31297;i++)n[i]=0;for(i=31461;i<=31469;i++)n[i]=0;for(i=31491;i<=31495;i++)n[i]=0;for(i=31917;i<=31922;i++)n[i]=0;for(i=31965;i<=32e3;i++)n[i]=0;for(i=32001;i<=32003;i++)n[i]=2;for(i=32005;i<=32031;i++)n[i]=2;for(i=32033;i<=32060;i++)n[i]=2;for(i=32064;i<=32067;i++)n[i]=2;for(i=32074;i<=32077;i++)n[i]=2;for(i=32081;i<=32086;i++)n[i]=0;for(i=32107;i<=32130;i++)n[i]=0;for(i=32133;i<=32158;i++)n[i]=0;for(i=32164;i<=32167;i++)n[i]=2;for(i=32180;i<=32199;i++)n[i]=0;for(i=32201;i<=32260;i++)n[i]=0;for(i=32301;i<=32360;i++)n[i]=0;for(i=32601;i<=32662;i++)n[i]=0;for(i=32664;i<=32667;i++)n[i]=2;for(i=32701;i<=32761;i++)n[i]=0;for(i=53001;i<=53004;i++)n[i]=0;for(i=53008;i<=53019;i++)n[i]=0;for(i=53021;i<=53032;i++)n[i]=0;for(i=53034;i<=53037;i++)n[i]=0;for(i=53042;i<=53046;i++)n[i]=0;for(i=53074;i<=53080;i++)n[i]=0;for(i=54001;i<=54004;i++)n[i]=0;for(i=54008;i<=54019;i++)n[i]=0;for(i=54021;i<=54032;i++)n[i]=0;for(i=54034;i<=54037;i++)n[i]=0;for(i=54042;i<=54046;i++)n[i]=0;for(i=54048;i<=54053;i++)n[i]=0;for(i=54074;i<=54080;i++)n[i]=0;for(i=54098;i<=54101;i++)n[i]=0;for(i=102001;i<=102040;i++)n[i]=0;for(i=102042;i<=102063;i++)n[i]=0;for(i=102065;i<=102067;i++)n[i]=0;for(i=102070;i<=102117;i++)n[i]=0;for(i=102122;i<=102216;i++)n[i]=0;for(i=102221;i<=102377;i++)n[i]=0;for(i=102382;i<=102388;i++)n[i]=0;for(i=102389;i<=102398;i++)n[i]=2;for(i=102399;i<=102444;i++)n[i]=0;for(i=102445;i<=102447;i++)n[i]=2;for(i=102448;i<=102458;i++)n[i]=0;for(i=102459;i<=102468;i++)n[i]=2;for(i=102469;i<=102499;i++)n[i]=0;for(i=102500;i<=102519;i++)n[i]=1;for(i=102520;i<=102524;i++)n[i]=0;for(i=102525;i<=102529;i++)n[i]=2;for(i=102530;i<=102588;i++)n[i]=0;for(i=102590;i<=102598;i++)n[i]=0;for(i=102601;i<=102603;i++)n[i]=0;for(i=102605;i<=102628;i++)n[i]=0;for(i=102629;i<=102646;i++)n[i]=2;for(i=102648;i<=102700;i++)n[i]=2;for(i=102701;i<=102703;i++)n[i]=0;for(i=102707;i<=102730;i++)n[i]=2;for(i=102733;i<=102758;i++)n[i]=2;for(i=102767;i<=102900;i++)n[i]=0;for(i=102901;i<=102933;i++)n[i]=2;for(i=102934;i<=102950;i++)n[i]=13;for(i=102951;i<=102960;i++)n[i]=0;for(i=102965;i<=102969;i++)n[i]=0;for(i=102971;i<=102973;i++)n[i]=0;for(i=102975;i<=102989;i++)n[i]=0;for(i=102990;i<=102992;i++)n[i]=1;for(i=102997;i<=103002;i++)n[i]=0;for(i=103003;i<=103008;i++)n[i]=2;for(i=103009;i<=103011;i++)n[i]=0;for(i=103012;i<=103014;i++)n[i]=2;for(i=103019;i<=103021;i++)n[i]=0;for(i=103022;i<=103024;i++)n[i]=2;for(i=103029;i<=103031;i++)n[i]=0;for(i=103032;i<=103034;i++)n[i]=2;for(i=103065;i<=103068;i++)n[i]=0;for(i=103074;i<=103076;i++)n[i]=0;for(i=103077;i<=103079;i++)n[i]=1;for(i=103080;i<=103082;i++)n[i]=0;for(i=103083;i<=103085;i++)n[i]=2;for(i=103090;i<=103093;i++)n[i]=0;for(i=103097;i<=103099;i++)n[i]=0;for(i=103100;i<=103102;i++)n[i]=2;for(i=103107;i<=103109;i++)n[i]=0;for(i=103110;i<=103112;i++)n[i]=2;for(i=103113;i<=103116;i++)n[i]=0;for(i=103117;i<=103120;i++)n[i]=2;for(i=103153;i<=103157;i++)n[i]=0;for(i=103158;i<=103162;i++)n[i]=2;for(i=103163;i<=103165;i++)n[i]=0;for(i=103166;i<=103168;i++)n[i]=1;for(i=103169;i<=103171;i++)n[i]=2;for(i=103186;i<=103188;i++)n[i]=0;for(i=103189;i<=103191;i++)n[i]=2;for(i=103192;i<=103195;i++)n[i]=0;for(i=103196;i<=103199;i++)n[i]=2;for(i=103200;i<=103224;i++)n[i]=0;for(i=103225;i<=103227;i++)n[i]=1;for(i=103232;i<=103237;i++)n[i]=0;for(i=103238;i<=103243;i++)n[i]=2;for(i=103244;i<=103246;i++)n[i]=0;for(i=103247;i<=103249;i++)n[i]=2;for(i=103254;i<=103256;i++)n[i]=0;for(i=103257;i<=103259;i++)n[i]=2;for(i=103264;i<=103266;i++)n[i]=0;for(i=103267;i<=103269;i++)n[i]=2;for(i=103300;i<=103375;i++)n[i]=0;for(i=103381;i<=103383;i++)n[i]=0;for(i=103384;i<=103386;i++)n[i]=1;for(i=103387;i<=103389;i++)n[i]=0;for(i=103390;i<=103392;i++)n[i]=2;for(i=103397;i<=103399;i++)n[i]=0;for(i=103400;i<=103471;i++)n[i]=2;for(i=103476;i<=103478;i++)n[i]=0;for(i=103479;i<=103481;i++)n[i]=2;for(i=103486;i<=103488;i++)n[i]=0;for(i=103489;i<=103491;i++)n[i]=2;for(i=103492;i<=103495;i++)n[i]=0;for(i=103496;i<=103499;i++)n[i]=2;for(i=103528;i<=103543;i++)n[i]=0;for(i=103544;i<=103548;i++)n[i]=2;for(i=103549;i<=103551;i++)n[i]=0;for(i=103552;i<=103554;i++)n[i]=1;for(i=103555;i<=103557;i++)n[i]=2;for(i=103558;i<=103560;i++)n[i]=0;for(i=103571;i<=103573;i++)n[i]=0;for(i=103574;i<=103576;i++)n[i]=2;for(i=103577;i<=103580;i++)n[i]=0;for(i=103581;i<=103583;i++)n[i]=2;for(i=103595;i<=103694;i++)n[i]=0;for(i=103696;i<=103699;i++)n[i]=0;for(i=103700;i<=103793;i++)n[i]=2;for(i=103794;i<=103872;i++)n[i]=0;for(i=103900;i<=103971;i++)n[i]=2},"2db0":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("2eab");async function n(e,t){const{data:r}=await Object(i["default"])(e,{responseType:"image",...t});return r}},"2dd4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("ce50"),n=r("c120"),a=r("e92d"),s=r("9d9d");function o(e,t,r){if(e&&t)if("object"==typeof t)for(const i of Object.getOwnPropertyNames(t))o(e,i,t[i]);else{if(-1!==t.indexOf(".")){const i=t.split("."),n=i.splice(i.length-1,1)[0];return void o(Object(s["b"])(e,i),n,r)}const i=e.__accessor__;null!=i&&c(t,i),e[t]=r}}function c(e,t){if(Object(n["a"])("esri-unknown-property-errors")&&!l(e,t))throw new i["a"]("set:unknown-property",u(e,t))}function l(e,t){return null!=t.metadatas[e]}function u(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}a["a"].getLogger("esri.core.accessorSupport.set")},"2df1":function(e,t,r){"use strict";r.d(t,"a",(function(){return ee}));var i=r("38a4"),n=r("b2b2"),a=r("a915"),s=r("1c92"),o=r("dae5"),c=r("d791"),l=r("afe1"),u=r("3349"),d=r("02f1"),h=r("e431"),p=r("0b2d");function f(e){return e instanceof Float32Array&&e.length>=16}function b(e){return Array.isArray(e)&&e.length>=16}function m(e){return f(e)||b(e)}var g=r("9180"),y=r("fc00"),O=r("a05b"),v=r("d0cb"),_=r("1038"),j=r("68af"),w=r("35b3"),x=r("badc"),T=r("da1c"),S=r("1153"),E=r("b7bd"),A=r("5957"),C=r("7c51"),R=r("b623"),M=r("0d96"),P=r("a4ee"),I=r("d272"),D=r("17b0"),L=r("6a07"),N=r("9617"),F=r("c6d7"),k=r("be24"),U=r("2f98"),z=r("8e97"),B=r("c3a4"),V=r("ca98"),G=r("da35"),H=r("b7c2"),q=r("fa1e"),W=r("7438"),$=r("c829"),Z=r("d17d"),X=r("189c");class Y extends V["a"]{initializeProgram(e){const t=Y.shader.get(),r=this.configuration,i=t.build({output:r.output,frontFacePass:r.transparencyPassType===H["l"].FrontFace,viewingMode:e.viewingMode,occlusionTestEnabled:r.occlusionTestEnabled,signedDistanceFieldEnabled:r.sdf,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,debugDrawLabelBorder:r.debugDrawLabelBorder,binaryHighlightOcclusionEnabled:r.binaryHighlightOcclusion,screenCenterOffsetUnitsEnabled:r.screenCenterOffsetUnitsEnabled,screenSizePerspectiveEnabled:r.screenSizePerspective,verticalOffsetEnabled:r.verticalOffset,pixelSnappingEnabled:r.pixelSnappingEnabled,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!1,isDraped:r.isDraped,multipassGeometryEnabled:r.multipassGeometryEnabled,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new $["a"](e.rctx,i,q["a"])}bindPass(e,t){Object(z["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform1f("cameraGroundRelative",t.camera.aboveGround?1:-1),this.program.setUniform1f("perDistancePixelRatio",Math.tan(t.camera.fovY/2)/(t.camera.fullViewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",t.camera.viewInverseTransposeMatrix),this.program.setUniform1f("polygonOffset",e.shaderPolygonOffset),Object(D["b"])(this.program,e,t),Object(U["b"])(this.program,e),this.program.setUniform1f("pixelRatio",t.camera.pixelRatio||1),Object(z["e"])(this.program,t),this.configuration.output===O["a"].Occlusion?(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(N["a"])(this.program,t),Object(F["a"])(this.program,t)):(Object(v["c"])(this.program,t),Object(M["c"])(this.program,e,t.camera.pixelRatio||1),Object(k["b"])(this.program,e),this.configuration.occlusionTestEnabled&&this.program.bindTexture(t.hudVisibilityTexture,"hudVisibilityTexture")),this.configuration.output===O["a"].Highlight&&Object(L["b"])(this.program,t)}bindDraw(e){Object(z["c"])(this.program,e),Object(z["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(I["c"])(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e){const t=this.configuration,r=e===H["l"].NONE,i=e===H["l"].FrontFace,n=Z["h"].LEQUAL,a=this.configuration.polygonOffsetEnabled&&J,s=(r||i)&&t.output!==O["a"].Highlight?(t.depthEnabled||t.output===O["a"].Occlusion)&&X["e"]:null;return Object(X["g"])({blending:t.output===O["a"].Color||t.output===O["a"].Alpha||t.output===O["a"].Highlight?r?Q:Object(W["f"])(e):null,depthTest:{func:n},depthWrite:s,colorWrite:X["d"],polygonOffset:a})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}get primitiveType(){return this.configuration.output===O["a"].Occlusion?Z["r"].POINTS:Z["r"].TRIANGLES}}Y.shader=new B["a"](M["a"],()=>r.e("chunk-2d0db7d8").then(r.bind(null,"6fa3")));const J={factor:0,units:-4},Q=Object(X["i"])(Z["b"].ONE,Z["b"].ONE_MINUS_SRC_ALPHA);class K extends G["a"]{constructor(){super(...arguments),this.output=O["a"].Color,this.occlusionTestEnabled=!0,this.sdf=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.screenSizePerspective=!1,this.screenCenterOffsetUnitsEnabled=v["b"].World,this.debugDrawLabelBorder=!1,this.binaryHighlightOcclusion=!0,this.slicePlaneEnabled=!1,this.polygonOffsetEnabled=!1,this.depthEnabled=!0,this.transparencyPassType=H["l"].NONE,this.pixelSnappingEnabled=!0,this.isDraped=!1,this.multipassGeometryEnabled=!1,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(P["a"])([Object(G["b"])({count:O["a"].COUNT})],K.prototype,"output",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"occlusionTestEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"sdf",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"vvSize",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"vvColor",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"verticalOffset",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"screenSizePerspective",void 0),Object(P["a"])([Object(G["b"])({count:v["b"].COUNT})],K.prototype,"screenCenterOffsetUnitsEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"debugDrawLabelBorder",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"binaryHighlightOcclusion",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"slicePlaneEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"polygonOffsetEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"depthEnabled",void 0),Object(P["a"])([Object(G["b"])({count:H["l"].COUNT})],K.prototype,"transparencyPassType",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"pixelSnappingEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"isDraped",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"multipassGeometryEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"multipassTerrainEnabled",void 0),Object(P["a"])([Object(G["b"])()],K.prototype,"cullAboveGround",void 0);class ee extends w["b"]{constructor(e){super(e,we),this.techniqueConfig=new K}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.verticalOffset=!!this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=!!this.parameters.screenSizePerspective,this.techniqueConfig.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits?v["b"].Screen:v["b"].World,this.techniqueConfig.polygonOffsetEnabled=this.parameters.polygonOffset,this.techniqueConfig.isDraped=this.parameters.isDraped,this.techniqueConfig.occlusionTestEnabled=this.parameters.occlusionTest,this.techniqueConfig.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this.techniqueConfig.sdf=this.parameters.textureIsSignedDistanceField,this.techniqueConfig.vvSize=!!this.parameters.vvSizeEnabled,this.techniqueConfig.vvColor=!!this.parameters.vvColorEnabled,e===O["a"].Color&&(this.techniqueConfig.debugDrawLabelBorder=!!this.parameters.debugDrawLabelBorder),e===O["a"].Highlight&&(this.techniqueConfig.binaryHighlightOcclusion=this.parameters.binaryHighlightOcclusion),this.techniqueConfig.depthEnabled=this.parameters.depthEnabled,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassGeometryEnabled=t.multipassGeometryEnabled,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}intersect(e,t,r,i,a,s,o,c,l){Object(n["k"])(l)?this._intersectDrapedHudGeometry(e,s,o,c,l):this._intersectHudGeometry(e,t,r,i,o,c)}_intersectDrapedHudGeometry(e,t,r,i,a){const s=e.vertexAttributes.get(E["a"].POSITION),o=e.vertexAttributes.get(E["a"].SIZE),c=this.parameters,l=Object(M["d"])(c);let u=1,d=1;if(Object(n["k"])(i)){const e=i(ye);u=e[0],d=e[5]}u*=e.screenToWorldRatio,d*=e.screenToWorldRatio;const h=ve*e.screenToWorldRatio;for(let n=0;n<s.data.length/s.size;n++){const i=n*s.size,p=s.data[i],f=s.data[i+1],b=n*o.size;let m;_e[0]=o.data[b]*u,_e[1]=o.data[b+1]*d,c.textureIsSignedDistanceField&&(m=c.outlineSize*e.screenToWorldRatio/2),ae(t,p,f,_e,h,m,c,l)&&r(a.dist,a.normal,-1,!0)}}_intersectHudGeometry(e,t,r,i,a,o){if(!i.options.selectionMode||!i.options.hud||Object(R["d"])(t))return;const l=this.parameters;let u=1,d=1;if(Object(s["f"])(pe,r),Object(n["k"])(o)){const e=o(ye);u=e[0],d=e[5],ne(pe)}const f=e.vertexAttributes.get(E["a"].POSITION),b=e.vertexAttributes.get(E["a"].SIZE),m=e.vertexAttributes.get(E["a"].NORMAL),g=e.vertexAttributes.get(E["a"].AUXPOS1);Object(S["a"])(f.size>=3);const y=i.point,O=i.camera,v=Object(M["d"])(l);u*=O.pixelRatio,d*=O.pixelRatio;const _="screen"===this.parameters.centerOffsetUnits;for(let n=0;n<f.data.length/f.size;n++){const e=n*f.size;Object(h["y"])(ce,f.data[e],f.data[e+1],f.data[e+2]),Object(h["s"])(ce,ce,r);const t=n*b.size;_e[0]=b.data[t]*u,_e[1]=b.data[t+1]*d,Object(h["s"])(ce,ce,O.viewMatrix);const s=n*g.size;if(Object(h["y"])(me,g.data[s+0],g.data[s+1],g.data[s+2]),!_&&(ce[0]+=me[0],ce[1]+=me[1],0!==me[2])){const e=me[2];Object(h["t"])(me,ce),Object(h["l"])(ce,ce,Object(h["g"])(me,me,e))}const o=n*m.size;if(Object(h["y"])(le,m.data[o],m.data[o+1],m.data[o+2]),this._normalAndViewAngle(le,pe,O,ge),this._applyVerticalOffsetTransformationView(ce,ge,O,se),O.applyProjection(ce,ue),ue[0]>-1){let e=Math.floor(ue[0])+this.parameters.screenOffset[0],t=Math.floor(ue[1])+this.parameters.screenOffset[1];_&&(e+=me[0],0!==me[1]&&(t+=Object(T["b"])(me[1],se.factorAlignment))),Object(T["a"])(_e,se.factor,_e);const r=Oe*O.pixelRatio;let n;if(l.textureIsSignedDistanceField&&(n=l.outlineSize*O.pixelRatio/2),ae(y,e,t,_e,r,n,l,v)){const e=i.ray;if(Object(h["s"])(he,ce,Object(c["b"])(be,O.viewMatrix)),ue[0]=y[0],ue[1]=y[1],O.unprojectFromRenderScreen(ue,ce)){const t=Object(p["f"])();Object(h["m"])(t,e.direction);const r=1/Object(h["r"])(t);Object(h["g"])(t,t,r),a(Object(h["o"])(e.origin,ce)*r,t,-1,!0,1,he)}}}}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return!1;const i=r.get(E["a"].POSITION),n=e.indices.get(E["a"].POSITION);return Object(_["b"])(i,n,t)}createBufferWriter(){return new Te(this)}_normalAndViewAngle(e,t,r,i){return m(t)&&(t=Object(s["f"])(fe,t)),Object(h["z"])(i.normal,e,t),Object(h["s"])(i.normal,i.normal,r.viewInverseTransposeMatrix),i.cosAngle=Object(h["j"])(de,je),i}_updateScaleInfo(e,t,r){const i=this.parameters;i.screenSizePerspective?Object(T["e"])(r,t,i.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minPixelSize=0,e.factor.paddingPixels=0),i.screenSizePerspectiveAlignment?Object(T["e"])(r,t,i.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minPixelSize=e.factor.minPixelSize,e.factorAlignment.paddingPixels=e.factor.paddingPixels)}applyShaderOffsetsView(e,t,r,i,n,a,s){const o=this._normalAndViewAngle(t,r,n,ge);return this._applyVerticalGroundOffsetView(e,o,n,s),this._applyVerticalOffsetTransformationView(s,o,n,a),this._applyPolygonOffsetView(s,o,i[3],n,s),this._applyCenterOffsetView(s,i,s),s}applyShaderOffsetsNDC(e,t,r,i,a){return this._applyCenterOffsetNDC(e,t,r,i),Object(n["k"])(a)&&Object(h["m"])(a,i),this._applyPolygonOffsetNDC(i,t,r,i),i}_applyPolygonOffsetView(e,t,r,n,a){const s=n.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=s);const c=s*o;if(this.parameters.shaderPolygonOffset<=0)return Object(h["m"])(a,e);const l=Object(i["f"])(Math.abs(t.cosAngle),.01,1),u=1-Math.sqrt(1-l*l)/l/n.viewport[2];return Object(h["g"])(a,e,c>0?u:1/u),a}_applyVerticalGroundOffsetView(e,t,r,i){const n=Object(h["r"])(e),a=r.aboveGround?1:-1,s=.5*r.computeRenderPixelSizeAtDist(n),o=Object(h["g"])(ce,t.normal,a*s);return Object(h["h"])(i,e,o),i}_applyVerticalOffsetTransformationView(e,t,r,i){const n=this.parameters;if(!n.verticalOffset||!n.verticalOffset.screenLength){if(n.screenSizePerspective||n.screenSizePerspectiveAlignment){const r=Object(h["r"])(e);this._updateScaleInfo(i,r,t.cosAngle)}else i.factor.scale=1,i.factorAlignment.scale=1;return e}const a=Object(h["r"])(e),s=n.screenSizePerspectiveAlignment||n.screenSizePerspective,o=Object(C["l"])(r,a,n.verticalOffset,t.cosAngle,s);return this._updateScaleInfo(i,a,t.cosAngle),Object(h["g"])(t.normal,t.normal,o),Object(h["h"])(e,e,t.normal)}_applyCenterOffsetView(e,t,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&Object(h["m"])(r,e),i&&(r[0]+=t[0],r[1]+=t[1],t[2]&&(Object(h["t"])(le,r),Object(h["h"])(r,r,Object(h["g"])(le,le,t[2])))),r}_applyCenterOffsetNDC(e,t,r,i){const n="screen"!==this.parameters.centerOffsetUnits;return i!==e&&Object(h["m"])(i,e),n||(i[0]+=t[0]/r.fullWidth*2,i[1]+=t[1]/r.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,r,i){const n=this.parameters.shaderPolygonOffset;if(e!==i&&Object(h["m"])(i,e),n){const e=r.aboveGround?1:-1,a=e*Math.sign(t[3]);i[2]-=(a||e)*n}return i}requiresSlot(e){if(e===x["a"].DRAPED_MATERIAL)return!0;const{drawInSecondSlot:t,occlusionTest:r}=this.parameters;return e===(t?x["a"].LABEL_MATERIAL:x["a"].HUD_MATERIAL)||r&&e===x["a"].OCCLUSION_PIXELS}createGLMaterial(e){return e.output===O["a"].Color||e.output===O["a"].Alpha?new re(e):e.output===O["a"].Highlight?new te(e):null}calculateRelativeScreenBounds(e,t,r=Object(g["l"])()){return ie(this.parameters,e,t,r),r[2]=r[0]+e[0],r[3]=r[1]+e[1],r}}class te extends j["a"]{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){return this.updateTexture(this._material.parameters.textureId),this.selectProgram(e)}selectProgram(e){return this.ensureTechnique(Y,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){this.bindTextures(t.program),this.bindTextureScale(t.program),t.bindPass(this._material.parameters,e)}}class re extends te{_isOcclusionSlot(e){return e.slot===x["a"].OCCLUSION_PIXELS&&this._material.parameters.occlusionTest&&(this._output===O["a"].Color||this._output===O["a"].Alpha)}selectProgram(e){return this.ensureTechnique(Y,e,this._isOcclusionSlot(e)?O["a"].Occlusion:this._output)}bind(e,t){this._isOcclusionSlot(e)||(this.bindTextures(t.program),this.bindTextureScale(t.program)),t.bindPass(this._material.parameters,e)}}function ie(e,t,r,i=oe){return Object(u["c"])(i,e.anchorPos),i[0]*=-t[0],i[1]*=-t[1],i[0]+=e.screenOffset[0]*r,i[1]+=e.screenOffset[1]*r,i}function ne(e){const t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],s=e[5],o=e[6],c=e[7],l=e[8],u=1/Math.sqrt(t*t+r*r+i*i),d=1/Math.sqrt(n*n+a*a+s*s),h=1/Math.sqrt(o*o+c*c+l*l);return e[0]=t*u,e[1]=r*u,e[2]=i*u,e[3]=n*d,e[4]=a*d,e[5]=s*d,e[6]=o*h,e[7]=c*h,e[8]=l*h,e}function ae(e,t,r,i,n,a,s,o){let c=t-n-(o[0]>0?i[0]*o[0]:0),l=c+i[0]+2*n,u=r-n-(o[1]>0?i[1]*o[1]:0),d=u+i[1]+2*n;if(s.textureIsSignedDistanceField){const e=s.distanceFieldBoundingBox;c+=i[0]*e[0],u+=i[1]*e[1],l-=i[0]*(1-e[2]),d-=i[1]*(1-e[3]),c-=a,l+=a,u-=a,d+=a}return e[0]>c&&e[0]<l&&e[1]>u&&e[1]<d}const se={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}},oe=Object(d["b"])(),ce=Object(p["f"])(),le=Object(p["f"])(),ue=Object(a["d"])(),de=Object(p["f"])(),he=Object(p["f"])(),pe=Object(o["b"])(),fe=Object(o["b"])(),be=Object(l["d"])(),me=Object(p["f"])(),ge={normal:de,cosAngle:0},ye=Object(l["d"])(),Oe=1,ve=2,_e=[0,0],je=Object(p["h"])(0,0,1),we={texCoordScale:[1,1],occlusionTest:!0,binaryHighlightOcclusion:!0,drawInSecondSlot:!1,color:[1,1,1,1],outlineColor:[1,1,1,1],outlineSize:0,textureIsSignedDistanceField:!1,distanceFieldBoundingBox:null,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],screenOffset:[0,0],verticalOffset:null,screenSizePerspective:null,screenSizePerspectiveAlignment:null,slicePlaneEnabled:!1,anchorPos:Object(d["f"])(.5,.5),shaderPolygonOffset:1e-5,polygonOffset:!1,textureId:null,centerOffsetUnits:"world",depthEnabled:!0,pixelSnappingEnabled:!0,debugDrawLabelBorder:!1,isDraped:!1,...w["a"]},xe=Object(y["a"])().vec3f(E["a"].POSITION).vec3f(E["a"].NORMAL).vec2f(E["a"].UV0).vec4u8(E["a"].COLOR).vec2f(E["a"].SIZE).vec4f(E["a"].AUXPOS1).vec4f(E["a"].AUXPOS2);class Te{constructor(e){this.material=e,this.vertexBufferLayout=xe}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return 6*e.indices.get(E["a"].POSITION).length}write(e,t,r,i){Object(A["f"])(t.indices.get(E["a"].POSITION),t.vertexAttributes.get(E["a"].POSITION).data,e.transformation,r.position,i,6),Object(A["e"])(t.indices.get(E["a"].NORMAL),t.vertexAttributes.get(E["a"].NORMAL).data,e.invTranspTransformation,r.normal,i,6);{const e=t.vertexAttributes.get(E["a"].UV0).data;let n,a,s,o;if(null==e||e.length<4){const e=this.material.parameters;n=0,a=0,s=e.texCoordScale[0],o=e.texCoordScale[1]}else n=e[0],a=e[1],s=e[2],o=e[3];s=Math.min(1.99999,s+1),o=Math.min(1.99999,o+1);const c=t.indices.get(E["a"].POSITION).length,l=r.uv0;let u=i;for(let t=0;t<c;++t)l.set(u,0,n),l.set(u,1,a),u+=1,l.set(u,0,s),l.set(u,1,a),u+=1,l.set(u,0,s),l.set(u,1,o),u+=1,l.set(u,0,s),l.set(u,1,o),u+=1,l.set(u,0,n),l.set(u,1,o),u+=1,l.set(u,0,n),l.set(u,1,a),u+=1}Object(A["c"])(t.indices.get(E["a"].COLOR),t.vertexAttributes.get(E["a"].COLOR).data,4,r.color,i,6);{const e=t.indices.get(E["a"].SIZE),n=t.vertexAttributes.get(E["a"].SIZE).data,a=e.length,s=r.size;let o=i;for(let t=0;t<a;++t){const r=n[2*e[t]],i=n[2*e[t]+1];for(let e=0;e<6;++e)s.set(o,0,r),s.set(o,1,i),o+=1}}t.indices.get(E["a"].AUXPOS1)&&t.vertexAttributes.get(E["a"].AUXPOS1)&&Object(A["b"])(t.indices.get(E["a"].AUXPOS1),t.vertexAttributes.get(E["a"].AUXPOS1).data,r.auxpos1,i,6),t.indices.get(E["a"].AUXPOS2)&&t.vertexAttributes.get(E["a"].AUXPOS2)&&Object(A["b"])(t.indices.get(E["a"].AUXPOS2),t.vertexAttributes.get(E["a"].AUXPOS2).data,r.auxpos2,i,6)}}},"2e0f":function(e,t,r){"use strict";r.d(t,"a",(function(){return T})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return p})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return g})),r.d(t,"i",(function(){return y}));var i,n=r("6c97"),a=r("b2b2"),s=r("d791"),o=r("afe1"),c=r("0b2d"),l=r("8188"),u=r("84f4"),d=r("ba58"),h=r("0cb9");function p(e,t,r,i,n,a,s,o,c,u,d){const h=S[d.mode];let p,f,b=0;if(Object(l["p"])(e,t,r,i,c.spatialReference,n,o))return h.requiresAlignment(d)?(b=h.applyElevationAlignmentBuffer(i,n,a,s,o,c,u,d),p=a,f=s):(p=i,f=n),Object(l["p"])(p,c.spatialReference,f,a,u.spatialReference,s,o)?b:void 0}function f(e,t,r,i,s){const o=(Object(u["a"])(e)?e.z:Object(h["c"])(e)?e.array[e.offset+2]:e[2])||0;switch(r.mode){case"on-the-ground":{const r=Object(a["u"])(Object(h["b"])(t,e,"ground"),0);return s.verticalDistanceToGround=0,s.sampledElevation=r,void(s.z=r)}case"relative-to-ground":{const n=Object(a["u"])(Object(h["b"])(t,e,"ground"),0),c=r.geometryZWithOffset(o,i);return s.verticalDistanceToGround=c,s.sampledElevation=n,void(s.z=c+n)}case"relative-to-scene":{const n=Object(a["u"])(Object(h["b"])(t,e,"scene"),0),c=r.geometryZWithOffset(o,i);return s.verticalDistanceToGround=c,s.sampledElevation=n,void(s.z=c+n)}case"absolute-height":{const n=r.geometryZWithOffset(o,i),c=Object(a["u"])(Object(h["b"])(t,e,"ground"),0);return s.verticalDistanceToGround=n-c,s.sampledElevation=c,void(s.z=n)}default:return Object(n["a"])(r.mode),void(s.z=0)}}function b(e,t,r,i){return f(e,t,r,i,A),A.z}function m(e,t,r){return null==t||null==r?e.definedChanged:"on-the-ground"===t&&"on-the-ground"===r?e.staysOnTheGround:t===r||"on-the-ground"!==t&&"on-the-ground"!==r?i.UPDATE:e.onTheGroundChanged}function g(e){return"relative-to-ground"===e||"relative-to-scene"===e}function y(e){return"absolute-height"!==e}function O(e,t,r,i,n){f(t,r,n,i,A),Object(d["i"])(e,A.verticalDistanceToGround);const a=A.sampledElevation,o=Object(s["d"])(E,e.transformation);return C[0]=t.x,C[1]=t.y,C[2]=A.z,Object(l["d"])(t.spatialReference,C,o,i.spatialReference)?e.transformation=o:console.warn("Could not locate symbol object properly, it might be misplaced"),a}function v(e,t,r,i,n,s){let o=0;const c=s.spatialReference;t*=3,i*=3;for(let l=0;l<n;++l){const n=e[t+0],l=e[t+1],u=e[t+2],d=Object(a["u"])(s.getElevation(n,l,u,c,"ground"),0);o+=d,r[i+0]=n,r[i+1]=l,r[i+2]=d,t+=3,i+=3}return o/n}function _(e,t,r,i,n,s,o,c){let l=0;const u=c.calculateOffsetRenderUnits(o),d=c.featureExpressionInfoContext,h=s.spatialReference;t*=3,i*=3;for(let p=0;p<n;++p){const n=e[t+0],o=e[t+1],c=e[t+2],p=Object(a["u"])(s.getElevation(n,o,c,h,"ground"),0);l+=p,r[i+0]=n,r[i+1]=o,r[i+2]=null==d?c+p+u:p+u,t+=3,i+=3}return l/n}function j(e,t,r,i,n,s,o,c){let l=0;const u=c.calculateOffsetRenderUnits(o),d=c.featureExpressionInfoContext,h=s.spatialReference;t*=3,i*=3;for(let p=0;p<n;++p){const n=e[t+0],o=e[t+1],c=e[t+2],p=Object(a["u"])(s.getElevation(n,o,c,h,"scene"),0);l+=p,r[i+0]=n,r[i+1]=o,r[i+2]=null==d?c+p+u:p+u,t+=3,i+=3}return l/n}function w(e){const t=e.meterUnitOffset,r=e.featureExpressionInfoContext;return 0!==t||null!=r}function x(e,t,r,i,n,a,s,o){const c=o.calculateOffsetRenderUnits(s),l=o.featureExpressionInfoContext;t*=3,i*=3;for(let u=0;u<n;++u){const n=e[t+0],a=e[t+1],s=e[t+2];r[i+0]=n,r[i+1]=a,r[i+2]=null==l?s+c:c,t+=3,i+=3}return 0}class T{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}}!function(e){e[e.NONE=0]="NONE",e[e.UPDATE=1]="UPDATE",e[e.RECREATE=2]="RECREATE"}(i||(i={}));const S={"absolute-height":{applyElevationAlignmentBuffer:x,requiresAlignment:w},"on-the-ground":{applyElevationAlignmentBuffer:v,requiresAlignment:()=>!0},"relative-to-ground":{applyElevationAlignmentBuffer:_,requiresAlignment:()=>!0},"relative-to-scene":{applyElevationAlignmentBuffer:j,requiresAlignment:()=>!0}},E=Object(o["d"])(),A=new T,C=Object(c["f"])()},"2e3f":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(e){super(e),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new i({title:this.title,expression:this.expression})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"title",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"expression",void 0),Object(n["a"])([Object(s["b"])({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"returnType",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.popup.ElementExpressionInfo")],c);const l=c},"2e5c":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return s}));var i=r("d17d"),n=r("3f3e");const a={geometry:[new n["a"]("a_pos",2,i["k"].BYTE,0,2)]},s={geometry:[new n["a"]("a_pos",2,i["k"].BYTE,0,4),new n["a"]("a_tex",2,i["k"].BYTE,2,4)]},o={geometry:[new n["a"]("a_pos",2,i["k"].UNSIGNED_SHORT,0,4)]}},"2eab":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return p}));var i=r("1325"),n=r("f7be"),a=r("ce50"),s=r("c120"),o=r("7ffa"),c=r("b2b2"),l=r("f4cc"),u=r("e041"),d=r("8249"),h=r("228a");async function p(e,t){var r;const i=Object(u["w"])(e),n=Object(u["v"])(e);n||i||(e=Object(u["F"])(e));const a={url:e,requestOptions:{...Object(c["t"])(t)}};let o=Object(u["n"])(e);if(o){const e=await R(o,a);if(null!=e)return{data:e,getHeader:v,requestOptions:a.requestOptions,url:a.url};o.after||o.error||(o=null)}if(e=a.url,"image"===(t=a.requestOptions).responseType){if(Object(s["a"])("host-webworker")||Object(s["a"])("host-node"))throw x("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),a)}else if(i)throw x("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),a);if("head"===t.method){if(t.body)throw x("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),a);if(i||n)throw x("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),a)}if(await T(),f)return f.execute(e,t);const d=new AbortController;Object(l["q"])(t,()=>d.abort());const h={controller:d,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:o,params:a,redoRequest:!1,useIdentity:b.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},p=await I(h);return null==(r=o)||null==r.after||r.after(p),p}let f;const b=i["a"].request,m="FormData"in globalThis,g=[499,498,403,401],y=["COM_0056","COM_0057","SB_0008"],O=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],v=()=>null,_=Symbol();function j(e){const t=Object(u["o"])(e);t&&!p._corsServers.includes(t)&&p._corsServers.push(t)}function w(e){const t=Object(u["o"])(e);return!t||t.endsWith(".arcgis.com")||p._corsServers.includes(t)||Object(u["A"])(t)}function x(e,t,r,i){let n="Error";const s={url:r.url,requestOptions:r.requestOptions,getHeader:v,ssl:!1};if(t instanceof a["a"])return t.details?(t.details=Object(o["a"])(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=s,t;if(t){const e=i&&(e=>i.headers.get(e)),r=i&&i.status,a=t.message;a&&(n=a),e&&(s.getHeader=e),s.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,s.subCode=t.subcode,s.messageCode=t.messageCode,"string"==typeof t.details?s.messages=[t.details]:s.messages=t.details,s.raw=_ in t?t[_]:t}return Object(l["m"])(t)?Object(l["e"])():new a["a"](e,n,s)}async function T(){Object(s["a"])("host-webworker")?f||(f=await r.e("chunk-2d0d03e5").then(r.bind(null,"66c2"))):p._abortableFetch||(p._abortableFetch=globalThis.fetch.bind(globalThis))}async function S(){n["b"]||await r.e("chunk-771be51c").then(r.bind(null,"d81c8"))}async function E(e){const t=e.params.url,r=e.params.requestOptions,a=e.controller.signal,s=r.body;let o=null,c=null,u=null;if(m&&"HTMLFormElement"in globalThis&&(s instanceof FormData?o=s:s instanceof HTMLFormElement&&(c=s,o=new FormData(c))),"string"==typeof s&&(u=s),e.fetchOptions={cache:r.cacheBust&&!p._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",redirect:"follow",signal:a},(o||u)&&(e.fetchOptions.body=o||u),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query&&r.query.token||o&&o.get&&o.get("token")||c&&c.elements.token),!e.hasToken&&i["a"].apiKey&&Object(d["a"])(t)&&(r.query||(r.query={}),r.query.token=i["a"].apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!A(t)&&!Object(l["n"])(a)){let i;"immediate"===r.authMode?(await S(),i=await n["b"].getCredential(t,{signal:a}),e.credential=i):"no-prompt"===r.authMode?(await S(),i=await n["b"].getCredential(t,{prompt:!1,signal:a}).catch(()=>{}),e.credential=i):n["b"]&&(i=n["b"].findCredential(t)),i&&(e.credentialToken=i.token,e.useSSL=!!i.ssl)}}function A(e){return O.some(t=>t.test(e))}async function C(e){let t=e.params.url;const r=e.params.requestOptions,i=e.fetchOptions,a=Object(u["v"])(t)||Object(u["w"])(t),o=r.responseType||"json",c=a?0:null!=r.timeout?r.timeout:b.timeout;let d=!1;if(!a){e.useSSL&&(t=Object(u["L"])(t)),r.cacheBust&&"default"===i.cache&&(t=Object(u["d"])(t,"request.preventCache",Date.now()));let a={...r.query};e.credentialToken&&(a.token=e.credentialToken);let o=Object(u["G"])(a);Object(s["a"])("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const c=t.length+1+o.length;let l;d="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||c>b.maxUrlLength;const h=r.useProxy||!!Object(u["q"])(t);if(h){const e=Object(u["r"])(t);l=e.path,!d&&l.length+1+c>b.maxUrlLength&&(d=!0),e.query&&(a={...e.query,...a})}if("HEAD"===i.method&&(d||h)){if(d){if(c>b.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(i.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=Object(u["e"])(t,a):(i.body=Object(u["G"])(a),i.headers["Content-Type"]="application/x-www-form-urlencoded")):t=Object(u["e"])(t,a),h&&(e.useProxy=!0,t=`${l}?${t}`),a.token&&m&&i.body instanceof FormData){const e=i.body;e.set?e.set("token",a.token):e.append("token",a.token)}if(r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!Object(u["s"])(t,Object(u["l"])()))if(Object(u["A"])(t))e.withCredentials=!0;else if(n["b"]){const r=n["b"].findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include")}let h,f,y=0,O=!1;c>0&&(y=setTimeout(()=>{O=!0,e.controller.abort()},c));try{if("native-request-init"===r.responseType)f=i,f.url=t;else if("image"!==r.responseType||"default"!==i.cache||"GET"!==i.method||d||M(r.headers)||!a&&!e.useProxy&&b.proxyUrl&&!w(t)){if(h=await p._abortableFetch(t,i),e.useProxy||j(t),"native"===r.responseType)f=h;else if("HEAD"!==i.method)if(h.ok){switch(o){case"array-buffer":f=await h.arrayBuffer();break;case"blob":case"image":f=await h.blob();break;default:f=await h.text()}if(y&&(clearTimeout(y),y=0),"json"===o||"xml"===o||"document"===o)if(f)switch(o){case"json":f=JSON.parse(f);break;case"xml":f=P(f,"application/xml");break;case"document":f=P(f,"text/html")}else f=null;if(f){if("array-buffer"===o||"blob"===o){const e=h.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&f["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(f).json();e.error&&(f=e)}catch{}}"image"===o&&f instanceof Blob&&(f=await L(URL.createObjectURL(f),e,!0))}}else f=await h.text()}else f=await L(t,e)}catch(g){if("AbortError"===g.name){if(O)throw new Error("Timeout exceeded");throw Object(l["e"])("Request canceled")}if(!(!h&&g instanceof TypeError&&b.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||w(t))throw g;e.redoRequest=!0,Object(u["c"])({proxyUrl:b.proxyUrl,urlPrefix:Object(u["o"])(t)})}finally{y&&clearTimeout(y)}return[h,f]}async function R(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let i,n;try{n=await e.before(t)}catch(r){i=x("request:interceptor",r,t)}if((n instanceof Error||n instanceof a["a"])&&(i=x("request:interceptor",n,t)),i)throw e.error&&e.error(i),i;return n}}function M(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function P(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function I(e){var t,r;let i,a;await E(e);try{do{[i,a]=await C(e)}while(!await D(e,i,a))}catch(c){const t=x("request:server",c,e.params,i);throw t.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(t),t}const s=e.params.url;if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(s)&&!e.hasToken&&!e.credentialToken&&null!=(t=a)&&null!=(r=t.user)&&r.username&&!Object(u["A"])(s)){const e=Object(u["o"])(s,!0);e&&b.trustedServers.push(e)}const o=e.credential;if(o&&n["b"]){const e=n["b"].findServerInfo(o.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n["b"].findCredential(t,o.userId);e&&-1===n["b"]._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:a,getHeader:i?e=>i.headers.get(e):v,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function D(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const i=e.params.requestOptions;if(!t||"native"===i.responseType||"native-request-init"===i.responseType)return!0;let a,s,o,c;if(!t.ok)throw a=new Error(`Unable to load ${t.url} status: ${t.status}`),a[_]=r,a;null!=r&&r.error&&(a=r.error),a&&(s=Number(a.code),o=a.hasOwnProperty("subcode")?Number(a.subcode):null,c=a.messageCode,c=c&&c.toUpperCase());const l=i.authMode;if(403===s&&(4===o||a.message&&a.message.toLowerCase().indexOf("ssl")>-1&&-1===a.message.toLowerCase().indexOf("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==l||498===s)&&-1!==g.indexOf(s)&&!A(e.params.url)&&(403!==s||-1===y.indexOf(c)&&(null==o||2===o&&e.credentialToken))){await S();try{const t=await n["b"].getCredential(e.params.url,{error:x("request:server",a,e.params),prompt:"no-prompt"!==l,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(u){if("no-prompt"===l)return e.credential=null,e.credentialToken=null,!1;a=u}}if(a)throw a;return!0}function L(e,t,r=!1){const i=t.controller.signal,n=new Image;return t.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.src=e,Object(h["a"])(n,e,r,i)}p._abortableFetch=null,p._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},"2eb0":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.fragment.uniforms.add("u_colormap","sampler2D"),e.fragment.uniforms.add("u_colormapOffset","float"),e.fragment.uniforms.add("u_colormapMaxIndex","float"),e.fragment.code.add(i["a"]`vec4 colormap(vec4 currentPixel, bool isFloat) {
  516. float clrIndex = isFloat ? currentPixel.r - u_colormapOffset : currentPixel.r * 255.0 - u_colormapOffset;
  517. vec4 result;
  518. if (currentPixel.a == 0.0 || clrIndex > u_colormapMaxIndex) {
  519. result = vec4(0.0, 0.0, 0.0, 0.0);
  520. } else {
  521. vec2 clrPosition = vec2((clrIndex + 0.5) / (u_colormapMaxIndex + 1.0), 0.0);
  522. vec4 color = texture2D(u_colormap, clrPosition);
  523. result = vec4(color.rgb, 1.0) * color.a * u_opacity;
  524. }
  525. return result;
  526. }`)}},"2ebb":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("d17d"),n=r("3f3e");function a(e,t=0){const r=e.stride;return e.fieldNames.filter(t=>{const r=e.fields.get(t).optional;return!(r&&r.glPadding)}).map(i=>{const a=e.fields.get(i),o=a.constructor.ElementCount,c=s(a.constructor.ElementType),l=a.offset,u=!(!a.optional||!a.optional.glNormalized);return new n["a"](i,o,c,l,r,u,t)})}function s(e){const t=o[e];if(t)return t;throw new Error("BufferType not supported in WebGL")}const o={u8:i["k"].UNSIGNED_BYTE,u16:i["k"].UNSIGNED_SHORT,u32:i["k"].UNSIGNED_INT,i8:i["k"].BYTE,i16:i["k"].SHORT,i32:i["k"].INT,f32:i["k"].FLOAT}},"2ec5":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return y})),r.d(t,"e",(function(){return c})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return s})),r.d(t,"h",(function(){return u})),r.d(t,"i",(function(){return b})),r.d(t,"j",(function(){return m})),r.d(t,"k",(function(){return p})),r.d(t,"l",(function(){return h}));var i=r("38a4"),n=r("9180"),a=r("ee83");const s=64,o=512,c=2.5,l=Object(i["g"])(i["a"]/10),u=4,d=4,h=e=>e<4?3:d,p=Object(n["l"])();a["a"].WebMercatorAuxiliarySphere.getExtent(0,0,0,p);const f=Object(n["l"])([-180,-90,180,90]),b="Cannot extend surface to encompass all layers because it would result in too many root tiles.",m="Surface extent is too large for tile resolution at level 0.",g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA2JJREFUeNrs3d1O20AQgFFvRJInQLQBhHj/h0JVW34El1yQ2F73DVq3jTys55zrqUBbPrErZUSZ+vcOsto4AjK76Lqu1vr8+G3mPzjc3D/+eJj/Bcz/cd75R80fbu79BsAVCAQAAgABgABAACAAEAAIAAQAAgABQPOKfQAy83Ho+HnnHzXv49B4A4AAQAAgABAACAAEAAIAAYAAQAAgABAANM4+AKnZB4ifd/5R8/YB8AYAAYAAQAAgABAACAAEAAIAAYAAQAAgAGicfQBSsw8QP+/8o+btA+ANAAIAAYAAQAAgABAACAAEAAIAAYAAQADQOPsApGYfIH7e+UfN2wfAGwAEAAIAAYAAQAAgABAACAAEAAIAAXA201QdggAggH0AUrMPED8/jsPL03fns/y8fQC8AUAAIAAQAAgABAACAAGAAEAAIAAQAAgAGmcfgNTsA8TP2weImrcPgDcACAAEAAIAAYAAQAAgABAACAAEAAIAAUDj7AOQmn2A+Hn7AFHz9gHwBgABgABAACAAEAAIAAQAAgABgABgNS4cAf9pu9u3O1+m/n2aplKK/0j+TX86/tVP5+eZ3+729gFIfwWyDxA7bx8gat4+ANkJAAGAAEAAIAAQAAgABAACAAGAAEAAIABonn0AUrMPED9vHyBq3j4A3gAgABAACAAEAAIAAYAAQAAgABAA51VrdQgCAAHAsuwDkJp9gPj5vj+9vvx0PsvP2wfAGwAEAAIAAYAAQAAgABAACAAEAAIAAYAAoHH2AUjNPkD8vH2AqHn7AHgDgABAACAAEAAIAAQAAgABgABAACAAEAA0zj4AqdkHiJ+3DxA1bx8AbwAQACQ0DL0AyKuOowBwBYKUSikCIHUBAsAVCAQAAgABgABAALBy9gFIzT5A/Lx9gKj5y6trVyC8AUAAIAAQAAgAVq90Pg5N5gA2AsAVCAQAAgABgABAALB29gFIzT5A/Lx9gKj5q6+3rkB4A4AAQAAgABAACADWzB/IIHsCAsAVCARAlKlWhyAAEAAIABZjH4DU7APEz5+OH2+vT85n+fkvhztXILwBQAAgABAACAAEAGtWigBIHcBGALgCgQBAACAAyPMO9nHosxuHodZx5vB2t691HIdh/nx/Os7/Zsz/fvgXAAAA//8DAF1P1hM2ICMfAAAAAElFTkSuQmCC",y=5},"2edc":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return v}));var i,n=r("a4ee"),a=r("e06a"),s=r("8d60"),o=r("fa8a"),c=r("6a0ed"),l=r("7ffa"),u=r("b2b2"),d=r("59b2"),h=(r("cea0"),r("afcf")),p=r("d386"),f=r("09db"),b=r("5996"),m=r("a9ab"),g=r("a1f3");const y=new o["a"]({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let O=i=class extends c["a"]{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=b["a"].fromJSON(t.spatialReference),i=[];for(let n=0;n<e.length;n++){const t=e[n],a=s["a"].fromJSON(t),o=t.geometry&&t.geometry.spatialReference;Object(u["k"])(a.geometry)&&!o&&(a.geometry.spatialReference=r);const c=t.aggregateGeometries,l=a.aggregateGeometries;if(c&&Object(u["k"])(l))for(const e in l){const t=l[e],i=c[e],n=null==i?void 0:i.spatialReference;Object(u["k"])(t)&&!n&&(t.spatialReference=r)}i.push(a)}return i}writeGeometryType(e,t,r,i){if(e)return void y.write(e,t,r,i);const{features:n}=this;if(n)for(const a of n)if(a&&Object(u["k"])(a.geometry))return void y.write(a.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=Object(m["a"])(e);return!r&&t.spatialReference&&(i.spatialReference=b["a"].fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const i of r)if(i&&Object(u["k"])(i.geometry)&&i.geometry.spatialReference)return void(t.spatialReference=i.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return Object(l["a"])({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,a=e=>Math.round((e-i)/t),s=e=>Math.round((n-e)/r),o=this.features,c=this._getQuantizationFunction(this.geometryType,a,s);for(let l=0,d=o.length;l<d;l++)c(Object(u["t"])(o[l].geometry))||(o.splice(l,1),l--,d--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[a,s]}=r,o=e=>e*a+i,c=e=>n-e*s,l=this._getHydrationFunction(e,o,c);for(const{geometry:d}of t)Object(u["k"])(d)&&l(d);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const a=[];for(let s=0,o=e.length;s<o;s++){const o=e[s];if(s>0){const e=t(o[0]),s=r(o[1]);e===i&&s===n||(a.push([e-i,s-n]),i=e,n=s)}else i=t(o[0]),n=r(o[1]),a.push([i,n])}return a.length>0?a:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=Object(m["g"])(e)?e.rings:e.paths,n=[];for(let a=0,s=i.length;a<s;a++){const e=i[a],s=this._quantizePoints(e,t,r);s&&n.push(s)}return n.length>0?(Object(m["g"])(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const i=Object(m["g"])(e)?e.rings:e.paths;let n,a;for(let s=0,o=i.length;s<o;s++){const e=i[s];for(let i=0,s=e.length;i<s;i++){const s=e[i];i>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const i=e.points;let n,a;for(let s=0,o=i.length;s<o;s++){const e=i[s];s>0?(n+=e[0],a+=e[1]):(n=e[0],a=e[1]),e[0]=t(n),e[1]=r(a)}}:void 0}};Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],O.prototype,"displayFieldName",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],O.prototype,"exceededTransferLimit",void 0),Object(n["a"])([Object(d["b"])({type:[s["a"]],json:{write:!0}})],O.prototype,"features",void 0),Object(n["a"])([Object(h["a"])("features")],O.prototype,"readFeatures",null),Object(n["a"])([Object(d["b"])({type:[g["a"]],json:{write:!0}})],O.prototype,"fields",void 0),Object(n["a"])([Object(d["b"])({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:y.read}}})],O.prototype,"geometryType",void 0),Object(n["a"])([Object(f["a"])("geometryType")],O.prototype,"writeGeometryType",null),Object(n["a"])([Object(d["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],O.prototype,"hasM",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],O.prototype,"hasZ",void 0),Object(n["a"])([Object(d["b"])({types:a["a"],json:{write:!0}})],O.prototype,"queryGeometry",void 0),Object(n["a"])([Object(h["a"])("queryGeometry")],O.prototype,"readQueryGeometry",null),Object(n["a"])([Object(d["b"])({type:b["a"],json:{write:!0}})],O.prototype,"spatialReference",void 0),Object(n["a"])([Object(f["a"])("spatialReference")],O.prototype,"writeSpatialReference",null),Object(n["a"])([Object(d["b"])({json:{write:!0}})],O.prototype,"transform",void 0),O=i=Object(n["a"])([Object(p["a"])("esri.rest.support.FeatureSet")],O),O.prototype.toJSON.isDefaultToJSON=!0;const v=O},"2f00":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886"),n=r("b7bd");function a(e){e.attributes.add(n["a"].POSITION,"vec2"),e.attributes.add(n["a"].UV0,"vec2"),e.vertex.uniforms.add("u_scale","float"),e.vertex.uniforms.add("u_offset","vec2"),e.varyings.add("v_texcoord","vec2"),e.vertex.code.add(i["a"]`void main(void) {
  527. v_texcoord = uv0 * u_scale + u_offset;
  528. gl_Position = vec4(position, 0.0, 1.0);
  529. }`)}},"2f98":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var i=r("3886"),n=r("7c51");function a(e){e.vertex.code.add(i["a"]`float screenSizePerspectiveMinSize(float size, vec4 factor) {
  530. float nonZeroSize = 1.0 - step(size, 0.0);
  531. return (
  532. factor.z * (
  533. 1.0 +
  534. nonZeroSize *
  535. 2.0 * factor.w / (
  536. size + (1.0 - nonZeroSize)
  537. )
  538. )
  539. );
  540. }`),e.vertex.code.add(i["a"]`float screenSizePerspectiveViewAngleDependentFactor(float absCosAngle) {
  541. return absCosAngle * absCosAngle * absCosAngle;
  542. }`),e.vertex.code.add(i["a"]`vec4 screenSizePerspectiveScaleFactor(float absCosAngle, float distanceToCamera, vec4 params) {
  543. return vec4(
  544. min(params.x / (distanceToCamera - params.y), 1.0),
  545. screenSizePerspectiveViewAngleDependentFactor(absCosAngle),
  546. params.z,
  547. params.w
  548. );
  549. }`),e.vertex.code.add(i["a"]`float applyScreenSizePerspectiveScaleFactorFloat(float size, vec4 factor) {
  550. return max(mix(size * factor.x, size, factor.y), screenSizePerspectiveMinSize(size, factor));
  551. }`),e.vertex.code.add(i["a"]`float screenSizePerspectiveScaleFloat(float size, float absCosAngle, float distanceToCamera, vec4 params) {
  552. return applyScreenSizePerspectiveScaleFactorFloat(
  553. size,
  554. screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
  555. );
  556. }`),e.vertex.code.add(i["a"]`vec2 applyScreenSizePerspectiveScaleFactorVec2(vec2 size, vec4 factor) {
  557. return mix(size * clamp(factor.x, screenSizePerspectiveMinSize(size.y, factor) / max(1e-5, size.y), 1.0), size, factor.y);
  558. }`),e.vertex.code.add(i["a"]`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec4 params) {
  559. return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
  560. }`)}function s(e,t){if(t.screenSizePerspective){Object(n["a"])(t.screenSizePerspective,e,"screenSizePerspective");const r=t.screenSizePerspectiveAlignment||t.screenSizePerspective;Object(n["a"])(r,e,"screenSizePerspectiveAlignment")}}},"2feb":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("e92d"),n=r("a1f3"),a=r("80b7"),s=r("c1da");const o=i["a"].getLogger("esri.layers.support.fieldProperties");function c(){return{fields:{type:[n["a"]],value:null},fieldsIndex:{readOnly:!0,get(){return new a["a"](this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e)this.fieldsIndex.has(t)||o.error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return Object(s["j"])(this.fieldsIndex,e)}}}}},"2ff3":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const i=29;class n{constructor(e,t=i){this.name=e,this._counter=0,this._items=new Array(t)}record(e){this._items[++this._counter%this._items.length]=e}get median(){return this._items.slice().sort((e,t)=>e-t)[Math.floor(this._items.length/2)]}get average(){return this._items.reduce((e,t)=>e+t,0)/this._items.length}get last(){return this._items[this._counter%this._items.length]}}},"303f":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i=r("a4ee"),n=r("2eab"),a=r("f4cc"),s=r("e041"),o=r("549a"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("afcf")),u=r("d386"),d=r("3af1"),h=r("5996"),p=r("22f4");const f=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0}readCapabilities(e,t){var r,i;const n=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!n)return{operations:{supportsQuery:!1,supportsExportMap:!1,supportsExportTiles:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const a=this.type,s=n.includes("query"),c=n.includes("map"),l=!!t.exportTilesAllowed,u=n.includes("tilemap"),d="tile"!==a&&!!t.supportsDynamicLayers,h="tile"!==a&&(!t.tileInfo||d),p="tile"!==a&&(!t.tileInfo||d),f="tile"!==a,b=t.cimVersion&&o["a"].parse(t.cimVersion),m=null!=(r=null==b?void 0:b.since(1,4))&&r,g=null!=(i=null==b?void 0:b.since(2,0))&&i;return{operations:{supportsQuery:s,supportsExportMap:c,supportsExportTiles:l,supportsTileMap:u},exportMap:c?{supportsArcadeExpressionForLabeling:m,supportsSublayersChanges:f,supportsDynamicLayers:d,supportsSublayerVisibility:h,supportsSublayerDefinitionExpression:p,supportsCIMSymbols:g}:null,exportTiles:l?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchSublayerInfo(e,t){return await this.fetchAllLayersAndTables(t),this._allLayersAndTablesMap.get(e)}async fetchAllLayersAndTables(e){await this.load(e),this._allLayersAndTablesPromise||(this._allLayersAndTablesPromise=Object(n["default"])(Object(s["M"])(this.url).path+"/layers",{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then(e=>{this._allLayersAndTablesMap=new Map;for(const t of e.data.layers)this._allLayersAndTablesMap.set(t.id,t);return{result:e.data}},e=>({error:e})));const t=await this._allLayersAndTablesPromise;if(Object(a["v"])(e),"result"in t)return t.result;throw t.error}};return Object(i["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"capabilities",void 0),Object(i["a"])([Object(l["a"])("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),Object(i["a"])([Object(c["b"])({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),Object(i["a"])([Object(c["b"])({type:d["a"]})],t.prototype,"fullExtent",void 0),Object(i["a"])([Object(c["b"])(p["c"])],t.prototype,"id",void 0),Object(i["a"])([Object(c["b"])({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),Object(i["a"])([Object(c["b"])(p["j"])],t.prototype,"popupEnabled",void 0),Object(i["a"])([Object(c["b"])({type:h["a"]})],t.prototype,"spatialReference",void 0),Object(i["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"version",void 0),Object(i["a"])([Object(l["a"])("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=Object(i["a"])([Object(u["a"])("esri.layers.mixins.ArcGISMapService")],t),t}},"306f":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("fc29"),a=r("f4cc"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=class extends n["a"]{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,r){return this.running=!0,new Promise((i,n)=>this._tasks.push(new l(i,n,e,t,r)))}unshift(e,t,r){return this.running=!0,new Promise((i,n)=>this._tasks.unshift(new l(i,n,e,t,r)))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const r=Object(a["n"])(t.signal);if(r&&!t.abortCallback)t.reject(Object(a["e"])());else{const i=r?t.abortCallback(Object(a["e"])()):t.callback(e);Object(a["o"])(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(r){t.reject(r)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=Object(a["e"])();for(const t of this._tasks)if(t.abortCallback){const r=t.abortCallback(e);t.resolve(r)}else t.reject(e);this._tasks.length=0,this.running=!1}};Object(i["a"])([Object(s["b"])()],c.prototype,"running",void 0),c=Object(i["a"])([Object(o["a"])("esri.layers.support.PromiseQueue")],c);class l{constructor(e,t,r,i,n){this.resolve=e,this.reject=t,this.callback=r,this.signal=i,this.abortCallback=n}}},3105:function(e,t,r){"use strict";r.d(t,"a",(function(){return wt})),r.d(t,"b",(function(){return O})),r.d(t,"c",(function(){return Q})),r.d(t,"d",(function(){return Se})),r.d(t,"e",(function(){return De})),r.d(t,"f",(function(){return et})),r.d(t,"g",(function(){return Y})),r.d(t,"h",(function(){return Ke})),r.d(t,"i",(function(){return tt}));const i={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0},n="app";let a,s,o,c,l=0,u=!1,d=!1,h=!1,p=!1,f=null,b=0,m=!1;const g="undefined"!==typeof window?window:{},y=(i.cssVarShim&&g.CSS,g.document||{head:{}}),O=g.HTMLElement||class{},v={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,i)=>e.addEventListener(t,r,i),rel:(e,t,r,i)=>e.removeEventListener(t,r,i),ce:(e,t)=>new CustomEvent(e,t)},_=!i.shadowDomShim||!i.shadowDom||(()=>(y.head.attachShadow+"").indexOf("[native")>-1)(),j=(()=>{let e=!1;try{y.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(t){}return e})(),w=e=>Promise.resolve(e),x=!!i.constructableCSS&&(()=>{try{return new CSSStyleSheet,"function"===typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),T=(e,t,r,n)=>{i.hostListener&&r&&(i.hostListenerTargetParent&&(r=n?r.filter(([e])=>32&e):r.filter(([e])=>!(32&e))),r.map(([r,n,a])=>{const s=i.hostListenerTarget?E(e,r):e,o=S(t,a),c=A(r);v.ael(s,n,o,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>v.rel(s,n,o,c))}))},S=(e,t)=>r=>{try{i.lazyLoad?256&e.$flags$?e.$lazyInstance$[t](r):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,r]):e.$hostElement$[t](r)}catch(n){st(n)}},E=(e,t)=>i.hostListenerTargetDocument&&4&t?y:i.hostListenerTargetWindow&&8&t?g:i.hostListenerTargetBody&&16&t?y.body:i.hostListenerTargetParent&&32&t?e.parentElement:e,A=e=>j?{passive:0!==(1&e),capture:0!==(2&e)}:0!==(2&e),C="r",R="o",M="s",P="t",I="s-id",D="sty-id",L="c-id",N="http://www.w3.org/1999/xlink",F=(e,t="")=>{if(i.profile&&performance.mark){const r=`st:${e}:${t}:${l++}`;return performance.mark(r),()=>performance.measure(`[Stencil] ${e}() <${t}>`,r)}return()=>{}},k=(e,t)=>i.profile&&performance.mark?(0===performance.getEntriesByName(e).length&&performance.mark(e),()=>{0===performance.getEntriesByName(t).length&&performance.measure(t,e)}):()=>{},U=new WeakMap,z=(e,t,r)=>{let i=ht.get(e);x&&r?(i=i||new CSSStyleSheet,i.replace(t)):i=t,ht.set(e,i)},B=(e,t,r,n)=>{let a=G(t,r),s=ht.get(a);if(!i.attachStyles)return a;if(e=11===e.nodeType?e:y,s)if("string"===typeof s){e=e.head||e;let r,o=U.get(e);if(o||U.set(e,o=new Set),!o.has(a)){if(i.hydrateClientSide&&e.host&&(r=e.querySelector(`[${D}="${a}"]`)))r.innerHTML=s;else{if(i.cssVarShim&&v.$cssShim$){r=v.$cssShim$.createHostStyle(n,a,s,!!(10&t.$flags$));const e=r["s-sc"];e&&(a=e,o=null)}else r=y.createElement("style"),r.innerHTML=s;(i.hydrateServerSide||i.hotModuleReplacement)&&r.setAttribute(D,a),e.insertBefore(r,e.querySelector("link"))}o&&o.add(a)}}else i.constructableCSS&&!e.adoptedStyleSheets.includes(s)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return a},V=e=>{const t=e.$cmpMeta$,r=e.$hostElement$,n=t.$flags$,a=F("attachStyles",t.$tagName$),s=B(i.shadowDom&&_&&r.shadowRoot?r.shadowRoot:r.getRootNode(),t,e.$modeName$,r);(i.shadowDom||i.scoped)&&i.cssAnnotations&&10&n&&(r["s-sc"]=s,r.classList.add(s+"-h"),i.scoped&&2&n&&r.classList.add(s+"-s")),a()},G=(e,t)=>"sc-"+(i.mode&&t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$),H=e=>pt.map(t=>t(e)).find(e=>!!e),q={},W="http://www.w3.org/2000/svg",$="http://www.w3.org/1999/xhtml",Z=e=>null!=e,X=e=>(e=typeof e,"object"===e||"function"===e),Y=(e,t,...r)=>{let n=null,a=null,s=null,o=!1,c=!1,l=[];const u=t=>{for(let r=0;r<t.length;r++)n=t[r],Array.isArray(n)?u(n):null!=n&&"boolean"!==typeof n&&((o="function"!==typeof e&&!X(n))?n=String(n):i.isDev&&"function"!==typeof e&&void 0===n.$flags$&&ct("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),o&&c?l[l.length-1].$text$+=n:l.push(o?J(null,n):n),c=o)};if(u(r),t&&(i.isDev&&"input"===e&&ie(t),i.vdomKey&&t.key&&(a=t.key),i.slotRelocation&&t.name&&(s=t.name),i.vdomClass)){const e=t.className||t.class;e&&(t.class="object"!==typeof e?e:Object.keys(e).filter(t=>e[t]).join(" "))}if(i.isDev&&l.some(K)&&ct("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),i.vdomFunctional&&"function"===typeof e)return e(null===t?{}:t,l,ee);const d=J(e,null);return d.$attrs$=t,l.length>0&&(d.$children$=l),i.vdomKey&&(d.$key$=a),i.slotRelocation&&(d.$name$=s),d},J=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return i.vdomAttribute&&(r.$attrs$=null),i.vdomKey&&(r.$key$=null),i.slotRelocation&&(r.$name$=null),r},Q={},K=e=>e&&e.$tag$===Q,ee={forEach:(e,t)=>e.map(te).forEach(t),map:(e,t)=>e.map(te).map(t).map(re)},te=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),re=e=>{if("function"===typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),Y(e.vtag,t,...e.vchildren||[])}const t=J(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},ie=e=>{const t=Object.keys(e),r=t.indexOf("value");if(-1===r)return;const i=t.indexOf("type"),n=t.indexOf("min"),a=t.indexOf("max"),s=t.indexOf("step");(r<i||r<n||r<a||r<s)&&lt('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},ne=(e,t,r,n,a,s)=>{if(r!==n){let c=at(e,t),l=t.toLowerCase();if(i.vdomClass&&"class"===t){const t=e.classList,i=se(r),a=se(n);t.remove(...i.filter(e=>e&&!a.includes(e))),t.add(...a.filter(e=>e&&!i.includes(e)))}else if(i.vdomStyle&&"style"===t){if(i.updatable)for(const t in r)n&&null!=n[t]||(!i.hydrateServerSide&&t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in n)r&&n[t]===r[t]||(!i.hydrateServerSide&&t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if(i.vdomKey&&"key"===t);else if(i.vdomRef&&"ref"===t)n&&n(e);else if(!i.vdomListener||(i.lazyLoad?c:e.__lookupSetter__(t))||"o"!==t[0]||"n"!==t[1]){if(i.vdomPropOrAttr){const u=X(n);if((c||u&&null!==n)&&!a)try{if(e.tagName.includes("-"))e[t]=n;else{let i=null==n?"":n;"list"===t?c=!1:null!=r&&e[t]==i||(e[t]=i)}}catch(o){}let d=!1;i.vdomXlink&&l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,d=!0),null==n||!1===n?!1===n&&""!==e.getAttribute(t)||(i.vdomXlink&&d?e.removeAttributeNS(N,t):e.removeAttribute(t)):(!c||4&s||a)&&!u&&(n=!0===n?"":n,i.vdomXlink&&d?e.setAttributeNS(N,t,n):e.setAttribute(t,n))}}else t="-"===t[2]?t.slice(3):at(g,l)?l.slice(2):l[2]+t.slice(3),r&&v.rel(e,t,r,!1),n&&v.ael(e,t,n,!1)}},ae=/\s/,se=e=>e?e.split(ae):[],oe=(e,t,r,n)=>{const a=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,s=e&&e.$attrs$||q,o=t.$attrs$||q;if(i.updatable)for(n in s)n in o||ne(a,n,s[n],void 0,r,t.$flags$);for(n in o)ne(a,n,s[n],o[n],r,t.$flags$)},ce=(e,t,r,n)=>{let c,l,d,f=t.$children$[r],b=0;if(i.slotRelocation&&!u&&(h=!0,"slot"===f.$tag$&&(a&&n.classList.add(a+"-s"),f.$flags$|=f.$children$?2:1)),i.isDev&&f.$elm$&&ct(`The JSX ${null!==f.$text$?`"${f.$text$}" text`:`"${f.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),i.vdomText&&null!==f.$text$)c=f.$elm$=y.createTextNode(f.$text$);else if(i.slotRelocation&&1&f.$flags$)c=f.$elm$=i.isDebug||i.hydrateServerSide?we(f):y.createTextNode("");else{if(i.svg&&!p&&(p="svg"===f.$tag$),c=f.$elm$=i.svg?y.createElementNS(p?W:$,i.slotRelocation&&2&f.$flags$?"slot-fb":f.$tag$):y.createElement(i.slotRelocation&&2&f.$flags$?"slot-fb":f.$tag$),i.svg&&p&&"foreignObject"===f.$tag$&&(p=!1),i.vdomAttribute&&oe(null,f,p),(i.shadowDom||i.scoped)&&Z(a)&&c["s-si"]!==a&&c.classList.add(c["s-si"]=a),f.$children$)for(b=0;b<f.$children$.length;++b)l=ce(e,f,b,c),l&&c.appendChild(l);i.svg&&("svg"===f.$tag$?p=!1:"foreignObject"===c.tagName&&(p=!0))}return i.slotRelocation&&(c["s-hn"]=o,3&f.$flags$&&(c["s-sr"]=!0,c["s-cr"]=s,c["s-sn"]=f.$name$||"",d=e&&e.$children$&&e.$children$[r],d&&d.$tag$===f.$tag$&&e.$elm$&&le(e.$elm$,!1))),c},le=(e,t)=>{v.$flags$|=1;const r=e.childNodes;for(let i=r.length-1;i>=0;i--){const e=r[i];e["s-hn"]!==o&&e["s-ol"]&&(be(e).insertBefore(e,fe(e)),e["s-ol"].remove(),e["s-ol"]=void 0,h=!0),t&&le(e,t)}v.$flags$&=-2},ue=(e,t,r,n,a,s)=>{let c,l=i.slotRelocation&&e["s-cr"]&&e["s-cr"].parentNode||e;for(i.shadowDom&&l.shadowRoot&&l.tagName===o&&(l=l.shadowRoot);a<=s;++a)n[a]&&(c=ce(null,r,a,e),c&&(n[a].$elm$=c,l.insertBefore(c,i.slotRelocation?fe(t):t)))},de=(e,t,r,n,a)=>{for(;t<=r;++t)(n=e[t])&&(a=n.$elm$,_e(n),i.slotRelocation&&(d=!0,a["s-ol"]?a["s-ol"].remove():le(a,!0)),a.remove())},he=(e,t,r,n)=>{let a,s,o=0,c=0,l=0,u=0,d=t.length-1,h=t[0],p=t[d],f=n.length-1,b=n[0],m=n[f];while(o<=d&&c<=f)if(null==h)h=t[++o];else if(null==p)p=t[--d];else if(null==b)b=n[++c];else if(null==m)m=n[--f];else if(pe(h,b))me(h,b),h=t[++o],b=n[++c];else if(pe(p,m))me(p,m),p=t[--d],m=n[--f];else if(pe(h,m))!i.slotRelocation||"slot"!==h.$tag$&&"slot"!==m.$tag$||le(h.$elm$.parentNode,!1),me(h,m),e.insertBefore(h.$elm$,p.$elm$.nextSibling),h=t[++o],m=n[--f];else if(pe(p,b))!i.slotRelocation||"slot"!==h.$tag$&&"slot"!==m.$tag$||le(p.$elm$.parentNode,!1),me(p,b),e.insertBefore(p.$elm$,h.$elm$),p=t[--d],b=n[++c];else{if(l=-1,i.vdomKey)for(u=o;u<=d;++u)if(t[u]&&null!==t[u].$key$&&t[u].$key$===b.$key$){l=u;break}i.vdomKey&&l>=0?(s=t[l],s.$tag$!==b.$tag$?a=ce(t&&t[c],r,l,e):(me(s,b),t[l]=void 0,a=s.$elm$),b=n[++c]):(a=ce(t&&t[c],r,c,e),b=n[++c]),a&&(i.slotRelocation?be(h.$elm$).insertBefore(a,fe(h.$elm$)):h.$elm$.parentNode.insertBefore(a,h.$elm$))}o>d?ue(e,null==n[f+1]?null:n[f+1].$elm$,r,n,c,f):i.updatable&&c>f&&de(t,o,d)},pe=(e,t)=>e.$tag$===t.$tag$&&(i.slotRelocation&&"slot"===e.$tag$?e.$name$===t.$name$:!i.vdomKey||e.$key$===t.$key$),fe=e=>e&&e["s-ol"]||e,be=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,me=(e,t)=>{const r=t.$elm$=e.$elm$,n=e.$children$,a=t.$children$,s=t.$tag$,o=t.$text$;let c;i.vdomText&&null!==o?i.vdomText&&i.slotRelocation&&(c=r["s-cr"])?c.parentNode.textContent=o:i.vdomText&&e.$text$!==o&&(r.data=o):(i.svg&&(p="svg"===s||"foreignObject"!==s&&p),(i.vdomAttribute||i.reflect)&&(i.slot&&"slot"===s||oe(e,t,p)),i.updatable&&null!==n&&null!==a?he(r,n,t,a):null!==a?(i.updatable&&i.vdomText&&null!==e.$text$&&(r.textContent=""),ue(r,null,t,a,0,a.length-1)):i.updatable&&null!==n&&de(n,0,n.length-1),i.svg&&p&&"svg"===s&&(p=!1))},ge=e=>{let t,r,i,n,a,s,o=e.childNodes;for(r=0,i=o.length;r<i;r++)if(t=o[r],1===t.nodeType){if(t["s-sr"])for(a=t["s-sn"],t.hidden=!1,n=0;n<i;n++)if(s=o[n].nodeType,o[n]["s-hn"]!==t["s-hn"]||""!==a){if(1===s&&a===o[n].getAttribute("slot")){t.hidden=!0;break}}else if(1===s||3===s&&""!==o[n].textContent.trim()){t.hidden=!0;break}ge(t)}},ye=[],Oe=e=>{let t,r,i,n,a,s,o=0,c=e.childNodes,l=c.length;for(;o<l;o++){if(t=c[o],t["s-sr"]&&(r=t["s-cr"])&&r.parentNode)for(i=r.parentNode.childNodes,n=t["s-sn"],s=i.length-1;s>=0;s--)r=i[s],r["s-cn"]||r["s-nr"]||r["s-hn"]===t["s-hn"]||(ve(r,n)?(a=ye.find(e=>e.$nodeToRelocate$===r),d=!0,r["s-sn"]=r["s-sn"]||n,a?a.$slotRefNode$=t:ye.push({$slotRefNode$:t,$nodeToRelocate$:r}),r["s-sr"]&&ye.map(e=>{ve(e.$nodeToRelocate$,r["s-sn"])&&(a=ye.find(e=>e.$nodeToRelocate$===r),a&&!e.$slotRefNode$&&(e.$slotRefNode$=a.$slotRefNode$))})):ye.some(e=>e.$nodeToRelocate$===r)||ye.push({$nodeToRelocate$:r}));1===t.nodeType&&Oe(t)}},ve=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,_e=e=>{i.vdomRef&&(e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(_e))},je=(e,t)=>{const r=e.$hostElement$,n=e.$cmpMeta$,c=e.$vnode$||J(null,null),l=K(t)?t:Y(null,null,t);if(o=r.tagName,i.isDev&&Array.isArray(t)&&t.some(K))throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${o.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);if(i.reflect&&n.$attrsToReflect$&&(l.$attrs$=l.$attrs$||{},n.$attrsToReflect$.map(([e,t])=>l.$attrs$[t]=r[e])),l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=c.$elm$=i.shadowDom&&r.shadowRoot||r,(i.scoped||i.shadowDom)&&(a=r["s-sc"]),i.slotRelocation&&(s=r["s-cr"],u=_&&0!==(1&n.$flags$),d=!1),me(c,l),i.slotRelocation){if(v.$flags$|=1,h){let e,t,r,n,a,s;Oe(l.$elm$);let o=0;for(;o<ye.length;o++)e=ye[o],t=e.$nodeToRelocate$,t["s-ol"]||(r=i.isDebug||i.hydrateServerSide?xe(t):y.createTextNode(""),r["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=r,t));for(o=0;o<ye.length;o++)if(e=ye[o],t=e.$nodeToRelocate$,e.$slotRefNode$){n=e.$slotRefNode$.parentNode,a=e.$slotRefNode$.nextSibling,r=t["s-ol"];while(r=r.previousSibling)if(s=r["s-nr"],s&&s["s-sn"]===t["s-sn"]&&n===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){a=s;break}(!a&&n!==t.parentNode||t.nextSibling!==a)&&t!==a&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),n.insertBefore(t,a))}else 1===t.nodeType&&(t.hidden=!0)}d&&ge(l.$elm$),v.$flags$&=-2,ye.length=0}},we=e=>y.createComment(`<slot${e.$name$?' name="'+e.$name$+'"':""}> (host=${o.toLowerCase()})`),xe=e=>y.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`)),Te=e=>i.lazyLoad?it(e).$hostElement$:e,Se=(e,t,r)=>{const n=Te(e);return{emit:e=>(i.isDev&&!n.isConnected&&lt(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`),Ee(n,t,{bubbles:!!(4&r),composed:!!(2&r),cancelable:!!(1&r),detail:e}))}},Ee=(e,t,r)=>{const i=v.ce(t,r);return e.dispatchEvent(i),i},Ae=(e,t)=>{i.asyncLoading&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(t=>e.$onRenderResolve$=t))},Ce=(e,t)=>{if(i.taskQueue&&i.updatable&&(e.$flags$|=16),i.asyncLoading&&4&e.$flags$)return void(e.$flags$|=512);Ae(e,e.$ancestorComponent$);const r=()=>Re(e,t);return i.taskQueue?jt(r):r()},Re=(e,t)=>{const r=e.$hostElement$,n=F("scheduleUpdate",e.$cmpMeta$.$tagName$),a=i.lazyLoad?e.$lazyInstance$:r;let s;return t?(i.lazyLoad&&i.hostListener&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([e,t])=>Ne(a,e,t)),e.$queuedListeners$=null)),ke(r,"componentWillLoad"),i.cmpWillLoad&&(s=Ne(a,"componentWillLoad"))):(ke(r,"componentWillUpdate"),i.cmpWillUpdate&&(s=Ne(a,"componentWillUpdate"))),ke(r,"componentWillRender"),i.cmpWillRender&&(s=Fe(s,()=>Ne(a,"componentWillRender"))),n(),Fe(s,()=>Me(e,a,t))},Me=async(e,t,r)=>{const n=e.$hostElement$,a=F("update",e.$cmpMeta$.$tagName$),s=n["s-rc"];i.style&&r&&V(e);const o=F("render",e.$cmpMeta$.$tagName$);if(i.isDev&&(e.$flags$|=1024),i.hydrateServerSide?await Pe(e,t,n):Pe(e,t,n),i.cssVarShim&&v.$cssShim$&&v.$cssShim$.updateHost(n),i.isDev&&(e.$renderCount$++,e.$flags$&=-1025),i.hydrateServerSide)try{ze(n),r&&(1&e.$cmpMeta$.$flags$?n["s-en"]="":2&e.$cmpMeta$.$flags$&&(n["s-en"]="c"))}catch(c){st(c,n)}if(i.asyncLoading&&s&&(s.map(e=>e()),n["s-rc"]=void 0),o(),a(),i.asyncLoading){const t=n["s-p"],r=()=>Ie(e);0===t.length?r():(Promise.all(t).then(r),e.$flags$|=4,t.length=0)}else Ie(e)},Pe=(e,t,r)=>{const n=!!i.allRenderFn,a=!!i.lazyLoad,s=!!i.taskQueue,o=!!i.updatable;try{if(f=t,t=(n||t.render)&&t.render(),o&&s&&(e.$flags$&=-17),(o||a)&&(e.$flags$|=2),i.hasRenderFn||i.reflect)if(i.vdomRender||i.reflect){if(i.hydrateServerSide)return Promise.resolve(t).then(t=>je(e,t));je(e,t)}else r.textContent=t}catch(c){st(c,e.$hostElement$)}return f=null,null},Ie=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,n=F("postUpdate",t),a=i.lazyLoad?e.$lazyInstance$:r,s=e.$ancestorComponent$;i.cmpDidRender&&(i.isDev&&(e.$flags$|=1024),Ne(a,"componentDidRender"),i.isDev&&(e.$flags$&=-1025)),ke(r,"componentDidRender"),64&e.$flags$?(i.cmpDidUpdate&&(i.isDev&&(e.$flags$|=1024),Ne(a,"componentDidUpdate"),i.isDev&&(e.$flags$&=-1025)),ke(r,"componentDidUpdate"),n()):(e.$flags$|=64,i.asyncLoading&&i.cssAnnotations&&Ue(r),i.cmpDidLoad&&(i.isDev&&(e.$flags$|=2048),Ne(a,"componentDidLoad"),i.isDev&&(e.$flags$&=-2049)),ke(r,"componentDidLoad"),n(),i.asyncLoading&&(e.$onReadyResolve$(r),s||Le(t))),i.hotModuleReplacement&&r["s-hmr-load"]&&r["s-hmr-load"](),i.method&&i.lazyLoad&&e.$onInstanceResolve$(r),i.asyncLoading&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&_t(()=>Ce(e,!1)),e.$flags$&=-517)},De=e=>{if(i.updatable){const t=it(e),r=t.$hostElement$.isConnected;return r&&2===(18&t.$flags$)&&Ce(t,!1),r}return!1},Le=e=>{i.cssAnnotations&&Ue(y.documentElement),i.asyncQueue&&(v.$flags$|=2),_t(()=>Ee(g,"appload",{detail:{namespace:n}})),i.profile&&performance.measure&&performance.measure(`[Stencil] ${n} initial load (by ${e})`,"st:app:start")},Ne=(e,t,r)=>{if(e&&e[t])try{return e[t](r)}catch(i){st(i)}},Fe=(e,t)=>e&&e.then?e.then(t):t(),ke=(e,t)=>{i.lifecycleDOMEvents&&Ee(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:n}})},Ue=e=>i.hydratedClass?e.classList.add("hydrated"):i.hydratedAttribute?e.setAttribute("hydrated",""):void 0,ze=e=>{const t=e.children;if(null!=t)for(let r=0,i=t.length;r<i;r++){const e=t[r];"function"===typeof e.connectedCallback&&e.connectedCallback(),ze(e)}},Be=(e,t,r,n)=>{const a=F("hydrateClient",t),s=e.shadowRoot,o=[],c=[],l=i.shadowDom&&s?[]:null,u=n.$vnode$=J(t,null);v.$orgLocNodes$||Ge(y.body,v.$orgLocNodes$=new Map),e[I]=r,e.removeAttribute(I),Ve(u,o,c,l,e,e,r),o.map(e=>{const r=e.$hostId$+"."+e.$nodeId$,i=v.$orgLocNodes$.get(r),n=e.$elm$;i&&_&&""===i["s-en"]&&i.parentNode.insertBefore(n,i.nextSibling),s||(n["s-hn"]=t,i&&(n["s-ol"]=i,n["s-ol"]["s-nr"]=n)),v.$orgLocNodes$.delete(r)}),i.shadowDom&&s&&l.map(e=>{e&&s.appendChild(e)}),a()},Ve=(e,t,r,n,a,s,o)=>{let c,l,u,d;if(1===s.nodeType){for(c=s.getAttribute(L),c&&(l=c.split("."),l[0]!==o&&"0"!==l[0]||(u={$flags$:0,$hostId$:l[0],$nodeId$:l[1],$depth$:l[2],$index$:l[3],$tag$:s.tagName.toLowerCase(),$elm$:s,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},t.push(u),s.removeAttribute(L),e.$children$||(e.$children$=[]),e.$children$[u.$index$]=u,e=u,n&&"0"===u.$depth$&&(n[u.$index$]=u.$elm$))),d=s.childNodes.length-1;d>=0;d--)Ve(e,t,r,n,a,s.childNodes[d],o);if(s.shadowRoot)for(d=s.shadowRoot.childNodes.length-1;d>=0;d--)Ve(e,t,r,n,a,s.shadowRoot.childNodes[d],o)}else if(8===s.nodeType)l=s.nodeValue.split("."),l[1]!==o&&"0"!==l[1]||(c=l[0],u={$flags$:0,$hostId$:l[1],$nodeId$:l[2],$depth$:l[3],$index$:l[4],$elm$:s,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},c===P?(u.$elm$=s.nextSibling,u.$elm$&&3===u.$elm$.nodeType&&(u.$text$=u.$elm$.textContent,t.push(u),s.remove(),e.$children$||(e.$children$=[]),e.$children$[u.$index$]=u,n&&"0"===u.$depth$&&(n[u.$index$]=u.$elm$))):u.$hostId$===o&&(c===M?(u.$tag$="slot",l[5]?s["s-sn"]=u.$name$=l[5]:s["s-sn"]="",s["s-sr"]=!0,i.shadowDom&&n&&(u.$elm$=y.createElement(u.$tag$),u.$name$&&u.$elm$.setAttribute("name",u.$name$),s.parentNode.insertBefore(u.$elm$,s),s.remove(),"0"===u.$depth$&&(n[u.$index$]=u.$elm$)),r.push(u),e.$children$||(e.$children$=[]),e.$children$[u.$index$]=u):c===C&&(i.shadowDom&&n?s.remove():i.slotRelocation&&(a["s-cr"]=s,s["s-cn"]=!0))));else if(e&&"style"===e.$tag$){const t=J(null,s.textContent);t.$elm$=s,t.$index$="0",e.$children$=[t]}},Ge=(e,t)=>{if(1===e.nodeType){let r=0;for(;r<e.childNodes.length;r++)Ge(e.childNodes[r],t);if(e.shadowRoot)for(r=0;r<e.shadowRoot.childNodes.length;r++)Ge(e.shadowRoot.childNodes[r],t)}else if(8===e.nodeType){const r=e.nodeValue.split(".");r[0]===R&&(t.set(r[1]+"."+r[2],e),e.nodeValue="",e["s-en"]=r[3])}},He=(e,t)=>null==e||X(e)?e:i.propBoolean&&4&t?"false"!==e&&(""===e||!!e):i.propNumber&&2&t?parseFloat(e):i.propString&&1&t?String(e):e,qe=(e,t)=>it(e).$instanceValues$.get(t),We=(e,t,r,n)=>{const a=it(e),s=i.lazyLoad?a.$hostElement$:e,o=a.$instanceValues$.get(t),c=a.$flags$,l=i.lazyLoad?a.$lazyInstance$:s;if(r=He(r,n.$members$[t][0]),(!i.lazyLoad||!(8&c)||void 0===o)&&r!==o&&(a.$instanceValues$.set(t,r),i.isDev&&(1024&a.$flags$?lt(`The state/prop "${t}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,"\nElement",s,"\nNew value",r,"\nOld value",o):2048&a.$flags$&&lt(`The state/prop "${t}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,"\nElement",s,"\nNew value",r,"\nOld value",o)),!i.lazyLoad||l)){if(i.watchCallback&&n.$watchers$&&128&c){const e=n.$watchers$[t];e&&e.map(e=>{try{l[e](r,o,t)}catch(i){st(i,s)}})}if(i.updatable&&2===(18&c)){if(i.cmpShouldUpdate&&l.componentShouldUpdate&&!1===l.componentShouldUpdate(r,o,t))return;Ce(a,!1)}}},$e=(e,t,r)=>{if(i.member&&t.$members$){i.watchCallback&&e.watchers&&(t.$watchers$=e.watchers);const n=Object.entries(t.$members$),a=e.prototype;if(n.map(([e,[n]])=>{(i.prop||i.state)&&(31&n||(!i.lazyLoad||2&r)&&32&n)?Object.defineProperty(a,e,{get(){return qe(this,e)},set(a){if(i.isDev){const i=it(this);0===(1&r)&&0===(8&i.$flags$)&&0!==(31&n)&&0===(1024&n)&&lt(`@Prop() "${e}" on <${t.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`)}We(this,e,a,t)},configurable:!0,enumerable:!0}):i.lazyLoad&&i.method&&1&r&&64&n&&Object.defineProperty(a,e,{value(...t){const r=it(this);return r.$onInstancePromise$.then(()=>r.$lazyInstance$[e](...t))}})}),i.observeAttribute&&(!i.lazyLoad||1&r)){const r=new Map;a.attributeChangedCallback=function(e,t,i){v.jmp(()=>{const t=r.get(e);if(this.hasOwnProperty(t))i=this[t],delete this[t];else if(a.hasOwnProperty(t)&&"number"===typeof this[t]&&this[t]==i)return;this[t]=(null!==i||"boolean"!==typeof this[t])&&i})},e.observedAttributes=n.filter(([e,t])=>15&t[0]).map(([e,n])=>{const a=n[1]||e;return r.set(a,e),i.reflect&&512&n[0]&&t.$attrsToReflect$.push([e,a]),a})}}return e},Ze=async(e,t,n,a,s)=>{if((i.lazyLoad||i.hydrateServerSide||i.style)&&0===(32&t.$flags$)){if(i.lazyLoad||i.hydrateClientSide){if(t.$flags$|=32,s=dt(n,t,a),s.then){const e=k(`st:load:${n.$tagName$}:${t.$modeName$}`,`[Stencil] Load module for <${n.$tagName$}>`);s=await s,e()}if((i.isDev||i.isDebug)&&!s)throw new Error(`Constructor for "${n.$tagName$}#${t.$modeName$}" was not found`);i.member&&!s.isProxied&&(i.watchCallback&&(n.$watchers$=s.watchers),$e(s,n,2),s.isProxied=!0);const e=F("createInstance",n.$tagName$);i.member&&(t.$flags$|=8);try{new s(t)}catch(l){st(l)}i.member&&(t.$flags$&=-9),i.watchCallback&&(t.$flags$|=128),e(),Xe(t.$lazyInstance$)}else s=e.constructor,t.$flags$|=32,customElements.whenDefined(n.$tagName$).then(()=>t.$flags$|=128);if(i.style&&s.style){let a=s.style;i.mode&&"string"!==typeof a&&(a=a[t.$modeName$=H(e)],i.hydrateServerSide&&t.$modeName$&&e.setAttribute("s-mode",t.$modeName$));const o=G(n,t.$modeName$);if(!ht.has(o)){const e=F("registerStyles",n.$tagName$);!i.hydrateServerSide&&i.shadowDom&&i.shadowDomShim&&8&n.$flags$&&(a=await r.e("chunk-2d2080c7").then(r.bind(null,"a2aa")).then(e=>e.scopeCss(a,o,!1))),z(o,a,!!(1&n.$flags$)),e()}}}const o=t.$ancestorComponent$,c=()=>Ce(t,!0);i.asyncLoading&&o&&o["s-rc"]?o["s-rc"].push(c):c()},Xe=e=>{i.lazyLoad&&i.connectedCallback&&Ne(e,"connectedCallback")},Ye=e=>{if(0===(1&v.$flags$)){const t=it(e),r=t.$cmpMeta$,n=F("connectedCallback",r.$tagName$);if(i.hostListenerTargetParent&&T(e,t,r.$listeners$,!0),1&t.$flags$)T(e,t,r.$listeners$,!1),Xe(t.$lazyInstance$);else{let n;if(t.$flags$|=1,i.hydrateClientSide&&(n=e.getAttribute(I),n)){if(i.shadowDom&&_&&1&r.$flags$){const t=i.mode?B(e.shadowRoot,r,e.getAttribute("s-mode")):B(e.shadowRoot,r);e.classList.remove(t+"-h",t+"-s")}Be(e,r.$tagName$,n,t)}if(i.slotRelocation&&!n&&(i.hydrateServerSide||(i.slot||i.shadowDom)&&12&r.$flags$)&&Je(e),i.asyncLoading){let r=e;while(r=r.parentNode||r.host)if(i.hydrateClientSide&&1===r.nodeType&&r.hasAttribute("s-id")&&r["s-p"]||r["s-p"]){Ae(t,t.$ancestorComponent$=r);break}}i.prop&&!i.hydrateServerSide&&r.$members$&&Object.entries(r.$members$).map(([t,[r]])=>{if(31&r&&e.hasOwnProperty(t)){const r=e[t];delete e[t],e[t]=r}}),i.initializeNextTick?_t(()=>Ze(e,t,r)):Ze(e,t,r)}n()}},Je=e=>{const t=e["s-cr"]=y.createComment(i.isDebug?`content-ref (host=${e.localName})`:"");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},Qe=e=>{if(0===(1&v.$flags$)){const t=it(e),r=i.lazyLoad?t.$lazyInstance$:e;i.hostListener&&t.$rmListeners$&&(t.$rmListeners$.map(e=>e()),t.$rmListeners$=void 0),i.cssVarShim&&v.$cssShim$&&v.$cssShim$.removeHost(e),i.lazyLoad&&i.disconnectedCallback&&Ne(r,"disconnectedCallback"),i.cmpDidUnload&&Ne(r,"componentDidUnload")}},Ke=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};i.member&&(r.$members$=t[2]),i.hostListener&&(r.$listeners$=t[3]),i.watchCallback&&(r.$watchers$=e.$watchers$),i.reflect&&(r.$attrsToReflect$=[]),i.shadowDom&&!_&&1&r.$flags$&&(r.$flags$|=8);const n=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){nt(this,r)},connectedCallback(){Ye(this),i.connectedCallback&&n&&n.call(this)},disconnectedCallback(){Qe(this),i.disconnectedCallback&&a&&a.call(this)},__attachShadow(){_?i.shadowDelegatesFocus?this.attachShadow({mode:"open",delegatesFocus:!!(16&r.$flags$)}):this.attachShadow({mode:"open"}):this.shadowRoot=this}}),e.is=r.$tagName$,$e(e,r,3)},et=e=>{const t=new URL(e,v.$resourcesUrl$);return t.origin!==g.location.origin?t.href:t.pathname},tt=e=>v.$resourcesUrl$=e,rt=new WeakMap,it=e=>rt.get(e),nt=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return i.isDev&&(r.$renderCount$=0),i.method&&i.lazyLoad&&(r.$onInstancePromise$=new Promise(e=>r.$onInstanceResolve$=e)),i.asyncLoading&&(r.$onReadyPromise$=new Promise(e=>r.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[]),T(e,r,t.$listeners$,!1),rt.set(e,r)},at=(e,t)=>t in e,st=(e,t)=>(c||console.error)(e,t),ot=i.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],ct=(...e)=>console.error(...ot,...e),lt=(...e)=>console.warn(...ot,...e),ut=new Map,dt=(e,t,n)=>{const a=e.$tagName$.replace(/-/g,"_"),s=e.$lazyBundleId$;if(i.isDev&&"string"!==typeof s)return void ct(`Trying to lazily load component <${e.$tagName$}> with style mode "${t.$modeName$}", but it does not exist.`);const o=!i.hotModuleReplacement&&ut.get(s);return o?o[a]:r("bc66")(`./${s}.entry.js${i.hotModuleReplacement&&n?"?s-hmr="+n:""}`).then(e=>(i.hotModuleReplacement||ut.set(s,e),e[a]),st)},ht=new Map,pt=[],ft=[],bt=[],mt=[],gt=(e,t)=>r=>{e.push(r),m||(m=!0,t&&4&v.$flags$?_t(vt):v.raf(vt))},yt=e=>{for(let r=0;r<e.length;r++)try{e[r](performance.now())}catch(t){st(t)}e.length=0},Ot=(e,t)=>{let r=0,i=0;while(r<e.length&&(i=performance.now())<t)try{e[r++](i)}catch(n){st(n)}r===e.length?e.length=0:0!==r&&e.splice(0,r)},vt=()=>{if(i.asyncQueue&&b++,yt(ft),i.asyncQueue){const e=2===(6&v.$flags$)?performance.now()+14*Math.ceil(.1*b):1/0;Ot(bt,e),Ot(mt,e),bt.length>0&&(mt.push(...bt),bt.length=0),(m=ft.length+bt.length+mt.length>0)?v.raf(vt):b=0}else yt(bt),(m=ft.length>0)&&v.raf(vt)},_t=e=>w().then(e),jt=gt(bt,!0),wt={isDev:!!i.isDev,isBrowser:!0,isServer:!1,isTesting:!!i.isTesting}},3111:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var i=r("7c1d"),n=r("3886"),a=r("690a"),s=r("b7bd");function o(){const e=new a["a"];return e.attributes.add(s["a"].POSITION,"vec3"),e.attributes.add(s["a"].COLOR,"vec4"),e.attributes.add(s["a"].SIZE,"float"),e.varyings.add("vcolor","vec4"),e.varyings.add("vsize","float"),e.vertex.uniforms.add("transform","mat4").add("viewport","vec4").add("pixelRatio","float"),e.include(i["a"]),e.vertex.code.add(n["a"]`void main(void) {
  561. vec4 posProj = transform * vec4(position, 0);
  562. gl_Position = alignToPixelCenter(posProj, viewport.zw);
  563. vcolor = color / 1.2;
  564. vsize = size * 5.0 * pixelRatio;
  565. gl_PointSize = vsize;
  566. }`),e.fragment.code.add(n["a"]`void main() {
  567. float cap = 0.7;
  568. float scale = 1.0 / cap;
  569. float helper = clamp(length(abs(gl_PointCoord - vec2(0.5))), 0.0, cap);
  570. float alpha = clamp((cap - helper) * scale, 0.0, 1.0);
  571. float intensity = alpha * alpha * alpha;
  572. if (vsize < 3.0) {
  573. intensity *= 0.5;
  574. }
  575. gl_FragColor = vec4(vcolor.xyz, intensity);
  576. }`),e}const c=Object.freeze({__proto__:null,build:o})},"32ed":function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return c})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return a}));r("7f83");function i(e,t){const r=t[0]-e[0],i=t[1]-e[1];if(e.length>2&&t.length>2){const n=e[2]-t[2];return Math.sqrt(r*r+i*i+n*n)}return Math.sqrt(r*r+i*i)}function n(e,t,r){const i=e[0]+r*(t[0]-e[0]),n=e[1]+r*(t[1]-e[1]);return e.length>2&&t.length>2?[i,n,e[2]+r*(t[2]-e[2])]:[i,n]}function a(e,t,r,i){const[n,a]=t,[s,o]=r[i],[c,l]=r[i+1],u=c-s,d=l-o,h=u*u+d*d,p=(n-s)*u+(a-o)*d,f=Math.min(1,Math.max(0,p/h));return e[0]=s+u*f,e[1]=o+d*f,e}function s(e,t){return n(e,t,.5)}function o(e){const t=e.length;let r=0;for(let n=0;n<t-1;++n)r+=i(e[n],e[n+1]);return r}function c(e,t){if(t<=0)return e[0];const r=e.length;let a=0;for(let s=0;s<r-1;++s){const r=i(e[s],e[s+1]);if(t-a<r){const i=(t-a)/r;return n(e[s],e[s+1],i)}a+=r}return e[r-1]}function l(e,t,r){const i=e.length;let n=0,a=0,s=0;for(let o=0;o<i;o++){const c=e[o],l=e[(o+1)%i];let u=2;n+=c[0]*l[1]-l[0]*c[1],c.length>2&&l.length>2&&r&&(a+=c[0]*l[2]-l[0]*c[2],u=3),c.length>u&&l.length>u&&t&&(s+=c[0]*l[u]-l[0]*c[u])}return n<=0&&a<=0&&s<=0}function u(e){if("rings"in e){for(const t of e.rings)t.length<3||t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]||t.push([t[0][0],t[0][1]]);if(e.rings.length>0&&!l(e.rings[0],e.hasM,e.hasZ))for(let t=0;t<e.rings.length;++t)e.rings[t]=e.rings[t].reverse()}}},"333a":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("5c00");let l=i=class extends a["a"]{constructor(){super(...arguments),this.screenLength=0,this.minWorldLength=0}clone(){return new i({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})}};Object(n["a"])([Object(s["b"])(c["b"])],l.prototype,"screenLength",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0,default:0}})],l.prototype,"minWorldLength",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],l.prototype,"maxWorldLength",void 0),l=i=Object(n["a"])([Object(o["a"])("esri.symbols.support.Symbol3DVerticalOffset")],l)},3349:function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return V})),r.d(t,"e",(function(){return L})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return b})),r.d(t,"h",(function(){return U})),r.d(t,"i",(function(){return w})),r.d(t,"j",(function(){return T})),r.d(t,"k",(function(){return x})),r.d(t,"l",(function(){return O})),r.d(t,"m",(function(){return s})),r.d(t,"n",(function(){return _})),r.d(t,"o",(function(){return S})),r.d(t,"p",(function(){return A})),r.d(t,"q",(function(){return F})),r.d(t,"r",(function(){return P})),r.d(t,"s",(function(){return a})),r.d(t,"t",(function(){return C})),r.d(t,"u",(function(){return v})),r.d(t,"v",(function(){return m}));var i=r("4212");function n(e,t){return e[0]=t[0],e[1]=t[1],e}function a(e,t,r){return e[0]=t,e[1]=r,e}function s(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function o(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function l(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function u(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function d(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function h(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function p(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function f(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function b(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function m(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e}function g(e,t){const r=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(r*r+i*i)}function y(e,t){const r=t[0]-e[0],i=t[1]-e[1];return r*r+i*i}function O(e){const t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function v(e){const t=e[0],r=e[1];return t*t+r*r}function _(e,t){return e[0]=-t[0],e[1]=-t[1],e}function j(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function w(e,t){const r=t[0],i=t[1];let n=r*r+i*i;return n>0&&(n=1/Math.sqrt(n),e[0]=t[0]*n,e[1]=t[1]*n),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]}function T(e,t,r){const i=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=i,e}function S(e,t,r,i){const n=t[0],a=t[1];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e}function E(e,t){t=t||1;const r=2*Object(i["b"])()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function A(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[2]*n,e[1]=r[1]*i+r[3]*n,e}function C(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[2]*n+r[4],e[1]=r[1]*i+r[3]*n+r[5],e}function R(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[3]*n+r[6],e[1]=r[1]*i+r[4]*n+r[7],e}function M(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[4]*n+r[12],e[1]=r[1]*i+r[5]*n+r[13],e}function P(e,t,r,i){const n=t[0]-r[0],a=t[1]-r[1],s=Math.sin(i),o=Math.cos(i);return e[0]=n*o-a*s+r[0],e[1]=n*s+a*o+r[1],e}function I(e,t){const r=e[0],i=e[1],n=t[0],a=t[1];let s=r*r+i*i;s>0&&(s=1/Math.sqrt(s));let o=n*n+a*a;o>0&&(o=1/Math.sqrt(o));const c=(r*n+i*a)*s*o;return c>1?0:c<-1?Math.PI:Math.acos(c)}function D(e){return"vec2("+e[0]+", "+e[1]+")"}function L(e,t){return e[0]===t[0]&&e[1]===t[1]}function N(e,t){const r=e[0],n=e[1],a=t[0],s=t[1];return Math.abs(r-a)<=i["a"]*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-s)<=i["a"]*Math.max(1,Math.abs(n),Math.abs(s))}function F(e,t,r,i,n){let a=t[0]-r[0],s=t[1]-r[1];const o=(i[0]*a+i[1]*s)*(n-1);return a=i[0]*o,s=i[1]*o,e[0]=t[0]+a,e[1]=t[1]+s,e}const k=O,U=o,z=c,B=l,V=g,G=y,H=v;Object.freeze({__proto__:null,copy:n,set:a,add:s,subtract:o,multiply:c,divide:l,ceil:u,floor:d,min:h,max:p,round:f,scale:b,scaleAndAdd:m,distance:g,squaredDistance:y,length:O,squaredLength:v,negate:_,inverse:j,normalize:w,dot:x,cross:T,lerp:S,random:E,transformMat2:A,transformMat2d:C,transformMat3:R,transformMat4:M,rotate:P,angle:I,str:D,exactEquals:L,equals:N,projectAndScale:F,len:k,sub:U,mul:z,div:B,dist:V,sqrDist:G,sqrLen:H})},"33e2":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var i=r("d981"),n=r("3886");function a(e){e.fragment.uniforms.add("texWaveNormal","sampler2D"),e.fragment.uniforms.add("texWavePerturbation","sampler2D"),e.fragment.uniforms.add("waveParams","vec4"),e.fragment.uniforms.add("waveDirection","vec2"),e.include(i["b"]),e.fragment.code.add(n["a"]`const vec2 FLOW_JUMP = vec2(6.0/25.0, 5.0/24.0);
  577. vec2 textureDenormalized2D(sampler2D _tex, vec2 _uv) {
  578. return 2.0 * texture2D(_tex, _uv).rg - 1.0;
  579. }
  580. float sampleNoiseTexture(vec2 _uv) {
  581. return texture2D(texWavePerturbation, _uv).b;
  582. }
  583. vec3 textureDenormalized3D(sampler2D _tex, vec2 _uv) {
  584. return 2.0 * texture2D(_tex, _uv).rgb - 1.0;
  585. }
  586. float computeProgress(vec2 uv, float time) {
  587. return fract(time);
  588. }
  589. float computeWeight(vec2 uv, float time) {
  590. float progress = computeProgress(uv, time);
  591. return 1.0 - abs(1.0 - 2.0 * progress);
  592. }
  593. vec3 computeUVPerturbedWeigth(sampler2D texFlow, vec2 uv, float time, float phaseOffset) {
  594. float flowStrength = waveParams[2];
  595. float flowOffset = waveParams[3];
  596. vec2 flowVector = textureDenormalized2D(texFlow, uv) * flowStrength;
  597. float progress = computeProgress(uv, time + phaseOffset);
  598. float weight = computeWeight(uv, time + phaseOffset);
  599. vec2 result = uv;
  600. result -= flowVector * (progress + flowOffset);
  601. result += phaseOffset;
  602. result += (time - progress) * FLOW_JUMP;
  603. return vec3(result, weight);
  604. }
  605. const float TIME_NOISE_TEXTURE_REPEAT = 0.3737;
  606. const float TIME_NOISE_STRENGTH = 7.77;
  607. vec3 getWaveLayer(sampler2D _texNormal, sampler2D _dudv, vec2 _uv, vec2 _waveDir, float time) {
  608. float waveStrength = waveParams[0];
  609. vec2 waveMovement = time * -_waveDir;
  610. float timeNoise = sampleNoiseTexture(_uv * TIME_NOISE_TEXTURE_REPEAT) * TIME_NOISE_STRENGTH;
  611. vec3 uv_A = computeUVPerturbedWeigth(_dudv, _uv + waveMovement, time + timeNoise, 0.0);
  612. vec3 uv_B = computeUVPerturbedWeigth(_dudv, _uv + waveMovement, time + timeNoise, 0.5);
  613. vec3 normal_A = textureDenormalized3D(_texNormal, uv_A.xy) * uv_A.z;
  614. vec3 normal_B = textureDenormalized3D(_texNormal, uv_B.xy) * uv_B.z;
  615. vec3 mixNormal = normalize(normal_A + normal_B);
  616. mixNormal.xy *= waveStrength;
  617. mixNormal.z = sqrt(1.0 - dot(mixNormal.xy, mixNormal.xy));
  618. return mixNormal;
  619. }
  620. vec4 getSurfaceNormalAndFoam(vec2 _uv, float _time) {
  621. float waveTextureRepeat = waveParams[1];
  622. vec3 normal = getWaveLayer(texWaveNormal, texWavePerturbation, _uv * waveTextureRepeat, waveDirection, _time);
  623. float foam = normals2FoamIntensity(normal, waveParams[0]);
  624. return vec4(normal, foam);
  625. }`)}function s(e,t){e.setUniform4f("waveParams",t.waveStrength,t.waveTextureRepeat,t.flowStrength,t.flowOffset),e.setUniform2f("waveDirection",t.waveDirection[0]*t.waveVelocity,t.waveDirection[1]*t.waveVelocity)}},3423:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("9d1d");function n(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(function(e,r){if(""===r)return"$";const n=Object(i["b"])(r,t),a=null==n?"":n;if(void 0===a)throw new Error(`could not find key "${r}" in template`);return a.toString()}))}class a{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof a&&(this.message=t&&n(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},"343a":function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return m}));var i=r("2eab"),n=r("ce50"),a=r("f4cc"),s=r("e041"),o=r("0224"),c=r("e9a4"),l=r("1091");const u={};async function d(e,t){try{return{data:(await g(e,t)).data,baseUrl:Object(s["I"])(e),styleUrl:e}}catch(r){return Object(a["u"])(r),null}}function h(e,t,r){const i=t&&t.portal||o["a"].getDefault();let n;const a=`${i.url} - ${i.user&&i.user.username} - ${e}`;return u[a]||(u[a]=p(e,i,r).then(e=>(n=e,e.fetchData())).then(t=>({data:t,baseUrl:n.itemUrl,styleName:e}))),u[a]}function p(e,t,r){return t.load(r).then(()=>{const i=new c["a"]({disableExtraQuery:!0,query:`owner:${y} AND type:${O} AND typekeywords:"${e}"`});return t.queryItems(i,r)}).then(({results:t})=>{let i=null;const a=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t)if(e.typeKeywords.some(e=>e.toLowerCase()===a)&&e.type===O&&e.owner===y){i=e;break}if(!i)throw new n["a"]("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return i.load(r)})}function f(e,t,r){return e.styleUrl?d(e.styleUrl,r):e.styleName?h(e.styleName,t,r):Promise.reject(new n["a"]("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function b(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function m(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!Object(l["c"])())for(const r of e.formatInfos)if("gltf"===r.type)return r.href;return e.webRef}function g(e,t){const r={responseType:"json",query:{f:"json"},...t};return Object(i["default"])(Object(s["F"])(e),r)}const y="esri_en",O="Style",v="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},3544:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var i=r("b2b2");const n={dash:[4,3],dot:[1,3],"long-dash":[8,3],"short-dash":[4,1],"short-dot":[1,1]},a={dash:n.dash,"dash-dot":[...n.dash,...n.dot],dot:n.dot,"long-dash":n["long-dash"],"long-dash-dot":[...n["long-dash"],...n.dot],"long-dash-dot-dot":[...n["long-dash"],...n.dot,...n.dot],none:null,"short-dash":n["short-dash"],"short-dash-dot":[...n["short-dash"],...n["short-dot"]],"short-dash-dot-dot":[...n["short-dash"],...n["short-dot"],...n["short-dot"]],"short-dot":n["short-dot"],solid:null},s=8;function o(e,t=2){return Object(i["j"])(e)?e:{pattern:e.slice(),pixelRatio:t}}function c(e,t=2){return{pattern:[e,e],pixelRatio:t}}function l(e){return Object(i["k"])(e)&&"style"===e.type?u(e.style):null}function u(e){return Object(i["k"])(e)?o(a[e],s):null}},3563:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));r("c120");var i=r("b2b2");function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],n=t[r];if(i.length!==n.length)return!1;for(let e=0;e<i.length;e++)if(i[e]!==n[e])return!1}return!0}function a(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function s(e,t){return!!d(e.spatialReference,t.spatialReference)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.m===t.m}function o(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&!!d(e.spatialReference,t.spatialReference)&&a(e.paths,t.paths)}function c(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&!!d(e.spatialReference,t.spatialReference)&&a(e.rings,t.rings)}function l(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&!!d(e.spatialReference,t.spatialReference)&&n(e.points,t.points)}function u(e,t){return e.hasZ===t.hasZ&&e.hasM===t.hasM&&!!d(e.spatialReference,t.spatialReference)&&e.xmin===t.xmin&&e.ymin===t.ymin&&e.zmin===t.zmin&&e.xmax===t.xmax&&e.ymax===t.ymax&&e.zmax===t.zmax}function d(e,t){return e===t||e&&t&&e.equals(t)}function h(e,t){if(e===t)return!0;if(Object(i["j"])(e)||Object(i["j"])(t))return!1;if(e.type!==t.type)return!1;switch(e.type){case"point":return s(e,t);case"extent":return u(e,t);case"polyline":return o(e,t);case"polygon":return c(e,t);case"multipoint":return l(e,t);case"mesh":return!1;default:return}}function p(e,t){if(e===t)return!0;if(!e||!t)return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const n of r)if(e[n]!==t[n])return!1;return!0}function f(e,t){return e===t||null!=e&&null!=t&&e.objectId===t.objectId&&!!h(e.geometry,t.geometry)&&!!p(e.attributes,t.attributes)}},"35b3":function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return i}));var i,n=r("b2b2"),a=r("003f"),s=r("2765"),o=r("fa1e"),c=r("7c51");class l extends a["a"]{constructor(e,t){super(),this.type=s["a"].Material,this.supportsEdges=!1,this._visible=!0,this._renderPriority=0,this._insertOrder=0,this._vertexAttributeLocations=o["a"],this._parameters=Object(c["e"])(e,t),this.validateParameters(this._parameters)}dispose(){}get parameters(){return this._parameters}update(e){return!1}setParameters(e){Object(c["k"])(this._parameters,e)&&(this.validateParameters(this._parameters),this.parametersChanged())}validateParameters(e){}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.parametersChanged())}shouldRender(e){return this.isVisible()&&this.isVisibleInPass(e.pass)&&0!=(this.renderOccluded&e.renderOccludedMask)}isVisibleInPass(e){return!0}get renderOccluded(){return this.parameters.renderOccluded}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this.parametersChanged())}get insertOrder(){return this._insertOrder}set insertOrder(e){e!==this._insertOrder&&(this._insertOrder=e,this.parametersChanged())}get vertexAttributeLocations(){return this._vertexAttributeLocations}isVisible(){return this._visible}parametersChanged(){Object(n["k"])(this.repository)&&this.repository.materialChanged(this)}}!function(e){e[e.Occlude=1]="Occlude",e[e.Transparent=2]="Transparent",e[e.OccludeAndTransparent=4]="OccludeAndTransparent",e[e.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",e[e.Opaque=16]="Opaque"}(i||(i={}));const u={renderOccluded:i.Occlude}},"35c9":function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i,n=r("a4ee"),a=r("2c4f"),s=r("ce50"),o=r("7ffa"),c=r("b2b2"),l=r("59b2"),u=(r("cea0"),r("448d")),d=r("d386"),h=r("09db"),p=r("05c5"),f=r("c128"),b=r("6005"),m=r("8d66"),g=r("e1bb"),y=r("c528"),O=r("a957"),v=r("16e0");const _=a["a"].ofType({base:null,key:"type",typeMap:{extrude:p["a"],fill:f["a"],icon:b["a"],line:m["a"],object:g["a"],text:O["a"],water:v["a"]}}),j=a["a"].ofType({base:null,key:"type",typeMap:{extrude:p["a"],fill:f["a"],icon:b["a"],line:m["a"],object:g["a"],water:v["a"]}});let w=i=class extends y["a"]{constructor(e){super(e),this.symbolLayers=new _,this.type="polygon-3d"}writeSymbolLayers(e,t,r,i){const n=e.filter(e=>"text"!==e.type);if(i&&i.messages&&n.length<e.length){const t=e.find(e=>"text"===e.type);i.messages.push(new s["a"]("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PolygonSymbol3D",{symbolLayer:t}))}t[r]=n.map(e=>e.write({},i)).toArray()}clone(){return new i({styleOrigin:Object(o["a"])(this.styleOrigin),symbolLayers:Object(o["a"])(this.symbolLayers),thumbnail:Object(o["a"])(this.thumbnail)})}static fromJSON(e){const t=new i;if(t.read(e),2===t.symbolLayers.length&&"fill"===t.symbolLayers.getItemAt(0).type&&"line"===t.symbolLayers.getItemAt(1).type){const r=t.symbolLayers.getItemAt(0),i=t.symbolLayers.getItemAt(1);!i.enabled||e.symbolLayers&&e.symbolLayers[1]&&!1===e.symbolLayers[1].enable||(r.outline={size:i.size,color:Object(c["k"])(i.material)?i.material.color:null}),t.symbolLayers.removeAt(1)}return t}static fromSimpleFillSymbol(e){return new i({symbolLayers:[f["a"].fromSimpleFillSymbol(e)]})}};Object(n["a"])([Object(l["b"])({type:_,json:{type:j}})],w.prototype,"symbolLayers",void 0),Object(n["a"])([Object(h["a"])("web-scene","symbolLayers")],w.prototype,"writeSymbolLayers",null),Object(n["a"])([Object(u["a"])({PolygonSymbol3D:"polygon-3d"},{readOnly:!0})],w.prototype,"type",void 0),w=i=Object(n["a"])([Object(d["a"])("esri.symbols.PolygonSymbol3D")],w);const x=w},3626:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("caf1"),n=r("4377"),a=r("3886");function s(e){e.include(n["a"]),e.code.add(a["a"]`
  626. vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) {
  627. // workaround for artifacts in OSX using Intel Iris Pro
  628. // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475
  629. vec3 internalMixed = internalColor * textureColor;
  630. vec3 allMixed = internalMixed * externalColor;
  631. if (mode == ${a["a"].int(i["a"].Multiply)}) {
  632. return allMixed;
  633. }
  634. else if (mode == ${a["a"].int(i["a"].Ignore)}) {
  635. return internalMixed;
  636. }
  637. else if (mode == ${a["a"].int(i["a"].Replace)}) {
  638. return externalColor;
  639. }
  640. else {
  641. // tint (or something invalid)
  642. float vIn = rgb2v(internalMixed);
  643. vec3 hsvTint = rgb2hsv(externalColor);
  644. vec3 hsvOut = vec3(hsvTint.x, hsvTint.y, vIn * hsvTint.z);
  645. return hsv2rgb(hsvOut);
  646. }
  647. }
  648. float mixExternalOpacity(float internalOpacity, float textureOpacity, float externalOpacity, int mode) {
  649. // workaround for artifacts in OSX using Intel Iris Pro
  650. // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475
  651. float internalMixed = internalOpacity * textureOpacity;
  652. float allMixed = internalMixed * externalOpacity;
  653. if (mode == ${a["a"].int(i["a"].Ignore)}) {
  654. return internalMixed;
  655. }
  656. else if (mode == ${a["a"].int(i["a"].Replace)}) {
  657. return externalOpacity;
  658. }
  659. else {
  660. // multiply or tint (or something invalid)
  661. return allMixed;
  662. }
  663. }
  664. `)}},"365a":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i=r("a4ee"),n=r("fc29"),a=r("ce6d"),s=r("9096"),o=r("a5d8"),c=r("e92d"),l=r("b2b2"),u=r("fab3"),d=r("59b2"),h=(r("b50f"),r("c120"),r("cea0"),r("d386"));let p=class extends(Object(s["b"])(Object(o["b"])(Object(u["b"])(a["a"].EventedMixin(n["a"]))))){constructor(e){super(e),this.layer=null,this.parent=null}initialize(){this.when().catch(e=>{if("layerview:create-error"!==e.name){const t=this.layer&&this.layer.id||"no id",r=this.layer&&this.layer.title||"no title";throw c["a"].getLogger(this.declaredClass).error("#resolve()",`Failed to resolve layer view (layer title: '${r}', id: '${t}')`,e),e}})}get fullOpacity(){return Object(l["u"])(this.get("layer.opacity"),1)*Object(l["u"])(this.get("parent.fullOpacity"),1)}get suspended(){return!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&!0===this.layer.legendEnabled}get updating(){var e;return!!(null!=(e=this.updatingHandles)&&e.updating||this.isUpdating())}get updatingProgress(){return this.updating?0:1}get visible(){var e;return!0===(null==(e=this.layer)?void 0:e.visible)}set visible(e){void 0!==e?this._override("visible",e):this._clearOverride("visible")}canResume(){var e,t,r;return this.visible&&(null==(e=this.layer)?void 0:e.loaded)&&!(null!=(t=this.parent)&&t.suspended)&&(null==(r=this.view)?void 0:r.ready)||!1}getSuspendInfo(){const e=this.parent&&this.parent.suspended?this.parent.suspendInfo:{},t=this;return t.view&&t.view.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0),this.visible||(e.layerInvisible=!0),e}isUpdating(){return!1}};Object(i["a"])([Object(d["b"])()],p.prototype,"fullOpacity",null),Object(i["a"])([Object(d["b"])()],p.prototype,"layer",void 0),Object(i["a"])([Object(d["b"])()],p.prototype,"parent",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],p.prototype,"suspended",null),Object(i["a"])([Object(d["b"])({readOnly:!0})],p.prototype,"suspendInfo",null),Object(i["a"])([Object(d["b"])({readOnly:!0})],p.prototype,"legendEnabled",null),Object(i["a"])([Object(d["b"])({type:Boolean,readOnly:!0})],p.prototype,"updating",null),Object(i["a"])([Object(d["b"])({readOnly:!0})],p.prototype,"updatingProgress",null),Object(i["a"])([Object(d["b"])()],p.prototype,"visible",null),Object(i["a"])([Object(d["b"])()],p.prototype,"view",void 0),p=Object(i["a"])([Object(h["a"])("esri.views.layers.LayerView")],p);const f=p},"36b8":function(e,t,r){"use strict";function i(e){return"function"==typeof e}function n(e,t,r,n){return i(e)?e(t,r,n):e}function a(e){return[e.r,e.g,e.b,e.a]}function s(e,t,r){const i=" /-,\n",n=e=>{let t=e.length;for(;t--;)if(-1===i.indexOf(e.charAt(t)))return!1;return!0},a=[];let s=0,c=-1;do{if(c=t.indexOf("[",s),c>=s){if(c>s){const e=t.substr(s,c-s);a.push([e,null,n(e)])}if(s=c+1,c=t.indexOf("]",s),c>=s){if(c>s){const r=e[t.substr(s,c-s)];r&&a.push([null,r,!1])}s=c+1}}}while(-1!==c);if(s<t.length-1){const e=t.substr(s);a.push([e,null,n(e)])}return e=>{let t="",i=null;for(const r of a){const[n,a,s]=r;if(n)s?i=n:(i&&(t+=i,i=null),t+=n);else{const r=e.attributes[a];r&&(i&&(t+=i,i=null),t+=r)}}return o(t,r)}}function o(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function c(e,t,r,i,n,a,s=!0){const o=t/n,c=r/a,l=Math.ceil(o/2),u=Math.ceil(c/2);for(let d=0;d<a;d++)for(let r=0;r<n;r++){const h=4*(r+(s?a-d-1:d)*n);let p=0,f=0,b=0,m=0,g=0,y=0,O=0;const v=(d+.5)*c;for(let i=Math.floor(d*c);i<(d+1)*c;i++){const n=Math.abs(v-(i+.5))/u,a=(r+.5)*o,s=n*n;for(let c=Math.floor(r*o);c<(r+1)*o;c++){let r=Math.abs(a-(c+.5))/l;const n=Math.sqrt(s+r*r);n>=-1&&n<=1&&(p=2*n*n*n-3*n*n+1,p>0&&(r=4*(c+i*t),O+=p*e[r+3],b+=p,e[r+3]<255&&(p=p*e[r+3]/250),m+=p*e[r],g+=p*e[r+1],y+=p*e[r+2],f+=p))}}i[h]=m/f,i[h+1]=g/f,i[h+2]=y/f,i[h+3]=O/b}}function l(e){return e?{r:e[0],g:e[1],b:e[2],a:e[3]/255}:{r:0,g:0,b:0,a:0}}function u(e){var t;return null==(t=e.data)?void 0:t.symbol}function d(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function h(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function p(e){return"CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type}function f(e){return"CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type}r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return g})),r.d(t,"h",(function(){return p})),r.d(t,"i",(function(){return d})),r.d(t,"j",(function(){return f})),r.d(t,"k",(function(){return h})),r.d(t,"l",(function(){return m})),r.d(t,"m",(function(){return c})),r.d(t,"n",(function(){return u}));const b=e=>isNaN(e)||!e?0:e,m=e=>{if(!e)return!1;for(const t of e)switch(t.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectOffset":return!0}return!1};function g(){return Promise.all([r.e("chunk-2d22cf8c"),r.e("chunk-252f2cfc")]).then(r.bind(null,"00ac"))}},"36cf":function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return O})),r.d(t,"c",(function(){return A})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return g})),r.d(t,"g",(function(){return T})),r.d(t,"h",(function(){return v})),r.d(t,"i",(function(){return _})),r.d(t,"j",(function(){return y})),r.d(t,"k",(function(){return C})),r.d(t,"l",(function(){return w})),r.d(t,"m",(function(){return x})),r.d(t,"n",(function(){return h})),r.d(t,"o",(function(){return E}));var i=r("d791"),n=r("e431"),a=r("0b2d"),s=r("f694"),o=r("5996"),c=r("3a35"),l=r("0d9f"),u=r("f895");function d(e){const{value:t,operations:r}=e;return{operations:r,value:r.create(t)}}function h(e,t,r){return e.operations.setExtent(e.value,t,r.value),r}function p(e){return{operations:e,value:e.create()}}function f(e,t,r=p(e)){return r.operations=e,e.copy(t,r.value),r}function b(e){return f(u["m"],Object(u["f"])(0,0,0,Object(s["e"])(e).radius))}const m=2**50;function g(){return f(l["c"],Object(l["g"])([0,0,0],[m,0,0],[0,m,0]))}function y(e,t,r){return e.operations.axisAt(e.value,t,c["a"].Z,r)}function O(e,t,r,i){return e.operations.axisAt(e.value,t,r,i)}function v(e,t,r){return e.operations.intersectRay(e.value,t,r)}function _(e,t,r){return e.operations.intersectRayClosestSilhouette(e.value,t,r)}function j(e,t){return e.operations.altitudeAt(e.value,t)}function w(e,t,r,i){return e.operations.setAltitudeAt(e.value,t,r,i)}function x(e,t,r,a){return t!==a&&Object(i["d"])(a,t),Object(n["y"])(S,a[12],a[13],a[14]),w(e,S,r,S),a[12]=S[0],a[13]=S[1],a[14]=S[2],a}function T(e,t,r){return e.operations.elevate(e.value,t,r.value)}const S=Object(a["f"])();function E(e,t,r,i,a){return a[0]=Object(n["j"])(e,t),a[1]=Object(n["j"])(e,r),a[2]=Object(n["j"])(e,i),a}function A(e,t,r,i,a){Object(n["m"])(r,e),Object(n["m"])(R,t),Object(n["t"])(R,R),Object(n["i"])(i,R,r),Object(n["i"])(a,i,r)}function C(e,t){return e?Object(s["g"])(t):t.isGeographic?o["a"].PlateCarree:t}const R=Object(a["f"])()},"36df":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return l}));var i,n=r("2aad"),a=r("d047"),s=r("58c2"),o=r("3886"),c=r("690a");function l(e){const t=new c["a"];return t.include(n["a"]),e.output===i.Blur&&(t.fragment.include(a["a"]),t.fragment.uniforms.add("normalMap","sampler2D").add("depthMap","sampler2D").add("tex","sampler2D").add("blurSize","vec2").add("projScale","float").add("nearFar","vec2"),t.fragment.code.add(o["a"]`
  665. void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
  666. float c = texture2D(tex, uv).r;
  667. float d = linearDepthFromTexture(depthMap, uv, nearFar);
  668. float ddiff = d - center_d;
  669. float w = exp(-r * r * ${o["a"].float(e.blurFalloff)} - ddiff * ddiff * sharpness);
  670. wTotal += w;
  671. bTotal += w * c;
  672. }
  673. `),t.fragment.code.add(o["a"]`
  674. void main(void) {
  675. float b = 0.0;
  676. float w_total = 0.0;
  677. float center_d = linearDepthFromTexture(depthMap, uv, nearFar);
  678. float sharpness = -0.05 * projScale/center_d;
  679. for (int r = -${o["a"].int(e.filterRadius)}; r <= ${o["a"].int(e.filterRadius)}; ++r) {
  680. float rf = float(r);
  681. vec2 uvOffset = uv + rf * blurSize;
  682. blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
  683. }
  684. gl_FragColor = vec4(b / w_total);
  685. }
  686. `)),e.output===i.SSAO&&(t.fragment.include(a["a"]),t.include(s["a"]),t.fragment.uniforms.add("normalMap","sampler2D").add("depthMap","sampler2D").add("intensity","float").add("projScale","float").add("radius","float").add("nearFar","vec2").add("screenDimensions","vec2").add("rnmScale","vec2").add("rnm","sampler2D"),t.fragment.code.add(o["a"]`vec3 sphere[16];
  687. void fillSphere() {
  688. sphere[0] = vec3(0.186937, 0.0, 0.0);
  689. sphere[1] = vec3(0.700542, 0.0, 0.0);
  690. sphere[2] = vec3(-0.864858, -0.481795, -0.111713);
  691. sphere[3] = vec3(-0.624773, 0.102853, -0.730153);
  692. sphere[4] = vec3(-0.387172, 0.260319, 0.007229);
  693. sphere[5] = vec3(-0.222367, -0.642631, -0.707697);
  694. sphere[6] = vec3(-0.01336, -0.014956, 0.169662);
  695. sphere[7] = vec3(0.122575, 0.1544, -0.456944);
  696. sphere[8] = vec3(-0.177141, 0.85997, -0.42346);
  697. sphere[9] = vec3(-0.131631, 0.814545, 0.524355);
  698. sphere[10] = vec3(-0.779469, 0.007991, 0.624833);
  699. sphere[11] = vec3(0.308092, 0.209288,0.35969);
  700. sphere[12] = vec3(0.359331, -0.184533, -0.377458);
  701. sphere[13] = vec3(0.192633, -0.482999, -0.065284);
  702. sphere[14] = vec3(0.233538, 0.293706, -0.055139);
  703. sphere[15] = vec3(0.417709, -0.386701, 0.442449);
  704. }
  705. float fallOffFunction(float vv, float vn, float bias) {
  706. float f = max(radius * radius - vv, 0.0);
  707. return f * f * f * max(vn-bias, 0.0);
  708. }`),t.fragment.code.add(o["a"]`float aoValueFromPositionsAndNormal(vec3 C, vec3 n_C, vec3 Q) {
  709. vec3 v = Q - C;
  710. float vv = dot(v, v);
  711. float vn = dot(normalize(v), n_C);
  712. return fallOffFunction(vv, vn, 0.1);
  713. }`),t.fragment.code.add(o["a"]`
  714. void main(void) {
  715. fillSphere();
  716. vec3 fres = normalize((texture2D(rnm, uv * rnmScale).xyz * 2.0) - vec3(1.0));
  717. float currentPixelDepth = linearDepthFromTexture(depthMap, uv, nearFar);
  718. if (-currentPixelDepth>nearFar.y || -currentPixelDepth<nearFar.x) {
  719. gl_FragColor = vec4(0.0);
  720. return;
  721. }
  722. vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy,currentPixelDepth);
  723. // get the normal of current fragment
  724. vec4 norm4 = texture2D(normalMap, uv);
  725. vec3 norm = vec3(-1.0) + 2.0 * norm4.xyz;
  726. bool isTerrain = norm4.w<0.5;
  727. float sum = .0;
  728. vec3 tapPixelPos;
  729. // note: the factor 2.0 should not be necessary, but makes ssao much nicer.
  730. // bug or deviation from CE somewhere else?
  731. float ps = projScale/(2.0 * currentPixelPos.z * zScale.x + zScale.y);
  732. for(int i = 0; i < ${o["a"].int(e.samples)}; ++i) {
  733. vec2 unitOffset = reflect(sphere[i], fres).xy;
  734. vec2 offset = vec2(-unitOffset * radius * ps);
  735. //don't use current or very nearby samples
  736. if ( abs(offset.x)<2.0 || abs(offset.y)<2.0) continue;
  737. vec2 tc = vec2(gl_FragCoord.xy + offset);
  738. if (tc.x < 0.0 || tc.y < 0.0 || tc.x > screenDimensions.x || tc.y > screenDimensions.y) continue;
  739. vec2 tcTap = tc/screenDimensions;
  740. float occluderFragmentDepth = linearDepthFromTexture(depthMap, tcTap, nearFar);
  741. if (isTerrain) {
  742. bool isTerrainTap = texture2D(normalMap, tcTap).w<0.5;
  743. if (isTerrainTap) {
  744. continue;
  745. }
  746. }
  747. tapPixelPos = reconstructPosition(tc, occluderFragmentDepth);
  748. sum+= aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
  749. }
  750. // output the result
  751. float A = max(1.0-sum*intensity/float(${o["a"].int(e.samples)}),0.0);
  752. // Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4)/2.2
  753. A = (pow(A, 0.2) + 1.2 * A*A*A*A) / 2.2;
  754. gl_FragColor = vec4(A);
  755. }
  756. `)),t}!function(e){e[e.SSAO=0]="SSAO",e[e.Blur=1]="Blur",e[e.COUNT=2]="COUNT"}(i||(i={}));const u=Object.freeze({__proto__:null,get SSAOOutput(){return i},build:l})},3723:function(e,t,r){"use strict";function i(e,t,r=!1){let{hasM:i,hasZ:n}=e;Array.isArray(t)?4!==t.length||i||n?3===t.length&&r&&!i?(n=!0,i=!1):3===t.length&&i&&n&&(i=!1,n=!1):(i=!0,n=!0):(n=!n&&t.hasZ&&(!i||t.hasM),i=!i&&t.hasM&&(!n||t.hasZ)),e.hasZ=n,e.hasM=i}r.d(t,"a",(function(){return i}))},3748:function(e,t,r){"use strict";r.d(t,"a",(function(){return B}));var i=r("e92d"),n=r("b2b2"),a=r("a915"),s=r("3349"),o=r("e431"),c=r("0b2d"),l=r("d359"),u=r("bd7e"),d=r("7289"),h=r("8190"),p=r("a05b"),f=r("1038"),b=r("d7f7"),m=r("35b3"),g=r("badc"),y=r("1153"),O=r("b7bd"),v=r("5957"),_=r("8675"),j=r("7c51"),w=r("b623"),x=r("a4ee"),T=r("d272"),S=r("6a07"),E=r("8e97"),A=r("c3a4"),C=r("ca98"),R=r("da35"),M=r("fa1e"),P=r("c829"),I=r("87b7"),D=r("713b"),L=r("d17d"),N=r("189c");class F extends C["a"]{constructor(e,t,r){super(e,t,r),this.stipplePattern=null,this.stippleTextureBind=null,this.stippleTextureRepository=e.stippleTextureRepository}get stippleEnabled(){return this.configuration.stippleEnabled&&this.configuration.output!==p["a"].Highlight}initializeProgram(e){const t=F.shader.get(),r=this.configuration,i=t.build({output:r.output,attributeColor:r.vertexColors,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:r.draped,stippleEnabled:this.stippleEnabled,stippleOffColorEnabled:r.stippleOffColorEnabled,stippleRequiresClamp:!1,stippleScaleWithLineWidth:!1,stipplePreferContinuous:r.stipplePreferContinuous});return new P["a"](e.rctx,i,M["a"])}destroy(){super.destroy(),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}bindPass(e,t){if(Object(E["b"])(this.program,t.camera.projectionMatrix),this.stipplePattern!==e.stipplePattern){const t=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,t),this.stipplePattern=t}if(this.stippleEnabled){const{pixelSize:e,sdfNormalizer:r,pixels:i}=Object(n["k"])(this.stippleTextureBind)?this.stippleTextureBind(this.program):{pixelSize:1,sdfNormalizer:1,pixels:1};this.program.setUniform1f("stipplePatternSDFNormalizer",r),this.program.setUniform1f("stipplePatternTextureSize",i),this.program.setUniform1f("stipplePatternPixelSize",e),this.program.setUniform1f("stipplePatternPixelSizeInv",1/e),this.program.setUniform1f("pixelRatio",t.camera.pixelRatio),this.configuration.draped?this.program.setUniform1f("worldToScreenRatio",1/t.screenToPCSRatio):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/t.camera.perScreenPixelRatio),this.program.setUniform2f("ndcToPixel",t.camera.fullViewport[2]/2,t.camera.fullViewport[3]/2)}if(this.program.setUniform4fv("constantColor",e.color),this.program.setUniform1f("alphaCoverage",Math.min(1,e.width*t.camera.pixelRatio)),this.configuration.stippleOffColorEnabled){const t=Object(n["t"])(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",t[0],t[1],t[2],t.length>3?t[3]:1)}this.configuration.output===p["a"].Highlight&&Object(S["b"])(this.program,t)}bindDraw(e){Object(E["c"])(this.program,e),this.stippleEnabled&&!this.configuration.draped&&Object(E["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(T["c"])(this.program,this.configuration,e),this.program.rebindTextures()}initializePipeline(){const e=this.configuration,t=Object(N["h"])(L["b"].SRC_ALPHA,L["b"].ONE,L["b"].ONE_MINUS_SRC_ALPHA,L["b"].ONE_MINUS_SRC_ALPHA),r=(t,r=null,i=null)=>Object(N["g"])({blending:r,depthTest:I["b"],depthWrite:i,colorWrite:N["d"],stencilWrite:e.sceneHasOcludees?I["j"]:null,stencilTest:e.sceneHasOcludees?t?I["f"]:I["e"]:null});return e.output===p["a"].Color?(this._occludeePipelineState=r(!0,e.transparent||this.stippleEnabled?t:null,N["e"]),r(!1,e.transparent||this.stippleEnabled?t:null,N["e"])):r(!1)}get primitiveType(){return L["r"].LINES}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}F.shader=new A["a"](D["a"],()=>r.e("chunk-2d20f1b1").then(r.bind(null,"b1e1")));class k extends R["a"]{constructor(){super(...arguments),this.output=p["a"].Color,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stipplePreferContinuous=!0,this.sceneHasOcludees=!1}}Object(x["a"])([Object(R["b"])({count:p["a"].COUNT})],k.prototype,"output",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"slicePlaneEnabled",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"vertexColors",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"transparent",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"draped",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"stippleEnabled",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"stippleOffColorEnabled",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"stipplePreferContinuous",void 0),Object(x["a"])([Object(R["b"])()],k.prototype,"sceneHasOcludees",void 0);const U=i["a"].getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial");var z;!function(e){e[e.START=0]="START",e[e.END=1]="END"}(z||(z={}));class B extends m["b"]{constructor(e){super(e,H),this._techniqueConfig=new k}getTechniqueConfig(e,t){this._techniqueConfig.output=e,this._techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this._techniqueConfig.vertexColors=this.parameters.vertexColors,this._techniqueConfig.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._techniqueConfig.draped=t.slot===g["a"].DRAPED_MATERIAL;const r=Object(n["k"])(this.parameters.stipplePattern);return this._techniqueConfig.stippleEnabled=r,this._techniqueConfig.stippleOffColorEnabled=r&&Object(n["k"])(this.parameters.stippleOffColor),this._techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this._techniqueConfig.stipplePreferContinuous=this.parameters.stipplePreferContinuous,this._techniqueConfig}getPassParameters(){return this.parameters}intersect(e,t,r,i,a,s,o,c,l){Object(n["k"])(l)?Object(j["h"])(e,i,l,s,1,o):this._intersectLineGeometry(e,t,r,i,o)}_intersectLineGeometry(e,t,r,i,n){if(!i.options.selectionMode||Object(w["d"])(t))return;if(!Object(y["g"])(r))return void U.error("intersection assumes a translation-only matrix");const a=e.vertexAttributes.get(O["a"].POSITION).data,c=i.camera,h=te;Object(s["c"])(h,i.point);const p=2;Object(o["y"])(re[0],h[0]-p,h[1]+p,0),Object(o["y"])(re[1],h[0]+p,h[1]+p,0),Object(o["y"])(re[2],h[0]+p,h[1]-p,0),Object(o["y"])(re[3],h[0]-p,h[1]-p,0);for(let s=0;s<4;s++)if(!c.unprojectFromRenderScreen(re[s],ie[s]))return;Object(d["g"])(c.eye,ie[0],ie[1],ne),Object(d["g"])(c.eye,ie[1],ie[2],ae),Object(d["g"])(c.eye,ie[2],ie[3],se),Object(d["g"])(c.eye,ie[3],ie[0],oe);let f=Number.MAX_VALUE,b=0;for(let s=0;s<a.length-5;s+=3){if(q[0]=a[s]+r[12],q[1]=a[s+1]+r[13],q[2]=a[s+2]+r[14],W[0]=a[s+3]+r[12],W[1]=a[s+4]+r[13],W[2]=a[s+5]+r[14],Object(d["v"])(ne,q)<0&&Object(d["v"])(ne,W)<0||Object(d["v"])(ae,q)<0&&Object(d["v"])(ae,W)<0||Object(d["v"])(se,q)<0&&Object(d["v"])(se,W)<0||Object(d["v"])(oe,q)<0&&Object(d["v"])(oe,W)<0)continue;if(c.projectToRenderScreen(q,X),c.projectToRenderScreen(W,Y),X[2]<0&&Y[2]>0){Object(o["l"])($,q,W);const e=c.frustum,t=-Object(d["v"])(e[l["b"].NEAR],q)/Object(o["j"])($,Object(d["r"])(e[l["b"].NEAR]));Object(o["g"])($,$,t),Object(o["h"])(q,q,$),c.projectToRenderScreen(q,X)}else if(X[2]>0&&Y[2]<0){Object(o["l"])($,W,q);const e=c.frustum,t=-Object(d["v"])(e[l["b"].NEAR],W)/Object(o["j"])($,Object(d["r"])(e[l["b"].NEAR]));Object(o["g"])($,$,t),Object(o["h"])(W,W,$),c.projectToRenderScreen(W,Y)}else if(X[2]<0&&Y[2]<0)continue;X[2]=0,Y[2]=0;const e=Object(u["d"])(Object(u["e"])(X,Y,K),h);e<f&&(f=e,Object(o["m"])(J,q),Object(o["m"])(Q,W),b=s/3)}const m=i.rayBegin,g=i.rayEnd;if(f<p*p){let e=Number.MAX_VALUE;if(Object(u["a"])(Object(u["e"])(J,Q,K),Object(u["e"])(m,g,ee),Z)){Object(o["l"])(Z,Z,m);const t=Object(o["r"])(Z);Object(o["g"])(Z,Z,1/t),e=t/Object(o["o"])(m,g)}n(e,Z,b,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return!1;const i=r.get(O["a"].POSITION);return Object(f["a"])(i,null,!1,t)}requiresSlot(e){return e===g["a"].OPAQUE_MATERIAL||e===g["a"].DRAPED_MATERIAL}createGLMaterial(e){return e.output===p["a"].Color||e.output===p["a"].Highlight?new V(e):null}createBufferWriter(){const e=this.parameters.vertexColors?_["b"]:_["c"];return Object(n["j"])(this.parameters.stipplePattern)?new _["a"](e):new G(e.clone().vec3f(O["a"].AUXPOS1).vec2f(O["a"].UV0))}}class V extends b["a"]{updateParameters(e){return this.ensureTechnique(F,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output===p["a"].Color&&this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}class G{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(O["a"].POSITION).length}write(e,t,r,i){Object(v["d"])(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i),this._writeAuxpos1(e,t,r,i),this._writeUV0(e,t,r,i)}_writeAuxpos1(e,t,r,i){const n=r.getField(O["a"].AUXPOS1,h["u"]),a=t.indices.get(O["a"].POSITION),s=t.vertexAttributes.get(O["a"].POSITION).data,o=e.transformation,c=n.typedBufferStride,l=n.typedBuffer;i*=c;for(let u=0;u<a.length-1;u+=2)for(const e of[1,0]){const t=3*a[u+e],r=s[t],n=s[t+1],d=s[t+2],h=o[0]*r+o[4]*n+o[8]*d+o[12],p=o[1]*r+o[5]*n+o[9]*d+o[13],f=o[2]*r+o[6]*n+o[10]*d+o[14];l[i]=h,l[i+1]=p,l[i+2]=f,i+=c}}_writeUV0(e,t,r,i){var n;const a=r.getField(O["a"].UV0,h["m"]),s=t.indices.get(O["a"].POSITION),c=t.vertexAttributes.get(O["a"].POSITION).data,l=null==(n=t.vertexAttributes.get(O["a"].DISTANCETOSTART))?void 0:n.data,u=e.transformation,d=a.typedBufferStride,p=a.typedBuffer;let f=0;p[i*=d]=z.START,p[i+1]=f,i+=d;const b=3*s[0],m=Object(o["y"])(q,c[b],c[b+1],c[b+2]);u&&Object(o["s"])(m,m,u);const g=W,y=s.length-1;let v=1;const _=l?(e,t,r)=>f=l[r]:(e,t,r)=>f+=Object(o["o"])(e,t);for(let h=1;h<y;h+=2){const e=3*s[h];Object(o["y"])(g,c[e],c[e+1],c[e+2]),u&&Object(o["s"])(g,g,u),_(m,g,v++);for(let t=0;t<2;++t)p[i]=1-t,p[i+1]=f,i+=d;Object(o["m"])(m,g)}const j=3*s[y];Object(o["y"])(g,c[j],c[j+1],c[j+2]),u&&Object(o["s"])(g,g,u),_(m,g,v),p[i]=z.END,p[i+1]=f}}const H={color:[1,1,1,1],vertexColors:!1,slicePlaneEnabled:!1,width:1,stipplePattern:null,stippleOffColor:null,stipplePreferContinuous:!0,sceneHasOcludees:!1,...m["a"]},q=Object(c["f"])(),W=Object(c["f"])(),$=Object(c["f"])(),Z=Object(c["f"])(),X=Object(a["d"])(),Y=Object(a["d"])(),J=Object(c["f"])(),Q=Object(c["f"])(),K=Object(u["c"])(),ee=Object(u["c"])(),te=Object(c["f"])(),re=[Object(a["d"])(),Object(a["d"])(),Object(a["d"])(),Object(a["d"])()],ie=[Object(c["f"])(),Object(c["f"])(),Object(c["f"])(),Object(c["f"])()],ne=Object(d["d"])(),ae=Object(d["d"])(),se=Object(d["d"])(),oe=Object(d["d"])()},3760:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("afcf")),o=r("d386"),c=r("5996");let l=class extends n["a"]{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=c["a"].WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof c["a"])return e;if(null!=e){const r=new c["a"];return r.read(e,t),r}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};Object(i["a"])([Object(a["b"])()],l.prototype,"type",void 0),Object(i["a"])([Object(a["b"])({readOnly:!0})],l.prototype,"cache",null),Object(i["a"])([Object(a["b"])({readOnly:!0})],l.prototype,"extent",null),Object(i["a"])([Object(a["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],l.prototype,"hasM",void 0),Object(i["a"])([Object(a["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],l.prototype,"hasZ",void 0),Object(i["a"])([Object(a["b"])({type:c["a"],json:{write:!0}})],l.prototype,"spatialReference",void 0),Object(i["a"])([Object(s["a"])("spatialReference")],l.prototype,"readSpatialReference",null),l=Object(i["a"])([Object(o["a"])("esri.geometry.Geometry")],l);const u=l},3765:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("ce50"),n=r("7ffa"),a=r("b2b2"),s=r("9d1d"),o=r("25245");const c=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),l=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e){return"basemap"===e.layerContainerType?c:"operational-layers"===e.layerContainerType?l:null}function d(e){return!("feature"!==e.type||e.url||!e.source||"memory"!==e.source.type)}function h(e,t){if(t.restrictedWebMapWriting){const r=u(t);return!Object(a["k"])(r)||r.has(e.type)&&!d(e)}return!0}function p(e,t){if(d(e)){const r=Object(s["b"])("featureCollection.layers",t),i=r&&r[0]&&r[0].layerDefinition;i&&f(e,i)}else"stream"===e.type?f(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&f(e,t)}function f(e,t){"maxScale"in e&&(t.maxScale=Object(o["b"])(e.maxScale)),"minScale"in e&&(t.minScale=Object(o["b"])(e.minScale))}function b(e,t){if(p(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=Object(o["b"])(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if(d(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}function m(e,t,r){if(!("write"in e)||!e.write)return r&&r.messages&&r.messages.push(new i["a"]("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(h(e,r)){const t={};return e.write(t,r)?t:null}return Object(a["k"])(t)&&b(e,t=Object(n["a"])(t)),t}},3795:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return b})),r.d(t,"h",(function(){return d})),r.d(t,"i",(function(){return h})),r.d(t,"j",(function(){return u})),r.d(t,"k",(function(){return p})),r.d(t,"l",(function(){return f}));var i=r("9d83"),n=(r("7ffa"),r("f4cc"));const a=/\?(\.|$)/g;function s(e,t,r,i){const n=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],s=o(e,t,r,i);for(const o of n){const t=o.trim().replace(a,"$1"),i=e.get(t);r.call(e,i,i,t,e)}return s}function o(e,t,r,i){return e.watch(t,r,i)}function c(e,t,r,i){return O(e,t,null,r,i)}function l(e,t,r,i){return y(e,t,v,r,i)}function u(e,t,r,i){return O(e,t,v,r,i)}function d(e,t,r,i){return y(e,t,_,r,i)}function h(e,t,r,i){return O(e,t,_,r,i)}function p(e,t,r,i){return y(e,t,j,r,i)}function f(e,t,r,i){return O(e,t,j,r,i)}function b(e,t,r,i){return y(e,t,w,r,i)}function m(e,t,r,i){let n=!1;const a=e.watch(t,(t,i,a,s)=>{n||r.call(e,t,i,a,s)},i);return{remove(){a.remove()},pause(){n=!0},resume(){n=!1}}}function g(e,t,r,n,a,o,c){const l={};function u(t){const i=l[t];i&&(o&&o(i.target,t,e,r),i.handle.remove(),delete l[t])}const d=s(e,t,(t,s,o)=>{u(o),Object(i["b"])(t)&&(l[o]={handle:Object(i["c"])(t,r,n),target:t},a&&a(t,o,e,r))},c);return{remove(){d.remove();for(const e in l)u(e)}}}function y(e,t,r,i,n){const a=e.watch(t,(t,n,a,s)=>{r&&!r(t)||null==i||i.call(e,t,n,a,s)},n);if(Array.isArray(t))for(const s of t){const n=e.get(s);r&&r(n)&&(null==i||i.call(e,n,n,t,e))}else{const n=e.get(t);r&&r(n)&&(null==i||i.call(e,n,n,t,e))}return a}function O(e,t,r,i,a){const s="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(a=i);let c,l=!1;function u(){c&&(c.remove(),c=null)}const d=Object(n["f"])();Object(n["q"])(o,()=>{u(),d.reject(Object(n["e"])())});const h={then:d.promise.then.bind(d.promise),catch:d.promise.catch.bind(d.promise),remove:u};return Object.freeze(h),c=y(e,t,r,(t,r,i,n)=>{l=!0,u(),s&&s.call(e,t,r,i,n),d.resolve({value:t,oldValue:r,propertyName:i,target:n})},a),l&&u(),h}function v(e){return!!e}function _(e){return!e}function j(e){return!0===e}function w(e){return!1===e}},"37c4":function(e,t,r){e.exports=r.p+"static/img/temp1.a77473f5.png"},"37e4":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.Cross=2]="Cross",e[e.ForwardDiagonal=3]="ForwardDiagonal",e[e.BackwardDiagonal=4]="BackwardDiagonal",e[e.DiagonalCross=5]="DiagonalCross",e[e.COUNT=6]="COUNT"}(i||(i={}))},"37e7":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("7ffa"),s=r("a915"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("afcf"),u=r("d386"),d=r("6e4d"),h=r("b0e3");let p=i=class extends d["a"]{constructor(...e){super(...e),this.color=null,this.type="picture-marker",this.url=null,this.source=null,this.height=12,this.width=12,this.size=null}normalizeCtorArgs(e,t,r){if(e&&"string"!=typeof e&&null==e.imageData)return e;const i={};return e&&(i.url=e),null!=t&&(i.width=Object(s["j"])(t)),null!=r&&(i.height=Object(s["j"])(r)),i}readHeight(e,t){return t.size||e}readWidth(e,t){return t.size||e}clone(){const e=new i({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});return e._set("source",Object(a["a"])(this.source)),e}hash(){return`${super.hash()}.${this.height}.${this.url}.${this.width}`}};Object(n["a"])([Object(o["b"])({json:{write:!1}})],p.prototype,"color",void 0),Object(n["a"])([Object(c["a"])({esriPMS:"picture-marker"},{readOnly:!0})],p.prototype,"type",void 0),Object(n["a"])([Object(o["b"])(h["b"])],p.prototype,"url",void 0),Object(n["a"])([Object(o["b"])(h["a"])],p.prototype,"source",void 0),Object(n["a"])([Object(o["b"])({type:Number,cast:s["j"],json:{write:!0}})],p.prototype,"height",void 0),Object(n["a"])([Object(l["a"])("height",["height","size"])],p.prototype,"readHeight",null),Object(n["a"])([Object(o["b"])({type:Number,cast:s["j"],json:{write:!0}})],p.prototype,"width",void 0),Object(n["a"])([Object(o["b"])({json:{write:!1}})],p.prototype,"size",void 0),p=i=Object(n["a"])([Object(u["a"])("esri.symbols.PictureMarkerSymbol")],p);const f=p},"382b":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("92ef");function n(e,t,r){t.keys().forEach(e=>{r.set(e,t.get(e),i["a"].DEFAULTS)});const n=e.metadatas;Object.keys(n).forEach(t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),i["a"].DEFAULTS)})}},3886:function(e,t,r){"use strict";function i(e,...t){let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r}r.d(t,"a",(function(){return i})),function(e){function t(e){return Math.round(e).toString()}function r(e){return e.toPrecision(8)}e.int=t,e.float=r}(i||(i={}))},"38a4":function(e,t,r){"use strict";r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return O})),r.d(t,"h",(function(){return h})),r.d(t,"i",(function(){return y})),r.d(t,"j",(function(){return g})),r.d(t,"k",(function(){return c})),r.d(t,"l",(function(){return d})),r.d(t,"m",(function(){return u})),r.d(t,"n",(function(){return s})),r.d(t,"o",(function(){return l})),r.d(t,"p",(function(){return p})),r.d(t,"q",(function(){return f})),r.d(t,"r",(function(){return _}));var i=r("e431"),n=r("7577");const a=new Float32Array(1);function s(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function o(e,t,r){return Math.min(Math.max(e,t),r)}function c(e){return 0==(e&e-1)}function l(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function u(e){return 10**Math.ceil(Math.LOG10E*Math.log(e))}function d(e,t,r){return e+(t-e)*r}function h(e){return e*Math.PI/180}function p(e){return 180*e/Math.PI}function f(e,t=1e-6){return(e<0?-1:1)/Math.max(Math.abs(e),t)}function b(e){return Math.acos(o(e,-1,1))}function m(e){return Math.asin(o(e,-1,1))}function g(e,t,r=1e-6){if(isNaN(e)||isNaN(t))return!1;if(e===t)return!0;const i=Math.abs(e-t),n=Math.abs(e),a=Math.abs(t);if(0===e||0===t||n<1e-12&&a<1e-12){if(i>.01*r)return!1}else if(i/(n+a)>r)return!1;return!0}function y(e,t,r=1e-6){return!isNaN(e)&&!isNaN(t)&&(e>t?e-t:t-e)<=r}function O(e){return v(Math.max(-x,Math.min(e,x)))}function v(e){return a[0]=e,a[0]}function _(e,t,r){const i=o((r-e)/(t-e),0,1);return i*i*(3-2*i)}function j(e,t){const r=Object(i["r"])(e),n=m(e[2]/r),a=Math.atan2(e[1]/r,e[0]/r);return Object(i["y"])(t,r,n,a),t}function w(e,t,r){return Object(n["l"])(e,t[0],t[1],t[2],t[3]*r)}const x=v(34028234663852886e22)},"38bf":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return c}));var i=r("70f6"),n=r("d288");function a(e){if(!e)return!1;const t=e.verticalOffset;return!!t&&!(t.screenLength<=0||t.maxWorldLength<=0)}function s(e){if(!e)return!1;if(!e.supportsCallout||!e.supportsCallout())return!1;const t=e.callout;return!!t&&!!t.visible&&!!a(e)}function o(e){return"point-3d"===e.type||"label-3d"===e.type}function c(e){const{horizontalAlignment:t}=e;return"center"===t||"justify"===t}const l={types:{key:"type",base:i["a"],typeMap:{line:n["a"]}},json:{write:!0}}},"3a35":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(i={}))},"3ad7":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=r("b2b2"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("448d")),c=r("afcf"),l=r("d386"),u=r("961d"),d=r("a3af"),h=r("af3d");let p=i=class extends u["a"]{constructor(e){super(e),this.material=null,this.castShadows=!0,this.type="path",this.profile="circle",this.join="miter",this.cap="butt",this.width=void 0,this.height=void 0,this.anchor="center",this.profileRotation="all"}readWidth(e,t){return null!=e?e:null==t.height&&null!=t.size?t.size:void 0}readHeight(e,t){return null!=e?e:null==t.width&&null!=t.size?t.size:void 0}clone(){return new i({enabled:this.enabled,material:Object(a["k"])(this.material)?this.material.clone():null,castShadows:this.castShadows,profile:this.profile,join:this.join,cap:this.cap,width:this.width,height:this.height,profileRotation:this.profileRotation,anchor:this.anchor})}};Object(n["a"])([Object(s["b"])({type:d["a"],json:{write:!0}})],p.prototype,"material",void 0),Object(n["a"])([Object(s["b"])({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],p.prototype,"castShadows",void 0),Object(n["a"])([Object(o["a"])({Path:"path"},{readOnly:!0})],p.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:["circle","quad"],json:{write:!0,default:"circle"}})],p.prototype,"profile",void 0),Object(n["a"])([Object(s["b"])({type:h["b"],json:{write:!0,default:"miter"}})],p.prototype,"join",void 0),Object(n["a"])([Object(s["b"])({type:h["e"],json:{write:!0,default:"butt"}})],p.prototype,"cap",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:{enabled:!0,target:{width:{type:Number},size:{type:Number}}}}})],p.prototype,"width",void 0),Object(n["a"])([Object(c["a"])("width",["width","size","height"])],p.prototype,"readWidth",null),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],p.prototype,"height",void 0),Object(n["a"])([Object(c["a"])("height",["height","size","width"])],p.prototype,"readHeight",null),Object(n["a"])([Object(s["b"])({type:["center","bottom","top"],json:{write:!0,default:"center"}})],p.prototype,"anchor",void 0),Object(n["a"])([Object(s["b"])({type:["heading","all"],json:{write:!0,default:"all"}})],p.prototype,"profileRotation",void 0),p=i=Object(n["a"])([Object(l["a"])("esri.symbols.PathSymbol3DLayer")],p);const f=p},"3af1":function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var i,n=r("a4ee"),a=r("b2b2"),s=r("b3b6"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("3760"),u=r("4ae5"),d=r("5996"),h=r("2172"),p=r("f547"),f=r("7f83"),b=r("9786");function m(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}function g(e,t,r){return null==t?r:null==r?t:e(t,r)}let y=i=class extends l["a"]{constructor(...e){super(...e),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(e,t,r,i,n){return m(e)?{spatialReference:e,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof e?(e.spatialReference=null==e.spatialReference?d["a"].WGS84:e.spatialReference,e):{xmin:e,ymin:t,xmax:r,ymax:i,spatialReference:null==n?d["a"].WGS84:n}}static fromBounds(e,t){return new i({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}static fromPoint(e){return new i({xmin:e.x,ymin:e.y,zmin:e.z,xmax:e.x,ymax:e.y,zmax:e.z,spatialReference:e.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const e=new u["a"]({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(e.z=.5*(this.zmin+this.zmax)),this.hasM&&(e.m=.5*(this.mmin+this.mmax)),e}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(e){const t=this.center;return null!=e.z&&this.hasZ?this.offset(e.x-t.x,e.y-t.y,e.z-t.z):this.offset(e.x-t.x,e.y-t.y)}clone(){const e=new i;return e.xmin=this.xmin,e.ymin=this.ymin,e.xmax=this.xmax,e.ymax=this.ymax,e.spatialReference=this.spatialReference,null!=this.zmin&&(e.zmin=this.zmin,e.zmax=this.zmax),null!=this.mmin&&(e.mmin=this.mmin,e.mmax=this.mmax),e}contains(e){if(!e)return!1;const t=this.spatialReference,r=e.spatialReference;return t&&r&&!t.equals(r)&&Object(b["a"])(t,r)&&(e=t.isWebMercator?Object(b["b"])(e):Object(b["e"])(e,!0)),"point"===e.type?Object(h["e"])(this,e):"extent"===e.type&&Object(h["c"])(this,e)}equals(e){if(this===e)return!0;if(Object(a["j"])(e))return!1;const t=this.spatialReference,r=e.spatialReference;return t&&r&&!t.equals(r)&&Object(b["a"])(t,r)&&(e=t.isWebMercator?Object(b["b"])(e):Object(b["e"])(e,!0)),this.xmin===e.xmin&&this.ymin===e.ymin&&this.zmin===e.zmin&&this.mmin===e.mmin&&this.xmax===e.xmax&&this.ymax===e.ymax&&this.zmax===e.zmax&&this.mmax===e.mmax}expand(e){const t=.5*(1-e),r=this.width*t,i=this.height*t;if(this.xmin+=r,this.ymin+=i,this.xmax-=r,this.ymax-=i,this.hasZ){const e=(this.zmax-this.zmin)*t;this.zmin+=e,this.zmax-=e}if(this.hasM){const e=(this.mmax-this.mmin)*t;this.mmin+=e,this.mmax-=e}return this}intersects(e){if(Object(a["j"])(e))return!1;"mesh"===e.type&&(e=e.extent);const t=this.spatialReference,r=e.spatialReference;return t&&r&&!t.equals(r)&&Object(b["a"])(t,r)&&(e=t.isWebMercator?Object(b["b"])(e):Object(b["e"])(e,!0)),Object(p["c"])(e.type)(this,e)}normalize(){const e=this._normalize(!1,!0);return Array.isArray(e)?e:[e]}offset(e,t,r){return this.xmin+=e,this.ymin+=t,this.xmax+=e,this.ymax+=t,null!=r&&(this.zmin+=r,this.zmax+=r),this}shiftCentralMeridian(){return this._normalize(!0)}union(e){return this===e||(this.xmin=Math.min(this.xmin,e.xmin),this.ymin=Math.min(this.ymin,e.ymin),this.xmax=Math.max(this.xmax,e.xmax),this.ymax=Math.max(this.ymax,e.ymax),(this.hasZ||e.hasZ)&&(this.zmin=g(Math.min,this.zmin,e.zmin),this.zmax=g(Math.max,this.zmax,e.zmax)),(this.hasM||e.hasM)&&(this.mmin=g(Math.min,this.mmin,e.mmin),this.mmax=g(Math.max,this.mmax,e.mmax))),this}intersection(e){return this===e?this:Object(a["j"])(e)||!this.intersects(e)?null:(this.xmin=Math.max(this.xmin,e.xmin),this.ymin=Math.max(this.ymin,e.ymin),this.xmax=Math.min(this.xmax,e.xmax),this.ymax=Math.min(this.ymax,e.ymax),(this.hasZ||e.hasZ)&&(this.zmin=g(Math.max,this.zmin,e.zmin),this.zmax=g(Math.min,this.zmax,e.zmax)),(this.hasM||e.hasM)&&(this.mmin=g(Math.max,this.mmin,e.mmin),this.mmax=g(Math.min,this.mmax,e.mmax)),this)}toJSON(e){return this.write({},e)}_shiftCM(e=Object(f["e"])(this.spatialReference)){if(!e||!this.spatialReference)return this;const t=this.spatialReference,r=this._getCM(e);if(r){const i=t.isWebMercator?Object(b["e"])(r):r;this.xmin-=r.x,this.xmax-=r.x,t.isWebMercator||(i.x=this._normalizeX(i.x,e).x),this.spatialReference=new d["a"](Object(s["c"])(t.isWGS84?e.altTemplate:e.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(e){let t=null;const[r,i]=e.valid,n=this.xmin,a=this.xmax;return n>=r&&n<=i&&a>=r&&a<=i||(t=this.center),t}_normalize(e,t,r){const i=this.spatialReference;if(!i)return this;if(!(r=r||Object(f["e"])(i)))return this;const n=this._getParts(r).map(e=>e.extent);if(n.length<2)return n[0]||this;if(n.length>2)return e?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(e)return this._shiftCM(r);if(t)return n;let a=!0,s=!0;return n.forEach(e=>{e.hasZ||(a=!1),e.hasM||(s=!1)}),{rings:n.map(e=>{const t=[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]];if(a){const r=(e.zmax-e.zmin)/2;for(let e=0;e<t.length;e++)t[e].push(r)}if(s){const r=(e.mmax-e.mmin)/2;for(let e=0;e<t.length;e++)t[e].push(r)}return t}),hasZ:a,hasM:s,spatialReference:i}}_getParts(e){let t=this.cache._parts;if(!t){t=[];const{ymin:r,ymax:n,spatialReference:a}=this,s=this.width,o=this.xmin,c=this.xmax;let l;e=e||Object(f["e"])(a);const[u,d]=e.valid;l=this._normalizeX(this.xmin,e);const h=l.x,p=l.frameId;l=this._normalizeX(this.xmax,e);const b=l.x,m=l.frameId,g=h===b&&s>0;if(s>2*d){const e=new i(o<c?h:b,r,d,n,a),s=new i(u,r,o<c?b:h,n,a),l=new i(0,r,d,n,a),f=new i(u,r,0,n,a),g=[],y=[];e.contains(l)&&g.push(p),e.contains(f)&&y.push(p),s.contains(l)&&g.push(m),s.contains(f)&&y.push(m);for(let t=p+1;t<m;t++)g.push(t),y.push(t);t.push({extent:e,frameIds:[p]},{extent:s,frameIds:[m]},{extent:l,frameIds:g},{extent:f,frameIds:y})}else h>b||g?t.push({extent:new i(h,r,d,n,a),frameIds:[p]},{extent:new i(u,r,b,n,a),frameIds:[m]}):t.push({extent:new i(h,r,b,n,a),frameIds:[p]});this.cache._parts=t}const r=this.hasZ,n=this.hasM;if(r||n){const e={};r&&(e.zmin=this.zmin,e.zmax=this.zmax),n&&(e.mmin=this.mmin,e.mmax=this.mmax);for(let r=0;r<t.length;r++)t[r].extent.set(e)}return t}_normalizeX(e,t){const[r,i]=t.valid,n=2*i;let a,s=0;return e>i?(a=Math.ceil(Math.abs(e-i)/n),e-=a*n,s=a):e<r&&(a=Math.ceil(Math.abs(e-r)/n),e+=a*n,s=-a),{x:e,frameId:s}}};Object(n["a"])([Object(o["b"])({readOnly:!0})],y.prototype,"cache",null),Object(n["a"])([Object(o["b"])({readOnly:!0})],y.prototype,"center",null),Object(n["a"])([Object(o["b"])({readOnly:!0})],y.prototype,"extent",null),Object(n["a"])([Object(o["b"])({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasM",null),Object(n["a"])([Object(o["b"])({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasZ",null),Object(n["a"])([Object(o["b"])({readOnly:!0})],y.prototype,"height",null),Object(n["a"])([Object(o["b"])({readOnly:!0})],y.prototype,"width",null),Object(n["a"])([Object(o["b"])({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],y.prototype,"xmin",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],y.prototype,"ymin",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmin",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmin",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],y.prototype,"xmax",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],y.prototype,"ymax",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmax",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmax",void 0),y=i=Object(n["a"])([Object(c["a"])("esri.geometry.Extent")],y),y.prototype.toJSON.isDefaultToJSON=!0;const O=y},"3af9":function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return O}));var i=r("a4ee"),n=r("2eab"),a=r("fc29"),s=r("b50f"),o=r("ce50"),c=r("7ffa"),l=r("b2b2"),u=r("f4cc"),d=r("59b2"),h=(r("cea0"),r("d386")),p=r("1153");class f{constructor(e){this.client=e,this._cancelled=!1,this.size=0,this.duration=0}}class b{constructor(e){this.typeWorkerQuota=e,this.tasks=new Array,this.numWorkers=0,this.statistics=new m}}class m{constructor(){this.requests=0,this.size=0,this.duration=0,this.speed=0}}class g{constructor(e,t,r,i){this._workerFunc=e,this._callbackFunc=t,this._maxTotalNumWorkers=r,this._totalNumWorkers=0,this._clients=i.map(e=>new b(e))}hasQuota(e){const t=this._clients[e];return!!t&&(this._totalNumWorkers<this._maxTotalNumWorkers||t.numWorkers+t.tasks.length<t.typeWorkerQuota)}push(e){const t=this._clients[e.client];t&&(this._totalNumWorkers<this._maxTotalNumWorkers?(t.numWorkers++,this._totalNumWorkers++,this._workerFunc(e,(e,t)=>this._taskCallback(e,t))):t.tasks.push(e))}cancel(e){this._taskFinished(e),e._cancelled=!0}destroy(){this._clients.length=0}_taskFinished(e){const t=this._clients[e.client];this._totalNumWorkers--,t.numWorkers--,t.statistics.requests++,t.statistics.size+=e.size||0,t.statistics.duration+=e.duration||0,t.statistics.speed=t.statistics.duration>0?t.statistics.size/t.statistics.duration:0,Object(p["a"])(t.numWorkers>=0),this._next()}_next(){for(const e of this._clients)if(e&&e.numWorkers<e.typeWorkerQuota&&this._processQueue(e))return;for(const e of this._clients)if(e&&this._processQueue(e))return}_processQueue(e){for(;e.tasks.length>0;)if(this._workerFunc(e.tasks.shift(),(e,t)=>this._taskCallback(e,t)))return e.numWorkers++,this._totalNumWorkers++,!0;return!1}_taskCallback(e,t){e._cancelled||(this._callbackFunc(e,t),this._taskFinished(e))}getStatsForType(e){const t=this._clients[e];return t?{quota:t.typeWorkerQuota,workers:t.numWorkers,queueSize:t.tasks.length,requestStats:t.statistics}:null}get test(){const e=this;return{set workerFunc(t){e._workerFunc=t}}}}var y=r("9305");let O=class extends a["a"]{constructor(){super(...arguments),this._tasks=new Map,this._onLoadQueue=new Array,this._doneQueue=new Array,this.updating=!1}setup(e,t,r){this._loadQueue=new g((e,t)=>this._startLoading(e,t),(e,t)=>this._doneLoadingCB(e,t),e,t),r&&(this._frameTask=r.registerTask(y["c"].STREAM_DATA_LOADER,this))}destroy(){this._frameTask=Object(l["s"])(this._frameTask),this._tasks.forEach(e=>Object(l["a"])(e.abortController)),this._loadQueue=Object(l["d"])(this._loadQueue),this._onLoadQueue=null,this._doneQueue=null,this._tasks=null}hasDownloadSlots(e){return this._loadQueue.hasQuota(e)}request(e,t,r,i={}){const n=Object(u["g"])();n.__signal=Object(l["k"])(i)?i.signal:null;const a=this._createOrUpdateTask(e,t,r,i,n);return Object(u["q"])(i,()=>this._cancelRequest(a,n)),n.promise}_createTask(e,t,r,i,n,a){const s=new w(e,t,r,i,n);return this._updateTask(s,a),this._tasks.set(n,s),1===this._tasks.size&&this._set("updating",!0),this._loadQueue.push(s),s}_cancelRequest(e,t){Object(s["k"])(e.resolvers,t),t.reject(Object(u["e"])()),0===e.resolvers.length&&(e.status===T.DOWNLOADING&&(e.status=T.CANCELLED,this._loadQueue.cancel(e),e.abortController.abort(),e.request=null,e.abortController=null),e.status=T.CANCELLED,this._tasks.delete(e.key),0===this._tasks.size&&this._set("updating",!1))}_updateTask(e,t){e.resolvers.push(t)}_createOrUpdateTask(e,t,r,i,n){const a=x(Object(l["k"])(i)&&i.uid||e,t,r),s=this._tasks.get(a);return s?(this._updateTask(s,n),s):this._createTask(e,i,t,r,a,n)}_doneLoadingCB(e,t){this._loadQueue&&(Object(p["a"])(e.status===T.DOWNLOADING),e.status=T.DOWNLOADED,this._frameTask?this._doneQueue.push({task:e,err:t}):this._doneLoading(e,t))}get running(){return this._doneQueue.length>0||this._onLoadQueue.length>0}runTask(e){for(;!e.done&&this._onLoadQueue.length>0;){const t=this._onLoadQueue.shift();Object(u["v"])(t.task.abortController),t.task.abortController=null,t.callback(t.task),e.madeProgress()}for(;!e.done&&this._doneQueue.length>0;){const t=this._doneQueue.shift();t.task.status!==T.DOWNLOADED&&(t.err=t.err||Object(u["e"])()),this._doneLoading(t.task,t.err),e.madeProgress()}}_doneLoading(e,t){if(t&&!Object(u["m"])(t)&&e.numRetries>0)return--e.numRetries,void this._loadQueue.push(e);let r=e.result instanceof HTMLImageElement?0:e.resolvers.length;for(const i of e.resolvers)if(t)Object(u["m"])(t)?i.reject(t):i.reject(new o["a"]("stream-data-loader:request-error",`Failed to request resource at '${e.url}'. ${t}`,{url:e.url,error:t}));else{--r;const t=r<=0?e.result:Object(c["a"])(e.result);i.resolve(t)}this._tasks.delete(e.key),0===this._tasks.size&&this._set("updating",!1)}_startLoading(e,t){if(e.status===T.CANCELLED)return!1;let r,i;switch(e.startTime=performance.now(),e.status=T.DOWNLOADING,e.docType){case"binary":i="array-buffer",r=0;break;case"image":i="image";break;case"image+type":i="array-buffer";break;default:i="json"}e.abortController=new AbortController;const a=e.abortController.signal;e.request=Object(n["default"])(e.url,{...e.options,responseType:i,timeout:r,signal:a});let s=()=>{};const o=r=>{e.duration=performance.now()-e.startTime,e.size=r instanceof ArrayBuffer?r.byteLength:e.size||0,e.result=r,this._frameTask?this._onLoadQueue.push({callback:t,task:e}):(e.abortController=null,t(e))},c=r=>{e.status===T.DOWNLOADING&&t(e,r),s()};return"image+type"!==e.docType?(e.request.then(e=>o(e.data),c),!0):(e.request.then(t=>{const l=t.data,u=_(l);if(i="image",e.size=l.byteLength,"unknown"===u)return e.request=Object(n["default"])(e.url,{responseType:i,timeout:r,signal:a}),void e.request.then(e=>o(e.data),c);const d=new Blob([l],{type:u}),h=window.URL.createObjectURL(d);s=()=>window.URL.revokeObjectURL(h),e.request=Object(n["default"])(h,{responseType:i,timeout:r,signal:a}),e.request.then(e=>o(new j(e.data,u,s)),c)},c),!0)}get test(){return{loadQueue:this._loadQueue}}};Object(i["a"])([Object(d["b"])({readOnly:!0})],O.prototype,"updating",void 0),O=Object(i["a"])([Object(h["a"])("esri.views.3d.support.StreamDataLoader")],O);const v={numRetries:0};function _(e){if(e.byteLength<2)return"unknown";const t=new Uint8Array(e,0,e.byteLength);return 137===t[0]&&80===t[1]?"image/png":71===t[0]&&73===t[1]?"image/gif":66===t[0]&&77===t[1]?"image/bmp":255===t[0]&&216===t[1]?"image/jpeg":"unknown"}class j{constructor(e,t,r){this.image=e,this.type=t,this.release=r}get isOpaque(){return"image/jpeg"===this.type}}class w extends f{constructor(e,t,r,i,n){super(i),this.url=e,this.options=t,this.docType=r,this.key=n,this.result=null,this.status=T.QUEUED,this.request=null,this.abortController=null,this.resolvers=new Array,this.startTime=0,this.numRetries=v.numRetries}}function x(e,t,r){return`${e}:${t}:${r}`}var T;!function(e){e[e.QUEUED=1]="QUEUED",e[e.DOWNLOADING=2]="DOWNLOADING",e[e.DOWNLOADED=3]="DOWNLOADED",e[e.CANCELLED=4]="CANCELLED"}(T||(T={}))},"3bd5":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){var t,r;(t=e.Geometry||(e.Geometry={}))[t.ADD=1]="ADD",t[t.UPDATE=2]="UPDATE",t[t.REMOVE=4]="REMOVE",(r=e.State||(e.State={}))[r.VISIBILITIES=1]="VISIBILITIES",r[r.VERTEXATTRS=2]="VERTEXATTRS",r[r.TRANSFORMATION=4]="TRANSFORMATION",r[r.HIGHLIGHTS=8]="HIGHLIGHTS",r[r.OCCLUDEES=16]="OCCLUDEES"}(i||(i={}))},"3c3b":function(e,t,r){"use strict";r.d(t,"a",(function(){return H}));var i=r("b2b2"),n=r("afe1"),a=r("ce50"),s=r("e92d");const o=s["a"].getLogger("esri.views.3d.glTF");class c{error(e){throw new a["a"]("gltf-loader-error",e)}errorUnsupported(e){throw new a["a"]("gltf-loader-unsupported-feature",e)}errorUnsupportedIf(e,t){e&&this.errorUnsupported(t)}assert(e,t){e||this.error(t)}warn(e){o.warn(e)}warnUnsupported(e){this.warn("[Unsupported Feature] "+e)}warnUnsupportedIf(e,t){e&&this.warnUnsupported(t)}}var l=r("d17d");function u(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}function d(e,t={}){return{data:e,parameters:{wrap:{s:l["B"].REPEAT,t:l["B"].REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}var h,p,f=r("6c97"),b=r("28eb"),m=r("e041"),g=r("549a"),y=r("d791"),O=r("04f0"),v=r("b139"),_=r("8190"),j=r("7cfb");class w{constructor(e){this.data=e,this.offset4=0,this.dataUint32=new Uint32Array(this.data,0,Math.floor(this.data.byteLength/4))}readUint32(){const e=this.offset4;return this.offset4+=1,this.dataUint32[e]}readUint8Array(e){const t=4*this.offset4;return this.offset4+=e/4,new Uint8Array(this.data,t,e)}remainingBytes(){return this.data.byteLength-4*this.offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(h||(h={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(p||(p={}));const x={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},T={pbrMetallicRoughness:x,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},S={ESRI_externalColorMixMode:"tint"},E=(e={})=>{const t={...x,...e.pbrMetallicRoughness},r=A({...S,...e.extras});return{...T,...e,pbrMetallicRoughness:t,extras:r}};function A(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:Object(f["a"])(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}const C={magFilter:l["z"].LINEAR,minFilter:l["z"].LINEAR_MIPMAP_LINEAR,wrapS:l["B"].REPEAT,wrapT:l["B"].REPEAT},R=e=>({...C,...e});function M(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,(e,i,n)=>(t=i||"",r=n||"","")),{dirPart:t,filePart:r}}const P={MAGIC:1179937895,CHUNK_TYPE_JSON:1313821514,CHUNK_TYPE_BIN:5130562,MIN_HEADER_LENGTH:20};class I{constructor(e,t,r,i,n){this.context=e,this.errorContext=t,this.uri=r,this.json=i,this.glbBuffer=n,this.bufferLoaders=new Map,this.textureLoaders=new Map,this.textureCache=new Map,this.materialCache=new Map,this.nodeParentMap=new Map,this.nodeTransformCache=new Map,this.baseUri=M(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),t.errorUnsupportedIf(null==i.scenes,"Scenes must be defined."),t.errorUnsupportedIf(null==i.meshes,"Meshes must be defined"),t.errorUnsupportedIf(null==i.nodes,"Nodes must be defined."),this._computeNodeParents()}static async load(e,t,r,i){if(Object(m["w"])(r)){const i=Object(m["h"])(r);if("model/gltf-binary"!==i.mediaType)try{const n=JSON.parse(i.isBase64?atob(i.data):i.data);return new I(e,t,r,n)}catch{}const n=Object(m["i"])(r);if(I._isGLBData(n))return this._fromGLBData(e,t,r,n)}if(r.endsWith(".gltf")){const n=await e.loadJSON(r,i);return new I(e,t,r,n)}const n=await e.loadBinary(r,i);if(I._isGLBData(n))return this._fromGLBData(e,t,r,n);const a=await e.loadJSON(r,i);return new I(e,t,r,a)}static _isGLBData(e){const t=new w(e);return t.remainingBytes()>=4&&t.readUint32()===P.MAGIC}static async _fromGLBData(e,t,r,i){const n=await I._parseGLBData(t,i);return new I(e,t,r,n.json,n.binaryData)}static async _parseGLBData(e,t){const r=new w(t);e.assert(r.remainingBytes()>=12,"GLB binary data is insufficiently large.");const i=r.readUint32(),n=r.readUint32(),a=r.readUint32();e.assert(i===P.MAGIC,"Magic first 4 bytes do not fit to expected GLB value."),e.assert(t.byteLength>=a,"GLB binary data is smaller than header specifies."),e.errorUnsupportedIf(2!==n,"An unsupported GLB container version was detected. Only version 2 is supported.");let s,o,c=0;for(;r.remainingBytes()>=8;){const t=r.readUint32(),i=r.readUint32();0===c?(e.assert(i===P.CHUNK_TYPE_JSON,"First GLB chunk must be JSON."),e.assert(t>=0,"No JSON data found."),s=await z(r.readUint8Array(t))):1===c?(e.errorUnsupportedIf(i!==P.CHUNK_TYPE_BIN,"Second GLB chunk expected to be BIN."),o=r.readUint8Array(t)):e.warnUnsupported("More than 2 GLB chunks detected. Skipping."),c+=1}return s||e.error("No GLB JSON chunk detected."),{json:s,binaryData:o}}async getBuffer(e,t){const r=this.json.buffers[e],i=this.errorContext;if(null==r.uri)return i.assert(null!=this.glbBuffer,"GLB buffer not present"),this.glbBuffer;const n=await this._getBufferLoader(e,t);return i.assert(n.byteLength===r.byteLength,"Buffer byte lengths should match."),n}async _getBufferLoader(e,t){const r=this.bufferLoaders.get(e);if(r)return r;const i=this.json.buffers[e],n=this.context.loadBinary(this._resolveUri(i.uri),t).then(e=>new Uint8Array(e));return this.bufferLoaders.set(e,n),n}async getAccessor(e,t){const r=this.errorContext;r.errorUnsupportedIf(!this.json.accessors,"Accessors missing.");const i=this.json.accessors[e];r.errorUnsupportedIf(null==(null==i?void 0:i.bufferView),"Some accessor does not specify a bufferView."),r.errorUnsupportedIf(i.type in[h.MAT2,h.MAT3,h.MAT4],`AttributeType ${i.type} is not supported`);const n=this.json.bufferViews[i.bufferView],a=await this.getBuffer(n.buffer,t),s=F[i.type],o=k[i.componentType],c=s*o,l=n.byteStride||c;return{raw:a.buffer,byteStride:l,byteOffset:a.byteOffset+(n.byteOffset||0)+(i.byteOffset||0),entryCount:i.count,isDenselyPacked:l===c,componentCount:s,componentByteSize:o,componentType:i.componentType,min:i.min,max:i.max,normalized:!!i.normalized}}async getIndexData(e,t){if(null==e.indices)return null;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case l["k"].UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case l["k"].UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case l["k"].UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case l["k"].UNSIGNED_BYTE:return Object(j["a"])(this._wrapAccessor(_["l"],r));case l["k"].UNSIGNED_SHORT:return Object(j["a"])(this._wrapAccessor(_["j"],r));case l["k"].UNSIGNED_INT:return Object(j["a"])(this._wrapAccessor(_["k"],r))}}async getPositionData(e,t){const r=this.errorContext;r.errorUnsupportedIf(null==e.attributes.POSITION,"No POSITION vertex data found.");const i=await this.getAccessor(e.attributes.POSITION,t);return r.errorUnsupportedIf(i.componentType!==l["k"].FLOAT,"Expected type FLOAT for POSITION vertex attribute, but found "+V[i.componentType]),r.errorUnsupportedIf(3!==i.componentCount,"POSITION vertex attribute must have 3 components, but found "+i.componentCount.toFixed()),this._wrapAccessor(_["u"],i)}async getNormalData(e,t){const r=this.errorContext;r.assert(null!=e.attributes.NORMAL,"No NORMAL vertex data found.");const i=await this.getAccessor(e.attributes.NORMAL,t);return r.errorUnsupportedIf(i.componentType!==l["k"].FLOAT,"Expected type FLOAT for NORMAL vertex attribute, but found "+V[i.componentType]),r.errorUnsupportedIf(3!==i.componentCount,"NORMAL vertex attribute must have 3 components, but found "+i.componentCount.toFixed()),this._wrapAccessor(_["u"],i)}async getTangentData(e,t){const r=this.errorContext;r.assert(null!=e.attributes.TANGENT,"No TANGENT vertex data found.");const i=await this.getAccessor(e.attributes.TANGENT,t);return r.errorUnsupportedIf(i.componentType!==l["k"].FLOAT,"Expected type FLOAT for TANGENT vertex attribute, but found "+V[i.componentType]),r.errorUnsupportedIf(4!==i.componentCount,"TANGENT vertex attribute must have 4 components, but found "+i.componentCount.toFixed()),new _["C"](i.raw,i.byteOffset,i.byteStride,i.byteOffset+i.byteStride*i.entryCount)}async getTextureCoordinates(e,t){const r=this.errorContext;r.assert(null!=e.attributes.TEXCOORD_0,"No TEXCOORD_0 vertex data found.");const i=await this.getAccessor(e.attributes.TEXCOORD_0,t);return r.errorUnsupportedIf(2!==i.componentCount,"TEXCOORD_0 vertex attribute must have 2 components, but found "+i.componentCount.toFixed()),i.componentType===l["k"].FLOAT?this._wrapAccessor(_["m"],i):(r.errorUnsupportedIf(!i.normalized,"Integer component types are only supported for a normalized accessor for TEXCOORD_0."),U(i))}async getVertexColors(e,t){const r=this.errorContext;r.assert(null!=e.attributes.COLOR_0,"No COLOR_0 vertex data found.");const i=await this.getAccessor(e.attributes.COLOR_0,t);if(r.errorUnsupportedIf(4!==i.componentCount&&3!==i.componentCount,"COLOR_0 attribute must have 3 or 4 components, but found "+i.componentCount.toFixed()),4===i.componentCount){if(i.componentType===l["k"].FLOAT)return this._wrapAccessor(_["C"],i);if(i.componentType===l["k"].UNSIGNED_BYTE)return this._wrapAccessor(_["J"],i);if(i.componentType===l["k"].UNSIGNED_SHORT)return this._wrapAccessor(_["H"],i)}else if(3===i.componentCount){if(i.componentType===l["k"].FLOAT)return this._wrapAccessor(_["u"],i);if(i.componentType===l["k"].UNSIGNED_BYTE)return this._wrapAccessor(_["B"],i);if(i.componentType===l["k"].UNSIGNED_SHORT)return this._wrapAccessor(_["z"],i)}r.errorUnsupported("Unsupported component type for COLOR_0 attribute: "+V[i.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let i=this.materialCache.get(e.material);if(!i){const n=null!=e.material?E(this.json.materials[e.material]):E(),a=n.pbrMetallicRoughness,s=this.hasVertexColors(e),o=this.getTexture(a.baseColorTexture,t),c=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):null,u=r?this.getTexture(n.emissiveTexture,t):null,d=r?this.getTexture(a.metallicRoughnessTexture,t):null,h=null!=e.material?e.material:-1;i={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:a.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await o,normalTexture:await c,name:n.name,id:h,occlusionTexture:await l,emissiveTexture:await u,emissiveFactor:n.emissiveFactor,metallicFactor:a.metallicFactor,roughnessFactor:a.roughnessFactor,metallicRoughnessTexture:await d,vertexColors:s,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode}}return i}async getTexture(e,t){if(!e)return null;this.errorContext.errorUnsupportedIf(0!==(e.texCoord||0),"Only TEXCOORD with index 0 is supported.");const r=e.index,i=this.errorContext,n=this.json.textures[r],a=R(null!=n.sampler?this.json.samplers[n.sampler]:{});i.errorUnsupportedIf(null==n.source,"Source is expected to be defined for a texture.");const s=this.json.images[n.source],o=await this._loadTextureImageData(r,n,t);return Object(b["b"])(this.textureCache,r,()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>(i.error(`Unexpected TextureSampler WrapMode: ${e}. Using default REPEAT(10497).`),10497);return{data:o,wrapS:e(a.wrapS)?a.wrapS:t(a.wrapS),wrapT:e(a.wrapT)?a.wrapT:t(a.wrapT),minFilter:a.minFilter,name:s.name,id:r}})}getNodeTransform(e){if(void 0===e)return L;let t=this.nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),i=this.json.nodes[e];i.matrix?t=Object(y["n"])(Object(n["d"])(),r,i.matrix):i.translation||i.rotation||i.scale?(t=Object(n["c"])(r),i.translation&&Object(y["k"])(t,t,i.translation),i.rotation&&(N[3]=Object(O["c"])(N,i.rotation),Object(y["f"])(t,t,N[3],N)),i.scale&&Object(y["i"])(t,t,i.scale)):t=r,this.nodeTransformCache.set(e,t)}return t}_wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}_resolveUri(e){return Object(m["C"])(e,this.baseUri)}_getNodeParent(e){return this.nodeParentMap.get(e)}_checkVersionSupported(){const e=g["a"].parse(this.json.asset.version,"glTF");D.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json,t=this.errorContext;e.extensionsRequired&&0!==e.extensionsRequired.length&&t.errorUnsupported("gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this.nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,r){const i=this.textureLoaders.get(e);if(i)return i;const n=this._createTextureLoader(t,r);return this.textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=this.json.images[e.source];if(r.uri)return this.context.loadImage(this._resolveUri(r.uri),t);const i=this.errorContext;i.errorUnsupportedIf(null==r.bufferView,"Image bufferView must be defined."),i.errorUnsupportedIf(null==r.mimeType,"Image mimeType must be defined.");const n=this.json.bufferViews[r.bufferView],a=await this.getBuffer(n.buffer,t);return i.errorUnsupportedIf(null!=n.byteStride,"byteStride not supported for image buffer"),B(new Uint8Array(a.buffer,a.byteOffset+(n.byteOffset||0),n.byteLength),r.mimeType)}}const D=new g["a"](2,0,"glTF"),L=Object(y["z"])(Object(n["d"])(),Math.PI/2),N=Object(v["b"])(),F={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},k={[l["k"].BYTE]:1,[l["k"].UNSIGNED_BYTE]:1,[l["k"].SHORT]:2,[l["k"].UNSIGNED_SHORT]:2,[l["k"].FLOAT]:4,[l["k"].UNSIGNED_INT]:4};function U(e){switch(e.componentType){case l["k"].BYTE:return new _["q"](e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case l["k"].UNSIGNED_BYTE:return new _["t"](e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case l["k"].SHORT:return new _["o"](e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case l["k"].UNSIGNED_SHORT:return new _["r"](e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case l["k"].UNSIGNED_INT:return new _["s"](e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case l["k"].FLOAT:return new _["m"](e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);default:return void Object(f["a"])(e.componentType)}}async function z(e){return new Promise((t,r)=>{const i=new Blob([e]),n=new FileReader;n.onload=()=>{const e=n.result;t(JSON.parse(e))},n.onerror=e=>{r(e)},n.readAsText(i)})}async function B(e,t){return new Promise((r,i)=>{const n=new Blob([e],{type:t}),a=URL.createObjectURL(n),s=new Image;s.addEventListener("load",()=>{URL.revokeObjectURL(a),"decode"in s?s.decode().then(()=>r(s),()=>r(s)):r(s)}),s.addEventListener("error",e=>{URL.revokeObjectURL(a),i(e)}),s.src=a})}const V={5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5125:"UNSIGNED_INT",5126:"FLOAT"};let G=0;async function H(e,t,r={},a=!0){const s=await I.load(e,X,t,r),o="gltf_"+G++,c={lods:[],materials:new Map,textures:new Map,meta:q(s)},u=!(!s.json.asset.extras||"symbolResource"!==s.json.asset.extras.ESRI_type),d=new Map;await W(s,async(e,t,u,h)=>{var p;const f=null!=(p=d.get(u))?p:0;d.set(u,f+1);const b=void 0!==e.mode?e.mode:l["r"].TRIANGLES,m=b===l["r"].TRIANGLES||b===l["r"].TRIANGLE_STRIP||b===l["r"].TRIANGLE_FAN?b:null;if(Object(i["j"])(m))return void X.warnUnsupported("Unsupported primitive mode ("+J[b]+"). Skipping primitive.");if(!s.hasPositions(e))return void X.warn("Skipping primitive without POSITION vertex attribute.");const g=s.getPositionData(e,r),y=s.getMaterial(e,r,a),O=s.hasNormals(e)?s.getNormalData(e,r):null,v=s.hasTangents(e)?s.getTangentData(e,r):null,_=s.hasTextureCoordinates(e)?s.getTextureCoordinates(e,r):null,j=s.hasVertexColors(e)?s.getVertexColors(e,r):null,w=s.getIndexData(e,r),x={transform:Object(n["c"])(t),attributes:{position:await g,normal:O?await O:null,texCoord0:_?await _:null,color:j?await j:null,tangent:v?await v:null},indices:await w,primitiveType:m,material:Z(c,await y,o)};let T=null;Object(i["k"])(c.meta)&&Object(i["k"])(c.meta.ESRI_lod)&&"screenSpaceRadius"===c.meta.ESRI_lod.metric&&(T=c.meta.ESRI_lod.thresholds[u]),c.lods[u]=c.lods[u]||{parts:[],name:h,lodThreshold:T},c.lods[u].parts[f]=x});for(const i of c.lods)i.parts=i.parts.filter(e=>!!e);return{model:c,meta:{isEsriSymbolResource:u,uri:s.uri},customMeta:{}}}function q(e){const t=e.json;let r=null;return t.nodes.forEach(e=>{const t=e.extras;Object(i["k"])(t)&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)}),r}async function W(e,t){const r=e.json,i=r.scenes[r.scene||0].nodes,n=i.length>1,a=[];for(const o of i){const e=r.nodes[o];a.push(s(o,0)),$(e)&&!n&&e.extensions.MSFT_lod.ids.forEach((e,t)=>s(e,t+1))}async function s(i,n){const o=r.nodes[i],c=e.getNodeTransform(i);if(X.warnUnsupportedIf(null!=o.weights,"Morph targets are not supported."),null!=o.mesh){const e=r.meshes[o.mesh];for(const r of e.primitives)a.push(t(r,c,n,e.name))}for(const e of o.children||[])a.push(s(e,n))}await Promise.all(a)}function $(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function Z(e,t,r){const i=t=>{const i=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(i)){const r=d(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:Y.some(e=>e===t.minFilter),noUnpackFlip:!0});e.textures.set(i,r)}return i},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=u({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?i(t.colorTexture):void 0,textureNormal:t.normalTexture?i(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?i(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?i(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?i(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(n,r)}return n}const X=new c,Y=[l["z"].LINEAR_MIPMAP_LINEAR,l["z"].LINEAR_MIPMAP_NEAREST],J=["POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN"]},"3c9c":function(e,t,r){"use strict";var i;function n(e){return"global"===e?i.Global:i.Local}function a(e){return e===i.Global?"global":"local"}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n})),function(e){e[e.Global=1]="Global",e[e.Local=2]="Local"}(i||(i={}))},"3cac":function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return c}));r("04f0");var i=r("b139"),n=r("e431"),a=r("a1b1"),s=r("7361");function o(e=h){return[e[0],e[1],e[2],e[3]]}function c(e,t){return l(e[0],e[1],e[2],t,s["e"].get())}function l(e,t,r,i,n=o()){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function u(e,t,r=o()){return Object(n["i"])(r,e,t),Object(n["t"])(r,r),r[3]=Object(a["a"])(e,t),r}function d(e){return e}const h=[0,0,1,0];Object(i["b"])(),Object(i["b"])()},"3cacd":function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("afcf")),c=r("d386"),l=r("09db"),u=r("e1fa"),d=r("787a"),h=r("a7a7"),p=r("fa90"),f=r("49951"),b=r("ed91"),m=r("6759");let g=i=class extends h["a"]{constructor(e){super(e),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(e){return e&&e.map(e=>"image"===e.type?p["a"].fromJSON(e):"barchart"===e.type?u["a"].fromJSON(e):"columnchart"===e.type?d["a"].fromJSON(e):"linechart"===e.type?f["a"].fromJSON(e):"piechart"===e.type?b["a"].fromJSON(e):void 0).filter(Boolean)}writeMediaInfos(e,t){t.mediaInfos=e&&e.map(e=>e.toJSON())}clone(){return new i(Object(a["a"])({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};Object(n["a"])([Object(s["b"])()],g.prototype,"activeMediaInfoIndex",void 0),Object(n["a"])([Object(s["b"])({type:Object,json:{write:!0}})],g.prototype,"attributes",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],g.prototype,"description",void 0),Object(n["a"])([Object(s["b"])({types:[m["a"]]})],g.prototype,"mediaInfos",void 0),Object(n["a"])([Object(o["a"])("mediaInfos")],g.prototype,"readMediaInfos",null),Object(n["a"])([Object(l["a"])("mediaInfos")],g.prototype,"writeMediaInfos",null),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],g.prototype,"title",void 0),Object(n["a"])([Object(s["b"])({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0),g=i=Object(n["a"])([Object(c["a"])("esri.popup.content.MediaContent")],g);const y=g},"3d59":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("e92d"),a=r("b2b2"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("54b4");const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=Object(c["e"])(this.url);if(Object(a["k"])(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",Object(c["g"])(e,n["a"].getLogger(this.declaredClass)))}};return Object(i["a"])([Object(s["b"])()],t.prototype,"title",null),Object(i["a"])([Object(s["b"])({type:String})],t.prototype,"url",null),t=Object(i["a"])([Object(o["a"])("esri.layers.mixins.ArcGISService")],t),t}},"3dc2":function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return m}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("e041"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("448d")),u=r("afcf"),d=r("d386"),h=r("09db"),p=r("fcf2");const f=Object(a["b"])()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"});let b=i=class extends s["a"]{constructor(e){super(e)}readHref(e,t,r){return e?Object(p["b"])(e,r):t.dataURI}writeHref(e,t,r,i){e&&(Object(o["w"])(e)?t.dataURI=e:(t.href=Object(p["f"])(e,i),Object(o["u"])(t.href)&&(t.href=Object(o["F"])(t.href))))}clone(){return new i({href:this.href,primitive:this.primitive})}};Object(n["a"])([Object(c["b"])({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],b.prototype,"href",void 0),Object(n["a"])([Object(u["a"])("href")],b.prototype,"readHref",null),Object(n["a"])([Object(h["a"])("href",{href:{type:String},dataURI:{type:String}})],b.prototype,"writeHref",null),Object(n["a"])([Object(l["a"])(f)],b.prototype,"primitive",void 0),b=i=Object(n["a"])([Object(d["a"])("esri.symbols.support.IconSymbol3DLayerResource")],b);const m="circle"},"3e446":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var i=r("2aad"),n=r("3886"),a=r("690a");function s(){const e=new a["a"];return e.include(i["a"]),e.fragment.uniforms.add("tex","sampler2D"),e.fragment.uniforms.add("uColor","vec4"),e.fragment.code.add(n["a"]`void main() {
  757. vec4 texColor = texture2D(tex, uv);
  758. gl_FragColor = texColor * uColor;
  759. }`),e}const o=Object.freeze({__proto__:null,build:s})},"3e7b":function(e,t,r){"use strict";var i=r("a4ee"),n=r("fc29"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("3349"),c=r("b541");function l(e,t){return e.length=0,t.forEach(t=>e.push(t)),e}const u=new Set,d=[],h=new Map,p=[0,0];let f=class extends n["a"]{constructor(e){super(e),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:e,process:t}=this;this._queue=new c["a"]({concurrency:e,process:(e,r)=>{const i=this._keyToItem.get(e);return t(i,{signal:r})},peeker:e=>e.values().next().value})}destroy(){this.clear(),this._queue.destroy(),this._queue=null}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}get updating(){return this.length>0||this.onGoingCount>0}abort(e){const t="string"==typeof e?e:e.id;this._queue.abort(t)}clear(){this._queue.clear(),this._keyToItem.clear(),this.notifyChange("updating")}has(e){return"string"==typeof e?this._keyToItem.has(e):this._keyToItem.has(e.id)}isOngoing(e){const t="string"==typeof e?e:e.id;return this.has(t)&&this._queue.isOngoing(t)}pause(){this._queue.pause()}push(e,t){const r=e.key.id+"-"+t;if(this.has(r))return this.get(r);const i=this._queue.push(r),n=()=>{this._keyToItem.delete(r),this.notifyChange("updating")};return this._keyToItem.set(r,e),i.then(n,n),this.notifyChange("updating"),i}reset(){this._queue.reset(),this.notifyChange("updating")}resume(){this._queue.resume()}_peekByScaleFirst(e){if(!this.state)return e.values().next().value;const t=this.tileInfoView;let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;e.forEach(e=>{const t=this._keyToItem.get(e),n=this.tileInfoView.getTileScale(t.key);h.has(n)||(h.set(n,[]),r=Math.max(n,r),i=Math.min(n,i)),h.get(n).push(t.key),u.add(n)});let n=this.state.scale;h.has(n)||(l(d,u),d.sort((e,t)=>e-t),n=d.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,d[0])),n=Math.min(n,r),n=Math.max(n,i);const a=h.get(n),s=t.getClosestInfoForScale(n),o=s.getColumnForX(this.state.center[0]),c=s.getRowForY(this.state.center[1]);return a.sort((e,t)=>{const r=s.denormalizeCol(e.col,e.world),i=s.denormalizeCol(t.col,t.world);return Math.sqrt((o-r)*(o-r)+(c-e.row)*(c-e.row))-Math.sqrt((o-i)*(o-i)+(c-t.row)*(c-t.row))}),u.clear(),h.clear(),a[0].id}_peekByCenterFirst(e){if(!this.state)return e.values().next().value;const t=this.tileInfoView,r=this.state.center;let i=Number.POSITIVE_INFINITY,n=null;return e.forEach(e=>{const a=this._keyToItem.get(e);t.getTileCoords(p,a.key);const s=Object(o["b"])(p,r);s<i&&(i=s,n=a.key)}),n.id}};Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"concurrency",void 0),Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"process",void 0),Object(i["a"])([Object(a["b"])()],f.prototype,"state",void 0),Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"strategy",void 0),Object(i["a"])([Object(a["b"])({constructOnly:!0})],f.prototype,"tileInfoView",void 0),Object(i["a"])([Object(a["b"])({readOnly:!0})],f.prototype,"updating",null),f=Object(i["a"])([Object(s["a"])("esri.views.2d.tiling.PagedTileQueue")],f)},"3eec":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED"}(i||(i={}))},"3f3e":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e,t,r,i,n,a=!1,s=0){this.name=e,this.count=t,this.type=r,this.offset=i,this.stride=n,this.normalized=a,this.divisor=s}}},"3f60":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("9ef0"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0")),l=r("d386"),u=r("09db");let d=i=class extends s["a"]{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,r){t[r]=null==e?0:e}clone(){return new i({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};Object(n["a"])([Object(o["b"])({type:a["a"],json:{type:[c["a"]],write:!0}})],d.prototype,"color",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],d.prototype,"label",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],d.prototype,"value",void 0),Object(n["a"])([Object(u["a"])("value")],d.prototype,"writeValue",null),d=i=Object(n["a"])([Object(l["a"])("esri.renderers.visualVariables.support.ColorStop")],d);const h=d},4106:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("448d")),c=r("d386"),l=r("e5ec"),u=r("4338");let d=i=class extends u["a"]{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some(e=>(String(e.code)===r&&(t=e.name),!!t))}return t}clone(){return new i({codedValues:Object(a["a"])(this.codedValues),name:this.name})}};Object(n["a"])([Object(s["b"])({type:[l["a"]],json:{write:!0}})],d.prototype,"codedValues",void 0),Object(n["a"])([Object(o["a"])({codedValue:"coded-value"})],d.prototype,"type",void 0),d=i=Object(n["a"])([Object(c["a"])("esri.layers.support.CodedValueDomain")],d);const h=d},4212:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return o}));const i=1e-6,n=Math.random,a=Math.PI/180,s=180/Math.PI;function o(e){return e*a}function c(e){return e*s}function l(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))}Object.freeze({__proto__:null,EPSILON:i,RANDOM:n,toRadian:o,toDegree:c,equals:l})},4261:function(e,t,r){"use strict";r.d(t,"a",(function(){return U})),r.d(t,"b",(function(){return k})),r.d(t,"c",(function(){return z})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return O})),r.d(t,"f",(function(){return w})),r.d(t,"g",(function(){return j})),r.d(t,"h",(function(){return s})),r.d(t,"i",(function(){return m})),r.d(t,"j",(function(){return y})),r.d(t,"k",(function(){return M})),r.d(t,"l",(function(){return N})),r.d(t,"m",(function(){return c})),r.d(t,"n",(function(){return d})),r.d(t,"o",(function(){return p})),r.d(t,"p",(function(){return h})),r.d(t,"q",(function(){return l})),r.d(t,"r",(function(){return u})),r.d(t,"s",(function(){return I})),r.d(t,"t",(function(){return o})),r.d(t,"u",(function(){return g})),r.d(t,"v",(function(){return x})),r.d(t,"w",(function(){return T})),r.d(t,"x",(function(){return L})),r.d(t,"y",(function(){return _})),r.d(t,"z",(function(){return S})),r.d(t,"A",(function(){return E})),r.d(t,"B",(function(){return R})),r.d(t,"C",(function(){return C})),r.d(t,"D",(function(){return A})),r.d(t,"E",(function(){return v})),r.d(t,"F",(function(){return P})),r.d(t,"G",(function(){return b})),r.d(t,"H",(function(){return F}));var i=r("b2b2"),n=(r("3af1"),r("9180"));function a(e){return e}function s(e=z){return a([e[0],e[1],e[2],e[3],e[4],e[5]])}function o(e,t,r,i,n,a,o=s()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=n,o[5]=a,o}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function u(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t,r=0,i=t.length/3){let n=e[0],a=e[1],s=e[2],o=e[3],c=e[4],l=e[5];for(let u=0;u<i;u++)n=Math.min(n,t[r+3*u]),a=Math.min(a,t[r+3*u+1]),s=Math.min(s,t[r+3*u+2]),o=Math.max(o,t[r+3*u]),c=Math.max(c,t[r+3*u+1]),l=Math.max(l,t[r+3*u+2]);e[0]=n,e[1]=a,e[2]=s,e[3]=o,e[4]=c,e[5]=l}function h(e,t,r,i){e[0]=Math.min(e[0],e[0]+t),e[3]=Math.max(e[3],e[3]+t),e[1]=Math.min(e[1],e[1]+r),e[4]=Math.max(e[4],e[4]+r),e[2]=Math.min(e[2],e[2]+i),e[5]=Math.max(e[5],e[5]+i)}function p(e,t,r){const i=t.length;let n=e[0],a=e[1],s=e[2],o=e[3],c=e[4],l=e[5];if(r)for(let u=0;u<i;u++){const e=t[u];n=Math.min(n,e[0]),a=Math.min(a,e[1]),s=Math.min(s,e[2]),o=Math.max(o,e[0]),c=Math.max(c,e[1]),l=Math.max(l,e[2])}else for(let u=0;u<i;u++){const e=t[u];n=Math.min(n,e[0]),a=Math.min(a,e[1]),o=Math.max(o,e[0]),c=Math.max(c,e[1])}e[0]=n,e[1]=a,e[2]=s,e[3]=o,e[4]=c,e[5]=l}function f(e){for(let t=0;t<6;t++)if(!isFinite(e[t]))return!1;return!0}function b(e){return e[0]>=e[3]?0:e[3]-e[0]}function m(e){return e[1]>=e[4]?0:e[4]-e[1]}function g(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){const t=b(e),r=g(e),i=m(e);return Math.sqrt(t*t+r*r+i*i)}function O(e,t=[0,0,0]){return t[0]=e[0]+b(e)/2,t[1]=e[1]+m(e)/2,t[2]=e[2]+g(e)/2,t}function v(e,t=[0,0,0]){return t[0]=b(e),t[1]=m(e),t[2]=g(e),t}function _(e){return Math.max(b(e),g(e),m(e))}function j(e,t){return t[0]>=e[0]&&t[1]>=e[1]&&t[2]>=e[2]&&t[0]<=e[3]&&t[1]<=e[4]&&t[2]<=e[5]}function w(e,t){return t[0]>=e[0]&&t[1]>=e[1]&&t[2]>=e[2]&&t[3]<=e[3]&&t[4]<=e[4]&&t[5]<=e[5]}function x(e,t){return Math.max(t[0],e[0])<=Math.min(t[3],e[3])&&Math.max(t[1],e[1])<=Math.min(t[4],e[4])&&Math.max(t[2],e[2])<=Math.min(t[5],e[5])}function T(e,t){return!!Object(i["j"])(t)||x(e,t)}function S(e,t,r,i,n=e){return n[0]=e[0]+t,n[1]=e[1]+r,n[2]=e[2]+i,n[3]=e[3]+t,n[4]=e[4]+r,n[5]=e[5]+i,n}function E(e,t,r=e){const i=e[0]+b(e)/2,n=e[1]+m(e)/2,a=e[2]+g(e)/2;return r[0]=i+(e[0]-i)*t,r[1]=n+(e[1]-n)*t,r[2]=a+(e[2]-a)*t,r[3]=i+(e[3]-i)*t,r[4]=n+(e[4]-n)*t,r[5]=a+(e[5]-a)*t,r}function A(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function C(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function R(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function M(e){return e?R(e,U):s(U)}function P(e,t){return t||(t=Object(n["l"])()),t[0]=e[0],t[1]=e[1],t[2]=e[3],t[3]=e[4],t}function I(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function D(e){return 6===e.length}function L(e){return 0===b(e)&&0===m(e)&&0===g(e)}function N(e,t,r){if(Object(i["j"])(e)||Object(i["j"])(t))return e===t;if(!D(e)||!D(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function F(e,t,r,i,n,a){return o(e,t,r,i,n,a,B)}const k=a([-1/0,-1/0,-1/0,1/0,1/0,1/0]),U=a([1/0,1/0,1/0,-1/0,-1/0,-1/0]),z=a([0,0,0,0,0,0]),B=s()},4294:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return u}));var i,n=r("38a4"),a=r("9180"),s=r("9b8b"),o=r("b7c2"),c=r("f643");!function(e){e[e.None=0]="None",e[e.ColorAndWater=1]="ColorAndWater",e[e.Highlight=2]="Highlight",e[e.Occluded=3]="Occluded"}(i||(i={}));class l{constructor(e,t){this.index=e,this.renderTargets=t,this.extent=Object(a["l"])(),this.resolution=0,this.renderLocalOrigin=Object(c["a"])(0,0,0,"O"),this.pixelRatio=1,this.mapUnitsPerPixel=1,this.canvasGeometries=new d,this.validTargets=null,this.hasDrapedFeatureSource=!1,this.hasDrapedRasterSource=!1,this.hasTargetWithoutRasterImage=!1,this.index=e,this.validTargets=new Array(t.renderTargets.length).fill(!1)}getValidTarget(e){return this.validTargets[e]?this.renderTargets.getTarget(e):null}get needsColorWithoutRasterImage(){return this.hasDrapedRasterSource&&this.hasDrapedFeatureSource&&this.hasTargetWithoutRasterImage}getColorTexture(e){const t=e===i.ColorAndWater?this.renderTargets.getTarget(s["d"].Color):e===i.Highlight?this.renderTargets.getTarget(s["d"].Highlight):this.renderTargets.getTarget(s["d"].Occluded);return t?t.getTexture():null}getNormalTexture(e){const t=e===i.ColorAndWater?this.renderTargets.getTarget(s["d"].Water):null;return t?t.getTexture():null}draw(e,t){const r=this.computeRenderTargetValidityBitfield(),i=this.needsColorWithoutRasterImage;for(const n of this.renderTargets.renderTargets)n.type===s["d"].ColorNoRasterImage&&!1===i?this.validTargets[n.type]=!1:this.validTargets[n.type]=e.drawTarget(this,n,t);return r^this.computeRenderTargetValidityBitfield()?o["n"].CHANGED:o["n"].UNCHANGED}computeRenderTargetValidityBitfield(){const e=this.validTargets;return+e[s["d"].Color]|+e[s["d"].ColorNoRasterImage]<<1|+e[s["d"].Highlight]<<2|+e[s["d"].Water]<<3|+e[s["d"].Occluded]<<4}setupGeometryViewsCyclical(e){this.setupGeometryViewsDirect();const t=.001*e.range;if(this.extent[0]-t<=e.min){const t=this.canvasGeometries.extents[this.canvasGeometries.numViews++];Object(a["A"])(this.extent,e.range,0,t)}if(this.extent[2]+t>=e.max){const t=this.canvasGeometries.extents[this.canvasGeometries.numViews++];Object(a["A"])(this.extent,-e.range,0,t)}}setupGeometryViewsDirect(){this.canvasGeometries.numViews=1,Object(a["k"])(this.canvasGeometries.extents[0],this.extent)}hasSomeSizedView(){for(let e=0;e<this.canvasGeometries.numViews;e++){const t=this.canvasGeometries.extents[e];if(t[0]!==t[2]&&t[1]!==t[3])return!0}return!1}applyViewport(e){e.setViewport(this.index===s["b"].INNER?0:this.resolution,0,this.resolution,this.resolution)}}function u(e,t,r){return Math.min(Object(n["n"])(Math.max(e,t)+256),r)}class d{constructor(){this.extents=[Object(a["l"])(),Object(a["l"])(),Object(a["l"])()],this.numViews=0}}},"42be":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));var i=r("cea0");function n(e){const t=Object(i["e"])(100*(1-e));return Math.max(0,Math.min(t,100))}function a(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},4338:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("fa8a"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("448d")),c=r("d386");const l=new n["a"]({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends a["a"]{constructor(e){super(e),this.name=null,this.type=null}};Object(i["a"])([Object(s["b"])({type:String,json:{write:!0}})],u.prototype,"name",void 0),Object(i["a"])([Object(o["a"])(l)],u.prototype,"type",void 0),u=Object(i["a"])([Object(c["a"])("esri.layers.support.Domain")],u);const d=u},"436b":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("a9e6"),n=r("4ae5");class a extends i["a"]{constructor(e,t,r,i,n,a){super(e),this._lazyPt=[],this._hasZ=!1,this._hasM=!1,this._spRef=t,this._hasZ=r,this._hasM=i,this._cacheId=n,this._partId=a}get(e){if(void 0===this._lazyPt[e]){const t=this._elements[e];if(void 0===t)return;const r=this._hasZ,i=this._hasM;let a=null;a=r&&!i?new n["a"](t[0],t[1],t[2],void 0,this._spRef):i&&!r?new n["a"](t[0],t[1],void 0,t[2],this._spRef):r&&i?new n["a"](t[0],t[1],t[2],t[3],this._spRef):new n["a"](t[0],t[1],this._spRef),a.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+e.toString(),this._lazyPt[e]=a}return this._lazyPt[e]}equalityTest(e){return e===this||null!==e&&e instanceof a!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()+"-"+this._partId.toString()}}},4377:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.code.add(i["a"]`vec4 premultiplyAlpha(vec4 v) {
  760. return vec4(v.rgb * v.a, v.a);
  761. }
  762. vec3 rgb2hsv(vec3 c) {
  763. vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
  764. vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);
  765. vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);
  766. float d = q.x - min(q.w, q.y);
  767. float e = 1.0e-10;
  768. return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);
  769. }
  770. vec3 hsv2rgb(vec3 c) {
  771. vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
  772. vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
  773. return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
  774. }
  775. float rgb2v(vec3 c) {
  776. return max(c.x, max(c.y, c.z));
  777. }`)}},4395:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("e92d"),n=r("b2b2"),a=r("f9d0"),s=r("1153");const o=i["a"].getLogger("esri.views.3d.webgl-engine.lib.GLMaterialRepository");class c{constructor(e){this._glMaterial=e,this.refCnt=0,this._glMaterial=e}incRefCnt(){++this.refCnt}decRefCnt(){--this.refCnt,Object(s["a"])(this.refCnt>=0)}getRefCnt(){return this.refCnt}get glMaterial(){return this._glMaterial}}class l{constructor(e,t,r,i){this._textureRepository=e,this._techniqueRepository=t,this.materialChanged=r,this.requestRender=i,this._id2glMaterialRef=new a["a"]}dispose(){this._textureRepository.dispose()}acquire(e,t){this._ownMaterial(e);let r=this._id2glMaterialRef.get(t,e.id);if(Object(n["j"])(r)){const i=e.createGLMaterial({material:e,techniqueRep:this._techniqueRepository,textureRep:this._textureRepository,output:t});r=new c(i),this._id2glMaterialRef.set(t,e.id,r)}return r.incRefCnt(),r.glMaterial}release(e,t){const r=this._id2glMaterialRef.get(t,e.id);Object(n["k"])(r)&&(r.decRefCnt(),0===r.getRefCnt()&&(Object(n["e"])(r.glMaterial),this._id2glMaterialRef.delete(t,e.id)))}_ownMaterial(e){Object(n["k"])(e.repository)&&e.repository!==this&&o.error("Material is already owned by a different material repository"),e.repository=this}}},"43a4":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return o}));var i,n=r("3886"),a=r("690a"),s=r("b7bd");function o(e){const t=new a["a"];return e.output===i.EdgeDetector&&(t.attributes.add(s["a"].POSITION,"vec2"),t.vertex.uniforms.add("resolution","vec4"),t.varyings.add("fTexCoord","vec2"),t.varyings.add("fOffset[3]","vec4"),t.vertex.code.add(n["a"]`void SMAAEdgeDetectionVS( vec2 texcoord ) {
  778. fOffset[0] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );
  779. fOffset[1] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );
  780. fOffset[2] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );
  781. }
  782. void main() {
  783. fTexCoord = (position + 1.0 ) * 0.5;
  784. gl_Position = vec4(position, 0, 1);
  785. SMAAEdgeDetectionVS( fTexCoord );
  786. }`),t.fragment.uniforms.add("tColor","sampler2D"),t.fragment.code.add(n["a"]`
  787. vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {
  788. vec2 threshold = vec2( ${n["a"].float(e.threshold)} );
  789. // Calculate color deltas:
  790. vec4 delta;
  791. vec3 C = texture2D( colorTex, texcoord ).rgb;
  792. vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;
  793. vec3 t = abs( C - Cleft );
  794. delta.x = max( max( t.r, t.g ), t.b );
  795. vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;
  796. t = abs( C - Ctop );
  797. delta.y = max( max( t.r, t.g ), t.b );
  798. // We do the usual threshold:
  799. vec2 edges = step( threshold, delta.xy );
  800. // Then discard if there is no edge:
  801. if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )
  802. discard;
  803. // Calculate right and bottom deltas:
  804. vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;
  805. t = abs( C - Cright );
  806. delta.z = max( max( t.r, t.g ), t.b );
  807. vec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;
  808. t = abs( C - Cbottom );
  809. delta.w = max( max( t.r, t.g ), t.b );
  810. // Calculate the maximum delta in the direct neighborhood:
  811. float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );
  812. // Calculate left-left and top-top deltas:
  813. vec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;
  814. t = abs( C - Cleftleft );
  815. delta.z = max( max( t.r, t.g ), t.b );
  816. vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;
  817. t = abs( C - Ctoptop );
  818. delta.w = max( max( t.r, t.g ), t.b );
  819. // Calculate the final maximum delta:
  820. maxDelta = max( max( maxDelta, delta.z ), delta.w );
  821. // Local contrast adaptation in action:
  822. edges.xy *= step( maxDelta, float(${n["a"].float(e.localConstrastAdaption)}) * delta.xy );
  823. return vec4( edges, 0.0, 0.0 );
  824. }
  825. void main() {
  826. gl_FragColor = SMAAColorEdgeDetectionPS( fTexCoord, fOffset, tColor );
  827. }
  828. `)),e.output===i.BlendWeight&&(t.attributes.add(s["a"].POSITION,"vec2"),t.vertex.uniforms.add("resolution","vec4"),t.varyings.add("fTexCoord","vec2"),t.varyings.add("fOffset[3]","vec4"),t.varyings.add("fPixCoord","vec2"),t.vertex.code.add(n["a"]`
  829. void SMAABlendingWeightCalculationVS( vec2 texcoord ) {
  830. fPixCoord = texcoord * resolution.zw;
  831. fOffset[0] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );
  832. fOffset[1] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );
  833. fOffset[2] = vec4( fOffset[0].xz, fOffset[1].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( ${n["a"].int(e.maxSearchSteps)} );
  834. }
  835. void main() {
  836. fTexCoord = (position + 1.0 ) * 0.5;
  837. gl_Position = vec4(position, 0, 1);
  838. SMAABlendingWeightCalculationVS( fTexCoord );
  839. }
  840. `),t.fragment.uniforms.add("tEdges","sampler2D").add("tArea","sampler2D").add("tSearch","sampler2D").add("tColor","sampler2D").add("resolution","vec4"),t.fragment.code.add(n["a"]`
  841. #define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )
  842. #define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )
  843. vec4 SMAASampleLevelZeroOffset(sampler2D tex, vec2 coord, vec2 offset) {
  844. return texture2D( tex, coord + offset.x * resolution.xy, 0.0 );
  845. }
  846. vec2 round( vec2 x ) {
  847. return sign( x ) * floor( abs( x ) + 0.5 );
  848. }
  849. float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {
  850. e.r = bias + e.r * scale;
  851. return 255.0 * texture2D( searchTex, e, 0.0 ).r;
  852. }
  853. float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
  854. vec2 e = vec2( 0.0, 1.0 );
  855. for ( int i = 0; i < ${n["a"].int(e.maxSearchSteps)}; i ++ ) {
  856. e = texture2D( edgesTex, texcoord, 0.0 ).rg;
  857. texcoord -= vec2( 2.0, 0.0 ) * resolution.xy;
  858. if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;
  859. }
  860. texcoord.x += 0.25 * resolution.x;
  861. texcoord.x += resolution.x;
  862. texcoord.x += 2.0 * resolution.x;
  863. texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);
  864. return texcoord.x;
  865. }
  866. float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
  867. vec2 e = vec2( 0.0, 1.0 );
  868. for ( int i = 0; i < ${n["a"].int(e.maxSearchSteps)}; i ++ ) {
  869. e = texture2D( edgesTex, texcoord, 0.0 ).rg;
  870. texcoord += vec2( 2.0, 0.0 ) * resolution.xy;
  871. if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;
  872. }
  873. texcoord.x -= 0.25 * resolution.x;
  874. texcoord.x -= resolution.x;
  875. texcoord.x -= 2.0 * resolution.x;
  876. texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );
  877. return texcoord.x;
  878. }
  879. float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
  880. vec2 e = vec2( 1.0, 0.0 );
  881. for ( int i = 0; i < ${n["a"].int(e.maxSearchSteps)}; i ++ ) {
  882. e = texture2D( edgesTex, texcoord, 0.0 ).rg;
  883. texcoord += vec2( 0.0, 2.0 ) * resolution.xy;
  884. if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;
  885. }
  886. texcoord.y -= 0.25 * resolution.y;
  887. texcoord.y -= resolution.y;
  888. texcoord.y -= 2.0 * resolution.y;
  889. texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );
  890. return texcoord.y;
  891. }
  892. float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {
  893. vec2 e = vec2( 1.0, 0.0 );
  894. for ( int i = 0; i < ${n["a"].int(e.maxSearchSteps)}; i ++ ) {
  895. e = texture2D( edgesTex, texcoord, 0.0 ).rg;
  896. texcoord -= vec2( 0.0, 2.0 ) * resolution.xy;
  897. if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;
  898. }
  899. texcoord.y += 0.25 * resolution.y;
  900. texcoord.y += resolution.y;
  901. texcoord.y += 2.0 * resolution.y;
  902. texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );
  903. return texcoord.y;
  904. }
  905. vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {
  906. vec2 texcoord = float( ${n["a"].int(e.maxDistanceAreaTex)} ) * round( 4.0 * vec2( e1, e2 ) ) + dist;
  907. texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );
  908. texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;
  909. return texture2D( areaTex, texcoord, 0.0 ).rg;
  910. }
  911. vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {
  912. vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );
  913. vec2 e = texture2D( edgesTex, texcoord ).rg;
  914. if ( e.g > 0.0 ) {
  915. vec2 d;
  916. vec2 coords;
  917. coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );
  918. coords.y = offset[ 1 ].y;
  919. d.x = coords.x;
  920. float e1 = texture2D( edgesTex, coords, 0.0 ).r;
  921. coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );
  922. d.y = coords.x;
  923. d = d * resolution.z - pixcoord.x;
  924. vec2 sqrt_d = sqrt( abs( d ) );
  925. coords.y -= 1.0 * resolution.y;
  926. float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, vec2( 1.0, 0.0 ) ).r;
  927. weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );
  928. }
  929. if ( e.r > 0.0 ) {
  930. vec2 d;
  931. vec2 coords;
  932. coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );
  933. coords.x = offset[ 0 ].x;
  934. d.x = coords.y;
  935. float e1 = texture2D( edgesTex, coords, 0.0 ).g;
  936. coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );
  937. d.y = coords.y;
  938. d = d * resolution.w - pixcoord.y;
  939. vec2 sqrt_d = sqrt( abs( d ) );
  940. coords.y -= 1.0 * resolution.y;
  941. float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, vec2( 0.0, 1.0 ) ).g;
  942. weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );
  943. // for some reason the following lines are necessary to prevent
  944. // texture lookup precision issues on some Intel integrated graphics chips
  945. vec4 dbg = (offset[ 0 ]+offset[ 1 ]+offset[ 2 ] + coords.xyyx);
  946. weights.r += 0.00000001 * dot(vec4(0,1,0,1),dbg);
  947. }
  948. return weights;
  949. }
  950. void main() {
  951. gl_FragColor = SMAABlendingWeightCalculationPS( fTexCoord, fPixCoord, fOffset, tEdges, tArea, tSearch, ivec4( 0.0 ) );
  952. }
  953. `)),e.output===i.Blur&&(t.attributes.add(s["a"].POSITION,"vec2"),t.vertex.uniforms.add("resolution","vec4"),t.varyings.add("fTexCoord","vec2"),t.varyings.add("fOffset[2]","vec4"),t.vertex.code.add(n["a"]`void SMAANeighborhoodBlendingVS( vec2 texcoord ) {
  954. fOffset[0] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );
  955. fOffset[1] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );
  956. }
  957. void main() {
  958. fTexCoord = (position + 1.0 ) * 0.5;
  959. gl_Position = vec4(position, 0, 1);
  960. SMAANeighborhoodBlendingVS(fTexCoord);
  961. }`),t.fragment.uniforms.add("tBlendWeights","sampler2D"),t.fragment.uniforms.add("tColor","sampler2D"),t.fragment.uniforms.add("resolution","vec4"),t.fragment.code.add(n["a"]`vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {
  962. vec4 a;
  963. a.xz = texture2D( blendTex, texcoord ).xz;
  964. a.y = texture2D( blendTex, offset[ 1 ].zw ).g;
  965. a.w = texture2D( blendTex, offset[ 1 ].xy ).a;
  966. if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {
  967. return texture2D( colorTex, texcoord, 0.0 );
  968. } else {
  969. vec2 offset;
  970. offset.x = a.a > a.b ? a.a : -a.b;
  971. offset.y = a.g > a.r ? -a.g : a.r;
  972. if ( abs( offset.x ) > abs( offset.y )) {
  973. offset.y = 0.0;
  974. } else {
  975. offset.x = 0.0;
  976. }
  977. vec4 C = texture2D( colorTex, texcoord, 0.0 );
  978. texcoord += sign( offset ) * resolution.xy;
  979. vec4 Cop = texture2D( colorTex, texcoord, 0.0 );
  980. float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );
  981. vec4 mixed = mix(C, Cop, s);
  982. return mixed;
  983. }
  984. }
  985. void main() {
  986. gl_FragColor = SMAANeighborhoodBlendingPS( fTexCoord, fOffset, tColor, tBlendWeights );
  987. }`)),t}!function(e){e[e.EdgeDetector=0]="EdgeDetector",e[e.BlendWeight=1]="BlendWeight",e[e.Blur=2]="Blur",e[e.COUNT=3]="COUNT"}(i||(i={}));const c=Object.freeze({__proto__:null,get SMAAOutput(){return i},build:o})},"448d":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("fa8a"),n=r("59b2");function a(e,t={}){var r;const a=e instanceof i["a"]?e:new i["a"](e,t),s={type:null==(r=null==t?void 0:t.ignoreUnknown)||r?a.apiValues:String,json:{type:a.jsonValues,read:(null==t||!t.readOnly)&&{reader:a.read},write:{writer:a.write}}};return void 0!==(null==t?void 0:t.readOnly)&&(s.readOnly=!!t.readOnly),void 0!==(null==t?void 0:t.default)&&(s.json.default=t.default),void 0!==(null==t?void 0:t.name)&&(s.json.name=t.name),Object(n["b"])(s)}},"44e6":function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return h}));var i=r("a4ee"),n=r("2c4f"),a=r("7d7d"),s=r("9096"),o=(r("c120"),r("e92d")),c=r("b2b2"),l=r("59b2"),u=(r("b50f"),r("cea0"),r("d386"));o["a"].getLogger("esri.core.support.OwningCollection");let d=class extends(Object(s["b"])(n["a"])){constructor(e){super(e),this.handles.add([this.on("before-add",e=>{Object(c["j"])(e.item)&&e.preventDefault()}),this.on("after-add",e=>this._own(e.item)),this.on("after-remove",e=>this._release(e.item))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(n["a"].ofType(this.itemType.Type))(e):new n["a"](e)}};function h(e,t){return{type:e,cast:a["a"],set(r){const i=Object(a["b"])(r,this._get(t),e);i.owner=this,this._set(t,i)}}}Object(i["a"])([Object(l["b"])()],d.prototype,"owner",null),d=Object(i["a"])([Object(u["a"])("esri.core.support.OwningCollection")],d)},4554:function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return y})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return T})),r.d(t,"e",(function(){return x})),r.d(t,"f",(function(){return O})),r.d(t,"g",(function(){return j})),r.d(t,"h",(function(){return _})),r.d(t,"i",(function(){return w}));var i=r("e92d"),n=r("b2b2"),a=r("1c92"),s=r("dae5"),o=r("afe1"),c=r("e431"),l=r("0b2d"),u=r("8188"),d=r("f694"),h=r("7f83"),p=r("9786"),f=r("8190"),b=r("668b");const m=i["a"].getLogger("esri.geometry.support.meshUtils.normalProjection");function g(e,t,r,i,n){return E(i)?(S(R.TO_PCPF,f["u"].fromTypedArray(e),f["v"].fromTypedArray(t),f["v"].fromTypedArray(r),i,f["u"].fromTypedArray(n)),n):(m.error("Cannot convert spatial reference to PCPF"),n)}function y(e,t,r,i,n){return E(i)?(S(R.FROM_PCPF,f["u"].fromTypedArray(e),f["v"].fromTypedArray(t),f["v"].fromTypedArray(r),i,f["u"].fromTypedArray(n)),n):(m.error("Cannot convert to spatial reference from PCPF"),n)}function O(e,t,r){return Object(u["p"])(e,t,0,r,Object(d["g"])(t),0,e.length/3),r}function v(e,t,r){return Object(u["p"])(e,Object(d["g"])(r),0,t,r,0,e.length/3),t}function _(e,t,r){if(Object(n["j"])(e))return t;const i=f["v"].fromTypedArray(e),a=f["v"].fromTypedArray(t);return Object(b["e"])(a,i,r),t}function j(e,t,r){if(Object(n["j"])(e))return t;Object(a["a"])(D,r);const i=f["u"].fromTypedArray(e),s=f["u"].fromTypedArray(t);return Object(b["a"])(s,i,D),Object(a["i"])(D)||Object(b["c"])(s,s),t}function w(e,t,r){if(Object(n["j"])(e))return t;Object(a["a"])(D,r);const i=f["u"].fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),s=f["u"].fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT);if(Object(b["a"])(s,i,D),Object(a["i"])(D)||Object(b["c"])(s,s),e!==t)for(let n=3;n<e.length;n+=4)t[n]=e[n];return t}function x(e,t,r,i,n){if(!E(i))return m.error("Cannot convert spatial reference to PCPF"),n;S(R.TO_PCPF,f["u"].fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),f["v"].fromTypedArray(t),f["v"].fromTypedArray(r),i,f["u"].fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT));for(let a=3;a<e.length;a+=4)n[a]=e[a];return n}function T(e,t,r,i,n){if(!E(i))return m.error("Cannot convert to spatial reference from PCPF"),n;S(R.FROM_PCPF,f["u"].fromTypedArray(e,16),f["v"].fromTypedArray(t),f["v"].fromTypedArray(r),i,f["u"].fromTypedArray(n,16));for(let a=3;a<e.length;a+=4)n[a]=e[a];return n}function S(e,t,r,i,n,s){if(!t)return;const o=r.count,l=Object(d["g"])(n);if(A(n))for(let d=0;d<o;d++)i.getVec(d,M),t.getVec(d,P),Object(u["d"])(l,M,I,l),Object(a["f"])(D,I),e===R.FROM_PCPF&&Object(a["p"])(D,D),Object(c["z"])(P,P,D),s.setVec(d,P);else for(let d=0;d<o;d++){i.getVec(d,M),t.getVec(d,P),Object(u["d"])(l,M,I,l),Object(a["f"])(D,I);const n=Object(p["h"])(r.get(d,1));let o=Math.cos(n);e===R.TO_PCPF&&(o=1/o),D[0]*=o,D[1]*=o,D[2]*=o,D[3]*=o,D[4]*=o,D[5]*=o,e===R.FROM_PCPF&&Object(a["p"])(D,D),Object(c["z"])(P,P,D),Object(c["t"])(P,P),s.setVec(d,P)}return s}function E(e){return A(e)||C(e)}function A(e){return e.isWGS84||Object(h["f"])(e)||Object(h["i"])(e)||Object(h["j"])(e)}function C(e){return e.isWebMercator}var R;!function(e){e[e.TO_PCPF=0]="TO_PCPF",e[e.FROM_PCPF=1]="FROM_PCPF"}(R||(R={}));const M=Object(l["f"])(),P=Object(l["f"])(),I=Object(o["d"])(),D=Object(s["b"])()},"45e3":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("ce50"),a=r("b2b2"),s=r("3795"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("deae"),u=r("8b9d");const d=e=>{let t=class extends e{get imageFormatIsOpaque(){return!1}get fullExtent(){return this.layer.fullExtent}get isOpaque(){return this.fullOpacity>=1&&this.imageFormatIsOpaque}get dataLevelRange(){const e=this.tileInfo.lods,t=e[0].scale,r=e[e.length-1].scale;return this.levelRangeFromScaleRange(t,r)}get displayLevelRange(){const e=this.tileInfo.lods,t=this.layer.minScale||e[0].scale,r=this.layer.maxScale||e[e.length-1].scale,i=this.levelRangeFromScaleRange(t,r);return this.layer.maxScale&&i.maxLevel++,i}getTileUrl(e,t,r){return this.layer.getTileUrl(e,t,r)}_addTilingSchemeMatchPromise(){if(Object(a["j"])(this.fullExtent))return this.addResolvingPromise(Promise.reject(new n["a"]("tilingscheme:extent-not-defined","This layer doesn't define a fullExtent.")));const e=this._getTileInfoSupportError(this.tileInfo,this.fullExtent);if(Object(a["k"])(e))return this.addResolvingPromise(Promise.reject(e));const t=Object(s["l"])(this.view,"basemapTerrain.tilingSchemeLocked").then(()=>{const e=this.view.basemapTerrain.tilingScheme,t=this._getTileInfoCompatibilityError(this.tileInfo,e);if(t)throw t});this.addResolvingPromise(t)}_getTileInfoSupportError(e,t){const r=Object(u["a"])(e,t,this.view.spatialReference,this.view.state.viewingMode);if(r){const e={layer:this.layer,error:r};let t;switch(r.name){case"tilingscheme:spatial-reference-mismatch":case"tilingscheme:global-unsupported-spatial-reference":case"tilingscheme:local-unsupported-spatial-reference":t=new n["a"]("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",e);break;default:t=new n["a"]("layerview:tiling-scheme-unsupported","The tiling scheme of this layer is not supported by SceneView",e)}return t}return null}_getTileInfoCompatibilityError(e,t){return t.compatibleWith(e)?null:new n["a"]("layerview:tiling-scheme-incompatible","The tiling scheme of this layer is incompatible with the tiling scheme of the surface")}levelRangeFromScaleRange(e,t){const r={minLevel:0,maxLevel:1/0},i=this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.tilingScheme;if(!i)return r;const n=i.levels[0],a=e=>{const t=Math.log(n.scale/e)/Math.LN2;return.5-Math.abs(.5-t%1)<1e-9?Math.round(t):Math.ceil(t)};return null!=e&&e>0&&(r.minLevel=Math.max(0,a(e))),null!=t&&t>0&&(r.maxLevel=Math.max(0,a(t))),r}isUpdating(){return!!(this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.updating)}};return Object(i["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"imageFormatIsOpaque",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"updating",void 0),Object(i["a"])([Object(o["b"])(l["a"])],t.prototype,"updatingProgress",void 0),Object(i["a"])([Object(o["b"])(l["b"])],t.prototype,"updatingProgressValue",void 0),Object(i["a"])([Object(o["b"])()],t.prototype,"fullExtent",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"isOpaque",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"dataLevelRange",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"displayLevelRange",null),Object(i["a"])([Object(o["b"])()],t.prototype,"layer",void 0),Object(i["a"])([Object(o["b"])()],t.prototype,"tileInfo",void 0),t=Object(i["a"])([Object(c["a"])("esri.views.3d.layers.TiledLayerView3D")],t),t}},4637:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i,n,a,s={exports:{}};i=s,n=function(){function e(e,r,n,a,s){t(e,r,n||0,a||e.length-1,s||i)}function t(e,i,n,a,s){for(;a>n;){if(a-n>600){var o=a-n+1,c=i-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*u*(o-u)/o)*(c-o/2<0?-1:1);t(e,i,Math.max(n,Math.floor(i-c*u/o+d)),Math.min(a,Math.floor(i+(o-c)*u/o+d)),s)}var h=e[i],p=n,f=a;for(r(e,n,i),s(e[a],h)>0&&r(e,n,a);p<f;){for(r(e,p,f),p++,f--;s(e[p],h)<0;)p++;for(;s(e[f],h)>0;)f--}0===s(e[n],h)?r(e,n,f):r(e,++f,a),f<=i&&(n=f+1),i<=f&&(a=f-1)}}function r(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function i(e,t){return e<t?-1:e>t?1:0}return e},void 0!==(a=n())&&(i.exports=a);const o=s.exports},4653:function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return y}));var i=r("fa8a"),n=r("2035");const a={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},o={year:"numeric",month:"short",day:"numeric"},c={year:"numeric",month:"long",weekday:"long",day:"numeric"},l={hour:"numeric",minute:"numeric"},u={...l,second:"numeric"},d={"short-date":a,"short-date-short-time":{...a,...l},"short-date-short-time-24":{...a,...l,hour12:!1},"short-date-long-time":{...a,...u},"short-date-long-time-24":{...a,...u,hour12:!1},"short-date-le":a,"short-date-le-short-time":{...a,...l},"short-date-le-short-time-24":{...a,...l,hour12:!1},"short-date-le-long-time":{...a,...u},"short-date-le-long-time-24":{...a,...u,hour12:!1},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...l},"long-month-day-year-short-time-24":{...s,...l,hour12:!1},"long-month-day-year-long-time":{...s,...u},"long-month-day-year-long-time-24":{...s,...u,hour12:!1},"day-short-month-year":o,"day-short-month-year-short-time":{...o,...l},"day-short-month-year-short-time-24":{...o,...l,hour12:!1},"day-short-month-year-long-time":{...o,...u},"day-short-month-year-long-time-24":{...o,...u,hour12:!1},"long-date":c,"long-date-short-time":{...c,...l},"long-date-short-time-24":{...c,...l,hour12:!1},"long-date-long-time":{...c,...u},"long-date-long-time-24":{...c,...u,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":l,"long-time":u},h=Object(i["b"])()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p=(h.apiValues,h.toJSON.bind(h),h.fromJSON.bind(h),{ar:"ar-u-nu-latn-ca-gregory"});let f=new WeakMap,b=d["short-date-short-time"];function m(e){const t=e||b;if(!f.has(t)){const e=Object(n["b"])(),r=p[Object(n["b"])()]||e;f.set(t,new Intl.DateTimeFormat(r,t))}return f.get(t)}function g(e){return d[e]||null}function y(e,t){return m(t).format(e)}Object(n["a"])(()=>{f=new WeakMap,b=d["short-date-short-time"]})},"46e8":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(e){super(e)}clone(){}};Object(i["a"])([Object(a["b"])({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],o.prototype,"type",void 0),o=Object(i["a"])([Object(s["a"])("esri.symbols.patterns.Pattern3D")],o);const c=o},"477c":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return y})),r.d(t,"e",(function(){return c})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return h}));var i=r("9d83"),n=r("c649"),a=r("b2b2"),s=r("f4cc"),o=r("0646");r("9efb");function c(e,t,r={}){return u(e,t,r,f)}function l(e,t,r={}){return u(e,t,r,b)}function u(e,t,r={},i){let n=null;const s=r.once?(e,r)=>{i(e)&&(Object(a["s"])(n),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(n=Object(o["e"])(e,s,r.sync,r.equals),r.initial){const t=e();s(t,t)}return n}function d(e,t,r,s={}){let o=null,l=null,u=null;function d(){o&&l&&(l.remove(),null==s.onListenerRemove||s.onListenerRemove(o),o=null,l=null)}function h(e){s.once&&s.once&&Object(a["s"])(u),r(e)}const p=c(e,(e,r)=>{d(),Object(i["b"])(e)&&(o=e,l=Object(i["c"])(e,t,h),null==s.onListenerAdd||s.onListenerAdd(e))},{sync:s.sync,initial:!0});return u=Object(n["b"])(()=>{p.remove(),d()}),u}function h(e,t){return p(e,b,t)}function p(e,t,r){if(Object(s["n"])(r))return Promise.reject(Object(s["e"])());const i=e();if(null!=t&&t(i))return Promise.resolve(i);let o=null;function c(){o=Object(a["s"])(o)}return new Promise((i,a)=>{o=Object(n["a"])([Object(s["q"])(r,()=>{c(),a(Object(s["e"])())}),u(e,e=>{c(),i(e)},{sync:!1,once:!0},null!=t?t:f)])})}function f(e){return!0}function b(e){return!!e}const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},"478c":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("9ef0"),s=r("7ffa"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("c1da"),d=r("667b"),h=r("6a0ed");r("b50f"),r("c120");let p=i=class extends h["a"]{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new i({color:this.color,ratio:this.ratio})}};Object(n["a"])([Object(o["b"])({type:a["a"],json:{write:!0}})],p.prototype,"color",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],p.prototype,"ratio",void 0),p=i=Object(n["a"])([Object(l["a"])("esri.renderers.support.HeatmapColorStop")],p);const f=p;var b;let m=b=class extends d["a"]{constructor(e){super(e),this.blurRadius=10,this.referenceScale=0,this.colorStops=[new f({ratio:0,color:new a["a"]("rgba(255, 140, 0, 0)")}),new f({ratio:.75,color:new a["a"]("rgba(255, 140, 0, 1)")}),new f({ratio:.9,color:new a["a"]("rgba(255, 0, 0, 1)")})],this.field=null,this.fieldOffset=0,this.maxPixelIntensity=100,this.minPixelIntensity=0,this.type="heatmap"}async collectRequiredFields(e,t){const r=this.field;r&&"string"==typeof r&&Object(u["d"])(e,t,r)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new b({blurRadius:this.blurRadius,referenceScale:this.referenceScale,colorStops:Object(s["a"])(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})}};Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],m.prototype,"blurRadius",void 0),Object(n["a"])([Object(o["b"])({type:Number})],m.prototype,"referenceScale",void 0),Object(n["a"])([Object(o["b"])({type:[f],json:{write:!0}})],m.prototype,"colorStops",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],m.prototype,"field",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:null==r})}}})],m.prototype,"fieldOffset",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],m.prototype,"maxPixelIntensity",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],m.prototype,"minPixelIntensity",void 0),Object(n["a"])([Object(c["a"])({heatmap:"heatmap"})],m.prototype,"type",void 0),m=b=Object(n["a"])([Object(l["a"])("esri.renderers.HeatmapRenderer")],m);const g=m},"47f8":function(e,t,r){"use strict";function i(){return new Float32Array(3)}function n(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(e,t,r){const i=new Float32Array(3);return i[0]=e,i[1]=t,i[2]=r,i}function s(e,t){return new Float32Array(e,t,3)}function o(){return i()}function c(){return a(1,1,1)}function l(){return a(1,0,0)}function u(){return a(0,1,0)}function d(){return a(0,0,1)}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return o}));const h=o(),p=c(),f=l(),b=u(),m=d();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,zeros:o,ones:c,unitX:l,unitY:u,unitZ:d,ZEROS:h,ONES:p,UNIT_X:f,UNIT_Y:b,UNIT_Z:m})},4856:function(e,t,r){"use strict";r.d(t,"a",(function(){return H}));var i=r("a4ee"),n=r("2c4f"),a=r("6a0ed"),s=r("7ffa"),o=r("e92d"),c=r("f4cc"),l=r("59b2"),u=r("1a3e"),d=r("afcf"),h=r("d386"),p=r("09db"),f=r("cea0"),b=r("c1da"),m=r("1289"),g=r("a7a7"),y=r("69c9"),O=r("d099"),v=r("18bf"),_=r("3cacd"),j=r("d0e9");const w={base:null,key:"type",typeMap:{attachment:m["a"],media:_["a"],text:j["a"],expression:O["a"],field:v["a"]}};var x,T=r("1637"),S=r("9f91");r("b50f"),r("c120");let E=x=class extends a["a"]{constructor(e){super(e),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new x({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};Object(i["a"])([Object(l["b"])({type:Boolean,json:{write:!0}})],E.prototype,"returnTopmostRaster",void 0),Object(i["a"])([Object(l["b"])({type:Boolean,json:{write:!0}})],E.prototype,"showNoDataRecords",void 0),E=x=Object(i["a"])([Object(h["a"])("esri.popup.LayerOptions")],E);const A=E;var C,R=r("a2e5");let M=C=class extends a["a"]{constructor(e){super(e),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new C({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?Object(s["a"])(this.orderByFields):null})}};Object(i["a"])([Object(l["b"])({type:Boolean,json:{write:!0}})],M.prototype,"showRelatedRecords",void 0),Object(i["a"])([Object(l["b"])({type:[R["a"]],json:{write:!0}})],M.prototype,"orderByFields",void 0),M=C=Object(i["a"])([Object(h["a"])("esri.popup.RelatedRecordsInfo")],M);const P=M;var I,D=r("6759"),L=r("5986"),N=r("77eb"),F=r("ceaf");const k=n["a"].ofType({key:"type",defaultKeyValue:"button",base:L["a"],typeMap:{button:N["a"],toggle:F["a"]}}),U={base:g["a"],key:"type",typeMap:{media:_["a"],custom:y["a"],text:j["a"],attachments:m["a"],fields:v["a"],expression:O["a"]}},z="esri.PopupTemplate",B=o["a"].getLogger(z),V=["attachments","fields","media","text","expression"];let G=I=class extends a["a"]{constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title="",this.relatedRecordsInfo=null}castContent(e){return Array.isArray(e)?e.map(e=>Object(f["k"])(U,e)):"string"==typeof e||"function"==typeof e||e instanceof HTMLElement||Object(c["o"])(e)?e:(B.error("content error","unsupported content value",{value:e}),null)}readContent(e,t){const{popupElements:r}=t;return Array.isArray(r)&&r.length>0?this._readPopupInfoElements(t):this._readPopupInfo(t)}writeContent(e,t,r,i){"string"!=typeof e?Array.isArray(e)&&(t.popupElements=e.filter(e=>-1!==V.indexOf(e.type)).map(e=>e&&e.toJSON(i)),t.popupElements.forEach(e=>{"attachments"===e.type?this._writeAttachmentContent(t):"media"===e.type?this._writeMediaContent(e,t):"text"===e.type&&this._writeTextContent(e,t)})):t.description=e}writeFieldInfos(e,t,r,i){const{content:n}=this,a=Array.isArray(n)?n:null;if(e){const r=a?a.filter(e=>"fields"===e.type):[],n=r.length&&r.every(e=>{var t;return null==(t=e.fieldInfos)?void 0:t.length});t.fieldInfos=e.filter(Boolean).map(e=>{const t=e.toJSON(i);return n&&(t.visible=!1),t})}if(a)for(const s of a)"fields"===s.type&&this._writeFieldsContent(s,t)}writeLayerOptions(e,t,r,i){t[r]=!e||null===e.showNoDataRecords&&null===e.returnTopmostRaster?null:e.toJSON(i)}writeTitle(e,t){t.title=e||""}clone(){const{actions:e}=this,t=e?Object(s["a"])(e.toArray()):[];return new I({actions:t,content:Array.isArray(this.content)?Object(s["a"])(this.content):this.content,expressionInfos:Array.isArray(this.expressionInfos)?Object(s["a"])(this.expressionInfos):null,fieldInfos:Array.isArray(this.fieldInfos)?Object(s["a"])(this.fieldInfos):null,layerOptions:this.layerOptions?Object(s["a"])(this.layerOptions):null,lastEditInfoEnabled:this.lastEditInfoEnabled,outFields:Array.isArray(this.outFields)?Object(s["a"])(this.outFields):null,overwriteActions:this.overwriteActions,returnGeometry:this.returnGeometry,title:this.title,relatedRecordsInfo:this.relatedRecordsInfo?Object(s["a"])(this.relatedRecordsInfo):null})}async collectRequiredFields(e,t){const r=this.expressionInfos||[];await this._collectExpressionInfoFields(e,t,[...r,...this._getContentExpressionInfos(this.content,r)]),Object(b["e"])(e,t,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(e){const t=new Set;return await this.collectRequiredFields(t,e),[...t].sort()}_writeFieldsContent(e,t){if(!Array.isArray(e.fieldInfos)||!e.fieldInfos.length)return;const r=Object(s["a"])(e.fieldInfos);Array.isArray(t.fieldInfos)?r.forEach(e=>{const r=t.fieldInfos.find(t=>t.fieldName.toLowerCase()===e.fieldName.toLowerCase());r?r.visible=!0:t.fieldInfos.push(e)}):t.fieldInfos=r}_writeAttachmentContent(e){e.showAttachments||(e.showAttachments=!0)}_writeTextContent(e,t){!t.description&&e.text&&(t.description=e.text)}_writeMediaContent(e,t){if(!Array.isArray(e.mediaInfos)||!e.mediaInfos.length)return;const r=Object(s["a"])(e.mediaInfos);Array.isArray(t.mediaInfos)?t.mediaInfos=[...t.mediaInfos,...r]:t.mediaInfos=r}_readPopupInfoElements({description:e,mediaInfos:t,popupElements:r}){const i={description:!1,mediaInfos:!1};return r.map(r=>"media"===r.type?(r.mediaInfos||!t||i.mediaInfos||(r.mediaInfos=t,i.mediaInfos=!0),_["a"].fromJSON(r)):"text"===r.type?(r.text||!e||i.description||(r.text=e,i.description=!0),j["a"].fromJSON(r)):"attachments"===r.type?m["a"].fromJSON(r):"fields"===r.type?v["a"].fromJSON(r):"expression"===r.type?O["a"].fromJSON(r):void 0).filter(Boolean)}_readPopupInfo({description:e,mediaInfos:t,showAttachments:r}){const i=[];return e?i.push(new j["a"]({text:e})):i.push(new v["a"]),Array.isArray(t)&&t.length&&i.push(_["a"].fromJSON({mediaInfos:t})),r&&i.push(m["a"].fromJSON({displayType:"auto"})),i.length?i:e}_getContentElementFields(e){const t=null==e?void 0:e.type;if("attachments"===t)return[...this._extractFieldNames(e.title),...this._extractFieldNames(e.description)];if("custom"===t)return e.outFields||[];if("fields"===t)return[...this._extractFieldNames(e.title),...this._extractFieldNames(e.description),...this._getFieldInfoFields(e.fieldInfos||this.fieldInfos)];if("media"===t){const t=e.mediaInfos||[];return[...this._extractFieldNames(e.title),...this._extractFieldNames(e.description),...t.reduce((e,t)=>[...e,...this._getMediaInfoFields(t)],[])]}return"text"===t?this._extractFieldNames(e.text):[]}_getMediaInfoFields(e){const{caption:t,title:r,value:i}=e,n=i||{},{fields:a=[],normalizeField:s,tooltipField:o,sourceURL:c,linkURL:l}=n,u=[...this._extractFieldNames(r),...this._extractFieldNames(t),...this._extractFieldNames(c),...this._extractFieldNames(l),...a];return s&&u.push(s),o&&u.push(o),u}_getContentExpressionInfos(e,t){return Array.isArray(e)?e.reduce((e,t)=>[...e,..."expression"===t.type&&t.expressionInfo?[t.expressionInfo]:[]],t):[]}_getContentFields(e){return"string"==typeof e?this._extractFieldNames(e):Array.isArray(e)?e.reduce((e,t)=>[...e,...this._getContentElementFields(t)],[]):[]}async _collectExpressionInfoFields(e,t,r){r&&await Promise.all(r.map(r=>Object(b["a"])(e,t,r.expression)))}_getFieldInfoFields(e){return e?e.filter(e=>void 0===e.visible||!!e.visible).map(e=>e.fieldName).filter(e=>-1===e.indexOf("relationships/")&&-1===e.indexOf("expression/")):[]}_getActionsFields(e){return e?e.toArray().reduce((e,t)=>[...e,...this._getActionFields(t)],[]):[]}_getActionFields(e){const{className:t,title:r,type:i}=e,n="button"===i||"toggle"===i?e.image:"";return[...this._extractFieldNames(r),...this._extractFieldNames(t),...this._extractFieldNames(n)]}_getTitleFields(e){return"string"==typeof e?this._extractFieldNames(e):[]}_extractFieldNames(e){if(!e||"string"!=typeof e)return[];const t=/{[^}]*}/g,r=e.match(t);if(!r)return[];const i=/\{(\w+):.+\}/,n=r.filter(e=>!(0===e.indexOf("{relationships/")||0===e.indexOf("{expression/"))).map(e=>e.replace(i,"{$1}"));return n?n.map(e=>e.slice(1,-1)):[]}};Object(i["a"])([Object(l["b"])({type:k})],G.prototype,"actions",void 0),Object(i["a"])([Object(l["b"])()],G.prototype,"content",void 0),Object(i["a"])([Object(u["a"])("content")],G.prototype,"castContent",null),Object(i["a"])([Object(d["a"])("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments"])],G.prototype,"readContent",null),Object(i["a"])([Object(p["a"])("content",{popupElements:{type:n["a"].ofType(w)},showAttachments:{type:Boolean},mediaInfos:{type:n["a"].ofType(D["a"])},description:{type:String}})],G.prototype,"writeContent",null),Object(i["a"])([Object(l["b"])({type:[T["a"]],json:{write:!0}})],G.prototype,"expressionInfos",void 0),Object(i["a"])([Object(l["b"])({type:[S["a"]]})],G.prototype,"fieldInfos",void 0),Object(i["a"])([Object(p["a"])("fieldInfos")],G.prototype,"writeFieldInfos",null),Object(i["a"])([Object(l["b"])({type:A})],G.prototype,"layerOptions",void 0),Object(i["a"])([Object(p["a"])("layerOptions")],G.prototype,"writeLayerOptions",null),Object(i["a"])([Object(l["b"])({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],G.prototype,"lastEditInfoEnabled",void 0),Object(i["a"])([Object(l["b"])()],G.prototype,"outFields",void 0),Object(i["a"])([Object(l["b"])()],G.prototype,"overwriteActions",void 0),Object(i["a"])([Object(l["b"])()],G.prototype,"returnGeometry",void 0),Object(i["a"])([Object(l["b"])({json:{type:String}})],G.prototype,"title",void 0),Object(i["a"])([Object(p["a"])("title")],G.prototype,"writeTitle",null),Object(i["a"])([Object(l["b"])({type:P,json:{write:!0}})],G.prototype,"relatedRecordsInfo",void 0),G=I=Object(i["a"])([Object(h["a"])(z)],G);const H=G},"485a3":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i,n=r("a4ee"),a=r("fc29"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(){super(...arguments),this.x=0,this.y=0}clone(){return new i({x:this.x,y:this.y})}};Object(n["a"])([Object(s["b"])({type:Number})],c.prototype,"x",void 0),Object(n["a"])([Object(s["b"])({type:Number})],c.prototype,"y",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.symbols.support.Symbol3DAnchorPosition2D")],c)},49951:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("1b19"),c=r("b08e");let l=i=class extends o["a"]{constructor(e){super(e),this.type="line-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};Object(n["a"])([Object(a["b"])({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:c["a"].write}})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(s["a"])("esri.popup.content.LineChartMediaInfo")],l);const u=l},"49a0":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var i=r("8048");const n=96;function a(e,t){const r=t||e.extent,a=e.width,s=Object(i["f"])(r&&r.spatialReference);return r&&a?r.width/a*s*i["j"]*n:0}function s(e,t){return e/(Object(i["f"])(t)*i["j"]*n)}},"49b8":function(e,t,r){"use strict";function i(e){return e=e||globalThis.location.hostname,l.some(t=>{var r;return null!=(null==(r=e)?void 0:r.match(t))})}function n(e,t){return e&&(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(o)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));const a=/^devext.arcgis.com$/,s=/^qaext.arcgis.com$/,o=/^[\w-]*\.mapsdevext.arcgis.com$/,c=/^[\w-]*\.mapsqa.arcgis.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,a,s,/^jsapps.esri.com$/,o,c]},"49fa":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));const i="20220404",n="ecb69ff5e08a61c162de0ddc0b1f397ed5d4071b"},"4a7a":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const i=e=>-1!==e.indexOf("Brush");class n{constructor(){this._names=new Map}begin(e){this._names.has(e)||(this._names.set(e,!1),i(e)&&this.record("Esri.FirstDraw"),performance.mark(`Esri.${e}.Start`))}end(e){this._names.has(e)&&!this._names.get(e)&&(this._names.set(e,!0),performance.mark(`Esri.${e}.End`))}record(e){this._names.has(e)||(this._names.set(e,!0),performance.mark("Esri."+e))}}},"4adc":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("59b2");function n(e,t){const r=t?{...t,source:e}:e;return Object(i["b"])({aliasOf:r})}},"4ae5":function(e,t,r){"use strict";r.d(t,"a",(function(){return w}));var i=r("a4ee"),n=r("e92d"),a=r("b2b2"),s=r("59b2"),o=(r("b50f"),r("c120"),r("1a3e")),c=r("afcf"),l=r("d386"),u=r("09db"),d=r("cea0"),h=r("3760"),p=r("5996");function f(e,t,r,i){var n;return e.x=e.x+t,e.y=e.y+r,null!=i&&(e.z=(null!=(n=e.z)?n:0)+i),e}function b(e,t){const r=e.x-t.x,i=e.y-t.y,n=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(r*r+i*i+n*n)}var m,g=r("7f83"),y=r("9786");const O=[0,0];function v(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}const _=n["a"].getLogger("esri.geometry.Point");let j=m=class extends h["a"]{constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const r=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(r)?r:r.clone())}normalizeCtorArgs(e,t,r,i,n){let a;if(Array.isArray(e))a=e,n=t,e=a[0],t=a[1],r=a[2],i=a[3];else if(e&&"object"==typeof e){if(a=e,e=null!=a.x?a.x:a.longitude,t=null!=a.y?a.y:a.latitude,r=a.z,i=a.m,(n=a.spatialReference)&&"esri.geometry.SpatialReference"!==n.declaredClass&&(n=new p["a"](n)),null!=a.longitude||null!=a.latitude)if(null==a.longitude)_.warn(".longitude=","Latitude was defined without longitude");else if(null==a.latitude)_.warn(".latitude=","Longitude was defined without latitude");else if(!a.declaredClass&&n&&n.isWebMercator){const r=Object(y["c"])(a.longitude,a.latitude,O);e=r[0],t=r[1]}}else v(r)?(n=r,r=null):v(i)&&(n=i,i=null);const s={x:e,y:t};return null==s.x&&null!=s.y?_.warn(".y=","Y coordinate was defined without an X coordinate"):null==s.y&&null!=s.x&&_.warn(".x=","X coordinate was defined without a Y coordinate"),null!=n&&(s.spatialReference=n),null!=r&&(s.z=r),null!=i&&(s.m=i),s}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:r}=this;if(e){if(e.isWebMercator)return Object(y["g"])(t,r,O)[1];if(e.isGeographic)return r}return null}set latitude(e){const{spatialReference:t,x:r}=this;t&&(t.isWebMercator?this._set("y",Object(y["c"])(r,e,O)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:r}=this;if(r){if(r.isWebMercator)return Object(y["g"])(e,t,O)[0];if(r.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:r}=this;r&&(r.isWebMercator?this._set("x",Object(y["c"])(e,t,O)[0]):r.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,r){t[r]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new m;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return m.copy(e,this),this}equals(e){if(Object(a["j"])(e))return!1;const{x:t,y:r,z:i,m:n,spatialReference:s}=this,{z:o,m:c}=e;let{x:l,y:u,spatialReference:d}=e;if(!s.equals(d))if(s.isWebMercator&&d.isWGS84)[l,u]=Object(y["c"])(l,u),d=s;else{if(!s.isWGS84||!d.isWebMercator)return!1;[l,u]=Object(y["g"])(l,u),d=s}return t===l&&r===u&&i===o&&n===c&&s.wkid===d.wkid}offset(e,t,r){return f(this,e,t,r)}normalize(){if(!this.spatialReference)return this;const e=Object(g["e"])(this.spatialReference);if(!e)return this;let t=this.x;const[r,i]=e.valid,n=2*i;let a;return t>i?(a=Math.ceil(Math.abs(t-i)/n),t-=a*n):t<r&&(a=Math.ceil(Math.abs(t-r)/n),t+=a*n),this._set("x",t),this}distance(e){return b(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};Object(i["a"])([Object(s["b"])({readOnly:!0})],j.prototype,"cache",null),Object(i["a"])([Object(s["b"])({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],j.prototype,"hasM",null),Object(i["a"])([Object(s["b"])({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],j.prototype,"hasZ",null),Object(i["a"])([Object(s["b"])({type:Number})],j.prototype,"latitude",null),Object(i["a"])([Object(s["b"])({type:Number})],j.prototype,"longitude",null),Object(i["a"])([Object(s["b"])({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),Object(o["a"])(e=>isNaN(e)?e:Object(d["i"])(e))],j.prototype,"x",void 0),Object(i["a"])([Object(u["a"])("x")],j.prototype,"writeX",null),Object(i["a"])([Object(c["a"])("x")],j.prototype,"readX",null),Object(i["a"])([Object(s["b"])({type:Number,json:{write:!0}})],j.prototype,"y",void 0),Object(i["a"])([Object(s["b"])({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],j.prototype,"z",void 0),Object(i["a"])([Object(s["b"])({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],j.prototype,"m",void 0),j=m=Object(i["a"])([Object(l["a"])("esri.geometry.Point")],j),j.prototype.toJSON.isDefaultToJSON=!0;const w=j},"4b49":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return o}));var i=r("b2b2"),n=r("0b2d"),a=r("8188");function s(e,t,r){if(Object(i["j"])(e)||Object(i["j"])(r))return!1;let n=!0;return c[0]=null!=e.xmin?e.xmin:0,c[1]=null!=e.ymin?e.ymin:0,c[2]=null!=e.zmin?e.zmin:0,n=n&&Object(a["p"])(c,e.spatialReference,0,t,r,0,1),c[0]=null!=e.xmax?e.xmax:0,c[1]=null!=e.ymax?e.ymax:0,c[2]=null!=e.zmax?e.zmax:0,n=n&&Object(a["p"])(c,e.spatialReference,0,t,r,3,1),null==e.xmin&&(t[0]=-1/0),null==e.ymin&&(t[1]=-1/0),null==e.zmin&&(t[2]=-1/0),null==e.xmax&&(t[3]=1/0),null==e.ymax&&(t[4]=1/0),null==e.zmax&&(t[5]=1/0),n}function o(e,t,r){if(Object(i["j"])(e)||Object(i["j"])(r))return!1;let n=!0;return c[0]=null!=e.xmin?e.xmin:0,c[1]=null!=e.ymin?e.ymin:0,c[2]=null!=e.zmin?e.zmin:0,n=n&&Object(a["p"])(c,e.spatialReference,0,c,r,0,1),t[0]=c[0],t[1]=c[1],c[0]=null!=e.xmax?e.xmax:0,c[1]=null!=e.ymax?e.ymax:0,c[2]=null!=e.zmax?e.zmax:0,n=n&&Object(a["p"])(c,e.spatialReference,0,c,r,0,1),t[2]=c[0],t[3]=c[1],null==e.xmin&&(t[0]=-1/0),null==e.ymin&&(t[1]=-1/0),null==e.xmax&&(t[2]=1/0),null==e.ymax&&(t[3]=1/0),n}const c=Object(n["f"])()},"4bc4":function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var i=r("dfaf"),n=r("d047"),a=r("f159"),s=r("3886"),o=r("690a"),c=r("b7bd");function l(e){const t=new o["a"];return t.attributes.add(c["a"].POSITION,"vec2"),t.include(i["a"],{attributeTextureCoordinates:i["b"].Default}),t.varyings.add("worldRay","vec3"),t.varyings.add("eyeDir","vec3"),t.vertex.uniforms.add("inverseProjectionMatrix","mat4"),t.vertex.uniforms.add("inverseViewMatrix","mat4"),t.vertex.code.add(s["a"]`void main(void) {
  988. vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1, 1)).xyz;
  989. eyeDir = posViewNear;
  990. worldRay = (inverseViewMatrix * vec4(posViewNear, 0)).xyz;
  991. forwardTextureCoordinates();
  992. gl_Position = vec4(position, 1, 1);
  993. }`),t.fragment.uniforms.add("atmosphereC","float").add("cameraPosition","vec3").add("nearFar","vec2").add("depthTex","sampler2D").add("fogStrength","float").add("fogAmount","float").add("fogColor","vec3"),t.include(a["a"]),t.fragment.include(n["a"]),t.fragment.code.add(s["a"]`vec2 sphereIntersect(vec3 start, vec3 dir) {
  994. float a = dot(dir, dir);
  995. float b = 2.0 * dot(dir, start);
  996. float d = (b * b) - 4.0 * a * atmosphereC;
  997. if (d < 0.0) {
  998. return vec2(1e5, -1e5);
  999. }
  1000. return vec2((-b - sqrt(d)) / (2.0 * a), (-b + sqrt(d)) / (2.0 * a));
  1001. }`),t.fragment.code.add(s["a"]`vec4 applyFog(float dist, vec3 rayDir){
  1002. if(dist == -1.0){
  1003. vec2 rayAtmosphereIntersect = sphereIntersect(cameraPosition, rayDir);
  1004. dist = 0.055 * rayAtmosphereIntersect.y;
  1005. }
  1006. float fogAmount = fogAmount * (1.0 - exp(-dist * fogStrength));
  1007. return vec4(fogAmount * fogColor, fogAmount);
  1008. }`),t.fragment.code.add(s["a"]`
  1009. vec3 tonemapACES(vec3 x) {
  1010. return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
  1011. }
  1012. void main() {
  1013. vec3 rayDir = normalize(worldRay);
  1014. float terrainDepth = -1.0;
  1015. float depthSample = texture2D(depthTex, vuv0).r;
  1016. float zNorm = 2.0 * depthSample - 1.0;
  1017. float linDepth = 2.0 * nearFar[0] * nearFar[1] / (nearFar[1] + nearFar[0] - zNorm * (nearFar[1] - nearFar[0]));
  1018. if(depthSample < 1.0 && depthSample > 0.0){
  1019. vec3 cameraSpaceRay = normalize(eyeDir);
  1020. cameraSpaceRay /= cameraSpaceRay.z;
  1021. cameraSpaceRay *= linDepth;
  1022. terrainDepth = max(0.0, length(cameraSpaceRay));
  1023. }
  1024. ${e.haze?s["a"]`
  1025. if(terrainDepth == -1.0){
  1026. gl_FragColor = vec4(0);
  1027. return;
  1028. }`:""}
  1029. vec4 fog = applyFog(terrainDepth, rayDir);
  1030. gl_FragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));
  1031. }
  1032. `),t}const u=Object.freeze({__proto__:null,build:l})},"4c37":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return p})),r.d(t,"f",(function(){return u}));var i=r("c649"),n=r("7ffa"),a=r("b2b2");function s(e){return e?e.__accessor__?e.__accessor__:e.propertyInvalidated?e:null:null}function o(e,t){return null!=e&&e.metadatas&&null!=e.metadatas[t]}function c(e,t,r){return l(e,t,r?{policy:r,path:""}:null)}function l(e,t,r){return t?Object.keys(t).reduce((function(e,i){let s=null,o="merge";if(r&&(s=r.path?`${r.path}.${i}`:i,o=r.policy(s)),"replace"===o)return e[i]=t[i],e;if(void 0===e[i])return e[i]=Object(n["a"])(t[i]),e;let c=e[i],u=t[i];if(c===u)return e;if(Array.isArray(u)||Array.isArray(e))c=c?Array.isArray(c)?e[i]=c.concat():e[i]=[c]:e[i]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach(e=>{-1===c.indexOf(e)&&c.push(e)}));else if(u&&"object"==typeof u)if(r){const t=r.path;r.path=Object(a["c"])(s),e[i]=l(c,u,r),r.path=t}else e[i]=l(c,u,null);else e.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(e[i]=u);return e}),e||{}):e}function u(e){return Array.isArray(e)?e:e.split(".")}function d(e){return e.indexOf(",")>-1?e.split(",").map(e=>e.trim()):[e.trim()]}function h(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...d(r));return t}return d(e)}function p(e,t,r,n){const a=h(t);if(1!==a.length){const t=a.map(t=>n(e,t,r));return Object(i["a"])(t)}return n(e,a[0],r)}function f(e){let t=!1;return()=>{t||(t=!0,e())}}},"4c96":function(e,t,r){"use strict";function i(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,o=r?r.count:t.count;let c=(r&&r.dstIndex?r.dstIndex:0)*n,l=(r&&r.srcIndex?r.srcIndex:0)*s;for(let u=0;u<o;++u)i[c]=a[l],i[c+1]=a[l+1],i[c+2]=a[l+2],c+=n,l+=s}function n(e,t,r,i,n){var a,s;const o=e.typedBuffer,c=e.typedBufferStride,l=null!=(a=null==n?void 0:n.count)?a:e.count;let u=(null!=(s=null==n?void 0:n.dstIndex)?s:0)*c;for(let d=0;d<l;++d)o[u]=t,o[u+1]=r,o[u+2]=i,u+=c}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));Object.freeze({__proto__:null,copy:i,fill:n})},"4cac":function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i,n=r("a4ee"),a=r("7ffa"),s=r("b3b6"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("afcf"),u=r("d386"),d=r("09db"),h=r("c1da"),p=r("0d93");let f=i=class extends p["a"]{constructor(e){super(e),this.data=null,this.type="cim"}readData(e,t){return t}writeData(e,t){if(e)for(const r in e)t[r]=e[r]}async collectRequiredFields(e,t){if("CIMSymbolReference"===this.data.type){const r=this.data.primitiveOverrides;if(r){const i=r.map(r=>{const i=r.valueExpressionInfo;return Object(h["a"])(e,t,i.expression)});await Promise.all(i)}}}clone(){return new i({data:Object(a["a"])(this.data)})}hash(){return Object(s["b"])(JSON.stringify(this.data)).toString()}};Object(n["a"])([Object(o["b"])({json:{write:!1}})],f.prototype,"color",void 0),Object(n["a"])([Object(o["b"])({json:{write:!0}})],f.prototype,"data",void 0),Object(n["a"])([Object(l["a"])("data",["symbol"])],f.prototype,"readData",null),Object(n["a"])([Object(d["a"])("data",{})],f.prototype,"writeData",null),Object(n["a"])([Object(c["a"])({CIMSymbolReference:"cim"},{readOnly:!0})],f.prototype,"type",void 0),f=i=Object(n["a"])([Object(u["a"])("esri.symbols.CIMSymbol")],f);const b=f},"4d10":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("2c4f"),a=r("9096"),s=r("b2b2"),o=(r("ce50"),r("e92d"),r("0646"),r("9efb")),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("d386"));let u=class extends(Object(a["b"])(n["a"])){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add(Object(o["a"])(()=>this._refresh()))}destroy(){this.getCollections=null}_refresh(){const e=Object(s["k"])(this.getCollections)?this.getCollections():null;if(Object(s["j"])(e))return void this.removeAll();let t=0;for(const r of e)Object(s["k"])(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n["a"](e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};Object(i["a"])([Object(c["b"])()],u.prototype,"getCollections",void 0),Object(i["a"])([Object(c["b"])()],u.prototype,"getChildrenFunction",void 0),Object(i["a"])([Object(c["b"])()],u.prototype,"itemFilterFunction",void 0),u=Object(i["a"])([Object(l["a"])("esri.core.CollectionFlattener")],u);const d=u},"4d68":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),s=r("46e8");const o=["backward-diagonal","cross","diagonal-cross","forward-diagonal","horizontal","none","solid","vertical"];var c;let l=c=class extends s["a"]{constructor(e){super(e),this.type="style",this.style="solid"}clone(){const e={style:this.style};return new c(e)}};Object(i["a"])([Object(n["b"])({type:["style"]})],l.prototype,"type",void 0),Object(i["a"])([Object(n["b"])({type:o,json:{read:!0,write:!0}})],l.prototype,"style",void 0),l=c=Object(i["a"])([Object(a["a"])("esri.symbols.patterns.StylePattern3D")],l);const u=l},"4db9":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e,t){const r={hasModelTransformation:!1,...t};if(r.hasModelTransformation)return r.linearDepth?void e.vertex.code.add(i["a"]`vec4 transformPositionWithDepth(mat4 proj, mat4 view, mat4 model, vec3 pos, vec2 nearFar, out float depth) {
  1033. vec4 eye = view * (model * vec4(pos, 1.0));
  1034. depth = (-eye.z - nearFar[0]) / (nearFar[1] - nearFar[0]) ;
  1035. return proj * eye;
  1036. }`):void e.vertex.code.add(i["a"]`vec4 transformPosition(mat4 proj, mat4 view, mat4 model, vec3 pos) {
  1037. return proj * (view * (model * vec4(pos, 1.0)));
  1038. }`);r.linearDepth?e.vertex.code.add(i["a"]`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
  1039. vec4 eye = view * vec4(pos, 1.0);
  1040. depth = (-eye.z - nearFar[0]) / (nearFar[1] - nearFar[0]) ;
  1041. return proj * eye;
  1042. }`):e.vertex.code.add(i["a"]`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
  1043. return proj * (view * vec4(pos, 1.0));
  1044. }`)}},"4dc1":function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return m})),r.d(t,"g",(function(){return c})),r.d(t,"h",(function(){return f}));r("c120");var i=r("38a4");const n=2048,a=1.5,s=8;function o(e,t){const{format:r,quality:n,rotation:a,disableDecorations:s}=e||{},o=T(e,t.padding),c=j(e,{width:t.width-o.left-o.right,height:t.height-o.top-o.bottom}),{width:l,height:u}=_(e,c),d=S(r),h=P[d];return{format:d,quality:Object(i["f"])(null!=n?n:h,0,100),area:c,width:l,height:u,rotation:a,disableDecorations:!!s,ignoreBackground:!(!e||!e.ignoreBackground),ignorePadding:!(!e||!e.ignorePadding)}}function c(e,t){const r=o(e,t),i=r.area,n=r.width/i.width,a=T(r,t.padding),s=a.left+a.right,c=a.top+a.bottom,l=t.width-s,u=t.height-c,d=Math.floor(l*n+s),h=Math.floor(u*n+c),p=e&&e.layers?e.layers:[],f=r.ignoreBackground,b=r.ignorePadding;return{framebufferWidth:d,framebufferHeight:h,region:{x:Math.floor(i.x*n)+a.left,y:Math.floor(i.y*n)+a.top,width:r.width,height:r.height},format:r.format,quality:r.quality,rotation:r.rotation,pixelRatio:n,layers:p,disableDecorations:r.disableDecorations,ignoreBackground:f,ignorePadding:b}}function l(e,t,r,i){i.premultipliedAlpha&&A(e),r.width=e.width,r.height=e.height;const n=r.getContext("2d");n.putImageData(e,0,0),i.flipY&&E(n);const a=n.getImageData(0,0,e.width,e.height),s=u(r,t);return r.width=0,r.height=0,{dataUrl:s,data:a}}function u(e,t){const r=C[t.format],i=t.quality/100;return e.toDataURL(r,i)}function d(e,t){const r=S(e),n=P[r];return{format:r,quality:Object(i["f"])(null!=t?t:n,0,100)}}function h(e,t){return t/Math.max(e[0],e[1])}function p(e,t,r){if(!e||!t)throw new Error("Cannot construct image data without dimensions");if(O)try{return new ImageData(e,t)}catch(s){O=!1}return g(e,t,r)}function f(e,t,r,i){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(O)try{return new ImageData(e,t,r)}catch(c){O=!1}const n=g(t,r,i);return n.data.set(e,0),n}function b(e,t,r,i=0,n=0,a=e.width-i,s=e.height-n,o=!1){const{data:c}=e,{width:l,height:u,data:d}=t,h=a/l,p=s/u,f=Math.ceil(h/2),b=Math.ceil(p/2),m=e.width;for(let g=0;g<u;g++)for(let e=0;e<l;e++){const t=4*(e+(o?u-g-1:g)*l);let a=0,s=0,y=0,O=0,v=0,_=0;const j=(g+.5)*p;for(let o=Math.floor(g*p);o<(g+1)*p;o++){const t=Math.abs(j-(o+.5))/b,l=(e+.5)*h,u=t*t;for(let d=Math.floor(e*h);d<(e+1)*h;d++){const e=Math.abs(l-(d+.5))/f,t=Math.sqrt(u+e*e);if(t>=1)continue;let h=2*t*t*t-3*t*t+1;const p=4*(i+d+(n+o)*m);_+=h*c[p+3],s+=h,!r&&c[p+3]<255&&(h=h*c[p+3]/255),y+=h*c[p],O+=h*c[p+1],v+=h*c[p+2],a+=h}}d[t]=y/a,d[t+1]=O/a,d[t+2]=v/a,d[t+3]=_/s}return t}function m(e,t,r){if(!t)return e;const{framebufferWidth:i,framebufferHeight:o,pixelRatio:c,region:l}=e,u=T(e,r),d=u.left+u.right,h=u.top+u.bottom,p=i-d,f=o-h,b=Math.min(s,Math.min((n-d)/p,(n-h)/f));return b<a?e:{...e,framebufferWidth:Math.round(p*b)+d,framebufferHeight:Math.round(f*b)+h,pixelRatio:c*b,resample:{region:{x:Math.round((l.x-u.left)*b)+u.left,y:Math.round((l.y-u.top)*b)+u.top,width:Math.round(l.width*b),height:Math.round(l.height*b)},width:i,height:o}}}function g(e,t,r){return r||(r=v()),r.getContext("2d").createImageData(e,t)}let y=null,O=!0;function v(){return y||(y=document.createElement("canvas"),y.width=1,y.height=1),y}function _(e,t){if(!e)return t;const r=e.width,i=e.height;if(null!=r&&null!=i)return{width:Math.floor(r),height:Math.floor(i)};if(null==r&&null==i)return t;const n=t.width/t.height;return null==i?{width:Math.floor(r),height:Math.floor(r/n)}:{width:Math.floor(i*n),height:Math.floor(i)}}function j(e,t){const r={x:0,y:0,width:t.width,height:t.height};if(e&&e.area){null!=e.area.x&&(r.x=Math.floor(e.area.x)),null!=e.area.y&&(r.y=Math.floor(e.area.y));const i=null!=e.area.width?Math.floor(e.area.width):null,n=null!=e.area.height?Math.floor(e.area.height):null;if(r.width=t.width-r.x,r.height=t.height-r.y,null!=i&&null!=n)r.width=Math.min(r.width,i),r.height=Math.min(r.height,n);else if(null==i&&null!=n){const e=Math.min(r.width,i);r.height=e/r.width*r.height,r.width=e}else if(null!=i&&null==n){const e=Math.min(r.height,n);r.width=e/r.height*r.width,r.height=e}}return w(x(r,e),t)}function w(e,t){const r=Math.floor(Math.max(e.x,0)),i=Math.floor(Math.max(e.y,0)),n={x:r,y:i,width:Math.floor(Math.min(e.width,t.width-r)),height:Math.floor(Math.min(e.height,t.height-i))},a=n.width/n.height,s=e.width/e.height;if(s===a)return n;if(s>a){const e=Math.floor(n.width/s),t=n.height-e;return{x:n.x,y:Math.floor(n.y+t/2),width:n.width,height:e}}const o=Math.floor(n.height*s),c=n.width-o;return{x:Math.floor(n.x+c/2),y:n.y,width:o,height:n.height}}function x(e,t){if(!t||null==t.width||null==t.height)return e;const r=t.width/t.height,i=e.width/e.height;if(i===r)return e;if(i<r){const t=Math.floor(e.height*r);return e.x-=(t-e.width)/2,e.width=t,e}const n=Math.floor(e.width/r);return e.y-=(n-e.height)/2,e.height=n,e}function T(e,t){return!t||e&&e.ignorePadding?I:t}function S(e){switch(e){case"png":case"jpg":case"jpeg":return e;default:return M}}function E(e){e.save(),e.globalCompositeOperation="copy",e.scale(1,-1),e.translate(0,-e.canvas.height),e.drawImage(e.canvas,0,0),e.restore()}function A(e){const t=e.data,r=t.length;for(let i=0;i<r;i+=4){const e=t[i+3];if(e>0){const r=e/255;t[i+0]=t[i+0]/r,t[i+1]=t[i+1]/r,t[i+2]=t[i+2]/r}}}const C={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},R=98,M="png",P={png:100,jpg:R,jpeg:R},I={top:0,right:0,bottom:0,left:0}},"4dc9":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("9ef0"),s=r("fa8a"),o=r("7ffa"),c=r("a915"),l=r("59b2"),u=(r("cea0"),r("448d")),d=r("d386"),h=r("09db"),p=r("6e4d"),f=r("db52");const b=new s["a"]({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let m=i=class extends p["a"]{constructor(...e){super(...e),this.color=new a["a"]([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new f["a"]}normalizeCtorArgs(e,t,r,i){if(e&&"string"!=typeof e)return e;const n={};return e&&(n.style=e),null!=t&&(n.size=Object(c["j"])(t)),r&&(n.outline=r),i&&(n.color=i),n}writeColor(e,t){e&&"x"!==this.style&&"cross"!==this.style&&(t.color=e.toJSON()),null===e&&(t.color=null)}set path(e){this.style="path",this._set("path",e)}clone(){return new i({angle:this.angle,color:Object(o["a"])(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){var e;return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${null==(e=this.outline)?void 0:e.hash()}`}};Object(n["a"])([Object(l["b"])()],m.prototype,"color",void 0),Object(n["a"])([Object(h["a"])("color")],m.prototype,"writeColor",null),Object(n["a"])([Object(u["a"])({esriSMS:"simple-marker"},{readOnly:!0})],m.prototype,"type",void 0),Object(n["a"])([Object(l["b"])()],m.prototype,"size",void 0),Object(n["a"])([Object(l["b"])({type:b.apiValues,json:{read:b.read,write:b.write}})],m.prototype,"style",void 0),Object(n["a"])([Object(l["b"])({type:String,json:{write:!0}})],m.prototype,"path",null),Object(n["a"])([Object(l["b"])({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":f["a"]}},json:{default:null,write:!0}})],m.prototype,"outline",void 0),m=i=Object(n["a"])([Object(d["a"])("esri.symbols.SimpleMarkerSymbol")],m);const g=m},"4e47":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("e431"),n=r("0b2d"),a=r("0ca1"),s=r("b33e");class o extends s["a"]{constructor(e,t,r,i,n){super(e,t,r),this.sceneVelocity=i,this.direction=n}value(e){return super.valueFromInitialVelocity(this.sceneVelocity,e)}}class c{constructor(e=300,t=12,r=.84){this.minimumInitialVelocity=e,this.stopVelocity=t,this.friction=r,this.enabled=!0,this.time=new a["a"](.6),this.screen=[new a["a"](.4),new a["a"](.4)],this.scene=[new a["a"](.6),new a["a"](.6),new a["a"](.6)],this.tmpDirection=Object(n["f"])()}add(e,t,r){if(this.enabled){if(this.time.hasLastValue&&this.time.computeDelta(r)<.015)return;this.screen[0].update(e[0]),this.screen[1].update(e[1]),this.scene[0].update(t[0]),this.scene[1].update(t[1]),this.scene[2].update(t[2]),this.time.update(r)}}reset(){this.screen[0].reset(),this.screen[1].reset(),this.scene[0].reset(),this.scene[1].reset(),this.scene[2].reset(),this.time.reset()}evaluateMomentum(){if(!this.enabled||!this.screen[0].hasFilteredDelta)return null;const e=this.screen[0].filteredDelta,t=this.screen[1].filteredDelta,r=Math.sqrt(e*e+t*t)/this.time.filteredDelta;return Math.abs(r)<this.minimumInitialVelocity?null:this.createMomentum(r,this.stopVelocity,this.friction)}createMomentum(e,t,r){Object(i["y"])(this.tmpDirection,this.scene[0].filteredDelta,this.scene[1].filteredDelta,this.scene[2].filteredDelta);const n=Object(i["r"])(this.tmpDirection);n>0&&Object(i["g"])(this.tmpDirection,this.tmpDirection,1/n);const a=n/this.time.filteredDelta;return new o(e,t,r,a,this.tmpDirection)}}},"4f37":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i,n=r("a4ee"),a=r("ce50"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("09db"),l=r("5dd5");let u=i=class extends l["a"]{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic",this.valueExpressionTitle=null}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}writeValueExpressionTitleWebScene(e,t,r,i){if(i&&i.messages){const e=`visualVariables[${this.index}]`;i.messages.push(new a["a"]("property:unsupported",this.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:e+".valueExpressionTitle",context:i}))}}clone(){return new i({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:this.legendOptions&&this.legendOptions.clone()})}};Object(n["a"])([Object(s["b"])({readOnly:!0})],u.prototype,"cache",null),Object(n["a"])([Object(s["b"])({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],u.prototype,"axis",void 0),Object(n["a"])([Object(s["b"])({type:["rotation"],json:{type:["rotationInfo"]}})],u.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],u.prototype,"rotationType",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],u.prototype,"valueExpressionTitle",void 0),Object(n["a"])([Object(c["a"])("web-scene","valueExpressionTitle")],u.prototype,"writeValueExpressionTitleWebScene",null),u=i=Object(n["a"])([Object(o["a"])("esri.renderers.visualVariables.RotationVariable")],u);const d=u},5015:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("f4cc"),n=r("2db0");async function a(e){const t=r.e("chunk-2d0c191a").then(r.bind(null,"4734")),a=r.e("chunk-2d207f46").then(r.bind(null,"a375")),s=Object(n["a"])((await t).default,{signal:e}),o=Object(n["a"])((await a).default,{signal:e}),c={mask:await s,overlay:await o};return Object(i["v"])(e),c}},"501b":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.code.add(i["a"]`const float MAX_RGBA_FLOAT =
  1045. 255.0 / 256.0 +
  1046. 255.0 / 256.0 / 256.0 +
  1047. 255.0 / 256.0 / 256.0 / 256.0 +
  1048. 255.0 / 256.0 / 256.0 / 256.0 / 256.0;
  1049. const vec4 FIXED_POINT_FACTORS = vec4(1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0);
  1050. vec4 float2rgba(const float value) {
  1051. float valueInValidDomain = clamp(value, 0.0, MAX_RGBA_FLOAT);
  1052. vec4 fixedPointU8 = floor(fract(valueInValidDomain * FIXED_POINT_FACTORS) * 256.0);
  1053. const float toU8AsFloat = 1.0 / 255.0;
  1054. return fixedPointU8 * toU8AsFloat;
  1055. }
  1056. const vec4 RGBA_2_FLOAT_FACTORS = vec4(
  1057. 255.0 / (256.0),
  1058. 255.0 / (256.0 * 256.0),
  1059. 255.0 / (256.0 * 256.0 * 256.0),
  1060. 255.0 / (256.0 * 256.0 * 256.0 * 256.0)
  1061. );
  1062. float rgba2float(vec4 rgba) {
  1063. return dot(rgba, RGBA_2_FLOAT_FACTORS);
  1064. }`)}},"505a":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i,n=r("a4ee"),a=r("fc29"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{clone(){return new i({url:this.url})}};Object(n["a"])([Object(s["b"])({type:String})],c.prototype,"url",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.symbols.support.Thumbnail")],c)},"50e6":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0")),c=r("d386");let l=i=class extends a["a"]{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};Object(n["a"])([Object(s["b"])({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),Object(n["a"])([Object(s["b"])({type:o["a"],json:{write:!0}})],l.prototype,"level",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),Object(n["a"])([Object(s["b"])({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),Object(n["a"])([Object(s["b"])({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=i=Object(n["a"])([Object(c["a"])("esri.layers.support.LOD")],l);const u=l},5211:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.extensions.add("GL_EXT_shader_texture_lod"),e.extensions.add("GL_OES_standard_derivatives"),e.fragment.code.add(i["a"]`#ifndef GL_EXT_shader_texture_lod
  1065. float calcMipMapLevel(const vec2 ddx, const vec2 ddy) {
  1066. float deltaMaxSqr = max(dot(ddx, ddx), dot(ddy, ddy));
  1067. return max(0.0, 0.5 * log2(deltaMaxSqr));
  1068. }
  1069. #endif
  1070. vec4 textureAtlasLookup(sampler2D texture, vec2 textureSize, vec2 textureCoordinates, vec4 atlasRegion) {
  1071. vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
  1072. vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
  1073. float maxdUV = 0.125;
  1074. vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
  1075. vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
  1076. #ifdef GL_EXT_shader_texture_lod
  1077. return texture2DGradEXT(texture, uvAtlas, dUVdx, dUVdy);
  1078. #else
  1079. vec2 dUVdxAuto = dFdx(uvAtlas);
  1080. vec2 dUVdyAuto = dFdy(uvAtlas);
  1081. float mipMapLevel = calcMipMapLevel(dUVdx * textureSize, dUVdy * textureSize);
  1082. float autoMipMapLevel = calcMipMapLevel(dUVdxAuto * textureSize, dUVdyAuto * textureSize);
  1083. return texture2D(texture, uvAtlas, mipMapLevel - autoMipMapLevel);
  1084. #endif
  1085. }`)}},"521c":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("d386")),c=r("09db"),l=r("3af1"),u=r("3760"),d=r("4ae5"),h=r("5996"),p=r("f8d4"),f=r("3723");function b(e){return!Array.isArray(e[0])}let m=i=class extends u["a"]{constructor(...e){super(...e),this.paths=[],this.type="polyline"}normalizeCtorArgs(e,t){let r,i,n=null,a=null;return e&&!Array.isArray(e)?(n=e.paths?e.paths:null,t||(e.spatialReference?t=e.spatialReference:e.paths||(t=e)),r=e.hasZ,i=e.hasM):n=e,n=n||[],t=t||h["a"].WGS84,n.length&&n[0]&&null!=n[0][0]&&"number"==typeof n[0][0]&&(n=[n]),a=n[0]&&n[0][0],a&&(void 0===r&&void 0===i?(r=a.length>2,i=!1):void 0===r?r=!i&&a.length>3:void 0===i&&(i=!r&&a.length>3)),{paths:n,spatialReference:t,hasZ:r,hasM:i}}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:e}=this,t=Object(p["c"])(this);if(!t)return null;const r=new l["a"](t);return r.spatialReference=e,r}writePaths(e,t){t.paths=Object(a["a"])(this.paths)}addPath(e){if(!e)return;const t=this.paths,r=t.length;if(b(e)){const i=[];for(let t=0,r=e.length;t<r;t++)i[t]=e[t].toArray();t[r]=i}else t[r]=e.concat();return this.notifyChange("paths"),this}clone(){const e=new i;return e.spatialReference=this.spatialReference,e.paths=Object(a["a"])(this.paths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const r=this.paths[e][t],i=this.hasZ,n=this.hasM;return i&&!n?new d["a"](r[0],r[1],r[2],void 0,this.spatialReference):n&&!i?new d["a"](r[0],r[1],void 0,r[2],this.spatialReference):i&&n?new d["a"](r[0],r[1],r[2],r[3],this.spatialReference):new d["a"](r[0],r[1],this.spatialReference)}insertPoint(e,t,r){return this._validateInputs(e,t,!0)?(Object(f["a"])(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[e].splice(t,0,r),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],r=this.spatialReference,i=t.map(e=>new d["a"](e,r));return this.notifyChange("paths"),i}removePoint(e,t){if(!this._validateInputs(e,t))return null;const r=new d["a"](this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),r}setPoint(e,t,r){return this._validateInputs(e,t)?(Object(f["a"])(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[e][t]=r,this.notifyChange("paths"),this):this}_validateInputs(e,t,r=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){const i=this.paths[e];if(r&&(t<0||t>i.length))return!1;if(!r&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};Object(n["a"])([Object(s["b"])({readOnly:!0})],m.prototype,"cache",null),Object(n["a"])([Object(s["b"])({readOnly:!0})],m.prototype,"extent",null),Object(n["a"])([Object(s["b"])({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),Object(n["a"])([Object(c["a"])("paths")],m.prototype,"writePaths",null),m=i=Object(n["a"])([Object(o["a"])("esri.geometry.Polyline")],m),m.prototype.toJSON.isDefaultToJSON=!0;const g=m},5241:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return m}));var i=r("b2b2"),n=r("afe1"),a=r("0b2d"),s=r("8188"),o=r("4261"),c=r("32ed"),l=r("1a54"),u=r("2e0f"),d=r("ba58"),h=r("5a22");const p=Object(a["f"])();function f(e,t,r,a,c,l,d,f){const b=r?r.length:0,m=e.clippingExtent;if(Object(s["t"])(t,p,e.elevationProvider.spatialReference),Object(i["k"])(m)&&!Object(o["g"])(m,p))return null;Object(s["t"])(t,p,e.renderCoordsHelper.spatialReference);const g=e.localOriginFactory.getOrigin(p),y=new h["a"]({castShadow:!1,metadata:{layerUid:l,graphicUid:d,usesVerticalDistanceToGround:!0}});for(let i=0;i<b;i++){const e=n["a"];y.addGeometry(r[i],a[i],e,g,f)}return{object:y,sampledElevation:Object(u["c"])(y,t,e.elevationProvider,e.renderCoordsHelper,c)}}function b(e,t,r){const i=e.elevationContext,n=r.spatialReference;Object(s["t"])(t,p,n),i.centerPointInElevationSR=Object(l["j"])(p[0],p[1],t.hasZ?p[2]:0,n)}function m(e){switch(e.type){case"point":return e;case"polygon":case"extent":return Object(d["a"])(e);case"polyline":{const t=e.paths[0];if(!t||0===t.length)return null;const r=Object(c["e"])(t,Object(c["d"])(t)/2);return Object(l["j"])(r[0],r[1],r[2],e.spatialReference)}case"mesh":return e.origin}return null}},"528f":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return m}));var i=r("0a9e"),n=r("a05b"),a=r("d272"),s=r("e6aa"),o=r("c2d1"),c=r("d047"),l=r("c6d7"),u=r("ebd5"),d=r("4377"),h=r("501b"),p=r("3886"),f=r("690a"),b=r("b7bd");function m(e){const t=new f["a"];return t.include(s["a"],e),e.output===n["a"].Depth&&t.include(o["a"],e),t.fragment.include(h["a"]),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("nearFar","vec2").add("pixelRatio","float").add("screenSize","vec2").add("inverseProjectionMatrix","mat4"),t.fragment.uniforms.add("tex","sampler2D"),t.attributes.add(b["a"].POSITION,"vec3"),t.attributes.add(b["a"].UV0,"vec2"),t.attributes.add(b["a"].AUXPOS1,"vec3"),t.varyings.add("vColor","vec4"),t.varyings.add("vpos","vec3"),t.varyings.add("vUV","vec2"),t.varyings.add("vSize","float"),t.varyings.add("linearDepth","float"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),t.vertex.code.add(p["a"]`#define PERPENDICULAR(v) vec2(v.y, -v.x);
  1086. float interp(float ncp, vec4 a, vec4 b) {
  1087. return (-ncp - a.z) / (b.z - a.z);
  1088. }`),t.vertex.code.add(p["a"]`vec4 projectAndScale(vec4 pos) {
  1089. vec4 posNdc = proj * pos;
  1090. posNdc.xy *= screenSize / posNdc.w;
  1091. return posNdc;
  1092. }`),t.vertex.code.add(p["a"]`
  1093. void clipAndTransform(inout vec4 pos, inout vec4 prev) {
  1094. float vnp = nearFar[0] * 0.99;
  1095. if (prev.z > -nearFar[0]) {
  1096. //previous behind ncp
  1097. prev = mix(pos, prev, interp(vnp, pos, prev));
  1098. }
  1099. ${e.multipassTerrainEnabled?"depth = pos.z;":""}
  1100. linearDepth = (-pos.z - nearFar[0]) / (nearFar[1] - nearFar[0]);
  1101. pos = projectAndScale(pos);
  1102. prev = projectAndScale(prev);
  1103. }
  1104. `),t.vertex.code.add(p["a"]`
  1105. void main(void) {
  1106. float coverage = 1.0;
  1107. // Check for special value of uv0.y which is used by the Renderer when graphics
  1108. // are removed before the VBO is recompacted. If this is the case, then we just
  1109. // project outside of clip space.
  1110. if (uv0.y == 0.0) {
  1111. // Project out of clip space
  1112. gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
  1113. }
  1114. else {
  1115. float lineSize = getSize();
  1116. float lineWidth = max(lineSize, 1.0) * pixelRatio;
  1117. vec4 pos = view * vec4(position.xyz, 1.0);
  1118. vec4 prev = view * vec4(auxpos1.xyz, 1.0);
  1119. clipAndTransform(pos, prev);
  1120. // normalize vector along line segment
  1121. vec2 segment = pos.xy - prev.xy;
  1122. float segmentLen = length(segment);
  1123. segment = (segmentLen > 0.001) ? segment / segmentLen : vec2(0.0, 0.0);
  1124. // displace according to position in the texture
  1125. vec2 displacementDirU = uv0.x * PERPENDICULAR(segment);
  1126. vec2 displacementDirV = uv0.y * segment;
  1127. vSize = ${p["a"].float(i["a"]/i["b"])} * lineWidth;
  1128. pos.xy += displacementDirU * vSize + displacementDirV * vSize;
  1129. // Convert back into NDC
  1130. pos.xy = (pos.xy / screenSize) * pos.w;
  1131. // Convert texture coordinate into [0,1]
  1132. vUV = (uv0 + 1.0) / 2.0;
  1133. vColor = getColor();
  1134. vColor.a *= coverage;
  1135. // transform final position to camera space for slicing
  1136. vpos = (inverseProjectionMatrix * pos).xyz;
  1137. gl_Position = pos;
  1138. }
  1139. }
  1140. `),e.multipassTerrainEnabled&&(t.fragment.include(c["a"]),t.include(l["b"],e)),t.include(a["a"],e),t.fragment.uniforms.add("intrinsicColor","vec4"),t.fragment.include(d["a"]),t.fragment.code.add(p["a"]`
  1141. void main() {
  1142. discardBySlice(vpos);
  1143. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  1144. vec4 finalColor = intrinsicColor * vColor;
  1145. // Offset texture coordinate s.t. we sample texel centers
  1146. float texelSize = ${p["a"].float(1/i["a"])};
  1147. vec2 samplePos = vUV + vec2(0.5, -0.5) * texelSize;
  1148. // Evaluate sdf
  1149. float sdf = rgba2float(texture2D(tex, samplePos)) - 0.5;
  1150. float distance = sdf * vSize;
  1151. // Grow by a halfpixel to make sure the line is fully covered by the cross marker
  1152. // (otherwise there will be a halo if they are different colours)
  1153. distance -= 0.5;
  1154. finalColor.a *= clamp(0.5 - distance, 0.0, 1.0);
  1155. if (finalColor.a < ${p["a"].float(u["c"])}) {
  1156. discard;
  1157. }
  1158. ${e.output===n["a"].Alpha?p["a"]`gl_FragColor = vec4(finalColor.a);`:""}
  1159. ${e.output===n["a"].Color?p["a"]`gl_FragColor = highlightSlice(finalColor, vpos);`:""}
  1160. ${e.output===n["a"].Color&&e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  1161. ${e.output===n["a"].Highlight?p["a"]`gl_FragColor = vec4(1.0);`:""}
  1162. ${e.output===n["a"].Depth?p["a"]`outputDepth(linearDepth);`:""}
  1163. }
  1164. `),t}const g=Object.freeze({__proto__:null,build:m})},"53f8":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return k}));var i=r("a4ee"),n=r("2eab"),a=r("658b"),s=r("ce50"),o=r("9096"),c=r("1853"),l=r("b2b2"),u=r("e694"),d=r("f4cc"),h=r("59b2"),p=(r("b50f"),r("c120"),r("cea0")),f=r("afcf"),b=r("d386"),m=r("09db"),g=r("92ef"),y=r("3af1"),O=r("49a0"),v=r("a6a3"),_=r("f46e"),j=r("303f"),w=r("3d59"),x=r("997b"),T=r("8b28"),S=r("b911"),E=r("0db5"),A=r("8e17"),C=r("5a62"),R=r("d409"),M=r("601a"),P=r("22f4"),I=r("70ce"),D=r("e9d0"),L=r("2258"),N=r("2546");let F=class extends(Object(x["a"])(Object(M["a"])(Object(C["a"])(Object(R["a"])(Object(j["a"])(Object(w["a"])(Object(S["a"])(Object(E["a"])(Object(u["a"])(Object(A["a"])(Object(_["a"])(Object(T["a"])(Object(o["b"])(v["a"])))))))))))))){constructor(...e){super(...e),this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=Object(l["k"])(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(d["u"]).then(()=>this._fetchService(t))),Promise.resolve(this)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.indexOf("PNG32")>-1?"png32":"png24"}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const n=e.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).toArray();let a=!1;if(this.capabilities&&this.capabilities.operations.supportsExportMap&&this.capabilities.exportMap.supportsDynamicLayers){const e=Object(g["e"])(i.origin);if(e===g["a"].PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;a=Object(L["c"])(n,e,g["a"].SERVICE)}else if(e>g["a"].PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");a=Object(L["c"])(n,e.sublayers,Object(g["e"])(e.origin))}}const s=[],o={writeSublayerStructure:a,...i};let c=a;n.forEach(e=>{const t=e.write({},o);s.push(t),c=c||"user"===e.originOf("visible")}),s.some(e=>Object.keys(e).length>1)&&(t.layers=s),c&&(t.visibleLayers=n.filter(e=>e.visible).map(e=>e.id))}createExportImageParameters(e,t,r,i){const n=i&&i.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian());const a=new I["a"]({layer:this,floors:null==i?void 0:i.floors,scale:Object(O["b"])({extent:e,width:t})*n}),s=a.toJSON();a.destroy();const o=!i||!i.rotation||this.version<10.3?{}:{rotation:-i.rotation},c=e&&e.spatialReference,l=c.wkid||JSON.stringify(c.toJSON());s.dpi*=n;const u={};if(null!=i&&i.timeExtent){const{start:e,end:t}=i.timeExtent.toJSON();u.time=e&&t&&e===t?""+e:`${null==e?"null":e},${null==t?"null":t}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(u.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:l,imageSR:l,size:t+","+r,...s,...o,...u}}async fetchImage(e,t,r,i){var a;const o={responseType:"image",signal:null!=(a=null==i?void 0:i.signal)?a:null,query:{...this.parsedUrl.query,...this.createExportImageParameters(e,t,r,i),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},c=this.parsedUrl.path+"/export";return null==o.query.dynamicLayers||this.capabilities.exportMap.supportsDynamicLayers?Object(n["default"])(c,o).then(e=>e.data).catch(e=>{if(Object(d["m"])(e))throw e;throw new s["a"]("mapimagelayer:image-fetch-error","Unable to load image: "+c,{error:e})}):Promise.reject(new s["a"]("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:o.query}))}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:r}=await Object(n["default"])(this.url,t),{extent:i,fullExtent:s,timeExtent:o}=r,c=i||s;return{fullExtent:c&&y["a"].fromJSON(c),timeExtent:o&&a["a"].fromJSON({start:o[0],end:o[1]})}}loadAll(){return Object(c["a"])(this,e=>{e(this.allSublayers)})}serviceSupportsSpatialReference(e){return Object(N["a"])(this,e)}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:r}=await Object(n["default"])(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});r&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}};Object(i["a"])([Object(h["b"])({type:Boolean})],F.prototype,"datesInUnknownTimezone",void 0),Object(i["a"])([Object(h["b"])()],F.prototype,"dpi",void 0),Object(i["a"])([Object(h["b"])()],F.prototype,"gdbVersion",void 0),Object(i["a"])([Object(h["b"])()],F.prototype,"imageFormat",void 0),Object(i["a"])([Object(f["a"])("imageFormat",["supportedImageFormatTypes"])],F.prototype,"readImageFormat",null),Object(i["a"])([Object(h["b"])({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],F.prototype,"imageMaxHeight",void 0),Object(i["a"])([Object(h["b"])({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],F.prototype,"imageMaxWidth",void 0),Object(i["a"])([Object(h["b"])()],F.prototype,"imageTransparency",void 0),Object(i["a"])([Object(h["b"])({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],F.prototype,"isReference",void 0),Object(i["a"])([Object(h["b"])({json:{read:!1,write:!1}})],F.prototype,"labelsVisible",void 0),Object(i["a"])([Object(h["b"])({type:["ArcGISMapServiceLayer"]})],F.prototype,"operationalLayerType",void 0),Object(i["a"])([Object(h["b"])({json:{read:!1,write:!1}})],F.prototype,"popupEnabled",void 0),Object(i["a"])([Object(h["b"])()],F.prototype,"sourceJSON",void 0),Object(i["a"])([Object(h["b"])({json:{write:{ignoreOrigin:!0}}})],F.prototype,"sublayers",void 0),Object(i["a"])([Object(m["a"])("sublayers",{layers:{type:[D["a"]]},visibleLayers:{type:[p["a"]]}})],F.prototype,"writeSublayers",null),Object(i["a"])([Object(h["b"])({type:["show","hide","hide-children"]})],F.prototype,"listMode",void 0),Object(i["a"])([Object(h["b"])({json:{read:!1},readOnly:!0,value:"map-image"})],F.prototype,"type",void 0),Object(i["a"])([Object(h["b"])(P["n"])],F.prototype,"url",void 0),F=Object(i["a"])([Object(b["a"])("esri.layers.MapImageLayer")],F);const k=F},"549a":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("ce50");class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i["a"](t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,a]=e.split("."),s=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(s))throw new i["a"]((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!a||!a.match||!a.match(s))throw new i["a"]((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const o=parseInt(r,10),c=parseInt(a,10);return new n(o,c,t)}}},"54b4":function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return v})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return p})),r.d(t,"g",(function(){return g})),r.d(t,"h",(function(){return y})),r.d(t,"i",(function(){return b})),r.d(t,"j",(function(){return O}));var i=r("b2b2"),n=r("e041"),a=r("fcf2");const s={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(s),c=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!c.test(e)}function h(e){const t=Object(n["M"])(e),r=t.path.match(c)||t.path.match(l);if(!r)return null;const[,i,a,o,u]=r,d=a.indexOf("/");return{title:f(-1!==d?a.slice(d+1):a),serverType:s[o.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:i}}}function p(e){const t=Object(n["M"])(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function b(e,t){const r=[];if(e){const t=h(e);Object(i["k"])(t)&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(-1!==r[0].toLowerCase().indexOf(r[1].toLowerCase()))return r[0];if(-1!==r[1].toLowerCase().indexOf(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){if(!e)return!1;const t=".arcgis.com/",r="//services",i="//tiles",n="//features",a=-1!==(e=e.toLowerCase()).indexOf(t),s=-1!==e.indexOf(r)||-1!==e.indexOf(i)||-1!==e.indexOf(n);return a&&s}function g(e,t){return e?Object(n["K"])(Object(n["J"])(e,t)):e}function y(e){let{url:t}=e;if(!t)return{url:t};t=Object(n["J"])(t,e.logger);const r=Object(n["M"])(t),a=h(r.path);let s;if(Object(i["k"])(a))null!=a.sublayer&&null==e.layer.layerId&&(s=a.sublayer),t=a.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);Object(i["k"])(e)&&(t=e.serviceUrl,s=e.sublayerId)}return{url:Object(n["K"])(t),layerId:s}}function O(e,t,r,i,s){Object(a["g"])(t,i,"url",s),i.url&&null!=e.layerId&&(i.url=Object(n["B"])(i.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=-1!==t.indexOf("/services/"),i=-1!==t.indexOf("/mapserver/wmsserver"),n=-1!==t.indexOf("/imageserver/wmsserver"),a=-1!==t.indexOf("/wmsserver");return r&&(i||n||a)}},5501:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e,t){e.varyings.add("vtc","vec2"),e.vertex.uniforms.add("texOffsetAndScale","vec4"),e.fragment.uniforms.add("tex","sampler2D"),e.fragment.uniforms.add("textureOpacities","vec3"),t.textureFadingEnabled&&(e.vertex.uniforms.add("nextTexOffsetAndScale","vec4"),e.varyings.add("nvtc","vec2"),e.fragment.uniforms.add("texNext","sampler2D"),e.fragment.uniforms.add("nextTexOpacities","vec3"),e.fragment.uniforms.add("fadeFactor","float")),e.vertex.code.add(i["a"]`
  1165. void forwardTextureCoordinates(in vec2 uv) {
  1166. vtc = uv * texOffsetAndScale.zw + texOffsetAndScale.xy;
  1167. ${t.textureFadingEnabled?i["a"]`nvtc = uv * nextTexOffsetAndScale.zw + nextTexOffsetAndScale.xy;`:i["a"]``}
  1168. }`),t.useGrid?(e.fragment.code.add(i["a"]`float lineFactorAtPosition(float value) {
  1169. float pos = value * 129.0;
  1170. if(pos < 0.5 || pos > 128.5) {
  1171. return 1.0;
  1172. }
  1173. pos = pos + 0.5;
  1174. float modulo = mod(pos, 16.0);
  1175. return modulo <= 2.0 ? 1.0 - abs(modulo - 1.0) : 0.0;
  1176. }
  1177. float lineFactorAtUV(vec2 uv) {
  1178. return max(lineFactorAtPosition(uv.x), lineFactorAtPosition(uv.y));
  1179. }
  1180. float lineFactor(vec2 uv) {
  1181. vec2 offset = fwidth(uv) * 0.25;
  1182. return (lineFactorAtUV(vec2(uv.x + offset.x, uv.y + offset.y)) +
  1183. lineFactorAtUV(vec2(uv.x - offset.x, uv.y + offset.y)) +
  1184. lineFactorAtUV(vec2(uv.x + offset.x, uv.y - offset.y)) +
  1185. lineFactorAtUV(vec2(uv.x - offset.x, uv.y - offset.y))) / 4.0;
  1186. }
  1187. vec4 gridColor(vec2 uv) {
  1188. float line = lineFactor(uv) * 0.1 + 0.9;
  1189. float backgroundOpacity = textureOpacities.y;
  1190. return vec4(1.0, 0.972, 0.918, 1.0) * line * backgroundOpacity;
  1191. }`),e.fragment.code.add(i["a"]`vec4 getColor(vec4 color, vec2 uv, vec3 opacities) {
  1192. if (opacities.y <= 0.0) {
  1193. return color * opacities.z * opacities.x;
  1194. }
  1195. vec4 grid = gridColor(uv);
  1196. float alpha = opacities.z * color.a;
  1197. return mix(grid, color, alpha) * opacities.x;
  1198. }`)):t.hasBackgroundColor?(e.fragment.uniforms.add("backgroundColor","vec3"),e.fragment.code.add(i["a"]`vec4 getColor(vec4 color, vec2 uv, vec3 opacities) {
  1199. if (opacities.y <= 0.0) {
  1200. return color * opacities.z * opacities.x;
  1201. }
  1202. float alpha = opacities.z * color.a;
  1203. float backgroundOpacity = opacities.y;
  1204. return mix(vec4(backgroundColor, 1.0) * backgroundOpacity, color, alpha) * opacities.x;
  1205. }`)):e.fragment.code.add(i["a"]`vec4 getColor(vec4 color, vec2 uv, vec3 opacities) {
  1206. return color;
  1207. }`),t.textureFadingEnabled?e.fragment.code.add(i["a"]`vec4 getTileColor() {
  1208. vec4 color = getColor(texture2D(tex, vtc), vtc, textureOpacities);
  1209. if (fadeFactor >= 1.0) {
  1210. return color;
  1211. }
  1212. vec4 nextColor = getColor(texture2D(texNext, nvtc), nvtc, nextTexOpacities);
  1213. return mix(nextColor, color, fadeFactor);
  1214. }`):e.fragment.code.add(i["a"]`vec4 getTileColor() {
  1215. return getColor(texture2D(tex, vtc), vtc, textureOpacities);
  1216. }`)}},"556f":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("ecd7");function n(e){e.length=0}class a{constructor(e=50,t=50){this._pool=new i["a"](Array,void 0,n,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return s.acquire()}static release(e){return s.release(e)}static prune(){s.prune()}}const s=new a(100)},"55f0":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("38a4"),n=r("0ca1"),a=r("b33e");class s{constructor(e=2.5,t=.01,r=.95,i=12){this.minimumInitialVelocity=e,this.stopVelocity=t,this.friction=r,this.maxVelocity=i,this.enabled=!0,this.value=new n["a"](.8),this.time=new n["a"](.3)}add(e,t){if(this.enabled){if(this.time.hasLastValue){if(this.time.computeDelta(t)<.01)return;if(this.value.hasFilteredDelta){const t=this.value.computeDelta(e);this.value.filteredDelta*t<0&&this.value.reset()}}this.time.update(t),this.value.update(e)}}reset(){this.value.reset(),this.time.reset()}evaluateMomentum(){if(!this.enabled||!this.value.hasFilteredDelta)return null;let e=this.value.filteredDelta/this.time.filteredDelta;return e=Object(i["f"])(e,-this.maxVelocity,this.maxVelocity),Math.abs(e)<this.minimumInitialVelocity?null:this.createMomentum(e,this.stopVelocity,this.friction)}createMomentum(e,t,r){return new a["a"](e,t,r)}}},"560e":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return s}));const i=new Map;function n(){i.clear()}function a(e){return i.get(e)}function s(e,t){i.set(e,t)}function o(e){i.delete(e)}},5686:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3c9c"),n=r("3886");function a(e,t){e.varyings.add("tbnTangent","vec3"),e.varyings.add("tbnBiTangent","vec3"),t.viewingMode===i["a"].Global?e.vertex.code.add(n["a"]`void forwardVertexTangent(vec3 n) {
  1217. tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), n));
  1218. tbnBiTangent = normalize(cross(n, tbnTangent));
  1219. }`):e.vertex.code.add(n["a"]`void forwardVertexTangent(vec3 n) {
  1220. tbnTangent = vec3(1.0, 0.0, 0.0);
  1221. tbnBiTangent = normalize(cross(n, tbnTangent));
  1222. }`),e.fragment.code.add(n["a"]`mat3 getTBNMatrix(vec3 n) {
  1223. return mat3(tbnTangent, tbnBiTangent, n);
  1224. }`)}},"572a":function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return O}));var i=r("a05b"),n=r("d272"),a=r("4db9"),s=r("5686"),o=r("c2d1"),c=r("6a07"),l=r("ea4b"),u=r("040b"),d=r("a7d7"),h=r("cd26a"),p=r("b4c2"),f=r("5501"),b=r("d56e"),m=r("3886"),g=r("690a"),y=r("b7bd");function O(e){const t=new g["a"];if(t.include(b["a"],{name:"Terrain Shader",output:e.output}),t.include(p["a"]),t.attributes.add(y["a"].POSITION,"vec3"),t.attributes.add(y["a"].UV0,"vec2"),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("origin","vec3").add("skirtScale","float"),t.fragment.uniforms.add("origin","vec3"),e.output===i["a"].Color){t.include(a["a"],{linearDepth:!1}),t.include(u["a"],e),t.include(f["a"],e),t.include(l["a"],e);const r=e.overlayMode!==h["b"].Disabled,i=e.overlayMode===h["b"].EnabledWithWater;r&&t.include(h["a"],{pbrMode:d["a"].Water,useCustomDTRExponentForWater:!1,ssrEnabled:e.ssrEnabled,highStepCount:e.highStepCount}),i&&t.include(s["a"],e),t.varyings.add("vnormal","vec3"),t.varyings.add("vpos","vec3"),t.vertex.uniforms.add("viewNormal","mat4"),e.receiveShadows&&t.varyings.add("linearDepth","float"),e.tileBorders&&t.varyings.add("vuv","vec2"),e.atmosphere&&(t.vertex.uniforms.add("lightingMainDirection","vec3"),t.varyings.add("wnormal","vec3"),t.varyings.add("wlight","vec3")),e.screenSizePerspective&&(t.vertex.uniforms.add("screenSizePerspective","vec4"),t.varyings.add("screenSizeDistanceToCamera","float"),t.varyings.add("screenSizeCosAngle","float")),t.vertex.code.add(m["a"]`
  1225. void main(void) {
  1226. vpos = position;
  1227. vnormal = getLocalUp(vpos, origin);
  1228. vec2 uv = uv0;
  1229. vpos = applySkirts(uv, vpos, vnormal, skirtScale);
  1230. ${e.atmosphere?m["a"]`
  1231. wnormal = normalize((viewNormal * vec4(normalize(vpos + origin), 1.0)).xyz);
  1232. wlight = normalize((view * vec4(lightingMainDirection, 1.0)).xyz);`:""}
  1233. ${e.tileBorders?m["a"]`vuv = uv;`:""}
  1234. ${e.screenSizePerspective?m["a"]`
  1235. vec3 viewPos = (view * vec4(vpos, 1.0)).xyz;
  1236. screenSizeDistanceToCamera = length(viewPos);
  1237. vec3 viewSpaceNormal = (viewNormal * vec4(normalize(vpos + origin), 1.0)).xyz;
  1238. screenSizeCosAngle = abs(viewSpaceNormal.z);`:""}
  1239. gl_Position = transformPosition(proj, view, vpos);
  1240. ${e.receiveShadows?m["a"]`linearDepth = gl_Position.w;`:""}
  1241. forwardTextureCoordinates(uv);
  1242. ${r?m["a"]`setOverlayVTC(uv);`:""}
  1243. ${i?m["a"]`forwardVertexTangent(vnormal);`:m["a"]``}
  1244. }
  1245. `),t.extensions.add("GL_OES_standard_derivatives"),t.extensions.add("GL_EXT_shader_texture_lod"),t.include(n["a"],e),t.include(l["a"],e),t.fragment.uniforms.add("cameraPosition","vec3").add("viewDirection","vec3").add("ssaoTex","sampler2D").add("viewportPixelSz","vec4"),e.screenSizePerspective&&t.fragment.uniforms.add("screenSizePerspective","vec4"),i&&(t.fragment.uniforms.add("ovWaterTex","sampler2D"),t.fragment.uniforms.add("view","mat4")),t.fragment.code.add(m["a"]`const float sliceOpacity = 0.2;
  1246. float lum(vec3 c) {
  1247. return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
  1248. }`),t.fragment.code.add(m["a"]`
  1249. void main() {
  1250. ${e.receiveShadows?m["a"]`float shadow = readShadowMap(vpos, linearDepth);`:m["a"]`float shadow = 0.0;`}
  1251. float vndl = dot(normalize(vnormal), lightingMainDirection);
  1252. float ssao = viewportPixelSz.w < .0 ? 1.0 : texture2D(ssaoTex, (gl_FragCoord.xy - viewportPixelSz.xy) * viewportPixelSz.zw).a;
  1253. vec4 tileColor = getTileColor();
  1254. ${r?m["a"]`
  1255. vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
  1256. vec4 overlayColor = overlayOpacity * overlayColorOpaque;
  1257. vec4 groundColor = tileColor;
  1258. tileColor = tileColor * (1.0 - overlayColor.a) + overlayColor;`:""}
  1259. if (rejectBySlice(vpos)) {
  1260. tileColor *= sliceOpacity;
  1261. }
  1262. ${e.atmosphere?m["a"]`
  1263. float ndotl = clamp(vndl, 0.0, 1.0);
  1264. vec3 atm = vec3(clamp(1.0 - dot(-viewDirection, wnormal), 0.0, 1.0));
  1265. atm *= clamp(1.0 - lum(tileColor.rgb) * 1.5, 0.0, 1.0); //avoid atmosphere on bright base maps
  1266. atm *= clamp(ndotl * 2.0, 0.0, 1.0); // avoid atmosphere on dark side of the globe
  1267. atm *= tileColor.a; // premultiply with tile alpha`:""}
  1268. vec3 albedo = ${e.atmosphere?m["a"]`atm + tileColor.rgb;`:m["a"]`tileColor.rgb;`}
  1269. vec3 normal = normalize(vnormal);
  1270. // heuristic shading function used in the old terrain, now used to add ambient lighting
  1271. float additionalAmbientScale = smoothstep(0.0, 1.0, clamp(vndl * 2.5, 0.0, 1.0));
  1272. vec3 additionalLight = ssao * lightingMainIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
  1273. gl_FragColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);
  1274. ${i?m["a"]`
  1275. vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
  1276. float waterNormalLength = length(overlayWaterMask);
  1277. if (waterNormalLength > 0.95) {
  1278. mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, vnormal);
  1279. vec4 waterOverlayColor = vec4(overlayColor.w > 0.0 ? overlayColorOpaque.xyz/overlayColor.w : vec3(1.0), overlayColor.w);
  1280. vec4 viewPosition = view*vec4(vpos, 1.0);
  1281. vec4 waterColorLinear = getOverlayWaterColor(overlayWaterMask, waterOverlayColor, -normalize(vpos - cameraPosition), shadow, vnormal, tbnMatrix, viewPosition.xyz, vpos + origin);
  1282. vec4 waterColorNonLinear = delinearizeGamma(vec4(waterColorLinear.xyz, 1.0));
  1283. // un-gamma the ground color to mix in linear space
  1284. gl_FragColor = mix(groundColor, waterColorNonLinear, waterColorLinear.w);
  1285. }`:""}
  1286. ${e.screenSizePerspective?m["a"]`
  1287. float perspectiveScale = screenSizePerspectiveScaleFloat(1.0, screenSizeCosAngle, screenSizeDistanceToCamera, screenSizePerspective);
  1288. if (perspectiveScale <= 0.25) {
  1289. gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 0.0, 1.0), perspectiveScale * 4.0);
  1290. }
  1291. else if (perspectiveScale <= 0.5) {
  1292. gl_FragColor = mix(gl_FragColor, vec4(0.0, 0.0, 1.0, 1.0), (perspectiveScale - 0.25) * 4.0);
  1293. }
  1294. else if (perspectiveScale >= 0.99) {
  1295. gl_FragColor = mix(gl_FragColor, vec4(0.0, 1.0, 0.0, 1.0), 0.2);
  1296. }
  1297. else {
  1298. gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 1.0, 1.0), (perspectiveScale - 0.5) * 2.0);
  1299. }`:""}
  1300. ${e.tileBorders?m["a"]`
  1301. vec2 dVuv = fwidth(vuv);
  1302. vec2 edgeFactors = smoothstep(vec2(0.0), 1.5 * dVuv, min(vuv, 1.0 - vuv));
  1303. float edgeFactor = 1.0 - min(edgeFactors.x, edgeFactors.y);
  1304. gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`:""}
  1305. gl_FragColor = highlightSlice(gl_FragColor, vpos);
  1306. }
  1307. `)}return e.output!==i["a"].Depth&&e.output!==i["a"].Shadow||(t.include(a["a"],{linearDepth:!0}),t.include(o["a"],{output:e.output}),t.include(u["a"],e),t.varyings.add("linearDepth","float"),t.vertex.uniforms.add("nearFar","vec2"),t.vertex.code.add(m["a"]`void main(void) {
  1308. vec3 normal = getLocalUp(position, origin);
  1309. vec2 uv = uv0;
  1310. vec3 vpos = applySkirts(uv, position, normal.xyz, skirtScale);
  1311. gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, linearDepth);
  1312. }`),t.fragment.code.add(m["a"]`void main() {
  1313. outputDepth(linearDepth);
  1314. }`)),e.output===i["a"].Normal&&(t.include(a["a"],{linearDepth:!1}),t.include(u["a"],e),t.varyings.add("vnormal","vec3"),t.varyings.add("vpos","vec3"),t.vertex.uniforms.add("viewNormal","mat4"),t.vertex.code.add(m["a"]`void main(void) {
  1315. vec3 normal = getLocalUp(position, origin);
  1316. vec2 uv = uv0;
  1317. vpos = applySkirts(uv, position, normal, skirtScale);
  1318. gl_Position = transformPosition(proj, view, vpos);
  1319. vnormal = normalize((viewNormal * vec4(normal, 1.0)).xyz);
  1320. }`),t.fragment.code.add(m["a"]`void main() {
  1321. vec3 normal = normalize(vnormal);
  1322. if (gl_FrontFacing == false) {
  1323. normal = -normal;
  1324. }
  1325. gl_FragColor = vec4(vec3(0.5) + 0.5 * normal, 0.0);
  1326. }`)),e.output===i["a"].Highlight&&(t.include(a["a"],{linearDepth:!1}),t.include(u["a"],e),t.include(h["a"],{pbrMode:d["a"].Disabled}),t.vertex.code.add(m["a"]`void main() {
  1327. vec3 vnormal = getLocalUp(position, origin);
  1328. vec2 uv = uv0;
  1329. vec3 vpos = applySkirts(uv, position, vnormal, skirtScale);
  1330. setOverlayVTC(uv);
  1331. gl_Position = transformPosition(proj, view, vpos);
  1332. }`),t.include(c["a"]),t.fragment.code.add(m["a"]`void main() {
  1333. vec4 overlayColor = getCombinedOverlayColor();
  1334. if (overlayColor.a == 0.0) {
  1335. gl_FragColor = vec4(0.0);
  1336. return;
  1337. }
  1338. outputHighlight();
  1339. }`)),t}const v=Object.freeze({__proto__:null,build:O})},"579f":function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var i=r("2119"),n=r("3349"),a=r("e431"),s=r("0b2d"),o=r("bd7e");r("7361");function c(e,t,r){const i=Object(n["b"])(e,t),a=Object(n["b"])(t,r),s=Object(n["b"])(r,e),o=(i+a+s)/2,c=o*(o-i)*(o-a)*(o-s);return c<=0?0:Math.sqrt(c)}function l(e,t,r){return Object(a["l"])(u,t,e),Object(a["l"])(d,r,e),Object(a["r"])(Object(a["i"])(u,u,d))/2}new i["a"](o["c"]),new i["a"](()=>({p0:null,p1:null,p2:null}));const u=Object(s["f"])(),d=Object(s["f"])()},"57dc":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("d386")),c=r("09db"),l=r("3af1"),u=r("3760"),d=r("4ae5"),h=r("3723");function p(e){return(t,r)=>null==t?r:null==r?t:e(t,r)}function f(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let b=i=class extends u["a"]{constructor(...e){super(...e),this.points=[],this.type="multipoint"}normalizeCtorArgs(e,t){if(!e&&!t)return null;const r={};Array.isArray(e)?(r.points=e,r.spatialReference=t):f(e)?r.spatialReference=e:(e.points&&(r.points=e.points),e.spatialReference&&(r.spatialReference=e.spatialReference),e.hasZ&&(r.hasZ=e.hasZ),e.hasM&&(r.hasM=e.hasM));const i=r.points&&r.points[0];return i&&(void 0===r.hasZ&&void 0===r.hasM?(r.hasZ=i.length>2,r.hasM=!1):void 0===r.hasZ?r.hasZ=i.length>3:void 0===r.hasM&&(r.hasM=i.length>3)),r}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=this.points;if(!e.length)return null;const t=new l["a"],r=this.hasZ,i=this.hasM,n=r?3:2,a=e[0],s=p(Math.min),o=p(Math.max);let c,u,d,h,[f,b]=a,[m,g]=a;for(let l=0,p=e.length;l<p;l++){const t=e[l],[a,p]=t;if(f=s(f,a),b=s(b,p),m=o(m,a),g=o(g,p),r&&t.length>2){const e=t[2];c=s(c,e),d=o(d,e)}if(i&&t.length>n){const e=t[n];u=s(u,e),h=o(h,e)}}return t.xmin=f,t.ymin=b,t.xmax=m,t.ymax=g,t.spatialReference=this.spatialReference,r?(t.zmin=c,t.zmax=d):(t.zmin=null,t.zmax=null),i?(t.mmin=u,t.mmax=h):(t.mmin=null,t.mmax=null),t}writePoints(e,t){t.points=Object(a["a"])(this.points)}addPoint(e){return Object(h["a"])(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}clone(){const e={points:Object(a["a"])(this.points),spatialReference:this.spatialReference};return this.hasZ&&(e.hasZ=!0),this.hasM&&(e.hasM=!0),new i(e)}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],r={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(r.z=t[2],i=3),this.hasM&&(r.m=t[i]),new d["a"](r)}removePoint(e){if(!this._validateInputs(e))return null;const t=new d["a"](this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?(Object(h["a"])(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};Object(n["a"])([Object(s["b"])({readOnly:!0})],b.prototype,"cache",null),Object(n["a"])([Object(s["b"])()],b.prototype,"extent",null),Object(n["a"])([Object(s["b"])({type:[[Number]],json:{write:{isRequired:!0}}})],b.prototype,"points",void 0),Object(n["a"])([Object(c["a"])("points")],b.prototype,"writePoints",null),b=i=Object(n["a"])([Object(o["a"])("esri.geometry.Multipoint")],b),b.prototype.toJSON.isDefaultToJSON=!0;const m=b},"57e5":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s}));var i=r("32ed");function n(e){return e?e.hasZ?[e.xmax-e.xmin/2,e.ymax-e.ymin/2,e.zmax-e.zmin/2]:[e.xmax-e.xmin/2,e.ymax-e.ymin/2]:null}function a(e){return e?s(e.rings,e.hasZ):null}function s(e,t){if(!e||!e.length)return null;const r=[],i=[],n=t?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let a=0,s=e.length;a<s;a++){const r=o(e[a],t,n);r&&i.push(r)}if(i.sort((e,r)=>{let i=e[2]-r[2];return 0===i&&t&&(i=e[4]-r[4]),i}),i.length&&(r[0]=i[0][0],r[1]=i[0][1],t&&(r[2]=i[0][3]),(r[0]<n[0]||r[0]>n[1]||r[1]<n[2]||r[1]>n[3]||t&&(r[2]<n[4]||r[2]>n[5]))&&(r.length=0)),!r.length){const i=e[0]&&e[0].length?c(e[0],t):null;if(!i)return null;r[0]=i[0],r[1]=i[1],t&&i.length>2&&(r[2]=i[2])}return r}function o(e,t,r){let i=0,n=0,a=0,s=0,o=0;const c=e.length?e[0][0]:0,l=e.length?e[0][1]:0,u=e.length&&t?e[0][2]:0;for(let h=0;h<e.length;h++){const d=e[h],p=e[(h+1)%e.length],[f,b,m]=d,g=f-c,y=b-l,O=t?m-u:void 0,[v,_,j]=p,w=v-c,x=_-l,T=t?j-u:void 0,S=g*x-w*y;if(s+=S,i+=(g+w)*S,n+=(y+x)*S,t&&d.length>2&&p.length>2){const e=g*T-w*O;a+=(O+T)*e,o+=e}f<r[0]&&(r[0]=f),f>r[1]&&(r[1]=f),b<r[2]&&(r[2]=b),b>r[3]&&(r[3]=b),t&&(m<r[4]&&(r[4]=m),m>r[5]&&(r[5]=m))}if(s>0&&(s*=-1),o>0&&(o*=-1),!s)return null;s*=.5,o*=.5;const d=[i/(6*s)+c,n/(6*s)+l,s];return t&&(r[4]===r[5]||0===o?(d[3]=(r[4]+r[5])/2,d[4]=0):(d[3]=a/(6*o)+u,d[4]=o)),d}function c(e,t){const r=t?[0,0,0]:[0,0],n=t?[0,0,0]:[0,0];let a=0,s=0,o=0,c=0;for(let l=0,u=e.length;l<u-1;l++){const u=e[l],d=e[l+1];if(u&&d){r[0]=u[0],r[1]=u[1],n[0]=d[0],n[1]=d[1],t&&u.length>2&&d.length>2&&(r[2]=u[2],n[2]=d[2]);const e=Object(i["b"])(r,n);if(e){a+=e;const r=Object(i["c"])(u,d);s+=e*r[0],o+=e*r[1],t&&r.length>2&&(c+=e*r[2])}}}return a>0?t?[s/a,o/a,c/a]:[s/a,o/a]:e.length?e[0]:null}},5815:function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return O})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return C}));var i=r("b2b2"),n=r("2ab7"),a=r("2ff3"),s=r("8a44"),o=r("f4cc"),c=r("b0ea");class l{constructor(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1}}class u{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let d=0,h=0;const p={time:Object(c["a"])(0),deltaTime:Object(c["a"])(0),elapsedFrameTime:Object(c["a"])(0),frameDuration:Object(c["a"])(0)},f=["prepare","preRender","render","postRender","update","finish"],b=[],m=new s["a"];class g{constructor(e){this._task=e}remove(){this._task.removed=!0}pause(){this._task.paused=!0}resume(){this._task.paused=!1}}const y={frameTasks:m,willDispatch:!1,clearFrameTasks:j,dispatch:A,executeFrameTasks:T};function O(e){const t=new u(e);return b.push(t),y.willDispatch||(y.willDispatch=!0,Object(n["a"])(A)),t}function v(e){const t=new l(e);return m.push(t),null==_&&(d=performance.now(),_=requestAnimationFrame(x)),new g(t)}let _=null;function j(e=!1){m.forAll(e=>{e.removed=!0}),e&&E()}function w(e){h=Math.max(0,e)}function x(){const e=performance.now();_=null,_=m.length>0?requestAnimationFrame(x):null,y.executeFrameTasks(e)}function T(e){const t=Object(c["a"])(e-d);d=e;const r=h>0?h:1e3/60,i=Math.max(0,t-r);for(let n=0;n<f.length;n++){const a=performance.now(),s=f[n];m.forAll(a=>{var o;a.paused||a.removed||(0===n&&a.ticks++,a.phases[s]&&(p.time=e,p.deltaTime=0===a.ticks?Object(c["a"])(0):t,p.elapsedFrameTime=Object(c["a"])(performance.now()-e),p.frameDuration=Object(c["a"])(r-i),null==(o=a.phases[s])||o.call(a,p)))}),R[n].record(performance.now()-a)}E(),M.record(performance.now()-e)}const S=new s["a"];function E(){m.forAll(e=>{e.removed&&S.push(e)}),m.removeUnorderedMany(S.data,S.length),S.clear()}function A(){for(;b.length;){const e=Object(i["c"])(b.shift());e.isActive&&e.callback()}y.willDispatch=!1}function C(e=1,t){const r=Object(o["g"])(),i=()=>{Object(o["n"])(t)?r.reject(Object(o["e"])()):0===e?r():(--e,Object(n["a"])(()=>i()))};return i(),r.promise}const R=f.map(e=>new a["a"](e)),M=new a["a"]("total")},5876:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("caf1"),n=r("3886");function a(e){e.vertex.code.add(n["a"]`
  1340. vec4 decodeSymbolColor(vec4 symbolColor, out int colorMixMode) {
  1341. float symbolAlpha = 0.0;
  1342. const float maxTint = 85.0;
  1343. const float maxReplace = 170.0;
  1344. const float scaleAlpha = 3.0;
  1345. if (symbolColor.a > maxReplace) {
  1346. colorMixMode = ${n["a"].int(i["a"].Multiply)};
  1347. symbolAlpha = scaleAlpha * (symbolColor.a - maxReplace);
  1348. } else if (symbolColor.a > maxTint) {
  1349. colorMixMode = ${n["a"].int(i["a"].Replace)};
  1350. symbolAlpha = scaleAlpha * (symbolColor.a - maxTint);
  1351. } else if (symbolColor.a > 0.0) {
  1352. colorMixMode = ${n["a"].int(i["a"].Tint)};
  1353. symbolAlpha = scaleAlpha * symbolColor.a;
  1354. } else {
  1355. colorMixMode = ${n["a"].int(i["a"].Multiply)};
  1356. symbolAlpha = 0.0;
  1357. }
  1358. return vec4(symbolColor.r, symbolColor.g, symbolColor.b, symbolAlpha);
  1359. }
  1360. `)}},5880:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return h})),r.d(t,"h",(function(){return l}));var i=r("02f1"),n=r("0494");const a={left:0,center:.5,right:1},s={"bottom-left":Object(i["f"])(0,0),bottom:Object(i["f"])(.5,0),"bottom-right":Object(i["f"])(1,0),left:Object(i["f"])(0,.5),center:Object(i["f"])(.5,.5),right:Object(i["f"])(1,.5),"top-left":Object(i["f"])(0,1),top:Object(i["f"])(.5,1),"top-right":Object(i["f"])(1,1)};function o(e){switch(e){case"left":return n["a"].Left;case"right":return n["a"].Right;default:return n["a"].Center}}function c(e){switch(e){case"bottom-left":case"left":case"top-left":return"left";case"bottom":case"center":case"top":return"center";case"bottom-right":case"right":case"top-right":return"right"}}function l(e){switch(e){case"bottom-left":case"bottom":case"bottom-right":return"bottom";case"left":case"center":case"right":return"center";case"top-left":case"top":case"top-right":return"top"}}function u(e,t){switch(t){case"bottom":return"left"===e?"bottom-left":"right"===e?"bottom-right":"bottom";case"center":return e;case"top":return"left"===e?"top-left":"right"===e?"top-right":"top"}}function d(e){return"justify"===e?"center":e}function h(e){return"middle"===e?"center":e}},"58c2":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.fragment.uniforms.add("projInfo","vec4"),e.fragment.uniforms.add("zScale","vec2"),e.fragment.code.add(i["a"]`vec3 reconstructPosition(vec2 fragCoord, float depth) {
  1361. return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
  1362. }`)}},5957:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return d}));var i=r("d791"),n=r("8190"),a=r("1153"),s=r("b7bd");function o(e,t,r,i,n=1){const a=r.typedBuffer,s=r.typedBufferStride,o=e.length;if(i*=s,1===n)for(let c=0;c<o;++c)a[i]=t[e[c]],i+=s;else for(let c=0;c<o;++c){const r=t[e[c]];for(let e=0;e<n;e++)a[i]=r,i+=s}}function c(e,t,r,i){const n=r.typedBuffer,a=r.typedBufferStride,s=e.length;i*=a;for(let o=0;o<s;++o){const r=2*e[o];n[i]=t[r],n[i+1]=t[r+1],i+=a}}function l(e,t,r,i,n){const a=r.typedBuffer,s=r.typedBufferStride,o=e.length;if(i*=s,null==n||1===n)for(let c=0;c<o;++c){const r=3*e[c];a[i]=t[r],a[i+1]=t[r+1],a[i+2]=t[r+2],i+=s}else for(let c=0;c<o;++c){const r=3*e[c];for(let e=0;e<n;++e)a[i]=t[r],a[i+1]=t[r+1],a[i+2]=t[r+2],i+=s}}function u(e,t,r,i,n=1){const a=r.typedBuffer,s=r.typedBufferStride,o=e.length;if(i*=s,1===n)for(let c=0;c<o;++c){const r=4*e[c];a[i]=t[r],a[i+1]=t[r+1],a[i+2]=t[r+2],a[i+3]=t[r+3],i+=s}else for(let c=0;c<o;++c){const r=4*e[c];for(let e=0;e<n;++e)a[i]=t[r],a[i+1]=t[r+1],a[i+2]=t[r+2],a[i+3]=t[r+3],i+=s}}function d(e,t,r,i,n,a=1){if(!r)return void l(e,t,i,n,a);const s=i.typedBuffer,o=i.typedBufferStride,c=e.length,u=r[0],d=r[1],h=r[2],p=r[4],f=r[5],b=r[6],m=r[8],g=r[9],y=r[10],O=r[12],v=r[13],_=r[14];if(n*=o,1===a)for(let l=0;l<c;++l){const r=3*e[l],i=t[r],a=t[r+1],c=t[r+2];s[n]=u*i+p*a+m*c+O,s[n+1]=d*i+f*a+g*c+v,s[n+2]=h*i+b*a+y*c+_,n+=o}else for(let l=0;l<c;++l){const r=3*e[l],i=t[r],c=t[r+1],j=t[r+2],w=u*i+p*c+m*j+O,x=d*i+f*c+g*j+v,T=h*i+b*c+y*j+_;for(let e=0;e<a;++e)s[n]=w,s[n+1]=x,s[n+2]=T,n+=o}}function h(e,t,r,n,a,s=1){if(!r)return void l(e,t,n,a,s);const o=r,c=n.typedBuffer,u=n.typedBufferStride,d=e.length,h=o[0],p=o[1],f=o[2],b=o[4],m=o[5],g=o[6],y=o[8],O=o[9],v=o[10],_=!Object(i["q"])(o),j=1e-6,w=1-j;if(a*=u,1===s)for(let i=0;i<d;++i){const r=3*e[i],n=t[r],s=t[r+1],o=t[r+2];let l=h*n+b*s+y*o,d=p*n+m*s+O*o,x=f*n+g*s+v*o;if(_){const e=l*l+d*d+x*x;if(e<w&&e>j){const t=1/Math.sqrt(e);l*=t,d*=t,x*=t}}c[a+0]=l,c[a+1]=d,c[a+2]=x,a+=u}else for(let i=0;i<d;++i){const r=3*e[i],n=t[r],o=t[r+1],l=t[r+2];let d=h*n+b*o+y*l,x=p*n+m*o+O*l,T=f*n+g*o+v*l;if(_){const e=d*d+x*x+T*T;if(e<w&&e>j){const t=1/Math.sqrt(e);d*=t,x*=t,T*=t}}for(let e=0;e<s;++e)c[a+0]=d,c[a+1]=x,c[a+2]=T,a+=u}}function p(e,t,r,n,a,s=1){if(!r)return void u(e,t,n,a,s);const o=r,c=n.typedBuffer,l=n.typedBufferStride,d=e.length,h=o[0],p=o[1],f=o[2],b=o[4],m=o[5],g=o[6],y=o[8],O=o[9],v=o[10],_=!Object(i["q"])(o),j=1e-6,w=1-j;if(a*=l,1===s)for(let i=0;i<d;++i){const r=4*e[i],n=t[r],s=t[r+1],o=t[r+2],u=t[r+3];let d=h*n+b*s+y*o,x=p*n+m*s+O*o,T=f*n+g*s+v*o;if(_){const e=d*d+x*x+T*T;if(e<w&&e>j){const t=1/Math.sqrt(e);d*=t,x*=t,T*=t}}c[a+0]=d,c[a+1]=x,c[a+2]=T,c[a+3]=u,a+=l}else for(let i=0;i<d;++i){const r=4*e[i],n=t[r],o=t[r+1],u=t[r+2],d=t[r+3];let x=h*n+b*o+y*u,T=p*n+m*o+O*u,S=f*n+g*o+v*u;if(_){const e=x*x+T*T+S*S;if(e<w&&e>j){const t=1/Math.sqrt(e);x*=t,T*=t,S*=t}}for(let e=0;e<s;++e)c[a+0]=x,c[a+1]=T,c[a+2]=S,c[a+3]=d,a+=l}}function f(e,t,r,i,n,a=1){const s=i.typedBuffer,o=i.typedBufferStride,c=e.length;if(n*=o,1===a){if(4===r)for(let l=0;l<c;++l){const r=4*e[l];s[n]=t[r],s[n+1]=t[r+1],s[n+2]=t[r+2],s[n+3]=t[r+3],n+=o}else if(3===r)for(let l=0;l<c;++l){const r=3*e[l];s[n]=t[r],s[n+1]=t[r+1],s[n+2]=t[r+2],s[n+3]=255,n+=o}}else if(4===r)for(let l=0;l<c;++l){const r=4*e[l];for(let e=0;e<a;++e)s[n]=t[r],s[n+1]=t[r+1],s[n+2]=t[r+2],s[n+3]=t[r+3],n+=o}else if(3===r)for(let l=0;l<c;++l){const r=3*e[l];for(let e=0;e<a;++e)s[n]=t[r],s[n+1]=t[r+1],s[n+2]=t[r+2],s[n+3]=255,n+=o}}function b(e,t,r,i,o,l){for(const u of t.fieldNames){const t=e.vertexAttributes.get(u),b=e.indices.get(u);if(t&&b)switch(u){case s["a"].POSITION:{Object(a["a"])(3===t.size);const e=o.getField(u,n["u"]);e&&d(b,t.data,r,e,l);break}case s["a"].NORMAL:{Object(a["a"])(3===t.size);const e=o.getField(u,n["u"]);e&&h(b,t.data,i,e,l);break}case s["a"].UV0:{Object(a["a"])(2===t.size);const e=o.getField(u,n["m"]);e&&c(b,t.data,e,l);break}case s["a"].COLOR:{Object(a["a"])(3===t.size||4===t.size);const e=o.getField(u,n["J"]);e&&f(b,t.data,t.size,e,l);break}case s["a"].SYMBOLCOLOR:{Object(a["a"])(3===t.size||4===t.size);const e=o.getField(u,n["J"]);e&&f(b,t.data,t.size,e,l);break}case s["a"].TANGENT:{Object(a["a"])(4===t.size);const e=o.getField(u,n["C"]);e&&p(b,t.data,i,e,l);break}}}}},5970:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));r("c120");var i=r("4106"),n=r("4338"),a=r("b5a9"),s=r("df3d");const o={key:"type",base:n["a"],typeMap:{range:s["a"],"coded-value":i["a"],inherited:a["a"]}};function c(e){if(!e||!e.type)return null;switch(e.type){case"range":return s["a"].fromJSON(e);case"codedValue":return i["a"].fromJSON(e);case"inherited":return a["a"].fromJSON(e)}return null}},5986:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("fc29"),s=r("a5d8"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386"));let l=i=class extends(Object(s["b"])(a["a"])){constructor(e){super(e),this.active=!1,this.className=null,this.disabled=!1,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new i({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};Object(n["a"])([Object(o["b"])()],l.prototype,"active",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"className",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"disabled",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"id",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"indicator",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"title",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"type",void 0),Object(n["a"])([Object(o["b"])()],l.prototype,"visible",void 0),l=i=Object(n["a"])([Object(c["a"])("esri.support.actions.ActionBase")],l);const u=l},5996:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("7ffa"),o=r("cea0"),c=r("59b2"),l=r("d386"),u=r("09db"),d=r("7f83");let h=i=class extends a["a"]{constructor(e){super(e),this.latestWkid=null,this.wkid=null,this.wkt=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}static fromJSON(e){if(!e)return null;if(e.wkid){if(102100===e.wkid)return i.WebMercator;if(4326===e.wkid)return i.WGS84}const t=new i;return t.read(e),t}normalizeCtorArgs(e){return e&&"object"==typeof e?e:{["string"==typeof e?"wkt":"wkid"]:e}}get isWGS84(){return Object(d["m"])(this)}get isWebMercator(){return Object(d["p"])(this)}get isGeographic(){return Object(d["h"])(this)}get isWrappable(){return Object(d["q"])(this)}writeWkt(e,t){this.wkid||(t.wkt=e)}clone(){if(this===i.WGS84)return i.WGS84;if(this===i.WebMercator)return i.WebMercator;const e=new i;return null!=this.wkid?(e.wkid=this.wkid,null!=this.latestWkid&&(e.latestWkid=this.latestWkid),null!=this.vcsWkid&&(e.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(e.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(e.wkt=this.wkt),this.imageCoordinateSystem&&(e.imageCoordinateSystem=Object(s["a"])(this.imageCoordinateSystem)),e}equals(e){if(null==e)return!1;if(this.imageCoordinateSystem||e.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==e.imageCoordinateSystem)return!1;const{id:t,referenceServiceName:r}=e.imageCoordinateSystem,{geodataXform:i}=e.imageCoordinateSystem,n=this.imageCoordinateSystem;return null==t||i?JSON.stringify(n)===JSON.stringify(e.imageCoordinateSystem):r?n.id===t&&n.referenceServiceName===r:n.id===t}return Object(d["d"])(this,e)}toJSON(e){return this.write(void 0,e)}};h.GCS_NAD_1927=null,h.WGS84=null,h.WebMercator=null,h.PlateCarree=null,Object(n["a"])([Object(c["b"])({readOnly:!0})],h.prototype,"isWGS84",null),Object(n["a"])([Object(c["b"])({readOnly:!0})],h.prototype,"isWebMercator",null),Object(n["a"])([Object(c["b"])({readOnly:!0})],h.prototype,"isGeographic",null),Object(n["a"])([Object(c["b"])({readOnly:!0})],h.prototype,"isWrappable",null),Object(n["a"])([Object(c["b"])({type:o["a"],json:{write:!0}})],h.prototype,"latestWkid",void 0),Object(n["a"])([Object(c["b"])({type:o["a"],json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null===this.wkt}}}}}}})],h.prototype,"wkid",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null===this.wkid}}}}}}})],h.prototype,"wkt",void 0),Object(n["a"])([Object(u["a"])("wkt"),Object(u["a"])("web-scene","wkt")],h.prototype,"writeWkt",null),Object(n["a"])([Object(c["b"])({type:o["a"],json:{write:!0}})],h.prototype,"vcsWkid",void 0),Object(n["a"])([Object(c["b"])({type:o["a"],json:{write:!0}})],h.prototype,"latestVcsWkid",void 0),Object(n["a"])([Object(c["b"])()],h.prototype,"imageCoordinateSystem",void 0),h=i=Object(n["a"])([Object(l["a"])("esri.geometry.SpatialReference")],h),h.prototype.toJSON.isDefaultToJSON=!0,h.GCS_NAD_1927=new h({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'}),h.WGS84=new h(d["b"]),h.WebMercator=new h(d["c"]),h.PlateCarree=new h(d["a"]),Object.freeze&&(Object.freeze(h.GCS_NAD_1927),Object.freeze(h.WGS84),Object.freeze(h.WebMercator));const p=h},"59b2":function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return l}));var i=r("e92d"),n=r("cea0"),a=r("9d9d"),s=r("7af8"),o=r("2dd4");function c(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(t,r),l=Object(s["b"])(t,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in e&&i["a"].getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),l.value=e.value=c.value)),null!=e.readOnly&&(l.readOnly=e.readOnly);const h=e.aliasOf;if(h){const e="string"==typeof h?h:h.source,t="string"==typeof h?null:!0===h.overridable;let i;l.dependsOn=[e],l.get=function(){let t=Object(a["b"])(this,e);if("function"==typeof t){i||(i=e.split(".").slice(0,-1).join("."));const r=Object(a["b"])(this,i);r&&(t=t.bind(r))}return t},l.readOnly||(l.set=t?function(e){void 0!==e?this._override(r,e):this._clearOverride(r)}:function(t){Object(o["a"])(this,e,t)})}const p=e.type,f=e.types;l.cast||(p?l.cast=u(p):f&&(Array.isArray(f)?l.cast=Object(n["c"])(Object(n["k"])(f[0])):l.cast=Object(n["k"])(f))),e.range&&(l.cast=d(l.cast,e.range)),Object(s["c"])(l,e)}}function l(e,t,r){const i=Object(s["b"])(e,r);i.json||(i.json={});let n=i.json;return void 0!==t&&(n.origins||(n.origins={}),n.origins[t]||(n.origins[t]={}),n=n.origins[t]),n}function u(e){let t=0,r=e;if(Object(n["n"])(e))return Object(n["f"])(e);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],t++;const i=r;if(Object(n["o"])(i))return 0===t?Object(n["j"])(i):Object(n["h"])(Object(n["j"])(i),t);if(1===t)return Object(n["b"])(i);if(t>1)return Object(n["g"])(i,t);const a=e;return a.from?a.from:Object(n["m"])(a)}function d(e,t){return r=>{let i=+e(r);return null!=t.step&&(i=Math.round(i/t.step)*t.step),null!=t.min&&(i=Math.max(t.min,i)),null!=t.max&&(i=Math.min(t.max,i)),i}}},"5a22":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i=r("b2b2"),n=r("d791"),a=r("afe1"),s=r("e431"),o=r("0b2d"),c=r("f895"),l=r("680b"),u=r("b7c2"),d=r("003f"),h=r("2765"),p=r("697e"),f=r("bea9"),b=r("1153"),m=r("b623");class g extends d["a"]{constructor(e={}){super(),this.type=h["a"].Object,this._geometryRecords=new Array,this._geometries=new Array,this._objectTransformation=Object(a["d"])(),this._bvObjectSpace=new O,this._bvWorldSpace=new O,this._bvDirty=!0,this._hasVolatileTransformation=!1,this._visible=!0,this.castShadow=null==e.castShadow||e.castShadow,this.metadata=e.metadata,this.metadata&&this.metadata.isElevationSource&&(this.metadata.lastValidElevationBB=new y),this.transformation=Object(a["d"])();const{geometries:t,materials:r,transformations:i,origins:n}=e;if(Array.isArray(t)){Object(b["a"])(r.length===t.length,"Object3D: materials don't match geometries"),Object(b["a"])(i.length===t.length,"Object3D: transformations don't match geometries"),this._geometryRecords.length=t.length,this._geometries.length=t.length;for(let e=0;e<t.length;e++)this._geometries[e]=t[e],this._geometryRecords[e]=p["a"].pool.acquire(t[e],r[e],Object(a["c"])(i[e]),{highlights:null,occludees:null,visible:this._visible},n&&n[e])}}get geometryRecords(){return this._geometryRecords}get geometries(){return this._geometries}get transformation(){return this._objectTransformation}set transformation(e){Object(n["d"])(this._objectTransformation,e),this._invalidateBoundingVolume(),this._emit("objectTransformation",this)}dispose(){this._geometryRecords.length=0,this._geometries.length=0}get parentLayer(){return this._parentLayer}set parentLayer(e){Object(b["a"])(null==this._parentLayer||null==e,"Object3D can only be added to a single Layer"),this._parentLayer=e}addGeometry(e,t,r,n,s){r=r||a["a"],this._geometries.push(e);const o=p["a"].pool.acquire(e,t,r,{highlights:null,occludees:null,visible:this._visible},n,s);return this._geometryRecords.push(o),this._hasVolatileTransformation=this._hasVolatileTransformation||Object(i["k"])(o.shaderTransformation),this._emit("objectGeometryAdded",{object:this,record:o}),this._invalidateBoundingVolume(),o}removeGeometry(e){const t=this._geometryRecords.splice(e,1)[0];return this._hasVolatileTransformation=Object(i["k"])(t.shaderTransformation)?this._geometryRecords.some(e=>Object(i["k"])(e.shaderTransformation)):this._hasVolatileTransformation,t.dispose(),this._geometries.splice(e,1),this._emit("objectGeometryRemoved",{object:this,record:t}),this._invalidateBoundingVolume(),t}removeAllGeometries(){for(;this.geometryRecords.length>0;)this.removeGeometry(0)}geometryVertexAttrsUpdated(e){this._emit("vertexAttrsUpdated",{object:this,record:e}),this._invalidateBoundingVolume()}get isVisible(){return this._visible}setVisible(e){if(this._visible!==e){this._visible=e;for(const e of this._geometryRecords)e.instanceParameters.visible=this._visible;this._emit("visibilityChanged",this)}}maskOccludee(){const e=new f["a"](u["f"].MaskOccludee);for(const t of this._geometryRecords)t.instanceParameters.occludees=Object(m["a"])(t.instanceParameters.occludees,e);return this._emit("occlusionChanged",this),e}removeOcclude(e){for(const t of this._geometryRecords)t.instanceParameters.occludees=Object(m["e"])(t.instanceParameters.occludees,e);this._emit("occlusionChanged",this)}highlight(){const e=new f["a"](u["f"].Highlight);for(const t of this._geometryRecords)t.instanceParameters.highlights=Object(m["a"])(t.instanceParameters.highlights,e);return this._emit("highlightChanged",this),e}removeHighlight(e){for(const t of this._geometryRecords)t.instanceParameters.highlights=Object(m["e"])(t.instanceParameters.highlights,e);this._emit("highlightChanged",this)}getCombinedStaticTransformation(e,t){return Object(n["n"])(Object(i["u"])(t,Object(a["d"])()),this.transformation,e.getStaticTransformation())}_getCombinedShaderTransformation(e,t){return t=t||Object(a["d"])(),Object(n["n"])(t,this.transformation,e.getShaderTransformation()),t}hasVolativeTransformation(){return this._hasVolatileTransformation}get boundingVolumeWorldSpace(){return this._validateBoundingVolume(),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._validateBoundingVolume(),this._bvObjectSpace}_validateBoundingVolume(){if(!this._bvDirty&&!this._hasVolatileTransformation)return;this._bvObjectSpace.init(),this._bvWorldSpace.init();for(let n=0;n<this._geometryRecords.length;++n){const e=this._geometries[n],t=this._geometryRecords[n],r=e.boundingInfo;Object(i["k"])(r)&&(this._calculateTransformedBoundingVolume(r,this._bvObjectSpace,t.getShaderTransformation()),this._calculateTransformedBoundingVolume(r,this._bvWorldSpace,this._getCombinedShaderTransformation(t)))}Object(s["k"])(this._bvObjectSpace.bounds,this._bvObjectSpace.min,this._bvObjectSpace.max,.5),Object(s["k"])(this._bvWorldSpace.bounds,this._bvWorldSpace.min,this._bvWorldSpace.max,.5);const e=Object(o["f"])(),t=Object(o["f"])(),r=Object(l["i"])(this.transformation);for(let n=0;n<this._geometryRecords.length;++n){const a=this._geometries[n].boundingInfo;if(Object(i["j"])(a))continue;const o=this._geometryRecords[n].getShaderTransformation(),c=Object(l["i"])(o);Object(s["s"])(e,a.getCenter(),o);const u=Object(s["o"])(e,this._bvObjectSpace.bounds),d=a.getBSRadius()*c;this._bvObjectSpace.bounds[3]=Math.max(this._bvObjectSpace.bounds[3],u+d),Object(s["s"])(t,e,this.transformation);const h=Object(s["o"])(t,this._bvWorldSpace.bounds),p=d*r;this._bvWorldSpace.bounds[3]=Math.max(this._bvWorldSpace.bounds[3],h+p)}this._bvDirty=!1}_calculateTransformedBoundingVolume(e,t,r){const i=e.getBBMin(),n=e.getBBMax(),a=Object(o["d"])(i),c=Object(o["d"])(n);Object(s["s"])(a,a,r),Object(s["s"])(c,c,r);for(let s=0;s<3;++s)t.min[s]=Math.min(t.min[s],a[s],c[s]),t.max[s]=Math.max(t.max[s],a[s],c[s]);for(let o=0;o<3;++o){Object(s["m"])(a,i),Object(s["m"])(c,n),a[o]=n[o],c[o]=i[o],Object(s["s"])(a,a,r),Object(s["s"])(c,c,r);for(let e=0;e<3;++e)t.min[e]=Math.min(t.min[e],a[e],c[e]),t.max[e]=Math.max(t.max[e],a[e],c[e])}}_invalidateBoundingVolume(){this._bvDirty=!0,Object(i["k"])(this._parentLayer)&&this._parentLayer.notifyObjectBBChanged(this,this._bvWorldSpace.bounds)}_emit(e,t){Object(i["k"])(this._parentLayer)&&this._parentLayer.events.emit(e,t)}get test(){const e=this;return{hasGeometry:t=>e._geometries.indexOf(t)>-1,getGeometryIndex:t=>e._geometries.indexOf(t)}}}class y{constructor(){this.min=Object(o["h"])(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this.max=Object(o["h"])(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE)}isEmpty(){return this.max[0]<this.min[0]&&this.max[1]<this.min[1]&&this.max[2]<this.min[2]}}class O extends y{constructor(){super(...arguments),this.bounds=Object(c["c"])()}init(){Object(s["y"])(this.min,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),Object(s["y"])(this.max,-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),Object(c["a"])(this.bounds)}}},"5a61":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0")),c=r("448d"),l=r("d386");let u=i=class extends a["a"]{constructor(e){super(e),this.type="map-layer"}clone(){const{mapLayerId:e,gdbVersion:t}=this;return new i({mapLayerId:e,gdbVersion:t})}};Object(n["a"])([Object(c["a"])({mapLayer:"map-layer"})],u.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:o["a"],json:{write:!0}})],u.prototype,"mapLayerId",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],u.prototype,"gdbVersion",void 0),u=i=Object(n["a"])([Object(l["a"])("esri.layers.support.source.MapLayerSource")],u)},"5a62":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386"));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&o(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return Object(i["a"])([Object(n["b"])({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),Object(i["a"])([Object(n["b"])({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),Object(i["a"])([Object(n["b"])({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=Object(i["a"])([Object(a["a"])("esri.layers.mixins.ScaleRangeLayer")],t),t};function o(e,t){return e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale,e}},"5ab2":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var i=r("e6c2");const n={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let a=e=>Object(i["c"])(n,e),s={create:(e,t)=>(t=a(t),Object(i["a"])(e,document.createElement("div"),void 0,t),Object(i["b"])(e,t)),append:(e,t,r)=>(r=a(r),Object(i["a"])(t,e,void 0,r),Object(i["b"])(t,r)),insertBefore:(e,t,r)=>(r=a(r),Object(i["a"])(t,e.parentNode,e,r),Object(i["b"])(t,r)),merge:(e,t,r)=>(r=a(r),t.domNode=e,Object(i["d"])(e,t,r),Object(i["b"])(t,r)),replace:(e,t,r)=>(r=a(r),Object(i["a"])(t,e.parentNode,e,r),e.parentNode.removeChild(e),Object(i["b"])(t,r))}},"5b83":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("d611");let c=i=class extends o["a"]{constructor(){super(...arguments),this.showLegend=null}clone(){return new i({title:this.title,showLegend:this.showLegend})}};Object(n["a"])([Object(a["b"])({type:Boolean,json:{write:!0}})],c.prototype,"showLegend",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],c);const l=c},"5bd5":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return er}));var i=r("a4ee"),n=r("4856"),a=(r("b423"),r("261a"),r("b48d"),r("478c"),r("667b"),r("ff57")),s=r("da00"),o=r("f976"),c=r("5cdb"),l=r("2eab"),u=r("1fd7"),d=r("d3ac"),h=r("2c4f"),p=r("ce50"),f=r("af40"),b=r("c120"),m=r("fa8a"),g=r("e92d"),y=r("b2b2"),O=r("e694"),v=r("9d1d"),_=r("f4cc");async function j(e,t){const{WhereClause:i}=await r.e("chunk-2d0d03a7").then(r.bind(null,"66a2"));return i.create(e,t)}var w,x=r("e041"),T=r("59b2"),S=(r("b50f"),r("1a3e")),E=r("afcf"),A=r("d386"),C=r("09db"),R=r("0b86"),M=r("6a0ed"),P=r("7ffa"),I=r("cea0");let D=w=class extends M["a"]{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new w({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],D.prototype,"expression",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],D.prototype,"name",void 0),Object(i["a"])([Object(T["b"])({type:["boolean","date","number","string"],json:{write:!0}})],D.prototype,"returnType",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],D.prototype,"title",void 0),D=w=Object(i["a"])([Object(A["a"])("esri.form.ExpressionInfo")],D);const L=D;let N=class extends M["a"]{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],N.prototype,"description",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],N.prototype,"label",void 0),Object(i["a"])([Object(T["b"])()],N.prototype,"type",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],N.prototype,"visibilityExpression",void 0),N=Object(i["a"])([Object(A["a"])("esri.form.elements.Element")],N);const F=N;var k;let U=k=class extends M["a"]{constructor(e){super(e),this.type=null}clone(){return new k({type:this.type})}};Object(i["a"])([Object(T["b"])({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],U.prototype,"type",void 0),U=k=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.AttachmentInput")],U);const z=U;var B;let V=B=class extends F{constructor(e){super(e),this.attachmentKeyword=null,this.editable=!0,this.input=null,this.type="attachment"}clone(){return new B({attachmentKeyword:this.attachmentKeyword,description:this.description,editable:this.editable,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],V.prototype,"attachmentKeyword",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{write:!0}})],V.prototype,"editable",void 0),Object(i["a"])([Object(T["b"])({type:z,json:{read:{source:"inputType"},write:{target:"inputType"}}})],V.prototype,"input",void 0),Object(i["a"])([Object(T["b"])({type:["attachment"],json:{read:!1,write:!0}})],V.prototype,"type",void 0),V=B=Object(i["a"])([Object(A["a"])("esri.form.elements.AttachmentElement")],V);const G=V;let H=class extends M["a"]{constructor(e){super(e),this.type=null}};Object(i["a"])([Object(T["b"])()],H.prototype,"type",void 0),H=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.Input")],H);const q=H;let W=class extends q{constructor(e){super(e),this.maxLength=null,this.minLength=0}};Object(i["a"])([Object(T["b"])({type:Number,json:{write:!0}})],W.prototype,"maxLength",void 0),Object(i["a"])([Object(T["b"])({type:Number,json:{write:!0}})],W.prototype,"minLength",void 0),W=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.TextInput")],W);const $=W;var Z;let X=Z=class extends ${constructor(e){super(e),this.type="barcode-scanner"}clone(){return new Z({maxLength:this.maxLength,minLength:this.minLength})}};Object(i["a"])([Object(T["b"])({type:["barcode-scanner"],json:{read:!1,write:!0}})],X.prototype,"type",void 0),X=Z=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.BarcodeScannerInput")],X);const Y=X;var J;let Q=J=class extends q{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!1,this.type="combo-box"}clone(){return new J({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],Q.prototype,"noValueOptionLabel",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{write:!0}})],Q.prototype,"showNoValueOption",void 0),Object(i["a"])([Object(T["b"])({type:["combo-box"],json:{read:!1,write:!0}})],Q.prototype,"type",void 0),Q=J=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.ComboBoxInput")],Q);const K=Q;var ee;function te(e){return null!=e?new Date(e):null}function re(e){return e?e.getTime():null}let ie=ee=class extends q{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return te(t.max)}writeMax(e,t){t.max=re(e)}readMin(e,t){return te(t.min)}writeMin(e,t){t.min=re(e)}clone(){return new ee({includeTime:this.includeTime,max:this.max,min:this.min,type:this.type})}};Object(i["a"])([Object(T["b"])({type:Boolean,json:{write:!0}})],ie.prototype,"includeTime",void 0),Object(i["a"])([Object(T["b"])({type:Date,json:{type:Number,write:!0}})],ie.prototype,"max",void 0),Object(i["a"])([Object(E["a"])("max")],ie.prototype,"readMax",null),Object(i["a"])([Object(C["a"])("max")],ie.prototype,"writeMax",null),Object(i["a"])([Object(T["b"])({type:Date,json:{type:Number,write:!0}})],ie.prototype,"min",void 0),Object(i["a"])([Object(E["a"])("min")],ie.prototype,"readMin",null),Object(i["a"])([Object(C["a"])("min")],ie.prototype,"writeMin",null),Object(i["a"])([Object(T["b"])({type:["datetime-picker"],json:{read:!1,write:!0}})],ie.prototype,"type",void 0),ie=ee=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.DateTimePickerInput")],ie);const ne=ie;var ae;let se=ae=class extends q{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!1,this.type="radio-buttons"}clone(){return new ae({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],se.prototype,"noValueOptionLabel",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{write:!0}})],se.prototype,"showNoValueOption",void 0),Object(i["a"])([Object(T["b"])({type:["radio-buttons"],json:{read:!1,write:!0}})],se.prototype,"type",void 0),se=ae=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.RadioButtonsInput")],se);const oe=se;var ce;let le=ce=class extends q{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new ce({offValue:this.offValue,onValue:this.onValue})}};Object(i["a"])([Object(T["b"])({type:[String,Number],json:{write:!0}})],le.prototype,"offValue",void 0),Object(i["a"])([Object(T["b"])({type:[String,Number],json:{write:!0}})],le.prototype,"onValue",void 0),Object(i["a"])([Object(T["b"])({type:["switch"],json:{read:!1,write:!0}})],le.prototype,"type",void 0),le=ce=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.SwitchInput")],le);const ue=le;var de;let he=de=class extends ${constructor(e){super(e),this.type="text-area"}clone(){return new de({maxLength:this.maxLength,minLength:this.minLength})}};Object(i["a"])([Object(T["b"])({type:["text-area"],json:{read:!1,write:!0}})],he.prototype,"type",void 0),he=de=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.TextAreaInput")],he);const pe=he;var fe;let be=fe=class extends ${constructor(e){super(e),this.type="text-box"}clone(){return new fe({maxLength:this.maxLength,minLength:this.minLength})}};Object(i["a"])([Object(T["b"])({type:["text-box"],json:{read:!1,write:!0}})],be.prototype,"type",void 0),be=fe=Object(i["a"])([Object(A["a"])("esri.form.elements.inputs.TextBoxInput")],be);const me=be,ge={base:q,key:"type",typeMap:{"barcode-scanner":Y,"combo-box":K,"datetime-picker":ne,"radio-buttons":oe,switch:ue,"text-area":pe,"text-box":me}};var ye,Oe=r("5970");let ve=ye=class extends F{constructor(e){super(e),this.domain=null,this.editable=!0,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new ye({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};Object(i["a"])([Object(T["b"])({types:Oe["b"],json:{read:{reader:Oe["a"]},write:!0}})],ve.prototype,"domain",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{write:!0}})],ve.prototype,"editable",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],ve.prototype,"editableExpression",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],ve.prototype,"fieldName",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],ve.prototype,"hint",void 0),Object(i["a"])([Object(T["b"])({types:ge,json:{read:{source:"inputType"},write:{target:"inputType"}}})],ve.prototype,"input",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],ve.prototype,"requiredExpression",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{read:!1,write:!0}})],ve.prototype,"type",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],ve.prototype,"valueExpression",void 0),ve=ye=Object(i["a"])([Object(A["a"])("esri.form.elements.FieldElement")],ve);const _e=ve;var je,we=r("a2e5");let xe=je=class extends F{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editable=!0,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new je({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editable:this.editable,label:this.label,orderByFields:Object(P["a"])(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};Object(i["a"])([Object(T["b"])({type:Number,json:{write:!0}})],xe.prototype,"displayCount",void 0),Object(i["a"])([Object(T["b"])({type:["list"],json:{write:!0}})],xe.prototype,"displayType",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{write:!0}})],xe.prototype,"editable",void 0),Object(i["a"])([Object(T["b"])({type:[we["a"]],json:{write:!0}})],xe.prototype,"orderByFields",void 0),Object(i["a"])([Object(T["b"])({type:Number,json:{write:!0}})],xe.prototype,"relationshipId",void 0),Object(i["a"])([Object(T["b"])({type:["relationship"],json:{read:!1,write:!0}})],xe.prototype,"type",void 0),xe=je=Object(i["a"])([Object(A["a"])("esri.form.elements.RelationshipElement")],xe);const Te=xe;function Se(e){return{typesWithGroup:{base:F,key:"type",typeMap:{attachment:G,field:_e,group:e,relationship:Te}},typesWithoutGroup:{base:F,key:"type",typeMap:{attachment:G,field:_e,relationship:Te}}}}function Ee(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter(e=>i[e.type]).map(e=>i[e.type].fromJSON(e))}function Ae(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter(e=>i[e.type]).map(e=>e.toJSON())}function Ce(e,t,r=!0){return e?e.map(e=>Object(I["k"])(r?t.typesWithGroup:t.typesWithoutGroup,e)):null}var Re;let Me=Re=class extends F{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return Ce(e,Pe,!1)}readElements(e,t){return Ee(t.formElements,Pe,!1)}writeElements(e,t){t.formElements=Ae(e,Pe,!1)}clone(){return new Re({description:this.description,elements:Object(P["a"])(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};Object(i["a"])([Object(T["b"])({json:{write:!0}})],Me.prototype,"elements",void 0),Object(i["a"])([Object(S["a"])("elements")],Me.prototype,"castElements",null),Object(i["a"])([Object(E["a"])("elements",["formElements"])],Me.prototype,"readElements",null),Object(i["a"])([Object(C["a"])("elements")],Me.prototype,"writeElements",null),Object(i["a"])([Object(T["b"])({type:["collapsed","expanded"],json:{write:!0}})],Me.prototype,"initialState",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{read:!1,write:!0}})],Me.prototype,"type",void 0),Me=Re=Object(i["a"])([Object(A["a"])("esri.form.elements.GroupElement")],Me);const Pe=Se(Me),Ie=Me;var De;const Le=Se(Ie);let Ne=De=class extends M["a"]{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.title=null}castElements(e){return Ce(e,Le)}readElements(e,t){return Ee(t.formElements,Le)}writeElements(e,t){t.formElements=Ae(e,Le)}clone(){return new De({description:this.description,expressionInfos:Object(P["a"])(this.expressionInfos),elements:Object(P["a"])(this.elements),title:this.title})}};Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],Ne.prototype,"description",void 0),Object(i["a"])([Object(T["b"])({json:{write:!0}})],Ne.prototype,"elements",void 0),Object(i["a"])([Object(S["a"])("elements")],Ne.prototype,"castElements",null),Object(i["a"])([Object(E["a"])("elements",["formElements"])],Ne.prototype,"readElements",null),Object(i["a"])([Object(C["a"])("elements")],Ne.prototype,"writeElements",null),Object(i["a"])([Object(T["b"])({type:[L],json:{write:!0}})],Ne.prototype,"expressionInfos",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{write:!0}})],Ne.prototype,"title",void 0),Ne=De=Object(i["a"])([Object(A["a"])("esri.form.FormTemplate")],Ne);const Fe=Ne;var ke=r("3af1"),Ue=r("e64d"),ze=r("5996"),Be=r("a6a3"),Ve=(r("e06a"),r("8d60")),Ge=r("9096"),He=r("6d5f"),qe=r("fab3"),We=r("dfa0"),$e=r("cbf3"),Ze=r("003a"),Xe=r("e87c"),Ye=r("2edc"),Je=r("1219"),Qe=r("74e2");let Ke=0;const et=g["a"].getLogger("esri.layers.graphics.sources.MemorySource");let tt=class extends(He["a"].LoadableMixin(Object(qe["b"])(Object(Ge["b"])(h["a"])))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=Object(y["k"])(e)?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){var e;null==(e=this._connection)||e.close(),this._connection=null}get workerGeometryType(){var e;const t=null==(e=this.layer)?void 0:e.geometryType;return t?this._geometryTypeRequiresClientGraphicMapping(t)?"polygon":t:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);Object(Xe["a"])(e,this.layer.spatialReference,r);const i=Ye["default"].fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const n=this.layer.objectIdField;for(const a of i.features){const e=a.attributes[n],t=this._idToClientGraphic.get(e);t&&(a.geometry=t.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new p["a"]("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return Object(Xe["a"])(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:ke["a"].fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async _applyEdits(e){if(!this._connection)throw new p["a"]("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],n=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const a=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const l of e.deleteFeatures){const e=a(l);null!=e&&i.push(e)}const s=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const l of e.updateFeatures)if(n.push(this._serializeFeature(l)),s){const e=a(l);null!=e&&s.set(e,l)}Object(Ze["a"])(r?r.features:null,n,this.layer.spatialReference);const{fullExtent:o,featureEditResults:c}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:n,deletes:i});return this.fullExtent=o,r&&r.finish(c.uidToObjectId),this._updateClientGraphicIds(s,c),this._createEditsResult(c)}async _prepareClientMapping(e,t){if("mesh"!==this.layerOrSourceGeometryType||Object(y["j"])(e))return;const r=[];for(const{geometry:i}of e)!Object(y["k"])(i)||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new p["a"]("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let a=0;a<e.length;a++){const n=e[a],s=this._serializeFeature(n);!i&&Object(y["k"])(n.geometry)&&(i=n.geometry.type),r[a]=s,t.set(""+s.uid,n)}const n=this;return{features:r,inferredGeometryType:i,finish(e){const r=n.sourceJSON.objectIdField;for(const i in e){const a=e[i],s=t.get(i);s&&(s.attributes||(s.attributes={}),-1===a?delete s.attributes[r]:s.attributes[r]=a,n._addIdToClientGraphic(s))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get layerOrSourceGeometryType(){var e,t,r;return null!=(e=null==(t=this.layer)?void 0:t.geometryType)?e:null==(r=this.sourceJSON)?void 0:r.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this.layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(Ke++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return Object(y["j"])(t)?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?Je["a"].fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await Object(We["b"])("MemorySourceWorker",{strategy:Object(b["a"])("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:n,hasZ:a,timeInfo:s}=this.layer,o="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const c=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",e=>{et.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const l={features:c.features,fields:t&&t.map(e=>e.toJSON()),geometryType:Qe["c"].toJSON(this.workerGeometryType),hasM:"mesh"!==this.layerOrSourceGeometryType&&n,hasZ:"mesh"===this.layerOrSourceGeometryType||a,objectIdField:i,spatialReference:o?null:r&&r.toJSON(),timeInfo:s?s.toJSON():null},u=await this._connection.invoke("load",l,{signal:e});for(const h of u.warnings)et.warn(h.message,{layer:this.layer,warning:h});u.featureErrors.length&&et.warn(`Encountered ${u.featureErrors.length} validation errors while loading features`,u.featureErrors);const d=u.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(c.inferredGeometryType)&&(d.geometryType=Qe["c"].toJSON(c.inferredGeometryType)),this.sourceJSON=d,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),c.finish(u.assignedObjectIds)}};Object(i["a"])([Object($e["a"])({Type:Ve["a"],ensureType:Object(I["m"])(Ve["a"])})],tt.prototype,"itemType",void 0),Object(i["a"])([Object(T["b"])()],tt.prototype,"type",void 0),Object(i["a"])([Object(T["b"])({constructOnly:!0})],tt.prototype,"layer",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0})],tt.prototype,"workerGeometryType",null),Object(i["a"])([Object(T["b"])()],tt.prototype,"sourceJSON",void 0),tt=Object(i["a"])([Object(A["a"])("esri.layers.graphics.sources.MemorySource")],tt);const rt=tt;var it,nt=r("f46e"),at=r("3d59"),st=r("997b"),ot=r("8b28"),ct=r("662d"),lt=r("b911"),ut=r("d9fd"),dt=r("0db5"),ht=r("8e17"),pt=r("5a62"),ft=r("601a"),bt=r("54b4"),mt=r("22f4");let gt=it=class extends M["a"]{constructor(e){super(e)}clone(){const{name:e,fields:t,isAscending:r,isUnique:i,description:n}=this;return new it({name:e,fields:t,isAscending:r,isUnique:i,description:n})}};Object(i["a"])([Object(T["b"])({constructOnly:!0})],gt.prototype,"name",void 0),Object(i["a"])([Object(T["b"])({constructOnly:!0})],gt.prototype,"fields",void 0),Object(i["a"])([Object(T["b"])({constructOnly:!0})],gt.prototype,"isAscending",void 0),Object(i["a"])([Object(T["b"])({constructOnly:!0})],gt.prototype,"isUnique",void 0),Object(i["a"])([Object(T["b"])({constructOnly:!0})],gt.prototype,"description",void 0),gt=it=Object(i["a"])([Object(A["a"])("esri.layers.support.FeatureIndex")],gt);var yt=r("05b7"),Ot=r("ace4"),vt=r("a2b1"),_t=r("2feb"),jt=r("c1da"),wt=r("8048");let xt=class extends(Object(d["a"])(M["a"])){constructor(e){super(e),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};Object(i["a"])([Object(T["b"])({type:String,json:{read:{source:"shapeAreaFieldName"}}})],xt.prototype,"shapeAreaField",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{read:{source:"shapeLengthFieldName"}}})],xt.prototype,"shapeLengthField",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{read:e=>wt["a"].read(e)||wt["m"].read(e)}})],xt.prototype,"units",void 0),xt=Object(i["a"])([Object(A["a"])("esri.layers.support.GeometryFieldsInfo")],xt);const Tt=xt;var St=r("c246"),Et=r("10eb"),At=r("00c5");const Ct=new m["a"]({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),Rt=new m["a"]({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let Mt=class extends(Object(d["a"])(M["a"])){constructor(e){super(e),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};Object(i["a"])([Object(T["b"])({json:{read:Ct.read,write:Ct.write}})],Mt.prototype,"cardinality",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"composite",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"id",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"keyField",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"keyFieldInRelationshipTable",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"name",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"relatedTableId",void 0),Object(i["a"])([Object(T["b"])({json:{read:!0,write:!0}})],Mt.prototype,"relationshipTableId",void 0),Object(i["a"])([Object(T["b"])({json:{read:Rt.read,write:Rt.write}})],Mt.prototype,"role",void 0),Mt=Object(i["a"])([Object(A["a"])("esri.layers.support.Relationship")],Mt);const Pt=Mt;var It=r("f806"),Dt=r("2546"),Lt=r("624c"),Nt=r("60ec"),Ft=r("ebb2"),kt=r("69dd"),Ut=r("b742"),zt=r("7949"),Bt=r("f51b");const Vt=new m["a"]({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),Gt={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},Ht="FeatureLayer",qt=g["a"].getLogger("esri.layers.FeatureLayer");function Wt(e){return e&&e instanceof h["a"]}function $t(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function Zt(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function Xt(e){var t;const r=null==e||null==(t=e.supportedSpatialAggregationStatistics)?void 0:t.map(e=>e.toLowerCase());return{envelope:!(null==r||!r.includes("envelopeaggregate")),centroid:!(null==r||!r.includes("centroidaggregate")),convexHull:!(null==r||!r.includes("convexhullaggregate"))}}const Yt=Object(_t["a"])();function Jt(e,t,r){const i=!(null==r||!r.writeLayerSchema);return{enabled:i,ignoreOrigin:i}}let Qt=class extends(Object(ct["a"])(Object(st["a"])(Object(ut["a"])(Object(ft["a"])(Object(pt["a"])(Object(ht["a"])(Object(at["a"])(Object(lt["a"])(Object(dt["a"])(Object(O["a"])(Object(ot["a"])(Object(nt["a"])(Object(d["a"])(Be["a"])))))))))))))){constructor(...e){super(...e),this._handles=new f["a"],this.capabilities=null,this.charts=null,this.copyright=null,this.datesInUnknownTimezone=!1,this.displayField=null,this.definitionExpression=null,this.dynamicDataSource=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.formTemplate=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.layerId=void 0,this.legendEnabled=!0,this.minScale=0,this.maxScale=0,this.globalIdField=null,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.returnM=void 0,this.returnZ=void 0,this.screenSizePerspectiveEnabled=!0,this.serviceDefinitionExpression=null,this.spatialReference=ze["a"].WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.trackIdField=null,this.type="feature",this.typeIdField=null,this.types=null,this.indexes=new(h["a"].ofType(gt)),this.userIsAdmin=!1,this.version=void 0,this.visible=!0}destroy(){var e;null==(e=this.source)||e.destroy(),this._handles=Object(y["d"])(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=Object(y["k"])(e)?e.signal:null;if(this.portalItem&&this.portalItem.loaded&&this.source)return void this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this._initLayerProperties(e)));const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(_["u"]).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p["a"]("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this._initLayerProperties(await this.createGraphicsSource(t))}).then(()=>this.finishLoadEditablePortalLayer(e));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,{attachment:this._readAttachmentCapabilities(t.attachmentProperties),data:this._readDataCapabilities(t),metadata:this._readMetadataCapabilities(t),operations:this._readOperationsCapabilities(t.capabilities||e,t),query:this._readQueryCapabilities(t),queryRelated:this._readQueryRelatedCapabilities(t),editing:this._readEditingCapabilities(t)}}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")||0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){null!=e?this._override("editingEnabled",e):this._clearOverride("editingEnabled")}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}readIsTable(e,t){return"Table"===(t=t&&t.layerDefinition||t).type||!t.geometryType}writeIsTable(e,t,r,i){null!=i&&i.writeLayerSchema&&Object(v["c"])(r,e?"Table":"Feature Layer",t)}readMinScale(e,t){return t.effectiveMinScale||e||0}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeGlobalID"===r.type)return r.name}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeOID"===r.type)return r.name}get parsedUrl(){const e=this.url?Object(x["M"])(this.url):null;return null!=e&&(null!=this.dynamicDataSource?e.path=Object(x["B"])(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=Object(x["B"])(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Object(jt["k"])(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){const i=(t=t.layerDefinition||t).drawingInfo&&t.drawingInfo.renderer||void 0;if(i){const e=Object(o["b"])(i,t,r)||void 0;return e||qt.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}if(t.defaultSymbol)return t.types&&t.types.length?new s["a"]({defaultSymbol:Kt(t.defaultSymbol,t,r),field:t.typeIdField,uniqueValueInfos:t.types.map(e=>({id:e.id,symbol:Kt(e.symbol,e,r)}))}):new a["a"]({symbol:Kt(t.defaultSymbol,t,r)})}set source(e){const t=this._get("source");t!==e&&(Wt(t)&&this._resetMemorySource(t),Wt(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof h["a"]?new rt({layer:this,items:e}):e:null}readSource(e,t){const r=Ye["default"].fromJSON(t.featureSet);return new rt({layer:this,items:r&&r.features||[]})}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,n=r&&r.editorField;return e=e&&e.map(e=>Ot["a"].fromJSON(e)),this._fixTemplates(e,i),this._fixTemplates(e,n),e}readTitle(e,t){const r=t.layerDefinition&&t.layerDefinition.name||t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?Object(bt["i"])(this.url,r):r;let t=r;if(!t&&this.url){const e=Object(bt["e"])(this.url);Object(y["k"])(e)&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),Object(bt["a"])(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,n=r&&r.editorField;return e&&e.map(e=>(e=vt["a"].fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,n),e))}set url(e){const t=Object(bt["h"])({layer:this,url:e,nonStandardUrlAllowed:!0,logger:qt});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){Object(bt["j"])(this,e,null,t,i)}readVersion(e,t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}addAttachment(e,t){return this.load().then(()=>this._checkAttachmentSupport(e)).then(()=>{if(!("addAttachment"in this.source))throw new p["a"](Ht,"Layer source does not support addAttachment capability");return this.source.addAttachment(e,t)})}updateAttachment(e,t,r){return this.load().then(()=>this._checkAttachmentSupport(e)).then(()=>{if(!("updateAttachment"in this.source))throw new p["a"](Ht,"Layer source does not support updateAttachment capability");return this.source.updateAttachment(e,t,r)})}async applyEdits(e,t){const i=await r.e("chunk-2d0a4c1e").then(r.bind(null,"0899"));return await this.load(),i.applyEdits(this,this.source,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return Object(Bt["a"])(this,e)}async createGraphicsSource(e){if(this._hasMemorySource())return this.source.load({signal:e});const{default:t}=await Object(_["z"])(r.e("chunk-6c40627a").then(r.bind(null,"0e50")),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=new kt["a"],t=this.get("capabilities.data"),r=this.get("capabilities.query");e.dynamicDataSource=this.dynamicDataSource,e.historicMoment=this.historicMoment,e.gdbVersion=this.gdbVersion,e.returnGeometry=!0,r&&(e.compactGeometryEnabled=r.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference),t&&(t.supportsZ&&null!=this.returnZ&&(e.returnZ=this.returnZ),t.supportsM&&null!=this.returnM&&(e.returnM=this.returnM)),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:i,timeExtent:n}=this;return e.timeExtent=null!=i&&null!=n?n.offset(-i.value,i.unit):n||null,e.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null,e}deleteAttachments(e,t){return this.load().then(()=>this._checkAttachmentSupport(e)).then(()=>{if(!("deleteAttachments"in this.source))throw new p["a"](Ht,"Layer source does not support deleteAttachments capability");return this.source.deleteAttachments(e,t)})}fetchRecomputedExtents(e){return this.load({signal:null==e?void 0:e.signal}).then(()=>{if(this.source.fetchRecomputedExtents)return this.source.fetchRecomputedExtents(e);throw new p["a"](Ht,"Layer source does not support fetchUpdates capability")})}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let n=null;return r.some(e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(n=e),!!n)}),n}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}queryAttachments(e,t){return e=Ft["a"].from(e),this.load().then(()=>{if(!this.get("capabilities.data.supportsAttachment"))throw new p["a"](Ht,"this layer doesn't support attachments");const{attachmentTypes:t,objectIds:r,globalIds:i,num:n,size:a,start:s,where:o}=e;if(!this.get("capabilities.operations.supportsQueryAttachments")){const c=r&&r.length>1,l=t&&t.length,u=i&&i.length,d=a&&a.length;if(c||l||u||d||n||s||o)throw new p["a"](Ht,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",e)}if(!(r&&r.length||o))throw new p["a"](Ht,"'objectIds' or 'where' are required to perform attachment query",e);if(!("queryAttachments"in this.source))throw new p["a"](Ht,"Layer source does not support queryAttachments capability",e);return this.source.queryAttachments(e)})}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(kt["a"].from(e)||this.createQuery(),t)).then(e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e})}queryObjectIds(e,t){return this.load().then(()=>{if(this.source.queryObjectIds)return this.source.queryObjectIds(kt["a"].from(e)||this.createQuery(),t);throw new p["a"](Ht,"Layer source does not support queryObjectIds capability")})}queryFeatureCount(e,t){return this.load().then(()=>{if(this.source.queryFeatureCount)return this.source.queryFeatureCount(kt["a"].from(e)||this.createQuery(),t);throw new p["a"](Ht,"Layer source does not support queryFeatureCount capability")})}queryExtent(e,t){return this.load().then(()=>{if(this.source.queryExtent)return this.source.queryExtent(kt["a"].from(e)||this.createQuery(),t);throw new p["a"](Ht,"Layer source does not support queryExtent capability")})}queryRelatedFeatures(e,t){return this.load().then(()=>{if("queryRelatedFeatures"in this.source)return this.source.queryRelatedFeatures(Ut["a"].from(e),t);throw new p["a"](Ht,"Layer source does not support queryRelatedFeatures capability")})}queryRelatedFeaturesCount(e,t){return this.load().then(()=>{if("queryRelatedFeaturesCount"in this.source)return this.source.queryRelatedFeaturesCount(Ut["a"].from(e),t);throw new p["a"](Ht,"Layer source does not support queryRelatedFeaturesCount capability")})}queryTopFeatures(e,t){return this.load().then(()=>{if("queryTopFeatures"in this.source&&this.get("capabilities.query.supportsTopFeaturesQuery"))return this.source.queryTopFeatures(zt["a"].from(e),t).then(e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e});throw new p["a"](Ht,"Layer source does not support queryTopFeatures capability")})}queryTopObjectIds(e,t){return this.load().then(()=>{if("queryTopObjectIds"in this.source&&this.get("capabilities.query.supportsTopFeaturesQuery"))return this.source.queryTopObjectIds(zt["a"].from(e),t);throw new p["a"](Ht,"Layer source does not support queryTopObjectIds capability")})}queryTopFeaturesExtent(e,t){return this.load().then(()=>{if("queryTopExtents"in this.source&&this.get("capabilities.query.supportsTopFeaturesQuery"))return this.source.queryTopExtents(zt["a"].from(e),t);throw new p["a"](Ht,"Layer source does not support queryTopExtents capability")})}queryTopFeatureCount(e,t){return this.load().then(()=>{if("queryTopCount"in this.source&&this.get("capabilities.query.supportsTopFeaturesQuery"))return this.source.queryTopCount(zt["a"].from(e),t);throw new p["a"](Ht,"Layer source does not support queryFeatureCount capability")})}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&this.revert(["objectIdField","fields","timeInfo","spatialReference"],"service")}write(e,t){var r,i;const n=(t={...t,writeLayerSchema:null!=(r=null==(i=t)?void 0:i.writeLayerSchema)?r:this._hasMemorySource()}).origin,a=t.layerContainerType,s=t.messages;if(this.isTable){if("web-scene"===n||"web-map"===n&&"tables"!==a)return s&&s.push(new p["a"]("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Table source cannot be written to web scenes and web maps`,{layer:this})),null;if(this._hasMemorySource())return s&&s.push(new p["a"]("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using an in-memory Table source cannot be written to web scenes and web maps`,{layer:this})),null}else if(this.loaded&&"web-map"===n&&"tables"===a)return s&&s.push(new p["a"]("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a non-table source cannot be written to tables in web maps`,{layer:this})),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new p["a"](Ht,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source.type||Object(Dt["a"])(this,e))}_readEditingEnabled(e,t,r){var i;let n=null==(i=e.layerDefinition)?void 0:i.capabilities;return n?this._hasEditingCapability(n):(n=e.capabilities,t&&"web-map"===(null==r?void 0:r.origin)&&!this._hasMemorySource()&&n?this._hasEditingCapability(n):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){var n,a;const e=null!=(n=this.capabilities)&&null!=(a=n.operations)&&a.supportsSync?"Query,Sync":"Query";Object(v["c"])("layerDefinition.capabilities",e,t),!r||null!=i&&i.writeLayerSchema||(t.capabilities=e)}}_checkAttachmentSupport(e){const{attributes:t}=e,{objectIdField:r}=this;return this.get("capabilities.data.supportsAttachment")?e?t?t[r]?void 0:Promise.reject(new p["a"](Ht,"feature is missing the identifying attribute "+r)):Promise.reject(new p["a"](Ht,"'attributes' are required on a feature to query attachments")):Promise.reject(new p["a"](Ht,"A feature is required to add/delete/update attachments")):Promise.reject(new p["a"](Ht,"this layer doesn't support attachments"))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return Object(l["default"])(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0})}async _initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Object(jt["k"])(this.renderer,this.fieldsIndex),Object(jt["l"])(this.timeInfo,this.fieldsIndex),Object(Nt["a"])(this,{origin:"service"})}async hasDataChanged(){var e;if(null!=(e=this.source)&&e.refresh)try{var t;const{dataChanged:e,updates:r}=await(null==(t=this.source)?void 0:t.refresh());if(Object(y["k"])(r)&&(this.sourceJSON={...this.sourceJSON,...r},this.read(r,{origin:"service",url:this.parsedUrl})),e)return!0}catch{}if(this.definitionExpression)try{return(await j(this.definitionExpression,this.fieldsIndex)).hasDateFunctions}catch{}return!1}_verifyFields(){const e=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields&&this.fields.some((function(e){return"geometry"===e.type}))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p["a"]("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p["a"]("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this._handles.add([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}_readAttachmentCapabilities(e){const t={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1};return e&&Array.isArray(e)&&e.forEach(e=>{const r=Gt[e.name];r&&(t[r]=!!e.isEnabled)}),t}_readDataCapabilities(e){return{isVersioned:$t(e,"isDataVersioned",!1),supportsAttachment:$t(e,"hasAttachments",!1),supportsM:$t(e,"hasM",!1),supportsZ:$t(e,"hasZ",!1)}}_readMetadataCapabilities(e){return{supportsAdvancedFieldProperties:$t(e,"supportsFieldDescriptionProperty",!1)}}_readOperationsCapabilities(e,t){const r=e?e.toLowerCase().split(",").map(e=>e.trim()):[],i=r.includes("editing")&&!t.datesInUnknownTimezone;let n=i&&r.includes("create"),a=i&&r.includes("delete"),s=i&&r.includes("update");const o=r.includes("changetracking");return i&&!(n||a||s)&&(n=a=s=!0),{supportsCalculate:$t(t,"supportsCalculate",!1),supportsTruncate:$t(t,"supportsTruncate",!1),supportsValidateSql:$t(t,"supportsValidateSql",!1),supportsAdd:n,supportsDelete:a,supportsEditing:i,supportsChangeTracking:o,supportsQuery:r.includes("query"),supportsQueryAttachments:$t(t.advancedQueryCapabilities,"supportsQueryAttachments",!1),supportsResizeAttachments:$t(t,"supportsAttachmentsResizing",!1),supportsSync:r.includes("sync"),supportsUpdate:s,supportsExceedsLimitStatistics:$t(t,"supportsExceedsLimitStatistics",!1)}}_readQueryCapabilities(e){var t;const r=e.advancedQueryCapabilities,i=e.ownershipBasedAccessControlForFeatures,n=e.archivingInfo,a=null==(t=this.url)?void 0:t.includes("MapServer"),s=!Object(b["a"])("mapserver-pbf-enabled")&&a&&this.version<10.81,o=Object(bt["c"])(this.url),c=(e.supportedQueryFormats||"").split(",").reduce((e,t)=>{const r=t.toLowerCase().trim();return r&&e.add(r),e},new Set);return{supportsStatistics:$t(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:$t(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:$t(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:Xt(r),supportsCentroid:$t(r,"supportsReturningGeometryCentroid",!1),supportsDistance:$t(r,"supportsQueryWithDistance",!1),supportsDistinct:$t(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:$t(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:$t(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:$t(r,"supportsHavingClause",!1),supportsOrderBy:$t(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:$t(r,"supportsPagination",!1),supportsQuantization:$t(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:$t(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:$t(e,"supportsReturningQueryGeometry",!1),supportsResultType:$t(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:$t(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:$t(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:$t(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:$t(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:$t(i,"allowOthersToQuery",!0),supportsHistoricMoment:$t(n,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!s&&c.has("pbf"),supportsDisjointSpatialRelationship:$t(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:$t(r,"supportsQueryWithCacheHint",!1),supportsDefaultSpatialReference:$t(r,"supportsDefaultSR",!1),supportsCompactGeometry:o,maxRecordCountFactor:Zt(e,"maxRecordCountFactor",void 0),maxRecordCount:Zt(e,"maxRecordCount",void 0),standardMaxRecordCount:Zt(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:Zt(e,"tileMaxRecordCount",void 0)}}_readQueryRelatedCapabilities(e){const t=e.advancedQueryCapabilities,r=$t(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:$t(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r}}_readEditingCapabilities(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:$t(e,"allowGeometryUpdates",!0),supportsGlobalId:$t(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:$t(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:$t(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:$t(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:$t(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:$t(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:$t(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:$t(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:$t(t,"allowOthersToUpdate",!0)}}};Object(i["a"])([Object(T["b"])({readOnly:!0,json:{read:!1}})],Qt.prototype,"capabilities",void 0),Object(i["a"])([Object(E["a"])("service","capabilities",["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"])],Qt.prototype,"readCapabilities",null),Object(i["a"])([Object(T["b"])({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Qt.prototype,"charts",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"createQueryVersion",null),Object(i["a"])([Object(T["b"])({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],Qt.prototype,"copyright",void 0),Object(i["a"])([Object(T["b"])({type:Boolean})],Qt.prototype,"datesInUnknownTimezone",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],Qt.prototype,"displayField",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Qt.prototype,"definitionExpression",void 0),Object(i["a"])([Object(T["b"])({types:u["e"],readOnly:!0})],Qt.prototype,"defaultSymbol",void 0),Object(i["a"])([Object(T["b"])({type:Lt["a"]})],Qt.prototype,"dynamicDataSource",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"editFieldsInfo",void 0),Object(i["a"])([Object(T["b"])({type:Boolean})],Qt.prototype,"editingEnabled",null),Object(i["a"])([Object(E["a"])(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Qt.prototype,"readEditingEnabled",null),Object(i["a"])([Object(E["a"])("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Qt.prototype,"readEditingEnabledFromWebMap",null),Object(i["a"])([Object(C["a"])(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Qt.prototype,"writeEditingEnabled",null),Object(i["a"])([Object(C["a"])("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Qt.prototype,"writeEditingEnabledToWebMap",null),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"editingInfo",void 0),Object(i["a"])([Object(E["a"])("editingInfo")],Qt.prototype,"readEditingInfo",null),Object(i["a"])([Object(T["b"])(mt["b"])],Qt.prototype,"elevationInfo",void 0),Object(i["a"])([Object(T["b"])(yt["a"])],Qt.prototype,"featureReduction",void 0),Object(i["a"])([Object(T["b"])({...Yt.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Jt}}}}})],Qt.prototype,"fields",void 0),Object(i["a"])([Object(T["b"])(Yt.fieldsIndex)],Qt.prototype,"fieldsIndex",void 0),Object(i["a"])([Object(T["b"])({type:At["a"],json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Qt.prototype,"floorInfo",void 0),Object(i["a"])([Object(T["b"])({type:Fe,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Qt.prototype,"formTemplate",void 0),Object(i["a"])([Object(T["b"])({type:ke["a"],json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],Qt.prototype,"fullExtent",void 0),Object(i["a"])([Object(T["b"])()],Qt.prototype,"gdbVersion",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0,type:Tt,json:{read:{source:"geometryProperties"}}})],Qt.prototype,"geometryFieldsInfo",void 0),Object(i["a"])([Object(T["b"])({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:Vt.read},"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Jt,writer(e,t,r){const i=e?Vt.toJSON(e):null;i&&Object(v["c"])(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Vt.read}}})],Qt.prototype,"geometryType",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],Qt.prototype,"hasM",void 0),Object(i["a"])([Object(T["b"])({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],Qt.prototype,"hasZ",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0,type:Ue["a"]})],Qt.prototype,"heightModelInfo",void 0),Object(i["a"])([Object(T["b"])({type:Date})],Qt.prototype,"historicMoment",void 0),Object(i["a"])([Object(T["b"])(mt["c"])],Qt.prototype,"id",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Qt.prototype,"infoFor3D",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0,json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Qt.prototype,"isTable",void 0),Object(i["a"])([Object(E["a"])("service","isTable",["type","geometryType"]),Object(E["a"])("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Qt.prototype,"readIsTable",null),Object(i["a"])([Object(C["a"])("web-map","isTable")],Qt.prototype,"writeIsTable",null),Object(i["a"])([Object(T["b"])(mt["d"])],Qt.prototype,"labelsVisible",void 0),Object(i["a"])([Object(T["b"])({type:[St["a"]],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:Et["a"]},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:Et["a"]},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],Qt.prototype,"labelingInfo",void 0),Object(i["a"])([Object(T["b"])(mt["i"])],Qt.prototype,"opacity",void 0),Object(i["a"])([Object(T["b"])({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],Qt.prototype,"layerId",void 0),Object(i["a"])([Object(T["b"])(mt["e"])],Qt.prototype,"legendEnabled",void 0),Object(i["a"])([Object(T["b"])({type:["show","hide"]})],Qt.prototype,"listMode",void 0),Object(i["a"])([Object(T["b"])(mt["g"])],Qt.prototype,"minScale",void 0),Object(i["a"])([Object(E["a"])("service","minScale",["minScale","effectiveMinScale"])],Qt.prototype,"readMinScale",null),Object(i["a"])([Object(T["b"])(mt["f"])],Qt.prototype,"maxScale",void 0),Object(i["a"])([Object(E["a"])("service","maxScale",["maxScale","effectiveMaxScale"])],Qt.prototype,"readMaxScale",null),Object(i["a"])([Object(T["b"])({type:String})],Qt.prototype,"globalIdField",void 0),Object(i["a"])([Object(E["a"])("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),Object(E["a"])("service","globalIdField",["globalIdField","fields"])],Qt.prototype,"readGlobalIdFieldFromService",null),Object(i["a"])([Object(T["b"])({type:String,json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Jt}}}}})],Qt.prototype,"objectIdField",void 0),Object(i["a"])([Object(E["a"])("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),Object(E["a"])("service","objectIdField",["objectIdField","fields"])],Qt.prototype,"readObjectIdFieldFromService",null),Object(i["a"])([Object(T["b"])({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Qt.prototype,"operationalLayerType",void 0),Object(i["a"])([Object(T["b"])(Yt.outFields)],Qt.prototype,"outFields",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"parsedUrl",null),Object(i["a"])([Object(T["b"])({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Qt.prototype,"path",void 0),Object(i["a"])([Object(T["b"])(mt["j"])],Qt.prototype,"popupEnabled",void 0),Object(i["a"])([Object(T["b"])({type:n["a"],json:{name:"popupInfo",write:!0}})],Qt.prototype,"popupTemplate",void 0),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"defaultPopupTemplate",null),Object(i["a"])([Object(T["b"])({type:[Pt],readOnly:!0})],Qt.prototype,"relationships",void 0),Object(i["a"])([Object(T["b"])({types:c["a"],json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:c["b"],name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:null==r?void 0:r.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:null==r?void 0:r.writeLayerSchema})}}})],Qt.prototype,"renderer",null),Object(i["a"])([Object(E["a"])("service","renderer",["drawingInfo.renderer","defaultSymbol"]),Object(E["a"])("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Qt.prototype,"readRenderer",null),Object(i["a"])([Object(T["b"])()],Qt.prototype,"sourceJSON",void 0),Object(i["a"])([Object(T["b"])({type:Boolean})],Qt.prototype,"returnM",void 0),Object(i["a"])([Object(T["b"])({type:Boolean})],Qt.prototype,"returnZ",void 0),Object(i["a"])([Object(T["b"])(mt["m"])],Qt.prototype,"screenSizePerspectiveEnabled",void 0),Object(i["a"])([Object(T["b"])({clonable:!1})],Qt.prototype,"source",null),Object(i["a"])([Object(S["a"])("source")],Qt.prototype,"castSource",null),Object(i["a"])([Object(E["a"])("portal-item","source",["featureSet"]),Object(E["a"])("web-map","source",["featureSet"])],Qt.prototype,"readSource",null),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"serviceDefinitionExpression",void 0),Object(i["a"])([Object(E["a"])("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Qt.prototype,"readServiceDefinitionExpression",null),Object(i["a"])([Object(T["b"])({type:ze["a"],json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],Qt.prototype,"spatialReference",void 0),Object(i["a"])([Object(T["b"])({type:Number})],Qt.prototype,"subtypeCode",void 0),Object(i["a"])([Object(T["b"])({type:[Ot["a"]]})],Qt.prototype,"templates",void 0),Object(i["a"])([Object(E["a"])("templates",["editFieldsInfo","creatorField","editorField","templates"])],Qt.prototype,"readTemplates",null),Object(i["a"])([Object(T["b"])({type:It["a"]})],Qt.prototype,"timeInfo",void 0),Object(i["a"])([Object(T["b"])()],Qt.prototype,"title",void 0),Object(i["a"])([Object(E["a"])("service","title",["name"]),Object(E["a"])("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Qt.prototype,"readTitle",null),Object(i["a"])([Object(E["a"])("web-map","title",["layerDefinition.name","title"])],Qt.prototype,"readTitleFromWebMap",null),Object(i["a"])([Object(T["b"])({type:String})],Qt.prototype,"sublayerTitleMode",void 0),Object(i["a"])([Object(T["b"])({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Qt.prototype,"trackIdField",void 0),Object(i["a"])([Object(T["b"])({json:{read:!1}})],Qt.prototype,"type",void 0),Object(i["a"])([Object(T["b"])({type:String})],Qt.prototype,"typeIdField",void 0),Object(i["a"])([Object(E["a"])("service","typeIdField"),Object(E["a"])("typeIdField",["layerDefinition.typeIdField"])],Qt.prototype,"readTypeIdField",null),Object(i["a"])([Object(T["b"])({type:[vt["a"]]})],Qt.prototype,"types",void 0),Object(i["a"])([Object(E["a"])("service","types",["types"]),Object(E["a"])("types",["layerDefinition.types"])],Qt.prototype,"readTypes",null),Object(i["a"])([Object(T["b"])({readOnly:!0,json:{write:!1}})],Qt.prototype,"serverGens",void 0),Object(i["a"])([Object(T["b"])({type:h["a"].ofType(gt),readOnly:!0})],Qt.prototype,"indexes",void 0),Object(i["a"])([Object(T["b"])(mt["n"])],Qt.prototype,"url",null),Object(i["a"])([Object(C["a"])("url")],Qt.prototype,"writeUrl",null),Object(i["a"])([Object(T["b"])({readOnly:!0})],Qt.prototype,"userIsAdmin",void 0),Object(i["a"])([Object(T["b"])({json:{origins:{service:{read:!0}},read:!1}})],Qt.prototype,"version",void 0),Object(i["a"])([Object(E["a"])("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Qt.prototype,"readVersion",null),Object(i["a"])([Object(T["b"])({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Qt.prototype,"visible",void 0),Object(i["a"])([Object(E["a"])("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Qt.prototype,"readVisible",null),Qt=Object(i["a"])([Object(A["a"])("esri.layers.FeatureLayer")],Qt);const Kt=Object(R["b"])({types:u["i"]}),er=Qt},"5c00":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var i=r("9ef0"),n=r("a915"),a=r("cea0"),s=r("42be");function o(e,t){const r=null!=t.transparency?Object(s["b"])(t.transparency):1,n=t.color;return n&&Array.isArray(n)?new i["a"]([n[0]||0,n[1]||0,n[2]||0,r]):null}function c(e,t){t.color=e.toJSON().slice(0,3);const r=Object(s["a"])(e.a);0!==r&&(t.transparency=r)}const l={type:i["a"],json:{type:[a["a"]],default:null,read:{source:["color","transparency"],reader:o},write:{target:{color:{type:[a["a"]]},transparency:{type:a["a"]}},writer:c}}},u={type:Number,cast:n["j"],json:{write:!0}}},"5c33":function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var i=r("b2b2"),n=r("6be6"),a=r("7a91"),s=r("a978"),o=r("1942");function c(e){return Object(s["c"])(e)&&e.intersector===o["b"].LOD&&!!e.target}function l(e,t){return Object(s["b"])(e)||Object(s["a"])(e)?p(e.target.object.metadata,t):Object(a["b"])(e)?null==(r=t.map)?void 0:r.ground:Object(n["b"])(e)||Object(n["a"])(e)||Object(a["a"])(e)?p(e.target,t):null;var r}function u(e,t){return Object(s["b"])(e)||Object(s["a"])(e)?d(e.target.object.metadata,t):Object(n["b"])(e)?e.target.createGraphic():Object(a["a"])(e)||c(e)?d(e.target,t):Object(n["a"])(e)?h(e.target,t):null}function d(e,t){if(Object(i["j"])(e)||Object(i["j"])(e.graphicUid))return null;const r=p(e,t);if(Object(i["j"])(r))return null;if(r===t.graphics)return Object(i["k"])(t.graphicsView)?t.graphicsView.getGraphicFromGraphicUid(e.graphicUid):null;const n=t.allLayerViews.find(e=>e.layer===r);return n&&!n.suspended&&"getGraphicFromGraphicUid"in n&&Object(i["k"])(e.graphicUid)?n.getGraphicFromGraphicUid(e.graphicUid):null}function h(e,t){const r=p(e,t);if(Object(i["j"])(r))return null;const n=t.allLayerViews.find(e=>e.layer===r);return n&&!n.suspended&&"getGraphicFromIntersectorTarget"in n?n.getGraphicFromIntersectorTarget(e):null}function p(e,t){return Object(i["j"])(e.layerUid)?null:Object(i["k"])(t.graphicsView)&&e.layerUid===t.graphicsView.processor.layer.id?t.graphics:t.map.findLayerByUid(e.layerUid)}},"5cdb":function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return d}));var i=r("b423"),n=r("261a"),a=r("b48d"),s=r("478c"),o=r("667b"),c=r("ff57"),l=r("da00");const u={key:"type",base:o["a"],typeMap:{heatmap:s["a"],simple:c["a"],"unique-value":l["a"],"class-breaks":i["a"],"dot-density":a["a"],dictionary:n["a"]},errorContext:"renderer"},d={key:"type",base:o["a"],typeMap:{simple:c["a"],"unique-value":l["a"],"class-breaks":i["a"]},errorContext:"renderer"}},"5d07":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("3886"),n=r("ee2c"),a=r("b3a9");function s(e,t){const r=e.vertex;switch(e.include(a["a"],t),Object(n["c"])(t)&&r.uniforms.add("strokesAmplitude","float"),t.mode){case n["b"].SOLID:r.code.add(i["a"]`float calculateLineAmplitude(UnpackedAttributes unpackedAttributes) {
  1363. return 0.0;
  1364. }`);break;case n["b"].SKETCH:r.code.add(i["a"]`float calculateLineAmplitude(UnpackedAttributes unpackedAttributes) {
  1365. return strokesAmplitude;
  1366. }`);break;case n["b"].MIXED:r.code.add(i["a"]`float calculateLineAmplitude(UnpackedAttributes unpackedAttributes) {
  1367. float type = unpackedAttributes.type;
  1368. if (type <= 0.0) {
  1369. return strokesAmplitude;
  1370. }
  1371. else {
  1372. return 0.0;
  1373. }
  1374. }`)}}},"5d5f":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("3886");function n(e){const t=e.fragment.code;t.add(i["a"]`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG)
  1375. {
  1376. return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
  1377. }`),t.add(i["a"]`float integratedRadiance(float cosTheta2, float roughness)
  1378. {
  1379. return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
  1380. }`),t.add(i["a"]`vec3 evaluateSpecularIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float RdotNG, float roughness)
  1381. {
  1382. float cosTheta2 = 1.0 - RdotNG * RdotNG;
  1383. float intRadTheta = integratedRadiance(cosTheta2, roughness);
  1384. float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
  1385. float sky = 2.0 - ground;
  1386. return (ground * ambientGround + sky * ambientSky) * 0.5;
  1387. }`)}var a=r("a7d7"),s=r("c51b");function o(e,t){const r=e.fragment.code;e.include(s["a"]),t.pbrMode===a["a"].Water||t.pbrMode===a["a"].WaterOnIntegratedMesh?(r.add(i["a"]`
  1388. struct PBRShadingWater
  1389. {
  1390. float NdotL; // cos angle between normal and light direction
  1391. float NdotV; // cos angle between normal and view direction
  1392. float NdotH; // cos angle between normal and half vector
  1393. float VdotH; // cos angle between view direction and half vector
  1394. float LdotH; // cos angle between light direction and half vector
  1395. float VdotN; // cos angle between view direction and normal vector
  1396. };
  1397. float dtrExponent = ${t.useCustomDTRExponentForWater?"2.2":"2.0"};
  1398. `),r.add(i["a"]`vec3 fresnelReflection(float angle, vec3 f0, float f90) {
  1399. return f0 + (f90 - f0) * pow(1.0 - angle, 5.0);
  1400. }`),r.add(i["a"]`float normalDistributionWater(float NdotH, float roughness)
  1401. {
  1402. float r2 = roughness * roughness;
  1403. float NdotH2 = NdotH * NdotH;
  1404. float denom = pow((NdotH2 * (r2 - 1.0) + 1.0), dtrExponent) * PI;
  1405. return r2 / denom;
  1406. }`),r.add(i["a"]`float geometricOcclusionKelemen(float LoH)
  1407. {
  1408. return 0.25 / (LoH * LoH);
  1409. }`),r.add(i["a"]`vec3 brdfSpecularWater(in PBRShadingWater props, float roughness, vec3 F0, float F0Max)
  1410. {
  1411. vec3 F = fresnelReflection(props.VdotH, F0, F0Max);
  1412. float dSun = normalDistributionWater(props.NdotH, roughness);
  1413. float V = geometricOcclusionKelemen(props.LdotH);
  1414. float diffusionSunHaze = mix(roughness + 0.045, roughness + 0.385, 1.0 - props.VdotH);
  1415. float strengthSunHaze = 1.2;
  1416. float dSunHaze = normalDistributionWater(props.NdotH, diffusionSunHaze)*strengthSunHaze;
  1417. return ((dSun + dSunHaze) * V) * F;
  1418. }
  1419. vec3 tonemapACES(const vec3 x) {
  1420. return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
  1421. }`)):t.pbrMode!==a["a"].Normal&&t.pbrMode!==a["a"].Schematic||(e.include(n),r.add(i["a"]`struct PBRShadingInfo
  1422. {
  1423. float NdotL;
  1424. float NdotV;
  1425. float NdotH;
  1426. float VdotH;
  1427. float LdotH;
  1428. float NdotNG;
  1429. float RdotNG;
  1430. float NdotAmbDir;
  1431. float NdotH_Horizon;
  1432. vec3 skyRadianceToSurface;
  1433. vec3 groundRadianceToSurface;
  1434. vec3 skyIrradianceToSurface;
  1435. vec3 groundIrradianceToSurface;
  1436. float averageAmbientRadiance;
  1437. float ssao;
  1438. vec3 albedoLinear;
  1439. vec3 f0;
  1440. vec3 f90;
  1441. vec3 diffuseColor;
  1442. float metalness;
  1443. float roughness;
  1444. };`),r.add(i["a"]`float normalDistribution(float NdotH, float roughness)
  1445. {
  1446. float a = NdotH * roughness;
  1447. float b = roughness / (1.0 - NdotH * NdotH + a * a);
  1448. return b * b * INV_PI;
  1449. }`),r.add(i["a"]`const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
  1450. const vec4 c1 = vec4( 1.0, 0.0425, 1.040, -0.040);
  1451. const vec2 c2 = vec2(-1.04, 1.04);
  1452. vec2 prefilteredDFGAnalytical(float roughness, float NdotV) {
  1453. vec4 r = roughness * c0 + c1;
  1454. float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y;
  1455. return c2 * a004 + r.zw;
  1456. }`),r.add(i["a"]`vec3 evaluateEnvironmentIllumination(PBRShadingInfo inputs) {
  1457. vec3 indirectDiffuse = evaluateDiffuseIlluminationHemisphere(inputs.groundIrradianceToSurface, inputs.skyIrradianceToSurface, inputs.NdotNG);
  1458. vec3 indirectSpecular = evaluateSpecularIlluminationHemisphere(inputs.groundRadianceToSurface, inputs.skyRadianceToSurface, inputs.RdotNG, inputs.roughness);
  1459. vec3 diffuseComponent = inputs.diffuseColor * indirectDiffuse * INV_PI;
  1460. vec2 dfg = prefilteredDFGAnalytical(inputs.roughness, inputs.NdotV);
  1461. vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
  1462. vec3 specularComponent = specularColor * indirectSpecular;
  1463. return (diffuseComponent + specularComponent);
  1464. }`),r.add(i["a"]`float gamutMapChanel(float x, vec2 p){
  1465. return (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) );
  1466. }`),r.add(i["a"]`vec3 blackLevelSoftCompression(vec3 inColor, PBRShadingInfo inputs){
  1467. vec3 outColor;
  1468. vec2 p = vec2(0.02 * (inputs.averageAmbientRadiance), 0.0075 * (inputs.averageAmbientRadiance));
  1469. outColor.x = gamutMapChanel(inColor.x, p) ;
  1470. outColor.y = gamutMapChanel(inColor.y, p) ;
  1471. outColor.z = gamutMapChanel(inColor.z, p) ;
  1472. return outColor;
  1473. }`))}},"5dd5":function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i=r("a4ee"),n=r("fa8a"),a=r("6a0ed"),s=r("e92d"),o=r("59b2"),c=(r("b50f"),r("c120"),r("1a3e")),l=r("d386"),u=r("cea0"),d=r("5b83");const h=s["a"].getLogger("esri.renderers.visualVariables.VisualVariable"),p=new n["a"]({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let f=class extends a["a"]{constructor(e){super(e),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(e){return null==e?e:"function"==typeof e?(h.error(".field: field must be a string value"),null):Object(u["l"])(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};Object(i["a"])([Object(o["b"])()],f.prototype,"index",void 0),Object(i["a"])([Object(o["b"])({type:p.apiValues,readOnly:!0,json:{read:p.read,write:p.write}})],f.prototype,"type",void 0),Object(i["a"])([Object(o["b"])({type:String,json:{write:!0}})],f.prototype,"field",void 0),Object(i["a"])([Object(c["a"])("field")],f.prototype,"castField",null),Object(i["a"])([Object(o["b"])({type:String,json:{write:!0}})],f.prototype,"valueExpression",void 0),Object(i["a"])([Object(o["b"])({type:String,json:{write:!0}})],f.prototype,"valueExpressionTitle",void 0),Object(i["a"])([Object(o["b"])({readOnly:!0})],f.prototype,"arcadeRequired",null),Object(i["a"])([Object(o["b"])({type:d["a"],json:{write:!0}})],f.prototype,"legendOptions",void 0),f=Object(i["a"])([Object(l["a"])("esri.renderers.visualVariables.VisualVariable")],f);const b=f},"5e2a":function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return g}));var i=r("d272"),n=r("d047"),a=r("c6d7"),s=r("3886"),o=r("690a"),c=r("b7bd"),l=r("6fcc"),u=r("c3a3"),d=r("c332f"),h=r("1af8"),p=r("ee2c"),f=r("5d07"),b=r("de47"),m=r("b3a9");function g(e){const t=new o["a"],r=t.vertex,g=t.fragment;return e.legacy&&r.uniforms.add("model","mat4"),e.antialiasing&&(r.code.add(s["a"]`#define ANTIALIASING 1`),g.code.add(s["a"]`#define ANTIALIASING 1`)),t.include(l["a"],e),t.include(f["a"],e),t.include(p["a"],e),t.include(m["a"],e),t.include(b["a"],e),t.include(i["a"],e),t.include(d["a"],e),t.include(u["a"],e),t.include(h["a"],e),t.varyings.add("vColor","vec4"),t.varyings.add("vRadius","float"),t.varyings.add("vPosition","vec3"),t.varyings.add("vWorldPosition","vec3"),t.varyings.add("vViewPos","vec3"),t.varyings.add("vLineLengthPixels","float"),t.varyings.add("vSizeFalloffFactor","float"),r.uniforms.add("pixelToNDC","vec2"),r.uniforms.add("ndcToPixel","vec2"),r.uniforms.add("pixelRatio","float"),t.attributes.add(c["a"].POSITION0,"vec3"),t.attributes.add(c["a"].POSITION1,"vec3"),t.attributes.add(c["a"].VARIANTOFFSET,"float"),t.attributes.add(c["a"].VARIANTSTROKE,"float"),t.attributes.add(c["a"].VARIANTEXTENSION,"float"),r.code.add(s["a"]`const float opaqueCutoff = 1.0 / 255.0;
  1474. void calculateGeometricOutputs(vec3 viewPosV0, vec3 viewPosV1, vec3 worldPosV0, vec3 worldPosV1, vec3 worldNormal, UnpackedAttributes unpackedAttributes) {
  1475. vec2 sideness = unpackedAttributes.sideness;
  1476. vec2 sidenessNorm = unpackedAttributes.sidenessNorm;
  1477. vWorldPosition = mix(worldPosV0, worldPosV1, sidenessNorm.y).xyz;
  1478. vec3 viewPos = mix(viewPosV0, viewPosV1, sidenessNorm.y);
  1479. vViewPos = viewPos;
  1480. vec4 projPosV0 = projFromViewPosition(viewPosV0);
  1481. vec4 projPosV1 = projFromViewPosition(viewPosV1);
  1482. vec4 projPos = projFromViewPosition(viewPos);
  1483. vec3 screenSpaceLineNDC = (projPosV1.xyz / projPosV1.w - projPosV0.xyz / projPosV0.w);
  1484. vec2 screenSpaceLinePixels = screenSpaceLineNDC.xy * ndcToPixel;
  1485. float lineLengthPixels = length(screenSpaceLinePixels);
  1486. float dzPerPixel = screenSpaceLineNDC.z / lineLengthPixels;
  1487. vec2 screenSpaceDirection = screenSpaceLinePixels / lineLengthPixels;
  1488. vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x) * sideness.x;
  1489. float falloffFactor = distanceBasedPerspectiveFactor(-viewPos.z) * pixelRatio;
  1490. float lineWidthPixels = unpackedAttributes.lineWidthPixels * falloffFactor;
  1491. float extensionLengthPixels = calculateExtensionLength(unpackedAttributes.extensionLengthPixels, lineLengthPixels) * falloffFactor;
  1492. float lineAmplitudePixels = calculateLineAmplitude(unpackedAttributes) * pixelRatio;
  1493. vSizeFalloffFactor = falloffFactor;
  1494. float lineWidthAndAmplitudePixels = lineWidthPixels + lineAmplitudePixels + lineAmplitudePixels;
  1495. float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;
  1496. #ifdef ANTIALIASING
  1497. const float aaPaddingPixels = 1.0;
  1498. float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + aaPaddingPixels;
  1499. float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + aaPaddingPixels;
  1500. #else
  1501. float halfAAPaddedLineWidthAndAmplitudePixels = max(lineWidthAndAmplitudePixels, 1.0) * 0.5;
  1502. float aaPaddedRoundedCapSizePixels = max(lineWidthPixels, 1.0) * 0.5;
  1503. #endif
  1504. vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * pixelToNDC;
  1505. vec2 aaPaddedRoundedCapSizeNDC = aaPaddedRoundedCapSizePixels * pixelToNDC;
  1506. vec2 extensionLengthNDC = extensionLengthPixels * pixelToNDC;
  1507. vec2 ndcOffset = (
  1508. screenSpaceDirection * sideness.y * (aaPaddedRoundedCapSizeNDC + extensionLengthNDC)
  1509. + perpendicularScreenSpaceDirection * halfAAPaddedLineWidthAndAmplitudeNDC
  1510. );
  1511. projPos.xy += ndcOffset * projPos.w;
  1512. projPos.z += (dzPerPixel * (aaPaddedRoundedCapSizePixels + extensionLengthPixels)) * sideness.y * projPos.w;
  1513. projPos = adjustProjectedPosition(projPos, worldNormal, 1.0 + max((lineWidthAndAmplitudePixels - 1.0) * 0.5, 0.0));
  1514. float aaPaddedLineWithCapsLengthPixels = extendedLineLengthPixels + aaPaddedRoundedCapSizePixels + aaPaddedRoundedCapSizePixels;
  1515. float pixelPositionAlongLine = aaPaddedLineWithCapsLengthPixels * sidenessNorm.y - aaPaddedRoundedCapSizePixels;
  1516. vPosition = vec3(
  1517. halfAAPaddedLineWidthAndAmplitudePixels * sideness.x,
  1518. pixelPositionAlongLine,
  1519. pixelPositionAlongLine / extendedLineLengthPixels
  1520. );
  1521. vRadius = lineWidthPixels * 0.5;
  1522. vLineLengthPixels = extendedLineLengthPixels;
  1523. discardShortEdges(unpackedAttributes, lineLengthPixels);
  1524. gl_Position = projPos;
  1525. }
  1526. void main() {
  1527. ComponentData component = readComponentData();
  1528. UnpackedAttributes unpackedAttributes = unpackAttributes(component);
  1529. vec3 worldPosV0 = worldFromModelPosition(position0);
  1530. vec3 worldPosV1 = worldFromModelPosition(position1);
  1531. vec3 viewPosV0 = viewFromModelPosition(position0);
  1532. vec3 viewPosV1 = viewFromModelPosition(position1);
  1533. vColor = component.color;
  1534. if (vColor.a < opaqueCutoff) {
  1535. gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
  1536. return;
  1537. }
  1538. if (discardNonSilhouetteEdges(viewPosV0, worldPosV0)) {
  1539. return;
  1540. }
  1541. calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal(), unpackedAttributes);
  1542. calculateStyleOutputs(unpackedAttributes);
  1543. }`),e.multipassTerrainEnabled&&(t.fragment.include(n["a"]),t.include(a["b"],e)),t.fragment.code.add(s["a"]`
  1544. vec2 lineWithCapsDistance(float radius, vec2 position, float lineLength) {
  1545. float lineOffset = calculateLineOffset();
  1546. float positionX = position.x - lineOffset;
  1547. if (radius < 1.0) {
  1548. // Handle this specifically for subpixel sizes:
  1549. // 1. Compute correct coverage (note coverage is computed by
  1550. // 0.5 - dist, so we make sure that that will lead to correct
  1551. // subpixel coverage
  1552. // 2. Ignore rounded caps
  1553. float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);
  1554. float coverageY = clamp(min(lineLength, position.y + 0.5) - max(0.0, position.y - 0.5), 0.0, 1.0);
  1555. float coverage = min(coverageX, coverageY);
  1556. return vec2(0.5 - coverage, 0.0);
  1557. }
  1558. else {
  1559. // Between -radius -> 0 for start cap, 0 for line, 0 -> radius
  1560. float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);
  1561. vec2 lineToPosition = vec2(positionX, positionOnCap);
  1562. return vec2(length(lineToPosition) - radius, positionOnCap / radius);
  1563. }
  1564. }
  1565. void main() {
  1566. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, vViewPos.z);":""}
  1567. float radius = vRadius * calculateLinePressure();
  1568. vec2 distance = lineWithCapsDistance(radius, vPosition.xy, vLineLengthPixels);
  1569. float coverage = clamp(0.5 - distance.x, 0.0, 1.0);
  1570. discardByCoverage(radius, coverage);
  1571. discardBySlice(vWorldPosition);
  1572. float alpha = vColor.a * coverage;
  1573. gl_FragColor = vec4(vColor.rgb, alpha);
  1574. }
  1575. `),t}const y=Object.freeze({__proto__:null,build:g})},"5e70":function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return s}));var i=r("b2b2");function n(e){return e&&"function"==typeof e.highlight}function a(e){return e&&"function"==typeof e.maskOccludee}function s(e,t,r){return Object(i["j"])(e)||e>r&&(0===t||e<t)}function o(e,t){return e>0||t>0}function c(e){var t,r;const i=e.effectiveScaleRange;return{minScale:null!=(t=null==i?void 0:i.minScale)?t:0,maxScale:null!=(r=null==i?void 0:i.maxScale)?r:0}}},"5e82":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var i,n=r("b2b2"),a=r("f4cc");class s{constructor(e){this.schedule=e,this._loadStatus=i.LOADING,this.logger=null}destroy(){this.abortLoad()}get loadStatus(){return this._loadStatus}load(e,t){return this._loadStatus===i.LOADED?(e&&e(),Object(n["t"])(this._loader)):this._loadStatus===i.FAILED?(t&&t(this._loadError),Object(n["t"])(this._loader)):(Object(n["j"])(this._loader)&&(this._abortController=new AbortController,this._loader=this.doLoad(this._abortController.signal).then(()=>{this._abortController=null,this._loadStatus=i.LOADED},e=>{throw this._loadError=e,this._abortController=null,this._loadStatus=i.FAILED,!Object(a["m"])(e)&&this.logger&&e.message&&this.logger.warn(e.message),e})),this._loader.then(e,t).catch(()=>{}),this._loader)}abortLoad(){Object(n["k"])(this._abortController)?this._abortController=Object(n["a"])(this._abortController):this._loadStatus===i.LOADING&&(this._loadStatus=i.FAILED),this._loader=null}}!function(e){e[e.LOADING=0]="LOADING",e[e.LOADED=1]="LOADED",e[e.FAILED=2]="FAILED"}(i||(i={}))},"5ef2":function(e,t,r){"use strict";function i(){return new Float32Array(4)}function n(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(e,t,r,i){const n=new Float32Array(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function s(e,t){return new Float32Array(e,t,4)}function o(){return i()}function c(){return a(1,1,1,1)}function l(){return a(1,0,0,0)}function u(){return a(0,1,0,0)}function d(){return a(0,0,1,0)}function h(){return a(0,0,0,1)}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return a}));const p=o(),f=c(),b=l(),m=u(),g=d(),y=h();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,zeros:o,ones:c,unitX:l,unitY:u,unitZ:d,unitW:h,ZEROS:p,ONES:f,UNIT_X:b,UNIT_Y:m,UNIT_Z:g,UNIT_W:y})},"5f6c":function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n}));var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}}).call(this,r("c8ba"))},6005:function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var i,n=r("a4ee"),a=r("e92d"),s=r("b2b2"),o=r("e041"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("448d")),u=r("d386"),d=r("961d"),h=r("08f6"),p=r("3dc2"),f=r("5c00"),b=r("485a3"),m=r("9ef0"),g=r("6a0ed"),y=r("a915");let O=i=class extends g["a"]{constructor(e){super(e),this.color=new m["a"]([0,0,0,1]),this.size=Object(y["h"])(1)}clone(){const e={color:Object(s["k"])(this.color)?this.color.clone():null,size:this.size};return new i(e)}};Object(n["a"])([Object(c["b"])(f["a"])],O.prototype,"color",void 0),Object(n["a"])([Object(c["b"])(f["b"])],O.prototype,"size",void 0),O=i=Object(n["a"])([Object(u["a"])("esri.symbols.support.Symbol3DIconOutline")],O);var v,_=r("a3af");const j=a["a"].getLogger("esri.symbols.IconSymbol3DLayer");let w=v=class extends d["a"]{constructor(e){super(e),this.material=null,this.resource=null,this.type="icon",this.size=12,this.anchor="center",this.anchorPosition=void 0,this.outline=void 0}clone(){return new v({anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),enabled:this.enabled,material:Object(s["k"])(this.material)?this.material.clone():null,outline:Object(s["k"])(this.outline)?this.outline.clone():null,resource:this.resource&&this.resource.clone(),size:this.size})}static fromSimpleMarkerSymbol(e){const t=e.color||h["c"],r=x(e),i=e.outline&&e.outline.width>0?{size:e.outline.width,color:(e.outline.color||h["c"]).clone()}:null;return new v({size:e.size,resource:{primitive:E(e.style)},material:{color:t},outline:i,anchor:r?"relative":void 0,anchorPosition:r})}static fromPictureMarkerSymbol(e){const t=!e.color||Object(h["a"])(e.color)?h["c"]:e.color,r=x(e);return new v({size:e.width<=e.height?e.height:e.width,resource:{href:e.url},material:{color:t.clone()},anchor:r?"relative":void 0,anchorPosition:r})}static fromCIMSymbol(e){return new v({resource:{href:Object(o["D"])({mediaType:"application/json",data:JSON.stringify(e.data)})}})}};function x(e){const t="width"in e?e.width:e.size,r="height"in e?e.height:e.size,i=T(e.xoffset),n=T(e.yoffset);return(i||n)&&t&&r?{x:-i/t,y:n/r}:null}function T(e){return isFinite(e)?e:0}Object(n["a"])([Object(c["b"])({type:_["a"],json:{write:!0}})],w.prototype,"material",void 0),Object(n["a"])([Object(c["b"])({type:p["a"],json:{write:!0}})],w.prototype,"resource",void 0),Object(n["a"])([Object(l["a"])({Icon:"icon"},{readOnly:!0})],w.prototype,"type",void 0),Object(n["a"])([Object(c["b"])(f["b"])],w.prototype,"size",void 0),Object(n["a"])([Object(l["a"])({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),Object(c["b"])({json:{default:"center"}})],w.prototype,"anchor",void 0),Object(n["a"])([Object(c["b"])({type:b["a"],json:{type:[Number],read:{reader:e=>new b["a"]({x:e[0],y:e[1]})},write:{writer:(e,t)=>{t.anchorPosition=[e.x,e.y]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],w.prototype,"anchorPosition",void 0),Object(n["a"])([Object(c["b"])({type:O,json:{write:!0}})],w.prototype,"outline",void 0),w=v=Object(n["a"])([Object(u["a"])("esri.symbols.IconSymbol3DLayer")],w);const S={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function E(e){const t=S[e];return t||(j.warn(e+' cannot be mapped to Icon symbol. Fallback to "circle"'),"circle")}const A=w},"601a":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i=r("a4ee"),n=r("658b"),a=r("2b92"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("afcf")),c=r("d386"),l=r("f806"),u=r("c1da"),d=r("d81c");const h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=d["a"].fromJSON(r.timeOffsetUnits);return i&&n?new a["a"]({value:i,unit:n}):null}set timeInfo(e){Object(u["l"])(e,this.fieldsIndex),this._set("timeInfo",e)}};return Object(i["a"])([Object(s["b"])({type:n["a"],json:{write:!1}})],t.prototype,"timeExtent",void 0),Object(i["a"])([Object(s["b"])({type:a["a"]})],t.prototype,"timeOffset",void 0),Object(i["a"])([Object(o["a"])("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),Object(i["a"])([Object(s["b"])({value:null,type:l["a"],json:{write:!0,origins:{"web-document":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),Object(i["a"])([Object(s["b"])({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=Object(i["a"])([Object(c["a"])("esri.layers.mixins.TemporalLayer")],t),t}},6061:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("b2b2"),n=r("f2e0"),a=r("d791"),s=r("afe1"),o=r("e431"),c=r("0fc4"),l=r("680b"),u=r("b7c2"),d=r("1038");class h{constructor(){this.visible=!0}}var p=r("bea9"),f=r("b7bd"),b=r("b623");class m{constructor(e,t,r={}){this.data=e,this.material=t,this.boundingSphere=Object(c["e"])(),this.instanceParameters=new h,this._transformation=Object(s["d"])(),this._shaderTransformationDirty=!0,this.layerUid=Object(i["u"])(r.layerUid,null),this.graphicUid=Object(i["u"])(r.graphicUid,null),this.id=r.id?r.id:Object(n["b"])(),this.boundingInfo=Object(i["u"])(r.boundingInfo,null),this.calculateShaderTransformation=Object(i["u"])(this.calculateShaderTransformation,null),this.castShadow=!!r.castShadow&&r.castShadow}get transformation(){return this._transformation}updateTransformation(e){e(this._transformation),this._shaderTransformationDirty=!0,this.computeBoundingSphere(this._transformation,this.boundingSphere)}shaderTransformationChanged(){this._shaderTransformationDirty=!0}computeBoundingSphere(e,t,r=Object(l["i"])(e)){Object(i["j"])(this.boundingInfo)||(Object(o["s"])(t,this.boundingInfo.getCenter(),e),t[3]=this.boundingInfo.getBSRadius()*r)}get hasShaderTransformation(){return Object(i["k"])(this.calculateShaderTransformation)}get primitiveType(){return this.data.primitiveType}getShaderTransformation(){return Object(i["j"])(this.calculateShaderTransformation)?Object(i["u"])(this.transformation,s["a"]):(this._shaderTransformationDirty&&(this._shaderTransformation||(this._shaderTransformation=Object(s["d"])()),Object(a["d"])(this._shaderTransformation,this.calculateShaderTransformation(Object(i["u"])(this.transformation,s["a"]))),this._shaderTransformationDirty=!1),this._shaderTransformation)}computeAttachmentOrigin(e){if(this.material.computeAttachmentOrigin)return!!this.material.computeAttachmentOrigin(this,e)&&(Object(i["k"])(this._transformation)&&Object(o["s"])(e,e,this._transformation),!0);const t=this.indices.get(f["a"].POSITION),r=this.vertexAttributes.get(f["a"].POSITION);return!!Object(d["c"])(r,t,e)&&(Object(i["k"])(this._transformation)&&Object(o["s"])(e,e,this._transformation),!0)}get indices(){return this.data.indices}get vertexAttributes(){return this.data.vertexAttributes}addHighlight(){const e=new p["a"](u["f"].Highlight),t=this.instanceParameters;return t.highlights=Object(b["a"])(t.highlights,e),e}removeHighlight(e){const t=this.instanceParameters;t.highlights=Object(b["e"])(t.highlights,e)}}},"60e6":function(e,t,r){"use strict";function i(){return getComputedStyle(document.body).getPropertyValue("--esri-calcite-theme-name").replace(/\s|'|"/g,"")}function n(){return i().startsWith("dark")}function a(){return"calcite-theme-"+(n()?"dark":"light")}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n}))},"60ec":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("792b"),n=r("f4cc"),a=r("0028");async function s(e,t,r){const s=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(s&&"unique-value"===s.type&&s.styleOrigin){const o=await Object(i["d"])(s.populateFromStyle());if(Object(n["v"])(r),!1===o.ok){const r=o.error;t&&t.messages&&t.messages.push(new a["a"]("renderer:style-reference","Failed to create unique value renderer from style reference: "+r.message,{error:r,context:t})),e.clear("renderer",t.origin)}}}},"614d":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.MATERIAL=0]="MATERIAL",e[e.MATERIAL_ALPHA=1]="MATERIAL_ALPHA",e[e.MATERIAL_DEPTH=2]="MATERIAL_DEPTH",e[e.MATERIAL_NORMAL=3]="MATERIAL_NORMAL",e[e.MATERIAL_DEPTH_SHADOWMAP_ALL=4]="MATERIAL_DEPTH_SHADOWMAP_ALL",e[e.MATERIAL_HIGHLIGHT=5]="MATERIAL_HIGHLIGHT",e[e.MATERIAL_DEPTH_SHADOWMAP_DEFAULT=6]="MATERIAL_DEPTH_SHADOWMAP_DEFAULT",e[e.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT=7]="MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT",e[e.MAX_PASS=8]="MAX_PASS"}(i||(i={}))},6174:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var i=r("1fd7"),n=r("ce50"),a=r("b2b2"),s=r("c528"),o=r("cf49"),c=r("ddc2");function l(e,t,r,i){const n=d(e,{},{context:i,isLabelSymbol:!1});Object(a["k"])(n)&&(t[r]=n)}function u(e,t,r,i){const n=d(e,{},{context:i,isLabelSymbol:!0});Object(a["k"])(n)&&(t[r]=n)}function d(e,t,r){if(Object(a["j"])(e))return null;const{context:i,isLabelSymbol:l}=r;if(i&&"web-scene"===i.origin&&!(e instanceof s["a"])&&!(e instanceof c["a"])){const r=Object(o["a"])(e,{retainCIM:!0,hasLabelingContext:l});return Object(a["k"])(r.symbol)?r.symbol.write(t,i):(i.messages&&i.messages.push(new n["a"]("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:i,error:r.error})),null)}return i&&"web-map"===i.origin&&"web-style"===e.type?(i.messages&&i.messages.push(new n["a"]("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in webmaps. Use CIMSymbol instead when working with WebMap in MapView.`,{symbol:e,context:i})),null):e.write(t,i)}function h(e,t){return Object(i["d"])(e,null,t)}},"619d":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return E}));var i,n=r("a4ee"),a=r("2c4f"),s=r("7d7d"),o=r("e20b"),c=r("6a0ed"),l=r("7ffa"),u=r("6d5f"),d=r("1853"),h=r("e92d"),p=r("b2b2"),f=r("f4cc"),b=r("e041"),m=r("59b2"),g=(r("cea0"),r("d386")),y=r("09db"),O=r("5996"),v=r("0224"),_=r("a7e1"),j=r("c047"),w=r("3765");let x=0;const T=h["a"].getLogger("esri.Basemap");let S=i=class extends(Object(c["b"])(u["a"])){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+x++,this.baseLayers=new a["a"],this.referenceLayers=new a["a"];const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&T.error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},r=e=>{e.parent=null};this.baseLayers.on("after-add",e=>t(e.item)),this.referenceLayers.on("after-add",e=>t(e.item)),this.baseLayers.on("after-remove",e=>r(e.item)),this.referenceLayers.on("after-remove",e=>r(e.item))}initialize(){this.when().catch(e=>{T.error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){var e;const t=this.baseLayers.removeAll();for(const i of t)i.destroy();const r=this.referenceLayers.removeAll();for(const i of r)i.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),null==(e=this.portalItem)||e.destroy(),this.portalItem=null}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",Object(s["b"])(e,this._get("baseLayers")))}_writeBaseLayers(e,t,r){const i=[];e?(r={...r,layerContainerType:"basemap"},this.baseLayers.forEach(e=>{const t=Object(w["a"])(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);Object(p["k"])(t)&&i.push(t)}),this.referenceLayers.forEach(e=>{const t=Object(w["a"])(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);Object(p["k"])(t)&&(t.isReference=!0,i.push(t))}),t.baseMapLayers=i):t.baseMapLayers=i}set referenceLayers(e){this._set("referenceLayers",Object(s["b"])(e,this._get("referenceLayers")))}writeTitle(e,t){t.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return Object(d["a"])(this,e=>{e(this.baseLayers,this.referenceLayers)})}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};return this.loaded&&(e.loadStatus="loaded"),new i({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}write(e,t){return e=e||{},t&&t.origin||(t={origin:"web-map",...t}),super.write(e,t),!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(e=>{const t=Object(l["a"])(e);return t.url&&Object(b["y"])(t.url)&&(t.url="https:"+t.url),t.templateUrl&&Object(b["y"])(t.templateUrl)&&(t.templateUrl="https:"+t.templateUrl),t})),e}async _loadFromSource(e){const{resourceInfo:t,portalItem:r}=this;Object(f["v"])(e);const i=[];if(t){const r=t.context?t.context.url:null;if(i.push(this._loadLayersFromJSON(t.data,r,e)),t.data.id&&!t.data.title){const e=t.data.id;i.push(Object(j["b"])(e).then(e=>{e&&this.read({title:e},t.context)}))}}else r&&i.push(this._loadFromItem(r,e));await Promise.all(i)}async _loadLayersFromJSON(e,t,i){const n=this.resourceInfo&&this.resourceInfo.context,a=this.portalItem&&this.portalItem.portal||n&&n.portal||null,s=n&&"web-scene"===n.origin?"web-scene":"web-map",{populateOperationalLayers:o}=await r.e("chunk-609aa984").then(r.bind(null,"e50f")),c=[];if(Object(f["v"])(i),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const r={context:{origin:s,url:t,portal:a,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},i=o(this.baseLayers,e.baseMapLayers.filter(e=>!e.isReference),r);c.push(i);const n=o(this.referenceLayers,e.baseMapLayers.filter(e=>e.isReference),r);c.push(n)}await Object(f["j"])(c)}async _loadFromItem(e,t){const r=await e.load(t),i=await r.fetchData("json",t),n=Object(b["M"])(e.itemUrl);return this._set("resourceInfo",{data:i.baseMap,context:{origin:"web-map",portal:e.portal||v["a"].getDefault(),url:n}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:i.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||v["a"].getDefault(),url:n}),this._loadLayersFromJSON(this.resourceInfo.data,n,t)}static fromId(e){const t=j["a"][e];if(t){if(t.deprecated){let t=null;"dark-gray"===e?t="dark-gray-vector":"gray"===e?t="gray-vector":"streets"===e?t="streets-vector":"topo"===e&&(t="topo-vector"),Object(o["a"])(T,`The ${e} basemap has entered mature support and is no longer being updated.`,{replacement:t,see:"https://arcg.is/1iq8aD",warnOnce:!0})}return i.fromJSON(t)}return null}};Object(n["a"])([Object(m["b"])({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,t,r,i){this._writeBaseLayers(e,t,i)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:a["a"]}},writer(e,t,r,i){this._writeBaseLayers(e,t,i)}}}}}})],S.prototype,"baseLayers",null),Object(n["a"])([Object(m["b"])({type:String,json:{origins:{"web-scene":{write:!0}}}})],S.prototype,"id",void 0),Object(n["a"])([Object(m["b"])({type:_["default"]})],S.prototype,"portalItem",void 0),Object(n["a"])([Object(m["b"])()],S.prototype,"referenceLayers",null),Object(n["a"])([Object(m["b"])({readOnly:!0})],S.prototype,"resourceInfo",void 0),Object(n["a"])([Object(m["b"])({type:O["a"]})],S.prototype,"spatialReference",void 0),Object(n["a"])([Object(m["b"])()],S.prototype,"thumbnailUrl",void 0),Object(n["a"])([Object(m["b"])({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],S.prototype,"title",void 0),Object(n["a"])([Object(y["a"])("title")],S.prototype,"writeTitle",null),S=i=Object(n["a"])([Object(g["a"])("esri.Basemap")],S);const E=S},"624c":function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("1a3e")),l=r("448d"),u=r("afcf"),d=r("d386"),h=r("cea0"),p=r("0b86"),f=r("a1f3"),b=r("5a61"),m=(r("e06a"),r("5996")),g=r("74e2");let y=i=class extends s["a"]{constructor(e){super(e),this.type="query-table"}clone(){var e;const{workspaceId:t,query:r,oidFields:n,spatialReference:a,geometryType:s}=this,o={workspaceId:t,query:r,oidFields:n,spatialReference:null!=(e=null==a?void 0:a.clone())?e:void 0,geometryType:s};return new i(o)}};var O;Object(n["a"])([Object(l["a"])({queryTable:"query-table"})],y.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],y.prototype,"workspaceId",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],y.prototype,"query",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],y.prototype,"oidFields",void 0),Object(n["a"])([Object(o["b"])({type:m["a"],json:{write:!0}})],y.prototype,"spatialReference",void 0),Object(n["a"])([Object(l["a"])(g["a"])],y.prototype,"geometryType",void 0),y=i=Object(n["a"])([Object(d["a"])("esri.layers.support.source.QueryTableDataSource")],y);let v=O=class extends s["a"]{constructor(e){super(e),this.type="raster"}clone(){const{workspaceId:e,dataSourceName:t}=this;return new O({workspaceId:e,dataSourceName:t})}};var _;Object(n["a"])([Object(l["a"])({raster:"raster"})],v.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],v.prototype,"dataSourceName",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],v.prototype,"workspaceId",void 0),v=O=Object(n["a"])([Object(d["a"])("esri.layers.support.source.RasterDataSource")],v);let j=_=class extends s["a"]{constructor(e){super(e),this.type="table"}clone(){const{workspaceId:e,gdbVersion:t,dataSourceName:r}=this;return new _({workspaceId:e,gdbVersion:t,dataSourceName:r})}};var w,x;Object(n["a"])([Object(l["a"])({table:"table"})],j.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],j.prototype,"workspaceId",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],j.prototype,"gdbVersion",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],j.prototype,"dataSourceName",void 0),j=_=Object(n["a"])([Object(d["a"])("esri.layers.support.source.TableDataSource")],j);const T=Object(a["b"])()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});let S=w=class extends s["a"]{constructor(e){super(e),this.type="join-table"}readLeftTableSource(e,t,r){return A()(e,t,r)}castLeftTableSource(e){return Object(h["k"])(R(),e)}readRightTableSource(e,t,r){return A()(e,t,r)}castRightTableSource(e){return Object(h["k"])(R(),e)}clone(){var e,t;const{leftTableKey:r,rightTableKey:i,leftTableSource:n,rightTableSource:a,joinType:s}=this,o={leftTableKey:r,rightTableKey:i,leftTableSource:null!=(e=null==n?void 0:n.clone())?e:void 0,rightTableSource:null!=(t=null==a?void 0:a.clone())?t:void 0,joinType:s};return new w(o)}};Object(n["a"])([Object(l["a"])({joinTable:"join-table"})],S.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],S.prototype,"leftTableKey",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],S.prototype,"rightTableKey",void 0),Object(n["a"])([Object(o["b"])({json:{write:!0}})],S.prototype,"leftTableSource",void 0),Object(n["a"])([Object(u["a"])("leftTableSource")],S.prototype,"readLeftTableSource",null),Object(n["a"])([Object(c["a"])("leftTableSource")],S.prototype,"castLeftTableSource",null),Object(n["a"])([Object(o["b"])({json:{write:!0}})],S.prototype,"rightTableSource",void 0),Object(n["a"])([Object(u["a"])("rightTableSource")],S.prototype,"readRightTableSource",null),Object(n["a"])([Object(c["a"])("rightTableSource")],S.prototype,"castRightTableSource",null),Object(n["a"])([Object(l["a"])(T)],S.prototype,"joinType",void 0),S=w=Object(n["a"])([Object(d["a"])("esri.layers.support.source.JoinTableDataSource")],S);let E=null;function A(){return E||(E=Object(p["b"])({types:R()})),E}let C=null;function R(){return C||(C={key:"type",base:null,typeMap:{"data-layer":P,"map-layer":b["a"]}}),C}const M={key:"type",base:null,typeMap:{"join-table":S,"query-table":y,raster:v,table:j}};let P=x=class extends s["a"]{constructor(e){super(e),this.type="data-layer"}clone(){const{fields:e,dataSource:t}=this;return new x({fields:e,dataSource:t})}};Object(n["a"])([Object(l["a"])({dataLayer:"data-layer"})],P.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({type:[f["a"]],json:{write:!0}})],P.prototype,"fields",void 0),Object(n["a"])([Object(o["b"])({types:M,json:{write:!0}})],P.prototype,"dataSource",void 0),P=x=Object(n["a"])([Object(d["a"])("esri.layers.support.source.DataLayerSource")],P),P.from=Object(h["m"])(P)},6316:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("6c97"),n=r("3c9c"),a=r("c332"),s=r("7d11"),o=r("bc40"),c=r("aab5"),l=r("3886");function u(e,t){const r=e.fragment;switch(t.doubleSidedMode){case c["b"].None:r.code.add(l["a"]`vec3 _adjustDoublesided(vec3 normal) {
  1576. return normal;
  1577. }`);break;case c["b"].View:e.include(o["a"],t),r.code.add(l["a"]`vec3 _adjustDoublesided(vec3 normal) {
  1578. return dot(normal, vPositionWorldCameraRelative) > 0.0 ? -normal : normal;
  1579. }`);break;case c["b"].WindingOrder:r.code.add(l["a"]`vec3 _adjustDoublesided(vec3 normal) {
  1580. return gl_FrontFacing ? normal : -normal;
  1581. }`);break;default:Object(i["a"])(t.doubleSidedMode);case c["b"].COUNT:}switch(t.normalType){case a["b"].Attribute:case a["b"].CompressedAttribute:e.include(s["a"],t),r.code.add(l["a"]`vec3 shadingNormalWorld() {
  1582. return _adjustDoublesided(normalize(vNormalWorld));
  1583. }
  1584. vec3 shadingNormal_view() {
  1585. vec3 normal = normalize(vNormalView);
  1586. return gl_FrontFacing ? normal : -normal;
  1587. }`);break;case a["b"].ScreenDerivative:e.extensions.add("GL_OES_standard_derivatives"),e.include(o["a"],t),r.code.add(l["a"]`vec3 shadingNormalWorld() {
  1588. return normalize(cross(
  1589. dFdx(vPositionWorldCameraRelative),
  1590. dFdy(vPositionWorldCameraRelative)
  1591. ));
  1592. }
  1593. vec3 shadingNormal_view() {
  1594. return normalize(cross(dFdx(vPosition_view),dFdy(vPosition_view)));
  1595. }`);break;case a["b"].Ground:t.viewingMode===n["a"].Global?(e.include(o["a"],t),r.code.add(l["a"]`vec3 shadingNormalWorld() {
  1596. return normalize(positionWorld());
  1597. }`)):t.viewingMode===n["a"].Local&&r.code.add(l["a"]`vec3 shadingNormalWorld() {
  1598. return vec3(0.0, 0.0, 1.0);
  1599. }`),e.extensions.add("GL_OES_standard_derivatives"),r.code.add(l["a"]`vec3 shadingNormal_view() {
  1600. return normalize(cross(dFdx(vPosition_view),dFdy(vPosition_view))).xyz;
  1601. }`);break;default:Object(i["a"])(t.normalType);case a["b"].COUNT:}}},6323:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return h}));var i=r("ce50"),n=r("f4cc"),a=r("2035");const s=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function c(e){var t;return null!=(t=o[e])&&t}const l=[],u=new Map;function d(e){for(const t of u.keys())m(e.pattern,t)&&u.delete(t)}function h(e){return l.includes(e)||(d(e),l.unshift(e)),{remove(){const t=l.indexOf(e);t>-1&&(l.splice(t,1),d(e))}}}async function p(e){const t=Object(a["b"])();u.has(e)||u.set(e,b(e,t));const r=u.get(e);return await g.add(r),r}function f(e){if(!s.test(e))return null;const[,t,r]=s.exec(e),i=t+(r?"-"+r.toUpperCase():"");return c(i)?i:c(t)?t:null}async function b(e,t){const r=[];for(const i of l)if(m(i.pattern,e))try{return await i.fetchMessageBundle(e,t)}catch(s){r.push(s)}if(r.length)throw new i["a"]("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new i["a"]("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}function m(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}Object(a["a"])(()=>{u.clear()});const g=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=Object(n["f"])())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},6339:function(e,t,r){"use strict";r.d(t,"a",(function(){return ho}));var i=r("792b"),n=r("b2b2"),a=r("f4cc"),s=r("f0b9"),o=r("ecd7"),c=r("3349"),l=r("02f1"),u=r("e431"),d=r("0b2d"),h=r("1219"),p=r("8188"),f=r("4261"),b=r("9180"),m=r("1a54"),g=r("6655"),y=r("6431"),O=r("e9d6");const v=new o["a"](Array,e=>Object(f["B"])(e,f["c"]),null,10,5),_=Object(b["l"])();class j{constructor(e,t,r,i,a){this.graphic=e,this.graphics3DSymbol=t,this.graphics=r,this._labelGraphics=new Array,this._auxiliaryGraphics=new Array,this._visibilityFlags=w(y["b"]._COUNT,y["a"]._COUNT),this._featureExpressionFeature=null,this._optimizedGeometry={geometry:null,hasZ:!1,hasM:!1},this._extent=null,this.isElevationSource=!1,++t.referenced,this._featureExpressionFeature=a?Object(O["d"])(a,e,i):null;for(const s of r)Object(n["k"])(s)&&(this.isElevationSource=this.isElevationSource||s.isElevationSource)}get labelGraphics(){return this._labelGraphics}get extent(){return this._extent}initialize(e,t,r){this._layer=t,this._stage=e,this._forEachSymbolLayerGraphic(i=>{i.initialize(e,t,r),i.setVisibility(this.isVisible())})}destroy(){this._forEachSymbolLayerGraphic(e=>e.destroy()),this.graphics=null,this._auxiliaryGraphics=null,--this.graphics3DSymbol.referenced,this.graphics3DSymbol=null}get destroyed(){return null==this.graphics}clearLabelGraphics(){this._forEachLabelGraphic(e=>e.destroy()),this._labelGraphics.length=0}addLabelGraphic(e,t,r){this._labelGraphics.push(e),e.initialize(t,r),e.setVisibility(this.isVisible(y["b"].LABEL))}addAuxiliaryGraphic(e){this._auxiliaryGraphics.push(e),this._layer&&(e.initialize(this._stage,this._layer),e.setVisibility(this.isVisible()))}get isDraped(){let e=!1;return this._forEachSymbolLayerGraphic(t=>{"draped"===t.type&&(e=!0)}),e}isVisible(e=y["b"].GRAPHIC,t){for(let r=0;r<=e;r++){const e=this._visibilityFlags[r];for(let r=0;r<e.length;++r)if(!1===e[r]&&r!==t)return!1}return!0}hasVisibilityFlag(e,t){return null!=this._visibilityFlags[t][e]}setVisibilityFlag(e,t,r){const i=this.isVisible(r);this._visibilityFlags[r][e]=t;const n=this.isVisible(r);if(i===n)return!1;if(r===y["b"].LABEL)this._forEachLabelGraphic(e=>e.setVisibility(n));else{this._forEachSymbolLayerGraphic(e=>e.setVisibility(n));const e=this.isVisible(y["b"].LABEL);this._forEachLabelGraphic(t=>t.setVisibility(e))}return!0}clearVisibilityFlag(e,t=y["b"].GRAPHIC){return this.setVisibilityFlag(e,void 0,t)}computeExtent(e){if(!this._extent){const t=this.graphic.geometry;if(Object(n["j"])(t))return!1;this._extent=Object(b["l"])(),Object(m["d"])(t,this._extent);const r=t.spatialReference;if(!r.equals(e)&&!Object(p["n"])(this._extent,r,this._extent,e))return this._extent=null,!1}return!0}getAsOptimizedGeometry(e,t){return Object(n["k"])(this._optimizedGeometry.geometry)&&this._optimizedGeometry.hasZ===e&&this._optimizedGeometry.hasM===t||(this._optimizedGeometry.geometry=this._convertGraphicToOptimizedGeometry(this.graphic,e,t),this._optimizedGeometry.hasZ=e,this._optimizedGeometry.hasM=t),this._optimizedGeometry.geometry}_convertGraphicToOptimizedGeometry(e,t,r){let i=e.geometry;return"mesh"!==i.type&&"extent"!==i.type||(i=h["a"].fromExtent("mesh"===i.type?i.extent:i)),Object(g["d"])(i,t,r)}get usedMemory(){let e=Object(s["b"])(this.graphic.attributes);return this._forEachSymbolLayerGraphic(t=>{const r=t.graphics3DSymbolLayer.complexity;if(Object(n["j"])(r))return;const i="draped"===t.type?r.memory.draped:r.memory;e+=i.bytesPerFeature,i.bytesPerCoordinate&&(e+=Object(m["k"])(this.graphic.geometry)*i.bytesPerCoordinate)}),e}computeAttachmentOrigin(){const e={render:{origin:Object(d["f"])(),num:0},draped:{origin:Object(l["b"])(),num:0}};for(const t of this.graphics)Object(n["j"])(t)||t.computeAttachmentOrigin(e);return e.render.num&&Object(u["g"])(e.render.origin,e.render.origin,1/e.render.num),e.draped.num&&Object(c["g"])(e.draped.origin,e.draped.origin,1/e.draped.num),e}async getProjectedBoundingBox(e,t,r,a,s){return s||(s={boundingBox:null,requiresDrapedElevation:!1,screenSpaceObjects:[]}),s.boundingBox?Object(f["k"])(s.boundingBox):s.boundingBox=Object(f["k"])(),s.requiresDrapedElevation=!1,await Object(i["b"])(this.graphics,async i=>{if(Object(n["j"])(i))return;const o="draped"===i.type?t:e,c=v.acquire(),l=await i.getProjectedBoundingBox(o,r,s.screenSpaceObjects,a,c);isFinite(l[2])&&isFinite(l[5])||(s.requiresDrapedElevation=!0),l&&Object(f["m"])(s.boundingBox,c),v.release(c)}),Object(f["d"])(s.boundingBox)||Object(b["c"])(Object(f["F"])(s.boundingBox,_))?s:null}needsElevationUpdates(){for(const e of this.graphics)if(Object(n["k"])(e)&&("object3d"===e.type||"lod-instance"===e.type)&&e.needsElevationUpdates)return!0;for(const e of this._labelGraphics)if(e&&e.needsElevationUpdates)return!0;return!1}alignWithElevation(e,t,r){this._forEachRenderedGraphic(i=>{"object3d"!==i.type&&"lod-instance"!==i.type||i.alignWithElevation(e,t,this._featureExpressionFeature,r)})}addObjectStateSet(e,t){this._forEachSymbolLayerGraphic(r=>r.addObjectState(e,t))}removeObjectState(e){this._forEachSymbolLayerGraphic(t=>t.removeObjectState(e))}_forEachGraphicList(e,t){e.forEach(e=>e&&t(e))}_forEachSymbolLayerGraphic(e){this._forEachGraphicList(this.graphics,e),this._forEachGraphicList(this._auxiliaryGraphics,e)}_forEachLabelGraphic(e){this._forEachGraphicList(this._labelGraphics,e)}_forEachRenderedGraphic(e){this._forEachSymbolLayerGraphic(e),this._forEachLabelGraphic(e)}}function w(e,t){const r=new Array(e);for(let i=0;i<r.length;i++)r[i]=new Array(t);return r}var x=r("7b96"),T=r("e92d"),S=r("ce50"),E=r("9812"),A=r("1c92"),C=r("dae5"),R=r("d791"),M=r("afe1"),P=r("8190"),I=r("668b"),D=r("d1ac"),L=r("3c9c"),N=r("2e0f"),F=r("0eb9"),k=r("7f60"),U=r("ba58"),z=r("fa73"),B=(r("e06a"),r("1666")),V=r("7585"),G=r("0278"),H=r("b7bd"),q=r("3af1");function W(e){const t=[[H["a"].POSITION,e.indices]],r=[[H["a"].POSITION,{size:3,data:e.attributeData.position,exclusive:!0}]];return Object(n["k"])(e.attributeData.color)&&(r.push([H["a"].COLOR,{size:4,data:e.attributeData.color,exclusive:!0}]),t.push([H["a"].COLOR,new Uint32Array(e.indices.length)])),Object(n["k"])(e.attributeData.uvMapSpace)&&(r.push([H["a"].UVMAPSPACE,{size:4,data:e.attributeData.uvMapSpace,exclusive:!0}]),t.push([H["a"].UVMAPSPACE,e.indices])),Object(n["k"])(e.attributeData.boundingRect)&&(r.push([H["a"].BOUNDINGRECT,{size:9,data:e.attributeData.boundingRect,exclusive:!0}]),t.push([H["a"].BOUNDINGRECT,e.indices])),Object(n["k"])(e.attributeData.mapPosition)&&(r.push([H["a"].MAPPOS,{size:3,data:e.attributeData.mapPosition,exclusive:!0}]),t.push([H["a"].MAPPOS,e.indices])),new G["a"](r,t)}function $(e){const t=[[H["a"].POSITION,e.indices],[H["a"].UV0,e.indices]],r=[[H["a"].POSITION,{size:3,data:e.attributeData.position,exclusive:!0}],[H["a"].UV0,{size:2,data:e.attributeData.uv0,exclusive:!0}]];return Object(n["k"])(e.attributeData.mapPosition)&&(r.push([H["a"].MAPPOS,{size:3,data:e.attributeData.mapPosition,exclusive:!0}]),t.push([H["a"].MAPPOS,e.indices])),new G["a"](r,t)}function Z(e){switch(e.type){case"extent":if(e instanceof q["a"])return h["a"].fromExtent(e);break;case"polygon":return e}return null}function X(e,t,r,i){const n=Object(B["b"])(e.rings,e.hasZ,B["a"].CCW_IS_HOLE),a=new Float64Array(n.position.length),s=Object(N["d"])(n.position,e.spatialReference,0,a,0,n.position,0,n.position.length/3,t,r,i),o=null!=s;return{position:n.position,mapPosition:a,polygons:Q(n.polygons,n.position,a),outlines:J(n.outlines,n.position,a),projectionSuccess:o,sampledElevation:s}}function Y(e,t){const r=Object(B["b"])(e.rings,!1,B["a"].CCW_IS_HOLE),i=Object(p["p"])(r.position,e.spatialReference,0,r.position,t,0,r.position.length/3);for(let n=2;n<r.position.length;n+=3)r.position[n]=V["a"];return{position:r.position,polygons:Q(r.polygons,r.position),outlines:J(r.outlines,r.position),projectionSuccess:i}}function J(e,t,r){const i=new Array;for(const{index:n,count:a}of e){if(a<=1)continue;const e=3*n,s=e+3*a;i.push({index:n,count:a,position:t.subarray(e,s),mapPosition:r?r.subarray(e,s):void 0})}return i}function Q(e,t,r){const i=new Array;for(const{index:n,count:a,holeIndices:s,pathLengths:o}of e){if(a<=1)continue;const e=3*n,c=e+3*a,l=s.map(e=>e-n);i.push({index:n,count:a,holeIndices:l,pathLengths:o,position:t.subarray(e,c),mapPosition:r?r.subarray(e,c):void 0})}return i}var K=r("ec13"),ee=r("6611"),te=r("0cb9"),re=r("b7c2"),ie=r("5a22"),ne=r("dbad");const ae=["polygon","extent"];class se extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const e=Object(U["j"])(this._getSymbolSize());if(e)throw new S["a"]("graphics3dextrudesymbollayer:invalid-size",e)}const e=Object(n["i"])(this.symbolLayer,"material","color"),t=this._getCombinedOpacityAndColor(e),r=Object(d["g"])(t),i=t[3],a=i<1||this.needsDrivenTransparentPass,s={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,diffuse:r,ambient:r,opacity:i,transparent:a,cullFace:a?re["c"].None:re["c"].Back,vertexColors:!0,slicePlaneEnabled:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};this._material=new ne["a"](s),this._bottomMaterial=new ne["a"]({...s,cullFace:re["c"].Back}),this._context.stage.add(this._material),this._context.stage.add(this._bottomMaterial)}destroy(){super.destroy(),this._material&&(this._context.stage.remove(this._material),this._context.stage.remove(this._bottomMaterial))}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,ae,this.symbolLayer.type))return null;const r=this._getVertexOpacityAndColor(e.renderingInfo,255),i=this.setGraphicElevationContext(t,new F["a"]);return this._createAs3DShape(t,e.renderingInfo,r,i,t.uid)}layerOpacityChanged(e,t){const r=Object(n["i"])(this.symbolLayer,"material","color"),i=this._getCombinedOpacity(r),a=i<1||this.needsDrivenTransparentPass;this._material.setParameters({opacity:i,transparent:a}),this._bottomMaterial.setParameters({opacity:i,transparent:a});const s=this._getLayerOpacity();return e.forEach(e=>{const r=t(e);Object(n["k"])(r)&&r.layerOpacityChanged(s,this._context.isAsync)}),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,N["i"])}slicePlaneEnabledChanged(e,t){return this._material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled}),this._bottomMaterial.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled}),e.forEach(e=>{const r=t(e);Object(n["k"])(r)&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){return this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._bottomMaterial.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}pixelRatioChanged(){return!0}_getExtrusionSize(e){let t;var r;return t=e.size&&this._drivenProperties.size?null!=(r=Object(D["a"])(e.size,2))?r:0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?z["a"].Recreate_Symbol:z["a"].Recreate_Graphics}_getSymbolSize(){var e;return null!=(e=this.symbolLayer.size)?e:1}_createAs3DShape(e,t,r,i,a){const s=Z(e.geometry);if(Object(n["j"])(s))return null;const o=X(s,this._context.elevationProvider,this._context.renderCoordsHelper,i);if(this._logGeometryCreationWarnings(o,s.rings,"rings","ExtrudeSymbol3DLayer"),0===s.rings.length||!s.rings.some(e=>e.length>0))return null;const c=Object(U["a"])(s);if(Object(n["j"])(c))return null;const l=new Array,u=new Array,h=new Array,b=Object(f["h"])(),m=Object(M["d"])(),g=Object(d["f"])(),y=this._context.renderCoordsHelper.viewingMode===L["a"].Global;y||this._context.renderCoordsHelper.worldUpAtPosition(null,g),Object(p["d"])(s.spatialReference,[c.x,c.y,0],m,this._context.renderCoordsHelper.spatialReference);const O=Object(M["d"])();Object(R["b"])(O,m);const v=Object(C["b"])();Object(A["a"])(v,O);const{polygons:_,mapPosition:j,position:w}=o,T=w.length/3,S=new Float64Array(3*T*6),D=new Float64Array(3*T*6),F=new Float64Array(3*T*6),k=new Float64Array(1*T*6);let z=0;for(let n=0;n<_.length;++n){const e=_[n],i=e.count;if(this._context.clippingExtent&&(Object(f["k"])(b),Object(f["n"])(b,e.mapPosition),!Object(f["w"])(b,this._context.clippingExtent)))continue;const a=Object(E["a"])(e.mapPosition,e.holeIndices,3);if(0===a.length)continue;const s=3*i*2+a.length,o=new Uint32Array(s),c=new Uint32Array(a.length),d=6*i,p=3*S.BYTES_PER_ELEMENT,m=new P["v"](S.buffer,z*p,p,(z+d)*p),x=3*D.BYTES_PER_ELEMENT,T=new P["v"](D.buffer,z*x,x,(z+d)*x),A=new Float64Array(F.buffer,3*z*F.BYTES_PER_ELEMENT,3*d),C=new Float64Array(k.buffer,1*z*k.BYTES_PER_ELEMENT,1*d),R=this._getExtrusionSize(t);ce(w,j,a,e,m.typedBuffer,A,T.typedBuffer,C,0,o,c,R,g,y),Object(I["e"])(m,m,O),Object(I["a"])(T,T,v),z+=6*i;const L=oe(o,o.length-c.length,{positions:m.typedBuffer,elevation:A,normals:T.typedBuffer,heights:C},r);l.push(L),u.push(this._material),h.push(M["a"]);const N=oe(c,0,{positions:m.typedBuffer,elevation:A,normals:T.typedBuffer,heights:C},r);l.push(N),u.push(this._bottomMaterial),h.push(M["a"])}if(0===l.length)return null;const B=new ie["a"]({geometries:l,materials:u,transformations:h,metadata:{layerUid:this._context.layer.uid,graphicUid:a,isElevationSource:!0}});B.transformation=m;const V=Object(K["a"])(this.symbolLayer,{opacity:this._getLayerOpacity()}),G=Object(n["k"])(V)?{baseMaterial:this._material,edgeMaterials:[V],properties:{mergeGeometries:!0,slicePlaneEnabled:this._context.slicePlaneEnabled}}:null,H=new x["a"](this,B,l,null,null,ve,i,G);return H.alignedSampledElevation=o.sampledElevation,H.needsElevationUpdates=Object(N["i"])(i.mode),H}}function oe(e,t,r,i){const n=new Uint32Array(e.length),a=[[H["a"].POSITION,{size:3,data:r.positions,exclusive:!0}],[H["a"].NORMAL,{size:3,data:r.normals,exclusive:!0}],[H["a"].COLOR,{size:4,data:i,exclusive:!0}],[H["a"].SIZE,{size:1,data:r.heights,exclusive:!0}]],s=[[H["a"].POSITION,e],[H["a"].NORMAL,e],[H["a"].COLOR,n]];return r.elevation&&(a.push([H["a"].MAPPOS,{size:3,data:r.elevation}]),s.push([H["a"].MAPPOS,e])),new G["a"](a,s,re["h"].Triangle,t)}function ce(e,t,r,i,n,a,s,o,c,l,u,d,h,p){const f=r.length/3;let b=0,m=2*i.count;le(e,t,i.index,i.count,r,0,f,n,a,s,o,c,l,u,m,d,h,p),c+=2*i.count,m=0,he(n,a,o,s,b,i.pathLengths[0],i.count,c,l,m,d),c+=4*i.pathLengths[0],m+=2*i.pathLengths[0],b+=i.pathLengths[0];for(let g=1;g<i.pathLengths.length;++g)he(n,a,o,s,b,i.pathLengths[g],i.count,c,l,m,d),c+=4*i.pathLengths[g],m+=2*i.pathLengths[g],b+=i.pathLengths[g]}function le(e,t,r,i,n,a,s,o,c,l,d,h,p,f,b,m,g,y){Object(u["m"])(je,g);const O=m>0?1:-1;let v=3*r,_=h,j=3*_,w=h+i,x=3*w;for(let E=0;E<i;++E)y&&(je[0]=e[v+0],je[1]=e[v+1],je[2]=e[v+2],Object(u["t"])(je,je)),o[j+0]=e[v+0],o[j+1]=e[v+1],o[j+2]=e[v+2],c[j+0]=t[v+0],c[j+1]=t[v+1],c[j+2]=t[v+2],l[j+0]=-O*je[0],l[j+1]=-O*je[1],l[j+2]=-O*je[2],d[_]=0,o[x+0]=e[v+0]+m*je[0],o[x+1]=e[v+1]+m*je[1],o[x+2]=e[v+2]+m*je[2],c[x+0]=t[v+0],c[x+1]=t[v+1],c[x+2]=t[v+2],l[x+0]=O*je[0],l[x+1]=O*je[1],l[x+2]=O*je[2],d[w]=m,j+=3,x+=3,v+=3,_+=1,w+=1;v=3*a,j=0,x=3*b;const T=m<0?Te:xe,S=m<0?xe:Te;for(let u=0;u<s;++u)f[j+0]=n[v+T[0]],f[j+1]=n[v+T[1]],f[j+2]=n[v+T[2]],p[x+0]=n[v+S[0]]+i,p[x+1]=n[v+S[1]]+i,p[x+2]=n[v+S[2]]+i,j+=3,x+=3,v+=3}function ue(e,t,r,i,n,a,s){i[a]=i[s],s*=3,e[0+(a*=3)]=e[s+0],e[a+1]=e[s+1],e[a+2]=e[s+2],t[a+0]=t[s+0],t[a+1]=t[s+1],t[a+2]=t[s+2],r[a+0]=n[0],r[a+1]=n[1],r[a+2]=n[2]}const de=Object(d["f"])();function he(e,t,r,i,n,a,s,o,c,l,u){let d=n,h=n+1,p=n+s,f=n+s+1,b=o,m=o+1,g=o+2*a,y=o+2*a+1;u<0&&(d=n+s+1,f=n),l*=3;for(let O=0;O<a;++O)O===a-1&&(u>0?(h=n,f=n+s):(h=n,d=n+s)),ye(e,d,h,p,de),ue(e,t,i,r,de,b,d),ue(e,t,i,r,de,m,h),ue(e,t,i,r,de,g,p),ue(e,t,i,r,de,y,f),c[l++]=b,c[l++]=g,c[l++]=y,c[l++]=b,c[l++]=y,c[l++]=m,d++,h++,p++,f++,b+=2,m+=2,g+=2,y+=2}const pe=Object(d["f"])(),fe=Object(d["f"])(),be=Object(d["f"])(),me=Object(d["f"])(),ge=Object(d["f"])();function ye(e,t,r,i,n){t*=3,r*=3,i*=3,Object(u["y"])(pe,e[t++],e[t++],e[t++]),Object(u["y"])(fe,e[r++],e[r++],e[r++]),Object(u["y"])(be,e[i++],e[i++],e[i++]),Object(u["l"])(me,fe,pe),Object(u["l"])(ge,be,pe),Object(u["i"])(n,ge,me),Object(u["t"])(n,n)}const Oe=Object(d["f"])();function ve(e,t,r,i){const n=e.stageObject,a=n.geometryRecords,s=a.length,o="absolute-height"!==t.mode;let c=0;const l=n.transformation,d=Object(R["b"])(Object(M["d"])(),l);for(let h=0;h<s;h+=2){const e=a[h].geometry,s=e.getMutableAttribute(H["a"].POSITION).data,p=e.vertexAttributes.get(H["a"].SIZE).data,f=e.vertexAttributes.get(H["a"].MAPPOS).data,b=new te["a"](f),m=s.length/3;let g=0,y=!1,O=0;const v=r.spatialReference;for(let n=0;n<m;n++){Oe[0]=s[g],Oe[1]=s[g+1],Oe[2]=s[g+2],Object(N["g"])(b,r,t,i,we),o&&(O+=we.sampledElevation),ee["a"].TESTS_DISABLE_OPTIMIZATIONS?(Object(u["y"])(_e,b.array[b.offset+0],b.array[b.offset+1],we.z+p[g/3]),i.toRenderCoords(_e,v,_e),Object(u["s"])(_e,_e,d)):(Object(u["y"])(_e,s[g+0],s[g+1],s[g+2]),Object(u["s"])(_e,_e,l),i.setAltitude(_e,we.z+p[g/3]),Object(u["s"])(_e,_e,d)),s[g]=_e[0],s[g+1]=_e[1],s[g+2]=_e[2];const e=Se/i.unitInMeters;(Math.abs(Oe[0]-s[g])>=e||Math.abs(Oe[1]-s[g+1])>=e||Math.abs(Oe[2]-s[g+2])>=e)&&(y=!0),b.offset+=3,g+=3}y&&(e.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(a[h]),a[h+1].geometry.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(a[h+1])),c+=O/m}return c/s}const _e=Object(d["f"])(),je=Object(d["f"])(),we=new N["a"],xe=[0,2,1],Te=[0,1,2],Se=.01;var Ee=r("9ef0"),Ae=(r("1fd7"),r("c120")),Ce=r("a915"),Re=r("e041"),Me=r("7577"),Pe=r("0fc4"),Ie=r("82fa"),De=r("3dc2"),Le=r("ac8e"),Ne=r("89cb"),Fe=r("ed70"),ke=r("74df"),Ue=r("3bd5");class ze{constructor(e,t,r){this.graphics3DSymbolLayer=e,this.renderGeometries=t,this.boundingBox=r,this.type="draped",this.stage=null,this._visible=!1,this._addedToStage=!1,this._graphicsCoreOwner=null,this.isElevationSource=!1}initialize(e,t,r){this.stage=e,this._graphicsCoreOwner=r,this._overlayRenderer=this._graphicsCoreOwner.view.basemapTerrain.overlayManager.renderer}setVisibility(e){if(null!=this.stage&&this._visible!==e){if(this._visible=e,e&&!this._addedToStage)return this._addedToStage=!0,void this._overlayRenderer.addGeometries(this.renderGeometries,this._graphicsCoreOwner,Ue["a"].Geometry.ADD);if(e||this._addedToStage){for(const e of this.renderGeometries)e.instanceParameters.visible=this._visible;this._overlayRenderer.updateGeometries(this.renderGeometries,this._graphicsCoreOwner,Ue["a"].State.VISIBILITIES)}}}destroy(){this.stage&&this._addedToStage&&this._overlayRenderer.removeGeometries(this.renderGeometries,this._graphicsCoreOwner,Ue["a"].Geometry.REMOVE),this._addedToStage=!1,this._visible=!1,this.stage=null}getCenterObjectSpace(e=Object(d["f"])()){return Object(u["y"])(e,0,0,0)}getBoundingBoxObjectSpace(e=Object(f["h"])()){return Object(f["k"])(e)}addObjectState(e,t){e===re["f"].Highlight&&(this.renderGeometries.forEach(e=>{const r=e.addHighlight();t.addRenderGeometry(e,r,this)}),this._addedToStage&&this._overlayRenderer.updateHighlights(this.renderGeometries,this._graphicsCoreOwner))}removeObjectState(e){this.renderGeometries.forEach(t=>{e.removeRenderGeometry(t)})}removeRenderGeometryObjectState(e,t){e.removeHighlight(t),this._addedToStage&&this._overlayRenderer.updateHighlights(this.renderGeometries,this._graphicsCoreOwner)}computeAttachmentOrigin(e){for(const t of this.renderGeometries)t.computeAttachmentOrigin(Ge)&&(e.draped.origin[0]+=Ge[0],e.draped.origin[1]+=Ge[1],e.draped.num++)}async getProjectedBoundingBox(e,t,r,i,a){Object(f["k"])(a);for(let n=0;n<this.renderGeometries.length;n++){const t=this.renderGeometries[n];this._getRenderGeometryProjectedBoundingRect(t,e,Be,r),Object(f["q"])(a,Be)}if(t){let e;Object(f["e"])(a,Ge);const r=Object(U["d"])(a,t);try{e=await t.service.queryElevation(Ge[0],Ge[1],i,r,"ground")}catch(s){}Object(n["k"])(e)&&(a[2]=Math.min(a[2],e),a[5]=Math.max(a[5],e))}return a}_getRenderGeometryProjectedBoundingRect(e,t,r,i){if(this.boundingBox)Object(f["B"])(Ve,this.boundingBox);else{const t=e.boundingSphere,r=t[3];Ve[0]=t[0]-r,Ve[1]=t[1]-r,Ve[2]=t[2]-r,Ve[3]=t[0]+r,Ve[4]=t[1]+r,Ve[5]=t[2]+r}return t(Ve,0,2),this.calculateRelativeScreenBounds&&i.push({location:Object(f["e"])(Ve),screenSpaceBoundingRect:this.calculateRelativeScreenBounds()}),Object(f["F"])(Ve,r)}}const Be=Object(b["l"])(),Ve=Object(f["h"])(),Ge=Object(d["f"])();var He,qe,We,$e=r("5880"),Ze=r("5241"),Xe=r("a6c9"),Ye=r("38a4"),Je=r("9b40");function Qe(e){return null!=e}function Ke(e){return"number"==typeof e}function et(e){return"string"==typeof e}function tt(e){return null==e||et(e)}function rt(e,t){e&&e.push(t)}function it(e,t,r,i=Object(M["d"])()){const n=e||0,a=t||0,s=r||0;return 0!==n&&Object(R["h"])(i,i,-n/180*Math.PI),0!==a&&Object(R["s"])(i,i,a/180*Math.PI),0!==s&&Object(R["p"])(i,i,s/180*Math.PI),i}function nt(e,t,r,i,n){const a=e.minSize,s=e.maxSize;if(e.expression)return rt(n,"Could not convert size info: expression not supported"),!1;if(e.useSymbolValue){const e=i.symbolSize[r];return t.minSize[r]=e,t.maxSize[r]=e,t.offset[r]=t.minSize[r],t.factor[r]=0,t.type[r]=He.DefinedSize,!0}if(Qe(e.field))return Qe(e.stops)?2===e.stops.length&&Ke(e.stops[0].size)&&Ke(e.stops[1].size)?(at(e.stops[0].size,e.stops[1].size,e.stops[0].value,e.stops[1].value,t,r),t.type[r]=He.DefinedSize,!0):(rt(n,"Could not convert size info: stops only supported with 2 elements"),!1):Ke(a)&&Ke(s)&&Qe(e.minDataValue)&&Qe(e.maxDataValue)?(at(a,s,e.minDataValue,e.maxDataValue,t,r),t.type[r]=He.DefinedSize,!0):null!=Je["a"][e.valueUnit]?(t.minSize[r]=-1/0,t.maxSize[r]=1/0,t.offset[r]=0,t.factor[r]=1/Je["a"][e.valueUnit],t.type[r]=He.DefinedSize,!0):"unknown"===e.valueUnit?(rt(n,"Could not convert size info: proportional size not supported"),!1):(rt(n,"Could not convert size info: scale-dependent size not supported"),!1);if(!Qe(e.field)){if(e.stops&&e.stops[0]&&Ke(e.stops[0].size))return t.minSize[r]=e.stops[0].size,t.maxSize[r]=e.stops[0].size,t.offset[r]=t.minSize[r],t.factor[r]=0,t.type[r]=He.DefinedSize,!0;if(Ke(a))return t.minSize[r]=a,t.maxSize[r]=a,t.offset[r]=a,t.factor[r]=0,t.type[r]=He.DefinedSize,!0}return rt(n,"Could not convert size info: unsupported variant of sizeInfo"),!1}function at(e,t,r,i,n,a){const s=Math.abs(i-r)>0?(t-e)/(i-r):0;n.minSize[a]=s>0?e:t,n.maxSize[a]=s>0?t:e,n.offset[a]=e-r*s,n.factor[a]=s}function st(e,t,r,i){if(e.normalizationField||e.valueRepresentation)return rt(i,"Could not convert size info: unsupported property"),null;if(!tt(e.field))return rt(i,"Could not convert size info: field is not a string"),null;if(t.size){if(e.field)if(t.size.field){if(e.field!==t.size.field)return rt(i,"Could not convert size info: multiple fields in use"),null}else t.size.field=e.field}else t.size={field:e.field,minSize:[0,0,0],maxSize:[0,0,0],offset:[0,0,0],factor:[0,0,0],type:[He.Undefined,He.Undefined,He.Undefined]};let n;switch(e.axis){case"width":return n=nt(e,t.size,0,r,i),n?t:null;case"height":return n=nt(e,t.size,2,r,i),n?t:null;case"depth":return n=nt(e,t.size,1,r,i),n?t:null;case"width-and-depth":return n=nt(e,t.size,0,r,i),n&&nt(e,t.size,1,r,i),n?t:null;case null:case void 0:case"all":return n=nt(e,t.size,0,r,i),n=n&&nt(e,t.size,1,r,i),n=n&&nt(e,t.size,2,r,i),n?t:null;default:return rt(i,`Could not convert size info: unknown axis "${e.axis}""`),null}}function ot(e,t,r){for(let n=0;n<3;++n){let r=t.unitInMeters;e.type[n]===He.DefinedSize&&(r*=t.modelSize[n],e.type[n]=He.DefinedScale),e.minSize[n]=e.minSize[n]/r,e.maxSize[n]=e.maxSize[n]/r,e.offset[n]=e.offset[n]/r,e.factor[n]=e.factor[n]/r}let i;if(e.type[0]!==He.Undefined)i=0;else if(e.type[1]!==He.Undefined)i=1;else{if(e.type[2]===He.Undefined)return rt(r,"No size axis contains a valid size or scale"),!1;i=2}for(let n=0;n<3;++n)e.type[n]===He.Undefined&&(e.minSize[n]=e.minSize[i],e.maxSize[n]=e.maxSize[i],e.offset[n]=e.offset[i],e.factor[n]=e.factor[i],e.type[n]=e.type[i]);return!0}function ct(e,t,r){e[4*t+0]=r.r/255,e[4*t+1]=r.g/255,e[4*t+2]=r.b/255,e[4*t+3]=r.a}function lt(e,t,r){if(e.normalizationField)return rt(r,"Could not convert color info: unsupported property"),null;if(et(e.field)){if(!e.stops)return rt(r,"Could not convert color info: missing stops or colors"),null;{if(e.stops.length>8)return rt(r,"Could not convert color info: too many color stops"),null;t.color={field:e.field,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};const i=e.stops;for(let e=0;e<8;++e){const r=i[Math.min(e,i.length-1)];t.color.values[e]=r.value,ct(t.color.colors,e,r.color)}}}else{if(!(e.stops&&e.stops.length>=0))return rt(r,"Could not convert color info: no field and no colors/stops"),null;{const r=e.stops&&e.stops.length>=0&&e.stops[0].color;t.color={field:null,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};for(let e=0;e<8;e++)t.color.values[e]=1/0,ct(t.color.colors,e,r)}}return t}function ut(e,t,r){if(e.normalizationField)return rt(r,"Could not convert opacity info: unsupported property"),null;if(et(e.field)){if(!e.stops)return rt(r,"Could not convert opacity info: missing stops or opacities"),null;{if(e.stops.length>8)return rt(r,"Could not convert opacity info: too many opacity stops"),null;t.opacity={field:e.field,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0]};const i=e.stops;for(let e=0;e<8;++e){const r=i[Math.min(e,i.length-1)];t.opacity.values[e]=r.value,t.opacity.opacityValues[e]=r.opacity}}}else{if(!(e.stops&&e.stops.length>=0))return rt(r,"Could not convert opacity info: no field and no opacities/stops"),null;{const r=e.stops&&e.stops.length>=0&&e.stops[0].opacity;t.opacity={field:null,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0]};for(let e=0;e<8;e++)t.opacity.values[e]=1/0,t.opacity.opacityValues[e]=r}}return t}function dt(e,t,r){const i=2===r&&"arithmetic"===e.rotationType;t.offset[r]=i?90:0,t.factor[r]=i?-1:1,t.type[r]=1}function ht(e,t,r){if(!et(e.field))return rt(r,"Could not convert rotation info: field is not a string"),null;if(t.rotation){if(e.field)if(t.rotation.field){if(e.field!==t.rotation.field)return rt(r,"Could not convert rotation info: multiple fields in use"),null}else t.rotation.field=e.field}else t.rotation={field:e.field,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};switch(e.axis){case"tilt":return dt(e,t.rotation,0),t;case"roll":return dt(e,t.rotation,1),t;case null:case void 0:case"heading":return dt(e,t.rotation,2),t;default:return rt(r,`Could not convert rotation info: unknown axis "${e.axis}""`),null}}function pt(e,t,r){if(!e)return null;const i=!t.supportedTypes||!!t.supportedTypes.size,n=!t.supportedTypes||!!t.supportedTypes.color,a=!t.supportedTypes||!!t.supportedTypes.rotation,s=!!t.supportedTypes&&!!t.supportedTypes.opacity,o=e.reduce((e,o)=>{if(!e)return e;if(o.valueExpression)return rt(r,"Could not convert visual variables: arcade expressions not supported"),null;switch(o.type){case"size":return i?st(o,e,t,r):e;case"color":return n?lt(o,e,r):e;case"opacity":return s?ut(o,e,r):null;case"rotation":return a?ht(o,e,r):e;default:return null}},{size:null,color:null,opacity:null,rotation:null});return!(e.length>0&&o)||o.size||o.color||o.opacity||o.rotation?o&&o.size&&!ot(o.size,t,r)?null:o:null}function ft(e){return e&&null!=e.size}function bt(e,t){if(!e)return{enabled:!1};if(ee["a"].TESTS_DISABLE_FAST_UPDATES)return{enabled:!1};const r=pt(e.visualVariables,t);return r?{enabled:!0,visualVariables:r,materialParameters:yt(r,t),requiresShaderTransformation:ft(r)}:{enabled:!1}}function mt(e,t,r){if(!t||!e.enabled)return!1;const i=e.visualVariables,n=pt(t.visualVariables,r);return!!n&&!!(gt(i.size,n.size,"size")&&gt(i.color,n.color,"color")&&gt(i.rotation,n.rotation,"rotation")&&gt(i.opacity,n.opacity,"opacity"))&&(e.visualVariables=n,e.materialParameters=yt(n,r),e.requiresShaderTransformation=ft(n),!0)}function gt(e,t,r){if(!!e!=!!t)return!1;if(e&&e.field!==t.field)return!1;if(e&&"rotation"===r){const r=e,i=t;for(let e=0;e<3;e++)if(r.type[e]!==i.type[e]||r.offset[e]!==i.offset[e]||r.factor[e]!==i.factor[e])return!1}return!0}function yt(e,t){const r={vvSizeEnabled:!1,vvSizeMinSize:null,vvSizeMaxSize:null,vvSizeOffset:null,vvSizeFactor:null,vvSizeValue:null,vvColorEnabled:!1,vvColorValues:null,vvColorColors:null,vvOpacityEnabled:!1,vvOpacityValues:null,vvOpacityOpacities:null,vvSymbolAnchor:null,vvSymbolRotationMatrix:null},i=ft(e);return e&&e.size?(r.vvSizeEnabled=!0,r.vvSizeMinSize=e.size.minSize,r.vvSizeMaxSize=e.size.maxSize,r.vvSizeOffset=e.size.offset,r.vvSizeFactor=e.size.factor):e&&i&&(r.vvSizeValue=t.transformation.scale),e&&i&&(r.vvSymbolAnchor=t.transformation.anchor,r.vvSymbolRotationMatrix=Object(C["b"])(),Object(R["j"])(Ot),it(t.transformation.rotation[2],t.transformation.rotation[0],t.transformation.rotation[1],Ot),Object(A["f"])(r.vvSymbolRotationMatrix,Ot)),e&&e.color&&(r.vvColorEnabled=!0,r.vvColorValues=e.color.values,r.vvColorColors=e.color.colors),e&&e.opacity&&(r.vvOpacityEnabled=!0,r.vvOpacityValues=e.opacity.values,r.vvOpacityOpacities=e.opacity.opacityValues),r}!function(e){e[e.Undefined=0]="Undefined",e[e.DefinedSize=1]="DefinedSize",e[e.DefinedScale=2]="DefinedScale"}(He||(He={})),function(e){e[e.Undefined=0]="Undefined",e[e.DefinedAngle=1]="DefinedAngle"}(qe||(qe={})),function(e){const t=Object(M["d"])(),r=Object(d["f"])();function i(e,i,n){if(!e.vvSizeEnabled)return n;Object(R["d"])(t,n);const a=e.vvSymbolRotationMatrix;Object(R["t"])(Ot,a[0],a[1],a[2],0,a[3],a[4],a[5],0,a[6],a[7],a[8],0,0,0,0,1),Object(R["n"])(t,t,Ot);for(let t=0;t<3;++t){const n=e.vvSizeOffset[t]+i[0]*e.vvSizeFactor[t];r[t]=Object(Ye["f"])(n,e.vvSizeMinSize[t],e.vvSizeMaxSize[t])}return Object(R["i"])(t,t,r),Object(R["k"])(t,t,e.vvSymbolAnchor),t}function n(e,t,r){if(!t.vvSizeEnabled)return Object(u["y"])(e,1,1,1);for(let i=0;i<3;++i){const n=t.vvSizeOffset[i]+r[0]*t.vvSizeFactor[i];e[i]=Object(Ye["f"])(n,t.vvSizeMinSize[i],t.vvSizeMaxSize[i])}return e}e.evaluateModelTransform=i,e.evaluateModelTransformScale=n}(We||(We={}));const Ot=Object(M["d"])(),vt=We.evaluateModelTransform,_t=We.evaluateModelTransformScale;var jt=r("caf7"),wt=r("6061"),xt=r("1e2c"),Tt=r("2df1"),St=r("4cac");const Et=Object(M["d"])(),At=Object(d["h"])(0,0,1),Ct=16,Rt=1.5,Mt=Xe["a"],Pt=[Mt/2,Mt/2,1-Mt/2,1-Mt/2],It=[Xe["b"]*Mt,Xe["b"]*Mt];class Dt extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._cimLayers=null,this._cimSymbolMaterials=new Map,this._cimSymbolTextures=new Map,this._cimMaterialParametersInfo=null,this._cimRequiredFields=null,this._cimScaleFactorOrFunction=null,this._size=null,this._symbolTextureRatio=1,this._outlineSize=0,this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!0}}getCachedSize(){return{size:this._getIconSize()}}async doLoad(e){this._validateOrThrow();const t=this._prepareMaterialParameters(),r=this._getPrimitive();if(Object(n["k"])(r))this._prepareResourcesPrimitive(t,r);else{const r=Object(Le["g"])(this.symbol,this.symbolLayer),i=Object(Re["h"])(r);i&&"application/json"===i.mediaType?await this._prepareResourcesCIM(t,JSON.parse(i.data),e):await this._prepareResourcesHref(t,r,e)}}_validateOrThrow(){if(this._drivenProperties.size)return;const e=Object(U["j"])(this._getIconSize());if(e)throw new S["a"]("graphics3diconsymbollayer:invalid-size",e)}_getIconSize(){const e=this.symbolLayer,t=Math.round(null!=e.size?Object(Ce["g"])(e.size):Ct);return this._drivenProperties.size?Math.max(t,64):t}_generateTextureCIM(e){const t=this._getGraphicHash(e);let r=""===t?null:this._cimSymbolTextures.get(t);if(!r){const i={scaleFactor:this._cimScaleFactorOrFunction},n=this._context.sharedResources.cimSymbolRasterizer.rasterizeCIMSymbol(this._cimLayers,e,"esriGeometryPoint",i,null,null);this._cimMaterialParametersInfo.anchorPos=this._getAnchorPos("relative",n.anchorPosition);const a={width:n.imageData.width,height:n.imageData.height,powerOfTwoResizeMode:re["g"].PAD};r=new xt["a"](n.imageData,a),this._cimSymbolTextures.set(t,r),this._context.stage.add(r)}return r}_computeSize(e,t){const r=e.width/e.height;return r>1?[t,Math.round(t/r)]:[Math.round(t*r),t]}_prepareMaterialParameters(){const e={anchorPos:this._getAnchorPos(this.symbolLayer.anchor,this.symbolLayer.anchorPosition)},t=this.symbol;if(Lt(t)){const{screenLength:r,minWorldLength:i,maxWorldLength:n}=t.verticalOffset;e.verticalOffset={screenLength:Object(Ce["g"])(r),minWorldLength:i||0,maxWorldLength:null!=n?n:1/0}}return this._context.screenSizePerspectiveEnabled&&(e.screenSizePerspective=this._context.sharedResources.screenSizePerspectiveSettings),e.occlusionTest=!0,e.slicePlaneEnabled=this._context.slicePlaneEnabled,e}_prepareResourcesPrimitive(e,t){const r=this._getOutlineSize();if(Nt(t)&&0===r)throw new Error("Nothing to render");this._outlineSize=r,e.color=this._getFillColor(),e.outlineColor=this._getOutlineColor(),e.outlineSize=this._outlineSize;const i=this._context.sharedResources.textures.fromData(t,()=>Object(Xe["c"])(t));this._texture=i.texture,this._releaseTexture=i,e.textureIsSignedDistanceField=!0,e.distanceFieldBoundingBox=Pt,e.textureId=this._texture.id;const n=this._getIconSize();this._size=[n,n],this._symbolTextureRatio=1/Mt,this._createMaterialAndAddToStage(e,this._context.stage)}async _prepareResourcesHref(e,t,r){if(!Object(Ae["a"])("esri-canvas-svg-support")&&Object(Re["z"])(t))throw new S["a"]("graphics3diconsymbollayer:unsupported-image-format","IconSymbol3DLayer failed to load (SVG symbols are not supported in IE11)");this._outlineSize=this._getOutlineSize(),e.color=this._getFillColor(),e.outlineColor=this._getOutlineColor(),e.outlineSize=this._outlineSize,e.textureIsSignedDistanceField=!1;const n=this._getIconSize(),s=n*this._context.graphicsCoreOwner.view.pixelRatio,o=await Object(i["d"])(this._context.sharedResources.textures.fromUrl(t,s,{signal:r}));if(!1===o.ok)throw Object(a["u"])(o.error),new S["a"]("graphics3diconsymbollayer:request-failed",`Failed to load (Request for icon resource failed: ${t})`);this._releaseTexture=o.value;const c=o.value.texture,l=c.params;this._size=this._computeSize(l,n),e.textureId=c.id,this._createMaterialAndAddToStage(e,this._context.stage)}async _prepareResourcesCIM(e,t,i){const n=new St["a"]({data:t});if(!this._context.sharedResources.cimSymbolRasterizer){const e=(await Promise.all([r.e("chunk-01b259ce"),r.e("chunk-24041b7f")]).then(r.bind(null,"6b49"))).CIMSymbolRasterizer;Object(a["v"])(i),this._context.sharedResources.cimSymbolRasterizer||(this._context.sharedResources.cimSymbolRasterizer=new e(this._context.renderCoordsHelper.spatialReference,!0))}const s=this._context.layer.fields?this._context.layer.fields.map(e=>e.toJSON()):null;let o,c;if(this._cimLayers=await this._context.sharedResources.cimSymbolRasterizer.analyzeCIMSymbol(n,s,this._context.renderer&&"dictionary"===this._context.renderer.type?this._context.renderer.fieldMap:null,"esriGeometryPoint",{signal:i}),this._context.renderer&&"dictionary"===this._context.renderer.type&&this._context.renderer.scaleExpression){const e=this._context.renderer;if(isNaN(e.scaleExpression)){const t=e.scaleExpression,r=await Object(Ie["d"])(t,this._context.layer.spatialReference,s);c=(e,t,i)=>{const n=Object(Ne["a"])(r,e,{$view:i},"esriGeometryPoint",t);return null!==n?n:1}}else o=Number(e.scaleExpression)}this._cimScaleFactorOrFunction=o||c||1;const l=this._context.renderer?await this._context.renderer.getRequiredFields(this._context.layer.fieldsIndex):[];Object(a["v"])(i);const u=this._context.layer.fieldsIndex;this._cimRequiredFields=l.map(e=>u.get(e).name),this._cimMaterialParametersInfo=e,this._cimMaterialParametersInfo.color=this._getFillColor(),this._cimMaterialParametersInfo.outlineColor=[0,0,0,0],this._cimMaterialParametersInfo.outlineSize=0,this._cimMaterialParametersInfo.textureIsSignedDistanceField=!1}_getPrimitive(){return this.symbolLayer.resource&&this.symbolLayer.resource.href?null:this.symbolLayer.resource&&this.symbolLayer.resource.primitive||De["b"]}_getOutlineSize(){let e=0;const t=this.symbolLayer;return Object(n["k"])(t.outline)&&null!=t.outline.size?Math.max(Object(Ce["g"])(t.outline.size),0):(e=Nt(this._getPrimitive())?Rt:0,Math.max(e,0))}_getOutlineColor(){const e=this._getLayerOpacity(),t=this.symbolLayer,r=Object(n["i"])(t,"outline","color");if(Object(n["k"])(r)){const t=Ee["a"].toUnitRGB(r),i=r.a*e;return[t[0],t[1],t[2],i]}return[0,0,0,0]}_getFillColor(){if(Nt(this._getPrimitive()))return Fe["b"];const e=Object(n["j"])(this._getPrimitive()),t=Object(n["i"])(this.symbolLayer,"material","color");return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}_getAnchorPos(e,t){return"relative"===e?Object(l["f"])((t.x||0)+.5,.5-(t.y||0)):e in $e["e"]?$e["e"][e]:$e["e"].center}_createMaterialAndAddToStage(e,t){if(this._cimLayers?this._fastUpdates={enabled:!1}:this._fastUpdates=bt(this._context.renderer,this._fastVisualVariableConvertOptions()),this._fastUpdates.enabled&&Object.assign(e,this._fastUpdates.materialParameters),this._cimLayers){let r=this._cimSymbolMaterials.get(e.textureId);return r||(r=new Tt["a"](e),this._cimSymbolMaterials.set(e.textureId,r),t.add(r)),r}return this._material=new Tt["a"](e),t.add(this._material),this._material}_setDrapingDependentMaterialParameters(){this.draped&&(this._forEachMaterial(e=>{e.setParameters({verticalOffset:null,screenSizePerspective:null,occlusionTest:!1,slicePlaneEnabled:!1,shaderPolygonOffset:0,isDraped:this.draped})}),this.layerOpacityChanged())}destroy(){super.destroy(),this._forEachMaterial(e=>this._context.stage.remove(e)),this._material=null,this._cimSymbolMaterials.clear(),this._cimSymbolTextures.forEach(e=>this._context.stage.remove(e)),this._cimSymbolTextures.clear(),this._releaseTexture=Object(n["r"])(this._releaseTexture)}_getScaleFactor(e,t){if(this._drivenProperties.size&&e.size){for(let t=0;t<3;t++){const r=e.size[t];r&&"symbol-value"!==r&&"proportional"!==r&&(e.size[t]=Object(Ce["g"])(r))}if("symbol-value"===e.size[0])return 1;if(isFinite(+e.size[0]))return+e.size[0]/t;if(isFinite(+e.size[2]))return+e.size[2]/t}return 1}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;let r,i;if(this._cimLayers){if(!this._cimLayers.length)return null;const e=this._generateTextureCIM(t),n={textureId:e.id,...this._cimMaterialParametersInfo};i=this._createMaterialAndAddToStage(n,this._context.stage),r=[e.params.width,e.params.height]}else r=this._size,i=Object(n["t"])(this._material);const a=Object(Ze["c"])(t.geometry);if(Object(n["j"])(a))return this.logger.warn("unsupported geometry type for icon symbol: "+t.geometry.type),null;const s=e.renderingInfo,o=this._getVertexOpacityAndColor(s);let c=1;if(!this._fastUpdates.enabled||!this._fastUpdates.visualVariables.size){const e=r[0]>r[1]?r[0]:r[1];c=this._getScaleFactor(s,e)}c*=this._symbolTextureRatio;const l=[r[0]*c,r[1]*c],u=this.setGraphicElevationContext(t,new F["a"]);return this.ensureDrapedStatus("on-the-ground"===u.mode)&&this._setDrapingDependentMaterialParameters(),this.draped?this._createAsOverlay(t,a,i,o,l,e.layer.uid):this._createAs3DShape(t,a,i,o,l,u,t.uid)}layerOpacityChanged(){const e=this._getFillColor(),t=this._getOutlineColor();return this._forEachMaterial(r=>{r.setParameters({color:e}),r.setParameters({outlineColor:t})}),!0}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,n=Object(N["e"])(Dt.elevationModeChangeTypes,r,i);if(n!==N["b"].UPDATE)return n;const a=Object(N["h"])(i)||"absolute-height"===i;return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){return this.draped||this._forEachMaterial(e=>{e.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled})}),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!!this._getPrimitive()}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return z["a"].Recreate_Symbol;if(!mt(this._fastUpdates,t,this._fastVisualVariableConvertOptions()))return z["a"].Recreate_Symbol;Object(n["k"])(this._material)&&this._material.setParameters(this._fastUpdates.materialParameters)}return z["a"].Fast_Update}_defaultElevationInfoNoZ(){return Ft}_createAs3DShape(e,t,r,i,n,a,s){const o=this.getFastUpdateAttrValues(e),c=o?e=>vt(this._fastUpdates.materialParameters,o,e):null,l=[jt["a"].createPointGeometry(At,null,i,n,kt,null,o)],u=Object(Ze["a"])(this._context,t,l,[r],a,this._context.layer.uid,s,c);if(null===u)return null;const d=new x["a"](this,u.object,l,null,null,ke["b"],a);return d.alignedSampledElevation=u.sampledElevation,d.needsElevationUpdates=Object(N["h"])(a.mode)||"absolute-height"===a.mode,d.getScreenSize=this._createScreenSizeGetter(n,c),d.calculateRelativeScreenBounds=e=>r.calculateRelativeScreenBounds(d.getScreenSize(),1,e),Object(Ze["b"])(d,t,this._context.elevationProvider),d}_createAsOverlay(e,t,r,i,a,s){r.renderPriority=this._renderPriority;const o=Object(Pe["e"])();Object(p["t"])(t,o,this._context.overlaySR),o[2]=V["a"];const c=this._context.clippingExtent;if(Object(n["k"])(c)&&!Object(f["g"])(c,o))return null;const l=this.getFastUpdateAttrValues(e),u=l?e=>vt(this._fastUpdates.materialParameters,l,e):null,d=jt["a"].createPointGeometry(At,o,i,a,null,null,l),h=new wt["a"](d,r,{layerUid:s,graphicUid:e.uid,calculateShaderTransformation:u});o[3]=0,Object(Me["c"])(h.boundingSphere,o);const b=new ze(this,[h],null);return b.getScreenSize=this._createScreenSizeGetter(a,u),b.calculateRelativeScreenBounds=e=>r.calculateRelativeScreenBounds(b.getScreenSize(),1,e),b}_createScreenSizeGetter(e,t){const r=this._outlineSize+2;if(this._fastUpdates.enabled){const i=e[0]/this._symbolTextureRatio,n=e[1]/this._symbolTextureRatio;return(e=Object(l["b"])())=>{const a=t(Et);return e[0]=a[0]*i+r,e[1]=a[5]*n+r,e}}{const t=e[0]/this._symbolTextureRatio+r,i=e[1]/this._symbolTextureRatio+r;return(e=Object(l["b"])())=>(e[0]=t,e[1]=i,e)}}_fastVisualVariableConvertOptions(){const e=this._size[0]>this._size[1]?this._size[0]:this._size[1],t=Object(d["h"])(e,e,e),r=Object(Ce["h"])(1),i=e*r;return{modelSize:t,symbolSize:Object(d["h"])(i,i,i),unitInMeters:r,transformation:{anchor:d["c"],scale:d["a"],rotation:d["c"]}}}_getGraphicHash(e){let t="";for(const r of this._cimRequiredFields)t+=r+e.attributes[r];return t}_forEachMaterial(e){Object(n["k"])(this._material)&&e(this._material),this._cimSymbolMaterials.forEach(e)}get test(){return{material:this._material}}}function Lt(e){return e&&"point-3d"===e.type&&e.hasVisibleVerticalOffset()}function Nt(e){return!!Object(n["k"])(e)&&("cross"===e||"x"===e)}Dt.PRIMITIVE_SIZE=It,Dt.elevationModeChangeTypes={definedChanged:N["b"].UPDATE,staysOnTheGround:N["b"].NONE,onTheGroundChanged:N["b"].RECREATE};const Ft={mode:"relative-to-ground",offset:0},kt=Object(Pe["g"])(0,0,0,1);var Ut=r("d408"),zt=r("0a9e"),Bt=r("fc00"),Vt=r("a05b"),Gt=r("b061"),Ht=r("68af"),qt=r("35b3"),Wt=r("badc"),$t=r("b4c8"),Zt=r("a4ee"),Xt=r("7361"),Yt=r("d272"),Jt=r("6a07"),Qt=r("c6d7"),Kt=r("be24"),er=r("8e97"),tr=r("c3a4"),rr=r("ca98"),ir=r("da35"),nr=r("7438"),ar=r("c829"),sr=r("87b7"),or=r("528f"),cr=r("189c");const lr=new Map([[H["a"].POSITION,0],[H["a"].UV0,2],[H["a"].AUXPOS1,3],[H["a"].SIZE,6],[H["a"].SIZEFEATUREATTRIBUTE,6],[H["a"].COLOR,5],[H["a"].COLORFEATUREATTRIBUTE,5],[H["a"].OPACITYFEATUREATTRIBUTE,7]]);class ur extends rr["a"]{constructor(e,t,r){super(e,t,r)}initializeProgram(e){const t=ur.shader.get(),r=this.configuration,i=t.build({oitEnabled:r.transparencyPassType===re["l"].Color,output:r.output,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:r.draped,vvColor:r.vvColor,vvSize:r.vvSize,vvInstancingEnabled:!0,vvOpacity:r.vvOpacity,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new ar["a"](e.rctx,i,lr)}bindPass(e,t){Object(er["b"])(this.program,t.camera.projectionMatrix),this.configuration.output===Vt["a"].Highlight&&Object(Jt["b"])(this.program,t),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(Qt["a"])(this.program,t)),this.program.setUniform1f("intrinsicWidth",e.width),this.program.setUniform4fv("intrinsicColor",e.color),this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform1f("pixelRatio",t.camera.pixelRatio),this.program.setUniform2f("screenSize",t.camera.fullViewport[2],t.camera.fullViewport[3]),Object(Kt["d"])(this.program,e)}bindDraw(e){Object(er["c"])(this.program,e),Object(Yt["b"])(this.program,this.configuration,e.slicePlane,{origin:e.origin,view:e.camera.viewMatrix}),this.program.setUniformMatrix4fv("inverseProjectionMatrix",Object(R["b"])(Xt["a"].get(),e.camera.projectionMatrix)),this.program.rebindTextures()}_makePipelineState(e,t){const r=this.configuration,i=e===re["l"].NONE;return Object(cr["g"])({blending:r.output===Vt["a"].Color||r.output===Vt["a"].Alpha?i?nr["d"]:Object(nr["f"])(e):null,depthTest:{func:Object(nr["g"])(e)},depthWrite:i?r.writeDepth&&cr["e"]:Object(nr["h"])(e),colorWrite:cr["d"],stencilWrite:r.sceneHasOcludees?sr["j"]:null,stencilTest:r.sceneHasOcludees?t?sr["f"]:sr["e"]:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(){return this.configuration.occluder&&(this._occluderPipelineTransparent=Object(cr["g"])({blending:nr["d"],depthTest:sr["a"],depthWrite:null,colorWrite:cr["d"],stencilWrite:null,stencilTest:sr["h"]}),this._occluderPipelineOpaque=Object(cr["g"])({blending:nr["d"],depthTest:sr["a"],depthWrite:null,colorWrite:cr["d"],stencilWrite:sr["i"],stencilTest:sr["g"]}),this._occluderPipelineMaskWrite=Object(cr["g"])({blending:null,depthTest:sr["b"],depthWrite:null,colorWrite:null,stencilWrite:sr["j"],stencilTest:sr["f"]})),this._occludeePipelineState=this._makePipelineState(this.configuration.transparencyPassType,!0),this._makePipelineState(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:this.configuration.occluder?e===Wt["a"].TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent:e===Wt["a"].OCCLUDER_MATERIAL?this._occluderPipelineOpaque:this._occluderPipelineMaskWrite:super.getPipelineState(e,t)}}ur.shader=new tr["a"](or["a"],()=>r.e("chunk-2d225231").then(r.bind(null,"e2b0")));class dr extends ir["a"]{constructor(){super(...arguments),this.output=Vt["a"].Color,this.occluder=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.writeDepth=!1,this.draped=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.sceneHasOcludees=!1,this.transparencyPassType=re["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(Zt["a"])([Object(ir["b"])({count:Vt["a"].COUNT})],dr.prototype,"output",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"occluder",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"slicePlaneEnabled",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"transparent",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"writeDepth",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"draped",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"vvSize",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"vvColor",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"vvOpacity",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"sceneHasOcludees",void 0),Object(Zt["a"])([Object(ir["b"])({count:re["l"].COUNT})],dr.prototype,"transparencyPassType",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"multipassTerrainEnabled",void 0),Object(Zt["a"])([Object(ir["b"])()],dr.prototype,"cullAboveGround",void 0);class hr extends qt["b"]{constructor(e){super(e,fr),this._vertexAttributeLocations=lr,this.techniqueConfig=new dr,this.layout=this.createLayout()}dispose(){}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.draped=t.slot===Wt["a"].DRAPED_MATERIAL,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.occluder=this.parameters.renderOccluded===qt["c"].OccludeAndTransparentStencil,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}intersect(){}createLayout(){const e=Object(Bt["a"])().vec3f(H["a"].POSITION).vec2f(H["a"].UV0).vec3f(H["a"].AUXPOS1);return this.parameters.vvSizeEnabled?e.f32(H["a"].SIZEFEATUREATTRIBUTE):e.f32(H["a"].SIZE),this.parameters.vvColorEnabled?e.f32(H["a"].COLORFEATUREATTRIBUTE):e.vec4f(H["a"].COLOR),this.parameters.vvOpacityEnabled&&e.f32(H["a"].OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new br(this.layout,this.parameters)}requiresSlot(e,t){if(e===Wt["a"].DRAPED_MATERIAL)return!0;if(this.parameters.renderOccluded===qt["c"].OccludeAndTransparentStencil)return e===Wt["a"].OPAQUE_MATERIAL||e===Wt["a"].OCCLUDER_MATERIAL||e===Wt["a"].TRANSPARENT_OCCLUDER_MATERIAL;const r=Object(Gt["b"])(t);return r===Vt["a"].Color||r===Vt["a"].Alpha?e===(this.parameters.writeDepth?Wt["a"].TRANSPARENT_MATERIAL:Wt["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL):e===Wt["a"].OPAQUE_MATERIAL}createGLMaterial(e){return e.output===Vt["a"].Color||e.output===Vt["a"].Alpha||e.output===Vt["a"].Highlight||e.output===Vt["a"].Depth?new pr(e):null}validateParameters(e){e.color&&e.color[3]<1&&(e.transparent=!0)}}class pr extends Ht["a"]{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){return this.updateTexture(this._material.parameters.textureId),this.ensureTechnique(ur,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==Vt["a"].Color&&this._output!==Vt["a"].Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){this.bindTextures(t.program),this.bindTextureScale(t.program),t.bindPass(this._material.parameters,e)}}const fr={width:0,color:[1,1,1,1],placement:"end",textureId:null,writeDepth:!0,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,sceneHasOcludees:!1,...qt["a"],...$t["a"]};class br{constructor(e,t){this.vertexBufferLayout=e,this.parameters=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(){return"begin-end"===this.parameters.placement?12:6}write(e,t,r,i){const n=t.vertexAttributes.get(H["a"].POSITION).data,a=n.length/3;let s=1,o=0;this.parameters.vvSizeEnabled?o=t.vertexAttributes.get(H["a"].SIZEFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(H["a"].SIZE)&&(s=t.vertexAttributes.get(H["a"].SIZE).data[0]);let c=[1,1,1,1],l=0;this.parameters.vvColorEnabled?l=t.vertexAttributes.get(H["a"].COLORFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(H["a"].COLOR)&&(c=t.vertexAttributes.get(H["a"].COLOR).data);let d=0;this.parameters.vvOpacityEnabled&&(d=t.vertexAttributes.get(H["a"].OPACITYFEATUREATTRIBUTE).data[0]);const h=e.transformation,p=new Float32Array(r.buffer);let f=i*(this.vertexBufferLayout.stride/4);const b=(e,t,r,i)=>{if(p[f++]=e[0],p[f++]=e[1],p[f++]=e[2],p[f++]=r[0],p[f++]=r[1],p[f++]=t[0],p[f++]=t[1],p[f++]=t[2],this.parameters.vvSizeEnabled?p[f++]=o:p[f++]=s,this.parameters.vvColorEnabled)p[f++]=l;else{const e=Math.min(4*i,c.length-4);p[f++]=c[e+0],p[f++]=c[e+1],p[f++]=c[e+2],p[f++]=c[e+3]}this.parameters.vvOpacityEnabled&&(p[f++]=d)};let m;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(m||(m={}));const g=(e,t)=>{const r=Object(u["y"])(mr,n[3*e],n[3*e+1],n[3*e+2]),i=gr;let s=e+t;do{Object(u["y"])(i,n[3*s],n[3*s+1],n[3*s+2]),s+=t}while(Object(u["E"])(r,i)&&s>=0&&s<a);h&&(Object(u["s"])(r,r,h),Object(u["s"])(i,i,h)),b(r,i,[-1,-1],e),b(r,i,[1,-1],e),b(r,i,[1,1],e),b(r,i,[-1,-1],e),b(r,i,[1,1],e),b(r,i,[-1,1],e)},y=this.parameters.placement;"begin"!==y&&"begin-end"!==y||g(0,m.ASCENDING),"end"!==y&&"begin-end"!==y||g(a-1,m.DESCENDING)}}const mr=Object(d["f"])(),gr=Object(d["f"])();var yr=r("3544"),Or=r("86ba");const vr=["polyline","polygon","extent"];class _r extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._uniformSize=1}async doLoad(){if(this._vvConvertOptions={modelSize:[1,1,1],symbolSize:[1,1,1],unitInMeters:1,transformation:{anchor:[0,0,0],scale:[1,1,1],rotation:[0,0,0]},supportedTypes:{size:!0,color:!0,opacity:!0,rotation:!1}},this._context.renderer&&this._context.renderer.visualVariables&&this._context.renderer.visualVariables.length>0?this._fastUpdates=bt(this._context.renderer,this._vvConvertOptions):this._fastUpdates={enabled:!1},!this._drivenProperties.size){const e=null!=this.symbolLayer.size?this.symbolLayer.size:Object(Ce["h"])(1);if(e<0)throw new S["a"]("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values");this._uniformSize=e}this._markerTexture=Object(zt["c"])(this._context.sharedResources.textures,this.symbolLayer.marker)}_getMaterialParameters(e,t=!1){var r;const i=Object(n["b"])(this.symbolLayer.marker,e=>e.color),a=Object(n["b"])(this.symbolLayer.material,e=>e.color),s=this._getCombinedOpacityAndColor(t&&i||a);this._patternHidesLine&&!t&&(s[3]=0);const o=s[3],c={width:this._computeMaterialWidth(null==(r=this.symbolLayer)?void 0:r.size),color:s,polygonOffset:!0,join:this.symbolLayer.join||"miter",cap:Object(Ut["e"])(this.symbolLayer.cap||"butt"),transparent:o<1||this.needsDrivenTransparentPass,slicePlaneEnabled:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:Object(yr["b"])(this.symbolLayer.pattern),stippleScaleWithLineWidth:!0};return this._fastUpdates&&this._fastUpdates.visualVariables?{...c,...this._fastUpdates.materialParameters}:c}get lineMaterial(){return Object(n["j"])(this._lineMaterial)&&(this._lineMaterial=new Or["a"](this._getMaterialParameters(!1)),this._context.stage.add(this._lineMaterial)),this._lineMaterial}get ringMaterial(){return Object(n["j"])(this._ringMaterial)&&(this._ringMaterial=new Or["a"](this._getMaterialParameters(!0)),this._context.stage.add(this._ringMaterial)),this._ringMaterial}get wireframeLineMaterial(){return Object(n["j"])(this._wireframeLineMaterial)&&(this._wireframeLineMaterial=new Or["a"]({...this._getMaterialParameters(!1),wireframe:!0}),this._context.stage.add(this._wireframeLineMaterial)),this._wireframeLineMaterial}get wireframeRingMaterial(){return Object(n["j"])(this._wireframeRingMaterial)&&(this._wireframeRingMaterial=new Or["a"]({...this._getMaterialParameters(!0),wireframe:!0}),this._context.stage.add(this._wireframeRingMaterial)),this._wireframeRingMaterial}get markerMaterial(){return Object(n["j"])(this._markerMaterial)&&Object(n["k"])(this.symbolLayer.marker)&&Object(n["k"])(this._markerTexture)&&(this._markerMaterial=new hr({...this._getMaterialParameters(!1,!0),placement:this.symbolLayer.marker.placement,textureId:this._markerTexture.texture.id}),this._context.stage.add(this._markerMaterial)),this._markerMaterial}destroy(){super.destroy(),this._forEachMaterial(e=>this._context.stage.remove(e)),this._lineMaterial=null,this._ringMaterial=null,this._wireframeLineMaterial=null,this._wireframeRingMaterial=null,this._markerMaterial=null,this._markerTexture=Object(n["r"])(this._markerTexture)}_getDrivenSize(e){return this._drivenProperties.size&&e.size?Object(Ce["g"])(Object(D["b"])(e.size)):1}_getSizeFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?Object(k["b"])(this._fastUpdates.visualVariables.size.field,e):null}_getDrivenColor(e){const t=Object(Pe["g"])(1,1,1,1);return this._drivenProperties.color&&e.color&&(t[0]=e.color[0],t[1]=e.color[1],t[2]=e.color[2],e.color.length>0&&(t[3]=e.color[3])),this._drivenProperties.opacity&&e.opacity&&(t[3]=e.opacity),t}_getColorFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color?Object(k["b"])(this._fastUpdates.visualVariables.color.field,e):null}_getOpacityFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.opacity?Object(k["b"])(this._fastUpdates.visualVariables.opacity.field,e):null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,vr,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new F["a"]);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e,this._context.layer.uid):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return z["a"].Recreate_Symbol;if(!mt(this._fastUpdates,t,this._vvConvertOptions))return z["a"].Recreate_Symbol;this._forEachMaterial(e=>e.setParameters(this._fastUpdates.materialParameters))}return z["a"].Fast_Update}prepareSymbolLayerPatch(e){var t,r;if("partial"!==e.diff.type)return;const i=e.diff.diff,a={};"complete"===(null==(t=i.size)?void 0:t.type)&&(a.width=this._computeMaterialWidth(i.size.newValue),delete i.size),"complete"===(null==(r=i.cap)?void 0:r.type)&&(a.cap=Object(Ut["e"])(Object(n["u"])(i.cap.newValue,"butt")),delete i.cap);const s=this._prepareMarkerPatch(e,i);this._prepareMaterialPatch(e,i,s),e.symbolLayerStatePatches.push(()=>this._forEachMaterial(e=>e.setParameters(a)))}layerOpacityChanged(){return this._forEachMaterial((e,t)=>this._updateMaterialLayerOpacity(e,t)),!0}_forEachMaterial(e){Object(n["k"])(this._lineMaterial)&&e(this._lineMaterial),Object(n["k"])(this._ringMaterial)&&e(this._ringMaterial),Object(n["k"])(this._wireframeLineMaterial)&&e(this._wireframeLineMaterial),Object(n["k"])(this._wireframeRingMaterial)&&e(this._wireframeRingMaterial),Object(n["k"])(this._markerMaterial)&&e(this._markerMaterial,!0)}_updateMaterialLayerOpacity(e,t=!1){const r=e.parameters.color,i=Object(n["i"])(this.symbolLayer,"material","color"),a=this._patternHidesLine&&!t?0:this._getCombinedOpacity(i),s=a<1||this.needsDrivenTransparentPass,o=[r[0],r[1],r[2],a];e.setParameters({color:o,transparent:s})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,n=Object(N["e"])(_r.elevationModeChangeTypes,r,i);if(n!==N["b"].UPDATE)return n;const a=Object(N["h"])(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){const e={slicePlaneEnabled:this._context.slicePlaneEnabled};return this._forEachMaterial(t=>t.setParameters(e)),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_getGeometryAsPolygonOrPolyline(e){switch(e.type){case"extent":if(e instanceof q["a"])return h["a"].fromExtent(e);break;case"polygon":case"polyline":return e}return null}_createAs3DShape(e,t,r){const i=e.graphic,a=this._getGeometryAsPolygonOrPolyline(i.geometry),s="polygon"===a.type?a.rings:a.paths,o=new Array,c=new Array,l=new Array,u=Object(f["h"])(),d=Object(Ut["c"])(a,this._context.elevationProvider,this._context.renderCoordsHelper,t),h="polygon"===a.type?"rings":"paths";this._logGeometryCreationWarnings(d,s,h,"LineSymbol3DLayer");for(let m=0;m<d.lines.length;m++){const{position:t,mapPosition:r}=d.lines[m];if(Object(n["k"])(this._context.clippingExtent)&&(Object(f["k"])(u),Object(f["n"])(u,r),!Object(f["w"])(u,this._context.clippingExtent)))continue;const i=this._createGeometry(e,t,r,a.type,jr.ELEVATED);o.push(i),c.push("polygon"===a.type?this.ringMaterial:this.lineMaterial),l.push(M["a"]),ee["a"].LINE_WIREFRAMES&&(o.push(i.cloneShallow()),c.push("polygon"===a.type?this.wireframeRingMaterial:this.wireframeLineMaterial),l.push(M["a"]));const s=this.markerMaterial;Object(n["k"])(s)&&(o.push(i.cloneShallow()),c.push(s),l.push(M["a"]))}if(0===o.length)return null;const p=new ie["a"]({geometries:o,materials:c,transformations:l,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:r}}),b=new x["a"](this,p,o,null,null,ke["d"],t);return b.alignedSampledElevation=d.sampledElevation,b.needsElevationUpdates=Object(N["h"])(t.mode),b}_createGeometry(e,t,r,i,n){const a="polygon"===i?Ut["a"].REMOVE:Ut["a"].KEEP,s=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color,o=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size;return Object(Ut["b"])({overlayInfo:n===jr.DRAPED?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,removeDuplicateStartEnd:a,uniformSize:this._uniformSize,attributeData:{position:t,mapPosition:r,size:o?null:this._getDrivenSize(e.renderingInfo),color:s?null:this._getDrivenColor(e.renderingInfo),sizeFeature:this._getSizeFeatureAttributeData(e.graphic),colorFeature:this._getColorFeatureAttributeData(e.graphic),opacityFeature:this._getOpacityFeatureAttributeData(e.graphic)}})}_createAsOverlay(e,t){const r=e.graphic,i=this._getGeometryAsPolygonOrPolyline(r.geometry),a="polygon"===i.type?i.rings:i.paths,s="polygon"===i.type?this.ringMaterial:this.lineMaterial;s.renderPriority=this._renderPriority;const o=ee["a"].LINE_WIREFRAMES?"polygon"===i.type?this.wireframeRingMaterial:this.wireframeLineMaterial:null,c=this.markerMaterial;Object(n["k"])(o)&&(o.renderPriority=this._renderPriority-.001),Object(n["k"])(c)&&(c.renderPriority=this._renderPriority-.002);const l=new Array,u=Object(f["h"])(),d=Object(f["k"])(),h=Object(Ut["d"])(i,this._context.overlaySR),p="polygon"===i.type?"rings":"paths";this._logGeometryCreationWarnings(h,a,p,"LineSymbol3DLayer");for(const b of h.lines){if(Object(f["k"])(u),Object(f["n"])(u,b.position),!Object(f["w"])(u,this._context.clippingExtent))continue;Object(f["m"])(d,u);const a=this._createGeometry(e,b.position,null,i.type,jr.DRAPED),h=e=>{const i=new wt["a"](a,e,{layerUid:t,graphicUid:r.uid});return l.push(i),i};if(Object(n["k"])(c)){const e=h(c),t=Object(n["t"])(this.symbolLayer.marker).placement;"begin"!==t&&"begin-end"!==t||Object(f["n"])(u,b.position,0,1),"end"!==t&&"begin-end"!==t||Object(f["n"])(u,b.position,b.position.length-3,1),this._updateBoundingSphere(e,u)}const p=h(s);if(this._updateBoundingSphere(p,u),ee["a"].LINE_WIREFRAMES){const e=h(o);this._updateBoundingSphere(e,u)}}return new ze(this,l,d)}_updateBoundingSphere(e,t){Object(Me["l"])(e.boundingSphere,.5*(t[0]+t[3]),.5*(t[1]+t[4]),0,.5*Math.sqrt((t[3]-t[0])*(t[3]-t[0])+(t[4]-t[1])*(t[4]-t[1])))}get _patternHidesLine(){const e=this.symbolLayer.pattern;return Object(n["k"])(e)&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=Object(n["u"])(e,Object(Ce["h"])(1)),this._drivenProperties.size?this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?Object(Ce["g"])(1):1:Object(Ce["g"])(e)}_prepareMaterialPatch(e,t,r){const i=t.material;if(Object(n["j"])(i)||"collection"===i.type)return;const a="complete"===i.type?Object(n["b"])(i.newValue,e=>e.color):"complete"===i.diff.color.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r&&this._patchMaterialColor(Object(Pe["d"])(s),this._markerMaterial,e),this._patternHidesLine&&(s[3]=0),this._patchMaterialColor(s,this._lineMaterial,e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker;if(Object(n["j"])(r)||"partial"!==r.type||Object(n["k"])(r.diff.style)||Object(n["k"])(r.diff.placement)||Object(n["k"])(r.diff.color)&&"complete"!==r.diff.color.type)return!1;const i=r.diff.color;if(Object(n["j"])(i))return delete t.marker,Object(n["j"])(this.symbolLayer)||Object(n["j"])(this.symbolLayer.marker)||Object(n["j"])(this.symbolLayer.marker.color);const a=Object(n["t"])(i.newValue);return Object(n["j"])(a)?(delete t.marker,!0):(this._patchMaterialColor(this._getCombinedOpacityAndColor(a),this._markerMaterial,e),delete t.marker,!1)}_patchMaterialColor(e,t,r){if(Object(n["j"])(t))return;const i=e[3];r.symbolLayerStatePatches.push(()=>t.setParameters({color:e,transparent:i<1||this.needsDrivenTransparentPass}))}}var jr;_r.elevationModeChangeTypes={definedChanged:N["b"].RECREATE,staysOnTheGround:N["b"].NONE,onTheGroundChanged:N["b"].RECREATE},function(e){e[e.DRAPED=0]="DRAPED",e[e.ELEVATED=1]="ELEVATED"}(jr||(jr={}));var wr=r("f0ba"),xr=r("83fa"),Tr=r("4554"),Sr=r("caf1"),Er=r("1038"),Ar=r("3748"),Cr=r("d17d");const Rr=["mesh"];class Mr extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._materials=new Map,this._textures=new Map,this.ensureDrapedStatus(!1)}async doLoad(){ee["a"].DRAW_MESH_GEOMETRY_NORMALS&&(this._debugVertexNormalMaterial=new Ar["a"]({color:[1,0,1,1]}),this._debugFaceNormalMaterial=new Ar["a"]({color:[0,1,1,1]}))}destroy(){super.destroy(),this._context.stage.removeMany(Array.from(this._materials.values(),e=>e.material)),this._context.stage.removeMany(Array.from(this._textures.values())),this._materials.clear(),this._textures.clear()}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Rr,"fill on mesh-3d"))return null;const r=this.setGraphicElevationContext(t,new F["a"]),i=e.renderingInfo;return this._createAs3DShape(t,i,r,t.uid)}layerOpacityChanged(e,t){const r=this._getLayerOpacity();return this._materials.forEach(e=>{e.material.setParameters({layerOpacity:r});const t=e.material.parameters;this._setMaterialTransparentParameter(t,e),e.material.setParameters({transparent:t.transparent})}),e.forEach(e=>{const i=t(e);Object(n["k"])(i)&&i.layerOpacityChanged(r,this._context.isAsync)}),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,N["i"])}slicePlaneEnabledChanged(e,t){return this._materials.forEach(e=>{e.material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled})}),e.forEach(e=>{const r=t(e);Object(n["k"])(r)&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const e=this._usePBR();return this._materials.forEach(t=>t.material.setParameters({usePBR:e})),!0}pixelRatioChanged(){return!0}_requiresSymbolVertexColors(){return this._drivenProperties.color||this._drivenProperties.opacity}_colorOrTextureUid(e){return Object(n["j"])(e)?"-":e instanceof Ee["a"]?e.toHex():e.contentHash}_materialPropertiesDefault(e,t){const r=this._requiresSymbolVertexColors(),i=!!e.vertexAttributes.color,n=!!e.vertexAttributes.tangent;return{hasSymbolVertexColors:r,hasVertexColors:i,hasVertexTangents:n,uid:`vc:${i},vt:${n},vct${t},svc:${r}`}}_materialProperties(e,t,r){const i=this._materialPropertiesDefault(e,r);if(!t.material)return i;const{color:n,colorTexture:a,normalTexture:s,doubleSided:o,alphaCutoff:c,alphaMode:l}=t.material,u=this._colorOrTextureUid(n),d=this._colorOrTextureUid(a),h=this._colorOrTextureUid(s);if(i.color=n,i.colorTexture=a,i.normalTexture=s,i.uid=`${i.uid},cmuid:${u},ctmuid:${d},ntmuid:${h},ds:${o},ac:${c},am:${l}`,t.material instanceof xr["a"]){const{metallic:e,roughness:r,metallicRoughnessTexture:n,emissiveColor:a,emissiveTexture:s,occlusionTexture:o}=t.material,c=this._colorOrTextureUid(n),l=this._colorOrTextureUid(a),u=this._colorOrTextureUid(s),d=this._colorOrTextureUid(o);i.metallic=e,i.roughness=r,i.metallicRoughnessTexture=n,i.emissiveColor=a,i.emissiveTexture=s,i.occlusionTexture=o,i.uid=`${i.uid},mrm:${e},mrr:${r},mrt:${c},emuid:${l},etmuid:${u},otmuid:${d}`}return i}_setInternalColorValueParameters(e,t){t.diffuse=Ee["a"].toUnitRGB(e),t.opacity=e.a}_getLoadableTextureResource(e){return e.data?e.data:e.url}_getInternalTextureId(e){const t=this._getInternalTexture(e,re["a"].Opaque);return Object(n["k"])(t)?t.id:null}_getInternalTexture(e,t){const r=this._getLoadableTextureResource(e);if(!r)return null;const i=`${e.contentHash}/${t}`;let n=this._textures.get(i);return n||(n=new xt["a"](r,{mipmap:!0,wrap:this._castTextureWrap(e.wrap),noUnpackFlip:!0,preMultiplyAlpha:t!==re["a"].Opaque}),this._textures.set(i,n),this._context.stage.add(n),this._context.stage.loadImmediate(n)),n}_castTextureWrap(e="repeat"){if("string"==typeof e){const t=this._castTextureWrapIndividual(e);return{s:t,t:t}}return{s:this._castTextureWrapIndividual(e.horizontal),t:this._castTextureWrapIndividual(e.vertical)}}_castTextureWrapIndividual(e){switch(e){case"clamp":return Cr["B"].CLAMP_TO_EDGE;case"mirror":return Cr["B"].MIRRORED_REPEAT;default:return Cr["B"].REPEAT}}_setInternalMaterialParameters(e,t){if(Object(n["k"])(e.color)&&this._setInternalColorValueParameters(e.color,t),Object(n["k"])(e.colorTexture)){const r=this._getInternalTexture(e.colorTexture,t.textureAlphaMode);Object(n["k"])(r)?(t.textureId=r.id,t.textureAlphaPremultiplied=!!r.params.preMultiplyAlpha):t.textureId=void 0}Object(n["k"])(e.normalTexture)&&(t.normalTextureId=this._getInternalTextureId(e.normalTexture)),Object(n["k"])(e.emissiveColor)&&(t.emissiveFactor=Ee["a"].toUnitRGB(e.emissiveColor)),Object(n["k"])(e.emissiveTexture)&&(t.emissiveTextureId=this._getInternalTextureId(e.emissiveTexture)),Object(n["k"])(e.occlusionTexture)&&(t.occlusionTextureId=this._getInternalTextureId(e.occlusionTexture)),Object(n["k"])(e.metallicRoughnessTexture)&&(t.metallicRoughnessTextureId=this._getInternalTextureId(e.metallicRoughnessTexture))}_setExternalMaterialParameters(e){const t=this._drivenProperties.color;let r=Object(n["k"])(this.symbolLayer.material)?this.symbolLayer.material.colorMixMode:null;if(t)e.externalColor=Pe["a"];else{const t=Object(n["k"])(this.symbolLayer.material)?this.symbolLayer.material.color:null;Object(n["k"])(t)?e.externalColor=Ee["a"].toUnitRGBA(t):(r=null,e.externalColor=Pe["a"])}r&&(e.colorMixMode=r),e.castShadows=!!this.symbolLayer.castShadows}_hasTransparentVertexColors(e){const t=e.vertexAttributes.color;if(Object(n["j"])(t))return!1;for(let r=3;r<t.length;r+=4)if(255!==t[r])return!0;return!1}_getOrCreateMaterial(e,t){var r,i,a;const s=null==(r=t.material)?void 0:r.color,o=null==(i=t.material)?void 0:i.colorTexture,c=null==(a=t.material)?void 0:a.alphaMode,l="blend"===c,u=!("opaque"===c)&&(this._hasTransparentVertexColors(e)||Object(n["k"])(s)&&s.a<1||Object(n["k"])(o)&&o.transparent||l),h=this._materialProperties(e,t,u),p=this._materials.get(h.uid);if(p)return p.material;const f={material:null,isComponentTransparent:u,alphaMode:t.material?t.material.alphaMode:"opaque"},b=null==h.metallicRoughnessTexture&&null==h.metallic&&null==h.roughness,m={usePBR:this._usePBR(),isSchematic:b,vertexColors:h.hasVertexColors,symbolColors:h.hasSymbolVertexColors,vertexTangents:h.hasVertexTangents,ambient:d["c"],diffuse:d["a"],opacity:1,doubleSided:!0,doubleSidedType:"winding-order",cullFace:re["c"].None,layerOpacity:this._getLayerOpacity(),slicePlaneEnabled:this._context.slicePlaneEnabled,initTextureTransparent:!0};b||(m.mrrFactors=[null!=h.metallic?h.metallic:1,null!=h.roughness?h.roughness:1,.5]),t.material&&(m.doubleSided=t.material.doubleSided,m.cullFace=t.material.doubleSided?re["c"].None:re["c"].Back,m.textureAlphaCutoff=t.material.alphaCutoff),this._setExternalMaterialParameters(m),this._setMaterialTransparentParameter(m,f),this._setInternalMaterialParameters(h,m);const g=new ne["a"](m);return f.material=g,this._materials.set(h.uid,f),this._context.stage.add(g),g}_usePBR(){return this._context.physicalBasedRenderingEnabled}_setMaterialTransparentParameter(e,t){e.transparent=this.needsDrivenTransparentPass||t.isComponentTransparent||e.layerOpacity<1||e.opacity<1||e.externalColor&&e.externalColor[3]<1,"auto"===t.alphaMode?e.textureAlphaMode=e.transparent?re["a"].MaskBlend:re["a"].Opaque:e.textureAlphaMode="opaque"===t.alphaMode?re["a"].Opaque:"mask"===t.alphaMode?re["a"].Mask:re["a"].Blend}_addDebugNormals(e,t,r,i){const n=t.length,a=e.spatialReference.isGeographic?20015077/180:1,s=.1*Math.max(e.extent.width*a,e.extent.height*a,e.extent.zmax-e.extent.zmin),o=[],c=[],l=[],d=[];for(let f=0;f<n;f++){const e=t[f],r=e.vertexAttributes.get(H["a"].POSITION),i=e.vertexAttributes.get(H["a"].NORMAL),n=e.indices.get(H["a"].POSITION),a=e.indices.get(H["a"].NORMAL),h=r.data,p=i.data;for(let t=0;t<n.length;t++){const e=3*n[t],r=3*a[t];for(let t=0;t<3;t++)o.push(h[e+t]);for(let t=0;t<3;t++)o.push(h[e+t]+p[r+t]*s);if(c.push(c.length),c.push(c.length),t%3==0){this._calculateFaceNormal(h,n,t,Nr),this._getFaceVertices(h,n,t,Ir,Dr,Lr),Object(u["h"])(Ir,Ir,Dr),Object(u["h"])(Ir,Ir,Lr),Object(u["g"])(Ir,Ir,1/3);for(let e=0;e<3;e++)l.push(Ir[e]);for(let e=0;e<3;e++)l.push(Ir[e]+Nr[e]*s);d.push(d.length),d.push(d.length)}}}const h=new G["a"]([[H["a"].POSITION,{data:o,size:3,exclusive:!0}]],[[H["a"].POSITION,new Uint32Array(c)]],re["h"].Line);t.push(h),r.push(this._debugVertexNormalMaterial),i.push(Object(M["c"])(i[0]));const p=new G["a"]([[H["a"].POSITION,{data:l,size:3,exclusive:!0}]],[[H["a"].POSITION,new Uint32Array(d)]],re["h"].Line);t.push(p),r.push(this._debugFaceNormalMaterial),i.push(Object(M["c"])(i[0]))}_createAs3DShape(e,t,r,i){const a=e.geometry;if("mesh"!==a.type)return null;const s=this._createGeometryInfo(a,t);if(!s)return null;const{geometries:o,materials:c,transformations:l,objectTransformation:u}=s;ee["a"].DRAW_MESH_GEOMETRY_NORMALS&&this._addDebugNormals(a,o,c,l);const d=new ie["a"]({geometries:o,materials:c,transformations:l,metadata:{layerUid:this._context.layer.uid,graphicUid:i}});d.transformation=u;const h=this._createEdgeMaterial(),p=Object(n["k"])(h)?{baseMaterial:c[0],edgeMaterials:[h],properties:{mergeGeometries:!0,slicePlaneEnabled:this._context.slicePlaneEnabled}}:null,f=new x["a"](this,d,o,null,null,ke["b"],r,p);return f.needsElevationUpdates=Object(N["i"])(r.mode),f.useObjectOriginAsAttachmentOrigin=!0,f.elevationContext.centerPointInElevationSR=this._getCenterPointInElevationSR(d),f.alignedSampledElevation=Object(ke["b"])(f,f.elevationContext,this._context.elevationProvider,this._context.renderCoordsHelper),f}_getCenterPointInElevationSR(e){const t=Object(m["j"])(0,0,0,this._context.elevationProvider.spatialReference);return Object(p["w"])([e.transformation[12],e.transformation[13],e.transformation[14]],this._context.renderCoordsHelper.spatialReference,t),t}_createComponentNormals(e,t,r,i){switch(r.shading||"flat"){case"source":return this._createComponentNormalsSource(e,t,r,i);case"flat":return this._createComponentNormalsFlat(e,i);case"smooth":return this._createComponentNormalsSmooth(e,i);default:return}}_createComponentNormalsSource(e,t,r,i){if(Object(n["j"])(t))return this._createComponentNormalsFlat(e,i);let a=!1;if(!r.trustSourceNormals)for(let n=0;n<i.length;n+=3){this._calculateFaceNormal(e,i,n,Nr);for(let e=0;e<3;e++){const r=3*i[n+e];Ir[0]=t[r+0],Ir[1]=t[r+1],Ir[2]=t[r+2],Object(u["j"])(Nr,Ir)<0&&(t[r+0]=-t[r+0],t[r+1]=-t[r+1],t[r+2]=-t[r+2],a=!0)}}return{normals:t,indices:i,didFlipNormals:a}}_createComponentNormalsFlat(e,t){const r=new Float32Array(t.length),i=new Uint32Array(3*t.length);for(let n=0;n<t.length;n+=3){const a=this._calculateFaceNormal(e,t,n,Nr);for(let e=0;e<3;e++)r[n+e]=a[e],i[n+e]=n/3}return{normals:r,indices:i,didFlipNormals:!1}}_createComponentNormalsSmooth(e,t){const r={};for(let a=0;a<t.length;a+=3){const i=this._calculateFaceNormal(e,t,a,Nr);for(let e=0;e<3;e++){const n=t[a+e];let s=r[n];s||(s={normal:Object(d["f"])(),count:0},r[n]=s),Object(u["h"])(s.normal,s.normal,i),s.count++}}const i=new Float32Array(3*t.length),n=new Uint32Array(3*t.length);for(let a=0;a<t.length;a++){const e=r[t[a]];1!==e.count&&(Object(u["t"])(e.normal,e.normal),e.count=1);for(let t=0;t<3;t++)i[3*a+t]=e.normal[t];n[a]=a}return{normals:i,indices:n,didFlipNormals:!1}}_getFaceVertices(e,t,r,i,n,a){const s=3*t[r+0],o=3*t[r+1],c=3*t[r+2];i[0]=e[s+0],i[1]=e[s+1],i[2]=e[s+2],n[0]=e[o+0],n[1]=e[o+1],n[2]=e[o+2],a[0]=e[c+0],a[1]=e[c+1],a[2]=e[c+2]}_calculateFaceNormal(e,t,r,i){return this._getFaceVertices(e,t,r,Ir,Dr,Lr),Object(u["l"])(Dr,Dr,Ir),Object(u["l"])(Lr,Lr,Ir),Object(u["i"])(Ir,Dr,Lr),Object(u["t"])(i,Ir),i}_getOrCreateComponents(e){return Object(n["u"])(e.components,zr)}_createPositionBuffer(e,t){let r=e.vertexAttributes.position;const i=t.reprojection===Br.ECEF?t.transformBeforeProject:null;if(Object(n["k"])(i)&&(r=Object(Tr["h"])(r,new Float64Array(r.length),i)),t.reprojection===Br.NONE)return t.needsBufferCopy?new Float64Array(r):r;const a=Object(n["k"])(i)?r:new Float64Array(r.length);return Object(p["p"])(r,e.spatialReference,0,a,this._context.renderCoordsHelper.spatialReference,0,r.length/3),a}_createNormalBuffer(e,t,r){let i=e.vertexAttributes.normal;if(Object(n["j"])(i))return null;const a=r.reprojection===Br.ECEF?r.transformBeforeProject:null;if(Object(n["k"])(a)&&(i=Object(Tr["g"])(i,new Float32Array(i.length),a)),"local"===this._context.graphicsCoreOwner.view.viewingMode||r.reprojection===Br.NONE)return r.needsBufferCopy&&e.vertexAttributes.normal===i?new Float32Array(i):i;const s=e.vertexAttributes.position,o=Object(n["k"])(a)?i:new Float32Array(i.length);return Object(Tr["c"])(i,s,t,e.spatialReference,o)}_createTangentBuffer(e,t,r){let i=e.vertexAttributes.tangent;if(Object(n["j"])(i))return null;const a=r.reprojection===Br.ECEF?r.transformBeforeProject:null;if(Object(n["k"])(a)&&(i=Object(Tr["i"])(i,new Float32Array(i.length),a)),"local"===this._context.graphicsCoreOwner.view.viewingMode||r.reprojection===Br.NONE)return r.needsBufferCopy&&e.vertexAttributes.normal===i?new Float32Array(i):i;const s=e.vertexAttributes.position,o=Object(n["k"])(a)?i:new Float32Array(i.length);return Object(Tr["e"])(i,s,t,e.spatialReference,o)}_createColorBuffer(e){return e.vertexAttributes.color}_createSymbolColorBuffer(e){if(this._requiresSymbolVertexColors()){const t=this._getVertexOpacityAndColor(e),r=Object(Sr["c"])(Object(n["i"])(this.symbolLayer,"material","colorMixMode")),i=new Uint8Array(4);return Object(Sr["b"])(t,r,i),i}return null}_createBuffers(e,t){const r=e.vertexAttributes&&e.vertexAttributes.position;if(!r)return this.logger.warn("Mesh geometry must contain position vertex attributes"),null;const i=e.vertexAttributes.normal,a=e.vertexAttributes.uv,s=e.vertexAttributes.tangent;if(Object(n["k"])(i)&&i.length!==r.length)return this.logger.warn("Mesh normal vertex buffer must contain the same number of elements as the position buffer"),null;if(Object(n["k"])(s)&&s.length/4!=r.length/3)return this.logger.warn("Mesh tangent vertex buffer must contain the same number of elements as the position buffer"),null;if(Object(n["k"])(a)&&a.length/2!=r.length/3)return this.logger.warn("Mesh uv vertex buffer must contain the same number of elements as the position buffer"),null;const o=this._computeReprojectionInfo(e),c=this._createPositionBuffer(e,o),l=this._createColorBuffer(e),u=this._createSymbolColorBuffer(t),d=this._createNormalBuffer(e,c,o),h=this._createTangentBuffer(e,c,o);return{positionBuffer:c,normalBuffer:d,tangentBuffer:h,uvBuffer:a,colorBuffer:l,symbolColorBuffer:u,objectTransformation:o.reprojection===Br.NONE&&Object(n["k"])(o.objectTransformation)?o.objectTransformation:this._transformOriginLocal(e,c,d,h),geometryTransformation:o.reprojection===Br.NONE&&Object(n["k"])(o.geometryTransformation)?o.geometryTransformation:Object(M["d"])()}}_computeReprojectionInfo(e){const t=Object(n["k"])(e.transform),r=t&&e.transform.geographic||this._context.renderCoordsHelper.viewingMode===L["a"].Local?Br.NONE:Br.ECEF;if(t){if(r===Br.NONE){const t=Object(M["d"])();return Object(p["d"])(e.spatialReference,e.transform.origin,t,this._context.renderCoordsHelper.spatialReference),{reprojection:r,objectTransformation:t,geometryTransformation:Object(M["c"])(e.transform.localMatrix),needsBufferCopy:!1}}const t=Object(R["g"])(Object(M["d"])(),e.transform.origin);return Object(R["n"])(t,t,e.transform.localMatrix),{reprojection:r,transformBeforeProject:t,needsBufferCopy:!0}}return{reprojection:r,needsBufferCopy:!0}}_transformOriginLocal(e,t,r,i){const a=this._context.renderCoordsHelper.spatialReference,s=e.anchor;Pr[0]=s.x,Pr[1]=s.y,Pr[2]=s.z;const o=Object(M["d"])();Object(p["d"])(e.spatialReference,Pr,o,a);const c=P["v"].fromTypedArray(t);if(Object(R["b"])(Fr,o),Object(I["e"])(c,c,Fr),Object(n["k"])(r)||Object(n["k"])(i)){if(Object(A["f"])(kr,o),Object(A["p"])(kr,kr),Object(n["k"])(r)){const e=P["u"].fromTypedArray(r);Object(I["a"])(e,e,kr)}if(Object(n["k"])(i)){const e=P["u"].fromTypedArray(i,4*i.BYTES_PER_ELEMENT);Object(I["a"])(e,e,kr)}}return o}_validateFaces(e,t){const r=e.vertexAttributes.position.length/3,i=t.faces;if(i){let e=-1;for(let t=0;t<i.length;t++){const r=i[t];r>e&&(e=r)}if(r<=e)return this.logger.warn(`Vertex index ${e} is out of bounds of the mesh position buffer`),!1}else if(r%3!=0)return this.logger.warn("Mesh position buffer length must be a multiple of 9 if no component faces are defined (3 values per vertex * 3 vertices per triangle)"),!1;return!0}_getOrCreateFaces(e,t){return t.faces?t.faces:Object(Er["d"])(e.vertexAttributes.position.length/3)}_isOutsideClippingArea(e){if(!this._context.clippingExtent)return!1;const t=e.vertexAttributes&&e.vertexAttributes.position;if(!t)return!1;const r=this._context.elevationProvider.spatialReference;let i;const n=t.length/3;return e.spatialReference.equals(r)?i=t:(i=new Float64Array(t.length),Object(p["p"])(e.vertexAttributes.position,e.spatialReference,0,i,r,0,n)),Object(f["k"])(Ur),Object(f["n"])(Ur,i,0,n),!Object(f["w"])(Ur,this._context.clippingExtent)}_createGeometryInfo(e,t){if(!Object(p["b"])(e.spatialReference,this._context.graphicsCoreOwner.view.spatialReference))return this.logger.warn("Geometry spatial reference is not compatible with the view"),null;if(this._isOutsideClippingArea(e))return null;const r=this._createBuffers(e,t);if(Object(n["j"])(r))return null;const{positionBuffer:i,uvBuffer:a,colorBuffer:s,symbolColorBuffer:o,normalBuffer:c,tangentBuffer:l,objectTransformation:u,geometryTransformation:d}=r,h=this._getOrCreateComponents(e),f=[],b=[],m=[];let g=!1;for(const p of h){if(!this._validateFaces(e,p))return null;const t=this._getOrCreateFaces(e,p);if(0===t.length)continue;const r=this._createComponentNormals(i,c,p,t);r.didFlipNormals&&(g=!0);const u=[[H["a"].POSITION,{size:3,data:i,exclusive:!0}],[H["a"].NORMAL,{size:3,data:r.normals,exclusive:!0}]],h=[[H["a"].POSITION,t],[H["a"].NORMAL,r.indices]];Object(n["k"])(s)&&(u.push([H["a"].COLOR,{size:4,data:s,exclusive:!0}]),h.push([H["a"].COLOR,t])),Object(n["k"])(o)&&(u.push([H["a"].SYMBOLCOLOR,{size:4,data:o,exclusive:!0}]),h.push([H["a"].SYMBOLCOLOR,new Uint16Array(t.length)])),Object(n["k"])(a)&&(u.push([H["a"].UV0,{size:2,data:a,exclusive:!0}]),h.push([H["a"].UV0,t])),Object(n["k"])(l)&&(u.push([H["a"].TANGENT,{size:4,data:l,exclusive:!0}]),h.push([H["a"].TANGENT,t]));const y=new G["a"](u,h);f.push(y),b.push(d),m.push(this._getOrCreateMaterial(e,p))}return g&&this.logger.warn("Normals have been automatically flipped to be consistent with the counter clock wise face winding order. It is better to generate mesh geometries that have consistent normals."),{geometries:f,transformations:b,materials:m,objectTransformation:u}}_createEdgeMaterial(){const e={opacity:this._getLayerOpacity()};return Object(K["a"])(this.symbolLayer,e)}}const Pr=Object(d["f"])(),Ir=Object(d["f"])(),Dr=Object(d["f"])(),Lr=Object(d["f"])(),Nr=Object(d["f"])(),Fr=Object(M["d"])(),kr=Object(C["b"])(),Ur=Object(f["h"])(),zr=[new wr["a"]];var Br;!function(e){e[e.NONE=0]="NONE",e[e.ECEF=1]="ECEF"}(Br||(Br={}));var Vr=r("8c11"),Gr=r("af3d"),Hr=r("bea9");class qr{constructor(e,t,r,i){this.graphics3DSymbolLayer=e,this.instanceIndex=t,this.elevationAligner=r,this.elevationContext=i,this.type="lod-instance",this._highlights=new Set,this.alignedSampledElevation=0,this.isElevationSource=!1,this.needsElevationUpdates=!1}initialize(){}setVisibility(e){const t=this.lodRenderer.instanceData;e!==t.getVisible(this.instanceIndex)&&t.setVisible(this.instanceIndex,e)}destroy(){null!=this.instanceIndex&&(this.lodRenderer.instanceData.removeInstance(this.instanceIndex),this.graphics3DSymbolLayer.notifyDestroyGraphicLayer(this))}alignWithElevation(e,t,r){if(this.elevationAligner){Object(O["g"])(this.elevationContext.featureExpressionInfoContext,r);const i=this.elevationAligner(this,this.elevationContext,e,t);Object(n["k"])(i)&&(this.alignedSampledElevation=i)}}getCenterObjectSpace(e=Object(d["f"])()){return this.lodRenderer.instanceData.getCombinedLocalTransform(this.instanceIndex,Yr),Object(u["s"])(e,this.lodRenderer.baseBoundingSphere.center,Yr)}getBoundingBoxObjectSpace(e=Object(f["h"])()){this.lodRenderer.instanceData.getCombinedLocalTransform(this.instanceIndex,Yr);const t=this.lodRenderer.baseBoundingBox;Object(f["k"])(e);for(let r=0;r<8;++r)Object(u["y"])($r,0==(1&r)?t[0]:t[3],0==(2&r)?t[1]:t[4],0==(4&r)?t[2]:t[5]),Object(u["s"])($r,$r,Yr),Object(f["r"])(e,$r);return e}computeAttachmentOrigin(e){this.lodRenderer.instanceData.getGlobalTransform(this.instanceIndex,Yr),e.render.origin[0]+=Yr[12],e.render.origin[1]+=Yr[13],e.render.origin[2]+=Yr[14],e.render.num++}async getProjectedBoundingBox(e,t,r,i,a){const s=this.getBoundingBoxObjectSpace(a),o=Xr,c=Object(f["x"])(s)?1:o.length;this.lodRenderer.instanceData.getGlobalTransform(this.instanceIndex,Yr);for(let n=0;n<c;n++){const e=o[n];$r[0]=s[e[0]],$r[1]=s[e[1]],$r[2]=s[e[2]],Object(u["s"])($r,$r,Yr),Wr[3*n+0]=$r[0],Wr[3*n+1]=$r[1],Wr[3*n+2]=$r[2]}if(!e(Wr,0,c))return null;Object(f["k"])(s);let l=null;this.calculateRelativeScreenBounds&&(l=this.calculateRelativeScreenBounds());for(let n=0;n<3*c;n+=3){for(let e=0;e<3;e++)s[e]=Math.min(s[e],Wr[n+e]),s[e+3]=Math.max(s[e+3],Wr[n+e]);l&&r.push({location:Wr.slice(n,n+3),screenSpaceBoundingRect:l})}if(t&&(Object(f["e"])(s,Zr),"absolute-height"!==this.elevationContext.mode)){let e;const r=Object(U["d"])(s,t);try{e=await t.service.queryElevation(Zr[0],Zr[1],i,r,"ground")}catch(d){}Object(n["k"])(e)&&Object(f["z"])(s,0,0,-this.alignedSampledElevation+e)}return s}addObjectState(e,t){if(e===re["f"].Highlight){const r=new Hr["a"](e);this._addHighlightId(r),t.addExternal(e=>{this._removeHighlightId(e)},r)}}removeObjectState(e){this._highlights.forEach(t=>e.remove(t))}_addHighlightId(e){this._highlights.add(e),this.lodRenderer.instanceData.setHighlight(this.instanceIndex,!0)}_removeHighlightId(e){this._highlights.delete(e),this.lodRenderer.instanceData.setHighlight(this.instanceIndex,this._highlights.size>0)}get lodRenderer(){return this.graphics3DSymbolLayer.lodRenderer}}const Wr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$r=Object(d["f"])(),Zr=Object(d["f"])(),Xr=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]],Yr=Object(M["d"])();var Jr=r("5e82"),Qr=r("f33e");function Kr(e){const t=[];return e.stageResources.geometries.forEach((r,i)=>{const n=e.stageResources.materials[i],a=e.stageResources.textures;t.push({material:n,geometry:r,textures:a})}),{components:t,minScreenSpaceRadius:e.lodThreshold,pivotOffset:e.pivotOffset}}function ei(e){return{levels:e.map(e=>Kr(e))}}function ti(e,t=ii){const r=Object(Qr["a"])(e);return Math.sqrt(r/(t*Math.PI))}function ri(e){e.levels.forEach(e=>{e.minScreenSpaceRadius||(e.minScreenSpaceRadius=ti(e))})}const ii=.05;var ni,ai=r("94a6"),si=r("9ac8"),oi=r("a803"),ci=r("2ebb"),li=r("171c"),ui=r("fa1e"),di=r("1942"),hi=r("0bde"),pi=r("614d"),fi=r("1153"),bi=r("ce6d"),mi=r("680b");function gi(e){let t=Object(Bt["a"])().mat4f64(H["a"].LOCALTRANSFORM).mat4f64(H["a"].GLOBALTRANSFORM).vec4f64(H["a"].BOUNDINGSPHERE).vec3f64(H["a"].MODELORIGIN).mat3f(H["a"].MODEL).mat3f(H["a"].MODELNORMAL).vec2f(H["a"].MODELSCALEFACTORS);return e.indexOf("color")>=0&&(t=t.vec4f(H["a"].COLOR)),e.indexOf("featureAttribute")>=0&&(t=t.vec4f(H["a"].FEATUREATTRIBUTE)),t=t.u8(H["a"].STATE).u8(H["a"].LODLEVEL).alignTo(8),t}!function(e){e[e.ALLOCATED=1]="ALLOCATED",e[e.DEFAULT_ACTIVE=2]="DEFAULT_ACTIVE",e[e.VISIBLE=4]="VISIBLE",e[e.HIGHLIGHT=8]="HIGHLIGHT",e[e.HIGHLIGHT_ACTIVE=16]="HIGHLIGHT_ACTIVE",e[e.REMOVE=32]="REMOVE",e[e.TRANSFORM_CHANGED=64]="TRANSFORM_CHANGED",e[e.ACTIVE=18]="ACTIVE"}(ni||(ni={}));class yi{constructor(e){this.localTransform=e.getField(H["a"].LOCALTRANSFORM,P["i"]),this.globalTransform=e.getField(H["a"].GLOBALTRANSFORM,P["i"]),this.modelOrigin=e.getField(H["a"].MODELORIGIN,P["v"]),this.model=e.getField(H["a"].MODEL,P["f"]),this.modelNormal=e.getField(H["a"].MODELNORMAL,P["f"]),this.modelScaleFactors=e.getField(H["a"].MODELSCALEFACTORS,P["m"]),this.boundingSphere=e.getField(H["a"].BOUNDINGSPHERE,P["D"]),this.color=e.getField(H["a"].COLOR,P["C"]),this.featureAttribute=e.getField(H["a"].FEATUREATTRIBUTE,P["C"]),this.state=e.getField(H["a"].STATE,P["l"]),this.lodLevel=e.getField(H["a"].LODLEVEL,P["l"])}}class Oi extends bi["a"]{constructor(e,t){super(),this._capacity=0,this._size=0,this._next=0,this._layout=gi(e),this._shaderTransformation=t}get capacity(){return this._capacity}get size(){return this._size}get buffer(){return this._buffer.buffer}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,ni.ALLOCATED),this._size++,this.emit("instance-added",{index:e}),e}removeInstance(e){const t=this._view.state;Object(fi["a"])(e>=0&&e<this._capacity&&t.get(e)&ni.ALLOCATED,"invalid instance handle"),this._getStateFlag(e,ni.ACTIVE)?this._setStateFlags(e,ni.REMOVE):this.freeInstance(e),this.emit("instance-removed",{index:e})}freeInstance(e){const t=this._view.state;Object(fi["a"])(e>=0&&e<this._capacity&&t.get(e)&ni.ALLOCATED,"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=ji,i=wi;t.localTransform.getMat(e,xi),t.globalTransform.getMat(e,Ti);const n=Object(R["n"])(Ti,Ti,xi);Object(u["y"])(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),Object(A["f"])(i,n),t.model.setMat(e,i);const a=Object(mi["k"])(ji,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),Object(A["e"])(i,i),Object(A["p"])(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,ni.TRANSFORM_CHANGED),this.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,wi),r.modelOrigin.getVec(e,ji),t[0]=wi[0],t[1]=wi[1],t[2]=wi[2],t[3]=0,t[4]=wi[3],t[5]=wi[4],t[6]=wi[5],t[7]=0,t[8]=wi[6],t[9]=wi[7],t[10]=wi[8],t[11]=0,t[12]=ji[0],t[13]=ji[1],t[14]=ji[2],t[15]=1}applyShaderTransformation(e,t){this._shaderTransformation&&this._shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),this._shaderTransformation&&this._shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){return this._view.localTransform.getMat(e,t),this._shaderTransformation&&this._shaderTransformation.applyTransform(this,e,t),t}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);if(this._shaderTransformation){const r=this._shaderTransformation.scaleFactor(ji,this,e);t*=Math.max(r[0],r[1],r[2])}return t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);if(this._shaderTransformation){const r=this._shaderTransformation.scaleFactor(ji,this,e);r.sort(),t*=r[1]}return t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute.getVec(e,t)}setColor(e,t){this._view.color.setVec(e,t)}getColor(e,t){this._view.color.getVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,ni.VISIBLE,t),this.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,ni.VISIBLE)}setHighlight(e,t){t!==this.getHighlight(e)&&(this._setStateFlag(e,ni.HIGHLIGHT,t),this.emit("instance-highlight-changed",{index:e}))}getHighlight(e){return this._getStateFlag(e,ni.HIGHLIGHT)}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){const e=Math.max(vi,Math.floor(this._capacity*_i)),t=this._layout.createBuffer(e);if(this._buffer){const e=new Uint8Array(this._buffer.buffer);new Uint8Array(t.buffer).set(e)}this._capacity=e,this._buffer=t,this._view=new yi(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;e.get(t)&ni.ALLOCATED;)t=(t+1)%this._capacity;return this._next=(t+1)%this._capacity,t}}const vi=1024,_i=2,ji=Object(d["f"])(),wi=Object(C["b"])(),xi=Object(M["d"])(),Ti=Object(M["d"])();var Si=r("f895");class Ei extends hi["b"]{constructor(e,t){super(e=>Object(Si["n"])(this._instanceData.view.boundingSphere.getVec(e,this._tmpSphere)),{maximumDepth:25}),this._tmpSphere=Object(Si["c"])(),this._tmpMat4=Object(M["d"])(),this._instanceData=e,this._boundingSphere=t}addInstance(e){const t=this._instanceData.view.boundingSphere,r=this._instanceData.getCombinedModelTransform(e,this._tmpMat4);Object(u["s"])(this._tmpSphere,this._boundingSphere.center,r),this._tmpSphere[3]=this._boundingSphere.radius*Object(mi["i"])(r),t.setVec(e,this._tmpSphere),this.add([e])}removeInstance(e){this.remove([e])}}class Ai{constructor(e,t){this.thresholdScale=1,this._camera=new li["b"],this._worldSpaceRadius=e,this._thresholds=t.map(e=>e)}updateCamera(e){this._camera.copyFrom(e)}selectLevel(e,t){const r=this._camera.computeScreenPixelSizeAt(e),i=this._worldSpaceRadius*t/r,n=this._thresholds;let a=-1;for(let s=0;s<n.length;++s)i>=n[s]*this.thresholdScale&&(a=s);return a}}var Ci=r("9250"),Ri=r("7ce4"),Mi=r("0fa6");class Pi{constructor(e,t){const r=e.renderContext.rctx,{geometry:i,material:n}=t;this._materialRepository=e.materialRep,n.setParameters({instancedDoublePrecision:!0});const a=n.createBufferWriter(),s=a.vertexBufferLayout,o=a.elementCount(i),c=a.allocate(o);a.write({},i,c,0),this.geometry=i,this.material=n,this.glMaterials=new Gt["a"](n,this._materialRepository),this.vertexBufferLayout=s,this.vbo=Ri["a"].createVertex(r,Cr["D"].STATIC_DRAW,c.buffer),this.vao=new Mi["a"](r,ui["a"],{geometry:Object(ci["a"])(s)},{geometry:this.vbo}),this.vertexCount=o}destroy(){this.glMaterials.destroy(),this.vbo.dispose(),this.vao.dispose()}get boundingInfo(){return this.geometry.boundingInfo}get triangleCount(){return this.vertexCount/3}intersect(e,t,r,i,n,a){const s=this.geometry.id;this.material.intersect(this.geometry,null,e.transform.transform,e,r,i,(r,i,o,c,l)=>{if(r>=0){if(null!=t&&!t(e.rayBegin,e.rayEnd,r))return;const c={layerUid:a.layerUid,graphicUid:a.graphicUid(n),geometryId:s,triangleNr:o};if((null==e.results.min.drapedLayerOrder||l>=e.results.min.drapedLayerOrder)&&(null==e.results.min.dist||r<e.results.min.dist)&&e.results.min.set(di["b"].LOD,c,r,i,e.transform.transform,l),e.options.store!==di["c"].MIN&&(null==e.results.max.drapedLayerOrder||l>=e.results.max.drapedLayerOrder)&&(null==e.results.max.dist||r>e.results.max.dist)&&e.results.max.set(di["b"].LOD,c,r,i,e.transform.transform,l),e.options.store===di["c"].ALL){const t=Object(Ci["c"])(e.results.min.ray);t.set(di["b"].LOD,c,r,i,e.transform.transform,l),e.results.all.push(t)}}})}}class Ii{constructor(e,t){this.minScreenSpaceRadius=e,this.components=t}static async create(e,t,r){const i=await Promise.allSettled(t.components.map(t=>e.schedule(()=>new Pi(e,t),r))),n=i.map(e=>"fulfilled"===e.status?e.value:null).filter(e=>e);if(Object(a["n"])(r)||n.length!==i.length){n.forEach(e=>e.destroy()),Object(a["v"])(r);for(const e of i)if("rejected"===e.status)throw e.reason}return new Ii(t.minScreenSpaceRadius,n)}destroy(){this.components.forEach(e=>e.destroy())}intersect(e,t,r,i,n,a){this.components.forEach(s=>s.intersect(e,t,r,i,n,a))}get boundingBox(){if(Object(n["j"])(this._boundingBox)){const e=Object(f["k"])();this.components.forEach(t=>{Object(n["k"])(t.boundingInfo)&&(Object(f["r"])(e,t.boundingInfo.bbMin),Object(f["r"])(e,t.boundingInfo.bbMax))}),this._boundingBox=e}return this._boundingBox}get boundingSphere(){if(Object(n["j"])(this._boundingSphere)){const e=this.boundingBox,t=Object(d["f"])();Object(f["e"])(e,t),this._boundingSphere={center:t,radius:.5*Object(f["j"])(e)}}return this._boundingSphere}get triangleCount(){return this.components.reduce((e,t)=>e+t.triangleCount,0)}}class Di{constructor(e,t,r){this._elementSize=t,this._buffer=Ri["a"].createVertex(e,Cr["D"].STATIC_DRAW),this.resize(r)}destroy(){this._buffer.dispose()}get elementSize(){return this._elementSize}get capacity(){return this._capacity}get array(){return this._array}get buffer(){return this._buffer}get memoryUsage(){return{cpu:this._capacity*this._elementSize,gpu:this._capacity*this._elementSize}}copyRange(e,t,r,i=0){const n=new Uint8Array(this.array,e*this.elementSize,(t-e)*this.elementSize);new Uint8Array(r.array,i*this.elementSize).set(n)}transferAll(){this._buffer.setData(this._array)}transferRange(e,t){const r=e*this._elementSize,i=t*this._elementSize;this._buffer.setSubData(this._array,r,r,i)}resize(e){const t=e*this._elementSize,r=new ArrayBuffer(t);this._array&&(e>=this._capacity?new Uint8Array(r).set(new Uint8Array(this._array)):new Uint8Array(r).set(new Uint8Array(this._array).subarray(0,e*this._elementSize))),this._array=r,this._buffer.setSize(t),this._capacity=e}}class Li{constructor(e){this.modelOriginHi=e.getField(H["a"].MODELORIGINHI,P["u"]),this.modelOriginLo=e.getField(H["a"].MODELORIGINLO,P["u"]),this.model=e.getField(H["a"].MODEL,P["f"]),this.modelNormal=e.getField(H["a"].MODELNORMAL,P["f"]),this.color=e.getField(H["a"].INSTANCECOLOR,P["C"]),this.featureAttribute=e.getField(H["a"].INSTANCEFEATUREATTRIBUTE,P["C"])}}class Ni{constructor(e,t){this._headIndex=0,this._tailIndex=0,this._captureFirstIndex=!0,this._updating=!1,this._prevHeadIndex=0,this._resized=!1,this._rctx=e,this._instanceBufferLayout=t,this._elementSize=t.stride,this._capacity=1}destroy(){this._buffer&&this._buffer.destroy()}get buffer(){return this._buffer.buffer}get view(){return this._view}get capacity(){return this._capacity}get size(){const e=this._headIndex,t=this._tailIndex;return e>=t?e-t:e+this._capacity-t}get isEmpty(){return this._headIndex===this._tailIndex}get isFull(){return this._tailIndex===(this._headIndex+1)%this._capacity}get headIndex(){return this._headIndex}get tailIndex(){return this._tailIndex}get firstIndex(){return this._firstIndex}get memoryUsage(){return this._buffer?this._buffer.memoryUsage:{cpu:0,gpu:0}}reset(){this._headIndex=0,this._tailIndex=0,this._firstIndex=null}startUpdateCylce(){this._captureFirstIndex=!0}beginUpdate(){Object(fi["a"])(!this._updating,"already updating"),this._updating=!0,this._prevHeadIndex=this._headIndex}endUpdate(){Object(fi["a"])(this._updating,"not updating"),this.size<Ui*this.capacity&&this._shrink(),this._resized?(this._buffer.transferAll(),this._resized=!1):this._transferRange(this._prevHeadIndex,this._headIndex),this._updating=!1}allocateHead(){Object(fi["a"])(this._updating,"not updating"),this.isFull&&this._grow();const e=this.headIndex;return this._captureFirstIndex&&(this._firstIndex=e,this._captureFirstIndex=!1),this._incrementHead(),Object(fi["a"])(this._headIndex!==this._tailIndex,"invalid pointers"),e}freeTail(){Object(fi["a"])(this._updating,"not updating"),Object(fi["a"])(this.size>0,"invalid size");const e=this._tailIndex===this._firstIndex;this._incrementTail(),e&&(this._firstIndex=this._tailIndex)}_grow(){const e=Math.max(Fi,Math.floor(this._capacity*ki));this._resize(e)}_shrink(){const e=Math.max(Fi,Math.floor(this._capacity*zi));this._resize(e)}_resize(e){if(Object(fi["a"])(this._updating,"not updating"),e===this._capacity)return;const t=new Di(this._rctx,this._elementSize,e);if(this._buffer){this._firstIndex&&(this._firstIndex=(this._firstIndex+this._capacity-this._tailIndex)%this._capacity);const e=this.size,r=this._compactInstances(t);Object(fi["a"])(r===e,"invalid compaction"),this._buffer.destroy(),this._tailIndex=0,this._headIndex=r,this._prevHeadIndex=0}this._resized=!0,this._capacity=e,this._buffer=t,this._view=new Li(this._instanceBufferLayout.createView(this._buffer.array))}_compactInstances(e){const t=this._headIndex,r=this._tailIndex;return r<t?(this._buffer.copyRange(r,t,e),t-r):r>t?(this._buffer.copyRange(r,this._capacity,e),t>0&&this._buffer.copyRange(0,t,e,this._capacity-r),t+(this._capacity-r)):0}_incrementHead(e=1){this._headIndex=(this._headIndex+e)%this._capacity}_incrementTail(e=1){this._tailIndex=(this._tailIndex+e)%this._capacity}_transferRange(e,t){e<t?this._buffer.transferRange(e,t):e>t&&(t>0&&this._buffer.transferRange(0,t),this._buffer.transferRange(e,this._capacity))}}const Fi=1024,ki=2,Ui=.3,zi=.5;var Bi=r("7c51"),Vi=r("b623"),Gi=r("8539");let Hi=function(e){const t=e.baseBoundingSphere.radius,r=e.levels.map(e=>e.minScreenSpaceRadius);return new Ai(t,r)};class qi{constructor(e,t,r,i){this.type=di["b"].LOD,this.isGround=!1,this._inverseViewport=Object(l["b"])(),this._levels=[],this._defaultRenderInstanceData=[],this._highlightRenderInstanceData=[],this._instanceIndex=0,this._slicePlane=!1,this._enableLevelSelection=!0,this._lastCamera=new li["b"],this._updateCyclesWithStaticCamera=-1,this._needFullCycle=!1,this.slots=[Wt["a"].OPAQUE_PLUGIN,Wt["a"].TRANSPARENT_PLUGIN],this.canRender=!0,this._symbol=e,this._optionalFields=t,this._metadata=r,this._instanceBufferLayout=Object(ne["b"])({instancedDoublePrecision:!0,instanced:t}),this._glInstanceBufferLayout=Object(ci["a"])(this._instanceBufferLayout,1),this._instanceData=new Oi(this._optionalFields,i),this._instanceData.on("instance-added",()=>this._requestUpdateCycle()),this._instanceData.on("instance-removed",()=>this._requestUpdateCycle()),this._instanceData.on("instance-transform-changed",e=>{this._requestUpdateCycle(),this._metadata.notifyGraphicGeometryChanged(e.index)}),this._instanceData.on("instance-visibility-changed",e=>{this._requestUpdateCycle(!0),this._metadata.notifyGraphicVisibilityChanged(e.index)}),this._instanceData.on("instance-highlight-changed",()=>this._requestUpdateCycle(!0)),this._enableLevelSelection=this._symbol.levels.length>1}get levels(){return this._levels}get baseBoundingBox(){return this._levels[this._levels.length-1].boundingBox}get baseBoundingSphere(){return this._levels[this._levels.length-1].boundingSphere}get baseMaterial(){return this._levels[this._levels.length-1].components[0].material}get slicePlaneEnabled(){return this._slicePlane}set slicePlaneEnabled(e){this._slicePlane=e}get layerUid(){return this._metadata.layerUid}get instanceData(){return this._instanceData}get memoryUsage(){const e={cpu:0,gpu:0};return this._defaultRenderInstanceData.forEach(t=>{const r=t.memoryUsage;e.cpu+=r.cpu,e.gpu+=r.gpu}),this._highlightRenderInstanceData.forEach(t=>{const r=t.memoryUsage;e.cpu+=r.cpu,e.gpu+=r.gpu}),e}get renderStats(){const e=this._instanceData.size,t=[];return this._levels.forEach((e,r)=>{const i=this._defaultRenderInstanceData[r],n=this._highlightRenderInstanceData[r],a=i.size+n.size,s=e.triangleCount;t.push({renderedInstances:a,renderedTriangles:a*s,trianglesPerInstance:s})}),{totalInstances:e,renderedInstances:t.reduce((e,t)=>e+t.renderedInstances,0),renderedTriangles:t.reduce((e,t)=>e+t.renderedTriangles,0),levels:t}}async initializeRenderContext(e,t){this._context=e;const r=e.renderContext.rctx,i=await Promise.allSettled(this._symbol.levels.map(i=>(this._defaultRenderInstanceData.push(new Ni(r,this._instanceBufferLayout)),this._highlightRenderInstanceData.push(new Ni(r,this._instanceBufferLayout)),Ii.create(e,i,t)))),n=i.map(e=>"fulfilled"===e.status?e.value:null).filter(e=>e);if(Object(a["n"])(t)||n.length!==i.length){n.forEach(e=>e.destroy()),Object(a["v"])(t);for(const e of i)if("rejected"===e.status)throw e.reason}this._levels=n,this._levelSelector=Hi(this)}uninitializeRenderContext(){this._invalidateOctree(),this._levels.forEach(e=>e.destroy()),this._defaultRenderInstanceData.forEach(e=>e.destroy()),this._highlightRenderInstanceData.forEach(e=>e.destroy())}get needsTransparentPass(){return this._levels.some(e=>e.components.some(e=>e.material.requiresSlot(Wt["a"].TRANSPARENT_MATERIAL)))}get needsHighlight(){return this._highlightRenderInstanceData.some(e=>e.size>0)}prepareRender(e,t){if(ee["a"].LOD_INSTANCE_RENDERER_DISABLE_UPDATES)return;if(this._enableLevelSelection){const e=t.equals(this._lastCamera);this._lastCamera.copyFrom(t),e||this._requestUpdateCycle()}const r=this._needFullCycle?this._instanceData.size:2e3;this._needFullCycle=!1,this._updateInstances(t,r),this.needsUpdates&&this._context.requestRender()}render(e){var t,r,i,n;const a=e.slot===Wt["a"].OPAQUE_PLUGIN?Wt["a"].OPAQUE_MATERIAL:e.slot===Wt["a"].TRANSPARENT_PLUGIN?Wt["a"].TRANSPARENT_MATERIAL:null;if(!a||!this.baseMaterial.isVisible()||!this.baseMaterial.isVisibleInPass(e.pass))return;const s=e.camera;this._inverseViewport[0]=1/s.fullViewport[2],this._inverseViewport[1]=1/s.fullViewport[3];const o={slot:a,origin:[0,0,0],camera:s,inverseViewport:this._inverseViewport,shadowMap:e.shadowMap,shadowMappingEnabled:e.shadowMap.enabled,ssaoHelper:e.ssaoHelper,ssaoEnabled:e.ssaoHelper.enabled,screenToWorldRatio:null,screenToPCSRatio:null,slicePlane:e.sliceHelper&&e.sliceHelper.plane,hudVisibilityTexture:null!=(t=null==(r=e.offscreenRenderingHelper)?void 0:r.hudVisibilityTexture)?t:null,highlightDepthTexture:null!=(i=null==(n=e.offscreenRenderingHelper)?void 0:n.depthTexture)?i:null,hasOccludees:!1,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:M["a"],ssrEnabled:!1,lighting:e.scenelightingData,transparencyPassType:e.transparencyPassType,terrainLinearDepthTexture:e.multipassTerrainParams.terrainLinearDepthTexture,geometryLinearDepthTexture:e.multipassGeometryParams.geometryLinearDepthTexture,multipassTerrainEnabled:e.multipassTerrainParams.multipassTerrainEnabled,cullAboveGround:e.multipassTerrainParams.cullAboveGround,multipassGeometryEnabled:e.multipassGeometryParams.multipassGeometryEnabled,highlightColorTexture:null,cloudsCompositionParams:null,hasFillLights:e.hasFillLights};e.rctx.bindVAO();const c=e.pass!==pi["a"].MATERIAL_HIGHLIGHT&&e.pass!==pi["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT,l=e.pass!==pi["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT;c&&this._renderComponents(e,a,o,this._defaultRenderInstanceData),l&&this._renderComponents(e,a,o,this._highlightRenderInstanceData)}intersect(e,t,r,i){if(!this.baseMaterial.isVisible())return;const n=Object(d["f"])();Object(u["l"])(n,i,r);const a=n=>{this._instanceData.getCombinedModelTransform(n,Yi),e.transform.set(Yi),Object(u["s"])(Ji,r,e.transform.inverse),Object(u["s"])(Qi,i,e.transform.inverse);const a=this._instanceData.getState(n),s=this._instanceData.getLodLevel(n);Object(fi["a"])(a&ni.ACTIVE,"invalid instance state"),Object(fi["a"])(s>=0&&s<this._levels.length,"invaid lod level"),this._levels[s].intersect(e,t,Ji,Qi,n,this._metadata)};this.baseMaterial.parameters.verticalOffset?this.octree.forEach(a):this.octree.forEachAlongRay(r,n,a)}queryDepthRange(e){return this._queryDepthRangeOctree(e)}notifyShaderTransformationChanged(){this._invalidateOctree()}_requestUpdateCycle(e=!1){this._updateCyclesWithStaticCamera=-1,e&&(this._needFullCycle=!0),this.needsUpdates&&this._context.requestRender()}get needsUpdates(){return this._instanceData.size>0&&this._updateCyclesWithStaticCamera<1}get octree(){return this._octree||(this._octree=this._buildOctree()),this._octree}_invalidateOctree(){this._octree&&(this._octree.destroy(),this._octree=null)}_buildOctree(){const e=new Ei(this._instanceData,this.baseBoundingSphere),t=this._instanceData,r=t.view?t.view.state:null;for(let i=0;i<this._instanceData.capacity;++i)r.get(i)&ni.ACTIVE&&e.addInstance(i);return e}_queryDepthRangeOctree(e){const t=e.eye,r=e.viewForward,i=this.octree.findClosest(r,hi["a"].FRONT_TO_BACK,e.frustum),n=this.octree.findClosest(r,hi["a"].BACK_TO_FRONT,e.frustum);if(null!=i&&null!=n){this._instanceData.view.boundingSphere.getVec(i,Xi),Object(u["l"])(Xi,Xi,t);const a=Object(u["j"])(Xi,r)-Xi[3];this._instanceData.view.boundingSphere.getVec(n,Xi),Object(u["l"])(Xi,Xi,t);const s=Object(u["j"])(Xi,r)+Xi[3];return{near:Math.max(e.near,a),far:Math.min(e.far,s)}}return{near:1/0,far:-1/0}}_startUpdateCycle(){this._updateCyclesWithStaticCamera++,this._defaultRenderInstanceData.forEach(e=>{e.startUpdateCylce()}),this._highlightRenderInstanceData.forEach(e=>{e.startUpdateCylce()}),this.needsUpdates&&this._context.requestRender()}_updateInstances(e,t){const r=this._enableLevelSelection,i=this._levelSelector;i.updateCamera(e),this._defaultRenderInstanceData.forEach(e=>{e.beginUpdate()}),this._highlightRenderInstanceData.forEach(e=>{e.beginUpdate()});const n=this._instanceData,a=this._instanceData.view,s=n.size,o=n.capacity;let c=this._instanceIndex;t=Math.min(s,t);for(let l=0;l<t;++l){0===c&&this._startUpdateCycle();const e=a.state.get(c);let s=0;if(!(e&ni.ALLOCATED)){c=(c+1)%o,t++;continue}const l=a.lodLevel.get(c);if(e&ni.DEFAULT_ACTIVE&&this._defaultRenderInstanceData[l].freeTail(),e&ni.HIGHLIGHT_ACTIVE&&this._highlightRenderInstanceData[l].freeTail(),e&ni.REMOVE)n.freeInstance(c);else if(e&ni.VISIBLE){let t=0;r&&(a.modelOrigin.getVec(c,Zi),t=i.selectLevel(Zi,n.getCombinedMedianScaleFactor(c))),s=e&~(ni.ACTIVE|ni.TRANSFORM_CHANGED),t>=0&&(e&ni.HIGHLIGHT?(Wi(this._highlightRenderInstanceData[t],a,c),s|=ni.HIGHLIGHT_ACTIVE):(Wi(this._defaultRenderInstanceData[t],a,c),s|=ni.DEFAULT_ACTIVE)),a.state.set(c,s),a.lodLevel.set(c,t)}else s=e&~(ni.ACTIVE|ni.TRANSFORM_CHANGED),a.state.set(c,s);if(this._octree){const t=!!(e&ni.ACTIVE),r=!!(s&ni.ACTIVE);!t&&r?this._octree.addInstance(c):t&&!r?this._octree.removeInstance(c):t&&r&&e&ni.TRANSFORM_CHANGED&&(this._octree.removeInstance(c),this._octree.addInstance(c))}c=(c+1)%o}this._instanceIndex=c,this._defaultRenderInstanceData.forEach(e=>{e.endUpdate()}),this._highlightRenderInstanceData.forEach(e=>{e.endUpdate()})}_renderComponents(e,t,r,i){this.levels.forEach((n,a)=>{n.components.forEach(n=>{this._renderComponent(e,t,r,i[a],n,a)})})}_renderComponent(e,t,r,i,a,s){if(0===i.size||!a.material.requiresSlot(t))return;const{rctx:o,pass:c}=e,l=a.glMaterials.load(o,c);if(Object(n["j"])(l))return;const u=l.beginSlot(r),d=o.useTechnique(u,t);l.bind(r,u),o.bindVAO(a.vao),u.ensureAttributeLocations(a.vao),e.isHighlightPass&&Object(Jt["b"])(d,r),u.bindDraw(r),ee["a"].LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL&&e.pass===pi["a"].MATERIAL&&(d.setUniform4fv("externalColor",Ki[Math.min(s,Ki.length-1)]),d.setUniform1i("colorMixMode",Bi["b"].replace));const h=o.capabilities.instancing,p=i.capacity,f=i.headIndex,b=i.tailIndex,m=i.firstIndex,g=this._glInstanceBufferLayout,y=(e,t)=>{Object(Gi["a"])(o,ui["a"],i.buffer,g,e),h.drawArraysInstanced(u.primitiveType,0,a.vertexCount,t-e),Object(Gi["e"])(o,ui["a"],i.buffer,g)};a.material.parameters.transparent&&null!=m?f>b?(Object(fi["a"])(m>=b&&m<=f,"invalid firstIndex"),y(m,f),y(b,m)):f<b&&(m<=f?(Object(fi["a"])(m>=0&&m<=f,"invalid firstIndex"),y(m,f),y(b,p),y(0,m)):(Object(fi["a"])(m>=b&&m<=p,"invalid firstIndex"),y(m,p),y(0,f),y(b,m))):f>b?y(b,f):f<b&&(y(0,f),y(b,p)),o.bindVAO(null)}}function Wi(e,t,r){const i=e.allocateHead();$i(t,r,e.view,i)}function $i(e,t,r,i){Object(Vi["c"])(e.modelOrigin,t,r.modelOriginHi,r.modelOriginLo,i),r.model.copyFrom(i,e.model,t),r.modelNormal.copyFrom(i,e.modelNormal,t),e.color&&r.color&&r.color.copyFrom(i,e.color,t),e.featureAttribute&&r.featureAttribute&&r.featureAttribute.copyFrom(i,e.featureAttribute,t)}const Zi=Object(d["f"])(),Xi=Object(Pe["e"])(),Yi=Object(M["d"])(),Ji=Object(d["f"])(),Qi=Object(d["f"])(),Ki=[[1,0,1,1],[0,0,1,1],[0,1,0,1],[1,1,0,1],[1,0,0,1]];class en extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._resources=null,this._optionalFields=new Array,this._instanceIndexToGraphicUid=new Map,this.hasLoadedPBRTextures=!1,this.ensureDrapedStatus(!1),this.hasLoadedPBRTextures=r.physicalBasedRenderingEnabled}getCachedSize(){const[e,t,r]=Object(n["k"])(this._resources)?this._resources.symbolSize:[1,1,1];return{width:e,depth:t,height:r}}async doLoad(e){if(!this._drivenProperties.size&&Object(U["j"])(this.symbolLayer))throw new Error;const t=this.symbolLayer;if(this.isPrimitive){const r=t.resource?t.resource.primitive:Vr["b"];this._resources=await this._createResourcesForPrimitive(r,e)}else this._resources=await this._createResourcesForUrl(t.resource.href,e);this.layerOpacityChanged(),this.slicePlaneEnabledChanged(),this.physicalBasedRenderingChanged(),this.complexity=this.computeComplexity()}get extentPadding(){return Object(n["k"])(this._resources)?this._resources.extentPadding:0}get isPrimitive(){return!(this.symbolLayer.resource&&this.symbolLayer.resource.href)}get lodRenderer(){return Object(n["i"])(this._resources,"lodRenderer")}_setMaterialTransparencyParams(e,t=Object(n["i"])(this.symbolLayer,"material","color")){const r=this._getCombinedOpacity(t),i=r<1||this.needsDrivenTransparentPass;return e.transparent=i,e.opacity=r,e.cullFace=i?re["c"].None:re["c"].Back,e}async _createResourcesForPrimitive(e,t){if(!Object(si["a"])(e))throw new Error("Unknown object symbol primitive: "+e);const r=this.symbolLayer,i=Object(f["h"])(Object(Gr["c"])(e)),a=Object(d["g"])(Object(f["E"])(i)),s=Object(d["g"])(Object(Gr["d"])(a,r)),o=Object(u["r"])(s),c=!1,l=!1,h={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,instanced:["transformation"],ambient:d["a"],diffuse:d["a"],slicePlaneEnabled:this._context.slicePlaneEnabled,sliceHighlightDisabled:!0,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!this.symbolLayer.isPrimitive},p=h.usePBR;this._setMaterialTransparencyParams(h);const b=this.symbol;if("point-3d"===b.type&&b.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=b.verticalOffset;h.verticalOffset={screenLength:Object(Ce["g"])(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},h.castShadows=!1}if(this._context.screenSizePerspectiveEnabled&&(h.screenSizePerspective=this._context.sharedResources.screenSizePerspectiveSettings),this._drivenProperties.color)h.externalColor=Pe["a"];else{const e=Object(n["k"])(r.material)&&r.material.color,t=Object(n["k"])(e)?Ee["a"].toUnitRGBA(e):Pe["a"];h.externalColor=t}this._fastUpdates=bt(this._context.renderer,this._fastVisualVariableConvertOptions(i,s,a,n["p"])),this._fastUpdates.enabled?(Object.assign(h,this._fastUpdates.materialParameters),h.instanced.push("featureAttribute"),this._optionalFields.push("featureAttribute")):this._hasPerInstanceColor()&&(h.instanced.push("color"),this._optionalFields.push("color"));const m=new ne["a"](h),g=Object(si["b"])(e,m);if(!g)throw new Error("Unknown object symbol primitive: "+e);const y=Object(Qr["d"])(g).map(e=>({opacity:1,transparent:e.parameters.transparent})),O=await this._createStageResources(g,p);return{lodResources:g,lodRenderer:await this._createLodRenderer(g,t),stageResources:O,symbolSize:s,extentPadding:o,isEsriSymbolResource:c,isWosr:l,originalMaterialParameters:y,physicalBasedRenderingEnabled:p,resourceBoundingBox:i,resourceSize:a,dispose:n["p"],pivotOffset:n["p"]}}async _createResourcesForUrl(e,t){const r=["transformation"],i={materialParamsMixin:{instanced:r,slicePlaneEnabled:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows},streamDataRequester:this._context.streamDataRequester,cache:this._context.sharedResources.objectResourceCache};this._fastUpdates=bt(this._context.renderer,this._fastVisualVariableConvertOptions(n["p"],n["p"],n["p"],n["p"])),this._fastUpdates.enabled?(Object.assign(i.materialParamsMixin,this._fastUpdates.materialParameters),r.push("featureAttribute"),this._optionalFields.push("featureAttribute")):this._hasPerInstanceColor()&&(r.push("color"),this._optionalFields.push("color"));const a=this.symbol;if("point-3d"===a.type&&a.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=a.verticalOffset;i.materialParamsMixin.verticalOffset={screenLength:Object(Ce["g"])(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},i.materialParamsMixin.castShadows=!1}i.signal=t,i.usePBR=this._context.physicalBasedRenderingEnabled;const s=i.usePBR,o=await Object(ai["fetch"])(e,i),c=o.isEsriSymbolResource,l=o.isWosr,h=o.remove,p=ei(o.lods);ri(p),p.levels.sort((e,t)=>e.minScreenSpaceRadius-t.minScreenSpaceRadius),p.levels[0].minScreenSpaceRadius=Math.min(2,p.levels[0].minScreenSpaceRadius);const b=this._context,m=this.symbolLayer.material,g=this._getExternalColorParameters(m),y=Object(n["i"])(this.symbolLayer,"material","color"),O=this._getCombinedOpacity(y,{hasIntrinsicColor:!0}),v=this.needsDrivenTransparentPass,_=Object(Qr["d"])(p),j=Object(Qr["d"])(p).map(e=>({opacity:e.parameters.opacity||1,transparent:e.parameters.transparent}));_.forEach(e=>{const t=e.parameters;e.setParameters(g);const r=t.opacity*O,i=r<1||v||t.transparent;e.setParameters({opacity:r,transparent:i}),b.screenSizePerspectiveEnabled&&e.setParameters({screenSizePerspective:b.sharedResources.screenSizePerspectiveSettings})});const w=o.referenceBoundingBox,x=Object(d["g"])(Object(f["E"])(w)),T=Object(d["g"])(p.levels[0].pivotOffset),S=Object(d["g"])(Object(Gr["d"])(x,this.symbolLayer)),E=Object(u["r"])(S);mt(this._fastUpdates,this._context.renderer,this._fastVisualVariableConvertOptions(w,S,x,T))&&_.forEach(e=>e.setParameters(this._fastUpdates.materialParameters));const A=await this._createStageResources(p,s);return{lodResources:p,lodRenderer:await this._createLodRenderer(p,t),stageResources:A,symbolSize:S,extentPadding:E,isEsriSymbolResource:c,isWosr:l,originalMaterialParameters:j,physicalBasedRenderingEnabled:s,resourceBoundingBox:w,resourceSize:x,dispose:h,pivotOffset:T}}async _createStageResources(e,t){const r=this._context.stage,i=Object(Qr["d"])(e);t!==this._context.physicalBasedRenderingEnabled&&this.physicalBasedRenderingChanged(),r.addMany(i);const n=Object(Qr["e"])(e);r.addMany(n),await r.load(n);const a=Object(Qr["c"])(e);return r.addMany(a),{materials:i,textures:n,geometries:a}}async _createLodRenderer(e,t){const r=this._context.stage,i={layerUid:this._context.layer.uid,graphicUid:e=>this._instanceIndexToGraphicUid.get(e),notifyGraphicGeometryChanged:e=>this._context.notifyGraphicGeometryChanged(this._instanceIndexToGraphicUid.get(e)),notifyGraphicVisibilityChanged:e=>this._context.notifyGraphicVisibilityChanged(this._instanceIndexToGraphicUid.get(e))},n=this._fastUpdates.enabled?{applyTransform:(e,t,r)=>{e.getFeatureAttribute(t,an),Object(R["d"])(r,vt(this._fastUpdates.materialParameters,an,r))},scaleFactor:(e,t,r)=>(t.getFeatureAttribute(r,an),_t(e,this._fastUpdates.materialParameters,an))}:null,a=new qi(e,this._optionalFields,i,n);return a.slicePlaneEnabled=this._context.slicePlaneEnabled,await r.addRenderPlugin(a.slots,a,t),a}_getExternalColorParameters(e){const t={};return this._drivenProperties.color?t.externalColor=Pe["a"]:Object(n["k"])(e)&&Object(n["k"])(e.color)?t.externalColor=Ee["a"].toUnitRGBA(e.color):(t.externalColor=Pe["a"],t.colorMixMode="ignore"),t}destroy(){if(super.destroy(),Object(n["k"])(this._resources)){const e=this._context.stage;e.removeRenderPlugin(this._resources.lodRenderer);const t=this._resources.stageResources;e.removeMany(t.materials),e.removeMany(t.textures),e.removeMany(t.geometries),Object(n["k"])(this._resources.dispose)&&this._resources.dispose(),this._resources=null}}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const r=Object(Ze["c"])(t.geometry);if(Object(n["j"])(r))return this.logger.warn("unsupported geometry type for icon symbol: "+t.geometry.type),null;const i=this.setGraphicElevationContext(t,new F["a"]),a=e.renderingInfo;return this._createAs3DShape(t,r,a,i,t.uid)}notifyDestroyGraphicLayer(e){this._instanceIndexToGraphicUid.delete(e.instanceIndex)}graphicLayerToGraphicId(){return 0}layerOpacityChanged(){if(Object(n["j"])(this._resources))return!0;const e=this._drivenProperties.opacity,t=!this.isPrimitive,r=this._resources.stageResources.materials,i=this._resources.originalMaterialParameters;for(let a=0;a<r.length;a++){const s=r[a],o=Object(n["i"])(this.symbolLayer,"material","color"),c=i[a],l=this._getCombinedOpacity(o,{hasIntrinsicColor:t})*c.opacity,u=l<1||e||c.transparent;s.setParameters({opacity:l,transparent:u}),this.isPrimitive&&s.setParameters({cullFace:u?re["c"].None:re["c"].Back})}return!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,N["i"])}slicePlaneEnabledChanged(){if(Object(n["j"])(this._resources))return!0;this._resources.lodRenderer.slicePlaneEnabled=this._context.slicePlaneEnabled;for(const e of this._resources.stageResources.materials)e.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled});return!0}physicalBasedRenderingChanged(){if(Object(n["j"])(this._resources))return!0;const{stageResources:e,isWosr:t}=this._resources;for(const r of e.materials)this.isPrimitive?r.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}):t||r.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!1});return!1!==this.hasLoadedPBRTextures||!0!==this._context.physicalBasedRenderingEnabled||(this.hasLoadedPBRTextures=!0,!1)}pixelRatioChanged(){return!0}applyRendererDiff(e,t){if(Object(n["j"])(this._resources))return z["a"].Recreate_Symbol;const{stageResources:{materials:r},lodRenderer:i,resourceBoundingBox:a,symbolSize:s,resourceSize:o,pivotOffset:c}=this._resources;for(const n in e.diff){if("visualVariables"!==n)return z["a"].Recreate_Symbol;if(!mt(this._fastUpdates,t,this._fastVisualVariableConvertOptions(a,s,o,c)))return z["a"].Recreate_Symbol;for(const e of r)e.setParameters(this._fastUpdates.materialParameters);i.notifyShaderTransformationChanged()}return z["a"].Fast_Update}computeComplexity(){return Object(n["j"])(this._resources)?super.computeComplexity():{primitivesPerFeature:Object(Qr["b"])(this._resources.lodResources.levels[0]).reduce((e,t)=>e+t.indices.get(H["a"].POSITION).length,0)/3,primitivesPerCoordinate:0,drawCallsPerFeature:0,estimated:!1,memory:Object(oi["d"])(this.symbol,this.symbolLayer)}}_hasLodRenderer(){return Object(n["k"])(this._resources)}_createAs3DShape(e,t,r,i,a){if(!this._hasLodRenderer()||Object(n["j"])(this._resources))return null;const s=this.getFastUpdateAttrValues(e),o=!this._fastUpdates.enabled&&this._hasPerInstanceColor()?Object(U["g"])(r.color,r.opacity):null,c=this._context.clippingExtent;if(Object(p["t"])(t,tn,this._context.elevationProvider.spatialReference),Object(n["k"])(c)&&!Object(f["g"])(c,tn))return null;const l=this._requiresTerrainElevation(i),u=this._computeGlobalTransform(t,i,nn,sn),d=this._computeLocalTransform(this._resources,this.symbolLayer,r,rn),h=this._resources.lodRenderer.instanceData,b=h.addInstance();this._instanceIndexToGraphicUid.set(b,a),h.setLocalTransform(b,d,!1),h.setGlobalTransform(b,u),s&&h.setFeatureAttribute(b,s),o&&h.setColor(b,o);const m=new qr(this,b,ke["a"],i);return l&&(m.alignedSampledElevation=sn.sampledElevation),m.needsElevationUpdates=Object(N["i"])(i.mode),Object(Ze["b"])(m,t,this._context.elevationProvider),m}_computeGlobalTransform(e,t,r,i){return Object(N["g"])(e,this._context.elevationProvider,t,this._context.renderCoordsHelper,i),tn[0]=e.x,tn[1]=e.y,tn[2]=i.z,Object(p["d"])(e.spatialReference,tn,r,this._context.renderCoordsHelper.spatialReference),r}_computeLocalTransform(e,t,r,i){return Object(R["j"])(i),this._applyObjectRotation(r,!1,i),this._applyObjectRotation(t,!0,i),this._applyObjectScale(e,r,i),this._applyAnchor(e,t,i),i}_applyObjectScale(e,t,r){if(this._fastUpdates.enabled&&this._fastUpdates.requiresShaderTransformation)return;const i=this._drivenProperties.size&&t.size?t.size:e.symbolSize,n=Object(U["c"])(i,e.symbolSize,e.resourceSize,this._context.renderCoordsHelper.unitInMeters);1===n[0]&&1===n[1]&&1===n[2]||Object(R["i"])(r,r,n)}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchTransform(e,t),this._preparePatchColor(e,t)}updateGeometry(e,t){if(Object(n["j"])(this._resources))return!0;const r=t&&Object(Ze["c"])(t);if(Object(n["j"])(r))return!1;const i=this.getGeometryElevationMode(t);return e.elevationContext.mode===i&&(this._computeGlobalTransform(r,e.elevationContext,nn,sn),this._requiresTerrainElevation(e.elevationContext)&&(e.alignedSampledElevation=sn.sampledElevation),this._resources.lodRenderer.instanceData.setGlobalTransform(e.instanceIndex,nn,!0),Object(Ze["b"])(e,r,this._context.elevationProvider),!0)}_preparePatchTransform(e,t){if(!(t.heading||t.tilt||t.roll||t.width||t.height||t.depth||t.anchor||t.anchorPosition))return;if(Object(n["j"])(this._resources))return;const r=(e,t,r)=>Object(n["u"])(null!=e&&"complete"===e.type?e.newValue:t,r),i=r(t.heading,this.symbolLayer.heading,0),a=r(t.tilt,this.symbolLayer.tilt,0),s=r(t.roll,this.symbolLayer.roll,0),o=r(t.width,this.symbolLayer.width,void 0),c=r(t.height,this.symbolLayer.height,void 0),l=r(t.depth,this.symbolLayer.depth,void 0),u=r(t.anchor,this.symbolLayer.anchor,void 0),h=r(t.anchorPosition,this.symbolLayer.anchorPosition,void 0);delete t.heading,delete t.tilt,delete t.roll,delete t.width,delete t.height,delete t.depth,delete t.anchor,delete t.anchorPosition;const p={heading:i,tilt:a,roll:s,anchor:u,anchorPosition:h},f=this._resources;this.loadStatus===Jr["a"].LOADED&&e.symbolLayerStatePatches.push(()=>{f.symbolSize=Object(d["g"])(Object(Gr["d"])(f.resourceSize,{width:o,height:c,depth:l,isPrimitive:this.symbolLayer.isPrimitive}))}),e.graphics3DGraphicPatches.push((e,t)=>{const r=this._computeLocalTransform(f,p,t,rn),i=e.instanceIndex;f.lodRenderer.instanceData.setLocalTransform(i,r,!0)})}_preparePatchColor(e,t){if(!t.material||"partial"!==t.material.type)return;const r=t.material.diff;if(!r.color||"complete"!==r.color.type||null==r.color.newValue||null==r.color.oldValue)return;const i=r.color.newValue,a=Object(n["k"])(i)?Ee["a"].toUnitRGBA(i):Pe["a"];delete r.color;const s=this._resources;Object(n["j"])(s)||e.graphics3DGraphicPatches.push(e=>{let t;this._hasPerInstanceColor()?(s.lodRenderer.instanceData.setColor(e.instanceIndex,a),t=this._setMaterialTransparencyParams({},i)):t=this._setMaterialTransparencyParams({externalColor:a},i);for(const r of s.stageResources.materials)r.setParameters(t)})}_requiresTerrainElevation(e){return"absolute-height"!==e.mode}_applyObjectRotation(e,t,r){if(!(this._fastUpdates.enabled&&this._fastUpdates.requiresShaderTransformation&&t))return Object(U["b"])(e.heading,e.tilt,e.roll,r)}_computeAnchor(e,t,r){const i=Object(d["f"])();switch(r.anchor){case"center":Object(u["m"])(i,Object(f["e"])(e)),Object(u["u"])(i,i);break;case"top":{const t=Object(f["e"])(e);Object(u["y"])(i,-t[0],-t[1],-e[5]);break}case"bottom":{const t=Object(f["e"])(e);Object(u["y"])(i,-t[0],-t[1],-e[2]);break}case"relative":{const t=Object(f["e"])(e),n=Object(f["E"])(e),a=r.anchorPosition,s=a?Object(d["h"])(a.x,a.y,a.z):d["c"];Object(u["d"])(i,n,s),Object(u["h"])(i,i,t),Object(u["u"])(i,i);break}default:Object(n["k"])(t)?Object(u["u"])(i,t):Object(u["m"])(i,d["c"])}return i}_applyAnchor(e,t,r){if(this._fastUpdates.enabled&&this._fastUpdates.requiresShaderTransformation)return;const i=this._computeAnchor(e.resourceBoundingBox,e.pivotOffset,t);i&&Object(R["k"])(r,r,i)}_hasPerInstanceColor(){return this._drivenProperties.color||this._drivenProperties.opacity}_fastVisualVariableConvertOptions(e,t,r,i){const a=Object(n["k"])(e)?Object(d["g"])(Object(f["E"])(e)):d["a"],s=Object(n["k"])(e)?this._computeAnchor(e,i,this.symbolLayer):d["c"],o=this._context.renderCoordsHelper.unitInMeters,c=Object(U["c"])(Object(n["k"])(t)?t:void 0,t,r,o),l=Object(d["h"])(this.symbolLayer.tilt||0,this.symbolLayer.roll||0,this.symbolLayer.heading||0);return{modelSize:a,symbolSize:Object(n["k"])(t)?t:d["a"],unitInMeters:o,transformation:{anchor:s,scale:c,rotation:l}}}}const tn=Object(d["f"])(),rn=Object(M["d"])(),nn=Object(M["d"])(),an=Object(Pe["e"])(),sn=new N["a"];var on=r("4212");function cn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function ln(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e}function un(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function dn(e,t){if(e===t){const r=t[1];e[1]=t[2],e[2]=r}else e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3];return e}function hn(e,t){const r=t[0],i=t[1],n=t[2],a=t[3];let s=r*a-n*i;return s?(s=1/s,e[0]=a*s,e[1]=-i*s,e[2]=-n*s,e[3]=r*s,e):null}function pn(e,t){const r=t[0];return e[0]=t[3],e[1]=-t[1],e[2]=-t[2],e[3]=r,e}function fn(e){return e[0]*e[3]-e[2]*e[1]}function bn(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=r[0],c=r[1],l=r[2],u=r[3];return e[0]=i*o+a*c,e[1]=n*o+s*c,e[2]=i*l+a*u,e[3]=n*l+s*u,e}function mn(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=Math.sin(r),c=Math.cos(r);return e[0]=i*c+a*o,e[1]=n*c+s*o,e[2]=i*-o+a*c,e[3]=n*-o+s*c,e}function gn(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=r[0],c=r[1];return e[0]=i*o,e[1]=n*o,e[2]=a*c,e[3]=s*c,e}function yn(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=-r,e[3]=i,e}function On(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e}function vn(e){return"mat2("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function _n(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2)}function jn(e,t,r,i){return e[2]=i[2]/i[0],r[0]=i[0],r[1]=i[1],r[3]=i[3]-e[2]*r[1],[e,t,r]}function wn(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function xn(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function Tn(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function Sn(e,t){const r=e[0],i=e[1],n=e[2],a=e[3],s=t[0],o=t[1],c=t[2],l=t[3];return Math.abs(r-s)<=on["a"]*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-o)<=on["a"]*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-c)<=on["a"]*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(a-l)<=on["a"]*Math.max(1,Math.abs(a),Math.abs(l))}function En(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function An(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e}const Cn=bn,Rn=xn;Object.freeze({__proto__:null,copy:cn,identity:ln,set:un,transpose:dn,invert:hn,adjoint:pn,determinant:fn,multiply:bn,rotate:mn,scale:gn,fromRotation:yn,fromScaling:On,str:vn,frob:_n,LDU:jn,add:wn,subtract:xn,exactEquals:Tn,equals:Sn,multiplyScalar:En,multiplyScalarAndAdd:An,mul:Cn,sub:Rn});var Mn=r("47f8");class Pn extends G["a"]{constructor(e,t,r,i,n,a){super(e,t),this.path=r,this.geometrySR=i,this.upVectorAlignment=n,this.stencilWidth=a}}function In(e){return"upVectorAlignment"in e}function Dn(){return[1,0,0,1]}function Ln(e){return[e[0],e[1],e[2],e[3]]}function Nn(e,t,r,i){return[e,t,r,i]}function Fn(e,t){return new Float64Array(e,t,4)}Object.freeze({__proto__:null,create:Dn,clone:Ln,fromValues:Nn,createView:Fn});var kn=r("7289"),Un=r("d18f");function zn(){return{up:Object(d["f"])(),right:Object(d["f"])()}}function Bn(e,t,r){Object(u["s"])(e.up,t.up,r),Object(u["s"])(e.right,t.right,r)}function Vn(e,t,r){Object(c["s"])(e,Object(u["j"])(r,t.right),Object(u["j"])(r,t.up))}class Gn{constructor(){this.pos=Object(d["f"])(),this.posES=Object(d["f"])(),this.posGS=Object(d["f"])(),this.vRight=Object(d["f"])(),this.vLeft=Object(d["f"])(),this.frame=zn(),this.rotationFrame=zn(),this.rotationRight=Object(l["b"])(),this.rotationAngle=0,this.miterStretch=Dn()}setFrameFromUpVector(e){Object(u["m"])(this.frame.up,e),Object(u["h"])(la,this.vLeft,this.vRight),Object(u["t"])(la,la),Object(u["g"])(ca,this.frame.up,Object(u["j"])(la,this.frame.up)),Object(u["l"])(ha,la,ca),Object(u["t"])(ha,ha),Object(u["i"])(this.frame.right,ha,this.frame.up)}computeRotationAxisAndAngleFromUpVector(){Object(u["m"])(this.rotationFrame.up,this.frame.up),Object(u["m"])(this.rotationFrame.right,this.frame.right),Object(c["s"])(this.rotationRight,1,0),Object(u["g"])(ca,this.frame.up,Object(u["j"])(this.frame.up,this.vLeft)),Object(u["l"])(ca,this.vLeft,ca),Object(u["u"])(ca,ca),Object(u["t"])(ca,ca),Object(u["g"])(la,this.frame.up,Object(u["j"])(this.frame.up,this.vRight)),Object(u["l"])(la,this.vRight,la),Object(u["t"])(la,la),Object(u["i"])(ua,this.rotationFrame.up,this.vLeft);const e=Math.sign(Object(u["j"])(ua,this.vRight));if(this.rotationAngle=e*(Math.PI-Object(Ye["b"])(Object(u["j"])(ca,la))),Math.abs(this.rotationAngle)>0){const e=Object(Ye["q"])(Math.cos(.5*this.rotationAngle));un(this.miterStretch,e-1+1,0,0,1)}const t=Math.PI-this.rotationAngle;this.maxStretchDistance=Math.abs(Math.min(this.vLeftLength,this.vRightLength)/Math.cos(.5*t))}}class Hn{constructor(){this.vertices=[],this.vertexIndices=[],this.vertexNormals=[],this.poles=[],this.poleIndices=[],this.uvs=null,this.uvIndices=null}addVertex(e,t){return this.vertices.push(Object(l["c"])(e)),this.vertexNormals.push(Object(l["c"])(t)),this.vertices.length-1}addUV(e){return this.uvs||(this.uvs=[],this.uvIndices=[]),this.uvs.push(e),this.uvs.length-1}addPole(e,t=null){return this.poles.push({position:Object(l["c"])(e),normal:t?Object(l["c"])(t):null}),this.poles.length-1}addSegment(e,t=null,r=null){this.vertexIndices.push(e.v0),this.vertexIndices.push(e.v1),t&&(this.uvIndices.push(t.v0),this.uvIndices.push(t.v1)),r&&(this.poleIndices.push(r.v0),this.poleIndices.push(r.v1))}get numSegments(){return this.vertexIndices.length/2}hasUV(){return null!=this.uvs}translate(e,t){for(const r of this.vertices)r[0]+=e,r[1]+=t;for(const r of this.poles)r.position[0]+=e,r.position[1]+=t}static circle(e=20){const t=.5,r=new Hn,i={v0:0,v1:0};r.addPole(Object(l["f"])(0,0));for(let s=0;s<e;++s){const i=2*s*Math.PI/e,n=Math.cos(i),a=Math.sin(i),o=Object(l["f"])(n*t,a*t),c=Object(l["f"])(n,a);r.addVertex(o,c),r.addUV(s/e)}r.addUV(1);for(let s=0;s<e-1;++s){const e={v0:s,v1:s+1},t=e;r.addSegment(e,t,i)}const n={v0:e-1,v1:0},a={v0:e-1,v1:e};return r.addSegment(n,a,i),r}static rect(){const e=1,t=1,r=new Hn,i=Object(l["f"])(.5*-e,.5*-t),n=Object(l["f"])(.5*e,.5*-t),a=Object(l["f"])(.5*e,.5*t),s=Object(l["f"])(.5*-e,.5*t),o=Object(l["f"])(0,-1),c=Object(l["f"])(1,0),u=Object(l["f"])(0,1),d=Object(l["f"])(-1,0);r.addUV(0),r.addUV(1),r.addPole(Object(l["f"])(0,.5*t),u),r.addPole(Object(l["f"])(0,.5*t)),r.addPole(Object(l["f"])(0,.5*-t)),r.addPole(Object(l["f"])(0,.5*-t),o);const h={v0:0,v1:1};return r.addVertex(i,o),r.addVertex(n,o),r.addSegment({v0:0,v1:1},h,{v0:3,v1:3}),r.addVertex(n,c),r.addVertex(a,c),r.addSegment({v0:2,v1:3},h,{v0:2,v1:1}),r.addVertex(a,u),r.addVertex(s,u),r.addSegment({v0:4,v1:5},h,{v0:0,v1:0}),r.addVertex(s,d),r.addVertex(i,d),r.addSegment({v0:6,v1:7},h,{v0:1,v1:2}),r}}class qn{constructor(e){this.vertices=[],this.offset=Object(d["f"])(),this.xform=Object(M["d"])(),this.vertices=e;const t=Math.floor((e.length-1)/2);Object(u["m"])(this.offset,this.vertices[t].pos);for(const r of this.vertices)Object(u["l"])(r.pos,r.pos,this.offset);Object(R["k"])(this.xform,this.xform,this.offset),this.updatePathVertexInformation()}updatePathVertexInformation(){const e=this.vertices.length;let t=this.vertices[0];t.index=0,Object(u["y"])(t.vLeft,0,0,0),t.vLeftLength=0,Object(u["l"])(t.vRight,this.vertices[1].pos,t.pos),t.vRightLength=Object(u["r"])(t.vRight),Object(u["t"])(t.vRight,t.vRight);let r=t;for(let i=1;i<e;++i)t=this.vertices[i],t.index=i,Object(u["m"])(t.vLeft,r.vRight),t.vLeftLength=r.vRightLength,i<e-1?(Object(u["l"])(t.vRight,this.vertices[i+1].pos,t.pos),t.vRightLength=Object(u["r"])(t.vRight),Object(u["t"])(t.vRight,t.vRight)):(Object(u["m"])(t.vRight,t.vLeft),t.vRightLength=t.vLeftLength),r=t}}function Wn(e,t){let r=null;const i=e.vertices.length,n=.99619469809,a=Object(d["f"])(),s=Object(d["f"])(),o=Object(d["f"])(),c=Object(d["f"])(),l=Object(d["f"])(),h=Object(d["f"])(),p=Object(kn["d"])();let f=e.vertices[0];Object(u["m"])(s,t),Object(u["y"])(a,0,1,0),jt["a"].makeOrthoBasisDirUpFallback(f.vRight,s,a,a,o,s,n),Object(u["m"])(f.frame.up,s),Object(u["m"])(f.frame.right,o),r=f;for(let d=1;d<i;++d){f=e.vertices[d],Object(u["h"])(l,f.vLeft,f.vRight);let t=Object(u["r"])(l);t>0?(t=1/Math.sqrt(t),l[0]=l[0]*t,l[1]=l[1]*t,l[2]=l[2]*t):(l[0]=f.vRight[0],l[1]=f.vRight[1],l[2]=f.vRight[2]),Object(u["h"])(h,r.pos,r.frame.up),Object(kn["h"])(f.pos,l,p),Object(kn["n"])(p,Object(Un["h"])(h,f.vLeft),c)?(Object(u["l"])(c,c,f.pos),Object(u["t"])(s,c),Object(u["i"])(o,l,s),Object(u["t"])(o,o)):jt["a"].makeOrthoBasisDirUpFallback(l,r.frame.up,r.frame.right,a,o,s,n),Object(u["m"])(f.frame.up,s),Object(u["m"])(f.frame.right,o),r=f}}class $n{numProfilesPerJoin(){return 1}extrude(e,t,r){for(let i=0;i<t.vertices.length;++i)r(e.index,e.frame,t.vertices[i],t.vertexNormals[i],!1)}}class Zn{constructor(e=.8*Math.PI,t=1){this.cutoffAngle=e,this.numBendSubdivisions=t}numProfilesPerJoin(){return this.numBendSubdivisions+1}extrude(e,t,r){const i=pa;if(Math.abs(e.rotationAngle)>=this.cutoffAngle)for(let n=0;n<this.numBendSubdivisions+1;++n){Object(R["e"])(fa,.5*-e.rotationAngle+n*e.rotationAngle/this.numBendSubdivisions,e.rotationFrame.up),Bn(i,e.frame,fa);for(let n=0;n<t.vertices.length;++n)Object(c["k"])(t.vertices[n],e.rotationRight)*e.rotationAngle>=0?r(e.index,i,t.vertices[n],t.vertexNormals[n],!1):(Object(c["p"])(aa,t.vertices[n],e.miterStretch),r(e.index,e.frame,aa,t.vertexNormals[n],!0))}else for(let n=0;n<this.numBendSubdivisions+1;++n)for(let i=0;i<t.vertices.length;++i){const n=Object(c["k"])(t.vertices[i],e.rotationRight)*e.rotationAngle>=0;Object(c["p"])(aa,t.vertices[i],e.miterStretch),r(e.index,e.frame,aa,t.vertexNormals[i],!n)}}}const Xn={generateUV:!1};class Yn{rebuildConnectingProfileGeometry(e,t,r){for(let i=0;i<t.vertices.length;++i)r(e.index,e.frame,t.vertices[i],t.vertexNormals[i],0,0)}}class Jn extends Yn{constructor(){super()}getNumVertices(){return 0}getNumIndices(){return 0}rebuildCapGeometry(){}buildTopology(){}}class Qn extends Yn{constructor(e,t=0,r=!1){super(),this.profile=e,this.profilePlaneOffset=t,this.flip=r}getNumVertices(){return this.profile.vertices.length}getNumIndices(){return 3*this.profile.numSegments}rebuildConnectingProfileGeometry(e,t,r){for(let i=0;i<t.vertices.length;++i)r(e.index,e.frame,t.vertices[i],t.vertexNormals[i],this.profilePlaneOffset,0)}rebuildCapGeometry(e,t){const r=sa;Object(c["s"])(r,0,0);const i=this.flip?1:-1;for(let n=0;n<this.profile.vertices.length;++n)t(e.index,e.frame,this.profile.vertices[n],r,this.profilePlaneOffset,i)}buildTopology(e,t){const r=this.vertexBufferStart+this.profile.vertexIndices[0];for(let i=1;i<this.profile.numSegments;++i){const e=this.profile.vertexIndices[2*i+0],n=this.profile.vertexIndices[2*i+1],a=this.vertexBufferStart+e,s=this.vertexBufferStart+n;this.flip?t(s,a,r):t(r,a,s)}}}class Kn extends Yn{constructor(e){super(),this.flip=!1,this.sign=0,this.breakNormals=!1,this.numSegments=3,this.profile=e.profile,this.flip=e.flip,this.sign=this.flip?1:-1,this.breakNormals=e.breakNormals,this.numSegments=e.subdivisions}getNumVertices(){let e=0;return e=this.profile.vertices.length*(this.numSegments-1),this.breakNormals&&(e+=this.profile.vertices.length),e+=this.profile.poles.length,e}getNumIndices(){let e=0;e+=2*this.profile.numSegments*(this.numSegments-1);for(let t=0;t<this.profile.numSegments;++t){const r=this.profile.vertexIndices[2*t+0],i=this.profile.vertexIndices[2*t+1];this.profile.poleIndices[r]===this.profile.poleIndices[i]?e+=1:e+=2}return 3*e}rebuildCapGeometry(e,t){const r=e.frame,i=.5*this.sign,n=aa,a=sa;Object(c["s"])(a,0,0);for(let s=0;s<this.profile.poles.length;++s){const n=this.profile.poles[s];n.normal?t(e.index,r,n.position,n.normal,i,0):t(e.index,r,n.position,a,i,this.sign)}if(this.breakNormals)for(let s=0;s<this.profile.vertices.length;++s)t(e.index,r,this.profile.vertices[s],this.profile.vertexNormals[s],0,0);for(let s=0;s<this.numSegments-1;++s){const o=(1-(s+1)/this.numSegments)*Math.PI*.5,l=Math.sin(o),u=Math.cos(o);for(let s=0;s<this.profile.vertices.length;++s){const o=this.profile.poles[this.profile.poleIndices[s]];Object(c["f"])(n,this.profile.vertices[s],o.position),Object(c["g"])(n,n,l),o.normal?(Object(c["m"])(n,n,o.position),t(e.index,r,n,o.normal,i*u,0)):(Object(c["i"])(a,n),Object(c["g"])(a,a,l),Object(c["m"])(n,n,o.position),t(e.index,r,n,a,i*u,this.sign*u))}}}buildTopology(e,t){const r=this.breakNormals?this.vertexBufferStart+this.profile.poles.length:this.firstProfileVertexIndex,i=this.breakNormals?this.vertexBufferStart+this.profile.poles.length+this.profile.vertices.length:this.vertexBufferStart+this.profile.poles.length;for(let n=0;n<this.profile.numSegments;++n){const e=this.profile.vertexIndices[2*n+0],a=this.profile.vertexIndices[2*n+1],s=this.vertexBufferStart+this.profile.poleIndices[e],o=this.vertexBufferStart+this.profile.poleIndices[a];let c=r+e,l=r+a;for(let r=0;r<this.numSegments-1;++r){const n=i+r*this.profile.vertices.length+e,s=i+r*this.profile.vertices.length+a;this.flip?(t(n,l,c),t(l,n,s)):(t(c,l,n),t(s,n,l)),c=n,l=s}this.flip?(t(s,l,c),s!==o&&t(s,o,l)):(t(c,l,s),s!==o&&t(l,o,s))}}}class ea{constructor(e,t,r,i,n,a=Xn){this.options=a,this._extrusionVertexCount=0,this._triangleCount=0,this.numExtrusionProfiles=0,this.numVerticesTotal=0,this.numNormalsTotal=0,this.numUVTotal=0,this.profile=t,this.path=e,this.extruder=r,this.startCap=i,this.endCap=n;const s=this.path.vertices.length-2;this.numExtrusionProfiles=r.numProfilesPerJoin()*s+2,this.numVerticesTotal=t.vertices.length*this.numExtrusionProfiles,this.numNormalsTotal=this.numVerticesTotal,this.startCap.vertexBufferStart=this.numVerticesTotal;const o=this.startCap.getNumVertices();this.numVerticesTotal+=o,this.numNormalsTotal+=o,this.endCap.vertexBufferStart=this.numVerticesTotal;const c=this.endCap.getNumVertices();this.numVerticesTotal+=c,this.numNormalsTotal+=c,this.pathVertexData=new Float32Array(1*this.numVerticesTotal),this.profileRightAxisData=new Float32Array(4*this.numVerticesTotal),this.profileUpAxisData=new Float32Array(4*this.numVerticesTotal),this.profileVertexAndNormalData=new Float32Array(4*this.numVerticesTotal),this.profile.hasUV()&&this.options.generateUV&&(this.numUVTotal=this.profile.uvs.length,this.uvData=new Float32Array(2*this.numUVTotal)),this.originData=new Float32Array(3*this.path.vertices.length),this._rebuildGeometry(),this.buildTopology()}emitVertex(e,t,r,i,n){if(this.profileRightAxisData[4*this._extrusionVertexCount+0]=t.right[0],this.profileRightAxisData[4*this._extrusionVertexCount+1]=t.right[1],this.profileRightAxisData[4*this._extrusionVertexCount+2]=t.right[2],this.profileUpAxisData[4*this._extrusionVertexCount+0]=t.up[0],this.profileUpAxisData[4*this._extrusionVertexCount+1]=t.up[1],this.profileUpAxisData[4*this._extrusionVertexCount+2]=t.up[2],this.profileVertexAndNormalData[4*this._extrusionVertexCount+0]=r[0],this.profileVertexAndNormalData[4*this._extrusionVertexCount+1]=r[1],this.profileVertexAndNormalData[4*this._extrusionVertexCount+2]=i[0],this.profileVertexAndNormalData[4*this._extrusionVertexCount+3]=i[1],this.pathVertexData[this._extrusionVertexCount]=e,n){const t=this.path.vertices[e];this.profileRightAxisData[4*this._extrusionVertexCount+3]=t.rotationRight[0]*t.maxStretchDistance,this.profileUpAxisData[4*this._extrusionVertexCount+3]=t.rotationRight[1]*t.maxStretchDistance}else this.profileRightAxisData[4*this._extrusionVertexCount+3]=0,this.profileUpAxisData[4*this._extrusionVertexCount+3]=0;++this._extrusionVertexCount}emitCapVertex(e,t,r,i,n,a){this.profileRightAxisData[4*this._extrusionVertexCount+0]=t.right[0],this.profileRightAxisData[4*this._extrusionVertexCount+1]=t.right[1],this.profileRightAxisData[4*this._extrusionVertexCount+2]=t.right[2],this.profileUpAxisData[4*this._extrusionVertexCount+0]=t.up[0],this.profileUpAxisData[4*this._extrusionVertexCount+1]=t.up[1],this.profileUpAxisData[4*this._extrusionVertexCount+2]=t.up[2],this.profileVertexAndNormalData[4*this._extrusionVertexCount+0]=r[0],this.profileVertexAndNormalData[4*this._extrusionVertexCount+1]=r[1],this.profileVertexAndNormalData[4*this._extrusionVertexCount+2]=i[0],this.profileVertexAndNormalData[4*this._extrusionVertexCount+3]=i[1],this.pathVertexData[this._extrusionVertexCount]=e,this.profileRightAxisData[4*this._extrusionVertexCount+3]=n,this.profileUpAxisData[4*this._extrusionVertexCount+3]=a,++this._extrusionVertexCount}emitTriangle(e,t,r){this.vertexIndices[3*this._triangleCount+0]=e,this.vertexIndices[3*this._triangleCount+1]=t,this.vertexIndices[3*this._triangleCount+2]=r,this.pathVertexIndices[3*this._triangleCount+0]=this.pathVertexData[e],this.pathVertexIndices[3*this._triangleCount+1]=this.pathVertexData[t],this.pathVertexIndices[3*this._triangleCount+2]=this.pathVertexData[r],this.normalIndices[3*this._triangleCount+0]=e,this.normalIndices[3*this._triangleCount+1]=t,this.normalIndices[3*this._triangleCount+2]=r,++this._triangleCount}_rebuildGeometry(){const e=(e,t,r,i,n)=>this.emitVertex(e,t,r,i,n),t=(e,t,r,i,n,a)=>this.emitCapVertex(e,t,r,i,n,a);this._extrusionVertexCount=0;for(const r of this.path.vertices)this.originData[3*r.index+0]=r.pos[0],this.originData[3*r.index+1]=r.pos[1],this.originData[3*r.index+2]=r.pos[2];this.startCap.rebuildConnectingProfileGeometry(this.path.vertices[0],this.profile,t);for(let r=1;r<this.path.vertices.length-1;++r)this.extruder.extrude(this.path.vertices[r],this.profile,e);if(this.endCap.rebuildConnectingProfileGeometry(this.path.vertices[this.path.vertices.length-1],this.profile,t),this.startCap.rebuildCapGeometry(this.path.vertices[0],t),this.endCap.rebuildCapGeometry(this.path.vertices[this.path.vertices.length-1],t),this.profile.hasUV()&&this.options.generateUV)for(let r=0;r<this.profile.uvs.length;++r)this.uvData[2*r+0]=this.profile.uvs[r],this.uvData[2*r+1]=0}buildTopology(){const e=(e,t,r)=>this.emitTriangle(e,t,r);this._triangleCount=0;const t=this.profile.vertices.length,r=this.profile.numSegments,i=this.numExtrusionProfiles-1;let n=r*i*2*3;this.startCap.indexBufferStart=n,this.startCap.firstProfileVertexIndex=0,n+=this.startCap.getNumIndices(),this.endCap.indexBufferStart=n,this.endCap.firstProfileVertexIndex=t*(this.numExtrusionProfiles-1),n+=this.endCap.getNumIndices(),this.vertexIndices=new Uint32Array(n),this.normalIndices=new Uint32Array(n),this.pathVertexIndices=new Uint32Array(n),this.profile.hasUV()&&this.options.generateUV&&(this.uvIndices=new Uint32Array(n));for(let a=0;a<r;++a){const r=this.profile.vertexIndices[2*a],n=this.profile.vertexIndices[2*a+1];for(let a=0;a<i;++a){const i=a*t+r,s=(a+1)*t+n,o=a*t+n;e(i,(a+1)*t+r,s),e(i,s,o)}}this.startCap.buildTopology(this.path.vertices[0],e),this.endCap.buildTopology(this.path.vertices[this.path.vertices.length-1],e)}onPathChanged(){this._rebuildGeometry()}}class ta{constructor(e){this.builder=e}get xform(){return this.builder.path.xform}onPathChanged(){this.builder.onPathChanged()}}class ra extends ta{constructor(e){super(e),this.vertexAttributePosition=null,this.vertexAttributeNormal=null,this.vertexAttributeColor=null,this.vertexAttributePosition=new Float32Array(3*this.builder.numVerticesTotal),this.vertexAttributeNormal=new Float32Array(3*this.builder.numNormalsTotal),this.vertexAttributeColor=new Uint8Array(4),this.vertexAttributeColor[0]=255,this.vertexAttributeColor[1]=255,this.vertexAttributeColor[2]=255,this.vertexAttributeColor[3]=255}bakeVertexColors(e){this.vertexAttributeColor[0]=255*e[0],this.vertexAttributeColor[1]=255*e[1],this.vertexAttributeColor[2]=255*e[2],this.vertexAttributeColor[3]=255*(e.length>3?e[3]:1)}bake(e){this.size=e;for(let t=0;t<this.builder.numVerticesTotal;++t){let r=this.builder.pathVertexData[t];const i=0===r||r===this.builder.path.vertices.length-1;r*=3;const n=na;Object(u["y"])(n,this.builder.originData[r++],this.builder.originData[r++],this.builder.originData[r]);const a=4*t,s=ca,o=aa,l=la,d=ua,h=da;let p=0,f=0;if(Object(u["y"])(d,this.builder.profileRightAxisData[a],this.builder.profileRightAxisData[a+1],this.builder.profileRightAxisData[a+2]),Object(u["y"])(h,this.builder.profileUpAxisData[a],this.builder.profileUpAxisData[a+1],this.builder.profileUpAxisData[a+2]),Object(c["s"])(o,this.builder.profileVertexAndNormalData[a]*e[0],this.builder.profileVertexAndNormalData[a+1]*e[1]),i)Object(u["i"])(l,h,d),p=this.builder.profileRightAxisData[a+3]*e[0],f=this.builder.profileUpAxisData[a+3];else{const e=sa,t=oa;Object(c["s"])(e,this.builder.profileRightAxisData[a+3],this.builder.profileUpAxisData[a+3]);const r=Object(c["l"])(e);Object(c["i"])(e,e);const i=Object(c["k"])(o,e);if(Math.abs(i)>r){Object(c["s"])(t,-e[1],e[0]);const n=Object(c["k"])(o,t);Object(c["g"])(e,e,r*Math.sign(i)),Object(c["g"])(t,t,n),Object(c["m"])(o,e,t)}Object(u["y"])(l,0,0,0)}Object(u["y"])(s,d[0]*o[0]+h[0]*o[1],d[1]*o[0]+h[1]*o[1],d[2]*o[0]+h[2]*o[1]),this.vertexAttributePosition[3*t+0]=n[0]+s[0]+l[0]*p,this.vertexAttributePosition[3*t+1]=n[1]+s[1]+l[1]*p,this.vertexAttributePosition[3*t+2]=n[2]+s[2]+l[2]*p;const b=aa;Object(c["s"])(b,this.builder.profileVertexAndNormalData[a+2],this.builder.profileVertexAndNormalData[a+3]),this.vertexAttributeNormal[3*t+0]=d[0]*b[0]+h[0]*b[1]+l[0]*f,this.vertexAttributeNormal[3*t+1]=d[1]*b[0]+h[1]*b[1]+l[1]*f,this.vertexAttributeNormal[3*t+2]=d[2]*b[0]+h[2]*b[1]+l[2]*f}}createGeometryData(){const e=[[H["a"].POSITION,this.builder.vertexIndices],[H["a"].NORMAL,this.builder.normalIndices]],t=[[H["a"].POSITION,{size:3,data:this.vertexAttributePosition,exclusive:!0}],[H["a"].NORMAL,{size:3,data:this.vertexAttributeNormal,exclusive:!0}]];if(this.vertexAttributeColor){const r=this.builder.vertexIndices.length;e.push([H["a"].COLOR,new Uint32Array(r)]),t.push([H["a"].COLOR,{size:4,data:this.vertexAttributeColor}])}return{vertexAttributes:t,indices:e}}onPathChanged(){super.onPathChanged(),this.bake(this.size)}intersect(e,t,r){const i=this.builder.vertexIndices,n={size:3,data:this.vertexAttributePosition},a=i.length/3;Object(Bi["j"])(e,t,0,a,i,n,void 0,void 0,r)}}class ia extends ta{constructor(e,t,r,i){super(e),this.sizeAttributeValue=t,this.colorAttributeValue=r,this.opacityAttributeValue=i,this.vvData=null,this.baked=new ra(e),this.vvData=new Float32Array(4*this.builder.path.vertices.length);for(let n=0;n<this.builder.path.vertices.length;++n){this.vvData[4*n+0]=t,this.vvData[4*n+1]=r,this.vvData[4*n+2]=i;const e=0===n||n===this.builder.path.vertices.length-1;this.vvData[4*n+3]=e?1:0}}createGeometryData(){return{vertexAttributes:[[H["a"].POSITION,{size:3,data:this.builder.originData,exclusive:!0}],[H["a"].PROFILERIGHT,{size:4,data:this.builder.profileRightAxisData,exclusive:!0}],[H["a"].PROFILEUP,{size:4,data:this.builder.profileUpAxisData,exclusive:!0}],[H["a"].PROFILEVERTEXANDNORMAL,{size:4,data:this.builder.profileVertexAndNormalData,exclusive:!0}],[H["a"].FEATUREVALUE,{size:4,data:this.vvData,exclusive:!0}]],indices:[[H["a"].POSITION,this.builder.pathVertexIndices],[H["a"].PROFILERIGHT,this.builder.vertexIndices],[H["a"].PROFILEUP,this.builder.vertexIndices],[H["a"].PROFILEVERTEXANDNORMAL,this.builder.vertexIndices],[H["a"].FEATUREVALUE,this.builder.pathVertexIndices]]}}}const na=Object(d["f"])(),aa=Object(l["b"])(),sa=Object(l["b"])(),oa=Object(l["b"])(),ca=Object(d["f"])(),la=Object(d["f"])(),ua=Object(d["f"])(),da=Object(d["f"])(),ha=Object(d["f"])(),pa=zn(),fa=Object(M["d"])();var ba=r("aab5"),ma=r("d7f7"),ga=r("b49d"),ya=r("7d11"),Oa=r("a7d7"),va=r("d017"),_a=r("af20");const ja=new Map([[H["a"].POSITION,0],[H["a"].PROFILERIGHT,1],[H["a"].PROFILEUP,2],[H["a"].PROFILEVERTEXANDNORMAL,3],[H["a"].FEATUREVALUE,4]]);class wa extends rr["a"]{initializeProgram(e){const t=wa.shader.get(),r=this.configuration,i=t.build({oitEnabled:r.transparencyPassType===re["l"].Color,output:r.output,viewingMode:e.viewingMode,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:r.receiveShadows,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!0,vvOpacity:r.vvOpacity,pbrMode:Oa["a"].Disabled,useCustomDTRExponentForWater:!1,receiveAmbientOcclusion:r.receiveSSAO,doubleSidedMode:r.doubleSidedMode,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new ar["a"](e.rctx,i,ja)}bindPass(e,t){var r,i;Object(er["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform3fv("size",e.size),t.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(Qt["a"])(this.program,t)),this.configuration.output!==Vt["a"].Color&&this.configuration.output!==Vt["a"].Alpha||this.program.setUniform1f("opacity",e.opacity),this.configuration.output===Vt["a"].Color?(t.lighting.setUniforms(this.program,!1,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform3fv("specular",e.specular),this.program.setUniform1f("opacity",e.opacity)):this.configuration.output!==Vt["a"].Depth&&this.configuration.output!==Vt["a"].Shadow||this.program.setUniform2fv("nearFar",t.camera.nearFar),Object(ga["b"])(this.program,e),null==(r=t.shadowMap)||r.bind(this.program),null==(i=t.ssaoHelper)||i.bind(this.program,t.camera)}bindDraw(e){Object(er["c"])(this.program,e),Object(Yt["c"])(this.program,this.configuration,e),this.program.rebindTextures(),this.configuration.output!==Vt["a"].Color&&this.configuration.output!==Vt["a"].Alpha||Object(er["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),this.configuration.output===Vt["a"].Color&&Object(va["c"])(this.program,e),this.configuration.output===Vt["a"].Normal&&Object(ya["b"])(this.program,e.camera.viewInverseTransposeMatrix)}_setPipelineState(e){const t=this.configuration,r=e===re["l"].NONE,i=e===re["l"].FrontFace,n=e=>!e.slicePlaneEnabled&&!(e.transparent||e.doubleSidedMode===ba["b"].None);return Object(cr["g"])({blending:t.output!==Vt["a"].Color&&t.output!==Vt["a"].Alpha||!t.transparent?null:r?nr["d"]:Object(nr["f"])(e),culling:n(t)&&cr["f"],depthTest:{func:Object(nr["g"])(e)},depthWrite:r||i?cr["e"]:null,colorWrite:cr["d"],stencilWrite:t.sceneHasOcludees?sr["j"]:null,stencilTest:t.sceneHasOcludees?sr["e"]:null,polygonOffset:r||i?null:nr["a"]})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}wa.shader=new tr["a"](_a["a"],()=>r.e("chunk-2d0c7e33").then(r.bind(null,"5310")));class xa extends ir["a"]{constructor(){super(...arguments),this.output=Vt["a"].Color,this.doubleSidedMode=ba["b"].None,this.receiveShadows=!1,this.receiveSSAO=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.sceneHasOcludees=!1,this.transparencyPassType=re["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(Zt["a"])([Object(ir["b"])({count:Vt["a"].COUNT})],xa.prototype,"output",void 0),Object(Zt["a"])([Object(ir["b"])({count:ba["b"].COUNT})],xa.prototype,"doubleSidedMode",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"receiveShadows",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"receiveSSAO",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"vvSize",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"vvColor",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"vvOpacity",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"slicePlaneEnabled",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"transparent",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"sceneHasOcludees",void 0),Object(Zt["a"])([Object(ir["b"])({count:re["l"].COUNT})],xa.prototype,"transparencyPassType",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"multipassTerrainEnabled",void 0),Object(Zt["a"])([Object(ir["b"])()],xa.prototype,"cullAboveGround",void 0);var Ta=r("5957");class Sa extends qt["b"]{constructor(e){super(e,Aa),this.supportsEdges=!0,this._vertexAttributeLocations=ja,this.techniqueConfig=new xa,this.vertexBufferLayout=Sa.getVertexBufferLayout(this.parameters)}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,e!==Vt["a"].Color&&e!==Vt["a"].Alpha||(this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?ba["b"].View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?ba["b"].WindingOrder:ba["b"].None,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows,this.techniqueConfig.receiveSSAO=!!t.ssaoEnabled&&this.parameters.receiveSSAO),this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}isVisibleInPass(e){return e!==pi["a"].MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==pi["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==pi["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;return!!super.isVisible()&&e.opacity>0}intersect(e,t,r,i,a,s,o){const c=e;if(!In(c))return;const l=c.path,u=[this.parameters.size[0],this.parameters.size[1]];if(this.parameters.vvSizeEnabled){const e=this.parameters.vvSizeOffset,t=this.parameters.vvSizeFactor,r=this.parameters.vvSizeMinSize,i=this.parameters.vvSizeMaxSize,n=l.sizeAttributeValue;u[0]*=Object(Ye["f"])(e[0]+n*t[0],r[0],i[0]),u[1]*=Object(Ye["f"])(e[2]+n*t[2],r[2],i[2])}const d=Math.max(u[0],u[1]),h=e.boundingInfo;if(Object(n["j"])(h))return void this._intersectTriangles(l,u,a,s,o);const p=Object(f["t"])(h.bbMin[0]-d,h.bbMin[1]-d,h.bbMin[2]-d,h.bbMax[0]+d,h.bbMax[1]+d,h.bbMax[2]+d),b=[s[0]-a[0],s[1]-a[1],s[2]-a[2]],m=Math.sqrt(b[0]*b[0]+b[1]*b[1]+b[2]*b[2]),g=[m/b[0],m/b[1],m/b[2]];Object(Bi["f"])(p,a,g,i.tolerance)&&this._intersectTriangles(l,u,a,s,o)}_intersectTriangles(e,t,r,i,n){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(r,i,n)}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=r.get(H["a"].POSITION);return Object(Er["a"])(i,null,!1,t)}createBufferWriter(){return new Ca(this.vertexBufferLayout)}requiresSlot(e){return e===(this.parameters.transparent?Wt["a"].TRANSPARENT_MATERIAL:Wt["a"].OPAQUE_MATERIAL)||e===Wt["a"].DRAPED_MATERIAL}createGLMaterial(e){return e.output===Vt["a"].Color||e.output===Vt["a"].Alpha||e.output===Vt["a"].Depth||e.output===Vt["a"].Normal||e.output===Vt["a"].Highlight||e.output===Vt["a"].Shadow&&this.parameters.castShadows?new Ea(e):null}static getVertexBufferLayout(e){let t=Object(Bt["a"])().vec3f(H["a"].POSITION).vec4f(H["a"].PROFILERIGHT).vec4f(H["a"].PROFILEUP).vec4f(H["a"].PROFILEVERTEXANDNORMAL);return(e.vvColorEnabled||e.vvSizeEnabled||e.vvOpacityEnabled)&&(t=t.vec4f(H["a"].FEATUREVALUE)),t}}class Ea extends ma["a"]{updateParameters(e){return this.ensureTechnique(wa,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}_updateShadowState(e){(Object(n["j"])(this.technique)||e.shadowMappingEnabled!==this.technique.configuration.receiveShadows)&&this._material.setParameters({receiveShadows:e.shadowMappingEnabled})}beginSlot(e){return this._output!==Vt["a"].Color&&this._output!==Vt["a"].Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const Aa={size:[1,1,1],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],specular:[0,0,0],opacity:1,doubleSided:!1,doubleSidedType:"normal",receiveSSAO:!0,receiveShadows:!1,castShadows:!0,slicePlaneEnabled:!1,transparent:!1,sceneHasOcludees:!1,...$t["a"],...qt["a"]};class Ca{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(H["a"].POSITION).length}write(e,t,r,i){const n=e=>{if(t.vertexAttributes.has(e)){const n=t.vertexAttributes.get(e),a=t.indices.get(e);Object(fi["a"])(4===n.size);const s=r.getField(e,P["C"]);if(!s)throw new Error("unable to acquire view for "+e);Object(Ta["b"])(a,n.data,s,i)}};n(H["a"].PROFILERIGHT),n(H["a"].PROFILEUP),n(H["a"].PROFILEVERTEXANDNORMAL),this.vertexBufferLayout.hasField(H["a"].FEATUREVALUE)&&n(H["a"].FEATUREVALUE),Object(Ta["d"])(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i)}}const Ra=["polyline"];class Ma extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._intrinsicSize=Object(l["f"])(1,1),this.upVectorAlignment="path",this.stencilWidth=.1,this.ensureDrapedStatus(!1)}async doLoad(){const e=Object(n["k"])(this.symbolLayer.width)?this.symbolLayer.width:this.symbolLayer.height,t=Object(n["k"])(this.symbolLayer.height)?this.symbolLayer.height:e;this._vvConvertOptions={modelSize:[1,1,1],symbolSize:[e,1,t],unitInMeters:this._context.renderCoordsHelper.unitInMeters,transformation:{anchor:[0,0,0],scale:[1,1,1],rotation:[0,0,0]},supportedTypes:{size:!0,color:!0,opacity:!0,rotation:!1}},this._context.renderer&&this._context.renderer.visualVariables&&this._context.renderer.visualVariables.length>0?this._fastUpdates=bt(this._context.renderer,this._vvConvertOptions):this._fastUpdates={enabled:!1};const r=this.symbolLayer.anchor||"center";this.upVectorAlignment="path","heading"===this.symbolLayer.profileRotation&&(this.upVectorAlignment="world");const i=this.symbolLayer.profile||"circle";switch(i){case"circle":default:this._profile=Hn.circle(Ha);break;case"quad":this._profile=Hn.rect()}let a=[0,0];switch("center"!==r&&(a={left:[.5,0],right:[-.5,0],top:[0,-.5],bottom:[0,.5]}[r],this._profile.translate(a[0],a[1])),this.symbolLayer.join||"simple"){case"round":this._extruder=new Zn(0,Va);break;case"bevel":this._extruder=new Zn(0,1);break;case"miter":this._extruder=new Zn(.8*Math.PI,1);break;default:this._extruder=new $n}const s=this.symbolLayer.cap||"butt";switch(s){case"none":this._startCap=new Jn,this._endCap=new Jn;break;case"butt":default:this._startCap=new Qn(this._profile,0),this._endCap=new Qn(this._profile,0,!0);break;case"square":this._startCap=new Qn(this._profile,-.5),this._endCap=new Qn(this._profile,.5,!0);break;case"round":{const e="quad"===i;this._startCap=new Kn({profile:this._profile,flip:!1,breakNormals:e,subdivisions:Ga}),this._endCap=new Kn({profile:this._profile,flip:!0,breakNormals:e,subdivisions:Ga});break}}const o=Object(n["i"])(this.symbolLayer,"material","color"),l=this._getCombinedOpacityAndColor(o),u=Object(d["g"])(l),h=l[3],p=h<1||this.needsDrivenTransparentPass,f={diffuse:u,ambient:u,opacity:h,transparent:p,vertexColors:!1,slicePlaneEnabled:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,cullFace:p||"none"===s?re["c"].None:re["c"].Back,offsetTransparentBackfaces:!0};if(!this._drivenProperties.size&&(Object(c["s"])(this._intrinsicSize,e,t),!Object(U["f"])(this._intrinsicSize[0])||!Object(U["f"])(this._intrinsicSize[1])))throw new S["a"]("graphics3dpathsymbollayer:invalid-size","Symbol sizes may not be negative values");this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size||Object(c["g"])(this._intrinsicSize,this._intrinsicSize,1/this._context.renderCoordsHelper.unitInMeters),this._fastUpdates.enabled?(Object.assign(f,this._fastUpdates.materialParameters,{size:[this._intrinsicSize[0],this._intrinsicSize[1],0]}),this._material=new Sa(f)):(f.vertexColors=this._drivenProperties.color||this._drivenProperties.opacity,this._material=new ne["a"](f)),this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._context.stage.add(this._material)}destroy(){super.destroy(),this._context.stage.remove(this._material),this._material=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Ra,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new F["a"]),i=e.renderingInfo;return this._createAs3DShape(t,i,r,t.uid)}layerOpacityChanged(){const e=Object(n["i"])(this.symbolLayer,"material","color"),t=this._getCombinedOpacity(e),r=t<1||this.needsDrivenTransparentPass;return this._material.setParameters({opacity:t,transparent:r}),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,N["i"])}slicePlaneEnabledChanged(){return this._material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}pixelRatioChanged(){return!0}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return z["a"].Recreate_Symbol;if(!mt(this._fastUpdates,t,this._vvConvertOptions))return z["a"].Recreate_Symbol;this._material.setParameters(this._fastUpdates.materialParameters)}return z["a"].Fast_Update}getVertexData(e){let t=0;const r=e.paths,i=[],n=e.spatialReference,a=this._context.elevationProvider.spatialReference,s=this._context.renderCoordsHelper.spatialReference;for(const h of r)t+=h.length;const o=new Float64Array(3*t),c=new Float64Array(3*t),l=new Float64Array(3*t);let u=0;for(const h of r){i.push({index:u,numVertices:h.length});for(const t of h)o[u++]=t[0],o[u++]=t[1],o[u++]=e.hasZ?t[2]:0}let d=!0;return n.equals(a)?this._copyVertices(o,0,c,0,t):d=Object(p["p"])(o,n,0,c,a,0,t),a.equals(s)?this._copyVertices(c,0,l,0,t):Object(p["p"])(c,a,0,l,s,0,t),{pathVertexDataInfos:i,vertexDataGS:o,vertexDataES:c,vertexDataRS:l,projectionSuccess:d,terrainElevation:0}}_copyVertices(e,t,r,i,n){t*=3,i*=3;for(let a=0;a<n;++a)r[i++]=e[t++],r[i++]=e[t++],r[i++]=e[t++]}_createAs3DShape(e,t,r,i){const a=e.geometry,s=new Array,o=new Array,c=new Array,l=a.spatialReference,d=Object(f["h"])(),h=this._context.renderCoordsHelper;Fa.spatialReference=l;const p=this.getVertexData(a);if(!p.projectionSuccess)return this.logger.warn("PathSymbol3DLayer geometry failed to be created (failed to project geometry to view spatial reference)"),null;if(p.pathVertexDataInfos.length>0){for(let i=0;i<p.pathVertexDataInfos.length;++i){const a=p.pathVertexDataInfos[i],b=a.index,m=a.numVertices;if(m<2)continue;if(Object(n["k"])(this._context.clippingExtent)&&(Object(f["k"])(d),Object(f["n"])(d,p.vertexDataES,3*b,m),!Object(f["w"])(d,this._context.clippingExtent)))continue;const g=[];for(let e=b;e<b+3*m;){const t=e++,i=e++,n=e++,a=new Gn;Object(u["y"])(a.posGS,p.vertexDataGS[t],p.vertexDataGS[i],p.vertexDataGS[n]),Object(u["y"])(a.posES,p.vertexDataES[t],p.vertexDataES[i],p.vertexDataES[n]);const s=Object(N["f"])(a.posES,this._context.elevationProvider,r,h);Object(u["y"])(ka,p.vertexDataRS[t],p.vertexDataRS[i],p.vertexDataRS[n]),h.setAltitude(ka,s),Object(u["y"])(a.pos,ka[0],ka[1],ka[2]),g.push(a)}const y=new qn(g);Pa(y,this.upVectorAlignment,this._context.renderCoordsHelper);const O=new ea(y,this._profile,this._extruder,this._startCap,this._endCap);let v=null;if(this._fastUpdates.enabled){const t=this._fastUpdates.visualVariables,r=t.size?Object(k["b"])(t.size.field,e):0,i=t.color?Object(k["b"])(t.color.field,e):0,n=t.opacity?Object(k["b"])(t.opacity.field,e):0;v=new ia(O,r,i,n)}else{const e=[this._intrinsicSize[0],this._intrinsicSize[1]];this._drivenProperties.size&&(e[0]*=Ia(t.size[0],"symbol-value"===t.size[2]?this.symbolLayer.height||0:t.size[2],this.symbolLayer.width||0),e[1]*=Ia(t.size[2],"symbol-value"===t.size[0]?this.symbolLayer.width||0:t.size[0],this.symbolLayer.height||0));let r=null;this._drivenProperties.color&&(r=t.color),this._drivenProperties.opacity&&null!=t.opacity&&(r=r?[r[0],r[1],r[2],t.opacity]:[1,1,1,t.opacity]);const i=new ra(O);i.bake(e),r&&i.bakeVertexColors(r),v=i}const{vertexAttributes:_,indices:j}=v.createGeometryData(),w=new Pn(_,j,v,l,this.upVectorAlignment,this.stencilWidth);s.push(w),o.push(this._material),c.push(v.xform)}if(s.length>0){const e={layerUid:this._context.layer.uid,graphicUid:i},t=new ie["a"]({geometries:s,materials:o,transformations:c,metadata:e}),n=new x["a"](this,t,s,null,null,La,r);return n.alignedSampledElevation=p.terrainElevation,n.needsElevationUpdates=Object(N["i"])(r.mode),n}}else 0!==a.paths.length&&a.paths.some(e=>e.length>0)||this.logger.warn("PathSymbol3DLayer geometry failed to be created (no paths were defined)");return null}}function Pa(e,t,r){switch(t){case"world":for(const t of e.vertices)Object(u["h"])(Ua,t.pos,e.offset),r.worldUpAtPosition(Ua,ka),t.setFrameFromUpVector(ka),t.computeRotationAxisAndAngleFromUpVector();break;case"path":Object(u["h"])(Ua,e.vertices[0].pos,e.offset),r.worldUpAtPosition(Ua,ka),Wn(e,ka);for(const t of e.vertices){const e=Math.sign(Object(u["j"])(t.frame.right,t.vRight));Object(u["i"])(t.rotationFrame.up,t.vRight,t.vLeft),Object(u["g"])(t.rotationFrame.up,t.rotationFrame.up,e),Object(u["t"])(t.rotationFrame.up,t.rotationFrame.up);const r=Object(u["j"])(t.rotationFrame.up,t.frame.up),i=Object(u["j"])(t.rotationFrame.up,t.frame.right);if(Object(u["g"])(Ua,t.frame.up,-i),Object(u["g"])(za,t.frame.right,r),Object(u["h"])(Ua,Ua,za),Object(u["t"])(t.rotationFrame.right,Ua),Vn(t.rotationRight,t.frame,t.rotationFrame.right),Object(u["u"])(Ua,t.vLeft),t.rotationAngle=-e*(Math.PI-Object(Ye["b"])(Object(u["j"])(Ua,t.vRight))),Math.abs(t.rotationAngle)>0){const e=Object(Ye["q"])(Math.cos(.5*t.rotationAngle));un(t.miterStretch,1+(e-1)*t.rotationRight[0]*t.rotationRight[0],(e-1)*t.rotationRight[0]*t.rotationRight[1],(e-1)*t.rotationRight[0]*t.rotationRight[1],1+(e-1)*t.rotationRight[1]*t.rotationRight[1])}const n=Math.PI-t.rotationAngle;t.maxStretchDistance=Math.abs(Math.min(t.vLeftLength,t.vRightLength)*Object(Ye["q"])(Math.cos(.5*n)))}}}function Ia(e,t,r){switch(e){case"symbol-value":return r;case"proportional":return t;default:return e}}function Da(e,t,r,i){let n=0;for(const a of e.vertices)Object(N["g"])(a.posES,r,t,i,Ba),n+=Ba.sampledElevation,Object(u["h"])(ka,a.pos,e.offset),i.setAltitude(ka,Ba.z),Object(u["l"])(a.pos,ka,e.offset);return e.updatePathVertexInformation(),n/e.vertices.length}function La(e,t,r,i){const n=e.stageObject,a=n.geometryRecords;let s=0;Na.spatialReference=i.spatialReference;for(const o of a){const e=o.geometry;if(!In(e))continue;const a=e.path,c=a.builder.path,l=e.geometrySR;Fa.spatialReference=l,s+=Da(c,t,r,i),"world"!==e.upVectorAlignment&&Pa(c,e.upVectorAlignment,i),a.onPathChanged(),e.invalidateBoundingInfo(),n.geometryVertexAttrsUpdated(o)}return s/a.length}const Na=Object(m["j"])(0,0,0,null),Fa=Object(m["j"])(0,0,0,null),ka=Object(d["f"])(),Ua=Object(Mn["c"])(),za=Object(Mn["c"])(),Ba=new N["a"],Va=3,Ga=3,Ha=10;var qa=r("f694");function Wa(e,t,r,i,n=1){if(r.isGeographic&&i===L["a"].Global){const e=new Float64Array(t.typedBuffer.length),i=3*t.count,n=Object(qa["e"])(r);for(let r=0;r<i;r+=3)Object(p["l"])(t.typedBuffer,r,e,r,n);t=P["v"].fromTypedArray(e)}Object(c["s"])(es,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);for(let o=0;o<t.count;o++)t.getVec(o,Xa),es[0]=Math.min(es[0],Xa[0]),es[1]=Math.min(es[1],Xa[1]);const a=es[0]%n,s=es[1]%n;rs[0]=es[0]-a,rs[1]=es[1]-s;for(let o=0;o<t.count;o++)t.getVec(o,Xa),e.setValues(o,(Xa[0]-rs[0])/n,(Xa[1]-rs[1])/n,rs[0]/n,rs[1]/n)}function $a(e,t,r,i,n=1){Object(u["y"])(Ja,1,0,0),Object(u["y"])(Qa,0,1,0),Object(u["y"])(Ka,0,0,1),hs(Za,t),ss(t,Ya)&&os(Ya,Ja,Qa,Ka,r,Za),Object(c["s"])(es,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),Object(c["s"])(ts,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);for(let c=0;c<t.count;c++){t.getVec(c,Xa);const e=Object(u["j"])(Ja,Xa),r=Object(u["j"])(Qa,Xa);es[0]=Math.min(es[0],e),es[1]=Math.min(es[1],r),ts[0]=Math.max(ts[0],e),ts[1]=Math.max(ts[1],r)}const a=Object(u["j"])(Ka,Za);fs(is,es[0],es[1],a,Ja,Qa,Ka),fs(ns,ts[0],es[1],a,Ja,Qa,Ka),fs(as,es[0],ts[1],a,Ja,Qa,Ka),Object(u["l"])(ns,ns,is),Object(u["g"])(ns,ns,.5),Object(u["l"])(as,as,is),Object(u["g"])(as,as,.5),Object(u["h"])(is,is,ns),Object(u["h"])(is,is,as);const s=es[0]%n,o=es[1]%n;rs[0]=es[0]-s,rs[1]=es[1]-o;for(let c=0;c<t.count;c++){t.getVec(c,Xa),e.setValues(c,(Object(u["j"])(Ja,Xa)-rs[0])/n,(Object(u["j"])(Qa,Xa)-rs[1])/n,rs[0]/n,rs[1]/n);for(let e=0;e<3;e++)i.set(c,e,is[e]),i.set(c,e+3,ns[e]),i.set(c,e+6,as[e])}}const Za=Object(d["f"])(),Xa=Object(d["f"])(),Ya=Object(kn["d"])(),Ja=Object(d["f"])(),Qa=Object(d["f"])(),Ka=Object(d["f"])(),es=Object(l["b"])(),ts=Object(l["b"])(),rs=Object(l["b"])(),is=Object(d["f"])(),ns=Object(d["f"])(),as=Object(d["f"])();function ss(e,t){const r=e.count-1;return Object(kn["e"])(e,t,0,Math.floor(r/3),Math.floor(r*(2/3)))}function os(e,t,r,i,a,s){Object(n["k"])(a)?(a.basisMatrixAtPosition(s,cs),Object(u["y"])(ls,cs[0],cs[1],cs[2]),Object(u["y"])(us,cs[4],cs[5],cs[6]),Object(u["y"])(ds,cs[8],cs[9],cs[10])):(Object(u["y"])(ls,1,0,0),Object(u["y"])(us,0,1,0),Object(u["y"])(ds,0,0,1));const o=Object(kn["r"])(e);Object(u["j"])(o,ds)<0&&Object(u["g"])(o,o,-1),Object(u["m"])(i,o);const c=Object(u["j"])(o,us),l=Object(u["j"])(o,ls);Math.abs(c)<Math.abs(l)?(Object(u["f"])(t,ls,o,-l),Object(u["t"])(t,t),Object(u["i"])(r,t,o),Object(u["t"])(r,r),Object(u["g"])(r,r,-1)):(Object(u["f"])(r,us,o,-c),Object(u["t"])(r,r),Object(u["i"])(t,r,o),Object(u["t"])(t,t))}const cs=Object(M["d"])(),ls=Object(d["f"])(),us=Object(d["f"])(),ds=Object(d["f"])();function hs(e,t){Object(u["y"])(ps,0,0,0);for(let r=0;r<t.count-1;r++)t.getVec(r,Xa),Object(u["h"])(ps,ps,Xa);Object(u["g"])(e,ps,1/(t.count-1))}const ps=Object(d["f"])();function fs(e,t,r,i,n,a,s){Object(u["y"])(e,t*n[0]+r*a[0]+i*s[0],t*n[1]+r*a[1]+i*s[1],t*n[2]+r*a[2]+i*s[2])}var bs=r("d36e"),ms=r("37e4"),gs=r("8675"),ys=r("aeb3");class Os extends rr["a"]{initializeProgram(e){const t=Os.shader.get(),r=this.configuration,i=t.build({output:r.output,attributeColor:r.vertexColors,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,style:r.style,patternSpacing:r.patternSpacing,lineWidth:r.lineWidth,draped:r.draped,oitEnabled:r.transparencyPassType===re["l"].Color,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new ar["a"](e.rctx,i,js)}bindPass(e,t){Object(er["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform4fv("uColor",e.color),this.configuration.draped?(this.program.setUniform1f("worldToScreenRatio",1/t.screenToPCSRatio),this.program.setUniform1f("texelSize",1/t.camera.pixelRatio)):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/t.camera.perScreenPixelRatio),this.configuration.output===Vt["a"].Highlight&&Object(Jt["b"])(this.program,t),(this.configuration.output===Vt["a"].Depth||t.multipassTerrainEnabled)&&this.program.setUniform2fv("nearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(Qt["a"])(this.program,t))}bindDraw(e){Object(er["c"])(this.program,e),Object(er["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(Yt["c"])(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e,t){const r=this.configuration,i=e===re["l"].NONE,n=e===re["l"].FrontFace;return Object(cr["g"])({blending:r.output===Vt["a"].Color||r.output===Vt["a"].Alpha?i?nr["d"]:Object(nr["f"])(e):null,culling:Object(cr["c"])(r.cullFace),depthTest:{func:Object(nr["g"])(e)},depthWrite:i?r.writeDepth&&cr["e"]:Object(nr["h"])(e),colorWrite:cr["d"],stencilWrite:r.sceneHasOcludees?sr["j"]:null,stencilTest:r.sceneHasOcludees?t?sr["f"]:sr["e"]:null,polygonOffset:i||n?r.polygonOffset&&vs:Object(nr["e"])(r.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipelineState(this.configuration.transparencyPassType,!0),this._setPipelineState(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}Os.shader=new tr["a"](ys["a"],()=>r.e("chunk-2d208701").then(r.bind(null,"a590")));const vs={factor:1,units:1};class _s extends ir["a"]{constructor(){super(...arguments),this.output=Vt["a"].Color,this.cullFace=re["c"].None,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.polygonOffset=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.enableOffset=!0,this.transparencyPassType=re["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(Zt["a"])([Object(ir["b"])({count:Vt["a"].COUNT})],_s.prototype,"output",void 0),Object(Zt["a"])([Object(ir["b"])({count:re["c"].COUNT})],_s.prototype,"cullFace",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"slicePlaneEnabled",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"vertexColors",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"polygonOffset",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"writeDepth",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"sceneHasOcludees",void 0),Object(Zt["a"])([Object(ir["b"])({count:ms["a"].COUNT})],_s.prototype,"style",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"patternSpacing",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"lineWidth",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"enableOffset",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"draped",void 0),Object(Zt["a"])([Object(ir["b"])({count:re["l"].COUNT})],_s.prototype,"transparencyPassType",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"multipassTerrainEnabled",void 0),Object(Zt["a"])([Object(ir["b"])()],_s.prototype,"cullAboveGround",void 0);const js=new Map([[H["a"].POSITION,0],[H["a"].COLOR,3],[H["a"].UVMAPSPACE,4],[H["a"].BOUNDINGRECT,5]]);class ws extends qt["b"]{constructor(e){super(e,Ss),this.supportsEdges=!0,this._vertexAttributeLocations=js,this.techniqueConfig=new _s}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.style=this.parameters.style,this.techniqueConfig.patternSpacing=this.parameters.patternSpacing,this.techniqueConfig.lineWidth=this.parameters.lineWidth,this.techniqueConfig.draped=this.parameters.draped,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<nr["b"],this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,t,r,i,n,a,s){Object(Bi["i"])(e,t,i,n,a,void 0,s)}requiresSlot(e,t){return e===Wt["a"].DRAPED_MATERIAL||(Object(Gt["b"])(t)===Vt["a"].Highlight?e===Wt["a"].OPAQUE_MATERIAL:e===(this.parameters.writeDepth?Wt["a"].TRANSPARENT_MATERIAL:Wt["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL))}createGLMaterial(e){return e.output===Vt["a"].Color||e.output===Vt["a"].Alpha||e.output===Vt["a"].Highlight||e.output===Vt["a"].Depth&&this.parameters.writeLinearDepth?new xs(e):null}createBufferWriter(){const e=Object(Bt["a"])().vec3f(H["a"].POSITION).vec4u8(H["a"].COLOR).vec4f(H["a"].UVMAPSPACE);return this.parameters.draped||e.mat3f(H["a"].BOUNDINGRECT),new Ts(e)}}class xs extends ma["a"]{updateParameters(e){return this.ensureTechnique(Os,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==Vt["a"].Color&&this._output!==Vt["a"].Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}class Ts extends gs["a"]{write(e,t,r,i){for(const n of this.vertexBufferLayout.fieldNames){const a=t.vertexAttributes.get(n),s=t.indices.get(n);if(a&&s)switch(n){case H["a"].POSITION:{Object(fi["a"])(3===a.size);const t=r.getField(n,P["u"]);t&&Object(Ta["f"])(s,a.data,e.transformation,t,i);break}case H["a"].COLOR:{Object(fi["a"])(3===a.size||4===a.size);const e=r.getField(n,P["J"]);e&&Object(Ta["c"])(s,a.data,a.size,e,i);break}case H["a"].UVMAPSPACE:{Object(fi["a"])(4===a.size);const e=r.getField(n,P["C"]);e&&Object(Ta["b"])(s,a.data,e,i);break}case H["a"].BOUNDINGRECT:{Object(fi["a"])(9===a.size);const t=r.getField(n,P["f"]);t&&this.writeBoundingRect(s,a.data,e.transformation,t,i);break}}}}writeBoundingRect(e,t,r,i,n){const a=r,s=i.typedBuffer,o=i.typedBufferStride,c=e.length;n*=o;for(let l=0;l<c;++l){const r=9*e[l],i=t[r],c=t[r+1],u=t[r+2];s[n]=a[0]*i+a[4]*c+a[8]*u+a[12],s[n+1]=a[1]*i+a[5]*c+a[9]*u+a[13],s[n+2]=a[2]*i+a[6]*c+a[10]*u+a[14];for(let e=3;e<9;++e)s[n+e]=t[r+e];n+=o}}}const Ss={color:[1,1,1,1],writeDepth:!0,writeLinearDepth:!1,vertexColors:!1,polygonOffset:!1,slicePlaneEnabled:!1,cullFace:re["c"].None,sceneHasOcludees:!1,style:ms["a"].Cross,patternSpacing:10,lineWidth:1,draped:!0,...qt["a"]};function Es(e,t,r){return Cs(As(e),t,r)}function As(e){return e&&e.pattern||null}function Cs(e,t,r){return Object(n["k"])(e)?"none"===e.style||"solid"===e.style?("none"===e.style&&(t.color=Object(Pe["g"])(0,0,0,0),t.transparent=!0),new bs["a"](t)):(t.style=Rs(e.style),t.draped=r.isDraped,new ws(t)):new bs["a"](t)}function Rs(e){switch(e){case"horizontal":return ms["a"].Horizontal;case"vertical":return ms["a"].Vertical;case"cross":return ms["a"].Cross;case"forward-diagonal":return ms["a"].ForwardDiagonal;case"backward-diagonal":return ms["a"].BackwardDiagonal;case"diagonal-cross":return ms["a"].DiagonalCross;default:return}}function Ms(e){return e.material instanceof ws&&!e.material.parameters.draped}function Ps(e,t){if(Ms(e)){const r=e.geometry.vertexAttributes,i=r.get(H["a"].POSITION).data,n=r.get(H["a"].UVMAPSPACE).data,a=r.get(H["a"].BOUNDINGRECT).data;$a(P["C"].fromTypedArray(n),P["v"].fromTypedArray(i),t,P["g"].fromTypedArray(a))}}function Is(e,t,r,i){const n=Object(ke["c"])(e,t,r,i),a=e.stageObject.geometryRecords;for(let s=0;s<a.length;s++)Ps(a[s],i);return n}const Ds=["polyline","polygon","extent"];class Ls extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._needsUV=!1,this._hasOutline=!1}async doLoad(){}_ensureMaterials(){this._ensureFillMaterial(),this._ensureOutlineMaterial()}_ensureFillMaterial(){if(Object(n["k"])(this._material))return;const e=Object(n["i"])(this.symbolLayer,"material","color"),t=this._getCombinedOpacityAndColor(e);this._material=Es(this.symbolLayer,{color:t,transparent:t[3]<1||this.needsDrivenTransparentPass,polygonOffset:!1,vertexColors:!0,writeLinearDepth:!0,slicePlaneEnabled:this._context.slicePlaneEnabled},{isDraped:this.draped}),this._needsUV=this._material instanceof ws,this._context.stage.add(this._material)}_ensureOutlineMaterial(){const e=this.symbolLayer.outline;if(Object(n["k"])(this._outlineMaterial)||!this._isValidOutline(e))return;this._hasOutline=!0;const t=t=>{const r=Object(yr["b"])(e.pattern);return new Or["a"]({width:t,color:this._getOutlineColor(),polygonOffset:!0,slicePlaneEnabled:this._context.slicePlaneEnabled,isClosed:!0,stipplePattern:r,stippleScaleWithLineWidth:!0,cap:Object(Ut["e"])(e.patternCap||"butt")})};this._outlineMaterial=t(Object(Ce["g"])(e.size)),this._context.stage.add(this._outlineMaterial)}_isValidOutline(e){return Object(n["k"])(e)&&e.size&&e.size>0&&Object(n["k"])(e.color)&&(Object(n["j"])(e.pattern)||"style"!==e.pattern.type||"none"!==e.pattern.style)}destroy(){super.destroy(),this._context.stage.remove(this._material),this._material=null,this._context.stage.remove(this._outlineMaterial),this._outlineMaterial=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Ds,this.symbolLayer.type))return null;const r=this._getVertexOpacityAndColor(e.renderingInfo,255),i=this.setGraphicElevationContext(t,new F["a"]);return this.ensureDrapedStatus("on-the-ground"===i.mode),this._ensureMaterials(),this.draped?this._createAsOverlay(t,r):this._createAs3DShape(t,r,i)}layerOpacityChanged(){if(Object(n["k"])(this._material)){const e=this._material.parameters.color,t=Object(n["i"])(this.symbolLayer,"material","color"),r=this._getCombinedOpacity(t);this._material.setParameters({color:[e[0],e[1],e[2],r],transparent:r<1||this.needsDrivenTransparentPass})}if(Object(n["k"])(this._outlineMaterial)){const e=this._outlineMaterial.parameters.color;this._outlineMaterial.setParameters({color:[e[0],e[1],e[2],this._getOutlineOpacity()]})}return!0}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,n=Object(N["e"])(Ls.elevationModeChangeTypes,r,i);if(n!==N["b"].UPDATE)return n;const a=Object(N["h"])(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){if(Object(n["k"])(this._material)&&this._material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled}),Object(n["k"])(this._outlineMaterial)){const e={slicePlaneEnabled:this._context.slicePlaneEnabled};this._outlineMaterial.setParameters(e)}return!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_createAs3DShape(e,t,r){const i=Z(e.geometry);if(Object(n["j"])(i))return null;Fs.renderData=X(i,this._context.elevationProvider,this._context.renderCoordsHelper,r),Fs.color=t;const a=Fs.renderData.position.length/3;if(this._needsUV&&(Fs.uvMapSpace=new Float32Array(4*a),Fs.boundingRect=new Float64Array(9*a)),Fs.outNum=0,Fs.outGeometries=[],Fs.outTransforms=[],Fs.outMaterials=[],this._createAs3DShapeFill(Fs),this._hasOutline&&this._createAs3DShapeOutline(Fs),this._logGeometryCreationWarnings(Fs.renderData,i.rings,"rings","FillSymbol3DLayer"),0===Fs.outNum)return null;this._needsUV&&$a(P["C"].fromTypedArray(Fs.uvMapSpace),P["v"].fromTypedArray(Fs.renderData.position),this._context.renderCoordsHelper,P["g"].fromTypedArray(Fs.boundingRect));const s=new ie["a"]({geometries:Fs.outGeometries,materials:Fs.outMaterials,transformations:Fs.outTransforms,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:e.uid}}),o=new x["a"](this,s,Fs.outGeometries,null,null,Is,r);return o.alignedSampledElevation=Fs.renderData.sampledElevation,o.needsElevationUpdates=Object(N["h"])(r.mode),o}_createAs3DShapeFill(e){const t=e.renderData.polygons;for(const{position:r,mapPosition:i,holeIndices:a,index:s,count:o}of t){if(Object(n["k"])(this._context.clippingExtent)&&(Object(f["k"])(Ns),Object(f["n"])(Ns,i),!Object(f["w"])(Ns,this._context.clippingExtent)))continue;const t=Object(E["a"])(i,a,3);if(0===t.length)continue;const c=new Uint32Array(t),l=W({indices:c,attributeData:{position:r,color:e.color,mapPosition:i,uvMapSpace:this._needsUV?new Float32Array(e.uvMapSpace.buffer,4*s*e.uvMapSpace.BYTES_PER_ELEMENT,4*o):null,boundingRect:this._needsUV?new Float64Array(e.boundingRect.buffer,9*s*e.boundingRect.BYTES_PER_ELEMENT,9*o):null}});e.outGeometries.push(l),e.outMaterials.push(Object(n["t"])(this._material)),e.outTransforms.push(M["a"]),e.outNum++}}_createAs3DShapeOutline(e){if(!this._hasOutline)return;const t=e.renderData.outlines;for(let r=0;r<t.length;++r){const{mapPosition:i,position:a}=t[r];if(Object(n["k"])(this._context.clippingExtent)&&(Object(f["k"])(Ns),Object(f["n"])(Ns,i),!Object(f["w"])(Ns,this._context.clippingExtent)))continue;const s=Object(Ut["b"])({overlayInfo:null,removeDuplicateStartEnd:Ut["a"].REMOVE,attributeData:{position:a,mapPosition:i}}),o=s.vertexAttributes.get(H["a"].POSITION);o.data===a&&(o.data=new Float64Array(a)),e.outGeometries.push(s),e.outMaterials.push(Object(n["t"])(this._outlineMaterial)),e.outTransforms.push(M["a"]),e.outNum++}}_createAsOverlay(e,t){const r=Z(e.geometry);if(Object(n["j"])(r))return null;Object(n["t"])(this._material).renderPriority=this._renderPriority+this._renderPriorityStep/2,Object(n["k"])(this._outlineMaterial)&&(this._outlineMaterial.renderPriority=this._renderPriority),ks.renderData=Y(r,this._context.overlaySR),ks.color=t;const i=ks.renderData.position.length/3;return this._needsUV&&(ks.uvMapSpace=new Float32Array(4*i)),ks.outNum=0,ks.outGeometries=[],ks.outBoundingBox=Object(f["k"])(),ks.layerUid=this._context.layer.uid,ks.graphicsUid=e.uid,this._createAsOverlayFill(ks),this._hasOutline&&this._createAsOverlayOutline(ks),this._logGeometryCreationWarnings(ks.renderData,r.rings,"rings","FillSymbol3DLayer"),0===ks.outNum?null:(this._needsUV&&Wa(P["C"].fromTypedArray(ks.uvMapSpace),P["v"].fromTypedArray(ks.renderData.position),this._context.overlaySR,this._context.graphicsCoreOwner.view.state.viewingMode),ks.outNum>0?new ze(this,ks.outGeometries,ks.outBoundingBox):null)}_createAsOverlayFill(e){const t=e.renderData.polygons;for(const{position:r,holeIndices:i,index:a,count:s}of t){if(Object(f["k"])(Ns),Object(f["n"])(Ns,r),!Object(f["w"])(Ns,this._context.clippingExtent))continue;const t=Object(E["a"])(r,i,3);if(0===t.length)continue;Object(f["m"])(e.outBoundingBox,Ns);const o=new Uint32Array(t),c=W({indices:o,attributeData:{position:r,color:e.color,uvMapSpace:this._needsUV?new Float32Array(e.uvMapSpace.buffer,4*a*e.uvMapSpace.BYTES_PER_ELEMENT,4*s):null}}),l=new wt["a"](c,Object(n["t"])(this._material),{layerUid:e.layerUid,graphicUid:e.graphicsUid}),u=Ns;Object(Me["l"])(l.boundingSphere,.5*(u[0]+u[3]),.5*(u[1]+u[4]),0,.5*Math.sqrt((u[3]-u[0])*(u[3]-u[0])+(u[4]-u[1])*(u[4]-u[1]))),e.outGeometries.push(l),e.outNum++}}_createAsOverlayOutline(e){if(!this._hasOutline)return;const t=e.renderData.outlines;for(let r=0;r<t.length;++r){const{position:i}=t[r];if(Object(f["k"])(Ns),Object(f["n"])(Ns,i),!Object(f["w"])(Ns,this._context.clippingExtent))continue;Object(f["m"])(e.outBoundingBox,Ns);const a=Object(Ut["b"])({overlayInfo:{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper},removeDuplicateStartEnd:Ut["a"].REMOVE,attributeData:{position:i}}),s=new wt["a"](a,Object(n["t"])(this._outlineMaterial),{layerUid:e.layerUid,graphicUid:e.graphicsUid}),o=Ns;Object(Me["l"])(s.boundingSphere,.5*(o[0]+o[3]),.5*(o[1]+o[4]),0,.5*Math.sqrt((o[3]-o[0])*(o[3]-o[0])+(o[4]-o[1])*(o[4]-o[1]))),e.outGeometries.push(s),e.outNum++}}_getOutlineOpacity(){const e=Object(n["i"])(this.symbolLayer,"outline","color");return(this.draped?1:this._getLayerOpacity())*(Object(n["k"])(e)?e.a:0)}_getOutlineColor(){const e=Object(n["i"])(this.symbolLayer,"outline","color"),t=this._getOutlineOpacity();return Object(U["g"])(Object(n["k"])(e)?Ee["a"].toUnitRGB(e):null,t)}get test(){return{createAsOverlay:(e,t)=>this._createAsOverlay(e,t),createAs3DShape:(e,t,r)=>this._createAs3DShape(e,t,r)}}}Ls.elevationModeChangeTypes={definedChanged:N["b"].RECREATE,staysOnTheGround:N["b"].NONE,onTheGroundChanged:N["b"].RECREATE};const Ns=Object(f["h"])(),Fs={renderData:null,color:null,uvMapSpace:null,boundingRect:null,outNum:0,outBoundingBox:null,outGeometries:null,outMaterials:null,outTransforms:null},ks={renderData:null,color:null,uvMapSpace:null,outNum:0,outBoundingBox:null,outGeometries:null,outMaterials:null,outTransforms:null};var Us=r("38bf"),zs=r("a37d"),Bs=r("0494");class Vs{constructor(e,t,r){this._renderer=new Bs["b"](e,t,r)}get key(){return this._renderer.key}get baselineAnchorY(){return 1-this._renderer.firstRenderedBaselinePosition/this._renderer.renderedHeight}get displayWidth(){return this._renderer.displayWidth}get displayHeight(){return this._renderer.displayHeight}create(){const e=Object(Bs["c"])(Gs,this._renderer.renderedWidth,this._renderer.renderedHeight),t=e.getContext("2d");return t.save(),this._renderer.render(t,0,0),t.restore(),new xt["a"](e,{wrap:{s:Cr["B"].CLAMP_TO_EDGE,t:Cr["B"].CLAMP_TO_EDGE},noUnpackFlip:!1,mipmap:!0,preMultiplyAlpha:!0,powerOfTwoResizeMode:re["g"].PAD})}}const Gs={canvas:null},Hs=[0,0,1];class qs extends k["a"]{constructor(e,t,r,i){super(e,t,r,i),this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!1},this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const e=Object(U["j"])(this.symbolLayer.size);if(e)throw new S["a"]("graphics3dtextsymbollayer:invalid-size",e)}await this._createTextRenderParameters()}async _createTextRenderParameters(){const e=this._context.graphicsCoreOwner.view.pixelRatio;this._textRenderParameters=await zs["a"].fromSymbol(this.symbolLayer,e)}destroy(){super.destroy()}createGraphics3DGraphic(e){const t=e.graphic,r=Object(Ze["c"])(t.geometry);if(Object(n["j"])(r))return this.logger.warn("unsupported geometry type for text symbol: "+t.geometry.type),null;const i=this.symbolLayer.text;if(Object(n["j"])(i)||""===i)return null;const a=Object(Us["b"])(this.symbol)&&this.symbol.hasVisibleVerticalOffset()?this.symbol.verticalOffset:null;if(Object(n["k"])(a)&&!Object(Us["e"])(this.symbolLayer))return this.logger.errorOncePerTick(`Callouts and vertical offset on text symbols are currently only supported with 'center' horizontal alignment (not with '${this.symbolLayer.horizontalAlignment}' alignment)`),null;const s={...Xs,verticalOffset:a,horizontalPlacement:Object($e["b"])(this.symbolLayer.horizontalAlignment),verticalPlacement:Object($e["g"])(this.symbolLayer.verticalAlignment)};return this._createAs3DShape(t,r,i,s)}createLabel(e,t,r,i){const a=e.graphic,s=Object(Ze["c"])(a.geometry);if(Object(n["j"])(s))return this.logger.warn("unsupported geometry type for label: "+a.geometry.type),null;const o=t.text;return!o||/^\s+$/.test(o)?null:this._createAs3DShape(a,s,o,t,r,i)}setGraphicElevationContext(e,t,r=0){const i=super.setGraphicElevationContext(e,t);return i.addOffsetRenderUnits(r),i}layerOpacityChanged(){return this.logger.warn("layer opacity change not yet implemented in Graphics3DTextSymbolLayer"),!1}layerElevationInfoChanged(e,t){return Ws(e,t,(e,t)=>{this.updateGraphicElevationContext(t,e)}),N["b"].UPDATE}slicePlaneEnabledChanged(e,t){return Ws(e,t,e=>{for(const t of e.stageObject.geometryRecords)t.material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled})}),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!1}updateGraphicElevationContext(e,t){this.setGraphicElevationContext(e,t.elevationContext,t.metadata.elevationOffset),t.needsElevationUpdates=Object(N["h"])(t.elevationContext.mode)||"absolute-height"===t.elevationContext.mode}_defaultElevationInfoNoZ(){return Zs}_createAs3DShape(e,t,r,i,s,o){const c=this.setGraphicElevationContext(e,new F["a"],i.elevationOffset),u="polyline"===Object(n["i"])(e.geometry,"type"),d=e.uid;let h=null,p=null;if(Object(n["j"])(o)){const e=Object($e["f"])(i.horizontalPlacement);h=new Vs(r,e,this._textRenderParameters);let t=null;p=this._context.sharedResources.textures.fromData(h.key,()=>Object(n["t"])(h).create(),()=>{Object(n["k"])(t)&&t.release()});const s=this._context.stage.renderView.textureRepository.acquire(p.texture.id);if(Object(n["j"])(s)||Object(a["o"])(s))return p.release(),null;t=s}const f=$s(h,i),b={occlusionTest:!0,screenOffset:i.screenOffset,anchorPos:f,polygonOffset:!0,color:[1,1,1,1],centerOffsetUnits:i.centerOffsetUnits,debugDrawLabelBorder:i.debugDrawLabelBorder,drawInSecondSlot:!0};if(Object(n["k"])(p)&&(b.textureId=p.texture.id),Object(n["k"])(o)&&(b.textureId=o.id),Object(n["k"])(i.verticalOffset)){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=i.verticalOffset;b.verticalOffset={screenLength:Object(Ce["g"])(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0}}if(this._context.screenSizePerspectiveEnabled){const{screenSizePerspectiveSettings:e,screenSizePerspectiveSettingsLabels:t}=this._context.sharedResources;b.screenSizePerspective=t.overridePadding(this._textRenderParameters.haloSize+this._textRenderParameters.definition.background.padding[0]),b.screenSizePerspectiveAlignment=e}let m;if(u&&(b.shaderPolygonOffset=1e-4),b.slicePlaneEnabled=this._context.slicePlaneEnabled,Object(n["k"])(s)){const e=JSON.stringify(b);m=s.get(e),Object(n["j"])(m)&&(m=new Tt["a"](b),s.add(e,m))}else m=new Tt["a"](b);const g=[m],y=i.translation,O=Object(n["k"])(h)?[h.displayWidth,h.displayHeight]:[0,0],v=i.centerOffset,_=Hs,j=[0,0],w=[jt["a"].createPointGeometry(_,y,null,O,v,j,null)],T=this._context.layer.uid,S=Object(Ze["a"])(this._context,t,w,g,c,T,d);if(null===S)return null;const E=new x["a"](this,S.object,w,Object(n["j"])(s)?g:null,p,ke["b"],c);E.alignedSampledElevation=S.sampledElevation,E.needsElevationUpdates=Object(N["h"])(c.mode)||"absolute-height"===c.mode;const{displayWidth:A,displayHeight:C}=Object(n["k"])(h)?h:i;E.getScreenSize=(e=Object(l["b"])())=>(e[0]=A,e[1]=C,e);const R={labelText:r,elevationOffset:i.elevationOffset};return E.metadata=R,Object(Ze["b"])(E,t,this._context.elevationProvider),E}}function Ws(e,t,r){e&&e.forEach(e=>{const i=t(e);Object(n["k"])(i)&&r(i,e.graphic)})}function $s(e,t){if("baseline"===t.verticalPlacement){const r=$e["d"][t.horizontalPlacement],i=Object(n["k"])(e)?e.baselineAnchorY:0;return Object(l["f"])(r,i)}const r=Object($e["a"])(t.horizontalPlacement,t.verticalPlacement);return $e["e"][r]}const Zs={mode:"relative-to-ground",offset:0},Xs={text:null,translation:[0,0,0],elevationOffset:0,centerOffset:[0,0,0,1],screenOffset:[0,0],horizontalPlacement:"center",verticalPlacement:"center",verticalOffset:null,centerOffsetUnits:null,debugDrawLabelBorder:!1,displayWidth:0,displayHeight:0};var Ys=r("8048"),Js=r("1f93"),Qs=r("b855");const Ks=["polyline","polygon","extent"];class eo extends k["a"]{constructor(e,t,r,i){super(e,t,r,i)}async doLoad(){}destroy(){super.destroy(),this._context.stage.remove(this._material),this._material=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Ks,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new F["a"]);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.ensureMaterial(),this.draped?this._createAsOverlay(t):this._createAs3DShape(t,r,t.uid)}ensureMaterial(){if(Object(n["k"])(this._material))return;const e={...Qs["a"]},t=this.symbolLayer.color;Object(n["k"])(t)&&(e.color=Ee["a"].toUnitRGBA(t));const r=this._getCombinedOpacity(t,{hasIntrinsicColor:!0});e.color=[e.color[0],e.color[1],e.color[2],r],e.transparent=r<1||this.needsDrivenTransparentPass,e.waveDirection=Object(n["k"])(this.symbolLayer.waveDirection)?eo.headingVectorFromAngle(this.symbolLayer.waveDirection):Object(l["f"])(0,0);const i=this.symbolLayer.waveStrength+"-"+this.symbolLayer.waterbodySize,a=Qs["b"][i];e.waveStrength=a.waveStrength,e.waveTextureRepeat=a.textureRepeat,e.waveVelocity=a.waveVelocity,e.flowStrength=a.perturbationStrength,e.slicePlaneEnabled=this._context.slicePlaneEnabled,e.isDraped=this.draped,this._material=new Js["a"](e),this._context.stage.add(this._material)}layerOpacityChanged(){if(Object(n["j"])(this._material))return!0;const e=this._material.parameters.color,t=this._getCombinedOpacity(this.symbolLayer.color,{hasIntrinsicColor:!0}),r=t<1||this.needsDrivenTransparentPass;return this._material.setParameters({color:[e[0],e[1],e[2],t],transparent:r}),!0}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,n=Object(N["e"])(eo.elevationModeChangeTypes,r,i);if(n!==N["b"].UPDATE)return n;const a=Object(N["h"])(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>a)}slicePlaneEnabledChanged(){return Object(n["k"])(this._material)&&this._material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_createAs3DShape(e,t,r){const i=Z(e.geometry);if(Object(n["j"])(i))return null;ao.renderData=X(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);const a=ao.renderData.position.length/3;if(ao.uvCoords=new Float64Array(2*a),ao.outNum=0,ao.outGeometries=[],ao.outTransforms=[],ao.outMaterials=[],this._create3DShapeGeometries(ao),this._logGeometryCreationWarnings(ao.renderData,i.rings,"rings","WaterSymbol3DLayer"),0===ao.outNum)return null;this._createUVCoordsFromVertices(ao.uvCoords,ao.renderData.mapPosition,a,this._context.elevationProvider.spatialReference);const s=new ie["a"]({geometries:ao.outGeometries,materials:ao.outMaterials,transformations:ao.outTransforms,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:r}}),o=new x["a"](this,s,ao.outGeometries,null,null,ke["c"],t);return o.alignedSampledElevation=ao.renderData.sampledElevation,o.needsElevationUpdates=Object(N["h"])(t.mode),o}_createUVCoordsFromVertices(e,t,r,i){const n=Object(Ys["f"])(i);Object(b["n"])(ro);for(let o=0;o<r;o++)Object(c["s"])(io,t[3*o+0],t[3*o+1]),Object(b["q"])(ro,io);Object(Me["b"])(ro,ro,n);const a=ro[0]%eo.unitSizeOfTexture,s=ro[1]%eo.unitSizeOfTexture;to[0]=ro[0]-a,to[1]=ro[1]-s;for(let o=0;o<r;o++)e[2*o+0]=(t[3*o+0]*n-to[0])/eo.unitSizeOfTexture,e[2*o+1]=(t[3*o+1]*n-to[1])/eo.unitSizeOfTexture}_create3DShapeGeometries(e){const t=e.renderData.polygons,r=e.uvCoords;for(const{count:i,index:a,position:s,mapPosition:o,holeIndices:c}of t){if(Object(n["k"])(this._context.clippingExtent)&&(Object(f["k"])(no),Object(f["n"])(no,o),!Object(f["w"])(no,this._context.clippingExtent)))continue;const t=Object(E["a"])(o,c,3);if(0===t.length)continue;const l=new Uint32Array(t),u=new Float64Array(r.buffer,2*a*r.BYTES_PER_ELEMENT,2*i),d=$({indices:l,attributeData:{position:s,uv0:u,mapPosition:o}});e.outGeometries.push(d),e.outMaterials.push(Object(n["t"])(this._material)),e.outTransforms.push(M["a"]),e.outNum++}}_createAsOverlay(e){const t=Z(e.geometry);if(Object(n["j"])(t))return null;Object(n["t"])(this._material).renderPriority=this._renderPriority,so.renderData=Y(t,this._context.overlaySR);const r=so.renderData.position.length/3;return so.uvCoords=new Float64Array(2*r),so.outNum=0,so.outGeometries=[],so.outBoundingBox=Object(f["k"])(),so.layerUid=this._context.layer.uid,so.graphicsUid=e.uid,this._createAsOverlayWater(so),this._logGeometryCreationWarnings(so.renderData,t.rings,"rings","WaterSymbol3DLayer"),0===so.outNum?null:(this._createUVCoordsFromVertices(so.uvCoords,so.renderData.position,r,this._context.overlaySR),so.outNum>0?new ze(this,so.outGeometries,so.outBoundingBox):null)}_createAsOverlayWater(e){const t=e.uvCoords,r=e.renderData.polygons;for(const{position:i,holeIndices:a,index:s,count:o}of r){if(Object(f["k"])(no),Object(f["n"])(no,i),!Object(f["w"])(no,this._context.clippingExtent))continue;Object(f["m"])(e.outBoundingBox,no);const r=Object(E["a"])(i,a,3);if(0===r.length)continue;const c=new Uint32Array(r),l=new Float64Array(t.buffer,2*s*t.BYTES_PER_ELEMENT,2*o),u=$({indices:c,attributeData:{position:i,uv0:l}}),d=new wt["a"](u,Object(n["t"])(this._material),{layerUid:e.layerUid,graphicUid:e.graphicsUid}),h=no;Object(Me["l"])(d.boundingSphere,.5*(h[0]+h[3]),.5*(h[1]+h[4]),0,.5*Math.sqrt((h[3]-h[0])*(h[3]-h[0])+(h[4]-h[1])*(h[4]-h[1]))),e.outGeometries.push(d),e.outNum++}}static headingVectorFromAngle(e){const t=Object(l["b"])(),r=Object(on["c"])(e);return t[0]=Math.sin(r),t[1]=Math.cos(r),t}get test(){return{create3DShape:e=>this._createAs3DShape(e.graphic,e.elevationContext,e.graphicUid),ensureMaterial:()=>this.ensureMaterial()}}}eo.unitSizeOfTexture=100,eo.elevationModeChangeTypes={definedChanged:N["b"].RECREATE,staysOnTheGround:N["b"].NONE,onTheGroundChanged:N["b"].RECREATE};const to=Object(l["b"])(),ro=Object(b["l"])(),io=Object(l["b"])(),no=Object(f["h"])(),ao={renderData:null,uvCoords:null,outNum:0,outBoundingBox:null,outGeometries:null,outMaterials:null,outTransforms:null},so={renderData:null,uvCoords:null,outNum:0,outBoundingBox:null,outGeometries:null,outMaterials:null,outTransforms:null},oo=T["a"].getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayerFactory");function co(e,t,r,i){const n=uo[e.type]&&uo[e.type][t.type]||lo[t.type];return n?new n(e,t,r,i):(oo.error("GraphicsLayerFactory#make","unknown symbol type "+t.type),null)}const lo={icon:Dt,object:en,line:_r,path:Ma,fill:Ls,extrude:se,text:qs,water:eo};const uo={"mesh-3d":{fill:Mr}};class ho extends Jr["b"]{constructor(e,t,r){super(t.schedule),this._symbol=e,this._context=t,this._backgroundLayers=r,this._destroyed=!1,this.symbolLayers=new Array,this.referenced=0,this._extentPadding=0}set symbol(e){this._symbol=e;for(let t=0;t<e.symbolLayers.length;t++){const r=this.symbolLayers[t];Object(n["j"])(r)||(r.symbol=e,r.symbolLayer=e.symbolLayers.items[t])}}get symbol(){return this._symbol}async doLoad(e){let t=this._symbol.symbolLayers;this._extentPadding=0,this._backgroundLayers&&(t=this._backgroundLayers.concat(t));const r=t.length;for(;this.symbolLayers.length<t.length;)this.symbolLayers.push(null);this.symbolLayers.length=t.length;const s=[];for(let i=0;i<r;i++){const n=t.getItemAt(i);if(!1===n.enabled)continue;po.renderPriority=1-(1+i)/r,po.renderPriorityStep=1/r,po.ignoreDrivers=n._ignoreDrivers;const o=co(this.symbol,n,this._context,po);s.push(Object(a["r"])(e,()=>{this.symbolLayers[i]=null,o.destroy()})),this.symbolLayers[i]=o}await Object(i["b"])(this.symbolLayers,async(e,t)=>{if(Object(n["k"])(e))try{await e.load(),this._extentPadding+=Math.max(this._extentPadding,e.extentPadding)}catch{this.symbolLayers[t]=null}});for(const i of s)null==i||i.remove();if(s.length=0,Object(a["v"])(e),this.symbolLayers.length&&!this.symbolLayers.some(e=>!!e))throw new Error}getSymbolLayerSize(e){const t=this.symbolLayers[e];return Object(n["k"])(t)?t.getCachedSize():null}get extentPadding(){return this._extentPadding}createGraphics3DGraphic(e,t){const r=e.graphic,i=new Array(this.symbolLayers.length);for(let s=0;s<this.symbolLayers.length;s++){const t=this.symbolLayers[s];i[s]=Object(n["k"])(t)?t.createGraphics3DGraphic(e):null}const a=this._context.arcade||this._context.featureExpressionInfoContext&&this._context.featureExpressionInfoContext.arcade&&this._context.featureExpressionInfoContext.arcade.modules||null;return new j(r,t||this,i,e.layer,a)}get complexity(){return Object(oi["f"])(this.symbolLayers.map(e=>Object(n["i"])(e,"complexity")))}globalPropertyChanged(e,t){const r=this.symbolLayers.length;for(let i=0;i<r;i++){const r=this.symbolLayers[i],a=e=>{const t=e.graphics[i];return t instanceof x["a"]?t:null};if(Object(n["k"])(r)&&!r.globalPropertyChanged(e,t,a))return!1}return!0}applyRendererDiff(e,t){return this.loadStatus!==Jr["a"].LOADED?z["a"].Recreate_Symbol:this.symbolLayers.reduce((r,i)=>r!==z["a"].Recreate_Symbol&&Object(n["k"])(i)?Math.min(r,i.applyRendererDiff(e,t)):r,z["a"].Fast_Update)}prepareSymbolPatch(e){if(this.loadStatus===Jr["a"].FAILED)return;if("partial"!==e.diff.type)return;const t=e.diff.diff;if(!t.symbolLayers||"partial"!==t.symbolLayers.type)return;const r=t.symbolLayers.diff;this.symbolLayers.forEach((t,i)=>{if(Object(n["j"])(t))return;const a=r[i];if(a){const r={diff:a,graphics3DGraphicPatches:[],symbolLayerStatePatches:[]};t.prepareSymbolLayerPatch(r),e.symbolStatePatches.push(...r.symbolLayerStatePatches),r.graphics3DGraphicPatches.length&&e.graphics3DGraphicPatches.push((e,t)=>{const a=e.graphics[i];Object(n["k"])(a)&&r.graphics3DGraphicPatches.forEach(e=>e(a,t))})}})}updateGeometry(e,t){for(let r=0;r<this.symbolLayers.length;r++){const i=this.symbolLayers[r];if(Object(n["j"])(i))continue;const a=e.graphics[r];if(Object(n["j"])(a)||!i.updateGeometry(a,t))return!1}return!0}onRemoveGraphic(e){for(let t=0;t<this.symbolLayers.length;t++){const r=this.symbolLayers[t];if(Object(n["j"])(r))continue;const i=e.graphics[t];Object(n["k"])(i)&&r.onRemoveGraphic(i)}}getFastUpdateStatus(){let e=0,t=0,r=0;return this.symbolLayers.forEach(i=>{Object(n["j"])(i)||(i.loadStatus===Jr["a"].LOADING?e++:i.isFastUpdatesEnabled()?r++:t++)}),{loading:e,slow:t,fast:r}}destroy(){if(this.destroyed)console.error("Graphics3DSymbol.destroy called when already destroyed!");else{super.destroy();for(const e of this.symbolLayers)Object(n["k"])(e)&&e.destroy();this.symbolLayers.length=0,this._destroyed=!0}}get destroyed(){return this._destroyed}}const po={renderPriority:0,renderPriorityStep:1,ignoreDrivers:!1}},6415:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("e92d");const n=i["a"].getLogger("esri.views.3d.support.buffer.math")},6431:function(e,t,r){"use strict";var i,n;r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),function(e){e[e.GRAPHIC=0]="GRAPHIC",e[e.LABEL=1]="LABEL",e[e._COUNT=2]="_COUNT"}(i||(i={})),function(e){e[e.USER_SETTING=0]="USER_SETTING",e[e.SCALE_RANGE=1]="SCALE_RANGE",e[e.FILTER=2]="FILTER",e[e.DECONFLICTION=3]="DECONFLICTION",e[e._COUNT=4]="_COUNT"}(n||(n={}))},"648c":function(e,t,r){"use strict";var i,n,a;r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n})),function(e){e[e.RasterImage=0]="RasterImage",e[e.Features=1]="Features"}(i||(i={})),function(e){e[e.WithRasterImage=0]="WithRasterImage",e[e.WithoutRasterImage=1]="WithoutRasterImage"}(n||(n={})),function(e){e[e.LAYER_VIEW=0]="LAYER_VIEW",e[e.EXTERNAL=1]="EXTERNAL"}(a||(a={}))},"658b":function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("b2b2"),o=r("1233"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("afcf")),u=r("d386"),d=r("09db");let h=i=class extends a["a"]{constructor(e){super(e),this.end=null,this.start=null}static get allTime(){return p}static get empty(){return f}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=Object(s["k"])(this.start)?this.start.getTime():this.start,r=Object(s["k"])(this.end)?this.end.getTime():this.end,i=Object(s["k"])(e.start)?e.start.getTime():e.start,n=Object(s["k"])(e.end)?e.end.getTime():e.end;return t===i&&r===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=Object(s["b"])(this.start,t=>Object(o["c"])(t,e)),r=Object(s["b"])(this.end,t=>Object(o["b"])(Object(o["c"])(t,e),1,e));return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=Object(s["n"])(this.start,-1/0,e=>e.getTime()),r=Object(s["n"])(this.end,1/0,e=>e.getTime()),n=Object(s["n"])(e.start,-1/0,e=>e.getTime()),a=Object(s["n"])(e.end,1/0,e=>e.getTime());let o,c;if(n>=t&&n<=r?o=n:t>=n&&t<=a&&(o=t),r>=n&&r<=a?c=r:a>=t&&a<=r&&(c=a),!isNaN(o)&&!isNaN(c)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=c===1/0?null:new Date(c),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:n,end:a}=this;return Object(s["k"])(n)&&(r.start=Object(o["b"])(n,e,t)),Object(s["k"])(a)&&(r.end=Object(o["b"])(a,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=Object(s["k"])(this.start)&&Object(s["k"])(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=Object(s["k"])(this.end)&&Object(s["k"])(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};Object(n["a"])([Object(c["b"])({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),Object(n["a"])([Object(l["a"])("end")],h.prototype,"readEnd",null),Object(n["a"])([Object(d["a"])("end")],h.prototype,"writeEnd",null),Object(n["a"])([Object(c["b"])({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),Object(n["a"])([Object(c["b"])({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),Object(n["a"])([Object(c["b"])({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),Object(n["a"])([Object(l["a"])("start")],h.prototype,"readStart",null),Object(n["a"])([Object(d["a"])("start")],h.prototype,"writeStart",null),h=i=Object(n["a"])([Object(u["a"])("esri.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0}),b=h},"65c9":function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return d}));var i=r("2aad"),n=r("6a07"),a=r("d047"),s=r("d017"),o=r("58c2"),c=r("501b"),l=r("3886"),u=r("690a");function d(e){const t=new u["a"];return t.include(s["a"]),t.fragment.include(c["a"]),t.fragment.include(a["a"]),t.include(o["a"]),t.include(i["a"]),t.fragment.uniforms.add("defaultDepthTex","sampler2D").add("highlightDepthTex","sampler2D").add("depthMap","sampler2D").add("highlightMap","sampler2D").add("uColor","vec4").add("nearFar","vec2").add("opacity","float").add("occludedOpacity","float").add("terminationFactor","float").add("inverseViewMatrix","mat4").add("lightingMainDirectionView","vec3").add("texelSize","vec2"),t.fragment.constants.add("unoccludedHighlightFlag","vec4",n["c"]).add("highlightedThreshold","float",e.highlightedThreshold).add("selfShadowThreshold","float",e.selfShadowThreshold),t.fragment.code.add(l["a"]`vec3 normalFromDepth(vec3 pixelPos, vec2 fragCoord, vec2 uv, vec2 texelSize, sampler2D depthMap, vec2 nearFar) {
  1602. float leftPixelDepth = linearDepthFromTexture(depthMap, uv + vec2(-1.0, 0.0) * texelSize, nearFar);
  1603. float rightPixelDepth = linearDepthFromTexture(depthMap, uv + vec2(1.0, 0.0) * texelSize, nearFar);
  1604. float bottomPixelDepth = linearDepthFromTexture(depthMap, uv + vec2(0.0, -1.0) * texelSize, nearFar);
  1605. float topPixelDepth = linearDepthFromTexture(depthMap, uv + vec2(0.0, 1.0) * texelSize, nearFar);
  1606. bool pickLeft = abs(pixelPos.z - leftPixelDepth) < abs(pixelPos.z - rightPixelDepth);
  1607. bool pickBottom = abs(pixelPos.z - bottomPixelDepth) < abs(pixelPos.z - topPixelDepth);
  1608. vec3 fragCoordHorizontal = pickLeft
  1609. ? vec3(fragCoord + vec2(-1.0, 0.0), leftPixelDepth)
  1610. : vec3(fragCoord + vec2(1.0, 0.0), rightPixelDepth);
  1611. vec3 fragCoordVertical = pickBottom
  1612. ? vec3(fragCoord + vec2(0.0, -1.0), bottomPixelDepth)
  1613. : vec3(fragCoord + vec2(0.0, 1.0), topPixelDepth);
  1614. vec3 verticalPixelPos = reconstructPosition(fragCoordHorizontal.xy, fragCoordHorizontal.z);
  1615. vec3 horizontalPixelPos = reconstructPosition(fragCoordVertical.xy, fragCoordVertical.z);
  1616. vec3 normal = normalize(cross(verticalPixelPos - pixelPos, horizontalPixelPos - pixelPos));
  1617. return pickLeft == pickBottom ? normal : -normal;
  1618. }`),t.fragment.code.add(l["a"]`void main(void) {
  1619. vec4 highlightInfo = texture2D(highlightMap, uv);
  1620. float visiblyHighlighted = (1.0 - clamp(distance(unoccludedHighlightFlag, highlightInfo), 0.0, 1.0)) * highlightInfo.a;
  1621. if (visiblyHighlighted > highlightedThreshold) {
  1622. discard;
  1623. }
  1624. float depth = rgba2float(texture2D(depthMap, uv));
  1625. if (depth == 0.0) {
  1626. discard;
  1627. }
  1628. float currentPixelDepth = linearDepthFromFloat(depth, nearFar);
  1629. if (-currentPixelDepth>nearFar.y || -currentPixelDepth<nearFar.x) {
  1630. discard;
  1631. }
  1632. vec4 currentPixelPos = vec4(reconstructPosition(gl_FragCoord.xy, currentPixelDepth), 1.0);
  1633. vec4 worldSpacePos = inverseViewMatrix * currentPixelPos;
  1634. mat4 shadowMatrix;
  1635. float linearDepth = -currentPixelDepth;
  1636. int i = chooseCascade(linearDepth, shadowMatrix);
  1637. if (i >= numCascades) {
  1638. discard;
  1639. }
  1640. vec3 lvpos = lightSpacePosition(worldSpacePos.xyz, shadowMatrix);
  1641. if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
  1642. discard;
  1643. }
  1644. vec2 uvShadow = cascadeCoordinates(i, lvpos);
  1645. float depthHighlight = readShadowMapDepth(uvShadow, highlightDepthTex);
  1646. bool shadowHighlight = depthHighlight < lvpos.z;
  1647. if (!shadowHighlight) {
  1648. discard;
  1649. }
  1650. float depthDefault = readShadowMapDepth(uvShadow, defaultDepthTex);
  1651. bool shadowDefault = depthDefault < lvpos.z;
  1652. vec3 normal = normalFromDepth(currentPixelPos.xyz, gl_FragCoord.xy, uv, texelSize, depthMap, nearFar);
  1653. bool shaded = dot(normal, lightingMainDirectionView) < selfShadowThreshold;
  1654. float differenceOpacity = opacity;
  1655. float bothOpacity = occludedOpacity;
  1656. float fragOpacity = (shadowDefault || shaded) ? bothOpacity : differenceOpacity;
  1657. gl_FragColor = vec4(uColor.rgb, uColor.a * fragOpacity * terminationFactor);
  1658. }`),t}const h=Object.freeze({__proto__:null,build:d})},6609:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDMUQ5RUVEQUM5RDExMUVCOEI3N0M3NEYyQjFBRDZERCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDMUQ5RUVEQkM5RDExMUVCOEI3N0M3NEYyQjFBRDZERCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMxRDlFRUQ4QzlEMTExRUI4Qjc3Qzc0RjJCMUFENkREIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMxRDlFRUQ5QzlEMTExRUI4Qjc3Qzc0RjJCMUFENkREIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+PrBXjAAABQ5JREFUeNrUWFuIG1UY/jPJTO6X2dx3K027bqks1aoPVRcUFKUVdkGwPtS+CPVFXxT6Il4RK4gIfSqigqhQFanKFnEpBRUUin2wVNmy262KupvNZXNPJvf4/ZNJDbWLTUyyyYGP/8w5Z/75+Oafc/5/qNFoUK8xOzvr74dfhkD9aXf2yW/fCO8dNcIjp3Bobm7OMUqEg8D4KBH2ABMjQRih4BH0enFkCLO6gqCnUQqJoGAwjBRhKKwSHpmQCOoN/SNsGEQM40Pkg2QP8MX8/Hx6WGM4AKIW4HX0zwWDE+/DXsC1fSgVBsR6vXZhe2jn1PbQDqrVG5RKJUOKUrgJaxaHifBEMZ8hkKU9t+6d8vkDVCqV6fLyJQLZzzC/9H+c6zjH7OGh4YcJS5Kkc7u9FByfIKvNTktLixRdD3+EuScQw7WhIAyy/KX9MDk5uc/t8VJ8I0G/XblMHq+fYtH1tzH3FMg2hmJb0zKzr3U63b5QKEQ2m43GoDCLAbJZzL3TC7I9URhkd8CclsyW6W3BAImiqMZsqVyhSCRMdtlH6Xg4hzWHQPr0lhIG2bthvnSM+XyVcpGUXIaHL0HpW7gD339ZnWPbjGYrJdb/5Nh9DqTf3BLCIHsY5l2Xb9xUzGcJOIfrZ4FfTSZzpFarUaVS5rz4ceAFm+xx1TFWyCTf0+K5MpAYBlEd8Cq6H0I9Uyq6tgKyj+L6HpBg0k7sEqQdz0aMvQU7lUvGT4BsFfccwfUCfIz1nTAeYoY5aXHIL8Ju5NMJVnQapE61fVQuSTKSoUlYLZMwFweeRvc23LNgtNju59MP/qb6RhjOAzDfAo9AKVU1kDgOlK9ZqircTrjVsHYROFAq5A7gsqKRvq/nhOGUExd+3VeAXXjoUSC1yXKnyCGhVwlfN2/AvQusNsBv6mP4P9KzoxnOZmGeBA7iQedvwKcaEnpDcVPCGukqzAn4P8kfJexrsC9hvN41YTjZzzsJnMx18NbaQ+I/MzPtTR3Fs26GPQz7OcZyHRPm1BDmrKZEJ62psP7GCLcRX4FZwXNdXSkMB4Uu9/aOFN5E8YEm8E5RvLoP23vtvB+EXZJR6jgkBpbAI+b+HRIiDg5RVPvXmb82BLZUYc4dAqywoamwd6hCgn9LwTzDuwmQROyu6XTCbkmLYZ0gPIhxTuG+1w6JyS0JCRA1wrzM2ZnN6TbJqDD8vgDJskzfnf2KRC2XsNsdtGv6dns0GplJbsRmssnYK7jnlJbVrQ6EsLY/n0HWNYOUkSxmC8lOl0rW6XAgpayQpB3NjXqdZJcLBWmD9FAd64VcKn4wm4g9AB+cT/w4iJB4nsk63H4u5UmEkibErNlkQtyq5T2Fw6tULCpUrVbVcZ4Xm9sc2VwecnnHObX8FJAGQfhhs935TwUgCCSAqB6ApORHWf/LxZ8osvoHeVGA8jjP87pW4/tFozmkJUB9j+ESv+pW4z5XElxhiFYrPbR/9upcDXPpTEadb7+nWT6p18VBKHwc+bD6o4RbBa+9iKJTKRZV1DRibFtjPM/rWi2biFK1XDqD7s99J4yN/hMUm8civy83uOgsozrOKwXKZLOqmira+jzO87yuUlIoFVujXGrjG7h6bNBF6L0wbxgk411mq51sDid2CZksFjNJRiOVSyVSFIXS6RTlsmlS8jkmzBnZMeADjopuTrpe/JeY1raoO4DdfBwDMpDSDo1l4CJvhcD5FtFuj+a/BRgAP4aapTvAfasAAAAASUVORK5CYII="},6611:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("fc29"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.SCENEVIEW_LOCKING_LOG=!1,this.HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED=!0,this.HIGHLIGHTS_PROFILE_TO_CONSOLE=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};Object(i["a"])([Object(a["b"])()],o.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"SCENEVIEW_LOCKING_LOG",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"HIGHLIGHTS_PROFILE_TO_CONSOLE",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"DECONFLICTOR_SHOW_GRID",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"LABELS_SHOW_BORDER",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"TEXT_SHOW_BASELINE",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"TEXT_SHOW_BORDER",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"OVERLAY_SHOW_CENTER",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"SHOW_POI",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"I3S_TREE_SHOW_TILES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"I3S_SHOW_MODIFICATIONS",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),Object(i["a"])([Object(a["b"])()],o.prototype,"LINE_WIREFRAMES",void 0),o=Object(i["a"])([Object(s["a"])("esri.views.3d.support.DebugFlags")],o);const c=new o},"661c":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));var i=r("38a4");function n(e,t,r=0){const n=Object(i["f"])(e,0,c);for(let i=0;i<4;i++)t[r+i]=Math.floor(256*l(n*s[i]))}function a(e,t=0){let r=0;for(let i=0;i<4;i++)r+=e[t+i]*o[i];return r}const s=[1,256,65536,16777216],o=[1/256,1/65536,1/16777216,1/4294967296],c=a(new Uint8ClampedArray([255,255,255,255]));function l(e){return e-Math.floor(e)}},"662d":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),s=r("1f3b");const o=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return Object(i["a"])([Object(n["b"])({type:s["a"],json:{origins:{"web-map":{write:{allowNull:!0}}}}})],t.prototype,"featureEffect",void 0),t=Object(i["a"])([Object(a["a"])("esri.layers.mixins.FeatureEffectLayer")],t),t}},6655:function(e,t,r){"use strict";r.d(t,"a",(function(){return Y})),r.d(t,"b",(function(){return ae})),r.d(t,"c",(function(){return J})),r.d(t,"d",(function(){return ee})),r.d(t,"e",(function(){return Q})),r.d(t,"f",(function(){return $})),r.d(t,"g",(function(){return D})),r.d(t,"h",(function(){return W})),r.d(t,"i",(function(){return V})),r.d(t,"j",(function(){return K})),r.d(t,"k",(function(){return ne})),r.d(t,"l",(function(){return te})),r.d(t,"m",(function(){return N})),r.d(t,"n",(function(){return j})),r.d(t,"o",(function(){return H})),r.d(t,"p",(function(){return z})),r.d(t,"q",(function(){return ge})),r.d(t,"r",(function(){return le})),r.d(t,"s",(function(){return he})),r.d(t,"t",(function(){return me})),r.d(t,"u",(function(){return oe})),r.d(t,"v",(function(){return ce})),r.d(t,"w",(function(){return y})),r.d(t,"x",(function(){return O})),r.d(t,"y",(function(){return fe})),r.d(t,"z",(function(){return se})),r.d(t,"A",(function(){return pe}));var i=r("ce50"),n=r("e92d"),a=r("b2b2"),s=r("a9ab"),o=r("9392"),c=r("eed5"),l=r("8152");function u(e,t){return e?t?4:3:t?3:2}const d=n["a"].getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0},p=(e,t,r,i,n,a)=>{e[r]=n,e[r+1]=a},f=(e,t,r,i,n,a)=>{e[r]=n,e[r+1]=a,e[r+2]=t[i+2]},b=(e,t,r,i,n,a)=>{e[r]=n,e[r+1]=a,e[r+2]=t[i+3]},m=(e,t,r,i,n,a)=>{e[r]=n,e[r+1]=a,e[r+2]=t[i+2],e[r+3]=t[i+3]};function g(e,t,r,i){if(e){if(r)return t&&i?m:f;if(t&&i)return b}else if(t&&i)return f;return p}function y({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function O({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function v({scale:e,translate:t},r){return r*e[0]+t[0]}function _({scale:e,translate:t},r){return t[1]-r*e[1]}function j(e,t,r){return e?t?r?C(e):T(e):r?E(e):w(e):null}function w(e){const t=e.coords;return{x:t[0],y:t[1]}}function x(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function T(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function S(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function E(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function C(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function R(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function M(e,t,r,i){let n=w;r&&i?n=C:r?n=T:i&&(n=E);for(const s of t){const{geometry:t,attributes:r}=s,i=Object(a["k"])(t)?n(t):null;e.push({attributes:r,geometry:i})}return e}function P(e,t){return e&&t?R:e?S:t?A:x}function I(e,t,r,i,n){const a=P(r,i);for(const s of t){const{geometry:t,attributes:r}=s;let i;t&&(i=a(new l["a"],t)),e.push(new o["a"](i,r,null,r[n]))}return e}function D(e,t,r=P(null!=t.z,null!=t.m)){return r(e,t)}function L(e,t,r,i){for(const n of t){const{geometry:t,attributes:a}=n;let s;t&&(s=N(t,r,i)),e.push({attributes:a,geometry:s})}return e}function N(e,t,r){if(Object(a["j"])(e))return null;const i=u(t,r),n=[];for(let a=0;a<e.coords.length;a+=i){const t=[];for(let r=0;r<i;r++)t.push(e.coords[a+r]);n.push(t)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function F(e,t,r,i,n){const a=u(r,i);for(const s of t){const t=s.geometry,r=s.attributes;let i;t&&(i=k(new l["a"],t,a)),e.push(new o["a"](i,r,null,r[n]))}return e}function k(e,t,r=u(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const a of t.points)for(let e=0;e<r;e++)i[n++]=a[e];return e}function U(e,t,r,i){for(const n of t){const{geometry:t,attributes:s}=n;let o;Object(a["k"])(t)&&(o=z(t,r,i)),e.push({attributes:s,geometry:o})}return e}function z(e,t,r){if(!e)return null;const i=u(t,r),{coords:n,lengths:a}=e,s=[];let o=0;for(const c of a){const e=[];for(let t=0;t<c;t++){const t=[];for(let e=0;e<i;e++)t.push(n[o++]);e.push(t)}s.push(e)}return t?r?{paths:s,hasZ:t,hasM:r}:{paths:s,hasZ:t}:r?{paths:s,hasM:r}:{paths:s}}function B(e,t,r,i,n){const a=u(r,i);for(const s of t){const t=s.geometry,r=s.attributes;let i;t&&(i=V(new l["a"],t,a)),e.push(new o["a"](i,r,null,r[n]))}return e}function V(e,t,r=u(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let a=0;for(const s of t.paths){for(const e of s)for(let t=0;t<r;t++)n[a++]=e[t];i.push(s.length)}return e}function G(e,t,r,i){for(const n of t){const{geometry:t,attributes:s,centroid:o}=n;let c;if(Object(a["k"])(t)&&(c=H(t,r,i)),Object(a["k"])(o)){const t=w(o);e.push({attributes:s,centroid:t,geometry:c})}else e.push({attributes:s,geometry:c})}return e}function H(e,t,r){if(!e)return null;const i=u(t,r),{coords:n,lengths:a}=e,s=[];let o=0;for(const c of a){const e=[];for(let t=0;t<c;t++){const t=[];for(let e=0;e<i;e++)t.push(n[o++]);e.push(t)}s.push(e)}return t?r?{rings:s,hasZ:t,hasM:r}:{rings:s,hasZ:t}:r?{rings:s,hasM:r}:{rings:s}}function q(e,t,r,i,n){for(const s of t){const t=s.geometry,c=s.centroid,u=s.attributes;let d;t&&(d=W(new l["a"],t,r,i)),Object(a["k"])(c)?e.push(new o["a"](d,u,x(new l["a"],c),u[n])):e.push(new o["a"](d,u,null,u[n]))}return e}function W(e,t,r=t.hasZ,i=t.hasM){return $(e,t.rings,r,i),e}function $(e,t,r,i){const n=u(r,i),{lengths:a,coords:s}=e;let o=0;a.length=s.length=0;for(const c of t){for(const e of c)for(let t=0;t<n;t++)s[o++]=e[t];a.push(c.length)}return e}const Z=[],X=[];function Y(e,t,r,i,n){Z[0]=e;const[a]=J(X,Z,t,r,i,n);return Z.length=X.length=0,a}function J(e,t,r,n,a,s){if(e.length=0,!r){for(const r of t){const t=r.attributes[s];e.push(new o["a"](null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return I(e,t,n,a,s);case"esriGeometryMultipoint":return F(e,t,n,a,s);case"esriGeometryPolyline":return B(e,t,n,a,s);case"esriGeometryPolygon":return q(e,t,n,a,s);default:d.error("convertToFeatureSet:unknown-geometry",new i["a"](`Unable to parse unknown geometry type '${r}'`)),e.length=0}return e}function Q(e,t,r,n,a,s){const o=e.length;switch(r){case"esriGeometryPoint":I(e,t,n,a,s);break;case"esriGeometryMultipoint":F(e,t,n,a,s);break;case"esriGeometryPolyline":B(e,t,n,a,s);break;case"esriGeometryPolygon":q(e,t,n,a,s);break;default:d.error("convertToFeatureSet:unknown-geometry",new i["a"](`Unable to parse unknown geometry type '${r}'`))}for(let i=0;i<t.length;i++)e[i+o].geometryType=r,e[i+o].insertAfter=t[i].insertAfter,e[i+o].groupId=t[i].groupId;return e}function K(e,t,r,i){X[0]=e,ie(Z,X,t,r,i);const n=Z[0];return Z.length=X.length=0,n}function ee(e,t,r){if(Object(a["j"])(e))return null;const n=new l["a"];return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),Object(s["f"])(e)?P(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):Object(s["g"])(e)?W(n,e,t,r):Object(s["h"])(e)?V(n,e,u(t,r)):Object(s["e"])(e)?k(n,e,u(t,r)):void d.error("convertFromGeometry:unknown-geometry",new i["a"](`Unable to parse unknown geometry type '${e}'`))}function te(e,t,r,n){const s=e&&("coords"in e?e:e.geometry);if(Object(a["j"])(s))return null;switch(t){case"esriGeometryPoint":{let e=w;return r&&n?e=C:r?e=T:n&&(e=E),e(s)}case"esriGeometryMultipoint":return N(s,r,n);case"esriGeometryPolyline":return z(s,r,n);case"esriGeometryPolygon":return H(s,r,n);default:return void d.error("convertToGeometry:unknown-geometry",new i["a"](`Unable to parse unknown geometry type '${t}'`))}}function re(e,t){for(const r of t)e.push({attributes:r.attributes});return e}function ie(e,t,r,n,s){if(e.length=0,Object(a["j"])(r))return re(e,t);switch(r){case"esriGeometryPoint":return M(e,t,n,s);case"esriGeometryMultipoint":return L(e,t,n,s);case"esriGeometryPolyline":return U(e,t,n,s);case"esriGeometryPolygon":return G(e,t,n,s);default:d.error("convertToFeatureSet:unknown-geometry",new i["a"](`Unable to parse unknown geometry type '${r}'`))}return e}function ne(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:a,hasZ:s,features:o,geometryType:c,exceededTransferLimit:l,uniqueIdField:u,queryGeometry:d,queryGeometryType:h}=e,p={features:ie([],o,c,s,a),fields:n,geometryType:c,objectIdFieldName:t,spatialReference:r,uniqueIdField:u,queryGeometry:te(d,h,!1,!1)};return i&&(p.transform=i),l&&(p.exceededTransferLimit=l),a&&(p.hasM=a),s&&(p.hasZ=s),p}function ae(e,t){const r=new c["a"],{hasM:n,hasZ:a,features:s,objectIdFieldName:o,spatialReference:l,geometryType:u,exceededTransferLimit:h,transform:p,fields:f}=e;return f&&(r.fields=f),r.geometryType=u,r.objectIdFieldName=o||t,r.spatialReference=l,r.objectIdFieldName?(s&&J(r.features,s,u,a,n,r.objectIdFieldName),h&&(r.exceededTransferLimit=h),n&&(r.hasM=n),a&&(r.hasZ=a),p&&(r.transform=p),r):(d.error(new i["a"]("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function se(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const s of r)Object(a["k"])(s.geometry)&&pe(s.geometry,s.geometry,i,n,t),Object(a["k"])(s.centroid)&&pe(s.centroid,s.centroid,i,n,t);return e.transform=null,e}function oe(e,t){const{geometryType:r,features:i,hasM:n,hasZ:a}=t;if(!e)return t;for(let s=0;s<i.length;s++){const t=i[s],o=t.weakClone();o.geometry=new l["a"],ce(o.geometry,t.geometry,n,a,r,e),t.centroid&&(o.centroid=new l["a"],ce(o.centroid,t.centroid,n,a,"esriGeometryPoint",e)),i[s]=o}return t.transform=e,t}function ce(e,t,r,i,n,s,o=r,c=i){if(e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0),Object(a["j"])(t)||!t.coords.length)return null;const l=h[n],{coords:d,lengths:p}=t,f=u(r,i),b=u(r&&o,i&&c),m=g(r,i,o,c);if(!p.length)return m(e.coords,d,0,0,y(s,d[0]),O(s,d[1])),e.lengths.length&&(e.lengths.length=0),e.coords.length=f,e;let v,_,j,w,x=0,T=0,S=T;for(const a of p){if(a<l)continue;let t=0;T=S,j=v=y(s,d[x]),w=_=O(s,d[x+1]),m(e.coords,d,T,x,j,w),t++,x+=f,T+=b;for(let r=1;r<a;r++,x+=f)j=y(s,d[x]),w=O(s,d[x+1]),j===v&&w===_||(m(e.coords,d,T,x,j-v,w-_),T+=b,t++,v=j,_=w);t>=l&&(e.lengths.push(t),S=T)}return e.coords.length=S,e.coords.length?e:null}function le(e,t,r,i,n,a,s=r,o=i){if(e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0),!t||!t.coords.length)return null;const c=h[n],{coords:l,lengths:d}=t,p=u(r,i),f=u(r&&s,i&&o),b=g(r,i,s,o);if(!d.length)return b(e.coords,l,0,0,l[0],l[1]),e.lengths.length&&(e.lengths.length=0),e.coords.length=p,e;let m=0;const y=a*a;for(const u of d){if(u<c){m+=u*p;continue}const t=e.coords.length/f,r=m,i=m+(u-1)*p;b(e.coords,l,e.coords.length,r,l[r],l[r+1]),de(e.coords,l,p,y,b,r,i),b(e.coords,l,e.coords.length,i,l[i],l[i+1]);const n=e.coords.length/f-t;n>=c?e.lengths.push(n):e.coords.length=t*f,m+=u*p}return e.coords.length?e:null}function ue(e,t,r,i){const n=e[t],a=e[t+1],s=e[r],o=e[r+1],c=e[i],l=e[i+1];let u=s,d=o,h=c-u,p=l-d;if(0!==h||0!==p){const e=((n-u)*h+(a-d)*p)/(h*h+p*p);e>1?(u=c,d=l):e>0&&(u+=h*e,d+=p*e)}return h=n-u,p=a-d,h*h+p*p}function de(e,t,r,i,n,a,s){let o,c=i,l=0;for(let u=a+r;u<s;u+=r)o=ue(t,u,a,s),o>c&&(l=u,c=o);c>i&&(l-a>r&&de(e,t,r,i,n,a,l),n(e,t,e.length,l,t[l],t[l+1]),s-l>r&&de(e,t,r,i,n,l,s))}function he(e,t,r,i){if(Object(a["j"])(t)||!t.coords||!t.coords.length)return null;const n=u(r,i);let s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];s=Math.min(s,r),c=Math.max(c,r),o=Math.min(o,i),l=Math.max(l,i)}}return e[0]=s,e[1]=o,e[2]=c,e[3]=l,e}function pe(e,t,r,i,n){const{coords:a,lengths:s}=t,o=r?i?m:f:i?f:p,c=u(r,i);if(!a.length)return e!==t&&(e.lengths.length=0,e.coords.length=0),e;if(!s.length)return o(e.coords,a,0,0,v(n,a[0]),_(n,a[1])),e!==t&&(e.lengths.length=0,e.coords.length=c),e;const[l,d]=n.scale;let h=0;for(let u=0;u<s.length;u++){const t=s[u];e.lengths[u]=t;let r=v(n,a[h]),i=_(n,a[h+1]);o(e.coords,a,h,h,r,i),h+=c;for(let n=1;n<t;n++,h+=c)r+=a[h]*l,i-=a[h+1]*d,o(e.coords,a,h,h,r,i)}return e!==t&&(e.lengths.length=s.length,e.coords.length=a.length),e}function fe(e,t,r,i,n,a){const s=u(r,i),o=g(r,i,n,a),c=t.coords;e.coords.length=0,e.lengths.length=0,e.lengths.push(...t.lengths);for(let l=0;l<c.length;l+=s)o(e.coords,c,e.coords.length,l,c[l],c[l+1]);return e}function be(e,t,r,i){let n=0,a=e[i*t],s=e[i*(t+1)];for(let o=1;o<r;o++){const r=a+e[i*(t+o)],c=s+e[i*(t+o)+1],l=(r-a)*(c+s);a=r,s=c,n+=l}return.5*n}function me(e,t){const{coords:r,lengths:i}=e;let n=0,a=0;for(let s=0;s<i.length;s++)a+=be(r,n,i[s],t),n+=s;return Math.abs(a)}function ge(e,t){if(Object(a["j"])(e))return null;const r=e.clone(),i=e.coords,n=e.lengths;let s=0;for(let a=0;a<n.length;a++){const e=n[a];let o=i[t*s],c=i[t*s+1];for(let n=1;n<e;n++){const e=o+i[t*(s+n)],a=c+i[t*(s+n)+1];r.coords[t*(s+n)]=e,r.coords[t*(s+n)+1]=a,o=e,c=a}s+=e}return r}},"667b":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("fa8a"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("73cb");const l=new n["a"]({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary"},{ignoreUnknown:!0});let u=class extends a["a"]{constructor(e){super(e),this.authoringInfo=null,this.type=null}async getRequiredFields(e){if(!this.collectRequiredFields)return[];const t=new Set;return await this.collectRequiredFields(t,e),Array.from(t).sort()}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getAttributeHash(){return JSON.stringify(this)}getMeshHash(){return JSON.stringify(this)}};Object(i["a"])([Object(s["b"])({type:c["a"],json:{write:!0}})],u.prototype,"authoringInfo",void 0),Object(i["a"])([Object(s["b"])({type:l.apiValues,readOnly:!0,json:{type:l.jsonValues,read:!1,write:{writer:l.write,ignoreOrigin:!0}}})],u.prototype,"type",void 0),u=Object(i["a"])([Object(o["a"])("esri.renderers.Renderer")],u);const d=u},"668b":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return n}));var i=r("6415");function n(e,t,r){if(e.count!==t.count)return void i["a"].error("source and destination buffers need to have the same number of elements");const n=e.count,a=r[0],s=r[1],o=r[2],c=r[4],l=r[5],u=r[6],d=r[8],h=r[9],p=r[10],f=r[12],b=r[13],m=r[14],g=e.typedBuffer,y=e.typedBufferStride,O=t.typedBuffer,v=t.typedBufferStride;for(let i=0;i<n;i++){const e=i*y,t=i*v,r=O[t],n=O[t+1],_=O[t+2];g[e]=a*r+c*n+d*_+f,g[e+1]=s*r+l*n+h*_+b,g[e+2]=o*r+u*n+p*_+m}}function a(e,t,r){if(e.count!==t.count)return void i["a"].error("source and destination buffers need to have the same number of elements");const n=e.count,a=r[0],s=r[1],o=r[2],c=r[3],l=r[4],u=r[5],d=r[6],h=r[7],p=r[8],f=e.typedBuffer,b=e.typedBufferStride,m=t.typedBuffer,g=t.typedBufferStride;for(let i=0;i<n;i++){const e=i*b,t=i*g,r=m[t],n=m[t+1],y=m[t+2];f[e]=a*r+c*n+d*y,f[e+1]=s*r+l*n+h*y,f[e+2]=o*r+u*n+p*y}}function s(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,s=t.typedBuffer,o=t.typedBufferStride;for(let c=0;c<i;c++){const e=c*a,t=c*o;n[e]=r*s[t],n[e+1]=r*s[t+1],n[e+2]=r*s[t+2]}}function o(e,t){const r=Math.min(e.count,t.count),i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;for(let o=0;o<r;o++){const e=o*n,t=o*s,r=a[t],c=a[t+1],l=a[t+2],u=Math.sqrt(r*r+c*c+l*l);if(u>0){const t=1/u;i[e]=t*r,i[e+1]=t*c,i[e+2]=t*l}}}function c(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,s=t.typedBuffer,o=t.typedBufferStride;for(let c=0;c<i;c++){const e=c*a,t=c*o;n[e]=s[t]>>r,n[e+1]=s[t+1]>>r,n[e+2]=s[t+2]>>r}}Object.freeze({__proto__:null,transformMat4:n,transformMat3:a,scale:s,normalize:o,shiftRight:c})},"66af":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("3795"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("d2f2");const c=e=>{let t=class extends e{constructor(){super(...arguments),this.slicePlaneEnabled=!1,this.supportsHeightUnitConversion=!1}postscript(e){super.postscript(e),Object(o["b"])(this.layer)&&this.addResolvingPromise(this._validateHeightModelInfo())}async _validateHeightModelInfo(){const e=Object(n["l"])(this.view.defaultsFromMap,"heightModelInfoReady");this.handles.add(e),await e;const t=Object(o["c"])(this.layer,this.view.heightModelInfo,this.supportsHeightUnitConversion);if(t)throw t}canResume(){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return super.canResume()&&(!e||!e.minScale||!e.maxScale||e.minScale>=e.maxScale)}getSuspendInfo(){const e=super.getSuspendInfo(),t=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return t&&t.minScale&&t.maxScale&&t.minScale<t.maxScale&&(e.outsideScaleRange=!0),e}};return Object(i["a"])([Object(a["b"])()],t.prototype,"view",void 0),Object(i["a"])([Object(a["b"])()],t.prototype,"slicePlaneEnabled",void 0),t=Object(i["a"])([Object(s["a"])("esri.views.3d.layers.LayerView3D")],t),t}},"66b9":function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return v}));var i=r("b2b2"),n=r("1c92"),a=r("8c71"),s=r("ff93"),o=r("bc05"),c=r("7ce4"),l=r("d17d"),u=r("0fa6");class d{constructor(e,t){this.layerUIDs=[],this.isDestroyed=!1,this.data=e,this.memoryUsed=e.byteLength;let r=1;const i=new Uint32Array(e);this.layerUIDs=[];const n=i[r++];for(let a=0;a<n;a++)this.layerUIDs[a]=i[r++];this.bufferDataOffset=r,t&&(this.layer=t.getStyleLayerByUID(this.layerUIDs[0]))}get isPreparedForRendering(){return Object(i["j"])(this.data)}get offset(){return this.bufferDataOffset}destroy(){this.isDestroyed||(this.doDestroy(),this.isDestroyed=!0)}prepareForRendering(e){Object(i["j"])(this.data)||(this.doPrepareForRendering(e,this.data,this.bufferDataOffset),this.data=null)}}class h extends d{constructor(e,t){super(e,t),this.type=s["a"].LINE,this.lineIndexStart=0,this.lineIndexCount=0;const r=new Uint32Array(e);let i=this.bufferDataOffset;this.lineIndexStart=r[i++],this.lineIndexCount=r[i++];const n=r[i++];if(n>0){const e=new Map;for(let t=0;t<n;t++){const t=r[i++],n=r[i++],a=r[i++];e.set(t,[n,a])}this.patternMap=e}this.bufferDataOffset=i}hasData(){return this.lineIndexCount>0}triangleCount(){return this.lineIndexCount/3}doDestroy(){Object(i["k"])(this.lineVertexArrayObject)&&this.lineVertexArrayObject.dispose(),Object(i["k"])(this.lineVertexBuffer)&&this.lineVertexBuffer.dispose(),Object(i["k"])(this.lineIndexBuffer)&&this.lineIndexBuffer.dispose(),this.lineVertexArrayObject=null,this.lineVertexBuffer=null,this.lineIndexBuffer=null,this.memoryUsed=0}doPrepareForRendering(e,t,r){const i=new Uint32Array(t),n=new Int32Array(i.buffer),a=i[r++];this.lineVertexBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,new Int32Array(n.buffer,4*r,a)),r+=a;const s=i[r++];this.lineIndexBuffer=c["a"].createIndex(e,l["D"].STATIC_DRAW,new Uint32Array(i.buffer,4*r,s)),r+=s;const o=this.layer.lineMaterial;this.lineVertexArrayObject=new u["a"](e,o.getAttributeLocations(),o.getLayoutInfo(),{geometry:this.lineVertexBuffer},this.lineIndexBuffer)}}class p extends d{constructor(e,t){super(e,t),this.type=s["a"].FILL,this.fillIndexStart=0,this.fillIndexCount=0,this.outlineIndexStart=0,this.outlineIndexCount=0;const r=new Uint32Array(e);let i=this.bufferDataOffset;this.fillIndexStart=r[i++],this.fillIndexCount=r[i++],this.outlineIndexStart=r[i++],this.outlineIndexCount=r[i++];const n=r[i++];if(n>0){const e=new Map;for(let t=0;t<n;t++){const t=r[i++],n=r[i++],a=r[i++];e.set(t,[n,a])}this.patternMap=e}this.bufferDataOffset=i}hasData(){return this.fillIndexCount>0||this.outlineIndexCount>0}triangleCount(){return(this.fillIndexCount+this.outlineIndexCount)/3}doDestroy(){Object(i["k"])(this.fillVertexArrayObject)&&this.fillVertexArrayObject.dispose(),Object(i["k"])(this.fillVertexBuffer)&&this.fillVertexBuffer.dispose(),Object(i["k"])(this.fillIndexBuffer)&&this.fillIndexBuffer.dispose(),this.fillVertexArrayObject=null,this.fillVertexBuffer=null,this.fillIndexBuffer=null,Object(i["k"])(this.outlineVertexArrayObject)&&this.outlineVertexArrayObject.dispose(),Object(i["k"])(this.outlineVertexBuffer)&&this.outlineVertexBuffer.dispose(),Object(i["k"])(this.outlineIndexBuffer)&&this.outlineIndexBuffer.dispose(),this.outlineVertexArrayObject=null,this.outlineVertexBuffer=null,this.outlineIndexBuffer=null,this.memoryUsed=0}doPrepareForRendering(e,t,r){const i=new Uint32Array(t),n=new Int32Array(i.buffer),a=i[r++];this.fillVertexBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,new Int32Array(n.buffer,4*r,a)),r+=a;const s=i[r++];this.fillIndexBuffer=c["a"].createIndex(e,l["D"].STATIC_DRAW,new Uint32Array(i.buffer,4*r,s)),r+=s;const o=i[r++];this.outlineVertexBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,new Int32Array(n.buffer,4*r,o)),r+=o;const d=i[r++];this.outlineIndexBuffer=c["a"].createIndex(e,l["D"].STATIC_DRAW,new Uint32Array(i.buffer,4*r,d)),r+=d;const h=this.layer,p=h.fillMaterial,f=h.outlineMaterial;this.fillVertexArrayObject=new u["a"](e,p.getAttributeLocations(),p.getLayoutInfo(),{geometry:this.fillVertexBuffer},this.fillIndexBuffer),this.outlineVertexArrayObject=new u["a"](e,f.getAttributeLocations(),f.getLayoutInfo(),{geometry:this.outlineVertexBuffer},this.outlineIndexBuffer)}}class f extends d{constructor(e,t,r){super(e,t),this.type=s["a"].SYMBOL,this.iconPerPageElementsMap=new Map,this.glyphPerPageElementsMap=new Map,this.symbolInstances=[],this.isIconSDF=!1,this.opacityChanged=!1,this.lastOpacityUpdate=0,this.symbols=[];const i=new Uint32Array(e),n=new Int32Array(e),a=new Float32Array(e);let c=this.bufferDataOffset;this.isIconSDF=!!i[c++];const l=i[c++];for(let s=0;s<l;s++){const e=i[c++],t=i[c++],r=i[c++];this.iconPerPageElementsMap.set(e,[t,r])}const u=i[c++];for(let s=0;s<u;s++){const e=i[c++],t=i[c++],r=i[c++];this.glyphPerPageElementsMap.set(e,[t,r])}const d=i[c++],h=i[c++];this.iconOpacity=new Int32Array(d),this.textOpacity=new Int32Array(h),c=Object(o["b"])(i,n,a,c,this.symbols,r),this.bufferDataOffset=c}hasData(){return this.iconPerPageElementsMap.size>0||this.glyphPerPageElementsMap.size>0}triangleCount(){let e=0;for(const[t,r]of this.iconPerPageElementsMap)e+=r[1];for(const[t,r]of this.glyphPerPageElementsMap)e+=r[1];return e/3}doDestroy(){Object(i["k"])(this.iconVertexArrayObject)&&this.iconVertexArrayObject.dispose(),Object(i["k"])(this.iconVertexBuffer)&&this.iconVertexBuffer.dispose(),Object(i["k"])(this.iconOpacityBuffer)&&this.iconOpacityBuffer.dispose(),Object(i["k"])(this.iconIndexBuffer)&&this.iconIndexBuffer.dispose(),this.iconVertexArrayObject=null,this.iconVertexBuffer=null,this.iconOpacityBuffer=null,this.iconIndexBuffer=null,Object(i["k"])(this.textVertexArrayObject)&&this.textVertexArrayObject.dispose(),Object(i["k"])(this.textVertexBuffer)&&this.textVertexBuffer.dispose(),Object(i["k"])(this.textOpacityBuffer)&&this.textOpacityBuffer.dispose(),Object(i["k"])(this.textIndexBuffer)&&this.textIndexBuffer.dispose(),this.textVertexArrayObject=null,this.textVertexBuffer=null,this.textOpacityBuffer=null,this.textIndexBuffer=null,this.memoryUsed=0}updateOpacityInfo(){if(!this.opacityChanged)return;this.opacityChanged=!1;const e=Object(i["t"])(this.iconOpacity),t=Object(i["t"])(this.iconOpacityBuffer);e.length>0&&e.byteLength===t.size&&t.setSubData(e);const r=Object(i["t"])(this.textOpacity),n=Object(i["t"])(this.textOpacityBuffer);r.length>0&&r.byteLength===n.size&&n.setSubData(r)}doPrepareForRendering(e,t,r){const n=new Uint32Array(t),a=new Int32Array(n.buffer),s=n[r++];this.iconVertexBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,new Int32Array(a.buffer,4*r,s)),r+=s;const o=n[r++];this.iconIndexBuffer=c["a"].createIndex(e,l["D"].STATIC_DRAW,new Uint32Array(n.buffer,4*r,o)),r+=o;const d=n[r++];this.textVertexBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,new Int32Array(a.buffer,4*r,d)),r+=d;const h=n[r++];this.textIndexBuffer=c["a"].createIndex(e,l["D"].STATIC_DRAW,new Uint32Array(n.buffer,4*r,h)),r+=h,this.iconOpacityBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,Object(i["t"])(this.iconOpacity).buffer),this.textOpacityBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,Object(i["t"])(this.textOpacity).buffer);const p=this.layer,f=p.iconMaterial,b=p.textMaterial;this.iconVertexArrayObject=new u["a"](e,f.getAttributeLocations(),f.getLayoutInfo(),{geometry:this.iconVertexBuffer,opacity:this.iconOpacityBuffer},this.iconIndexBuffer),this.textVertexArrayObject=new u["a"](e,b.getAttributeLocations(),b.getLayoutInfo(),{geometry:this.textVertexBuffer,opacity:this.textOpacityBuffer},this.textIndexBuffer)}}class b extends d{constructor(e,t){super(e,t),this.type=s["a"].CIRCLE,this.circleIndexStart=0,this.circleIndexCount=0;const r=new Uint32Array(e);let i=this.bufferDataOffset;this.circleIndexStart=r[i++],this.circleIndexCount=r[i++],this.bufferDataOffset=i}hasData(){return this.circleIndexCount>0}triangleCount(){return this.circleIndexCount/3}doDestroy(){Object(i["k"])(this.circleVertexArrayObject)&&this.circleVertexArrayObject.dispose(),Object(i["k"])(this.circleVertexBuffer)&&this.circleVertexBuffer.dispose(),Object(i["k"])(this.circleIndexBuffer)&&this.circleIndexBuffer.dispose(),this.circleVertexArrayObject=null,this.circleVertexBuffer=null,this.circleIndexBuffer=null,this.memoryUsed=0}doPrepareForRendering(e,t,r){const i=new Uint32Array(t),n=new Int32Array(i.buffer),a=i[r++];this.circleVertexBuffer=c["a"].createVertex(e,l["D"].STATIC_DRAW,new Int32Array(n.buffer,4*r,a)),r+=a;const s=i[r++];this.circleIndexBuffer=c["a"].createIndex(e,l["D"].STATIC_DRAW,new Uint32Array(i.buffer,4*r,s)),r+=s;const o=this.layer.circleMaterial;this.circleVertexArrayObject=new u["a"](e,o.getAttributeLocations(),o.getLayoutInfo(),{geometry:this.circleVertexBuffer},this.circleIndexBuffer)}}var m=r("db21"),g=r("e4b1");class y extends g["a"]{constructor(e,t,r,i,n,a,s=null){super(e,t,r,i,n,4096,4096),this._memCache=s,this.type="vector-tile",this._referenced=0,this._hasSymbolBuckets=!1,this._memoryUsedByLayerData=0,this.layerData=new Map,this.layerCount=0,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.invalidating=!1,this.parentTile=null,this.childrenTiles=new Set,this._processed=!1,this._referenced=1,this.styleRepository=a,this.id=e.id}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<m["d"]}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<m["d"])}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this.invalidating=!1,this._processed=!0}deleteLayerData(e){let t=!1;for(const r of e)if(this.layerData.has(r)){const e=this.layerData.get(r);this._memoryUsedByLayerData-=e.memoryUsed,e.type===s["a"].SYMBOL&&this.symbols.has(r)&&(this.symbols.delete(r),t=!0),e.destroy(),this.layerData.delete(r),this.layerCount--}Object(i["k"])(this._memCache)&&this._memCache.updateSize(this.key.id,this,this._memoryUsedByLayerData),t&&this.emit("symbols-changed"),this.requestRender()}processed(){return this._processed}hasData(){return this.layerCount>0}dispose(){"unloaded"!==this.status&&(O.delete(this),y._destroyRenderBuckets(this.layerData),this.layerData=null,this.layerCount=0,this._memoryUsedByLayerData=0,this.destroy(),this.status="unloaded")}release(){return 0==--this._referenced&&(this.dispose(),this.stage=null,!0)}retain(){++this._referenced}get referenced(){return this._referenced}get memoryUsage(){return(this._memoryUsedByLayerData+256)/(this._referenced||1)}changeDataImpl(e){let t=!1;if(e){const{bucketsWithData:r,emptyBuckets:n}=e,a=this._createRenderBuckets(r);if(n&&n.byteLength>0){const e=new Uint32Array(n);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),i.type===s["a"].SYMBOL&&(this.symbols.set(e,i.symbols),t=!0),this._memoryUsedByLayerData+=i.memoryUsed,this.layerData.set(e,i),this.layerCount++;Object(i["k"])(this._memCache)&&this._memCache.updateSize(this.key.id,this,this._memoryUsedByLayerData)}this._hasSymbolBuckets=!1;for(const[r,i]of this.layerData)i.type===s["a"].SYMBOL&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(e,t){super.setTransform(e,t);const r=t/(e.resolution*e.pixelRatio),i=this.width/this.rangeX*r,a=this.height/this.rangeY*r,s=[0,0];e.toScreen(s,[this.x,this.y]);const o=this.transforms.tileUnitsToPixels;Object(n["b"])(o),Object(n["c"])(o,o,s),Object(n["n"])(o,o,Math.PI*e.rotation/180),Object(n["d"])(o,o,[i,a,1])}_createTransforms(){return{dvs:Object(a["b"])(),tileMat3:Object(a["b"])(),tileUnitsToPixels:Object(a["b"])()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;e.forEach(e=>{t.has(e)||(e.destroy(),t.add(e))}),e.clear()}_createRenderBuckets(e){const t=new Map,r=new Map;for(const i of e){const e=this._deserializeBucket(i,r);for(const r of e.layerUIDs)t.set(r,e)}return t}_deserializeBucket(e,t){let r=t.get(e);if(r)return r;switch(new Uint32Array(e)[0]){case s["a"].FILL:r=new p(e,this.styleRepository);break;case s["a"].LINE:r=new h(e,this.styleRepository);break;case s["a"].SYMBOL:r=new f(e,this.styleRepository,this);break;case s["a"].CIRCLE:r=new b(e,this.styleRepository)}return t.set(e,r),r}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._memoryUsedByLayerData-=t.memoryUsed,t.destroy(),this.layerData.delete(e),this.layerCount--}}const O=new Map;function v(){O.forEach((e,t)=>{console.log(`\n${t.key}:`),e[0].forEach(e=>console.log(e)),console.log("========"),e[1].forEach(e=>console.log(e))})}},6750:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("501b"),n=r("3886");function a(e,t){e.constants.add("stippleAlphaColorDiscard","float",.001),e.constants.add("stippleAlphaHighlightDiscard","float",.5),t.stippleEnabled?s(e,t):o(e)}function s(e,t){const r=!(t.draped&&t.stipplePreferContinuous);e.fragment.include(i["a"]),e.vertex.uniforms.add("stipplePatternPixelSize","float"),e.vertex.uniforms.add("pixelRatio","float"),t.draped?e.vertex.uniforms.add("worldToScreenRatio","float"):(e.vertex.uniforms.add("worldToScreenPerDistanceRatio","float"),e.vertex.uniforms.add("cameraPosition","vec3"),e.vertex.code.add(n["a"]`float computeWorldToScreenRatio(vec3 segmentCenter) {
  1659. float segmentDistanceToCamera = length(segmentCenter - cameraPosition);
  1660. return worldToScreenPerDistanceRatio / segmentDistanceToCamera;
  1661. }`)),e.varyings.add("vStippleDistance","float"),t.stippleRequiresClamp&&e.varyings.add("vStippleDistanceLimits","vec2"),t.stippleRequiresStretchMeasure&&e.varyings.add("vStipplePatternStretch","float"),e.vertex.code.add(n["a"]`
  1662. float discretizeWorldToScreenRatio(float worldToScreenRatio) {
  1663. float step = ${c};
  1664. float discreteWorldToScreenRatio = log(worldToScreenRatio);
  1665. discreteWorldToScreenRatio = ceil(discreteWorldToScreenRatio / step) * step;
  1666. discreteWorldToScreenRatio = exp(discreteWorldToScreenRatio);
  1667. return discreteWorldToScreenRatio;
  1668. }
  1669. `),e.vertex.code.add(n["a"]`vec2 computeStippleDistanceLimits(float startPseudoScreen, float segmentLengthPseudoScreen, float segmentLengthScreen, float patternLength) {`),e.vertex.code.add(n["a"]`
  1670. if (segmentLengthPseudoScreen >= ${r?"patternLength":"1e4"}) {
  1671. `),e.vertex.code.add(n["a"]`
  1672. // Round the screen length to get an integer number of pattern repetitions (minimum 1).
  1673. float repetitions = segmentLengthScreen / (patternLength * pixelRatio);
  1674. float flooredRepetitions = max(1.0, floor(repetitions + 0.5));
  1675. float segmentLengthScreenRounded = flooredRepetitions * patternLength;
  1676. ${t.stippleRequiresStretchMeasure?n["a"]`
  1677. float stretch = repetitions / flooredRepetitions;
  1678. // We need to impose a lower bound on the stretch factor to prevent the dots from merging together when there is only 1 repetition.
  1679. // 0.75 is the lowest possible stretch value for flooredRepetitions > 1, so it makes sense as lower bound.
  1680. vStipplePatternStretch = max(0.75, stretch);`:""}
  1681. return vec2(0.0, segmentLengthScreenRounded);
  1682. }
  1683. return vec2(startPseudoScreen, startPseudoScreen + segmentLengthPseudoScreen);
  1684. }
  1685. `),e.fragment.uniforms.add("stipplePatternTexture","sampler2D"),e.fragment.uniforms.add("stipplePatternSDFNormalizer","float"),e.fragment.uniforms.add("stipplePatternTextureSize","float"),e.fragment.uniforms.add("stipplePatternPixelSizeInv","float"),t.stippleOffColorEnabled&&e.fragment.uniforms.add("stippleOffColor","vec4"),e.fragment.code.add(n["a"]`float padTexture(float u) {
  1686. return (u * stipplePatternTextureSize + 1.0)/(stipplePatternTextureSize + 2.0);
  1687. }`),e.fragment.code.add(n["a"]`
  1688. float getStippleSDF(out bool isClamped) {
  1689. ${t.stippleRequiresClamp?n["a"]`
  1690. float stippleDistanceClamped = clamp(vStippleDistance, vStippleDistanceLimits.x, vStippleDistanceLimits.y);
  1691. vec2 aaCorrectedLimits = vStippleDistanceLimits + vec2(1.0, -1.0) / gl_FragCoord.w;
  1692. isClamped = vStippleDistance < aaCorrectedLimits.x || vStippleDistance > aaCorrectedLimits.y;`:n["a"]`
  1693. float stippleDistanceClamped = vStippleDistance;
  1694. isClamped = false;`}
  1695. float u = stippleDistanceClamped * gl_FragCoord.w * stipplePatternPixelSizeInv;
  1696. ${t.stippleScaleWithLineWidth?n["a"]`u *= vLineSizeInv;`:""}
  1697. u = padTexture(fract(u));
  1698. float encodedSDF = rgba2float(texture2D(stipplePatternTexture, vec2(u, 0.5)));
  1699. float sdf = (encodedSDF * 2.0 - 1.0) * stipplePatternSDFNormalizer;
  1700. ${t.stippleRequiresStretchMeasure?n["a"]`return (sdf - 0.5) * vStipplePatternStretch + 0.5;`:n["a"]`return sdf;`}
  1701. }
  1702. float getStippleSDF() {
  1703. bool ignored;
  1704. return getStippleSDF(ignored);
  1705. }
  1706. float getStippleAlpha() {
  1707. bool isClamped;
  1708. float stippleSDF = getStippleSDF(isClamped);
  1709. float antiAliasedResult = ${t.stippleScaleWithLineWidth?n["a"]`clamp(stippleSDF * vLineWidth + 0.5, 0.0, 1.0);`:n["a"]`clamp(stippleSDF + 0.5, 0.0, 1.0);`}
  1710. return isClamped ? floor(antiAliasedResult + 0.5) : antiAliasedResult;
  1711. }
  1712. `),t.stippleOffColorEnabled?e.fragment.code.add(n["a"]`#define discardByStippleAlpha(stippleAlpha, threshold) {}
  1713. #define blendStipple(color, stippleAlpha) mix(color, stippleOffColor, stippleAlpha)`):e.fragment.code.add(n["a"]`#define discardByStippleAlpha(stippleAlpha, threshold) if (stippleAlpha < threshold) { discard; }
  1714. #define blendStipple(color, stippleAlpha) vec4(color.rgb, color.a * stippleAlpha)`)}function o(e){e.fragment.code.add(n["a"]`float getStippleAlpha() { return 1.0; }
  1715. #define discardByStippleAlpha(_stippleAlpha_, _threshold_) {}
  1716. #define blendStipple(color, _stippleAlpha_) color`)}const c=n["a"].float(.4)},6759:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("e1fa"),n=r("787a"),a=r("fa90"),s=r("49951"),o=r("ed91"),c=r("9b9d");const l={base:c["a"],key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":i["a"],"column-chart":n["a"],"line-chart":s["a"],"pie-chart":o["a"],image:a["a"]}}},6781:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("fa8a");const n=new i["a"]({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},6795:function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return I}));var i,n=r("fc00"),a=r("d7f7"),s=r("35b3"),o=r("614d"),c=r("badc"),l=r("b7bd"),u=r("5957"),d=r("a4ee"),h=r("b2b2"),p=r("01f2"),f=r("8e97"),b=r("c3a4"),m=r("ca98"),g=r("da35"),y=r("fa1e"),O=r("c829"),v=r("77f2"),_=r("d17d"),j=r("189c"),w=r("a1ff");!function(e){e[e.Screen=0]="Screen",e[e.World=1]="World"}(i||(i={}));class x extends m["a"]{constructor(e,t,r){super(e,t,r),this._kernelBlurRadius=1;const{R32F:i,textureFloatLinear:n}=e.rctx.capabilities.textureFloat,a=null!=i;this._kernelTextureChannels=a?1:4,this._floatInterpolationDisabled=!n;const s={target:_["A"].TEXTURE_2D,pixelFormat:a?_["p"].RED:_["p"].RGBA,internalFormat:a?_["v"].R32F:_["p"].RGBA,dataType:_["q"].FLOAT,samplingMode:_["z"].NEAREST,wrapMode:_["B"].CLAMP_TO_EDGE,width:1,height:1};this._kernel=new w["a"](e.rctx,s)}initializeProgram(e){const t=x.shader.get().build({isAttributeDriven:this.configuration.isAttributeDriven,mode:this.configuration.mode});return new O["a"](e.rctx,t,y["a"])}initializePipeline(){return Object(j["g"])({blending:Object(j["i"])(_["b"].ONE,_["b"].ONE,_["c"].ADD),colorWrite:j["d"],depthTest:null,depthWrite:null})}bindPass(e,t){const{camera:r}=t,{mode:i}=this.configuration;switch(Object(f["b"])(this.program,r.projectionMatrix),i){case v["a"].KernelDensity:this._bindKernelDensityPass(e,t);break;case v["a"].GaussianBlur:this._bindGaussianBlurPass(e,t)}}bindDraw(e){Object(f["c"])(this.program,e)}_bindKernelDensityPass({searchRadius:e,resolutionForScale:t},{camera:r,screenToWorldRatio:i}){0!==t&&(e/=i/t),this.program.setUniform1f("radius",e*r.pixelRatio/r.fullViewport[2])}_bindGaussianBlurPass({searchRadius:e,resolutionForScale:t},{camera:r,screenToWorldRatio:i}){const n=Math.round(e),a=3*(0===t?n:n*t/i);0===t||this._floatInterpolationDisabled?this._kernel.setSamplingMode(_["z"].NEAREST):this._kernel.setSamplingMode(_["z"].LINEAR),this._kernelBlurRadius!==n&&this._recomputeKernel(n),this.program.setUniform1f("radius",2*a*r.pixelRatio/r.fullViewport[2]),this.program.bindTexture(this._kernel,"kernel")}_recomputeKernel(e){const t=Object(p["b"])(e),r=Math.ceil(t.length/2),i=this._kernelTextureChannels,n=new Float32Array(r*i);for(let a=0;a<r;++a){const e=t[r-1-a];for(let t=0;t<i;++t)n[a*i+t]=e}this._kernel.resize(r,1),this._kernel.setData(n),this._kernelBlurRadius=e}destroy(){this._kernel=Object(h["e"])(this._kernel),super.destroy()}}x.shader=new b["a"](v["b"],()=>r.e("chunk-2d22cc49").then(r.bind(null,"f548")));class T extends g["a"]{constructor(){super(...arguments),this.isAttributeDriven=!1,this.mode=v["a"].GaussianBlur}}Object(d["a"])([Object(g["b"])()],T.prototype,"isAttributeDriven",void 0),Object(d["a"])([Object(g["b"])()],T.prototype,"mode",void 0);const S={searchRadius:128,resolutionForScale:0,colorRampData:null,isAttributeDriven:!1,minDensity:0,maxDensity:100,fieldTotal:0,pixelRatio:1,...s["a"]};class E extends s["b"]{constructor(e){super(e,S),this._techniqueConfig=new T}requiresSlot(e,t){return e===c["a"].DRAPED_MATERIAL&&t===o["a"].MATERIAL}getTechniqueConfig(){return this._techniqueConfig.isAttributeDriven=this.parameters.isAttributeDriven,this._techniqueConfig}createGLMaterial(e){return new A(e)}intersect(){}createBufferWriter(){return new C(this.parameters.isAttributeDriven?M:R)}}class A extends a["a"]{constructor(e){super(e)}beginSlot(e){return this.updateParameters(e)}updateParameters(e){return this.ensureTechnique(x,e)}bind(e,t){t.bindPass(this._material.parameters,e)}}class C{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(l["a"].POSITION).length*P}write(e,t,r,i){Object(u["f"])(t.indices.get(l["a"].POSITION),t.vertexAttributes.get(l["a"].POSITION).data,e.transformation,r.position,i,P);const n=t.indices.get(l["a"].POSITION).length,a=r.uv0;let s=i;for(let c=0;c<n;++c)a.setValues(s++,-1,-1),a.setValues(s++,1,-1),a.setValues(s++,1,1),a.setValues(s++,1,1),a.setValues(s++,-1,1),a.setValues(s++,-1,-1);const o="featureAttribute"in r?r.featureAttribute:null;o&&Object(u["a"])(t.indices.get(l["a"].FEATUREATTRIBUTE),t.vertexAttributes.get(l["a"].FEATUREATTRIBUTE).data,o,i,P)}}const R=Object(n["a"])().vec3f(l["a"].POSITION).vec2f(l["a"].UV0),M=R.clone().f32(l["a"].FEATUREATTRIBUTE),P=6;function I(e){return e instanceof E}},"67c2":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("c649"),n=r("e92d"),a=r("f4cc"),s=r("dbbf");const o=n["a"].getLogger("esri.core.workers.Connection");class c{constructor(){this._clients=new Array,this._clientPromises=new Array,this._clientIdx=0}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise((r,i)=>{let n=!0;const o=e=>{Object(a["v"])(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length;for(let c=0;c<e.length;++c){const n=e[c];Object(a["o"])(n)?this._clientPromises[c]=n.then(e=>(this._clients[c]=new s["a"](e,t),o(r),this._clients[c]),()=>(o(i),null)):(this._clients[c]=new s["a"](n,t),this._clientPromises[c]=Promise.resolve(this._clients[c]),o(r))}})}broadcast(e,t,r){const i=new Array(this._clientPromises.length);for(let n=0;n<this._clientPromises.length;++n){const a=this._clientPromises[n];i[n]=a.then(i=>i.invoke(e,t,r))}return i}close(){for(const e of this._clientPromises)e.then(e=>e.close());this._clients.length=0,this._clientPromises.length=0}getAvailableClient(){let e;for(let t=0;t<this._clients.length;++t){const r=this._clients[t];if(r){if(!r.isBusy())return Promise.resolve(r)}else e=e||[],e.push(this._clientPromises[t])}return e?Promise.race(e):(this._clientIdx=(this._clientIdx+1)%this._clients.length,Promise.resolve(this._clients[this._clientIdx]))}invoke(e,t,r){let i=null;return Array.isArray(r)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),i={transferList:r}):i=r,this.closed?Promise.reject(new Error("Connection closed")):this.getAvailableClient().then(r=>r.invoke(e,t,i))}on(e,t){return Promise.all(this._clientPromises).then(()=>Object(i["a"])(this._clients.map(r=>r.on(e,t))))}openPorts(){return new Promise(e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let i=0;i<this._clientPromises.length;++i)this._clientPromises[i].then(n=>{t[i]=n.openPort(),0==--r&&e(t)})})}get test(){return{numClients:this._clients.length}}}},"680b":function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return v})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return _})),r.d(t,"g",(function(){return c})),r.d(t,"h",(function(){return f})),r.d(t,"i",(function(){return s})),r.d(t,"j",(function(){return m})),r.d(t,"k",(function(){return o})),r.d(t,"l",(function(){return d})),r.d(t,"m",(function(){return h})),r.d(t,"n",(function(){return l}));var i=r("38a4"),n=r("e431"),a=r("0b2d");function s(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],i=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,i))}function o(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),i=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),a=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return Object(n["y"])(e,r,i,a),e}function c(e,t,r){r=r||e;const i=Object(n["j"])(e,t);Object(n["y"])(r,e[0]-i*t[0],e[1]-i*t[1],e[2]-i*t[2]),Object(n["t"])(r,r)}function l(e,t,r){Math.abs(e[0])>Math.abs(e[1])?Object(n["y"])(t,0,1,0):Object(n["y"])(t,1,0,0),Object(n["i"])(r,e,t),Object(n["t"])(t,t),Object(n["i"])(t,r,e),Object(n["t"])(r,r)}function u(e,t,r,i,n,a){const s=e+(t-e)*n;return s+(r+(i-r)*n-s)*a}function d(e,t,r,i=Object(a["f"])()){const s=Object(n["r"])(e),o=Object(n["r"])(t),c=Object(n["j"])(e,t)/(s*o);if(c<.9999999999999999){const a=Math.acos(c),l=((1-r)*s+r*o)/Math.sin(a),u=l/s*Math.sin((1-r)*a),d=l/o*Math.sin(r*a);return Object(n["g"])(x,e,u),Object(n["g"])(T,t,d),Object(n["h"])(i,x,T)}return Object(n["k"])(i,e,t,r)}function h(e,t,r,i=Object(a["f"])(),s=Object(a["f"])()){const o=Object(n["r"])(e),c=Object(n["r"])(t),l=Object(n["j"])(e,t)/(o*c);if(l<.9999999999999999){const a=Math.acos(l),u=Math.sin(a),d=Math.sin(r*a),h=Math.sin((1-r)*a),p=(1-r)*o+r*c;{const r=p/u,a=r/c*d;Object(n["g"])(x,e,r/o*h),Object(n["g"])(T,t,a),Object(n["h"])(i,x,T)}{const i=1/o*(-Math.cos((1-r)*a)*a*p+h*(-o+c));Object(n["g"])(x,e,i);const l=1/c*(Math.cos(r*a)*a*p+d*(-o+c));Object(n["g"])(T,t,l),Object(n["h"])(s,x,T),Object(n["g"])(s,s,1/u)}return s}return Object(n["k"])(i,e,t,r),Object(n["l"])(s,t,e),Object(n["t"])(s,s),s}function p(e,t,r){e=Object(n["t"])(x,e),t=Object(n["t"])(T,t);const a=Object(i["b"])(Object(n["j"])(e,t));if(r){const i=Object(n["i"])(w,e,t);if(Object(n["j"])(i,r)<0)return-a}return a}function f(e){const t=e.length;return function(r){if(r<=e[0][0])return e[0][1];if(r>=e[t-1][0])return e[t-1][1];let i=1;for(;r>e[i][0];)i++;const n=e[i-1][0],a=e[i][0],s=(a-r)/(a-n);return s*e[i-1][1]+(1-s)*e[i][1]}}class b{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return Object(i["f"])(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function m(e,t,r,i){Object(n["l"])(g,t,e),Object(n["l"])(y,r,e),Object(n["i"])(i,g,y),Object(n["t"])(i,i),i[3]=-Object(n["j"])(e,i)}const g=Object(a["f"])(),y=Object(a["f"])();function O(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}const v=O(new b(0,2*Math.PI)),_=O(new b(-Math.PI,Math.PI)),j=O(new b(0,360)),w=Object(a["f"])(),x=Object(a["f"])(),T=Object(a["f"])()},"68af":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b2b2"),n=r("f4cc"),a=r("b7c2"),s=r("d7f7");class o extends s["a"]{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textureRepository=e.textureRep,this._textureId=e.textureId,this._acquire(e.textureId,e=>this._texture=e),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){this._texture=Object(i["r"])(this._texture),this._textureNormal=Object(i["r"])(this._textureNormal),this._textureEmissive=Object(i["r"])(this._textureEmissive),this._textureOcclusion=Object(i["r"])(this._textureOcclusion),this._textureMetallicRoughness=Object(i["r"])(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?a["j"].LOADED:a["j"].LOADING}updateTexture(e){(Object(i["j"])(this._texture)||e!==this._texture.id)&&(this._texture=Object(i["r"])(this._texture),this._textureId=e,this._acquire(this._textureId,e=>this._texture=e))}bindTextures(e){Object(i["k"])(this._texture)&&e.bindTexture(this._texture.glTexture,"tex"),Object(i["k"])(this._textureNormal)&&e.bindTexture(this._textureNormal.glTexture,"normalTexture"),Object(i["k"])(this._textureEmissive)&&e.bindTexture(this._textureEmissive.glTexture,"texEmission"),Object(i["k"])(this._textureOcclusion)&&e.bindTexture(this._textureOcclusion.glTexture,"texOcclusion"),Object(i["k"])(this._textureMetallicRoughness)&&e.bindTexture(this._textureMetallicRoughness.glTexture,"texMetallicRoughness")}bindTextureScale(e){const t=Object(i["k"])(this._texture)?this._texture.glTexture:null;Object(i["k"])(t)&&t.descriptor.textureCoordinateScaleFactor?e.setUniform2fv("textureCoordinateScaleFactor",t.descriptor.textureCoordinateScaleFactor):e.setUniform2f("textureCoordinateScaleFactor",1,1)}_acquire(e,t){if(Object(i["j"])(e))return void t(null);const r=this._textureRepository.acquire(e);if(Object(n["o"])(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return Object(i["r"])(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}},"690a":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("e92d");const n=i["a"].getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class a{constructor(){this.includedModules=new Map}include(e,t){this.includedModules.has(e)?this.includedModules.get(e)!==t&&n.error("Trying to include shader module multiple times with different sets of options."):(this.includedModules.set(e,t),e(this.builder,t))}}class s extends a{constructor(){super(...arguments),this.vertex=new l,this.fragment=new l,this.attributes=new u,this.varyings=new d,this.extensions=new h,this.constants=new p}get fragmentUniforms(){return this.fragment.uniforms}get builder(){return this}generateSource(e){const t=this.extensions.generateSource(e),r=this.attributes.generateSource(e),i=this.varyings.generateSource(),n="vertex"===e?this.vertex:this.fragment,a=n.uniforms.generateSource(),s=n.code.generateSource(),o="vertex"===e?b:f,c=this.constants.generateSource().concat(n.constants.generateSource());return`\n${t.join("\n")}\n\n${o}\n\n${c.join("\n")}\n\n${a.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${s.join("\n")}`}}class o{constructor(){this._entries=new Map}add(e,t,r){const i=`${e}_${t}_${r}`;return this._entries.set(i,{name:e,type:t,arraySize:r}),this}generateSource(){const e=e=>e?`[${e}]`:"";return Array.from(this._entries.values()).map(t=>`uniform ${t.type} ${t.name}${e(t.arraySize)};`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(){this._entries=new Array}add(e){this._entries.push(e)}generateSource(){return this._entries}}class l extends a{constructor(){super(...arguments),this.uniforms=new o,this.code=new c,this.constants=new p}get builder(){return this}}class u{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`attribute ${e[1]} ${e[0]};`)}}class d{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(){return this._entries.map(e=>`varying ${e[1]} ${e[0]};`)}}class h{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?h.ALLOWLIST_VERTEX:h.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter(e=>t.includes(e)).map(e=>`#extension ${e} : enable`)}}h.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],h.ALLOWLIST_VERTEX=[];class p{constructor(){this._entries=[]}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=p._numberToFloatStr(r);break;case"int":i=p._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${p._numberToFloatStr(r[0])}, ${p._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${p._numberToFloatStr(r[0])}, ${p._numberToFloatStr(r[1])}, ${p._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${p._numberToFloatStr(r[0])}, ${p._numberToFloatStr(r[1])}, ${p._numberToFloatStr(r[2])}, ${p._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${p._numberToIntStr(r[0])}, ${p._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${p._numberToIntStr(r[0])}, ${p._numberToIntStr(r[1])}, ${p._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${p._numberToIntStr(r[0])}, ${p._numberToIntStr(r[1])}, ${p._numberToIntStr(r[2])}, ${p._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>p._numberToFloatStr(e)).join(", ")})`}return this._entries.push(`const ${t} ${e} = ${i};`),this}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const f="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif",b="precision highp float;\nprecision highp sampler2D;"},"697e":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b2b2"),n=r("ecd7"),a=r("f2e0"),s=r("e431");class o{constructor(){this._disposed=!1}get disposed(){return this._disposed}get shaderTransformation(){return this._shaderTransformation}acquire(e,t,r,i,n,s){this.id=Object(a["b"])(),this.geometry=e,this.material=t,this.transformation=r,this.instanceParameters=i,this.origin=n,this._shaderTransformation=s,this._disposed=!1}release(){this._disposed=!1}dispose(){this._disposed=!0}getStaticTransformation(){return this.transformation}getShaderTransformation(){return Object(i["k"])(this._shaderTransformation)?this._shaderTransformation(this.transformation):this.transformation}computeAttachmentOrigin(e){return!!(this.material.computeAttachmentOrigin?this.material.computeAttachmentOrigin(this.geometry,e):this.geometry.computeAttachmentOrigin(e))&&(Object(s["s"])(e,e,this.getStaticTransformation()),!0)}}o.pool=new n["a"](o)},"698f":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("448d")),c=r("d386");let l=i=class extends a["a"]{constructor(e){super(e),this.type="sunny",this.cloudCover=.5}clone(){return new i({cloudCover:this.cloudCover})}};Object(n["a"])([Object(o["a"])({sunny:"sunny"})],l.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],l.prototype,"cloudCover",void 0),l=i=Object(n["a"])([Object(c["a"])("esri.views.3d.environment.SunnyWeather")],l);const u=l},"69c9":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("d386")),c=r("a7a7");let l=i=class extends c["a"]{constructor(e){super(e),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new i({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?Object(a["a"])(this.outFields):null})}};Object(n["a"])([Object(s["b"])()],l.prototype,"creator",void 0),Object(n["a"])([Object(s["b"])()],l.prototype,"destroyer",void 0),Object(n["a"])([Object(s["b"])()],l.prototype,"outFields",void 0),Object(n["a"])([Object(s["b"])({type:["custom"],readOnly:!0})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(o["a"])("esri.popup.content.CustomContent")],l);const u=l},"69dd":function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var i,n=r("a4ee"),a=r("e06a"),s=r("658b"),o=r("fa8a"),c=r("6a0ed"),l=r("7ffa"),u=r("b2b2"),d=r("59b2"),h=r("1a3e"),p=r("448d"),f=r("d386"),b=r("09db"),m=r("cea0"),g=r("a9ab"),y=r("624c"),O=r("79e4"),v=r("a796"),_=r("5996"),j=r("4ae5");const w=new o["a"]({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),x=new o["a"]({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let T=i=class extends c["a"]{constructor(e){super(e),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}static from(e){return Object(m["d"])(i,e)}castDatumTransformation(e){return"number"==typeof e||"object"==typeof e?e:null}writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeParameterValues(e,t){if(e){const r={};for(const t in e){const i=e[t];Array.isArray(i)?r[t]=i.map(e=>e instanceof Date?e.getTime():e):i instanceof Date?r[t]=i.getTime():r[t]=i}t.parameterValues=r}}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,t.where="1=1"}writeWhere(e,t){t.where=e||"1=1"}clone(){return new i(Object(l["a"])({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:Object(u["k"])(this.historicMoment)?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}};T.MAX_MAX_RECORD_COUNT_FACTOR=5,Object(n["a"])([Object(d["b"])({json:{write:!0}})],T.prototype,"aggregateIds",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{write:!0}})],T.prototype,"cacheHint",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"compactGeometryEnabled",void 0),Object(n["a"])([Object(d["b"])({json:{write:!0}})],T.prototype,"datumTransformation",void 0),Object(n["a"])([Object(h["a"])("datumTransformation")],T.prototype,"castDatumTransformation",null),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"defaultSpatialReferenceEnabled",void 0),Object(n["a"])([Object(d["b"])({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],T.prototype,"distance",void 0),Object(n["a"])([Object(d["b"])({type:y["a"],json:{write:!0}})],T.prototype,"dynamicDataSource",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],T.prototype,"formatOf3DObjects",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],T.prototype,"gdbVersion",void 0),Object(n["a"])([Object(d["b"])({types:a["a"],json:{read:g["a"],write:!0}})],T.prototype,"geometry",void 0),Object(n["a"])([Object(d["b"])({type:Number,json:{write:!0}})],T.prototype,"geometryPrecision",void 0),Object(n["a"])([Object(d["b"])({type:[String],json:{write:!0}})],T.prototype,"groupByFieldsForStatistics",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],T.prototype,"having",void 0),Object(n["a"])([Object(d["b"])({type:Date})],T.prototype,"historicMoment",void 0),Object(n["a"])([Object(b["a"])("historicMoment")],T.prototype,"writeHistoricMoment",null),Object(n["a"])([Object(d["b"])({type:Number,json:{write:!0}})],T.prototype,"maxAllowableOffset",void 0),Object(n["a"])([Object(d["b"])({type:Number,cast:e=>e<1?1:e>i.MAX_MAX_RECORD_COUNT_FACTOR?i.MAX_MAX_RECORD_COUNT_FACTOR:e,json:{write:{overridePolicy:e=>({enabled:e>1})}}})],T.prototype,"maxRecordCountFactor",void 0),Object(n["a"])([Object(d["b"])({type:["xyFootprint"],json:{write:!0}})],T.prototype,"multipatchOption",void 0),Object(n["a"])([Object(d["b"])({type:Number,json:{read:{source:"resultRecordCount"}}})],T.prototype,"num",void 0),Object(n["a"])([Object(d["b"])({json:{write:!0}})],T.prototype,"objectIds",void 0),Object(n["a"])([Object(d["b"])({type:[String],json:{write:!0}})],T.prototype,"orderByFields",void 0),Object(n["a"])([Object(d["b"])({type:[String],json:{write:!0}})],T.prototype,"outFields",void 0),Object(n["a"])([Object(d["b"])({type:_["a"],json:{name:"outSR",write:!0}})],T.prototype,"outSpatialReference",void 0),Object(n["a"])([Object(d["b"])({type:[v["a"]],json:{write:{enabled:!0,overridePolicy(){return{enabled:Object(u["k"])(this.outStatistics)&&this.outStatistics.length>0}}}}})],T.prototype,"outStatistics",void 0),Object(n["a"])([Object(d["b"])({json:{write:!0}})],T.prototype,"parameterValues",void 0),Object(n["a"])([Object(b["a"])("parameterValues")],T.prototype,"writeParameterValues",null),Object(n["a"])([Object(d["b"])({type:j["a"],json:{write:!0}})],T.prototype,"pixelSize",void 0),Object(n["a"])([Object(d["b"])({type:O["a"],json:{write:!0}})],T.prototype,"quantizationParameters",void 0),Object(n["a"])([Object(d["b"])({type:[Object],json:{write:!0}})],T.prototype,"rangeValues",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],T.prototype,"relationParameter",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],T.prototype,"resultType",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnCentroid",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnDistinctValues",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!0,write:!0}})],T.prototype,"returnExceededLimitFeatures",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{write:!0}})],T.prototype,"returnGeometry",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnQueryGeometry",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnM",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],T.prototype,"returnZ",void 0),Object(n["a"])([Object(d["b"])({type:_["a"],json:{write:!0}})],T.prototype,"sourceSpatialReference",void 0),Object(n["a"])([Object(p["a"])(w,{ignoreUnknown:!1,name:"spatialRel"})],T.prototype,"spatialRelationship",void 0),Object(n["a"])([Object(d["b"])({type:Number,json:{read:{source:"resultOffset"}}})],T.prototype,"start",void 0),Object(n["a"])([Object(b["a"])("start"),Object(b["a"])("num")],T.prototype,"writeStart",null),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],T.prototype,"sqlFormat",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],T.prototype,"text",void 0),Object(n["a"])([Object(d["b"])({type:s["a"],json:{write:!0}})],T.prototype,"timeExtent",void 0),Object(n["a"])([Object(d["b"])({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"timeReferenceUnknownClient",void 0),Object(n["a"])([Object(p["a"])(x,{ignoreUnknown:!1}),Object(d["b"])({json:{write:{overridePolicy(e){return{enabled:e&&this.distance>0}}}}})],T.prototype,"units",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:{overridePolicy(e){return{enabled:null!=e||this.start>0}}}}})],T.prototype,"where",void 0),Object(n["a"])([Object(b["a"])("where")],T.prototype,"writeWhere",null),T=i=Object(n["a"])([Object(f["a"])("esri.rest.support.Query")],T);const S=T},"69e9":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("5ab2");let n,a=(e,t)=>{let r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r};n=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];let s=(e,t)=>{let r=e;return t.forEach(e=>{r=r&&r.children?n(r.children,t=>t.domNode===e):void 0}),r},o=(e,t,r)=>{let i=function(i){r("domEvent",i);let n=t(),o=a(i.currentTarget,n.domNode);o.reverse();let c,l=s(n.getLastRender(),o);return e.scheduleRender(),l&&(c=l.properties["on"+i.type].apply(l.properties.bind||this,arguments)),r("domEventProcessed",i),c};return(e,t,r,n)=>i},c=e=>{let t,r,n=Object(i["a"])(e),a=n.performanceLogger,s=!0,c=!1,l=[],u=[],d=(e,r,i)=>{let s,c=()=>s;n.eventHandlerInterceptor=o(t,c,a),s=e(r,i(),n),l.push(s),u.push(i)},h=()=>{if(r=void 0,s){s=!1,a("renderStart",void 0);for(let e=0;e<l.length;e++){let t=u[e]();a("rendered",void 0),l[e].update(t),a("patched",void 0)}a("renderDone",void 0),s=!0}};return t={renderNow:h,scheduleRender:()=>{r||c||(r=requestAnimationFrame(h))},stop:()=>{r&&(cancelAnimationFrame(r),r=void 0),c=!0},resume:()=>{c=!1,s=!0,t.scheduleRender()},append:(e,t)=>{d(i["b"].append,e,t)},insertBefore:(e,t)=>{d(i["b"].insertBefore,e,t)},merge:(e,t)=>{d(i["b"].merge,e,t)},replace:(e,t)=>{d(i["b"].replace,e,t)},detach:e=>{for(let t=0;t<u.length;t++)if(u[t]===e)return u.splice(t,1),l.splice(t,1)[0];throw new Error("renderFunction was not found")}},t}},"6a07":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s}));var i=r("0fc4"),n=r("3886");const a=Object(i["g"])(1,1,0,1),s=Object(i["g"])(1,0,1,1);function o(e){e.fragment.uniforms.add("depthTex","sampler2D"),e.fragment.uniforms.add("highlightViewportPixelSz","vec4"),e.fragment.constants.add("occludedHighlightFlag","vec4",a).add("unoccludedHighlightFlag","vec4",s),e.fragment.code.add(n["a"]`void outputHighlight() {
  1717. vec4 fragCoord = gl_FragCoord;
  1718. float sceneDepth = texture2D(depthTex, (fragCoord.xy - highlightViewportPixelSz.xy) * highlightViewportPixelSz.zw).r;
  1719. if (fragCoord.z > sceneDepth + 5e-7) {
  1720. gl_FragColor = occludedHighlightFlag;
  1721. }
  1722. else {
  1723. gl_FragColor = unoccludedHighlightFlag;
  1724. }
  1725. }`)}function c(e,t){e.bindTexture(t.highlightDepthTexture,"depthTex"),e.setUniform4f("highlightViewportPixelSz",0,0,t.inverseViewport[0],t.inverseViewport[1])}},"6a0ed":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return b}));var i=r("a4ee"),n=r("fc29"),a=r("b2b2"),s=r("7ffa"),o=r("92ef");class c{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new c;return this._values.forEach((r,i)=>{e&&e.has(i)||t.set(i,Object(s["a"])(r.value),r.origin)}),t}get(e,t){t=this._normalizeOrigin(t);const r=this._values.get(e);return null==t||(null==r?void 0:r.origin)===t?null==r?void 0:r.value:void 0}originOf(e){var t,r;return null!=(t=null==(r=this._values.get(e))?void 0:r.origin)?t:o["a"].USER}keys(e){e=this._normalizeOrigin(e);const t=[...this._values.keys()];return null==e?t:t.filter(t=>{var r;return(null==(r=this._values.get(t))?void 0:r.origin)===e})}set(e,t,r){if((r=this._normalizeOrigin(r))===o["a"].DEFAULTS){const t=this._values.get(e);if(t&&null!=t.origin&&t.origin>r)return}this._values.set(e,new l(t,r))}delete(e,t){var r;null!=(t=this._normalizeOrigin(t))&&(null==(r=this._values.get(e))?void 0:r.origin)!==t||this._values.delete(e)}has(e,t){var r;return null!=(t=this._normalizeOrigin(t))?(null==(r=this._values.get(e))?void 0:r.origin)===t:this._values.has(e)}forEach(e){this._values.forEach(({value:t},r)=>e(t,r))}_normalizeOrigin(e){if(null!=e)return e===o["a"].DEFAULTS?e:o["a"].USER}}class l{constructor(e,t){this.value=e,this.origin=t}}var u=r("382b"),d=r("0964"),h=r("4c37"),p=r("c478"),f=r("d386");const b=e=>{let t=class extends e{constructor(...e){super(...e);const t=Object(a["c"])(Object(h["a"])(this)),r=t.store,i=new c;t.store=i,Object(u["a"])(t,r,i)}read(e,t){Object(d["a"])(this,e,t)}write(e={},t){return Object(p["b"])(this,e,t)}toJSON(e){return this.write({},e)}static fromJSON(e,t){return m.call(this,e,t)}};return t=Object(i["a"])([Object(f["a"])("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function m(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}let g=class extends(b(n["a"])){};g=Object(i["a"])([Object(f["a"])("esri.core.JSONSupport")],g)},"6a21":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var i=r("c120"),n=r("3886");function a({code:e},t){t.doublePrecisionRequiresObfuscation?e.add(n["a"]`vec3 dpPlusFrc(vec3 a, vec3 b) {
  1726. return mix(a, a + b, vec3(notEqual(b, vec3(0))));
  1727. }
  1728. vec3 dpMinusFrc(vec3 a, vec3 b) {
  1729. return mix(vec3(0), a - b, vec3(notEqual(a, b)));
  1730. }
  1731. vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
  1732. vec3 t1 = dpPlusFrc(hiA, hiB);
  1733. vec3 e = dpMinusFrc(t1, hiA);
  1734. vec3 t2 = dpMinusFrc(hiB, e) + dpMinusFrc(hiA, dpMinusFrc(t1, e)) + loA + loB;
  1735. return t1 + t2;
  1736. }`):e.add(n["a"]`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
  1737. vec3 t1 = hiA + hiB;
  1738. vec3 e = t1 - hiA;
  1739. vec3 t2 = ((hiB - e) + (hiA - (t1 - e))) + loA + loB;
  1740. return t1 + t2;
  1741. }`)}function s(e){return!!Object(i["a"])("force-double-precision-obfuscation")||e.driverTest.doublePrecisionRequiresObfuscation}},"6aa9":function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return y})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return p})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return u})),r.d(t,"i",(function(){return d}));var i=r("f0b9"),n=r("38a4"),a=r("b3b6"),s=r("8048"),o=r("21e2");function c(e,t,r){return e.units[t][r]}function l(e,t,r,i=2,n="abbr"){return`${Object(o["b"])(t,{minimumFractionDigits:i,maximumFractionDigits:i})} ${c(e,r,n)}`}function u(e,t,r,i=2,n="abbr"){const a=Object(s["r"])(t,r);return l(e,Object(s["c"])(t,r,a),a,i,n)}function d(e,t,r,i=2,n="abbr"){const a=Object(s["s"])(t,r);return l(e,Object(s["c"])(t,r,a),a,i,n)}function h(e,t,r,i=2,n="abbr"){const a=Object(s["o"])(t,r);return l(e,Object(s["c"])(t,r,a),a,i,n)}function p(e,t,r,i=2,n="abbr"){const a=Object(s["p"])(t,r);return l(e,Object(s["c"])(t,r,a),a,i,n)}function f(e,t,r,i=2,n="abbr"){const a=Object(s["q"])(t,r);return l(e,Object(s["c"])(t,r,a),a,i,n)}function b(e,t,r,i=2,n="abbr"){const a=Object(s["n"])(t,r);return l(e,Object(s["c"])(t,r,a),a,i,n)}function m(e,t,r=2){let i=Object(s["c"])(e,t,"degrees"),n=i-Math.floor(i);i-=n,n*=60;let a=n-Math.floor(n);return n-=a,a*=60,`${i.toFixed()}° ${n.toFixed()}' ${a.toFixed(r)}"`}const g=["B","kB","MB","GB","TB"];function y(e,t){let r=0===t?0:Math.floor(Math.log(t)/Math.log(i["a"].KILOBYTES));r=Object(n["f"])(r,0,g.length-1);const s=Object(o["b"])(t/i["a"].KILOBYTES**r,{maximumFractionDigits:2});return Object(a["c"])(e.units.bytes[g[r]],{fileSize:s})}},"6ad6":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return h}));var i,n,a=r("2aad"),s=r("d047"),o=r("d017"),c=r("58c2"),l=r("501b"),u=r("3886"),d=r("690a");!function(e){e[e.Accumulate=0]="Accumulate",e[e.Visualize=1]="Visualize",e[e.VisualizeCurrent=2]="VisualizeCurrent",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Gradient=0]="Gradient",e[e.Threshold=1]="Threshold"}(n||(n={}));const h=255,p=1/h;function f(e){const t=new d["a"];t.fragment.include(l["a"]),t.fragment.include(s["a"]),t.include(c["a"]),t.include(a["a"]);const{pass:r}=e;if(r===i.Visualize){const{visualization:r,bandsEnabled:i}=e;t.fragment.constants.add("inverseSampleValue","float",h),t.fragment.uniforms.add("shadowCastMap","sampler2D"),t.fragment.uniforms.add("sampleScale","float"),t.fragment.uniforms.add("opacityFromElevation","float");const a=r===n.Gradient,s=r===n.Threshold;t.fragment.uniforms.add("uColor","vec4"),a?i&&t.fragment.uniforms.add("bandSize","float"):s&&t.fragment.uniforms.add("threshold","float"),t.fragment.code.add(u["a"]`
  1742. void main(void) {
  1743. vec4 record = texture2D(shadowCastMap, uv);
  1744. float pixelSamples = record.r * inverseSampleValue;
  1745. if (pixelSamples < 1.0) {
  1746. discard;
  1747. }
  1748. float strength = pixelSamples * sampleScale;
  1749. ${s?u["a"]`
  1750. if (strength <= threshold) {
  1751. discard;
  1752. }`:""}
  1753. ${a&&i?u["a"]`strength = ceil(strength / bandSize) * bandSize;`:""}
  1754. gl_FragColor = vec4(uColor.xyz, uColor.a * opacityFromElevation ${a?u["a"]`* strength`:""});
  1755. }
  1756. `)}else r!==i.Accumulate&&r!==i.VisualizeCurrent||(t.include(o["a"]),t.fragment.uniforms.add("depthMap","sampler2D"),t.fragment.uniforms.add("inverseViewMatrix","mat4"),t.fragment.uniforms.add("nearFar","vec2"),r===i.Accumulate?t.fragment.constants.add("sampleValue","float",p):t.fragment.constants.add("shadowColor","vec4",[0,0,0,.8]),t.fragment.code.add(u["a"]`
  1757. void main(void) {
  1758. float depth = rgba2float(texture2D(depthMap, uv));
  1759. // 0.0 is the clear value of depthMap, which means nothing has been drawn there and we should discard
  1760. if (depth == 0.0) {
  1761. discard;
  1762. }
  1763. float currentPixelDepth = linearDepthFromFloat(depth, nearFar);
  1764. if (-currentPixelDepth > nearFar.y || -currentPixelDepth < nearFar.x) {
  1765. discard;
  1766. }
  1767. vec4 currentPixelPos = vec4(reconstructPosition(gl_FragCoord.xy, currentPixelDepth), 1.0);
  1768. vec4 worldSpacePos = inverseViewMatrix * currentPixelPos;
  1769. mat4 shadowMatrix;
  1770. float linearDepth = -currentPixelDepth;
  1771. int i = chooseCascade(linearDepth, shadowMatrix);
  1772. if (i >= numCascades) {
  1773. discard;
  1774. }
  1775. vec3 lvpos = lightSpacePosition(worldSpacePos.xyz, shadowMatrix);
  1776. // vertex completely outside? -> no shadow
  1777. if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
  1778. discard;
  1779. }
  1780. vec2 uvShadow = cascadeCoordinates(i, lvpos);
  1781. float depthShadow = readShadowMapDepth(uvShadow, shadowMapTex);
  1782. bool shadow = depthShadow < lvpos.z;
  1783. if (!shadow) {
  1784. discard;
  1785. }
  1786. gl_FragColor = ${r===i.Accumulate?u["a"]`vec4(sampleValue)`:u["a"]`shadowColor`};
  1787. }
  1788. `));return t}const b=Object.freeze({__proto__:null,get ShadowCastPass(){return i},get ShadowCastVisualization(){return n},shadowCastMaxSamples:h,build:f})},"6b38":function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var i=r("6c97"),n=r("38a4"),a=r("d791"),s=r("afe1"),o=r("e431"),c=r("0b2d"),l=r("8188"),u=r("f694"),d=r("4261"),h=r("9180"),p=r("d359"),f=r("bd7e"),b=r("7289"),m=r("d18f"),g=r("3c9c"),y=r("de58");const O=.5*Math.PI,v=O/Math.PI*180;class _{constructor(e){this.renderCoordsHelper=e.renderCoordsHelper,this.extent=new Array(4),this.planes=new Array(6),this.maxSpan=0,this.center={origin:Object(c["f"])(),direction:Object(c["f"])()};for(let t=0;t<4;t++)this.extent[t]={origin:Object(c["f"])(),direction:Object(c["f"])(),cap:{next:null,direction:Object(c["f"])()}},this.planes[t]=Object(b["d"])();this.planes[p["b"].NEAR]=Object(b["d"])(),this.planes[p["b"].FAR]=Object(b["d"])(),this.planesWithoutFar=this.planes.slice(0,5)}update(e,t,r,i=!0){const n=this.extent;this._toRenderBoundingExtent(e,t,r),Object(o["h"])(this.center.origin,n[0].origin,n[2].origin),Object(o["g"])(this.center.origin,this.center.origin,.5),this.renderCoordsHelper.worldUpAtPosition(this.center.origin,this.center.direction),i||Object(o["g"])(this.center.direction,this.center.direction,-1);for(let a=0;a<4;a++){const e=n[a];this.renderCoordsHelper.worldUpAtPosition(e.origin,e.direction);const t=n[3===a?0:a+1];e.cap.next=t.origin,Object(o["x"])(e.cap.direction,e.origin,t.origin),Object(b["j"])(e.direction,e.cap.direction,e.origin,this.planes[a]),i||Object(o["g"])(e.direction,e.direction,-1)}Object(b["j"])(n[0].cap.direction,n[1].cap.direction,n[0].origin,this.planes[p["b"].NEAR]),i?Object(b["q"])(this.planes[p["b"].NEAR],this.planes[p["b"].FAR]):(Object(b["c"])(this.planes[p["b"].FAR],this.planes[p["b"].NEAR]),Object(b["q"])(this.planes[p["b"].NEAR],this.planes[p["b"].NEAR])),this.maxSpan=Math.max(Math.abs(e[0]-e[2]),Math.abs(e[1]-e[3])),this.maxSpanSpatialReference=t,this.minGlobalAltitude=.9*Object(u["e"])(this.maxSpanSpatialReference).radius}isVisibleInFrustum(e,t,r=!1){if(null==e)return!1;if(this.renderCoordsHelper.viewingMode===g["a"].Global){const r=this.maxSpanSpatialReference.isGeographic?v:O*t;if(this.maxSpan>r)return!0;if(e.altitude>=this.minGlobalAltitude)return this._isVisibleInFrustumGlobal(e)}if(0===this.maxSpan){const t=this.extent[0];return!(r||!e.intersectsRay(Object(m["h"])(t.origin,t.direction)))}for(let n=0;n<this.extent.length;n++){const t=this.extent[n];if(!r&&e.intersectsRay(Object(m["h"])(t.origin,t.direction)))return!0;if(e.intersectsLineSegment(Object(f["e"])(t.origin,t.cap.next,A),t.cap.direction))return!0}const i=r?this.planes:this.planesWithoutFar;for(let n=0;n<e.lines.length;n++){const t=e.lines[n];if(Object(y["b"])(i,t.origin,t.endpoint,t.direction))return!0}return!1}_toRenderBoundingExtentGlobal(e,t,r){const i=5;Object(h["e"])(e,w),w[2]=r,Object(l["d"])(t,w,x,this.renderCoordsHelper.spatialReference),Object(a["b"])(T,x),Object(d["k"])(S);for(const{x0:a,x1:s,y0:c,y1:u}of j)for(let h=0;h<i;h++){const p=h/(i-1);w[0]=Object(n["l"])(e[a],e[s],p),w[1]=Object(n["l"])(e[c],e[u],p),w[2]=r,Object(l["y"])(w,t,w,this.renderCoordsHelper.spatialReference),Object(o["s"])(w,w,T),Object(d["r"])(S,w)}Object(o["y"])(this.extent[0].origin,S[0],S[1],S[2]),Object(o["y"])(this.extent[1].origin,S[3],S[1],S[2]),Object(o["y"])(this.extent[2].origin,S[3],S[4],S[2]),Object(o["y"])(this.extent[3].origin,S[0],S[4],S[2]);for(let n=0;n<4;++n)Object(o["s"])(this.extent[n].origin,this.extent[n].origin,x)}_toRenderBoundingExtentLocal(e,t,r){Object(l["n"])(e,t,E,this.renderCoordsHelper.spatialReference),Object(o["y"])(this.extent[0].origin,E[0],E[1],r),Object(o["y"])(this.extent[1].origin,E[2],E[1],r),Object(o["y"])(this.extent[2].origin,E[2],E[3],r),Object(o["y"])(this.extent[3].origin,E[0],E[3],r)}_toRenderBoundingExtent(e,t,r){switch(this.renderCoordsHelper.viewingMode){case g["a"].Global:this._toRenderBoundingExtentGlobal(e,t,r);break;case g["a"].Local:this._toRenderBoundingExtentLocal(e,t,r);break;default:Object(i["a"])(this.renderCoordsHelper.viewingMode)}}_isVisibleInFrustumGlobal(e){if(Object(o["j"])(this.center.direction,e.direction)<0)return!0;for(let t=0;t<4;t++){const r=this.extent[t];if(Object(o["j"])(r.direction,e.direction)<0)return!0}return!1}}const j=[{x0:0,y0:1,x1:2,y1:1},{x0:0,y0:3,x1:2,y1:3},{x0:0,y0:1,x1:0,y1:3},{x0:2,y0:1,x1:2,y1:3}],w=Object(c["f"])(),x=Object(s["d"])(),T=Object(s["d"])(),S=Object(d["h"])(),E=Object(h["l"])(),A=Object(f["c"])()},"6b59":function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return n})),function(e){const t=(e,t,r,i)=>{let n=t,a=t;const s=r>>>1,o=e[n-1];for(;a<=s;){a=n<<1,a<r&&i(e[a-1],e[a])<0&&++a;const t=e[a-1];if(i(t,o)<=0)break;e[n-1]=t,n=a}e[n-1]=o},r=(e,t)=>e<t?-1:e>t?1:0;function i(e,i,n,a){void 0===i&&(i=0),void 0===n&&(n=e.length),void 0===a&&(a=r);for(let r=n>>>1;r>i;r--)t(e,r,n,a);const s=i+1;for(let r=n-1;r>i;r--){const n=e[i];e[i]=e[r],e[r]=n,t(e,s,r,a)}}function*n(e,i,n,a){void 0===i&&(i=0),void 0===n&&(n=e.length),void 0===a&&(a=r);for(let r=n>>>1;r>i;r--)t(e,r,n,a),yield;const s=i+1;for(let r=n-1;r>i;r--){const n=e[i];e[i]=e[r],e[r]=n,t(e,s,r,a),yield}}e.sort=i,e.iterableSort=n}(i||(i={}));const n=i},"6be6":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var i=r("1942"),n=r("a978");function a(e){return Object(n["c"])(e)&&e.intersector===i["b"].PCL&&!!e.target}function s(e){return Object(n["c"])(e)&&e.intersector===i["b"].I3S&&!!e.target}},"6c97":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));r("c120");function i(e){}function n(e){return()=>e}},"6cb2":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("5876"),n=r("3886"),a=r("b7bd");function s(e,t){t.symbolColor?(e.include(i["a"]),e.attributes.add(a["a"].SYMBOLCOLOR,"vec4"),e.varyings.add("colorMixMode","mediump float")):e.fragment.uniforms.add("colorMixMode","int"),t.symbolColor?e.vertex.code.add(n["a"]`int symbolColorMixMode;
  1789. vec4 getSymbolColor() {
  1790. return decodeSymbolColor(symbolColor, symbolColorMixMode) * 0.003921568627451;
  1791. }
  1792. void forwardColorMixMode() {
  1793. colorMixMode = float(symbolColorMixMode) + 0.5;
  1794. }`):e.vertex.code.add(n["a"]`vec4 getSymbolColor() { return vec4(1.0); }
  1795. void forwardColorMixMode() {}`)}},"6d5b":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886"),n=r("b7bd");function a(e,t){t.attributeColor?(e.attributes.add(n["a"].COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i["a"]`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i["a"]`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(i["a"]`void forwardVertexColor() {}
  1796. void forwardNormalizedVertexColor() {}`)}},"6d5f":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("a4ee"),n=r("ce50"),a=r("fab3"),s=r("f4cc"),o=r("0028"),c=r("59b2"),l=r("d386");const u="not-loaded",d="loading",h="failed",p="loaded",f=e=>{let t=class extends e{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(e=>{const t=this.load.bind(this);this.load=r=>{const i=new Promise((e,t)=>{const i=Object(s["r"])(r,t);this.destroyed&&t(new n["a"]("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(e,t).finally(()=>{i&&i.remove()})});if(this.loadStatus===u){this._set("loadStatus",d);const e=this._loadController=new AbortController;t({signal:e.signal}),Object(s["q"])(e.signal,()=>{this._promiseProps.abort()})}return e(),i}})),this.when(()=>{this._set("loadStatus",p),this._loadController=null},e=>{this._set("loadStatus",h),this._set("loadError",e),this._loadController=null})}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){var e;return this.isFulfilled()||(this._set("loadError",new n["a"]("load:cancelled","Cancelled")),null==(e=this._loadController)||e.abort()),this}};return Object(i["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"loaded",null),Object(i["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"loadError",void 0),Object(i["a"])([Object(c["b"])({clonable:!1})],t.prototype,"loadStatus",void 0),Object(i["a"])([Object(c["b"])({type:[o["a"]],readOnly:!0})],t.prototype,"loadWarnings",null),t=Object(i["a"])([Object(l["a"])("esri.core.Loadable")],t),t};let b=class extends(f(a["a"])){};b=Object(i["a"])([Object(l["a"])("esri.core.Loadable")],b),function(e){function t(e){return!(!e||!e.load)}e.LoadableMixin=f,e.isLoadable=t}(b||(b={}));const m=b},"6df2":function(e,t,r){"use strict";r.d(t,"a",(function(){return K}));var i=r("b2b2"),n=r("f4cc"),a=r("b0ea"),s=r("7ce4"),o=r("d267"),c=(r("c120"),r("1956")),l=r("cc15"),u=r("d17d"),d=(r("d1bc"),r("9067")),h=r("a1ff"),p=r("0fa6");class f{constructor(){this.blend=!1,this.blendColor={r:0,g:0,b:0,a:0},this.blendFunction={srcRGB:u["b"].ONE,dstRGB:u["b"].ZERO,srcAlpha:u["b"].ONE,dstAlpha:u["b"].ZERO},this.blendEquation={mode:u["c"].ADD,modeAlpha:u["c"].ADD},this.colorMask={r:!0,g:!0,b:!0,a:!0},this.faceCulling=!1,this.cullFace=u["n"].BACK,this.frontFace=u["j"].CCW,this.scissorTest=!1,this.scissorRect={x:0,y:0,width:0,height:0},this.depthTest=!1,this.depthFunction=u["h"].LESS,this.clearDepth=1,this.depthWrite=!0,this.depthRange={zNear:0,zFar:1},this.viewport=null,this.stencilTest=!1,this.polygonOffsetFill=!1,this.polygonOffset=[0,0],this.stencilFunction={face:u["n"].FRONT_AND_BACK,func:u["h"].ALWAYS,ref:0,mask:1},this.clearStencil=0,this.stencilWriteMask=1,this.stencilOperation={face:u["n"].FRONT_AND_BACK,fail:u["w"].KEEP,zFail:u["w"].KEEP,zPass:u["w"].KEEP},this.clearColor={r:0,g:0,b:0,a:0},this.program=null,this.vertexBuffer=null,this.indexBuffer=null,this.uniformBuffer=null,this.pixelPackBuffer=null,this.pixelUnpackBuffer=null,this.copyReadBuffer=null,this.copyWriteBuffer=null,this.uniformBufferBindingPoints=new Array,this.readFramebuffer=null,this.drawFramebuffer=null,this.renderbuffer=null,this.activeTexture=0,this.textureUnitMap=new Array}}class b{constructor(e){this._allocations=new Map,e?Error.stackTraceLimit=1/0:(this.add=()=>{},this.remove=()=>{})}add(e){this._allocations.set(e,(new Error).stack)}remove(e){this._allocations.delete(e)}print(){if(this._allocations.size>0){console.log(this._allocations.size+" live object allocations:");const e=new Map;this._allocations.forEach(t=>{var r;e.set(t,(null!=(r=e.get(t))?r:0)+1)}),e.forEach((e,t)=>{const r=t.split("\n");r.shift(),r.shift(),console.log(`${e}: ${r.shift()}`),r.forEach(e=>console.log(" ",e))})}}}class m{constructor(){this.RECORD_ALLOCATIONS=!1}}const g=new m;class y{constructor(){for(this._current=new Array,this._max=new Array,this._allocations=new b(g.RECORD_ALLOCATIONS);this._current.length<u["t"].COUNT;)this._current.push(0),this._max.push(0)}resetMax(){for(this._max.length=0;this._max.length<this._current.length;)this._max.push(0)}increment(e,t){const r=++this._current[e];this._max[e]=Math.max(r,this._max[e]),this._allocations.add(t)}decrement(e,t){--this._current[e],this._allocations.remove(t)}get max(){return this._max}get current(){return this._current}get total(){return this.current.reduce((e,t)=>e+t,0)}printResourceCount(){if(this.total>0){console.log("Live objects:");for(let e=0;e<u["t"].COUNT;++e){const t=this._current[e];t>0&&console.log(`${u["t"][e]}: ${t}`)}}this._allocations.print()}}var O=r("189c"),v=r("8539"),_=r("661c"),j=r("0b2d"),w=r("9cc4"),x=r("3f3e");function T(e,t){const r=new o["a"](e,{colorTarget:u["y"].TEXTURE,depthStencilTarget:u["m"].NONE},{target:u["A"].TEXTURE_2D,wrapMode:u["B"].CLAMP_TO_EDGE,pixelFormat:u["p"].RGBA,dataType:u["q"].UNSIGNED_BYTE,samplingMode:u["z"].NEAREST,width:1,height:1});function i(r,i){const n=`\n\n precision highp float;\n\n attribute vec2 position;\n\n uniform vec3 u_highA;\n uniform vec3 u_lowA;\n uniform vec3 u_highB;\n uniform vec3 u_lowB;\n\n varying vec4 v_color;\n\n ${t?"#define DOUBLE_PRECISION_REQUIRES_OBFUSCATION":""}\n\n #ifdef DOUBLE_PRECISION_REQUIRES_OBFUSCATION\n\n vec3 dpPlusFrc(vec3 a, vec3 b) {\n return mix(a, a + b, vec3(notEqual(b, vec3(0))));\n }\n\n vec3 dpMinusFrc(vec3 a, vec3 b) {\n return mix(vec3(0), a - b, vec3(notEqual(a, b)));\n }\n\n vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {\n vec3 t1 = dpPlusFrc(hiA, hiB);\n vec3 e = dpMinusFrc(t1, hiA);\n vec3 t2 = dpMinusFrc(hiB, e) + dpMinusFrc(hiA, dpMinusFrc(t1, e)) + loA + loB;\n return t1 + t2;\n }\n\n #else\n\n vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {\n vec3 t1 = hiA + hiB;\n vec3 e = t1 - hiA;\n vec3 t2 = ((hiB - e) + (hiA - (t1 - e))) + loA + loB;\n return t1 + t2;\n }\n\n #endif\n\n const float MAX_RGBA_FLOAT =\n 255.0 / 256.0 +\n 255.0 / 256.0 / 256.0 +\n 255.0 / 256.0 / 256.0 / 256.0 +\n 255.0 / 256.0 / 256.0 / 256.0 / 256.0;\n\n const vec4 FIXED_POINT_FACTORS = vec4(1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0);\n\n vec4 float2rgba(const float value) {\n // Make sure value is in the domain we can represent\n float valueInValidDomain = clamp(value, 0.0, MAX_RGBA_FLOAT);\n\n // Decompose value in 32bit fixed point parts represented as\n // uint8 rgba components. Decomposition uses the fractional part after multiplying\n // by a power of 256 (this removes the bits that are represented in the previous\n // component) and then converts the fractional part to 8bits.\n vec4 fixedPointU8 = floor(fract(valueInValidDomain * FIXED_POINT_FACTORS) * 256.0);\n\n // Convert uint8 values (from 0 to 255) to floating point representation for\n // the shader\n const float toU8AsFloat = 1.0 / 255.0;\n\n return fixedPointU8 * toU8AsFloat;\n }\n\n void main() {\n vec3 val = dpAdd(u_highA, u_lowA, -u_highB, -u_lowB);\n\n v_color = float2rgba(val.z / 25.0);\n\n gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);\n }\n `,a="\n precision highp float;\n\n varying vec4 v_color;\n\n void main() {\n gl_FragColor = v_color;\n }\n ",s=e.programCache.acquire(n,a,new Map([["position",0]])),o=new Float32Array(6);Object(w["a"])(r,o,3);const c=new Float32Array(6);return Object(w["a"])(i,c,3),e.useProgram(s),s.setUniform3f("u_highA",o[0],o[2],o[4]),s.setUniform3f("u_lowA",o[1],o[3],o[5]),s.setUniform3f("u_highB",c[0],c[2],c[4]),s.setUniform3f("u_lowB",c[1],c[3],c[5]),s}const n=s["a"].createVertex(e,u["D"].STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1])),a=new p["a"](e,new Map([["position",0]]),{geometry:[new x["a"]("position",2,u["k"].UNSIGNED_SHORT,0,4)]},{geometry:n}),c=Object(j["h"])(5633261.287538229,2626832.878767164,1434988.0495278358),l=Object(j["h"])(5633271.46742708,2626873.6381334523,1434963.231608387),d=i(c,l),h=e.getBoundFramebufferObject(),{x:f,y:b,width:m,height:g}=e.getViewport();e.bindFramebuffer(r),e.setViewport(0,0,1,1),e.bindVAO(a),e.drawArrays(u["r"].TRIANGLE_STRIP,0,4);const y=new Uint8Array(4);r.readPixels(0,0,1,1,u["p"].RGBA,u["q"].UNSIGNED_BYTE,y),d.dispose(),a.dispose(!1),n.dispose(),r.dispose(),e.setViewport(f,b,m,g),e.bindFramebuffer(h);const O=(c[2]-l[2])/25,v=Object(_["b"])(y);return Math.abs(O-v)}var S,E,A,C=r("7438"),R={exports:{}};function M(e){var t,r,i,n,a;if(!e.gl)return!1;if(e.type===l["a"].WEBGL1)return!(null==(n=e.capabilities.textureFloat)||!n.textureFloat||null==(a=e.capabilities.colorBufferFloat)||!a.textureFloat);if(!((null==(t=e.capabilities.textureFloat)?void 0:t.textureFloat)&&(null==(r=e.capabilities.colorBufferFloat)?void 0:r.textureFloat)&&(null==(i=e.capabilities.colorBufferFloat)?void 0:i.floatBlend)))return!1;const c=new o["a"](e,{colorTarget:u["y"].TEXTURE,depthStencilTarget:u["m"].NONE},{target:u["A"].TEXTURE_2D,wrapMode:u["B"].CLAMP_TO_EDGE,pixelFormat:u["p"].RGBA,dataType:u["q"].FLOAT,internalFormat:u["v"].RGBA32F,samplingMode:u["z"].NEAREST,width:1,height:1}),d=s["a"].createVertex(e,u["D"].STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1])),h=new p["a"](e,new Map([["a_pos",0]]),{geometry:[new x["a"]("a_pos",2,u["k"].UNSIGNED_SHORT,0,4)]},{geometry:d}),f="\n precision highp float;\n attribute vec2 a_pos;\n\n void main() {\n gl_Position = vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n }\n ",b="\n precision highp float;\n\n void main() {\n gl_FragColor = vec4(0.5, 0.5, 0.5, 0.5);\n }\n ",m=e.programCache.acquire(f,b,new Map([["a_pos",0]]));e.useProgram(m);const g=e.getBoundFramebufferObject(),{x:y,y:v,width:_,height:j}=e.getViewport();e.bindFramebuffer(c),e.setViewport(0,0,1,1),e.bindVAO(h),e.drawArrays(u["r"].TRIANGLE_STRIP,0,4);const w=Object(O["g"])({blending:C["c"]});e.setPipelineState(w),e.drawArrays(u["r"].TRIANGLE_STRIP,0,4),R.exports.init(e);const T=e.gl.getError();return e.setViewport(y,v,_,j),e.bindFramebuffer(g),m.dispose(),h.dispose(!1),d.dispose(),c.dispose(),1282!==T||(console.warn("Device claims support for WebGL extension EXT_float_blend but does not support it. Using fall back."),!1)}S=R,E=function(){var e=function(e){window.console&&window.console.log&&window.console.log(e)},t=function(t){window.console&&window.console.error?window.console.error(t):e(t)},r={enable:{1:{0:!0}},disable:{1:{0:!0}},getParameter:{1:{0:!0}},drawArrays:{3:{0:!0}},drawElements:{4:{0:!0,2:!0}},createShader:{1:{0:!0}},getShaderParameter:{2:{1:!0}},getProgramParameter:{2:{1:!0}},getShaderPrecisionFormat:{2:{0:!0,1:!0}},getVertexAttrib:{2:{1:!0}},vertexAttribPointer:{6:{2:!0}},bindTexture:{2:{0:!0}},activeTexture:{1:{0:!0}},getTexParameter:{2:{0:!0,1:!0}},texParameterf:{3:{0:!0,1:!0}},texParameteri:{3:{0:!0,1:!0,2:!0}},texImage2D:{9:{0:!0,2:!0,6:!0,7:!0},6:{0:!0,2:!0,3:!0,4:!0}},texSubImage2D:{9:{0:!0,6:!0,7:!0},7:{0:!0,4:!0,5:!0}},copyTexImage2D:{8:{0:!0,2:!0}},copyTexSubImage2D:{8:{0:!0}},generateMipmap:{1:{0:!0}},compressedTexImage2D:{7:{0:!0,2:!0}},compressedTexSubImage2D:{8:{0:!0,6:!0}},bindBuffer:{2:{0:!0}},bufferData:{3:{0:!0,2:!0}},bufferSubData:{3:{0:!0}},getBufferParameter:{2:{0:!0,1:!0}},pixelStorei:{2:{0:!0,1:!0}},readPixels:{7:{4:!0,5:!0}},bindRenderbuffer:{2:{0:!0}},bindFramebuffer:{2:{0:!0}},checkFramebufferStatus:{1:{0:!0}},framebufferRenderbuffer:{4:{0:!0,1:!0,2:!0}},framebufferTexture2D:{5:{0:!0,1:!0,2:!0}},getFramebufferAttachmentParameter:{3:{0:!0,1:!0,2:!0}},getRenderbufferParameter:{2:{0:!0,1:!0}},renderbufferStorage:{4:{0:!0,1:!0}},clear:{1:{0:{enumBitwiseOr:["COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT"]}}},depthFunc:{1:{0:!0}},blendFunc:{2:{0:!0,1:!0}},blendFuncSeparate:{4:{0:!0,1:!0,2:!0,3:!0}},blendEquation:{1:{0:!0}},blendEquationSeparate:{2:{0:!0,1:!0}},stencilFunc:{3:{0:!0}},stencilFuncSeparate:{4:{0:!0,1:!0}},stencilMaskSeparate:{2:{0:!0}},stencilOp:{3:{0:!0,1:!0,2:!0}},stencilOpSeparate:{4:{0:!0,1:!0,2:!0,3:!0}},cullFace:{1:{0:!0}},frontFace:{1:{0:!0}},drawArraysInstancedANGLE:{4:{0:!0}},drawElementsInstancedANGLE:{5:{0:!0,2:!0}},blendEquationEXT:{1:{0:!0}}},i=null,n=null;function a(e){if(null==i)for(var t in i={},n={},e)"number"==typeof e[t]&&(i[e[t]]=t,n[t]=e[t])}function s(){if(null==i)throw"WebGLDebugUtils.init(ctx) not called"}function o(e){return s(),void 0!==i[e]}function c(e){s();var t=i[e];return void 0!==t?"gl."+t:"/*UNKNOWN WebGL ENUM*/ 0x"+e.toString(16)}function l(e,t,i,a){var s;if(void 0!==(s=r[e])&&void 0!==(s=s[t])&&s[i]){if("object"==typeof s[i]&&void 0!==s[i].enumBitwiseOr){for(var o=s[i].enumBitwiseOr,l=0,u=[],d=0;d<o.length;++d){var h=n[o[d]];0!=(a&h)&&(l|=h,u.push(c(h)))}return l===a?u.join(" | "):c(a)}return c(a)}return null===a?"null":void 0===a?"undefined":a.toString()}function u(e,t){for(var r="",i=t.length,n=0;n<i;++n)r+=(0==n?"":", ")+l(e,i,n,t[n]);return r}function d(e,t,r){e.__defineGetter__(r,(function(){return t[r]})),e.__defineSetter__(r,(function(e){t[r]=e}))}function h(e,r,i,n){n=n||e,a(e),r=r||function(e,r,i){for(var n="",a=i.length,s=0;s<a;++s)n+=(0==s?"":", ")+l(r,a,s,i[s]);t("WebGL error "+c(e)+" in "+r+"("+n+")")};var s={};function o(e,t){return function(){i&&i(t,arguments);var a=e[t].apply(e,arguments),o=n.getError();return 0!=o&&(s[o]=!0,r(o,t,arguments)),a}}var u={};for(var p in e)if("function"==typeof e[p])if("getExtension"!=p)u[p]=o(e,p);else{var f=o(e,p);u[p]=function(){return h(f.apply(e,arguments),r,i,n)}}else d(u,e,p);return u.getError=function(){for(var t in s)if(s.hasOwnProperty(t)&&s[t])return s[t]=!1,t;return e.NO_ERROR},u}function p(e){var t=e.getParameter(e.MAX_VERTEX_ATTRIBS),r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r);for(var i=0;i<t;++i)e.disableVertexAttribArray(i),e.vertexAttribPointer(i,4,e.FLOAT,!1,0,0),e.vertexAttrib1f(i,0);e.deleteBuffer(r);var n=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);for(i=0;i<n;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_CUBE_MAP,null),e.bindTexture(e.TEXTURE_2D,null);for(e.activeTexture(e.TEXTURE0),e.useProgram(null),e.bindBuffer(e.ARRAY_BUFFER,null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.DITHER),e.disable(e.SCISSOR_TEST),e.blendColor(0,0,0,0),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.clearColor(0,0,0,0),e.clearDepth(1),e.clearStencil(-1),e.colorMask(!0,!0,!0,!0),e.cullFace(e.BACK),e.depthFunc(e.LESS),e.depthMask(!0),e.depthRange(0,1),e.frontFace(e.CCW),e.hint(e.GENERATE_MIPMAP_HINT,e.DONT_CARE),e.lineWidth(1),e.pixelStorei(e.PACK_ALIGNMENT,4),e.pixelStorei(e.UNPACK_ALIGNMENT,4),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.UNPACK_COLORSPACE_CONVERSION_WEBGL&&e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),e.polygonOffset(0,0),e.sampleCoverage(1,!1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilMask(4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.viewport(0,0,e.canvas.width,e.canvas.height),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT);e.getError(););}function f(e){var t,r,i=[],n=[],a={},s=1,o=!1,c=[],l=0,u=0,h=!1,f=0,b={};function m(e){return"function"==typeof e?e:function(t){e.handleEvent(t)}}e.getContext=(r=e.getContext,function(){var i=r.apply(e,arguments);if(i instanceof WebGLRenderingContext){if(i!=t){if(t)throw"got different context";a=T(t=i)}return a}return i});var g=function(e){i.push(m(e))},y=function(e){n.push(m(e))};function O(e){var t=e.addEventListener;e.addEventListener=function(r,i,n){switch(r){case"webglcontextlost":g(i);break;case"webglcontextrestored":y(i);break;default:t.apply(e,arguments)}}}function v(){for(var e=Object.keys(b),t=0;t<e.length;++t)delete b[e]}function _(){++u,o||l==u&&e.loseContext()}function j(e,t){var r=e[t];return function(){if(_(),!o)return r.apply(e,arguments)}}function w(){for(var e=0;e<c.length;++e){var r=c[e];r instanceof WebGLBuffer?t.deleteBuffer(r):r instanceof WebGLFramebuffer?t.deleteFramebuffer(r):r instanceof WebGLProgram?t.deleteProgram(r):r instanceof WebGLRenderbuffer?t.deleteRenderbuffer(r):r instanceof WebGLShader?t.deleteShader(r):r instanceof WebGLTexture&&t.deleteTexture(r)}}function x(e){return{statusMessage:e,preventDefault:function(){h=!0}}}return O(e),e.loseContext=function(){if(!o){for(o=!0,l=0,++s;t.getError(););v(),b[t.CONTEXT_LOST_WEBGL]=!0;var r=x("context lost"),n=i.slice();setTimeout((function(){for(var t=0;t<n.length;++t)n[t](r);f>=0&&setTimeout((function(){e.restoreContext()}),f)}),0)}},e.restoreContext=function(){o&&n.length&&setTimeout((function(){if(!h)throw"can not restore. webglcontestlost listener did not call event.preventDefault";w(),p(t),o=!1,u=0,h=!1;for(var e=n.slice(),r=x("context restored"),i=0;i<e.length;++i)e[i](r)}),0)},e.loseContextInNCalls=function(e){if(o)throw"You can not ask a lost contet to be lost";l=u+e},e.getNumCalls=function(){return u},e.setRestoreTimeout=function(e){f=e},e;function T(e){for(var r in e)"function"==typeof e[r]?a[r]=j(e,r):d(a,e,r);a.getError=function(){if(_(),!o)for(;e=t.getError();)b[e]=!0;for(var e in b)if(b[e])return delete b[e],e;return a.NO_ERROR};for(var i=["createBuffer","createFramebuffer","createProgram","createRenderbuffer","createShader","createTexture"],n=0;n<i.length;++n){var l=i[n];a[l]=function(t){return function(){if(_(),o)return null;var r=t.apply(e,arguments);return r.__webglDebugContextLostId__=s,c.push(r),r}}(e[l])}var u=["getActiveAttrib","getActiveUniform","getBufferParameter","getContextAttributes","getAttachedShaders","getFramebufferAttachmentParameter","getParameter","getProgramParameter","getProgramInfoLog","getRenderbufferParameter","getShaderParameter","getShaderInfoLog","getShaderSource","getTexParameter","getUniform","getUniformLocation","getVertexAttrib"];for(n=0;n<u.length;++n)l=u[n],a[l]=function(t){return function(){return _(),o?null:t.apply(e,arguments)}}(a[l]);var h=["isBuffer","isEnabled","isFramebuffer","isProgram","isRenderbuffer","isShader","isTexture"];for(n=0;n<h.length;++n)l=h[n],a[l]=function(t){return function(){return _(),!o&&t.apply(e,arguments)}}(a[l]);return a.checkFramebufferStatus=function(t){return function(){return _(),o?a.FRAMEBUFFER_UNSUPPORTED:t.apply(e,arguments)}}(a.checkFramebufferStatus),a.getAttribLocation=function(t){return function(){return _(),o?-1:t.apply(e,arguments)}}(a.getAttribLocation),a.getVertexAttribOffset=function(t){return function(){return _(),o?0:t.apply(e,arguments)}}(a.getVertexAttribOffset),a.isContextLost=function(){return o},a}}return{init:a,mightBeEnum:o,glEnumToString:c,glFunctionArgToString:l,glFunctionArgsToString:u,makeDebugContext:h,makeLostContextSimulatingCanvas:f,resetToInitialState:p}},void 0!==(A=E())&&(S.exports=A);var P=r("e92d");const I=P["a"].getLogger("esri.views.WebGLDriverTest");function D(e){const t=new o["a"](e,{colorTarget:u["y"].TEXTURE,depthStencilTarget:u["m"].NONE},{target:u["A"].TEXTURE_2D,wrapMode:u["B"].CLAMP_TO_EDGE,pixelFormat:u["p"].RGBA,dataType:u["q"].UNSIGNED_BYTE,samplingMode:u["z"].NEAREST,width:1,height:1}),r="\nprecision highp float;\nattribute vec2 a_pos;\nuniform highp sampler2D u_texture;\nvarying vec4 v_color;\n\nfloat getBit(in float bitset, in int bitIndex) {\n float offset = pow(2.0, float(bitIndex));\n return mod(floor(bitset / offset), 2.0);\n}\n\nvoid main() {\n vec4 value = texture2D(u_texture, vec2(0.0));\n float bit = getBit(value.x * 255.0, 1);\n\n v_color = bit * vec4(1.0);\n gl_Position = vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n}\n",i="\nprecision highp float;\nvarying vec4 v_color;\n\nvoid main() {\n gl_FragColor = v_color;\n}\n",n=new Uint8Array(4),a=s["a"].createVertex(e,u["D"].STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1])),c=new p["a"](e,new Map([["a_position",0]]),{geometry:[new x["a"]("a_position",2,u["k"].SHORT,0,4)]},{geometry:a}),l=e.programCache.acquire(r,i,new Map([["a_pos",0]]));e.useProgram(l);const d=new h["a"](e,{target:u["A"].TEXTURE_2D,wrapMode:u["B"].CLAMP_TO_EDGE,pixelFormat:u["p"].RGBA,dataType:u["q"].UNSIGNED_BYTE,samplingMode:u["z"].NEAREST,width:1,height:1},new Uint8Array([2,255,0,0]));l.setUniform1i("u_texture",0),e.bindTexture(d,0);const f=e.getBoundFramebufferObject();e.bindFramebuffer(t),e.useProgram(l);const{x:b,y:m,width:g,height:y}=e.getViewport();e.setViewport(0,0,1,1),e.bindVAO(c),e.drawArrays(u["r"].TRIANGLE_STRIP,0,4),e.setViewport(b,m,g,y),t.readPixels(0,0,1,1,u["p"].RGBA,u["q"].UNSIGNED_BYTE,n),l.dispose(),c.dispose(!1),a.dispose(),t.dispose();const O=255!==n[0]||255!==n[1]||255!==n[2]||255!==n[3];return O&&I.warn(`A problem was detected with your graphics driver. Your driver does not appear to honor sampler precision specifiers, which may result in rendering issues due to numerical instability. We recommend ensuring that your drivers have been updated to the latest version. Applying lowp sampler workaround. [${n[0]}.${n[1]}.${n[2]}.${n[3]}]`),e.bindFramebuffer(f),O}var L=r("2e5c");async function N(e){const t=new Image;if(t.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",t.width=5,t.height=5,await t.decode(),!e.gl)return!0;const r=new o["a"](e,{colorTarget:u["y"].TEXTURE,depthStencilTarget:u["m"].NONE},{target:u["A"].TEXTURE_2D,wrapMode:u["B"].CLAMP_TO_EDGE,pixelFormat:u["p"].RGBA,dataType:u["q"].UNSIGNED_BYTE,samplingMode:u["z"].NEAREST,width:1,height:1}),i=s["a"].createVertex(e,u["D"].STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1])),n=new p["a"](e,new Map([["a_pos",0]]),L["b"],{geometry:i}),a="\n precision highp float;\n\n attribute vec2 a_pos;\n varying vec2 v_uv;\n\n void main() {\n v_uv = a_pos;\n gl_Position = vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n }\n ",c="\n precision highp float;\n\n varying vec2 v_uv;\n uniform sampler2D u_texture;\n\n void main() {\n gl_FragColor = texture2D(u_texture, v_uv);\n }\n ",l=e.programCache.acquire(a,c,new Map([["a_pos",0]]));e.useProgram(l);const d=new h["a"](e,{dataType:u["q"].UNSIGNED_BYTE,pixelFormat:u["p"].RGBA,preMultiplyAlpha:!1,wrapMode:u["B"].CLAMP_TO_EDGE,samplingMode:u["z"].LINEAR},t);e.bindTexture(d,0),l.setUniform1i("u_texture",0);const f=e.getBoundFramebufferObject(),{x:b,y:m,width:g,height:y}=e.getViewport();e.bindFramebuffer(r),e.setViewport(0,0,1,1),e.setClearColor(0,0,0,0),e.setBlendingEnabled(!1),e.clearSafe(u["e"].COLOR_BUFFER_BIT),e.bindVAO(n),e.drawArrays(u["r"].TRIANGLE_STRIP,0,4);const O=new Uint8Array(4);return r.readPixels(0,0,1,1,u["p"].RGBA,u["q"].UNSIGNED_BYTE,O),l.dispose(),n.dispose(!1),i.dispose(),r.dispose(),d.dispose(),e.setViewport(b,m,g,y),e.bindFramebuffer(f),t.src="",255===O[0]}class F{constructor(e){this.context=e,this._floatBufferBlendWorking=M(e),N(e).then(e=>this._svgAlwaysPremultipliesAlpha=!e)}get floatBufferBlendWorking(){if(Object(i["j"])(this._floatBufferBlendWorking))throw new Error("floatBufferBlendWorking test not yet available");return this._floatBufferBlendWorking}get svgAlwaysPremultipliesAlpha(){if(Object(i["j"])(this._svgAlwaysPremultipliesAlpha))throw new Error("svgAlwaysPremultipliesAlpha test not yet available");return this._svgAlwaysPremultipliesAlpha}get doublePrecisionRequiresObfuscation(){if(Object(i["j"])(this._doublePrecisionRequiresObfuscation)){const e=T(this.context,!1),t=T(this.context,!0);this._doublePrecisionRequiresObfuscation=0!==e&&(0===t||e/t>5)}return this._doublePrecisionRequiresObfuscation}get ignoresSamplerPrecision(){return Object(i["j"])(this._ignoresSamplerPrecision)&&(this._ignoresSamplerPrecision=D(this.context)),this._ignoresSamplerPrecision}}var k=r("1a9a"),U=r("c514");function z(e,t){if(t.disjointTimerQuery)return null;if(Object(U["a"])(e))return{drawBuffers:e.drawBuffers.bind(e),MAX_DRAW_BUFFERS:e.MAX_DRAW_BUFFERS,MAX_COLOR_ATTACHMENTS:e.MAX_COLOR_ATTACHMENTS};if(t.drawBuffers)return null;const r=e.getExtension("WEBGL_draw_buffers");return r?{drawBuffers:r.drawBuffersWEBGL.bind(r),MAX_DRAW_BUFFERS:r.MAX_DRAW_BUFFERS_WEBGL,MAX_COLOR_ATTACHMENTS:r.MAX_COLOR_ATTACHMENTS_WEBGL}:null}function B(e){if(Object(U["a"])(e))return{drawArraysInstanced:e.drawArraysInstanced.bind(e),drawElementsInstanced:e.drawElementsInstanced.bind(e),vertexAttribDivisor:e.vertexAttribDivisor.bind(e)};const t=e.getExtension("ANGLE_instanced_arrays");return t?{drawArraysInstanced:t.drawArraysInstancedANGLE.bind(t),drawElementsInstanced:t.drawElementsInstancedANGLE.bind(t),vertexAttribDivisor:t.vertexAttribDivisorANGLE.bind(t)}:null}function V(e,t){if(t.compressedTextureETC)return null;const r=e.getExtension("WEBGL_compressed_texture_etc");return r?{COMPRESSED_R11_EAC:r.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:r.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:r.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:r.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:r.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:r.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}function G(e,t){if(t.compressedTextureS3TC)return null;const r=e.getExtension("WEBGL_compressed_texture_s3tc");return r?{COMPRESSED_RGB_S3TC_DXT1:r.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:r.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:r.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:r.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}function H(e,t){if(Object(U["a"])(e))return{MIN:e.MIN,MAX:e.MAX};if(t.blendMinMax)return null;{const t=e.getExtension("EXT_blend_minmax");return t?{MIN:t.MIN_EXT,MAX:t.MAX_EXT}:null}}function q(e,t){if(t.textureFilterAnisotropic)return null;const r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return r?{MAX_TEXTURE_MAX_ANISOTROPY:r.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:r.TEXTURE_MAX_ANISOTROPY_EXT}:null}function W(e,t){if(Object(U["a"])(e))return{textureFloat:!0,textureFloatLinear:!t.textureFloatLinear&&!!e.getExtension("OES_texture_float_linear"),textureHalfFloat:!0,textureHalfFloatLinear:!t.textureHalfFloatLinear&&!!e.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:e.HALF_FLOAT,R16F:e.R16F,RG16F:e.RG16F,RGBA16F:e.RGBA16F,R32F:e.R32F,RG32F:e.RG32F,RGBA32F:e.RGBA32F,R11F_G11F_B10F:e.R11F_G11F_B10F,RGB16F:e.RGB16F};if(e instanceof WebGLRenderingContext){const r=!t.textureHalfFloat&&e.getExtension("OES_texture_half_float");return{textureFloat:!t.textureFloat&&!!e.getExtension("OES_texture_float"),textureFloatLinear:!t.textureFloatLinear&&!!e.getExtension("OES_texture_float_linear"),textureHalfFloat:!!r,textureHalfFloatLinear:!t.textureHalfFloatLinear&&!!e.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:r?r.HALF_FLOAT_OES:void 0}}return null}function $(e,t){if(Object(U["a"])(e)){const r=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_half_float"),i=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_float"),n=!t.floatBlend&&!t.colorBufferFloat&&e.getExtension("EXT_float_blend");return r||i||n?{textureFloat:!!i,textureHalfFloat:!!r,floatBlend:!!n,R16F:e.R16F,RG16F:e.RG16F,RGBA16F:e.RGBA16F,R32F:e.R32F,RG32F:e.RG32F,RGBA32F:e.RGBA32F,R11F_G11F_B10F:e.R11F_G11F_B10F,RGB16F:e.RGB16F}:null}if(e instanceof WebGLRenderingContext){const r=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_half_float"),i=!t.colorBufferFloat&&e.getExtension("WEBGL_color_buffer_float"),n=!t.floatBlend&&!t.colorBufferFloat&&e.getExtension("EXT_float_blend");return r||i||n?{textureFloat:!!i,textureHalfFloat:!!r,floatBlend:!!n,RGBA16F:r?r.RGBA16F_EXT:void 0,RGB16F:r?r.RGB16F_EXT:void 0,RGBA32F:i?i.RGBA32F_EXT:void 0}:null}return null}function Z(e,t,r,i,n){if(i&&Object(U["a"])(e))return!0;if(t[r])return!1;for(const a of n)if(e.getExtension(a))return!0;return!1}function X(e,t){if(!Object(U["a"])(e))return null;if(t.textureNorm16)return null;const r=e.getExtension("EXT_texture_norm16");return r?{R16:r.R16_EXT,RG16:r.RG16_EXT,RGB16:r.RGB16_EXT,RGBA16:r.RGBA16_EXT,R16_SNORM:r.R16_SNORM_EXT,RG16_SNORM:r.RG16_SNORM_EXT,RGB16_SNORM:r.RGB16_SNORM_EXT,RGBA16_SNORM:r.RGBA16_SNORM_EXT}:null}function Y(e,t){const r=t.loseContext&&e.getExtension("WEBGL_lose_context");return r?{loseRenderingContext:()=>r.loseContext()}:null}function J(e,t){if(Object(U["a"])(e))return{createVertexArray:e.createVertexArray.bind(e),deleteVertexArray:e.deleteVertexArray.bind(e),bindVertexArray:e.bindVertexArray.bind(e)};if(t.vao)return null;const r=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object");return r?{createVertexArray:r.createVertexArrayOES.bind(r),deleteVertexArray:r.deleteVertexArrayOES.bind(r),bindVertexArray:r.bindVertexArrayOES.bind(r)}:null}class Q{constructor(e,t){this.gl=e,this._depthTexture=null,this._standardDerivatives=null,this._shaderTextureLOD=null,this._fragDepth=null,this._disabledExtensions=t.disabledExtensions||{},this._debugWebGLExtensions=t.debugWebGLExtensions||{}}get drawBuffers(){return this._drawBuffers||(this._drawBuffers=z(this.gl,this._disabledExtensions)),this._drawBuffers}get instancing(){return this._instancing||(this._instancing=B(this.gl)),this._instancing}get vao(){return this._vertexArrayObject||(this._vertexArrayObject=J(this.gl,this._disabledExtensions)),this._vertexArrayObject}get compressedTextureETC(){return this._compressedTextureETC||(this._compressedTextureETC=V(this.gl,this._disabledExtensions)),this._compressedTextureETC}get compressedTextureS3TC(){return this._compressedTextureS3TC||(this._compressedTextureS3TC=G(this.gl,this._disabledExtensions)),this._compressedTextureS3TC}get textureFilterAnisotropic(){return this._textureFilterAnisotropic||(this._textureFilterAnisotropic=q(this.gl,this._disabledExtensions)),this._textureFilterAnisotropic}get disjointTimerQuery(){return this._disjointTimerQuery||(this._disjointTimerQuery=Object(k["a"])(this.gl,this._disabledExtensions)),this._disjointTimerQuery}get textureFloat(){return this._textureFloat||(this._textureFloat=W(this.gl,this._disabledExtensions)),this._textureFloat}get colorBufferFloat(){return this._colorBufferFloat||(this._colorBufferFloat=$(this.gl,this._disabledExtensions)),this._colorBufferFloat}get blendMinMax(){return this._minMaxBlending||(this._minMaxBlending=H(this.gl,this._disabledExtensions)),this._minMaxBlending}get depthTexture(){return null===this._depthTexture&&(this._depthTexture=Z(this.gl,this._disabledExtensions,"depthTexture",!0,["WEBGL_depth_texture","MOZ_WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"])),this._depthTexture}get standardDerivatives(){return null===this._standardDerivatives&&(this._standardDerivatives=Z(this.gl,this._disabledExtensions,"standardDerivatives",!0,["OES_standard_derivatives"])),this._standardDerivatives}get shaderTextureLOD(){return null===this._shaderTextureLOD&&(this._shaderTextureLOD=Z(this.gl,this._disabledExtensions,"shaderTextureLOD",!0,["EXT_shader_texture_lod"])),this._shaderTextureLOD}get fragDepth(){return null===this._fragDepth&&(this._fragDepth=Z(this.gl,this._disabledExtensions,"fragDepth",!0,["EXT_frag_depth"])),this._fragDepth}get loseContext(){return this._loseContext||(this._loseContext=Y(this.gl,this._debugWebGLExtensions)),this._loseContext}get textureNorm16(){return this._textureNorm16||(this._textureNorm16=X(this.gl,this._disabledExtensions)),this._textureNorm16}enable(e){return this[e]}}class K{constructor(e,t){this.gl=e,this.instanceCounter=new y,this.programCache=new d["a"](this),this._state=new f,this._numOfDrawCalls=0,this._numOfTriangles=0,this.type=Object(U["a"])(e)?l["a"].WEBGL2:l["a"].WEBGL1,this._loadExtensions(),this.configure(t)}configure(e){this._capabilities=new Q(this.gl,e),this._parameters=this._loadParameters(e);const t=this.gl.getParameter(this.gl.VIEWPORT);this._state=new f,this._state.viewport={x:t[0],y:t[1],width:t[2],height:t[3]},this._stateTracker=new O["a"]({setBlending:e=>{if(e){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(e.opRgb,e.opAlpha),this.setBlendFunctionSeparate(e.srcRgb,e.dstRgb,e.srcAlpha,e.dstAlpha);const t=e.color;this.setBlendColor(t.r,t.g,t.b,t.a)}else this.setBlendingEnabled(!1)},setCulling:e=>{e?(this.setFaceCullingEnabled(!0),this.setCullFace(e.face),this.setFrontFace(e.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:e=>{e?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(e.factor,e.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:e=>{e?(this.setDepthTestEnabled(!0),this.setDepthFunction(e.func)):this.setDepthTestEnabled(!1)},setStencilTest:e=>{if(e){this.setStencilTestEnabled(!0);const t=e.function;this.setStencilFunction(t.func,t.ref,t.mask);const r=e.operation;this.setStencilOp(r.fail,r.zFail,r.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:e=>{e?(this.setDepthWriteEnabled(!0),this.setDepthRange(e.zNear,e.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:e=>{e?this.setColorMask(e.r,e.g,e.b,e.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:e=>{e?this.setStencilWriteMask(e.mask):this.setStencilWriteMask(0)}}),this.enforceState(),this._driverTest=new F(this)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}dispose(){this.programCache.dispose(),this.bindVAO(null),this.unbindBuffer(u["d"].ARRAY_BUFFER),this.unbindBuffer(u["d"].ELEMENT_ARRAY_BUFFER),Object(U["a"])(this.gl)&&(this.unbindBuffer(u["d"].UNIFORM_BUFFER),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(u["d"].PIXEL_PACK_BUFFER),this.unbindBuffer(u["d"].PIXEL_UNPACK_BUFFER),this.unbindBuffer(u["d"].COPY_READ_BUFFER),this.unbindBuffer(u["d"].COPY_WRITE_BUFFER)),this._state.textureUnitMap.length=0,Object(c["b"])()&&this.instanceCounter.printResourceCount()}setPipelineState(e){this._stateTracker.setPipeline(e)}setBlendingEnabled(e){this._state.blend!==e&&(!0===e?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=e,this._stateTracker.invalidateBlending())}externalProgramUpdate(){var e;null==(e=this._state.program)||e.stop(),this._state.program=null}externalTextureUnitUpdate(e,t){for(let r=0;r<e.length;++r)this._state.textureUnitMap[e[r]]=null;t>=0&&(this._state.activeTexture=t)}externalVertexArrayObjectUpdate(){const e=this.capabilities.vao;e&&(e.bindVertexArray(null),this._state.vertexArrayObject=null),this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(e,t,r,i){e===this._state.blendColor.r&&t===this._state.blendColor.g&&r===this._state.blendColor.b&&i===this._state.blendColor.a||(this.gl.blendColor(e,t,r,i),this._state.blendColor.r=e,this._state.blendColor.g=t,this._state.blendColor.b=r,this._state.blendColor.a=i,this._stateTracker.invalidateBlending())}setBlendFunction(e,t){e===this._state.blendFunction.srcRGB&&t===this._state.blendFunction.dstRGB||(this.gl.blendFunc(e,t),this._state.blendFunction.srcRGB=e,this._state.blendFunction.srcAlpha=e,this._state.blendFunction.dstRGB=t,this._state.blendFunction.dstAlpha=t,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(e,t,r,i){this._state.blendFunction.srcRGB===e&&this._state.blendFunction.srcAlpha===r&&this._state.blendFunction.dstRGB===t&&this._state.blendFunction.dstAlpha===i||(this.gl.blendFuncSeparate(e,t,r,i),this._state.blendFunction.srcRGB=e,this._state.blendFunction.srcAlpha=r,this._state.blendFunction.dstRGB=t,this._state.blendFunction.dstAlpha=i,this._stateTracker.invalidateBlending())}setBlendEquation(e){this._state.blendEquation.mode!==e&&(this.gl.blendEquation(e),this._state.blendEquation.mode=e,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(e,t){this._state.blendEquation.mode===e&&this._state.blendEquation.modeAlpha===t||(this.gl.blendEquationSeparate(e,t),this._state.blendEquation.mode=e,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setColorMask(e,t,r,i){this._state.colorMask.r===e&&this._state.colorMask.g===t&&this._state.colorMask.b===r&&this._state.colorMask.a===i||(this.gl.colorMask(e,t,r,i),this._state.colorMask.r=e,this._state.colorMask.g=t,this._state.colorMask.b=r,this._state.colorMask.a=i,this._stateTracker.invalidateColorWrite())}setClearColor(e,t,r,i){this._state.clearColor.r===e&&this._state.clearColor.g===t&&this._state.clearColor.b===r&&this._state.clearColor.a===i||(this.gl.clearColor(e,t,r,i),this._state.clearColor.r=e,this._state.clearColor.g=t,this._state.clearColor.b=r,this._state.clearColor.a=i)}setFaceCullingEnabled(e){this._state.faceCulling!==e&&(!0===e?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=e,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(e){this._state.polygonOffsetFill!==e&&(!0===e?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=e,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(e,t){this._state.polygonOffset[0]===e&&this._state.polygonOffset[1]===t||(this._state.polygonOffset[0]=e,this._state.polygonOffset[1]=t,this.gl.polygonOffset(e,t),this._stateTracker.invalidatePolygonOffset())}setCullFace(e){this._state.cullFace!==e&&(this.gl.cullFace(e),this._state.cullFace=e,this._stateTracker.invalidateCulling())}setFrontFace(e){this._state.frontFace!==e&&(this.gl.frontFace(e),this._state.frontFace=e,this._stateTracker.invalidateCulling())}setScissorTestEnabled(e){this._state.scissorTest!==e&&(!0===e?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=e)}setScissorRect(e,t,r,i){this._state.scissorRect.x===e&&this._state.scissorRect.y===t&&this._state.scissorRect.width===r&&this._state.scissorRect.height===i||(this.gl.scissor(e,t,r,i),this._state.scissorRect.x=e,this._state.scissorRect.y=t,this._state.scissorRect.width=r,this._state.scissorRect.height=i)}setDepthTestEnabled(e){this._state.depthTest!==e&&(!0===e?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=e,this._stateTracker.invalidateDepthTest())}setClearDepth(e){this._state.clearDepth!==e&&(this.gl.clearDepth(e),this._state.clearDepth=e)}setDepthFunction(e){this._state.depthFunction!==e&&(this.gl.depthFunc(e),this._state.depthFunction=e,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(e){this._state.depthWrite!==e&&(this.gl.depthMask(e),this._state.depthWrite=e,this._stateTracker.invalidateDepthWrite())}setDepthRange(e,t){this._state.depthRange.zNear===e&&this._state.depthRange.zFar===t||(this.gl.depthRange(e,t),this._state.depthRange.zNear=e,this._state.depthRange.zFar=t,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(e){this._state.stencilTest!==e&&(!0===e?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=e,this._stateTracker.invalidateStencilTest())}setClearStencil(e){e!==this._state.clearStencil&&(this.gl.clearStencil(e),this._state.clearStencil=e)}setStencilFunction(e,t,r){this._state.stencilFunction.func===e&&this._state.stencilFunction.ref===t&&this._state.stencilFunction.mask===r||(this.gl.stencilFunc(e,t,r),this._state.stencilFunction.face=u["n"].FRONT_AND_BACK,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=t,this._state.stencilFunction.mask=r,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(e,t,r,i){this._state.stencilFunction.face===e&&this._state.stencilFunction.func===t&&this._state.stencilFunction.ref===r&&this._state.stencilFunction.mask===i||(this.gl.stencilFuncSeparate(e,t,r,i),this._state.stencilFunction.face=e,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=r,this._state.stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(e){this._state.stencilWriteMask!==e&&(this.gl.stencilMask(e),this._state.stencilWriteMask=e,this._stateTracker.invalidateStencilWrite())}setStencilOp(e,t,r){this._state.stencilOperation.face===u["n"].FRONT_AND_BACK&&this._state.stencilOperation.fail===e&&this._state.stencilOperation.zFail===t&&this._state.stencilOperation.zPass===r||(this.gl.stencilOp(e,t,r),this._state.stencilOperation.face=u["n"].FRONT_AND_BACK,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=t,this._state.stencilOperation.zPass=r,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(e,t,r,i){this._state.stencilOperation.face===e&&this._state.stencilOperation.fail===t&&this._state.stencilOperation.zFail===r&&this._state.stencilOperation.zPass===i||(this.gl.stencilOpSeparate(e,t,r,i),this._state.stencilOperation.face=e,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=r,this._state.stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())}setActiveTexture(e,t=!1){const r=this._state.activeTexture;return e>=0&&(t||e!==this._state.activeTexture)&&(this.gl.activeTexture(u["a"]+e),this._state.activeTexture=e),r}clear(e){e&&this.gl.clear(e)}clearSafe(e,t=255){e&&(e&u["e"].COLOR_BUFFER_BIT&&this.setColorMask(!0,!0,!0,!0),e&u["e"].DEPTH_BUFFER_BIT&&this.setDepthWriteEnabled(!0),e&u["e"].STENCIL_BUFFER_BIT&&this.setStencilWriteMask(t),this.gl.clear(e))}drawArrays(e,t,r){if(Object(c["b"])()&&(this._numOfDrawCalls++,this._numOfTriangles+=te(e,r)),this.gl.drawArrays(e,t,r),Object(c["b"])()){const e=Object(v["c"])(this);e&&console.error("drawArrays:",e)}}drawElements(e,t,r,n){if(Object(c["b"])()&&(this._numOfDrawCalls++,this._numOfTriangles+=te(e,t)),this.gl.drawElements(e,t,r,n),Object(c["b"])()){const s=Object(v["c"])(this);if(s){var a;const o=this.getBoundVAO(),c=null==o?void 0:o.indexBuffer,l={indexBuffer:c,vertexBuffers:null==o?void 0:o.vertexBuffers},u={mode:e,count:t,type:r,offset:n},d=null!=(a=Object(i["b"])(c,e=>e.size))?a:0,h=n+t,p=d<h?`. Buffer is too small. Attempted to draw index ${h} of ${d}`:"";console.error(`drawElements: ${s}${p}`,{args:u,vao:l})}}}logIno(){Object(c["b"])()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}get capabilities(){return this._capabilities}setViewport(e,t,r,i){r=Math.max(Math.round(r),1),i=Math.max(Math.round(i),1);const n=this._state.viewport;n.x===e&&n.y===t&&n.width===r&&n.height===i||(n.x=e,n.y=t,n.width=r,n.height=i,this.gl.viewport(e,t,r,i))}getViewport(){return{x:this._state.viewport.x,y:this._state.viewport.y,width:this._state.viewport.width,height:this._state.viewport.height}}useProgram(e){var t,r;this._state.program!==e&&(null==(t=this._state.program)||t.stop(),this._state.program=e,this.gl.useProgram(null!=(r=null==e?void 0:e.glName)?r:null))}bindTexture(e,t,r=!1){(t>=this.parameters.maxTextureImageUnits||t<0)&&console.error("Input texture unit is out of range of available units!");const n=this._state.textureUnitMap[t];return Object(i["j"])(e)||null==e.glName?(Object(i["k"])(n)&&(this.setActiveTexture(t,r),this.gl.bindTexture(n.descriptor.target,null)),this._state.textureUnitMap[t]=null,n):r||n!==e?(this.setActiveTexture(t,r),this.gl.bindTexture(e.descriptor.target,e.glName),e.applyChanges(),this._state.textureUnitMap[t]=e,n):(e.isDirty&&(this.setActiveTexture(t,r),e.applyChanges()),n)}unbindTextureAllUnits(e){for(let t=0;t<this.parameters.maxTextureImageUnits;t++)this._state.textureUnitMap[t]===e&&(this.bindTexture(null,t),this._state.textureUnitMap[t]=null)}bindFramebuffer(e,t=!1){if(t||this._state.readFramebuffer!==e||this._state.drawFramebuffer!==e){if(Object(i["j"])(e))return this.gl.bindFramebuffer(u["o"].FRAMEBUFFER,null),this._state.readFramebuffer=null,void(this._state.drawFramebuffer=null);e.initializeAndBind(u["o"].FRAMEBUFFER),this._state.readFramebuffer=e,this._state.drawFramebuffer=e}}bindFramebufferSeparate(e,t,r=!1){const n=t===u["o"].READ_FRAMEBUFFER,a=n?this._state.readFramebuffer:this._state.drawFramebuffer;(r||a!==e)&&(Object(i["j"])(e)?this.gl.bindFramebuffer(t,null):e.initializeAndBind(t),n?this._state.readFramebuffer=Object(i["u"])(e,null):this._state.drawFramebuffer=Object(i["u"])(e,null))}blitFramebuffer(e,t,r=0,i=0,n=e.width,a=e.height,s=0,o=0,c=t.width,l=t.height,d=u["e"].COLOR_BUFFER_BIT,h=u["z"].NEAREST){this.bindFramebufferSeparate(e,u["o"].READ_FRAMEBUFFER),this.bindFramebufferSeparate(t,u["o"].DRAW_FRAMEBUFFER),this.gl.blitFramebuffer(r,i,n,a,s,o,c,l,d,h)}bindBuffer(e,t){if(e)switch(null!=t||(t=e.bufferType),t){case u["d"].ARRAY_BUFFER:this._state.vertexBuffer=ee(this.gl,e,t,this._state.vertexBuffer);break;case u["d"].ELEMENT_ARRAY_BUFFER:this._state.indexBuffer=ee(this.gl,e,t,this._state.indexBuffer);break;case u["d"].UNIFORM_BUFFER:this._state.uniformBuffer=ee(this.gl,e,t,this._state.uniformBuffer);break;case u["d"].PIXEL_PACK_BUFFER:this._state.pixelPackBuffer=ee(this.gl,e,t,this._state.pixelPackBuffer);break;case u["d"].PIXEL_UNPACK_BUFFER:this._state.pixelUnpackBuffer=ee(this.gl,e,t,this._state.pixelUnpackBuffer);break;case u["d"].COPY_READ_BUFFER:this._state.copyReadBuffer=ee(this.gl,e,t,this._state.copyReadBuffer);break;case u["d"].COPY_WRITE_BUFFER:this._state.copyWriteBuffer=ee(this.gl,e,t,this._state.copyWriteBuffer)}}bindRenderbuffer(e){const t=this.gl;e||(t.bindRenderbuffer(t.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==e&&(t.bindRenderbuffer(t.RENDERBUFFER,e.glName),this._state.renderbuffer=e)}_getBufferBinding(e,t){if(t>=this.parameters.maxUniformBufferBindings||t<0)return console.error("Uniform buffer binding point is out of range!"),null;const r=this._state.uniformBufferBindingPoints;let n=r[t];return Object(i["j"])(n)&&(n={buffer:null,offset:0,size:0},r[t]=n),n}bindBufferBase(e,t,r){const n=this._getBufferBinding(e,t);Object(i["j"])(n)||n.buffer===r&&0===n.offset&&0===n.size||(this.gl.bindBufferBase(e,t,r?r.glName:null),n.buffer=r,n.offset=0,n.size=0)}bindBufferRange(e,t,r,n,a){const s=this._getBufferBinding(e,t);Object(i["j"])(s)||s.buffer===r&&s.offset===n&&s.size===a||(n%this._parameters.uniformBufferOffsetAlignment==0?(this.gl.bindBufferRange(e,t,r.glName,n,a),s.buffer=r,s.offset=n,s.size=a):console.error("Uniform buffer binding offset is not a multiple of the context offset alignment"))}bindUBO(e,t,r,n){Object(i["j"])(t)?this.bindBufferBase(u["d"].UNIFORM_BUFFER,e,null):(Object(c["b"])()&&(null!=n?n:t.byteLength)>this._parameters.maxUniformBlockSize&&console.error("Attempting to bind more data than the maximum uniform block size"),t.initialize(),void 0!==r&&void 0!==n?this.bindBufferRange(u["d"].UNIFORM_BUFFER,e,t.buffer,r,n):this.bindBufferBase(u["d"].UNIFORM_BUFFER,e,t.buffer))}unbindUBO(e){for(let t=0,r=this._state.uniformBufferBindingPoints.length;t<r;t++){const r=this._state.uniformBufferBindingPoints[t];Object(i["k"])(r)&&r.buffer===e.buffer&&this.bindBufferBase(u["d"].UNIFORM_BUFFER,t,null)}}unbindBuffer(e){switch(e){case u["d"].ARRAY_BUFFER:this._state.vertexBuffer=ee(this.gl,null,e,this._state.vertexBuffer);break;case u["d"].ELEMENT_ARRAY_BUFFER:this._state.indexBuffer=ee(this.gl,null,e,this._state.indexBuffer);break;case u["d"].UNIFORM_BUFFER:this._state.uniformBuffer=ee(this.gl,null,e,this._state.uniformBuffer);break;case u["d"].PIXEL_PACK_BUFFER:this._state.pixelPackBuffer=ee(this.gl,null,e,this._state.pixelPackBuffer);break;case u["d"].PIXEL_UNPACK_BUFFER:this._state.pixelUnpackBuffer=ee(this.gl,null,e,this._state.pixelUnpackBuffer);break;case u["d"].COPY_READ_BUFFER:this._state.copyReadBuffer=ee(this.gl,null,e,this._state.copyReadBuffer);break;case u["d"].COPY_WRITE_BUFFER:this._state.copyWriteBuffer=ee(this.gl,null,e,this._state.copyWriteBuffer)}}bindVAO(e=null){Object(i["j"])(e)?this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null):this._state.vertexArrayObject!==e&&(e.bind(),this._state.vertexArrayObject=e)}async clientWaitAsync(e=Object(a["a"])(10)){const t={};this.instanceCounter.increment(u["t"].Sync,t);const r=this.gl,i=r.fenceSync(u["x"].SYNC_GPU_COMMANDS_COMPLETE,0);let s;r.flush();do{await Object(n["a"])(e),s=r.clientWaitSync(i,0,0)}while(s===u["f"].TIMEOUT_EXPIRED);if(r.deleteSync(i),this.instanceCounter.decrement(u["t"].Sync,t),s===u["f"].WAIT_FAILED)throw new Error("Client wait failed")}getBoundFramebufferObject(e=u["o"].FRAMEBUFFER){return e===u["o"].READ_FRAMEBUFFER?this._state.readFramebuffer:this._state.drawFramebuffer}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(u["d"].ARRAY_BUFFER),this.unbindBuffer(u["d"].ELEMENT_ARRAY_BUFFER),Object(U["a"])(this.gl)&&(this.unbindBuffer(u["d"].UNIFORM_BUFFER),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(u["d"].PIXEL_PACK_BUFFER),this.unbindBuffer(u["d"].PIXEL_UNPACK_BUFFER),this.unbindBuffer(u["d"].COPY_READ_BUFFER),this.unbindBuffer(u["d"].COPY_WRITE_BUFFER));for(let e=0;e<this.parameters.maxTextureImageUnits;++e)this.bindTexture(null,e);this.setBlendingEnabled(!1),this.setBlendFunction(u["b"].ONE,u["b"].ZERO),this.setBlendEquation(u["c"].ADD),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(u["n"].BACK),this.setFrontFace(u["j"].CCW),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(u["h"].LESS),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(u["h"].ALWAYS,0,0),this.setStencilOp(u["w"].KEEP,u["w"].KEEP,u["w"].KEEP),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){var e,t;const r=this.gl,n=this.capabilities.vao;n&&n.bindVertexArray(null);for(let i=0;i<this.parameters.maxVertexAttributes;i++)r.disableVertexAttribArray(i);if(this._state.vertexBuffer?r.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):r.bindBuffer(u["d"].ARRAY_BUFFER,null),this._state.indexBuffer?r.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):r.bindBuffer(u["d"].ELEMENT_ARRAY_BUFFER,null),Object(U["a"])(r)){var a,s;this._state.uniformBuffer?r.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):r.bindBuffer(u["d"].UNIFORM_BUFFER,null);for(let e=0;e<this._parameters.maxUniformBufferBindings;e++){const t=this._state.uniformBufferBindingPoints[e];if(Object(i["k"])(t)&&null!==t.buffer){const{buffer:i,offset:n,size:a}=t;0===n&&0===a?r.bindBufferBase(u["d"].UNIFORM_BUFFER,e,i.glName):r.bindBufferRange(u["d"].UNIFORM_BUFFER,e,i.glName,n,a)}else r.bindBufferBase(u["d"].UNIFORM_BUFFER,e,null)}this._state.pixelPackBuffer?r.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):r.bindBuffer(u["d"].PIXEL_PACK_BUFFER,null),this._state.pixelUnpackBuffer?r.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):r.bindBuffer(u["d"].PIXEL_UNPACK_BUFFER,null),this._state.copyReadBuffer?r.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):r.bindBuffer(u["d"].COPY_READ_BUFFER,null),this._state.copyWriteBuffer?r.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):r.bindBuffer(u["d"].COPY_WRITE_BUFFER,null),r.bindFramebuffer(u["o"].READ_FRAMEBUFFER,null),r.readBuffer(r.BACK),this._state.readFramebuffer&&(r.bindFramebuffer(u["o"].READ_FRAMEBUFFER,this._state.readFramebuffer.glName),r.readBuffer(u["g"].COLOR_ATTACHMENT0)),r.bindFramebuffer(u["o"].DRAW_FRAMEBUFFER,null!=(a=null==(s=this._state.drawFramebuffer)?void 0:s.glName)?a:null)}else{var o,l;this._state.readFramebuffer=this._state.drawFramebuffer,r.bindFramebuffer(u["o"].FRAMEBUFFER,null!=(o=null==(l=this._state.drawFramebuffer)?void 0:l.glName)?o:null)}if(n&&this._state.vertexArrayObject){const e=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(e)}r.useProgram(null!=(e=null==(t=this._state.program)?void 0:t.glName)?e:null),r.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),r.bindRenderbuffer(r.RENDERBUFFER,this._state.renderbuffer?this._state.renderbuffer.glName:null),!0===this._state.blend?r.enable(this.gl.BLEND):r.disable(this.gl.BLEND),r.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),r.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),r.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),r.clearDepth(this._state.clearDepth),r.clearStencil(this._state.clearStencil),r.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),r.cullFace(this._state.cullFace),r.depthFunc(this._state.depthFunction),r.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),!0===this._state.depthTest?r.enable(r.DEPTH_TEST):r.disable(r.DEPTH_TEST),r.depthMask(this._state.depthWrite),r.frontFace(this._state.frontFace),r.lineWidth(1),!0===this._state.faceCulling?r.enable(r.CULL_FACE):r.disable(r.CULL_FACE),r.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),!0===this._state.polygonOffsetFill?r.enable(r.POLYGON_OFFSET_FILL):r.disable(r.POLYGON_OFFSET_FILL),r.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),!0===this._state.scissorTest?r.enable(r.SCISSOR_TEST):r.disable(r.SCISSOR_TEST),r.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),r.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),!0===this._state.stencilTest?r.enable(r.STENCIL_TEST):r.disable(r.STENCIL_TEST),r.stencilMask(this._state.stencilWriteMask);for(let c=0;c<this.parameters.maxTextureImageUnits;c++){r.activeTexture(u["a"]+c),r.bindTexture(u["A"].TEXTURE_2D,null),r.bindTexture(u["A"].TEXTURE_CUBE_MAP,null),Object(U["a"])(r)&&(r.bindTexture(u["A"].TEXTURE_3D,null),r.bindTexture(u["A"].TEXTURE_2D_ARRAY,null));const e=this._state.textureUnitMap[c];Object(i["k"])(e)&&r.bindTexture(e.descriptor.target,e.glName)}r.activeTexture(u["a"]+this._state.activeTexture),r.viewport(this._state.viewport.x,this._state.viewport.y,this._state.viewport.width,this._state.viewport.height),Object(c["b"])()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}_loadExtensions(){this.type===l["a"].WEBGL1&&this.gl.getExtension("OES_element_index_uint"),this.gl.getExtension("KHR_parallel_shader_compile")}_loadParameters(e){var t;const r=this.capabilities.textureFilterAnisotropic,i=null!=(t=e.maxAnisotropy)?t:1/0,n=Object(U["a"])(this.gl),a=this.gl,s={versionString:this.gl.getParameter(this.gl.VERSION),maxVertexTextureImageUnits:this.gl.getParameter(this.gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxVertexAttributes:this.gl.getParameter(this.gl.MAX_VERTEX_ATTRIBS),maxMaxAnisotropy:r?Math.min(this.gl.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY),i):1,maxTextureImageUnits:this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS),maxTextureSize:this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE),maxUniformBufferBindings:n?a.getParameter(a.MAX_UNIFORM_BUFFER_BINDINGS):0,maxVertexUniformBlocks:n?a.getParameter(a.MAX_VERTEX_UNIFORM_BLOCKS):0,maxFragmentUniformBlocks:n?a.getParameter(a.MAX_FRAGMENT_UNIFORM_BLOCKS):0,maxUniformBlockSize:n?a.getParameter(a.MAX_UNIFORM_BLOCK_SIZE):0,uniformBufferOffsetAlignment:n?a.getParameter(a.UNIFORM_BUFFER_OFFSET_ALIGNMENT):1,maxArrayTextureLayers:n?a.getParameter(a.MAX_ARRAY_TEXTURE_LAYERS):1,maxSamples:n?a.getParameter(a.MAX_SAMPLES):1};return h["a"].TEXTURE_UNIT_FOR_UPDATES=s.maxTextureImageUnits-1,s}}function ee(e,t,r,i){return t?i!==t&&e.bindBuffer(r,t.glName):e.bindBuffer(r,null),t}function te(e,t){switch(e){case u["r"].POINTS:return 2*t;case u["r"].TRIANGLES:return t/3;case u["r"].TRIANGLE_STRIP:case u["r"].TRIANGLE_FAN:return t-2;default:return 0}}},"6e07":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("2c4f"),s=r("7ffa"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("8d66"),d=r("3ad7"),h=r("c528");const p=a["a"].ofType({base:null,key:"type",typeMap:{line:u["a"],path:d["a"]}}),f=a["a"].ofType({base:null,key:"type",typeMap:{line:u["a"],path:d["a"]}});let b=i=class extends h["a"]{constructor(e){super(e),this.symbolLayers=new p,this.type="line-3d"}clone(){return new i({styleOrigin:Object(s["a"])(this.styleOrigin),symbolLayers:Object(s["a"])(this.symbolLayers),thumbnail:Object(s["a"])(this.thumbnail)})}static fromSimpleLineSymbol(e){return new i({symbolLayers:[u["a"].fromSimpleLineSymbol(e)]})}};Object(n["a"])([Object(o["b"])({type:p,json:{type:f}})],b.prototype,"symbolLayers",void 0),Object(n["a"])([Object(c["a"])({LineSymbol3D:"line-3d"},{readOnly:!0})],b.prototype,"type",void 0),b=i=Object(n["a"])([Object(l["a"])("esri.symbols.LineSymbol3D")],b);const m=b},"6e4d":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("a915"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("0d93");let c=class extends o["a"]{constructor(e){super(e),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};Object(i["a"])([Object(a["b"])({type:Number,json:{read:e=>e&&-1*e,write:(e,t)=>t.angle=e&&-1*e}})],c.prototype,"angle",void 0),Object(i["a"])([Object(a["b"])({type:["simple-marker","picture-marker"],readOnly:!0})],c.prototype,"type",void 0),Object(i["a"])([Object(a["b"])({type:Number,cast:n["j"],json:{write:!0}})],c.prototype,"xoffset",void 0),Object(i["a"])([Object(a["b"])({type:Number,cast:n["j"],json:{write:!0}})],c.prototype,"yoffset",void 0),Object(i["a"])([Object(a["b"])({type:Number,cast:e=>"auto"===e?e:Object(n["j"])(e),json:{write:!0}})],c.prototype,"size",void 0),c=Object(i["a"])([Object(s["a"])("esri.symbols.MarkerSymbol")],c);const l=c},"6e85":function(e,t,r){"use strict";var i,n;r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),function(e){e[e.Stretch=0]="Stretch",e[e.Lut=1]="Lut",e[e.Hillshade=2]="Hillshade",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Noop=0]="Noop",e[e.PerBand=1]="PerBand",e[e.COUNT=2]="COUNT"}(n||(n={}))},"6fcc":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("bc40"),n=r("3886");function a(e){const t=n["a"]`bool isNaN( float val )
  1797. {
  1798. return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
  1799. }`;e.code.add(t)}function s(e,t){e.vertex.include(a),e.include(i["a"],t);const r=e.vertex;r.uniforms.add("depthBias","vec2"),r.uniforms.add("inverseViewport","vec2"),t.legacy?(r.uniforms.add("view","mat4"),r.uniforms.add("proj","mat4")):r.uniforms.add("transformNormalViewFromGlobal","mat3"),t.legacy?r.code.add(n["a"]`vec2 calculateProjectedBiasXY(vec4 projPos, vec3 globalNormal) {
  1800. float offsetXY = depthBias.x;
  1801. float offsetZ = depthBias.y;
  1802. vec4 projNormal = proj * view * vec4(globalNormal, 0.0);
  1803. return offsetXY * projPos.w * 2.0 * inverseViewport * normalize(projNormal.xyz).xy;
  1804. }`):r.code.add(n["a"]`vec2 calculateProjectedBiasXY(vec4 projPos, vec3 globalNormal) {
  1805. float offsetXY = depthBias.x;
  1806. float offsetZ = depthBias.y;
  1807. vec4 projNormal = transformProjFromView * vec4(transformNormalViewFromGlobal * globalNormal, 0.0);
  1808. return offsetXY * projPos.w * 2.0 * inverseViewport * normalize(projNormal.xyz).xy;
  1809. }`),r.code.add(n["a"]`float _calculateProjectedBiasZ(vec4 projPos) {
  1810. float offsetZ = depthBias.y;
  1811. return sqrt(max(projPos.z,0.0)) * offsetZ;
  1812. }
  1813. vec4 adjustProjectedPosition(vec4 projPos, vec3 worldNormal, float lineWidth) {
  1814. vec2 offsetXY = calculateProjectedBiasXY(projPos, worldNormal);
  1815. if (!isNaN(offsetXY.x) && !isNaN(offsetXY.y)) {
  1816. projPos.xy += offsetXY;
  1817. }
  1818. projPos.z += _calculateProjectedBiasZ(projPos);
  1819. return projPos;
  1820. }`)}},7015:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return h}));var i=r("b3b6"),n=r("2035");const a={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function s(e){e||(e=Object(n["b"])());let t=e in a;if(!t){const r=e.split("-");r.length>1&&r[0]in a&&(e=r[0],t=!0),t||(e="en")}const[r,i,s="#,##0.###"]=a[e];return{decimal:r,group:i,pattern:s}}function o(e,t){const r=s((t={...t}).locale);t.customs=r;const i=t.pattern||r.pattern;return isNaN(e)||Math.abs(e)===1/0?null:l(e,i,t)}const c=/[#0,]*[#0](?:\.0*#*)?/;function l(e,t,r){const i=(r=r||{}).customs.group,n=r.customs.decimal,a=t.split(";"),s=a[0];if(-1!==(t=a[e<0?1:0]||"-"+s).indexOf("%"))e*=100;else if(-1!==t.indexOf("‰"))e*=1e3;else{if(-1!==t.indexOf("¤"))throw new Error("currency notation not supported");if(-1!==t.indexOf("E"))throw new Error("exponential notation not supported")}const o=c,l=s.match(o);if(!l)throw new Error("unable to find a number expression in pattern: "+t);return!1===r.fractional&&(r.places=0),t.replace(o,u(e,l[0],{decimal:n,group:i,places:r.places,round:r.round}))}function u(e,t,r){!0===(r=r||{}).places&&(r.places=0),r.places===1/0&&(r.places=6);const i=t.split("."),n="string"==typeof r.places&&r.places.indexOf(",");let a=r.places;n?a=r.places.substring(n+1):a>=0||(a=(i[1]||[]).length),r.round<0||(e=Number(e.toFixed(Number(a))));const s=String(Math.abs(e)).split("."),o=s[1]||"";if(i[1]||r.places){n&&(r.places=r.places.substring(0,n));const e=void 0!==r.places?r.places:i[1]&&i[1].lastIndexOf("0")+1;e>o.length&&(s[1]=o.padEnd(Number(e),"0")),a<o.length&&(s[1]=o.substr(0,Number(a)))}else s[1]&&s.pop();const c=i[0].replace(",","");let l=c.indexOf("0");-1!==l&&(l=c.length-l,l>s[0].length&&(s[0]=s[0].padStart(l,"0")),-1===c.indexOf("#")&&(s[0]=s[0].substr(s[0].length-l)));let u,d,h=i[0].lastIndexOf(",");if(-1!==h){u=i[0].length-h-1;const e=i[0].substr(0,h);h=e.lastIndexOf(","),-1!==h&&(d=e.length-h-1)}const p=[];for(let f=s[0];f;){const e=f.length-u;p.push(e>0?f.substr(e):f),f=e>0?f.slice(0,e):"",d&&(u=d,d=void 0)}return s[0]=p.reverse().join(r.group||","),s.join(r.decimal||".")}function d(e){const t=s((e=e||{}).locale),r=e.pattern||t.pattern,n=t.group,a=t.decimal;let o=1;if(-1!==r.indexOf("%"))o/=100;else if(-1!==r.indexOf("‰"))o/=1e3;else if(-1!==r.indexOf("¤"))throw new Error("currency notation not supported");const l=r.split(";");1===l.length&&l.push("-"+l[0]);const u=b(l,(function(t){return(t="(?:"+Object(i["a"])(t,".")+")").replace(c,(function(t){const r={signed:!1,separator:e.strict?n:[n,""],fractional:e.fractional,decimal:a,exponent:!1},i=t.split(".");let s=e.places;1===i.length&&1!==o&&(i[1]="###"),1===i.length||0===s?r.fractional=!1:(void 0===s&&(s=e.pattern?i[1].lastIndexOf("0")+1:1/0),s&&null==e.fractional&&(r.fractional=!0),!e.places&&s<i[1].length&&(s+=","+i[1].length),r.places=s);const c=i[0].split(",");return c.length>1&&(r.groupSize=c.pop().length,c.length>1&&(r.groupSize2=c.pop().length)),"("+p(r)+")"}))}),!0);return{regexp:u.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:n,decimal:a,factor:o}}function h(e,t){const r=d(t),i=new RegExp("^"+r.regexp+"$").exec(e);if(!i)return NaN;let n=i[1];if(!i[1]){if(!i[2])return NaN;n=i[2],r.factor*=-1}return n=n.replace(new RegExp("["+r.group+"\\s\\xa0]","g"),"").replace(r.decimal,"."),Number(n)*r.factor}function p(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!/^0/.test(String(e.places))||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=f(e),r=b(e.fractional,(function(t){let r="";return t&&0!==e.places&&(r="\\"+e.decimal,e.places===1/0?r="(?:"+r+"\\d+)?":r+="\\d{"+e.places+"}"),r}),!0);let i=t+r;return r&&(i="(?:(?:"+i+")|(?:"+r+"))"),i+b(e.exponent,(function(t){return t?"([eE]"+f({signed:e.eSigned})+")":""}))}function f(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",b(e.signed,(function(e){return e?"[-+]":""}),!0)+b(e.separator,(function(t){if(!t)return"(?:\\d+)";" "===(t=Object(i["a"])(t))?t="\\s":" "===t&&(t="\\s\\xa0");const r=e.groupSize,n=e.groupSize2;if(n){const e="(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*["+t+"]\\d{"+r+"})";return r-n>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(r-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(r-1)+"}(?:["+t+"]\\d{"+r+"})*)"}),!0)}const b=function(e,t,r){if(!(e instanceof Array))return t(e);const i=[];for(let n=0;n<e.length;n++)i.push(t(e[n]));return m(i.join("|"),r)},m=function(e,t){return"("+(t?"?:":"")+e+")"}},"702a":function(e,t,r){"use strict";r.d(t,"a",(function(){return Ze})),r.d(t,"b",(function(){return Qe})),r.d(t,"c",(function(){return Ye})),r.d(t,"d",(function(){return it})),r.d(t,"e",(function(){return Xe})),r.d(t,"f",(function(){return rt})),r.d(t,"g",(function(){return Je}));
  1821. /*!
  1822. * @esri/arcgis-html-sanitizer - v2.9.0 - Mon Dec 13 2021 15:07:01 GMT-0500 (Eastern Standard Time)
  1823. * Copyright (c) 2021 - Environmental Systems Research Institute, Inc.
  1824. * Apache-2.0
  1825. *
  1826. * js-xss
  1827. * Copyright (c) 2012-2017 Zongmin Lei(雷宗民) <leizongmin@gmail.com>
  1828. * http://ucdok.com
  1829. * MIT License, see https://github.com/leizongmin/js-xss/blob/master/LICENSE for details
  1830. *
  1831. * Lodash/isPlainObject
  1832. * Copyright (c) JS Foundation and other contributors <https://js.foundation/>
  1833. * MIT License, see https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE for details
  1834. */
  1835. var i="[object Object]";function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}function a(e,t){return function(r){return e(t(r))}}var s=Function.prototype,o=Object.prototype,c=s.toString,l=o.hasOwnProperty,u=c.call(Object),d=o.toString,h=a(Object.getPrototypeOf,Object);function p(e){return!!e&&"object"==typeof e}function f(e){if(!p(e)||d.call(e)!=i||n(e))return!1;var t=h(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==u}var b=f,m={exports:{}},g={},y={exports:{}},O={};function v(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}function _(e,t,r){}function j(e,t,r){}var w=/javascript\s*\:/gim;function x(e,t){return w.test(t)?"":t}O.whiteList=v(),O.getDefaultWhiteList=v,O.onAttr=_,O.onIgnoreAttr=j,O.safeAttrValue=x;var T={indexOf:function(e,t){var r,i;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var i,n;if(Array.prototype.forEach)return e.forEach(t,r);for(i=0,n=e.length;i<n;i++)t.call(r,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},S=T;function E(e,t){e=S.trimRight(e),";"!==e[e.length-1]&&(e+=";");var r=e.length,i=!1,n=0,a=0,s="";function o(){if(!i){var r=S.trim(e.slice(n,a)),o=r.indexOf(":");if(-1!==o){var c=S.trim(r.slice(0,o)),l=S.trim(r.slice(o+1));if(c){var u=t(n,s.length,c,l,r);u&&(s+=u+"; ")}}}n=a+1}for(;a<r;a++){var c=e[a];if("/"===c&&"*"===e[a+1]){var l=e.indexOf("*/",a+2);if(-1===l)break;a=l+1,n=a+1,i=!1}else"("===c?i=!0:")"===c?i=!1:";"===c?i||o():"\n"===c&&o()}return S.trim(s)}var A=E,C=O,R=A;function M(e){return void 0===e||null===e}function P(e){var t={};for(var r in e)t[r]=e[r];return t}function I(e){e=P(e||{}),e.whiteList=e.whiteList||C.whiteList,e.onAttr=e.onAttr||C.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||C.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||C.safeAttrValue,this.options=e}I.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,r=t.options,i=r.whiteList,n=r.onAttr,a=r.onIgnoreAttr,s=r.safeAttrValue,o=R(e,(function(e,t,r,o,c){var l=i[r],u=!1;if(!0===l?u=l:"function"===typeof l?u=l(o):l instanceof RegExp&&(u=l.test(o)),!0!==u&&(u=!1),o=s(r,o),o){var d={position:t,sourcePosition:e,source:c,isWhite:u};if(u){var h=n(r,o,d);return M(h)?r+":"+o:h}h=a(r,o,d);return M(h)?void 0:h}}));return o};var D=I;(function(e,t){var r=O,i=D;function n(e,t){var r=new i(t);return r.process(e)}for(var a in t=e.exports=n,t.FilterCSS=i,r)t[a]=r[a]})(y,y.exports);var L={indexOf:function(e,t){var r,i;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var i,n;if(Array.prototype.forEach)return e.forEach(t,r);for(i=0,n=e.length;i<n;i++)t.call(r,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,r=t.exec(e);return r?r.index:-1}},N=y.exports.FilterCSS,F=y.exports.getDefaultWhiteList,k=L;function U(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var z=new N;function B(e,t,r){}function V(e,t,r){}function G(e,t,r){}function H(e,t,r){}function q(e){return e.replace($,"&lt;").replace(Z,"&gt;")}function W(e,t,r,i){if(r=ce(r),"href"===t||"src"===t){if(r=k.trim(r),"#"===r)return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===t){if(ee.lastIndex=0,ee.test(r))return""}else if("style"===t){if(te.lastIndex=0,te.test(r))return"";if(re.lastIndex=0,re.test(r)&&(ee.lastIndex=0,ee.test(r)))return"";!1!==i&&(i=i||z,r=i.process(r))}return r=le(r),r}var $=/</g,Z=/>/g,X=/"/g,Y=/&quot;/g,J=/&#([a-zA-Z0-9]*);?/gim,Q=/&colon;?/gim,K=/&newline;?/gim,ee=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,te=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,re=/u\s*r\s*l\s*\(.*/gi;function ie(e){return e.replace(X,"&quot;")}function ne(e){return e.replace(Y,'"')}function ae(e){return e.replace(J,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function se(e){return e.replace(Q,":").replace(K," ")}function oe(e){for(var t="",r=0,i=e.length;r<i;r++)t+=e.charCodeAt(r)<32?" ":e.charAt(r);return k.trim(t)}function ce(e){return e=ne(e),e=ae(e),e=se(e),e=oe(e),e}function le(e){return e=ie(e),e=q(e),e}function ue(){return""}function de(e,t){"function"!==typeof t&&(t=function(){});var r=!Array.isArray(e);function i(t){return!!r||-1!==k.indexOf(e,t)}var n=[],a=!1;return{onIgnoreTag:function(e,r,s){if(i(e)){if(s.isClosing){var o="[/removed]",c=s.position+o.length;return n.push([!1!==a?a:s.position,c]),a=!1,o}return a||(a=s.position),"[removed]"}return t(e,r,s)},remove:function(e){var t="",r=0;return k.forEach(n,(function(i){t+=e.slice(r,i[0]),r=i[1]})),t+=e.slice(r),t}}}function he(e){var t="",r=0;while(r<e.length){var i=e.indexOf("\x3c!--",r);if(-1===i){t+=e.slice(r);break}t+=e.slice(r,i);var n=e.indexOf("--\x3e",i);if(-1===n)break;r=n+3}return t}function pe(e){var t=e.split("");return t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})),t.join("")}g.whiteList=U(),g.getDefaultWhiteList=U,g.onTag=B,g.onIgnoreTag=V,g.onTagAttr=G,g.onIgnoreTagAttr=H,g.safeAttrValue=W,g.escapeHtml=q,g.escapeQuote=ie,g.unescapeQuote=ne,g.escapeHtmlEntities=ae,g.escapeDangerHtml5Entities=se,g.clearNonPrintableCharacter=oe,g.friendlyAttrValue=ce,g.escapeAttrValue=le,g.onIgnoreTagStripAll=ue,g.StripTagBody=de,g.stripCommentTag=he,g.stripBlankChar=pe,g.cssFilter=z,g.getDefaultCSSWhiteList=F;var fe={},be=L;function me(e){var t=be.spaceIndex(e);if(-1===t)var r=e.slice(1,-1);else r=e.slice(1,t+1);return r=be.trim(r).toLowerCase(),"/"===r.slice(0,1)&&(r=r.slice(1)),"/"===r.slice(-1)&&(r=r.slice(0,-1)),r}function ge(e){return"</"===e.slice(0,2)}function ye(e,t,r){var i="",n=0,a=!1,s=!1,o=0,c=e.length,l="",u="";e:for(o=0;o<c;o++){var d=e.charAt(o);if(!1===a){if("<"===d){a=o;continue}}else if(!1===s){if("<"===d){i+=r(e.slice(n,o)),a=o,n=o;continue}if(">"===d){i+=r(e.slice(n,a)),u=e.slice(a,o+1),l=me(u),i+=t(a,i.length,l,u,ge(u)),n=o+1,a=!1;continue}if('"'===d||"'"===d){var h=1,p=e.charAt(o-h);while(""===p.trim()||"="===p){if("="===p){s=d;continue e}p=e.charAt(o-++h)}}}else if(d===s){s=!1;continue}}return n<e.length&&(i+=r(e.substr(n))),i}var Oe=/[^a-zA-Z0-9_:\.\-]/gim;function ve(e,t){var r=0,i=[],n=!1,a=e.length;function s(e,r){if(e=be.trim(e),e=e.replace(Oe,"").toLowerCase(),!(e.length<1)){var n=t(e,r||"");n&&i.push(n)}}for(var o=0;o<a;o++){var c,l,u=e.charAt(o);if(!1!==n||"="!==u)if(!1===n||o!==r||'"'!==u&&"'"!==u||"="!==e.charAt(o-1))if(/\s|\n|\t/.test(u)){if(e=e.replace(/\s|\n|\t/g," "),!1===n){if(l=_e(e,o),-1===l){c=be.trim(e.slice(r,o)),s(c),n=!1,r=o+1;continue}o=l-1;continue}if(l=je(e,o-1),-1===l){c=be.trim(e.slice(r,o)),c=xe(c),s(n,c),n=!1,r=o+1;continue}}else;else{if(l=e.indexOf(u,o+1),-1===l)break;c=be.trim(e.slice(r+1,l)),s(n,c),n=!1,o=l,r=o+1}else n=e.slice(r,o),r=o+1}return r<e.length&&(!1===n?s(e.slice(r)):s(n,xe(be.trim(e.slice(r))))),be.trim(i.join(" "))}function _e(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"="===r?t:-1}}function je(e,t){for(;t>0;t--){var r=e[t];if(" "!==r)return"="===r?t:-1}}function we(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function xe(e){return we(e)?e.substr(1,e.length-2):e}fe.parseTag=ye,fe.parseAttr=ve;var Te=y.exports.FilterCSS,Se=g,Ee=fe,Ae=Ee.parseTag,Ce=Ee.parseAttr,Re=L;function Me(e){return void 0===e||null===e}function Pe(e){var t=Re.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};e=Re.trim(e.slice(t+1,-1));var r="/"===e[e.length-1];return r&&(e=Re.trim(e.slice(0,-1))),{html:e,closing:r}}function Ie(e){var t={};for(var r in e)t[r]=e[r];return t}function De(e){e=Ie(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=Se.onIgnoreTagStripAll),e.whiteList=e.whiteList||Se.whiteList,e.onTag=e.onTag||Se.onTag,e.onTagAttr=e.onTagAttr||Se.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||Se.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||Se.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||Se.safeAttrValue,e.escapeHtml=e.escapeHtml||Se.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Te(e.css))}De.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,r=t.options,i=r.whiteList,n=r.onTag,a=r.onIgnoreTag,s=r.onTagAttr,o=r.onIgnoreTagAttr,c=r.safeAttrValue,l=r.escapeHtml,u=t.cssFilter;r.stripBlankChar&&(e=Se.stripBlankChar(e)),r.allowCommentTag||(e=Se.stripCommentTag(e));var d=!1;if(r.stripIgnoreTagBody){d=Se.StripTagBody(r.stripIgnoreTagBody,a);a=d.onIgnoreTag}var h=Ae(e,(function(e,t,r,d,h){var p={sourcePosition:e,position:t,isClosing:h,isWhite:i.hasOwnProperty(r)},f=n(r,d,p);if(!Me(f))return f;if(p.isWhite){if(p.isClosing)return"</"+r+">";var b=Pe(d),m=i[r],g=Ce(b.html,(function(e,t){var i=-1!==Re.indexOf(m,e),n=s(r,e,t,i);if(!Me(n))return n;if(i)return t=c(r,e,t,u),t?e+'="'+t+'"':e;n=o(r,e,t,i);return Me(n)?void 0:n}));d="<"+r;return g&&(d+=" "+g),b.closing&&(d+=" /"),d+=">",d}f=a(r,d,p);return Me(f)?l(d):f}),l);return d&&(h=d.remove(h)),h};var Le=De;(function(e,t){var r=g,i=fe,n=Le;function a(e,t){var r=new n(t);return r.process(e)}for(var s in t=e.exports=a,t.filterXSS=a,t.FilterXSS=n,r)t[s]=r[s];for(var s in i)t[s]=i[s];function o(){return"undefined"!==typeof self&&"undefined"!==typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}o()&&(self.filterXSS=e.exports)})(m,m.exports);var Ne,Fe,ke=function(){function e(e,t){var r,i=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],audio:["autoplay","controls","loop","muted","preload"],b:[],br:[],dd:["style"],div:["align","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],ol:[],p:["style"],source:["media","src","type"],span:["style"],strong:[],sub:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(e,t,r,n){return"a"===e&&"href"===t||("img"===e||"source"===e)&&"src"===t?i.sanitizeUrl(r):m.exports.safeAttrValue(e,t,r,n)}},e&&!t?r=e:e&&t?(r=Object.create(this.arcgisFilterOptions),Object.keys(e).forEach((function(t){"whiteList"===t?r.whiteList=i._extendObjectOfArrays([i.arcgisWhiteList,e.whiteList||{}]):r[t]=e[t]}))):(r=Object.create(this.arcgisFilterOptions),r.whiteList=this.arcgisWhiteList),this.xssFilterOptions=r,this._xssFilter=new m.exports.FilterXSS(r)}return e.prototype.sanitize=function(e,t){switch(void 0===t&&(t={}),typeof e){case"number":return isNaN(e)||!isFinite(e)?null:e;case"boolean":return e;case"string":return this._xssFilter.process(e);case"object":return this._iterateOverObject(e,t);default:if(t.allowUndefined&&"undefined"===typeof e)return;return null}},e.prototype.sanitizeUrl=function(e){var t=this._trim(e.substring(0,e.indexOf(":")));return"/"===e||"#"===e||"#"===e[0]||this.allowedProtocols.indexOf(t.toLowerCase())>-1?m.exports.escapeAttrValue(e):""},e.prototype.sanitizeHTMLAttribute=function(e,t,r,i){return"function"===typeof this.xssFilterOptions.safeAttrValue?this.xssFilterOptions.safeAttrValue(e,t,r,i):m.exports.safeAttrValue(e,t,r,i)},e.prototype.validate=function(e,t){void 0===t&&(t={});var r=this.sanitize(e,t);return{isValid:e===r,sanitized:r}},e.prototype._extendObjectOfArrays=function(e){var t={};return e.forEach((function(e){Object.keys(e).forEach((function(r){Array.isArray(e[r])&&Array.isArray(t[r])?t[r]=t[r].concat(e[r]):t[r]=e[r]}))})),t},e.prototype._iterateOverObject=function(e,t){var r=this;void 0===t&&(t={});try{var i=!1,n=void 0;if(Array.isArray(e))n=e.reduce((function(e,n){var a=r.validate(n,t);return a.isValid?e.concat([n]):(i=!0,e.concat([a.sanitized]))}),[]);else{if(!b(e)){if(t.allowUndefined&&"undefined"===typeof e)return;return null}var a=Object.keys(e);n=a.reduce((function(n,a){var s=e[a],o=r.validate(s,t);return o.isValid?n[a]=s:(i=!0,n[a]=o.sanitized),n}),{})}return i?n:e}catch(s){return null}},e.prototype._trim=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},e}(),Ue=r("556f"),ze=r("c649"),Be=(r("c120"),r("e92d")),Ve=r("560e"),Ge=function(e){if("WebkitTransition"in e.style)Ne="webkitTransitionEnd",Fe="webkitAnimationEnd";else{if(!("transition"in e.style))throw new Error("Your browser is not supported!");Ne="transitionend",Fe="animationend"}},He=function(e){Ne||Ge(e)},qe=function(e,t){return void 0===t&&(t=e+"-active"),function(r){He(r);var i=!1,n=function(a){i||(i=!0,r.removeEventListener(Ne,n),r.removeEventListener(Fe,n),r.classList.remove(e),r.classList.remove(t))};r.classList.add(e),r.addEventListener(Ne,n),r.addEventListener(Fe,n),requestAnimationFrame((function(){r.classList.add(t)}))}},We=function(e,t){return void 0===t&&(t=e+"-active"),function(r,i){He(r);var n=!1,a=function(e){n||(n=!0,r.removeEventListener(Ne,a),r.removeEventListener(Fe,a),i())};r.classList.add(e),r.addEventListener(Ne,a),r.addEventListener(Fe,a),requestAnimationFrame((function(){r.classList.add(t)}))}};const $e=Be["a"].getLogger("esri.widgets.support.widgetUtils");function Ze(e){const t=Ue["a"].acquire();for(let i=0;i<arguments.length;i++){const e=arguments[i],r=typeof e;if("string"===r)t.push(e);else if(Array.isArray(e))t.push.apply(t,e);else if("object"===r)for(const i in e)e[i]&&t.push(i)}const r=t.join(" ");return Ue["a"].release(t),r}(()=>{const e=new Map,t=new ResizeObserver(t=>{Object(Ve["a"])();for(const r of t)e.get(r.target)(r)})})();function Xe(e){const t=null==e?void 0:e.closest("[dir]");return null!==t&&t instanceof HTMLElement&&"rtl"===t.dir||"rtl"===document.dir}function Ye(e){const t="data-node-ref";this[e.getAttribute(t)]=null}function Je(e){const t="data-node-ref";this[e.getAttribute(t)]=e}function Qe(e,t){return("enter"===e?qe:We)(t)}const Ke=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"],et=Ke.reduce((e,t)=>(e[t]=[],e),{}),tt=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],rt=new ke({whiteList:et,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(tt.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0);function it(e){return"Enter"===e||" "===e}},7079:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("d047"),n=r("9617"),a=r("501b"),s=r("3886");function o(e,t){t.multipassGeometryEnabled&&e.vertex.include(n["b"]),t.multipassTerrainEnabled&&e.varyings.add("depth","float"),e.vertex.code.add(s["a"]`
  1836. void main(void) {
  1837. vec4 posProjCenter;
  1838. if (dot(position, position) > 0.0) {
  1839. // Render single point to center of the pixel to avoid subpixel
  1840. // filtering to affect the marker color
  1841. ProjectHUDAux projectAux;
  1842. vec4 posProj = projectPositionHUD(projectAux);
  1843. posProjCenter = alignToPixelCenter(posProj, viewport.zw);
  1844. ${t.multipassGeometryEnabled?s["a"]`
  1845. // Don't draw vertices behind geometry
  1846. if(geometryDepthTest(.5 + .5 * posProjCenter.xy / posProjCenter.w, projectAux.posView.z)){
  1847. posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);
  1848. }`:""}
  1849. ${t.multipassTerrainEnabled?"depth = projectAux.posView.z;":""}
  1850. vec3 vpos = projectAux.posModel;
  1851. if (rejectBySlice(vpos)) {
  1852. // Project out of clip space
  1853. posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);
  1854. }
  1855. } else {
  1856. // Project out of clip space
  1857. posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);
  1858. }
  1859. gl_Position = posProjCenter;
  1860. gl_PointSize = 1.0;
  1861. }
  1862. `),t.multipassTerrainEnabled&&e.fragment.include(i["a"]),e.fragment.uniforms.add("terrainDepthTexture","sampler2D"),e.fragment.uniforms.add("nearFar","vec2"),e.fragment.uniforms.add("inverseViewport","vec2"),e.fragment.include(a["a"]),e.fragment.code.add(s["a"]`
  1863. void main() {
  1864. gl_FragColor = vec4(1, 1, 1, 1);
  1865. ${t.multipassTerrainEnabled?s["a"]`
  1866. vec2 uv = gl_FragCoord.xy * inverseViewport;
  1867. //Read the rgba data from the texture linear depth
  1868. vec4 terrainDepthData = texture2D(terrainDepthTexture, uv);
  1869. float terrainDepth = linearDepthFromFloat(rgba2float(terrainDepthData), nearFar);
  1870. //If HUD vertex is behind terrain and the terrain depth is not the initialize value (e.g. we are not looking at the sky)
  1871. //Mark the HUD vertex as occluded by transparent terrain
  1872. if(depth < terrainDepth && terrainDepthData != vec4(0,0,0,1)){
  1873. gl_FragColor.g = 0.5;
  1874. }`:""}
  1875. }
  1876. `)}},7088:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add("ssaoTex","sampler2D"),r.uniforms.add("viewportPixelSz","vec4"),r.code.add(i["a"]`float evaluateAmbientOcclusion() {
  1877. return 1.0 - texture2D(ssaoTex, (gl_FragCoord.xy - viewportPixelSz.xy) * viewportPixelSz.zw).a;
  1878. }
  1879. float evaluateAmbientOcclusionInverse() {
  1880. float ssao = texture2D(ssaoTex, (gl_FragCoord.xy - viewportPixelSz.xy) * viewportPixelSz.zw).a;
  1881. return viewportPixelSz.z < 0.0 ? 1.0 : ssao;
  1882. }`)):r.code.add(i["a"]`float evaluateAmbientOcclusion() { return 0.0; }
  1883. float evaluateAmbientOcclusionInverse() { return 1.0; }`)}},"70a2":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return a}));const i=e=>{class t extends e{constructor(){super(...arguments),this._isDisposed=!1}dispose(){for(const t of null!=(e=this._managedDisposables)?e:[]){var e;const r=this[t];this[t]=null,r&&"function"==typeof r.dispose&&r.dispose()}this._isDisposed=!0}get isDisposed(){return this._isDisposed}}return t};class n extends(i(class{})){}function a(){return(e,t)=>{var r,i;e.hasOwnProperty("_managedDisposables")||(e._managedDisposables=null!=(r=null==(i=e._managedDisposables)?void 0:i.slice())?r:[]),e._managedDisposables.unshift(t)}}},"70ce":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("fc29"),a=r("9096"),s=r("b2b2"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("22f4"),u=r("2258"),d=r("f353");const h={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"};let p=class extends(Object(a["b"])(n["a"])){constructor(e){super(e),this.floors=null,this.scale=0}destroy(){this.layer=null}get dynamicLayers(){if(!this.hasDynamicLayers)return null;const e=this.visibleSublayers.map(e=>{const t=Object(d["c"])(this.floors,e);return e.toExportImageJSON(t)});return e.length?JSON.stringify(e):null}get hasDynamicLayers(){return this.layer&&Object(u["a"])(this.visibleSublayers,this.layer.serviceSublayers,this.layer)}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.allSublayers.on("change",()=>this.notifyChange("visibleSublayers")),e.on("sublayer-update",e=>this.notifyChange(h[e.propertyName]))],"layer"))}get layers(){const e=this.visibleSublayers;return e?e.length?"show:"+e.map(e=>e.id).join(","):"show:-1":null}get layerDefs(){var e;const t=!(null==(e=this.floors)||!e.length),r=this.visibleSublayers.filter(e=>null!=e.definitionExpression||t&&null!=e.floorInfo);return r.length?JSON.stringify(r.reduce((e,t)=>{const r=Object(d["c"])(this.floors,t),i=Object(s["k"])(r)?Object(d["a"])(r,t):t.definitionExpression;return e[t.id]=i,e},{})):null}get version(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers"),this.commitProperty("timeExtent");const e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}get visibleSublayers(){const e=[];if(!this.layer)return e;const t=this.layer.sublayers,r=t=>{const i=this.scale,n=0===i,a=0===t.minScale||i<=t.minScale,s=0===t.maxScale||i>=t.maxScale;t.visible&&(n||a&&s)&&(t.sublayers?t.sublayers.forEach(r):e.unshift(t))};t&&t.forEach(r);const i=this._get("visibleSublayers");return!i||i.length!==e.length||i.some((t,r)=>e[r]!==t)?e:i}toJSON(){const e=this.layer;let t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t={...t,layers:this.layers,layerDefs:this.layerDefs},t}};Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"dynamicLayers",null),Object(i["a"])([Object(o["b"])()],p.prototype,"floors",void 0),Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"hasDynamicLayers",null),Object(i["a"])([Object(o["b"])()],p.prototype,"layer",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"layers",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"layerDefs",null),Object(i["a"])([Object(o["b"])({type:Number})],p.prototype,"scale",void 0),Object(i["a"])([Object(o["b"])(l["a"])],p.prototype,"timeExtent",void 0),Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"version",null),Object(i["a"])([Object(o["b"])({readOnly:!0})],p.prototype,"visibleSublayers",null),p=Object(i["a"])([Object(c["a"])("esri.layers.mixins.ExportImageParameters")],p)},"70f6":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(e){super(e),this.visible=!0}clone(){}};Object(i["a"])([Object(a["b"])({type:["line"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],o.prototype,"type",void 0),Object(i["a"])([Object(a["b"])({readOnly:!0})],o.prototype,"visible",void 0),o=Object(i["a"])([Object(s["a"])("esri.symbols.callouts.Callout3D")],o);const c=o},"713b":function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var i=r("a05b"),n=r("d272"),a=r("4db9"),s=r("6d5b"),o=r("6a07"),c=r("6750"),l=r("ebd5"),u=r("3886"),d=r("690a"),h=r("b7bd");function p(e){const t=new d["a"];return t.include(a["a"],{linearDepth:!1}),t.include(s["a"],e),t.include(c["a"],{...e,stippleRequiresStretchMeasure:!1}),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),e.stippleEnabled&&(t.vertex.uniforms.add("ndcToPixel","vec2"),t.attributes.add(h["a"].UV0,"vec2"),t.attributes.add(h["a"].AUXPOS1,"vec3")),t.attributes.add(h["a"].POSITION,"vec3"),t.varyings.add("vpos","vec3"),t.vertex.code.add(u["a"]`void main(void) {
  1884. vpos = position;
  1885. forwardNormalizedVertexColor();
  1886. gl_Position = transformPosition(proj, view, vpos);`),e.stippleEnabled&&(t.vertex.code.add(u["a"]`vec4 vpos2 = transformPosition(proj, view, auxpos1);
  1887. float lineSegmentPixelSize = length((vpos2.xy / vpos2.w - gl_Position.xy / gl_Position.w) * ndcToPixel);`),e.draped||t.vertex.code.add(u["a"]`vec3 segmentCenter = (position + auxpos1) * 0.5;
  1888. float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),t.vertex.code.add(u["a"]`float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);`),e.draped?t.vertex.code.add(u["a"]`float startPseudoScreen = uv0.y * discreteWorldToScreenRatio - mix(0.0, lineSegmentPixelSize, uv0.x);
  1889. float segmentLengthPseudoScreen = lineSegmentPixelSize;`):t.vertex.code.add(u["a"]`float segmentLengthRender = length(position - auxpos1);
  1890. float startPseudoScreen = mix(uv0.y, uv0.y - segmentLengthRender, uv0.x) * discreteWorldToScreenRatio;
  1891. float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),t.vertex.code.add(u["a"]`vec2 stippleDistanceLimits = computeStippleDistanceLimits(startPseudoScreen, segmentLengthPseudoScreen, lineSegmentPixelSize, stipplePatternPixelSize);
  1892. vStippleDistance = mix(stippleDistanceLimits.x, stippleDistanceLimits.y, uv0.x);
  1893. vStippleDistance *= gl_Position.w;`)),t.vertex.code.add(u["a"]`}`),e.output===i["a"].Highlight&&t.include(o["a"]),t.include(n["a"],e),t.fragment.uniforms.add("constantColor","vec4").add("alphaCoverage","float"),t.fragment.code.add(u["a"]`
  1894. void main() {
  1895. discardBySlice(vpos);
  1896. vec4 color = ${e.attributeColor?"vColor":"constantColor"};
  1897. float stippleAlpha = getStippleAlpha();
  1898. discardByStippleAlpha(stippleAlpha, stippleAlphaColorDiscard);
  1899. vec4 finalColor = blendStipple(vec4(color.rgb, color.a * alphaCoverage), stippleAlpha);
  1900. if (finalColor.a < ${u["a"].float(l["c"])}) {
  1901. discard;
  1902. }
  1903. ${e.output===i["a"].Color?u["a"]`gl_FragColor = highlightSlice(finalColor, vpos);`:""}
  1904. ${e.output===i["a"].Highlight?u["a"]`outputHighlight();`:""}
  1905. }
  1906. `),t}const f=Object.freeze({__proto__:null,build:p})},7164:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("e92d");class n{constructor(e,t=[]){this.eventType=e,this.keyModifiers=t}matches(e){if(e.type!==this.eventType)return!1;if(0===this.keyModifiers.length)return!0;const t=e.modifiers;for(const r of this.keyModifiers)if(!t.has(r))return!1;return!0}}const a=i["a"].getLogger("esri.views.input.InputHandler");class s{constructor(e){this._manager=null,this._incoming={},this._outgoing={},this._incomingEventMatches=null,this._incomingEventTypes=null,this._outgoingEventTypes=null,this._hasSideEffects=e}get incomingEventMatches(){if(!this._incomingEventMatches){this._incomingEventMatches=[];for(const e in this._incoming){const t=this._incoming[e];for(const e of t)this._incomingEventMatches.push(e.match)}}return this._incomingEventMatches}get incomingEventTypes(){return this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map(e=>e.eventType)),this._incomingEventTypes}get outgoingEventTypes(){return this._outgoingEventTypes||(this._outgoingEventTypes=Object.keys(this._outgoing)),this._outgoingEventTypes}get hasSideEffects(){return this._hasSideEffects}get hasPendingInputs(){return!1}onInstall(e){this._manager?a.error("This InputHandler has already been registered with an InputManager"):(e.setEventCallback(e=>this._handleEvent(e)),e.setUninstallCallback(()=>this._onUninstall()),this._manager=e)}onUninstall(){}registerIncoming(e,t,r){let i;"function"==typeof t?(r=t,i=[]):i=t||[];const a="string"==typeof e?new n(e,i):e,s=()=>{this._incomingEventTypes=null,this._incomingEventMatches=null},c=e=>{const t=this._incoming[e.match.eventType];if(t){const r=t.indexOf(e);t.splice(r,1),s(),this._manager&&this._manager.updateDependencies()}},l=new o(a,r,{onPause:c,onRemove:c,onResume:e=>{const t=this._incoming[e.match.eventType];t&&-1===t.indexOf(e)&&(t.push(e),s(),this._manager&&this._manager.updateDependencies())}});let u=this._incoming[a.eventType];return u||(u=[],this._incoming[a.eventType]=u),u.push(l),s(),this._manager&&this._manager.updateDependencies(),l}registerOutgoing(e){if(this._outgoing[e])throw Error("There is already a callback registered for this outgoing InputEvent: "+e);const t=new c(e,{onEmit:(e,t,r,i)=>{this._manager.emit(e.eventType,t,r,i)},onRemove:e=>{delete this._outgoing[e.eventType],this._manager.updateDependencies()}});return this._outgoing[e]=t,this._outgoingEventTypes=null,this._manager&&this._manager.updateDependencies(),t}startCapturingPointer(e){this._manager.setPointerCapture(e,!0)}stopCapturingPointer(e){this._manager.setPointerCapture(e,!1)}refreshHasPendingInputs(){this._manager.refreshHasPendingInputs()}_onUninstall(){this._manager?(this.onUninstall(),this._manager=null):a.error("This InputHandler is not registered with an InputManager")}_handleEvent(e){const t=this._incoming[e.type];if(t)for(const r of t)if(r.match.matches(e)&&(r.callback(e),e.shouldStopPropagation()))break}}class o{constructor(e,t,r){this.match=e,this._callback=t,this._handler=r}pause(){this._handler.onPause(this)}resume(){this._handler.onResume(this)}remove(){this._handler.onRemove(this)}get callback(){return this._callback}}class c{constructor(e,t){this.eventType=e,this._removed=!1,this._handler=t}emit(e,t,r){this._removed||this._handler.onEmit(this,e,t,r)}remove(){this._removed=!0,this._handler.onRemove(this)}}},7221:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGQ0FBNTYxMEM5RDExMUVCODM3QkExOUE4NDYzN0UzMiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGQ0FBNTYxMUM5RDExMUVCODM3QkExOUE4NDYzN0UzMiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZDQUE1NjBFQzlEMTExRUI4MzdCQTE5QTg0NjM3RTMyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZDQUE1NjBGQzlEMTExRUI4MzdCQTE5QTg0NjM3RTMyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+poqctAAABR9JREFUeNrUmG1oW2UUx0/e7r1JX5LevCzpu2uzF6rdnIWphQ2mwipMGGyCuo/TD/pFYV/EV8QJIsI+DZ2CqDAVmQpTVoa4DRRmN8eoW0e1q9vc2mRJmzTJ0iQ3ufF/0tuuhFZtm5smF/6ce5/nuef+cu55nnueUD6fp1Jr284P1+jhl2UkfY4HdPKrG/DmagOuugi3b+87Ul9NwD6osZqAXVBTVQAjFVyCxWKpGmCOrkVg3upJCZ8oilUFzClB1ZQSiLCgG7BZlwgX5TAmIn9I7oO+PXPiualKzWEvQG3QOzg/29nR/AnsRVzXVVyEeVWDLIqiXNzU3env6uqg5B2FxsYn2pPJ6RaMGaok4KZA8DYBlh7d0eNvbfVRNJqkgfOXCbBfo3+4YlICr3sNTE80GiV/ZwtHmWKxFP06cInGxoKfo+8p5HBuJc8wcFFcIlgTzC89W9Zv9XicNDo6TsN/XiOf141UuP0B+p4HbL4iljWtMjthNBq3ImfJ4agjt1su7BAAG0ffkVLAliTCgL0H5rgsO7ra2zwkSQJNTSWRCkkKBifI719Ll4eGExjzNKCPryowYB+C+W79ug5PLJag8UCQm68YjYaN7Ba+b7a1Nje7XDL9dmGQc/dlQL+3KsCA3QfzUfe9G6VgKIxohs7i+iVotKbGGswqOUpnMlwXPwO92rG23cErx42/b32s5bNSlhwGqAF6C6efIXrS4KUrI4Ddg+uHAcHQdkmykNnCc5BEtL0P6786eu0wYLO4Zz+u++FD1h0YD7HCHG1taXoNduL6jZsc0S5AHZs3qRySJJJWABW2SegLQy/gdBPu6UeK7OCvH/z5dQOGcy/MaWg3IlWIGiAOQZmioXZJ5C+deQ549sDYIagvHJ7sw6WiQW8vOTCccuHCr/sqtA4PPQBFFxlu55VCA16wbsC9/RxtiN/UF/C/v2SfZjjbBfMstBcPOvc/fDoY2GzOLAqsQWdhDsP/UZ6UsG/Dvo52ddnAcLKTVxI4eWIJbw0p8e8RLgLnN3UAz+qE3Qf7DdoSSwbm0hDmRy0SSzkc/5USi4CPwIzguY5lRRgOkstc2+0iA5uXBlwU8bIW8EtKiUrYccxMOp2AV1zAI+cWXNaEGWD7Av3FKbCqEebawTtv0rkrKiX4bymYF3k1gSKCIIyhUtvAOWzGpEN9/BjaY9DP2keiY1VSAqC8LX6DqzNZ9khut5MafTLJDTX0/Q+naDbC9vpa2nx/d10gEOkNhSZ7w+HxN3HPMa2qu1UWYG19PtnQ4Ol1ubxktYoAlSArdhoSZZTsDDAirKoqyQ4b5VUDfoCNnE6vcWIisBfgj8AH1xMD5UiJVxDVXo+nCa/cBBAjSaKZbFaUlGYDmU0mGv1rnO4kpymbzRbauZ/H8QFo8nrbuLT8ChLKkRKP19ffLWWRs2Q0GcgEIZTka3TST6cvFPq8XrnQzv08bm4ZscvY+ofaU6kkF0Dn9AZOq+rdnbqq5knN5SkHCYJIe3Zvm+tTFBVgqUI/j5t/aDudVDlS4lAkEgZgbg4qlc5SclopiK8Zju1sG/fz9ewRCo1ROj19Eqe/6w6Mhf7LeDxycGRkMA9LmUwO+apQLJ4uRLNY3M79PA4pQIHAdZqcDJ6CqyfLvQnld/+uKEoP1tbaC/9FNEA2m0j8d2smrQA0TZFoHNv+BCUSUwzMFdlB6FPOiuV86Urxv0SXtkRtgTbwnIIaoKj20fgDGuSlUJtg+ZV8mv8RYAAp1qRLkQ77YAAAAABJRU5ErkJggg=="},7289:function(e,t,r){"use strict";r.d(t,"a",(function(){return M})),r.d(t,"b",(function(){return P})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return p})),r.d(t,"i",(function(){return d})),r.d(t,"j",(function(){return x})),r.d(t,"k",(function(){return T})),r.d(t,"l",(function(){return E})),r.d(t,"m",(function(){return A})),r.d(t,"n",(function(){return S})),r.d(t,"o",(function(){return R})),r.d(t,"p",(function(){return C})),r.d(t,"q",(function(){return w})),r.d(t,"r",(function(){return F})),r.d(t,"s",(function(){return I})),r.d(t,"t",(function(){return D})),r.d(t,"u",(function(){return j})),r.d(t,"v",(function(){return L})),r.d(t,"w",(function(){return l}));var i=r("38a4"),n=r("b2b2"),a=r("e431"),s=r("0b2d"),o=(r("f895"),r("7361"));function c(e=k){return[e[0],e[1],e[2],e[3]]}function l(e,t,r,i){return d(e,t,r,i,o["e"].get())}function u(e,t){return d(t[0],t[1],t[2],t[3],e)}function d(e,t,r,i,n=c()){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function h(e,t,r){return Object(a["m"])(r,e),r[3]=t,r}function p(e,t,r){const i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=Math.abs(i-1)>1e-5&&i>1e-12?1/Math.sqrt(i):1;return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function f(e,t,r,i=c()){const n=r[0]-t[0],a=r[1]-t[1],s=r[2]-t[2],o=e[0]-t[0],l=e[1]-t[1],u=e[2]-t[2],d=a*u-s*l,h=s*o-n*u,p=n*l-a*o,f=d*d+h*h+p*p,b=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;i[0]=d*b,i[1]=h*b,i[2]=p*b,i[3]=-(i[0]*e[0]+i[1]*e[1]+i[2]*e[2])}function b(e,t,r,i,n){if(e.count<3)return!1;e.getVec(r,g);let s=i,o=!1;for(;s<e.count-1&&!o;)e.getVec(s,y),s++,o=!Object(a["q"])(g,y);if(!o)return!1;for(s=Math.max(s,n),o=!1;s<e.count&&!o;)e.getVec(s,O),s++,Object(a["l"])(v,g,y),Object(a["t"])(v,v),Object(a["l"])(_,y,O),Object(a["t"])(_,_),o=!Object(a["q"])(g,O)&&!Object(a["q"])(y,O)&&Math.abs(Object(a["j"])(v,_))<m;return o?(f(g,y,O,t),!0):(0!==r||1!==i||2!==n)&&b(e,t,0,1,2)}const m=.99619469809,g=Object(s["f"])(),y=Object(s["f"])(),O=Object(s["f"])(),v=Object(s["f"])(),_=Object(s["f"])();function j(e,t,r){return t!==e&&u(e,t),e[3]=-Object(a["j"])(F(e),r),e}function w(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function x(e,t,r,i){return Object(a["i"])(O,t,e),p(r,O,i)}function T(e,t,r,i){return N(e,t,Object(a["l"])(o["d"].get(),r,t),z,i)}function S(e,t,r){return!!Object(n["k"])(t)&&N(e,t.origin,t.direction,B,r)}function E(e,t,r){return N(e,t.origin,t.vector,U.NONE,r)}function A(e,t,r){return N(e,t.origin,t.vector,U.CLAMP,r)}function C(e,t){return L(e,t)>=0}function R(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5];return e[0]*(e[0]>0?r:a)+e[1]*(e[1]>0?i:s)+e[2]*(e[2]>0?n:o)+e[3]>=0}function M(e,t){const r=Object(a["j"])(F(e),t.ray.direction),i=-L(e,t.ray.origin);if(i<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return i>0;if((i<0||r<0)&&!(i<0&&r<0))return!0;const n=i/r;return r>0?n<t.c1&&(t.c1=n):n>t.c0&&(t.c0=n),t.c0<=t.c1}function P(e,t){const r=Object(a["j"])(F(e),t.ray.direction),i=-L(e,t.ray.origin);if(r>-1e-6&&r<1e-6)return i>0;const n=i/r;return r>0?n<t.c1&&(t.c1=n):n>t.c0&&(t.c0=n),t.c0<=t.c1}function I(e,t,r){const i=Object(a["g"])(o["d"].get(),F(e),-e[3]),n=D(e,Object(a["l"])(o["d"].get(),t,i),o["d"].get());return Object(a["h"])(r,n,i),r}function D(e,t,r){const i=Object(a["g"])(o["d"].get(),F(e),Object(a["j"])(F(e),t));return Object(a["l"])(r,t,i),r}function L(e,t){return Object(a["j"])(F(e),t)+e[3]}function N(e,t,r,n,s){const o=Object(a["j"])(F(e),r);if(0===o)return!1;let c=-(Object(a["j"])(F(e),t)+e[3])/o;return n&U.CLAMP&&(c=Object(i["f"])(c,0,1)),!(!(n&U.INFINITE_MIN)&&c<0||!(n&U.INFINITE_MAX)&&c>1)&&(Object(a["h"])(s,t,Object(a["g"])(s,r,c)),!0)}function F(e){return e}const k=[0,0,1,0];var U;!function(e){e[e.NONE=0]="NONE",e[e.CLAMP=1]="CLAMP",e[e.INFINITE_MIN=4]="INFINITE_MIN",e[e.INFINITE_MAX=8]="INFINITE_MAX"}(U||(U={}));const z=U.INFINITE_MIN|U.INFINITE_MAX,B=U.INFINITE_MAX},7298:function(e,t,r){"use strict";var i,n,a;r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n})),function(e){e[e.USER=0]="USER",e[e.MANAGER=1]="MANAGER"}(i||(i={})),function(e){e[e.None=0]="None",e[e.Unfocused=1]="Unfocused",e[e.Focused=2]="Focused",e[e.Unselected=4]="Unselected",e[e.Selected=8]="Selected",e[e.All=15]="All"}(n||(n={})),function(e){e[e.None=0]="None",e[e.Custom1=16]="Custom1",e[e.Custom2=32]="Custom2",e[e.Custom3=64]="Custom3",e[e.Custom4=128]="Custom4",e[e.Custom5=256]="Custom5",e[e.Custom6=512]="Custom6",e[e.Custom7=1024]="Custom7",e[e.Custom8=2048]="Custom8",e[e.Custom9=4096]="Custom9",e[e.Custom10=8192]="Custom10",e[e.Custom11=16384]="Custom11",e[e.Custom12=32768]="Custom12",e[e.All=65520]="All"}(a||(a={}))},7304:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var i,n=r("5876"),a=r("3886"),s=r("b7bd");function o(e,t){t.componentData===i.Varying&&(e.vertex.uniforms.add("componentColorTex","sampler2D"),e.vertex.uniforms.add("componentColorTexInvDim","vec2"),e.attributes.add(s["a"].COMPONENTINDEX,"float"),e.varyings.add("vExternalColorMixMode","mediump float"),e.varyings.add("vExternalColor","vec4"),e.include(n["a"]),e.vertex.code.add(a["a"]`vec4 _readComponentColor() {
  1907. float normalizedIndex = (componentIndex + 0.5) * componentColorTexInvDim.x;
  1908. vec2 indexCoord = vec2(
  1909. mod(normalizedIndex, 1.0),
  1910. (floor(normalizedIndex) + 0.5) * componentColorTexInvDim.y
  1911. );
  1912. return texture2D(componentColorTex, indexCoord);
  1913. }
  1914. vec4 forwardExternalColor(out bool castShadows) {
  1915. vec4 componentColor = _readComponentColor() * 255.0;
  1916. float shadowFlag = mod(componentColor.b * 255.0, 2.0);
  1917. componentColor.b -= shadowFlag;
  1918. castShadows = shadowFlag >= 1.0;
  1919. int decodedColorMixMode;
  1920. vExternalColor = decodeSymbolColor(componentColor, decodedColorMixMode) * 0.003921568627451;
  1921. vExternalColorMixMode = float(decodedColorMixMode) + 0.5;
  1922. return vExternalColor;
  1923. }`),e.fragment.code.add(a["a"]`void readExternalColor(out vec4 externalColor, out int externalColorMixMode) {
  1924. externalColor = vExternalColor;
  1925. externalColorMixMode = int(vExternalColorMixMode);
  1926. }`)),t.componentData===i.Uniform&&(e.vertex.uniforms.add("externalColor","vec4"),e.fragment.uniforms.add("externalColorMixMode","int"),e.varyings.add("vExternalColor","vec4"),e.vertex.code.add(a["a"]`vec4 forwardExternalColor(out bool castShadows) {
  1927. vExternalColor = externalColor;
  1928. castShadows = true;
  1929. return externalColor;
  1930. }`),e.fragment.code.add(a["a"]`void readExternalColor(out vec4 color, out int colorMixMode) {
  1931. color = vExternalColor;
  1932. colorMixMode = externalColorMixMode;
  1933. }`))}!function(e){e[e.Uniform=0]="Uniform",e[e.Varying=1]="Varying",e[e.COUNT=2]="COUNT"}(i||(i={}))},7361:function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return b}));var i=r("f0b9"),n=r("2ab7"),a=r("dae5"),s=r("afe1"),o=r("b139"),c=r("02f1"),l=r("0b2d"),u=r("0fc4");class d{constructor(e,t,r){this.itemByteSize=e,this.itemCreate=t,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(r/this.itemByteSize)}get(){0===this._itemsPtr&&Object(n["a"])(()=>this._reset());const e=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=e;){const e=new ArrayBuffer(this._itemsPerBuffer*this.itemByteSize);for(let t=0;t<this._itemsPerBuffer;++t)this._items.push(this.itemCreate(e,t*this.itemByteSize));this._buffers.push(e)}return this._items[this._itemsPtr++]}_reset(){const e=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>e;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(e=h){return new d(16,c["d"],e)}static createVec3f64(e=h){return new d(24,l["e"],e)}static createVec4f64(e=h){return new d(32,u["c"],e)}static createMat3f64(e=h){return new d(72,a["a"],e)}static createMat4f64(e=h){return new d(128,s["b"],e)}static createQuatf64(e=h){return new d(32,o["d"],e)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this.itemByteSize}}}const h=4*i["a"].KILOBYTES,p=d.createVec2f64(),f=d.createVec3f64(),b=d.createVec4f64(),m=(d.createMat3f64(),d.createMat4f64()),g=d.createQuatf64()},"738e":function(e,t,r){"use strict";function i(){return new Float32Array(2)}function n(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function s(e,t){return new Float32Array(e,t,2)}function o(){return i()}function c(){return a(1,1)}function l(){return a(1,0)}function u(){return a(0,1)}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a}));const d=o(),h=c(),p=l(),f=u();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,zeros:o,ones:c,unitX:l,unitY:u,ZEROS:d,ONES:h,UNIT_X:p,UNIT_Y:f})},"73cb":function(e,t,r){"use strict";r.d(t,"a",(function(){return F}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("7ffa"),c=r("59b2"),l=r("cea0"),u=r("afcf"),d=r("d386");r("b50f"),r("c120");let h=i=class extends s["a"]{constructor(e){super(e),this.minValue=0,this.maxValue=0}clone(){return new i({minValue:this.minValue,maxValue:this.maxValue})}};Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],h.prototype,"minValue",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],h.prototype,"maxValue",void 0),h=i=Object(n["a"])([Object(d["a"])("esri.renderer.support.AuthoringInfoClassBreakInfo")],h);const p=h;var f;let b=f=class extends s["a"]{constructor(e){super(e),this.field="",this.normalizationField="",this.label="",this.classBreakInfos=[]}clone(){return new f({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:Object(o["a"])(this.classBreakInfos)})}};Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],b.prototype,"field",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],b.prototype,"normalizationField",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],b.prototype,"label",void 0),Object(n["a"])([Object(c["b"])({type:[p],json:{write:!0}})],b.prototype,"classBreakInfos",void 0),b=f=Object(n["a"])([Object(d["a"])("esri.renderers.support.AuthoringInfoFieldInfo")],b);const m=b;var g,y=r("1a3e");const O=new a["a"]({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),v=new a["a"]({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),_={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},j=["high-to-low","above-and-below","centered-on","extremes"],w=[...new Set(["high-to-low","above-and-below","centered-on","extremes","90-10","above","below","high-to-low","above-and-below","90-10","above","below"])],x=["seconds","minutes","hours","days","months","years"];let T=g=class extends s["a"]{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return"string"==typeof e||"number"==typeof e?e:null}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get style(){return"color"===this.type?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new g({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};Object(n["a"])([Object(c["b"])({types:_,json:{write:!0}})],T.prototype,"endTime",void 0),Object(n["a"])([Object(y["a"])("endTime")],T.prototype,"castEndTime",null),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],T.prototype,"field",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],T.prototype,"maxSliderValue",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],T.prototype,"minSliderValue",void 0),Object(n["a"])([Object(c["b"])({types:_,json:{write:!0}})],T.prototype,"startTime",void 0),Object(n["a"])([Object(y["a"])("startTime")],T.prototype,"castStartTime",null),Object(n["a"])([Object(c["b"])({type:O.apiValues,value:null,json:{type:O.jsonValues,read:O.read,write:O.write}})],T.prototype,"style",null),Object(n["a"])([Object(c["b"])({type:w,value:null,json:{type:w,origins:{"web-scene":{type:j,write:{writer:(e,t)=>{j.indexOf(e)>-1&&(t.theme=e)}}}},write:!0}})],T.prototype,"theme",null),Object(n["a"])([Object(c["b"])({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],T.prototype,"type",void 0),Object(n["a"])([Object(c["b"])({type:x,json:{type:x,write:!0}})],T.prototype,"units",void 0),T=g=Object(n["a"])([Object(d["a"])("esri.renderers.support.AuthoringInfoVisualVariable")],T);const S=T;var E,A=r("f830");const C=new a["a"]({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),R=new a["a"]({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density",flow:"flow"}),M=new a["a"]({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),P=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers","decimal-degrees"],I=["high-to-low","above-and-below","above","below","90-10"],D=["flow-line","wave-front"],L=["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"];let N=E=class extends s["a"]{constructor(e){super(e),this.colorRamp=null,this.lengthUnit=null,this.maxSliderValue=null,this.minSliderValue=null,this.visualVariables=null}get classificationMethod(){const e=this._get("classificationMethod"),t=this.type;return t&&"relationship"!==t?"class-breaks-size"===t||"class-breaks-color"===t?e||"manual":null:e}set classificationMethod(e){this._set("classificationMethod",e)}readColorRamp(e){if(e)return Object(A["a"])(e)}get fields(){return this.type&&"predominance"!==this.type?null:this._get("fields")}set fields(e){this._set("fields",e)}get field1(){return this.type&&"relationship"!==this.type?null:this._get("field1")}set field1(e){this._set("field1",e)}get field2(){return this.type&&"relationship"!==this.type?null:this._get("field2")}set field2(e){this._set("field2",e)}get flowTheme(){return"flow"===this.type?this._get("flowTheme"):null}set flowTheme(e){this._set("flowTheme",e)}get focus(){return this.type&&"relationship"!==this.type?null:this._get("focus")}set focus(e){this._set("focus",e)}get numClasses(){return this.type&&"relationship"!==this.type?null:this._get("numClasses")}set numClasses(e){this._set("numClasses",e)}get statistics(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("statistics"):null}set statistics(e){this._set("statistics",e)}get standardDeviationInterval(){const e=this.type;return e&&"relationship"!==e&&"class-breaks-size"!==e&&"class-breaks-color"!==e||this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")}set standardDeviationInterval(e){this._set("standardDeviationInterval",e)}get type(){return this._get("type")}set type(e){let t=e;"classed-size"===e?t="class-breaks-size":"classed-color"===e&&(t="class-breaks-color"),this._set("type",t)}get univariateSymbolStyle(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("univariateSymbolStyle"):null}set univariateSymbolStyle(e){this._set("univariateSymbolStyle",e)}get univariateTheme(){return"univariate-color-size"===this.type?this._get("univariateTheme"):null}set univariateTheme(e){this._set("univariateTheme",e)}clone(){return new E({classificationMethod:this.classificationMethod,colorRamp:Object(o["a"])(this.colorRamp),fields:this.fields&&this.fields.slice(0),field1:Object(o["a"])(this.field1),field2:Object(o["a"])(this.field2),focus:this.focus,numClasses:this.numClasses,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,lengthUnit:this.lengthUnit,statistics:this.statistics,standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(e=>e.clone()),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme,flowTheme:this.flowTheme})}};Object(n["a"])([Object(c["b"])({type:C.apiValues,value:null,json:{type:C.jsonValues,read:C.read,write:C.write,origins:{"web-document":{default:"manual",type:C.jsonValues,read:C.read,write:C.write}}}})],N.prototype,"classificationMethod",null),Object(n["a"])([Object(c["b"])({types:A["b"],json:{write:!0}})],N.prototype,"colorRamp",void 0),Object(n["a"])([Object(u["a"])("colorRamp")],N.prototype,"readColorRamp",null),Object(n["a"])([Object(c["b"])({type:[String],value:null,json:{write:!0}})],N.prototype,"fields",null),Object(n["a"])([Object(c["b"])({type:m,value:null,json:{write:!0}})],N.prototype,"field1",null),Object(n["a"])([Object(c["b"])({type:m,value:null,json:{write:!0}})],N.prototype,"field2",null),Object(n["a"])([Object(c["b"])({type:D,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],N.prototype,"flowTheme",null),Object(n["a"])([Object(c["b"])({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],N.prototype,"focus",null),Object(n["a"])([Object(c["b"])({type:Number,value:null,json:{type:l["a"],write:!0}})],N.prototype,"numClasses",null),Object(n["a"])([Object(c["b"])({type:P,json:{type:P,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],N.prototype,"lengthUnit",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],N.prototype,"maxSliderValue",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],N.prototype,"minSliderValue",void 0),Object(n["a"])([Object(c["b"])({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],N.prototype,"statistics",null),Object(n["a"])([Object(c["b"])({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],N.prototype,"standardDeviationInterval",null),Object(n["a"])([Object(c["b"])({type:R.apiValues,value:null,json:{type:R.jsonValues,read:R.read,write:R.write,origins:{"web-scene":{type:M.jsonValues,write:{writer:M.write,overridePolicy:e=>({enabled:"flow"!==e})}}}}})],N.prototype,"type",null),Object(n["a"])([Object(c["b"])({type:[S],json:{write:!0}})],N.prototype,"visualVariables",void 0),Object(n["a"])([Object(c["b"])({type:L,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],N.prototype,"univariateSymbolStyle",null),Object(n["a"])([Object(c["b"])({type:I,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],N.prototype,"univariateTheme",null),N=E=Object(n["a"])([Object(d["a"])("esri.renderers.support.AuthoringInfo")],N);const F=N},"73d4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("dfaf"),n=r("7cb4"),a=r("5211"),s=r("3886");function o(e,t){const r=e.fragment;t.baseColorTexture?(e.include(n["a"],t),r.uniforms.add("baseColorTexture","sampler2D"),r.uniforms.add("baseColorTextureSize","vec2"),t.attributeTextureCoordinates===i["b"].Atlas?(e.include(a["a"]),r.code.add(s["a"]`vec4 readBaseColorTexture() {
  1934. return textureAtlasLookup(
  1935. baseColorTexture,
  1936. baseColorTextureSize,
  1937. vuv0,
  1938. vuvRegion
  1939. );
  1940. }`)):r.code.add(s["a"]`vec4 readBaseColorTexture() {
  1941. return texture2D(baseColorTexture, vuv0);
  1942. }`)):r.code.add(s["a"]`vec4 readBaseColorTexture() { return vec4(1.0); }`)}},7438:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return p})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return u}));var i=r("b7c2"),n=r("d17d"),a=r("189c");const s=Object(a["h"])(n["b"].SRC_ALPHA,n["b"].ONE,n["b"].ONE_MINUS_SRC_ALPHA,n["b"].ONE_MINUS_SRC_ALPHA),o=Object(a["i"])(n["b"].ONE,n["b"].ONE),c=Object(a["i"])(n["b"].ZERO,n["b"].ONE_MINUS_SRC_ALPHA);function l(e){return e===i["l"].FrontFace?null:e===i["l"].Alpha?c:o}function u(e){return e===i["l"].FrontFace?a["e"]:null}const d=5e5,h={factor:-1,units:-2};function p(e){return e?h:null}function f(e,t=n["h"].LESS){return e===i["l"].NONE||e===i["l"].FrontFace?t:n["h"].LEQUAL}},"748fd":function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return p}));var i=r("ce6d"),n=r("af40"),a=r("b2b2"),s=r("8a44"),o=r("b7c2"),c=r("003f"),l=r("2765");const u=["layerObjectAdded","layerObjectRemoved","layerObjectsAdded","layerObjectsRemoved","shaderTransformationChanged","objectTransformation","visibilityChanged","occlusionChanged","highlightChanged","objectGeometryAdded","objectGeometryRemoved","vertexAttrsUpdated"];var d=r("0bde");class h extends c["a"]{constructor(e,t=""){var r,a,c;super(),this.apiLayerUid=t,this.type=l["a"].Layer,this.events=new i["a"],this.isSliceable=!1,this._objects=new s["a"],this._stageHandles=new n["a"],this.apiLayerUid=t,this.isVisible=null==(r=null==e?void 0:e.isVisible)||r,this.isPickable=null==(a=null==e?void 0:e.isPickable)||a,this.updatePolicy=null!=(c=null==e?void 0:e.updatePolicy)?c:o["m"].ASYNC}get objects(){return this._objects}destroy(){this.detachStage(),this._stage=null}attachStage(e){this.detachStage(),this._stage=e;for(const t of u)this._stageHandles.add(this.events.on(t,r=>e.handleEvent(t,r)))}detachStage(){this._stageHandles.removeAll(),this.invalidateSpatialQueryAccelerator()}add(e){this._objects.push(e),e.parentLayer=this,this.events.emit("layerObjectAdded",{layer:this,object:e}),Object(a["k"])(this._octree)&&this._octree.add([e])}remove(e){this._objects.removeUnordered(e)&&(e.parentLayer=null,this.events.emit("layerObjectRemoved",{layer:this,object:e}),Object(a["k"])(this._octree)&&this._octree.remove([e]))}addMany(e){this._objects.pushArray(e);for(const t of e)t.parentLayer=this;this.events.emit("layerObjectsAdded",{layer:this,objects:e}),Object(a["k"])(this._octree)&&this._octree.add(e)}removeMany(e){const t=new Array;if(this._objects.removeUnorderedMany(e,e.length,t),0!==t.length){for(const e of t)e.parentLayer=null;this.events.emit("layerObjectsRemoved",{layer:this,objects:t}),Object(a["k"])(this._octree)&&this._octree.remove(t)}}sync(){Object(a["k"])(this._stage)&&this.updatePolicy!==o["m"].SYNC&&this._stage.syncLayer(this.id)}notifyObjectBBChanged(e,t){Object(a["k"])(this._octree)&&this._octree.update(e,t)}getSpatialQueryAccelerator(){return Object(a["j"])(this._octree)&&this._objects.length>50&&this._createOctree(),this._octree}shaderTransformationChanged(){this.invalidateSpatialQueryAccelerator(),this.events.emit("shaderTransformationChanged",this)}invalidateSpatialQueryAccelerator(){this._octree=Object(a["d"])(this._octree)}_createOctree(){this._octree=new d["b"](e=>e.boundingVolumeWorldSpace.bounds),this._octree.add(this._objects.data,this._objects.length)}}function p(e){return Object(a["k"])(e)&&e.type===l["a"].Layer}},"74b6":function(e,t,r){"use strict";r("d8be")},"74bd":function(e,t,r){"use strict";function i(e){return!!e&&e.prototype&&e.prototype.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(t,"a",(function(){return i}))},"74df":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return y}));var i=r("b2b2"),n=r("d791"),a=r("afe1"),s=r("e431"),o=r("0b2d"),c=r("8188"),l=r("2e0f"),u=r("ba58"),d=r("6611"),h=r("0cb9"),p=r("b7bd");function f(e,t,r,i){const n=e.stageObject,a=n.geometryRecords;let s=0;for(const o of a){const{update:e,averageGeometrySampledElevation:a}=S(o,t,r,i);s+=a,e&&n.geometryVertexAttrsUpdated(o)}return s/a.length}function b(e,t,r,i){const a=e.stageObject,o=t.centerPointInElevationSR;let h=0;a.metadata.usesVerticalDistanceToGround?(Object(l["g"])(o,r,t,i,T),Object(u["i"])(a,T.verticalDistanceToGround),h=T.sampledElevation):(Object(l["g"])(o,r,t,i,T),"absolute-height"!==t.mode&&(h=T.sampledElevation));const p=Object(n["d"])(m,a.transformation),f=Object(s["y"])(x,p[12],p[13],p[14]);d["a"].TESTS_DISABLE_OPTIMIZATIONS?(v[0]=o.x,v[1]=o.y,v[2]=T.z,Object(c["d"])(o.spatialReference,v,p,i.spatialReference)&&(a.transformation=p)):i.setAltitudeOfTransformation(T.z,p);const b=O/i.unitInMeters;return(Math.abs(p[12]-f[0])>=b||Math.abs(p[13]-f[1])>=b||Math.abs(p[14]-f[2])>=b)&&(a.transformation=p),h}const m=Object(a["d"])();function g(e,t,r,n){const a=e.graphics3DSymbolLayer.lodRenderer;if(Object(i["j"])(a))return 0;const o=t.centerPointInElevationSR;Object(l["g"])(o,r,t,n,T);const u="absolute-height"!==t.mode?T.sampledElevation:0,h=a.instanceData,p=e.instanceIndex,f=w;h.getGlobalTransform(p,f);const b=Object(s["y"])(x,f[12],f[13],f[14]);d["a"].TESTS_DISABLE_OPTIMIZATIONS?(v[0]=o.x,v[1]=o.y,v[2]=T.z,Object(c["d"])(o.spatialReference,v,f,n.spatialReference)&&h.setGlobalTransform(p,f)):n.setAltitudeOfTransformation(T.z,f);const m=O/n.unitInMeters;return(d["a"].TESTS_DISABLE_OPTIMIZATIONS||Math.abs(f[12]-b[0])>=m||Math.abs(f[13]-b[1])>=m||Math.abs(f[14]-b[2])>=m)&&h.setGlobalTransform(p,f),u}function y(e,t,r,i){const n=e.stageObject,a=n.geometryRecords;if(0===a.length)return 0;let s=0,o=null,c=0,l=!1;for(const u of a){const e=u.geometry.vertexAttributes.get(p["a"].POSITION);if(e!==o){const{update:n,averageGeometrySampledElevation:a}=S(u,t,r,i);c=a,o=e,l=n}l&&n.geometryVertexAttrsUpdated(u),s+=c}return s/a.length}const O=.01,v=Object(o["f"])(),_=Object(o["f"])(),j=Object(o["f"])(),w=Object(a["d"])(),x=Object(o["f"])(),T=new l["a"];function S(e,t,r,i){let n=!1;const a=r.spatialReference,s=e.geometry,o=e.getShaderTransformation(),u=t.requiresSampledElevationInfo;_[0]=o[12],_[1]=o[13],_[2]=o[14],s.invalidateBoundingInfo();const f=s.getMutableAttribute(p["a"].POSITION),b=f.data,m=s.vertexAttributes.get(p["a"].MAPPOS).data,g=f.size,y=b.length/g,w=new h["a"](m,a);let x=0,S=0;for(let h=0;h<y;h++){if(j[0]=b[x],j[1]=b[x+1],j[2]=b[x+2],Object(l["g"])(w,r,t,i,T),u&&(S+=T.sampledElevation),d["a"].TESTS_DISABLE_OPTIMIZATIONS)b[x]=w.array[w.offset],b[x+1]=w.array[w.offset+1],b[x+2]=T.z,Object(c["p"])(b,a,x,b,i.spatialReference,x,1),b[x]-=_[0],b[x+1]-=_[1],b[x+2]-=_[2],n=!0;else{v[0]=b[x]+_[0],v[1]=b[x+1]+_[1],v[2]=b[x+2]+_[2],i.setAltitude(v,T.z),b[x]=v[0]-_[0],b[x+1]=v[1]-_[1],b[x+2]=v[2]-_[2];const e=O/i.unitInMeters;(Math.abs(j[0]-b[x])>=e||Math.abs(j[1]-b[x+1])>=e||Math.abs(j[2]-b[x+2])>=e)&&(n=!0)}x+=g,w.offset+=3}return S/=y,{update:n,averageGeometrySampledElevation:S}}},"74e2":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return s}));var i=r("fa8a");function n(e){return"point"===e||"multipoint"===e||"polyline"===e||"polygon"===e}const a=Object(i["b"])()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),s=Object(i["b"])()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},7533:function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var i,n=r("a4ee"),a=r("2c4f"),s=r("7ffa"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("6005"),d=r("e1bb"),h=r("c528"),p=r("a957"),f=r("38bf"),b=r("333a");const m=a["a"].ofType({base:null,key:"type",typeMap:{icon:u["a"],object:d["a"],text:p["a"]}});let g=i=class extends h["a"]{constructor(e){super(e),this.verticalOffset=null,this.callout=null,this.symbolLayers=new m,this.type="point-3d"}supportsCallout(){if((this.symbolLayers?this.symbolLayers.length:0)<1)return!1;for(const e of this.symbolLayers.items)switch(e.type){case"icon":case"text":case"object":continue;default:return!1}return!0}hasVisibleCallout(){return Object(f["c"])(this)}hasVisibleVerticalOffset(){return Object(f["d"])(this)}clone(){return new i({verticalOffset:Object(s["a"])(this.verticalOffset),callout:Object(s["a"])(this.callout),styleOrigin:Object(s["a"])(this.styleOrigin),symbolLayers:Object(s["a"])(this.symbolLayers),thumbnail:Object(s["a"])(this.thumbnail)})}static fromSimpleMarkerSymbol(e){return new i({symbolLayers:[u["a"].fromSimpleMarkerSymbol(e)]})}static fromPictureMarkerSymbol(e){return new i({symbolLayers:[u["a"].fromPictureMarkerSymbol(e)]})}static fromCIMSymbol(e){var t,r;return"CIMPointSymbol"!==(null==(t=e.data)||null==(r=t.symbol)?void 0:r.type)?null:e.data.symbol.callout?new i({symbolLayers:[u["a"].fromCIMSymbol(e)],callout:{type:"line",size:.5,color:[0,0,0]},verticalOffset:{screenLength:40}}):new i({symbolLayers:[u["a"].fromCIMSymbol(e)]})}static fromTextSymbol(e){return new i({symbolLayers:[p["a"].fromTextSymbol(e)]})}};Object(n["a"])([Object(o["b"])({type:b["a"],json:{write:!0}})],g.prototype,"verticalOffset",void 0),Object(n["a"])([Object(o["b"])(f["a"])],g.prototype,"callout",void 0),Object(n["a"])([Object(o["b"])({type:m,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"symbolLayers",void 0),Object(n["a"])([Object(c["a"])({PointSymbol3D:"point-3d"},{readOnly:!0})],g.prototype,"type",void 0),g=i=Object(n["a"])([Object(l["a"])("esri.symbols.PointSymbol3D")],g);const y=g},"755e":function(e,t,r){"use strict";function i(e){return function(t,r){t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}}r.d(t,"a",(function(){return i}))},7577:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return x})),r.d(t,"e",(function(){return O})),r.d(t,"f",(function(){return v})),r.d(t,"g",(function(){return R})),r.d(t,"h",(function(){return M})),r.d(t,"i",(function(){return y})),r.d(t,"j",(function(){return T})),r.d(t,"k",(function(){return w})),r.d(t,"l",(function(){return a})),r.d(t,"m",(function(){return E})),r.d(t,"n",(function(){return U}));var i=r("4212");function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function s(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function o(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function l(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function d(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function h(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function p(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function f(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function b(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function m(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e}function g(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+a*a)}function y(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+i*i+n*n+a*a}function O(e){const t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}function v(e){const t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}function _(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function j(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function w(e,t){const r=t[0],i=t[1],n=t[2],a=t[3];let s=r*r+i*i+n*n+a*a;return s>0&&(s=1/Math.sqrt(s),e[0]=r*s,e[1]=i*s,e[2]=n*s,e[3]=a*s),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function T(e,t,r,i){const n=t[0],a=t[1],s=t[2],o=t[3];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e[2]=s+i*(r[2]-s),e[3]=o+i*(r[3]-o),e}function S(e,t){let r,n,a,s,o,c;t=t||1;do{r=2*Object(i["b"])()-1,n=2*Object(i["b"])()-1,o=r*r+n*n}while(o>=1);do{a=2*Object(i["b"])()-1,s=2*Object(i["b"])()-1,c=a*a+s*s}while(c>=1);const l=Math.sqrt((1-o)/c);return e[0]=t*r,e[1]=t*n,e[2]=t*a*l,e[3]=t*s*l,e}function E(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*s,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*s,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*s,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*s,e}function A(e,t,r){const i=t[0],n=t[1],a=t[2],s=r[0],o=r[1],c=r[2],l=r[3],u=l*i+o*a-c*n,d=l*n+c*i-s*a,h=l*a+s*n-o*i,p=-s*i-o*n-c*a;return e[0]=u*l+p*-s+d*-c-h*-o,e[1]=d*l+p*-o+h*-s-u*-c,e[2]=h*l+p*-c+u*-o-d*-s,e[3]=t[3],e}function C(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function R(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function M(e,t){const r=e[0],n=e[1],a=e[2],s=e[3],o=t[0],c=t[1],l=t[2],u=t[3];return Math.abs(r-o)<=i["a"]*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-c)<=i["a"]*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(a-l)<=i["a"]*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(s-u)<=i["a"]*Math.max(1,Math.abs(s),Math.abs(u))}const P=o,I=c,D=l,L=g,N=y,F=O,k=v,U=Object.freeze({__proto__:null,copy:n,set:a,add:s,subtract:o,multiply:c,divide:l,ceil:u,floor:d,min:h,max:p,round:f,scale:b,scaleAndAdd:m,distance:g,squaredDistance:y,length:O,squaredLength:v,negate:_,inverse:j,normalize:w,dot:x,lerp:T,random:S,transformMat4:E,transformQuat:A,str:C,exactEquals:R,equals:M,sub:P,mul:I,div:D,dist:L,sqrDist:N,len:F,sqrLen:k})},7585:function(e,t,r){"use strict";r.d(t,"a",(function(){return Ee})),r.d(t,"b",(function(){return Oe})),r.d(t,"c",(function(){return Ae}));var i=r("a4ee"),n=r("fc29"),a=r("ce6d"),s=r("af40"),o=r("e92d"),c=r("28eb"),l=r("b2b2"),u=r("8a44"),d=r("c47a"),h=r("3795"),p=r("59b2"),f=(r("b50f"),r("c120"),r("cea0"),r("d386")),b=r("d791"),m=r("02f1"),g=r("0b2d"),y=r("afe1"),O=r("3c9c"),v=r("648c"),_=r("6611"),j=r("9b8b"),w=r("4294"),x=r("738e"),T=r("d17d"),S=r("d267");class E{constructor(e,t){this.size=Object(x["a"])(),this._fbo=null,this._fbo=new S["a"](e,{colorTarget:T["y"].TEXTURE,depthStencilTarget:T["m"].NONE},{target:T["A"].TEXTURE_2D,pixelFormat:T["p"].RGBA,dataType:T["q"].UNSIGNED_BYTE,wrapMode:T["B"].CLAMP_TO_EDGE,samplingMode:T["z"].LINEAR_MIPMAP_LINEAR,hasMipmap:t,maxAnisotropy:8,width:0,height:0})}dispose(){this._fbo=Object(l["e"])(this._fbo)}getTexture(){return this._fbo?this._fbo.colorTexture:null}isValid(){return null!==this._fbo}resize(e,t){this.size[0]=e,this.size[1]=t,this._fbo.resize(this.size[0],this.size[1])}bind(e){e.bindFramebuffer(this._fbo)}generateMipMap(){this._fbo.colorTexture.descriptor.hasMipmap&&this._fbo.colorTexture.generateMipmap()}disposeRenderTargetMemory(){var e;null==(e=this._fbo)||e.resize(0,0)}get gpuMemoryUsage(){var e,t;return null!=(e=null==(t=this._fbo)?void 0:t.gpuMemoryUsage)?e:0}}var A=r("614d");class C{constructor(e){const t=(t,r,i=!0)=>({type:r,fbo:new E(e,i),renderPass:t,valid:!1,lastUsed:1/0});this.renderTargets=[t(A["a"].MATERIAL,j["d"].Color),t(A["a"].MATERIAL,j["d"].ColorNoRasterImage),t(A["a"].MATERIAL_HIGHLIGHT,j["d"].Highlight,!1),t(A["a"].MATERIAL_NORMAL,j["d"].Water),t(A["a"].MATERIAL,j["d"].Occluded)]}getTarget(e){return this.renderTargets[e].fbo}dispose(){for(const e of this.renderTargets)e.fbo.dispose()}disposeRenderTargetMemory(){for(const e of this.renderTargets)e.fbo.disposeRenderTargetMemory()}validateUsageForTarget(e,t,r){if(e)t.lastUsed=r;else if(r-t.lastUsed>R)t.fbo.disposeRenderTargetMemory(),t.lastUsed=1/0;else if(t.lastUsed<1/0)return!0;return!1}get gpuMemoryUsage(){return this.renderTargets.reduce((e,t)=>e+t.fbo.gpuMemoryUsage,0)}}const R=1e3;var M=r("0e88"),P=r("70a2"),I=r("b7c2"),D=r("171c"),L=(r("2dd4"),r("d5f7")),N=r("fdc9b"),F=r("9def"),k=r("191a");let U=class extends n["a"]{constructor(){super(...arguments),this._pending=new z,this._changes=new N["a"],this._materialRenderers=new Map,this._sortedMaterialRenderers=new u["a"],this._hasHighlights=!1,this._hasWater=!1}destroy(){this._changes.prune(),this._materialRenderers.forEach(e=>e.dispose()),this._materialRenderers.clear(),this._sortedMaterialRenderers.clear()}get updating(){return!this._pending.empty||this._changes.updates.length>0}get hasHighlights(){return this._hasHighlights}get hasWater(){return this._hasWater}get rendersOccluded(){return Object(c["c"])(this._materialRenderers,e=>e.rendersOccluded)}get isEmpty(){return!this.updating&&0===this._materialRenderers.size}commitChanges(){if(!this.updating)return!1;this._processAddsRemoves();const e=Object(F["a"])(this._changes);let t=!1,r=!1,i=!1;return e.forEach((e,n)=>{let a=this._materialRenderers.get(n);if(!a&&e.adds.length>0&&(a=new k["a"](this.rctx,this.materialRepository,n),this._materialRenderers.set(n,a),t=!0,r=!0,i=!0),!a)return;const s=r||a.hasHighlights,o=i||a.hasWater;a.modify(e),r=r||s!==a.hasHighlights,i=i||o!==a.hasWater,a.isEmpty&&(this._materialRenderers.delete(n),a.dispose(),t=!0)}),this._changes.clear(),t&&this._updateSortedMaterialRenderers(),r&&(this._hasHighlights=Object(c["c"])(this._materialRenderers,e=>e.hasHighlights)),i&&(this._hasWater=Object(c["c"])(this._materialRenderers,e=>e.hasWater)),this.notifyChange("updating"),!0}add(e){if(0===e.length)return;const t=this._pending.empty;for(const r of e)this._pending.adds.add(r);t&&this.notifyChange("updating")}remove(e){const t=this._pending.empty;for(const r of e)this._pending.adds.has(r)?(this._pending.removed.add(r),this._pending.adds.delete(r)):this._pending.removed.has(r)||this._pending.removes.add(r);t&&!this._pending.empty&&this.notifyChange("updating")}modify(e,t){const r=0===this._changes.updates.length;for(const i of e){const e=this._changes.updates.pushNew();e.renderGeometry=i,e.updateType=t}r&&this._changes.updates.length>0&&this.notifyChange("updating")}updateAnimation(e){let t=!1;return this._sortedMaterialRenderers.forAll(({materialRenderer:r})=>t=r.updateAnimation(e)||t),t}render(e,t){for(let r=0;r<this._sortedMaterialRenderers.length;r++){const i=this._sortedMaterialRenderers.data[r];i.material.shouldRender(e)&&i.materialRenderer.render(t.slot,e.pass,t)}}_updateSortedMaterialRenderers(){this._sortedMaterialRenderers.clear();let e=0;this._materialRenderers.forEach((t,r)=>{r.insertOrder=e++,this._sortedMaterialRenderers.push({material:r,materialRenderer:t})}),this._sortedMaterialRenderers.sort((e,t)=>{const r=t.material.renderPriority-e.material.renderPriority;return 0!==r?r:e.material.insertOrder-t.material.insertOrder})}_processAddsRemoves(){this._changes.adds.clear(),this._changes.removes.clear(),this._changes.adds.pushArray(Array.from(this._pending.adds)),this._changes.removes.pushArray(Array.from(this._pending.removes));for(let e=0;e<this._changes.updates.length;){const t=this._changes.updates.data[e];this._pending.has(t.renderGeometry)?this._changes.updates.removeUnorderedIndex(e):e++}this._pending.clear()}get test(){return{sortedMaterialRenderers:this._sortedMaterialRenderers}}};Object(i["a"])([Object(p["b"])()],U.prototype,"rctx",void 0),Object(i["a"])([Object(p["b"])()],U.prototype,"materialRepository",void 0),Object(i["a"])([Object(p["b"])()],U.prototype,"updating",null),U=Object(i["a"])([Object(f["a"])("esri.views.3d.webgl-engine.lib.SortedRenderGeometryRenderer")],U);class z{constructor(){this.adds=new Set,this.removes=new Set,this.removed=new Set}get empty(){return 0===this.adds.size&&0===this.removes.size&&0===this.removed.size}has(e){return this.adds.has(e)||this.removes.has(e)||this.removed.has(e)}clear(){this.adds.clear(),this.removes.clear(),this.removed.clear()}}var B=r("6795"),V=r("c3a4"),G=r("ca98"),H=r("da35"),q=r("fa1e"),W=r("7438"),$=r("c829"),Z=r("b691"),X=r("189c"),Y=r("77f2");class J extends G["a"]{constructor(e,t){super(e,t,()=>this.destroy())}initializeProgram(e){const t=J.shader.get().build({mode:this.configuration.mode});return new $["a"](e.rctx,t,q["a"])}initializePipeline(e){return Object(X["g"])({blending:W["d"],colorWrite:X["d"],depthTest:null,depthWrite:null})}bindPass(e,t){const{densityMap:r,colorRamp:i,maxDensity:n,minDensity:a,searchRadius:s}=e;this.program.bindTexture(r,"densityMap"),this.program.bindTexture(i,"tex"),this.configuration.mode===Y["a"].KernelDensity&&this.program.setUniform1f("densityMultiplier",3/(s*s*Math.PI)),this.program.setUniform1f("densityNormalizer",1/(n-a)),this.program.setUniform1f("minDensity",a)}get primitiveType(){return T["r"].TRIANGLE_STRIP}}J.shader=new V["a"](Z["a"],()=>r.e("chunk-2d0daeb4").then(r.bind(null,"6e3b")));class Q extends H["a"]{constructor(){super(...arguments),this.mode=Y["a"].GaussianBlur}}Object(i["a"])([Object(H["b"])()],Q.prototype,"mode",void 0);var K=r("a1ff"),ee=r("8539");let te=class extends U{constructor(){super(...arguments),this.type="draped-heatmap"}initialize(){super.initialize();const e={colorTarget:T["y"].TEXTURE,depthStencilTarget:T["m"].NONE,width:0,height:0},{capabilities:t}=this.rctx,{R32F:r}=t.colorBufferFloat,{textureFloatLinear:i}=t.textureFloat,n=null!=r,a={target:T["A"].TEXTURE_2D,pixelFormat:n?T["p"].RED:T["p"].RGBA,internalFormat:n?T["v"].R32F:T["p"].RGBA,dataType:T["q"].FLOAT,samplingMode:i?T["z"].LINEAR:T["z"].NEAREST,wrapMode:T["B"].CLAMP_TO_EDGE,width:0,height:0};this._densityMap=new S["a"](this.rctx,e,a),this._quad=Object(L["d"])(this.rctx);const s={target:T["A"].TEXTURE_2D,pixelFormat:T["p"].RGBA,dataType:T["q"].UNSIGNED_BYTE,samplingMode:T["z"].LINEAR,wrapMode:T["B"].CLAMP_TO_EDGE,width:1,height:1},o=new K["a"](this.rctx,s,new Uint8ClampedArray(4));this._colorRamp=o,this._technique=new J({rctx:this.rctx,viewingMode:O["a"].Local},new Q),this._heatmapParameters={colorRamp:o,densityMap:this._densityMap.colorTexture,searchRadius:1,minDensity:0,maxDensity:100,fieldTotal:0}}destroy(){this._technique=Object(l["r"])(this._technique),this._densityMap=Object(l["e"])(this._densityMap),this._quad=Object(l["e"])(this._quad),this._colorRamp=Object(l["e"])(this._colorRamp)}get hasHighlights(){return!1}get hasWater(){return!1}get rendersOccluded(){return!1}get _heatmapDensityMaterialRenderers(){return this._sortedMaterialRenderers.filter(re)}add(e){super.add(e)}remove(e){super.remove(e)}render(e,t){const r=this._heatmapDensityMaterialRenderers,i=r.length;if(i<1)return;const n=this.rctx.getBoundFramebufferObject(),a=this.rctx.getViewport(),s=r[0].material.parameters,{pixelRatio:o}=s,c=Math.ceil(a.width*o),u=Math.ceil(a.height*o);this._densityMap.resize(c,u),this.rctx.bindFramebuffer(this._densityMap),this.rctx.setViewport(0,0,c,u),this.rctx.clear(T["e"].COLOR_BUFFER_BIT);let d=!1;for(let l=0;l<i;l++){const i=r[l];i.material.shouldRender(e)&&(d=d||i.materialRenderer.render(t.slot,e.pass,t))}if(this.rctx.bindFramebuffer(n),this.rctx.setViewport(a.x,a.y,a.width,a.height),!d)return;const{searchRadius:h,minDensity:p,maxDensity:f,fieldTotal:b,colorRampData:m}=s,g=this._heatmapParameters;if(g.searchRadius=h,g.fieldTotal=b,g.searchRadius=h,g.minDensity=p,g.maxDensity=f,Object(l["k"])(m)&&m!==this._colorRampData){const{colorRamp:e}=g,t=e.descriptor.width,r=m.length/4;r!==t&&e.resize(r,1),e.setData(m),this._colorRampData=m}this.rctx.bindVAO(this._quad),this.rctx.useProgram(this._technique.program),this._technique.bindPipelineState(this.rctx),this._technique.bindPass(g,t),this.rctx.drawArrays(this._technique.primitiveType,0,Object(ee["f"])(this._quad,"geometry"))}};function re(e){return Object(B["b"])(e.material)}te=Object(i["a"])([Object(f["a"])("esri.views.3d.webgl-engine.lib.DrapedHeatmapRenderer")],te);var ie=r("4395"),ne=r("adf1"),ae=r("9250"),se=r("1942"),oe=r("35b3"),ce=r("3bd5"),le=r("d6e5"),ue=r("badc"),de=r("7aed"),he=r("2bc9"),pe=r("2245"),fe=r("c1c0"),be=r("e508"),me=r("079ae"),ge=r("9305");const ye=o["a"].getLogger("esri.views.3d.webgl-engine.lib.OverlayRenderer");let Oe=class extends(Object(P["b"])(n["a"])){constructor(e){super(e),this._overlays=null,this._overlayRenderTarget=null,this._hasHighlights=!1,this._rendersOccluded=!1,this._hasWater=!1,this._lighting=new pe["a"],this._handles=new s["a"],this._frameTask=ge["a"],this._layerRenderers=new Map,this._sortedLayerRenderersDirty=!1,this._sortedLayerRenderers=new u["a"],this._geometries=new Map,this.worldToPCSRatio=1,this.events=new a["a"],this.longitudeCyclical=null}initialize(){const e=this.view._stage.renderView;this._rctx=e.renderingContext,this._renderContext=new le["a"](this._rctx);const t=e.waterTextureRepository;this._stippleTextureRepository=new fe["a"](e.renderingContext),this._shaderTechniqueRepository=new M["a"]({rctx:this._rctx,viewingMode:O["a"].Local,stippleTextureRepository:this._stippleTextureRepository,waterTextureRepository:t}),this._handles.add([Object(h["a"])(t,"loadingState",()=>this.events.emit("content-changed")),Object(h["a"])(this,"spatialReference",e=>this._localOrigins=new ne["a"](e))]),this._materialRepository=new ie["a"](e.textureRepository,this._shaderTechniqueRepository,e=>{(e.renderOccluded&Ae)>0!==this._rendersOccluded&&this._updateRendersOccluded(),this.events.emit("content-changed"),this.notifyChange("updating")},()=>this.events.emit("content-changed")),this._lighting.groundLightingFactor=1,this._lighting.globalFactor=0,this._lighting.set([new he["a"](Object(g["h"])(1,1,1))]),this._bindParameters={slot:ue["a"].DRAPED_MATERIAL,highlightDepthTexture:Object(L["b"])(this._rctx),camera:xe,inverseViewport:Object(m["b"])(),origin:null,screenToWorldRatio:null,screenToPCSRatio:null,shadowMappingEnabled:!1,slicePlane:null,ssaoEnabled:!1,hasOccludees:!1,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:y["a"],ssrEnabled:!1,lighting:this._lighting,transparencyPassType:I["l"].NONE,terrainLinearDepthTexture:null,geometryLinearDepthTexture:null,multipassTerrainEnabled:!1,cullAboveGround:!1,multipassGeometryEnabled:!1,highlightColorTexture:null,cloudsCompositionParams:null,hasFillLights:!0},this._frameTask=this.view.resourceController.scheduler.registerTask(ge["c"].STAGE,this),this._handles.add(this._frameTask)}dispose(){this._handles.destroy(),this._layerRenderers.forEach(e=>e.destroy()),this._layerRenderers.clear(),this._debugTextureTechnique=Object(l["r"])(this._debugTextureTechnique),this._debugPatternTexture=Object(l["e"])(this._debugPatternTexture),this._bindParameters.highlightDepthTexture=Object(l["e"])(this._bindParameters.highlightDepthTexture),this._shaderTechniqueRepository=Object(l["e"])(this._shaderTechniqueRepository),this._temporaryFBO=Object(l["e"])(this._temporaryFBO),this._quadVAO=Object(l["e"])(this._quadVAO),this.disposeOverlays()}get updating(){return this._sortedLayerRenderersDirty||this._frameTask.updating||Object(c["c"])(this._layerRenderers,e=>e.updating)}get hasOverlays(){return Object(l["k"])(this._overlays)&&Object(l["k"])(this._overlayRenderTarget)}get gpuMemoryUsage(){return Object(l["k"])(this._overlayRenderTarget)?this._overlayRenderTarget.gpuMemoryUsage:0}collectUnusedRenderTargetMemory(e){let t=!1;if(Object(l["k"])(this._overlayRenderTarget))for(const r of this._overlayRenderTarget.renderTargets){const i=this.overlays[0].validTargets[r.type]||!this.overlays[1].validTargets[r.type];t=this._overlayRenderTarget.validateUsageForTarget(i,r,e)||t}return t}get overlays(){return Object(l["u"])(this._overlays,[])}ensureDrapeTargets(e){Object(l["k"])(this._overlays)&&this._overlays.forEach(t=>{t.hasTargetWithoutRasterImage=Object(d["a"])(e,e=>e.drapeTargetType===v["c"].WithoutRasterImage)})}ensureDrapeSources(e){Object(l["k"])(this._overlays)&&this._overlays.forEach(t=>{t.hasDrapedFeatureSource=Object(c["c"])(e,(e,t)=>t.drapeSourceType===v["b"].Features),t.hasDrapedRasterSource=Object(c["c"])(e,(e,t)=>t.drapeSourceType===v["b"].RasterImage)})}ensureOverlays(e,t){Object(l["j"])(this._overlays)&&(this._overlayRenderTarget=new C(this._rctx),this._overlays=[new w["a"](j["b"].INNER,this._overlayRenderTarget),new w["a"](j["b"].OUTER,this._overlayRenderTarget)]),this.ensureDrapeTargets(e),this.ensureDrapeSources(t)}disposeOverlays(){this._overlays=null,this._overlayRenderTarget=Object(l["e"])(this._overlayRenderTarget),this.events.emit("textures-disposed")}get running(){return this.updating}runTask(e,t=(()=>!0)){this._frameTask.processQueue(e),e.done||this._processLayers(e,t)}_processLayers(e,t){let r=!1;for(const[i,n]of this._layerRenderers){if(e.done)break;(i.destroyed||t(i))&&(n.commitChanges()&&(r=!0,e.madeProgress()),n.isEmpty&&(r=!0,this._sortedLayerRenderersDirty=!0,this._layerRenderers.delete(i),this._handles.remove(i),n.destroy()))}this._updateSortedLayerRenderers(),r&&(Object(l["k"])(this._overlays)&&0===this._layerRenderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.events.emit("content-changed"),this._updateHasHighlights(),this._updateRendersOccluded(),this._updateHasWater())}processSyncLayers(){this._processLayers(ge["e"],e=>e.updatePolicy===I["m"].SYNC)}addGeometries(e,t,r,i=!1){for(const n of e)Object(l["j"])(n.origin)&&(n.origin=this._localOrigins.getOrigin(n.boundingSphere)),this._geometries.set(n.id,n);this._ensureLayerRenderer(t,i).add(e),r===ce["a"].Geometry.UPDATE&&this._notifyGraphicGeometryChanged(e,t)}removeGeometries(e,t,r){for(const n of e)this._geometries.delete(Object(l["t"])(n.id));const i=this._layerRenderers.get(t);i&&(i.remove(e),r===ce["a"].Geometry.UPDATE&&this._notifyGraphicGeometryChanged(e,t))}updateGeometries(e,t,r){const i=this._layerRenderers.get(t);if(i)switch(i.modify(e,r),r){case ce["a"].State.TRANSFORMATION:case ce["a"].State.VERTEXATTRS:return this._notifyGraphicGeometryChanged(e,t);case ce["a"].State.VISIBILITIES:return this._notifyGraphicVisibilityChanged(e,t)}else ye.warn("Attempted to update geometry for nonexistent layer")}_notifyGraphicGeometryChanged(e,t){if(Object(l["j"])(t.notifyGraphicGeometryChanged))return;let r;for(const i of e){const e=i.graphicUid;Object(l["k"])(e)&&e!==r&&(t.notifyGraphicGeometryChanged(e),r=e)}}_notifyGraphicVisibilityChanged(e,t){if(Object(l["j"])(t.notifyGraphicVisibilityChanged))return;let r;for(const i of e){const e=i.graphicUid;Object(l["k"])(e)&&e!==r&&(t.notifyGraphicVisibilityChanged(e),r=e)}}updateHighlights(e,t){const r=this._layerRenderers.get(t);r?r.modify(e,ce["a"].State.HIGHLIGHTS):ye.warn("Attempted to update highlights for nonexistent layer")}isEmpty(){return 0===this._geometries.size&&!_["a"].OVERLAY_DRAW_DEBUG_TEXTURE}get hasHighlights(){return this._hasHighlights}get hasWater(){return this._hasWater}get rendersOccluded(){return this._rendersOccluded}updateAnimation(e){let t=!1;return this._layerRenderers.forEach(r=>t=r.updateAnimation(e)||t),t}updateLayerOrder(){this._sortedLayerRenderersDirty=!0}drawTarget(e,t,r){const i=e.canvasGeometries;if(0===i.numViews)return!1;this._screenToWorldRatio=r*e.mapUnitsPerPixel;const n=t.renderPass;if(this.isEmpty()||n===A["a"].MATERIAL_HIGHLIGHT&&!this.hasHighlights||n===A["a"].MATERIAL_NORMAL&&!this.hasWater||!e.hasSomeSizedView())return!1;const a=t.fbo;if(!a.isValid())return!1;const s=2*e.resolution,o=e.resolution;a.resize(s,o);const c=this._rctx;xe.pixelRatio=e.pixelRatio*r,this._renderContext.pass=n,this._bindParameters.screenToWorldRatio=this._screenToWorldRatio,this._bindParameters.screenToPCSRatio=this._screenToWorldRatio*this.worldToPCSRatio,this._bindParameters.slot=n===A["a"].MATERIAL_NORMAL?ue["a"].DRAPED_WATER:ue["a"].DRAPED_MATERIAL,e.applyViewport(this._rctx),a.bind(c),e.index===j["b"].INNER&&(c.setClearColor(0,0,0,0),c.clearSafe(T["e"].COLOR_BUFFER_BIT));const u=t.type===j["d"].ColorNoRasterImage?ve.ExcludeRasterImage:t.type===j["d"].Occluded?ve.OccludedOnly:ve.Normal;if(u===ve.OccludedOnly&&(this._renderContext.renderOccludedMask=Ae),_["a"].OVERLAY_DRAW_DEBUG_TEXTURE&&u!==ve.OccludedOnly)for(let l=0;l<i.numViews;l++)this._setViewParameters(i.extents[l],e,xe),this._drawDebugTexture(e.resolution,je[e.index]);return this._layerRenderers.size>0&&this._sortedLayerRenderers.forAll(({overlayLayer:t,renderer:r})=>{if(u===ve.ExcludeRasterImage&&t.drapeSourceType===v["b"].RasterImage)return;const{fullOpacity:d}=t,h=Object(l["k"])(d)&&d<1&&n===A["a"].MATERIAL;h&&(this.bindTemporaryFramebuffer(this._rctx,s,o),c.clearSafe(T["e"].COLOR_BUFFER_BIT));for(let n=0;n<i.numViews;n++)this._setViewParameters(i.extents[n],e,xe),r.render(this._renderContext,this._bindParameters);h&&Object(l["k"])(this._temporaryFBO)&&(a.bind(c),this.view._stage.renderView.compositingHelper.composite(this._temporaryFBO.getTexture(),me["a"].PremultipliedAlpha,d,be["a"].OverlayWithTransparency,e.index))}),c.bindFramebuffer(null),a.generateMipMap(),this._renderContext.resetRenderOccludedMask(),!0}bindTemporaryFramebuffer(e,t,r){Object(l["j"])(this._temporaryFBO)&&(this._temporaryFBO=new E(e,!1)),this._temporaryFBO.resize(t,r),this._temporaryFBO.bind(e)}async reloadShaders(){await this._shaderTechniqueRepository.reloadAll()}intersect(e,t,r,i){let n=0;this._geometries.forEach(a=>{if(i&&!i(a))return;this._intersectRenderGeometry(a,r,t,0,e,n);const s=this.longitudeCyclical;s&&(a.boundingSphere[0]-a.boundingSphere[3]<s.min&&this._intersectRenderGeometry(a,r,t,s.range,e,n),a.boundingSphere[0]+a.boundingSphere[3]>s.max&&this._intersectRenderGeometry(a,r,t,-s.range,e,n)),n++})}_intersectRenderGeometry(e,t,r,i,n,a){if(!e.instanceParameters.visible)return;let s=0;Object(l["k"])(e.transformation)&&(i+=e.transformation[12],s=e.transformation[13]),Te[0]=r[0]-i,Te[1]=r[1]-s,Te[2]=1,Se[0]=r[0]-i,Se[1]=r[1]-s,Se[2]=0,e.screenToWorldRatio=this._screenToWorldRatio,e.material.intersect(e,null,e.getShaderTransformation(),n,Te,Se,(r,i,s)=>{we(t,s,e.material.renderPriority,a,n,e.layerUid,e.graphicUid)},e.calculateShaderTransformation,t)}_ensureLayerRenderer(e,t){let r=this._layerRenderers.get(e);return r&&t===r instanceof te||(r=t?new te({rctx:this._rctx,materialRepository:this._materialRepository}):new U({rctx:this._rctx,materialRepository:this._materialRepository}),this._layerRenderers.set(e,r),this._sortedLayerRenderersDirty=!0,"fullOpacity"in e&&this._handles.add(e.watch("fullOpacity",()=>this.events.emit("content-changed")),e),this._handles.add(Object(h["a"])(r,"updating",()=>this.notifyChange("updating")),e)),r}_updateSortedLayerRenderers(){if(!this._sortedLayerRenderersDirty)return;if(this._sortedLayerRenderersDirty=!1,this._sortedLayerRenderers.clear(),0===this._layerRenderers.size)return;const e=this.view.map.allLayers;this._layerRenderers.forEach((t,r)=>{const i=e.indexOf(r.layer);this._sortedLayerRenderers.push(new _e(r,t,i<0?1/0:i))}),this._sortedLayerRenderers.sort((e,t)=>e.index-t.index)}_setViewParameters(e,t,r){r.viewport[0]=r.viewport[1]=0,r.viewport[2]=r.viewport[3]=t.resolution,Object(b["r"])(r.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],r.near,r.far),Object(b["g"])(r.viewMatrix,[-e[0],-e[1],0]),this._renderContext.camera=r,this._bindParameters.camera=r,this._bindParameters.inverseViewport[0]=1/r.fullViewport[2],this._bindParameters.inverseViewport[1]=1/r.fullViewport[3]}_updateHasWater(){const e=Object(c["c"])(this._layerRenderers,e=>e.hasWater);e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water",e))}_updateHasHighlights(){const e=Object(c["c"])(this._layerRenderers,e=>e.hasHighlights);e!==this._hasHighlights&&(this._hasHighlights=e,this.events.emit("has-highlights",e))}_updateRendersOccluded(){const e=Object(c["c"])(this._layerRenderers,e=>e.rendersOccluded);e!==this._rendersOccluded&&(this._rendersOccluded=e,this.events.emit("renders-occluded",e))}_drawDebugTexture(e,t){this._ensureDebugPatternResources(e,e);const r=this._rctx,i=r.useTechnique(this._debugTextureTechnique);i.setUniform4f("uColor",t[0],t[1],t[2],1),i.bindTexture(this._debugPatternTexture,"tex"),r.bindVAO(this._quadVAO),r.drawArrays(T["r"].TRIANGLE_STRIP,0,Object(ee["f"])(this._quadVAO,"geometry"))}_ensureDebugPatternResources(e,t){if(this._debugPatternTexture)return;const r=new Uint8Array(e*t*4);let i=0;for(let a=0;a<t;a++)for(let n=0;n<e;n++){const s=Math.floor(n/10),o=Math.floor(a/10);s<2||o<2||10*s>e-20||10*o>t-20?(r[i++]=255,r[i++]=255,r[i++]=255,r[i++]=255):(r[i++]=255,r[i++]=255,r[i++]=255,r[i++]=1&s&&1&o?1&n^1&a?0:255:1&s^1&o?0:128)}this._debugPatternTexture=new K["a"](this._rctx,{target:T["A"].TEXTURE_2D,pixelFormat:T["p"].RGBA,dataType:T["q"].UNSIGNED_BYTE,samplingMode:T["z"].NEAREST,width:e,height:t},r);const n=new de["b"];n.hasAlpha=!0,this._debugTextureTechnique=this._shaderTechniqueRepository.acquire(de["a"],n),this._quadVAO=Object(L["d"])(this._rctx)}get test(){return{layerRenderers:this._layerRenderers}}};var ve;Object(i["a"])([Object(p["b"])()],Oe.prototype,"_frameTask",void 0),Object(i["a"])([Object(p["b"])()],Oe.prototype,"_sortedLayerRenderersDirty",void 0),Object(i["a"])([Object(P["c"])()],Oe.prototype,"_shaderTechniqueRepository",void 0),Object(i["a"])([Object(P["c"])()],Oe.prototype,"_stippleTextureRepository",void 0),Object(i["a"])([Object(p["b"])({constructOnly:!0})],Oe.prototype,"view",void 0),Object(i["a"])([Object(p["b"])()],Oe.prototype,"worldToPCSRatio",void 0),Object(i["a"])([Object(p["b"])()],Oe.prototype,"spatialReference",void 0),Object(i["a"])([Object(p["b"])({type:Boolean,readOnly:!0})],Oe.prototype,"updating",null),Oe=Object(i["a"])([Object(f["a"])("esri.views.3d.terrain.OverlayRenderer")],Oe),function(e){e[e.Normal=0]="Normal",e[e.OccludedOnly=1]="OccludedOnly",e[e.ExcludeRasterImage=2]="ExcludeRasterImage"}(ve||(ve={}));class _e{constructor(e,t,r){this.overlayLayer=e,this.renderer=t,this.index=r}}const je=[[1,.5,.5],[.5,.5,1]];function we(e,t,r,i,n,a,s){const o={layerUid:a,graphicUid:s,triangleNr:t},c=t=>{t.set(se["b"].OVERLAY,o,e.dist,e.normal,e.transformation,r,i)};if((null==n.results.min.drapedLayerOrder||r>=n.results.min.drapedLayerOrder)&&(null==n.results.min.dist||n.results.ground.dist<=n.results.min.dist)&&c(n.results.min),n.options.store!==se["c"].MIN&&(null==n.results.max.drapedLayerOrder||r<n.results.max.drapedLayerOrder)&&(null==n.results.max.dist||n.results.ground.dist>n.results.max.dist)&&c(n.results.max),n.options.store===se["c"].ALL){const e=Object(ae["c"])(n.ray);c(e),n.results.all.push(e)}}const xe=new D["b"];xe.near=1,xe.far=1e4,xe.relativeElevation=null;const Te=Object(g["f"])(),Se=Object(g["f"])(),Ee=-2,Ae=oe["c"].OccludeAndTransparent},"75cc":function(e,t,r){"use strict";r.d(t,"a",(function(){return S})),r.d(t,"b",(function(){return E})),r.d(t,"c",(function(){return w}));var i,n=r("c120"),a=r("a4ee"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("cea0"),r("448d")),l=r("d386");let u=i=class extends s["a"]{constructor(e){super(e),this.type="cloudy",this.cloudCover=.5}clone(){return new i({cloudCover:this.cloudCover})}};Object(a["a"])([Object(c["a"])({cloudy:"cloudy"})],u.prototype,"type",void 0),Object(a["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],u.prototype,"cloudCover",void 0),u=i=Object(a["a"])([Object(l["a"])("esri.views.3d.environment.CloudyWeather")],u);const d=u;var h;let p=h=class extends s["a"]{constructor(e){super(e),this.type="foggy",this.fogStrength=.5}clone(){return new h({fogStrength:this.fogStrength})}};Object(a["a"])([Object(c["a"])({foggy:"foggy"})],p.prototype,"type",void 0),Object(a["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],p.prototype,"fogStrength",void 0),p=h=Object(a["a"])([Object(l["a"])("esri.views.3d.environment.FoggyWeather")],p);const f=p;var b;let m=b=class extends s["a"]{constructor(e){super(e),this.type="rainy",this.cloudCover=.5,this.precipitation=.5}clone(){return new b({cloudCover:this.cloudCover,precipitation:this.precipitation})}};Object(a["a"])([Object(c["a"])({rainy:"rainy"})],m.prototype,"type",void 0),Object(a["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],m.prototype,"cloudCover",void 0),Object(a["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],m.prototype,"precipitation",void 0),m=b=Object(a["a"])([Object(l["a"])("esri.views.3d.environment.RainyWeather")],m);const g=m;var y,O=r("fc29");let v=y=class extends O["a"]{constructor(e){super(e),this.type="snowy",this.cloudCover=.5,this.precipitation=.5}clone(){return new y({cloudCover:this.cloudCover,precipitation:this.precipitation})}};Object(a["a"])([Object(c["a"])({snowy:"snowy"})],v.prototype,"type",void 0),Object(a["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],v.prototype,"cloudCover",void 0),Object(a["a"])([Object(o["b"])({type:Number,nonNullable:!0,range:{min:0,max:1}})],v.prototype,"precipitation",void 0),v=y=Object(a["a"])([Object(l["a"])("esri.views.3d.environment.SnowyWeather")],v);const _=v;var j=r("698f");const w={key:"type",base:null,typeMap:{sunny:j["a"],cloudy:d,rainy:g,snowy:_,foggy:f}},x=Object.keys(w.typeMap);function T(){return Object(n["a"])("enable-feature:precipitation")?x:x.filter(e=>"snowy"!==e)}function S(e,t){return!!T().includes(e)||(t.error(`"${e}" is not a valid weather type`),!1)}const E=1e4},"767d":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return a}));var i=r("9d83"),n=r("c120");const a=Object(n["a"])("mac")?"Meta":"Ctrl",s={8:"Backspace",9:"Tab",13:"Enter",27:"Escape",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete"};for(let l=48;l<58;l++)s[l]=String.fromCharCode(l);for(let l=1;l<25;l++)s[111+l]="F"+l;for(let l=65;l<91;l++)s[l]=[String.fromCharCode(l+32),String.fromCharCode(l)];function o(e){if(void 0!==e.key)return Object(i["a"])(e);const t=s[e.keyCode];return Array.isArray(t)?e.shiftKey?t[1]:t[0]:t}function c(e){switch(e){case"Ctrl":case"Alt":case"Shift":case"Meta":case"Primary":return!0}return!1}},7697:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886");function n(e){e.fragment.uniforms.add("u_transformGrid","sampler2D"),e.fragment.uniforms.add("u_transformSpacing","vec2"),e.fragment.uniforms.add("u_transformGridSize","vec2"),e.fragment.uniforms.add("u_targetImageSize","vec2"),e.fragment.code.add(i["a"]`vec2 projectPixelLocation(vec2 coords) {
  1943. vec2 index_image = floor(coords * u_targetImageSize);
  1944. vec2 oneTransformPixel = vec2(0.25 / u_transformGridSize.s, 1.0 / u_transformGridSize.t);
  1945. vec2 index_transform = floor(index_image / u_transformSpacing) / u_transformGridSize;
  1946. vec2 pos = fract((index_image + vec2(0.5, 0.5)) / u_transformSpacing);
  1947. vec2 srcLocation;
  1948. vec2 transform_location = index_transform + oneTransformPixel * 0.5;
  1949. if (pos.s <= pos.t) {
  1950. vec4 ll_abc = texture2D(u_transformGrid, vec2(transform_location.s, transform_location.t));
  1951. vec4 ll_def = texture2D(u_transformGrid, vec2(transform_location.s + oneTransformPixel.s, transform_location.t));
  1952. srcLocation.s = dot(ll_abc.rgb, vec3(pos, 1.0));
  1953. srcLocation.t = dot(ll_def.rgb, vec3(pos, 1.0));
  1954. } else {
  1955. vec4 ur_abc = texture2D(u_transformGrid, vec2(transform_location.s + 2.0 * oneTransformPixel.s, transform_location.t));
  1956. vec4 ur_def = texture2D(u_transformGrid, vec2(transform_location.s + 3.0 * oneTransformPixel.s, transform_location.t));
  1957. srcLocation.s = dot(ur_abc.rgb, vec3(pos, 1.0));
  1958. srcLocation.t = dot(ur_def.rgb, vec3(pos, 1.0));
  1959. }
  1960. return srcLocation;;
  1961. }`)}function a(e){e.include(n),e.fragment.uniforms.add("u_image","sampler2D"),e.fragment.uniforms.add("u_isFloatTexture","bool"),e.fragment.uniforms.add("u_flipY","bool"),e.fragment.uniforms.add("u_applyTransform","bool"),e.fragment.uniforms.add("u_opacity","float"),e.fragment.code.add(i["a"]`vec2 getPixelLocation(vec2 coords) {
  1962. vec2 targetLocation = u_flipY ? vec2(coords.s, 1.0 - coords.t) : coords;
  1963. if (!u_applyTransform) {
  1964. return targetLocation;
  1965. }
  1966. return projectPixelLocation(targetLocation);
  1967. }
  1968. bool isOutside(vec2 coords){
  1969. if (coords.t>1.00001 ||coords.t<-0.00001 || coords.s>1.00001 ||coords.s<-0.00001) {
  1970. return true;
  1971. } else {
  1972. return false;
  1973. }
  1974. }
  1975. vec4 getPixel(vec2 pixelLocation) {
  1976. return texture2D(u_image, pixelLocation);
  1977. }`)}},"76ac":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return c}));var i,n=r("4db9"),a=r("3886"),s=r("690a"),o=r("b7bd");function c(e){const t=new s["a"];if(e.geometry===i.Underground)t.attributes.add(o["a"].POSITION,"vec2"),t.varyings.add("color","vec4"),t.vertex.uniforms.add("lightingMainDirection","vec3").add("cameraPosition","vec3").add("undergroundFadeAlpha","float"),t.vertex.code.add(a["a"]`void main(void) {
  1978. float ndotl = dot(normalize(cameraPosition), lightingMainDirection);
  1979. float lighting = max(0.0, smoothstep(-1.0, 0.8, 2.0 * ndotl));
  1980. color = vec4(vec3(lighting), undergroundFadeAlpha);
  1981. gl_Position = vec4(position.xy, 1.0, 1.0);
  1982. }`),t.fragment.code.add(a["a"]`void main() {
  1983. gl_FragColor = color;
  1984. }`);else{t.include(n["a"],{linearDepth:!1}),t.attributes.add(o["a"].POSITION,"vec3"),t.varyings.add("vtc","vec2"),t.varyings.add("falloff","float");const r=e.geometry===i.Cylinder;t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("lightingMainDirection","vec3"),r||(t.varyings.add("innerFactor","float"),t.vertex.uniforms.add("silCircleCenter","vec3").add("silCircleV1","vec3").add("silCircleV2","vec3").add("texV","vec2").add("innerScale","float"));const s=6.2831853,c=1/128;t.vertex.code.add(a["a"]`
  1985. void main(void) {
  1986. ${r?a["a"]`
  1987. vec3 pos = position;
  1988. float ndotl = lightingMainDirection.z;
  1989. vtc = vec2(0.0, position.z + 0.05);`:a["a"]`
  1990. innerFactor = clamp(-position.z, 0.0, 1.0);
  1991. float scale = position.y * (1.0 + innerFactor * innerScale);
  1992. float phi = position.x * ${a["a"].float(s*c)} + 1.0;
  1993. vec3 pos = (silCircleCenter + sin(phi) * silCircleV1 + cos(phi) * silCircleV2) * scale;
  1994. float ndotl = dot(normalize(position.y > 0.0 ? pos: silCircleCenter), lightingMainDirection);
  1995. vtc.x = position.x * ${a["a"].float(c)};
  1996. vtc.y = texV.x * (1.0 - position.z) + texV.y * position.z;
  1997. `}
  1998. falloff = max(0.0, smoothstep(-1.0, 0.8, 2.0 * ndotl));
  1999. gl_Position = transformPosition(proj, view, pos);
  2000. gl_Position.z = gl_Position.w; // project atmosphere onto the far plane
  2001. }
  2002. `),t.fragment.uniforms.add("tex","sampler2D"),r||t.fragment.uniforms.add("altitudeFade","float"),t.fragment.code.add(a["a"]`
  2003. void main() {
  2004. vec4 atmosphereColor = texture2D(tex, vtc) * falloff;
  2005. ${r?a["a"]`gl_FragColor = atmosphereColor;`:a["a"]`
  2006. vec4 innerColor = vec4(atmosphereColor.rgb, 1.0 - altitudeFade);
  2007. gl_FragColor = mix(atmosphereColor, innerColor, smoothstep(0.0, 1.0, innerFactor));
  2008. `}
  2009. }`)}return t}!function(e){e[e.Cone=0]="Cone",e[e.Cylinder=1]="Cylinder",e[e.Underground=2]="Underground",e[e.COUNT=3]="COUNT"}(i||(i={}));const l=Object.freeze({__proto__:null,get SimpleAtmosphereGeometry(){return i},build:c})},7752:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("fc00"),n=r("dfaf"),a=r("b7bd");function s(e){const t=Object(i["a"])().vec3f(a["a"].POSITION);return e.normals&&t.vec2i16(a["a"].NORMALCOMPRESSED,{glNormalized:!0}),e.textureCoordinates===n["b"].Default?t.vec2f(a["a"].UV0):e.textureCoordinates===n["b"].Atlas&&(t.vec2f(a["a"].UV0),t.vec4u16(a["a"].UVREGION,{glNormalized:!0})),e.colors&&t.vec4u8(a["a"].COLOR,{glNormalized:!0}),t.alignTo(4)}},"77eb":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("5986");let c=i=class extends o["a"]{constructor(e){super(e),this.image=null,this.type="button"}clone(){return new i({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};Object(n["a"])([Object(a["b"])()],c.prototype,"image",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.support.Action.ActionButton")],c);const l=c},"77f2":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return o}));var i,n=r("3886"),a=r("690a"),s=r("b7bd");function o(e){const t=new a["a"],{mode:r,isAttributeDriven:o}=e;return t.attributes.add(s["a"].POSITION,"vec3"),t.attributes.add(s["a"].UV0,"vec2"),e.isAttributeDriven&&(t.attributes.add(s["a"].FEATUREATTRIBUTE,"float"),t.varyings.add("attributeValue","float")),t.varyings.add("unitCirclePos","vec2"),t.vertex.uniforms.add("radius","float"),t.vertex.uniforms.add("proj","mat4"),t.vertex.uniforms.add("view","mat4"),t.vertex.code.add(n["a"]`
  2010. void main() {
  2011. unitCirclePos = uv0;
  2012. vec4 posProj = proj * (view * vec4(${s["a"].POSITION}, 1.0));
  2013. vec4 quadOffset = vec4(unitCirclePos * radius, 0.0, 0.0);
  2014. ${o?n["a"]`attributeValue = ${s["a"].FEATUREATTRIBUTE};`:""}
  2015. gl_Position = posProj + quadOffset;
  2016. }
  2017. `),r===i.KernelDensity?t.fragment.code.add(n["a"]`
  2018. void main() {
  2019. float radiusRatioSquared = dot(unitCirclePos, unitCirclePos);
  2020. if (radiusRatioSquared > 1.0) {
  2021. discard;
  2022. }
  2023. float oneMinusRadiusRatioSquared = 1.0 - radiusRatioSquared;
  2024. float density = oneMinusRadiusRatioSquared * oneMinusRadiusRatioSquared ${o?n["a"]` * attributeValue`:""};
  2025. gl_FragColor = vec4(density);
  2026. }
  2027. `):r===i.GaussianBlur&&(t.fragment.uniforms.add("kernel","sampler2D"),t.fragment.code.add(n["a"]`
  2028. void main() {
  2029. float radiusRatioSquared = dot(unitCirclePos, unitCirclePos);
  2030. if (radiusRatioSquared > 1.0) {
  2031. discard;
  2032. }
  2033. vec2 uv = abs(unitCirclePos);
  2034. vec2 uvX = vec2(uv.x, 0.5);
  2035. vec2 uvY = vec2(uv.y, 0.5);
  2036. float intensity = texture2D(kernel, uvX).r * texture2D(kernel, uvY).r${o?n["a"]` * attributeValue`:""};
  2037. gl_FragColor = vec4(intensity);
  2038. }
  2039. `)),t}!function(e){e[e.GaussianBlur=0]="GaussianBlur",e[e.KernelDensity=1]="KernelDensity"}(i||(i={}));const c=Object.freeze({__proto__:null,get HeatmapMode(){return i},build:o})},"787a":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("1b19"),c=r("b08e");let l=i=class extends o["a"]{constructor(e){super(e),this.type="column-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};Object(n["a"])([Object(a["b"])({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:c["a"].write}})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(s["a"])("esri.popup.content.ColumnChartMediaInfo")],l);const u=l},"78ba":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("b50f"),n=r("c649"),a=r("e92d"),s=r("b2b2"),o=r("f4cc"),c=r("dfa0");const l=a["a"].getLogger("esri.core.workers.WorkerHandle");class u{constructor(e,t,r,i={}){this._mainMethod=t,this._listeners=[],this._promise=Object(c["b"])(e,{...i,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>l.error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),Object(n["b"])(()=>{r.removed=!0,Object(i["j"])(this._listeners,r),this._thread&&Object(s["k"])(r.threadHandle)&&r.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this.getTransferList(t,e);return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then(()=>(Object(o["v"])(r),this.invokeMethod(e,t,r))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(()=>{}):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}},"792b":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return c}));var i=r("b2b2"),n=r("f4cc");function a(e,t,r){return Object(n["j"])(e.map((e,i)=>t.apply(r,[e,i])))}function s(e,t,r){return Object(n["j"])(e.map((e,i)=>t.apply(r,[e,i]))).then(e=>e.map(e=>e.value))}function o(e){return Object(i["j"])(e)?Object(n["t"])():e.then(e=>({ok:!0,value:e})).catch(e=>({ok:!1,error:e}))}function c(e){return e.then(e=>({ok:!0,value:e})).catch(e=>(Object(n["u"])(e),{ok:!1,error:e}))}function l(e){if(!0===e.ok)return e.value;throw e.error}},7949:function(e,t,r){"use strict";r.d(t,"a",(function(){return j}));var i,n=r("a4ee"),a=r("e06a"),s=r("658b"),o=r("fa8a"),c=r("6a0ed"),l=r("7ffa"),u=r("59b2"),d=r("cea0"),h=r("d386"),p=r("09db"),f=r("a9ab");r("b50f"),r("c120");let b=i=class extends c["a"]{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};Object(n["a"])([Object(u["b"])({type:[String],json:{write:!0}})],b.prototype,"groupByFields",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0}})],b.prototype,"topCount",void 0),Object(n["a"])([Object(u["b"])({type:[String],json:{write:!0}})],b.prototype,"orderByFields",void 0),b=i=Object(n["a"])([Object(h["a"])("esri.rest.support.TopFilter")],b);const m=b;var g,y=r("5996");const O=new o["a"]({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new o["a"]({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=g=class extends c["a"]{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g(Object(l["a"])({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0}})],_.prototype,"cacheHint",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],_.prototype,"distance",void 0),Object(n["a"])([Object(u["b"])({types:a["a"],json:{read:f["a"],write:!0}})],_.prototype,"geometry",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0}})],_.prototype,"geometryPrecision",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0}})],_.prototype,"maxAllowableOffset",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{read:{source:"resultRecordCount"}}})],_.prototype,"num",void 0),Object(n["a"])([Object(u["b"])({json:{write:!0}})],_.prototype,"objectIds",void 0),Object(n["a"])([Object(u["b"])({type:[String],json:{write:!0}})],_.prototype,"orderByFields",void 0),Object(n["a"])([Object(u["b"])({type:[String],json:{write:!0}})],_.prototype,"outFields",void 0),Object(n["a"])([Object(u["b"])({type:y["a"],json:{read:{source:"outSR"},write:{target:"outSR"}}})],_.prototype,"outSpatialReference",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],_.prototype,"resultType",void 0),Object(n["a"])([Object(u["b"])({json:{write:!0}})],_.prototype,"returnGeometry",void 0),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnM",void 0),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnZ",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{read:{source:"resultOffset"}}})],_.prototype,"start",void 0),Object(n["a"])([Object(p["a"])("start"),Object(p["a"])("num")],_.prototype,"writeStart",null),Object(n["a"])([Object(u["b"])({type:String,json:{read:{source:"spatialRel",reader:O.read},write:{target:"spatialRel",writer:O.write}}})],_.prototype,"spatialRelationship",void 0),Object(n["a"])([Object(u["b"])({type:s["a"],json:{write:!0}})],_.prototype,"timeExtent",void 0),Object(n["a"])([Object(u["b"])({type:m,json:{write:!0}})],_.prototype,"topFilter",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:e&&this.distance>0}}}}})],_.prototype,"units",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=g=Object(n["a"])([Object(h["a"])("esri.rest.support.TopFeaturesQuery")],_),_.from=Object(d["m"])(_);const j=_},"79e4":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=(r("e06a"),r("fa8a")),s=r("6a0ed"),o=r("7ffa"),c=r("59b2"),l=(r("cea0"),r("d386")),u=r("3af1");const d=new a["a"]({upperLeft:"upper-left",lowerLeft:"lower-left"});let h=i=class extends s["a"]{constructor(e){super(e),this.extent=null,this.mode="view",this.originPosition="upper-left",this.tolerance=1}clone(){return new i(Object(o["a"])({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))}};Object(n["a"])([Object(c["b"])({type:u["a"],json:{write:{overridePolicy(){return{enabled:"view"===this.mode}}}}})],h.prototype,"extent",void 0),Object(n["a"])([Object(c["b"])({type:["view","edit"],json:{write:!0}})],h.prototype,"mode",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{read:d.read,write:d.write}})],h.prototype,"originPosition",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:{overridePolicy(){return{enabled:"view"===this.mode}}}}})],h.prototype,"tolerance",void 0),h=i=Object(n["a"])([Object(l["a"])("esri.rest.support.QuantizationParameters")],h);const p=h},"7a18":function(e,t,r){"use strict";function i(e){return e&&"base-tile"===e.type||"tile"===e.type||"elevation"===e.type||"imagery-tile"===e.type||"base-elevation"===e.type||"open-street-map"===e.type||"wcs"===e.type||"web-tile"===e.type||"wmts"===e.type||"vector-tile"===e.type}function n(e){return e&&"imagery-tile"===e.type}function a(e){return e&&"wmts"===e.type}function s(e){return e&&"voxel"===e.type}function o(e){return e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent.baseLayers.indexOf(e)>-1}function c(e){return!0===e.labelsVisible&&null!=e.labelingInfo&&e.labelingInfo.length>0}function l(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const r=e.activeLayer.tileMatrixSets;if(r)return r}return null}r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return i})),r.d(t,"f",(function(){return s})),r.d(t,"g",(function(){return a}))},"7a2a":function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return y})),r.d(t,"f",(function(){return O})),r.d(t,"g",(function(){return j}));var i=r("eb37"),n=r("a915"),a=r("970c"),s=r("d791");const o=(e,t)=>{const r=Object(s["t"])(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return Object(s["u"])(r,r)},c=(e,t)=>{const r=Object(s["t"])(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return Object(s["u"])(r,r)},l=(e,t)=>{const r=1-t,i=Object(s["t"])(e,.2126+.7874*r,.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1);return Object(s["u"])(i,i)},u=(e,t)=>{const r=Math.sin(t*Math.PI/180),i=Math.cos(t*Math.PI/180),n=Object(s["t"])(e,.213+.787*i-.213*r,.715-.715*i-.715*r,.072-.072*i+.928*r,0,.213-.213*i+.143*r,.715+.285*i+.14*r,.072-.072*i-.283*r,0,.213-.213*i-.787*r,.715-.715*i+.715*r,.072+.928*i+.072*r,0,0,0,0,1);return Object(s["u"])(n,n)},d=(e,t)=>{const r=1-2*t,i=Object(s["t"])(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return Object(s["u"])(i,i)},h=(e,t)=>{const r=Object(s["t"])(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return Object(s["u"])(r,r)},p=(e,t)=>{const r=1-t,i=Object(s["t"])(e,.393+.607*r,.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1);return Object(s["u"])(i,i)};class f{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=v(e.strength,t.strength,r),this.radius=v(e.radius,t.radius,r),this.threshold=v(e.threshold,t.threshold,r)}clone(){return new f(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:_(this.radius),strength:this.strength,threshold:this.threshold}}}class b{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(v(e.radius,t.radius,r))}clone(){return new b(this.radius)}toJSON(){return{type:"blur",radius:_(this.radius)}}}class m{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=v(e.amount,t.amount,r),this._updateMatrix()}clone(){return new m(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||Object(a["a"])();switch(this.type){case"brightness":this._colorMatrix=o(e,this.amount);break;case"contrast":this._colorMatrix=c(e,this.amount);break;case"grayscale":this._colorMatrix=l(e,this.amount);break;case"invert":this._colorMatrix=d(e,this.amount);break;case"saturate":this._colorMatrix=h(e,this.amount);break;case"sepia":this._colorMatrix=p(e,this.amount)}}}class g{constructor(e,t,r,i){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=i,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=v(e.offsetX,t.offsetX,r),this.offsetY=v(e.offsetY,t.offsetY,r),this.blurRadius=v(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(v(e.color[0],t.color[0],r)),this.color[1]=Math.round(v(e.color[1],t.color[1],r)),this.color[2]=Math.round(v(e.color[2],t.color[2],r)),this.color[3]=v(e.color[3],t.color[3],r)}clone(){return new g(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:_(this.offsetX),yoffset:_(this.offsetY),blurRadius:_(this.blurRadius),color:e}}}class y{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=v(e.angle,t.angle,r),this._updateMatrix()}clone(){return new y(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||Object(a["a"])();this._colorMatrix=u(e,this.angle)}}class O{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=v(e.amount,t.amount,r)}clone(){return new O(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function v(e,t,r){return e+(t-e)*r}function _(e){return Math.round(1e3*Object(n["h"])(e))/1e3}function j(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new m(e.type,0);case"saturate":case"brightness":case"contrast":return new m(e.type,1);case"opacity":return new O(1);case"hue-rotate":return new y(0);case"blur":return new b(0);case"drop-shadow":return new g(0,0,0,[...Object(i["a"])("transparent")]);case"bloom":return new f(0,0,1)}}},"7a91":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var i=r("1942"),n=r("a978");function a(e){return Object(n["c"])(e)&&e.intersector===i["b"].TERRAIN&&!!e.target}function s(e){return Object(n["c"])(e)&&e.intersector===i["b"].OVERLAY&&!!e.target}},"7aed":function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return p}));var i=r("a4ee"),n=r("3e446"),a=r("c3a4"),s=r("ca98"),o=r("da35"),c=r("fa1e"),l=r("c829"),u=r("d17d"),d=r("189c");class h extends s["a"]{initializeProgram(e){const t=h.shader.get().build();return new l["a"](e.rctx,t,c["a"])}initializePipeline(){return this.configuration.hasAlpha?Object(d["g"])({blending:Object(d["h"])(u["b"].SRC_ALPHA,u["b"].ONE,u["b"].ONE_MINUS_SRC_ALPHA,u["b"].ONE_MINUS_SRC_ALPHA),colorWrite:d["d"]}):Object(d["g"])({colorWrite:d["d"]})}}h.shader=new a["a"](n["a"],()=>r.e("chunk-2d0b3143").then(r.bind(null,"279a")));class p extends o["a"]{constructor(){super(...arguments),this.hasAlpha=!1}}Object(i["a"])([Object(o["b"])()],p.prototype,"hasAlpha",void 0)},"7af8":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u}));var i=r("7ffa"),n=r("b2b2"),a=r("4c37");class s{constructor(e){this.autoDestroy=!1,this.properties=e}}function o(e){let t=e.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){const r=Object.create(t.properties),n=t.autoDestroy;for(const e in r)r[e]=Object(i["a"])(r[e]);t=new s(r),t.autoDestroy=n,Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t=new s({}),Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return Object(n["c"])(e.constructor.__accessorMetadata__)}function c(e){return o(e).properties}function l(e,t){const r=c(e);let i=r[t];return i||(i=r[t]={}),i}function u(e,t){return Object(a["c"])(e,t,h)}const d=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function h(e){return d.test(e)?"replace":"merge"}},"7b39":function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return x})),r.d(t,"f",(function(){return f}));var i=r("b3b6");const n="__begin__",a="__end__",s=new RegExp(n,"ig"),o=new RegExp(a,"ig"),c=new RegExp("^"+n,"i"),l=new RegExp(a+"$","i"),u='"',d=u+" + ",h=" + "+u;function p(e){return e.replace(new RegExp("\\[","g"),"{").replace(new RegExp("\\]","g"),"}")}function f(e){return e.replace(new RegExp("\\{","g"),"[").replace(new RegExp("\\}","g"),"]")}function b(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=p(e.labelExpression),t.type="conventional"),t}function m(e){const t=b(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function g(e){const t=b(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return x(t.expression)}return null}function y(e){let t;return e?(t=Object(i["c"])(e,e=>n+'$feature["'+e+'"]'+a),t=c.test(t)?t.replace(c,""):u+t,t=l.test(t)?t.replace(l,""):t+u,t=t.replace(s,d).replace(o,h)):t='""',t}const O=/^\s*\{([^}]+)\}\s*$/i;function v(e){const t=e.match(O);return t&&t[1].trim()||null}const _=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,j=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,w=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=_.exec(e)||j.exec(e);return t?t[1]||t[3]:(t=w.exec(e),t?t[2]:null)}},"7b7d":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("b2b2"),n=r("ecd7");class a extends n["a"]{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=Object(i["q"])(this._set)}acquire(...e){const t=super.acquire(...e);return this._set.delete(t),t}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}}},"7b96":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i=r("b2b2"),n=r("e431"),a=r("0b2d"),s=r("4261"),o=r("f895"),c=r("e9d6"),l=r("ba58"),u=r("b7c2"),d=r("dd0e");class h{constructor(e,t,r,i,n,a,s,o=null){this.graphics3DSymbolLayer=e,this.stageObject=t,this._uniqueGeometries=r,this._uniqueMaterials=i,this._sharedResource=n,this.elevationAligner=a,this.elevationContext=s,this._edgeState=o,this.type="object3d",this._stageLayer=null,this._stage=null,this._visible=!1,this._addedToStage=!1,this.alignedSampledElevation=0,this.needsElevationUpdates=!1,this.useObjectOriginAsAttachmentOrigin=!1,this.graphics3DSymbolLayer=e,this.stageObject=t}get isElevationSource(){return!(!this.stageObject.metadata||!this.stageObject.metadata.isElevationSource)}initialize(e,t){this._stageLayer=t,this._stage=e,e.addMany(this._uniqueMaterials),e.addMany(this._uniqueGeometries),e.add(this.stageObject)}destroy(){const e=this._stage;this._stageLayer&&(e.removeMany(this._uniqueMaterials),e.removeMany(this._uniqueGeometries)),e.remove(this.stageObject),this._addedToStage&&(this._stageLayer.remove(this.stageObject),this._addedToStage=!1);const t=this._stage.renderView.ensureEdgeView();t.hasObject(this.stageObject)&&t.removeObject(this.stageObject),this.stageObject.dispose(),Object(i["k"])(this._sharedResource)&&this._sharedResource.release(),this._visible=!1,this._stageLayer=null,this._stage=null}layerOpacityChanged(e,t){if(Object(i["j"])(this._edgeState))return;const r=p(this._edgeState.baseMaterial);let n=!1;for(const i of this._edgeState.edgeMaterials)i.objectTransparency!==r&&(i.objectTransparency=r,n=!0);n&&this._resetEdgeObject(t),this._stage.renderView.ensureEdgeView().updateAllComponentOpacities(this.stageObject,[e])}slicePlaneEnabledChanged(e,t){Object(i["j"])(this._edgeState)||(this._stage.renderView.ensureEdgeView().updateAllComponentMaterials(this.stageObject,this._edgeState.edgeMaterials,{slicePlaneEnabled:e},!t),this._edgeState.properties.slicePlaneEnabled=e)}setVisibility(e){if(null!=this._stage&&this._visible!==e&&(this._visible=e,this._visible?this._addedToStage?this.stageObject.setVisible(!0):(this._stageLayer.add(this.stageObject),this._addedToStage=!0):this.stageObject.setVisible(!1),Object(i["k"])(this._edgeState))){const t=this._stage.renderView.ensureEdgeView();t.hasObject(this.stageObject)?t.updateObjectVisibility(this.stageObject,e):e&&this._addOrUpdateEdgeObject(t,!1)}}get visible(){return this._visible}alignWithElevation(e,t,r,n){null!=this.elevationAligner&&(Object(i["k"])(r)&&Object(c["g"])(this.elevationContext.featureExpressionInfoContext,r),this.alignedSampledElevation=this.elevationAligner(this,this.elevationContext,e,t),this._resetEdgeObject(n))}getCenterObjectSpace(e=Object(a["f"])()){return Object(n["m"])(e,Object(o["g"])(this.stageObject.boundingVolumeObjectSpace.bounds))}getBoundingBoxObjectSpace(e=Object(s["h"])()){const t=this.stageObject.boundingVolumeObjectSpace;return Object(s["D"])(e,t.min),Object(s["C"])(e,t.max),e}computeAttachmentOrigin(e){if(this.useObjectOriginAsAttachmentOrigin){const t=this.stageObject.transformation;e.render.origin[0]+=t[12],e.render.origin[1]+=t[13],e.render.origin[2]+=t[14],e.render.num++}else for(const t of this.stageObject.geometryRecords)t.computeAttachmentOrigin(m)&&(Object(n["s"])(m,m,this.stageObject.transformation),Object(n["h"])(e.render.origin,e.render.origin,m),e.render.num++)}async getProjectedBoundingBox(e,t,r,a,o){const c=this.getBoundingBoxObjectSpace(o),u=g,d=Object(s["x"])(c)?1:u.length;for(let i=0;i<d;i++){const e=u[i];b[0]=c[e[0]],b[1]=c[e[1]],b[2]=c[e[2]],Object(n["s"])(b,b,this.stageObject.transformation),f[3*i+0]=b[0],f[3*i+1]=b[1],f[3*i+2]=b[2]}if(!e(f,0,d))return null;Object(s["k"])(c);let h=null;this.calculateRelativeScreenBounds&&(h=this.calculateRelativeScreenBounds());for(let i=0;i<3*d;i+=3){for(let e=0;e<3;e++)c[e]=Math.min(c[e],f[i+e]),c[e+3]=Math.max(c[e+3],f[i+e]);h&&r.push({location:f.slice(i,i+3),screenSpaceBoundingRect:h})}if(t&&t.service&&"absolute-height"!==this.elevationContext.mode){Object(s["e"])(c,m);const e="relative-to-scene"===this.elevationContext.mode?"scene":"ground";let r=0;if(t.useViewElevation)r=Object(i["u"])(t.service.getElevation(m[0],m[1],e),0);else try{const n=Object(l["d"])(c,t);r=Object(i["u"])(await t.service.queryElevation(m[0],m[1],a,n,e),0)}catch(p){}Object(s["z"])(c,0,0,-this.alignedSampledElevation+r)}return c}addObjectState(e,t){e===u["f"].Highlight&&t.addObject(this.stageObject,this.stageObject.highlight()),e===u["f"].MaskOccludee&&t.addObject(this.stageObject,this.stageObject.maskOccludee())}removeObjectState(e){e.removeObject(this.stageObject)}_resetEdgeObject(e){if(Object(i["j"])(this._edgeState))return;const t=this._stage.renderView.ensureEdgeView();this._visible?this._addOrUpdateEdgeObject(t,e):t.removeObject(this.stageObject)}_addOrUpdateEdgeObject(e,t){const r=this._edgeState;if(Object(i["j"])(r))return;const n=p(r.baseMaterial);for(const i of r.edgeMaterials)i.objectTransparency=n;e.addOrUpdateObject3D(this.stageObject,r.edgeMaterials,r.properties,!t).then(()=>{var e;return null==(e=this._stageLayer)?void 0:e.sync()})}}function p(e){return e.isVisible?e.parameters.transparent?d["a"].TRANSPARENT:d["a"].OPAQUE:d["a"].INVISIBLE}const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=Object(a["f"])(),m=Object(a["f"])(),g=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]]},"7c1d":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){const t=i["a"]`vec4 alignToPixelCenter(vec4 clipCoord, vec2 widthHeight) {
  2040. vec2 xy = vec2(0.500123) + 0.5 * clipCoord.xy / clipCoord.w;
  2041. vec2 pixelSz = vec2(1.0) / widthHeight;
  2042. vec2 ij = (floor(xy * widthHeight) + vec2(0.5)) * pixelSz;
  2043. vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
  2044. return vec4(result, clipCoord.zw);
  2045. }`,r=i["a"]`vec4 alignToPixelOrigin(vec4 clipCoord, vec2 widthHeight) {
  2046. vec2 xy = vec2(0.5) + 0.5 * clipCoord.xy / clipCoord.w;
  2047. vec2 pixelSz = vec2(1.0) / widthHeight;
  2048. vec2 ij = floor((xy + 0.5 * pixelSz) * widthHeight) * pixelSz;
  2049. vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
  2050. return vec4(result, clipCoord.zw);
  2051. }`;e.vertex.code.add(t),e.vertex.code.add(r),e.fragment.code.add(t),e.fragment.code.add(r)}},"7c33":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return o}));var i=r("b7bd"),n=r("d17d"),a=r("3f3e");new a["a"](i["a"].POSITION,3,n["k"].FLOAT,0,12),new a["a"](i["a"].POSITION,3,n["k"].FLOAT,0,20),new a["a"](i["a"].UV0,2,n["k"].FLOAT,12,20),new a["a"](i["a"].POSITION,3,n["k"].FLOAT,0,32),new a["a"](i["a"].NORMAL,3,n["k"].FLOAT,12,32),new a["a"](i["a"].UV0,2,n["k"].FLOAT,24,32),new a["a"](i["a"].POSITION,3,n["k"].FLOAT,0,16),new a["a"](i["a"].COLOR,4,n["k"].UNSIGNED_BYTE,12,16);const s=[new a["a"](i["a"].POSITION,2,n["k"].FLOAT,0,8)],o=[new a["a"](i["a"].POSITION,2,n["k"].FLOAT,0,16),new a["a"](i["a"].UV0,2,n["k"].FLOAT,8,16)]},"7c4b":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("ce6d"),n=r("c120"),a=r("b2b2"),s=r("f4cc");const o=1/Object(n["a"])("mapview-transitions-duration");class c extends i["a"]{constructor(){super(...arguments),this._fadeOutResolver=null,this._fadeInResolver=null,this._clips=null,this.computedVisible=!0,this.computedOpacity=1,this.fadeTransitionEnabled=!1,this.inFadeTransition=!1,this._isReady=!1,this._opacity=1,this._stage=null,this._visible=!0}get clips(){return this._clips}set clips(e){this._clips=e,this.requestRender()}get isReady(){return this._isReady}get opacity(){return this._opacity}set opacity(e){this._opacity!==e&&(this._opacity=Math.min(1,Math.max(e,0)),this.requestRender())}get stage(){return this._stage}set stage(e){if(this._stage===e)return;const t=this._stage;this._stage=e,e?this._stage.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):t.trashDisplayObject(this)}get transforms(){return this._getTransforms()}_getTransforms(){return Object(a["j"])(this._transforms)&&(this._transforms=this._createTransforms()),this._transforms}get visible(){return this._visible}set visible(e){this._visible!==e&&(this._visible=e,this.requestRender())}fadeIn(){return this._fadeInResolver||(this._fadeOutResolver&&(this._fadeOutResolver(),this._fadeOutResolver=null),this.computedOpacity=0,this.fadeTransitionEnabled=!0,this._fadeInResolver=Object(s["g"])(),this.requestRender()),this._fadeInResolver.promise}fadeOut(){return this._fadeOutResolver||(this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null),this.fadeTransitionEnabled=!0,this._fadeOutResolver=Object(s["g"])(),this.requestRender()),this._fadeOutResolver.promise}beforeRender(e){this.updateTransitionProperties(e.deltaTime,e.state.scale)}afterRender(e){this._fadeInResolver&&this.computedOpacity===this.opacity?(this._fadeInResolver(),this._fadeInResolver=null):this._fadeOutResolver&&0===this.computedOpacity&&(this._fadeOutResolver(),this._fadeOutResolver=null)}remove(){var e;null==(e=this.parent)||e.removeChild(this)}setTransform(e){}processRender(e){this.stage&&this.computedVisible&&this.doRender(e)}requestRender(){this.stage&&this.stage.requestRender()}processDetach(){this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null),this._fadeOutResolver&&(this._fadeOutResolver(),this._fadeOutResolver=null),this.onDetach(),this.emit("detach")}updateTransitionProperties(e,t){if(this.fadeTransitionEnabled){const t=this._fadeOutResolver||!this.visible?0:this.opacity,r=this.computedOpacity;if(r===t)this.computedVisible=this.visible;else{const i=e*o;this.computedOpacity=r>t?Math.max(t,r-i):Math.min(t,r+i),this.computedVisible=this.computedOpacity>0;const n=t===this.computedOpacity;this.inFadeTransition=!n,n||this.requestRender()}}else this.computedOpacity=this.opacity,this.computedVisible=this.visible}onAttach(){}onDetach(){}doRender(e){}ready(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())}}},"7c51":function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return P})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return j})),r.d(t,"e",(function(){return A})),r.d(t,"f",(function(){return x})),r.d(t,"g",(function(){return T})),r.d(t,"h",(function(){return R})),r.d(t,"i",(function(){return f})),r.d(t,"j",(function(){return y})),r.d(t,"k",(function(){return C})),r.d(t,"l",(function(){return S}));var i=r("38a4"),n=r("b2b2"),a=r("e431"),s=r("0b2d"),o=r("4261"),c=r("b7c2"),l=r("da1c"),u=r("1153"),d=r("b7bd"),h=r("b623");const p=Object(o["h"])();function f(e,t,r,i,n,a,s){if(!Object(h["d"])(t))if(e.boundingInfo){Object(u["a"])(e.primitiveType===c["h"].Triangle);const t=r.tolerance;m(e.boundingInfo,i,n,t,a,s)}else{const t=e.indices.get(d["a"].POSITION),r=e.vertexAttributes.get(d["a"].POSITION);y(i,n,0,t.length/3,t,r,void 0,a,s)}}const b=Object(s["f"])();function m(e,t,r,i,a,s){if(Object(n["j"])(e))return;const c=w(t,r,b);if(Object(o["D"])(p,e.getBBMin()),Object(o["C"])(p,e.getBBMax()),Object(n["k"])(a)&&a.applyToAabb(p),x(p,t,c,i)){const{primitiveIndices:n,indices:o,position:c}=e,l=n?n.length:o.length/3;if(l>I){const n=e.getChildren();if(void 0!==n){for(let e=0;e<8;++e)void 0!==n[e]&&m(n[e],t,r,i,a,s);return}}y(t,r,0,l,o,c,n,a,s)}}const g=Object(s["f"])();function y(e,t,r,i,a,s,o,c,l){if(o)return O(e,t,r,i,a,s,o,c,l);const u=s.data,d=s.stride||s.size,h=e[0],p=e[1],f=e[2],b=t[0]-h,m=t[1]-p,y=t[2]-f;for(let O=r,v=3*r;O<i;++O){let e=d*a[v++],t=u[e++],r=u[e++],i=u[e];e=d*a[v++];let s=u[e++],o=u[e++],_=u[e];e=d*a[v++];let w=u[e++],x=u[e++],T=u[e];Object(n["k"])(c)&&([t,r,i]=c.applyToVertex(t,r,i,O),[s,o,_]=c.applyToVertex(s,o,_,O),[w,x,T]=c.applyToVertex(w,x,T,O));const S=s-t,E=o-r,A=_-i,C=w-t,R=x-r,M=T-i,P=m*M-R*y,I=y*C-M*b,D=b*R-C*m,L=S*P+E*I+A*D;if(Math.abs(L)<=Number.EPSILON)continue;const N=h-t,F=p-r,k=f-i,U=N*P+F*I+k*D;if(L>0){if(U<0||U>L)continue}else if(U>0||U<L)continue;const z=F*A-E*k,B=k*S-A*N,V=N*E-S*F,G=b*z+m*B+y*V;if(L>0){if(G<0||U+G>L)continue}else if(G>0||U+G<L)continue;const H=(C*z+R*B+M*V)/L;H>=0&&l(H,j(S,E,A,C,R,M,g),O,!1)}}function O(e,t,r,i,a,s,o,c,l){const u=s.data,d=s.stride||s.size,h=e[0],p=e[1],f=e[2],b=t[0]-h,m=t[1]-p,y=t[2]-f;for(let O=r;O<i;++O){const e=o[O];let t=3*e,r=d*a[t++],i=u[r++],s=u[r++],v=u[r];r=d*a[t++];let _=u[r++],w=u[r++],x=u[r];r=d*a[t];let T=u[r++],S=u[r++],E=u[r];Object(n["k"])(c)&&([i,s,v]=c.applyToVertex(i,s,v,O),[_,w,x]=c.applyToVertex(_,w,x,O),[T,S,E]=c.applyToVertex(T,S,E,O));const A=_-i,C=w-s,R=x-v,M=T-i,P=S-s,I=E-v,D=m*I-P*y,L=y*M-I*b,N=b*P-M*m,F=A*D+C*L+R*N;if(Math.abs(F)<=Number.EPSILON)continue;const k=h-i,U=p-s,z=f-v,B=k*D+U*L+z*N;if(F>0){if(B<0||B>F)continue}else if(B>0||B<F)continue;const V=U*R-C*z,G=z*A-R*k,H=k*C-A*U,q=b*V+m*G+y*H;if(F>0){if(q<0||B+q>F)continue}else if(q>0||B+q<F)continue;const W=(M*V+P*G+I*H)/F;W>=0&&l(W,j(A,C,R,M,P,I,g),e,!1)}}const v=Object(s["f"])(),_=Object(s["f"])();function j(e,t,r,i,n,s,o){return Object(a["y"])(v,e,t,r),Object(a["y"])(_,i,n,s),Object(a["i"])(o,v,_),Object(a["t"])(o,o),o}function w(e,t,r){return Object(a["y"])(r,1/(t[0]-e[0]),1/(t[1]-e[1]),1/(t[2]-e[2]))}function x(e,t,r,i){return T(e,t,r,i,1/0)}function T(e,t,r,i,n){const a=(e[0]-i-t[0])*r[0],s=(e[3]+i-t[0])*r[0];let o=Math.min(a,s),c=Math.max(a,s);const l=(e[1]-i-t[1])*r[1],u=(e[4]+i-t[1])*r[1];if(c=Math.min(c,Math.max(l,u)),c<0)return!1;if(o=Math.max(o,Math.min(l,u)),o>c)return!1;const d=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return c=Math.min(c,Math.max(d,h)),!(c<0)&&(o=Math.max(o,Math.min(d,h)),!(o>c)&&o<n)}function S(e,t,r,n,a){let s=(r.screenLength||0)*e.pixelRatio;a&&(s=Object(l["f"])(s,n,t,a));const o=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return Object(i["f"])(o*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function E(e,t,r){if(!e)return;const i=e.parameters,n=e.paddingPixelsOverride;t.setUniform4f(r,i.divisor,i.offset,i.minPixelSize,n)}function A(e,t){const r=t?A(t):{};for(const i in e){let t=e[i];t&&t.forEach&&(t=M(t)),null==t&&i in r||(r[i]=t)}return r}function C(e,t){let r=!1;for(const i in t){const n=t[i];void 0!==n&&(r=!0,Array.isArray(n)?e[i]=n.slice():e[i]=n)}return r}function R(e,t,r,n,a,s){if(!t.options.selectionMode)return;const o=e.vertexAttributes.get(d["a"].POSITION).data,c=e.vertexAttributes.get(d["a"].SIZE),l=c&&c.data[0],u=n[0],h=n[1],p=((l+a)/2+4)*e.screenToWorldRatio;let f=Number.MAX_VALUE,b=0;for(let d=0;d<o.length-5;d+=3){const e=o[d],t=o[d+1],r=u-e,n=h-t,a=o[d+3]-e,s=o[d+4]-t,c=Object(i["f"])((a*r+s*n)/(a*a+s*s),0,1),l=a*c-r,p=s*c-n,m=l*l+p*p;m<f&&(f=m,b=d/3)}f<p*p&&s(r.dist,r.normal,b,!1)}function M(e){const t=[];return e.forEach(e=>t.push(e)),t}const P={multiply:1,ignore:2,replace:3,tint:4},I=1e3},"7c7f":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a}));var i,n=r("7f83");function a(e){return e&&Object(n["i"])(e)?i.Mars:e&&Object(n["j"])(e)?i.Moon:i.Earth}!function(e){e[e.Earth=1]="Earth",e[e.Mars=2]="Mars",e[e.Moon=3]="Moon",e[e.COUNT=4]="COUNT"}(i||(i={}))},"7cb4":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("dfaf"),n=r("5211"),a=r("3886");function s(e,t){e.include(i["a"],t),e.fragment.code.add(a["a"]`
  2052. struct TextureLookupParameter {
  2053. vec2 uv;
  2054. ${t.supportsTextureAtlas?"vec2 size;":""}
  2055. } vtc;
  2056. `),t.attributeTextureCoordinates===i["b"].Default&&e.fragment.code.add(a["a"]`vec4 textureLookup(sampler2D tex, TextureLookupParameter params) {
  2057. return texture2D(tex, params.uv);
  2058. }`),t.attributeTextureCoordinates===i["b"].Atlas&&(e.include(n["a"]),e.fragment.code.add(a["a"]`vec4 textureLookup(sampler2D tex, TextureLookupParameter params) {
  2059. return textureAtlasLookup(tex, params.size, params.uv, vuvRegion);
  2060. }`))}},"7ce4":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i=r("b50f"),n=r("e92d"),a=r("b2b2"),s=r("a21b"),o=r("1956"),c=r("cc15"),l=r("d17d");const u=n["a"].getLogger("esri.views.webgl.BufferObject");function d(e){return Object(i["h"])(e)}class h{constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._size=-1,this._indexType=void 0,e.instanceCounter.increment(l["t"].Buffer,this),this._glName=this._context.gl.createBuffer(),Object(o["a"])(this._context.gl),i&&this.setData(i)}static createIndex(e,t,r){return new h(e,l["d"].ELEMENT_ARRAY_BUFFER,t,r)}static createVertex(e,t,r){return new h(e,l["d"].ARRAY_BUFFER,t,r)}static createUniform(e,t,r){if(e.type!==c["a"].WEBGL2)throw new Error("Uniform buffers are supported in WebGL2 only!");return new h(e,l["d"].UNIFORM_BUFFER,t,r)}static createPixelPack(e,t=l["D"].STREAM_READ,r){if(e.type!==c["a"].WEBGL2)throw new Error("Pixel pack buffers are supported in WebGL2 only!");const i=new h(e,l["d"].PIXEL_PACK_BUFFER,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=l["D"].STREAM_DRAW,r){if(e.type!==c["a"].WEBGL2)throw new Error("Pixel unpack buffers are supported in WebGL2 only!");return new h(e,l["d"].PIXEL_UNPACK_BUFFER,t,r)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteSize(){return this.bufferType===l["d"].ELEMENT_ARRAY_BUFFER?this._indexType===l["k"].UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===l["d"].ELEMENT_ARRAY_BUFFER||this.bufferType===l["d"].ARRAY_BUFFER}dispose(){var e;null!=(e=this._context)&&e.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(l["t"].Buffer,this),this._context=null):this._glName&&u.warn("Leaked WebGL buffer object")}setSize(e,t=null){if(e<=0&&u.error("Buffer size needs to be positive!"),this.bufferType===l["d"].ELEMENT_ARRAY_BUFFER&&Object(a["k"])(t))switch(this._indexType=t,t){case l["k"].UNSIGNED_SHORT:e*=2;break;case l["k"].UNSIGNED_INT:e*=4}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===l["d"].ELEMENT_ARRAY_BUFFER&&(Object(s["i"])(e)&&(t/=2,this._indexType=l["k"].UNSIGNED_SHORT),Object(s["j"])(e)&&(t/=4,this._indexType=l["k"].UNSIGNED_INT)),this._setBufferData(t,e)}_setBufferData(e,t=null){this._size=e;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const i=this._context.gl;Object(a["k"])(t)?i.bufferData(this.bufferType,t,this.usage):i.bufferData(this.bufferType,e,this.usage),Object(o["a"])(i),this._isVAOAware&&this._context.bindVAO(r)}setSubData(e,t=0,r=0,i=e.byteLength){if(!e)return;(t<0||t>=this._size)&&u.error("offset is out of range!");let n=t,a=r,c=i,d=e.byteLength;this.bufferType===l["d"].ELEMENT_ARRAY_BUFFER&&(Object(s["i"])(e)?(d/=2,n*=2,a*=2,c*=2):Object(s["j"])(e)&&(d/=4,n*=4,a*=4,c*=4)),void 0===i&&(i=d-1),r>=i&&u.error("end must be bigger than start!"),t+r-i>this._size&&u.error("An attempt to write beyond the end of the buffer!");const h=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const p=this._context.gl,f=ArrayBuffer.isView(e)?e.buffer:e,b=0===a&&c===e.byteLength?f:f.slice(a,c);p.bufferSubData(this.bufferType,n,b),Object(o["a"])(p),this._isVAOAware&&this._context.bindVAO(h)}setSubDataFromView(e,t,r,i){if(!e)return;(t<0||t>=this._size)&&u.error("offset is out of range!"),r>=i&&u.error("end must be bigger than start!"),t+r-i>this._size&&u.error("An attempt to write beyond the end of the buffer!");const n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const a=this._context.gl;if(this._context.type===c["a"].WEBGL2)a.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r);else{const n=0===r&&i===e.length?e:e.subarray(r,i);a.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,n)}Object(o["a"])(a),this._isVAOAware&&this._context.bindVAO(n)}getSubData(e,t=0,r,i){if(this._context.type!==c["a"].WEBGL2)return void u.error("Get buffer subdata is supported in WebGL2 only!");if(r<0||i<0)return void u.error("Problem getting subdata: offset and length were less than zero!");const n=d(e)?e.BYTES_PER_ELEMENT:1;if(n*((null!=r?r:0)+(null!=i?i:0))>e.byteLength)return void u.error("Problem getting subdata: offset and length exceeded destination size!");t+n*(null!=i?i:0)>this.byteSize&&u.warn("Potential problem getting subdata: requested data exceeds buffer size!");const a=this._context.gl;this._context.bindBuffer(this,l["d"].COPY_READ_BUFFER),a.getBufferSubData(l["d"].COPY_READ_BUFFER,t,e,r,i),this._context.unbindBuffer(l["d"].COPY_READ_BUFFER)}async getSubDataAsync(e,t=0,r,i){this._context.type===c["a"].WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)):u.error("Get buffer subdata is supported in WebGL2 only!")}}},"7cfb":function(e,t,r){"use strict";function i(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,o=r?r.count:t.count;let c=(r&&r.dstIndex?r.dstIndex:0)*n,l=(r&&r.srcIndex?r.srcIndex:0)*s;for(let u=0;u<o;++u)i[c]=a[l],c+=n,l+=s}function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let i=0;i<r;i++)t[i]=e.get(i);return t}r.d(t,"a",(function(){return n}));Object.freeze({__proto__:null,copy:i,makeDense:n})},"7d11":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var i=r("3c9c"),n=r("c332"),a=r("bc40"),s=r("3886");function o(e,t){t.normalType===n["b"].Attribute||t.normalType===n["b"].CompressedAttribute?(e.include(n["a"],t),e.varyings.add("vNormalWorld","vec3"),e.varyings.add("vNormalView","vec3"),e.vertex.uniforms.add("transformNormalGlobalFromModel","mat3"),e.vertex.uniforms.add("transformNormalViewFromGlobal","mat3"),e.vertex.code.add(s["a"]`void forwardNormal() {
  2061. vNormalWorld = transformNormalGlobalFromModel * normalModel();
  2062. vNormalView = transformNormalViewFromGlobal * vNormalWorld;
  2063. }`)):t.normalType===n["b"].Ground?(e.include(a["a"],t),e.varyings.add("vNormalWorld","vec3"),e.vertex.code.add(s["a"]`
  2064. void forwardNormal() {
  2065. vNormalWorld = ${t.viewingMode===i["a"].Global?s["a"]`normalize(vPositionWorldCameraRelative);`:s["a"]`vec3(0.0, 0.0, 1.0);`}
  2066. }
  2067. `)):e.vertex.code.add(s["a"]`void forwardNormal() {}`)}function c(e,t){e.setUniformMatrix4fv("viewNormal",t)}},"7d7d":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n}));var i=r("2c4f");function n(e,t,r=i["a"]){return t||(t=new r),t===e||(t.removeAll(),s(e)?t.addMany(e):e&&t.add(e)),t}function a(e){return e}function s(e){return e&&(Array.isArray(e)||"items"in e&&Array.isArray(e.items))}},"7e0c":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return y}));var i=r("880d"),n=r("e431"),a=r("0b2d"),s=r("2ebb"),o=r("0c9d");class c{updateSettings(e){this.settings=e,this.edgeHashFunction=e.reducedPrecision?p:h}write(e,t,r){const i=this.edgeHashFunction(r);v.seed=i;const n=v.getIntRange(0,255),a=v.getIntRange(0,this.settings.variants-1),s=.7,o=v.getFloat(),c=255*(.5*m(-(1-Math.min(o/s,1))+Math.max(0,o-s)/(1-s),1.2)+.5);e.position0.setVec(t,r.position0),e.position1.setVec(t,r.position1),e.componentIndex.set(t,r.componentIndex),e.variantOffset.set(t,n),e.variantStroke.set(t,a),e.variantExtension.set(t,c)}trim(e,t){return e.slice(0,t)}}const l=new Float32Array(6),u=new Uint32Array(l.buffer),d=new Uint32Array(1);function h(e){const t=l;t[0]=e.position0[0],t[1]=e.position0[1],t[2]=e.position0[2],t[3]=e.position1[0],t[4]=e.position1[1],t[5]=e.position1[2],d[0]=5381;for(let r=0;r<u.length;r++)d[0]=31*d[0]+u[r];return d[0]}function p(e){const t=l;t[0]=b(e.position0[0]),t[1]=b(e.position0[1]),t[2]=b(e.position0[2]),t[3]=b(e.position1[0]),t[4]=b(e.position1[1]),t[5]=b(e.position1[2]),d[0]=5381;for(let r=0;r<u.length;r++)d[0]=31*d[0]+u[r];return d[0]}const f=1e4;function b(e){return Math.round(e*f)/f}function m(e,t){const r=e<0?-1:1;return Math.abs(e)**t*r}class g{constructor(){this.commonWriter=new c}updateSettings(e){this.commonWriter.updateSettings(e)}allocate(e){return o["c"].createBuffer(e)}write(e,t,r){this.commonWriter.write(e,t,r),Object(n["h"])(O,r.faceNormal0,r.faceNormal1),Object(n["t"])(O,O),e.normal.setVec(t,O)}trim(e,t){return this.commonWriter.trim(e,t)}}g.Layout=o["c"],g.glLayout=Object(s["a"])(o["c"],1);class y{constructor(){this.commonWriter=new c}updateSettings(e){this.commonWriter.updateSettings(e)}allocate(e){return o["d"].createBuffer(e)}write(e,t,r){this.commonWriter.write(e,t,r),e.normalA.setVec(t,r.faceNormal0),e.normalB.setVec(t,r.faceNormal1)}trim(e,t){return this.commonWriter.trim(e,t)}}y.Layout=o["d"],y.glLayout=Object(s["a"])(o["d"],1);const O=Object(a["f"])(),v=new i["a"]},"7e21":function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i=r("a05b"),n=r("d272"),a=r("4db9"),s=r("c332"),o=r("dfaf"),c=r("7d11"),l=r("c2d1"),u=r("6a07"),d=r("be24"),h=r("ebd5"),p=r("3886");function f(e,t){const r=e.vertex.code,f=e.fragment.code,b=t.hasModelTransformation;t.output!==i["a"].Depth&&t.output!==i["a"].Shadow||(e.include(a["a"],{linearDepth:!0,hasModelTransformation:b}),e.include(o["a"],t),e.include(d["a"],t),e.include(l["a"],t),e.include(n["a"],t),e.vertex.uniforms.add("nearFar","vec2"),e.varyings.add("depth","float"),t.hasColorTexture&&e.fragment.uniforms.add("tex","sampler2D"),r.add(p["a"]`
  2068. void main(void) {
  2069. vpos = calculateVPos();
  2070. vpos = subtractOrigin(vpos);
  2071. vpos = addVerticalOffset(vpos, localOrigin);
  2072. gl_Position = transformPositionWithDepth(proj, view, ${b?"model,":""} vpos, nearFar, depth);
  2073. forwardTextureCoordinates();
  2074. }
  2075. `),e.include(h["a"],t),f.add(p["a"]`
  2076. void main(void) {
  2077. discardBySlice(vpos);
  2078. ${t.hasColorTexture?p["a"]`
  2079. vec4 texColor = texture2D(tex, vuv0);
  2080. discardOrAdjustAlpha(texColor);`:""}
  2081. outputDepth(depth);
  2082. }
  2083. `)),t.output===i["a"].Normal&&(e.include(a["a"],{linearDepth:!1,hasModelTransformation:b}),e.include(s["a"],t),e.include(c["a"],t),e.include(o["a"],t),e.include(d["a"],t),t.hasColorTexture&&e.fragment.uniforms.add("tex","sampler2D"),e.vertex.uniforms.add("viewNormal","mat4"),e.varyings.add("vPositionView","vec3"),r.add(p["a"]`
  2084. void main(void) {
  2085. vpos = calculateVPos();
  2086. vpos = subtractOrigin(vpos);
  2087. ${t.normalType===s["b"].Attribute?p["a"]`
  2088. vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:""}
  2089. vpos = addVerticalOffset(vpos, localOrigin);
  2090. gl_Position = transformPosition(proj, view, ${b?"model,":""} vpos);
  2091. forwardTextureCoordinates();
  2092. }
  2093. `),e.include(n["a"],t),e.include(h["a"],t),f.add(p["a"]`
  2094. void main() {
  2095. discardBySlice(vpos);
  2096. ${t.hasColorTexture?p["a"]`
  2097. vec4 texColor = texture2D(tex, vuv0);
  2098. discardOrAdjustAlpha(texColor);`:""}
  2099. ${t.normalType===s["b"].ScreenDerivative?p["a"]`
  2100. vec3 normal = screenDerivativeNormal(vPositionView);`:p["a"]`
  2101. vec3 normal = normalize(vNormalWorld);
  2102. if (gl_FrontFacing == false) normal = -normal;`}
  2103. gl_FragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);
  2104. }
  2105. `)),t.output===i["a"].Highlight&&(e.include(a["a"],{linearDepth:!1,hasModelTransformation:b}),e.include(o["a"],t),e.include(d["a"],t),t.hasColorTexture&&e.fragment.uniforms.add("tex","sampler2D"),r.add(p["a"]`
  2106. void main(void) {
  2107. vpos = calculateVPos();
  2108. vpos = subtractOrigin(vpos);
  2109. vpos = addVerticalOffset(vpos, localOrigin);
  2110. gl_Position = transformPosition(proj, view, ${b?"model,":""} vpos);
  2111. forwardTextureCoordinates();
  2112. }
  2113. `),e.include(n["a"],t),e.include(h["a"],t),e.include(u["a"]),f.add(p["a"]`
  2114. void main() {
  2115. discardBySlice(vpos);
  2116. ${t.hasColorTexture?p["a"]`
  2117. vec4 texColor = texture2D(tex, vuv0);
  2118. discardOrAdjustAlpha(texColor);`:""}
  2119. outputHighlight();
  2120. }
  2121. `))}},"7e2d":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("c6ac");function n(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,o=r?r.count:t.count;let c=(r&&r.dstIndex?r.dstIndex:0)*n,l=(r&&r.srcIndex?r.srcIndex:0)*s;for(let u=0;u<o;++u){for(let e=0;e<9;++e)i[c+e]=a[l+e];c+=n,l+=s}}Object.freeze({__proto__:null,copy:n});function a(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,o=r?r.count:t.count;let c=(r&&r.dstIndex?r.dstIndex:0)*n,l=(r&&r.srcIndex?r.srcIndex:0)*s;for(let u=0;u<o;++u){for(let e=0;e<16;++e)i[c+e]=a[l+e];c+=n,l+=s}}Object.freeze({__proto__:null,copy:a});r("7cfb"),r("dc56"),r("4c96"),r("1c20");function s(e,t){return new e(new ArrayBuffer(t*e.ElementCount*Object(i["a"])(e.ElementType)))}},"7e6b":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("a9ab");let c=class extends n["a"]{constructor(e){super(e),this.geometries=null,this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const e=this.geometries.map((function(e){return e.toJSON()})),t=this.geometries[0],r={};return r.outSR=this.outSpatialReference.wkid||JSON.stringify(this.outSpatialReference.toJSON()),r.inSR=t.spatialReference.wkid||JSON.stringify(t.spatialReference.toJSON()),r.geometries=JSON.stringify({geometryType:Object(o["c"])(t),geometries:e}),this.transformation&&(r.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(r.transformForward=this.transformForward),r}};Object(i["a"])([Object(a["b"])()],c.prototype,"geometries",void 0),Object(i["a"])([Object(a["b"])({json:{read:{source:"outSR"}}})],c.prototype,"outSpatialReference",void 0),Object(i["a"])([Object(a["b"])()],c.prototype,"transformation",void 0),Object(i["a"])([Object(a["b"])()],c.prototype,"transformForward",void 0),c=Object(i["a"])([Object(s["a"])("esri.rest.support.ProjectParameters")],c);const l=c},"7ed0":function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return O}));var i=r("cea0");function n(e){if(e.json&&e.json.origins){const t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(const e in r)if(t[e]){const i=t[e];r[e].forEach(e=>{t[e]=i}),delete t[e]}}}var a=r("0b86");function s(e){if(e.json||(e.json={}),c(e.json),l(e.json),o(e.json),e.json.origins)for(const t in e.json.origins)c(e.json.origins[t]),l(e.json.origins[t]),o(e.json.origins[t]);return!0}function o(e){e.name&&(e.read&&"object"==typeof e.read?void 0===e.read.source&&(e.read.source=e.name):e.read={source:e.name},e.write&&"object"==typeof e.write?void 0===e.write.target&&(e.write.target=e.name):e.write={target:e.name})}function c(e){"boolean"==typeof e.read?e.read={enabled:e.read}:"function"==typeof e.read?e.read={enabled:!0,reader:e.read}:e.read&&"object"==typeof e.read&&void 0===e.read.enabled&&(e.read.enabled=!0)}function l(e){"boolean"==typeof e.write?e.write={enabled:e.write}:"function"==typeof e.write?e.write={enabled:!0,writer:e.write}:e.write&&"object"==typeof e.write&&void 0===e.write.enabled&&(e.write.enabled=!0)}var u=r("25245");function d(e,t){return p(e,"read",t)}function h(e,t){return p(e,"write",t)}function p(e,t,r){let i=e&&e.json;if(e&&e.json&&e.json.origins&&r){const n=e.json.origins[r.origin];n&&("any"===t||t in n)&&(i=n)}return i}function f(e){const t=b(e);if(e.json.origins)for(const r in e.json.origins){const i=e.json.origins[r],n=i.types?m(i):t;Object(a["a"])(n,i,!1),i.types&&!i.write&&e.json.write&&e.json.write.enabled&&(i.write={...e.json.write}),Object(u["a"])(n,i)}Object(a["a"])(t,e.json,!0),Object(u["a"])(t,e.json)}function b(e){return e.json.types?y(e.json):e.type?g(e):y(e)}function m(e){return e.type?g(e):y(e)}function g(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!Object(i["o"])(r);)r=r[0],t++;return{type:r,ndimArray:t}}function y(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function O(e){s(e)&&(n(e),f(e))}},"7f60":function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return g}));var i=r("9ef0"),n=(r("c120"),r("e92d")),a=r("b2b2"),s=r("0b2d"),o=r("0fc4"),c=r("2e0f"),l=r("0eb9"),u=r("e9d6"),d=r("ba58"),h=r("fa73"),p=r("5e82"),f=r("a803");const b=n["a"].getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class m extends p["b"]{constructor(e,t,r,i){super(r.schedule),this._context=r,this._elevationInfoOverride=null,this._ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1},this.complexity=null,this.logger=b,this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.symbol=e,this.symbolLayer=t,this._renderPriority=i.renderPriority,this._renderPriorityStep=i.renderPriorityStep,this._elevationContext=new l["a"],this.complexity=this.computeComplexity(),this._ignoreDrivers=i.ignoreDrivers,this._ignoreDrivers||(this._drivenProperties=y(this._context.renderer)),this._updateElevationContext()}getCachedSize(){return null}get extentPadding(){return 0}_drivenPropertiesChanged(e){if(this._ignoreDrivers)return!1;const t=this._drivenProperties,r=y(e);return r.color!==t.color||r.opacity!==t.opacity||r.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||r.size!==t.size}get needsDrivenTransparentPass(){return this._drivenProperties.opacity&&!this._drivenProperties.opacityAlwaysOpaque}_logGeometryCreationWarnings(e,t,r,i){const n=e.projectionSuccess,a="polygons"in e?e.polygons:null,s=i+" geometry failed to be created";let o=null;n?!t.length||1===t.length&&!t[0].length?o=`${s} (no ${r} were defined)`:Array.isArray(t)&&Array.isArray(t[0])?a&&0===a.length&&"rings"===r&&t.length>0&&t[0].length>2&&(o=s+" (filled rings should use clockwise winding - try reversing the order of vertices)"):o=`${s} (${r} should be defined as a 2D array)`:o=s+" (failed to project geometry to view spatial reference)",o&&b.warnOncePerTick(o)}_validateGeometry(e,t=null,r=null){if(Object(a["k"])(t)&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+r+" symbol: "+e.type),!1;if("point"===e.type){const t=e;if(!isFinite(t.x)||!isFinite(t.y))return b.warn("point coordinate is not a valid number, graphic skipped"),!1}return!0}_defaultElevationInfoNoZ(){return O}_defaultElevationInfoZ(){return v}_updateElevationContext(){Object(a["k"])(this._elevationInfoOverride)?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.updateFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.updateFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}setGraphicElevationContext(e,t){const r=Object(a["t"])(e.geometry),i=this.getDefaultElevationInfo(r);t.unit=null!=this._elevationContext.unit?this._elevationContext.unit:i.unit,t.mode=this.getGeometryElevationMode(r,i),t.offsetMeters=Object(a["u"])(this._elevationContext.meterUnitOffset,Object(a["u"])(i.offset,0));const n=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===t.mode;n&&(t.mode="relative-to-ground",t.offsetMeters=0);const s=n?u["h"]:this._elevationContext.featureExpressionInfoContext;return t.updateFeatureExpressionInfoContext(s,e,this._context.layer),t}prepareSymbolLayerPatch(e){}updateGeometry(e,t){return!1}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity;const e=this._context.layer.opacity;return null==e?1:e}_getCombinedOpacity(e,t=_){let r=1;return this.draped||(r*=this._getLayerOpacity()),this._drivenProperties.opacity||(Object(a["k"])(e)?r*=e.a:t.hasIntrinsicColor||(r=0)),r}_getCombinedOpacityAndColor(e,t=_){const r=this._getCombinedOpacity(e,t);if(this._drivenProperties.color)return Object(d["g"])(null,r);const n=Object(a["k"])(e)?i["a"].toUnitRGB(e):s["a"];return Object(d["g"])(n,r)}_getVertexOpacityAndColor(e,t=null){const r=this._drivenProperties.color?e.color:null,i=this._drivenProperties.opacity?e.opacity:null,n=Object(d["g"])(r,i);return Object(a["k"])(t)&&(n[0]*=t,n[1]*=t,n[2]*=t,n[3]*=t),n}isFastUpdatesEnabled(){return this._fastUpdates&&this._fastUpdates.enabled}computeComplexity(){return Object(f["c"])(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,r){switch(e){case"opacity":return this.layerOpacityChanged(t,r);case"elevationInfo":{const e=this._elevationContext.mode;return this._updateElevationContext(),this.layerElevationInfoChanged(t,r,e)!==c["b"].RECREATE}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,r);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged();default:return!1}}updateGraphics3DGraphicElevationInfo(e,t,r){let i=c["b"].UPDATE;return e.forEach(e=>{const n=t(e);if(Object(a["k"])(n)){const t=e.graphic;this.setGraphicElevationContext(t,n.elevationContext),n.needsElevationUpdates=r(n.elevationContext.mode)}else i=c["b"].RECREATE}),i}applyRendererDiff(e,t){return h["a"].Recreate_Symbol}getFastUpdateAttrValues(e){if(!this._fastUpdates.enabled)return null;const t=this._fastUpdates.visualVariables,r=t.size?g(t.size.field,e):0,i=t.color?g(t.color.field,e):0,n=t.opacity?g(t.opacity.field,e):0;return Object(o["g"])(r,i,n,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&b.warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}}function g(e,t){const r=null!=e?t.attributes[e]:0;return null!=r&&isFinite(r)?r:0}function y(e){const t={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach(e=>{switch(e.type){case"color":if(t.color=!0,e.stops)for(let r=0;r<e.stops.length;r++){const i=e.stops[r].color;i&&(t.opacity=!0,i.a<1&&(t.opacityAlwaysOpaque=!1))}break;case"opacity":t.opacity=!0,t.opacityAlwaysOpaque=!1;break;case"size":t.size=!0}}),t}const O={mode:"on-the-ground",offset:0,unit:"meters"},v={mode:"absolute-height",offset:0,unit:"meters"},_={hasIntrinsicColor:!1}},"7f83":function(e,t,r){"use strict";r.d(t,"a",(function(){return C})),r.d(t,"b",(function(){return E})),r.d(t,"c",(function(){return A})),r.d(t,"d",(function(){return p})),r.d(t,"e",(function(){return f})),r.d(t,"f",(function(){return y})),r.d(t,"g",(function(){return m})),r.d(t,"h",(function(){return b})),r.d(t,"i",(function(){return j})),r.d(t,"j",(function(){return x})),r.d(t,"k",(function(){return v})),r.d(t,"l",(function(){return S})),r.d(t,"m",(function(){return g})),r.d(t,"n",(function(){return _})),r.d(t,"o",(function(){return w})),r.d(t,"p",(function(){return O})),r.d(t,"q",(function(){return T}));var i=r("b2b2"),n=r("b3b6"),a=r("0386"),s=r("2c81");const o={102113:!0,102100:!0,3857:!0,3785:!0},c={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0},l='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',u=[-20037508.342788905,20037508.342788905],d=[-20037508.342787,20037508.342787],h={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:u,origin:d,dx:1e-5},102100:{wkTemplate:l,valid:u,origin:d,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:u,origin:d,dx:1e-5},3857:{wkTemplate:l,valid:u,origin:d,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function p(e,t){return!Object(i["j"])(e)&&!Object(i["j"])(t)&&(e===t||(null!=e.wkid||null!=t.wkid?e.wkid===t.wkid||O(e)&&O(t)||null!=t.latestWkid&&e.wkid===t.latestWkid||null!=e.latestWkid&&t.wkid===e.latestWkid:!(!e.wkt||!t.wkt)&&e.wkt.toUpperCase()===t.wkt.toUpperCase()))}function f(e){return S(e)&&e.wkid?h[e.wkid]:null}function b(e){return!!S(e)&&(e.wkid?null==s["a"][e.wkid]:!!e.wkt&&!!/^\s*GEOGCS/i.test(e.wkt))}function m(e){return!(j(e)||x(e))}function g(e){return S(e)&&4326===e.wkid}function y(e){return S(e)&&e.wkid===a["a"].CGCS2000}function O(e){return S(e)&&null!=e.wkid&&!0===o[e.wkid]}function v(e){return S(e)&&32662===e.wkid}function _(e){return e===a["a"].GCSMARS2000||e===a["a"].GCSMARS2000_SPHERE}function j(e){return S(e)&&null!=e.wkid&&_(e.wkid)}function w(e){return e===a["a"].GCSMOON2000}function x(e){return S(e)&&null!=e.wkid&&w(e.wkid)}function T(e){return S(e)&&null!=e.wkid&&!0===c[e.wkid]}function S(e){return Object(i["k"])(e)&&(null!=e.wkid&&e.wkid>=2e3||null!=e.wkt)}const E={wkid:4326,wkt:Object(n["c"])(h[4326].wkTemplate,{Central_Meridian:"0.0"})},A={wkid:102100,latestWkid:3857},C={wkid:32662}},"7ffa":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return o}));r("b50f"),r("c120");var i=r("b2b2"),n=r("a21b");function a(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&a(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function s(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=d(e);if(Object(i["k"])(t))return t;if(c(e))return e.clone();if(l(e))return e.map(s);if(u(e))return e.clone();const r={};for(const i of Object.getOwnPropertyNames(e))r[i]=s(e[i]);return r}function o(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=d(e);if(Object(i["k"])(t))return t;if(l(e)){let t=!0;const r=e.map(e=>{const r=o(e);return null!=e&&null==r&&(t=!1),r});return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const i=e[r],n=o(i);if(null!=i&&null==n)return null;t[r]=n}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function d(e){if(Object(n["h"])(e)||Object(n["k"])(e)||Object(n["l"])(e)||Object(n["f"])(e)||Object(n["i"])(e)||Object(n["g"])(e)||Object(n["j"])(e)||Object(n["d"])(e)||Object(n["e"])(e))return Object(n["m"])(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;return e.forEach((e,r)=>{t.set(r,s(e))}),t}if(e instanceof Set){const t=new Set;return e.forEach(e=>{t.add(s(e))}),t}return null}function h(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},8048:function(e,t,r){"use strict";r.d(t,"a",(function(){return Y})),r.d(t,"b",(function(){return T})),r.d(t,"c",(function(){return E})),r.d(t,"d",(function(){return $})),r.d(t,"e",(function(){return U})),r.d(t,"f",(function(){return k})),r.d(t,"g",(function(){return N})),r.d(t,"h",(function(){return V})),r.d(t,"i",(function(){return F})),r.d(t,"j",(function(){return u})),r.d(t,"k",(function(){return S})),r.d(t,"l",(function(){return D})),r.d(t,"m",(function(){return J})),r.d(t,"n",(function(){return I})),r.d(t,"o",(function(){return R})),r.d(t,"p",(function(){return M})),r.d(t,"q",(function(){return P})),r.d(t,"r",(function(){return A})),r.d(t,"s",(function(){return C})),r.d(t,"t",(function(){return L})),r.d(t,"u",(function(){return w}));r("c120");var i=r("fa8a"),n=r("b2b2"),a=r("f694"),s=r("5996"),o=r("2255"),c=r("7f83"),l=r("2c81");const u=39.37,d=o["a"].radius*Math.PI/200,h=/UNIT\[([^\]]+)\]\]$/i,p=l["a"],f=/UNIT\[([^\]]+)\]/i,b=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),m=Object(i["b"])()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),g=e=>e*e,y=e=>e*e*e,O={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:g(.001)},"square-centimeters":{inBaseUnits:g(.01)},"square-decimeters":{inBaseUnits:g(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:g(1e3)},"square-inches":{inBaseUnits:g(.0254)},"square-feet":{inBaseUnits:g(.3048)},"square-yards":{inBaseUnits:g(.9144)},"square-miles":{inBaseUnits:g(1609.344)},"square-us-feet":{inBaseUnits:g(1200/3937)},acres:{inBaseUnits:.0015625*g(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*y(.001)},"cubic-centimeters":{inBaseUnits:1e3*y(.01)},"cubic-decimeters":{inBaseUnits:1e3*y(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*y(1e3)},"cubic-inches":{inBaseUnits:1e3*y(.0254)},"cubic-feet":{inBaseUnits:1e3*y(.3048)},"cubic-yards":{inBaseUnits:1e3*y(.9144)},"cubic-miles":{inBaseUnits:1e3*y(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},v=function(){const e={};for(const t in O)for(const r in O[t].units)e[r]=t;return e}();function _(e,t,r){return e*O[r].units[t].inBaseUnits}function j(e,t,r){return e/O[r].units[t].inBaseUnits}function w(e){const t=v[e];if(t)return t;throw new Error("unknown type")}function x(e){return O[e].baseUnit}function T(e){return x(w(e))}function S(e,t=null){return t=t||w(e),O[t].baseUnit===e}function E(e,t,r){if(t===r)return e;const i=w(t);if(i!==w(r))throw new Error("incompatible units");const n=S(t,i)?e:_(e,t,i);return S(r,i)?n:j(n,r,i)}function A(e,t){return E(e,t,"meters")<3e3?"meters":"kilometers"}function C(e,t){return E(e,t,"meters")<1e5?"meters":"kilometers"}function R(e,t){return E(e,t,"feet")<1e3?"feet":"miles"}function M(e,t){return E(e,t,"feet")<1e5?"feet":"miles"}function P(e,t){return E(e,t,"square-meters")<3e6?"square-meters":"square-kilometers"}function I(e,t){return E(e,t,"square-feet")<1e6?"square-feet":"square-miles"}function D(e,t,r){return E(e,t,"meters")/(r*Math.PI/180)}function L(e){return m.fromJSON(e.toLowerCase())||null}function N(e){if(e&&"object"==typeof e&&!Object(c["g"])(e))return 1;const t=k(e);return t>1e5?1:t}function F(e){return k(e)>=(e instanceof s["a"]?Object(a["e"])(e).metersPerDegree:1e5)?"meters":V(e)}function k(e,t=o["a"].metersPerDegree){return U(e,!0)||t}function U(e,t=!1){let r,i,n=null;if(null!=e&&("object"==typeof e?(r=e.wkid,i=e.wkt):"number"==typeof e?r=e:"string"==typeof e&&(i=e)),r){if(Object(c["n"])(r))return o["b"].metersPerDegree;if(Object(c["o"])(r))return o["c"].metersPerDegree;n=p.values[p[r]],!n&&t&&b.has(r)&&(n=d)}else i&&(H(i)?n=z(h.exec(i),n):G(i)&&(n=z(f.exec(i),n)));return n}function z(e,t){return e&&e[1]?B(e[1]):t}function B(e){return parseFloat(e.split(",")[1])}function V(e){let t,r,i=null;if(null!=e&&("object"==typeof e?(t=e.wkid,r=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(r=e)),t)i=p.units[p[t]];else if(r){const e=H(r)?h:G(r)?f:null;if(e){const t=e.exec(r);t&&t[1]&&(i=W(t[1]))}}return Object(n["k"])(i)?L(i):null}function G(e){return/^GEOCCS/i.test(e)}function H(e){return/^PROJCS/i.test(e)}const q=1e-7;function W(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||-1===p.units.indexOf(r)){const t=B(e);r=null;const i=p.values;for(let e=0;e<i.length;++e)if(Math.abs(t-i[e])<q){r=p.units[e];break}}return r}function $(e){if(!e)return null;switch(V(e)){case"feet":case"us-feet":case"clarke-feet":case"clarke-yards":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"benoit-1895-b-chains":case"indian-yards":case"indian-1937-yards":case"gold-coast-feet":case"sears-1922-truncated-chains":return"imperial";case"50-kilometers":case"150-kilometers":case"meters":return"metric";case null:case void 0:return null}return null}const Z={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},X={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},Y=Object(i["b"])()(Z),J=Object(i["b"])()(X);Object(i["b"])()({...Z,...X})},8076:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return n}));var i=r("9b40");function n(e){return null!=i["a"][e]}function a(e){return 1/(i["a"][e]||1)}function s(){const e=Object.keys(i["a"]);return e.sort(),e}const o=s()},"80b7":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("c1da");function n(e){return"date"===e.type||"esriFieldTypeDate"===e.type}function a(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function s(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class o{constructor(e){if(this.fields=e,this._fieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;const t=[];for(const r of e){const e=r&&r.name;if(e){const o=c(e);this._fieldsMap.set(e,r),this._fieldsMap.set(o,r),t.push(o),n(r)?(this.dateFields.push(r),this._dateFieldsSet.add(r)):Object(i["p"])(r)&&(this._numericFieldsSet.add(r),this.numericFields.push(r)),a(r)||s(r)||(r.editable=null==r.editable||!!r.editable,r.nullable=null==r.nullable||!!r.nullable)}}t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)a(e)||s(e)||e.nullable||void 0!==Object(i["o"])(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(c(e)):void 0}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name}}function c(e){return e.toLowerCase().trim()}},8152:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e=[],t=[],r=!1){this.lengths=null!=e?e:[],this.coords=null!=t?t:[],this.hasIndeterminateRingOrder=r}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce((e,t)=>e+t)}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}clone(e){return e?(e.set(this.coords),new i(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new i(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},8185:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return p}));var i=r("a4ee"),n=r("ce50"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=class extends a["a"]{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const e=this.get("portal.restUrl");return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new n["a"]("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};Object(i["a"])([Object(s["b"])({type:Date})],c.prototype,"created",void 0),Object(i["a"])([Object(s["b"])()],c.prototype,"id",void 0),Object(i["a"])([Object(s["b"])()],c.prototype,"portal",void 0),Object(i["a"])([Object(s["b"])()],c.prototype,"title",void 0),Object(i["a"])([Object(s["b"])({readOnly:!0})],c.prototype,"url",null),Object(i["a"])([Object(s["b"])()],c.prototype,"username",void 0),c=Object(i["a"])([Object(o["a"])("esri.portal.PortalFolder")],c);const l=c;var u,d=r("f1a4");let h=u=class extends a["a"]{constructor(...e){super(...e),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){const e=this.get("portal.restUrl");return e?`${e}/content/users/${this.username}`:null}get url(){const e=this.get("portal.restUrl");return e?`${e}/community/users/${this.username}`:null}addItem(e){const t=e&&e.item,r=e&&e.data,i=e&&e.folder,n={method:"post"};t&&(n.query=t.createPostQuery(),null!=r&&("string"==typeof r?n.query.text=r:"object"==typeof r&&(n.query.text=JSON.stringify(r))));let a=this.userContentUrl;return i&&(a+="/"+("string"==typeof i?i:i.id)),this.portal._request(a+"/addItem",n).then(e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load()))}deleteItem(e){let t=this.userContentUrl;return e.ownerFolder&&(t+="/"+e.ownerFolder),this.portal._request(t+`/items/${e.id}/delete`,{method:"post"}).then(()=>{e.id=null,e.portal=null})}deleteItems(e){const t=this.userContentUrl+"/deleteItems",r=e.map(e=>e.id);if(r.length){const i={method:"post",query:{items:r.join(",")}};return this.portal._request(t,i).then(()=>{e.forEach(e=>{e.id=null,e.portal=null})})}return Promise.resolve(void 0)}fetchFolders(){const e={query:{num:1}};return this.portal._request(this.userContentUrl,e).then(e=>{let t;return t=e&&e.folders?e.folders.map(e=>{const t=l.fromJSON(e);return t.portal=this.portal,t}):[],t})}fetchGroups(){return this.portal._request(this.url).then(e=>{let t;return t=e&&e.groups?e.groups.map(e=>{const t=d["default"].fromJSON(e);return t.portal=this.portal,t}):[],t})}fetchItems(e){e||(e={});let t,i=this.userContentUrl;return e.folder&&(i+="/"+e.folder.id),Promise.resolve().then(r.bind(null,"a7e1")).then(({default:r})=>{t=r;const n={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal._request(i,{query:n})}).then(e=>{let r;return e&&e.items?(r=e.items.map(e=>{const r=t.fromJSON(e);return r.portal=this.portal,r}),Promise.all(r.map(e=>e.load())).catch(e=>e).then(()=>({items:r,nextStart:e.nextStart,total:e.total}))):{items:[],nextStart:-1,total:0}})}fetchTags(){return this.portal._request(this.url+"/tags").then(e=>e.tags)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+="&w="+e),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new d["default"]({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new n["a"]("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new n["a"]("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new u;return t.sourceJSON=e,t.read(e),t}};Object(i["a"])([Object(s["b"])()],h.prototype,"access",void 0),Object(i["a"])([Object(s["b"])({type:Date})],h.prototype,"created",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"culture",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"description",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"email",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"favGroupId",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"fullName",void 0),Object(i["a"])([Object(s["b"])({type:Date})],h.prototype,"modified",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"orgId",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"portal",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"preferredView",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"privileges",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"region",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"role",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"roleId",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"sourceJSON",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"thumbnail",void 0),Object(i["a"])([Object(s["b"])({readOnly:!0})],h.prototype,"thumbnailUrl",null),Object(i["a"])([Object(s["b"])()],h.prototype,"units",void 0),Object(i["a"])([Object(s["b"])({readOnly:!0})],h.prototype,"userContentUrl",null),Object(i["a"])([Object(s["b"])({readOnly:!0})],h.prototype,"url",null),Object(i["a"])([Object(s["b"])()],h.prototype,"username",void 0),Object(i["a"])([Object(s["b"])()],h.prototype,"userType",void 0),h=u=Object(i["a"])([Object(o["a"])("esri.portal.PortalUser")],h);const p=h},8188:function(e,t,r){"use strict";r.d(t,"a",(function(){return Re})),r.d(t,"b",(function(){return F})),r.d(t,"c",(function(){return de})),r.d(t,"d",(function(){return le})),r.d(t,"e",(function(){return U})),r.d(t,"f",(function(){return I})),r.d(t,"g",(function(){return k})),r.d(t,"h",(function(){return C})),r.d(t,"i",(function(){return R})),r.d(t,"j",(function(){return ce})),r.d(t,"k",(function(){return Me})),r.d(t,"l",(function(){return ye})),r.d(t,"m",(function(){return M})),r.d(t,"n",(function(){return oe})),r.d(t,"o",(function(){return ae})),r.d(t,"p",(function(){return re})),r.d(t,"q",(function(){return ie})),r.d(t,"r",(function(){return P})),r.d(t,"s",(function(){return B})),r.d(t,"t",(function(){return Y})),r.d(t,"u",(function(){return K})),r.d(t,"v",(function(){return q})),r.d(t,"w",(function(){return X})),r.d(t,"x",(function(){return Z})),r.d(t,"y",(function(){return Q})),r.d(t,"z",(function(){return ee})),r.d(t,"A",(function(){return z})),r.d(t,"B",(function(){return J})),r.d(t,"C",(function(){return Ne})),r.d(t,"D",(function(){return N}));var i=r("ce50"),n=r("38a4"),a=r("b2b2"),s=r("f4cc"),o=r("8048"),c=r("d791"),l=r("e431"),u=r("0b2d"),d=r("3af1"),h=r("57dc"),p=r("9415"),f=r("4ae5"),b=r("1219"),m=r("521c"),g=r("f694"),y=r("9180"),O=r("2255"),v=r("d636"),_=r("84e3"),j=r("7f83"),w=r("0386"),x=r("b0f5");let T=null,S=null,E=null,A={};function C(){return!!T&&Object(p["e"])()}function R(e){return Object(a["j"])(E)&&(E=Promise.all([Object(p["g"])(),r.e("chunk-2d22cf8c").then(r.bind(null,"f606")).then(e=>e.g),r.e("chunk-2d0d6f6b").then(r.bind(null,"7590"))])),E.then(([,t,{hydratedAdapter:r}])=>{Object(s["v"])(e),S=r,T=t.default,T._enableProjection(p["h"])})}function M(e,t,r=null){return Array.isArray(e)?0===e.length?[]:P(S,e,e[0].spatialReference,t,r):P(S,[e],e.spatialReference,t,r)[0]}function P(e,t,r,i,n=null){if(Object(a["j"])(r)||Object(a["j"])(i))return t;if(F(r,i,n))return t.map(e=>Object(a["t"])(z(e,r,i)));if(Object(a["j"])(n)){const e=_["a"].cacheKey(r,i);void 0!==A[e]?n=A[e]:(n=I(r,i,null),Object(a["j"])(n)&&(n=new _["a"]),A[e]=n)}if(Object(a["j"])(T))throw new D;return T._project(e,t,r,i,n)}function I(e,t,r=null){if(Object(a["j"])(T))throw new D;if(Object(a["j"])(e)||Object(a["j"])(t))return null;const i=T._getTransformation(S,e,t,r,null==r?void 0:r.spatialReference);return null!==i?_["a"].fromGE(i):null}class D extends i["a"]{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}var L;function N(e,t){try{const r=M(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const i=Object(x["a"])(r.type,e.spatialReference,t);return Object(a["k"])(i)&&i(r),r}catch(r){if(!(r instanceof D))throw r;return null}}function F(e,t,r){return!r&&(!!Object(j["d"])(e,t)||Object(j["l"])(e)&&Object(j["l"])(t)&&!!Ze(e,t,Ke))}async function k(e,t,r,i){if(!C())if(Array.isArray(e)){for(const{source:n,dest:a,geographicTransformation:s}of e)if(!F(n,a,s))return R(i)}else if(!F(e,t,r))return R(i)}function U(e,t){switch(Ze(e,t,Ke)){case fe:return"copy3";case Le:return"wgs84ToSphericalECEF";case Oe:return"wgs84ToWebMercator";case je:return"wgs84ToPlateCarree";case Ge:return"wgs84ToWGS84ECEF";case be:return"webMercatorToWGS84";case me:return"webMercatorToSphericalECEF";case ge:return"webMercatorToWGS84ECEF";case xe:return"webMercatorToPlateCarree";case He:return"wgs84ECEFToWGS84";case qe:return"wgs84ECEFToSphericalECEF";case We:return"wgs84ECEFToWebMercator";case Ue:return"sphericalECEFToWGS84";case ze:return"sphericalECEFToWebMercator";case ke:return"sphericalMarsPCPFToMars2000";case Fe:return"sphericalMoonPCPFToMoon2000";case Be:return"sphericalECEFToWGS84ECEF";case De:return"mars2000ToSphericalPCPF";case Ie:return"moon2000ToSphericalPCPF";default:return null}}function z(e,t,r){return e?"x"in e?V(e,t,new f["a"],r,0):"xmin"in e?$(e,t,new d["a"],r,0):"rings"in e?W(e,t,new b["a"],r,0):"paths"in e?H(e,t,new m["a"],r,0):"points"in e?G(e,t,new h["a"],r,0):null:null}function B(e,t,r=t.spatialReference,i=0){return!Object(a["j"])(r)&&Object(a["k"])(V(e,e.spatialReference,t,r,i))}function V(e,t,r,i,n){st[0]=e.x,st[1]=e.y;const a=e.z;return st[2]=void 0!==a?a:n,re(st,t,0,st,i,0,1)?(r.x=st[0],r.y=st[1],r.spatialReference=i,void 0===a?(r.z=void 0,r.hasZ=!1):(r.z=st[2],r.hasZ=!0),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function G(e,t,r,i,n){const{points:a,hasZ:s,hasM:o}=e,c=[],l=a.length,u=[];for(const d of a)u.push(d[0],d[1],s?d[2]:n);if(!re(u,t,0,u,i,0,l))return null;for(let d=0;d<l;++d){const e=3*d,t=u[e],r=u[e+1];s&&o?c.push([t,r,u[e+2],a[d][3]]):s?c.push([t,r,u[e+2]]):o?c.push([t,r,a[d][2]]):c.push([t,r])}return r.points=c,r.spatialReference=i,r.hasZ=s,r.hasM=o,r}function H(e,t,r,i,n){const{paths:a,hasZ:s,hasM:o}=e,c=[];return ne(a,s,o,t,c,i,n)?(r.paths=c,r.spatialReference=i,r.hasZ=s,r.hasM=o,r):null}function q(e,t,r=t.spatialReference,i=0){return Object(a["k"])(r)&&Object(a["k"])(W(e,e.spatialReference,t,r,i))}function W(e,t,r,i,n){const{rings:a,hasZ:s,hasM:o}=e,c=[];return ne(a,s,o,t,c,i,n)?(r.rings=c,r.spatialReference=i,r.hasZ=s,r.hasM=o,r):null}function $(e,t,r,i,n){const{xmin:a,ymin:s,xmax:o,ymax:c,hasZ:l,hasM:u}=e;return J(a,s,l?e.zmin:n,t,st,i)?(r.xmin=st[0],r.ymin=st[1],l&&(r.zmin=st[2]),J(o,c,l?e.zmax:n,t,st,i)?(r.xmax=st[0],r.ymax=st[1],l&&(r.zmax=st[2]),u&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null):null}function Z(e,t,r){if(Object(a["j"])(t)||Object(a["j"])(r))return null;const i=new f["a"]({spatialReference:r});return re(e,t,0,st,r,0,1)?(i.x=st[0],i.y=st[1],i.z=st[2],i):null}function X(e,t,r){return re(e,t,0,st,r.spatialReference,0,1)?(r.x=st[0],r.y=st[1],r.z=st[2],r):null}function Y(e,t,r,i=0){st[0]=e.x,st[1]=e.y;const n=e.z;return st[2]=void 0!==n?n:i,re(st,e.spatialReference,0,t,r,0,1)}function J(e,t,r,i,n,a){return it[0]=e,it[1]=t,it[2]=r,re(it,i,0,n,a,0,1)}function Q(e,t,r,i){return!(Object(a["j"])(t)||Object(a["j"])(i)||e.length<2)&&(2===e.length&&(it[0]=e[0],it[1]=e[1],it[2]=0,e=it),re(e,t,0,r,i,0,1))}function K(e,t){st[0]=e.x,st[1]=e.y;const r=e.z;return st[2]=void 0!==r?r:0,ee(st,e.spatialReference,t)}function ee(e,t,r){return te(e,t,r)}function te(e,t,r){if(Object(a["j"])(t))return!1;const i=pe(t,Je),n=$e[i][L.WGS84_COMPARABLE_LON_LAT];return!Object(a["j"])(n)&&(n(e,0,it,0),r!==it&&(r[0]=it[0],r[1]=it[1],r.length>2&&(r[2]=it[2])),!0)}function re(e,t,r,i,n,s,o=1){const c=Ze(t,n,Ke);if(Object(a["j"])(c))return!1;if(c===fe){if(e===i&&r===s)return!0;const t=r+3*o;for(let n=r,a=s;n<t;n++,a++)i[a]=e[n];return!0}const l=r+3*o;for(let a=r,u=s;a<l;a+=3,u+=3)c(e,a,i,u);return!0}function ie(e,t,r,i,n){Object(l["m"])(st,e),Object(l["h"])(ot,e,t),Q(st,r,st,n),Q(ot,r,ot,n),Object(l["l"])(i,ot,st),Object(l["t"])(i,i)}function ne(e,t,r,i,n,a,s=0){const o=new Array;for(const l of e)for(const e of l)o.push(e[0],e[1],t?e[2]:s);if(!re(o,i,0,o,a,0,o.length/3))return!1;let c=0;n.length=0;for(const l of e){const e=new Array;for(const i of l)t&&r?e.push([o[c++],o[c++],o[c++],i[3]]):t?e.push([o[c++],o[c++],o[c++]]):r?(e.push([o[c++],o[c++],i[2]]),c++):(e.push([o[c++],o[c++]]),c++);n.push(e)}return!0}function ae(e,t,r,i){if(Object(a["j"])(t)||Object(a["j"])(i))return!1;const n=Xe(t,i,et);if(n.projector===fe)return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],!0;if(Object(a["j"])(n.projector))return!1;const{source:s,dest:o}=n;if(o.spatialReferenceId===L.WEB_MERCATOR){const t=$e[s.spatialReferenceId][L.WGS84];return!Object(a["j"])(t)&&(t(e,0,nt,0),Oe(nt,0,r,0),r[3]=se(nt[1],e[2],e[3],O["a"].radius),!0)}if(s.spatialReferenceId!==L.WGS84&&s.spatialReferenceId!==L.CGCS2000||o.spatialReferenceId!==L.PLATE_CARREE)n.projector(e,0,r,0),r[3]=e[3]*s.metersPerUnit/o.metersPerUnit;else{const t=$e[s.spatialReferenceId][L.SPHERICAL_ECEF],i=$e[L.SPHERICAL_ECEF][L.PLATE_CARREE];let o=e[3];Object(a["k"])(t)&&Object(a["k"])(i)&&(o=se(e[1],e[2],e[3],O["a"].radius)),n.projector(e,0,r,0),r[3]=o}return!0}function se(e,t,r,i){const n=i+t;if(n<i/2||r>n)return Number.MAX_VALUE;const a=Math.abs(tt*e)+Math.asin(r/n);return a>=Math.PI/2?Number.MAX_VALUE:r/Math.cos(a)}function oe(e,t,r,i){return null!=e&&(Object(j["d"])(t,i)?(Object(y["k"])(r,e),!0):(it[0]=e[0],it[1]=e[1],it[2]=0,!!re(it,t,0,it,i,0,1)&&(r[0]=it[0],r[1]=it[1],it[0]=e[2],it[1]=e[3],it[2]=0,!!re(it,t,0,it,i,0,1)&&(r[2]=it[0],r[3]=it[1],!0))))}function ce(e,t,r,i){if(Object(a["j"])(t)||Object(a["j"])(i))return!1;const n=pe(t,Je),s=pe(i,Qe);if(n===s&&n!==L.UNKNOWN||Object(j["d"])(t,i))return r[0]=1,r[1]=1,r[2]=1,!0;if(n===L.SPHERICAL_ECEF){const t=Object(l["r"])(e),i=t/Math.sqrt(e[0]*e[0]+e[1]*e[1]),n=t/O["a"].radius;if(s===L.WEB_MERCATOR)return r[0]=i*n,r[1]=i*n,r[2]=1,!0;if(s===L.WGS84||s===L.CGCS2000){const e=_e;return r[0]=e*i*n,r[1]=e*n,r[2]=1,!0}}else if(n===L.PLATE_CARREE){if(s===L.WGS84||s===L.CGCS2000)return r[0]=_e,r[1]=_e,r[2]=1,!0;if(s===L.WEB_MERCATOR){const t=e[1]/O["a"].radius;return r[0]=1,r[1]=1/Math.cos(t),r[2]=1,!0}}return!1}function le(e,t,r,i){if(Object(a["j"])(e)||Object(a["j"])(i))return!1;const n=pe(e,Je),s=pe(i,Qe);if(n===s&&!ue(s)&&(n!==L.UNKNOWN||Object(j["d"])(e,i)))return Object(c["g"])(r,t),!0;if(ue(s)){const e=$e[n][L.LON_LAT],i=$e[L.LON_LAT][s];return!Object(a["j"])(e)&&!Object(a["j"])(i)&&(e(t,0,nt,0),i(nt,0,at,0),de(tt*nt[0],tt*nt[1],r),r[12]=at[0],r[13]=at[1],r[14]=at[2],!0)}if((s===L.WEB_MERCATOR||s===L.PLATE_CARREE)&&(n===L.WGS84||n===L.CGCS2000&&s===L.PLATE_CARREE||n===L.SPHERICAL_ECEF||n===L.WEB_MERCATOR)){const e=$e[n][L.LON_LAT],i=$e[L.LON_LAT][s];return!Object(a["j"])(e)&&!Object(a["j"])(i)&&(e(t,0,nt,0),i(nt,0,at,0),n===L.SPHERICAL_ECEF?he(tt*nt[0],tt*nt[1],r):Object(c["j"])(r),r[12]=at[0],r[13]=at[1],r[14]=at[2],!0)}return!1}function ue(e){return e===L.SPHERICAL_ECEF||e===L.SPHERICAL_MARS_PCPF||e===L.SPHERICAL_MOON_PCPF}function de(e,t,r){const i=Math.sin(e),n=Math.cos(e),a=Math.sin(t),s=Math.cos(t),o=r;return o[0]=-i,o[4]=-a*n,o[8]=s*n,o[12]=0,o[1]=n,o[5]=-a*i,o[9]=s*i,o[13]=0,o[2]=0,o[6]=s,o[10]=a,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}function he(e,t,r){return de(e,t,r),Object(c["u"])(r,r),r}function pe(e,t){return t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=Object(o["f"])(e,1)),e.wkt===g["a"].wkt?t.spatialReferenceId=L.SPHERICAL_ECEF:Object(j["m"])(e)?t.spatialReferenceId=L.WGS84:Object(j["p"])(e)?t.spatialReferenceId=L.WEB_MERCATOR:Object(j["k"])(e)?t.spatialReferenceId=L.PLATE_CARREE:e.wkt===g["d"].wkt?t.spatialReferenceId=L.WGS84_ECEF:e.wkid===w["a"].CGCS2000?t.spatialReferenceId=L.CGCS2000:e.wkt===g["b"].wkt?t.spatialReferenceId=L.SPHERICAL_MARS_PCPF:e.wkt===g["c"].wkt?t.spatialReferenceId=L.SPHERICAL_MOON_PCPF:Object(j["i"])(e)?t.spatialReferenceId=L.GCSMARS2000:Object(j["j"])(e)?t.spatialReferenceId=L.GCSMOON2000:t.spatialReferenceId=L.UNKNOWN)}function fe(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t])}function be(e,t,r,i){r[i++]=rt*(e[t++]/O["a"].radius),r[i++]=rt*(Math.PI/2-2*Math.atan(Math.exp(-e[t++]/O["a"].radius))),r[i]=e[t]}function me(e,t,r,i){be(e,t,r,i),Le(r,i,r,i)}function ge(e,t,r,i){be(e,t,r,i),Ge(r,i,r,i)}function ye(e,t,r,i,a){const s=.4999999*Math.PI,o=Object(n["f"])(tt*e[t+1],-s,s),c=Math.sin(o);r[i++]=tt*e[t]*a.radius,r[i++]=a.halfSemiMajorAxis*Math.log((1+c)/(1-c)),r[i]=e[t+2]}function Oe(e,t,r,i){ye(e,t,r,i,O["a"])}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",e[e.WGS84=2]="WGS84",e[e.WEB_MERCATOR=3]="WEB_MERCATOR",e[e.WGS84_ECEF=4]="WGS84_ECEF",e[e.CGCS2000=5]="CGCS2000",e[e.WGS84_COMPARABLE_LON_LAT=6]="WGS84_COMPARABLE_LON_LAT",e[e.SPHERICAL_MARS_PCPF=7]="SPHERICAL_MARS_PCPF",e[e.GCSMARS2000=8]="GCSMARS2000",e[e.SPHERICAL_MOON_PCPF=9]="SPHERICAL_MOON_PCPF",e[e.GCSMOON2000=10]="GCSMOON2000",e[e.LON_LAT=11]="LON_LAT",e[e.PLATE_CARREE=12]="PLATE_CARREE"}(L||(L={}));const ve=O["a"].radius*Math.PI/180,_e=180/(O["a"].radius*Math.PI);function je(e,t,r,i){r[i]=e[t]*ve,r[i+1]=e[t+1]*ve,r[i+2]=e[t+2]}function we(e,t,r,i){r[i]=e[t]*_e,r[i+1]=e[t+1]*_e,r[i+2]=e[t+2]}function xe(e,t,r,i){be(e,t,r,i),je(r,i,r,i)}function Te(e,t,r,i){He(e,t,r,i),je(r,i,r,i)}function Se(e,t,r,i){Ue(e,t,r,i),je(r,i,r,i)}function Ee(e,t,r,i){we(e,t,r,i),Le(r,i,r,i)}function Ae(e,t,r,i){we(e,t,r,i),Oe(r,i,r,i)}function Ce(e,t,r,i){we(e,t,r,i),Ge(r,i,r,i)}function Re(e){if(Object(a["j"])(e))return!1;const t=pe(e,Je);return!!$e[t][L.WGS84_COMPARABLE_LON_LAT]}function Me(e,t,r,i,n=0){const a=i+n,s=Math.cos(r);e[0]=Math.cos(t)*s*a,e[1]=Math.sin(t)*s*a,e[2]=Math.sin(r)*a}function Pe(e,t,r,i,n){const a=n+e[t+2],s=tt*e[t+1],o=tt*e[t],c=Math.cos(s);r[i++]=Math.cos(o)*c*a,r[i++]=Math.sin(o)*c*a,r[i]=Math.sin(s)*a}function Ie(e,t,r,i){Pe(e,t,r,i,O["c"].radius)}function De(e,t,r,i){Pe(e,t,r,i,O["b"].radius)}function Le(e,t,r,i){Pe(e,t,r,i,O["a"].radius)}function Ne(e,t,r,i,a){const s=e[t],o=e[t+1],c=e[t+2],l=Math.sqrt(s*s+o*o+c*c),u=Object(n["d"])(c/(0===l?1:l)),d=Math.atan2(o,s);r[i++]=rt*d,r[i++]=rt*u,r[i]=l-a}function Fe(e,t,r,i){Ne(e,t,r,i,O["c"].radius)}function ke(e,t,r,i){Ne(e,t,r,i,O["b"].radius)}function Ue(e,t,r,i){Ne(e,t,r,i,O["a"].radius)}function ze(e,t,r,i){Ue(e,t,r,i),Oe(r,i,r,i)}function Be(e,t,r,i){Ue(e,t,r,i),Ge(r,i,r,i)}function Ve(e,t,r,i,n){const a=tt*e[t],s=tt*e[t+1],o=e[t+2],c=Math.sin(s),l=Math.cos(s),u=n.radius/Math.sqrt(1-n.eccentricitySquared*c*c);r[i++]=(u+o)*l*Math.cos(a),r[i++]=(u+o)*l*Math.sin(a),r[i++]=(u*(1-n.eccentricitySquared)+o)*c}function Ge(e,t,r,i){Ve(e,t,r,i,O["a"])}function He(e,t,r,i){const n=v["b"],a=e[t],s=e[t+1],o=e[t+2];let c,l,u,d,h,p,f,b,m,g,y,_,j,w,x,T,S,E,A,C,R;c=Math.abs(o),l=a*a+s*s,u=Math.sqrt(l),d=l+o*o,h=Math.sqrt(d),C=Math.atan2(s,a),p=o*o/d,f=l/d,w=n.a2/h,x=n.a3-n.a4/h,f>.3?(b=c/h*(1+f*(n.a1+w+p*x)/h),A=Math.asin(b),g=b*b,m=Math.sqrt(1-g)):(m=u/h*(1-p*(n.a5-w-f*x)/h),A=Math.acos(m),g=1-m*m,b=Math.sqrt(g)),y=1-O["a"].eccentricitySquared*g,_=O["a"].radius/Math.sqrt(y),j=n.a6*_,w=u-_*m,x=c-j*b,S=m*w+b*x,T=m*x-b*w,E=T/(j/y+S),A+=E,R=S+T*E/2,o<0&&(A=-A),r[i++]=rt*C,r[i++]=rt*A,r[i]=R}function qe(e,t,r,i){He(e,t,r,i),Le(r,i,r,i)}function We(e,t,r,i){He(e,t,r,i),Oe(r,i,r,i)}const $e={[L.WGS84]:{[L.CGCS2000]:null,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:fe,[L.WGS84_COMPARABLE_LON_LAT]:fe,[L.SPHERICAL_ECEF]:Le,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:Oe,[L.PLATE_CARREE]:je,[L.WGS84]:fe,[L.WGS84_ECEF]:Ge},[L.CGCS2000]:{[L.CGCS2000]:fe,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:fe,[L.WGS84_COMPARABLE_LON_LAT]:fe,[L.SPHERICAL_ECEF]:Le,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:je,[L.WGS84]:null,[L.WGS84_ECEF]:Ge},[L.GCSMARS2000]:{[L.CGCS2000]:null,[L.GCSMARS2000]:fe,[L.GCSMOON2000]:null,[L.LON_LAT]:fe,[L.WGS84_COMPARABLE_LON_LAT]:null,[L.SPHERICAL_ECEF]:null,[L.SPHERICAL_MARS_PCPF]:De,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:null,[L.WGS84]:null,[L.WGS84_ECEF]:null},[L.GCSMOON2000]:{[L.CGCS2000]:null,[L.GCSMARS2000]:null,[L.GCSMOON2000]:fe,[L.LON_LAT]:fe,[L.WGS84_COMPARABLE_LON_LAT]:null,[L.SPHERICAL_ECEF]:null,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:Ie,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:null,[L.WGS84]:null,[L.WGS84_ECEF]:null},[L.WEB_MERCATOR]:{[L.CGCS2000]:null,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:be,[L.WGS84_COMPARABLE_LON_LAT]:be,[L.SPHERICAL_ECEF]:me,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:fe,[L.PLATE_CARREE]:xe,[L.WGS84]:be,[L.WGS84_ECEF]:ge},[L.WGS84_ECEF]:{[L.CGCS2000]:He,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:He,[L.WGS84_COMPARABLE_LON_LAT]:He,[L.SPHERICAL_ECEF]:qe,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:We,[L.PLATE_CARREE]:Te,[L.WGS84]:He,[L.WGS84_ECEF]:fe},[L.SPHERICAL_ECEF]:{[L.CGCS2000]:Ue,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:Ue,[L.WGS84_COMPARABLE_LON_LAT]:Ue,[L.SPHERICAL_ECEF]:fe,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:ze,[L.PLATE_CARREE]:Se,[L.WGS84]:Ue,[L.WGS84_ECEF]:Be},[L.SPHERICAL_MARS_PCPF]:{[L.CGCS2000]:null,[L.GCSMARS2000]:ke,[L.GCSMOON2000]:null,[L.LON_LAT]:ke,[L.WGS84_COMPARABLE_LON_LAT]:null,[L.SPHERICAL_ECEF]:null,[L.SPHERICAL_MARS_PCPF]:fe,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:null,[L.WGS84]:null,[L.WGS84_ECEF]:null},[L.SPHERICAL_MOON_PCPF]:{[L.CGCS2000]:null,[L.GCSMARS2000]:null,[L.GCSMOON2000]:Fe,[L.LON_LAT]:Fe,[L.WGS84_COMPARABLE_LON_LAT]:null,[L.SPHERICAL_ECEF]:null,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:fe,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:null,[L.WGS84]:null,[L.WGS84_ECEF]:null},[L.UNKNOWN]:{[L.CGCS2000]:null,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:null,[L.WGS84_COMPARABLE_LON_LAT]:null,[L.SPHERICAL_ECEF]:null,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:fe,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:null,[L.WGS84]:null,[L.WGS84_ECEF]:null},[L.LON_LAT]:{[L.CGCS2000]:fe,[L.GCSMARS2000]:fe,[L.GCSMOON2000]:fe,[L.LON_LAT]:fe,[L.WGS84_COMPARABLE_LON_LAT]:fe,[L.SPHERICAL_ECEF]:Le,[L.SPHERICAL_MARS_PCPF]:De,[L.SPHERICAL_MOON_PCPF]:Ie,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:Oe,[L.PLATE_CARREE]:je,[L.WGS84]:fe,[L.WGS84_ECEF]:Ge},[L.WGS84_COMPARABLE_LON_LAT]:{[L.CGCS2000]:null,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:fe,[L.WGS84_COMPARABLE_LON_LAT]:fe,[L.SPHERICAL_ECEF]:Le,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:null,[L.PLATE_CARREE]:je,[L.WGS84]:fe,[L.WGS84_ECEF]:Ge},[L.PLATE_CARREE]:{[L.CGCS2000]:we,[L.GCSMARS2000]:null,[L.GCSMOON2000]:null,[L.LON_LAT]:we,[L.WGS84_COMPARABLE_LON_LAT]:we,[L.SPHERICAL_ECEF]:Ee,[L.SPHERICAL_MARS_PCPF]:null,[L.SPHERICAL_MOON_PCPF]:null,[L.UNKNOWN]:null,[L.WEB_MERCATOR]:Ae,[L.PLATE_CARREE]:fe,[L.WGS84]:we,[L.WGS84_ECEF]:Ce}};function Ze(e,t,r=Ye()){return Object(a["j"])(e)||Object(a["j"])(t)?null:Xe(e,t,r).projector}function Xe(e,t,r){if(Object(a["j"])(e)||Object(a["j"])(t)||r.source.spatialReference===e&&r.dest.spatialReference===t)return r;const i=pe(e,r.source),n=pe(t,r.dest);return i===L.UNKNOWN&&n===L.UNKNOWN?Object(j["d"])(e,t)?r.projector=fe:r.projector=null:r.projector=$e[i][n],r}function Ye(){return{source:{spatialReference:null,spatialReferenceId:L.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:L.UNKNOWN,metersPerUnit:1},projector:fe}}const Je={spatialReference:null,spatialReferenceId:L.UNKNOWN},Qe={spatialReference:null,spatialReferenceId:L.UNKNOWN},Ke=Ye(),et=Ye(),tt=Object(n["h"])(1),rt=Object(n["p"])(1),it=Object(u["f"])(),nt=Object(u["f"])(),at=Object(u["f"])(),st=Object(u["f"])(),ot=Object(u["f"])()},8190:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return z})),r.d(t,"d",(function(){return H})),r.d(t,"e",(function(){return N})),r.d(t,"f",(function(){return m})),r.d(t,"g",(function(){return g})),r.d(t,"h",(function(){return y})),r.d(t,"i",(function(){return O})),r.d(t,"j",(function(){return A})),r.d(t,"k",(function(){return P})),r.d(t,"l",(function(){return x})),r.d(t,"m",(function(){return p})),r.d(t,"n",(function(){return _})),r.d(t,"o",(function(){return B})),r.d(t,"p",(function(){return q})),r.d(t,"q",(function(){return F})),r.d(t,"r",(function(){return C})),r.d(t,"s",(function(){return I})),r.d(t,"t",(function(){return T})),r.d(t,"u",(function(){return f})),r.d(t,"v",(function(){return j})),r.d(t,"w",(function(){return V})),r.d(t,"x",(function(){return W})),r.d(t,"y",(function(){return k})),r.d(t,"z",(function(){return R})),r.d(t,"A",(function(){return D})),r.d(t,"B",(function(){return S})),r.d(t,"C",(function(){return b})),r.d(t,"D",(function(){return w})),r.d(t,"E",(function(){return G})),r.d(t,"F",(function(){return $})),r.d(t,"G",(function(){return U})),r.d(t,"H",(function(){return M})),r.d(t,"I",(function(){return L})),r.d(t,"J",(function(){return E}));class i{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=9;const a=this.TypedArrayConstructor;void 0===i&&(i=9*a.BYTES_PER_ELEMENT);const s=0===t.byteLength?0:r;this.typedBuffer=null==n?new a(t,s):new a(t,s,(n-r)/a.BYTES_PER_ELEMENT),this.typedBufferStride=i/a.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let i=0;i<9;i++)t[i]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let i=0;i<9;i++)this.typedBuffer[r++]=t[i]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let a=e*this.typedBufferStride,s=r*t.typedBufferStride;for(let o=0;o<9;++o)i[a++]=n[s++]}get buffer(){return this.typedBuffer.buffer}}i.ElementCount=9;class n{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=16;const a=this.TypedArrayConstructor;void 0===i&&(i=16*a.BYTES_PER_ELEMENT);const s=0===t.byteLength?0:r;this.typedBuffer=null==n?new a(t,s):new a(t,s,(n-r)/a.BYTES_PER_ELEMENT),this.typedBufferStride=i/a.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let i=0;i<16;i++)t[i]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let i=0;i<16;i++)this.typedBuffer[r++]=t[i]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let a=e*this.typedBufferStride,s=r*t.typedBufferStride;for(let o=0;o<16;++o)i[a++]=n[s++]}get buffer(){return this.typedBuffer.buffer}}n.ElementCount=16;class a{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=1;const a=this.TypedArrayConstructor;void 0===i&&(i=a.BYTES_PER_ELEMENT);const s=0===t.byteLength?0:r;this.typedBuffer=null==n?new a(t,s):new a(t,s,(n-r)/a.BYTES_PER_ELEMENT),this.typedBufferStride=i/a.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}a.ElementCount=1;var s=r("3349");class o{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=2;const a=this.TypedArrayConstructor;void 0===i&&(i=2*a.BYTES_PER_ELEMENT);const s=0===t.byteLength?0:r;this.typedBuffer=null==n?new a(t,s):new a(t,s,(n-r)/a.BYTES_PER_ELEMENT),this.typedBufferStride=i/a.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,Object(s["s"])(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=r}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let a=e*this.typedBufferStride,s=r*t.typedBufferStride;i[a++]=n[s++],i[a]=n[s]}get buffer(){return this.typedBuffer.buffer}}o.ElementCount=2;var c=r("e431");class l{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=3;const a=this.TypedArrayConstructor;void 0===i&&(i=3*a.BYTES_PER_ELEMENT);const s=0===t.byteLength?0:r;this.typedBuffer=null==n?new a(t,s):new a(t,s,(n-r)/a.BYTES_PER_ELEMENT),this.typedBufferStride=i/a.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,Object(c["y"])(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e]=i}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let a=e*this.typedBufferStride,s=r*t.typedBufferStride;i[a++]=n[s++],i[a++]=n[s++],i[a]=n[s]}get buffer(){return this.typedBuffer.buffer}}l.ElementCount=3;var u=r("7577");class d{constructor(e,t,r=0,i,n){this.TypedArrayConstructor=e,this.elementCount=4;const a=this.TypedArrayConstructor;void 0===i&&(i=4*a.BYTES_PER_ELEMENT);const s=0===t.byteLength?0:r;this.typedBuffer=null==n?new a(t,s):new a(t,s,(n-r)/a.BYTES_PER_ELEMENT),this.typedBufferStride=i/a.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const i=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,i,this.stride,i+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,Object(u["l"])(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,i,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e++]=i,this.typedBuffer[e]=n}copyFrom(e,t,r){const i=this.typedBuffer,n=t.typedBuffer;let a=e*this.typedBufferStride,s=r*t.typedBufferStride;i[a++]=n[s++],i[a++]=n[s++],i[a++]=n[s++],i[a]=n[s]}get buffer(){return this.typedBuffer.buffer}}d.ElementCount=4;class h extends a{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}h.ElementType="f32";class p extends o{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}p.ElementType="f32";class f extends l{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(f,e,t)}static fromTypedArray(e,t){return new f(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}f.ElementType="f32";class b extends d{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}b.ElementType="f32";class m extends i{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}m.ElementType="f32";class g extends i{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}g.ElementType="f64";class y extends n{constructor(e,t=0,r,i){super(Float32Array,e,t,r,i),this.elementType="f32"}slice(e,t){return this.sliceBuffer(y,e,t)}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}y.ElementType="f32";class O extends n{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}O.ElementType="f64";class v extends a{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}v.ElementType="f64";class _ extends o{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(_,e,t)}static fromTypedArray(e,t){return new _(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}_.ElementType="f64";class j extends l{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}j.ElementType="f64";class w extends d{constructor(e,t=0,r,i){super(Float64Array,e,t,r,i),this.elementType="f64"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}w.ElementType="f64";class x extends a{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}x.ElementType="u8";class T extends o{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}T.ElementType="u8";class S extends l{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}S.ElementType="u8";class E extends d{constructor(e,t=0,r,i){super(Uint8Array,e,t,r,i),this.elementType="u8"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}E.ElementType="u8";class A extends a{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}A.ElementType="u16";class C extends o{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}C.ElementType="u16";class R extends l{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(R,e,t)}static fromTypedArray(e,t){return new R(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}R.ElementType="u16";class M extends d{constructor(e,t=0,r,i){super(Uint16Array,e,t,r,i),this.elementType="u16"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}M.ElementType="u16";class P extends a{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}P.ElementType="u32";class I extends o{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}I.ElementType="u32";class D extends l{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}D.ElementType="u32";class L extends d{constructor(e,t=0,r,i){super(Uint32Array,e,t,r,i),this.elementType="u32"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}L.ElementType="u32";class N extends a{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}N.ElementType="i8";class F extends o{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}F.ElementType="i8";class k extends l{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}k.ElementType="i8";class U extends d{constructor(e,t=0,r,i){super(Int8Array,e,t,r,i),this.elementType="i8"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}U.ElementType="i8";class z extends a{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}z.ElementType="i16";class B extends o{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}B.ElementType="i16";class V extends l{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}V.ElementType="i16";class G extends d{constructor(e,t=0,r,i){super(Int16Array,e,t,r,i),this.elementType="i16"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}G.ElementType="i16";class H extends a{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}H.ElementType="i32";class q extends o{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}q.ElementType="i32";class W extends l{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer(W,e,t)}static fromTypedArray(e,t){return new W(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}W.ElementType="i32";class $ extends d{constructor(e,t=0,r,i){super(Int32Array,e,t,r,i),this.elementType="i32"}slice(e,t){return this.sliceBuffer($,e,t)}static fromTypedArray(e,t){return new $(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}$.ElementType="i32"},8246:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return c})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return d})),r.d(t,"i",(function(){return u}));const i=[252,146,31,255],n=[153,153,153,255],a={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},c={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},8249:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("e041");const n=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function a(e){const t=Object(i["o"])(e,!0);return t&&t.endsWith(".arcgis.com")&&!n.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},"82e4":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return c}));var i=r("1fd7"),n=r("0b86"),a=r("6174"),s=r("0d93"),o=r("35c9");const c={types:i["i"],json:{write:{writer:a["b"]},origins:{"web-scene":{types:i["j"],write:{writer:a["b"]},read:{reader:Object(n["b"])({types:i["j"]})}}}}},l={types:{base:s["a"],key:"type",typeMap:{"simple-fill":i["e"].typeMap["simple-fill"],"picture-fill":i["e"].typeMap["picture-fill"],"polygon-3d":i["e"].typeMap["polygon-3d"]}},json:{write:{writer:a["b"]},origins:{"web-scene":{type:o["a"],write:{writer:a["b"]}}}}}},"82fa":function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return s}));r("e06a");var i=r("b2b2"),n=r("5996");let a;function s(){return a||(a=(async()=>{const e=await r.e("chunk-5e76d58f").then(r.bind(null,"084f"));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),a}const o=(e,t,r)=>u.create(e,t,r,null,["$feature"]),c=(e,t,r)=>u.create(e,t,r,null,["$feature","$view"]),l=(e,t,r,i)=>u.create(e,t,r,i,["$feature","$view"]);class u{constructor(e,t,r,i,n,a,s,o){this.script=e,this.evaluate=n;const c=Array.isArray(s)?s:s.fields;this.fields=c,this._syntaxTree=i,this._arcade=t,this._arcadeDictionary=r,this._arcadeFeature=a,this._spatialReference=o,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,r,a,o,c){const{arcade:l,Feature:d,Dictionary:h}=await s(),p=n["a"].fromJSON(t),f=l.parseScript(e,c),b=o.reduce((e,t)=>({...e,[t]:null}),{});let m=null;Object(i["k"])(a)&&(m=new h(a),m.immutable=!0,b.$config=null);const g=l.scriptUsesGeometryEngine(f)&&l.enableGeometrySupport(),y=l.scriptUsesFeatureSet(f)&&l.enableFeatureSetSupport(),O=l.scriptIsAsync(f)&&l.enableAsyncSupport(),v={vars:b,spatialReference:p,useAsync:!!O},_=new h;_.immutable=!1,_.setField("scale",0);const j=l.compileScript(f,v),w=e=>("$view"in e&&e.$view&&(_.setField("scale",e.$view.scale),e.$view=_),m&&(e.$config=m),j({vars:e,spatialReference:p}));return await Promise.all([g,y,O]),new u(e,l,h,f,w,new d,r,p)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}createDictionary(){return new this._arcadeDictionary}referencesMember(e){return this._arcade.referencesMember(this._syntaxTree,e)}referencesFunction(e){return this._arcade.referencesFunction(this._syntaxTree,e)}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}extractFieldLiterals(){return this._arcade.extractExpectedFieldLiterals(this._syntaxTree)}}},"83fa":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("9ef0"),s=r("b2b2"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("dee7"),u=r("88da");let d=i=class extends l["a"]{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.occlusionTexture=null,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=Object(s["k"])(e)?e.get(this):null;if(r)return r;const n=new i(this.clonePropertiesWithDeduplication(t));return Object(s["k"])(e)&&e.set(this,n),n}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:Object(s["k"])(this.emissiveColor)?this.emissiveColor.clone():null,emissiveTexture:Object(s["k"])(this.emissiveTexture)?this.emissiveTexture.cloneWithDeduplication(e):null,occlusionTexture:Object(s["k"])(this.occlusionTexture)?this.occlusionTexture.cloneWithDeduplication(e):null,metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:Object(s["k"])(this.metallicRoughnessTexture)?this.metallicRoughnessTexture.cloneWithDeduplication(e):null}}};Object(n["a"])([Object(o["b"])({type:a["a"],json:{write:!0}})],d.prototype,"emissiveColor",void 0),Object(n["a"])([Object(o["b"])({type:u["a"],json:{write:!0}})],d.prototype,"emissiveTexture",void 0),Object(n["a"])([Object(o["b"])({type:u["a"],json:{write:!0}})],d.prototype,"occlusionTexture",void 0),Object(n["a"])([Object(o["b"])({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],d.prototype,"metallic",void 0),Object(n["a"])([Object(o["b"])({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],d.prototype,"roughness",void 0),Object(n["a"])([Object(o["b"])({type:u["a"],json:{write:!0}})],d.prototype,"metallicRoughnessTexture",void 0),d=i=Object(n["a"])([Object(c["a"])("esri.geometry.support.MeshMaterialMetallicRoughness")],d);const h=d},"84e3":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));let i=0;class n{constructor(e=null){this.uid=i++,e?(this._wkt=void 0!==e.wkt?e.wkt:null,this._wkid=void 0!==e.wkid?e.wkid:-1,this._isInverse=void 0!==e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}static fromGE(e){const t=new n;return t._wkt=e.wkt,t._wkid=e.wkid,t._isInverse=e.isInverse,t}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=i++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=i++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=i++}getInverse(){const e=new n;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class a{constructor(e){if(this.steps=[],this._cached_projection={},this._chain="",this._gtlistentry=null,e&&e.steps)for(const t of e.steps)t instanceof n?this.steps.push(t):this.steps.push(new n({wkid:t.wkid,wkt:t.wkt,isInverse:t.isInverse}))}static cacheKey(e,t){return[void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():"",void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():""].join(",")}static fromGE(e){const t=new a;let r="";for(const i of e.steps){const e=n.fromGE(i);t.steps.push(e),r+=e.uid.toString()+","}return t._cached_projection={},t._gtlistentry=null,t._chain=r,t}getInverse(){const e=new a;e.steps=[];for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}getGTListEntry(){let e="";for(const t of this.steps)e+=t.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=e),this._gtlistentry}assignCachedGe(e,t,r){this._cached_projection[a.cacheKey(e,t)]=r}getCachedGeTransformation(e,t){let r="";for(const n of this.steps)r+=n.uid.toString()+",";r!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=r);const i=this._cached_projection[a.cacheKey(e,t)];return void 0===i?null:i}}},"84f4":function(e,t,r){"use strict";function i(e){return"point"===e.type}r.d(t,"a",(function(){return i}))},"851f":function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f}));r("e06a"),r("c120");var i=r("e92d"),n=r("b2b2"),a=r("8048"),s=r("9180"),o=r("2172"),c=r("9786"),l=r("4ae5");const u=i["a"].getLogger("esri.layers.support.ElevationSampler");class d{queryElevation(e){return f(e.clone(),this)}on(){return v}projectIfRequired(e,t){return b(e,t)}}class h extends d{constructor(e,t,r){super(),this.tile=e,this.noDataValue=r,this.extent=Object(s["B"])(e.tile.extent,t.spatialReference);const i=Object(a["f"])(t.spatialReference),n=t.lodAt(e.tile.level).resolution*i;this.demResolution={min:n,max:n}}get spatialReference(){return this.extent.spatialReference}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return Object(o["e"])(this.extent,t)}elevationAt(e){const t=this.projectIfRequired(e,this.spatialReference);if(Object(n["j"])(t))return null;if(!this.contains(e)){const t=this.extent,r=`${t.xmin}, ${t.ymin}, ${t.xmax}, ${t.ymax}`;return u.warn("#elevationAt()",`Point used to sample elevation (${e.x}, ${e.y}) is outside of the sampler extent (${r})`),this.noDataValue}return this.tile.sample(t.x,t.y)}}class p extends d{constructor(e,t,r){let i;super(),"number"==typeof t?(this.noDataValue=t,i=null):(i=t,this.noDataValue=r),this.samplers=i?e.map(e=>new h(e,i,this.noDataValue)):e;const n=this.samplers[0];if(n){this.extent=n.extent.clone();const{min:e,max:t}=n.demResolution;this.demResolution={min:e,max:t};for(let r=1;r<this.samplers.length;r++){const e=this.samplers[r];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=Object(s["B"])(Object(s["l"])(),i.spatialReference),this.demResolution={min:0,max:0}}get spatialReference(){return this.extent.spatialReference}elevationAt(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;for(const r of this.samplers)if(r.contains(t))return r.elevationAt(t);return u.warn("#elevationAt()",`Point used to sample elevation (${e.x}, ${e.y}) is outside of the sampler`),this.noDataValue}}function f(e,t){const r=b(e,t.spatialReference);if(!r)return null;switch(e.type){case"point":m(e,r,t);break;case"polyline":g(e,r,t);break;case"multipoint":y(e,r,t)}return e}function b(e,t){if(Object(n["j"])(e))return null;const r=e.spatialReference;if(r.equals(t))return e;const i=Object(c["d"])(e,t);return i||u.error(`Cannot project geometry spatial reference (wkid:${r.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}function m(e,t,r){e.z=Object(n["u"])(r.elevationAt(t),0)}function g(e,t,r){O.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let a=0;a<e.paths.length;a++){const s=e.paths[a],o=t.paths[a];for(let e=0;e<s.length;e++){const t=s[e],a=o[e];O.x=a[0],O.y=a[1],i&&(t[3]=t[2]),t[2]=Object(n["u"])(r.elevationAt(O),0)}}e.hasZ=!0}function y(e,t,r){O.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let a=0;a<e.points.length;a++){const s=e.points[a],o=t.points[a];O.x=o[0],O.y=o[1],i&&(s[3]=s[2]),s[2]=Object(n["u"])(r.elevationAt(O),0)}e.hasZ=!0}const O=new l["a"],v={remove(){}}},8539:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return s}));r("c120");var i=r("b2b2"),n=r("d17d");function a(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"A numeric argument is out of range";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function s(e,t){return e.vertexBuffers[t].size/o(e.layout[t])}function o(e){return e[0].stride}function c(e,t,r,i,n=0){const a=e.gl,s=e.capabilities.instancing;e.bindBuffer(r);for(const o of i){const e=t.get(o.name);void 0===e&&console.error(`There is no location for vertex attribute '${o.name}' defined.`);const r=n*o.stride;if(o.count<=4)a.vertexAttribPointer(e,o.count,o.type,o.normalized,o.stride,o.offset+r),a.enableVertexAttribArray(e),o.divisor>0&&s&&s.vertexAttribDivisor(e,o.divisor);else if(9===o.count)for(let t=0;t<3;t++)a.vertexAttribPointer(e+t,3,o.type,o.normalized,o.stride,o.offset+12*t+r),a.enableVertexAttribArray(e+t),o.divisor>0&&s&&s.vertexAttribDivisor(e+t,o.divisor);else if(16===o.count)for(let t=0;t<4;t++)a.vertexAttribPointer(e+t,4,o.type,o.normalized,o.stride,o.offset+16*t+r),a.enableVertexAttribArray(e+t),o.divisor>0&&s&&s.vertexAttribDivisor(e+t,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count)}}function l(e,t,r,i){const a=e.gl,s=e.capabilities.instancing;e.bindBuffer(r);for(const n of i){const e=t.get(n.name);if(n.count<=4)a.disableVertexAttribArray(e),n.divisor&&n.divisor>0&&s&&s.vertexAttribDivisor(e,0);else if(9===n.count)for(let t=0;t<3;t++)a.disableVertexAttribArray(e+t),n.divisor&&n.divisor>0&&s&&s.vertexAttribDivisor(e+t,0);else if(16===n.count)for(let t=0;t<4;t++)a.disableVertexAttribArray(e+t),n.divisor&&n.divisor>0&&s&&s.vertexAttribDivisor(e+t,0);else console.error("Unsupported vertex attribute element count: "+n.count)}e.unbindBuffer(n["d"].ARRAY_BUFFER)}function u(e){switch(e){case n["p"].ALPHA:case n["p"].LUMINANCE:case n["p"].RED:case n["p"].RED_INTEGER:case n["v"].R8:case n["v"].R8I:case n["v"].R8UI:case n["v"].R8_SNORM:case n["s"].STENCIL_INDEX8:return 1;case n["p"].LUMINANCE_ALPHA:case n["p"].RG:case n["p"].RG_INTEGER:case n["v"].RGBA4:case n["v"].R16F:case n["v"].R16I:case n["v"].R16UI:case n["v"].RG8:case n["v"].RG8I:case n["v"].RG8UI:case n["v"].RG8_SNORM:case n["v"].RGB565:case n["v"].RGB5_A1:case n["s"].DEPTH_COMPONENT16:return 2;case n["p"].DEPTH_COMPONENT:case n["p"].RGB:case n["p"].RGB_INTEGER:case n["v"].RGB8:case n["v"].RGB8I:case n["v"].RGB8UI:case n["v"].RGB8_SNORM:case n["v"].SRGB8:case n["s"].DEPTH_COMPONENT24:return 3;case n["p"].DEPTH_STENCIL:case n["p"].RGBA:case n["p"].RGBA_INTEGER:case n["v"].RGBA8:case n["v"].R32F:case n["v"].R11F_G11F_B10F:case n["v"].RG16F:case n["v"].R32I:case n["v"].R32UI:case n["v"].RG16I:case n["v"].RG16UI:case n["v"].RGBA8I:case n["v"].RGBA8UI:case n["v"].RGBA8_SNORM:case n["v"].SRGB8_ALPHA8:case n["v"].RGB9_E5:case n["v"].RGB10_A2UI:case n["v"].RGB10_A2:case n["s"].DEPTH_STENCIL:case n["s"].DEPTH_COMPONENT32F:case n["s"].DEPTH24_STENCIL8:return 4;case n["s"].DEPTH32F_STENCIL8:return 5;case n["v"].RGB16F:case n["v"].RGB16I:case n["v"].RGB16UI:return 6;case n["v"].RG32F:case n["v"].RG32I:case n["v"].RG32UI:case n["v"].RGBA16F:case n["v"].RGBA16I:case n["v"].RGBA16UI:return 8;case n["v"].RGB32F:case n["v"].RGB32I:case n["v"].RGB32UI:return 12;case n["v"].RGBA32F:case n["v"].RGBA32I:case n["v"].RGBA32UI:return 16;case n["i"].COMPRESSED_RGB_S3TC_DXT1_EXT:case n["i"].COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case n["i"].COMPRESSED_RGBA_S3TC_DXT3_EXT:case n["i"].COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case n["i"].COMPRESSED_R11_EAC:case n["i"].COMPRESSED_SIGNED_R11_EAC:case n["i"].COMPRESSED_RGB8_ETC2:case n["i"].COMPRESSED_SRGB8_ETC2:case n["i"].COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case n["i"].COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case n["i"].COMPRESSED_RG11_EAC:case n["i"].COMPRESSED_SIGNED_RG11_EAC:case n["i"].COMPRESSED_RGBA8_ETC2_EAC:case n["i"].COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}function d(e){if(Object(i["j"])(e))return 0;if("descriptor"in e)return e.glName?d(e.descriptor):0;const t=e.internalFormat||"pixelFormat"in e&&e.pixelFormat;if(!t)return 0;const r="hasMipmap"in e&&e.hasMipmap?1.3:1,n=e.width*e.height;return u(t)*n*r}},"853c":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return f})),r.d(t,"f",(function(){return g})),r.d(t,"g",(function(){return p})),r.d(t,"h",(function(){return l})),r.d(t,"i",(function(){return j})),r.d(t,"j",(function(){return d})),r.d(t,"k",(function(){return u})),r.d(t,"l",(function(){return v})),r.d(t,"m",(function(){return y})),r.d(t,"n",(function(){return O})),r.d(t,"o",(function(){return _})),r.d(t,"p",(function(){return b})),r.d(t,"q",(function(){return w}));var i,n,a=r("f4cc"),s=r("3af1"),o=r("a1f3");function c(e){return o["a"].fromJSON(e.toJSON())}function l(e){return e.toJSON?e.toJSON():e}function u(e){return"string"==typeof e||e instanceof String}function d(e){return"number"==typeof e}function h(e){return e instanceof Date}function p(e,t){return e===t||!(!h(e)||!h(t))&&e.getTime()===t.getTime()}function f(e){if(void 0===e)return null;if("number"==typeof e)return e;switch(e.toLowerCase()){case"meters":case"meter":return 109404;case"miles":case"mile":return 109413;case"kilometers":case"kilometer":case"km":return 109414}return null}function b(e){if(null===e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new s["a"]({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function m(e){if(void 0===e)return null;if("number"==typeof e)return e;if("number"==typeof e)return e;switch(e.toLowerCase()){case"meters":case"meter":return 9001;case"miles":case"mile":return 9035;case"kilometers":case"kilometer":case"km":return 9036}return null}!function(e){e[e.Standardised=0]="Standardised",e[e.StandardisedNoInterval=1]="StandardisedNoInterval",e[e.SqlServer=2]="SqlServer",e[e.Oracle=3]="Oracle",e[e.Postgres=4]="Postgres",e[e.PGDB=5]="PGDB",e[e.FILEGDB=6]="FILEGDB",e[e.NotEvaluated=7]="NotEvaluated"}(i||(i={})),function(e){e[e.InFeatureSet=0]="InFeatureSet",e[e.NotInFeatureSet=1]="NotInFeatureSet",e[e.Unknown=2]="Unknown"}(n||(n={}));const g=1e3;const y={point:"point",polygon:"polygon",polyline:"polyline",multipoint:"multipoint",extent:"extent",esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint",esriGeometryEnvelope:"extent",envelope:"extent"},O={point:"esriGeometryPoint",polygon:"esriGeometryPolygon",polyline:"esriGeometryPolyline",multipoint:"esriGeometryMultipoint",extent:"esriGeometryEnvelope",esriGeometryPoint:"esriGeometryPoint",esriGeometryPolygon:"esriGeometryPolygon",esriGeometryPolyline:"esriGeometryPolyline",esriGeometryMultipoint:"esriGeometryMultipoint",esriGeometryEnvelope:"esriGeometryEnvelope",envelope:"esriGeometryEnvelope"},v={"small-integer":"esriFieldTypeSmallInteger",integer:"esriFieldTypeInteger",long:"esriFieldTypeLong",single:"esriFieldTypeSingle",double:"esriFieldTypeDouble",string:"esriFieldTypeString",date:"esriFieldTypeDate",oid:"esriFieldTypeOID",geometry:"esriFieldTypeGeometry",blob:"esriFieldTypeBlob",raster:"esriFieldTypeRaster",guid:"esriFieldTypeGUID","global-id":"esriFieldTypeGlobalID",xml:"eesriFieldTypeXML",esriFieldTypeSmallInteger:"esriFieldTypeSmallInteger",esriFieldTypeInteger:"esriFieldTypeInteger",esriFieldTypeLong:"esriFieldTypeLong",esriFieldTypeSingle:"esriFieldTypeSingle",esriFieldTypeDouble:"esriFieldTypeDouble",esriFieldTypeString:"esriFieldTypeString",esriFieldTypeDate:"esriFieldTypeDate",esriFieldTypeOID:"esriFieldTypeOID",esriFieldTypeGeometry:"esriFieldTypeGeometry",esriFieldTypeBlob:"esriFieldTypeBlob",esriFieldTypeRaster:"esriFieldTypeRaster",esriFieldTypeGUID:"esriFieldTypeGUID",esriFieldTypeGlobalID:"esriFieldTypeGlobalID",esriFieldTypeXML:"eesriFieldTypeXML"};function _(e,t){return Object(a["d"])((r,i)=>{const n=Object(a["t"])(!0);e.reduce((e,r,i,s)=>e.then(e=>{try{return t(e,r,i,s)}catch(n){return Object(a["s"])(n)}},e=>Object(a["s"])(e)),n).then(r,i)})}function j(e){return void 0===e?"":e=(e=(e=e.replace(/\/featureserver\/[0-9]*/i,"/FeatureServer")).replace(/\/mapserver\/[0-9]*/i,"/MapServer")).split("?")[0]}function w(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){const i={key:t,value:e[t]},a={key:r,value:e[r]};return n(i,a)}});var n;const a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let n,s;if(Array.isArray(t)){for(s="[",n=0;n<t.length;n++)n&&(s+=","),s+=e(t[n])||"null";return s+"]"}if(null===t)return"null";if(-1!==a.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const o=a.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(s="",n=0;n<c.length;n++){const r=c[n],i=e(t[r]);i&&(s&&(s+=","),s+=JSON.stringify(r)+":"+i)}return a.splice(o,1),"{"+s+"}"}(e)}},8675:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o}));var i=r("fc00"),n=r("b7bd"),a=r("5957");const s=Object(i["a"])().vec3f(n["a"].POSITION),o=Object(i["a"])().vec3f(n["a"].POSITION).vec2f(n["a"].UV0),c=Object(i["a"])().vec3f(n["a"].POSITION).vec4u8(n["a"].COLOR);class l{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(n["a"].POSITION).length}write(e,t,r,i){Object(a["d"])(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i)}}},"86ba":function(e,t,r){"use strict";r.d(t,"a",(function(){return Z}));var i=r("e92d"),n=r("38a4"),a=r("b2b2"),s=r("a915"),o=r("3349"),c=r("e431"),l=r("0b2d"),u=r("d359"),d=r("bd7e"),h=r("7289"),p=r("fc00"),f=r("a05b"),b=r("1038"),m=r("d7f7"),g=r("b061"),y=r("35b3"),O=r("badc"),v=r("1153"),_=r("b7bd"),j=r("b4c8"),w=r("b623"),x=r("9a68"),T=r("a4ee"),S=r("d791"),E=r("7361"),A=r("d272"),C=r("6a07"),R=r("c6d7"),M=r("be24"),P=r("8e97"),I=r("c3a4"),D=r("ca98"),L=r("da35"),N=r("b7c2"),F=r("7438"),k=r("c829"),U=r("87b7"),z=r("d17d"),B=r("189c");const V=new Map([[_["a"].POSITION,0],[_["a"].SUBDIVISIONFACTOR,1],[_["a"].UV0,2],[_["a"].AUXPOS1,3],[_["a"].AUXPOS2,4],[_["a"].SIZE,6],[_["a"].SIZEFEATUREATTRIBUTE,6],[_["a"].COLOR,5],[_["a"].COLORFEATUREATTRIBUTE,5],[_["a"].OPACITYFEATUREATTRIBUTE,7]]);class G extends D["a"]{constructor(e,t,r){super(e,t,r),this.stippleTextureRepository=e.stippleTextureRepository}get stippleEnabled(){return this.configuration.stippleEnabled&&this.configuration.output!==f["a"].Highlight}initializeProgram(e){const t=G.shader.get(),r=this.configuration,i=t.build({oitEnabled:r.transparencyPassType===N["l"].Color,output:r.output,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,draped:r.draped,stippleEnabled:this.stippleEnabled,stippleOffColorEnabled:r.stippleOffColorEnabled,stippleRequiresClamp:!0,stippleScaleWithLineWidth:r.stippleScaleWithLineWidth,stipplePreferContinuous:r.stipplePreferContinuous,capType:r.capType,roundJoins:r.roundJoins,vvColor:r.vvColor,vvSize:r.vvSize,vvInstancingEnabled:!0,vvOpacity:r.vvOpacity,falloffEnabled:r.falloffEnabled,innerColorEnabled:r.innerColorEnabled,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround,wireframe:r.wireframe});return new k["a"](e.rctx,i,V)}destroy(){super.destroy(),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}bindPass(e,t){if(Object(P["b"])(this.program,t.camera.projectionMatrix),this.configuration.output===f["a"].Highlight&&Object(C["b"])(this.program,t),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(R["a"])(this.program,t)),this.program.setUniform1f("intrinsicWidth",e.width),this.program.setUniform4fv("intrinsicColor",e.color),this.program.setUniform1f("miterLimit","miter"!==e.join?0:e.miterLimit),this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform1f("pixelRatio",t.camera.pixelRatio),this.program.setUniform2f("screenSize",t.camera.fullViewport[2],t.camera.fullViewport[3]),Object(M["d"])(this.program,e),this.stipplePattern!==e.stipplePattern){const t=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,t),this.stipplePattern=t}if(this.stippleEnabled){const{pixelSize:r,sdfNormalizer:i,pixels:n}=Object(a["k"])(this.stippleTextureBind)?this.stippleTextureBind(this.program):{pixelSize:1,sdfNormalizer:1,pixels:1};if(this.program.setUniform1f("stipplePatternSDFNormalizer",i),this.program.setUniform1f("stipplePatternTextureSize",n),this.program.setUniform1f("stipplePatternPixelSize",r),this.program.setUniform1f("stipplePatternPixelSizeInv",1/r),this.configuration.draped?this.program.setUniform1f("worldToScreenRatio",1/t.screenToPCSRatio):this.program.setUniform1f("worldToScreenPerDistanceRatio",1/t.camera.perScreenPixelRatio),this.configuration.stippleOffColorEnabled){const t=Object(a["t"])(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",t[0],t[1],t[2],t.length>3?t[3]:1)}}this.configuration.falloffEnabled&&this.program.setUniform1f("falloff",e.falloff),this.configuration.innerColorEnabled&&(this.program.setUniform4fv("innerColor",Object(a["u"])(e.innerColor,e.color)),this.program.setUniform1f("innerWidth",e.innerWidth*t.camera.pixelRatio))}bindDraw(e){Object(P["c"])(this.program,e),this.stippleEnabled&&!this.configuration.draped&&Object(P["a"])(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(A["b"])(this.program,this.configuration,e.slicePlane,{origin:e.origin,view:e.camera.viewMatrix}),this.program.setUniformMatrix4fv("inverseProjectionMatrix",Object(S["b"])(E["a"].get(),e.camera.projectionMatrix)),this.program.rebindTextures()}_makePipelineState(e,t){const r=this.configuration,i=e===N["l"].NONE,n=e===N["l"].FrontFace;return Object(B["g"])({blending:r.output===f["a"].Color||r.output===f["a"].Alpha?i?F["d"]:Object(F["f"])(e):null,depthTest:{func:Object(F["g"])(e)},depthWrite:i?r.writeDepth&&B["e"]:Object(F["h"])(e),colorWrite:B["d"],stencilWrite:r.sceneHasOcludees?U["j"]:null,stencilTest:r.sceneHasOcludees?t?U["f"]:U["e"]:null,polygonOffset:i||n?r.polygonOffset&&H:F["a"]})}initializePipeline(){const e=this.configuration,t=e.polygonOffset&&H;return e.occluder&&(this._occluderPipelineTransparent=Object(B["g"])({blending:F["d"],polygonOffset:t,depthTest:U["a"],depthWrite:null,colorWrite:B["d"],stencilWrite:null,stencilTest:U["h"]}),this._occluderPipelineOpaque=Object(B["g"])({blending:F["d"],polygonOffset:t,depthTest:U["a"],depthWrite:null,colorWrite:B["d"],stencilWrite:U["i"],stencilTest:U["g"]}),this._occluderPipelineMaskWrite=Object(B["g"])({blending:null,polygonOffset:t,depthTest:U["b"],depthWrite:null,colorWrite:null,stencilWrite:U["j"],stencilTest:U["f"]})),this._occludeePipelineState=this._makePipelineState(this.configuration.transparencyPassType,!0),this._makePipelineState(this.configuration.transparencyPassType,!1)}get primitiveType(){return this.configuration.wireframe?z["r"].LINES:z["r"].TRIANGLE_STRIP}getPipelineState(e,t){return t?this._occludeePipelineState:this.configuration.occluder?e===O["a"].TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent:e===O["a"].OCCLUDER_MATERIAL?this._occluderPipelineOpaque:this._occluderPipelineMaskWrite:super.getPipelineState(e,t)}}G.shader=new I["a"](x["c"],()=>r.e("chunk-2d213386").then(r.bind(null,"ac6d")));const H={factor:0,units:-4};class q extends L["a"]{constructor(){super(...arguments),this.output=f["a"].Color,this.occluder=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.polygonOffset=!1,this.writeDepth=!1,this.draped=!1,this.stippleEnabled=!1,this.stippleOffColorEnabled=!1,this.stippleScaleWithLineWidth=!1,this.stipplePreferContinuous=!0,this.capType=x["a"].BUTT,this.roundJoins=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.falloffEnabled=!1,this.innerColorEnabled=!1,this.sceneHasOcludees=!1,this.transparencyPassType=N["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.wireframe=!1}}Object(T["a"])([Object(L["b"])({count:f["a"].COUNT})],q.prototype,"output",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"occluder",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"slicePlaneEnabled",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"transparent",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"polygonOffset",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"writeDepth",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"draped",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"stippleEnabled",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"stippleOffColorEnabled",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"stippleScaleWithLineWidth",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"stipplePreferContinuous",void 0),Object(T["a"])([Object(L["b"])({count:x["a"].COUNT})],q.prototype,"capType",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"roundJoins",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"vvSize",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"vvColor",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"vvOpacity",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"falloffEnabled",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"innerColorEnabled",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"sceneHasOcludees",void 0),Object(T["a"])([Object(L["b"])({count:N["l"].COUNT})],q.prototype,"transparencyPassType",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"multipassTerrainEnabled",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"cullAboveGround",void 0),Object(T["a"])([Object(L["b"])()],q.prototype,"wireframe",void 0);const W=i["a"].getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial");var $;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}($||($={}));class Z extends y["b"]{constructor(e){super(e,Y),this._vertexAttributeLocations=V,this.techniqueConfig=new q,this.layout=this.createLayout()}isClosed(e,t){return ee(this.parameters,e,t)}dispose(){}getPassParameters(){return this.parameters}getTechniqueConfig(e,t){this.techniqueConfig.output=e,this.techniqueConfig.draped=t.slot===O["a"].DRAPED_MATERIAL;const r=Object(a["k"])(this.parameters.stipplePattern);return this.techniqueConfig.stippleEnabled=r,this.techniqueConfig.stippleOffColorEnabled=r&&Object(a["k"])(this.parameters.stippleOffColor),this.techniqueConfig.stippleScaleWithLineWidth=r&&this.parameters.stippleScaleWithLineWidth,this.techniqueConfig.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.parameters.join,this.techniqueConfig.capType=this.parameters.cap,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.parameters.innerWidth>0&&Object(a["k"])(this.parameters.innerColor),this.techniqueConfig.falloffEnabled=this.parameters.falloff>0,this.techniqueConfig.occluder=this.parameters.renderOccluded===y["c"].OccludeAndTransparentStencil,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig.wireframe=this.parameters.wireframe,this.techniqueConfig}intersect(e,t,r,i,n,s,o,c,l){Object(a["k"])(l)?this._intersectDrapedLineGeometry(e,i,l,s,o):this._intersectLineGeometry(e,t,r,i,o)}_intersectDrapedLineGeometry(e,t,r,i,a){if(!t.options.selectionMode)return;const s=e.vertexAttributes.get(_["a"].POSITION).data,o=e.vertexAttributes.get(_["a"].SIZE);let c=this.parameters.width;if(this.parameters.vvSizeEnabled){const t=e.vertexAttributes.get(_["a"].SIZEFEATUREATTRIBUTE).data[0];c*=Object(n["f"])(this.parameters.vvSizeOffset[0]+t*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else o&&(c*=o.data[0]);const l=i[0],u=i[1],d=(c/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,p=0;for(let f=0;f<s.length-5;f+=3){const e=s[f],t=s[f+1],r=l-e,i=u-t,a=s[f+3]-e,o=s[f+4]-t,c=Object(n["f"])((a*r+o*i)/(a*a+o*o),0,1),d=a*c-r,b=o*c-i,m=d*d+b*b;m<h&&(h=m,p=f/3)}h<d*d&&a(r.dist,r.normal,p,!1)}_intersectLineGeometry(e,t,r,i,a){if(!i.options.selectionMode||Object(w["d"])(t))return;if(!Object(v["g"])(r))return void W.error("intersection assumes a translation-only matrix");const s=e.vertexAttributes,l=s.get(_["a"].POSITION).data;let p=this.parameters.width;if(this.parameters.vvSizeEnabled){const e=s.get(_["a"].SIZEFEATUREATTRIBUTE).data[0];p*=Object(n["f"])(this.parameters.vvSizeOffset[0]+e*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else s.has(_["a"].SIZE)&&(p*=s.get(_["a"].SIZE).data[0]);const f=i.camera,b=ae;Object(o["c"])(b,i.point);const m=p*f.pixelRatio/2+4*f.pixelRatio;Object(c["y"])(be[0],b[0]-m,b[1]+m,0),Object(c["y"])(be[1],b[0]+m,b[1]+m,0),Object(c["y"])(be[2],b[0]+m,b[1]-m,0),Object(c["y"])(be[3],b[0]-m,b[1]-m,0);for(let n=0;n<4;n++)if(!f.unprojectFromRenderScreen(be[n],me[n]))return;Object(h["g"])(f.eye,me[0],me[1],ge),Object(h["g"])(f.eye,me[1],me[2],ye),Object(h["g"])(f.eye,me[2],me[3],Oe),Object(h["g"])(f.eye,me[3],me[0],ve);let g=Number.MAX_VALUE,y=0;const O=K(this.parameters,s,e.indices)?l.length-2:l.length-5;for(let n=0;n<O;n+=3){te[0]=l[n]+r[12],te[1]=l[n+1]+r[13],te[2]=l[n+2]+r[14];const e=(n+3)%l.length;if(re[0]=l[e]+r[12],re[1]=l[e+1]+r[13],re[2]=l[e+2]+r[14],Object(h["v"])(ge,te)<0&&Object(h["v"])(ge,re)<0||Object(h["v"])(ye,te)<0&&Object(h["v"])(ye,re)<0||Object(h["v"])(Oe,te)<0&&Object(h["v"])(Oe,re)<0||Object(h["v"])(ve,te)<0&&Object(h["v"])(ve,re)<0)continue;if(f.projectToRenderScreen(te,se),f.projectToRenderScreen(re,oe),se[2]<0&&oe[2]>0){Object(c["l"])(ie,te,re);const e=f.frustum,t=-Object(h["v"])(e[u["b"].NEAR],te)/Object(c["j"])(ie,Object(h["r"])(e[u["b"].NEAR]));Object(c["g"])(ie,ie,t),Object(c["h"])(te,te,ie),f.projectToRenderScreen(te,se)}else if(se[2]>0&&oe[2]<0){Object(c["l"])(ie,re,te);const e=f.frustum,t=-Object(h["v"])(e[u["b"].NEAR],re)/Object(c["j"])(ie,Object(h["r"])(e[u["b"].NEAR]));Object(c["g"])(ie,ie,t),Object(c["h"])(re,re,ie),f.projectToRenderScreen(re,oe)}else if(se[2]<0&&oe[2]<0)continue;se[2]=0,oe[2]=0;const t=Object(d["d"])(Object(d["e"])(se,oe,ue),b);t<g&&(g=t,Object(c["m"])(ce,te),Object(c["m"])(le,re),y=n/3)}const j=i.rayBegin,x=i.rayEnd;if(g<m*m){let e=Number.MAX_VALUE;if(Object(d["a"])(Object(d["e"])(ce,le,ue),Object(d["e"])(j,x,de),ne)){Object(c["l"])(ne,ne,j);const t=Object(c["r"])(ne);Object(c["g"])(ne,ne,1/t),e=t/Object(c["o"])(j,x)}a(e,ne,y,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=e.indices,n=r.get(_["a"].POSITION);return Object(b["a"])(n,i?i.get(_["a"].POSITION):null,i&&K(this.parameters,r,i),t)}createLayout(){const e=Object(p["a"])().vec3f(_["a"].POSITION).f32(_["a"].SUBDIVISIONFACTOR).vec2f(_["a"].UV0).vec3f(_["a"].AUXPOS1).vec3f(_["a"].AUXPOS2);return this.parameters.vvSizeEnabled?e.f32(_["a"].SIZEFEATUREATTRIBUTE):e.f32(_["a"].SIZE),this.parameters.vvColorEnabled?e.f32(_["a"].COLORFEATUREATTRIBUTE):e.vec4f(_["a"].COLOR),this.parameters.vvOpacityEnabled&&e.f32(_["a"].OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new J(this.layout,this.parameters)}requiresSlot(e,t){if(e===O["a"].DRAPED_MATERIAL)return!0;if(this.parameters.renderOccluded===y["c"].OccludeAndTransparentStencil)return e===O["a"].OPAQUE_MATERIAL||e===O["a"].OCCLUDER_MATERIAL||e===O["a"].TRANSPARENT_OCCLUDER_MATERIAL;const r=Object(g["b"])(t);return r===f["a"].Color||r===f["a"].Alpha?e===(this.parameters.writeDepth?O["a"].TRANSPARENT_MATERIAL:O["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL):e===O["a"].OPAQUE_MATERIAL}createGLMaterial(e){return e.output===f["a"].Color||e.output===f["a"].Alpha||e.output===f["a"].Highlight||e.output===f["a"].Depth?new X(e):null}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),this._requiresTransparent(e)&&(e.transparent=!0)}_requiresTransparent(e){return!!((e.color&&e.color[3])<1||e.innerWidth>0&&this._colorRequiresTransparent(e.innerColor)||e.stipplePattern&&this._colorRequiresTransparent(e.stippleOffColor)||e.falloff>0)}_colorRequiresTransparent(e){return Object(a["k"])(e)&&e[3]<1&&e[3]>0}}class X extends m["a"]{updateParameters(e){return this.ensureTechnique(G,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==f["a"].Color&&this._output!==f["a"].Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const Y={width:0,color:[1,1,1,1],join:"miter",cap:x["a"].BUTT,miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleOffColor:null,stippleScaleWithLineWidth:!1,stipplePreferContinuous:!0,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1,wireframe:!1,...y["a"],...j["a"]};class J{constructor(e,t){this.parameters=t,this.numJoinSubdivisions=0,this.vertexBufferLayout=e;const r=t.stipplePattern?1:0;switch(this.parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=x["b"]+r}}_isClosed(e){return K(this.parameters,e.vertexAttributes,e.indices)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.indices.get(_["a"].POSITION).length/2+1,i=this._isClosed(e);let n=i?2:2*t;return n+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),n+=2,this.parameters.wireframe&&(n=2+4*(n-2)),n}write(e,t,r,i){var n;const a=he,s=pe,o=fe,l=t.vertexAttributes.get(_["a"].POSITION).data,u=t.indices&&t.indices.get(_["a"].POSITION),d=null==(n=t.vertexAttributes.get(_["a"].DISTANCETOSTART))?void 0:n.data;u&&u.length!==2*(l.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");let h=1,p=0;this.parameters.vvSizeEnabled?p=t.vertexAttributes.get(_["a"].SIZEFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(_["a"].SIZE)&&(h=t.vertexAttributes.get(_["a"].SIZE).data[0]);let f=[1,1,1,1],b=0;this.parameters.vvColorEnabled?b=t.vertexAttributes.get(_["a"].COLORFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(_["a"].COLOR)&&(f=t.vertexAttributes.get(_["a"].COLOR).data);let m=0;this.parameters.vvOpacityEnabled&&(m=t.vertexAttributes.get(_["a"].OPACITYFEATUREATTRIBUTE).data[0]);const g=l.length/3,y=e.transformation,O=new Float32Array(r.buffer),v=this.vertexBufferLayout.stride/4;let j=i*v;const w=j;let x=0;const T=d?(e,t,r)=>x=d[r]:(e,t,r)=>x+=Object(c["o"])(e,t),S=(e,t,r,i,n,a,s)=>{if(O[j++]=t[0],O[j++]=t[1],O[j++]=t[2],O[j++]=i,O[j++]=s,O[j++]=n,O[j++]=e[0],O[j++]=e[1],O[j++]=e[2],O[j++]=r[0],O[j++]=r[1],O[j++]=r[2],this.parameters.vvSizeEnabled?O[j++]=p:O[j++]=h,this.parameters.vvColorEnabled)O[j++]=b;else{const e=Math.min(4*a,f.length-4);O[j++]=f[e+0],O[j++]=f[e+1],O[j++]=f[e+2],O[j++]=f[e+3]}this.parameters.vvOpacityEnabled&&(O[j++]=m)};j+=v,Object(c["y"])(s,l[0],l[1],l[2]),y&&Object(c["s"])(s,s,y);const E=this._isClosed(t);if(E){const e=l.length-3;Object(c["y"])(a,l[e],l[e+1],l[e+2]),y&&Object(c["s"])(a,a,y)}else Object(c["y"])(o,l[3],l[4],l[5]),y&&Object(c["s"])(o,o,y),S(s,s,o,1,$.LEFT_CAP_START,0,0),S(s,s,o,1,$.RIGHT_CAP_START,0,0),Object(c["m"])(a,s),Object(c["m"])(s,o);const A=E?0:1,C=E?g:g-1;for(let _=A;_<C;_++){const e=(_+1)%g*3;Object(c["y"])(o,l[e+0],l[e+1],l[e+2]),y&&Object(c["s"])(o,o,y),T(a,s,_),S(a,s,o,0,$.LEFT_JOIN_END,_,x),S(a,s,o,0,$.RIGHT_JOIN_END,_,x);const t=this.numJoinSubdivisions;for(let r=0;r<t;++r){const e=(r+1)/(t+1);S(a,s,o,e,$.LEFT_JOIN_END,_,x),S(a,s,o,e,$.RIGHT_JOIN_END,_,x)}S(a,s,o,1,$.LEFT_JOIN_START,_,x),S(a,s,o,1,$.RIGHT_JOIN_START,_,x),Object(c["m"])(a,s),Object(c["m"])(s,o)}E?(Object(c["y"])(o,l[3],l[4],l[5]),y&&Object(c["s"])(o,o,y),x=T(a,s,C),S(a,s,o,0,$.LEFT_JOIN_END,A,x),S(a,s,o,0,$.RIGHT_JOIN_END,A,x)):(x=T(a,s,C),S(a,s,s,0,$.LEFT_CAP_END,C,x),S(a,s,s,0,$.RIGHT_CAP_END,C,x)),Q(O,w+v,O,w,v),j=Q(O,j-v,O,j,v),this.parameters.wireframe&&this._addWireframeVertices(r,w,j,v)}_addWireframeVertices(e,t,r,i){const n=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let s=0;const o=e=>s=Q(a,e,n,s,i);for(let c=0;c<a.length-1;c+=2*i)o(c),o(c+2*i),o(c+1*i),o(c+2*i),o(c+1*i),o(c+3*i)}}function Q(e,t,r,i,n){for(let a=0;a<n;a++)r[i++]=e[t++];return i}function K(e,t,r){return ee(e,t.get(_["a"].POSITION).data,r?r.get(_["a"].POSITION):null)}function ee(e,t,r){return!!e.isClosed&&(r?r.length>2:t.length>6)}const te=Object(l["f"])(),re=Object(l["f"])(),ie=Object(l["f"])(),ne=Object(l["f"])(),ae=Object(l["f"])(),se=Object(s["d"])(),oe=Object(s["d"])(),ce=Object(l["f"])(),le=Object(l["f"])(),ue=Object(d["c"])(),de=Object(d["c"])(),he=Object(l["f"])(),pe=Object(l["f"])(),fe=Object(l["f"])(),be=[Object(s["d"])(),Object(s["d"])(),Object(s["d"])(),Object(s["d"])()],me=[Object(l["f"])(),Object(l["f"])(),Object(l["f"])(),Object(l["f"])()],ge=Object(h["d"])(),ye=Object(h["d"])(),Oe=Object(h["d"])(),ve=Object(h["d"])()},"86e7":function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var i=r("8048"),n=r("7f83"),a=r("9392"),s=r("eed5"),o=r("8152");const c=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this.options=e,this.geometryTypes=c,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new s["a"]}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this.options.sourceSpatialReference||!e.spatialReference||Object(n["d"])(e.spatialReference,this.options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=Object(i["g"])(this.options.sourceSpatialReference)/Object(i["g"])(e.spatialReference);if(1!==t)for(const r of e.features){if(!Object(a["c"])(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new a["a"]}createSpatialReference(){return{wkid:0}}createGeometry(){return new o["a"]}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o["a"]}}},"86f2":function(e,t,r){e.exports=r.p+"static/img/booster-station.3d538146.png"},"86f2d":function(e,t,r){"use strict";var i,n;function a(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function o(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function c(e,t){const r=t||o(e),a=e.valueUnit||"unknown";return r===i.Unknown?n.Constant:e.stops?n.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?n.ClampedLinear:"unknown"===a?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?n.Proportional:n.Additive:n.Identity:n.RealWorldSize}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return a})),r.d(t,"f",(function(){return s})),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(n||(n={}))},8750:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("702a");function n(){return function(e,t){if(!e[t])throw new TypeError(`Cannot auto bind undefined function '${t}'`);return{value:s(e[t])}}}function a(e){const{type:t}=e;return e instanceof KeyboardEvent||"keyup"===t||"keydown"===t||"keypress"===t}function s(e){return function(t,...r){a(t)?Object(i["d"])(t.key)&&(t.preventDefault(),t.stopPropagation(),t.target.click()):e.call(this,t,...r)}}},"87b7":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return p})),r.d(t,"h",(function(){return f})),r.d(t,"i",(function(){return c})),r.d(t,"j",(function(){return o}));var i=r("b7c2"),n=r("d17d");const a={func:n["h"].LESS},s={func:n["h"].ALWAYS},o={mask:255},c={mask:0},l=e=>({function:{func:n["h"].NOTEQUAL,ref:e,mask:e},operation:{fail:n["w"].KEEP,zFail:n["w"].KEEP,zPass:n["w"].KEEP}}),u=e=>({function:{func:n["h"].ALWAYS,ref:e,mask:e},operation:{fail:n["w"].KEEP,zFail:n["w"].KEEP,zPass:n["w"].REPLACE}}),d={function:{func:n["h"].ALWAYS,ref:i["k"].OutlineVisualElementMask,mask:i["k"].OutlineVisualElementMask},operation:{fail:n["w"].KEEP,zFail:n["w"].KEEP,zPass:n["w"].ZERO}},h={function:{func:n["h"].ALWAYS,ref:i["k"].OutlineVisualElementMask,mask:i["k"].OutlineVisualElementMask},operation:{fail:n["w"].KEEP,zFail:n["w"].KEEP,zPass:n["w"].REPLACE}},p={function:{func:n["h"].EQUAL,ref:i["k"].OutlineVisualElementMask,mask:i["k"].OutlineVisualElementMask},operation:{fail:n["w"].KEEP,zFail:n["w"].KEEP,zPass:n["w"].KEEP}},f={function:{func:n["h"].NOTEQUAL,ref:i["k"].OutlineVisualElementMask,mask:i["k"].OutlineVisualElementMask},operation:{fail:n["w"].KEEP,zFail:n["w"].KEEP,zPass:n["w"].KEEP}}},8802:function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i=r("a4ee"),n=r("fa8a");const a=Object(n["b"])()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"});a.toJSON.bind(a),a.fromJSON.bind(a);var s,o=r("6a0ed"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0")),u=r("448d"),d=r("d386"),h=r("4653"),p=r("21e2");let f=s=class extends o["a"]{constructor(e){super(e),this.dateFormat=null,this.dateTimeFormatOptions=null,this.digitSeparator=!1,this.places=null}clone(){return new s({dateFormat:this.dateFormat,digitSeparator:this.digitSeparator,places:this.places})}format(e){return this.dateFormat?Object(h["b"])(e,{...Object(h["a"])(this.dateFormat),...this.dateTimeFormatOptions}):Object(p["b"])(e,Object(p["a"])(this))}};Object(i["a"])([Object(u["a"])(a)],f.prototype,"dateFormat",void 0),Object(i["a"])([Object(c["b"])({type:Object,json:{read:!1}})],f.prototype,"dateTimeFormatOptions",void 0),Object(i["a"])([Object(c["b"])({type:Boolean,json:{write:!0}})],f.prototype,"digitSeparator",void 0),Object(i["a"])([Object(c["b"])({type:l["a"],json:{write:!0}})],f.prototype,"places",void 0),f=s=Object(i["a"])([Object(d["a"])("esri.popup.support.FieldInfoFormat")],f);const b=f},"880c":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(e){super(e)}clone(){}};Object(i["a"])([Object(a["b"])({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],o.prototype,"type",void 0),o=Object(i["a"])([Object(s["a"])("esri.symbols.patterns.LinePattern3D")],o);const c=o},"880d":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*i._m:e}getInt(){return this._seed=(i._a*this._seed+i._c)%i._m,this._seed}getFloat(){return this.getInt()/(i._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/i._m*r}}i._m=2147483647,i._a=48271,i._c=0},"88da":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=(r("c120"),r("6a0ed")),s=r("59b2"),o=(r("b50f"),r("cea0")),c=r("afcf"),l=r("d386"),u=r("09db"),d=r("fcf2"),h=r("4dc1");const p=new WeakMap;let f=0,b=i=class extends a["a"]{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,i){if(e instanceof HTMLImageElement){const n={type:"image-element",src:Object(d["f"])(e.src,i),crossOrigin:e.crossOrigin};t[r]=n}else if(e instanceof HTMLCanvasElement){const i=e.getContext("2d").getImageData(0,0,e.width,e.height),n={type:"canvas-element",imageData:this._encodeImageData(i)};t[r]=n}else if(e instanceof HTMLVideoElement){const n={type:"video-element",src:Object(d["f"])(e.src,i),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=n}else{const i={type:"image-data",imageData:this._encodeImageData(e)};t[r]=i}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)return!0}return!1}set transparent(e){null!=e?this._override("transparent",e):this._clearOverride("transparent")}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(p.has(this.data)||p.set(this.data,++f),t(p.get(this.data))):t()}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new i(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return Object(h["h"])(r,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new i({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new i({data:e}):Object(o["d"])(i,e)}};Object(n["a"])([Object(s["b"])({type:String,json:{write:d["g"]}})],b.prototype,"url",null),Object(n["a"])([Object(s["b"])({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),Object(s["b"])()],b.prototype,"data",null),Object(n["a"])([Object(u["a"])("data")],b.prototype,"writeData",null),Object(n["a"])([Object(c["a"])("data")],b.prototype,"readData",null),Object(n["a"])([Object(s["b"])({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],b.prototype,"transparent",null),Object(n["a"])([Object(s["b"])({json:{write:!0}})],b.prototype,"wrap",void 0),Object(n["a"])([Object(s["b"])({readOnly:!0})],b.prototype,"contentHash",null),b=i=Object(n["a"])([Object(l["a"])("esri.geometry.support.MeshTexture")],b);const m=b},"89bf":function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return S})),r.d(t,"c",(function(){return w})),r.d(t,"d",(function(){return _})),r.d(t,"e",(function(){return T}));var i=r("b2b2"),n=r("1c92"),a=r("dae5"),s=r("d791"),o=r("afe1"),c=r("04f0"),l=r("b139"),u=r("e431"),d=r("47f8"),h=r("0b2d"),p=r("0fc4"),f=r("f895");class b{constructor(){this._transform=Object(o["d"])(),this._transformInverse=new m({value:this._transform},s["b"],o["d"]),this._transformInverseTranspose=new m(this._transformInverse,s["u"],o["d"]),this._transformTranspose=new m({value:this._transform},s["u"],o["d"]),this._transformInverseRotation=new m({value:this._transform},n["m"],a["b"])}_invalidateLazyTransforms(){this._transformInverse.invalidate(),this._transformInverseTranspose.invalidate(),this._transformTranspose.invalidate(),this._transformInverseRotation.invalidate()}get transform(){return this._transform}get inverse(){return this._transformInverse.value}get inverseTranspose(){return this._transformInverseTranspose.value}get inverseRotation(){return this._transformInverseRotation.value}get transpose(){return this._transformTranspose.value}setTransformMatrix(e){Object(s["d"])(this._transform,e)}multiplyTransform(e){Object(s["n"])(this._transform,this._transform,e)}set(e){Object(s["d"])(this._transform,e),this._invalidateLazyTransforms()}setAndInvalidateLazyTransforms(e,t){this.setTransformMatrix(e),this.multiplyTransform(t),this._invalidateLazyTransforms()}}class m{constructor(e,t,r){this.original=e,this.update=t,this.dirty=!0,this.transform=r()}invalidate(){this.dirty=!0}get value(){return this.dirty&&(this.update(this.transform,this.original.value),this.dirty=!1),this.transform}}class g{constructor(e=0){this.offset=e,this.tmpVertex=Object(h["f"])()}applyToVertex(e,t,r){const i=e+this.localOrigin[0],n=t+this.localOrigin[1],a=r+this.localOrigin[2],s=this.offset/Math.sqrt(i*i+n*n+a*a);return this.tmpVertex[0]=e+i*s,this.tmpVertex[1]=t+n*s,this.tmpVertex[2]=r+a*s,this.tmpVertex}applyToAabb(e){const t=e[0]+this.localOrigin[0],r=e[1]+this.localOrigin[1],i=e[2]+this.localOrigin[2],n=e[3]+this.localOrigin[0],a=e[4]+this.localOrigin[1],s=e[5]+this.localOrigin[2],o=this.offset/Math.sqrt(t*t+r*r+i*i);e[0]+=t*o,e[1]+=r*o,e[2]+=i*o;const c=this.offset/Math.sqrt(n*n+a*a+s*s);return e[3]+=n*c,e[4]+=a*c,e[5]+=s*c,e}}class y{constructor(e=0){this.offset=e,this.componentLocalOriginLength=0,this.tmpVertex=Object(h["f"])(),this.mbs=Object(p["e"])(),this.obb={center:Object(h["f"])(),halfSize:Object(d["c"])(),quaternion:null}}set localOrigin(e){this.componentLocalOriginLength=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])}applyToVertex(e,t,r){const i=e,n=t,a=r+this.componentLocalOriginLength,s=this.offset/Math.sqrt(i*i+n*n+a*a);return this.tmpVertex[0]=e+i*s,this.tmpVertex[1]=t+n*s,this.tmpVertex[2]=r+a*s,this.tmpVertex}applyToAabb(e){const t=e[0],r=e[1],i=e[2]+this.componentLocalOriginLength,n=e[3],a=e[4],s=e[5]+this.componentLocalOriginLength,o=this.offset/Math.sqrt(t*t+r*r+i*i);e[0]+=t*o,e[1]+=r*o,e[2]+=i*o;const c=this.offset/Math.sqrt(n*n+a*a+s*s);return e[3]+=n*c,e[4]+=a*c,e[5]+=s*c,e}applyToMbs(e){const t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]),r=this.offset/t;return this.mbs[0]=e[0]+e[0]*r,this.mbs[1]=e[1]+e[1]*r,this.mbs[2]=e[2]+e[2]*r,this.mbs[3]=e[3]+e[3]*this.offset/t,this.mbs}applyToObb(e){const t=e.center,r=this.offset/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);this.obb.center[0]=t[0]+t[0]*r,this.obb.center[1]=t[1]+t[1]*r,this.obb.center[2]=t[2]+t[2]*r,Object(u["w"])(this.obb.halfSize,e.halfSize,e.quaternion),Object(u["h"])(this.obb.halfSize,this.obb.halfSize,e.center);const i=this.offset/Math.sqrt(this.obb.halfSize[0]*this.obb.halfSize[0]+this.obb.halfSize[1]*this.obb.halfSize[1]+this.obb.halfSize[2]*this.obb.halfSize[2]);return this.obb.halfSize[0]+=this.obb.halfSize[0]*i,this.obb.halfSize[1]+=this.obb.halfSize[1]*i,this.obb.halfSize[2]+=this.obb.halfSize[2]*i,Object(u["l"])(this.obb.halfSize,this.obb.halfSize,e.center),Object(c["b"])(E,e.quaternion),Object(u["w"])(this.obb.halfSize,this.obb.halfSize,E),this.obb.halfSize[0]*=this.obb.halfSize[0]<0?-1:1,this.obb.halfSize[1]*=this.obb.halfSize[1]<0?-1:1,this.obb.halfSize[2]*=this.obb.halfSize[2]<0?-1:1,this.obb.quaternion=e.quaternion,this.obb}}class O{constructor(e=0){this.offset=e,this.sphere=Object(f["c"])(),this.tmpVertex=Object(h["f"])()}applyToVertex(e,t,r){const i=this.objectTransform.transform;let n=i[0]*e+i[4]*t+i[8]*r+i[12],a=i[1]*e+i[5]*t+i[9]*r+i[13],s=i[2]*e+i[6]*t+i[10]*r+i[14];const o=this.offset/Math.sqrt(n*n+a*a+s*s);n+=n*o,a+=a*o,s+=s*o;const c=this.objectTransform.inverse;return this.tmpVertex[0]=c[0]*n+c[4]*a+c[8]*s+c[12],this.tmpVertex[1]=c[1]*n+c[5]*a+c[9]*s+c[13],this.tmpVertex[2]=c[2]*n+c[6]*a+c[10]*s+c[14],this.tmpVertex}applyToMinMax(e,t){const r=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*r,e[1]+=e[1]*r,e[2]+=e[2]*r;const i=this.offset/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]+=t[0]*i,t[1]+=t[1]*i,t[2]+=t[2]*i}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]),r=this.offset/t;return this.sphere[0]=e[0]+e[0]*r,this.sphere[1]=e[1]+e[1]*r,this.sphere[2]=e[2]+e[2]*r,this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}}const v=new O;function _(e){return Object(i["k"])(e)?(v.offset=e,v):null}const j=new y;function w(e){return Object(i["k"])(e)?(j.offset=e,j):null}const x=new g;function T(e){return Object(i["k"])(e)?(x.offset=e,x):null}const S="terrain",E=Object(l["b"])()},"89cb":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("ce50"),n=r("e92d"),a=r("008c");function s(e,t,r,i,a){const s=e.referencesGeometry()&&a?c(t,i,a):t,o=e.repurposeFeature(s);try{return e.evaluate({...r,$feature:o})}catch(l){return n["a"].getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",l),null}}const o=new Map;function c(e,t,r){const{transform:i,hasZ:n,hasM:a}=r;o.has(t)||o.set(t,l(t));const s=o.get(t)(e.geometry,i,n,a);return{...e,geometry:s}}function l(e){const t={};switch(e){case"esriGeometryPoint":return(e,r,i,n)=>Object(a["e"])(r,t,e,i,n);case"esriGeometryPolygon":return(e,r,i,n)=>Object(a["f"])(r,t,e,i,n);case"esriGeometryPolyline":return(e,r,i,n)=>Object(a["g"])(r,t,e,i,n);case"esriGeometryMultipoint":return(e,r,i,n)=>Object(a["d"])(r,t,e,i,n);default:return n["a"].getLogger("esri.views.2d.support.arcadeOnDemand").error(new i["a"]("mapview-arcade","Unable to handle geometryType: "+e)),e=>e}}},"89da":function(e,t,r){"use strict";r.d(t,"a",(function(){return he})),r.d(t,"b",(function(){return ae})),r.d(t,"c",(function(){return k})),r.d(t,"d",(function(){return D})),r.d(t,"e",(function(){return Y})),r.d(t,"f",(function(){return se})),r.d(t,"g",(function(){return W})),r.d(t,"h",(function(){return ue})),r.d(t,"i",(function(){return me})),r.d(t,"j",(function(){return T})),r.d(t,"k",(function(){return Oe})),r.d(t,"l",(function(){return ye})),r.d(t,"m",(function(){return ve})),r.d(t,"n",(function(){return M})),r.d(t,"o",(function(){return x})),r.d(t,"p",(function(){return $})),r.d(t,"q",(function(){return Pe})),r.d(t,"r",(function(){return Ce})),r.d(t,"s",(function(){return S})),r.d(t,"t",(function(){return E})),r.d(t,"u",(function(){return Ae})),r.d(t,"v",(function(){return Re})),r.d(t,"w",(function(){return Me})),r.d(t,"x",(function(){return te})),r.d(t,"y",(function(){return we})),r.d(t,"z",(function(){return _e})),r.d(t,"A",(function(){return pe})),r.d(t,"B",(function(){return de})),r.d(t,"C",(function(){return U})),r.d(t,"D",(function(){return G})),r.d(t,"E",(function(){return P})),r.d(t,"F",(function(){return ee})),r.d(t,"G",(function(){return K})),r.d(t,"H",(function(){return L})),r.d(t,"I",(function(){return Q})),r.d(t,"J",(function(){return xe})),r.d(t,"K",(function(){return N})),r.d(t,"L",(function(){return F})),r.d(t,"M",(function(){return z})),r.d(t,"N",(function(){return Ie})),r.d(t,"O",(function(){return C})),r.d(t,"P",(function(){return R})),r.d(t,"Q",(function(){return H})),r.d(t,"R",(function(){return q})),r.d(t,"S",(function(){return B})),r.d(t,"T",(function(){return V})),r.d(t,"U",(function(){return le})),r.d(t,"V",(function(){return ne})),r.d(t,"W",(function(){return re})),r.d(t,"X",(function(){return A})),r.d(t,"Y",(function(){return Te})),r.d(t,"Z",(function(){return Ee})),r.d(t,"ab",(function(){return I})),r.d(t,"bb",(function(){return ce}));var i=r("a6ac"),n=r("a9e6"),a=r("9098"),s=r("436b"),o=r("f4cc"),c=r("3af1"),l=r("3760"),u=r("57dc"),d=r("4ae5"),h=r("1219"),p=r("521c"),f=r("1315"),b=r("b2b2"),m=r("7015"),g=r("32ed"),y=r("2035"),O=r("853c");class v{constructor(e){this.value=e}}class _{constructor(e){this.value=e}}class j{constructor(e){this.fn=e}}class w{constructor(e,t){this.paramCount=t,this.fn=e}}const x=j,T=_,S=v,E=w,A={type:"VOID"},C={type:"BREAK"},R={type:"CONTINUE"};function M(e,t,r){return""===t||null==t||t===r||t===r?e:e=e.split(t).join(r)}function P(e){return e instanceof j||e instanceof i["a"]||e instanceof w}function I(e){return!!L(e)||!!F(e)||!!H(e)||!!N(e)||null===e||e===A||"number"==typeof e}function D(e,t){return void 0===e?t:e}function L(e){return"string"==typeof e||e instanceof String}function N(e){return"boolean"==typeof e}function F(e){return"number"==typeof e}function k(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function U(e){return e instanceof Array}function z(e){return"esri.arcade.Feature"===(null==e?void 0:e.arcadeDeclaredClass)}function B(e){return!0===(e&&e.declaredRootClass&&"esri.arcade.featureset.support.FeatureSet"===e.declaredRootClass)}function V(e){return!0===(e&&e.declaredRootClass&&"esri.arcade.featureSetCollection"===e.declaredRootClass)}function G(e){return e instanceof n["a"]}function H(e){return e instanceof Date}function q(e,t,r){if(e.length<t||e.length>r)throw new Error("Function called with wrong number of Parameters")}function W(e){return e<0?-Math.round(-e):Math.round(e)}function $(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))}function Z(e,t){return!1===isNaN(e)?null==t||""===t?e.toString():(t=M(t,"‰",""),t=M(t,"¤",""),Object(m["b"])(e,{pattern:t})):e.toString()}function X(e,t){const r=f["DateTime"].fromJSDate(e);return null==t||""===t?r.toISO({suppressMilliseconds:!0}):r.toFormat(Y(t),{locale:Object(y["b"])(),numberingSystem:"latn"})}function Y(e){e=e.replace(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const r=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const i of e.match(r))switch(i){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"Z":t+="ZZ";break;case"ZZ":t+="ZZZ";break;case"S":t+="'S'";break;case"SS":t+="'SS'";break;case"SSS":t+="u";break;case"A":case"a":t+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":t+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?t+=`'${i.slice(1,-1)}'`:t+=`'${i}'`}return t}function J(e,t,r){switch(r){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function Q(e,t,r){if(null===e){if(null===t||t===A)return J(null,null,r);if(F(t))return J(0,t,r);if(L(t))return J(0,ne(t),r);if(N(t))return J(0,ne(t),r);if(H(t))return J(0,t.getTime(),r)}if(e===A){if(null===t||t===A)return J(null,null,r);if(F(t))return J(0,t,r);if(L(t))return J(0,ne(t),r);if(N(t))return J(0,ne(t),r);if(H(t))return J(0,t.getTime(),r)}else if(F(e)){if(F(t))return J(e,t,r);if(N(t))return J(e,ne(t),r);if(null===t||t===A)return J(e,0,r);if(L(t))return J(e,ne(t),r);if(H(t))return J(e,t.getTime(),r)}else if(L(e)){if(L(t))return J(ee(e),ee(t),r);if(H(t))return J(ne(e),t.getTime(),r);if(F(t))return J(ne(e),t,r);if(null===t||t===A)return J(ne(e),0,r);if(N(t))return J(ne(e),ne(t),r)}else if(H(e)){if(H(t))return J(e,t,r);if(null===t||t===A)return J(e.getTime(),0,r);if(F(t))return J(e.getTime(),t,r);if(N(t))return J(e.getTime(),ne(t),r);if(L(t))return J(e.getTime(),ne(t),r)}else if(N(e)){if(N(t))return J(e,t,r);if(F(t))return J(ne(e),ne(t),r);if(H(t))return J(ne(e),t.getTime(),r);if(null===t||t===A)return J(ne(e),0,r);if(L(t))return J(ne(e),ne(t),r)}return!!K(e,t)&&("<="===r||">="===r)}function K(e,t){if(e===t)return!0;if(null===e&&t===A||null===t&&e===A)return!0;if(H(e)&&H(t))return e.getTime()===t.getTime();if(e instanceof a["a"])return e.equalityTest(t);if(e instanceof s["a"])return e.equalityTest(t);if(e instanceof d["a"]&&t instanceof d["a"]){const r=e.cache._arcadeCacheId,i=t.cache._arcadeCacheId;if(null!=r)return r===i}if(void 0!==e&&void 0!==t&&null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function ee(e,t){if(L(e))return e;if(null===e)return"";if(F(e))return Z(e,t);if(N(e))return e.toString();if(H(e))return X(e,t);if(e instanceof l["a"])return JSON.stringify(e.toJSON());if(U(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=ie(e[r]);return"["+t.join(",")+"]"}if(e instanceof n["a"]){const t=[];for(let r=0;r<e.length();r++)t[r]=ie(e.get(r));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():P(e)?"object, Function":""}function te(e){const t=[];if(!1===U(e))return null;if(e instanceof n["a"]){for(let r=0;r<e.length();r++)t[r]=ne(e.get(r));return t}for(let r=0;r<e.length;r++)t[r]=ne(e[r]);return t}function re(e,t){if(L(e))return e;if(null===e)return"";if(F(e))return Z(e,t);if(N(e))return e.toString();if(H(e))return X(e,t);if(e instanceof l["a"])return e instanceof c["a"]?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+be(e.spatialReference)+"}":be(e.toJSON(),(e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0);if(U(e)){const t=[];for(let r=0;r<e.length;r++)t[r]=ie(e[r]);return"["+t.join(",")+"]"}if(e instanceof n["a"]){const t=[];for(let r=0;r<e.length();r++)t[r]=ie(e.get(r));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():P(e)?"object, Function":""}function ie(e){if(null===e)return"null";if(N(e)||F(e)||L(e))return JSON.stringify(e);if(e instanceof l["a"])return re(e);if(e instanceof n["a"])return re(e);if(e instanceof Array)return re(e);if(e instanceof Date)return JSON.stringify(X(e,""));if(null!==e&&"object"==typeof e){if(void 0!==e.castToText)return e.castToText()}else if(e===A)return"null";return"null"}function ne(e,t){return F(e)?e:null===e||""===e?0:H(e)?NaN:N(e)?e?1:0:U(e)||""===e||void 0===e?NaN:void 0!==t&&L(e)?(t=M(t,"‰",""),t=M(t,"¤",""),Object(m["c"])(e,{pattern:t})):e===A?0:Number(e)}function ae(e){if(H(e))return e;if(L(e)){const t=oe(e);if(t)return t.toJSDate()}return null}function se(e){return H(e)?f["DateTime"].fromJSDate(e):L(e)?oe(e):null}function oe(e){const t=/ (\d\d)/;let r=f["DateTime"].fromISO(e);return r.isValid||t.test(e)&&(e=e.replace(t,"T$1"),r=f["DateTime"].fromISO(e),r.isValid)?r:null}function ce(e){return N(e)?e:L(e)?"true"===(e=e.toLowerCase()):!!F(e)&&0!==e&&!isNaN(e)}function le(e,t){return Object(b["j"])(e)?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ue(e){if(null===e)return null;if(e instanceof d["a"])return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof h["a"]){if(0===e.rings.length)return null;for(const t of e.rings)if(t.length>0)return e;return null}if(e instanceof p["a"]){if(0===e.paths.length)return null;for(const t of e.paths)if(t.length>0)return e;return null}return e instanceof u["a"]?0===e.points.length?null:e:e instanceof c["a"]?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function de(e,t){if(!e)return t;if(!e.domain)return t;let r=null;if("string"===e.field.type||"esriFieldTypeString"===e.field.type)t=ee(t);else{if(null==t)return null;if(""===t)return t;t=ne(t)}for(let i=0;i<e.domain.codedValues.length;i++){const n=e.domain.codedValues[i];n.code===t&&(r=n)}return null===r?t:r.name}function he(e,t){if(!e)return t;if(!e.domain)return t;let r=null;t=ee(t);for(let i=0;i<e.domain.codedValues.length;i++){const n=e.domain.codedValues[i];n.name===t&&(r=n)}return null===r?t:r.code}function pe(e,t,r=null,i=null){if(!t)return null;if(!t.fields)return null;let n,a,s=null;for(let o=0;o<t.fields.length;o++){const r=t.fields[o];r.name.toLowerCase()===e.toString().toLowerCase()&&(s=r)}if(null===s)throw new Error("Field not found");return null===i&&r&&t.typeIdField&&(i=r.hasField(t.typeIdField)?r.field(t.typeIdField):null),null!=i&&t.types.some((function(e){return e.id===i&&(n=e.domains&&e.domains[s.name],n&&"inherited"===n.type&&(n=fe(s.name,t),a=!0),!0)})),a||n||(n=fe(e,t)),{field:s,domain:n}}function fe(e,t){let r;return t.fields.some((function(t){return t.name.toLowerCase()===e.toLowerCase()&&(r=t.domain),!!r})),r}function be(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){const i={key:t,value:e[t]},a={key:r,value:e[r]};return n(i,a)}});var n;const a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let n,s;if(Array.isArray(t)){for(s="[",n=0;n<t.length;n++)n&&(s+=","),s+=e(t[n])||"null";return s+"]"}if(null===t)return"null";if(-1!==a.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const o=a.push(t)-1,c=Object.keys(t).sort(i&&i(t));for(s="",n=0;n<c.length;n++){const r=c[n],i=e(t[r]);i&&(s&&(s+=","),s+=JSON.stringify(r)+":"+i)}return a.splice(o,1),"{"+s+"}"}(e)}function me(e){if(null===e)return null;const t=[];for(const r of e)r&&r.arcadeDeclaredClass&&"esri.arcade.Feature"===r.arcadeDeclaredClass?t.push(r.geometry()):t.push(r);return t}function ge(e,t){if(!(t instanceof d["a"]))throw new Error("Invalid Argument");e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function ye(e,t){if(U(e)||G(e)){let r=!1,i=!1,n=[],a=t;if(U(e)){for(const t of e)ge(n,t);n.length>0&&(a=e[0].spatialReference,r=e[0].hasZ,i=e[0].hasM)}else if(e instanceof s["a"])n=e._elements,n.length>0&&(r=e._hasZ,i=e._hasM,a=e.get(0).spatialReference);else{if(!G(e))throw new Error("Invalid Argument");for(const t of e.toArray())ge(n,t);n.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===n.length?null:(!1===Object(g["f"])(n,i,r)&&(n=n.slice(0).reverse()),new h["a"]({rings:[n],spatialReference:a,hasZ:r,hasM:i}))}return e}function Oe(e,t){if(U(e)||G(e)){let r=!1,i=!1,n=[],a=t;if(U(e)){for(const t of e)ge(n,t);n.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,i=!0===e[0].hasM)}else if(e instanceof s["a"])n=e._elements,n.length>0&&(r=e._hasZ,i=e._hasM,a=e.get(0).spatialReference);else if(G(e)){for(const t of e.toArray())ge(n,t);n.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===n.length?null:new p["a"]({paths:[n],spatialReference:a,hasZ:r,hasM:i})}return e}function ve(e,t){if(U(e)||G(e)){let r=!1,i=!1,n=[],a=t;if(U(e)){for(const t of e)ge(n,t);n.length>0&&(a=e[0].spatialReference,r=!0===e[0].hasZ,i=!0===e[0].hasM)}else if(e instanceof s["a"])n=e._elements,n.length>0&&(r=e._hasZ,i=e._hasM,a=e.get(0).spatialReference);else if(G(e)){for(const t of e.toArray())ge(n,t);n.length>0&&(a=e.get(0).spatialReference,r=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===n.length?null:new u["a"]({points:n,spatialReference:a,hasZ:r,hasM:i})}return e}function _e(e,t=!1){const r=[];if(null===e)return r;if(!0===U(e)){for(let i=0;i<e.length;i++){const n=ee(e[i]);""===n&&!0!==t||r.push(n)}return r}if(e instanceof n["a"]){for(let i=0;i<e.length();i++){const n=ee(e.get(i));""===n&&!0!==t||r.push(n)}return r}if(I(e)){const i=ee(e);return""===i&&!0!==t||r.push(i),r}return[]}let je=0;function we(e){return je++,je%100==0?(je=0,Object(o["d"])(t=>{setTimeout(()=>{t(e)},0)})):e}function xe(e,t,r){switch(r){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function Te(e,t=null){return null==e?null:N(e)||F(e)||L(e)?e:e instanceof l["a"]?!0===(null==t?void 0:t.keepGeometryType)?e:e.toJSON():e instanceof n["a"]?e.toArray().map(e=>Te(e,t)):e instanceof Array?e.map(e=>Te(e,t)):e instanceof Date?e:null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(t):null}function Se(e,t,r,i,n){return Ee(e,t,r).then(e=>{n[i]=e})}function Ee(e,t=null,r=null){if(e instanceof n["a"]&&(e=e.toArray()),null==e)return Object(o["t"])(null);if(I(e)||e instanceof l["a"]||e instanceof Date)return Object(o["t"])(Te(e,r));if(e instanceof Array){const i=[],n=[];for(const a of e)null===a||I(a)||a instanceof l["a"]||a instanceof Date?n.push(Te(a,r)):(n.push(null),i.push(Se(a,t,r,n.length-1,n)));return i.length>0?Object(o["b"])(i).then(()=>n):Object(o["t"])(n)}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(t,r):Object(o["t"])(null)}function Ae(e,t,r){const i=e.fullSchema();return null===i?null:i.fields?pe(t,i,e,r):null}function Ce(e){const t=e.fullSchema();return null===t?null:t.fields&&t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map(e=>({name:e.name,code:e.id})):[]}:null}function Re(e,t,r,i){const n=e.fullSchema();if(null===n)return null;if(!n.fields)return null;const a=pe(t,n,e,i);if(void 0===r)try{r=e.field(t)}catch(s){return null}return de(a,r)}function Me(e,t,r,i){const n=e.fullSchema();if(null===n)return null;if(!n.fields)return null;if(void 0===r){try{r=e.field(t)}catch(a){return null}return r}return he(pe(t,n,e,i),r)}function Pe(e){const t=e.fullSchema();if(null===t)return null;if(!t.fields)return null;const r=[];for(const i of t.fields)r.push(Object(O["h"])(i));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField,geometryType:void 0===O["n"][t.geometryType]?"":O["n"][t.geometryType],fields:r}}const Ie=Object.freeze({__proto__:null,ReturnResultE:v,ImplicitResultE:_,NativeFunctionE:j,SizzleFunctionE:w,NativeFunction:x,ImplicitResult:T,ReturnResult:S,SizzleFunction:E,voidOperation:A,breakResult:C,continueResult:R,multiReplace:M,isFunctionParameter:P,isSimpleType:I,defaultUndefined:D,isString:L,isBoolean:N,isNumber:F,isInteger:k,isArray:U,isFeature:z,isFeatureSet:B,isFeatureSetCollection:V,isImmutableArray:G,isDate:H,pcCheck:q,absRound:W,generateUUID:$,formatNumber:Z,formatDate:X,standardiseDateFormat:Y,greaterThanLessThan:Q,equalityTest:K,toString:ee,toNumberArray:te,toStringExplicit:re,toNumber:ne,toDate:ae,toDateTime:se,toBoolean:ce,fixSpatialReference:le,fixNullGeometry:ue,getDomainValue:de,getDomainCode:he,getDomain:pe,stableStringify:be,autoCastFeatureToGeometry:me,autoCastArrayOfPointsToPolygon:ye,autoCastArrayOfPointsToPolyline:Oe,autoCastArrayOfPointsToMultiPoint:ve,toStringArray:_e,tick:we,binaryOperator:xe,castAsJson:Te,castAsJsonAsync:Ee,featureFullDomain:Ae,featureSubtypes:Ce,featureDomainValueLookup:Re,featureDomainCodeLookup:Me,featureSchema:Pe})},"8a44":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b50f"),n=r("6b59");const a=1.5,s=1.1;class o{constructor(e){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new i["a"],e&&(e.initialSize&&(this.data=new Array(e.initialSize)),e.allocator&&(this._allocator=e.allocator),void 0!==e.deallocator&&(this._deallocator=e.deallocator),e.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(e){const t=new Array;for(let r=0;r<this._length;r++){const i=this.data[r];e(i)&&t.push(i)}return t}getItemAt(e){if(!(e<0||e>=this._length))return this.data[e]}get length(){return this._length}set length(e){if(e>this._length){if(this._allocator){for(;this._length<e;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=e}else{if(this._deallocator)for(let t=e;t<this._length;++t)this.data[t]=this._deallocator(this.data[t]);this._length=e,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(e){this.data[this._length++]=e}pushArray(e,t=e.length){for(let r=0;r<t;r++)this.data[this._length++]=e[r]}fill(e,t){for(let r=0;r<t;r++)this.data[this._length++]=e}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const e=this.data[this._length];return++this._length,e}unshift(e){this.data.unshift(e),this._length++,c(this)}pop(){if(0===this.length)return;const e=this.data[this.length-1];return this.length=this.length-1,this._shrink(),e}remove(e){const t=Object(i["g"])(this.data,e,this.length,this._hint);if(-1!==t)return this.data.splice(t,1),this.length=this.length-1,e}removeUnordered(e){const t=Object(i["k"])(this.data,e,this.length,this._hint);return void 0!==t&&(this.length=this.length-1),this._shrink(),t}removeUnorderedIndex(e){if(!(e>=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}removeUnorderedMany(e,t=e.length,r){this.length=Object(i["l"])(this.data,e,this.length,t,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(e,t){e>=this.length||t>=this.length||e===t||([this.data[e],this.data[t]]=[this.data[t],this.data[e]])}sort(e){n["a"].sort(this.data,0,this.length,e)}iterableSort(e){return n["a"].iterableSort(this.data,0,this.length,e)}some(e,t){for(let r=0;r<this.length;++r)if(e.call(t,this.data[r],r,this.data))return!0;return!1}filterInPlace(e,t){let r=0;for(let i=0;i<this._length;++i){const n=this.data[i];e.call(t,n,i,this.data)&&(this.data[i]=this.data[r],this.data[r]=n,r++)}if(this._deallocator)for(let i=r;i<this._length;i++)this.data[i]=this._deallocator(this.data[i]);return this._length=r,this._shrink(),this}forAll(e,t){const r=this.length,i=this.data;for(let n=0;n<r;++n)e.call(t,i[n],n,i)}forEach(e,t){for(let r=0;r<this.length;++r)e.call(t,this.data[r],r,this.data)}map(e,t){const r=new Array(this.length);for(let i=0;i<this.length;++i)r[i]=e.call(t,this.data[i],i,this.data);return r}reduce(e,t){let r=t;for(let i=0;i<this.length;++i)r=e(r,this.data[i],i,this.data);return r}has(e){const t=this.length,r=this.data;for(let i=0;i<t;++i)if(r[i]===e)return!0;return!1}}function c(e){e.data.length>a*e.length&&(e.data.length=Math.floor(e.length*s))}},"8b28":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386"));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return Object(i["a"])([Object(n["b"])({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=Object(i["a"])([Object(a["a"])("esri.layers.mixins.CustomParametersMixin")],t),t}},"8b9d":function(e,t,r){"use strict";r.d(t,"a",(function(){return J})),r.d(t,"b",(function(){return L})),r.d(t,"c",(function(){return N})),r.d(t,"d",(function(){return Q})),r.d(t,"e",(function(){return G})),r.d(t,"f",(function(){return U})),r.d(t,"g",(function(){return q})),r.d(t,"h",(function(){return k})),r.d(t,"i",(function(){return Z})),r.d(t,"j",(function(){return H})),r.d(t,"k",(function(){return $})),r.d(t,"l",(function(){return z})),r.d(t,"m",(function(){return F})),r.d(t,"n",(function(){return B})),r.d(t,"o",(function(){return W})),r.d(t,"p",(function(){return X})),r.d(t,"q",(function(){return te})),r.d(t,"r",(function(){return Y})),r.d(t,"s",(function(){return ee})),r.d(t,"t",(function(){return M}));var i=r("2c4f"),n=r("b2b2"),a=r("7f83"),s=r("7a18"),o=r("3c9c"),c=r("3af9"),l=r("ce50"),u=r("e431"),d=r("0b2d"),h=r("8188"),p=r("9180"),f=r("2ec5"),b=r("ee83");const m=Object(d["f"])(),g=Object(d["f"])(),y=Object(d["f"])(),O=Object(d["f"])();function v(e,t,r=0){const i=e.extent;if(Object(n["j"])(i))return!1;if(0===r)return Object(p["h"])(i,t);const a=Math.min(i[2]-i[0],i[3]-i[1]);return Object(p["j"])(i,t,r*a)}function _(e,t,r,i){Object(u["m"])(m,r),m[i]=t[i];const n=Object(u["l"])(m,m,t),a=Object(u["l"])(g,e,t),s=Object(u["j"])(a,n),o=Object(u["j"])(n,n);let c;c=s<=0?t:o<=s?r:Object(u["h"])(m,t,Object(u["g"])(n,n,s/o));const l=Object(u["l"])(m,e,c);return Math.PI/2-Math.atan(l[2]/Math.sqrt(l[0]*l[0]+l[1]*l[1]))}function j(e,t,r){const i=e.extent;if(Object(n["j"])(i))return 0;y[0]=i[0],y[1]=i[1],y[2]=r,O[0]=i[2],O[1]=i[3],O[2]=r;let a=1/0,s=1/0;return t[0]<y[0]?a=_(t,y,O,0):t[0]>O[0]&&(a=_(t,O,y,0)),t[1]<y[1]?s=_(t,y,O,1):t[1]>O[1]&&(s=_(t,O,y,1)),Math.min(a,s)}function w(e,t,r){if(Object(n["j"])(e))return Object(b["b"])();if(e.spatialReference.isGeographic&&!Object(h["a"])(e.spatialReference))return new l["a"]("tilingscheme:local-unsupported-spatial-reference","The tiling scheme spatial reference is not supported in local scenes");const i=b["a"].checkUnsupported(e);if(Object(n["k"])(i))return i;const a=x(e,r);if(a)return a;const s=e.spatialReference;return t&&!(s.equals(t)||t.isWGS84&&s.isWebMercator)?new l["a"]("tilingscheme:spatial-reference-mismatch","The tiling scheme does not match the spatial reference of the local scene"):null}function x(e,t){const r=e.lods,i=r[0].resolution*2**r[0].level,n=[i*e.size[0],i*e.size[1]],a=[e.origin.x,e.origin.y],s=Object(p["s"])(t),o=Object(p["l"])();b["a"].computeRowColExtent(s,n,a,o);const c=(o[2]-o[0])*(o[3]-o[1]);if(c>f["g"]){const t=r[0].scale*2**r[0].level;let n=Math.max((s[3]-s[1])/e.size[1],(s[2]-s[0])/e.size[0])*t/i;const a=Math.floor(Math.log(n)/Math.log(10));return n=Math.ceil(n/10**a)*10**a,new l["a"]("tilingscheme:too-many-root-tiles","Scale of level 0 of the tiling scheme (1:"+Math.floor(t).toLocaleString()+") is too large for the layer's extent. Suggested scale: 1:"+n.toLocaleString()+".",{level0Scale:t,suggestedLevel0Scale:n,requiredNumRootTiles:c,allowedNumRootTiles:f["g"]})}return null}const T=Object.freeze({__proto__:null,isInsideExtent:v,tiltToExtentEdge:j,checkIfTileInfoSupportedForViewSR:w});function S(){return!0}function E(){return 0}function A(e,t){if(Object(n["j"])(e))return Object(b["b"])();const r=e.lods.length-1,i=e.spatialReference,s=Object(h["a"])(i)||Object(a["i"])(i)||Object(a["j"])(i);if(i.isWebMercator){if(!b["a"].makeWebMercatorAuxiliarySphere(r).compatibleWith(e))return new l["a"]("tilingscheme:incompatible-global-web-mercator","The tiling scheme is not compatible with the ArcGIS Online Web Mercator tiling scheme")}else{if(!s)return new l["a"]("tilingscheme:global-unsupported-spatial-reference","The tiling scheme spatial reference is not supported in global scenes");if(!b["a"].makeGCSWithTileSize(e.spatialReference,e.size[0],r).compatibleWith(e))return e.spatialReference.isWGS84?new l["a"]("tilingscheme:incompatible-global-wgs84","The tiling scheme is not compatible with the ArcGIS Online WGS84 tiling scheme"):new l["a"]("tilingscheme:incompatible-global","The tiling scheme is not compatible with the ArcGIS Online tiling scheme")}return t&&!e.spatialReference.equals(t)?new l["a"]("tilingscheme:spatial-reference-mismatch","The tiling scheme does not match the spatial reference of the global scene"):void 0}const C=Object.freeze({__proto__:null,isInsideExtent:S,tiltToExtentEdge:E,checkIfTileInfoSupportedForViewSR:A}),R={[o["a"].Global]:C,[o["a"].Local]:T};function M(e,t){e||console.warn("Terrain: "+t)}const P=1.2,I=80/180*Math.PI,D=110/180*Math.PI;function L(e,t,r){const i=R[e.viewingMode];let a;if(i.isInsideExtent(e,t))a=Object(n["u"])(e.getElevation(t[0],t[1],t[1],e.spatialReference),0);else{if(!i.isInsideExtent(e,t,P))return 0;const r=e.getTileWithElevation(t[0],t[1],t[1],e.spatialReference);a=.5*((Object(n["k"])(r)?r.elevationBounds[0]:e.elevationBounds.min)+(Object(n["k"])(r)?r.elevationBounds[1]:e.elevationBounds.max));const s=i.tiltToExtentEdge(e,t,a);if(s>I&&s<D)return 0}const s=t[2]-a;return Math.abs(s)<r?0:s<0?-1:1}function N(e){return U(e)?{fullExtent:e.fullExtent,minScale:e.layer.minScale,maxScale:e.layer.maxScale,tilemapCache:null}:e.layer}function F(e){return"vector-tile"===(null==e?void 0:e.type)}function k(e){return"imagery-tile"===(null==e?void 0:e.type)||"wcs"===(null==e?void 0:e.type)}function U(e){return"imagery-tile-3d"===(null==e?void 0:e.type)}function z(e){return"tile-3d"===(null==e?void 0:e.type)}function B(e){return"vector-tile-3d"===(null==e?void 0:e.type)}function V(e){return"wmts-3d"===(null==e?void 0:e.type)}function G(e){return"elevation-3d"===(null==e?void 0:e.type)}function H(e){return e&&(z(e)||U(e)||G(e)||B(e)||V(e))}function q(e){var t;const r=null==e||null==(t=e.sourceLayerInfo)?void 0:t.data;return Object(n["k"])(r)&&"type"in r&&"raster-tile"===r.type}function W(e){var t;const r=null==e||null==(t=e.sourceLayerInfo)?void 0:t.data;return Object(n["k"])(r)&&"type"in r&&"vector-tile"===r.type}function $(e){var t;const r=null==e||null==(t=e.sourceLayerInfo)?void 0:t.data;return Object(n["k"])(r)&&"type"in r&&"tile-texture"===r.type}function Z(e){var t;const r=null==e||null==(t=e.sourceLayerInfo)?void 0:t.data;return r instanceof HTMLImageElement||r instanceof c["a"]||r instanceof HTMLCanvasElement||r instanceof ImageData}function X(e){return Object(n["k"])(e)&&"release"in e&&e.release(),null}function Y(e){return e.fetchTile&&!1!==e.hasOverriddenFetchTile}function J(e,t,r,i){return R[i].checkIfTileInfoSupportedForViewSR(e,r,t)}function Q(e,t,r){let i=null,a=null;if(Object(s["g"])(e)){const n=K(e,t,r);i=n.tileInfo,a=n.fullExtent}else{a=k(e)?e.getCompatibleFullExtent(t):e.fullExtent;const n=r===o["a"].Local;if(k(e))i=e.getCompatibleTileInfo(t,a,n);else if(F(e)){const r=n&&!ee(t)||te.force512VTL,a=e.tileInfo.spatialReference.isGeographic;i=r?e.tileInfo:e.tileInfo.getOrCreateCompatible(256,a?1:2)}else i=e.tileInfo}return Object(n["k"])(i)&&Object(n["k"])(a)&&null==J(i,a,t,r)?{tileInfo:i,fullExtent:a}:null}function K(e,t,r){const a=Object(s["b"])(e);if(Object(n["k"])(a)){if(!i["a"].isCollection(a))return{tileInfo:a.tileInfo,fullExtent:a.fullExtent};{const e=a.find(e=>null==J(e.tileInfo,e.fullExtent,t,r));if(e)return{tileInfo:e.tileInfo,fullExtent:e.fullExtent}}}return{tileInfo:null,fullExtent:null}}function ee(e){return e.isWGS84||e.isWebMercator||Object(a["f"])(e)||!Object(a["g"])(e)}const te={force512VTL:!1}},"8c11":function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return p}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("448d")),l=r("d386"),u=r("fcf2");const d=Object(a["b"])()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});let h=i=class extends s["a"]{clone(){return new i({href:this.href,primitive:this.primitive})}};Object(n["a"])([Object(o["b"])({type:String,json:{read:u["e"],write:u["g"]}})],h.prototype,"href",void 0),Object(n["a"])([Object(c["a"])(d)],h.prototype,"primitive",void 0),h=i=Object(n["a"])([Object(l["a"])("esri.symbols.support.ObjectSymbol3DLayerResource")],h);const p="sphere"},"8c4b":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("38a4");function n(e,t,r){var n;const l=e.byteLength/(4*t),u=new Uint32Array(e,0,l*t);let d=new Uint32Array(l);const h=null!=(n=null==r?void 0:r.minReduction)?n:0,p=(null==r?void 0:r.originalIndices)||null,f=p?p.length:0,b=(null==r?void 0:r.componentOffsets)||null;let m=0;if(b)for(let i=0;i<b.length-1;i++){const e=b[i+1]-b[i];e>m&&(m=e)}else m=l;const g=Math.floor(1.1*m)+1;(null==c||c.length<2*g)&&(c=new Uint32Array(Object(i["n"])(2*g)));for(let i=0;i<2*g;i++)c[i]=0;let y=0;const O=!!b&&!!p,v=O?f:l,_=O?new Uint32Array(f):null,j=1.96;let w=0!==h?Math.ceil(4*j*j/(h*h)*h*(1-h)):v,x=1,T=b?b[1]:v;for(let i=0;i<v;i++){if(i===w){const e=1-y/i;if(e+j*Math.sqrt(e*(1-e)/i)<h)return null;w*=2}if(i===T){for(let e=0;e<2*g;e++)c[e]=0;if(p)for(let e=b[x-1];e<b[x];e++)_[e]=d[p[e]];T=b[++x]}const e=O?p[i]:i,r=e*t,n=o(u,r,t);let s=n%g,l=y;for(;0!==c[2*s+1];){if(c[2*s]===n){const e=c[2*s+1]-1;if(a(u,r,e*t,t)){l=d[e];break}}s++,s>=g&&(s-=g)}l===y&&(c[2*s]=n,c[2*s+1]=e+1,y++),d[e]=l}if(0!==h&&1-y/l<h)return null;if(O){for(let e=b[x-1];e<_.length;e++)_[e]=d[p[e]];d=_}const S=new Uint32Array(t*y);y=0;for(let i=0;i<v;i++)d[i]===y&&(s(u,(O?p[i]:i)*t,S,y*t,t),y++);if(p&&!O){const e=new Uint32Array(f);for(let t=0;t<e.length;t++)e[t]=d[p[t]];d=e}return{buffer:S.buffer,indices:d,uniqueCount:y}}function a(e,t,r,i){for(let n=0;n<i;n++)if(e[t+n]!==e[r+n])return!1;return!0}function s(e,t,r,i,n){for(let a=0;a<n;a++)r[i+a]=e[t+a]}function o(e,t,r){let i=0;for(let n=0;n<r;n++)i=e[t+n]+i|0,i=i+(i<<11)+(i>>>2)|0;return i>>>0}let c=null},"8c71":function(e,t,r){"use strict";function i(){const e=new Float32Array(9);return e[0]=1,e[4]=1,e[8]=1,e}function n(e){const t=new Float32Array(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function a(e,t,r,i,n,a,s,o,c){const l=new Float32Array(9);return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=a,l[6]=s,l[7]=o,l[8]=c,l}function s(e,t){return new Float32Array(e,t,9)}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return a}));Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s})},"8ca7":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("b2b2");class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(Object(i["c"])(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(Object(i["c"])(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach(t=>{e(t)||this._items.delete(t)}),this}}},"8d60":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i=r("a4ee"),n=r("e06a"),a=r("4856"),s=r("1fd7"),o=r("d3ac"),c=r("6a0ed"),l=r("b2b2"),u=r("f2e0"),d=r("59b2"),h=(r("b50f"),r("c120"),r("cea0"),r("d386")),p=r("a9ab");function f(e){if(!e)return null;const t={};for(const r in e){const i=Object(p["a"])(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}function b(e){if(!Object(l["k"])(e))return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let m=class extends(Object(o["a"])(c["a"])){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:Object(u["b"])(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&Object(l["k"])(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:Object(l["k"])(this.geometry)?this.geometry.toJSON():null,symbol:Object(l["k"])(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){Object(l["k"])(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,r,i){if(!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}};Object(i["a"])([Object(d["b"])({value:null,json:{read:f}})],m.prototype,"aggregateGeometries",null),Object(i["a"])([Object(d["b"])({value:null})],m.prototype,"attributes",null),Object(i["a"])([Object(d["b"])({value:null,types:n["a"],json:{read:p["a"]}})],m.prototype,"geometry",null),Object(i["a"])([Object(d["b"])({type:Boolean})],m.prototype,"isAggregate",void 0),Object(i["a"])([Object(d["b"])({clonable:"reference"})],m.prototype,"layer",void 0),Object(i["a"])([Object(d["b"])({type:a["a"]})],m.prototype,"popupTemplate",void 0),Object(i["a"])([Object(d["b"])({clonable:"reference"})],m.prototype,"sourceLayer",void 0),Object(i["a"])([Object(d["b"])({value:null,types:s["e"]})],m.prototype,"symbol",null),Object(i["a"])([Object(d["b"])({type:Boolean,value:!0})],m.prototype,"visible",null),m=Object(i["a"])([Object(h["a"])("esri.Graphic")],m),function(e){e.generateUID=u["b"]}(m||(m={}));const g=m},"8d66":function(e,t,r){"use strict";r.d(t,"a",(function(){return T}));var i=r("a4ee"),n=r("b2b2"),a=r("a915"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0")),c=r("448d"),l=r("d386"),u=r("9ef0"),d=r("d3ac"),h=r("6a0ed"),p=r("ea87");let f=class extends(Object(d["a"])(h["a"])){constructor(e){super(e),this.type="style",this.placement="begin-end",this.style="arrow",this.color=null}equals(e){return Object(n["k"])(e)&&e.placement===this.placement&&e.style===this.style&&(Object(n["j"])(this.color)&&Object(n["j"])(e.color)||Object(n["k"])(this.color)&&Object(n["k"])(e.color)&&this.color.toJSON()===e.color.toJSON())}};Object(i["a"])([Object(s["b"])({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],f.prototype,"type",void 0),Object(i["a"])([Object(s["b"])({type:p["a"],json:{default:"begin-end",write:!0}})],f.prototype,"placement",void 0),Object(i["a"])([Object(s["b"])({type:p["b"],json:{default:"arrow",write:!0}})],f.prototype,"style",void 0),Object(i["a"])([Object(s["b"])({type:u["a"],json:{type:[o["a"]],default:null,write:!0}})],f.prototype,"color",void 0),f=Object(i["a"])([Object(l["a"])("esri.symbols.LineStyleMarker3D")],f);const b=f;var m,g=r("961d"),y=r("90dc"),O=r("cc88"),v=r("08f6"),_=r("5c00"),j=r("a3af"),w=r("af3d");let x=m=class extends g["a"]{constructor(e){super(e),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.size=Object(a["h"])(1),this.pattern=null,this.marker=null}clone(){const e={enabled:this.enabled,material:Object(n["k"])(this.material)?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,pattern:Object(n["k"])(this.pattern)?this.pattern.clone():null,marker:Object(n["k"])(this.marker)?this.marker.clone():null};return new m(e)}static fromSimpleLineSymbol(e){var t,r,i;const n={enabled:!0,size:null!=(t=e.width)?t:Object(a["h"])(1),cap:e.cap||"butt",join:e.join||"miter",pattern:e.style&&"inside-frame"!==e.style?new y["a"]({style:e.style}):null,material:new j["a"]({color:(e.color||v["c"]).clone()}),marker:e.marker?new b({placement:e.marker.placement,style:e.marker.style,color:null!=(r=null==(i=e.marker.color)?void 0:i.clone())?r:null}):null};return new m(n)}};Object(i["a"])([Object(s["b"])({type:j["a"],json:{write:!0}})],x.prototype,"material",void 0),Object(i["a"])([Object(c["a"])({Line:"line"},{readOnly:!0})],x.prototype,"type",void 0),Object(i["a"])([Object(s["b"])({type:w["b"],json:{write:!0,default:"miter"}})],x.prototype,"join",void 0),Object(i["a"])([Object(s["b"])({type:w["a"],json:{write:!0,default:"butt"}})],x.prototype,"cap",void 0),Object(i["a"])([Object(s["b"])(_["b"])],x.prototype,"size",void 0),Object(i["a"])([Object(s["b"])(O["a"])],x.prototype,"pattern",void 0),Object(i["a"])([Object(s["b"])({types:{key:"type",base:b,typeMap:{style:b}},json:{write:!0}})],x.prototype,"marker",void 0),x=m=Object(i["a"])([Object(l["a"])("esri.symbols.LineSymbol3DLayer")],x);const T=x},"8e17":function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return O}));var i=r("a4ee"),n=r("e92d"),a=r("f4cc"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("2c4f"),l=(r("ce50"),r("0646"),r("9efb"));const u=new c["a"],d=new WeakMap;function h(e){f(e)&&u.push(e)}function p(e){f(e)&&u.includes(e)&&u.remove(e)}function f(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function b(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:b(t,e%t):0}let m=0,g=0;function y(){const e=Date.now();for(const r of u)if(r.refreshInterval){var t;e-(null!=(t=d.get(r))?t:0)+5>=6e4*r.refreshInterval&&(d.set(r,e),r.refresh(e))}}Object(l["a"])(()=>{const e=Date.now();let t=0;for(const r of u)t=b(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?d.get(r)||d.set(r,e):d.delete(r);if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(y,g)}});function O(e){return e&&"object"==typeof e&&"refreshTimestamp"in e&&"refresh"in e}const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=Object(a["i"])(()=>this.hasDataChanged()),this.when().then(()=>{h(this)},()=>{})}destroy(){p(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){Object(a["l"])(this._debounceHasDataChanged()).then(t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})},e=>{n["a"].getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})})}async hasDataChanged(){return!0}};return Object(i["a"])([Object(s["b"])({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),Object(i["a"])([Object(s["b"])({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),Object(i["a"])([Object(s["b"])()],t.prototype,"refreshParameters",null),t=Object(i["a"])([Object(o["a"])("esri.layers.mixins.RefreshableLayer")],t),t}},"8e37":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));r("c120");var i=r("b2b2"),n=r("1956"),a=r("cc15"),s=r("d17d"),o=r("d1bc");const c=4294967295;class l{constructor(e,t,r,i,c=new Map){this._context=e,this._locations=i,this._uniformBlockBindings=c,this._refCount=1,this._compiled=!1,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},e||console.error("RenderingContext isn't initialized!"),0===t.length&&console.error("Shaders source should not be empty!"),this._context.type===a["a"].WEBGL2&&(t=Object(o["a"])(t,s["u"].VERTEX_SHADER),r=Object(o["a"])(r,s["u"].FRAGMENT_SHADER)),this._vShader=d(this._context,s["u"].VERTEX_SHADER,t),this._fShader=d(this._context,s["u"].FRAGMENT_SHADER,r),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(s["t"].Shader,this),Object(n["c"])()&&(this.vertexShader=t,this.fragmentShader=r)}get glName(){if(Object(i["k"])(this._glName))return this._glName;if(Object(i["j"])(this._vShader))return null;const e=this._context.gl,t=e.createProgram();if(e.attachShader(t,this._vShader),e.attachShader(t,this._fShader),this._locations.forEach((r,i)=>e.bindAttribLocation(t,r,i)),e.linkProgram(t),Object(n["c"])()&&!e.getProgramParameter(t,e.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${e.getProgramParameter(t,e.VALIDATE_STATUS)}, gl error ${e.getError()}, vertex: ${e.getShaderParameter(this._vShader,e.COMPILE_STATUS)}, fragment: ${e.getShaderParameter(this._fShader,e.COMPILE_STATUS)}, info log: ${e.getProgramInfoLog(t)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`),this._context.type===a["a"].WEBGL2){const r=e;for(const[e,i]of this._uniformBlockBindings){const n=r.getUniformBlockIndex(t,e);n<c&&r.uniformBlockBinding(t,n,i)}}return this._glName=t,this._context.instanceCounter.increment(s["t"].Program,this),t}get hasGLName(){return Object(i["k"])(this._glName)}get isCompiled(){if(this._compiled)return!0;const e=this._context.gl.getExtension("KHR_parallel_shader_compile");return null==e?(this._compiled=!0,!0):(this._compiled=!!this._context.gl.getProgramParameter(this.glName,e.COMPLETION_STATUS_KHR),this._compiled)}dispose(){if(--this._refCount>0)return;const e=this._context.gl;this._vShader&&(e.deleteShader(this._vShader),this._vShader=null,this._context.instanceCounter.decrement(s["t"].Shader,this)),this._fShader&&(e.deleteShader(this._fShader),this._fShader=null),this._glName&&(e.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(s["t"].Program,this))}ref(){++this._refCount}_getUniformLocation(e){return void 0===this._nameToUniformLocation[e]&&(this._nameToUniformLocation[e]=this._context.gl.getUniformLocation(this.glName,e)),this._nameToUniformLocation[e]}hasUniform(e){return null!==this._getUniformLocation(e)}setUniform1i(e,t){const r=this._nameToUniform1[e];void 0!==r&&t===r||(this._context.gl.uniform1i(this._getUniformLocation(e),t),this._nameToUniform1[e]=t)}setUniform1iv(e,t){const r=this._nameToUniform1v[e];u(r,t)&&(this._context.gl.uniform1iv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform1v[e]=Array.from(t):f(t,r))}setUniform2iv(e,t){const r=this._nameToUniform2[e];u(r,t)&&(this._context.gl.uniform2iv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform2[e]=Array.from(t):f(t,r))}setUniform3iv(e,t){const r=this._nameToUniform3[e];u(r,t)&&(this._context.gl.uniform3iv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform3[e]=Array.from(t):f(t,r))}setUniform4iv(e,t){const r=this._nameToUniform4[e];u(r,t)&&(this._context.gl.uniform4iv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform4[e]=Array.from(t):f(t,r))}setUniform1f(e,t){const r=this._nameToUniform1[e];void 0!==r&&t===r||(this._context.gl.uniform1f(this._getUniformLocation(e),t),this._nameToUniform1[e]=t)}setUniform1fv(e,t){const r=this._nameToUniform1v[e];u(r,t)&&(this._context.gl.uniform1fv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform1v[e]=Array.from(t):f(t,r))}setUniform2f(e,t,r){const i=this._nameToUniform2[e];void 0!==i&&t===i[0]&&r===i[1]||(this._context.gl.uniform2f(this._getUniformLocation(e),t,r),void 0===i?this._nameToUniform2[e]=[t,r]:(i[0]=t,i[1]=r))}setUniform2fv(e,t){const r=this._nameToUniform2[e];u(r,t)&&(this._context.gl.uniform2fv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform2[e]=Array.from(t):f(t,r))}setUniform3f(e,t,r,i){const n=this._nameToUniform3[e];void 0!==n&&t===n[0]&&r===n[1]&&i===n[2]||(this._context.gl.uniform3f(this._getUniformLocation(e),t,r,i),void 0===n?this._nameToUniform3[e]=[t,r,i]:(n[0]=t,n[1]=r,n[2]=i))}setUniform3fv(e,t){const r=this._nameToUniform3[e];u(r,t)&&(this._context.gl.uniform3fv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform3[e]=Array.from(t):f(t,r))}setUniform4f(e,t,r,i,n){const a=this._nameToUniform4[e];void 0!==a&&t===a[0]&&r===a[1]&&i===a[2]&&n===a[3]||(this._context.gl.uniform4f(this._getUniformLocation(e),t,r,i,n),void 0===a?this._nameToUniform4[e]=[t,r,i,n]:(a[0]=t,a[1]=r,a[2]=i,a[3]=n))}setUniform4fv(e,t){const r=this._nameToUniform4[e];u(r,t)&&(this._context.gl.uniform4fv(this._getUniformLocation(e),t),void 0===r?this._nameToUniform4[e]=Array.from(t):f(t,r))}setUniformMatrix3fv(e,t,r=!1){const i=this._nameToUniformMatrix3[e];b(i,t)&&(this._context.gl.uniformMatrix3fv(this._getUniformLocation(e),r,t),void 0===i?this._nameToUniformMatrix3[e]=Array.from(t):f(t,i))}setUniformMatrix4fv(e,t,r=!1){const i=this._nameToUniformMatrix4[e];m(i,t)&&(this._context.gl.uniformMatrix4fv(this._getUniformLocation(e),r,t),void 0===i?this._nameToUniformMatrix4[e]=Array.from(t):f(t,i))}stop(){}}function u(e,t){if(Object(i["j"])(e)||e.length!==t.length)return!0;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!0;return!1}function d(e,t,r){const i=e.gl,o=i.createShader(t);return i.shaderSource(o,r),i.compileShader(o),Object(n["c"])()&&!i.getShaderParameter(o,i.COMPILE_STATUS)&&(console.error("Compile error in ".concat(t===s["u"].VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(i.getShaderInfoLog(o)),console.error(h(r)),e.type===a["a"].WEBGL2&&(console.log("Shader source before transpilation:"),console.log(r))),o}function h(e){let t=2;return e.replace(/\n/g,()=>"\n"+p(t++)+":")}function p(e){return e>=1e3?e.toString():(" "+e).slice(-3)}function f(e,t){for(let r=0;r<e.length;++r)t[r]=e[r]}function b(e,t){return!!Object(i["j"])(e)||(9!==e.length?u(e,t):9!==e.length||e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]||e[6]!==t[6]||e[7]!==t[7]||e[8]!==t[8])}function m(e,t){return!!Object(i["j"])(e)||(16!==e.length?u(e,t):16!==e.length||e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]||e[6]!==t[6]||e[7]!==t[7]||e[8]!==t[8]||e[9]!==t[9]||e[10]!==t[10]||e[11]!==t[11]||e[12]!==t[12]||e[13]!==t[13]||e[14]!==t[14]||e[15]!==t[15])}},"8e6f":function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("b33e"),n=r("55f0");class a extends i["a"]{constructor(e,t,r){super(e,t,r)}value(e){const t=super.value(e);return Math.exp(t)}valueDelta(e,t){const r=super.value(e),i=super.value(e+t)-r;return Math.exp(i)}}class s extends n["a"]{constructor(e=2.5,t=.01,r=.95,i=12){super(e,t,r,i)}add(e,t){super.add(Math.log(e),t)}createMomentum(e,t,r){return new a(e,t,r)}}},"8e97":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return l}));var i=r("d791"),n=r("970c");function a(e,t,r){e.setUniform3f("cameraPosition",r[3]-t[0],r[7]-t[1],r[11]-t[2])}function s(e,t){e.setUniformMatrix4fv("proj",t)}function o(e,t,r){Object(i["k"])(u,r,t),e.setUniform3fv("localOrigin",t),e.setUniformMatrix4fv("view",u)}function c(e,t){o(e,t.origin,t.camera.viewMatrix)}function l(e,t){e.setUniform4fv("viewport",t.camera.fullViewport)}const u=Object(n["a"])()},"8eed":function(e,t,r){"use strict";function i(){const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16);return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}r.d(t,"a",(function(){return i}))},"8f07":function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("9ef0"),s=r("6a0ed"),o=r("7ffa"),c=r("59b2"),l=(r("cea0"),r("d386")),u=r("5c00");let d=i=class extends s["a"]{constructor(){super(...arguments),this.color=new a["a"]("white")}clone(){return new i({color:Object(o["a"])(this.color)})}};Object(n["a"])([Object(c["b"])(u["a"])],d.prototype,"color",void 0),d=i=Object(n["a"])([Object(l["a"])("esri.symbols.callouts.LineCallout3DBorder")],d);const h=d;Object.freeze({__proto__:null,get LineCallout3DBorder(){return d},default:h})},"901f":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("4637");function n(e,t){if(!(this instanceof n))return new n(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this.toBBox=t:this._initFormat(t)),this.clear()}function a(e,t,r){if(!r)return t.indexOf(e);for(var i=0;i<t.length;i++)if(r(e,t[i]))return i;return-1}function s(e,t){o(e,0,e.children.length,t,e)}function o(e,t,r,i,n){n||(n=g(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var a,s=t;s<r;s++)a=e.children[s],c(n,e.leaf?i(a):a);return n}function c(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){var r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),a=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,a-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function m(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function g(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(e,t,r,n,a){for(var s,o=[t,r];o.length;)(r=o.pop())-(t=o.pop())<=n||(s=t+Math.ceil((r-t)/n/2)*n,Object(i["a"])(e,s,t,r,a),o.push(t,s,s,r))}n.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],i=this.toBBox;if(!m(e,t))return r;for(var n,a,s,o,c=[];t;){for(n=0,a=t.children.length;n<a;n++)s=t.children[n],m(e,o=t.leaf?i(s):s)&&(t.leaf?r.push(s):b(e,o)?this._all(s,r):c.push(s));t=c.pop()}return r},collides:function(e){var t=this.data,r=this.toBBox;if(!m(e,t))return!1;for(var i,n,a,s,o=[];t;){for(i=0,n=t.children.length;i<n;i++)if(a=t.children[i],m(e,s=t.leaf?r(a):a)){if(t.leaf||b(e,s))return!0;o.push(a)}t=o.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}var i=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(e,t){if(!e)return this;for(var r,i,n,s,o=this.data,c=this.toBBox(e),l=[],u=[];o||l.length;){if(o||(o=l.pop(),i=l[l.length-1],r=u.pop(),s=!0),o.leaf&&-1!==(n=a(e,o.children,t)))return o.children.splice(n,1),l.push(o),this._condense(l),this;s||o.leaf||!b(o,c)?i?(r++,o=i.children[r],s=!1):o=null:(l.push(o),u.push(r),r=0,i=o,o=o.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t},_build:function(e,t,r,i){var n,a=r-t+1,o=this._maxEntries;if(a<=o)return s(n=g(e.slice(t,r+1)),this.toBBox),n;i||(i=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,i-1))),(n=g([])).leaf=!1,n.height=i;var c,l,u,d,h=Math.ceil(a/o),p=h*Math.ceil(Math.sqrt(o));for(y(e,t,r,p,this.compareMinX),c=t;c<=r;c+=p)for(y(e,c,u=Math.min(c+p-1,r),h,this.compareMinY),l=c;l<=u;l+=h)d=Math.min(l+h-1,u),n.children.push(this._build(e,l,d,i-1));return s(n,this.toBBox),n},_chooseSubtree:function(e,t,r,i){for(var n,a,s,o,c,l,u,h;i.push(t),!t.leaf&&i.length-1!==r;){for(u=h=1/0,n=0,a=t.children.length;n<a;n++)c=d(s=t.children[n]),(l=p(e,s)-c)<h?(h=l,u=c<u?c:u,o=s):l===h&&c<u&&(u=c,o=s);t=o||t.children[0]}return t},_insert:function(e,t,r){var i=this.toBBox,n=r?e:i(e),a=[],s=this._chooseSubtree(n,this.data,t,a);for(s.children.push(e),c(s,n);t>=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(n,a,t)},_split:function(e,t){var r=e[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);var a=this._chooseSplitIndex(r,n,i),o=g(r.children.splice(a,r.children.length-a));o.height=r.height,o.leaf=r.leaf,s(r,this.toBBox),s(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(r,o)},_splitRoot:function(e,t){this.data=g([e,t]),this.data.height=e.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var i,n,a,s,c,l,u,h;for(l=u=1/0,i=t;i<=r-t;i++)s=f(n=o(e,0,i,this.toBBox),a=o(e,i,r,this.toBBox)),c=d(n)+d(a),s<l?(l=s,h=i,u=c<u?c:u):s===l&&c<u&&(u=c,h=i);return h},_chooseSplitAxis:function(e,t,r){var i=e.leaf?this.compareMinX:l,n=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)},_allDistMargin:function(e,t,r,i){e.children.sort(i);var n,a,s=this.toBBox,l=o(e,0,t,s),u=o(e,r-t,r,s),d=h(l)+h(u);for(n=t;n<r-t;n++)a=e.children[n],c(l,e.leaf?s(a):a),d+=h(l);for(n=r-t-1;n>=t;n--)a=e.children[n],c(u,e.leaf?s(a):a),d+=h(u);return d},_adjustParentBBoxes:function(e,t,r){for(var i=r;i>=0;i--)c(t[i],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():s(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},9067:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("b2b2"),n=r("f9d0"),a=r("8e37");class s{constructor(e){this._rctx=e,this._store=new n["a"]}dispose(){this._store.forEach(e=>e.forEach(e=>e.dispose())),this._store.clear()}acquire(e,t,r,n){const s=this._store.get(e,t);if(Object(i["k"])(s))return s.ref(),s;const o=new a["a"](this._rctx,e,t,r,n);return o.ref(),this._store.set(e,t,o),o}get test(){let e=0;return this._store.forEach(t=>t.forEach(t=>e+=t.hasGLName?2:1)),{cachedWebGLObjects:e}}}},9096:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var i=r("a4ee"),n=r("fc29"),a=r("af40"),s=r("59b2"),o=r("d386"),c=r("d347");const l=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new a["a"]}get updatingHandles(){return this._get("updatingHandles")||new c["a"]}};return Object(i["a"])([Object(s["b"])({readOnly:!0})],t.prototype,"handles",null),Object(i["a"])([Object(s["b"])({readOnly:!0})],t.prototype,"updatingHandles",null),t=Object(i["a"])([Object(o["a"])("esri.core.HandleOwner")],t),t};let u=class extends(l(n["a"])){};u=Object(i["a"])([Object(o["a"])("esri.core.HandleOwner")],u)},9098:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("a9e6"),n=r("436b");class a extends i["a"]{constructor(e,t,r,i,n){super(e),this._lazyPath=[],this._hasZ=!1,this._hasM=!1,this._hasZ=r,this._hasM=i,this._spRef=t,this._cacheId=n}get(e){if(void 0===this._lazyPath[e]){const t=this._elements[e];if(void 0===t)return;this._lazyPath[e]=new n["a"](t,this._spRef,this._hasZ,this._hasM,this._cacheId,e)}return this._lazyPath[e]}equalityTest(e){return e===this||null!==e&&e instanceof a!=0&&e.getUniqueHash()===this.getUniqueHash()}getUniqueHash(){return this._cacheId.toString()}}},"90dc":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("fa8a"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("448d")),o=r("d386"),c=r("880c");const l=["dash","dash-dot","dot","long-dash","long-dash-dot","long-dash-dot-dot","none","short-dash","short-dash-dot","short-dash-dot-dot","short-dot","solid"];var u;const d=Object(n["b"])()({dash:"dash","dash-dot":"dash-dot","dash-dot-dot":"long-dash-dot-dot",dot:"dot","long-dash":"long-dash","long-dash-dot":"long-dash-dot",null:"none","short-dash":"short-dash","short-dash-dot":"short-dash-dot","short-dash-dot-dot":"short-dash-dot-dot","short-dot":"short-dot",solid:"solid"});let h=u=class extends c["a"]{constructor(e){super(e),this.type="style",this.style="solid"}clone(){const e={style:this.style};return new u(e)}};Object(i["a"])([Object(a["b"])({type:["style"]})],h.prototype,"type",void 0),Object(i["a"])([Object(s["a"])(d),Object(a["b"])({type:l})],h.prototype,"style",void 0),h=u=Object(i["a"])([Object(o["a"])("esri.symbols.patterns.LineStylePattern3D")],h);const p=h},9180:function(e,t,r){"use strict";r.d(t,"a",(function(){return F})),r.d(t,"b",(function(){return N})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return O})),r.d(t,"e",(function(){return v})),r.d(t,"f",(function(){return c})),r.d(t,"g",(function(){return A})),r.d(t,"h",(function(){return _})),r.d(t,"i",(function(){return x})),r.d(t,"j",(function(){return S})),r.d(t,"k",(function(){return l})),r.d(t,"l",(function(){return o})),r.d(t,"m",(function(){return R})),r.d(t,"n",(function(){return P})),r.d(t,"o",(function(){return L})),r.d(t,"p",(function(){return f})),r.d(t,"q",(function(){return p})),r.d(t,"r",(function(){return b})),r.d(t,"s",(function(){return d})),r.d(t,"t",(function(){return u})),r.d(t,"u",(function(){return y})),r.d(t,"v",(function(){return C})),r.d(t,"w",(function(){return E})),r.d(t,"x",(function(){return w})),r.d(t,"y",(function(){return j})),r.d(t,"z",(function(){return D})),r.d(t,"A",(function(){return M})),r.d(t,"B",(function(){return h})),r.d(t,"C",(function(){return g}));r("c120");var i=r("38a4"),n=r("b2b2"),a=r("3af1");function s(e){return e}function o(e=k){return s([e[0],e[1],e[2],e[3]])}function c(e){return s([e[0],e[1],e[2],e[3]])}function l(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function u(e,t,r,i,n=o()){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function d(e,t=o()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function h(e,t){return new a["a"]({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function p(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])}function f(e,t,r){if(Object(n["j"])(t))l(r,e);else if("length"in t)I(t)?(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[0]),r[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":r[0]=Math.min(e[0],t.xmin),r[1]=Math.min(e[1],t.ymin),r[2]=Math.max(e[2],t.xmax),r[3]=Math.max(e[3],t.ymax);break;case"point":r[0]=Math.min(e[0],t.x),r[1]=Math.min(e[1],t.y),r[2]=Math.max(e[2],t.x),r[3]=Math.max(e[3],t.y)}}function b(e,t,r=e){const i=t.length;let n=e[0],a=e[1],s=e[2],o=e[3];for(let c=0;c<i;c++){const e=t[c];n=Math.min(n,e[0]),a=Math.min(a,e[1]),s=Math.max(s,e[0]),o=Math.max(o,e[1])}return r[0]=n,r[1]=a,r[2]=s,r[3]=o,r}function m(e){for(let t=0;t<4;t++)if(!isFinite(e[t]))return!1;return!0}function g(e){return Object(n["j"])(e)||e[0]>=e[2]?0:e[2]-e[0]}function y(e){return e[1]>=e[3]?0:e[3]-e[1]}function O(e){return g(e)*y(e)}function v(e,t=[0,0]){return t[0]=(e[0]+e[2])/2,t[1]=(e[1]+e[3])/2,t}function _(e,t){return T(e,t[0],t[1])}function j(e,t){const r=t[3],i=.5*(e[0]+e[2]),n=Math.abs(t[0]-i),a=.5*(e[2]-e[0]);if(n>r+a)return!1;const s=.5*(e[1]+e[3]),o=.5*(e[3]-e[1]),c=Math.abs(t[1]-s);if(c>r+o)return!1;if(n<a||c<o)return!0;const l=n-a,u=c-o;return l*l+u*u<=r*r}function w(e,t,r){const i=e[0],n=e[1],a=e[2],s=e[3],{x:o,y:c}=t,{x:l,y:u}=r,d=(e,t)=>(u-c)*e+(o-l)*t+(l*c-o*u)<0,h=d(i,s),p=d(a,s),f=d(a,n),b=d(i,n);return!(h===p&&p===f&&f===b&&b===h||o<i&&l<i||o>a&&l>a||c>s&&u>s||c<n&&u<n)}function x(e,t){return T(e,t.x,t.y)}function T(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function S(e,t,r){return t[0]>=e[0]-r&&t[1]>=e[1]-r&&t[0]<=e[2]+r&&t[1]<=e[3]+r}function E(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function A(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function C(e,t,r){if(Object(n["j"])(t))return l(r,e);const a=t[0],s=t[1],o=t[2],c=t[3];return r[0]=Object(i["f"])(e[0],a,o),r[1]=Object(i["f"])(e[1],s,c),r[2]=Object(i["f"])(e[2],a,o),r[3]=Object(i["f"])(e[3],s,c),r}function R(e,t){const r=(e[0]+e[2])/2,i=(e[1]+e[3])/2,n=Math.max(Math.abs(t[0]-r)-g(e)/2,0),a=Math.max(Math.abs(t[1]-i)-y(e)/2,0);return Math.sqrt(n*n+a*a)}function M(e,t,r,i=e){return i[0]=e[0]+t,i[1]=e[1]+r,i[2]=e[2]+t,i[3]=e[3]+r,i}function P(e){return e?l(e,F):o(F)}function I(e){return null!=e&&4===e.length}function D(e){return!(0!==g(e)&&isFinite(e[0])||0!==y(e)&&isFinite(e[1]))}function L(e,t){return I(e)&&I(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const N=s([-1/0,-1/0,1/0,1/0]),F=s([1/0,1/0,-1/0,-1/0]),k=s([0,0,0,0]);s([0,0,1,1])},"91b0":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("cc15"),n=r("d17d");class a{constructor(e,t){this._context=e,this._desc=t,this.type="renderbuffer",this._context.instanceCounter.increment(n["t"].Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:a,height:s,internalFormat:o,multisampled:c}=t;if(c){if(this._context.type!==i["a"].WEBGL2)throw new Error("Multisampled renderbuffers are not supported in WebGL1!");r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,a,s)}else r.renderbufferStorage(r.RENDERBUFFER,o,a,s)}get descriptor(){return this._desc}get samples(){const e=this._desc.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}resize(e,t){const r=this._desc;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(n["t"].Renderbuffer,this),this._context=null)}}},"91b0c":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("ecc1");let c=i=class extends o["a"]{constructor(e){super(e),this.type="selection"}clone(){return new i}};Object(n["a"])([Object(a["b"])({type:["selection"]})],c.prototype,"type",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.layers.support.FeatureReductionSelection")],c);const l=c},9209:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("fc29"),a=r("e041"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=class extends n["a"]{constructor(...e){super(...e),this.requestOptions=null,this.url=null}normalizeCtorArgs(e,t){return"string"!=typeof e?e:{url:e,...t}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(e){return e?Object(a["M"])(e):null}_encode(e,t,r){const i={};for(const n in e){if("declaredClass"===n)continue;const a=e[n];if(null!=a&&"function"!=typeof a)if(Array.isArray(a)){i[n]=[];for(let e=0;e<a.length;e++)i[n][e]=this._encode(a[e])}else if("object"==typeof a)if(a.toJSON){const e=a.toJSON(r&&r[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?a:JSON.stringify(a);else i[n]=a}return i}};Object(i["a"])([Object(s["b"])({readOnly:!0})],c.prototype,"parsedUrl",null),Object(i["a"])([Object(s["b"])()],c.prototype,"requestOptions",void 0),Object(i["a"])([Object(s["b"])({type:String})],c.prototype,"url",void 0),c=Object(i["a"])([Object(o["a"])("esri.tasks.Task")],c);const l=c},9250:function(e,t,r){"use strict";r.d(t,"a",(function(){return m})),r.d(t,"b",(function(){return y})),r.d(t,"c",(function(){return _}));var i=r("b2b2"),n=r("d791"),a=r("afe1"),s=r("e431"),o=r("0b2d"),c=r("7577"),l=r("0fc4"),u=r("d18f"),d=r("3c9c"),h=r("1942"),p=r("a978"),f=r("89bf"),b=r("b623");const m=1e-5;class g{constructor(e){this.options=new h["a"],this._results=new O,this.transform=new f["a"],this.tolerance=m,this.verticalOffset=null,this._ray=Object(u["c"])(),this._rayEnd=Object(o["f"])(),this._rayBeginTransformed=Object(o["f"])(),this._rayEndTransformed=Object(o["f"])(),this.viewingMode=null==e?d["a"].Global:e}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(e,t,r){this.resetWithRay(Object(u["f"])(e,t,this._ray),r)}resetWithRay(e,t){this.camera=t,e!==this._ray&&Object(u["b"])(e,this._ray),0!==this.options.verticalOffset?this.viewingMode===d["a"].Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,Object(s["h"])(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(e=null,t,r,n,a){this.point=t,this.filterPredicate=n,this.tolerance=null==r?m:r;const s=Object(f["d"])(this.verticalOffset);if(Object(i["k"])(e)&&e.length>0){const t=a?e=>{a(e)&&this.intersectObject(e)}:e=>{this.intersectObject(e)};for(const r of e){const e=r.getSpatialQueryAccelerator&&r.getSpatialQueryAccelerator();Object(i["k"])(e)?(Object(i["k"])(s)?e.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,t,s):e.forEachAlongRay(this._ray.origin,this._ray.direction,t),this.options.selectionMode&&this.options.hud&&e.forEachDegenerateObject(t)):r.objects.forAll(e=>t(e))}}this.sortResults()}intersectObject(e){const t=e.geometryRecords;if(!t)return;const r=e.transformation,n=Object(f["d"])(this.verticalOffset);for(const o of t){const{geometry:t,material:c,instanceParameters:l}=o;if(Object(b["d"])(l))continue;const u=t.id;this.transform.setAndInvalidateLazyTransforms(r,o.getShaderTransformation()),Object(s["s"])(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),Object(s["s"])(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const d=this.transform.transform;Object(i["k"])(n)&&(n.objectTransform=this.transform),c.intersect(t,l,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(t,r,n,s,o,c)=>{if(t>=0){if(Object(i["k"])(this.filterPredicate)&&!this.filterPredicate(this._ray.origin,this._rayEnd,t))return;if(s){if(null==this._results.hud.dist||t<this._results.hud.dist){const i={object:e,geometryId:u,triangleNr:n,center:c};this._results.hud.set(h["b"].HUD,i,t,r,a["a"],o)}return}const l=i=>i.set(h["b"].OBJECT,{object:e,geometryId:u,triangleNr:n},t,r,d,o);if((null==this._results.min.drapedLayerOrder||o>=this._results.min.drapedLayerOrder)&&(null==this._results.min.dist||t<this._results.min.dist)&&l(this._results.min),this.options.store!==h["c"].MIN&&(null==this._results.max.drapedLayerOrder||o<this._results.max.drapedLayerOrder)&&(null==this._results.max.dist||t>this._results.max.dist)&&l(this._results.max),this.options.store===h["c"].ALL){const i=_(this._ray);i.set(h["b"].OBJECT,{object:e,geometryId:u,triangleNr:n},t,r,d),this._results.all.push(i)}}},o.shaderTransformation)}}sortResults(){this._results.all.sort((e,t)=>e.dist!==t.dist?Object(i["u"])(e.dist,0)-Object(i["u"])(t.dist,0):e.drapedLayerOrder!==t.drapedLayerOrder?Object(i["u"])(e.drapedLayerOrder,Number.MAX_VALUE)-Object(i["u"])(t.drapedLayerOrder,Number.MAX_VALUE):Object(i["u"])(t.drapedLayerGraphicOrder,Number.MIN_VALUE)-Object(i["u"])(e.drapedLayerGraphicOrder,Number.MIN_VALUE))}}function y(e){return new g(e)}class O{constructor(){this._min=new v(Object(u["c"])()),this._max=new v(Object(u["c"])()),this._hud=new v(Object(u["c"])()),this._ground=new v(Object(u["c"])())}get min(){return this._min}get max(){return this._max}get hud(){return this._hud}get ground(){return this._ground}init(e){this._min.init(e),this._max.init(e),this._hud.init(e),this._ground.init(e),this.all=[]}}class v{constructor(e){this.intersector=h["b"].OBJECT,this.normal=Object(o["f"])(),this.transformation=Object(a["d"])(),this._ray=Object(u["c"])(),this.init(e)}get ray(){return this._ray}get distanceInRenderSpace(){return Object(i["k"])(this.dist)?(Object(s["g"])(j,this.ray.direction,this.dist),Object(s["r"])(j)):null}getIntersectionPoint(e){return!!Object(p["c"])(this)&&(Object(s["g"])(j,this.ray.direction,this.dist),Object(s["h"])(e,this.ray.origin,j),!0)}getTransformedNormal(e){return Object(s["m"])(w,this.normal),w[3]=0,Object(c["m"])(w,w,this.transformation),Object(s["m"])(e,w),Object(s["t"])(e,e)}init(e){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=h["b"].OBJECT,Object(u["b"])(e,this._ray)}set(e,t,r,c,l,u,d){this.intersector=e,this.dist=r,Object(s["m"])(this.normal,Object(i["u"])(c,o["b"])),Object(n["d"])(this.transformation,Object(i["u"])(l,a["a"])),this.target=t,this.drapedLayerOrder=u,this.drapedLayerGraphicOrder=d}copy(e){Object(u["b"])(e.ray,this._ray),this.intersector=e.intersector,this.dist=e.dist,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.drapedLayerGraphicOrder=e.drapedLayerGraphicOrder,Object(s["m"])(this.normal,e.normal),Object(n["d"])(this.transformation,e.transformation)}}function _(e){return new v(e)}const j=Object(o["f"])(),w=Object(l["e"])()},"92a1":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("b2b2"),n=r("8048"),a=r("d791"),s=r("e431"),o=r("8188"),c=r("5996"),l=r("3a35"),u=r("36cf"),d=r("7289"),h=r("7361"),p=r("84f4"),f=r("3c9c"),b=r("ce27");class m{constructor(e,t,r,i){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=r,this.coordinateSystem=i,this._coordinateSystem=Object(u["d"])(i)}set extent(e){e&&Object(u["n"])(this.coordinateSystem,e,this.coordinateSystem)}getAltitude(e){return Object(u["a"])(this.coordinateSystem,e)}setAltitude(e,t,r=e){return Object(u["l"])(this.coordinateSystem,r,t,e)}setAltitudeOfTransformation(e,t){Object(u["m"])(this.coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return Object(u["j"])(this.coordinateSystem,e,t)}worldBasisAtPosition(e,t,r){return Object(u["b"])(this.coordinateSystem,e,t,r)}basisMatrixAtPosition(e,t){const r=this.worldBasisAtPosition(e,l["a"].X,h["d"].get()),i=this.worldBasisAtPosition(e,l["a"].Y,h["d"].get()),n=this.worldBasisAtPosition(e,l["a"].Z,h["d"].get());return Object(a["t"])(t,r[0],r[1],r[2],0,i[0],i[1],i[2],0,n[0],n[1],n[2],0,0,0,0,1),t}intersectManifoldClosestSilhouette(e,t,r){return Object(u["g"])(this.coordinateSystem,t,this._coordinateSystem),Object(u["i"])(this._coordinateSystem,e,r),r}intersectManifold(e,t,r){Object(u["g"])(this.coordinateSystem,t,this._coordinateSystem);const i=h["d"].get();return Object(u["h"])(this._coordinateSystem,e,i)?Object(s["m"])(r,i):null}intersectInfiniteManifold(e,t,r){if(this.viewingMode===f["a"].Global)return this.intersectManifold(e,t,r);Object(u["g"])(this.coordinateSystem,t,this._coordinateSystem);const i=this._coordinateSystem.value,n=h["d"].get();return Object(d["n"])(i.plane,e,n)?Object(s["m"])(r,n):null}toRenderCoords(e,t,r){return Object(p["a"])(e)?Object(o["t"])(e,t,this.spatialReference):Object(o["y"])(e,t,r,this.spatialReference)}fromRenderCoords(e,t,r=null){return Object(p["a"])(t)?(Object(i["k"])(r)&&(t.spatialReference=r),Object(o["w"])(e,this.spatialReference,t)):t instanceof c["a"]?Object(o["x"])(e,this.spatialReference,t):Object(o["y"])(e,this.spatialReference,t,r)?t:null}static create(e,t){switch(e){case f["a"].Local:return new m(f["a"].Local,t,Object(n["f"])(t),Object(u["f"])());case f["a"].Global:return new m(f["a"].Global,t,1,Object(u["e"])(t))}}static renderUnitScaleFactor(e,t){return g(e)/g(t)}}function g(e){if(Object(b["a"])(e,f["a"].Global))return 1;const t=Object(u["k"])(!1,e);return Object(n["f"])(t)}},"92ef":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return s}));var i,n=r("b2b2");!function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.USER=6]="USER"}(i||(i={}));const a=i.USER+1;function s(e){switch(e){case"defaults":return i.DEFAULTS;case"service":return i.SERVICE;case"portal-item":return i.PORTAL_ITEM;case"web-scene":return i.WEB_SCENE;case"web-map":return i.WEB_MAP;case"user":return i.USER}}function o(e){switch(e){case i.DEFAULTS:return"defaults";case i.SERVICE:return"service";case i.PORTAL_ITEM:return"portal-item";case i.WEB_SCENE:return"web-scene";case i.WEB_MAP:return"web-map";case i.USER:return"user"}return Object(n["c"])(void 0)}function c(e){return o(e)}},9305:function(e,t,r){"use strict";r.d(t,"a",(function(){return L})),r.d(t,"b",(function(){return x})),r.d(t,"c",(function(){return v})),r.d(t,"d",(function(){return O})),r.d(t,"e",(function(){return I}));var i=r("a4ee"),n=r("fc29"),a=r("af40"),s=r("e92d"),o=r("b2b2"),c=r("2ff3"),l=r("8a44"),u=r("f4cc"),d=r("477c"),h=r("b0ea"),p=r("59b2"),f=(r("b50f"),r("c120"),r("cea0"),r("d386")),b=r("306f");let m=class extends n["a"]{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};Object(i["a"])([Object(p["b"])()],m.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),Object(i["a"])([Object(p["b"])()],m.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),m=Object(i["a"])([Object(f["a"])("esri.views.support.DebugFlags")],m);const g=new m,y=s["a"].getLogger("esri.views.support.Scheduler");function O(e){return new M.Scheduler({nowFunc:e})}var v;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(v||(v={}));const _=0,j=new Map([[v.RESOURCE_CONTROLLER,_],[v.SLIDE,_],[v.STREAM_DATA_LOADER,_],[v.ELEVATION_QUERY,_],[v.TERRAIN_SURFACE,1],[v.SURFACE_GEOMETRY_UPDATES,1],[v.GRAPHICS_CORE,2],[v.I3S_CONTROLLER,2],[v.POINT_CLOUD_LAYER,2],[v.FEATURE_TILE_FETCHER,2],[v.OVERLAY,4],[v.STAGE,4],[v.GRAPHICS_DECONFLICTOR,4],[v.FILTER_VISIBILITY,4],[v.SCALE_VISIBILITY,4],[v.FRUSTUM_VISIBILITY,4],[v.POINT_OF_INTEREST_FREQUENT,6],[v.POINT_OF_INTEREST_INFREQUENT,30],[v.LABELER,8],[v.FEATURE_QUERY_ENGINE,8],[v.FEATURE_TILE_TREE,16],[v.FEATURE_TILE_TREE_ACTIVE,_],[v.ELEVATION_ALIGNMENT,12],[v.TEXT_TEXTURE_ATLAS,12],[v.CLOUDS_GENERATOR,12],[v.TEXTURE_UNLOAD,12],[v.LINE_OF_SIGHT_TOOL,16],[v.LINE_OF_SIGHT_TOOL_INTERACTIVE,_],[v.SNAPPING,_],[v.SHADOW_ACCUMULATOR,30]]);function w(e){return j.has(e)?j.get(e):"number"==typeof e?e:1}var x;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(x||(x={}));const T=Object(h["a"])(6.5),S=Object(h["a"])(1),E=Object(h["a"])(30),A=Object(h["a"])(1e3/30),C=Object(h["a"])(100),R=.9;var M,P;!function(e){let t=class extends n["a"]{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new c["a"]("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=x.INTERACTING,this._tasks=new l["a"],this._runQueue=new l["a"],this._load=0,this._idleStateCallbacks=new l["a"],this._idleUpdatesStartFired=!1,this._maxReschedule=N,this._forceTask=!1,this._debug=!1,this._debugHandle=Object(d["e"])(()=>g.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,d["a"]),this._budget=new s(e.nowFunc);for(const i of Object.keys(v))this.performanceInfo.tasks.set(v[i],new c["a"](v[i]));let t;const r=this;this._test={get state(){return Object(o["u"])(t,r._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:T,INTERACTING_BUDGET:A,IDLE_BUDGET:C,get budget(){return r._budget.budget},usedBudget:0,setBudget:e=>r._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach(e=>e.remove()),this._tasks.clear(),Object(o["s"])(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=N,this._schedule(),this.frame()))}))}registerTask(e,t){const i=w(e),n=new r(this,e,t,i);return this._tasks.push(n),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new c["a"](e)),n}registerIdleStateCallbacks(e,t){const r={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(r),this.state===x.IDLE&&this._idleUpdatesStartFired&&r.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(r),set idleBegin(e){i._idleUpdatesStartFired&&(r.idleEnd(),i._state===x.IDLE&&e()),r.idleBegin=e},set idleEnd(e){r.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==x.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll(e=>e.idleEnd())))}get state(){return Object(o["j"])(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=T,r=e.frameDuration,i=S;switch(this.state){case x.IDLE:t=Object(h["a"])(0),r=Object(h["a"])(Math.max(C,e.frameDuration)),i=E;break;case x.INTERACTING:r=Object(h["a"])(Math.max(A,e.frameDuration));case x.ANIMATING:}return r=Object(h["a"])(r-e.elapsedFrameTime-t),this.state!==x.IDLE&&r<S&&!this._forceTask?(this._forceTask=!0,!1):(r=Object(h["a"])(Math.max(r,i)),this._budget.reset(r,this.state),this._maxReschedule=N,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case x.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll(e=>e.idleBegin())),this._runIdle();break;case x.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset(Object(h["a"])(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return P.SCHEDULED;let t=P.IDLE;return this._tasks.forAll(r=>{r.name===e&&r.needsUpdate&&(r.schedulePriority<=1?t=P.READY:t!==P.READY&&(t=P.WAITING))}),t}_getRuntime(e){let t=0;return this._tasks.forAll(r=>{r.name===e&&(t+=r.runtime)}),t}_resetRuntimes(){this._tasks.forAll(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forAll(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,r)=>{t+=e>1?` ${e}x ${r}`:" "+r}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*R+e*(1-R)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace(e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forAll(e=>{e.basePriority===_&&e.needsUpdate&&!this._runQueue.some(t=>t===e)&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll(r=>{r.needsUpdate&&0!==r.schedulePriority&&r.basePriority!==_&&(e=!0,t=Math.max(t,r.basePriority),1===r.schedulePriority?(r.schedulePriority=0,this._runQueue.push(r)):--r.schedulePriority)}),!e)return this.updating=!1,!1;this._maxReschedule===N&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const r=this._budget.now(),i=this._runQueue.pop();this._budget.resetProgress();try{i.task.runTask(this._budget)}catch(t){y.error(`Exception in task "${i.name}"`,t)}i.schedulePriority=i.basePriority;const n=this._budget.now()-r;if(i.runtime+=n,this._frameTaskTimes.set(i.priority,this._frameTaskTimes.get(i.priority)+n),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",i.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some(e=>e.needsUpdate),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some(e=>e.needsUpdate),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(v))this._frameTaskTimes.set(v[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).record(e)),this.performanceInfo.total.record(e)}get test(){return this._test}};Object(i["a"])([Object(p["b"])()],t.prototype,"updating",void 0),Object(i["a"])([Object(p["b"])()],t.prototype,"nowFunc",void 0),t=Object(i["a"])([Object(f["a"])("esri.views.support.Scheduler")],t),e.Scheduler=t;let r=class extends n["a"]{constructor(e,t,r,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new b["a"],this._handles=new a["a"],this.schedulePriority=this._basePriority,this.task=Object(o["k"])(r)?r:this._queue,this._handles.add(Object(d["f"])(()=>this.task.running,()=>e.activate()))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(I),this._scheduler.removeTask(this),this.schedule=L.schedule,this.reschedule=L.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=w(e);this._basePriority!==_&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,r){return this._queue.push(e,t,r)}reschedule(e,t,r){return this._queue.unshift(e,t,r)}processQueue(e){this._queue.runTask(e)}};Object(i["a"])([Object(p["b"])({constructOnly:!0})],r.prototype,"task",void 0),Object(i["a"])([Object(p["b"])({readOnly:!0})],r.prototype,"updating",null),r=Object(i["a"])([Object(f["a"])("esri.views.support.SchedulerTask")],r);class s{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=x.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=s}(M||(M={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(P||(P={}));const I=(()=>{const e=new M.Budget(()=>performance.now());return e.enabled=!1,e})();class D{remove(){}processQueue(){}schedule(e,t,r){try{if(Object(u["n"])(t)){const e=Object(u["e"])();return r?Promise.resolve(r(e)):Promise.reject(e)}return Object(u["y"])(e(I))}catch(i){return Promise.reject(i)}}reschedule(e,t,r){return this.schedule(e,t,r)}}const L=new D,N=Number.MAX_SAFE_INTEGER},9392:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return a}));var i=r("b2b2");class n{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function a(e){return!(Object(i["j"])(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)}class s extends n{}},9415:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return _})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return A}));var i=r("b2cd"),n=r("c120");let a,s=null;function o(){return!!s}function c(){return!!Object(n["a"])("esri-wasm")}function l(){return a||(a=r.e("chunk-14e002a7").then(r.bind(null,"95a1")).then(e=>e.p).then(({default:e})=>e({locateFile:e=>Object(i["b"])("esri/geometry/support/"+e)})).then(e=>{w(e)}),a)}var u,d,h;!function(e){function t(e,t,r){s.ensureCache.prepare();const i=S(r),n=r===i,a=s.ensureFloat64(i),o=s._pe_geog_to_proj(s.getPointer(e),t,a);return o&&E(r,t,a,n),o}function r(e,r,n,a){switch(a){case d.PE_TRANSFORM_P_TO_G:return i(e,r,n);case d.PE_TRANSFORM_G_TO_P:return t(e,r,n)}return 0}function i(e,t,r){return n(e,t,r,0)}function n(e,t,r,i){s.ensureCache.prepare();const n=S(r),a=r===n,o=s.ensureFloat64(n),c=s._pe_proj_to_geog_center(s.getPointer(e),t,o,i);return c&&E(r,t,o,a),c}e.geogToProj=t,e.projGeog=r,e.projToGeog=i,e.projToGeogCenter=n}(u||(u={})),function(e){function t(){e.PE_BUFFER_MAX=s.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=s.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=s.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=s.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=s.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=s.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=s.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=s.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=s.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=s.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=s.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=s.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=s.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=s.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=s.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=s.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=s.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=s.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=s.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=s.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_PARM_X0=s.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=s.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=s.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=s.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=s.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=s.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=s.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=s.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=s.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=s.PeDefs.prototype.PE_HORIZON_DELTA}e.init=t}(d||(d={})),function(e){const t={},r={},i=e=>{if(e){const t=e.getType();switch(t){case d.PE_TYPE_GEOGCS:e=s.castObject(e,s.PeGeogcs);break;case d.PE_TYPE_PROJCS:e=s.castObject(e,s.PeProjcs);break;case d.PE_TYPE_GEOGTRAN:e=s.castObject(e,s.PeGeogtran);break;default:t&d.PE_TYPE_UNIT&&(e=s.castObject(e,s.PeUnit))}}return e};function n(){s.PeFactory.prototype.initialize(null)}function a(e){return o(d.PE_TYPE_COORDSYS,e)}function o(e,r){let n=null,a=t[e];if(a||(a={},t[e]=a),a.hasOwnProperty(String(r)))n=a[r];else{const t=s.PeFactory.prototype.factoryByType(e,r);s.compare(t,s.NULL)||(n=t,a[r]=n)}return n=i(n),n}function c(e,t){let n=null,a=r[e];if(a||(a={},r[e]=a),a.hasOwnProperty(t))n=a[t];else{const r=s.PeFactory.prototype.fromString(e,t);s.compare(r,s.NULL)||(n=r,a[t]=n)}return n=i(n),n}function l(e){return o(d.PE_TYPE_GEOGCS,e)}function u(e){return o(d.PE_TYPE_GEOGTRAN,e)}function h(e){return s.PeFactory.prototype.getCode(e)}function p(e){return o(d.PE_TYPE_PROJCS,e)}function f(e){return o(d.PE_TYPE_UNIT,e)}e.initialize=n,e.coordsys=a,e.factoryByType=o,e.fromString=c,e.geogcs=l,e.geogtran=u,e.getCode=h,e.projcs=p,e.unit=f}(h||(h={}));let p=null;var f,b,m,g,y,O,v,_,j;function w(e){function t(e,t,r){e[t]=r(e[t])}s=e,d.init(),f.init(),y.init(),v.init(),_.init(),p=class extends s.PeGCSExtent{destroy(){s.destroy(this)}};const r=[s.PeDatum,s.PeGeogcs,s.PeGeogtran,s.PeObject,s.PeParameter,s.PePrimem,s.PeProjcs,s.PeSpheroid,s.PeUnit];for(const a of r)t(a.prototype,"getName",e=>function(){return e.call(this,new Array(d.PE_NAME_MAX))});for(const a of[s.PeGeogtran,s.PeProjcs])t(a.prototype,"getParameters",e=>function(){const t=new Array(d.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const i=s.getValue(r,"*");t[e]=i?s.wrapPointer(i,s.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t});t(s.PeHorizon.prototype,"getCoord",e=>function(){const t=this.getSize();if(!t)return null;const r=[];return E(r,t,e.call(this)),r}),t(s.PeGTlistExtendedEntry.prototype,"getEntries",e=>{const t=s._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const i=e.call(this);if(!s.compare(i,s.NULL)){r=[i];const e=this.getSteps();if(e>1){const n=s.getPointer(i);for(let i=1;i<e;i++)r.push(s.wrapPointer(n+t*i,s.PeGTlistExtendedGTs))}}return r}});const i=s._pe_getPeHorizonSize(),n=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const n=e.call(this);if(!s.compare(n,s.NULL)){r=[n];const e=n.getNump();if(e>1){const t=s.getPointer(n);for(let n=1;n<e;n++)r.push(s.wrapPointer(t+i*n,s.PeHorizon))}}return t.set(e,r),r};t(s.PeProjcs.prototype,"horizonGcsGenerate",n),t(s.PeProjcs.prototype,"horizonPcsGenerate",n),s.PeObject.prototype.toString=function(e=d.PE_STR_OPTS_NONE){s.ensureCache.prepare();const t=s.getPointer(this),r=s.ensureInt8(new Array(d.PE_BUFFER_MAX));return s.UTF8ToString(s._pe_object_to_string_ext(t,e,r))}}function x(e){if(!e)return;const t=s.getClass(e);if(!t)return;const r=s.getCache(t);if(!r)return;const i=s.getPointer(e);i&&delete r[i]}function T(e,t){const r=[],i=new Array(t);for(let n=0;n<e;n++)r.push(s.ensureInt8(i));return r}function S(e){let t;return Array.isArray(e[0])?(t=[],e.forEach(e=>{t.push(e[0],e[1])})):t=e,t}function E(e,t,r,i=!1){if(i)for(let n=0;n<2*t;n++)e[n]=s.getValue(r+n*Float64Array.BYTES_PER_ELEMENT,"double");else{const i=0===e.length;for(let n=0;n<t;n++)i&&(e[n]=new Array(2)),e[n][0]=s.getValue(r,"double"),e[n][1]=s.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}!function(e){let t;function r(){e.PE_GTLIST_OPTS_COMMON=s.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=s._pe_getPeGTlistExtendedEntrySize()}function i(e,r,i,n,a,o){let c=null;const l=new s.PeInteger(o);try{const u=s.PeGTlistExtended.prototype.getGTlist(e,r,i,n,a,l);if((o=l.val)&&(c=[u],o>1)){const e=s.getPointer(u);for(let r=1;r<o;r++)c.push(s.wrapPointer(e+t*r,s.PeGTlistExtendedEntry))}}finally{s.destroy(l)}return c}e.init=r,e.getGTlist=i}(f||(f={})),function(e){function t(e){if(e&&e.length){for(const t of e)x(t),t.getEntries().forEach(e=>{x(e);const t=e.getGeogtran();x(t),t.getParameters().forEach(x),[t.getGeogcs1(),t.getGeogcs2()].forEach(e=>{x(e);const t=e.getDatum();x(t),x(t.getSpheroid()),x(e.getPrimem()),x(e.getUnit())})});s.PeGTlistExtendedEntry.prototype.Delete(e[0])}}e.destroy=t}(b||(b={})),function(e){function t(e,t,r,i,n){s.ensureCache.prepare();const a=S(r),o=r===a,c=s.ensureFloat64(a);let l=0;i&&(l=s.ensureFloat64(i));const u=s._pe_geog_to_geog(s.getPointer(e),t,c,l,n);return u&&E(r,t,c,o),u}e.geogToGeog=t}(m||(m={})),function(e){const t=(e,t,r,i,n,a)=>{let o,c;switch(s.ensureCache.prepare(),e){case"dd":o=s._pe_geog_to_dd,c=d.PE_DD_MAX;break;case"ddm":o=s._pe_geog_to_ddm,c=d.PE_DDM_MAX;break;case"dms":o=s._pe_geog_to_dms,c=d.PE_DMS_MAX}let l=0;t&&(l=s.getPointer(t));const u=S(i),h=s.ensureFloat64(u),p=T(r,c),f=o(l,r,h,n,s.ensureInt32(p));if(f)for(let d=0;d<r;d++)a[d]=s.UTF8ToString(p[d]);return f},r=(e,t,r,i,n)=>{let a;switch(s.ensureCache.prepare(),e){case"dd":a=s._pe_dd_to_geog;break;case"ddm":a=s._pe_ddm_to_geog;break;case"dms":a=s._pe_dms_to_geog}let o=0;t&&(o=s.getPointer(t));const c=i.map(e=>s.ensureString(e)),l=s.ensureInt32(c),u=s.ensureFloat64(new Array(2*r)),d=a(o,r,l,u);return d&&E(n,r,u),d};function i(e,r,i,n,a){return t("dms",e,r,i,n,a)}function n(e,t,i,n){return r("dms",e,t,i,n)}function a(e,r,i,n,a){return t("ddm",e,r,i,n,a)}function o(e,t,i,n){return r("ddm",e,t,i,n)}function c(e,r,i,n,a){return t("dd",e,r,i,n,a)}function l(e,t,i,n){return r("dd",e,t,i,n)}e.geogToDms=i,e.dmsToGeog=n,e.geogToDdm=a,e.ddmToGeog=o,e.geogToDd=c,e.ddToGeog=l}(g||(g={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=s.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=s.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=s.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(e,t,r,i,n,a,o){s.ensureCache.prepare();let c=0;e&&(c=s.getPointer(e));const l=S(r),u=s.ensureFloat64(l),h=T(t,d.PE_MGRS_MAX),p=s.ensureInt32(h),f=s._pe_geog_to_mgrs_extended(c,t,u,i,n,a,p);if(f)for(let d=0;d<t;d++)o[d]=s.UTF8ToString(h[d]);return f}function i(e,t,r,i,n){s.ensureCache.prepare();let a=0;e&&(a=s.getPointer(e));const o=r.map(e=>s.ensureString(e)),c=s.ensureInt32(o),l=s.ensureFloat64(new Array(2*t)),u=s._pe_mgrs_to_geog_extended(a,t,c,i,l);return u&&E(n,t,l),u}e.init=t,e.geogToMgrsExtended=r,e.mgrsToGeogExtended=i}(y||(y={})),function(e){function t(e,t,r,i,n,a,o){s.ensureCache.prepare();let c=0;e&&(c=s.getPointer(e));const l=S(r),u=s.ensureFloat64(l),h=T(t,d.PE_MGRS_MAX),p=s.ensureInt32(h),f=s._pe_geog_to_usng(c,t,u,i,n,a,p);if(f)for(let d=0;d<t;d++)o[d]=s.UTF8ToString(h[d]);return f}function r(e,t,r,i){s.ensureCache.prepare();let n=0;e&&(n=s.getPointer(e));const a=r.map(e=>s.ensureString(e)),o=s.ensureInt32(a),c=s.ensureFloat64(new Array(2*t)),l=s._pe_usng_to_geog(n,t,o,c);return l&&E(i,t,c),l}e.geogToUsng=t,e.usngToGeog=r}(O||(O={})),function(e){function t(){e.PE_UTM_OPTS_NONE=s.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=s.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=s.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(e,t,r,i,n){s.ensureCache.prepare();let a=0;e&&(a=s.getPointer(e));const o=S(r),c=s.ensureFloat64(o),l=T(t,d.PE_UTM_MAX),u=s.ensureInt32(l),h=s._pe_geog_to_utm(a,t,c,i,u);if(h)for(let d=0;d<t;d++)n[d]=s.UTF8ToString(l[d]);return h}function i(e,t,r,i,n){s.ensureCache.prepare();let a=0;e&&(a=s.getPointer(e));const o=r.map(e=>s.ensureString(e)),c=s.ensureInt32(o),l=s.ensureFloat64(new Array(2*t)),u=s._pe_utm_to_geog(a,t,c,i,l);return u&&E(n,t,l),u}e.init=t,e.geogToUtm=r,e.utmToGeog=i}(v||(v={})),function(e){const t=new Map;function r(){e.PE_PCSINFO_OPTION_NONE=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=s.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=s.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=s.PePCSInfo.prototype.PE_POLE_POINT}function i(r,i=e.PE_PCSINFO_OPTION_DOMAIN){let n,a;return t.has(r)&&(a=t.get(r),a[i]&&(n=a[i])),n||(n=s.PePCSInfo.prototype.generate(r,i),a||(a=[],t.set(r,a)),a[i]=n),n}e.init=r,e.generate=i}(_||(_={})),function(e){function t(){return s.PeVersion.prototype.version_string()}e.versionString=t}(j||(j={}));const A=Object.freeze({__proto__:null,get _pe(){return s},isLoaded:o,isSupported:c,load:l,get PeCSTransformations(){return u},get PeDefs(){return d},get PeFactory(){return h},get PeGCSExtent(){return p},get PeGTlistExtended(){return f},get PeGTlistExtendedEntry(){return b},get PeGTTransformations(){return m},get PeNotationDms(){return g},get PeNotationMgrs(){return y},get PeNotationUsng(){return O},get PeNotationUtm(){return v},get PePCSInfo(){return _},get PeVersion(){return j},_init:w})},"94a6":function(e,t,r){"use strict";r.r(t),r.d(t,"fetch",(function(){return R})),r.d(t,"gltfToEngineResources",(function(){return P})),r.d(t,"parseUrl",(function(){return M}));var i=r("49b8"),n=r("b2b2"),a=r("1c92"),s=r("dae5"),o=r("d791"),c=r("afe1"),l=r("e431"),u=r("0b2d"),d=r("4261"),h=r("8190"),p=r("668b"),f=r("e4c1"),b=r("7e2d"),m=r("2b60"),g=r("3c3b"),y=r("087c"),O=r("22f5"),v=r("b7c2"),_=r("0278"),j=r("1e2c"),w=r("b7bd"),x=r("dbad"),T=r("0613"),S=r("d17d"),E=r("dc56"),A=r("1c20"),C=r("4c96");async function R(e,t){const r=M(Object(i["a"])(e));if("wosr"===r.fileType){const e=await(t.cache?t.cache.loadWOSR(r.url,t):Object(O["a"])(r.url,t)),i=Object(O["b"])(e,t);return{lods:[i],referenceBoundingBox:i.boundingBox,isEsriSymbolResource:!1,isWosr:!0,remove:e.remove}}const a=await(t.cache?t.cache.loadGLTF(r.url,t,t.usePBR):Object(g["a"])(new m["a"](t.streamDataRequester),r.url,t,t.usePBR)),s=Object(n["i"])(a.model.meta,"ESRI_proxyEllipsoid");a.meta.isEsriSymbolResource&&Object(n["k"])(s)&&-1!==a.meta.uri.indexOf("/RealisticTrees/")&&L(a,s);const o=a.meta.isEsriSymbolResource?{usePBR:t.usePBR,isSchematic:!1,treeRendering:a.customMeta.esriTreeRendering,mrrFactors:[0,1,.2]}:{usePBR:t.usePBR,isSchematic:!1,mrrFactors:[0,1,.5]},c={...t.materialParamsMixin,treeRendering:a.customMeta.esriTreeRendering};if(null!=r.specifiedLodIndex){const e=P(a,o,c,r.specifiedLodIndex);let t=e[0].boundingBox;return 0!==r.specifiedLodIndex&&(t=P(a,o,c,0)[0].boundingBox),{lods:e,referenceBoundingBox:t,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1,remove:a.remove}}const l=P(a,o,c);return{lods:l,referenceBoundingBox:l[0].boundingBox,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1,remove:a.remove}}function M(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}function P(e,t,r,i){const o=e.model,c=Object(s["b"])(),l=new Array,u=new Map,m=new Map;return o.lods.forEach((e,s)=>{if(void 0!==i&&s!==i)return;const g={name:e.name,stageResources:{textures:new Array,materials:new Array,geometries:new Array},lodThreshold:Object(n["k"])(e.lodThreshold)?e.lodThreshold:null,pivotOffset:[0,0,0],numberOfVertices:0,boundingBox:Object(d["k"])()};l.push(g),e.parts.forEach(e=>{const i=e.material+(e.attributes.normal?"_normal":"")+(e.attributes.color?"_color":"")+(e.attributes.texCoord0?"_texCoord0":"")+(e.attributes.tangent?"_tangent":""),s=o.materials.get(e.material),l=Object(n["k"])(e.attributes.texCoord0),y=Object(n["k"])(e.attributes.normal),O=I(s.alphaMode);if(!u.has(i)){if(l){if(Object(n["k"])(s.textureColor)&&!m.has(s.textureColor)){const e=o.textures.get(s.textureColor),t={...e.parameters,preMultiplyAlpha:O!==v["a"].Opaque};m.set(s.textureColor,new j["a"](e.data,t))}if(Object(n["k"])(s.textureNormal)&&!m.has(s.textureNormal)){const e=o.textures.get(s.textureNormal);m.set(s.textureNormal,new j["a"](e.data,e.parameters))}if(Object(n["k"])(s.textureOcclusion)&&!m.has(s.textureOcclusion)){const e=o.textures.get(s.textureOcclusion);m.set(s.textureOcclusion,new j["a"](e.data,e.parameters))}if(Object(n["k"])(s.textureEmissive)&&!m.has(s.textureEmissive)){const e=o.textures.get(s.textureEmissive);m.set(s.textureEmissive,new j["a"](e.data,e.parameters))}if(Object(n["k"])(s.textureMetallicRoughness)&&!m.has(s.textureMetallicRoughness)){const e=o.textures.get(s.textureMetallicRoughness);m.set(s.textureMetallicRoughness,new j["a"](e.data,e.parameters))}}const a=s.color[0]**(1/T["a"]),c=s.color[1]**(1/T["a"]),d=s.color[2]**(1/T["a"]),h=s.emissiveFactor[0]**(1/T["a"]),p=s.emissiveFactor[1]**(1/T["a"]),f=s.emissiveFactor[2]**(1/T["a"]),b=Object(n["k"])(s.textureColor)&&l?m.get(s.textureColor):null;u.set(i,new x["a"]({...t,transparent:O===v["a"].Blend,customDepthTest:v["e"].Lequal,textureAlphaMode:O,textureAlphaCutoff:s.alphaCutoff,diffuse:[a,c,d],ambient:[a,c,d],opacity:s.opacity,doubleSided:s.doubleSided,doubleSidedType:"winding-order",cullFace:s.doubleSided?v["c"].None:v["c"].Back,vertexColors:!!e.attributes.color,vertexTangents:!!e.attributes.tangent,normals:y?"default":"screenDerivative",castShadows:!0,receiveSSAO:!0,fillLightsEnabled:!0,textureId:Object(n["k"])(b)?b.id:void 0,colorMixMode:s.colorMixMode,normalTextureId:Object(n["k"])(s.textureNormal)&&l?m.get(s.textureNormal).id:void 0,textureAlphaPremultiplied:Object(n["k"])(b)&&!!b.params.preMultiplyAlpha,occlusionTextureId:Object(n["k"])(s.textureOcclusion)&&l?m.get(s.textureOcclusion).id:void 0,emissiveTextureId:Object(n["k"])(s.textureEmissive)&&l?m.get(s.textureEmissive).id:void 0,metallicRoughnessTextureId:Object(n["k"])(s.textureMetallicRoughness)&&l?m.get(s.textureMetallicRoughness).id:void 0,emissiveFactor:[h,p,f],mrrFactors:[s.metallicFactor,s.roughnessFactor,t.mrrFactors[2]],isSchematic:!1,...r}))}const S=D(e.indices||e.attributes.position.count,e.primitiveType),R=e.attributes.position.count,M=Object(b["a"])(h["u"],R);Object(p["e"])(M,e.attributes.position,e.transform);const P=[[w["a"].POSITION,{data:M.typedBuffer,size:M.elementCount,exclusive:!0}]],L=[[w["a"].POSITION,S]];if(Object(n["k"])(e.attributes.normal)){const t=Object(b["a"])(h["u"],R);Object(a["a"])(c,e.transform),Object(p["a"])(t,e.attributes.normal,c),P.push([w["a"].NORMAL,{data:t.typedBuffer,size:t.elementCount,exclusive:!0}]),L.push([w["a"].NORMAL,S])}if(Object(n["k"])(e.attributes.tangent)){const t=Object(b["a"])(h["C"],R);Object(a["a"])(c,e.transform),Object(f["c"])(t,e.attributes.tangent,c),P.push([w["a"].TANGENT,{data:t.typedBuffer,size:t.elementCount,exclusive:!0}]),L.push([w["a"].TANGENT,S])}if(Object(n["k"])(e.attributes.texCoord0)){const t=Object(b["a"])(h["m"],R);Object(E["b"])(t,e.attributes.texCoord0),P.push([w["a"].UV0,{data:t.typedBuffer,size:t.elementCount,exclusive:!0}]),L.push([w["a"].UV0,S])}if(Object(n["k"])(e.attributes.color)){const t=Object(b["a"])(h["J"],R);if(4===e.attributes.color.elementCount)e.attributes.color instanceof h["C"]?Object(f["b"])(t,e.attributes.color,255):e.attributes.color instanceof h["J"]?Object(A["a"])(t,e.attributes.color):e.attributes.color instanceof h["H"]&&Object(f["b"])(t,e.attributes.color,1/256);else{Object(A["b"])(t,255,255,255,255);const r=new h["B"](t.buffer,0,4);e.attributes.color instanceof h["u"]?Object(p["d"])(r,e.attributes.color,255):e.attributes.color instanceof h["B"]?Object(C["a"])(r,e.attributes.color):e.attributes.color instanceof h["z"]&&Object(p["d"])(r,e.attributes.color,1/256)}P.push([w["a"].COLOR,{data:t.typedBuffer,size:t.elementCount,exclusive:!0}]),L.push([w["a"].COLOR,S])}const N=new _["a"](P,L);g.stageResources.geometries.push(N),g.stageResources.materials.push(u.get(i)),l&&(Object(n["k"])(s.textureColor)&&g.stageResources.textures.push(m.get(s.textureColor)),Object(n["k"])(s.textureNormal)&&g.stageResources.textures.push(m.get(s.textureNormal)),Object(n["k"])(s.textureOcclusion)&&g.stageResources.textures.push(m.get(s.textureOcclusion)),Object(n["k"])(s.textureEmissive)&&g.stageResources.textures.push(m.get(s.textureEmissive)),Object(n["k"])(s.textureMetallicRoughness)&&g.stageResources.textures.push(m.get(s.textureMetallicRoughness))),g.numberOfVertices+=R;const F=N.boundingInfo;Object(n["k"])(F)&&(Object(d["r"])(g.boundingBox,F.getBBMin()),Object(d["r"])(g.boundingBox,F.getBBMax()))})}),l}function I(e){switch(e){case"BLEND":return v["a"].Blend;case"MASK":return v["a"].Mask;case"OPAQUE":case null:case void 0:return v["a"].Opaque}}function D(e,t){switch(t){case S["r"].TRIANGLES:return Object(y["c"])(e);case S["r"].TRIANGLE_STRIP:return Object(y["b"])(e);case S["r"].TRIANGLE_FAN:return Object(y["a"])(e)}}function L(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];e.customMeta.esriTreeRendering=!0;for(const a of i.parts){const i=a.attributes.normal;if(Object(n["j"])(i))return;const s=a.attributes.position,d=s.count,p=Object(u["f"])(),f=Object(u["f"])(),m=Object(u["f"])(),g=Object(b["a"])(h["J"],d),y=Object(b["a"])(h["u"],d),O=Object(o["b"])(Object(c["d"])(),a.transform);for(let n=0;n<d;n++){s.getVec(n,f),i.getVec(n,p),Object(l["s"])(f,f,a.transform),Object(l["l"])(m,f,t.center),Object(l["e"])(m,m,t.radius);const o=m[2],c=Object(l["r"])(m),u=Math.min(.45+.55*c*c,1);Object(l["e"])(m,m,t.radius),Object(l["s"])(m,m,O),Object(l["t"])(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&Object(l["k"])(m,m,p,o>-1?.2:Math.min(-4*o-3.8,1)),y.setVec(n,m),g.set(n,0,255*u),g.set(n,1,255*u),g.set(n,2,255*u),g.set(n,3,255)}a.attributes.normal=y,a.attributes.color=g}}}},9617:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var i=r("d047"),n=r("3886");function a(e){e.include(i["a"]),e.uniforms.add("geometryDepthTexture","sampler2D"),e.uniforms.add("nearFar","vec2"),e.code.add(n["a"]`bool geometryDepthTest(vec2 pos, float elementDepth) {
  2122. float geometryDepth = linearDepthFromTexture(geometryDepthTexture, pos, nearFar);
  2123. return (elementDepth < (geometryDepth - 1.0));
  2124. }`)}function s(e,t){t.multipassGeometryEnabled&&t.geometryLinearDepthTexture&&e.bindTexture(t.geometryLinearDepthTexture,"geometryDepthTexture")}},"961d":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("09db");let c=class extends n["a"]{constructor(e){super(e),this.enabled=!0,this.type=null}writeEnabled(e,t,r){e||(t[r]=e)}};Object(i["a"])([Object(a["b"])({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],c.prototype,"enabled",void 0),Object(i["a"])([Object(o["a"])("enabled")],c.prototype,"writeEnabled",null),Object(i["a"])([Object(a["b"])({type:["icon","object","line","path","fill","water","extrude","text"],readOnly:!0})],c.prototype,"type",void 0),c=Object(i["a"])([Object(s["a"])("esri.symbols.Symbol3DLayer")],c);const l=c},"96d4":function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("e06a"),s=r("658b"),o=r("fa8a"),c=r("6a0ed"),l=r("7ffa"),u=r("b2b2"),d=r("59b2"),h=(r("cea0"),r("d386")),p=r("69dd");const f=new o["a"]({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),b=new o["a"]({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let m=i=class extends c["a"]{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:a,units:s,distance:o}=this;return new p["a"]({geometry:Object(l["a"])(r),objectIds:Object(l["a"])(a),spatialRelationship:i,timeExtent:Object(l["a"])(n),where:t,units:s,distance:o,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:a,units:s,distance:o}=this;return new i({geometry:Object(l["a"])(t),objectIds:Object(l["a"])(a),spatialRelationship:r,timeExtent:Object(l["a"])(n),where:e,units:s,distance:o})}};Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],m.prototype,"where",void 0),Object(n["a"])([Object(d["b"])({types:a["a"],json:{write:!0}})],m.prototype,"geometry",void 0),Object(n["a"])([Object(d["b"])({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:Object(u["k"])(this.geometry)}}}}})],m.prototype,"spatialRelationship",void 0),Object(n["a"])([Object(d["b"])({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],m.prototype,"distance",void 0),Object(n["a"])([Object(d["b"])({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),Object(n["a"])([Object(d["b"])({type:b.apiValues,json:{read:b.read,write:{writer:b.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],m.prototype,"units",void 0),Object(n["a"])([Object(d["b"])({type:s["a"],json:{write:!0}})],m.prototype,"timeExtent",void 0),m=i=Object(n["a"])([Object(h["a"])("esri.layers.support.FeatureFilter")],m);const g=m},"970c":function(e,t,r){"use strict";function i(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function n(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(e,t,r,i,n,a,s,o,c,l,u,d,h,p,f,b){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=i,m[4]=n,m[5]=a,m[6]=s,m[7]=o,m[8]=c,m[9]=l,m[10]=u,m[11]=d,m[12]=h,m[13]=p,m[14]=f,m[15]=b,m}function s(e,t){return new Float32Array(e,t,16)}r.d(t,"a",(function(){return i}));const o=i();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,IDENTITY:o})},9714:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("7b7d"),n=r("0646");class a{constructor(e,t){this.owner=t,this.properties={},this.afterDispatchHandle=null;for(const r in e){const t=e[r],n=new i["a"](t,null,null,2,2);this.properties[r]={pool:n,acquired:[]}}this.afterDispatchHandle=Object(n["a"])(()=>this._release())}destroy(){this.afterDispatchHandle&&(this.afterDispatchHandle.remove(),this.afterDispatchHandle=null);for(const e in this.properties){const t=this.properties[e];for(const e of t.acquired)Object(n["b"])(e)||t.pool.release(e);t.pool.destroy(),t.pool=null,t.acquired=null}this.properties=null,this.owner=null}get(e){const t=this.owner._get(e),r=this.properties[e];let i=r.pool.acquire();for(r.acquired.push(i);i===t;)r.acquired.push(i),i=r.pool.acquire();return i}_release(){for(const e in this.properties){const t=this.properties[e];let r=0;for(const e of t.acquired)Object(n["b"])(e)?t.acquired[r++]=e:t.pool.release(e);t.acquired.length=r}}}},9786:function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return _})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return y})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return v})),r.d(t,"h",(function(){return p}));var i=r("7ffa"),n=r("b2b2"),a=r("5996"),s=r("2255"),o=r("7f83");const c=57.29577951308232,l=.017453292519943;function u(e){return e*c}function d(e){return e*l}function h(e){return e/s["a"].radius}function p(e){return Math.PI/2-2*Math.atan(Math.exp(-e/s["a"].radius))}function f(e){return null!=e.wkid||null!=e.wkt}const b=[0,0];function m(e,t,r,i,n){const a=e,s=n;if(s.spatialReference=r,"x"in a&&"x"in s)[s.x,s.y]=t(a.x,a.y,b,i);else if("xmin"in a&&"xmin"in s)[s.xmin,s.ymin]=t(a.xmin,a.ymin,b,i),[s.xmax,s.ymax]=t(a.xmax,a.ymax,b,i);else if("paths"in a&&"paths"in s||"rings"in a&&"rings"in s){const e="paths"in a?a.paths:a.rings,r=[];let n;for(let a=0;a<e.length;a++){const s=e[a];n=[],r.push(n);for(let e=0;e<s.length;e++)n.push(t(s[e][0],s[e][1],[0,0],i)),s[e].length>2&&n[e].push(s[e][2]),s[e].length>3&&n[e].push(s[e][3])}"paths"in s?s.paths=r:s.rings=r}else if("points"in a&&"points"in s){const e=a.points,r=[];for(let n=0;n<e.length;n++)r[n]=t(e[n][0],e[n][1],[0,0],i),e[n].length>2&&r[n].push(e[n][2]),e[n].length>3&&r[n].push(e[n][3]);s.points=r}return n}function g(e,t){const r=e&&(f(e)?e:e.spatialReference),i=t&&(f(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!r||!i)&&(!!Object(o["d"])(i,r)||Object(o["p"])(i)&&Object(o["m"])(r)||Object(o["p"])(r)&&Object(o["m"])(i))}function y(e,t){if(Object(n["j"])(e))return null;const r=e.spatialReference,s=t&&(f(t)?t:t.spatialReference);return g(r,s)?Object(o["d"])(r,s)?Object(i["a"])(e):Object(o["p"])(s)?m(e,O,a["a"].WebMercator,!1,Object(i["a"])(e)):Object(o["m"])(s)?m(e,v,a["a"].WGS84,!1,Object(i["a"])(e)):null:null}function O(e,t,r=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const i=d(t);return r[0]=d(e)*s["a"].radius,r[1]=s["a"].halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),r}function v(e,t,r=[0,0],i=!1){const n=u(e/s["a"].radius);return r[0]=i?n:n-360*Math.floor((n+180)/360),r[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/s["a"].radius))),r}function _(e,t=!1,r=Object(i["a"])(e)){return m(e,O,a["a"].WebMercator,t,r)}function j(e,t=!1,r=Object(i["a"])(e)){return m(e,v,a["a"].WGS84,t,r)}},9787:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("a915"),o=r("59b2"),c=(r("b50f"),r("c120"),r("1a3e")),l=r("d386"),u=r("1e5b");let d=i=class extends a["a"]{constructor(e){super(e),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(e){return Object(s["j"])(e)}clone(){return new i({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};Object(n["a"])([Object(o["b"])({type:u["a"],json:{default:"none",write:!0}})],d.prototype,"decoration",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],d.prototype,"family",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.textSymbol3D})}}})],d.prototype,"size",void 0),Object(n["a"])([Object(c["a"])("size")],d.prototype,"castSize",null),Object(n["a"])([Object(o["b"])({type:u["b"],json:{default:"normal",write:!0}})],d.prototype,"style",void 0),Object(n["a"])([Object(o["b"])({type:u["c"],json:{default:"normal",write:!0}})],d.prototype,"weight",void 0),d=i=Object(n["a"])([Object(l["a"])("esri.symbols.Font")],d);const h=d},9812:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i,n,a,s={exports:{}};i=s,n=function(){function e(e,r,n){n=n||2;var a,s,o,l,u,d,h,p=r&&r.length,f=p?r[0]*n:e.length,b=t(e,0,f,n,!0),m=[];if(!b||b.next===b.prev)return m;if(p&&(b=c(e,r,b,n)),e.length>80*n){a=o=e[0],s=l=e[1];for(var g=n;g<f;g+=n)(u=e[g])<a&&(a=u),(d=e[g+1])<s&&(s=d),u>o&&(o=u),d>l&&(l=d);h=0!==(h=Math.max(o-a,l-s))?1/h:0}return i(b,m,n,a,s,h),m}function t(e,t,r,i,n){var a,s;if(n===P(e,t,r,i)>0)for(a=t;a<r;a+=i)s=C(a,e[a],e[a+1],s);else for(a=r-i;a>=t;a-=i)s=C(a,e[a],e[a+1],s);if(s&&_(s,s.next)){var o=s.next;R(s),s=o}return s}function r(e,t){if(!e)return e;t||(t=e);var r,i=e;do{if(r=!1,i.steiner||!_(i,i.next)&&0!==v(i.prev,i,i.next))i=i.next;else{var n=i.prev;if(R(i),(i=t=n)===i.next)break;r=!0}}while(r||i!==t);return t}function i(e,t,c,l,u,d,h){if(e){!h&&d&&f(e,l,u,d);for(var p,b,m=e;e.prev!==e.next;)if(p=e.prev,b=e.next,d?a(e,l,u,d):n(e))t.push(p.i/c),t.push(e.i/c),t.push(b.i/c),R(e),e=b.next,m=b.next;else if((e=b)===m){h?1===h?i(e=s(r(e),t,c),t,c,l,u,d,2):2===h&&o(e,t,c,l,u,d):i(r(e),t,c,l,u,d,1);break}}}function n(e){var t=e.prev,r=e,i=e.next;if(v(t,r,i)>=0)return!1;for(var n=e.next.next;n!==e.prev;){if(y(t.x,t.y,r.x,r.y,i.x,i.y,n.x,n.y)&&v(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function a(e,t,r,i){var n=e.prev,a=e,s=e.next;if(v(n,a,s)>=0)return!1;for(var o=n.x<a.x?n.x<s.x?n.x:s.x:a.x<s.x?a.x:s.x,c=n.y<a.y?n.y<s.y?n.y:s.y:a.y<s.y?a.y:s.y,l=n.x>a.x?n.x>s.x?n.x:s.x:a.x>s.x?a.x:s.x,u=n.y>a.y?n.y>s.y?n.y:s.y:a.y>s.y?a.y:s.y,d=m(o,c,t,r,i),h=m(l,u,t,r,i),p=e.prevZ,f=e.nextZ;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&y(n.x,n.y,a.x,a.y,s.x,s.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&y(n.x,n.y,a.x,a.y,s.x,s.y,f.x,f.y)&&v(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&y(n.x,n.y,a.x,a.y,s.x,s.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&y(n.x,n.y,a.x,a.y,s.x,s.y,f.x,f.y)&&v(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function s(e,t,i){var n=e;do{var a=n.prev,s=n.next.next;!_(a,s)&&j(a,n,n.next,s)&&S(a,s)&&S(s,a)&&(t.push(a.i/i),t.push(n.i/i),t.push(s.i/i),R(n),R(n.next),n=e=s),n=n.next}while(n!==e);return r(n)}function o(e,t,n,a,s,o){var c=e;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&O(c,l)){var u=A(c,l);return c=r(c,c.next),u=r(u,u.next),i(c,t,n,a,s,o),void i(u,t,n,a,s,o)}l=l.next}c=c.next}while(c!==e)}function c(e,i,n,a){var s,o,c,u=[];for(s=0,o=i.length;s<o;s++)(c=t(e,i[s]*a,s<o-1?i[s+1]*a:e.length,a,!1))===c.next&&(c.steiner=!0),u.push(g(c));for(u.sort(l),s=0;s<u.length;s++)n=r(n=d(u[s],n),n.next);return n}function l(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function d(e,t){var i=h(e,t);if(!i)return t;var n=A(i,e),a=r(i,i.next);let s=u(n);return r(s,s.next),a=u(a),u(t===i?a:t)}function h(e,t){var r,i=t,n=e.x,a=e.y,s=-1/0;do{if(a<=i.y&&a>=i.next.y&&i.next.y!==i.y){var o=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(o<=n&&o>s){if(s=o,o===n){if(a===i.y)return i;if(a===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==t);if(!r)return null;if(n===s)return r;var c,l=r,u=r.x,d=r.y,h=1/0;i=r;do{n>=i.x&&i.x>=u&&n!==i.x&&y(a<d?n:s,a,u,d,a<d?s:n,a,i.x,i.y)&&(c=Math.abs(a-i.y)/(n-i.x),S(i,e)&&(c<h||c===h&&(i.x>r.x||i.x===r.x&&p(r,i)))&&(r=i,h=c)),i=i.next}while(i!==l);return r}function p(e,t){return v(e.prev,e,t.prev)<0&&v(t.next,e,e.next)<0}function f(e,t,r,i){var n=e;do{null===n.z&&(n.z=m(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,b(n)}function b(e){var t,r,i,n,a,s,o,c,l=1;do{for(r=e,e=null,a=null,s=0;r;){for(s++,i=r,o=0,t=0;t<l&&(o++,i=i.nextZ);t++);for(c=l;o>0||c>0&&i;)0!==o&&(0===c||!i||r.z<=i.z)?(n=r,r=r.nextZ,o--):(n=i,i=i.nextZ,c--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;r=i}a.nextZ=null,l*=2}while(s>1);return e}function m(e,t,r,i,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function y(e,t,r,i,n,a,s,o){return(n-s)*(t-o)-(e-s)*(a-o)>=0&&(e-s)*(i-o)-(r-s)*(t-o)>=0&&(r-s)*(a-o)-(n-s)*(i-o)>=0}function O(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!T(e,t)&&(S(e,t)&&S(t,e)&&E(e,t)&&(v(e.prev,e,t.prev)||v(e,t.prev,t))||_(e,t)&&v(e.prev,e,e.next)>0&&v(t.prev,t,t.next)>0)}function v(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function _(e,t){return e.x===t.x&&e.y===t.y}function j(e,t,r,i){var n=x(v(e,t,r)),a=x(v(e,t,i)),s=x(v(r,i,e)),o=x(v(r,i,t));return n!==a&&s!==o||!(0!==n||!w(e,r,t))||!(0!==a||!w(e,i,t))||!(0!==s||!w(r,e,i))||!(0!==o||!w(r,t,i))}function w(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function x(e){return e>0?1:e<0?-1:0}function T(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&j(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function S(e,t){return v(e.prev,e,e.next)<0?v(e,t,e.next)>=0&&v(e,e.prev,t)>=0:v(e,t,e.prev)<0||v(e,e.next,t)<0}function E(e,t){var r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==e);return i}function A(e,t){var r=new M(e.i,e.x,e.y),i=new M(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function C(e,t,r,i){var n=new M(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function R(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(e,t,r,i){for(var n=0,a=t,s=r-i;a<r;a+=i)n+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return n}return e.deviation=function(e,t,r,i){var n=t&&t.length,a=n?t[0]*r:e.length,s=Math.abs(P(e,0,a,r));if(n)for(var o=0,c=t.length;o<c;o++){var l=t[o]*r,u=o<c-1?t[o+1]*r:e.length;s-=Math.abs(P(e,l,u,r))}var d=0;for(o=0;o<i.length;o+=3){var h=i[o]*r,p=i[o+1]*r,f=i[o+2]*r;d+=Math.abs((e[h]-e[f])*(e[p+1]-e[h+1])-(e[h]-e[p])*(e[f+1]-e[h+1]))}return 0===s&&0===d?0:Math.abs((d-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},i=0,n=0;n<e.length;n++){for(var a=0;a<e[n].length;a++)for(var s=0;s<t;s++)r.vertices.push(e[n][a][s]);n>0&&(i+=e[n-1].length,r.holes.push(i))}return r},e},void 0!==(a=n())&&(i.exports=a);const o=s.exports},"997b":function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),s=r("d4e6");const o=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return Object(i["a"])([Object(n["b"])({type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:!0}}}})],t.prototype,"blendMode",void 0),Object(i["a"])([Object(n["b"])({json:{read:!1,write:!1,origins:{"web-map":{read:{reader:s["b"]},write:{allowNull:!0,writer:s["c"]}}}}})],t.prototype,"effect",void 0),t=Object(i["a"])([Object(a["a"])("esri.layers.mixins.BlendLayer")],t),t}},9990:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return u}));var i=r("b2b2"),n=r("a915"),a=r("3349"),s=r("e431"),o=r("7361");function c(e,t,r){return l(e,e.screenToRender(t,Object(n["b"])(o["d"].get())),r)}function l(e,t,r){const c=Object(n["b"])(Object(a["c"])(o["d"].get(),t));if(c[2]=0,!e.unprojectFromRenderScreen(c,r.origin))return null;const l=Object(n["b"])(Object(a["c"])(o["d"].get(),t));l[2]=1;const u=e.unprojectFromRenderScreen(l,o["d"].get());return Object(i["j"])(u)?null:(Object(s["l"])(r.direction,u,r.origin),r)}function u(e,t,r){return d(e,e.screenToRender(t,Object(n["b"])(o["d"].get())),r)}function d(e,t,r){Object(s["m"])(r.origin,e.eye);const n=Object(s["y"])(o["d"].get(),t[0],t[1],1),a=e.unprojectFromRenderScreen(n,o["d"].get());return Object(i["j"])(a)?null:(Object(s["l"])(r.direction,a,r.origin),r)}},"99f3":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("1a3e")),c=r("d386"),l=r("82e4");let u=i=class extends a["a"]{constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.value=null}castValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:""+e}clone(){return new i({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol&&this.symbol.toJSON());return`${this.value}.${e}`}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],u.prototype,"description",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],u.prototype,"label",void 0),Object(n["a"])([Object(s["b"])(l["b"])],u.prototype,"symbol",void 0),Object(n["a"])([Object(s["b"])({json:{type:String,write:{writer:(e,t)=>{t.value=null==e?void 0:e.toString()}}}})],u.prototype,"value",void 0),Object(n["a"])([Object(o["a"])("value")],u.prototype,"castValue",null),u=i=Object(n["a"])([Object(c["a"])("esri.renderers.support.UniqueValueInfo")],u);const d=u},"9a68":function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return y}));var i=r("a05b"),n=r("d272"),a=r("e6aa"),s=r("c2d1"),o=r("d047"),c=r("6750"),l=r("c6d7"),u=r("c51b"),d=r("ebd5"),h=r("4377"),p=r("3886"),f=r("690a"),b=r("b7bd");const m=1;var g;function y(e){const t=new f["a"],r=e.capType!==g.BUTT,y=e.capType===g.ROUND,O=e.stippleEnabled&&y,v=e.falloffEnabled||O,_=e.innerColorEnabled||y,j=e.stippleEnabled&&e.stippleScaleWithLineWidth||y,w=e.stippleEnabled&&e.stippleScaleWithLineWidth,x=e.stippleEnabled||y;return t.include(u["a"]),t.include(a["a"],e),t.include(c["a"],{...e,stippleRequiresStretchMeasure:!0}),e.output===i["a"].Depth&&t.include(s["a"],e),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("nearFar","vec2").add("pixelRatio","float").add("miterLimit","float").add("screenSize","vec2").add("inverseProjectionMatrix","mat4"),t.vertex.constants.add("LARGE_HALF_FLOAT","float",65500),t.attributes.add(b["a"].POSITION,"vec3"),t.attributes.add(b["a"].SUBDIVISIONFACTOR,"float"),t.attributes.add(b["a"].UV0,"vec2"),t.attributes.add(b["a"].AUXPOS1,"vec3"),t.attributes.add(b["a"].AUXPOS2,"vec3"),t.varyings.add("vColor","vec4"),t.varyings.add("vpos","vec3"),t.varyings.add("linearDepth","float"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),j&&t.varyings.add("vLineWidth","float"),w&&t.varyings.add("vLineSizeInv","float"),_&&t.varyings.add("vLineDistance","float"),v&&t.varyings.add("vLineDistanceNorm","float"),e.falloffEnabled&&t.fragment.uniforms.add("falloff","float"),e.innerColorEnabled&&(t.fragment.uniforms.add("innerColor","vec4"),t.fragment.uniforms.add("innerWidth","float")),y&&(t.varyings.add("vSegmentSDF","float"),t.varyings.add("vReverseSegmentSDF","float")),t.vertex.code.add(p["a"]`#define PERPENDICULAR(v) vec2(v.y, -v.x);
  2125. float interp(float ncp, vec4 a, vec4 b) {
  2126. return (-ncp - a.z) / (b.z - a.z);
  2127. }
  2128. vec2 rotate(vec2 v, float a) {
  2129. float s = sin(a);
  2130. float c = cos(a);
  2131. mat2 m = mat2(c, -s, s, c);
  2132. return m * v;
  2133. }`),t.vertex.code.add(p["a"]`vec4 projectAndScale(vec4 pos) {
  2134. vec4 posNdc = proj * pos;
  2135. posNdc.xy *= screenSize / posNdc.w;
  2136. return posNdc;
  2137. }`),t.vertex.code.add(p["a"]`
  2138. void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {
  2139. float vnp = nearFar[0] * 0.99;
  2140. if(pos.z > -nearFar[0]) {
  2141. //current pos behind ncp --> we need to clip
  2142. if (!isStartVertex) {
  2143. if(prev.z < -nearFar[0]) {
  2144. //previous in front of ncp
  2145. pos = mix(prev, pos, interp(vnp, prev, pos));
  2146. next = pos;
  2147. } else {
  2148. pos = vec4(0.0, 0.0, 0.0, 1.0);
  2149. }
  2150. } else {
  2151. if(next.z < -nearFar[0]) {
  2152. //next in front of ncp
  2153. pos = mix(pos, next, interp(vnp, pos, next));
  2154. prev = pos;
  2155. } else {
  2156. pos = vec4(0.0, 0.0, 0.0, 1.0);
  2157. }
  2158. }
  2159. } else {
  2160. //current position visible
  2161. if (prev.z > -nearFar[0]) {
  2162. //previous behind ncp
  2163. prev = mix(pos, prev, interp(vnp, pos, prev));
  2164. }
  2165. if (next.z > -nearFar[0]) {
  2166. //next behind ncp
  2167. next = mix(next, pos, interp(vnp, next, pos));
  2168. }
  2169. }
  2170. ${e.multipassTerrainEnabled?"depth = pos.z;":""}
  2171. linearDepth = (-pos.z - nearFar[0]) / (nearFar[1] - nearFar[0]);
  2172. pos = projectAndScale(pos);
  2173. next = projectAndScale(next);
  2174. prev = projectAndScale(prev);
  2175. }
  2176. `),t.vertex.code.add(p["a"]`
  2177. void main(void) {
  2178. // unpack values from uv0.y
  2179. bool isStartVertex = abs(abs(uv0.y)-3.0) == 1.0;
  2180. float coverage = 1.0;
  2181. // Check for special value of uv0.y which is used by the Renderer when graphics
  2182. // are removed before the VBO is recompacted. If this is the case, then we just
  2183. // project outside of clip space.
  2184. if (uv0.y == 0.0) {
  2185. // Project out of clip space
  2186. gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
  2187. }
  2188. else {
  2189. bool isJoin = abs(uv0.y) < 3.0;
  2190. float lineSize = getSize();
  2191. float lineWidth = lineSize * pixelRatio;
  2192. ${j?p["a"]`vLineWidth = lineWidth;`:""}
  2193. ${w?p["a"]`vLineSizeInv = 1.0 / lineSize;`:""}
  2194. // convert sub-pixel coverage to alpha
  2195. if (lineWidth < 1.0) {
  2196. coverage = lineWidth;
  2197. lineWidth = 1.0;
  2198. }else{
  2199. // Ribbon lines cannot properly render non-integer sizes. Round width to integer size if
  2200. // larger than one for better quality. Note that we do render < 1 pixels more or less correctly
  2201. // so we only really care to round anything larger than 1.
  2202. lineWidth = floor(lineWidth + 0.5);
  2203. }
  2204. vec4 pos = view * vec4(position.xyz, 1.0);
  2205. vec4 prev = view * vec4(auxpos1.xyz, 1.0);
  2206. vec4 next = view * vec4(auxpos2.xyz, 1.0);
  2207. clipAndTransform(pos, prev, next, isStartVertex);
  2208. vec2 left = (pos.xy - prev.xy);
  2209. vec2 right = (next.xy - pos.xy);
  2210. float leftLen = length(left);
  2211. float rightLen = length(right);
  2212. `),x&&t.vertex.code.add(p["a"]`
  2213. float isEndVertex = float(!isStartVertex);
  2214. vec2 segmentOrigin = mix(pos.xy, prev.xy, isEndVertex);
  2215. vec2 segment = mix(right, left, isEndVertex);
  2216. ${y?p["a"]`vec2 segmentEnd = mix(next.xy, pos.xy, isEndVertex);`:""}
  2217. `),t.vertex.code.add(p["a"]`left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);
  2218. right = (rightLen > 0.001) ? right/rightLen : vec2(0.0, 0.0);
  2219. vec2 capDisplacementDir = vec2(0, 0);
  2220. vec2 joinDisplacementDir = vec2(0, 0);
  2221. float displacementLen = lineWidth;
  2222. if (isJoin) {
  2223. bool isOutside = (left.x * right.y - left.y * right.x) * uv0.y > 0.0;
  2224. joinDisplacementDir = normalize(left + right);
  2225. joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);
  2226. if (leftLen > 0.001 && rightLen > 0.001) {
  2227. float nDotSeg = dot(joinDisplacementDir, left);
  2228. displacementLen /= length(nDotSeg * left - joinDisplacementDir);
  2229. if (!isOutside) {
  2230. displacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));
  2231. }
  2232. }
  2233. if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),e.roundJoins?t.vertex.code.add(p["a"]`
  2234. vec2 startDir = leftLen < 0.001 ? right : left;
  2235. startDir = PERPENDICULAR(startDir);
  2236. vec2 endDir = rightLen < 0.001 ? left : right;
  2237. endDir = PERPENDICULAR(endDir);
  2238. float factor = ${e.stippleEnabled?p["a"]`min(1.0, subdivisionFactor * ${p["a"].float((m+2)/(m+1))})`:p["a"]`subdivisionFactor`};
  2239. float rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));
  2240. joinDisplacementDir = rotate(startDir, -sign(uv0.y) * factor * rotationAngle);
  2241. `):t.vertex.code.add(p["a"]`if (leftLen < 0.001) {
  2242. joinDisplacementDir = right;
  2243. }
  2244. else if (rightLen < 0.001) {
  2245. joinDisplacementDir = left;
  2246. }
  2247. else {
  2248. joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? right : left;
  2249. }
  2250. joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);`),t.vertex.code.add(p["a"]`
  2251. displacementLen = lineWidth;
  2252. }
  2253. } else {
  2254. // CAP handling ---------------------------------------------------
  2255. joinDisplacementDir = isStartVertex ? right : left;
  2256. joinDisplacementDir = PERPENDICULAR(joinDisplacementDir);
  2257. ${r?p["a"]`capDisplacementDir = isStartVertex ? -right : left;`:""}
  2258. }
  2259. `),t.vertex.code.add(p["a"]`
  2260. // Displacement (in pixels) caused by join/or cap
  2261. vec2 dpos = joinDisplacementDir * sign(uv0.y) * displacementLen + capDisplacementDir * displacementLen;
  2262. ${v||_?p["a"]`float lineDistNorm = sign(uv0.y) * pos.w;`:""}
  2263. ${_?p["a"]`vLineDistance = lineWidth * lineDistNorm;`:""}
  2264. ${v?p["a"]`vLineDistanceNorm = lineDistNorm;`:""}
  2265. pos.xy += dpos;
  2266. `),y&&t.vertex.code.add(p["a"]`vec2 segmentDir = normalize(segment);
  2267. vSegmentSDF = (isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin, segmentDir) * pos.w) ;
  2268. vReverseSegmentSDF = (isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir) * pos.w);`),e.stippleEnabled&&(e.draped||t.vertex.code.add(p["a"]`vec3 segmentCenter = mix((auxpos2 + position) * 0.5, (position + auxpos1) * 0.5, isEndVertex);
  2269. float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),t.vertex.code.add(p["a"]`float segmentLengthScreenDouble = length(segment);
  2270. float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
  2271. float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);
  2272. float segmentLengthRender = length(mix(auxpos2 - position, position - auxpos1, isEndVertex));
  2273. vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),e.draped?t.vertex.code.add(p["a"]`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
  2274. float startPseudoScreen = uv0.x * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):t.vertex.code.add(p["a"]`float startPseudoScreen = mix(uv0.x, uv0.x - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
  2275. float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),t.vertex.code.add(p["a"]`
  2276. float patternLength = ${e.stippleScaleWithLineWidth?"lineSize * ":""} stipplePatternPixelSize;
  2277. // Compute the coordinates at both start and end of the line segment, because we need both to clamp to in the fragment shader
  2278. vStippleDistanceLimits = computeStippleDistanceLimits(startPseudoScreen, segmentLengthPseudoScreen, segmentLengthScreen, patternLength);
  2279. vStippleDistance = mix(vStippleDistanceLimits.x, vStippleDistanceLimits.y, isEndVertex);
  2280. // Adjust the coordinate to the displaced position (the pattern is shortened/overextended on the in/outside of joins)
  2281. if (segmentLengthScreenDouble >= 0.001) {
  2282. // Project the actual vertex position onto the line segment. Note that the resulting factor is within [0..1] at the
  2283. // original vertex positions, and slightly outside of that range at the displaced positions
  2284. vec2 stippleDisplacement = pos.xy - segmentOrigin;
  2285. float stippleDisplacementFactor = dot(segment, stippleDisplacement) / (segmentLengthScreenDouble * segmentLengthScreenDouble);
  2286. // Apply this offset to the actual vertex coordinate (can be screen or pseudo-screen space)
  2287. vStippleDistance += (stippleDisplacementFactor - isEndVertex) * (vStippleDistanceLimits.y - vStippleDistanceLimits.x);
  2288. }
  2289. // Cancel out perspective correct interpolation because we want this length the really represent the screen distance
  2290. vStippleDistanceLimits *= pos.w;
  2291. vStippleDistance *= pos.w;
  2292. // Disable stipple distance limits on caps
  2293. vStippleDistanceLimits = isJoin ?
  2294. vStippleDistanceLimits :
  2295. isStartVertex ?
  2296. vec2(-1e038, vStippleDistanceLimits.y) :
  2297. vec2(vStippleDistanceLimits.x, 1e038);
  2298. `)),t.vertex.code.add(p["a"]`
  2299. // Convert back into NDC
  2300. pos.xy = (pos.xy / screenSize) * pos.w;
  2301. vColor = getColor();
  2302. vColor.a *= coverage;
  2303. ${e.wireframe&&!e.draped?"pos.z -= 0.001 * pos.w;":""}
  2304. // transform final position to camera space for slicing
  2305. vpos = (inverseProjectionMatrix * pos).xyz;
  2306. gl_Position = pos;
  2307. }
  2308. }
  2309. `),e.multipassTerrainEnabled&&(t.fragment.include(o["a"]),t.include(l["b"],e)),t.include(n["a"],e),t.fragment.uniforms.add("intrinsicColor","vec4"),t.fragment.include(h["a"]),t.fragment.code.add(p["a"]`
  2310. void main() {
  2311. discardBySlice(vpos);
  2312. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  2313. `),e.wireframe?t.fragment.code.add(p["a"]`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(y&&t.fragment.code.add(p["a"]`
  2314. float sdf = min(vSegmentSDF, vReverseSegmentSDF);
  2315. vec2 fragmentPosition = vec2(
  2316. min(sdf, 0.0),
  2317. vLineDistance
  2318. ) * gl_FragCoord.w;
  2319. float fragmentRadius = length(fragmentPosition);
  2320. float fragmentCapSDF = (fragmentRadius - vLineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
  2321. float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
  2322. if (capCoverage < ${p["a"].float(d["c"])}) {
  2323. discard;
  2324. }
  2325. `),O?t.fragment.code.add(p["a"]`
  2326. vec2 stipplePosition = vec2(
  2327. min(getStippleSDF() * 2.0 - 1.0, 0.0),
  2328. vLineDistanceNorm * gl_FragCoord.w
  2329. );
  2330. float stippleRadius = length(stipplePosition * vLineWidth);
  2331. float stippleCapSDF = (stippleRadius - vLineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
  2332. float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
  2333. float stippleAlpha = step(${p["a"].float(d["c"])}, stippleCoverage);
  2334. `):t.fragment.code.add(p["a"]`float stippleAlpha = getStippleAlpha();`),t.fragment.code.add(p["a"]`discardByStippleAlpha(stippleAlpha, stippleAlphaColorDiscard);
  2335. vec4 color = intrinsicColor * vColor;`),e.innerColorEnabled&&t.fragment.code.add(p["a"]`float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;
  2336. float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
  2337. float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
  2338. color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),t.fragment.code.add(p["a"]`vec4 finalColor = blendStipple(color, stippleAlpha);`),e.falloffEnabled&&t.fragment.code.add(p["a"]`finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);`)),t.fragment.code.add(p["a"]`
  2339. if (finalColor.a < ${p["a"].float(d["c"])}) {
  2340. discard;
  2341. }
  2342. ${e.output===i["a"].Alpha?p["a"]`gl_FragColor = vec4(finalColor.a);`:""}
  2343. ${e.output===i["a"].Color?p["a"]`gl_FragColor = highlightSlice(finalColor, vpos);`:""}
  2344. ${e.output===i["a"].Color&&e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  2345. ${e.output===i["a"].Highlight?p["a"]`gl_FragColor = vec4(1.0);`:""}
  2346. ${e.output===i["a"].Depth?p["a"]`outputDepth(linearDepth);`:""}
  2347. }
  2348. `),t}!function(e){e[e.BUTT=0]="BUTT",e[e.SQUARE=1]="SQUARE",e[e.ROUND=2]="ROUND",e[e.COUNT=3]="COUNT"}(g||(g={}));const O=Object.freeze({__proto__:null,NUM_ROUND_JOIN_SUBDIVISIONS:m,get CapType(){return g},build:y})},"9a81":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("a915"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386"));let l=i=class extends a["a"]{constructor(e){super(e),this.label=null,this.size=null,this.value=null}clone(){return new i({label:this.label,size:this.size,value:this.value})}};Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],l.prototype,"label",void 0),Object(n["a"])([Object(o["b"])({type:Number,cast:s["j"],json:{write:!0}})],l.prototype,"size",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],l.prototype,"value",void 0),l=i=Object(n["a"])([Object(c["a"])("esri.renderers.visualVariables.support.SizeStop")],l);const u=l},"9ac8":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));r("c120");var i=r("caf7");function n(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}function a(e,t){const r=(e,r,n=!1)=>({levels:e.map(e=>{const a=r(e.tesselation);return n&&i["a"].cgToGIS(a),{components:[{geometry:a,material:t}],faceCount:a.indexCount/3,minScreenSpaceRadius:e.minScreenSpaceRadius}})});switch(e){case"sphere":return r([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>i["a"].createPolySphereGeometry(.5,e,!0));case"cube":return r([{tesselation:0,minScreenSpaceRadius:0}],()=>i["a"].createBoxGeometry(1));case"cone":return r(s,e=>i["a"].createConeGeometry(1,.5,e,!1),!0);case"inverted-cone":return r(s,e=>i["a"].createConeGeometry(1,.5,e,!0),!0);case"cylinder":return r(s,e=>i["a"].createCylinderGeometry(1,.5,e,[0,0,1],[0,0,.5]));case"tetrahedron":return r([{tesselation:0,minScreenSpaceRadius:0}],()=>i["a"].createTetrahedronGeometry(1),!0);case"diamond":return r([{tesselation:0,minScreenSpaceRadius:0}],()=>i["a"].createDiamondGeometry(1),!0);default:return}}const s=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}]},"9b40":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("8048"),n=r("2255");const a={inches:Object(i["c"])(1,"meters","inches"),feet:Object(i["c"])(1,"meters","feet"),"us-feet":Object(i["c"])(1,"meters","us-feet"),yards:Object(i["c"])(1,"meters","yards"),miles:Object(i["c"])(1,"meters","miles"),"nautical-miles":Object(i["c"])(1,"meters","nautical-miles"),millimeters:Object(i["c"])(1,"meters","millimeters"),centimeters:Object(i["c"])(1,"meters","centimeters"),decimeters:Object(i["c"])(1,"meters","decimeters"),meters:Object(i["c"])(1,"meters","meters"),kilometers:Object(i["c"])(1,"meters","kilometers"),"decimal-degrees":1/Object(i["l"])(1,"meters",n["a"].radius)}},"9b86":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("b50f");class n{constructor(e,t){this._observers=e,this._observer=t}remove(){Object(i["j"])(this._observers,this._observer)}}},"9b8b":function(e,t,r){"use strict";var i,n,a,s,o;r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return o})),function(e){e[e.INNER=0]="INNER",e[e.OUTER=1]="OUTER"}(i||(i={})),function(e){e[e.REGULAR=0]="REGULAR",e[e.HAS_NORTH_POLE=1]="HAS_NORTH_POLE",e[e.HAS_SOUTH_POLE=2]="HAS_SOUTH_POLE",e[e.HAS_BOTH_POLES=3]="HAS_BOTH_POLES"}(n||(n={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(a||(a={})),function(e){e[e.Color=0]="Color",e[e.ColorNoRasterImage=1]="ColorNoRasterImage",e[e.Highlight=2]="Highlight",e[e.Water=3]="Water",e[e.Occluded=4]="Occluded"}(s||(s={})),function(e){e[e.FADING=0]="FADING",e[e.IMMEDIATE=1]="IMMEDIATE",e[e.UNFADED=2]="UNFADED"}(o||(o={}))},"9b9d":function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(e){super(e),this.altText=null,this.caption="",this.title="",this.type=null}};Object(i["a"])([Object(a["b"])({type:String,json:{write:!0}})],o.prototype,"altText",void 0),Object(i["a"])([Object(a["b"])({type:String,json:{write:!0}})],o.prototype,"caption",void 0),Object(i["a"])([Object(a["b"])({type:String,json:{write:!0}})],o.prototype,"title",void 0),Object(i["a"])([Object(a["b"])({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=Object(i["a"])([Object(s["a"])("esri.popup.content.mixins.MediaInfo")],o);const c=o},"9c4c":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return c}));var i,n=r("c120");!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(i||(i={}));let a=0;function s(){return a++}function o(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}function c(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function l(e,t,r,n){if(t.type===i.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==i.INVOKE&&t.type!==i.RESPONSE)return void e.postMessage(t);let a;o(r)?(a=d(r.transferList),t.data=r.result):(a=d(n),t.data=r),a?e.postMessage(t,a):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function d(e){if(!e||!e.length)return null;if(Object(n["a"])("esri-workers-arraybuffer-transfer"))return e;const t=e.filter(e=>!h(e));return t.length?t:null}function h(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}},"9cc4":function(e,t,r){"use strict";function i(e,t,r){for(let i=0;i<r;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function n(e,t,r,n){for(let o=0;o<n;++o)a[0]=e[o],i(a,s,1),t[o]=s[0],r[o]=s[1]}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));const a=new Float64Array(1),s=new Float32Array(2)},"9d1d":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s}));var i=r("7ffa");function n(e,t,r=!1){return c(e,t,r)}function a(e,t){if(null!=t)return t[e]||o(e.split("."),!1,t)}function s(e,t,r){const i=e.split("."),n=i.pop(),a=o(i,!0,r);a&&n&&(a[n]=t)}function o(e,t,r){let i=r;for(const n of e){if(null==i)return;if(!(n in i)){if(!t)return;i[n]={}}i=i[n]}return i}function c(e,t,r){return t?Object.keys(t).reduce((function(e,n){let a=e[n],s=t[n];return a===s?e:void 0===a?(e[n]=Object(i["a"])(s),e):(Array.isArray(s)||Array.isArray(e)?(a=a?Array.isArray(a)?e[n]=a.concat():e[n]=[a]:e[n]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach(e=>{-1===a.indexOf(e)&&a.push(e)}):e[n]=s.concat())):s&&"object"==typeof s?e[n]=c(a,s,r):e.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(e[n]=s),e)}),e||{}):e}},"9d83":function(e,t,r){"use strict";function i(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function n(e,t,r){if(!i(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const i=t.slice();for(const t of i)e.addEventListener(t,r);return{remove(){for(const t of i)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function a(e,t,r){if(!i(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const a=n(e,t,t=>{a.remove(),r.call(e,t)});return{remove(){a.remove()}}}r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return a}));const s={Win:"Meta",Scroll:"ScrollLock",Spacebar:" ",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Del:"Delete",Apps:"ContextMenu",Esc:"Escape",Multiply:"*",Add:"+",Subtract:"-",Decimal:".",Divide:"/"};function o({key:e}){return s[e]||e}},"9d9d":function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return s}));var i=r("4c37");function n(e,t){const r="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.getItemAt(e)}const n=Object(i["a"])(t);return Object(i["b"])(n,r)?n.get(r):t[r]}function a(e,t,r){if(null==e)return e;const i=n(t[r],e);return!i&&r<t.length-1?void 0:r===t.length-1?i:a(i,t,r+1)}function s(e,t,r=0){return"string"==typeof t&&-1===t.indexOf(".")?n(t,e):a(e,Object(i["f"])(t),r)}function o(e,t){return s(e,t)}function c(e,t){return void 0!==s(t,e)}},"9def":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("fdc9b");function n(e){const t=new Map,r=e=>{let r=t.get(e);return r||(r=new i["b"],t.set(e,r)),r};return e.removes.forAll(e=>{a(e)&&r(e.material).removes.push(e)}),e.adds.forAll(e=>{a(e)&&r(e.material).adds.push(e)}),e.updates.forAll(e=>{a(e.renderGeometry)&&r(e.renderGeometry.material).updates.push(e)}),t}function a(e){return e.data.indexCount>=1}},"9ef0":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("eb37"),n=r("38a4"),a=r("b2b2"),s=r("cea0");function o(e){return Object(n["f"])(Object(s["e"])(e),0,255)}function c(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class l{constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}static blendColors(e,t,r,i=new l){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(r[3]=parseFloat(e[3])),l.fromArray(r,t)}return l.fromArray(e.map(e=>parseFloat(e)),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l.fromArray(Object(i["d"])(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new l){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,i=(1<<r)-1;let n=Number("0x"+e.substr(1));return isNaN(n)?null:(["b","g","r"].forEach(e=>{const a=n&i;n>>=r,t[e]=4===r?17*a:a}),t.a=1,t)}static fromArray(e,t=new l){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=Object(i["e"])(e)?Object(i["a"])(e):null;return r&&l.fromArray(r,t)||l.fromRgb(e,t)||l.fromHex(e,t)}static fromJSON(e){return e&&new l([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return Object(a["k"])(e)?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return Object(a["k"])(e)?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){if("string"==typeof e)l.fromString(e,this);else if(Array.isArray(e))l.fromArray(e,this);else{var t,r,i,n;this._set(null!=(t=e.r)?t:0,null!=(r=e.g)?r:0,null!=(i=e.b)?i:0,null!=(n=e.a)?n:1),e instanceof l||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=l.AlphaMode.ALWAYS){const t=o(this.r),r=o(this.g),i=o(this.b);return e===l.AlphaMode.ALWAYS||1!==this.a?[t,r,i,o(255*this.a)]:[t,r,i]}clone(){return new l(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return Object(a["k"])(e)&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(c(this.r,0,255)),this.g=Math.round(c(this.g,0,255)),this.b=Math.round(c(this.b,0,255)),this.a=c(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}l.prototype.declaredClass="esri.Color",function(e){var t;(t=e.AlphaMode||(e.AlphaMode={}))[t.ALWAYS=0]="ALWAYS",t[t.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"}(l||(l={}));const u=l},"9efb":function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return c}));var i=r("c0d3"),n=r("cb26");let a=!1;const s=[];function o(e,t){let r=new n["a"](c),s=null,o=!1;function c(){if(!r||o)return;if(a)return void u(c);const n=s;r.clear(),a=!0,o=!0,s=Object(i["b"])(r,e),o=!1,a=!1,t(s,n),d()}function l(){r&&(r.destroy(),r=null,s=null)}return o=!0,s=Object(i["b"])(r,e),o=!1,{remove:l}}function c(e,t){let r=new n["a"](s),a=null;function s(){t(a,c)}function o(){r&&(r.destroy(),r=null),a=null}function c(){return r?(r.clear(),a=Object(i["b"])(r,e),a):null}return c(),{remove:o}}function l(e){let t=new n["a"](s),r=!1;function s(){t&&!r&&(a?u(s):(t.clear(),a=!0,r=!0,Object(i["b"])(t,e),r=!1,a=!1,d()))}function o(){t&&(t.destroy(),t=null)}return r=!0,Object(i["b"])(t,e),r=!1,{remove:o}}function u(e){s.includes(e)||s.unshift(e)}function d(){for(;s.length;)s.pop()()}},"9f91":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("7ffa"),c=r("59b2"),l=(r("cea0"),r("448d")),u=r("d386"),d=r("8802");let h=i=class extends s["a"]{constructor(e){super(e),this.fieldName=null,this.format=null,this.isEditable=!1,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new i({fieldName:this.fieldName,format:this.format?Object(o["a"])(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],h.prototype,"fieldName",void 0),Object(n["a"])([Object(c["b"])({type:d["a"],json:{write:!0}})],h.prototype,"format",void 0),Object(n["a"])([Object(c["b"])({type:Boolean,json:{write:!0,default:!1}})],h.prototype,"isEditable",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],h.prototype,"label",void 0),Object(n["a"])([Object(l["a"])(new a["a"]({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],h.prototype,"stringFieldOption",void 0),Object(n["a"])([Object(c["b"])({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],h.prototype,"statisticType",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],h.prototype,"tooltip",void 0),Object(n["a"])([Object(c["b"])({type:Boolean,json:{write:!0}})],h.prototype,"visible",void 0),h=i=Object(n["a"])([Object(u["a"])("esri.popup.FieldInfo")],h);const p=h},"9fab":function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("2c4f"),s=r("7ffa"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("c528"),d=r("a957"),h=r("38bf"),p=r("333a");const f=a["a"].ofType({base:null,key:"type",typeMap:{text:d["a"]}});let b=i=class extends u["a"]{constructor(e){super(e),this.verticalOffset=null,this.callout=null,this.styleOrigin=null,this.symbolLayers=new f,this.type="label-3d"}supportsCallout(){return!0}hasVisibleCallout(){return Object(h["c"])(this)}hasVisibleVerticalOffset(){return Object(h["d"])(this)}clone(){return new i({styleOrigin:Object(s["a"])(this.styleOrigin),symbolLayers:Object(s["a"])(this.symbolLayers),thumbnail:Object(s["a"])(this.thumbnail),callout:Object(s["a"])(this.callout),verticalOffset:Object(s["a"])(this.verticalOffset)})}static fromTextSymbol(e){return new i({symbolLayers:[d["a"].fromTextSymbol(e)]})}};Object(n["a"])([Object(o["b"])({type:p["a"],json:{write:!0}})],b.prototype,"verticalOffset",void 0),Object(n["a"])([Object(o["b"])(h["a"])],b.prototype,"callout",void 0),Object(n["a"])([Object(o["b"])({json:{read:!1,write:!1}})],b.prototype,"styleOrigin",void 0),Object(n["a"])([Object(o["b"])({type:f})],b.prototype,"symbolLayers",void 0),Object(n["a"])([Object(c["a"])({LabelSymbol3D:"label-3d"},{readOnly:!0})],b.prototype,"type",void 0),b=i=Object(n["a"])([Object(l["a"])("esri.symbols.LabelSymbol3D")],b);const m=b},a03d:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return c})),r.d(t,"h",(function(){return u})),r.d(t,"i",(function(){return p}));var i=r("b2b2"),n=r("8a44");class a{constructor(){this._queue=new n["a"],this._last=null,this.remove=()=>{}}get done(){return 0===this._queue.length&&(!this._last||this._last.isLeaf)}resetOne(e){this._queue.clear(),this._queue.push(e),this._last=null}reset(e=null){this._queue.clear(),Object(i["k"])(e)&&this._queue.pushArray(e),this._last=null}skipSubtree(){this._last=null}next(){return this._last&&!this._last.isLeaf&&this._queue.pushArray(this._last.children),this._last=this._queue.pop(),this._last}}class s{constructor(){this.q=new n["a"]}get done(){return 0===this.q.length}reset(e){if(this.q.clear(),!Object(i["j"])(e)){this.q.pushArray(e);for(let e=0;e<this.q.length;++e){const t=this.q.data[e];t.isLeaf||this.q.pushArray(t.children)}}}next(){return this.q.pop()}}function o(e,t,r){if(Object(i["j"])(t)||Object(i["j"])(t.fullExtent))return!1;const n=t.fullExtent,a=e.extent;if(r){if(a[0]<n.xmin||a[1]<n.ymin||a[2]>n.xmax||a[3]>n.ymax)return!1}else if(n.xmin>a[2]||n.ymin>a[3]||n.xmax<a[0]||n.ymax<a[1])return!1;const s=e.surface.tilingScheme.levels[e.level].scale;return!(t.minScale>0&&s>1.00000001*t.minScale)&&!(t.maxScale>0&&s<.99999999*t.maxScale)}function c(e,t){t.sort((t,r)=>l(t,r,e))}function l(e,t,r){const i=e.screenDepth,n=t.screenDepth;return i<n?-r:i>n?r:0}function u(e,t){const r=new Map;e.forAll(e=>r.set(e.lij,e.distanceToSquared(t))),e.sort((e,t)=>r.get(e.lij)-r.get(t.lij))}function d(e,t,r){let i=1,n=0,a=0;for(;e!==t;)if(i*=.5,n*=.5,a*=.5,1&e.lij[2]&&(n+=.5),0==(1&e.lij[1])&&(a+=.5),null==(e=e.parent))throw new Error("tile was not a descendant of upsampleTile");r.init(t,n,a,i)}function h(e){for(let t=0;t<e.length;t++){const r=e[t],i=r.parent;if(i)for(let e=0;e<4;e++){const t=i.children[e];if(t&&t!==r&&t.loadable)return!0}}return!1}function p(e,t){if(!e||!t||e[0]===t[0])return!1;const r=e[0]<t[0],i=r?e:t,n=r?t:e,a=1<<n[0]-i[0];return Math.floor(n[1]/a)===i[1]&&Math.floor(n[2]/a)===i[2]}},a05b:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.Color=0]="Color",e[e.Depth=1]="Depth",e[e.Normal=2]="Normal",e[e.Shadow=3]="Shadow",e[e.Highlight=4]="Highlight",e[e.Draped=5]="Draped",e[e.Occlusion=6]="Occlusion",e[e.Alpha=7]="Alpha",e[e.COUNT=8]="COUNT"}(i||(i={}))},a1b1:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s}));var i=r("38a4"),n=r("e431"),a=r("0b2d");function s(e,t){return Object(n["j"])(e,t)/Object(n["r"])(e)}function o(e,t){const r=Object(n["j"])(e,t)/(Object(n["r"])(e)*Object(n["r"])(t));return-Object(i["b"])(r)}function c(e,t,r){Object(n["t"])(l,e),Object(n["t"])(u,t);const a=Object(n["j"])(l,u),s=Object(i["b"])(a),o=Object(n["i"])(l,l,u);return Object(n["j"])(o,r)<0?2*Math.PI-s:s}const l=Object(a["f"])(),u=Object(a["f"])()},a1d1:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var i=r("bb72"),n=r("e9fc"),a=r("2edc"),s=r("69dd");async function o(e,t,r){const i=await c(e,t,r);return a["default"].fromJSON(i)}async function c(e,t,r){const a=Object(i["c"])(e),o={...r},c=s["a"].from(t),{data:l}=await Object(n["executeQuery"])(a,c,c.sourceSpatialReference,o);return l}},a1f3:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0")),l=r("448d"),u=r("afcf"),d=r("d386"),h=r("5970"),p=r("6781");const f=new a["a"]({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let b=i=class extends s["a"]{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let r;try{r=JSON.parse(t)}catch(i){}return r?r.value:null}readValueType(e,{description:t}){let r;try{r=JSON.parse(t)}catch(i){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],b.prototype,"alias",void 0),Object(n["a"])([Object(o["b"])({type:[String,Number],json:{write:{allowNull:!0}}})],b.prototype,"defaultValue",void 0),Object(n["a"])([Object(o["b"])()],b.prototype,"description",void 0),Object(n["a"])([Object(u["a"])("description")],b.prototype,"readDescription",null),Object(n["a"])([Object(o["b"])({types:h["b"],json:{read:{reader:h["a"]},write:!0}})],b.prototype,"domain",void 0),Object(n["a"])([Object(o["b"])({type:Boolean,json:{write:!0}})],b.prototype,"editable",void 0),Object(n["a"])([Object(o["b"])({type:c["a"],json:{write:!0}})],b.prototype,"length",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],b.prototype,"name",void 0),Object(n["a"])([Object(o["b"])({type:Boolean,json:{write:!0}})],b.prototype,"nullable",void 0),Object(n["a"])([Object(l["a"])(p["a"])],b.prototype,"type",void 0),Object(n["a"])([Object(o["b"])()],b.prototype,"valueType",void 0),Object(n["a"])([Object(u["a"])("valueType",["description"])],b.prototype,"readValueType",null),b=i=Object(n["a"])([Object(d["a"])("esri.layers.support.Field")],b);const m=b},a1ff:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));r("c120");var i=r("38a4"),n=r("b2b2"),a=r("1956"),s=r("cc15"),o=r("d17d"),c=r("c514");const l=4;class u{constructor(e,t,r=null){if(this._context=e,this.type="texture",this._glName=null,this._descriptor=void 0,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,e.instanceCounter.increment(o["t"].Texture,this),this._descriptor={target:o["A"].TEXTURE_2D,samplingMode:o["z"].LINEAR,wrapMode:o["B"].REPEAT,flipped:!1,hasMipmap:!1,isOpaque:!1,unpackAlignment:4,preMultiplyAlpha:!1,isImmutable:!1,...t},e.type!==s["a"].WEBGL2&&(this._descriptor.isImmutable&&(this._descriptor.isImmutable=!1),m(this._descriptor.target)))throw new Error("3D and array textures are not supported in WebGL1");this._descriptor.target===o["A"].TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._context.gl&&this._glName&&(this._context.unbindTextureAllUnits(this),this._context.gl.deleteTexture(this._glName),this._glName=null,this._context.instanceCounter.decrement(o["t"].Texture,this))}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new Error("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===o["A"].TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=o["A"].TEXTURE_CUBE_MAP_POSITIVE_X;t<=o["A"].TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(e,t){if(!this._context||!this._context.gl)return;const r=this._context.gl;this._glName||(this._glName=r.createTexture()),void 0===e&&(e=null);const i=this._descriptor;null!=t||(t=i.target);const s=m(t);var o;null===e&&(i.width=i.width||l,i.height=i.height||l,s&&(i.depth=null!=(o=i.depth)?o:1));const d=this._context.bindTexture(this,u.TEXTURE_UNIT_FOR_UPDATES);this._context.setActiveTexture(u.TEXTURE_UNIT_FOR_UPDATES),u._validateTexture(this._context,i),this._configurePixelStorage();const f=i.pixelFormat;let y=i.internalFormat?i.internalFormat:this._deriveInternalFormat(f,i.dataType);if(b(e)){let n=e.width,o=e.height;const c=1;e instanceof HTMLVideoElement&&(n=e.videoWidth,o=e.videoHeight),i.width&&i.height,s&&i.depth,i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,y,i.hasMipmap,n,o,c),this._texImage(t,0,y,n,o,c,e),Object(a["a"])(r),i.hasMipmap&&this.generateMipmap(),void 0===i.width&&(i.width=n),void 0===i.height&&(i.height=o),s&&void 0===i.depth&&(i.depth=c)}else{const{width:o,height:l,depth:u}=i;if(null!=o&&null!=l||console.error("Width and height must be specified!"),s&&null==u&&console.error("Depth must be specified!"),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,y,i.hasMipmap,o,l,u),r.DEPTH24_STENCIL8&&y===r.DEPTH_STENCIL&&(y=r.DEPTH24_STENCIL8),p(e)){const n=e.levels,a=g(t,o,l,u),s=Math.min(a-1,n.length-1);Object(c["a"])(r)?r.texParameteri(i.target,r.TEXTURE_MAX_LEVEL,s):i.hasMipmap=i.hasMipmap&&a===n.length;const d=y;if(!h(d))throw new Error("Attempting to use compressed data with an umcompressed format!");this._forEachMipmapLevel((e,r,i,a)=>{const s=n[Math.min(e,n.length-1)];this._compressedTexImage(t,e,d,r,i,a,s)},s)}else Object(n["k"])(e)?(this._texImage(t,0,y,o,l,u,e),Object(a["a"])(r),i.hasMipmap&&this.generateMipmap()):this._forEachMipmapLevel((e,i,n,s)=>{this._texImage(t,e,y,i,n,s,null),Object(a["a"])(r)})}u._applySamplingMode(r,this._descriptor),u._applyWrapMode(r,this._descriptor),u._applyAnisotropicFilteringParameters(this._context,this._descriptor),Object(a["a"])(r),this._context.bindTexture(d,u.TEXTURE_UNIT_FOR_UPDATES)}updateData(e,t,r,i,n,a){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const s=this._context.gl,o=this._descriptor,{pixelFormat:c,internalFormat:l,dataType:d,isImmutable:h,target:f}=o;if(h&&!this._wasImmutablyAllocated)throw new Error("Cannot update immutable texture before allocation!");const m=this._context.bindTexture(this,u.TEXTURE_UNIT_FOR_UPDATES);(t<0||r<0||i>o.width||n>o.height||t+i>o.width||r+n>o.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage(),b(a)?s.texSubImage2D(f,e,t,r,c,d,a):p(a)?s.compressedTexSubImage2D(f,e,t,r,i,n,l,a.levels[e]):s.texSubImage2D(f,e,t,r,i,n,c,d,a),this._context.bindTexture(m,u.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,i,n,a,s,o){o||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._context.gl;if(!Object(c["a"])(l))throw new Error("3D textures are not supported in WebGL1");const d=this._descriptor,{pixelFormat:h,dataType:f,isImmutable:b,target:g,internalFormat:y}=d;if(b&&!this._wasImmutablyAllocated)throw new Error("Cannot update immutable texture before allocation!");m(g)||console.warn("Attempting to set 3D texture data on a non-3D texture");const O=this._context.bindTexture(this,u.TEXTURE_UNIT_FOR_UPDATES);if(this._context.setActiveTexture(u.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||i<0||n>d.width||a>d.height||s>d.depth||t+n>d.width||r+a>d.height||i+s>d.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage(),p(o))o=o.levels[e],l.compressedTexSubImage3D(g,e,t,r,i,n,a,s,y,o);else{const c=o;l.texSubImage3D(g,e,t,r,i,n,a,s,h,f,c)}this._context.bindTexture(O,u.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new Error("Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,u._validateTexture(this._context,e)}e.samplingMode===o["z"].LINEAR?(this._samplingModeDirty=!0,e.samplingMode=o["z"].LINEAR_MIPMAP_NEAREST):e.samplingMode===o["z"].NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=o["z"].NEAREST_MIPMAP_NEAREST);const t=this._context.bindTexture(this,u.TEXTURE_UNIT_FOR_UPDATES);this._context.setActiveTexture(u.TEXTURE_UNIT_FOR_UPDATES),this._context.gl.generateMipmap(e.target),this._context.bindTexture(t,u.TEXTURE_UNIT_FOR_UPDATES)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,u._validateTexture(this._context,this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._context.gl,t=this._descriptor;this._samplingModeDirty&&(u._applySamplingMode(e,t),this._samplingModeDirty=!1),this._wrapModeDirty&&(u._applyWrapMode(e,t),this._wrapModeDirty=!1)}_deriveInternalFormat(e,t){if(this._context.type===s["a"].WEBGL1)return e;switch(t){case o["q"].FLOAT:switch(e){case o["p"].RGBA:return o["v"].RGBA32F;case o["p"].RGB:return o["v"].RGB32F;default:throw new Error("Unable to derive format")}case o["q"].UNSIGNED_BYTE:switch(e){case o["p"].RGBA:return o["v"].RGBA8;case o["p"].RGB:return o["v"].RGB8}default:return e}}_configurePixelStorage(){const e=this._context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,i,n,a){const s=this._context.gl;if(!Object(c["a"])(s))throw new Error("Immutable textures are not supported in WebGL1");if(!d(t))throw new Error("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const o=r?g(e,i,n,a):1;m(e)?s.texStorage3D(e,o,t,i,n,a):s.texStorage2D(e,o,t,i,n),this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,a,o,c){const l=this._context.gl;let u=null;const d=this._context.type===s["a"].WEBGL2,h=m(e),{isImmutable:p,pixelFormat:f,dataType:g}=this._descriptor;if(d&&(u=l),d||!b(c))if(p){if(Object(n["k"])(c)){const r=c;h?u.texSubImage3D(e,t,0,0,0,i,a,o,f,g,r):l.texSubImage2D(e,t,0,0,i,a,f,g,r)}}else{const s=Object(n["t"])(c);h?u.texImage3D(e,t,r,i,a,o,0,f,g,s):l.texImage2D(e,t,r,i,a,0,f,g,s)}else l.texImage2D(e,0,r,f,g,c)}_compressedTexImage(e,t,r,i,a,o,c){const l=this._context.gl;let u=null;const d=m(e),h=this._descriptor.isImmutable;if(d){if(this._context.type!==s["a"].WEBGL2)throw new Error("3D textures are not supported in WebGL1");u=l}h?Object(n["k"])(c)&&(d?u.compressedTexSubImage3D(e,t,0,0,0,i,a,o,r,c):l.compressedTexSubImage2D(e,t,0,0,i,a,r,c)):d?u.compressedTexImage3D(e,t,r,i,a,o,0,c):l.compressedTexImage2D(e,t,r,i,a,0,c)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:n,hasMipmap:a,target:s}=this._descriptor;const c=s===o["A"].TEXTURE_3D;for(let o=0;e(o,r,i,n),a&&(1!==r||1!==i||c&&1!==n)&&!(o>=t);++o)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(n=Math.max(1,n>>1))}static _validateTexture(e,t){(t.width<0||t.height<0||t.depth<0)&&console.error("Negative dimension parameters are not allowed!");const r=Object(c["a"])(e.gl),n=Object(i["k"])(t.width)&&Object(i["k"])(t.height);r||!t.isImmutable&&!m(t.target)||console.error("Immutable and 3D-like textures are not supported in WebGL1!"),r||n||("number"==typeof t.wrapMode?t.wrapMode!==o["B"].CLAMP_TO_EDGE&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"):t.wrapMode.s===o["B"].CLAMP_TO_EDGE&&t.wrapMode.t===o["B"].CLAMP_TO_EDGE||console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),t.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))}static _applySamplingMode(e,t){let r=t.samplingMode,i=t.samplingMode;r===o["z"].LINEAR_MIPMAP_NEAREST||r===o["z"].LINEAR_MIPMAP_LINEAR?(r=o["z"].LINEAR,t.hasMipmap||(i=o["z"].LINEAR)):r!==o["z"].NEAREST_MIPMAP_NEAREST&&r!==o["z"].NEAREST_MIPMAP_LINEAR||(r=o["z"].NEAREST,t.hasMipmap||(i=o["z"].NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}static _applyWrapMode(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}static _applyAnisotropicFilteringParameters(e,t){var r;const i=e.capabilities.textureFilterAnisotropic;i&&e.gl.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY,null!=(r=t.maxAnisotropy)?r:1)}}function d(e){return e in o["v"]}function h(e){return e in o["i"]}function p(e){return Object(n["k"])(e)&&"type"in e&&"compressed"===e.type}function f(e){return Object(n["k"])(e)&&"byteLength"in e}function b(e){return Object(n["k"])(e)&&!p(e)&&!f(e)}function m(e){return e===o["A"].TEXTURE_3D||e===o["A"].TEXTURE_2D_ARRAY}function g(e,t,r,i=1){let n=Math.max(t,r);return e===o["A"].TEXTURE_3D&&(n=Math.max(n,i)),Math.round(Math.log(n)/Math.LN2)+1}u.TEXTURE_UNIT_FOR_UPDATES=0},a21b:function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return b})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return h})),r.d(t,"h",(function(){return o})),r.d(t,"i",(function(){return d})),r.d(t,"j",(function(){return p})),r.d(t,"k",(function(){return c})),r.d(t,"l",(function(){return l})),r.d(t,"m",(function(){return a})),r.d(t,"n",(function(){return m}));var i=r("b2b2");function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function a(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const i=Math.max(0,r-t),n=new(0,e.constructor)(i);for(let a=0;a<i;a++)n[a]=e[t+a];return n}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function o(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function c(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function l(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function u(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function d(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function h(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function p(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function f(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function b(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}function m(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}function g(e){return Object(i["j"])(e)?0:128+e.buffer.byteLength+64}},a29a:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return u})),r.d(t,"h",(function(){return d})),r.d(t,"i",(function(){return h}));var i=r("4212");function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function s(e,t,r,i,n,a,s){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=a,e[5]=s,e}function o(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5];let c=r*a-i*n;return c?(c=1/c,e[0]=a*c,e[1]=-i*c,e[2]=-n*c,e[3]=r*c,e[4]=(n*o-a*s)*c,e[5]=(i*s-r*o)*c,e):null}function c(e){return e[0]*e[3]-e[1]*e[2]}function l(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=r[0],u=r[1],d=r[2],h=r[3],p=r[4],f=r[5];return e[0]=i*l+a*u,e[1]=n*l+s*u,e[2]=i*d+a*h,e[3]=n*d+s*h,e[4]=i*p+a*f+o,e[5]=n*p+s*f+c,e}function u(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=Math.sin(r),u=Math.cos(r);return e[0]=i*u+a*l,e[1]=n*u+s*l,e[2]=i*-l+a*u,e[3]=n*-l+s*u,e[4]=o,e[5]=c,e}function d(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=r[0],u=r[1];return e[0]=i*l,e[1]=n*l,e[2]=a*u,e[3]=s*u,e[4]=o,e[5]=c,e}function h(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=r[0],u=r[1];return e[0]=i,e[1]=n,e[2]=a,e[3]=s,e[4]=i*l+a*u+o,e[5]=n*l+s*u+c,e}function p(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=-r,e[3]=i,e[4]=0,e[5]=0,e}function f(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function b(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function m(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function g(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+1)}function y(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function O(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function v(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function _(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e}function j(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function w(e,t){const r=e[0],n=e[1],a=e[2],s=e[3],o=e[4],c=e[5],l=t[0],u=t[1],d=t[2],h=t[3],p=t[4],f=t[5];return Math.abs(r-l)<=i["a"]*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(n-u)<=i["a"]*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(a-d)<=i["a"]*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(s-h)<=i["a"]*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(o-p)<=i["a"]*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(c-f)<=i["a"]*Math.max(1,Math.abs(c),Math.abs(f))}const x=l,T=O;Object.freeze({__proto__:null,copy:n,identity:a,set:s,invert:o,determinant:c,multiply:l,rotate:u,scale:d,translate:h,fromRotation:p,fromScaling:f,fromTranslation:b,str:m,frob:g,add:y,subtract:O,multiplyScalar:v,multiplyScalarAndAdd:_,exactEquals:j,equals:w,mul:x,sub:T})},a2b1:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("d3ac"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("afcf")),c=r("d386"),l=r("09db"),u=r("5970"),d=r("ace4");let h=class extends(Object(n["a"])(a["a"])){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=Object(u["a"])(e[r]);return t}writeDomains(e,t){const r={};for(const n of Object.keys(e)){var i;e[n]&&(r[n]=null==(i=e[n])?void 0:i.toJSON())}t.domains=r}};Object(i["a"])([Object(s["b"])({json:{write:!0}})],h.prototype,"id",void 0),Object(i["a"])([Object(s["b"])({json:{write:!0}})],h.prototype,"name",void 0),Object(i["a"])([Object(s["b"])({json:{write:!0}})],h.prototype,"domains",void 0),Object(i["a"])([Object(o["a"])("domains")],h.prototype,"readDomains",null),Object(i["a"])([Object(l["a"])("domains")],h.prototype,"writeDomains",null),Object(i["a"])([Object(s["b"])({type:[d["a"]],json:{write:!0}})],h.prototype,"templates",void 0),h=Object(i["a"])([Object(c["a"])("esri.layers.support.FeatureType")],h);const p=h},a2e5:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(e){super(e),this.field=null,this.order=null}clone(){return new i({field:this.field,order:this.order})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"field",void 0),Object(n["a"])([Object(s["b"])({type:["asc","desc"],json:{write:!0}})],c.prototype,"order",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.popup.support.RelatedRecordsInfoFieldOrder")],c);const l=c},a37d:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("9ef0"),n=r("e92d"),a=r("b2b2"),s=r("a915"),o=r("0fc4");const c=n["a"].getLogger("esri.views.3d.webgl-engine.lib.TextRenderParameters");class l{constructor(e){this.definition=e,this.key=JSON.stringify(e),this.haloSize=Math.round(e.halo.size),this.textStyle=this._colorToRGBA(e.color),this.haloStyle=this._colorToRGB(e.halo.color),this.backgroundStyle=0!==e.background.color[3]?this._colorToRGBA(e.background.color):null}fontString(e){const t=this.definition.font;return`${t.style} ${t.weight} ${e}px ${t.family}, sans-serif`}_colorToRGB(e){return`rgb(${e.slice(0,3).map(e=>Math.floor(255*e)).toString()})`}_colorToRGBA(e){return`rgba(${e.slice(0,3).map(e=>Math.floor(255*e)).toString()},${e[3]})`}static async fromSymbol(e,t=1){const r=Object(a["i"])(e,"material","color"),n=Object(a["n"])(r,o["b"],i["a"].toUnitRGBA),u=Object(a["n"])(e.size,12,s["g"]),d=e.lineHeight,h=Object(a["k"])(e.background)?i["a"].toUnitRGBA(e.background.color):o["b"],p={family:Object(a["n"])(e.font,"sans-serif",e=>e.family),decoration:Object(a["n"])(e.font,"none",e=>e.decoration),weight:Object(a["n"])(e.font,"normal",e=>e.weight),style:Object(a["n"])(e.font,"normal",e=>e.style)},f=e.halo,b=Object(a["k"])(f)&&Object(a["k"])(f.color)&&f.size>0?{size:Object(s["g"])(f.size),color:i["a"].toUnitRGBA(f.color)}:{size:0,color:o["b"]},m=new l({color:n,size:u,background:{color:h,padding:Object(a["k"])(e.background)?[.65*u,.5*u]:[0,0],borderRadius:Object(a["k"])(e.background)?u*(6/16):0},lineSpacingFactor:d,font:p,halo:b,pixelRatio:t}),g=m.fontString(u);try{await document.fonts.load(g)}catch(y){c.warnOnce(`Failed to preload font '${g}'. Some text symbology may be rendered using the default browser font.`)}return m}}},a3af:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("b2b2"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("5c00");let u=i=class extends a["a"]{constructor(e){super(e),this.color=null}clone(){const e={color:Object(s["k"])(this.color)?this.color.clone():null};return new i(e)}};Object(n["a"])([Object(o["b"])(l["a"])],u.prototype,"color",void 0),u=i=Object(n["a"])([Object(c["a"])("esri.symbols.support.Symbol3DMaterial")],u)},a4ee:function(e,t,r){"use strict";function i(e,t,r,i){var n,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,r,s):n(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}r.d(t,"a",(function(){return i}))},a4f1:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i=r("a4ee"),n=r("2c4f"),a=r("7d7d"),s=r("e92d"),o=r("f4cc"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("a6a3");function d(e){return e&&"group"===e.type}function h(e,t,r){let i,n;if(e)for(let a=0,s=e.length;a<s;a++){if(i=e.getItemAt(a),i[t]===r)return i;if(d(i)&&(n=h(i.layers,t,r),n))return n}}const p=s["a"].getLogger("esri.support.LayersMixin"),f=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new n["a"];const t=e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)},r=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||p.error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",e=>t(e.item)),this.layers.on("after-add",e=>r(e.item)),this.layers.on("after-remove",e=>i(e.item))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",Object(a["b"])(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof u["a"]){const i=e;i.parent===this?this.reorder(i,t):r.add(i,t)}else Object(o["o"])(e)?e.then(e=>{this.destroyed||this.add(e,t)}):p.error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;t=r.getNextIndex(t),e.slice().forEach(e=>{e.parent!==this?(r.add(e,t),t+=1):this.reorder(e,t)})}findLayerById(e){return h(this.layers,"id",e)}findLayerByUid(e){return h(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return Object(i["a"])([Object(c["b"])()],t.prototype,"layers",null),t=Object(i["a"])([Object(l["a"])("esri.support.LayersMixin")],t),t}},a571:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n}));var i=r("a9ab");function n(e){return{geometryType:Object(i["c"])(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,r){const n=Object(i["b"])(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}},a5b5:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d}));var i=r("d272"),n=r("7c1d"),a=r("d0cb"),s=r("9617"),o=r("3886"),c=r("690a"),l=r("b7bd");function u(e){const t=new c["a"];return t.include(n["a"]),t.include(a["a"],e),t.include(i["a"],e),t.attributes.add(l["a"].UV0,"vec2"),t.vertex.uniforms.add("lineSize","float").add("pixelToNDC","vec2").add("borderSize","float").add("screenOffset","vec2"),t.varyings.add("coverageSampling","vec4"),t.varyings.add("lineSizes","vec2"),e.multipassGeometryEnabled&&t.varyings.add("depth","float"),t.vertex.code.add(o["a"]`
  2349. void main(void) {
  2350. ProjectHUDAux projectAux;
  2351. vec4 endPoint = projectPositionHUD(projectAux);
  2352. vec3 vpos = projectAux.posModel;
  2353. if (rejectBySlice(vpos)) {
  2354. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  2355. return;
  2356. }
  2357. ${e.occlusionTestEnabled?o["a"]`
  2358. if (!testVisibilityHUD(endPoint)) {
  2359. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  2360. return;
  2361. }`:""}
  2362. ${e.screenSizePerspectiveEnabled?o["a"]`
  2363. vec4 perspectiveFactor = screenSizePerspectiveScaleFactor(projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);
  2364. vec2 screenOffsetScaled = applyScreenSizePerspectiveScaleFactorVec2(screenOffset, perspectiveFactor);
  2365. `:o["a"]`
  2366. vec2 screenOffsetScaled = screenOffset;
  2367. `}
  2368. // Add view dependent polygon offset to get exact same original starting point. This is mostly
  2369. // used to get the correct depth value
  2370. vec3 posView = (view * vec4(position, 1.0)).xyz;
  2371. ${e.multipassGeometryEnabled?"depth = posView.z;":""}
  2372. applyHUDViewDependentPolygonOffset(auxpos1.w, projectAux.absCosAngle, posView);
  2373. vec4 startPoint = proj * vec4(posView, 1.0);
  2374. // Apply screen offset to both start and end point
  2375. vec2 screenOffsetNorm = screenOffsetScaled * 2.0 / viewport.zw;
  2376. startPoint.xy += screenOffsetNorm * startPoint.w;
  2377. endPoint.xy += screenOffsetNorm * endPoint.w;
  2378. // Align start and end to pixel origin
  2379. vec4 startAligned = alignToPixelOrigin(startPoint, viewport.zw);
  2380. vec4 endAligned = alignToPixelOrigin(endPoint, viewport.zw);
  2381. ${e.depthHudEnabled?e.depthHudAlignStartEnabled?o["a"]`endAligned = vec4(endAligned.xy / endAligned.w * startAligned.w, startAligned.zw);`:o["a"]`startAligned = vec4(startAligned.xy / startAligned.w * endAligned.w, endAligned.zw);`:""}
  2382. vec4 projectedPosition = mix(startAligned, endAligned, uv0.y);
  2383. // The direction of the line in screen space
  2384. vec2 screenSpaceDirection = normalize(endAligned.xy / endAligned.w - startAligned.xy / startAligned.w);
  2385. vec2 perpendicularScreenSpaceDirection = vec2(screenSpaceDirection.y, -screenSpaceDirection.x);
  2386. ${e.screenSizePerspectiveEnabled?o["a"]`
  2387. float lineSizeScaled = applyScreenSizePerspectiveScaleFactorFloat(lineSize, perspectiveFactor);
  2388. float borderSizeScaled = applyScreenSizePerspectiveScaleFactorFloat(borderSize, perspectiveFactor);
  2389. `:o["a"]`
  2390. float lineSizeScaled = lineSize;
  2391. float borderSizeScaled = borderSize;
  2392. `}
  2393. float halfPixelSize = lineSizeScaled * 0.5;
  2394. // Calculate a pixel offset from the edge of the pixel, s.t. we keep the line aligned
  2395. // to pixels if it has a full pixel size. Since pixel aligned biases to the bottom-left,
  2396. // we bias the size to the right (for odd sizes) to balance out the bias. Grow sub-pixel
  2397. // sizes towards the left or right s.t. there is a smooth transition (e.g. from 2 to 3 px).
  2398. float halfWholePixelSize = floor(lineSizeScaled) * 0.5;
  2399. float halfPixelSizeInt = floor(halfWholePixelSize);
  2400. // Sub-pixel offset if we need to grow sub-pixels to the left
  2401. float subpixelOffset = -fract(lineSizeScaled) * float(halfWholePixelSize > 0.0);
  2402. // Pixel offset aligning to whole pixels and adding subpixel offset if needed
  2403. float pixelOffset = -halfPixelSizeInt + subpixelOffset;
  2404. // Compute full ndc offset, adding 1px padding for doing anti-aliasing and the border size
  2405. float padding = 1.0 + borderSizeScaled;
  2406. vec2 ndcOffset = (pixelOffset - padding + uv0.x * (lineSizeScaled + padding + padding)) * pixelToNDC;
  2407. // Offset x/y from the center of the line in screen space
  2408. projectedPosition.xy += perpendicularScreenSpaceDirection * ndcOffset * projectedPosition.w;
  2409. // Compute a coverage varying which we can use in the fragment shader to determine
  2410. // how much a pixel is actually covered by the line (i.e. to anti alias the line).
  2411. // This works by computing two coordinates that can be linearly interpolated and then
  2412. // subtracted to find out how far away from the line edge we are.
  2413. float edgeDirection = (uv0.x * 2.0 - 1.0);
  2414. float halfBorderSize = 0.5 * borderSizeScaled;
  2415. float halfPixelSizeAndBorder = halfPixelSize + halfBorderSize;
  2416. float outerEdgeCoverageSampler = edgeDirection * (halfPixelSizeAndBorder + halfBorderSize + 1.0);
  2417. float isOneSided = float(lineSizeScaled < 2.0 && borderSize < 2.0);
  2418. coverageSampling = vec4(
  2419. // Edge coordinate
  2420. outerEdgeCoverageSampler,
  2421. // Border edge coordinate
  2422. outerEdgeCoverageSampler - halfPixelSizeAndBorder * isOneSided,
  2423. // Line offset
  2424. halfPixelSize - 0.5,
  2425. // Border offset
  2426. halfBorderSize - 0.5 + halfPixelSizeAndBorder * (1.0 - isOneSided)
  2427. );
  2428. lineSizes = vec2(lineSizeScaled, borderSizeScaled);
  2429. gl_Position = projectedPosition;
  2430. }
  2431. `),t.fragment.uniforms.add("uColor","vec4"),t.fragment.uniforms.add("borderColor","vec4"),e.multipassGeometryEnabled&&(t.fragment.include(s["b"],e),t.fragment.uniforms.add("inverseViewport","vec2")),t.fragment.code.add(o["a"]`
  2432. void main() {
  2433. ${e.multipassGeometryEnabled?"if( geometryDepthTest(gl_FragCoord.xy * inverseViewport, depth) ){ discard; }":""}
  2434. // Mix between line and border coverage offsets depending on whether we need
  2435. // a border (based on the sidedness).
  2436. vec2 coverage = min(1.0 - clamp(abs(coverageSampling.xy) - coverageSampling.zw, 0.0, 1.0), lineSizes);
  2437. // Mix between border and line color based on the line coverage (conceptually the line
  2438. // blends on top of the border background).
  2439. //
  2440. // Anti-alias by blending final result using the full (including optional border) coverage
  2441. // and the color alpha
  2442. float borderAlpha = uColor.a * borderColor.a * coverage.y;
  2443. float colorAlpha = uColor.a * coverage.x;
  2444. float finalAlpha = mix(borderAlpha, 1.0, colorAlpha);
  2445. ${e.depthHudEnabled?o["a"]`
  2446. if (finalAlpha < 0.01) {
  2447. discard;
  2448. }
  2449. `:o["a"]`
  2450. // Compute the finalRgb, but keep it pre-multiplied (for unpre-multiplied you
  2451. // need to divide by finalAlpha). We avoid the division here by setting the
  2452. // appropriate blending function in the material.
  2453. vec3 finalRgb = mix(borderColor.rgb * borderAlpha, uColor.rgb, colorAlpha);
  2454. gl_FragColor = vec4(finalRgb, finalAlpha);
  2455. `}
  2456. }
  2457. `),t}function d(e,t,r){h(e,"uColor",t.color),e.setUniform1f("pixelRatio",r),e.setUniform2f("screenOffset",t.screenOffset[0]*r,t.screenOffset[1]*r),null!==t.borderColor?(h(e,"borderColor",t.borderColor),e.setUniform1f("borderSize",r)):(e.setUniform4f("borderColor",0,0,0,0),e.setUniform1f("borderSize",0))}function h(e,t,r){3===r.length?e.setUniform4f(t,r[0],r[1],r[2],1):e.setUniform4fv(t,r)}const p=Object.freeze({__proto__:null,build:u,bindLineCalloutUniforms:d})},a5d8:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var i=r("a4ee"),n=r("d386");let a=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+a++})}};return t=Object(i["a"])([Object(n["a"])("esri.core.Identifiable")],t),t};let o=class extends(s(class{})){};o=Object(i["a"])([Object(n["a"])("esri.core.Identifiable")],o)},a6a3:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var i=r("a4ee"),n=r("1325"),a=(r("e06a"),r("2eab")),s=r("ce50"),o=r("ce6d"),c=r("a5d8"),l=r("6d5f"),u=r("e92d"),d=r("f4cc"),h=r("e041"),p=r("59b2"),f=(r("b50f"),r("c120"),r("cea0"),r("d386")),b=r("3af1"),m=r("5996");let g=0;const y=u["a"].getLogger("esri.layers.Layer");let O=class extends(o["a"].EventedMixin(Object(c["b"])(l["a"]))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new b["a"](-180,-90,180,90,m["a"].WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m["a"].WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e,i=await r.e("chunk-59f29c8d").then(r.bind(null,"4cf4"));try{return await i.fromUrl(t)}catch(n){throw y.error("#fromArcGISServerUrl({ url: '"+t.url+"'})","Failed to create layer from arcgis server url",n),n}}static async fromPortalItem(e){const t="portalItem"in e?e:{portalItem:e},i=await r.e("chunk-624cb931").then(r.bind(null,"5c92"));try{return await i.fromItem(t)}catch(a){const e=t&&t.portalItem,r=e&&e.id||"unset",i=e&&e.portal&&e.portal.url||n["a"].portalUrl;throw y.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",a),a}}initialize(){this.when().catch(e=>{var t,r;Object(d["m"])(e)||u["a"].getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(t=this.title)?t:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:e})})}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?Object(h["M"])(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await Object(a["default"])(e,{query:{f:"json"},responseType:"json"})).data;throw new s["a"]("layer:no-attribution-data","Layer does not have attribution data")}};Object(i["a"])([Object(p["b"])({type:String})],O.prototype,"attributionDataUrl",void 0),Object(i["a"])([Object(p["b"])({type:b["a"]})],O.prototype,"fullExtent",void 0),Object(i["a"])([Object(p["b"])({readOnly:!0})],O.prototype,"hasAttributionData",null),Object(i["a"])([Object(p["b"])({type:String,clonable:!1})],O.prototype,"id",void 0),Object(i["a"])([Object(p["b"])({type:Boolean,nonNullable:!0})],O.prototype,"legendEnabled",void 0),Object(i["a"])([Object(p["b"])({type:["show","hide","hide-children"]})],O.prototype,"listMode",void 0),Object(i["a"])([Object(p["b"])({type:Number,range:{min:0,max:1},nonNullable:!0})],O.prototype,"opacity",void 0),Object(i["a"])([Object(p["b"])({clonable:!1})],O.prototype,"parent",void 0),Object(i["a"])([Object(p["b"])({readOnly:!0})],O.prototype,"parsedUrl",null),Object(i["a"])([Object(p["b"])({type:Boolean})],O.prototype,"popupEnabled",void 0),Object(i["a"])([Object(p["b"])({type:Boolean})],O.prototype,"attributionVisible",void 0),Object(i["a"])([Object(p["b"])({type:m["a"]})],O.prototype,"spatialReference",void 0),Object(i["a"])([Object(p["b"])({type:String})],O.prototype,"title",void 0),Object(i["a"])([Object(p["b"])({type:String,readOnly:!0,json:{read:!1}})],O.prototype,"type",void 0),Object(i["a"])([Object(p["b"])()],O.prototype,"url",void 0),Object(i["a"])([Object(p["b"])({type:Boolean,nonNullable:!0})],O.prototype,"visible",void 0),O=Object(i["a"])([Object(f["a"])("esri.layers.Layer")],O);const v=O},a6ac:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e,t){this.definition=null,this.context=null,this.definition=e,this.context=t}}},a6c1:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return f})),r.d(t,"g",(function(){return p}));r("c120"),r("b2b2");var i=r("0d76"),n=r("db52"),a=r("4dc9"),s=r("21ba"),o=r("8246");const c=a["a"].fromJSON(o["c"]),l=n["a"].fromJSON(o["e"]),u=i["a"].fromJSON(o["d"]),d=s["a"].fromJSON(o["f"]);const h=a["a"].fromJSON(o["g"]),p=n["a"].fromJSON(o["i"]),f=i["a"].fromJSON(o["h"])},a6c9:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return c}));r("c120");var i=r("661c"),n=r("1e2c"),a=r("d17d");const s=128,o=.5;function c(e,t=s,r=t*o,i=0){const c=l(e,t,r,i);return new n["a"](c,{mipmap:!1,wrap:{s:a["B"].CLAMP_TO_EDGE,t:a["B"].CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0})}function l(e,t=s,r=t*o,i=0){switch(e){case"circle":default:return u(t,r);case"square":return d(t,r);case"cross":return p(t,r,i);case"x":return f(t,r,i);case"kite":return h(t,r);case"triangle":return b(t,r);case"arrow":return m(t,r)}}function u(e,t){const r=e/2-.5;return _(e,O(r,r,t/2))}function d(e,t){return g(e,t,!1)}function h(e,t){return g(e,t,!0)}function p(e,t,r=0){return y(e,t,!1,r)}function f(e,t,r=0){return y(e,t,!0,r)}function b(e,t){return _(e,v(e/2,t,t/2))}function m(e,t){const r=t,i=t/2,n=e/2,a=.8*r,s=O(n,(e-t)/2-a,Math.sqrt(a*a+i*i)),o=v(n,r,i);return _(e,(e,t)=>Math.max(o(e,t),-s(e,t)))}function g(e,t,r){return r&&(t/=Math.SQRT2),_(e,(i,n)=>{let a=i-.5*e+.25,s=.5*e-n-.75;if(r){const e=(a+s)/Math.SQRT2;s=(s-a)/Math.SQRT2,a=e}return Math.max(Math.abs(a),Math.abs(s))-.5*t})}function y(e,t,r,i=0){t-=i,r&&(t*=Math.SQRT2);const n=.5*t;return _(e,(t,a)=>{let s,o=t-.5*e,c=.5*e-a-1;if(r){const e=(o+c)/Math.SQRT2;c=(c-o)/Math.SQRT2,o=e}return o=Math.abs(o),c=Math.abs(c),s=o>c?o>n?Math.sqrt((o-n)*(o-n)+c*c):c:c>n?Math.sqrt(o*o+(c-n)*(c-n)):o,s-=i/2,s})}function O(e,t,r){return(i,n)=>{const a=i-e,s=n-t;return Math.sqrt(a*a+s*s)-r}}function v(e,t,r){const i=Math.sqrt(t*t+r*r);return(n,a)=>{const s=Math.abs(n-e)-r,o=a-e+t/2+.75,c=(t*s+r*o)/i,l=-o;return Math.max(c,l)}}function _(e,t){const r=new Uint8Array(4*e*e);for(let n=0;n<e;n++)for(let a=0;a<e;a++){const s=a+e*n;let o=t(a,n);o=o/e+.5,Object(i["a"])(o,r,4*s)}return r}},a796:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("7ffa"),c=r("59b2"),l=(r("cea0"),r("d386")),u=r("09db");const d=new a["a"]({count:"count",sum:"sum",min:"min",max:"max",avg:"avg",stddev:"stddev",var:"var",exceedslimit:"exceedslimit",percentile_cont:"percentile-continuous",percentile_disc:"percentile-discrete",EnvelopeAggregate:"envelope-aggregate",CentroidAggregate:"centroid-aggregate",ConvexHullAggregate:"convex-hull-aggregate"});let h=i=class extends s["a"]{constructor(e){super(e),this.maxPointCount=void 0,this.maxRecordCount=void 0,this.maxVertexCount=void 0,this.onStatisticField=null,this.outStatisticFieldName=null,this.statisticType=null,this.statisticParameters=null}writeStatisticParameters(e,t){"percentile-continuous"!==this.statisticType&&"percentile-discrete"!==this.statisticType||(t.statisticParameters=Object(o["a"])(e))}clone(){return new i({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType,statisticParameters:Object(o["a"])(this.statisticParameters)})}};Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],h.prototype,"maxPointCount",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],h.prototype,"maxRecordCount",void 0),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],h.prototype,"maxVertexCount",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],h.prototype,"onStatisticField",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],h.prototype,"outStatisticFieldName",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{read:{source:"statisticType",reader:d.read},write:{target:"statisticType",writer:d.write}}})],h.prototype,"statisticType",void 0),Object(n["a"])([Object(c["b"])({type:Object})],h.prototype,"statisticParameters",void 0),Object(n["a"])([Object(u["a"])("statisticParameters")],h.prototype,"writeStatisticParameters",null),h=i=Object(n["a"])([Object(l["a"])("esri.rest.support.StatisticDefinition")],h);const p=h},a7a7:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(e){super(e),this.type=null}};Object(i["a"])([Object(a["b"])({type:["attachments","custom","fields","media","text","expression"],readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=Object(i["a"])([Object(s["a"])("esri.popup.content.Content")],o);const c=o},a7d7:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return l}));var i=r("47f8"),n=r("7cb4"),a=r("3886");const s=Object(i["d"])(0,.6,.2);var o;function c(e,t){const r=e.fragment,i=t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture;t.pbrMode===o.Normal&&i&&e.include(n["a"],t),t.pbrMode!==o.Schematic?(t.pbrMode===o.Disabled&&r.code.add(a["a"]`float getBakedOcclusion() { return 1.0; }`),t.pbrMode===o.Normal&&(r.uniforms.add("emissionFactor","vec3"),r.uniforms.add("mrrFactors","vec3"),r.code.add(a["a"]`vec3 mrr;
  2458. vec3 emission;
  2459. float occlusion;`),t.hasMetalnessAndRoughnessTexture&&(r.uniforms.add("texMetallicRoughness","sampler2D"),t.supportsTextureAtlas&&r.uniforms.add("texMetallicRoughnessSize","vec2"),r.code.add(a["a"]`void applyMetallnessAndRoughness(TextureLookupParameter params) {
  2460. vec3 metallicRoughness = textureLookup(texMetallicRoughness, params).rgb;
  2461. mrr[0] *= metallicRoughness.b;
  2462. mrr[1] *= metallicRoughness.g;
  2463. }`)),t.hasEmissionTexture&&(r.uniforms.add("texEmission","sampler2D"),t.supportsTextureAtlas&&r.uniforms.add("texEmissionSize","vec2"),r.code.add(a["a"]`void applyEmission(TextureLookupParameter params) {
  2464. emission *= textureLookup(texEmission, params).rgb;
  2465. }`)),t.hasOcclusionTexture?(r.uniforms.add("texOcclusion","sampler2D"),t.supportsTextureAtlas&&r.uniforms.add("texOcclusionSize","vec2"),r.code.add(a["a"]`void applyOcclusion(TextureLookupParameter params) {
  2466. occlusion *= textureLookup(texOcclusion, params).r;
  2467. }
  2468. float getBakedOcclusion() {
  2469. return occlusion;
  2470. }`)):r.code.add(a["a"]`float getBakedOcclusion() { return 1.0; }`),r.code.add(a["a"]`
  2471. void applyPBRFactors() {
  2472. mrr = mrrFactors;
  2473. emission = emissionFactor;
  2474. occlusion = 1.0;
  2475. ${i?"vtc.uv = vuv0;":""}
  2476. ${t.hasMetalnessAndRoughnessTexture?t.supportsTextureAtlas?"vtc.size = texMetallicRoughnessSize; applyMetallnessAndRoughness(vtc);":"applyMetallnessAndRoughness(vtc);":""}
  2477. ${t.hasEmissionTexture?t.supportsTextureAtlas?"vtc.size = texEmissionSize; applyEmission(vtc);":"applyEmission(vtc);":""}
  2478. ${t.hasOcclusionTexture?t.supportsTextureAtlas?"vtc.size = texOcclusionSize; applyOcclusion(vtc);":"applyOcclusion(vtc);":""}
  2479. }
  2480. `))):r.code.add(a["a"]`const vec3 mrr = vec3(0.0, 0.6, 0.2);
  2481. const vec3 emission = vec3(0.0);
  2482. float occlusion = 1.0;
  2483. void applyPBRFactors() {}
  2484. float getBakedOcclusion() { return 1.0; }`)}function l(e,t,r=!1){r||(e.setUniform3fv("mrrFactors",t.mrrFactors),e.setUniform3fv("emissionFactor",t.emissiveFactor))}!function(e){e[e.Disabled=0]="Disabled",e[e.Normal=1]="Normal",e[e.Schematic=2]="Schematic",e[e.Water=3]="Water",e[e.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",e[e.COUNT=5]="COUNT"}(o||(o={}))},a7e1:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return E}));var i=r("a4ee"),n=r("b2cd"),a=r("ce50"),s=r("6a0ed"),o=r("7ffa"),c=r("6d5f"),l=r("b2b2"),u=r("e041"),d=r("59b2"),h=r("cea0"),p=r("afcf"),f=r("d386"),b=r("3af1"),m=r("0224"),g=r("fc29"),y=r("e92d"),O=(r("b50f"),r("c120"),r("1a3e"));const v=y["a"].getLogger("esri.portal.PortalItemResource");let _=class extends g["a"]{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){Object(l["k"])(e)&&Object(u["u"])(e)?v.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?"./resources/"+this.path:null}fetch(e="json",t){const r=this.url;if(Object(l["j"])(r))throw new a["a"]("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(r,{responseType:e,query:{token:this.portalItem.apiKey},signal:Object(l["i"])(t,"signal")})}async update(e,t){return(await r.e("chunk-2d22611c").then(r.bind(null,"e6a6"))).addOrUpdateResource(this,"update",e,t)}hasPath(){return Object(l["k"])(this.path)}_normalizePath(e,t){return Object(l["j"])(e)?e:(e=e.replace(/^\/+/,""),Object(l["k"])(t)&&Object(u["u"])(e)&&(e=Object(u["E"])(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};Object(i["a"])([Object(d["b"])()],_.prototype,"portalItem",void 0),Object(i["a"])([Object(d["b"])({type:String,value:null})],_.prototype,"path",null),Object(i["a"])([Object(O["a"])("path")],_.prototype,"_castPath",null),Object(i["a"])([Object(d["b"])({type:String,readOnly:!0})],_.prototype,"url",null),Object(i["a"])([Object(d["b"])({type:String,readOnly:!0})],_.prototype,"itemRelativeUrl",null),_=Object(i["a"])([Object(f["a"])("esri.portal.PortalItemResource")],_);const j=_;let w=class extends g["a"]{constructor(e){super(e),this.created=null,this.rating=null}};Object(i["a"])([Object(d["b"])()],w.prototype,"created",void 0),Object(i["a"])([Object(d["b"])()],w.prototype,"rating",void 0),w=Object(i["a"])([Object(f["a"])("esri.portal.PortalRating")],w);const x=w;var T;let S=T=class extends(Object(s["b"])(c["a"])){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return Object(h["d"])(T,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let r=e;return"Feature Service"===e||"Feature Collection"===e?r=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?r=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?r="Scene Layer":"Media Service"===e?r="Media Layer":"Scene Package"===e?r="Scene Layer Package":"Stream Service"===e?r="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?r=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?r="Locator":"Geoenrichment Service"===e?r="GeoEnrichment Service":"Microsoft Powerpoint"===e?r="Microsoft PowerPoint":"GeoJson"===e?r="GeoJSON":"Globe Service"===e?r="Globe Layer":"Vector Tile Service"===e?r="Tile Layer":"netCDF"===e?r="NetCDF":"Map Service"===e?r=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?r=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?r="Big Data File Share":"Compact Tile Package"===e?r="Tile Package (tpkx)":"OGCFeatureServer"===e?r="OGC Feature Layer":"web mapping application"===e&&t.indexOf("configurableApp")>-1&&(r="Instant App"),r}readExtent(e){return e&&e.length?new b["a"](e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[],r="esri/images/portal/",i="16";let a,s=!1,o=!1,c=!1,l=!1,u=!1,d=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(s=t.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(o=t.indexOf("Table")>-1,c=t.indexOf("Route Layer")>-1,l=t.indexOf("Markup")>-1,u=-1!==t.indexOf("Spatiotemporal"),d=-1!==t.indexOf("UtilityNetwork"),a=u&&o?"spatiotemporaltable":o?"table":c?"routelayer":l?"markup":u?"spatiotemporal":s?"featureshosted":d?"utilitynetwork":"features"):a="map service"===e||"wms"===e||"wmts"===e?s||t.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":t.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"media service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&t.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):a="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",a?Object(n["b"])(r+a+i+".png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=m["a"].getDefault());const t=this.portal.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:Object(l["k"])(e)?e.signal:null,query:{token:this.apiKey}}):{}).then(e=>{this.sourceJSON=e,this.read(e)});return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof x&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then(()=>new x({rating:e,created:new Date}))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:Object(o["a"])(this.applicationProxies),avgRating:this.avgRating,categories:Object(o["a"])(this.categories),created:Object(o["a"])(this.created),culture:this.culture,description:this.description,extent:Object(o["a"])(this.extent),groupCategories:Object(o["a"])(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:Object(o["a"])(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:Object(o["a"])(this.screenshots),size:this.size,snippet:this.snippet,tags:Object(o["a"])(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:Object(o["a"])(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new T({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(()=>{})}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then(e=>null!=e.rating?(e.created=new Date(e.created),new x(e)):null)}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},T)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+="&w="+e),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal._signIn()).then(()=>{const t=e&&e.data,r={method:"post"};r.query=this.createPostQuery();for(const e in r.query)null===r.query[e]&&(r.query[e]="");return r.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?r.query.text=t:"object"==typeof t&&(r.query.text=JSON.stringify(t))),this.portal._request(this.userItemUrl+"/update",r).then(()=>this.reload())}):Promise.reject(new a["a"]("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then(()=>this.portal._signIn()).then(()=>{const t=e.thumbnail,r=e.filename,i={method:"post"};if("string"==typeof t)Object(u["w"])(t)?i.query={data:t}:i.query={url:Object(u["C"])(t)},Object(l["k"])(r)&&(i.query.filename=r);else{const e=new FormData;Object(l["k"])(r)?e.append("file",t,r):e.append("file",t),i.body=e}return this.portal._request(this.userItemUrl+"/updateThumbnail",i).then(()=>this.reload())}):Promise.reject(new a["a"]("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await r.e("chunk-2d22611c").then(r.bind(null,"e6a6"))).fetchResources(this,e,t)}async addResource(e,t,i){const n=await r.e("chunk-2d22611c").then(r.bind(null,"e6a6"));return e.portalItem=this,n.addOrUpdateResource(e,"add",t,i)}async removeResource(e,t){const i=await r.e("chunk-2d22611c").then(r.bind(null,"e6a6"));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new a["a"]("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return i.removeResource(this,e,t)}async removeAllResources(e){return(await r.e("chunk-2d22611c").then(r.bind(null,"e6a6"))).removeAllResources(this,e)}resourceFromPath(e){return new j({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return Object(o["c"])(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new T({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};Object(i["a"])([Object(d["b"])({type:["private","shared","org","public"]})],S.prototype,"access",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"accessInformation",void 0),Object(i["a"])([Object(d["b"])({type:String})],S.prototype,"apiKey",void 0),Object(i["a"])([Object(d["b"])({json:{read:{source:"appProxies"}}})],S.prototype,"applicationProxies",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"avgRating",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"categories",void 0),Object(i["a"])([Object(d["b"])({type:Date})],S.prototype,"created",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"culture",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"description",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],S.prototype,"displayName",null),Object(i["a"])([Object(d["b"])({type:b["a"]})],S.prototype,"extent",void 0),Object(i["a"])([Object(p["a"])("extent")],S.prototype,"readExtent",null),Object(i["a"])([Object(d["b"])()],S.prototype,"groupCategories",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],S.prototype,"iconUrl",null),Object(i["a"])([Object(d["b"])()],S.prototype,"id",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],S.prototype,"isLayer",null),Object(i["a"])([Object(d["b"])()],S.prototype,"itemControl",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],S.prototype,"itemUrl",null),Object(i["a"])([Object(d["b"])()],S.prototype,"licenseInfo",void 0),Object(i["a"])([Object(d["b"])({type:Date})],S.prototype,"modified",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"name",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"numComments",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"numRatings",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"numViews",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"owner",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"ownerFolder",void 0),Object(i["a"])([Object(d["b"])({type:m["a"]})],S.prototype,"portal",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"screenshots",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"size",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"snippet",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"sourceJSON",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"tags",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"thumbnail",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],S.prototype,"thumbnailUrl",null),Object(i["a"])([Object(d["b"])()],S.prototype,"title",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"type",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"typeKeywords",void 0),Object(i["a"])([Object(d["b"])()],S.prototype,"url",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],S.prototype,"userItemUrl",null),S=T=Object(i["a"])([Object(f["a"])("esri.portal.PortalItem")],S);const E=S},a803:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return h}));var i=r("6c97"),n=r("b2b2"),a=r("8c11"),s=r("9ac8"),o=r("ec13"),c=r("b7bd"),l=r("f33e");const u={primitivesPerFeature:0,primitivesPerCoordinate:0,drawCallsPerFeature:0,estimated:!0,memory:{bytesPerFeature:0,bytesPerCoordinate:0,bytesPerFeatureLabel:0,draped:{bytesPerFeature:0,bytesPerFeatureLabel:0,bytesPerCoordinate:0}}};function d(e){return"web-style"===e.type?u:h(e.symbolLayers.toArray().map(t=>b(e,t)))}function h(e){let t=0,r=0,i=0,a=!1,s=0;const o={bytesPerFeature:0,bytesPerFeatureLabel:0,bytesPerCoordinate:0,draped:{bytesPerFeature:0,bytesPerFeatureLabel:0,bytesPerCoordinate:0}};for(const c of e)Object(n["j"])(c)||(t+=c.primitivesPerFeature,r+=c.primitivesPerCoordinate,i+=c.drawCallsPerFeature,o.bytesPerFeature+=c.memory.bytesPerFeature,o.bytesPerFeatureLabel+=c.memory.bytesPerFeatureLabel,o.bytesPerCoordinate+=c.memory.bytesPerCoordinate,o.draped.bytesPerFeature+=c.memory.bytesPerFeature,o.draped.bytesPerFeatureLabel+=c.memory.bytesPerFeatureLabel,o.draped.bytesPerCoordinate+=c.memory.bytesPerCoordinate,a=a||c.estimated,++s);return{primitivesPerFeature:t,primitivesPerCoordinate:r,drawCallsPerFeature:i,estimated:a,memory:o,numComplexities:s}}function p(e){const t=h(e);return t.numComplexities>0&&(t.primitivesPerFeature/=t.numComplexities,t.primitivesPerCoordinate/=t.numComplexities,t.drawCallsPerFeature/=t.numComplexities,t.memory.bytesPerFeature/=t.numComplexities,t.memory.bytesPerFeatureLabel/=t.numComplexities,t.memory.bytesPerCoordinate/=t.numComplexities,t.memory.draped.bytesPerFeature/=t.numComplexities,t.memory.draped.bytesPerFeatureLabel/=t.numComplexities,t.memory.draped.bytesPerCoordinate/=t.numComplexities),t}const f={};function b(e,t){const r=m(e,t),s=Object(o["d"])(t)?2:0;switch(t.type){case"extrude":return{primitivesPerFeature:-4,primitivesPerCoordinate:4,drawCallsPerFeature:s,estimated:!1,memory:r};case"fill":return"mesh-3d"===e.type?{primitivesPerFeature:0,primitivesPerCoordinate:0,drawCallsPerFeature:s,estimated:!1,memory:r}:Object(n["k"])(t.outline)&&t.outline.size>0?{primitivesPerFeature:-4,primitivesPerCoordinate:3,drawCallsPerFeature:0,estimated:!1,memory:r}:{primitivesPerFeature:-2,primitivesPerCoordinate:1,drawCallsPerFeature:0,estimated:!1,memory:r};case"water":return{primitivesPerFeature:-2,primitivesPerCoordinate:1,drawCallsPerFeature:0,estimated:!1,memory:r};case"line":return{primitivesPerFeature:-2,primitivesPerCoordinate:2,drawCallsPerFeature:0,estimated:!1,memory:r};case"object":return t.resource&&t.resource.href?{primitivesPerFeature:16,primitivesPerCoordinate:0,drawCallsPerFeature:0,estimated:!0,memory:r}:{...g(t.resource&&t.resource.primitive||a["b"]),memory:r};case"path":{const e=3,n=3,a=10;let s=0,o=0;switch(t.profile){case"circle":s=a;break;case"quad":s=4;break;default:return void Object(i["a"])(t.profile)}switch(t.join){case"round":o=e;break;case"miter":case"bevel":o=1;break;default:return void Object(i["a"])(t.join)}const c=2*s,l=s*o*2;let u=-2*l-c;switch(t.cap){case"none":break;case"butt":case"square":u+=2*(s-1);break;case"round":u+=2*(s*(n-1)*2+s);break;default:return}return{primitivesPerFeature:u,primitivesPerCoordinate:l+c,drawCallsPerFeature:0,estimated:!1,memory:r}}case"text":case"icon":return{primitivesPerFeature:2,primitivesPerCoordinate:0,drawCallsPerFeature:0,estimated:!1,memory:r};default:return}}function m(e,t){const r="point-3d"===e.type;switch(t.type){case"extrude":return t.edges&&t.edges.size>0?y.EXTRUDE_EDGES:y.EXTRUDE;case"fill":return Object(n["k"])(t.outline)&&t.outline.size>0?y.FILL_OUTLINE:y.FILL;case"water":return y.FILL;case"line":return"round"===t.join?y.LINE_ROUND:y.LINE_MITER;case"path":switch(t.join){case"round":switch(t.profile){case"circle":return y.PATH_ROUND_CIRCLE;case"quad":return y.PATH_ROUND_QUAD;default:return void Object(i["a"])(t.profile)}case"miter":case"bevel":switch(t.profile){case"circle":return y.PATH_MITER_CIRCLE;case"quad":return y.PATH_MITER_QUAD;default:return void Object(i["a"])(t.profile)}default:return void Object(i["a"])(t.join)}case"object":return r?y.OBJECT_POINT:y.OBJECT_POLYGON;case"icon":case"text":return r?y.ICON_POINT:y.ICON_POLYGON;default:return}}function g(e){let t=f[e];if(t)return t;const r=Object(s["b"])(e,null);return t={primitivesPerFeature:Object(l["b"])(r.levels[0]).reduce((e,t)=>e+t.indices.get(c["a"].POSITION).length/3,0),primitivesPerCoordinate:0,drawCallsPerFeature:0,estimated:!1},f[e]=t,t}const y={ICON_POINT:{bytesPerFeature:7127.413186968842,bytesPerFeatureLabel:4826.302896296296,bytesPerCoordinate:0,draped:{bytesPerFeature:3929.4396628895197,bytesPerFeatureLabel:3550.1332222222227,bytesPerCoordinate:0}},ICON_POLYGON:{bytesPerFeature:9329.452613976147,bytesPerFeatureLabel:3675.3372604938268,bytesPerCoordinate:60.177252982212096,draped:{bytesPerFeature:6190.247450139383,bytesPerFeatureLabel:3744.074358024691,bytesPerCoordinate:59.488211068026104}},OBJECT_POINT:{bytesPerFeature:2350.5884192634558,bytesPerFeatureLabel:4446.651003703703,bytesPerCoordinate:0,draped:{bytesPerFeature:2350.5884192634558,bytesPerFeatureLabel:4446.651003703703,bytesPerCoordinate:0}},OBJECT_POLYGON:{bytesPerFeature:4583.807620302299,bytesPerFeatureLabel:3665.342685185186,bytesPerCoordinate:60.11621818101506,draped:{bytesPerFeature:4583.807620302299,bytesPerFeatureLabel:3665.342685185186,bytesPerCoordinate:60.11621818101506}},LINE_MITER:{bytesPerFeature:7321.028181375921,bytesPerFeatureLabel:4048.0226716049388,bytesPerCoordinate:186.55621386363578,draped:{bytesPerFeature:4246.856619435009,bytesPerFeatureLabel:3852.3737679012347,bytesPerCoordinate:163.47884002621583}},LINE_ROUND:{bytesPerFeature:7482.205842738954,bytesPerFeatureLabel:4045.886987654321,bytesPerCoordinate:191.5452524171851,draped:{bytesPerFeature:4473.481387957992,bytesPerFeatureLabel:3842.1112395061728,bytesPerCoordinate:167.27703460226945}},PATH_MITER_CIRCLE:{bytesPerFeature:9010.489006415351,bytesPerFeatureLabel:4230.9109,bytesPerCoordinate:4618.2594178027275,draped:{bytesPerFeature:9010.489006415351,bytesPerFeatureLabel:4230.9109,bytesPerCoordinate:4618.2594178027275}},PATH_ROUND_CIRCLE:{bytesPerFeature:4104.727250200398,bytesPerFeatureLabel:4251.8525,bytesPerCoordinate:8019.043777064957,draped:{bytesPerFeature:4104.727250200398,bytesPerFeatureLabel:4251.8525,bytesPerCoordinate:8019.043777064957}},PATH_MITER_QUAD:{bytesPerFeature:9416.372942261387,bytesPerFeatureLabel:4241.2757,bytesPerCoordinate:3176.7222742582203,draped:{bytesPerFeature:9416.372942261387,bytesPerFeatureLabel:4241.2757,bytesPerCoordinate:3176.7222742582203}},PATH_ROUND_QUAD:{bytesPerFeature:6614.431545308682,bytesPerFeatureLabel:4206.7461,bytesPerCoordinate:5141.817789093826,draped:{bytesPerFeature:6614.431545308682,bytesPerFeatureLabel:4206.7461,bytesPerCoordinate:5141.817789093826}},FILL:{bytesPerFeature:9478.244183633637,bytesPerFeatureLabel:3713.816824691358,bytesPerCoordinate:95.9343604185578,draped:{bytesPerFeature:6287.911108168086,bytesPerFeatureLabel:3790.785032098766,bytesPerCoordinate:83.08783220478168}},FILL_OUTLINE:{bytesPerFeature:13085.871870349445,bytesPerFeatureLabel:3392.613241975309,bytesPerCoordinate:118.63968023169875,draped:{bytesPerFeature:8437.199992480122,bytesPerFeatureLabel:3973.5431172839503,bytesPerCoordinate:106.33556817014312}},EXTRUDE:{bytesPerFeature:19459.53727140414,bytesPerFeatureLabel:3743.7045209876546,bytesPerCoordinate:372.6819978900477,draped:{bytesPerFeature:19459.53727140414,bytesPerFeatureLabel:3743.7045209876546,bytesPerCoordinate:372.6819978900477}},EXTRUDE_EDGES:{bytesPerFeature:22266.888534913724,bytesPerFeatureLabel:3064.3193358024696,bytesPerCoordinate:374.3725221561312,draped:{bytesPerFeature:22266.888534913724,bytesPerFeatureLabel:3064.3193358024696,bytesPerCoordinate:374.3725221561312}}}},a8d5:function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return A}));var i=r("1325"),n=r("ce50"),a=r("e92d"),s=r("b2b2"),o=r("1219"),c=r("521c"),l=r("f70f"),u=r("7f83"),d=r("9786"),h=(r("e06a"),r("2eab")),p=r("e041"),f=r("a9ab");async function b(e,t,r,i){const n="string"==typeof e?Object(p["M"])(e):e,a=t[0].spatialReference,s={...i,query:{...n.query,f:"json",sr:JSON.stringify(a),target:JSON.stringify({geometryType:Object(f["c"])(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await Object(h["default"])(n.path+"/cut",s),{cutIndexes:c,geometries:l=[]}=o.data;return{cutIndexes:c,geometries:l.map(e=>{const t=Object(f["a"])(e);return t.spatialReference=a,t})}}async function m(e,t,r){const i="string"==typeof e?Object(p["M"])(e):e,n=t[0].spatialReference,a=Object(f["c"])(t[0]),s={...r,query:{...i.query,f:"json",sr:n.wkid?n.wkid:JSON.stringify(n),geometries:JSON.stringify(g(t))}};return y((await Object(h["default"])(i.path+"/simplify",s)).data,a,n)}function g(e){return{geometryType:Object(f["c"])(e[0]),geometries:e.map(e=>e.toJSON())}}function y(e,t,r){const i=Object(f["b"])(t);return e.map(e=>{const t=i.fromJSON(e);return t.spatialReference=r,t})}const O=a["a"].getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e.type}function _(e){return"polygon"===e[0].type}function j(e){return"polyline"===e[0].type}function w(e,t){if(!(e instanceof c["a"]||e instanceof o["a"])){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw O.error(e),new n["a"](e)}const r=Object(l["b"])(e),i=[];for(const n of r){const e=[];i.push(e),e.push([n[0][0],n[0][1]]);for(let r=0;r<n.length-1;r++){const i=n[r][0],a=n[r][1],s=n[r+1][0],o=n[r+1][1],c=Math.sqrt((s-i)*(s-i)+(o-a)*(o-a)),l=(o-a)/c,u=(s-i)/c,d=c/t;if(d>1){for(let o=1;o<=d-1;o++){const r=o*t,n=u*r+i,s=l*r+a;e.push([n,s])}const r=(c+Math.floor(d-1)*t)/2,n=u*r+i,s=l*r+a;e.push([n,s])}e.push([s,o])}}return v(e)?new o["a"]({rings:i,spatialReference:e.spatialReference}):new c["a"]({paths:i,spatialReference:e.spatialReference})}function x(e,t,r){if(t){const t=w(e,1e6);e=Object(d["e"])(t,!0)}return r&&(e=Object(l["e"])(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=Object(l["d"])(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=Object(l["d"])(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=Object(l["d"])(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=Object(l["d"])(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function S(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],a=t.geometries[i],s=Object(l["b"])(a);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*Object(l["d"])(r,180);for(let n=0;n<t.length;n++){const t=a.getPoint(e,n);a.setPoint(e,n,t.clone().offset(i,0))}return!0}})}if(n===r){if(_(e))for(const t of Object(l["b"])(a))e[n]=e[n].addRing(t);else if(j(e))for(const t of Object(l["b"])(a))e[n]=e[n].addPath(t)}else r=n,e[n]=a}return e}async function E(e,t,r){var n;if(!Array.isArray(e))return E([e],t);const a=null!=(n=null==t?void 0:t.url)?n:i["a"].geometryServiceUrl;let h,p,f,g,y,O,v,_,j=0;const w=[],A=[];for(const i of e)if(Object(s["j"])(i))A.push(i);else if(h||(h=i.spatialReference,p=Object(u["e"])(h),f=h.isWebMercator,O=f?102100:4326,g=l["a"][O].maxX,y=l["a"][O].minX,v=l["a"][O].plus180Line,_=l["a"][O].minus180Line),p)if("mesh"===i.type)A.push(i);else if("point"===i.type)A.push(T(i.clone(),g,y));else if("multipoint"===i.type){const e=i.clone();e.points=e.points.map(e=>T(e,g,y)),A.push(e)}else if("extent"===i.type){const e=i.clone()._normalize(!1,!1,p);A.push(e.rings?new o["a"](e):e)}else if(i.extent){const e=i.extent,t=Object(l["d"])(e.xmin,y)*(2*g);let r=0===t?i.clone():Object(l["e"])(i.clone(),t);e.offset(t,0),e.intersects(v)&&e.xmax!==g?(j=e.xmax>j?e.xmax:j,r=x(r,f),w.push(r),A.push("cut")):e.intersects(_)&&e.xmin!==y?(j=e.xmax*(2*g)>j?e.xmax*(2*g):j,r=x(r,f,360),w.push(r),A.push("cut")):A.push(r)}else A.push(i.clone());else A.push(i);let C=Object(l["d"])(j,g),R=-90;const M=C,P=new c["a"];for(;C>0;){const e=360*C-180;P.addPath([[e,R],[e,-1*R]]),R*=-1,C--}if(w.length>0&&M>0){const t=S(w,await b(a,w,P,r)),i=[],n=[];for(let r=0;r<A.length;r++){const a=A[r];if("cut"!==a)n.push(a);else{const a=t.shift(),o=e[r];Object(s["k"])(o)&&"polygon"===o.type&&o.rings&&o.rings.length>1&&a.rings.length>=o.rings.length?(i.push(a),n.push("simplify")):n.push(f?Object(d["b"])(a):a)}}if(!i.length)return n;const o=await m(a,i,r),c=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?c.push(t):c.push(f?Object(d["b"])(o.shift()):o.shift())}return c}const I=[];for(let i=0;i<A.length;i++){const e=A[i];if("cut"!==e)I.push(e);else{const e=w.shift();I.push(!0===f?Object(d["b"])(e):e)}}return Promise.resolve(I)}function A(e,t){const r=Object(u["e"])(t);if(r){const[t,i]=r.valid,n=i-t;if(e<t)for(;e<t;)e+=n;if(e>i)for(;e>i;)e-=n}return e}},a8f3:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("fc29"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(e){super(e),this.tooltip=null,this.value=null}clone(){return new i({tooltip:this.tooltip,value:this.value})}};Object(n["a"])([Object(s["b"])()],c.prototype,"tooltip",void 0),Object(n["a"])([Object(s["b"])()],c.prototype,"value",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.popup.content.support.ChartMediaInfoValueSeries")],c);const l=c},a915:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return s})),r.d(t,"h",(function(){return o})),r.d(t,"i",(function(){return b})),r.d(t,"j",(function(){return c}));const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,n="screenUtils.toPt: input not recognized!",a=96;function s(e){return e?e/72*a:0}function o(e){return e?72*e/a:0}function c(e){if("string"==typeof e){const t=e.match(i);if(t){const r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n="-"===e.charAt(0),a="px"===i?o(r):r;return n?-a:a}return console.warn(n),null}return e}function l(e=0,t=0){return{x:e,y:t}}function u(e=0,t=0){return[e,t]}function d(e=0,t=0){return p([e,t])}function h(e=0,t=0,r=0){return f([e,t,r])}function p(e){return e}function f(e){return e}function b(e,t){return t?(t[0]=e.x,t[1]=e.y,t.length>2&&(t[2]=0),t):[e.x,e.y]}},a957:function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i,n=r("a4ee"),a=r("7ffa"),s=r("b2b2"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("09db"),d=r("9787"),h=r("961d"),p=r("5c00"),f=r("9ef0"),b=r("6a0ed");let m=i=class extends b["a"]{constructor(){super(...arguments),this.color=new f["a"]([0,0,0,1]),this.size=0}clone(){const e={color:Object(a["a"])(this.color),size:this.size};return new i(e)}};Object(n["a"])([Object(o["b"])(p["a"])],m.prototype,"color",void 0),Object(n["a"])([Object(o["b"])(p["b"])],m.prototype,"size",void 0),m=i=Object(n["a"])([Object(l["a"])("esri.symbols.support.Symbol3DHalo")],m);var g=r("a3af"),y=r("d3ac");r("b50f"),r("c120");let O=class extends(Object(y["a"])(b["a"])){constructor(e){super(e),this.color=null}};Object(n["a"])([Object(o["b"])(p["a"])],O.prototype,"color",void 0),O=Object(n["a"])([Object(l["a"])("esri.symbols.support.Symbol3DTextBackground")],O);var v,_=r("1e5b");let j=v=class extends h["a"]{constructor(e){super(e),this._userSize=void 0,this.halo=null,this.horizontalAlignment="center",this.lineHeight=1,this.material=null,this.background=null,this.text=null,this.type="text",this.verticalAlignment="baseline"}get font(){return this._get("font")||null}set font(e){Object(s["k"])(e)&&Object(s["k"])(this._userSize)&&(e.size=this._userSize),this._set("font",e)}writeFont(e,t,r,i){const n={...i,textSymbol3D:!0};t.font=e.write({},n),delete t.font.size}get size(){return Object(s["k"])(this._userSize)?this._userSize:Object(s["k"])(this.font)&&null!=this.font.size?this.font.size:9}set size(e){this._userSize=e,Object(s["k"])(this.font)&&(this.font.size=this._userSize),this.notifyChange("size")}clone(){const e=new v({enabled:this.enabled,font:this.font&&Object(a["a"])(this.font),halo:this.halo&&Object(a["a"])(this.halo),horizontalAlignment:this.horizontalAlignment,lineHeight:this.lineHeight,material:Object(s["k"])(this.material)?this.material.clone():null,text:this.text,verticalAlignment:this.verticalAlignment,background:Object(a["a"])(this.background)});return e._userSize=this._userSize,e}static fromTextSymbol(e){return new v({font:Object(s["k"])(e.font)?e.font.clone():new d["a"],halo:w(e.haloColor,e.haloSize),horizontalAlignment:e.horizontalAlignment,lineHeight:e.lineHeight,material:e.color?new g["a"]({color:e.color.clone()}):null,text:e.text,verticalAlignment:e.verticalAlignment,background:e.backgroundColor?new O({color:e.backgroundColor.clone()}):null})}};function w(e,t){return e&&t>0?new m({color:Object(a["a"])(e),size:t}):null}Object(n["a"])([Object(o["b"])({type:d["a"],json:{write:!0}})],j.prototype,"font",null),Object(n["a"])([Object(u["a"])("font")],j.prototype,"writeFont",null),Object(n["a"])([Object(o["b"])({type:m,json:{write:!0}})],j.prototype,"halo",void 0),Object(n["a"])([Object(o["b"])({..._["e"],json:{default:"center",write:!0}})],j.prototype,"horizontalAlignment",void 0),Object(n["a"])([Object(o["b"])({..._["f"],json:{default:1,write:!0}})],j.prototype,"lineHeight",void 0),Object(n["a"])([Object(o["b"])({type:g["a"],json:{write:!0}})],j.prototype,"material",void 0),Object(n["a"])([Object(o["b"])({type:O,json:{write:!0}})],j.prototype,"background",void 0),Object(n["a"])([Object(o["b"])(p["b"])],j.prototype,"size",null),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],j.prototype,"text",void 0),Object(n["a"])([Object(c["a"])({Text:"text"},{readOnly:!0})],j.prototype,"type",void 0),Object(n["a"])([Object(o["b"])({..._["g"],json:{default:"baseline",write:!0}})],j.prototype,"verticalAlignment",void 0),j=v=Object(n["a"])([Object(l["a"])("esri.symbols.TextSymbol3DLayer")],j);const x=j},a978:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return l}));var i=r("b2b2"),n=r("e431"),a=r("0b2d"),s=r("0d9f"),o=r("1942");function c(e){return Object(i["k"])(e)&&Object(i["k"])(e.dist)}function l(e){return(t,r,i)=>(Object(n["k"])(h,t,r,i),!Object(s["f"])(e,h))}function u(e){return c(e)&&e.intersector===o["b"].OBJECT&&!!e.target}function d(e){return c(e)&&e.intersector===o["b"].HUD&&!!e.target&&Object(i["k"])(e.target.center)}const h=Object(a["f"])()},a98b:function(e,t,r){"use strict";r.d(t,"a",(function(){return $})),r.d(t,"b",(function(){return W})),r.d(t,"c",(function(){return Z})),r.d(t,"d",(function(){return C})),r.d(t,"e",(function(){return A})),r.d(t,"f",(function(){return x})),r.d(t,"g",(function(){return R})),r.d(t,"h",(function(){return M})),r.d(t,"i",(function(){return B})),r.d(t,"j",(function(){return D})),r.d(t,"k",(function(){return N})),r.d(t,"l",(function(){return V})),r.d(t,"m",(function(){return G})),r.d(t,"n",(function(){return q})),r.d(t,"o",(function(){return H})),r.d(t,"p",(function(){return te})),r.d(t,"q",(function(){return X})),r.d(t,"r",(function(){return Y})),r.d(t,"s",(function(){return J})),r.d(t,"t",(function(){return ee})),r.d(t,"u",(function(){return K})),r.d(t,"v",(function(){return P})),r.d(t,"w",(function(){return ne}));var i=r("cb72"),n=r("2c4f"),a=r("b2b2"),s=r("8048"),o=r("4212"),c=r("a29a"),l=r("f7eb"),u=r("3349"),d=r("02f1"),h=r("3af1"),p=r("3760"),f=r("4ae5"),b=r("8188"),m=r("5996"),g=r("7f83");const y=96,O=39.37,v=180/Math.PI;function _(e){return e.wkid?e:e.spatialReference||m["a"].WGS84}function j(e,t){return t.type?Object(u["s"])(e,t.x,t.y):Object(u["c"])(e,t)}function w(e){return Object(s["f"])(e)}function x(e,t){return Math.max(e.width/t[0],e.height/t[1])*U(e.spatialReference)}async function T(e,t,r,i){let s,o;if(!e)return null;if(Array.isArray(e)&&!e.length)return null;if(n["a"].isCollection(e)&&(e=e.toArray()),Array.isArray(e)&&e.length&&"object"==typeof e[0]){const n=e.every(e=>"attributes"in e),s=e.some(e=>!e.geometry);let o=e;if(n&&s&&t&&t.allLayerViews){const r=new Map;for(const t of e){const e=t.layer,i=r.get(e)||[],n=t.attributes[e.objectIdField];null!=n&&i.push(n),r.set(e,i)}const i=[];r.forEach((e,r)=>{const n=t.allLayerViews.find(e=>e.layer.id===r.id);if("queryFeatures"in n){const t=r.createQuery();t.objectIds=e,t.returnGeometry=!0,i.push(n.queryFeatures(t))}});const n=await Promise.all(i),s=[];for(const e of n)if(e&&e.features&&e.features.length)for(const t of e.features)Object(a["k"])(t.geometry)&&s.push(t.geometry);o=s}for(const e of o)i=await T(e,t,r,i);return i}if(Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1])s=new f["a"](e);else if(e instanceof p["a"])s=e;else if("geometry"in e)if(e.geometry)s=e.geometry;else if(e.layer){const r=e.layer,i=t.allLayerViews.find(e=>e.layer.id===r.id);if("queryFeatures"in i){const t=r.createQuery();t.objectIds=[e.attributes[r.objectIdField]],t.returnGeometry=!0;const n=await i.queryFeatures(t);s=Object(a["i"])(n,"features",0,"geometry")}}if(Object(a["j"])(s))return null;if(o="point"===s.type?new h["a"]({xmin:s.x,ymin:s.y,xmax:s.x,ymax:s.y,spatialReference:s.spatialReference}):s.extent,!o)return null;Object(b["h"])()||Object(b["b"])(o.spatialReference,r)||await Object(b["i"])();const c=Object(b["m"])(o,r);return c?i=i?i.union(c):c:null}function S(e){if(e&&(!Array.isArray(e)||"number"!=typeof e[0])&&("object"==typeof e||Array.isArray(e)&&"object"==typeof e[0])){if("layer"in e&&e.layer&&e.layer.minScale&&e.layer.maxScale){const t=e.layer;return{min:t.minScale,max:t.maxScale}}if(Array.isArray(e)&&e.length&&e.every(e=>"layer"in e)){let t=0,r=0;for(const i of e){const e=i.layer;e&&e.minScale&&e.maxScale&&(t=e.minScale<t?e.minScale:t,r=e.maxScale>r?e.maxScale:r)}return t&&r?{min:t,max:r}:null}}}function E(e,t){return Object(g["d"])(_(e),t)?e:Object(b["m"])(e,t)}async function A(e,t){if(!e||!t)return new i["a"]({targetGeometry:new f["a"],scale:0,rotation:0});let r=t.spatialReference;const{constraints:n,padding:s,viewpoint:o,size:c}=t,l=[s?c[0]-s.left-s.right:c[0],s?c[1]-s.top-s.bottom:c[1]];let u=null;e instanceof i["a"]?u=e:e.viewpoint?u=e.viewpoint:e.target&&"esri.Viewpoint"===e.target.declaredClass&&(u=e.target);let d=null;u&&u.targetGeometry?d=u.targetGeometry:e instanceof h["a"]?d=e:(e||e&&("center"in e||"extent"in e||"target"in e))&&(d=await T(e.center,t,r)||await T(e.extent,t,r)||await T(e.target,t,r)||await T(e,t,r)),!d&&o&&o.targetGeometry?d=o.targetGeometry:!d&&t.extent&&(d=t.extent),r||(r=_(t.spatialReference||t.extent||d)),Object(b["h"])()||Object(g["d"])(d.spatialReference,r)||Object(b["b"])(d,r)||await Object(b["i"])();const p=E(d.center?d.center:d,r);let m=null;if(u&&Object(a["k"])(u.targetGeometry)&&"point"===u.targetGeometry.type)m=u.scale;else if("scale"in e&&e.scale)m=e.scale;else if("zoom"in e&&-1!==e.zoom&&n&&n.effectiveLODs)m=n.zoomToScale(e.zoom);else if(Array.isArray(d)||"point"===d.type||"extent"===d.type&&0===d.width&&0===d.height){const e=E(t.extent,r);m=Object(a["k"])(e)?x(e,l):t.extent?x(t.extent,l):o.scale}else m=x(E(d.extent,r),l);const y=S(e);y&&(y.min&&y.min>m?m=y.min:y.max&&y.max<m&&(m=y.max));let O=0;u?O=u.rotation:e.hasOwnProperty("rotation")?O=e.rotation:o&&(O=o.rotation);let v=new i["a"]({targetGeometry:p,scale:m,rotation:O});return n&&(v=n.fit(v),n.constrainByGeometry(v),n.rotationEnabled||(v.rotation=O)),v}function C(e,t){const r=e.targetGeometry,i=t.targetGeometry;return r.x=i.x,r.y=i.y,r.spatialReference=i.spatialReference,e.scale=t.scale,e.rotation=t.rotation,e}function R(e,t,r){return r?Object(u["s"])(e,.5*(t[0]-r.right+r.left),.5*(t[1]-r.bottom+r.top)):Object(u["g"])(e,t,.5)}const M=function(){const e=Object(d["b"])();return function(t,r,i){const n=r.targetGeometry;j(e,n);const a=.5*N(r);return t.xmin=e[0]-a*i[0],t.ymin=e[1]-a*i[1],t.xmax=e[0]+a*i[0],t.ymax=e[1]+a*i[1],t.spatialReference=n.spatialReference,t}}();function P(e,t,r,i,n){return Z(e,t,r.center),e.scale=x(r,i),n&&n.constraints&&n.constraints.constrain(e),e}function I(e,t,r,i){return V(e,t,r,i),Object(c["e"])(e,e)}const D=function(){const e=Object(d["b"])();return function(t,r,i){return Object(u["h"])(t,z(t,r),R(e,r,i))}}(),L=function(){const e=Object(l["a"])(),t=Object(d["b"])();return function(r,i,n,a){const s=N(i),o=k(i);return Object(u["s"])(t,s,s),Object(c["d"])(e,t),Object(c["g"])(e,e,o),Object(c["i"])(e,e,D(t,n,a)),Object(c["i"])(e,e,[0,a.top-a.bottom]),Object(u["s"])(r,e[4],e[5])}}();function N(e){return e.scale*F(e.targetGeometry)}function F(e){return Object(a["k"])(e)&&Object(g["l"])(e.spatialReference)?1/(w(e.spatialReference)*O*y):1}function k(e){return Object(o["c"])(e.rotation)||0}function U(e){return Object(g["l"])(e)?w(e)*O*y:1}function z(e,t){return Object(u["g"])(e,t,.5)}const B=function(){const e=Object(d["b"])(),t=Object(d["b"])(),r=Object(d["b"])();return function(i,n,a,s,o,l){return Object(u["n"])(e,n),Object(u["g"])(t,a,.5*l),Object(u["s"])(r,1/s*l,-1/s*l),Object(c["a"])(i,t),o&&Object(c["g"])(i,i,o),Object(c["h"])(i,i,r),Object(c["i"])(i,i,e),i}}(),V=function(){const e=Object(d["b"])();return function(t,r,i,n){const a=N(r),s=k(r);return j(e,r.targetGeometry),B(t,e,i,a,s,n)}}(),G=function(){const e=Object(d["b"])();return function(t,r,i,n){const a=N(r);return j(e,r.targetGeometry),B(t,e,i,a,0,n)}}();function H(e){if(e.isWrappable){const t=Object(g["e"])(e);return t.valid[1]-t.valid[0]}return 0}function q(e,t){return Math.round(H(e)/t)}const W=function(){const e=Object(d["b"])(),t=Object(d["b"])(),r=[0,0,0];return function(i,n,a){Object(u["f"])(e,i,n),Object(u["i"])(e,e),Object(u["f"])(t,i,a),Object(u["i"])(t,t),Object(u["j"])(r,e,t);let s=Math.acos(Object(u["k"])(e,t)/(Object(u["l"])(e)*Object(u["l"])(t)))*v;return r[2]<0&&(s=-s),isNaN(s)&&(s=0),s}}(),$=function(){const e=Object(d["b"])();return function(t,r,i,n){const a=t.targetGeometry;return C(t,r),L(e,r,i,n),a.x+=e[0],a.y+=e[1],t}}(),Z=function(e,t,r){C(e,t);const i=e.targetGeometry;return i.x=r.x,i.y=r.y,i.spatialReference=r.spatialReference,e},X=function(){const e=Object(d["b"])();return function(t,r,i,n,a){a||(a="center"),Object(u["h"])(e,i,n),Object(u["g"])(e,e,.5);const s=e[0],o=e[1];switch(a){case"center":Object(u["s"])(e,0,0);break;case"left":Object(u["s"])(e,-s,0);break;case"top":Object(u["s"])(e,0,o);break;case"right":Object(u["s"])(e,s,0);break;case"bottom":Object(u["s"])(e,0,-o);break;case"top-left":Object(u["s"])(e,-s,o);break;case"bottom-left":Object(u["s"])(e,-s,-o);break;case"top-right":Object(u["s"])(e,s,o);break;case"bottom-right":Object(u["s"])(e,s,-o)}return ne(t,r,e),t}}();function Y(e,t,r){return C(e,t),e.rotation+=r,e}function J(e,t,r){return C(e,t),e.rotation=r,e}const Q=function(){const e=Object(d["b"])();return function(t,r,i,n,a){return C(t,r),isNaN(i)||0===i||(re(e,n,r,a),t.scale=r.scale*i,ie(e,e,t,a),ne(t,t,Object(u["s"])(e,e[0]-n[0],n[1]-e[1]))),t}}();function K(e,t,r){return C(e,t),e.scale=r,e}const ee=function(){const e=Object(d["b"])();return function(t,r,i,n,a,s){return C(t,r),isNaN(i)||0===i||(re(e,a,r,s),t.scale=r.scale*i,t.rotation+=n,ie(e,e,t,s),ne(t,t,Object(u["s"])(e,e[0]-a[0],a[1]-e[1]))),t}}(),te=function(){const e=Object(d["b"])(),t=Object(d["b"])();return function(r,i,n,a,s,o,c){return D(t,o,c),Object(u["m"])(e,s,t),a?ee(r,i,n,a,e,o):Q(r,i,n,e,o)}}(),re=function(){const e=Object(l["a"])();return function(t,r,i,n){return Object(u["t"])(t,r,I(e,i,n,1))}}(),ie=function(){const e=Object(l["a"])();return function(t,r,i,n){return Object(u["t"])(t,r,V(e,i,n,1))}}(),ne=function(){const e=Object(d["b"])(),t=Object(l["a"])();return function(r,i,n){C(r,i);const a=N(i),s=r.targetGeometry;return Object(c["b"])(t,k(i)),Object(c["h"])(t,t,Object(d["f"])(a,a)),Object(u["t"])(e,n,t),s.x+=e[0],s.y+=e[1],r}}()},a9ab:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return y})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return p}));var i=r("b2b2"),n=r("3af1"),a=r("3760"),s=r("57dc"),o=r("4ae5"),c=r("1219"),l=r("521c");function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function d(e){return void 0!==e.points}function h(e){return void 0!==e.x&&void 0!==e.y}function p(e){return void 0!==e.paths}function f(e){return void 0!==e.rings}function b(e){return Object(i["j"])(e)?null:e instanceof a["a"]?e:h(e)?o["a"].fromJSON(e):p(e)?l["a"].fromJSON(e):f(e)?c["a"].fromJSON(e):d(e)?s["a"].fromJSON(e):u(e)?n["a"].fromJSON(e):null}function m(e){return e?h(e)?"esriGeometryPoint":p(e)?"esriGeometryPolyline":f(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":d(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:o["a"],esriGeometryPolyline:l["a"],esriGeometryPolygon:c["a"],esriGeometryEnvelope:n["a"],esriGeometryMultipoint:s["a"]};function y(e){return e&&g[e]||null}},a9da:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.Dirty=1]="Dirty",e[e.Overriden=2]="Overriden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"}(i||(i={}))},a9e6:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e=[]){this._elements=e}length(){return this._elements.length}get(e){return this._elements[e]}toArray(){const e=[];for(let t=0;t<this.length();t++)e.push(this.get(t));return e}}},aab5:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));var i,n=r("6c97"),a=r("3886");function s(e,t){const r=e.fragment;switch(r.code.add(a["a"]`struct ShadingNormalParameters {
  2485. vec3 normalView;
  2486. vec3 viewDirection;
  2487. } shadingParams;`),t.doubleSidedMode){case i.None:r.code.add(a["a"]`vec3 shadingNormal(ShadingNormalParameters params) {
  2488. return normalize(params.normalView);
  2489. }`);break;case i.View:r.code.add(a["a"]`vec3 shadingNormal(ShadingNormalParameters params) {
  2490. return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView);
  2491. }`);break;case i.WindingOrder:r.code.add(a["a"]`vec3 shadingNormal(ShadingNormalParameters params) {
  2492. return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView);
  2493. }`);break;default:Object(n["a"])(t.doubleSidedMode);case i.COUNT:}}!function(e){e[e.None=0]="None",e[e.View=1]="View",e[e.WindingOrder=2]="WindingOrder",e[e.COUNT=3]="COUNT"}(i||(i={}))},ac8e:function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return I})),r.d(t,"d",(function(){return P})),r.d(t,"e",(function(){return D})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return f})),r.d(t,"h",(function(){return p}));var i=r("9ef0"),n=r("1fd7"),a=r("792b"),s=r("c120"),o=r("b2b2"),c=(r("a915"),r("0b2d")),l=r("d4e6"),u=(r("cdd0"),r("a3af"));const d=/\/resource\/(.*?)\.svg$/,h=new i["a"]("white");function p(e){if(Object(o["j"])(e)||!("symbolLayers"in e)||Object(o["j"])(e.symbolLayers))return!1;switch(e.type){case"point-3d":return e.symbolLayers.some(e=>"object"===e.type);case"line-3d":return e.symbolLayers.some(e=>"path"===e.type);case"polygon-3d":return e.symbolLayers.some(e=>"object"===e.type||"extrude"===e.type);default:return!1}}function f(e,t){const r=t.resource.href;return!Object(s["a"])("esri-canvas-svg-support")&&e.styleOrigin&&d.test(r)?r.replace(d,"/resource/png/$1.png"):r}function b(e,t){if(!e)return null;let r=null;return Object(n["c"])(e)?r=m(e):Object(n["b"])(e)&&(r=e.color?new i["a"](e.color):null),r?g(r,t):null}function m(e){const t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach(e=>{"object"===e.type&&null!=e.resource.href||(r="water"===e.type?Object(o["t"])(e.color):Object(o["k"])(e.material)?Object(o["t"])(e.material.color):null)}),r?new i["a"](r):null}function g(e,t){if(null==t)return e;const r=e.toRgba();return r[3]=r[3]*t,new i["a"](r)}function y(e,t,r){const i=e.symbolLayers;if(!i)return;const n=e=>{const i=Object(o["k"])(e)?e:null;return g(t=t||i||null!=r&&h,r)};i.forEach(e=>{if("object"!==e.type||null==e.resource.href||t)if("water"===e.type)e.color=n(e.color);else{const t=Object(o["k"])(e.material)?e.material.color:null,i=n(t);Object(o["j"])(e.material)?e.material=new u["a"]({color:i}):e.material.color=i,null!=r&&"outline"in e&&Object(o["k"])(e.outline)&&Object(o["k"])(e.outline.color)&&(e.outline.color=g(e.outline.color,r))}})}function O(e,t,r){(t=t||e.color)&&(e.color=g(t,r)),null!=r&&"outline"in e&&e.outline&&e.outline.color&&(e.outline.color=g(e.outline.color,r))}function v(e,t,r){e&&(t||null!=r)&&(t&&(t=new i["a"](t)),Object(n["c"])(e)?y(e,t,r):Object(n["b"])(e)&&O(e,t,r))}async function _(e,t){const r=e.symbolLayers;r&&await Object(a["b"])(r,async e=>j(e,t))}async function j(e,t){switch(e.type){case"extrude":T(e,t);break;case"icon":case"line":case"text":w(e,t);break;case"path":E(e,t);break;case"object":await S(e,t)}}function w(e,t){const r=x(t);Object(o["k"])(r)&&(e.size=r)}function x(e){for(const t of e)if("number"==typeof t)return t;return null}function T(e,t){e.size="number"==typeof t[2]?t[2]:0}async function S(e,t){const{resourceSize:r,symbolSize:i}=await C(e),n=A(t,r,i);e.width=R(t[0],i[0],r[0],n),e.depth=R(t[1],i[1],r[1],n),e.height=R(t[2],i[2],r[2],n)}function E(e,t){const r=A(t,c["a"],[e.width,void 0,e.height]);e.width=R(t[0],e.width,1,r),e.height=R(t[2],e.height,1,r)}function A(e,t,r){for(let i=0;i<3;i++){const n=e[i];switch(n){case"symbol-value":return null!=r[i]?r[i]/t[i]:1;case"proportional":break;default:if(n&&t[i])return n/t[i]}}return 1}async function C(e){const t=await r.e("chunk-743b8b12").then(r.bind(null,"005d7")),i=await t.computeObjectLayerResourceSize(e,10),{width:n,height:a,depth:s}=e,o=[n,s,a];let c=1;for(let r=0;r<3;r++)if(null!=o[r]){c=o[r]/i[r];break}for(let r=0;r<3;r++)null==o[r]&&(o[r]=i[r]*c);return{resourceSize:i,symbolSize:o}}function R(e,t,r,i){switch(e){case"proportional":return r*i;case"symbol-value":return null!=t?t:r;default:return e}}function M(e,t){const r=x(t);if(!Object(o["j"])(r))switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}async function P(e,t){if(e&&t)return Object(n["c"])(e)?_(e,t):void(Object(n["b"])(e)&&M(e,t))}function I(e,t,r){if(e&&null!=t)if(Object(n["c"])(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if(e&&"object"===e.type)switch(r){case"tilt":e.tilt=t;break;case"roll":e.roll=t;break;default:e.heading=t}})}else Object(n["b"])(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle=t))}function D(e){if(!e)return null;const t=e.effects.filter(e=>"bloom"!==e.type).map(e=>e.toJSON());return Object(l["a"])(t)}},ac91:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("2eab"),n=r("cea0"),a=r("a9ab"),s=r("bb72"),o=r("a571"),c=r("7e6b");const l=Object(n["m"])(c["a"]);async function u(e,t,r){t=l(t);const n=Object(s["c"])(e),c={...n.query,f:"json",...t.toJSON()},u=t.outSpatialReference,d=Object(a["c"])(t.geometries[0]),h=Object(s["a"])(c,r);return Object(i["default"])(n.path+"/project",h).then(({data:{geometries:e}})=>Object(o["a"])(e,d,u))}},ace4:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("d3ac"),a=r("fa8a"),s=r("6a0ed"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386"));const l=new a["a"]({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends(Object(n["a"])(s["a"])){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};Object(i["a"])([Object(o["b"])({json:{write:!0}})],u.prototype,"name",void 0),Object(i["a"])([Object(o["b"])({json:{write:!0}})],u.prototype,"description",void 0),Object(i["a"])([Object(o["b"])({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),Object(i["a"])([Object(o["b"])({json:{write:!0}})],u.prototype,"prototype",void 0),Object(i["a"])([Object(o["b"])({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=Object(i["a"])([Object(c["a"])("esri.layers.support.FeatureTemplate")],u);const d=u},adf1:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("b2b2"),n=r("f2e0"),a=r("afe1"),s=r("e431"),o=r("0b2d"),c=r("8188"),l=r("b7c2"),u=r("0278"),d=r("f643"),h=r("5a22"),p=r("b7bd"),f=r("748fd"),b=r("86ba");class m{constructor(e,t=125e4){this._originSR=e,this._gridSize=t,this._origins=new Map,this._objects=new Map,this._rootOriginId="root/"+Object(n["b"])()}getOrigin(e){const t=this._origins.get(this._rootOriginId);if(null==t){if(Object(i["k"])(g))return this._origins.set(this._rootOriginId,Object(d["a"])(g[0],g[1],g[2],this._rootOriginId)),this.getOrigin(e);const t=Object(d["a"])(e[0]+Math.random()-.5,e[1]+Math.random()-.5,e[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,t),t}const r=this._gridSize,n=Math.round(e[0]/r),a=Math.round(e[1]/r),o=Math.round(e[2]/r),c=`${n}/${a}/${o}`;let l=this._origins.get(c);const u=.5*r;if(Object(s["l"])(y,e,t.vec3),y[0]=Math.abs(y[0]),y[1]=Math.abs(y[1]),y[2]=Math.abs(y[2]),y[0]<u&&y[1]<u&&y[2]<u){if(l){const t=Math.max(...y);if(Object(s["l"])(y,e,l.vec3),y[0]=Math.abs(y[0]),y[1]=Math.abs(y[1]),y[2]=Math.abs(y[2]),Math.max(...y)<t)return l}return t}return l||(l=Object(d["a"])(n*r,a*r,o*r,c),this._origins.set(c,l)),l}_drawOriginBox(e,t=[1,1,0,1]){const r=window.view,i=r._stage,n=t.toString();if(!this._objects.has(n)){this._material=new b["a"]({width:2,color:t}),i.add(this._material);const e=new f["a"]({isPickable:!1}),r=new h["a"]({castShadow:!1});i.add(r),e.add(r),i.add(e),this._objects.set(n,r)}const s=this._objects.get(n),o=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],d=o.length,m=new Array(3*d),g=new Uint16Array(2*(d-1)),y=.5*this._gridSize;for(let a=0;a<d;a++)m[3*a+0]=e[0]+(1&o[a]?y:-y),m[3*a+1]=e[1]+(2&o[a]?y:-y),m[3*a+2]=e[2]+(4&o[a]?y:-y),a>0&&(g[2*a+0]=a-1,g[2*a+1]=a);Object(c["p"])(m,this._originSR,0,m,r.renderSpatialReference,0,d);const O=new u["a"]([[p["a"].POSITION,{size:3,data:m,exclusive:!0}]],[[p["a"].POSITION,g]],l["h"].Line);i.add(O),s.addGeometry(O,this._material,a["a"])}}let g=null;const y=Object(o["f"])()},ae54:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("ecd7");class n{constructor(e,t,r,i){this.set(e,t,r,i)}static getId(e,t,r,i){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${i}`}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,i){this.set(e,t,r,i)}contains(e){const t=e.level-this.level;return this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new n(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,i){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,r,i,n]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(i),this.world=parseFloat(n)}else this.level=+e,this.row=+t,this.col=+r,this.world=+i||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new n(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,i=this.world;return[new n(e,t,r,i),new n(e,t,r+1,i),new n(e,t+1,r,i),new n(e,t+1,r+1,i)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}n.pool=new i["a"](n,null,null,25,50)},aeb3:function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return v}));var i=r("a05b"),n=r("d272"),a=r("4db9"),s=r("6d5b"),o=r("c2d1"),c=r("6a07"),l=r("d047"),u=r("c6d7"),d=r("ebd5"),h=r("4377"),p=r("3886"),f=r("690a"),b=r("b7bd"),m=r("37e4");const g=.70710678118,y=g,O=.08715574274;function v(e){const t=new f["a"];e.draped||t.extensions.add("GL_OES_standard_derivatives");const r=e.output===i["a"].Depth;t.include(a["a"],{linearDepth:r}),t.include(s["a"],e),t.vertex.uniforms.add("proj","mat4"),t.vertex.uniforms.add("view","mat4"),r&&(t.include(o["a"],e),t.vertex.uniforms.add("nearFar","vec2"),t.varyings.add("linearDepth","float")),e.draped?t.vertex.uniforms.add("worldToScreenRatio","float"):(t.vertex.uniforms.add("worldToScreenPerDistanceRatio","float"),t.vertex.uniforms.add("cameraPosition","vec3"),t.attributes.add(b["a"].BOUNDINGRECT,"mat3")),t.attributes.add(b["a"].POSITION,"vec3"),t.attributes.add(b["a"].UVMAPSPACE,"vec4"),t.varyings.add("vpos","vec3"),t.varyings.add("vuv","vec2"),e.multipassTerrainEnabled&&t.varyings.add("depth","float");const v=e.style===m["a"].ForwardDiagonal||e.style===m["a"].BackwardDiagonal||e.style===m["a"].DiagonalCross;return v&&t.vertex.code.add(p["a"]`
  2494. const mat2 rotate45 = mat2(${p["a"].float(g)}, ${p["a"].float(-y)},
  2495. ${p["a"].float(y)}, ${p["a"].float(g)});
  2496. `),e.draped||(t.vertex.code.add(p["a"]`vec3 projectPointToLineSegment(vec3 center, vec3 halfVector, vec3 point) {
  2497. float projectedLength = dot(halfVector, point - center) / dot(halfVector, halfVector);
  2498. return center + halfVector * clamp(projectedLength, -1.0, 1.0);
  2499. }`),t.vertex.code.add(p["a"]`vec3 intersectRayPlane(vec3 rayDir, vec3 rayOrigin, vec3 planeNormal, vec3 planePoint) {
  2500. float d = dot(planeNormal, planePoint);
  2501. float t = (d - dot(planeNormal, rayOrigin)) / dot(planeNormal, rayDir);
  2502. return rayOrigin + t * rayDir;
  2503. }`),t.vertex.code.add(p["a"]`
  2504. float boundingRectDistanceToCamera() {
  2505. vec3 center = vec3(boundingRect[0][0], boundingRect[0][1], boundingRect[0][2]);
  2506. vec3 halfU = vec3(boundingRect[1][0], boundingRect[1][1], boundingRect[1][2]);
  2507. vec3 halfV = vec3(boundingRect[2][0], boundingRect[2][1], boundingRect[2][2]);
  2508. vec3 n = normalize(cross(halfU, halfV));
  2509. vec3 viewDir = - vec3(view[0][2], view[1][2], view[2][2]);
  2510. float viewAngle = dot(viewDir, n);
  2511. float minViewAngle = ${p["a"].float(O)};
  2512. if (abs(viewAngle) < minViewAngle) {
  2513. // view direction is (almost) parallel to plane -> clamp it to min angle
  2514. float normalComponent = sign(viewAngle) * minViewAngle - viewAngle;
  2515. viewDir = normalize(viewDir + normalComponent * n);
  2516. }
  2517. // intersect view direction with infinite plane that contains bounding rect
  2518. vec3 planeProjected = intersectRayPlane(viewDir, cameraPosition, n, center);
  2519. // clip to bounds by projecting to u and v line segments individually
  2520. vec3 uProjected = projectPointToLineSegment(center, halfU, planeProjected);
  2521. vec3 vProjected = projectPointToLineSegment(center, halfV, planeProjected);
  2522. // use to calculate the closest point to camera on bounding rect
  2523. vec3 closestPoint = uProjected + vProjected - center;
  2524. return length(closestPoint - cameraPosition);
  2525. }
  2526. `)),t.vertex.code.add(p["a"]`
  2527. vec2 scaledUV() {
  2528. vec2 uv = uvMapSpace.xy ${v?" * rotate45":""};
  2529. vec2 uvCellOrigin = uvMapSpace.zw ${v?" * rotate45":""};
  2530. ${e.draped?"":p["a"]`
  2531. float distanceToCamera = boundingRectDistanceToCamera();
  2532. float worldToScreenRatio = worldToScreenPerDistanceRatio / distanceToCamera;
  2533. `}
  2534. // Logarithmically discretize ratio to avoid jittering
  2535. float step = 0.1;
  2536. float discreteWorldToScreenRatio = log(worldToScreenRatio);
  2537. discreteWorldToScreenRatio = ceil(discreteWorldToScreenRatio / step) * step;
  2538. discreteWorldToScreenRatio = exp(discreteWorldToScreenRatio);
  2539. vec2 uvOffset = mod(uvCellOrigin * discreteWorldToScreenRatio, ${p["a"].float(e.patternSpacing)});
  2540. return uvOffset + (uv * discreteWorldToScreenRatio);
  2541. }
  2542. `),t.vertex.code.add(p["a"]`
  2543. void main(void) {
  2544. vuv = scaledUV();
  2545. vpos = position;
  2546. ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
  2547. forwardNormalizedVertexColor();
  2548. gl_Position = ${r?p["a"]`transformPositionWithDepth(proj, view, vpos, nearFar, linearDepth);`:p["a"]`transformPosition(proj, view, vpos);`}
  2549. }
  2550. `),t.include(n["a"],e),t.fragment.include(h["a"]),t.fragment.uniforms.add("uColor","vec4"),e.draped&&t.fragment.uniforms.add("texelSize","float"),e.output===i["a"].Highlight&&t.include(c["a"]),e.multipassTerrainEnabled&&(t.fragment.include(l["a"]),t.include(u["b"],e)),e.output!==i["a"].Highlight&&(t.fragment.code.add(p["a"]`
  2551. const float lineWidth = ${p["a"].float(e.lineWidth)};
  2552. const float spacing = ${p["a"].float(e.patternSpacing)};
  2553. const float spacingINV = ${p["a"].float(1/e.patternSpacing)};
  2554. float coverage(float p, float txlSize) {
  2555. p = mod(p, spacing);
  2556. float halfTxlSize = txlSize / 2.0;
  2557. float start = p - halfTxlSize;
  2558. float end = p + halfTxlSize;
  2559. float coverage = (ceil(end * spacingINV) - floor(start * spacingINV)) * lineWidth;
  2560. coverage -= min(lineWidth, mod(start, spacing));
  2561. coverage -= max(lineWidth - mod(end, spacing), 0.0);
  2562. return coverage / txlSize;
  2563. }
  2564. `),e.draped||t.fragment.code.add(p["a"]`const int maxSamples = 5;
  2565. float sample(float p) {
  2566. vec2 dxdy = abs(vec2(dFdx(p), dFdy(p)));
  2567. float fwidth = dxdy.x + dxdy.y;
  2568. ivec2 samples = 1 + ivec2(clamp(dxdy, 0.0, float(maxSamples - 1)));
  2569. vec2 invSamples = 1.0 / vec2(samples);
  2570. float accumulator = 0.0;
  2571. for (int j = 0; j < maxSamples; j++) {
  2572. if(j >= samples.y) {
  2573. break;
  2574. }
  2575. for (int i = 0; i < maxSamples; i++) {
  2576. if(i >= samples.x) {
  2577. break;
  2578. }
  2579. vec2 step = vec2(i,j) * invSamples - 0.5;
  2580. accumulator += coverage(p + step.x * dxdy.x + step.y * dxdy.y, fwidth);
  2581. }
  2582. }
  2583. accumulator /= float(samples.x * samples.y);
  2584. return accumulator;
  2585. }`)),t.fragment.code.add(p["a"]`
  2586. void main() {
  2587. discardBySlice(vpos);
  2588. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  2589. vec4 color = ${e.attributeColor?"vColor * uColor;":"uColor;"}
  2590. color = highlightSlice(color, vpos);
  2591. ${e.output!==i["a"].Highlight?p["a"]`color.a *= ${_(e)};`:""}
  2592. if (color.a < ${p["a"].float(d["c"])}) {
  2593. discard;
  2594. }
  2595. ${e.output===i["a"].Alpha?p["a"]`gl_FragColor = vec4(color.a);`:""}
  2596. ${e.output===i["a"].Color?p["a"]`gl_FragColor = color; ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}`:""}
  2597. ${e.output===i["a"].Highlight?p["a"]`outputHighlight();`:""}
  2598. ${e.output===i["a"].Depth?p["a"]`outputDepth(linearDepth);`:""};
  2599. }
  2600. `),t}function _(e){function t(t){return e.draped?p["a"]`coverage(vuv.${t}, texelSize)`:p["a"]`sample(vuv.${t})`}switch(e.style){case m["a"].ForwardDiagonal:case m["a"].Horizontal:return t("y");case m["a"].BackwardDiagonal:case m["a"].Vertical:return t("x");case m["a"].DiagonalCross:case m["a"].Cross:return p["a"]`
  2601. 1.0 - (1.0 - ${t("x")}) * (1.0 - ${t("y")})
  2602. `;default:return"0.0"}}const j=Object.freeze({__proto__:null,build:v})},aefa:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return s}));var i=r("b2b2"),n=r("8a44");const a=-3;var s;!function(e){e[e.ALL=0]="ALL",e[e.SOME=1]="SOME"}(s||(s={}));class o{constructor(e,t,r){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",r&&(this._storage.registerRemoveFunc(this._namespace,r),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,r,i=0){this._storage.put(this._namespace+e,t,r,i)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,r){this._storage.updateSize(this._namespace+e,t,r)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class c{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n["a"],this._users=new n["a"]}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace(t=>t[0]!==e)}get size(){return this._size}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,r,i){const n=this._db.get(e);if(n&&(this._size-=n.size,this._db.delete(e),n.entry!==t&&this._notifyRemove(e,n.entry,s.ALL)),r>this._maxSize)return void this._notifyRemove(e,t,s.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return void console.warn("Refusing to cache entry with invalid size "+r);const o=1+Math.max(i,a)-a;this._db.set(e,{entry:t,size:r,lifetime:o,lives:o}),this._size+=r,this._checkSizeLimit()}updateSize(e,t,r){const n=this._db.get(e);if(n&&n.entry===t){for(this._size-=n.size;r>this._maxSize;){const n=this._notifyRemove(e,t,s.SOME);if(!(Object(i["k"])(n)&&n>0))return void this._db.delete(e);r=n}n.size=r,this._size+=r,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach((e,i)=>{const n=e.lifetime;r[n]=(r[n]||0)+e.size,this._users.forAll(r=>{const n=r.namespace;if(i.startsWith(n)){const r=t[n]||0;t[n]=r+e.size}})});const i={};this._users.forAll(e=>{const r=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const n=t[r]||0;t[r]=n,i[r]=Math.round(100*e.hitRate)+"%"}else i[r]="0%"});const n=Object.keys(t);n.sort((e,r)=>t[r]-t[e]),n.forEach(r=>e[r]=Math.round(t[r]/2**20)+"MB / "+i[r]);for(let s=r.length-1;s>=0;--s){const t=r[s];t&&(e["Priority "+(s+a-1)]=Math.round(t/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll(e=>e.resetHitRate())}clear(e){this._db.forEach((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,s.ALL))})}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,s.ALL)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r){let i;return this._removeFuncs.some(n=>{if(e.startsWith(n[0])){const e=n[1](t,r);return"number"==typeof e&&(i=e),!0}return!1}),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const r=this._notifyRemove(e,t.entry,s.SOME);Object(i["k"])(r)&&r>0&&(this._size+=r,t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},af20:function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return _}));var i=r("3c9c"),n=r("bd75"),a=r("a05b"),s=r("d272"),o=r("4db9"),c=r("b49d"),l=r("c2d1"),u=r("6a07"),d=r("d047"),h=r("7088"),p=r("ea4b"),f=r("c6d7"),b=r("aab5"),m=r("040b"),g=r("d017"),y=r("4377"),O=r("3886"),v=r("690a");function _(e){const t=new v["a"];return t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("cameraPosition","vec3").add("localOrigin","vec3"),t.varyings.add("vpos","vec3"),t.include(c["a"],e),e.output!==a["a"].Color&&e.output!==a["a"].Alpha||(t.include(o["a"],{linearDepth:!1}),e.receiveShadows&&t.include(g["a"],e),t.include(n["a"],e),t.varyings.add("vnormal","vec3"),t.varyings.add("vcolor","vec4"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),t.vertex.code.add(O["a"]`
  2603. void main() {
  2604. vpos = calculateVPos();
  2605. vnormal = normalize(localNormal());
  2606. ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
  2607. gl_Position = transformPosition(proj, view, vpos);
  2608. ${e.output===a["a"].Color?"forwardLinearDepth();":""}
  2609. vcolor = getColor();
  2610. }
  2611. `)),e.multipassTerrainEnabled&&(t.fragment.include(d["a"]),t.include(f["b"],e)),e.output===a["a"].Alpha&&(t.include(s["a"],e),t.fragment.uniforms.add("cameraPosition","vec3"),t.fragment.uniforms.add("localOrigin","vec3"),t.fragment.uniforms.add("opacity","float"),t.fragment.code.add(O["a"]`
  2612. void main() {
  2613. discardBySlice(vpos);
  2614. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  2615. float combinedOpacity = vcolor.a * opacity;
  2616. gl_FragColor = vec4(combinedOpacity);
  2617. }
  2618. `)),e.output===a["a"].Color&&(t.include(s["a"],e),t.include(p["a"],e),t.include(h["a"],e),e.receiveShadows&&t.include(g["a"],e),t.include(b["a"],e),t.fragment.uniforms.add("cameraPosition","vec3").add("localOrigin","vec3").add("ambient","vec3").add("diffuse","vec3").add("specular","vec3").add("opacity","float"),t.fragment.include(y["a"]),t.fragment.code.add(O["a"]`
  2619. void main() {
  2620. discardBySlice(vpos);
  2621. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  2622. shadingParams.viewDirection = normalize(vpos - cameraPosition);
  2623. shadingParams.normalView = vnormal;
  2624. vec3 normal = shadingNormal(shadingParams);
  2625. float ssao = evaluateAmbientOcclusionInverse();
  2626. float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
  2627. vec3 additionalLight = ssao * lightingMainIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
  2628. ${e.receiveShadows?"float shadow = readShadowMap(vpos, linearDepth);":e.viewingMode===i["a"].Global?"float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);":"float shadow = 0.0;"}
  2629. vec3 albedo = vcolor.rgb * max(ambient, diffuse); // combine the old material parameters into a single one
  2630. float combinedOpacity = vcolor.a * opacity;
  2631. albedo += 0.25 * specular; // don't completely ignore specular for now
  2632. vec3 shadedColor = evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight);
  2633. gl_FragColor = vec4(shadedColor, combinedOpacity);
  2634. gl_FragColor = highlightSlice(gl_FragColor, vpos);
  2635. ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  2636. }
  2637. `)),e.output!==a["a"].Depth&&e.output!==a["a"].Shadow||(t.include(o["a"],{linearDepth:!0}),t.vertex.uniforms.add("nearFar","vec2"),t.varyings.add("depth","float"),t.vertex.code.add(O["a"]`void main() {
  2638. vpos = calculateVPos();
  2639. gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
  2640. }`),t.include(s["a"],e),t.include(l["a"],e),t.fragment.uniforms.add("timeElapsed","float"),t.fragment.code.add(O["a"]`void main() {
  2641. discardBySlice(vpos);
  2642. outputDepth(depth);
  2643. }`)),e.output===a["a"].Normal&&(t.include(o["a"],{linearDepth:!1}),t.include(m["a"],e),t.vertex.uniforms.add("viewNormal","mat4"),t.varyings.add("vnormal","vec3"),t.vertex.code.add(O["a"]`void main(void) {
  2644. vpos = calculateVPos();
  2645. vnormal = normalize((viewNormal * vec4(localNormal(), 1.0)).xyz);
  2646. gl_Position = transformPosition(proj, view, vpos);
  2647. }`),t.include(s["a"],e),t.fragment.uniforms.add("waterColor","vec4"),t.fragment.code.add(O["a"]`void main() {
  2648. discardBySlice(vpos);
  2649. vec3 normal = normalize(vnormal);
  2650. if (gl_FrontFacing == false) normal = -normal;
  2651. gl_FragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);
  2652. }`)),e.output===a["a"].Highlight&&(t.include(o["a"],{linearDepth:!1}),t.include(m["a"],e),t.vertex.uniforms.add("viewNormal","mat4"),t.varyings.add("vnormal","vec3"),t.vertex.code.add(O["a"]`void main(void) {
  2653. vpos = calculateVPos();
  2654. gl_Position = transformPosition(proj, view, vpos);
  2655. }`),t.include(s["a"],e),t.include(u["a"]),t.fragment.code.add(O["a"]`void main() {
  2656. discardBySlice(vpos);
  2657. outputHighlight();
  2658. }`)),t}const j=Object.freeze({__proto__:null,build:_})},af3d:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return d}));r("c120");var i=r("0b2d"),n=r("4261");function a(e,{isPrimitive:t,width:r,depth:n,height:a}){const s=t?10:1;if(null==r&&null==a&&null==n)return[s*e[0],s*e[1],s*e[2]];const o=Object(i["h"])(r,n,a);let c;for(let i=0;i<3;i++){const t=o[i];if(null!=t){c=t/e[i];break}}for(let i=0;i<3;i++)null==o[i]&&(o[i]=e[i]*c);return o}const s=Object(n["t"])(-.5,-.5,-.5,.5,.5,.5),o=Object(n["t"])(-.5,-.5,0,.5,.5,1),c=Object(n["t"])(-.5,-.5,0,.5,.5,.5);function l(e){switch(e){case"sphere":case"cube":case"diamond":return s;case"cylinder":case"cone":case"inverted-cone":return o;case"tetrahedron":return c;default:return}}const u=["butt","square","round"],d=[...u,"none"],h=["miter","bevel","round"]},af40:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("a4ee"),n=r("fc29"),a=r("2c4f"),s=r("b2b2"),o=r("59b2"),c=r("d386");let l=class extends n["a"]{constructor(e){super(e),this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach(t=>{e+=t.length}),e}add(e,t){if(!this._isHandle(e)&&!Array.isArray(e)&&!a["a"].isCollection(e))return this;const r=this._getOrCreateGroup(t);return Array.isArray(e)||a["a"].isCollection(e)?e.forEach(e=>this._isHandle(e)&&r.push(e)):r.push(e),this.notifyChange("size"),this}forEach(e,t){if("function"==typeof e)this._groups.forEach(t=>t.forEach(e));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if(Array.isArray(e)||a["a"].isCollection(e))return e.forEach(this.remove,this),this;if(!this.has(e))return this;const t=this._getGroup(e);for(let r=0;r<t.length;r++)t[r].remove();return this._deleteGroup(e),this.notifyChange("size"),this}removeAll(){return this._groups.forEach(e=>{for(let t=0;t<e.length;t++)e[t].remove()}),this._groups.clear(),this.notifyChange("size"),this}_isHandle(e){return e&&!!e.remove}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return Object(s["c"])(this._groups.get(this._ensureGroupKey(e)))}_deleteGroup(e){return this._groups.delete(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}};Object(i["a"])([Object(o["b"])({readOnly:!0})],l.prototype,"size",null),l=Object(i["a"])([Object(c["a"])("esri.core.Handles")],l);const u=l},af85:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBQTBDNEFEMEM5RDExMUVCOUIxOUEyODJFOTcyOEQ1NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBQTBDNEFEMUM5RDExMUVCOUIxOUEyODJFOTcyOEQ1NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkFBMEM0QUNFQzlEMTExRUI5QjE5QTI4MkU5NzI4RDU0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkFBMEM0QUNGQzlEMTExRUI5QjE5QTI4MkU5NzI4RDU0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+KkVwGAAABVFJREFUeNrUmGtoHFUUx/8z+5jNxmTzTppNTbLNJmk2bfMytsa20iq2gkXBimgVKhVBERT6RWtRRAURoZ+CqLSo0CqStlrEkAqKShpaDWsKm6RJkxhM+kjcPI3Z5/i/sxuyCbYxj012Bw5n5t679/72zLnnnDtQVRUrLce3GrKjMa8QGdG5qqM0b9SAK+INOO4sXHBimzE5noDXUXLjCTiDYo0LYLpChskEQ9wAC+sqiop4col1CWbEFXCGKWRha7xZOCrA+ihaODdiI4pEsoly5uAF71isWjiHoGbKu7xvsdcWn6B28jkp9ixsAhQFBo8HTsf9tfaK3Q4YvcMY6u4vGHVPr+cYVywBW/t6JRAW2w/usxdV0pXHrqHlzEUQ9iv2d8aMhfm6s6lqBoeSYavNhzlRAiZu4kJDCzqcNz5n30H6cCAmgAmro/p68xPPS7bqUrid36Kp/hsUlWehq+3Gh+x7gbBqTIS1cGX2nU6Hu8seeQapd+bDVlmsnRAIO8G+j1YCVlySmHSZsIVU53JyVEfmjuegJKXA6+6FOtaLruZWVFUF0Nysm+SYJwl9bk2BCbuN6mxNTSDL7ZbQ06O9sHZJljcidAb7s6wsmGe1BnH+vF747quEfn9NgAl7gOrj7TsCpv5+CX/0yS18foXSY7JYbqj+aXj+9oi6+CnK61sqgimeaaCjQ/4k7M++VfFhgkqUt3j7Ga1n+vknXTdhH+PzPYQQ0Baj2QyDIipMKGz7gNr+u1OuJ6x/Y1nwEJ8bOUda1IG5SALVydLS4FHqv1wuWVjUQaiGiE2VYkxMhMFkFPfaMYl9w5QXebul3SU3Wq3qLpH9OJ89asCcPIfqR8qjtJRmNUIco3jnDbVowAmzwDMXx7ooewcGpL189IWhd644MCcVhYt43VcpxVz0MGX0FsMjXeI/6wb+tlFYmyLe1CnOf2jFgDnZw1TvUPZzIRGa+hf4Sdglbg0chvZT6nlbRinlOm9TFuTRLwC7R0QSTrxvEW/NYqCF1anbA0eAizd1mGsVUR+gPs22yUUDi9KQ6nthiUXuC83C6sT/A44A76bq5ropS7IwJ5haYmzXNl0wFCUWXfveZm9ErbzUNl3AZFgS8FrUw5pL+JUYBT5+lzQ31+sNmoX9oThsmd8//3r20uJKg5U+04naIScirGXG1DGf1hPf0F4W0YQyYk4yDMqyVGoIJw5ZhwfYPk75JZwkNqyJSxBUoXpDVGeOTbJp/cZMpJeUQMm24eSRBggLexklUnPTsOfp0qSRrs66gc6bdc7W4Jv8TUO4qhtYFWDCivjc5ChHXUU1YEy2AOkFkDJs3G42eKc8mHEJn0+CMasQWfI0sjI8qKgakduc2N/6K3ZzDlFPXFwNlzhSvhl1tSzdjWJfGchvYqxPyGA1kwi9UY9rbW2YdE/C7/Fp7Vo/x0ncf1sqgXt3QpSWX1KMq+ESD20oivzLnELHdfUKAjxTZJbYcPn0qdAHiqICrV3rl2eXshezkHehYHhIK4AuRRvYM6egDDJzB9jg99CQCh48+lJEHy082hfqD87N8IHQYX96NVziWEc7tA8l2uVjBp9mNv1nmOIOQc7AimfRLvp9s5n+N9p0xI0m3l6Ouksw0H/BjVfeexWv3bcLUqGdp/jJ61ANidBShGc85Aa0uIBVx/q1fngnMDQEdLqAriv4gSMfX9VDKKF3UL2Xkoqtefl6pOelwGLNgdGSBuUOMzyTU/CNj2B84DrcgyMY7PcL4O5wbf0pRV1Kplv2dwmCO8IhqkoU4iIdU1Ipo+GkcYXSJkJheIOpy0nN/wowAI8va3WvIJdDAAAAAElFTkSuQmCC"},afcf:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("59b2");function n(e,t,r){let n,a;return void 0===t||Array.isArray(t)?(a=e,r=t,n=[void 0]):(a=t,n=Array.isArray(e)?e:[e]),(e,t)=>{const s=e.constructor.prototype;n.forEach(n=>{const o=Object(i["c"])(e,n,a);o.read&&"object"==typeof o.read||(o.read={}),o.read.reader=s[t],r&&(o.read.source=(o.read.source||[]).concat(r))})}}},afe1:function(e,t,r){"use strict";function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function a(e,t,r,i,n,a,s,o,c,l,u,d,h,p,f,b){return[e,t,r,i,n,a,s,o,c,l,u,d,h,p,f,b]}function s(e,t){return new Float64Array(e,t,16)}r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return i})),r.d(t,"e",(function(){return a}));const o=i();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,IDENTITY:o})},aff7:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.fragment.uniforms.add("anchorPosition","vec3").add("anchorPositionCrossFade","vec3").add("fadeInOutFactor","float").add("cloudsHeight","float").add("rotationMatrixClouds","mat4").add("rotationMatrixCloudsCrossFade","mat4").add("radiusCurvatureCorrectionFactor","float").add("radius","float").add("cameraPosition","vec3").add("totalFadeInOut","float").add("crossFade","int").add("crossFadeAnchorFactor","float").add("cloudVariables","vec2").add("cubeMap","samplerCube"),e.fragment.code.add(i["a"]`vec3 intersectWithCloudLayer(vec3 dir, vec3 cameraPosition, vec3 spherePos, float radiusReduction)
  2659. {
  2660. vec3 dirAnchor = normalize(spherePos);
  2661. vec3 sphereOriginOffset = dirAnchor * radiusReduction;
  2662. float radiusClouds = radius + cloudsHeight - radiusReduction;
  2663. float B = 2.0 * dot(cameraPosition - sphereOriginOffset, dir);
  2664. float C = dot(cameraPosition - sphereOriginOffset, cameraPosition - sphereOriginOffset) - radiusClouds * radiusClouds;
  2665. float det = B * B - 4.0 * C;
  2666. float pointIntDist = max(0.0, 0.5 *(-B + sqrt(det)));
  2667. vec3 intersectionPont = cameraPosition + dir * pointIntDist;
  2668. intersectionPont = intersectionPont - spherePos;
  2669. return intersectionPont;
  2670. }`),e.fragment.code.add(i["a"]`vec3 correctForPlanetCurvature(vec3 dir)
  2671. {
  2672. dir.z = dir.z*(1.-radiusCurvatureCorrectionFactor) + radiusCurvatureCorrectionFactor;
  2673. return dir;
  2674. }`),e.fragment.code.add(i["a"]`vec3 rotateDirectionToAnchorPoint(mat4 rotMat, vec3 inVec)
  2675. {
  2676. return (rotMat * vec4(inVec, 0.0)).xyz;
  2677. }`),e.fragment.code.add(i["a"]`const float SUNSET_TRANSITION_FACTOR = 0.3;
  2678. const vec3 RIM_COLOR = vec3(0.28, 0.175, 0.035);
  2679. const float RIM_SCATTERING_FACTOR = 140.0;
  2680. const float BACKLIGHT_FACTOR = 0.2;
  2681. const float BACKLIGHT_SCATTERING_FACTOR = 10.0;
  2682. const float BACKLIGHT_TRANSITION_FACTOR = 0.3;
  2683. vec3 calculateCloudColor(vec3 worldSpaceRay, vec4 clouds)
  2684. {
  2685. float upDotLight = dot(normalize(cameraPosition), normalize(lightingMainDirection));
  2686. float dirDotLight = max(dot(normalize(-worldSpaceRay), normalize(lightingMainDirection)), 0.0);
  2687. float sunsetTransition = clamp(pow(max(upDotLight, 0.0), SUNSET_TRANSITION_FACTOR), 0.0, 1.0);
  2688. vec3 ambientLight = calculateAmbientIrradiance(normalize(cameraPosition), 0.0);
  2689. vec3 mainLight = evaluateMainLighting(normalize(cameraPosition), 0.0);
  2690. vec3 combinedLight = clamp((lightingMainIntensity + ambientLight )/PI, vec3(0.0), vec3(1.0));
  2691. vec3 baseCloudColor = pow(combinedLight * pow(clouds.xyz, vec3(GAMMA)), vec3(INV_GAMMA));
  2692. float scatteringMod = max(clouds.a < 0.5 ? clouds.a / 0.5 : - clouds.a / 0.5 + 2.0, 0.0);
  2693. float rimLightIntensity = 0.5 + 0.5 *pow(max(upDotLight, 0.0), 0.35);
  2694. vec3 directSunScattering = RIM_COLOR * rimLightIntensity * pow(dirDotLight, RIM_SCATTERING_FACTOR) * scatteringMod;
  2695. float additionalLight = BACKLIGHT_FACTOR * pow(dirDotLight, BACKLIGHT_SCATTERING_FACTOR) * (1. - pow(sunsetTransition, BACKLIGHT_TRANSITION_FACTOR)) ;
  2696. return vec3(baseCloudColor * (1. + additionalLight) + directSunScattering);
  2697. }`),e.fragment.code.add(i["a"]`vec4 getCloudData(vec3 rayDir)
  2698. {
  2699. vec4 cloudData = textureCube(cubeMap, rayDir);
  2700. float mu = dot(rayDir, vec3(0, 0, 1));
  2701. return mix(vec4(vec3(clamp(1.0 - cloudVariables.y, 0.6, 1.0)), 0.0), cloudData, smoothstep(-0.01, mix(0.0, 0.075, cloudVariables.x), abs(mu)));
  2702. }`),e.fragment.code.add(i["a"]`vec4 renderCloud(vec3 worldRay, vec3 position)
  2703. {
  2704. vec3 intersectionPoint = intersectWithCloudLayer(normalize(worldRay), position, anchorPosition, 0.0);
  2705. vec3 worldRayRotated = rotateDirectionToAnchorPoint(rotationMatrixClouds, normalize(intersectionPoint));
  2706. vec3 worldRayRotatedCorrected = correctForPlanetCurvature(worldRayRotated);
  2707. vec4 cloudData = getCloudData(worldRayRotatedCorrected);
  2708. float totalTransmittance = clamp(cloudData.a * (1.0 - totalFadeInOut) + totalFadeInOut, 0.0 , 1.0);
  2709. if (length(cloudData.rgb) == 0.0) {
  2710. totalTransmittance = 1.0;
  2711. }
  2712. return vec4(calculateCloudColor(normalize(-worldRay), cloudData), totalTransmittance);
  2713. }`),e.fragment.code.add(i["a"]`vec4 renderCloudCrossFade(vec3 worldRay, vec3 position)
  2714. {
  2715. vec3 intersectionPoint = intersectWithCloudLayer(normalize(worldRay), position, anchorPosition, 0.0);
  2716. vec3 worldRayRotated = rotateDirectionToAnchorPoint(rotationMatrixClouds, normalize(intersectionPoint));
  2717. vec3 worldRayRotatedCorrected = correctForPlanetCurvature(worldRayRotated);
  2718. vec4 cloudData = getCloudData(worldRayRotatedCorrected);
  2719. vec4 cloudColor = vec4(calculateCloudColor(normalize(-worldRay), cloudData), cloudData.a);
  2720. intersectionPoint = intersectWithCloudLayer(normalize(worldRay), position, anchorPositionCrossFade, 0.0);
  2721. worldRayRotated = rotateDirectionToAnchorPoint(rotationMatrixCloudsCrossFade, normalize(intersectionPoint));
  2722. worldRayRotatedCorrected = correctForPlanetCurvature(worldRayRotated);
  2723. cloudData = getCloudData(worldRayRotatedCorrected);
  2724. vec4 cloudColorCrossFade = vec4(calculateCloudColor(normalize(-worldRay), cloudData), cloudData.a);
  2725. cloudColor = mix(cloudColor, cloudColorCrossFade, crossFadeAnchorFactor);
  2726. float totalTransmittance = clamp(cloudColor.a * (1.0 - totalFadeInOut) + totalFadeInOut, 0.0 , 1.0);
  2727. if (length(cloudColor.rgb) == 0.0) {
  2728. totalTransmittance = 1.0;
  2729. }
  2730. return vec4(cloudColor.rgb, totalTransmittance);
  2731. }`)}},affb:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var i=r("3886"),n=r("690a"),a=r("b7bd");function s(){const e=new n["a"];return e.attributes.add(a["a"].POSITION,"vec2"),e.attributes.add(a["a"].UV0,"vec2"),e.vertex.uniforms.add("scale","float"),e.vertex.uniforms.add("offset","vec2"),e.varyings.add("uv","vec2"),e.vertex.code.add(i["a"]`void main(void) {
  2732. gl_Position = vec4(position, 0.0, 1.0);
  2733. uv = uv0 * scale + offset;
  2734. }`),e.fragment.uniforms.add("tex","sampler2D"),e.fragment.uniforms.add("opacity","float"),e.fragment.code.add(i["a"]`void main() {
  2735. vec4 color = texture2D(tex, uv);
  2736. gl_FragColor = vec4(color.xyz, 1.0) * color.a * opacity;
  2737. }`),e}const o=Object.freeze({__proto__:null,build:s})},b061:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var i=r("b2b2"),n=r("a05b"),a=r("b7c2"),s=r("614d");class o{constructor(e,t){this._material=e,this._repository=t,this._map=new Map}destroy(){this._map.forEach((e,t)=>{Object(i["k"])(e)&&this._repository.release(this._material,c(t))})}load(e,t){this._map.has(t)||this._map.set(t,this._repository.acquire(this._material,c(t)));const r=this._map.get(t);if(Object(i["k"])(r)){if(r.ensureResources(e)===a["j"].LOADED)return r;this._repository.requestRender()}return null}}function c(e){switch(e){default:case s["a"].MATERIAL:return n["a"].Color;case s["a"].MATERIAL_ALPHA:return n["a"].Alpha;case s["a"].MATERIAL_DEPTH_SHADOWMAP_ALL:return n["a"].Shadow;case s["a"].MATERIAL_NORMAL:return n["a"].Normal;case s["a"].MATERIAL_DEPTH:return n["a"].Depth;case s["a"].MATERIAL_HIGHLIGHT:return n["a"].Highlight;case s["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT:case s["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT:return n["a"].Shadow}}},b08e:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("fa8a");const n=Object(i["b"])()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},b09a:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886"),n=r("b7bd");function a(e){e.attributes.add(n["a"].POSITION,"vec3"),e.vertex.code.add(i["a"]`vec3 positionModel() { return position; }`)}},b0ab:function(e,t,r){"use strict";r.d(t,"a",(function(){return M})),r.d(t,"b",(function(){return R}));var i=r("3c9c"),n=r("bd75"),a=r("17ca"),s=r("a05b"),o=r("d272"),c=r("4db9"),l=r("d539"),u=r("c332"),d=r("b09a"),h=r("6cb2"),p=r("dfaf"),f=r("6d5b"),b=r("17b0"),m=r("7e21"),g=r("d047"),y=r("7088"),O=r("ea4b"),v=r("c6d7"),_=r("5d5f"),j=r("a7d7"),w=r("d017"),x=r("be24"),T=r("ebd5"),S=r("3626"),E=r("3886"),A=r("690a"),C=r("b7bd");function R(e){const t=new A["a"],r=t.vertex.code,R=t.fragment.code;return t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("cameraPosition","vec3").add("localOrigin","vec3"),t.include(d["a"]),t.varyings.add("vpos","vec3"),t.include(x["a"],e),t.include(l["a"],e),t.include(b["a"],e),e.output!==s["a"].Color&&e.output!==s["a"].Alpha||(t.include(u["a"],e),t.include(c["a"],{linearDepth:!1}),e.offsetBackfaces&&t.include(a["a"]),e.instancedColor&&t.attributes.add(C["a"].INSTANCECOLOR,"vec4"),t.varyings.add("vNormalWorld","vec3"),t.varyings.add("localvpos","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),t.include(p["a"],e),t.include(n["a"],e),t.include(h["a"],e),t.include(f["a"],e),t.vertex.uniforms.add("externalColor","vec4"),t.varyings.add("vcolorExt","vec4"),r.add(E["a"]`
  2738. void main(void) {
  2739. forwardNormalizedVertexColor();
  2740. vcolorExt = externalColor;
  2741. ${e.instancedColor?"vcolorExt *= instanceColor;":""}
  2742. vcolorExt *= vvColor();
  2743. vcolorExt *= getSymbolColor();
  2744. forwardColorMixMode();
  2745. if (vcolorExt.a < ${E["a"].float(T["c"])}) {
  2746. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  2747. }
  2748. else {
  2749. vpos = calculateVPos();
  2750. localvpos = vpos - view[3].xyz;
  2751. vpos = subtractOrigin(vpos);
  2752. vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
  2753. vpos = addVerticalOffset(vpos, localOrigin);
  2754. gl_Position = transformPosition(proj, view, vpos);
  2755. ${e.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""}
  2756. }
  2757. ${e.multipassTerrainEnabled?E["a"]`depth = (view * vec4(vpos, 1.0)).z;`:""}
  2758. forwardLinearDepth();
  2759. forwardTextureCoordinates();
  2760. }
  2761. `)),e.output===s["a"].Alpha&&(t.include(o["a"],e),t.include(T["a"],e),e.multipassTerrainEnabled&&(t.fragment.include(g["a"]),t.include(v["b"],e)),t.fragment.uniforms.add("cameraPosition","vec3").add("localOrigin","vec3").add("opacity","float").add("layerOpacity","float"),t.fragment.uniforms.add("view","mat4"),e.hasColorTexture&&t.fragment.uniforms.add("tex","sampler2D"),t.fragment.include(S["a"]),R.add(E["a"]`
  2762. void main() {
  2763. discardBySlice(vpos);
  2764. ${e.multipassTerrainEnabled?E["a"]`terrainDepthTest(gl_FragCoord, depth);`:""}
  2765. ${e.hasColorTexture?E["a"]`
  2766. vec4 texColor = texture2D(tex, vuv0);
  2767. ${e.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
  2768. discardOrAdjustAlpha(texColor);`:E["a"]`vec4 texColor = vec4(1.0);`}
  2769. ${e.attributeColor?E["a"]`
  2770. float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:E["a"]`
  2771. float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));
  2772. `}
  2773. gl_FragColor = vec4(opacity_);
  2774. }
  2775. `)),e.output===s["a"].Color&&(t.include(o["a"],e),t.include(O["a"],e),t.include(y["a"],e),t.include(T["a"],e),e.receiveShadows&&t.include(w["a"],e),e.multipassTerrainEnabled&&(t.fragment.include(g["a"]),t.include(v["b"],e)),t.fragment.uniforms.add("cameraPosition","vec3").add("localOrigin","vec3").add("ambient","vec3").add("diffuse","vec3").add("opacity","float").add("layerOpacity","float"),t.fragment.uniforms.add("view","mat4"),e.hasColorTexture&&t.fragment.uniforms.add("tex","sampler2D"),t.include(j["c"],e),t.include(_["a"],e),t.fragment.include(S["a"]),R.add(E["a"]`
  2776. void main() {
  2777. discardBySlice(vpos);
  2778. ${e.multipassTerrainEnabled?E["a"]`terrainDepthTest(gl_FragCoord, depth);`:""}
  2779. ${e.hasColorTexture?E["a"]`
  2780. vec4 texColor = texture2D(tex, vuv0);
  2781. ${e.textureAlphaPremultiplied?"texColor.rgb /= texColor.a;":""}
  2782. discardOrAdjustAlpha(texColor);`:E["a"]`vec4 texColor = vec4(1.0);`}
  2783. vec3 viewDirection = normalize(vpos - cameraPosition);
  2784. ${e.pbrMode===j["a"].Normal?"applyPBRFactors();":""}
  2785. float ssao = evaluateAmbientOcclusionInverse();
  2786. ssao *= getBakedOcclusion();
  2787. float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
  2788. vec3 additionalLight = ssao * lightingMainIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
  2789. ${e.receiveShadows?"float shadow = readShadowMap(vpos, linearDepth);":e.viewingMode===i["a"].Global?"float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);":"float shadow = 0.0;"}
  2790. vec3 matColor = max(ambient, diffuse);
  2791. ${e.attributeColor?E["a"]`
  2792. vec3 albedo_ = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
  2793. float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:E["a"]`
  2794. vec3 albedo_ = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
  2795. float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));
  2796. `}
  2797. ${E["a"]`
  2798. vec3 shadedNormal = normalize(vNormalWorld);
  2799. albedo_ *= 1.2;
  2800. vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
  2801. float alignmentLightView = clamp(dot(viewForward, -lightingMainDirection), 0.0, 1.0);
  2802. float transmittance = 1.0 - clamp(dot(viewForward, shadedNormal), 0.0, 1.0);
  2803. float treeRadialFalloff = vColor.r;
  2804. float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
  2805. additionalLight += backLightFactor * lightingMainIntensity;`}
  2806. ${e.pbrMode===j["a"].Normal||e.pbrMode===j["a"].Schematic?e.viewingMode===i["a"].Global?E["a"]`vec3 normalGround = normalize(vpos + localOrigin);`:E["a"]`vec3 normalGround = vec3(0.0, 0.0, 1.0);`:E["a"]``}
  2807. ${e.pbrMode===j["a"].Normal||e.pbrMode===j["a"].Schematic?E["a"]`
  2808. float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * lightingMainIntensity[2];
  2809. vec3 shadedColor = evaluateSceneLightingPBR(shadedNormal, albedo_, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:"vec3 shadedColor = evaluateSceneLighting(shadedNormal, albedo_, shadow, 1.0 - ssao, additionalLight);"}
  2810. gl_FragColor = highlightSlice(vec4(shadedColor, opacity_), vpos);
  2811. ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  2812. }
  2813. `)),t.include(m["a"],e),t}const M=Object.freeze({__proto__:null,build:R})},b0e3:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return c}));var i=r("e041"),n=r("fcf2");function a(e,t,r){return t.imageData?Object(i["D"])({mediaType:t.contentType||"image/png",isBase64:!0,data:t.imageData}):s(t.url,r)}function s(e,t){return u(t)&&!Object(i["u"])(e)&&t.layer.parsedUrl?Object(i["B"])(t.layer.parsedUrl.path,"images",e):Object(n["b"])(e,t)}function o(e,t,r,a){if(Object(i["w"])(e)){const s=Object(i["h"])(e);t.contentType=s.mediaType,t.imageData=s.data,r&&r.imageData===t.imageData&&r.url&&Object(n["g"])(r.url,t,"url",a)}else Object(n["g"])(e,t,"url",a)}const c={json:{read:{source:["imageData","url"],reader:a},write:{writer(e,t,r,i){o(e,t,this.source,i)}}}},l={readOnly:!0,json:{read:{source:["imageData","url"],reader(e,t,r){const i={};return t.imageData&&(i.imageData=t.imageData),t.contentType&&(i.contentType=t.contentType),t.url&&(i.url=s(t.url,r)),i}}}};function u(e){return e&&("service"===e.origin||"portal-item"===e.origin)&&e.layer&&("feature"===e.layer.type||"stream"===e.layer.type)}},b0ea:function(e,t,r){"use strict";function i(e){return e}function n(e){return i(1e3*e)}function a(e){return e}function s(e){return a(.001*e)}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return s}))},b0f5:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("b2b2"),n=r("8048"),a=r("7f83");function s(e,t,r){if(Object(i["j"])(t)||Object(i["j"])(r)||r.vcsWkid||Object(a["d"])(t,r))return null;const s=Object(n["g"])(t)/Object(n["g"])(r);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>o(e,s);case"polyline":case"esriGeometryPolyline":return e=>l(e,s);case"polygon":case"esriGeometryPolygon":return e=>c(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>u(e,s);case"extent":case"esriGeometryExtent":return e=>d(e,s);default:return null}}function o(e,t){e&&null!=e.z&&(e.z*=t)}function c(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}function l(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}function u(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}function d(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}},b139:function(e,t,r){"use strict";function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}function a(e,t,r,i){return[e,t,r,i]}function s(e,t){return new Float64Array(e,t,4)}r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return s}));const o=i();Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s,IDENTITY:o})},b165:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return f}));var i=r("2906"),n=r("dea3"),a=r("f159"),s=r("a7d7"),o=r("c51b"),c=r("aff7"),l=r("4377"),u=r("501b"),d=r("3886"),h=r("690a"),p=r("b7bd");function f(){const e=new h["a"];return e.attributes.add(p["a"].POSITION,"vec2"),e.varyings.add("worldRay","vec3"),e.vertex.uniforms.add("inverseProjectionMatrix","mat4"),e.vertex.uniforms.add("inverseViewMatrix","mat4"),e.vertex.code.add(d["a"]`void main(void) {
  2814. vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1.0, 1.0)).xyz;
  2815. worldRay = (inverseViewMatrix * vec4(posViewNear, 0.0)).xyz;
  2816. gl_Position = vec4(position, 1.0, 1.0);
  2817. }`),e.fragment.uniforms.add("lightingMainDirection","vec3"),e.fragment.include(l["a"]),e.fragment.include(u["a"]),e.include(n["a"]),e.include(i["a"],{pbrMode:s["a"].Disabled,lightingSphericalHarmonicsOrder:2}),e.include(o["a"]),e.include(a["a"]),e.include(c["a"]),e.fragment.code.add(d["a"]`void main() {
  2818. vec4 cloudsColor = crossFade == 0 ? renderCloud(normalize(worldRay), cameraPosition) : renderCloudCrossFade(normalize(worldRay), cameraPosition);
  2819. gl_FragColor = vec4((1.0 - totalFadeInOut) * cloudsColor.rgb, cloudsColor.a);
  2820. }`),e}const b=Object.freeze({__proto__:null,build:f})},b237:function(e,t,r){"use strict";var i=r("f2bf"),n=Object(i["createElementVNode"])("div",{id:"viewDiv"},null,-1),a={id:"marker"},s=["id"];function o(e,t,r,o,c,l){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["arcgis",{pointer:c.pointer}])},[n,c.teleport?(Object(i["openBlock"])(),Object(i["createBlock"])(i["Teleport"],{key:0,to:".esri-ui"},[Object(i["createElementVNode"])("div",a,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(c.markers,(function(t,r){return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:r,id:"arcgic-marker-"+t.slot,class:"arcgis-marker",style:Object(i["normalizeStyle"])("left: "+t.x+"px; top: "+t.y+"px; transform: scale("+t.scale+")")},[Object(i["renderSlot"])(e.$slots,t.slot)],12,s)),[[i["vShow"],t.show]])})),128))])])):Object(i["createCommentVNode"])("",!0)],2)}r("d3b7"),r("159b"),r("7db0"),r("b0c0"),r("c740"),r("a434"),r("e9c4");var c,l=r("a4ee"),u=r("619d"),d=r("9ef0"),h=r("2c4f"),p=r("7d7d"),f=r("6c97"),b=r("ce50"),m=r("6a0ed"),g=r("7ffa"),y=r("6d5f"),O=r("1853"),v=r("e92d"),_=r("f4cc"),j=r("59b2"),w=r("cea0"),x=r("d386"),T=r("09db"),S=r("b50f"),E=r("c120"),A=(r("2dd4"),r("448d"));let C=c=class extends m["a"]{constructor(e){super(e),this.type="none"}clone(){return new c({type:this.type})}};Object(l["a"])([Object(A["a"])({none:"none",stayAbove:"stay-above"})],C.prototype,"type",void 0),C=c=Object(l["a"])([Object(x["a"])("esri.ground.NavigationConstraint")],C);var R,M=r("42be");const P=v["a"].getLogger("esri.Ground");let I=R=class extends(Object(m["b"])(y["a"])){constructor(e){super(e),this.opacity=1,this.surfaceColor=null,this.navigationConstraint=null,this.layers=new h["a"];const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"!==e.type&&"base-elevation"!==e.type&&P.error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`)},r=e=>{e.parent=null};this.layers.on("after-add",e=>t(e.item)),this.layers.on("after-remove",e=>r(e.item))}initialize(){this.when().catch(e=>{P.error("#load()","Failed to load ground",e)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.layers.removeAll();for(const t of e)t.destroy();this.layers.destroy()}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set layers(e){this._set("layers",Object(p["b"])(e,this._get("layers")))}writeLayers(e,t,r,i){const n=[];e?(i={...i,layerContainerType:"ground"},e.forEach(e=>{if("write"in e){const t={};Object(f["b"])(e)().write(t,i)&&n.push(t)}else i&&i.messages&&i.messages.push(new b["a"]("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in the ground`,{layer:e}))}),t.layers=n):t.layers=n}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return Object(O["a"])(this,e=>{e(this.layers)})}async queryElevation(e,t){await this.load({signal:null==t?void 0:t.signal});const{ElevationQuery:i}=await r.e("chunk-2d0bdf78").then(r.bind(null,"2df6"));Object(_["v"])(t);const n=new i,a=this.layers.filter(L).toArray();return n.queryAll(a,e,t)}async createElevationSampler(e,t){await this.load({signal:null==t?void 0:t.signal});const{ElevationQuery:i}=await r.e("chunk-2d0bdf78").then(r.bind(null,"2df6"));Object(_["v"])(t);const n=new i,a=this.layers.filter(L).toArray();return n.createSamplerAll(a,e,t)}clone(){const e={opacity:this.opacity,surfaceColor:Object(g["a"])(this.surfaceColor),navigationConstraint:Object(g["a"])(this.navigationConstraint),layers:this.layers.slice()};return this.loaded&&(e.loadStatus="loaded"),new R({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}_loadFromSource(e){const t=this.resourceInfo;return t?this._loadLayersFromJSON(t.data,t.context,e):Promise.resolve(null)}_loadLayersFromJSON(e,t,i){const n=t&&t.origin||"web-scene",a=t&&t.portal||null,s=t&&t.url||null;return r.e("chunk-609aa984").then(r.bind(null,"e50f")).then(({populateOperationalLayers:t})=>{Object(_["v"])(i);const r=[];if(e.layers&&Array.isArray(e.layers)){const i={context:{origin:n,url:s,portal:a,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"};r.push(t(this.layers,e.layers,i))}return Object(_["j"])(r)}).then(()=>{})}};function D(e){return e&&"createElevationSampler"in e}function L(e){return"elevation"===e.type||D(e)}Object(l["a"])([Object(j["b"])({json:{read:!1}})],I.prototype,"layers",null),Object(l["a"])([Object(T["a"])("layers")],I.prototype,"writeLayers",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],I.prototype,"resourceInfo",void 0),Object(l["a"])([Object(j["b"])({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:w["a"],read:{reader:M["b"],source:"transparency"},write:{writer:(e,t)=>{t.transparency=Object(M["a"])(e)},target:"transparency"}}})],I.prototype,"opacity",void 0),Object(l["a"])([Object(j["b"])({type:d["a"],json:{type:[w["a"]],write:(e,t)=>{t.surfaceColor=e.toJSON().slice(0,3)}}})],I.prototype,"surfaceColor",void 0),Object(l["a"])([Object(j["b"])({type:C,json:{write:!0}})],I.prototype,"navigationConstraint",void 0),I=R=Object(l["a"])([Object(x["a"])("esri.Ground")],I);const N=I;var F=r("fc29"),k=r("4d10"),U=r("ce6d"),z=r("b2b2"),B=r("1a3e");function V(e){var t;return!!(e&&e.loaded&&"capabilities"in e&&null!=e&&null!=(t=e.capabilities)&&t.operations&&"supportsEditing"in e.capabilities.operations&&!0===e.capabilities.operations.supportsEditing)&&!("editingEnabled"in e&&!e.editingEnabled)}var G=r("1325"),H=r("e041"),q=r("c047");const W=v["a"].getLogger("esri.support.basemapUtils");function $(){return{}}function Z(e){for(const t in e){const r=e[t];!1===(null==r?void 0:r.destroyed)&&r.destroy(),delete e[t]}}function X(e,t){var r;let i;if("string"==typeof e){if(!(e in q["a"])){const t=Object.entries(q["a"]).filter(([e,t])=>G["a"].apiKey&&!t.classic||!G["a"].apiKey&&t.classic&&!t.deprecated).map(([e])=>`"${e}"`).join(", ");return W.warn(`Unable to find basemap definition for: ${e}. Try one of these: ${t}`),null}t&&(i=t[e]),i||(i=u["default"].fromId(e),t&&(t[e]=i))}else i=Object(w["m"])(u["default"],e);return null!=(r=i)&&r.destroyed&&(W.warn("The provided basemap is already destroyed",{basemap:i}),i=null),i}const Y=v["a"].getLogger("esri.support.groundUtils"),J={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"},"world-topobathymetry":{id:"worldTopoBathymetry",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"}};function Q(e){let t=null;if("string"==typeof e)if(e in J){const r=J[e];t=new N({resourceInfo:{data:{layers:[r]}}})}else Y.warn(`Unable to find ground definition for: ${e}. Try "world-elevation"`);else t=Object(w["m"])(N,e);return t}var K=r("a4f1"),ee=r("e658");let te=class extends(Object(ee["a"])(Object(K["a"])(U["a"].EventedMixin(F["a"])))){constructor(e){super(e),this.allLayers=new k["a"]({getCollections:()=>{var e,t,r;return[null==(e=this.basemap)?void 0:e.baseLayers,null==(t=this.ground)?void 0:t.layers,this.layers,null==(r=this.basemap)?void 0:r.referenceLayers]},getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=new k["a"]({getCollections:()=>[this.tables,this.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}}),this.basemap=null,this.editableLayers=new k["a"]({getCollections:()=>[this.allLayers],itemFilterFunction:V}),this.ground=new N,this._basemapCache=$()}destroy(){var e,t;this.allLayers.destroy(),this.allTables.destroy(),this.editableLayers.destroy(),null==(e=this.ground)||e.destroy(),null==(t=this.basemap)||t.destroy(),Z(this._basemapCache),this._basemapCache=null}castBasemap(e){return X(e,this._basemapCache)}castGround(e){const t=Q(e);return Object(z["j"])(t)?this._get("ground"):t}findLayerById(e){return this.allLayers.find(t=>t.id===e)}findTableById(e){return this.allTables.find(t=>t.id===e)}};Object(l["a"])([Object(j["b"])({readOnly:!0,dependsOn:[]})],te.prototype,"allLayers",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],te.prototype,"allTables",void 0),Object(l["a"])([Object(j["b"])({type:u["default"]})],te.prototype,"basemap",void 0),Object(l["a"])([Object(B["a"])("basemap")],te.prototype,"castBasemap",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],te.prototype,"editableLayers",void 0),Object(l["a"])([Object(j["b"])({type:N,nonNullable:!0})],te.prototype,"ground",void 0),Object(l["a"])([Object(B["a"])("ground")],te.prototype,"castGround",null),te=Object(l["a"])([Object(x["a"])("esri.Map")],te);const re=te;var ie=r("8d60"),ne=r("5996"),ae=r("cb72"),se=r("fa2a"),oe=r("477c"),ce=r("a915"),le=r("0028"),ue=r("dfa0"),de=r("3af1"),he=r("4ae5"),pe=r("8188"),fe=r("7f83"),be=r("dff3"),me=r("556f"),ge=r("af40");const ye={widthBreakpoint:{getValue(e){const t=e.viewSize[0],r=e.breakpoints,i=this.values;return t<=r.xsmall?i.xsmall:t<=r.small?i.small:t<=r.medium?i.medium:t<=r.large?i.large:i.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},heightBreakpoint:{getValue(e){const t=e.viewSize[1],r=e.breakpoints,i=this.values;return t<=r.xsmall?i.xsmall:t<=r.small?i.small:t<=r.medium?i.medium:t<=r.large?i.large:i.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},orientation:{getValue(e){const t=e.viewSize,r=t[0],i=t[1],n=this.values;return i>=r?n.portrait:n.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},Oe={xsmall:544,small:768,medium:992,large:1200};function ve(e){const t=e;return t&&t.xsmall<t.small&&t.small<t.medium&&t.medium<t.large}function _e(e,t){return t?ye[e].valueToClassName[t].split(" "):[]}const je=e=>{let t=class extends e{constructor(...e){super(...e),this._breakpointsHandles=new ge["a"],this.orientation=null,this.widthBreakpoint=null,this.heightBreakpoint=null,this.breakpoints=Oe}initialize(){this._breakpointsHandles.add(Object(oe["e"])(()=>[this.breakpoints,this.size],()=>this._updateClassNames(),oe["a"]))}destroy(){this.destroyed||(this._removeActiveClassNames(),this._breakpointsHandles=Object(z["d"])(this._breakpointsHandles))}set breakpoints(e){if(e===this._get("breakpoints"))return;const t=ve(e);if(!t){const e=JSON.stringify(Oe,null,2);console.warn("provided breakpoints are not valid, using defaults:"+e)}e=t?e:Oe,this._set("breakpoints",{...e})}_updateClassNames(){if(!this.container)return;const e=me["a"].acquire(),t=me["a"].acquire();let r,i=!1;for(r in ye){const n=this[r],a=ye[r].getValue({viewSize:this.size,breakpoints:this.breakpoints});n!==a&&(i=!0,this[r]=a,_e(r,n).forEach(e=>t.push(e)),_e(r,a).forEach(t=>e.push(t)))}i&&(this._applyClassNameChanges(e,t),me["a"].release(e),me["a"].release(t))}_applyClassNameChanges(e,t){const r=this.container;r&&(t.forEach(e=>r.classList.remove(e)),e.forEach(e=>r.classList.add(e)))}_removeActiveClassNames(){const e=this.container;if(!e)return;let t;for(t in ye)_e(t,this[t]).forEach(t=>e.classList.remove(t))}};return Object(l["a"])([Object(j["b"])()],t.prototype,"breakpoints",null),Object(l["a"])([Object(j["b"])()],t.prototype,"orientation",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"widthBreakpoint",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"heightBreakpoint",void 0),t=Object(l["a"])([Object(x["a"])("esri.views.BreakpointsOwner")],t),t};var we=r("cf9c"),xe=r("5815"),Te=(r("e6c2"),r("69e9")),Se=r("d347");let Ee=class extends F["a"]{constructor(){super(...arguments),this.items=new h["a"],this._watchUpdatingTracking=new Se["a"],this._callbacks=new Map,this._projector=Object(Te["a"])(),this._hiddenProjector=Object(Te["a"])()}get needsRender(){return this.items.length>0}initialize(){const e=document.createElement("div");e.className="esri-overlay-surface",this._set("surface",e),this._hiddenSurface=document.createElement("div"),this._hiddenSurface.setAttribute("style","visibility: hidden;"),e.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(()=>this.items,e=>{for(const t of e.added){const e=()=>t.render();this._callbacks.set(t,e),this._projector.append(this.surface,e)}for(const t of e.removed){const e=this._projector.detach(this._callbacks.get(t));this.surface.removeChild(e.domNode),this._callbacks.delete(t)}})}addItem(e){this.items.add(e)}removeItem(e){this.items.remove(e)}destroy(){this.items.removeAll(),this._callbacks.forEach(e=>this._projector.detach(e)),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(e){const t=this._hiddenSurface,r=this._hiddenProjector;let i=null;const n=()=>(i=e.render(),i);r.append(t,n),r.renderNow();const a={left:0,top:0,right:0,bottom:0};if(i&&i.domNode){const e=i.domNode.getBoundingClientRect();a.left=e.left,a.top=e.top,a.right=e.right,a.bottom=e.bottom}for(r.detach(n);t.firstChild;)t.removeChild(t.firstChild);return a}overlaps(e,t){const r=this.computeBoundingRect(e),i=this.computeBoundingRect(t);return Math.max(r.left,i.left)<=Math.min(r.right,i.right)&&Math.max(r.top,i.top)<=Math.min(r.bottom,i.bottom)}get hasVisibleItems(){return this.items.some(e=>e.visible)}renderCanvas(e){if(!this.items.some(e=>e.visible))return;const t=e.getContext("2d");t.save(),t.font="10px "+getComputedStyle(this.surface).fontFamily,this.items.forEach(e=>{t.save(),e.renderCanvas(t),t.restore()}),t.restore()}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Ee.prototype,"surface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ee.prototype,"items",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ee.prototype,"needsRender",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ee.prototype,"_watchUpdatingTracking",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_watchUpdatingTracking.updating"})],Ee.prototype,"updating",void 0),Ee=Object(l["a"])([Object(x["a"])("esri.views.overlay.ViewOverlay")],Ee);const Ae=Ee;r("1b8f");var Ce=r("9d83"),Re=r("e42f"),Me=r("3795"),Pe=r("4adc"),Ie=r("121a"),De=r("6aa9"),Le=r("9096"),Ne=r("c8d6"),Fe=r("ebb2"),ke=r("b3b6"),Ue=r("4653"),ze=r("21e2"),Be=r("c1da"),Ve=r("8802"),Ge=r("82fa");const He="esri.widgets.Feature.support.featureUtils",qe=v["a"].getLogger(He),We=/href=(""|'')/gi,$e=/(\{([^\{\r\n]+)\})/g,Ze=/\'/g,Xe=/^\s*expression\//i,Ye=/(\n)/gi,Je=/[\u00A0-\u9999<>\&]/gim,Qe=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi,Ke=/^(?:mailto:|tel:)/,et="relationships/",tt=Object(Ue["a"])("short-date-short-time");function rt(e){if(!Object(z["j"])(e))return e.get("sourceLayer")||e.get("layer")}async function it(e,t){return"function"==typeof e?e.call(null,t):e}function nt(e=""){if(e)return!Ke.test(e.trim().toLowerCase())}function at(e){return!!e&&Xe.test(e)}function st(e,t){if(!at(t)||!e)return null;const r=t.replace(Xe,"").toLowerCase();let i;return e.some(e=>e.name.toLowerCase()===r&&(i=e,!0)),i}function ot(e,t){const r=st(t,null==e?void 0:e.fieldName);return r?r.title||null:e?e.label||e.fieldName:null}function ct(e,t){const r=t.get(e.toLowerCase());return`{${r&&r.fieldName||e}}`}function lt(e){return e.replace(We,"")}function ut(e,t){const r=ht(t,e);return r?r.name:e}function dt(e,t){return e&&e.map(e=>ut(e,t))}function ht(e,t){return e&&"function"==typeof e.getField?e.getField(t):null}function pt(e){return(""+e).trim()}function ft({attributes:e,globalAttributes:t,layer:r,text:i,expressionAttributes:n,fieldInfoMap:a}){return i?bt({formattedAttributes:t,template:vt(i,{...t,...n,...e},r),fieldInfoMap:a}):""}function bt({formattedAttributes:e,template:t,fieldInfoMap:r}){return pt(lt(Object(ke["c"])(Object(ke["c"])(t,e=>ct(e,r)),e)))}function mt(e,t,r=!1){const i=t[e];if("string"==typeof i){const n="%27",a=(r?encodeURIComponent(i):i).replace(Ze,n);t[e]=a}}function gt(e,t=!1){const r={...e};return Object.keys(r).forEach(e=>mt(e,r,t)),r}function yt(e,t,r){const i=(t=pt(t))&&"{"!==t[0];return Object(ke["c"])(e,gt(r,i))}function Ot(e,t){return e.replace($e,(e,r,i)=>{const n=ht(t,i);return n?`{${n.name}}`:r})}function vt(e,t,r){const i=Ot(e,r);return i?i.replace(Qe,(e,r,i)=>yt(e,r||i,t)):i}function _t(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}function jt(e){return"feature"===(null==e?void 0:e.type)}function wt(e){return"map-image"===(null==e?void 0:e.type)}function xt(e){return!(null==e||!e.layer)}function Tt(e,t){const r=t.fieldInfos,i=t.fieldName,n=St(r,i),a=null==n?void 0:n.clone(),s=t.preventPlacesFormatting,o=t.layer,c=ht(o,i);if(a&&"date"===(null==c?void 0:c.type)){const e=a.format||new Ve["a"];e.dateFormat=e.dateFormat||"short-date-short-time",e.dateTimeFormatOptions=jt(o)&&o.datesInUnknownTimezone||xt(o)&&wt(o.layer)&&o.layer.datesInUnknownTimezone?{timeZone:"UTC"}:null,a.format=e}const l=a&&a.format;return"string"==typeof(e=_t(e,l))||null==e||null==l?It(e):s?Object(ze["b"])(e,{...Object(ze["a"])(l),minimumFractionDigits:0,maximumFractionDigits:20}):l.format(e)}function St(e,t){if(!e||!e.length||!t)return;const r=t.toLowerCase();let i;return e.some(e=>!(!e.fieldName||e.fieldName.toLowerCase()!==r)&&(i=e,!0)),i}function Et({fieldName:e,graphic:t,layer:r}){if(Ut(e))return null;if(!r||"function"!=typeof r.getFeatureType)return null;const{typeIdField:i}=r;if(!i||e!==i)return null;const n=r.getFeatureType(t);return n?n.name:null}function At({fieldName:e,value:t,graphic:r,layer:i}){if(Ut(e))return null;if(!i||"function"!=typeof i.getFieldDomain)return null;const n=i.getFieldDomain(e,{feature:r});return n&&"coded-value"===n.type?n.getName(t):null}function Ct(e,t){const{creatorField:r,creationDateField:i,editorField:n,editDateField:a}=e;if(!t)return;const s=t[a];if("number"==typeof s){const e=t[n];return{type:"edit",date:Object(Ue["b"])(s,tt),user:e}}const o=t[i];if("number"==typeof o){const e=t[r];return{type:"create",date:Object(Ue["b"])(o,tt),user:e}}return null}function Rt(e,t){const r=new Map;return e&&e.forEach(e=>{const i=ut(e.fieldName,t);e.fieldName=i,r.set(i.toLowerCase(),e)}),r}function Mt(e){const t=[];if(!e)return t;const{fieldInfos:r,content:i}=e;return r&&t.push(...r),i&&Array.isArray(i)?(i.forEach(e=>{if("fields"===e.type){const r=e&&e.fieldInfos;r&&t.push(...r)}}),t):t}function Pt(e){return e.replace(Je,e=>`&#${e.charCodeAt(0)};`)}function It(e){return"string"==typeof e?e.replace(Ye,'<br class="esri-text-new-line" />'):e}function Dt(e){const{value:t,fieldName:r,fieldInfos:i,fieldInfoMap:n,layer:a,graphic:s}=e;if(null==t)return"";const o=At({fieldName:r,value:t,graphic:s,layer:a});if(o)return o;const c=Et({fieldName:r,graphic:s,layer:a});if(c)return c;if(n.get(r.toLowerCase()))return Tt(t,{fieldInfos:i,fieldName:r,layer:a});const l=a&&a.fieldsIndex;return l&&l.isDateField(r)?Object(Ue["b"])(t,tt):It(t)}function Lt({fieldInfos:e,attributes:t,layer:r,graphic:i,fieldInfoMap:n,relatedInfos:a}){const s={};return null==a||a.forEach(e=>Vt(s,e)),Object.keys(t).forEach(a=>{const o=t[a];s[a]=Dt({fieldName:a,fieldInfos:e,fieldInfoMap:n,layer:r,value:o,graphic:i})}),s}async function Nt(e,t){var r,i;const{layer:n,graphic:a,outFields:s,objectIds:o,returnGeometry:c,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:a,objectId:u,requiredFields:s};return qe.warn(e,t),null}if(null==(r=n.capabilities)||null==(i=r.operations)||!i.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:a,requiredFields:s,returnGeometry:c};return qe.warn(e,t),null}const d=n.createQuery();return d.objectIds=o,d.outFields=null!=s&&s.length?s:[n.objectIdField],d.returnGeometry=!!c,d.returnZ=!!c,d.returnM=!!c,d.outSpatialReference=l,(await n.queryFeatures(d,t)).features[0]}async function Ft(e){var t;if(null==(t=e.expressionInfos)||!t.length)return!1;const r=await Object(Ge["e"])(),{arcadeUtils:{hasGeometryFunctions:i}}=r;return i(e)}async function kt({graphic:e,popupTemplate:t,layer:r,spatialReference:i},n){if(!r||!t)return;if("function"==typeof r.load&&await r.load(n),!e.attributes)return;const a=e.attributes[r.objectIdField];if(null==a)return;const s=[a],o=await t.getRequiredFields(r.fieldsIndex),c=Object(Be["i"])(o,e),l=c?[]:o,u=t.returnGeometry||await Ft(t);if(c&&!u)return;const d=await Nt({layer:r,graphic:e,outFields:l,objectIds:s,returnGeometry:u,spatialReference:i},n);d&&(d.geometry&&(e.geometry=d.geometry),d.attributes&&(e.attributes={...e.attributes,...d.attributes}))}function Ut(e=""){return!!e&&-1!==e.indexOf(et)}function zt(e){return e?`${et}${e.layerId}/${e.fieldName}`:""}function Bt({attributes:e,graphic:t,relatedInfo:r}){e&&t&&r&&Object.keys(t.attributes).forEach(i=>{const n=zt({layerId:r.relation.id.toString(),fieldName:i});e[n]=t.attributes[i]})}function Vt(e,t){e&&t&&(t.relatedFeatures&&t.relatedFeatures&&t.relatedFeatures.forEach(r=>Bt({attributes:e,graphic:r,relatedInfo:t})),t.relatedStatsFeatures&&t.relatedStatsFeatures&&t.relatedStatsFeatures.forEach(r=>Bt({attributes:e,graphic:r,relatedInfo:t})))}const Gt=e=>{if(!e)return!1;const t=e.toUpperCase();return t.indexOf("CURRENT_TIMESTAMP")>-1||t.indexOf("CURRENT_DATE")>-1||t.indexOf("CURRENT_TIME")>-1},Ht=({layer:e,method:t,query:r,definitionExpression:i})=>{var n,a;if(null==(n=e.capabilities)||null==(a=n.query)||!a.supportsCacheHint||"attachments"===t)return;const s=Object(z["k"])(r.where)&&r.where,o=Object(z["k"])(r.geometry)&&r.geometry;Gt(i)||Gt(s)||"extent"===(null==o?void 0:o.type)||"tile"===r.resultType||(r.cacheHint=!0)},qt=({query:e,layer:t,method:r})=>{Ht({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression}`})},Wt=({queryPayload:e,layer:t,method:r})=>{Ht({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression}`})},$t={editing:!1,operations:{add:!0,update:!0,delete:!0}},Zt=h["a"].ofType(Ne["a"]),Xt="graphic.layer.capabilities.operations.supportsResizeAttachments";let Yt=class extends Le["a"]{constructor(e){super(e),this._getAttachmentsPromise=null,this._attachmentLayer=null,this.abilities={...$t},this.activeAttachmentInfo=null,this.attachmentInfos=new Zt,this.graphic=null,this.mode="view",this.handles.add([Object(Me["a"])(this,"graphic",()=>this._graphicChanged())])}destroy(){this._attachmentLayer=null,this.graphic=null}castAbilities(e){return{...$t,...e}}get state(){return this._getAttachmentsPromise?"loading":this.graphic?"ready":"disabled"}get supportsResizeAttachments(){return this.get(Xt)||!1}async getAttachments(){const{_attachmentLayer:e,attachmentInfos:t}=this;if(!e||"function"!=typeof e.queryAttachments)throw new b["a"]("invalid-layer","getAttachments(): A valid layer is required.");const r=this._getFeatureId(),i=new Fe["a"]({objectIds:[r],returnMetadata:!0}),n=[],a=e.queryAttachments(i).then(e=>e[r]||n).catch(()=>n);this._getAttachmentsPromise=a,this.notifyChange("state");const s=await a;return t.removeAll(),s.length&&t.addMany(s),this._getAttachmentsPromise=null,this.notifyChange("state"),s}async addAttachment(e){const{_attachmentLayer:t,attachmentInfos:r,graphic:i,abilities:n}=this;if(!e)throw new b["a"]("invalid-attachment","addAttachment(): An attachment is required.",{attachment:e});if(!n.operations.add)throw new b["a"]("invalid-abilities","addAttachment(): add abilities are required.");if(!t||"function"!=typeof t.addAttachment)throw new b["a"]("invalid-layer","addAttachment(): A valid layer is required.");const a=t.addAttachment(i,e).then(e=>this._queryAttachment(e.objectId)),s=await a;return r.add(s),s}async deleteAttachment(e){const{_attachmentLayer:t,attachmentInfos:r,graphic:i,abilities:n}=this;if(!e)throw new b["a"]("invalid-attachment-info","deleteAttachment(): An attachmentInfo is required.",{attachmentInfo:e});if(!n.operations.delete)throw new b["a"]("invalid-abilities","deleteAttachment(): delete abilities are required.");if(!t||"function"!=typeof t.deleteAttachments)throw new b["a"]("invalid-layer","deleteAttachment(): A valid layer is required.");const a=t.deleteAttachments(i,[e.id]).then(()=>e),s=await a;return r.remove(s),s}async updateAttachment(e,t=this.activeAttachmentInfo){const{_attachmentLayer:r,attachmentInfos:i,graphic:n,abilities:a}=this;if(!e)throw new b["a"]("invalid-attachment","updateAttachment(): An attachment is required.",{attachment:e});if(!t)throw new b["a"]("invalid-attachment-info","updateAttachment(): An attachmentInfo is required.",{attachmentInfo:t});if(!a.operations.update)throw new b["a"]("invalid-abilities","updateAttachment(): Update abilities are required.");const s=i.findIndex(e=>e===t);if(!r||"function"!=typeof r.updateAttachment)throw new b["a"]("invalid-layer","updateAttachment(): A valid layer is required.");const o=r.updateAttachment(n,t.id,e).then(e=>this._queryAttachment(e.objectId)),c=await o;return i.splice(s,1,c),c}async _queryAttachment(e){if(!e)throw new b["a"]("invalid-attachment-id","Could not query attachment.");const{_attachmentLayer:t}=this,r=this._getFeatureId(),i=new Fe["a"]({objectIds:[r],attachmentsWhere:"AttachmentId="+e,returnMetadata:!0});return t.queryAttachments(i).then(e=>e[r][0])}_getFeatureId(){const{_attachmentLayer:e,graphic:t}=this;if(!e||!t)return null;const{objectIdField:r}=e,{attributes:i}=t;return i&&i[r]}_graphicChanged(){this.graphic&&(this._setAttachmentLayer(),this.getAttachments().catch(()=>{}))}_setAttachmentLayer(){const{graphic:e}=this,t=rt(e);this._attachmentLayer=t?"scene"===t.type&&Object(z["k"])(t.associatedLayer)?t.associatedLayer:t:null}};Object(l["a"])([Object(j["b"])()],Yt.prototype,"abilities",void 0),Object(l["a"])([Object(B["a"])("abilities")],Yt.prototype,"castAbilities",null),Object(l["a"])([Object(j["b"])()],Yt.prototype,"activeAttachmentInfo",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,type:Zt})],Yt.prototype,"attachmentInfos",void 0),Object(l["a"])([Object(j["b"])({type:ie["a"]})],Yt.prototype,"graphic",void 0),Object(l["a"])([Object(j["b"])()],Yt.prototype,"mode",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Yt.prototype,"state",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Yt.prototype,"supportsResizeAttachments",null),Yt=Object(l["a"])([Object(x["a"])("esri.widgets.Attachments.AttachmentsViewModel")],Yt);const Jt=Yt;var Qt=r("b2cd");function Kt(e){const t=e.toLowerCase();return"image/bmp"===t||"image/emf"===t||"image/exif"===t||"image/gif"===t||"image/x-icon"===t||"image/jpeg"===t||"image/png"===t||"image/tiff"===t||"image/x-wmf"===t}function er(e){const t=Object(Qt["b"])("esri/themes/base/images/files/");return e?"text/plain"===e?t+"text-32.svg":"application/pdf"===e?t+"pdf-32.svg":"text/csv"===e?t+"csv-32.svg":"application/gpx+xml"===e?t+"gpx-32.svg":"application/x-dwf"===e?t+"cad-32.svg":"application/postscript"===e||"application/json"===e||"text/xml"===e||"model/vrml"===e?t+"code-32.svg":"application/x-zip-compressed"===e||"application/x-7z-compressed"===e||"application/x-gzip"===e||"application/x-tar"===e||"application/x-gtar"===e||"application/x-bzip2"===e||"application/gzip"===e||"application/x-compress"===e||"application/x-apple-diskimage"===e||"application/x-rar-compressed"===e||"application/zip"===e?t+"zip-32.svg":-1!==e.indexOf("image/")?t+"image-32.svg":-1!==e.indexOf("audio/")?t+"sound-32.svg":-1!==e.indexOf("video/")?t+"video-32.svg":-1!==e.indexOf("msexcel")||-1!==e.indexOf("ms-excel")||-1!==e.indexOf("spreadsheetml")?t+"excel-32.svg":-1!==e.indexOf("msword")||-1!==e.indexOf("ms-word")||-1!==e.indexOf("wordprocessingml")?t+"word-32.svg":-1!==e.indexOf("powerpoint")||-1!==e.indexOf("presentationml")?t+"report-32.svg":t+"generic-32.svg":t+"generic-32.svg"}var tr=r("702a"),rr=r("755e"),ir=r("d822");const nr={addButton:!0,addSubmitButton:!0,cancelAddButton:!0,cancelUpdateButton:!0,deleteButton:!0,errorMessage:!0,progressBar:!0,updateButton:!0},ar={base:"esri-attachments",loaderContainer:"esri-attachments__loader-container",loader:"esri-attachments__loader",fadeIn:"esri-attachments--fade-in",container:"esri-attachments__container",containerList:"esri-attachments__container--list",containerPreview:"esri-attachments__container--preview",actions:"esri-attachments__actions",deleteButton:"esri-attachments__delete-button",addAttachmentButton:"esri-attachments__add-attachment-button",errorMessage:"esri-attachments__error-message",items:"esri-attachments__items",item:"esri-attachments__item",itemButton:"esri-attachments__item-button",itemMask:"esri-attachments__item-mask",itemMaskIcon:"esri-attachments__item-mask--icon",itemImage:"esri-attachments__image",itemImageResizable:"esri-attachments__image--resizable",itemLabel:"esri-attachments__label",itemFilename:"esri-attachments__filename",itemChevronIcon:"esri-attachments__item-chevron-icon",itemLink:"esri-attachments__item-link",itemLinkOverlay:"esri-attachments__item-link-overlay",itemLinkOverlayIcon:"esri-attachments__item-link-overlay-icon",itemEditIcon:"esri-attachments__item-edit-icon",itemAddIcon:"esri-attachments__item-add-icon",itemAddButton:"esri-attachments__item-add-button",formNode:"esri-attachments__form-node",fileFieldset:"esri-attachments__file-fieldset",fileLabel:"esri-attachments__file-label",fileName:"esri-attachments__file-name",fileInput:"esri-attachments__file-input",metadata:"esri-attachments__metadata",metadataFieldset:"esri-attachments__metadata-fieldset",progressBar:"esri-attachments__progress-bar",esriWidget:"esri-widget",esriButton:"esri-button",buttonDisabled:"esri-button--disabled",esriButtonSecondary:"esri-button--secondary",esriButtonTertiary:"esri-button--tertiary",esriButtonThird:"esri-button--third",esriButtonSmall:"esri-button--small",esriButtonHalf:"esri-button--half",empty:"esri-widget__content--empty",iconExternalLink:"esri-icon-link-external",iconEdit:"esri-icon-edit",iconRight:"esri-icon-right",iconLeft:"esri-icon-left",iconPlus:"esri-icon-plus"},sr=window.CSS;let or=class extends Ie["a"]{constructor(e,t){super(e,t),this.abilities=null,this.displayType="auto",this.graphic=null,this.label=void 0,this.messages=null,this.messagesUnits=null,this.selectedFile=null,this.submitting=!1,this.viewModel=new Jt,this.visibleElements={...nr},this._supportsImageOrientation=sr&&sr.supports&&sr.supports("image-orientation","from-image"),this._addAttachmentForm=null,this._updateAttachmentForm=null}initialize(){this.own(Object(Me["b"])(this,"viewModel.attachmentInfos","change",()=>this.scheduleRender()),Object(Me["a"])(this,"viewModel.mode",()=>this._modeChanged()))}get effectiveDisplayType(){const{displayType:e}=this;return e&&"auto"!==e?e:this.viewModel.supportsResizeAttachments?"preview":"list"}castVisibleElements(e){return{...nr,...e}}addAttachment(){const{_addAttachmentForm:e,viewModel:t}=this;return this._set("submitting",!0),this._set("error",null),t.addAttachment(e).then(e=>(this._set("submitting",!1),this._set("error",null),t.mode="view",e)).catch(e=>{throw this._set("submitting",!1),this._set("error",new b["a"]("attachments:add-attachment",this.messages.addErrorMessage,e)),e})}deleteAttachment(e){const{viewModel:t}=this;return this._set("submitting",!0),this._set("error",null),t.deleteAttachment(e).then(e=>(this._set("submitting",!1),this._set("error",null),t.mode="view",e)).catch(e=>{throw this._set("submitting",!1),this._set("error",new b["a"]("attachments:delete-attachment",this.messages.deleteErrorMessage,e)),e})}updateAttachment(){const{viewModel:e}=this,{_updateAttachmentForm:t}=this;return this._set("submitting",!0),this._set("error",null),e.updateAttachment(t).then(t=>(this._set("submitting",!1),this._set("error",null),e.mode="view",t)).catch(e=>{throw this._set("submitting",!1),this._set("error",new b["a"]("attachments:update-attachment",this.messages.updateErrorMessage,e)),e})}render(){const{submitting:e,viewModel:t}=this,{state:r}=t;return Object(ir["a"])("div",{class:this.classes(ar.base,ar.esriWidget)},e?this.renderProgressBar():null,"loading"===r?this.renderLoading():this.renderAttachments(),this.renderErrorMessage())}renderErrorMessage(){const{error:e,visibleElements:t}=this;return e&&t.errorMessage?Object(ir["a"])("div",{key:"error-message",class:ar.errorMessage},e.message):null}renderAttachments(){const{mode:e,activeAttachmentInfo:t}=this.viewModel;return"add"===e?this.renderAddForm():"edit"===e?this.renderDetailsForm(t):this.renderAttachmentContainer()}renderLoading(){return Object(ir["a"])("div",{class:ar.loaderContainer,key:"loader"},Object(ir["a"])("div",{class:ar.loader}))}renderProgressBar(){return this.visibleElements.progressBar?Object(ir["a"])("div",{class:ar.progressBar,key:"progress-bar"}):null}renderAddForm(){const{submitting:e,selectedFile:t}=this,r=e||!t,i=this.visibleElements.cancelAddButton?Object(ir["a"])("button",{type:"button",bind:this,disabled:e,onclick:this._cancelForm,class:this.classes(ar.esriButton,ar.esriButtonTertiary,ar.esriButtonSmall,ar.esriButtonHalf,e&&ar.buttonDisabled)},this.messages.cancel):null,n=this.visibleElements.addSubmitButton?Object(ir["a"])("button",{type:"submit",disabled:r,class:this.classes(ar.esriButton,ar.esriButtonSecondary,ar.esriButtonSmall,ar.esriButtonHalf,{[ar.buttonDisabled]:r})},this.messages.add):null,a=t?Object(ir["a"])("span",{key:"file-name",class:ar.fileName},t.name):null,s=Object(ir["a"])("form",{bind:this,afterCreate:tr["g"],afterRemoved:tr["c"],"data-node-ref":"_addAttachmentForm",onsubmit:this._submitAddAttachment},Object(ir["a"])("fieldset",{class:ar.fileFieldset},a,Object(ir["a"])("label",{class:this.classes(ar.fileLabel,ar.esriButton,ar.esriButtonSecondary)},t?this.messages.changeFile:this.messages.selectFile,Object(ir["a"])("input",{class:ar.fileInput,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))),n,i);return Object(ir["a"])("div",{key:"add-form-container",class:ar.formNode},s)}renderDetailsForm(e){const{visibleElements:t,viewModel:r,selectedFile:i,submitting:n}=this,{contentType:a,size:s,url:o}=e,{abilities:c}=r,l=n||!i,u=c.editing&&c.operations.delete&&t.deleteButton?Object(ir["a"])("button",{key:"delete-button",type:"button",disabled:n,bind:this,onclick:t=>this._submitDeleteAttachment(t,e),class:this.classes(ar.esriButton,ar.esriButtonSmall,ar.esriButtonTertiary,ar.deleteButton,{[ar.buttonDisabled]:n})},this.messages.delete):null,d=c.editing&&c.operations.update&&t.updateButton?Object(ir["a"])("button",{disabled:l,key:"update-button",type:"submit",class:this.classes(ar.esriButton,ar.esriButtonSmall,ar.esriButtonThird,{[ar.buttonDisabled]:l})},this.messages.update):null,h=this.visibleElements.cancelUpdateButton?Object(ir["a"])("button",{disabled:n,key:"cancel-button",type:"button",bind:this,onclick:this._cancelForm,class:this.classes(ar.esriButton,ar.esriButtonSmall,ar.esriButtonTertiary,ar.esriButtonThird,{[ar.buttonDisabled]:n})},this.messages.cancel):null,p=i?Object(ir["a"])("span",{key:"file-name",class:ar.fileName},i.name):null,f=c.editing&&c.operations.update?Object(ir["a"])("fieldset",{key:"file",class:ar.fileFieldset},p,Object(ir["a"])("label",{class:this.classes(ar.fileLabel,ar.esriButton,ar.esriButtonSecondary)},this.messages.changeFile,Object(ir["a"])("input",{class:ar.fileInput,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))):null,b=Object(ir["a"])("fieldset",{key:"size",class:ar.metadataFieldset},Object(ir["a"])("label",null,Object(De["c"])(this.messagesUnits,s))),m=Object(ir["a"])("fieldset",{key:"content-type",class:ar.metadataFieldset},Object(ir["a"])("label",null,a)),g=Object(ir["a"])("form",{bind:this,afterCreate:tr["g"],afterRemoved:tr["c"],"data-node-ref":"_updateAttachmentForm",onsubmit:this._submitUpdateAttachment},Object(ir["a"])("div",{class:ar.metadata},b,m),f,Object(ir["a"])("div",{class:ar.actions},u,h,d));return Object(ir["a"])("div",{key:"edit-form-container",class:ar.formNode},Object(ir["a"])("a",{class:ar.itemLink,href:o,rel:"noreferrer",target:"_blank"},this.renderImageMask({attachmentInfo:e,size:400}),Object(ir["a"])("div",{class:ar.itemLinkOverlay},Object(ir["a"])("span",{class:ar.itemLinkOverlayIcon},Object(ir["a"])("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},Object(ir["a"])("path",{d:"M28 13h1v16H3V3h16v1H4v24h24zm-5-9h4.293L15.646 15.638l.707.707L28 4.707V9h1V3h-6z"}),Object(ir["a"])("path",{fill:"none",d:"M0 0h32v32H0z"}))))),g)}renderImageMask({attachmentInfo:e,size:t}){const{supportsResizeAttachments:r}=this.viewModel,{contentType:i,name:n,url:a}=e,s=r&&Kt(i),o=this._getCSSTransform(e,s),c=o?{transform:o,"image-orientation":"none"}:{},l=-1===a.indexOf("?")?"?":"&",u=s?`${a}${l}w=${t}`:er(i),d={[ar.itemMaskIcon]:!s},h={[ar.itemImageResizable]:r};return Object(ir["a"])("div",{class:this.classes(d,ar.itemMask)},Object(ir["a"])("img",{styles:c,alt:n,src:u,class:this.classes(h,ar.itemImage)}))}renderAttachmentInfo({attachmentInfo:e,displayType:t}){const{viewModel:r}=this,{abilities:i}=r,{name:n,url:a}=e,s=this.renderImageMask({attachmentInfo:e,size:"list"===t?48:400}),o=i.editing?Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(ar.itemChevronIcon,Object(tr["e"])(this.container)?ar.iconLeft:ar.iconRight)}):null,c=[s,Object(ir["a"])("label",{class:ar.itemLabel},Object(ir["a"])("span",{class:ar.itemFilename},n||this.messages.noTitle),o)],l=i.editing?Object(ir["a"])("button",{key:"details-button",bind:this,class:ar.itemButton,title:this.messages.attachmentDetails,"aria-label":this.messages.attachmentDetails,"data-attachment-info-id":e.id,onclick:()=>this._startEditAttachment(e),type:"button"},c):Object(ir["a"])("a",{key:"details-link",class:ar.itemButton,href:a,target:"_blank"},c);return Object(ir["a"])("li",{class:ar.item,key:e},l)}renderAttachmentContainer(){const{effectiveDisplayType:e,viewModel:t,visibleElements:r}=this,{attachmentInfos:i,abilities:n}=t,a=i&&i.length,s={[ar.containerList]:"preview"!==e,[ar.containerPreview]:"preview"===e},o=n.editing&&n.operations.add&&r.addButton?Object(ir["a"])("button",{bind:this,onclick:()=>this._startAddAttachment(),class:this.classes(ar.esriButton,ar.esriButtonTertiary,ar.addAttachmentButton),type:"button"},Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(ar.itemAddIcon,ar.iconPlus)}),this.messages.add):null,c=a?Object(ir["a"])("ul",{class:ar.items},i.toArray().map(t=>this.renderAttachmentInfo({attachmentInfo:t,displayType:e}))):Object(ir["a"])("div",{class:ar.empty},this.messages.noAttachments);return Object(ir["a"])("div",{key:"attachments-container",class:this.classes(ar.container,s)},c,o)}_modeChanged(){this._set("error",null),this._set("selectedFile",null)}_handleFileInputChange(e){const t=e.target,r=t&&t.files&&t.files.item(0);this._set("selectedFile",r)}_submitDeleteAttachment(e,t){e.preventDefault(),this.deleteAttachment(t)}_submitAddAttachment(e){e.preventDefault(),this.addAttachment()}_submitUpdateAttachment(e){e.preventDefault(),this.updateAttachment()}_startEditAttachment(e){const{viewModel:t}=this;t.activeAttachmentInfo=e,t.mode="edit"}_startAddAttachment(){this.viewModel.mode="add"}_cancelForm(e){e.preventDefault(),this.viewModel.mode="view"}_getCSSTransform(e,t){const{orientationInfo:r}=e;return!this._supportsImageOrientation&&t&&r?[r.rotation?`rotate(${r.rotation}deg)`:"",r.mirrored?"scaleX(-1)":""].join(" "):""}};Object(l["a"])([Object(Pe["a"])("viewModel.abilities")],or.prototype,"abilities",void 0),Object(l["a"])([Object(j["b"])()],or.prototype,"displayType",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],or.prototype,"effectiveDisplayType",null),Object(l["a"])([Object(Pe["a"])("viewModel.graphic")],or.prototype,"graphic",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],or.prototype,"label",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Attachments/t9n/Attachments")],or.prototype,"messages",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/core/t9n/Units")],or.prototype,"messagesUnits",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],or.prototype,"selectedFile",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],or.prototype,"submitting",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],or.prototype,"error",void 0),Object(l["a"])([Object(j["b"])({type:Jt})],or.prototype,"viewModel",void 0),Object(l["a"])([Object(j["b"])()],or.prototype,"visibleElements",void 0),Object(l["a"])([Object(B["a"])("visibleElements")],or.prototype,"castVisibleElements",null),or=Object(l["a"])([Object(x["a"])("esri.widgets.Attachments")],or);const cr=or;let lr=class extends Jt{constructor(e){super(e),this.description=null,this.title=null}};Object(l["a"])([Object(j["b"])()],lr.prototype,"description",void 0),Object(l["a"])([Object(j["b"])()],lr.prototype,"title",void 0),lr=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureAttachments.FeatureAttachmentsViewModel")],lr);const ur=lr;var dr=r("38a4");const hr={heading:"esri-widget__heading"};function pr(e,t){const r=fr(e.level),i="h"+r;return delete e.level,Object(ir["a"])(i,{...e,class:Object(tr["a"])(hr.heading,e.class),role:"heading","aria-level":String(r)},t)}function fr(e){return Object(dr["f"])(Math.ceil(e),1,6)}const br={base:"esri-feature-element-info",title:"esri-feature-element-info__title",description:"esri-feature-element-info__description"};let mr=class extends Ie["a"]{constructor(e,t){super(e,t),this.description=null,this.headingLevel=2,this.title=null}render(){return Object(ir["a"])("div",{class:br.base},this.renderTitle(),this.renderDescription())}renderTitle(){const{title:e}=this;return e?Object(ir["a"])(pr,{level:this.headingLevel,class:br.title},e):null}renderDescription(){const{description:e}=this;return e?Object(ir["a"])("div",{key:"description",class:br.description},e):null}};Object(l["a"])([Object(j["b"])()],mr.prototype,"description",void 0),Object(l["a"])([Object(j["b"])()],mr.prototype,"headingLevel",void 0),Object(l["a"])([Object(j["b"])()],mr.prototype,"title",void 0),mr=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.support.FeatureElementInfo")],mr);const gr=mr,yr={base:"esri-feature-attachments"};let Or=class extends Ie["a"]{constructor(e,t){super(e,t),this._featureElementInfo=null,this.attachmentsWidget=new cr,this.description=null,this.displayType=null,this.graphic=null,this.headingLevel=2,this.title=null,this.viewModel=new ur}initialize(){this._featureElementInfo=new gr,Object(Me["a"])(this,["viewModel.description","viewModel.title","headingLevel"],()=>this._setupFeatureElementInfo()),Object(Me["a"])(this,"viewModel.graphic",e=>this.attachmentsWidget.graphic=e)}destroy(){this.attachmentsWidget.destroy(),this._featureElementInfo.destroy()}render(){var e;const{attachmentsWidget:t}=this;return Object(ir["a"])("div",{class:yr.base},null==(e=this._featureElementInfo)?void 0:e.render(),null==t?void 0:t.render())}_setupFeatureElementInfo(){const{description:e,title:t,headingLevel:r}=this;this._featureElementInfo.set({description:e,title:t,headingLevel:r})}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Or.prototype,"attachmentsWidget",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.description")],Or.prototype,"description",void 0),Object(l["a"])([Object(Pe["a"])("attachmentsWidget.displayType")],Or.prototype,"displayType",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.graphic")],Or.prototype,"graphic",void 0),Object(l["a"])([Object(j["b"])()],Or.prototype,"headingLevel",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.title")],Or.prototype,"title",void 0),Object(l["a"])([Object(j["b"])({type:ur})],Or.prototype,"viewModel",void 0),Or=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureAttachments")],Or);const vr=Or;let _r=class extends(Object(Le["b"])(F["a"])){constructor(e){super(e),this._loadingPromise=null,this.created=null,this.creator=null,this.destroyer=null,this.graphic=null,this.handles.add(Object(Me["a"])(this,"creator",e=>{this._destroyContent(),this._createContent(e)}))}destroy(){this._destroyContent()}get state(){return this._loadingPromise?"loading":"ready"}_destroyContent(){const{created:e,graphic:t,destroyer:r}=this;e&&(it(r,{graphic:t}).catch(()=>null),this._set("created",null))}async _createContent(e){const{graphic:t}=this,r=it(e,{graphic:t}).catch(()=>null);this._loadingPromise=r,this.notifyChange("state");const i=await r;r===this._loadingPromise&&(this._loadingPromise=null,this.notifyChange("state"),this._set("created",i))}};Object(l["a"])([Object(j["b"])({readOnly:!0})],_r.prototype,"created",void 0),Object(l["a"])([Object(j["b"])()],_r.prototype,"creator",void 0),Object(l["a"])([Object(j["b"])()],_r.prototype,"destroyer",void 0),Object(l["a"])([Object(j["b"])({type:ie["a"]})],_r.prototype,"graphic",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],_r.prototype,"state",null),_r=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")],_r);const jr=_r;var wr=r("2772");const xr={base:"esri-feature-content",loaderContainer:"esri-feature-content__loader-container",loader:"esri-feature-content__loader"};let Tr=class extends Ie["a"]{constructor(e,t){super(e,t),this.creator=null,this.graphic=null,this.viewModel=null,this._addTargetToAnchors=e=>{Array.from(e.querySelectorAll("a")).forEach(e=>{nt(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")})}}renderLoading(){return Object(ir["a"])("div",{class:xr.loaderContainer,key:"loader"},Object(ir["a"])("div",{class:xr.loader}))}renderCreated(){var e;const t=null==(e=this.viewModel)?void 0:e.created;return t?t instanceof HTMLElement?Object(ir["a"])("div",{key:t,bind:t,afterCreate:this._attachToNode}):Object(wr["b"])(t)?Object(ir["a"])("div",{key:t},!t.destroyed&&t.render()):Object(ir["a"])("div",{key:t,innerHTML:t,afterCreate:this._addTargetToAnchors}):null}render(){var e;const t=null==(e=this.viewModel)?void 0:e.state;return Object(ir["a"])("div",{class:xr.base},"loading"===t?this.renderLoading():this.renderCreated())}_attachToNode(e){const t=this;e.appendChild(t)}};Object(l["a"])([Object(Pe["a"])("viewModel.creator")],Tr.prototype,"creator",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.graphic")],Tr.prototype,"graphic",void 0),Object(l["a"])([Object(j["b"])({type:jr})],Tr.prototype,"viewModel",void 0),Tr=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureContent")],Tr);const Sr=Tr;var Er=r("1637"),Ar=r("9f91");let Cr=class extends F["a"]{constructor(e){super(e),this.attributes=null,this.expressionInfos=null,this.description=null,this.fieldInfos=null,this.title=null}get formattedFieldInfos(){const{expressionInfos:e,fieldInfos:t}=this,r=[];return null==t||t.forEach(t=>{if(t.hasOwnProperty("visible")&&!t.visible)return;const i=t.clone();i.label=ot(i,e),r.push(i)}),r}};Object(l["a"])([Object(j["b"])()],Cr.prototype,"attributes",void 0),Object(l["a"])([Object(j["b"])({type:[Er["a"]]})],Cr.prototype,"expressionInfos",void 0),Object(l["a"])([Object(j["b"])()],Cr.prototype,"description",void 0),Object(l["a"])([Object(j["b"])({type:[Ar["a"]]})],Cr.prototype,"fieldInfos",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Cr.prototype,"formattedFieldInfos",null),Object(l["a"])([Object(j["b"])()],Cr.prototype,"title",void 0),Cr=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")],Cr);const Rr=Cr,Mr=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/i,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];function Pr(e){let t=null;return Mr.some(r=>(r.pattern.test(e)&&(t=r),!!t)),t}function Ir(e,t){if("string"!=typeof t||!t)return t;const r=Pr(t);if(!r)return t;const i=t.match(r.pattern),n=i&&i[2],a=Object(ke["c"])(Object(ke["c"])(r.label,{messages:e,hierPart:n}),{appName:r.appName}),s=r.target?` target="${r.target}"`:"",o="_blank"===r.target?' rel="noreferrer"':"";return t.replace(r.pattern,`<a${s} href="$1"${o}>${a}</a>`)}const Dr={base:"esri-feature-fields",fieldHeader:"esri-feature-fields__field-header",fieldData:"esri-feature-fields__field-data",fieldDataDate:"esri-feature-fields__field-data--date",esriTable:"esri-widget__table"};let Lr=class extends Ie["a"]{constructor(e,t){super(e,t),this._featureElementInfo=null,this.attributes=null,this.description=null,this.expressionInfos=null,this.fieldInfos=null,this.title=null,this.viewModel=new Rr,this.messages=null,this.messagesURIUtils=null}initialize(){this._featureElementInfo=new gr,Object(Me["a"])(this,["viewModel.description","viewModel.title"],()=>this._setupFeatureElementInfo())}destroy(){this._featureElementInfo.destroy()}renderFieldInfo(e,t){const{attributes:r}=this.viewModel,i=e.fieldName,n=e.label||i,a=r?null==r[i]?"":r[i]:"",s=!(!e.format||!e.format.dateFormat),o="number"!=typeof a||s?Ir(this.messagesURIUtils,a):this._forceLTR(a),c={[Dr.fieldDataDate]:s};return Object(ir["a"])("tr",{key:`fields-element-info-row-${i}-${t}`},Object(ir["a"])("th",{key:`fields-element-info-row-header-${i}-${t}`,class:Dr.fieldHeader,innerHTML:n}),Object(ir["a"])("td",{key:`fields-element-info-row-data-${i}-${t}`,class:this.classes(Dr.fieldData,c),innerHTML:o}))}renderFields(){const{formattedFieldInfos:e}=this.viewModel;return null!=e&&e.length?Object(ir["a"])("table",{class:Dr.esriTable,summary:this.messages.fieldsSummary},Object(ir["a"])("tbody",null,e.map((e,t)=>this.renderFieldInfo(e,t)))):null}render(){var e;return Object(ir["a"])("div",{class:Dr.base},null==(e=this._featureElementInfo)?void 0:e.render(),this.renderFields())}_setupFeatureElementInfo(){const{description:e,title:t}=this;this._featureElementInfo.set({description:e,title:t})}_forceLTR(e){return"&lrm;"+e}};Object(l["a"])([Object(Pe["a"])("viewModel.attributes")],Lr.prototype,"attributes",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.description")],Lr.prototype,"description",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.expressionInfos")],Lr.prototype,"expressionInfos",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.fieldInfos")],Lr.prototype,"fieldInfos",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.title")],Lr.prototype,"title",void 0),Object(l["a"])([Object(j["b"])({type:Rr})],Lr.prototype,"viewModel",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Feature/t9n/Feature")],Lr.prototype,"messages",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/support/t9n/uriUtils")],Lr.prototype,"messagesURIUtils",void 0),Lr=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureFields")],Lr);const Nr=Lr;var Fr=r("a8f3"),kr=r("2eab"),Ur=r("69dd"),zr=r("b742"),Br=r("a796"),Vr=r("feec");const Gr="esri.widgets.Feature.support.relatedFeatureUtils",Hr=v["a"].getLogger(Gr),qr=new Map;function Wr(e){if(!Ut(e))return null;const[t,r]=e.split("/").slice(1);return{layerId:t,fieldName:r}}function $r(e,t){if(!t.relationships)return null;let r=null;const{relationships:i}=t;return i.some(t=>t.id===parseInt(e,10)&&(r=t,!0)),r}function Zr({originRelationship:e,relationships:t,layerId:r}){let i;return t&&t.some(t=>(""+t.relatedTableId===r&&t.id===e.id&&(i=t),!!i)),i}function Xr(e,t){const r=t.toLowerCase();for(const i in e)if(i.toLowerCase()===r)return e[i];return null}function Yr(e,t){const r=$r(e,t);if(!r)return;const i=`${t.url}/${r.relatedTableId}`;return{url:i,queryTask:new Vr["a"]({url:i,sourceSpatialReference:t.spatialReference}),relation:r,relatedFields:[],outStatistics:[]}}function Jr(e,t){if(!t)return;if(!e)return;const{features:r,statsFeatures:i}=e,n=r&&r.value;t.relatedFeatures=n?n.features:[];const a=i&&i.value;t.relatedStatsFeatures=a?a.features:[]}function Qr(e,t,r,i){const n=new zr["a"];return n.outFields=["*"],n.relationshipId="number"==typeof t.id?t.id:parseInt(t.id,10),n.objectIds=[e.attributes[r.objectIdField]],r.queryRelatedFeatures(n,i)}function Kr(e,t,r){let i=0;const n=[];for(;i<t.length;)n.push(`${e} IN (${t.slice(i,r+i)})`),i+=r;return n.join(" OR ")}async function ei(e,t,r,i){const n=r.layerId.toString(),{layerInfo:a,queryTask:s,relation:o,relatedFields:c,outStatistics:l}=t,u=Zr({originRelationship:o,relationships:a.relationships,layerId:n});if(u.relationshipTableId&&u.keyFieldInRelationshipTable){const t=(await Qr(e,u,r,i))[e.attributes[r.objectIdField]];if(!t)return null;const n=t.features.map(e=>e.attributes[a.objectIdField]);if((null==l?void 0:l.length)>0&&a.supportsStatistics){const e=new Ur["a"];e.where=Kr(a.objectIdField,n,1e3),e.outFields=c,e.outStatistics=l;const r={features:Promise.resolve(t),statsFeatures:s.execute(e)};return Object(_["j"])(r)}}const d=null==u?void 0:u.keyField;if(d){const r=Object(Be["p"])(ai(a.fields,d)),n=Xr(e.attributes,o.keyField),c=r?`${d}=${n}`:`${d}='${n}'`,l=s.execute(new Ur["a"]({where:c,outFields:t.relatedFields}),i),u=t.outStatistics&&t.outStatistics.length>0&&a.supportsStatistics?s.execute(new Ur["a"]({where:c,outFields:t.relatedFields,outStatistics:t.outStatistics}),i):null,h={features:l};return u&&(h.statsFeatures=u),Object(_["j"])(h)}return null}function ti(e,t){return Object(kr["default"])(e,{query:{f:"json"},signal:t&&t.signal})}function ri({relatedInfos:e,layer:t},r){const i={};return e.forEach((e,n)=>{const{relation:a}=e;if(!a){const e=new b["a"]("relation-required","A relation is required on a layer to retrieve related records.");throw Hr.error(e),e}const{relatedTableId:s}=a;if("number"!=typeof s){const e=new b["a"]("A related table ID is required on a layer to retrieve related records.");throw Hr.error(e),e}const o=`${t.url}/${s}`,c=qr.get(o),l=c||ti(o,r);c||qr.set(o,l),i[n]=l}),Object(_["j"])(i)}function ii({graphic:e,relatedInfos:t,layer:r},i){const n={};return t.forEach((t,a)=>{t.layerInfo&&(n[a]=ei(e,t,r,i))}),Object(_["j"])(n)}function ni({relatedInfo:e,fieldName:t,fieldInfo:r}){if(e.relatedFields.push(t),r.statisticType){const i=new Br["a"]({statisticType:r.statisticType,onStatisticField:t,outStatisticFieldName:t});e.outStatistics.push(i)}}function ai(e,t){if(null!=e){t=t.toLowerCase();for(const r of e)if(r&&r.name.toLowerCase()===t)return r}return null}const si={chartAnimation:!0};let oi=class extends F["a"]{constructor(e){super(e),this.abilities={...si},this.activeMediaInfoIndex=0,this.attributes=null,this.description=null,this.fieldInfoMap=null,this.formattedAttributes=null,this.expressionAttributes=null,this.layer=null,this.mediaInfos=null,this.popupTemplate=null,this.relatedInfos=null,this.title=null}castAbilities(e){return{...si,...e}}get activeMediaInfo(){return this.formattedMediaInfos[this.activeMediaInfoIndex]||null}get formattedMediaInfos(){return this._formatMediaInfos()||[]}get formattedMediaInfoCount(){return this.formattedMediaInfos.length}setActiveMedia(e){this._setContentElementMedia(e)}next(){this._pageContentElementMedia(1)}previous(){this._pageContentElementMedia(-1)}_setContentElementMedia(e){const{formattedMediaInfoCount:t}=this,r=(e+t)%t;this.activeMediaInfoIndex=r}_pageContentElementMedia(e){const{activeMediaInfoIndex:t}=this,r=t+e;this._setContentElementMedia(r)}_formatMediaInfos(){const{attributes:e,mediaInfos:t,formattedAttributes:r,expressionAttributes:i,fieldInfoMap:n,layer:a}=this;return null==t?void 0:t.map(t=>{const s=null==t?void 0:t.clone();if(!s)return null;if(s.title=ft({attributes:e,fieldInfoMap:n,globalAttributes:r,expressionAttributes:i,layer:a,text:s.title}),s.caption=ft({attributes:e,fieldInfoMap:n,globalAttributes:r,expressionAttributes:i,layer:a,text:s.caption}),s.altText=ft({attributes:e,fieldInfoMap:n,globalAttributes:r,expressionAttributes:i,layer:a,text:s.altText}),"image"===s.type){const{value:e}=s;return this._setImageValue({value:e,formattedAttributes:r,layer:a}),s.value.sourceURL?s:void 0}if("pie-chart"===s.type||"line-chart"===s.type||"column-chart"===s.type||"bar-chart"===s.type){const{value:t}=s;return this._setChartValue({value:t,chartType:s.type,attributes:e,formattedAttributes:r,layer:a}),s}return null}).filter(Boolean)}_setImageValue(e){const{fieldInfoMap:t}=this,{value:r,formattedAttributes:i,layer:n}=e,{linkURL:a,sourceURL:s}=r;if(s){const e=Ot(s,n);r.sourceURL=bt({formattedAttributes:i,template:e,fieldInfoMap:t})}if(a){const e=Ot(a,n);r.linkURL=bt({formattedAttributes:i,template:e,fieldInfoMap:t})}}_setChartValue(e){const{value:t,attributes:r,formattedAttributes:i,chartType:n,layer:a}=e,{popupTemplate:s,relatedInfos:o}=this,{fields:c,normalizeField:l}=t;if(t.fields=dt(c,a),l&&(t.normalizeField=ut(l,a)),!c.some(e=>!!(null!=i[e]||Ut(e)&&o.size)))return;const u=null==s?void 0:s.fieldInfos;c.forEach(e=>{if(Ut(e))return void(t.series=[...t.series,...this._getRelatedChartInfos({fieldInfos:u,fieldName:e,formattedAttributes:i,chartType:n,value:t})]);const a=this._getChartOption({value:t,attributes:r,chartType:n,formattedAttributes:i,fieldName:e,fieldInfos:u});t.series.push(a)})}_getRelatedChartInfos(e){var t;const{fieldInfos:r,fieldName:i,formattedAttributes:n,chartType:a,value:s}=e,o=[],c=Wr(i),{layerId:l,fieldName:u}=c,d=null==(t=this.relatedInfos)?void 0:t.get(l.toString());if(!d)return o;const{relatedFeatures:h,relation:p}=d;if(!p||!h)return o;const{cardinality:f}=p;return h.forEach(e=>{const{attributes:t}=e;t&&Object.keys(t).forEach(e=>{e===u&&o.push(this._getChartOption({value:s,attributes:t,formattedAttributes:n,fieldName:i,chartType:a,relatedFieldName:e,fieldInfos:r}))})}),"one-to-many"===f||"many-to-many"===f?o:[o[0]]}_getTooltip({label:e,value:t,chartType:r}){return"pie-chart"===r?e:`${e}: ${t}`}_getChartOption(e){var t;const{value:r,attributes:i,formattedAttributes:n,fieldName:a,relatedFieldName:s,fieldInfos:o,chartType:c}=e,{layer:l}=this,{normalizeField:u,tooltipField:d}=r,h=u?Ut(u)?i[Wr(u).fieldName]:i[u]:null,p=s&&void 0!==i[s]?i[s]:void 0!==i[a]?i[a]:n[a],f=void 0===p?null:p&&h?p/h:p,b=new Fr["a"]({value:f});if(Ut(a)){const e=Wr(a),t=Wr(d),r=t?t.fieldName:null,n=Tt(f,{fieldInfos:o,fieldName:s,layer:l,preventPlacesFormatting:!!h}),u=e?e.label||e.fieldName:s,p=r&&void 0!==i[r]?i[r]:u;return b.tooltip=this._getTooltip({label:p,value:n,chartType:c}),b}const m=St(o,a),g=ut(a,l),y=d&&void 0!==n[d]?n[d]:ot(m||new Ar["a"]({fieldName:g}),null==(t=this.popupTemplate)?void 0:t.expressionInfos),O=n[g];return b.tooltip=this._getTooltip({label:y,value:O,chartType:c}),b}};Object(l["a"])([Object(j["b"])()],oi.prototype,"abilities",void 0),Object(l["a"])([Object(B["a"])("abilities")],oi.prototype,"castAbilities",null),Object(l["a"])([Object(j["b"])()],oi.prototype,"activeMediaInfoIndex",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],oi.prototype,"activeMediaInfo",null),Object(l["a"])([Object(j["b"])()],oi.prototype,"attributes",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"description",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"fieldInfoMap",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"formattedAttributes",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"expressionAttributes",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],oi.prototype,"formattedMediaInfos",null),Object(l["a"])([Object(j["b"])()],oi.prototype,"layer",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],oi.prototype,"formattedMediaInfoCount",null),Object(l["a"])([Object(j["b"])()],oi.prototype,"mediaInfos",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"popupTemplate",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"relatedInfos",void 0),Object(l["a"])([Object(j["b"])()],oi.prototype,"title",void 0),oi=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureMedia.FeatureMediaViewModel")],oi);const ci=oi;var li=["#ffffff","#858585","#ffbebe","#ffebbe","#ffebaf","#ffffbe","#e9ffbe","#d3ffbe","#beffe8","#bee8ff","#bed2ff","#e8beff","#ffbee8","#ebebeb","#707070","#ff7f7f","#ffa77f","#ffd37f","#ffff73","#d1ff73","#a3ff73","#73ffdf","#73dfff","#73b2ff","#df73ff","#ff73df","#d6d6d6","#5c5c5c","#ff0000","#ff5500","#ffaa00","#ffff00","#aaff00","#55ff00","#00ffc5","#00c5ff","#0070ff","#c500ff","#ff00c5","#c2c2c2","#474747","#e60000","#e64c00","#e69800","#e6e600","#98e600","#4ce600","#00e6a9","#00a9e6","#005ce6","#a900e6","#e600a9","#adadad","#242424","#a80000","#a83800","#a87000","#a8a800","#70a800","#38a800","#00a884","#0084a8","#004da8","#8400a8","#a80084","#999999","#1a1a1a","#730000","#732600","#734c00","#737300","#4c7300","#267300","#00734c","#004c73","#002673","#4c0073","#73004"],ui=[].concat(li.slice(30,39),li.slice(28,30).reverse()),di=[{name:"default",colors:ui},{name:"cat-dark",colors:["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"]},{name:"tropical-bliss",colors:["#fce138","#ff9399","#fcd27e","#f1983c","#a553b7","#b1a9d0","#6ecffc","#4c81cd","#fc6f84","#fc3e5a","#6af689","#48885c"]},{name:"desert-blooms",colors:["#102432","#144d59","#ffc730","#ed9310","#a64f1b","#661510","#d9351a","#b31515","#4a0932","#8c213f","#18382e","#2c6954"]},{name:"under-the-sea",colors:["#bf9727","#607100","#00734c","#704489","#01acca","#024e76","#f09100","#ea311f","#c6004b","#7570b3","#666666","#333333"]},{name:"vibrant-rainbow",colors:["#fffb00","#f5cb11","#9fd40c","#46e39c","#32b8a6","#7ff2fa","#ac08cc","#dd33ff","#eb7200","#e8a784","#bf2e2e","#6c7000"]},{name:"ocean-bay",colors:["#191921","#11495c","#78b1c2","#454f4b","#8f8f82","#9be0c0","#87b051","#f7ec88","#ebdcc1","#dbb658","#c43541","#75351e"]},{name:"prairie-summer",colors:["#332424","#751555","#d47013","#d68989","#211173","#82aad6","#7bfaeb","#6ec9a8","#6b6408","#eada40","#ccc54a","#1fc235"]},{name:"pastel-chalk",colors:["#fffd99","#f5e6a4","#c1d48c","#b8e3d0","#a0b8b5","#cbf7fa","#d791f2","#dfc1eb","#f2b983","#e8c4b2","#bf8e8e","#94995c"]},{name:"seq-yellow-orange-red-bright",colors:["#910000","#b1260b","#c0370f","#e05919","#ef6a1d","#ff7b22","#ffa143","#ffb454","#ffda74","#ffed85"]},{name:"seq-reds-bright",colors:["#57453b","#7b4238","#9f4036","#c23d33","#d7483c","#ec5244","#f3696c","#f9816c","#ffc4ae","#fff0dc"]},{name:"seq-purples-bright",colors:["#4e465c","#5a4a78","#695291","#775baa","#8663c3","#946bdc","#aa89e8","#c1a6f3","#d7c4ff","#e6e1ff"]},{name:"seq-blues-bright",colors:["#404d54","#435c6c","#48799d","#4b88b6","#4d96ce","#50a5e7","#74bbed","#98d0f3","#bce6f9","#e6faff"]},{name:"seq-greens-bright",colors:["#39544c","#386757","#368165","#359b73","#33b581","#4bc392","#64d2a2","#7ce0b3","#cbf6d9","#f4ffea"]},{name:"seq-browns-bright",colors:["#524834","#715b38","#8f6e3c","#ae8140","#cc9444","#eba748","#eeb664","#f0c47f","#f9e0b7","#fff8eb"]}],hi=r("2035");const pi="en-us",fi=new Map([["ar",()=>r.e("chunk-2d0dd452").then(r.bind(null,"8158")).then(e=>e.a)],["bg-bg",()=>r.e("chunk-2d0c5abf").then(r.bind(null,"3fa7")).then(e=>e.b)],["bs-ba",()=>r.e("chunk-2d0d7e56").then(r.bind(null,"7986")).then(e=>e.b)],["ca-es",()=>r.e("chunk-2d20ff55").then(r.bind(null,"b69d")).then(e=>e.c)],["cs-cz",()=>r.e("chunk-2d22ce36").then(r.bind(null,"f4c5")).then(e=>e.c)],["da-dk",()=>r.e("chunk-2d210440").then(r.bind(null,"b6c9")).then(e=>e.d)],["de-de",()=>r.e("chunk-2d0c7ed4").then(r.bind(null,"5366")).then(e=>e.d)],["de-ch",()=>r.e("chunk-2d225664").then(r.bind(null,"e3dd")).then(e=>e.d)],["el-gr",()=>r.e("chunk-2d0aead6").then(r.bind(null,"0aa0")).then(e=>e.e)],["en-us",()=>r.e("chunk-2d22d3a8").then(r.bind(null,"f734")).then(e=>e.e)],["en-ca",()=>r.e("chunk-2d231045").then(r.bind(null,"ef6d")).then(e=>e.e)],["es-es",()=>r.e("chunk-2d221c62").then(r.bind(null,"cc7c")).then(e=>e.e)],["et-ee",()=>r.e("chunk-2d0d7fd9").then(r.bind(null,"78bd")).then(e=>e.e)],["fi-fi",()=>r.e("chunk-2d0c1948").then(r.bind(null,"473b")).then(e=>e.f)],["fr-fr",()=>r.e("chunk-2d0c86de").then(r.bind(null,"559a")).then(e=>e.f)],["he-il",()=>r.e("chunk-2d207ac9").then(r.bind(null,"a213")).then(e=>e.h)],["hr-hr",()=>r.e("chunk-2d21b2d9").then(r.bind(null,"bf54")).then(e=>e.h)],["hu-hu",()=>r.e("chunk-744d03e4").then(r.bind(null,"16c62")).then(e=>e.h)],["id-id",()=>r.e("chunk-2d0d30d0").then(r.bind(null,"5ab0")).then(e=>e.i)],["it-it",()=>r.e("chunk-2d0c0894").then(r.bind(null,"41cd")).then(e=>e.i)],["ja-jp",()=>r.e("chunk-2d0cf344").then(r.bind(null,"635f")).then(e=>e.j)],["ko-kr",()=>r.e("chunk-2d0bdcef").then(r.bind(null,"2e28")).then(e=>e.k)],["lt-lt",()=>r.e("chunk-2d22a1b6").then(r.bind(null,"dffd")).then(e=>e.l)],["lv-lv",()=>r.e("chunk-2d20828d").then(r.bind(null,"a437")).then(e=>e.l)],["nb-no",()=>r.e("chunk-2d222546").then(r.bind(null,"cdc2")).then(e=>e.n)],["nl-nl",()=>r.e("chunk-2d0b6d34").then(r.bind(null,"1f8a")).then(e=>e.n)],["pl-pl",()=>r.e("chunk-2d218057").then(r.bind(null,"c8e1")).then(e=>e.p)],["pt-br",()=>r.e("chunk-2d2297bc").then(r.bind(null,"de49")).then(e=>e.p)],["pt-pt",()=>r.e("chunk-2d2311e8").then(r.bind(null,"eed6")).then(e=>e.p)],["ro-ro",()=>r.e("chunk-2d0b726e").then(r.bind(null,"1fcf")).then(e=>e.r)],["ru-ru",()=>r.e("chunk-2d21e41f").then(r.bind(null,"d591")).then(e=>e.r)],["sk-sk",()=>r.e("chunk-2d0c1555").then(r.bind(null,"4630")).then(e=>e.s)],["sl-sl",()=>r.e("chunk-74864ae5").then(r.bind(null,"58c83")).then(e=>e.s)],["sr-rs",()=>r.e("chunk-2d22e157").then(r.bind(null,"f9f4")).then(e=>e.s)],["sv-se",()=>r.e("chunk-2d0a3344").then(r.bind(null,"00d2")).then(e=>e.s)],["th-th",()=>r.e("chunk-2d0e48cf").then(r.bind(null,"9167")).then(e=>e.t)],["tr-tr",()=>r.e("chunk-7499dfb6").then(r.bind(null,"5cdb8")).then(e=>e.t)],["uk-ua",()=>r.e("chunk-2d0cffe8").then(r.bind(null,"65a4")).then(e=>e.u)],["vi-vn",()=>r.e("chunk-2d0e5bc0").then(r.bind(null,"966c")).then(e=>e.v)],["zh-cn",()=>r.e("chunk-2d210f99").then(r.bind(null,"b9d0")).then(e=>e.z)],["zh-hk",()=>r.e("chunk-2d0e925e").then(r.bind(null,"8bfd")).then(e=>e.z)],["zh-tw",()=>r.e("chunk-2d0e925e").then(r.bind(null,"8bfd")).then(e=>e.z)]]);function bi(e){const t=e.split("-")[0].toLowerCase();let r=null;for(const i of fi.keys())if(i.startsWith(t)){r=i;break}return r}function mi(e){return e?fi.has(e.toLowerCase())?e.toLowerCase():bi(e)||pi:pi}let gi,yi;async function Oi(e=Object(hi["b"])()){if(e=mi(e),gi&&e===yi)return gi;gi=r.e("chunk-2d0b32f8").then(r.bind(null,"26fd")).then(e=>e.i),yi=e;try{const[t,r]=await Promise.all([gi,fi.get(yi)()]);yi===e&&(t.am4core.options.defaultLocale=r.default),t.am4core.options.suppressWarnings=!0,t.am4core.options.autoDispose=!0}catch{return gi=null,yi=null,null}return gi}function vi(e,t="default"){const r=di.find(e=>e.name===t);return r?r.colors.map(t=>e.color(t)):null}var _i=r("60e6");const ji={base:"esri-feature-media",mediaContainer:"esri-feature-media__container",mediaItemContainer:"esri-feature-media__item-container",mediaItem:"esri-feature-media__item",mediaItemTitle:"esri-feature-media__item-title",mediaItemCaption:"esri-feature-media__item-caption",mediaPrevious:"esri-feature-media__previous",mediaPreviousIconLTR:"esri-feature-media__previous-icon",mediaPreviousIconRTL:"esri-feature-media__previous-icon--rtl",mediaNext:"esri-feature-media__next",mediaNextIconLTR:"esri-feature-media__next-icon",mediaNextIconRTL:"esri-feature-media__next-icon--rtl",mediaChart:"esri-feature-media__chart",mediaButton:"esri-feature-media__button",mediaIcon:"esri-feature-media__icon",iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconRightTriangleArrow:"esri-icon-right-triangle-arrow"},wi=.05,xi=.95,Ti=15;let Si=class extends Ie["a"]{constructor(e,t){super(e,t),this._refreshTimer=null,this._refreshIntervalInfo=null,this._featureElementInfo=null,this.attributes=null,this.activeMediaInfoIndex=null,this.description=null,this.fieldInfoMap=null,this.layer=null,this.mediaInfos=null,this.popupTemplate=null,this.relatedInfos=null,this.title=null,this.viewModel=new ci,this.messages=null,this._getChartDependencies=async e=>{const t=await Oi(),{destroyed:r,viewModel:i}=this;if(r||!i||!e)return;const{activeMediaInfo:n}=i;this._renderChart({chartDiv:e,mediaInfo:n,chartsModule:t})}}initialize(){this._featureElementInfo=new gr,this.own(Object(Me["a"])(this,["viewModel.activeMediaInfo","viewModel.activeMediaInfoIndex"],()=>this._setupMediaRefreshTimer()),Object(Me["a"])(this,["viewModel.description","viewModel.title"],()=>this._setupFeatureElementInfo()))}destroy(){this._clearMediaRefreshTimer(),this._featureElementInfo.destroy()}render(){var e;return Object(ir["a"])("div",{bind:this,class:ji.base,onkeyup:this._handleMediaKeyup},null==(e=this._featureElementInfo)?void 0:e.render(),this.renderMedia())}renderMedia(){const{formattedMediaInfoCount:e}=this.viewModel;return e?Object(ir["a"])("div",{key:"media-element-container",class:ji.mediaContainer},this.renderMediaPageButton("previous"),this.renderMediaInfo(),this.renderMediaPageButton("next")):null}renderImageMediaInfo(e){const{_refreshIntervalInfo:t}=this,{activeMediaInfoIndex:r,formattedMediaInfoCount:i}=this.viewModel,{value:n,refreshInterval:a,altText:s,title:o,type:c}=e,{sourceURL:l,linkURL:u}=n,d=nt(u)?"_blank":"_self",h="_blank"===d?"noreferrer":"",p=a?t:null,f=p?p.timestamp:0,b=p?p.sourceURL:l,m=Object(ir["a"])("img",{alt:s||o,key:`media-${c}-${r}-${i}-${f}`,src:b}),g=u?Object(ir["a"])("a",{title:o,href:u,rel:h,target:d},m):null;return g||m}renderChartMediaInfo(e){const{activeMediaInfoIndex:t,formattedMediaInfoCount:r}=this.viewModel;return Object(ir["a"])("div",{key:`media-${e.type}-${t}-${r}`,bind:this,class:ji.mediaChart,afterCreate:this._getChartDependencies})}renderMediaInfoType(){const{activeMediaInfo:e}=this.viewModel;return e?"image"===e.type?this.renderImageMediaInfo(e):-1!==e.type.indexOf("chart")?this.renderChartMediaInfo(e):null:null}renderMediaInfo(){const{activeMediaInfo:e}=this.viewModel;if(!e)return null;const t=e.title?Object(ir["a"])("div",{key:"media-title",class:ji.mediaItemTitle,innerHTML:e.title}):null,r=e.caption?Object(ir["a"])("div",{key:"media-caption",class:ji.mediaItemCaption,innerHTML:e.caption}):null;return Object(ir["a"])("div",{key:"media-container",class:ji.mediaItemContainer},Object(ir["a"])("div",{key:"media-item-container",class:ji.mediaItem},this.renderMediaInfoType()),t,r)}renderMediaPageButton(e){if(this.viewModel.formattedMediaInfoCount<2)return null;const t="previous"===e,r=t?this.messages.previous:this.messages.next,i=t?this.classes(ji.mediaButton,ji.mediaPrevious):this.classes(ji.mediaButton,ji.mediaNext),n=t?this.classes(ji.mediaIcon,ji.mediaPreviousIconLTR,ji.iconLeftTriangleArrow):this.classes(ji.mediaIcon,ji.mediaNextIconLTR,ji.iconRightTriangleArrow),a=t?this.classes(ji.mediaIcon,ji.mediaPreviousIconRTL,ji.iconRightTriangleArrow):this.classes(ji.mediaIcon,ji.mediaNextIconRTL,ji.iconLeftTriangleArrow),s=t?"media-previous":"media-next",o=t?this._previous:this._next;return Object(ir["a"])("button",{type:"button",key:s,title:r,"aria-label":r,tabIndex:0,class:i,bind:this,onclick:o},Object(ir["a"])("span",{"aria-hidden":"true",class:n}),Object(ir["a"])("span",{"aria-hidden":"true",class:a}))}_setupFeatureElementInfo(){const{description:e,title:t}=this;this._featureElementInfo.set({description:e,title:t})}_next(){this.viewModel.next()}_previous(){this.viewModel.previous()}_handleMediaKeyup(e){const t=Object(Ce["a"])(e);"ArrowLeft"===t&&(e.stopPropagation(),this.viewModel.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.viewModel.next())}_renderChart(e){const{abilities:t}=this.viewModel,{chartsModule:r,chartDiv:i,mediaInfo:n}=e,{value:a,type:s}=n,{am4core:o}=r,c=vi(o);function l(e){e instanceof o.ColorSet&&c&&(e.list=c)}Object(_i["c"])()&&o.useTheme(r.am4themes_dark);const u=window.matchMedia("(prefers-reduced-motion: reduce)");t.chartAnimation&&!u.matches?o.useTheme(r.am4themes_animated):o.unuseTheme(r.am4themes_animated),o.useTheme(l);const d="pie-chart"===s?this._createPieChart(e):this._createXYChart(e);i.setAttribute("aria-label",n.altText||n.title),d.data=a.series.map(e=>({tooltip:e.tooltip,value:e.value})).filter(e=>"pie-chart"!==s||e.value>0)}_customizeChartTooltip(e,t){e.label.wrap=!0,e.label.maxWidth=200,e.autoTextColor=!1,e.getFillFromObject=!1,e.label.fill=t.color("#ffffff"),e.background.fill=t.color({r:0,g:0,b:0,a:.7})}_createPieChart(e){const{chartDiv:t,chartsModule:r}=e,{am4core:i,am4charts:n}=r,a=i.create(t,n.PieChart);a.rtl=Object(tr["e"])(this.container);const s=a.series.push(new n.PieSeries);return s.labels.template.disabled=!0,s.ticks.template.disabled=!0,s.dataFields.value="value",s.dataFields.category="tooltip",this._customizeChartTooltip(s.tooltip,i),s.slices.template.tooltipText=a.rtl?"{category}: %{value.percent.formatNumber('#.0')}":"{category}: {value.percent.formatNumber('#.0')}%",a}_getMinSeriesValue(e){let t=0;return e.forEach(e=>t=Math.min(e.value,t)),t}_createColumnChart(e,t){const{chartsModule:r,mediaInfo:i}=t,{value:n}=i,{am4core:a,am4charts:s}=r,o=e.xAxes.push(new s.CategoryAxis);o.dataFields.category="tooltip",o.renderer.labels.template.disabled=!0,this._customizeChartTooltip(o.tooltip,a),o.tooltip.events.on("sizechanged",()=>{o.tooltip.dy=-o.tooltip.contentHeight});const c=e.yAxes.push(new s.ValueAxis),l=c.renderer.labels.template;c.renderer.minLabelPosition=wi,c.renderer.maxLabelPosition=xi,c.min=this._getMinSeriesValue(n.series),this._customizeChartTooltip(c.tooltip,a),l.wrap=!0;const u=e.series.push(new s.ColumnSeries);u.dataFields.valueY="value",u.dataFields.categoryX="tooltip",e.cursor=new s.XYCursor,n.series.length>Ti&&(e.scrollbarX=new a.Scrollbar)}_createBarChart(e,t){const{chartsModule:r,mediaInfo:i}=t,{value:n}=i,{am4core:a,am4charts:s}=r,o=e.yAxes.push(new s.CategoryAxis);o.dataFields.category="tooltip",o.renderer.inversed=!0,o.renderer.labels.template.disabled=!0,this._customizeChartTooltip(o.tooltip,a),o.tooltip.events.on("sizechanged",()=>{o.tooltip.dx=o.tooltip.contentWidth});const c=e.xAxes.push(new s.ValueAxis),l=c.renderer.labels.template;c.renderer.minLabelPosition=wi,c.renderer.maxLabelPosition=xi,c.min=this._getMinSeriesValue(n.series),this._customizeChartTooltip(c.tooltip,a),l.wrap=!0;const u=e.series.push(new s.ColumnSeries);u.dataFields.valueX="value",u.dataFields.categoryY="tooltip",e.cursor=new s.XYCursor,n.series.length>Ti&&(e.scrollbarY=new a.Scrollbar)}_createLineChart(e,t){const{chartsModule:r,mediaInfo:i}=t,{value:n}=i,{am4core:a,am4charts:s}=r,o=e.xAxes.push(new s.CategoryAxis);o.dataFields.category="tooltip",o.renderer.labels.template.disabled=!0,this._customizeChartTooltip(o.tooltip,a),o.tooltip.events.on("sizechanged",()=>{o.tooltip.dy=-o.tooltip.contentHeight});const c=e.yAxes.push(new s.ValueAxis),l=c.renderer.labels.template;c.renderer.minLabelPosition=wi,c.renderer.maxLabelPosition=xi,c.min=this._getMinSeriesValue(n.series),this._customizeChartTooltip(c.tooltip,a),l.wrap=!0;const u=e.series.push(new s.LineSeries);u.dataFields.categoryX="tooltip",u.dataFields.valueY="value",e.cursor=new s.XYCursor,n.series.length>Ti&&(e.scrollbarX=new a.Scrollbar)}_createXYChart(e){const{chartDiv:t,chartsModule:r,mediaInfo:i}=e,{type:n}=i,{am4core:a,am4charts:s}=r,o=a.create(t,s.XYChart);return o.rtl=Object(tr["e"])(this.container),"column-chart"===n&&this._createColumnChart(o,e),"bar-chart"===n&&this._createBarChart(o,e),"line-chart"===n&&this._createLineChart(o,e),o}_clearMediaRefreshTimer(){const{_refreshTimer:e}=this;e&&(clearTimeout(e),this._refreshTimer=null)}_updateMediaInfoTimestamp(e){const t=Date.now();this._refreshIntervalInfo={timestamp:t,sourceURL:this._getImageSource(e,t)},this.scheduleRender()}_setupMediaRefreshTimer(){this._clearMediaRefreshTimer();const{activeMediaInfo:e}=this.viewModel;e&&"image"===e.type&&e.refreshInterval&&this._setRefreshTimeout(e)}_setRefreshTimeout(e){const{refreshInterval:t,value:r}=e;if(!t)return;const i=6e4*t;this._updateMediaInfoTimestamp(r.sourceURL);const n=setInterval(()=>{this._updateMediaInfoTimestamp(r.sourceURL)},i);this._refreshTimer=n}_getImageSource(e,t){const r=-1!==e.indexOf("?")?"&":"?",[i,n=""]=e.split("#");return`${i}${r}timestamp=${t}${n?"#":""}${n}`}};Object(l["a"])([Object(Pe["a"])("viewModel.attributes")],Si.prototype,"attributes",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.activeMediaInfoIndex")],Si.prototype,"activeMediaInfoIndex",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.description")],Si.prototype,"description",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.fieldInfoMap")],Si.prototype,"fieldInfoMap",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.layer")],Si.prototype,"layer",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.mediaInfos")],Si.prototype,"mediaInfos",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.popupTemplate")],Si.prototype,"popupTemplate",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.relatedInfos")],Si.prototype,"relatedInfos",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.title")],Si.prototype,"title",void 0),Object(l["a"])([Object(j["b"])({type:ci})],Si.prototype,"viewModel",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Feature/t9n/Feature")],Si.prototype,"messages",void 0),Si=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureMedia")],Si);const Ei=Si;var Ai=r("89da"),Ci=(r("1289"),r("a7a7"),r("69c9"),r("d099"),r("18bf")),Ri=r("3cacd"),Mi=r("d0e9"),Pi=r("2e3f"),Ii=r("5bd5");const Di=["$datastore","$map","$layer","$aggregatedfeatures"],Li="esri.widgets.Feature.support.arcadeFeatureUtils",Ni=v["a"].getLogger(Li);function Fi(e){return"string"==typeof e?It(Pt(e)):Array.isArray(e)?ki(e):"esri.arcade.Dictionary"===(null==e?void 0:e.declaredClass)?Ui(e):e}function ki(e){return`<ul class="esri-widget__list">${e.map(e=>`<li>${"string"==typeof e?It(Pt(e)):e}</li>`).join("")}</ul>`}function Ui(e){return`<table class="esri-widget__table">${e.keys().map(t=>{const r=e.field(t);return`<tr><th>${t}</th><td>${"string"==typeof r?It(Pt(r)):r}</td></tr>`}).join("")}</table>`}function zi({aggregatedFeatures:e,arcadeUtils:t,featureSetVars:r,context:i,viewInfo:n,map:a,graphic:s,interceptor:o}){r.forEach(r=>{const c=r.toLowerCase(),l={map:a,spatialReference:n.sr,interceptor:o};if("$map"===c&&(i.vars[c]=t.convertMapToFeatureSetCollection(l)),"$layer"===c&&(i.vars[c]=t.convertFeatureLayerToFeatureSet({layer:s.sourceLayer,spatialReference:n.sr,interceptor:o})),"$datastore"===c&&(i.vars[c]=t.convertServiceUrlToWorkspace({url:s.sourceLayer.url,spatialReference:n.sr,interceptor:o})),"$aggregatedfeatures"===c){const r=s.layer,{fields:a,objectIdField:l,geometryType:u,spatialReference:d,displayField:h}=r,p=new Ii["default"]({fields:a,objectIdField:l,geometryType:u,spatialReference:d,displayField:h,..."feature"===r.type?{templates:r.templates,typeIdField:r.typeIdField,types:r.types}:null,source:e});i.vars[c]=t.convertFeatureLayerToFeatureSet({layer:p,spatialReference:n.sr,interceptor:o})}})}function Bi(){return r.e("chunk-5e76d58f").then(r.bind(null,"084f"))}async function Vi({graphic:e,view:t}){const{isAggregate:r,layer:i}=e;if(!r||!i||"2d"!==(null==t?void 0:t.type))return[];const n=await t.whenLayerView(i);if(!n.createQuery||!n.queryFeatures)return[];const a=n.createQuery();a.aggregateIds=[e.getObjectId()];const{features:s}=await n.queryFeatures(a);return s}async function Gi({expressionInfo:e,arcadeUtils:t,interceptor:r,spatialReference:i,map:n,graphic:a,view:s}){if(!e||!e.expression)return null;const o=t.createSyntaxTree(e.expression),c=Di.filter(e=>t.hasVariable(o,e)),[l]=await Object(_["b"])([Vi({graphic:a,view:s}),t.loadScriptDependencies(o,!0,c)]),u=t.getViewInfo({spatialReference:i}),d=t.createExecContext(a,u);d.interceptor=r,d.useAsync=!0,zi({aggregatedFeatures:l,arcadeUtils:t,featureSetVars:c,context:d,viewInfo:u,map:n,graphic:a,interceptor:r});const h=t.createFunction(o,d);return t.executeAsyncFunction(h,d).catch(t=>Ni.error("arcade-execution-error",{error:t,graphic:a,expressionInfo:e}))}async function Hi({expressionInfos:e,spatialReference:t,graphic:r,interceptor:i,map:n,view:a}){if(!e||!e.length)return{};const s=await Bi(),o={};for(const u of e)o["expression/"+u.name]=Gi({expressionInfo:u,arcadeUtils:s,interceptor:i,spatialReference:t,map:n,graphic:r,view:a});const c=await Object(_["j"])(o),l={};for(const u in c)l[u]=Fi(c[u].value);return l}const qi=1;let Wi=class extends(Object(Le["b"])(F["a"])){constructor(e){super(e),this._abortController=null,this.expressionInfo=null,this.graphic=null,this.contentElement=null,this.contentElementViewModel=null,this.interceptor=null,this.view=null,this._cancelQuery=()=>{const{_abortController:e}=this;e&&e.abort(),this._abortController=null},this._createVM=()=>{var e,t;const r=null==(e=this.contentElement)?void 0:e.type;null==(t=this.contentElementViewModel)||t.destroy();const i="fields"===r?new Rr:"media"===r?new ci:"text"===r?new jr:null;this._set("contentElementViewModel",i)},this._compile=async()=>{this._cancelQuery();const e=new AbortController;this._abortController=e,await this._compileExpression(),this._abortController===e&&(this._abortController=null)},this._compileThrottled=Object(Re["a"])(this._compile,qi,this),this._compileExpression=async()=>{const{expressionInfo:e,graphic:t,interceptor:r,spatialReference:i,map:n,view:a,_abortController:s}=this;if(!(e&&t&&i&&n))return void this._set("contentElement",null);const o=await Bi();if(s!==this._abortController)return;const c=await Gi({arcadeUtils:o,expressionInfo:e,graphic:t,interceptor:r,map:n,spatialReference:i,view:a});if(!c||"esri.arcade.Dictionary"!==c.declaredClass)return void this._set("contentElement",null);const l=await Object(Ai["Z"])(c,s.signal),u=null==l?void 0:l.type,d="media"===u?Ri["a"].fromJSON(l):"text"===u?Mi["a"].fromJSON(l):"fields"===u?Ci["a"].fromJSON(l):null;this._set("contentElement",d)},this.handles.add([Object(Me["a"])(this,["expressionInfo","graphic","map","spatialReference","view"],this._compileThrottled),Object(Me["a"])(this,"contentElement",this._createVM)])}destroy(){var e;this._cancelQuery(),null==(e=this.contentElementViewModel)||e.destroy(),this._set("contentElementViewModel",null),this._set("contentElement",null)}get spatialReference(){var e;return(null==(e=this.view)?void 0:e.spatialReference)||null}set spatialReference(e){void 0!==e?this._override("spatialReference",e):this._clearOverride("spatialReference")}get state(){const{_abortController:e,contentElement:t,contentElementViewModel:r}=this;return e?"loading":t||r?"ready":"disabled"}get map(){var e;return(null==(e=this.view)?void 0:e.map)||null}set map(e){void 0!==e?this._override("map",e):this._clearOverride("map")}};Object(l["a"])([Object(j["b"])()],Wi.prototype,"_abortController",void 0),Object(l["a"])([Object(j["b"])({type:Pi["a"]})],Wi.prototype,"expressionInfo",void 0),Object(l["a"])([Object(j["b"])({type:ie["a"]})],Wi.prototype,"graphic",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Wi.prototype,"contentElement",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Wi.prototype,"contentElementViewModel",void 0),Object(l["a"])([Object(j["b"])()],Wi.prototype,"interceptor",void 0),Object(l["a"])([Object(j["b"])()],Wi.prototype,"spatialReference",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Wi.prototype,"state",null),Object(l["a"])([Object(j["b"])()],Wi.prototype,"map",null),Object(l["a"])([Object(j["b"])()],Wi.prototype,"view",void 0),Wi=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureExpression.FeatureExpressionViewModel")],Wi);const $i=Wi,Zi={iconLoading:"esri-icon-loading-indicator esri-rotating",base:"esri-feature-expression",loadingSpinnerContainer:"esri-feature__loading-container",spinner:"esri-feature__loading-spinner"};let Xi=class extends Ie["a"]{constructor(e,t){super(e,t),this.viewModel=new $i}initialize(){Object(Me["a"])(this,"viewModel.contentElementViewModel",()=>this._setupExpressionWidget())}destroy(){this._destroyContentWidget()}renderLoading(){return Object(ir["a"])("div",{key:"loading-container",class:Zi.loadingSpinnerContainer},Object(ir["a"])("span",{class:this.classes(Zi.iconLoading,Zi.spinner)}))}render(){var e;const{state:t}=this.viewModel;return Object(ir["a"])("div",{class:Zi.base},"loading"===t?this.renderLoading():"disabled"===t?null:null==(e=this._contentWidget)?void 0:e.render())}_destroyContentWidget(){const{_contentWidget:e}=this;e&&(e.viewModel=null,e.destroy()),this._contentWidget=null}_setupExpressionWidget(){const{contentElementViewModel:e,contentElement:t}=this.viewModel,r=null==t?void 0:t.type;this._destroyContentWidget();const i=e?"fields"===r?new Nr({viewModel:e}):"media"===r?new Ei({viewModel:e}):"text"===r?new Sr({viewModel:e}):null:null;this._contentWidget=i,this.scheduleRender()}};Object(l["a"])([Object(j["b"])({type:$i})],Xi.prototype,"viewModel",void 0),Xi=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.FeatureExpression")],Xi);const Yi=Xi;class Ji{constructor(e,t){this.preLayerQueryCallback=e,this.preRequestCallback=t,this.preLayerQueryCallback||(this.preLayerQueryCallback=e=>{}),this.preRequestCallback||(this.preLayerQueryCallback=e=>{})}}var Qi;const Ki=1,en="content-view-models",tn="esri.widgets.FeatureViewModel",rn=v["a"].getLogger(tn),nn={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0};let an=Qi=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"],this._error=null,this._featureAbortController=null,this.graphicChangedThrottled=Object(Re["a"])(this._graphicChanged,Ki,this),this._expressionAttributes=null,this._graphicExpressionAttributes=null,this.abilities={...nn},this.content=null,this.contentViewModels=[],this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.lastEditInfo=null,this.relatedInfos=new Map,this.title="",this.view=null,this._isAllowedContentType=e=>{const{abilities:t}=this;return"attachments"===e.type&&t.attachmentsContent||"custom"===e.type&&t.customContent||"fields"===e.type&&t.fieldsContent||"media"===e.type&&t.mediaContent||"text"===e.type&&t.textContent||"expression"===e.type&&t.expressionContent},this._handles.add(Object(Me["a"])(this,["graphic","_effectivePopupTemplate","abilities"],()=>this.graphicChangedThrottled()))}destroy(){this._clear(),this._cancelFeatureQuery(),this._error=null,this._handles.destroy(),this._handles=null,this.graphic=null,this._destroyContentViewModels(),this.relatedInfos.clear()}get _effectivePopupTemplate(){return Object(z["k"])(this.graphic)?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return Rt(Mt(this._effectivePopupTemplate),this._sourceLayer)}get _sourceLayer(){return rt(this.graphic)}castAbilities(e){return{...nn,...e}}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}set graphic(e){this._set("graphic",e?e.clone():null)}get spatialReference(){return this.get("view.spatialReference")||null}set spatialReference(e){void 0!==e?this._override("spatialReference",e):this._clearOverride("spatialReference")}get map(){return this.get("view.map")||null}set map(e){void 0!==e?this._override("map",e):this._clearOverride("map")}get waitingForContent(){return!!this._featureAbortController}setActiveMedia(e,t){const r=this.contentViewModels[e];r instanceof ci&&r.setActiveMedia(t)}nextMedia(e){const t=this.contentViewModels[e];t instanceof ci&&t.next()}previousMedia(e){const t=this.contentViewModels[e];t instanceof ci&&t.previous()}_clear(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",null)}async _graphicChanged(){this._cancelFeatureQuery(),this._error=null,this._clear();const{graphic:e}=this;if(!e)return;const t=new AbortController;this._featureAbortController=t;try{await this._queryFeature({signal:t.signal})}catch(r){Object(_["m"])(r)||(this._error=r,rn.error("error","The popupTemplate could not be displayed for this feature.",{error:r,graphic:e,popupTemplate:this._effectivePopupTemplate}))}this._featureAbortController===t&&(this._featureAbortController=null)}_cancelFeatureQuery(){const{_featureAbortController:e}=this;e&&e.abort(),this._featureAbortController=null}_compileContentElement(e,t){return"attachments"===e.type?this._compileAttachments(e,t):"custom"===e.type?this._compileCustom(e,t):"fields"===e.type?this._compileFields(e,t):"media"===e.type?this._compileMedia(e,t):"text"===e.type?this._compileText(e,t):"expression"===e.type?this._compileExpression(e,t):void 0}_compileContent(e){if(this._destroyContentViewModels(),this.graphic)return Array.isArray(e)?e.filter(this._isAllowedContentType).map((e,t)=>this._compileContentElement(e,t)):"string"==typeof e?this._compileText(new Mi["a"]({text:e}),0).text:e}_destroyContentViewModels(){var e;null==(e=this._handles)||e.remove(en),this.contentViewModels.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("contentViewModels",[])}_setExpressionContentVM(e,t){const{formattedAttributes:r}=this,{contentElement:i,contentElementViewModel:n}=e,a=null==i?void 0:i.type;n&&a&&("fields"===a&&(this._createFieldsFormattedAttributes({contentElement:i,contentElementIndex:t,formattedAttributes:r}),n.set(this._createFieldsVMParams(i,t))),"media"===a&&(this._createMediaFormattedAttributes({contentElement:i,contentElementIndex:t,formattedAttributes:r}),n.set(this._createMediaVMParams(i,t))),"text"===a&&n.set(this._createTextVMParams(i)))}_compileExpression(e,t){const{expressionInfo:r}=e,{graphic:i,map:n,spatialReference:a,view:s}=this,o=new $i({expressionInfo:r,graphic:i,interceptor:Qi.interceptor,map:n,spatialReference:a,view:s});return this.contentViewModels[t]=o,this._handles.add(Object(Me["a"])(o,"contentElementViewModel",()=>this._setExpressionContentVM(o,t)),en),e}_compileAttachments(e,t){const{graphic:r}=this,{description:i,title:n}=e;return this.contentViewModels[t]=new ur({graphic:r,...this._compileTitleAndDesc({title:n,description:i})}),e}_compileCustom(e,t){const{graphic:r}=this,{creator:i,destroyer:n}=e;return this.contentViewModels[t]=new jr({graphic:r,creator:i,destroyer:n}),e}_compileTitleAndDesc({title:e,description:t}){const{_fieldInfoMap:r,_sourceLayer:i,graphic:n,formattedAttributes:a,_expressionAttributes:s}=this,{attributes:o}=n,c=a.global;return{title:ft({attributes:o,fieldInfoMap:r,globalAttributes:c,expressionAttributes:s,layer:i,text:e}),description:ft({attributes:o,fieldInfoMap:r,globalAttributes:c,expressionAttributes:s,layer:i,text:t})}}_createFieldsVMParams(e,t){const{_effectivePopupTemplate:r,formattedAttributes:i}=this,n={...i.global,...i.content[t]},a=(null==e?void 0:e.fieldInfos)||(null==r?void 0:r.fieldInfos),s=null==a?void 0:a.filter(({fieldName:e})=>at(e)||Ut(e)||n.hasOwnProperty(e)),o=null==r?void 0:r.expressionInfos,{description:c,title:l}=e;return{attributes:n,expressionInfos:o,fieldInfos:s,...this._compileTitleAndDesc({title:l,description:c})}}_compileFields(e,t){const r=e.clone(),i=new Rr(this._createFieldsVMParams(e,t));return this.contentViewModels[t]=i,r.fieldInfos=i.formattedFieldInfos.slice(0),r}_createMediaVMParams(e,t){const{abilities:r,graphic:i,_fieldInfoMap:n,formattedAttributes:a,_effectivePopupTemplate:s,relatedInfos:o,_sourceLayer:c,_expressionAttributes:l}=this,{attributes:u}=i,{description:d,mediaInfos:h,title:p}=e;return{abilities:{chartAnimation:r.chartAnimation},activeMediaInfoIndex:e.activeMediaInfoIndex||0,attributes:u,layer:c,fieldInfoMap:n,formattedAttributes:{...a.global,...a.content[t]},expressionAttributes:l,mediaInfos:h,popupTemplate:s,relatedInfos:o,...this._compileTitleAndDesc({title:p,description:d})}}_compileMedia(e,t){const r=e.clone(),i=new ci(this._createMediaVMParams(e,t));return r.mediaInfos=i.formattedMediaInfos.slice(0),this.contentViewModels[t]=i,r}_createTextVMParams(e){const{graphic:t,_fieldInfoMap:r,_sourceLayer:i,_expressionAttributes:n}=this;if(e&&e.text){const{attributes:a}=t,s=this.formattedAttributes.global;e.text=ft({attributes:a,fieldInfoMap:r,globalAttributes:s,expressionAttributes:n,layer:i,text:e.text})}return{graphic:t,creator:e.text}}_compileText(e,t){const r=e.clone();return this.contentViewModels[t]=new jr(this._createTextVMParams(r)),r}_compileLastEditInfo(){const{_effectivePopupTemplate:e,_sourceLayer:t,graphic:r}=this;if(!e)return;const{lastEditInfoEnabled:i}=e,n=null==t?void 0:t.editFieldsInfo;return i&&n?Ct(n,r.attributes):void 0}_compileTitle(e){const{_fieldInfoMap:t,_sourceLayer:r,graphic:i,_expressionAttributes:n}=this,{attributes:a}=i,s=this.formattedAttributes.global;return ft({attributes:a,fieldInfoMap:t,globalAttributes:s,expressionAttributes:n,layer:r,text:e})}async _getTitle(){const{_effectivePopupTemplate:e,graphic:t}=this,r=null==e?void 0:e.title;return it(r,{graphic:t})}async _getContent(){const{_effectivePopupTemplate:e,graphic:t}=this,r=null==e?void 0:e.content;return it(r,{graphic:t})}async _queryFeature(e){const{_featureAbortController:t,_sourceLayer:r,graphic:i,_effectivePopupTemplate:n,spatialReference:a,map:s,view:o}=this,{content:{value:c},title:{value:l}}=await Object(_["j"])({content:this._getContent(),title:this._getTitle()});if(t!==this._featureAbortController||!i)return;await kt({graphic:i,popupTemplate:n,layer:r,spatialReference:a},e);const{expressionAttributes:{value:u}}=await Object(_["j"])({checkForRelatedFeatures:this._checkForRelatedFeatures(e),expressionAttributes:Hi({expressionInfos:null==n?void 0:n.expressionInfos,spatialReference:a,graphic:i,map:s,interceptor:Qi.interceptor,view:o})});t===this._featureAbortController&&i&&(this._expressionAttributes=u,this._graphicExpressionAttributes={...i.attributes,...u},this._set("formattedAttributes",this._createFormattedAttributes(c)),this._set("title",this._compileTitle(l)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(c)||null))}_createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:r}){const{_effectivePopupTemplate:i,graphic:n,relatedInfos:a,_sourceLayer:s,_fieldInfoMap:o,_graphicExpressionAttributes:c}=this;r.content[t]=Lt({fieldInfos:null==i?void 0:i.fieldInfos,graphic:n,attributes:{...c,...e.attributes},layer:s,fieldInfoMap:o,relatedInfos:a})}_createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:r}){if(e.fieldInfos){const{graphic:i,relatedInfos:n,_sourceLayer:a,_fieldInfoMap:s,_graphicExpressionAttributes:o}=this;r.content[t]=Lt({fieldInfos:e.fieldInfos,graphic:i,attributes:{...o,...e.attributes},layer:a,fieldInfoMap:s,relatedInfos:n})}}_createFormattedAttributes(e){const{_effectivePopupTemplate:t,graphic:r,relatedInfos:i,_sourceLayer:n,_fieldInfoMap:a,_graphicExpressionAttributes:s}=this,o=null==t?void 0:t.fieldInfos,c={global:Lt({fieldInfos:o,graphic:r,attributes:s,layer:n,fieldInfoMap:a,relatedInfos:i}),content:[]};return Array.isArray(e)&&e.forEach((e,t)=>{"fields"===e.type&&this._createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:c}),"media"===e.type&&this._createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:c})}),c}_checkForRelatedFeatures(e){const{graphic:t,_effectivePopupTemplate:r}=this;return this._queryRelatedInfos(t,Mt(r),e)}async _queryRelatedInfos(e,t,r){const{relatedInfos:i,_sourceLayer:n}=this;i.clear();const a=Object(z["k"])(n.associatedLayer)?await n.associatedLayer.load(r):n;if(!a)return;const s=t.filter(e=>e&&Ut(e.fieldName));if(!s||!s.length)return;t.forEach(e=>this._configureRelatedInfo(e,a));const o=await ri({relatedInfos:i,layer:a},r);Object.keys(o).forEach(e=>{var t;const r=i.get(e.toString()),n=null==(t=o[e])?void 0:t.value;r&&n&&(r.layerInfo=n.data)});const c=await ii({graphic:e,relatedInfos:i,layer:a},r);Object.keys(c).forEach(e=>{var t;Jr(null==(t=c[e])?void 0:t.value,i.get(e.toString()))})}_configureRelatedInfo(e,t){const{relatedInfos:r}=this,i=Wr(e.fieldName);if(!i)return;const{layerId:n,fieldName:a}=i;if(!n)return;const s=r.get(n.toString())||Yr(n,t);s&&(ni({relatedInfo:s,fieldName:a,fieldInfo:e}),this.relatedInfos.set(n,s))}};an.interceptor=new Ji(qt,Wt),Object(l["a"])([Object(j["b"])()],an.prototype,"_error",void 0),Object(l["a"])([Object(j["b"])()],an.prototype,"_featureAbortController",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"_effectivePopupTemplate",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"_fieldInfoMap",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"_sourceLayer",null),Object(l["a"])([Object(j["b"])()],an.prototype,"abilities",void 0),Object(l["a"])([Object(B["a"])("abilities")],an.prototype,"castAbilities",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"content",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"contentViewModels",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],an.prototype,"defaultPopupTemplateEnabled",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"state",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"formattedAttributes",void 0),Object(l["a"])([Object(j["b"])({type:ie["a"],value:null})],an.prototype,"graphic",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"lastEditInfo",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"relatedInfos",void 0),Object(l["a"])([Object(j["b"])()],an.prototype,"spatialReference",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"title",void 0),Object(l["a"])([Object(j["b"])()],an.prototype,"map",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],an.prototype,"waitingForContent",null),Object(l["a"])([Object(j["b"])()],an.prototype,"view",void 0),an=Qi=Object(l["a"])([Object(x["a"])(tn)],an);const sn=an,on=e=>{let t=class extends e{constructor(){super(...arguments),this.renderNodeContent=e=>Object(wr["b"])(e)&&!e.destroyed?Object(ir["a"])("div",{key:e},e.render()):e instanceof HTMLElement?Object(ir["a"])("div",{key:e,bind:e,afterCreate:this._attachToNode}):Object(wr["a"])(e)?Object(ir["a"])("div",{key:e,bind:e.domNode,afterCreate:this._attachToNode}):null}_attachToNode(e){const t=this;e.appendChild(t)}};return t=Object(l["a"])([Object(x["a"])("esri.widgets.Feature.ContentMixin")],t),t};var cn=r("255d");const ln={iconText:"esri-icon-font-fallback-text",iconLoading:"esri-icon-loading-indicator esri-rotating",esriTable:"esri-widget__table",esriWidget:"esri-widget",base:"esri-feature",container:"esri-feature__size-container",title:"esri-feature__title",main:"esri-feature__main-container",btn:"esri-feature__button",icon:"esri-feature__icon",content:"esri-feature__content",contentElement:"esri-feature__content-element",text:"esri-feature__text",lastEditedInfo:"esri-feature__last-edited-info",fields:"esri-feature__fields",fieldHeader:"esri-feature__field-header",fieldData:"esri-feature__field-data",fieldDataDate:"esri-feature__field-data--date",loadingSpinnerContainer:"esri-feature__loading-container",spinner:"esri-feature__loading-spinner"},un={title:!0,content:!0,lastEditedInfo:!0};let dn=class extends(on(Ie["a"])){constructor(e,t){super(e,t),this._contentWidgets=[],this.graphic=null,this.defaultPopupTemplateEnabled=!1,this.headingLevel=2,this.label=void 0,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.spatialReference=null,this.title=null,this.visibleElements={...un},this.map=null,this.view=null,this.viewModel=new sn}initialize(){this.own(Object(Me["a"])(this,"viewModel.contentViewModels",()=>this._setupContentWidgets()))}loadDependencies(){return r.e("chunk-2d0c119c").then(r.bind(null,"4538"))}destroy(){this._destroyContentWidgets()}castVisibleElements(e){return{...un,...e}}render(){const{state:e}=this.viewModel,t=Object(ir["a"])("div",{class:ln.container,key:"container"},this.renderTitle(),"error"===e?this.renderError():"loading"===e?this.renderLoading():this.renderContentContainer());return Object(ir["a"])("div",{class:this.classes(ln.base,ln.esriWidget)},t)}setActiveMedia(e,t){this.viewModel.setActiveMedia(e,t)}nextMedia(e){this.viewModel.nextMedia(e)}previousMedia(e){this.viewModel.previousMedia(e)}renderError(){const{messagesCommon:e,messages:t,visibleElements:r}=this;return Object(ir["a"])("calcite-notice",{active:!0,color:"red",icon:"exclamation-mark-circle",scale:"s"},r.title?Object(ir["a"])("div",{key:"error-title",slot:"title"},e.errorMessage):null,Object(ir["a"])("div",{key:"error-message",slot:"message"},t.loadingError))}renderLoading(){return Object(ir["a"])("div",{key:"loading-container",class:ln.loadingSpinnerContainer},Object(ir["a"])("span",{class:this.classes(ln.iconLoading,ln.spinner)}))}renderContentContainer(){const{visibleElements:e}=this;return e.content?Object(ir["a"])("div",{class:ln.main},[this.renderContent(),this.renderLastEditInfo()]):null}renderTitle(){const{visibleElements:e,title:t}=this;return e.title?Object(ir["a"])(pr,{level:this.headingLevel,class:ln.title,innerHTML:t}):null}renderContent(){const e=this.viewModel.content,t="content";if(!e)return null;if(Array.isArray(e))return e.length?Object(ir["a"])("div",{key:t+"-content-elements"},e.map(this.renderContentElement,this)):null;if("string"==typeof e){const e=this._contentWidgets[0];return!e||e.destroyed?null:Object(ir["a"])("div",{key:t+"-content"},e.render())}return this.renderNodeContent(e)}renderContentElement(e,t){const{visibleElements:r}=this;if("boolean"!=typeof r.content&&!r.content[e.type])return null;switch(e.type){case"attachments":return this.renderAttachments(t);case"custom":return this.renderCustom(e,t);case"fields":return this.renderFields(t);case"media":return this.renderMedia(t);case"text":return this.renderText(e,t);case"expression":return this.renderExpression(t);default:return null}}renderAttachments(e){const t=this._contentWidgets[e];if(!t||t.destroyed)return null;const{state:r,attachmentInfos:i}=t.viewModel;return"loading"===r||i.length>0?Object(ir["a"])("div",{key:this._buildKey("attachments-element",e),class:this.classes(ln.contentElement)},t.render()):null}renderExpression(e){const t=this._contentWidgets[e];return!t||t.destroyed?null:Object(ir["a"])("div",{key:this._buildKey("expression-element",e),class:ln.contentElement},t.render())}renderCustom(e,t){const{creator:r}=e,i=this._contentWidgets[t];return!i||i.destroyed?null:r?Object(ir["a"])("div",{key:this._buildKey("custom-element",t),class:ln.contentElement},i.render()):null}renderFields(e){const t=this._contentWidgets[e];return!t||t.destroyed?null:Object(ir["a"])("div",{key:this._buildKey("fields-element",e),class:ln.contentElement},t.render())}renderMedia(e){const t=this._contentWidgets[e];return!t||t.destroyed?null:Object(ir["a"])("div",{key:this._buildKey("media-element",e),class:ln.contentElement},t.render())}renderLastEditInfo(){const{visibleElements:e,messages:t}=this,{lastEditInfo:r}=this.viewModel;if(!r||!e.lastEditedInfo)return null;const{date:i,user:n}=r,a="edit"===r.type?n?t.lastEditedByUser:t.lastEdited:n?t.lastCreatedByUser:t.lastCreated,s=Object(cn["a"])(a,{date:i,user:n});return Object(ir["a"])("div",{key:"edit-info-element",class:this.classes(ln.lastEditedInfo,ln.contentElement)},s)}renderText(e,t){const r=e.text,i=this._contentWidgets[t];return!i||i.destroyed?null:r?Object(ir["a"])("div",{key:this._buildKey("text-element",t),class:this.classes(ln.contentElement,ln.text)},i.render()):null}_buildKey(e,...t){return`${e}__${this.get("viewModel.graphic.uid")||"0"}-${t.join("-")}`}_destroyContentWidget(e){e&&(e.viewModel=null,!e.destroyed&&e.destroy())}_destroyContentWidgets(){this._contentWidgets.forEach(e=>this._destroyContentWidget(e)),this._contentWidgets=[]}_setupContentWidgets(){this._destroyContentWidgets();const{headingLevel:e,visibleElements:t}=this,r=this.get("viewModel.content"),{contentViewModels:i}=this.viewModel;if(Array.isArray(r))r.forEach((r,n)=>{"attachments"===r.type&&(this._contentWidgets[n]=new vr({displayType:r.displayType,headingLevel:t.title?e+1:e,viewModel:i[n]})),"fields"===r.type&&(this._contentWidgets[n]=new Nr({viewModel:i[n]})),"media"===r.type&&(this._contentWidgets[n]=new Ei({viewModel:i[n]})),"text"===r.type&&(this._contentWidgets[n]=new Sr({viewModel:i[n]})),"custom"===r.type&&(this._contentWidgets[n]=new Sr({viewModel:i[n]})),"expression"===r.type&&(this._contentWidgets[n]=new Yi({viewModel:i[n]}))},this);else{const e=i[0];e&&!e.destroyed&&(this._contentWidgets[0]=new Sr({viewModel:e}))}this.scheduleRender()}};Object(l["a"])([Object(Pe["a"])("viewModel.graphic")],dn.prototype,"graphic",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.defaultPopupTemplateEnabled")],dn.prototype,"defaultPopupTemplateEnabled",void 0),Object(l["a"])([Object(j["b"])()],dn.prototype,"headingLevel",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],dn.prototype,"label",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Feature/t9n/Feature")],dn.prototype,"messages",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/t9n/common")],dn.prototype,"messagesCommon",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/support/t9n/uriUtils")],dn.prototype,"messagesURIUtils",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.spatialReference")],dn.prototype,"spatialReference",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.title")],dn.prototype,"title",void 0),Object(l["a"])([Object(j["b"])()],dn.prototype,"visibleElements",void 0),Object(l["a"])([Object(B["a"])("visibleElements")],dn.prototype,"castVisibleElements",null),Object(l["a"])([Object(Pe["a"])("viewModel.map")],dn.prototype,"map",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],dn.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:sn})],dn.prototype,"viewModel",void 0),dn=Object(l["a"])([Object(x["a"])("esri.widgets.Feature")],dn);const hn=dn;let pn=class extends U["a"].EventedAccessor{constructor(e){super(e),this._anchorHandles=new ge["a"],this.location=null,this.screenLocation=null,this.screenLocationEnabled=!1,this.view=null,this._anchorHandles.add([Object(Me["e"])(this,["screenLocationEnabled","location","view.size","view.stationary"],()=>this._updateScreenPointAndHandle()),Object(Me["e"])(this,["view","view.ready"],()=>this._wireUpView())])}destroy(){this.view=null,this._anchorHandles&&this._anchorHandles.destroy(),this._anchorHandles=null,this._viewpointHandle=null}_wireUpView(){const e="view";if(this._anchorHandles.remove(e),this._viewpointHandle=null,!this.get("view.ready"))return;this._setScreenLocation();const{view:t}=this,r="3d"===t.type?"camera":"viewpoint",i=Object(Me["d"])(t,r,()=>this._viewpointChange());this._anchorHandles.add(i,e),this._viewpointHandle=i,this._toggleWatchingViewpoint()}_viewpointChange(){this._setScreenLocation(),this.emit("view-change")}_updateScreenPointAndHandle(){this._setScreenLocation(),this._toggleWatchingViewpoint()}_toggleWatchingViewpoint(){const{_viewpointHandle:e,location:t,screenLocationEnabled:r}=this;e&&(t&&r?e.resume():e.pause())}_setScreenLocation(){const{location:e,view:t,screenLocationEnabled:r}=this,i=this.get("view.ready"),n=r&&i&&Object(z["k"])(e)?t.toScreen(e):null;this._set("screenLocation",n)}};Object(l["a"])([Object(j["b"])()],pn.prototype,"location",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],pn.prototype,"screenLocation",void 0),Object(l["a"])([Object(j["b"])()],pn.prototype,"screenLocationEnabled",void 0),Object(l["a"])([Object(j["b"])()],pn.prototype,"view",void 0),pn=Object(l["a"])([Object(x["a"])("esri.widgets.support.AnchorElementViewModel")],pn);const fn=pn,bn="esri.widgets.CompassViewModel";let mn=class extends fn{constructor(e){super(e),this.visible=!1}};Object(l["a"])([Object(j["b"])()],mn.prototype,"visible",void 0),mn=Object(l["a"])([Object(x["a"])(bn)],mn);const gn=mn,yn={base:"esri-spinner",spinnerStart:"esri-spinner--start",spinnerFinish:"esri-spinner--finish"};let On=class extends Ie["a"]{constructor(e,t){super(e,t),this._animationDelay=500,this._animationPromise=null,this.location=null,this.view=null,this.viewModel=new gn,this.visible=!1}initialize(){this.own([Object(Me["e"])(this,"visible",e=>this._visibleChange(e))])}destroy(){this._animationPromise=null}show(e){const{location:t,promise:r}=e;t&&(this.viewModel.location=t),this.visible=!0;const i=()=>this.hide();r&&r.catch(()=>{}).then(i)}hide(){this.visible=!1}render(){const{visible:e}=this,{screenLocation:t}=this.viewModel,r=!!t,i=e&&r,n=!e&&r,a={[yn.spinnerStart]:i,[yn.spinnerFinish]:n},s=this._getPositionStyles();return Object(ir["a"])("div",{class:this.classes(yn.base,a),styles:s})}_visibleChange(e){if(e)return void(this.viewModel.screenLocationEnabled=!0);const t=Object(_["a"])(this._animationDelay);this._animationPromise=t,t.catch(()=>{}).then(()=>{this._animationPromise===t&&(this.viewModel.screenLocationEnabled=!1,this._animationPromise=null)})}_getPositionStyles(){const{screenLocation:e,view:t}=this.viewModel;if(!t||Object(z["j"])(e))return{};const{padding:r}=t;return{left:e.x-r.left+"px",top:e.y-r.top+"px"}}};Object(l["a"])([Object(Pe["a"])("viewModel.location")],On.prototype,"location",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],On.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:gn})],On.prototype,"viewModel",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.visible")],On.prototype,"visible",void 0),On=Object(l["a"])([Object(x["a"])("esri.widgets.Spinner")],On);const vn=On;r("e06a"),r("1fd7");var _n=r("9786"),jn=r("a6a3"),wn=r("5986"),xn=r("77eb"),Tn=r("ceaf"),Sn=(r("2003"),r("ac8e"));function En(e){return e&&"opacity"in e?e.opacity*En(e.parent):1}async function An(e,t){var i,n;if(!e)return;const a=e.sourceLayer,s=null!=(i=Object(z["k"])(t)&&null!=(n=t.useSourceLayer)&&n?a:e.layer)?i:a,o=En(s);if(Object(z["k"])(e.symbol)&&(!Object(z["k"])(t)||!0!==t.ignoreGraphicSymbol)){const r="web-style"===e.symbol.type?await e.symbol.fetchSymbol(Object(z["k"])(t)?t.abortOptions:null):e.symbol.clone();return Object(Sn["a"])(r,null,o),r}const c=Object(z["k"])(t)&&t.renderer||s&&"renderer"in s&&s.renderer;let l=c&&"getSymbolAsync"in c?await c.getSymbolAsync(e,t):null;if(!l)return;if(l="web-style"===l.type?await l.fetchSymbol(Object(z["k"])(t)?t.abortOptions:null):l.clone(),!("visualVariables"in c)||!c.visualVariables||!c.visualVariables.length)return Object(Sn["a"])(l,null,o),l;if("arcadeRequiredForVisualVariables"in c&&c.arcadeRequiredForVisualVariables&&(Object(z["j"])(t)||Object(z["j"])(t.arcade))){const e={...Object(z["t"])(t)};e.arcade=await Object(Ge["e"])(),t=e}const u=await Promise.resolve().then(r.bind(null,"d297")),d=[],h=[],p=[],f=[];for(const r of c.visualVariables)switch(r.type){case"color":d.push(r);break;case"opacity":h.push(r);break;case"rotation":f.push(r);break;case"size":r.target||p.push(r)}const b=!!d.length&&d[d.length-1],m=b?u.getColor(b,e,t):null,g=!!h.length&&h[h.length-1];let y=g?u.getOpacity(g,e,t):null;if(null!=o&&(y=null!=y?y*o:o),Object(Sn["a"])(l,m,y),p.length){const r=u.getAllSizes(p,e,t);await Object(Sn["d"])(l,r)}for(const r of f)Object(Sn["c"])(l,u.getRotationAngle(r,e,t),r.axis);return l}var Cn=r("2589"),Rn=r("5e70");const Mn={iconZoom:"esri-icon-zoom-in-magnifying-glass",iconTrash:"esri-icon-trash",iconBrowseClusteredFeatures:"esri-icon-table"},Pn=new xn["a"]({id:"zoom-to-feature",title:"{messages.zoom}",className:Mn.iconZoom}),In=new xn["a"]({id:"remove-selected-feature",title:"{messages.remove}",className:Mn.iconTrash}),Dn=new xn["a"]({id:"zoom-to-clustered-features",title:"{messages.zoom}",className:Mn.iconZoom}),Ln=new xn["a"]({id:"browse-clustered-features",title:"{messages.browseClusteredFeatures}",className:Mn.iconBrowseClusteredFeatures}),Nn="esri.widgets.Popup.PopupViewModel",Fn=v["a"].getLogger(Nn),kn=function(e){const{event:t,view:r}=e,{action:i}=t,n=r&&r.popup;if(!i)return Promise.reject(new b["a"]("trigger-action:missing-arguments","Event has no action"));if(!n)return Promise.reject(new b["a"]("trigger-action:missing-arguments","view.popup is missing"));const{disabled:a,id:s}=i;if(!s)return Promise.reject(new b["a"]("trigger-action:invalid-action","action.id is missing"));if(a)return Promise.reject(new b["a"]("trigger-action:invalid-action","Action is disabled"));if(s===Pn.id)return Bn(n.viewModel).catch(_["w"]);if(s===Dn.id)return Vn(n.viewModel);if(s===Ln.id)return n.featureMenuOpen=!n.featureMenuOpen,n.viewModel.browseClusterEnabled=!n.viewModel.browseClusterEnabled,Promise.resolve();if(n.viewModel.browseClusterEnabled=!1,s===In.id){n.close();const{selectedFeature:e}=n;if(!e)return Promise.reject(new b["a"]("trigger-action:"+In.id,"selectedFeature is required",{selectedFeature:e}));const{sourceLayer:t}=e;return t?t.remove(e):r.graphics.remove(e),Promise.resolve()}return Promise.resolve()};function Un(e){const{selectedFeature:t,location:r,view:i}=e;return i?"3d"===i.type?t||r:e.get("selectedFeature.geometry")||r:null}function zn(e,t){if("3d"!==(null==t?void 0:t.type)||!e||"esri.Graphic"!==e.declaredClass)return!0;const r=t.getViewForGraphic(e);if(r&&"whenGraphicBounds"in r){let t=!1;return r.whenGraphicBounds(e,{useViewElevation:!0}).then(e=>{t=!e||!e.boundingBox||e.boundingBox[0]===e.boundingBox[3]&&e.boundingBox[1]===e.boundingBox[4]&&e.boundingBox[2]===e.boundingBox[5]}).catch(()=>{const t=new b["a"]("zoom-to:invalid-graphic","Could not zoom to the location of the graphic.",{graphic:e});Fn.error(t)}),t}return!0}async function Bn(e){const{location:t,selectedFeature:r,view:i,zoomFactor:n}=e,a=Un(e);if(!a){const e=new b["a"]("zoom-to:invalid-target-or-view","Cannot zoom to location without a target and view.",{target:a,view:i});return Fn.error(e),Promise.reject(e)}const s=i.scale/n,o=e.get("selectedFeature.geometry")||t,c=o&&"point"===o.type&&zn(r,i);Pn.active=!0,Pn.disabled=!0;try{await e.view.goTo({target:a,scale:c?s:void 0})}finally{Pn.active=!1,Pn.disabled=!1,e.zoomToLocation=null,c&&(e.location=o)}}async function Vn(e){const{selectedFeature:t,view:r}=e;if("2d"!==(null==r?void 0:r.type)){const e=new b["a"]("zoomToCluster:invalid-view","View must be 2d MapView.",{view:r});throw Fn.error(e),e}if(!t.isAggregate){const e=new b["a"]("zoomToCluster:invalid-selectedFeature","Selected feature must represent an aggregate/cluster graphic.",{selectedFeature:t});throw Fn.error(e),e}const i=t.sourceLayer,n=await r.whenLayerView(i),a=n.createQuery();a.aggregateIds=[t.getObjectId()],Dn.active=!0,Dn.disabled=!0;const{extent:s}=await n.queryExtent(a);await r.goTo({target:s}),Dn.active=!1,Dn.disabled=!1}async function Gn(e){const{selectedFeature:t,view:r}=e;if("2d"!==(null==r?void 0:r.type)){const e=new b["a"]("displayClusterExtent:invalid-view","View must be 2d MapView.",{view:r});throw Fn.error(e),e}if(!t.isAggregate){const e=new b["a"]("zoomToCluster:invalid-selectedFeature","Selected feature must represent an aggregate/cluster graphic.",{selectedFeature:t});throw Fn.error(e),e}const i=t.sourceLayer,n=await r.whenLayerView(i),a=n.createQuery();a.aggregateIds=[t.getObjectId()];const{extent:s}=await n.queryExtent(a);e.selectedClusterBoundaryFeature.geometry=s,r.graphics.add(e.selectedClusterBoundaryFeature)}async function Hn(e){const{selectedFeature:t,view:r}=e;if("2d"!==(null==r?void 0:r.type)){const e=new b["a"]("browseAggregateFeatures:invalid-view","View must be 2d MapView.",{view:r});throw Fn.error(e),e}if(!t.isAggregate){const e=new b["a"]("browseAggregateFeatures:invalid-selectedFeature","Selected feature must represent an aggregate/cluster graphic.",{selectedFeature:t});throw Fn.error(e),e}const i=t.sourceLayer,n=await r.whenLayerView(i),a=n.createQuery();a.aggregateIds=[t.getObjectId()],Ln.active=!0,Ln.disabled=!0;const{features:s}=await n.queryFeatures(a);Ln.active=!1,Ln.disabled=!1,r.popup.open({features:[t].concat(s),featureMenuOpen:!0})}function qn(e){var t;null!=(t=e.selectedFeature)&&t.isAggregate&&(e.features=e.features.filter(e=>e.isAggregate))}const Wn=e=>{let t=class extends e{constructor(...e){super(...e),this.goToOverride=null,this.view=null}callGoTo(e){const{view:t}=this;return this.goToOverride?this.goToOverride(t,e):t.goTo(e.target,e.options)}};return Object(l["a"])([Object(j["b"])()],t.prototype,"goToOverride",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"view",void 0),t=Object(l["a"])([Object(x["a"])("esri.widgets.support.GoTo")],t),t};var $n=r("0d76");const Zn=h["a"].ofType({key:"type",defaultKeyValue:"button",base:wn["a"],typeMap:{button:xn["a"],toggle:Tn["a"]}}),Xn=()=>[Pn.clone()],Yn=()=>[Dn.clone(),Ln.clone()],Jn="esri.widgets.Popup.PopupViewModel",Qn=v["a"].getLogger(Jn);let Kn=class extends(Wn(fn)){constructor(e){super(e),this._handles=new ge["a"],this._pendingPromises=new Set,this._fetchFeaturesController=null,this._selectedClusterFeature=null,this.featurePage=null,this.actions=new Zn,this.defaultPopupTemplateEnabled=!1,this.autoCloseEnabled=!1,this.autoOpenEnabled=!0,this.browseClusterEnabled=!1,this.content=null,this.featuresPerPage=20,this.featureViewModelAbilities=null,this.featureViewModels=[],this.highlightEnabled=!0,this.includeDefaultActions=!0,this.selectedClusterBoundaryFeature=new ie["a"]({symbol:new $n["a"]({outline:{width:1.5,color:"cyan"},style:"none"})}),this.title=null,this.updateLocationEnabled=!1,this.view=null,this.visible=!1,this.zoomFactor=4,this.zoomToLocation=null}get isLoadingFeature(){return this.featureViewModels.some(e=>e.waitingForContent)}initialize(){this._handles.add([Object(Me["a"])(this,["autoOpenEnabled","view"],()=>this._autoOpenEnabledChange()),this.on("view-change",()=>this._autoClose()),Object(Me["e"])(this,["highlightEnabled","selectedFeature","visible","view"],()=>this._highlightFeature()),Object(Me["e"])(this,"view.animation.state",e=>this._animationStateChange(e)),Object(Me["e"])(this,"location",e=>this._locationChange(e)),Object(Me["e"])(this,"selectedFeature",e=>this._selectedFeatureChange(e)),Object(Me["e"])(this,["selectedFeatureIndex","featureCount","featuresPerPage"],()=>this._selectedFeatureIndexChange()),Object(Me["e"])(this,["featurePage","selectedFeatureIndex","featureCount","featuresPerPage, featureViewModels"],()=>this._setGraphicOnFeatureViewModels()),Object(Me["e"])(this,"featureViewModels",()=>this._featureViewModelsChange()),this.on("trigger-action",e=>kn({event:e,view:this.view})),Object(Me["g"])(this,"waitingForResult",()=>this._waitingForResultChange(),!0),Object(Me["e"])(this,["features","view","view.map","view.spatialReference"],()=>this._updateFeatureVMs()),Object(Me["e"])(this,["view.scale"],this._viewScaleChange),Object(Me["g"])(this,"visible",()=>this.browseClusterEnabled=!1),Object(Me["e"])(this,"browseClusterEnabled",e=>e?this.enableClusterBrowsing():this.disableClusterBrowsing())])}destroy(){this._cancelFetchingFeatures(),this._handles.destroy(),this._handles=null,this._pendingPromises.clear(),this.browseClusterEnabled=!1,this.view=null}get active(){return!(!this.visible||this.waitingForResult)}get allActions(){const e=this._get("allActions")||new Zn;e.removeAll();const{actions:t,defaultActions:r,defaultPopupTemplateEnabled:i,includeDefaultActions:n,selectedFeature:a}=this,s=n?r.concat(t):t,o=a&&("function"==typeof a.getEffectivePopupTemplate&&a.getEffectivePopupTemplate(i)||a.popupTemplate),c=o&&o.actions,l=o&&o.overwriteActions?c:c?c.concat(s):s;return l&&l.filter(Boolean).forEach(t=>e.add(t)),e}get defaultActions(){var e;const t=this._get("defaultActions")||new Zn;return t.removeAll(),t.addMany(null!=(e=this.selectedFeature)&&e.isAggregate?Yn():Xn()),t}get featureCount(){return this.features.length}get features(){return this._get("features")||[]}set features(e){const t=e||[];this._set("features",t);const{pendingPromisesCount:r,promiseCount:i,selectedFeatureIndex:n}=this,a=i&&t.length;a&&r&&-1===n?this.selectedFeatureIndex=0:a&&-1!==n||(this.selectedFeatureIndex=t.length?0:-1)}get location(){return this._get("location")||null}set location(e){const t=this.get("view.spatialReference.isWebMercator");e&&e.get("spatialReference.isWGS84")&&t&&(e=Object(_n["b"])(e)),this._set("location",e)}get pendingPromisesCount(){return this._pendingPromises.size}get waitingForResult(){return!(!(this._fetchFeaturesController||this.pendingPromisesCount>0)||0!==this.featureCount)}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){if(this._pendingPromises.clear(),this.features=[],!Array.isArray(e)||!e.length)return this._set("promises",[]),void this.notifyChange("pendingPromisesCount");this._set("promises",e),(e=e.slice(0)).forEach(e=>{this._pendingPromises.add(e);const t=t=>{this._pendingPromises.has(e)&&this._updateFeatures(t),this._updatePendingPromises(e)},r=()=>this._updatePendingPromises(e);e.then(t,r)}),this.notifyChange("pendingPromisesCount")}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;return-1===t?null:e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;e=isNaN(e)||e<-1||!t?-1:(e+t)%t,this._set("selectedFeatureIndex",e)}get selectedFeatureViewModel(){return this.featureViewModels[this.selectedFeatureIndex]||null}get state(){return this.get("view.ready")?"ready":"disabled"}centerAtLocation(){const{view:e}=this,t=Un(this);if(!t){const r=new b["a"]("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e});return Qn.error(r),Promise.reject(r)}return this.callGoTo({target:{target:t,scale:e.scale}})}clear(){this.set({promises:[],features:[],content:null,title:null,location:null})}fetchFeatures(e,t){const{view:r}=this;if(!r||!e){const t=new b["a"]("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:r});return Qn.error(t),Promise.reject(t)}return r.fetchPopupFeatures(e,{event:t&&t.event,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t&&t.signal})}open(e){const t={updateLocationEnabled:!1,promises:[],fetchFeatures:!1,...e,visible:!0},{fetchFeatures:r}=t;delete t.fetchFeatures,r&&this._setFetchFeaturesPromises(t.location);const i=["actionsMenuOpen","collapsed","featureMenuOpen"];for(const n of i)delete t[n];this.set(t)}triggerAction(e){const t=this.allActions.getItemAt(e);t&&!t.disabled&&this.emit("trigger-action",{action:t})}next(){return this.selectedFeatureIndex=this.selectedFeatureIndex+1,this}previous(){return this.selectedFeatureIndex=this.selectedFeatureIndex-1,this}disableClusterBrowsing(){qn(this),this._clearBrowsedClusterGraphics()}async enableClusterBrowsing(){await Gn(this),await Hn(this)}_animationStateChange(e){this.zoomToLocation||(Pn.disabled="waiting-for-target"===e)}_clearBrowsedClusterGraphics(){var e;const t=null==(e=this.view)?void 0:e.graphics;t&&(t.remove(this.selectedClusterBoundaryFeature),t.remove(this._selectedClusterFeature)),this._selectedClusterFeature=null,this.selectedClusterBoundaryFeature.geometry=null}_viewScaleChange(){var e;if(null!=(e=this.selectedFeature)&&e.isAggregate)return this.browseClusterEnabled=!1,this.visible=!1,void this.clear();this.browseClusterEnabled&&(this.browseClusterEnabled=!1,this.features=[this.selectedFeature])}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:r}=this;r&&e&&(!t||t.geometry)&&this.centerAtLocation()}_selectedFeatureIndexChange(){this.featurePage=this.featureCount>1?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null}_featureViewModelsChange(){this.featurePage=this.featureCount>1?1:null}_setGraphicOnFeatureViewModels(){const{features:e,featureCount:t,featurePage:r,featuresPerPage:i,featureViewModels:n}=this;if(null===r)return;const a=((r-1)*i+t)%t,s=a+i;n.slice(a,s).forEach((t,r)=>{t&&!t.graphic&&(t.graphic=e[a+r])})}async _selectedFeatureChange(e){if(!e)return;const{location:t,updateLocationEnabled:r,view:i}=this;if(this.browseClusterEnabled){if(this._selectedClusterFeature&&(i.graphics.remove(this._selectedClusterFeature),this._selectedClusterFeature=null),e.isAggregate)return;return e.symbol=await An(e),this._selectedClusterFeature=e,void i.graphics.add(this._selectedClusterFeature)}!r&&t||!e.geometry?r&&!e.geometry&&this.centerAtLocation().then(()=>{this.location=i.center.clone()}):this.location=Object(z["t"])(this._getPointFromGeometry(e.geometry))}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.visible=!1)}_setFetchFeaturesPromises(e){return this._fetchFeaturesWithController(this._getScreenPoint(e||this.location)).then(e=>{const{clientOnlyGraphics:t,promisesPerLayerView:r}=e,i=Promise.resolve(t),n=r.map(e=>e.promise);this.promises=[i,...n]})}_destroyFeatureVMs(){this.featureViewModels.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureViewModels",[])}_updateFeatureVMs(){const{selectedFeature:e,features:t,featureViewModels:r}=this;if(null!=e&&e.isAggregate||(this.browseClusterEnabled=!1),this._destroyFeatureVMs(),!t||!t.length)return;const i=r.slice(0),n=[];t.forEach((t,r)=>{if(!t)return;let a=null;if(i.some((e,r)=>(e&&e.graphic===t&&(a=e,i.splice(r,1)),!!a)),a)n[r]=a;else{var s,o;const i=new sn({abilities:this.featureViewModelAbilities,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:null==(s=this.view)?void 0:s.spatialReference,graphic:t===e?t:null,map:null==(o=this.view)?void 0:o.map,view:this.view});n[r]=i}}),i.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureViewModels",n)}_getScreenPoint(e){const{view:t}=this;return t&&e&&"function"==typeof t.toScreen?t.toScreen(e):null}_autoOpenEnabledChange(){const e="auto-fetch-features",{_handles:t,autoOpenEnabled:r}=this;if(t.remove(e),r&&this.view){const r=this.view.on("click",e=>{"mouse"===e.pointerType&&0!==e.button||this._fetchFeaturesAndOpen(e)},Cn["b"].WIDGET);t.add(r,e)}}_cancelFetchingFeatures(){const e=this._fetchFeaturesController;e&&e.abort(),this._fetchFeaturesController=null,this.notifyChange("waitingForResult")}_fetchFeaturesWithController(e,t){this._cancelFetchingFeatures();const r=new AbortController,{signal:i}=r;this._fetchFeaturesController=r,this.notifyChange("waitingForResult");const n=this.fetchFeatures(e,{signal:i,event:t});return n.catch(()=>{}).then(()=>{this._fetchFeaturesController=null,this.notifyChange("waitingForResult")}),n}_fetchFeaturesAndOpen(e){const{screenPoint:t,mapPoint:r}=e,{view:i}=this;this._fetchFeaturesWithController(t,e).then(e=>{const{clientOnlyGraphics:t,promisesPerLayerView:n,location:a}=e,s=[Promise.resolve(t),...n.map(e=>e.promise)];return i.popup.open({location:a||r,promises:s}),e})}_updatePendingPromises(e){e&&this._pendingPromises.has(e)&&(this._pendingPromises.delete(e),this.notifyChange("pendingPromisesCount"))}_autoClose(){this.autoCloseEnabled&&(this.visible=!1)}_getPointFromGeometry(e){return Object(z["j"])(e)?null:"point"===e.type?e:"extent"===e.type?e.center:"polygon"===e.type?e.centroid:"multipoint"===e.type||"polyline"===e.type?e.extent.center:null}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}async _highlightFeature(){const e="highlight";this._handles.remove(e);const{selectedFeature:t,highlightEnabled:r,view:i,visible:n}=this;if(!(t&&i&&r&&n))return;let{layer:a,sourceLayer:s}=t;if("map-notes"!==(null==s?void 0:s.type)&&"subtype-group"!==(null==s?void 0:s.type)||(a=s),!(a&&a instanceof jn["a"]))return;const o=this._getLayerView(i,a);this._highlightPromise=o;const c=await o;if(!(c&&Object(Rn["b"])(c)&&this._highlightPromise===o&&this.selectedFeature&&this.highlightEnabled&&this.visible))return;const l="imagery"===a.type?void 0:"objectIdField"in a&&a.objectIdField,u=t.attributes,d=u&&l&&u[l],h=c.highlight(d||t);this._handles.add(h,e)}_updateFeatures(e){const{features:t}=this;if(!e||!e.length)return;if(!t.length)return void(this.features=e);const r=e.filter(e=>-1===t.indexOf(e));this.features=t.concat(r)}};Object(l["a"])([Object(j["b"])()],Kn.prototype,"featurePage",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"isLoadingFeature",null),Object(l["a"])([Object(j["b"])({type:Zn})],Kn.prototype,"actions",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"active",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"allActions",null),Object(l["a"])([Object(j["b"])({type:Boolean})],Kn.prototype,"defaultPopupTemplateEnabled",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"autoCloseEnabled",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"autoOpenEnabled",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"browseClusterEnabled",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"content",void 0),Object(l["a"])([Object(j["b"])({type:Zn,readOnly:!0})],Kn.prototype,"defaultActions",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"featureCount",null),Object(l["a"])([Object(j["b"])()],Kn.prototype,"features",null),Object(l["a"])([Object(j["b"])()],Kn.prototype,"featuresPerPage",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"featureViewModelAbilities",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"featureViewModels",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"highlightEnabled",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"includeDefaultActions",void 0),Object(l["a"])([Object(j["b"])({type:he["a"]})],Kn.prototype,"location",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"pendingPromisesCount",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"selectedClusterBoundaryFeature",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"waitingForResult",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"promiseCount",null),Object(l["a"])([Object(j["b"])()],Kn.prototype,"promises",null),Object(l["a"])([Object(j["b"])({value:null,readOnly:!0})],Kn.prototype,"selectedFeature",null),Object(l["a"])([Object(j["b"])({value:-1})],Kn.prototype,"selectedFeatureIndex",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"selectedFeatureViewModel",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Kn.prototype,"state",null),Object(l["a"])([Object(j["b"])()],Kn.prototype,"title",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"updateLocationEnabled",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"view",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"visible",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"zoomFactor",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"zoomToLocation",void 0),Object(l["a"])([Object(j["b"])()],Kn.prototype,"centerAtLocation",null),Kn=Object(l["a"])([Object(x["a"])(Jn)],Kn);const ea=Kn;var ta=r("8750"),ra=r("feab");const ia="selected-index",na=0,aa="popup-spinner",sa={iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconDockToTop:"esri-icon-maximize",iconDockToBottom:"esri-icon-dock-bottom",iconDockToLeft:"esri-icon-dock-left",iconDockToRight:"esri-icon-dock-right",iconClose:"esri-icon-close",iconUndock:"esri-icon-minimize",iconCheckMark:"esri-icon-check-mark",iconLoading:"esri-icon-loading-indicator",iconDefaultAction:"esri-icon-default-action",iconActionsMenu:"esri-icon-handle-horizontal",rotating:"esri-rotating",base:"esri-popup",widget:"esri-widget",main:"esri-popup__main-container",loadingContainer:"esri-popup__loading-container",isCollapsible:"esri-popup--is-collapsible",isCollapsed:"esri-popup--is-collapsed",shadow:"esri-popup--shadow",isDocked:"esri-popup--is-docked",isDockedTopLeft:"esri-popup--is-docked-top-left",isDockedTopCenter:"esri-popup--is-docked-top-center",isDockedTopRight:"esri-popup--is-docked-top-right",isDockedBottomLeft:"esri-popup--is-docked-bottom-left",isDockedBottomCenter:"esri-popup--is-docked-bottom-center",isDockedBottomRight:"esri-popup--is-docked-bottom-right",alignTopCenter:"esri-popup--aligned-top-center",alignBottomCenter:"esri-popup--aligned-bottom-center",alignTopLeft:"esri-popup--aligned-top-left",alignBottomLeft:"esri-popup--aligned-bottom-left",alignTopRight:"esri-popup--aligned-top-right",alignBottomRight:"esri-popup--aligned-bottom-right",isFeatureMenuOpen:"esri-popup--feature-menu-open",isActionsMenuOpen:"esri-popup--actions-menu-open",hasFeatureUpdated:"esri-popup--feature-updated",header:"esri-popup__header",headerButtons:"esri-popup__header-buttons",headerContainer:"esri-popup__header-container",headerContainerButton:"esri-popup__header-container--button",headerTitle:"esri-popup__header-title",content:"esri-popup__content",footer:"esri-popup__footer",footerHasPagination:"esri-popup__footer--has-pagination",footerHasActions:"esri-popup__footer--has-actions",footerHasActionsMenu:"esri-popup__footer--has-actions-menu",button:"esri-popup__button",buttonDisabled:"esri-popup__button--disabled",buttonDock:"esri-popup__button--dock",icon:"esri-popup__icon",iconDock:"esri-popup__icon--dock-icon",inlineActionsContainer:"esri-popup__inline-actions-container",actionsMenuButton:"esri-popup__actions-menu-button",actions:"esri-popup__actions",action:"esri-popup__action",actionImage:"esri-popup__action-image",actionText:"esri-popup__action-text",actionToggle:"esri-popup__action-toggle",actionToggleOn:"esri-popup__action-toggle--on",pointer:"esri-popup__pointer",pointerDirection:"esri-popup__pointer-direction",navigation:"esri-popup__navigation",paginationPrevious:"esri-popup__pagination-previous",paginationNext:"esri-popup__pagination-next",paginationPreviousIconLTR:"esri-popup__pagination-previous-icon",paginationPreviousIconRTL:"esri-popup__pagination-previous-icon--rtl",paginationNextIconLTR:"esri-popup__pagination-next-icon",paginationNextIconRTL:"esri-popup__pagination-next-icon--rtl",featureMenu:"esri-popup__feature-menu",featureMenuList:"esri-popup__feature-menu-list",featureMenuItem:"esri-popup__feature-menu-item",featureMenuViewport:"esri-popup__feature-menu-viewport",featureMenuHeader:"esri-popup__feature-menu-header",featureMenuNote:"esri-popup__feature-menu-note",featureMenuSelected:"esri-popup__feature-menu-item--selected",featureMenuButton:"esri-popup__feature-menu-button",featureMenuTitle:"esri-popup__feature-menu-title",featureMenuObserver:"esri-popup__feature-menu-observer",featureMenuLoader:"esri-popup__feature-menu-loader",collapseButton:"esri-popup__collapse-button"},oa={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},ca="esri-popup";function la(e,t){return void 0===t?`${ca}__${e}`:`${ca}__${e}-${t}`}const ua="esri.widgets.Popup",da=v["a"].getLogger(ua),ha={closeButton:!0,featureNavigation:!0};let pa=class extends(on(Ie["a"])){constructor(e,t){super(e,t),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new ge["a"],this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverCallback=([e])=>{null!=e&&e.isIntersecting&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=Object(Re["a"])(()=>this._displaySpinner(),na),this.actions=null,this.alignment="auto",this.autoCloseEnabled=null,this.autoOpenEnabled=null,this.defaultPopupTemplateEnabled=null,this.content=null,this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.featureCount=null,this.featureMenuOpen=!1,this.features=null,this.goToOverride=null,this.headingLevel=2,this.highlightEnabled=null,this.location=null,this.label=void 0,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.promises=null,this.selectedFeature=null,this.selectedFeatureIndex=null,this.spinnerEnabled=!0,this.title=null,this.updateLocationEnabled=null,this.view=null,this.viewModel=new ea,this.visible=null,this.visibleElements={...ha},this._addSelectedFeatureIndexHandle(),this.own([Object(Me["e"])(this,"viewModel.screenLocation",()=>this._positionContainer()),Object(Me["e"])(this,["viewModel.active","dockEnabled"],()=>this._toggleScreenLocationEnabled()),Object(Me["e"])(this,"viewModel.screenLocation",(e,t)=>{!!e!=!!t&&this.reposition()}),Object(Me["e"])(this,["viewModel.view.padding","viewModel.view.size","viewModel.active","viewModel.location","alignment"],()=>this.reposition()),Object(Me["e"])(this,"spinnerEnabled",e=>this._spinnerEnabledChange(e)),Object(Me["e"])(this,"viewModel.view.size",(e,t)=>this._updateDockEnabledForViewSize(e,t)),Object(Me["e"])(this,"viewModel.view",(e,t)=>this._viewChange(e,t)),Object(Me["e"])(this,"viewModel.view.ready",(e,t)=>this._viewReadyChange(e,t)),Object(Me["e"])(this,["viewModel.waitingForResult","viewModel.location"],()=>{this._hideSpinner(),this._displaySpinnerThrottled()}),Object(Me["e"])(this,["selectedFeatureWidget.viewModel.title","selectedFeatureWidget.viewModel.state"],()=>this._setTitleFromFeatureWidget()),Object(Me["e"])(this,["selectedFeatureWidget.viewModel.content","selectedFeatureWidget.viewModel.state"],()=>this._setContentFromFeatureWidget()),Object(Me["g"])(this,"collapsed",()=>{var e,t;"xsmall"===(null==(e=this.viewModel)||null==(t=e.view)?void 0:t.widthBreakpoint)&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()}),Object(Me["b"])(this,"viewModel.allActions","change",()=>this._watchActions()),Object(Me["a"])(this,"viewModel.allActions",()=>this._watchActions()),Object(Me["e"])(this,"viewModel.featureViewModels",()=>this._featureMenuViewportScrollTop())])}destroy(){var e,t;this._destroySelectedFeatureWidget(),this._destroySpinner(),null==(e=this._handles)||e.destroy(),this._unobserveFeatureMenuObserver(),null==(t=this._featureMenuIntersectionObserver)||t.disconnect(),this._handles=null}get actionsMenuId(){return this.id+"-actions-menu"}get actionsMenuButtonId(){return this.id+"-actions-menu-button"}get featureMenuId(){return this.id+"-feature-menu"}get titleId(){return this.id+"-popup-title"}get contentId(){return this.id+"-popup-content"}get hasContent(){var e,t,r,i,n,a,s;return!!(this.selectedFeatureWidget?(null==(e=this.selectedFeatureWidget)||null==(t=e.viewModel)?void 0:t.waitingForContent)||"error"===(null==(r=this.selectedFeatureWidget)||null==(i=r.viewModel)?void 0:i.state)||(null==(n=this.selectedFeatureWidget)||null==(a=n.viewModel)?void 0:a.content):null==(s=this.viewModel)?void 0:s.content)}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||oa}set dockOptions(e){const t={...oa},r=this.get("viewModel.view.breakpoints"),i={};r&&(i.width=r.xsmall,i.height=r.xsmall);const n={...t,...e},a={...t.breakpoint,...i},{breakpoint:s}=n;!0===s?n.breakpoint=a:"object"==typeof s&&(n.breakpoint={...a,...s}),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:r}=this,{selectedFeatureViewModel:i}=this.viewModel,n={...t,title:!1};return i?(e?(e.viewModel=i,e.visibleElements=n):this._feature=new hn({headingLevel:r+1,viewModel:i,visibleElements:n}),this._feature):null}castVisibleElements(e){return{...ha,...e}}blur(){const{active:e}=this.viewModel;e||da.warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||da.warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){var t,r;this._handles.remove(ia);const i=!!e&&!!e.featureMenuOpen,n=!!e&&!!e.actionsMenuOpen,a={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:n,featureMenuOpen:i};"xsmall"===(null==(t=this.viewModel)||null==(r=t.view)?void 0:r.widthBreakpoint)&&(a.collapsed=!0),this.set(a),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){this.viewModel.triggerAction(e)}render(){var e,t,r,i;const{actionsMenuOpen:n,dockEnabled:a,featureMenuVisible:s,dividedActions:o,currentAlignment:c,currentDockPosition:l}=this,{active:u}=this.viewModel,{menuActions:d}=o,h=u&&d.length>1&&n,p=u&&a,f=u&&!a,b=null==(e=this.selectedFeature)||null==(t=e.layer)?void 0:t.title,m=null==(r=this.selectedFeature)||null==(i=r.layer)?void 0:i.id,g={[sa.alignTopCenter]:"top-center"===c,[sa.alignBottomCenter]:"bottom-center"===c,[sa.alignTopLeft]:"top-left"===c,[sa.alignBottomLeft]:"bottom-left"===c,[sa.alignTopRight]:"top-right"===c,[sa.alignBottomRight]:"bottom-right"===c,[sa.isDocked]:p,[sa.shadow]:f,[sa.isDockedTopLeft]:"top-left"===l,[sa.isDockedTopCenter]:"top-center"===l,[sa.isDockedTopRight]:"top-right"===l,[sa.isDockedBottomLeft]:"bottom-left"===l,[sa.isDockedBottomCenter]:"bottom-center"===l,[sa.isDockedBottomRight]:"bottom-right"===l,[sa.isFeatureMenuOpen]:s,[sa.isActionsMenuOpen]:h};return Object(ir["a"])("div",{class:this.classes(sa.base,g),role:"presentation","data-layer-title":b,"data-layer-id":m,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},u?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(sa.icon,sa.iconLoading,sa.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?Object(ir["a"])("div",{key:la("loading-container"),role:"presentation",class:sa.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousIcon(){const e=Object(tr["e"])(this.container),t={[sa.iconRightTriangleArrow]:e,[sa.paginationPreviousIconRTL]:e,[sa.iconLeftTriangleArrow]:!e,[sa.paginationPreviousIconLTR]:!e};return Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(sa.icon,t)})}renderPreviousButton(){const{messages:e}=this;return Object(ir["a"])("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(sa.button,sa.paginationPrevious),"aria-label":e.previous,title:e.previous},this.renderPreviousIcon())}renderNextIcon(){const e=Object(tr["e"])(this.container),t={[sa.iconLeftTriangleArrow]:e,[sa.paginationNextIconRTL]:e,[sa.iconRightTriangleArrow]:!e,[sa.paginationNextIconLTR]:!e};return Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(sa.icon,t)})}renderNextButton(){const{messages:e}=this;return Object(ir["a"])("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(sa.button,sa.paginationNext),"aria-label":e.next,title:e.next},this.renderNextIcon())}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:r}=this,{featureCount:i,selectedFeatureIndex:n}=this.viewModel;return Object(ir["a"])("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:this.classes(sa.button,sa.featureMenuButton),"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":r.menu,title:r.menu},this._getPageText(i,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton(),this.renderNextButton()]:null}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),r={[sa.iconUndock]:e,[sa.iconDock]:!e,[sa.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[sa.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[sa.iconDockToTop]:!e&&"top-center"===t,[sa.iconDockToBottom]:!e&&"bottom-center"===t};return Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(r,sa.icon)})}renderDockButton(){var e,t,r;const{dockEnabled:i,messages:n}=this,a=null==(e=this.viewModel)||null==(t=e.view)?void 0:t.widthBreakpoint,s=i?n.undock:n.dock;return"xsmall"!==a&&null!=(r=this.dockOptions)&&r.buttonEnabled?Object(ir["a"])("div",{role:"button","aria-label":s,title:s,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(sa.button,sa.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:r,contentCollapsed:i,messagesCommon:n}=this,a={[sa.headerContainerButton]:r},s=Object(ir["a"])(pr,{level:this.headingLevel,class:sa.headerTitle,innerHTML:e}),o=r?Object(ir["a"])("button",{key:e+"--collapsible",id:t,title:i?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(sa.headerContainer,a),"aria-expanded":i?"false":"true",onclick:this._toggleCollapsed,type:"button"},s):Object(ir["a"])("div",{key:e,id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(sa.headerContainer,a)},s);return e?o:null}renderCloseIcon(){return Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(sa.icon,sa.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?Object(ir["a"])("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:sa.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return Object(ir["a"])("header",{class:sa.header},this.renderTitle(),Object(ir["a"])("div",{class:sa.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:r}=this,{content:i}=this.viewModel;return t&&!r?Object(ir["a"])("article",{key:i,enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:sa.content},this.renderContent()):null}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:r,dividedActions:i,messagesCommon:n}=this,a=r?n.close:n.open,{menuActions:s}=i;return s.length?Object(ir["a"])("div",{key:la("actions-menu-button"),class:this.classes(sa.button,sa.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":r?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":a,title:a},Object(ir["a"])("span",{"aria-hidden":"true",class:sa.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:r,dividedActions:i}=this,{menuActions:n}=i;return n.length&&r?Object(ir["a"])("ul",{id:e,role:"menu","aria-labelledby":t,key:la("actions"),class:sa.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map(e=>this.renderAction({action:e,type:"menu-item"}))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return!!e.length&&e.toArray().map(e=>this.renderAction({action:e,type:"inline"}))}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,r=!!e.length,i=!!t.length;return r||i?Object(ir["a"])("div",{key:"inline-actions-container","data-inline-actions":r.toString(),"data-menu-actions":i.toString(),class:sa.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?Object(ir["a"])("section",{key:la("navigation"),class:this.classes(sa.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:r,menuActions:i}=t,n=!!r.length,a=!!i.length,s={[sa.footerHasPagination]:e,[sa.footerHasActions]:n,[sa.footerHasActionsMenu]:a};return e||n?Object(ir["a"])("div",{key:la("feature-buttons"),class:this.classes(sa.footer,s)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:r}=this.viewModel,i=Object(cn["a"])(e.selectedFeatures,{total:t.length});return Object(ir["a"])("section",{key:la("menu"),class:sa.featureMenu},Object(ir["a"])("strong",{class:sa.featureMenuHeader},i),Object(ir["a"])("nav",{bind:this,class:sa.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:tr["g"]},this.renderFeatureMenu(),Object(ir["a"])("div",{class:sa.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),r?Object(ir["a"])("div",{class:sa.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:Object(ir["a"])("div",{key:la("pointer"),class:sa.pointer,role:"presentation"},Object(ir["a"])("div",{class:this.classes(sa.pointerDirection,sa.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:r,titleId:i,contentId:n,collapsible:a,hasContent:s,contentCollapsed:o,visibleElements:c}=this,{title:l}=this.viewModel,u="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===r||"top-center"===r||"top-right"===r,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===r||"bottom-center"===r||"bottom-right"===r,h={[sa.shadow]:e,[sa.isCollapsible]:a,[sa.isCollapsed]:o};return Object(ir["a"])("div",{class:this.classes(sa.main,sa.widget,h),tabIndex:c.closeButton?null:-1,role:"dialog","aria-labelledby":l?i:"","aria-describedby":s&&!o?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},u?this.renderFooter():null,u?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){var e;const t=null==(e=this.viewModel)?void 0:e.content;return t?"string"==typeof t?Object(ir["a"])("div",{key:t,innerHTML:t}):this.renderNodeContent(t):null}renderActionText(e){return Object(ir["a"])("span",{key:"text",class:sa.actionText},e)}renderActionIcon(e){const t=this._getActionClass(e),r=this._getActionImage(e),i={[sa.iconLoading]:e.active,[sa.rotating]:e.active,[sa.icon]:!!t,[sa.actionImage]:!e.active&&!!r};return t&&(i[t]=!e.active),Object(ir["a"])("span",{key:"icon","aria-hidden":"true",class:this.classes(sa.icon,i),styles:this._getIconStyles(r)})}renderAction(e){const{action:t,type:r}=e,i=this._getActionTitle(t),n={[sa.action]:"toggle"!==t.type,[sa.actionToggle]:"toggle"===t.type,[sa.actionToggleOn]:"toggle"===t.type&&t.value,[sa.buttonDisabled]:t.disabled},a=[this.renderActionIcon(t),this.renderActionText(i)],s="menu-item"===r?Object(ir["a"])("li",{key:t.uid,role:"menuitem",tabIndex:0,title:i,"aria-label":i,class:this.classes(sa.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},a):Object(ir["a"])("div",{key:t.uid,role:"button",tabIndex:0,title:i,"aria-label":i,class:this.classes(sa.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},a);return t.visible?s:null}renderFeatureMenuItem(e,t){const{messages:r,messagesCommon:i}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:a}=this.viewModel,s=e===a,o={[sa.featureMenuSelected]:s},c=s?Object(ir["a"])("span",{key:la("feature-menu-selected-feature-"+n),title:r.selectedFeature,"aria-label":r.selectedFeature,class:sa.iconCheckMark}):null,l=Object(ir["a"])("span",{innerHTML:e.title||i.untitled});return Object(ir["a"])("li",{role:"menuitem",tabIndex:-1,key:la("feature-menu-feature-"+n),class:this.classes(o,sa.featureMenuItem),bind:this,"data-feature-index":t,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature},Object(ir["a"])("span",{class:sa.featureMenuTitle},l,c))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?Object(ir["a"])("ol",{class:sa.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter(e=>!!e.graphic).map((e,t)=>this.renderFeatureMenuItem(e,t))):null}_getActionTitle(e){const{messages:t,selectedFeature:r,messagesCommon:i}=this,{id:n}=e,a=null==r?void 0:r.attributes,s="zoom-to-feature"===n?Object(cn["a"])(e.title,{messages:t}):"remove-selected-feature"===n?Object(cn["a"])(e.title,{messages:i}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?Object(cn["a"])(e.title,{messages:t}):e.title;return s&&a?Object(cn["a"])(s,a):s}_getActionClass(e){const{selectedFeature:t}=this,r=null==t?void 0:t.attributes,{className:i,image:n}=e,a=n||i?i:sa.iconDefaultAction;return a&&r?Object(cn["a"])(a,r):a}_getActionImage(e){const{selectedFeature:t}=this,r=null==t?void 0:t.attributes,{image:i}=e;return i&&r?Object(cn["a"])(i,r):i}_createFeatureUpdatedAnimation(){return Object(tr["b"])("enter",sa.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const r=Math.round(e);return Math.max(t?r-1:r,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach(e=>{this._handles.add(Object(Me["e"])(e,["uid","active","className","disabled","id","title","image","visible"],()=>this.scheduleRender()),t)})}_divideActions(){const{allActions:e}=this.viewModel,t=e.filter(e=>e.visible),r=this._getInlineActionCount(),i=null===r,n=0===r;return{inlineActions:i?t.slice(0):n?new h["a"]:t.slice(0,r),menuActions:i?new h["a"]:n?t.slice(0):t.slice(r)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;var r,i;e&&(this.viewModel.title="error"===(null==(r=e.viewModel)?void 0:r.state)?t.errorMessage:(null==(i=e.viewModel)?void 0:i.title)||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===Object(Ce["a"])(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===Object(Ce["a"])(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_handleFeatureMenuItemKeyup(e){const t=Object(Ce["a"])(e),{_featureMenuNode:r}=this,i=e.currentTarget["data-feature-index"];if(!r)return;const n=r.querySelectorAll("li"),a=n.length;"ArrowUp"!==t?"ArrowDown"!==t?"Home"!==t?"End"!==t||(e.stopPropagation(),n[n.length-1].focus()):(e.stopPropagation(),n[0].focus()):(e.stopPropagation(),n[(i+1+a)%a].focus()):(e.stopPropagation(),n[(i-1+a)%a].focus())}_handleActionMenuItemKeyup(e){const t=Object(Ce["a"])(e),{_actionsMenuNode:r}=this,i=e.currentTarget.dataset.actionUid,{menuActions:n}=this.dividedActions,a=n.findIndex(e=>e.uid===i);if(!r)return;const s=r.querySelectorAll("li"),o=s.length;"ArrowUp"!==t?"ArrowDown"!==t?"Home"!==t?"End"!==t||(e.stopPropagation(),s[s.length-1].focus()):(e.stopPropagation(),s[0].focus()):(e.stopPropagation(),s[(a+1+o)%o].focus()):(e.stopPropagation(),s[(a-1+o)%o].focus())}_handleMainKeyup(e){const t=Object(Ce["a"])(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:r}=this.viewModel;r?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e.shouldFocus&&(await Object(oe["g"])(()=>{var e;return!0===(null==(e=this.viewModel)?void 0:e.active)}),this.focus())}_addSelectedFeatureIndexHandle(){const e=Object(Me["e"])(this,"viewModel.selectedFeatureIndex",(e,t)=>this._selectedFeatureIndexUpdated(e,t));this._handles.add(e,ia)}_selectedFeatureIndexUpdated(e,t){const{featureCount:r}=this;r&&e!==t&&-1!==e&&(this.actionsMenuOpen=!1,this.featureMenuOpen=!1)}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:r,screenLocation:i,side:n,view:a}=e;if(isNaN(r)||isNaN(t)||!a||!i)return!1;const s=a.padding;return"right"===n&&i.x+r/2>a.width-s.right||"left"===n&&i.x-r/2<s.left||"top"===n&&i.y-t<s.top||"bottom"===n&&i.y+t>a.height-s.bottom}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:r,_mainContainerNode:i,viewModel:n}=this,{screenLocation:a,view:s}=n;if(Object(z["j"])(a)||!s||!r)return"top-center";if(!this._isScreenLocationWithinView(a,s))return this._get("currentAlignment")||"top-center";function o(e){return parseInt(e.replace(/[^-\d\.]/g,""),10)}const c=i?window.getComputedStyle(i,null):null,l=c?o(c.getPropertyValue("max-height")):0,u=c?o(c.getPropertyValue("height")):0,{height:d,width:h}=r.getBoundingClientRect(),p=h+t,f=Math.max(d,l,u)+t,b=this._isOutsideView({popupHeight:f,popupWidth:p,screenLocation:a,side:"right",view:s}),m=this._isOutsideView({popupHeight:f,popupWidth:p,screenLocation:a,side:"left",view:s}),g=this._isOutsideView({popupHeight:f,popupWidth:p,screenLocation:a,side:"top",view:s}),y=this._isOutsideView({popupHeight:f,popupWidth:p,screenLocation:a,side:"bottom",view:s});return m?g?"bottom-right":"top-right":b?g?"bottom-left":"top-left":g?y?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return Object(tr["e"])(this.container)&&t.reverse(),e.replace(/leading/gi,t[0]).replace(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){var e;return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(null==(e=this.dockOptions)?void 0:e.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){var t;if("auto"!==e)return e;const r=null==(t=this.viewModel)?void 0:t.view,i=Object(tr["e"])(this.container)?"top-left":"top-right";if(!r)return i;const n=r.padding||{left:0,right:0,top:0,bottom:0},a=r.width-n.left-n.right,{breakpoints:s}=r;return s&&a<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!e)return;const{screenLocation:t}=this.viewModel,{width:r}=e.getBoundingClientRect(),i=this._calculatePositionStyle(t,r);i&&(e.style.top=i.top,e.style.left=i.left,e.style.bottom=i.bottom,e.style.right=i.right)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:r}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+r:e}_calculateAlignmentPosition(e,t,r,i){const{currentAlignment:n,_pointerOffsetInPx:a}=this,s=i/2,o=r.height-t,c=r.width-e,{padding:l}=this.view;return"bottom-center"===n?{top:t+a-l.top,left:e-s-l.left}:"top-left"===n?{bottom:o+a-l.bottom,right:c+a-l.right}:"bottom-left"===n?{top:t+a-l.top,right:c+a-l.right}:"top-right"===n?{bottom:o+a-l.bottom,left:e+a-l.left}:"bottom-right"===n?{top:t+a-l.top,left:e+a-l.left}:"top-center"===n?{bottom:o+a-l.bottom,left:e-s-l.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:r,view:i}=this;if(!i)return;if(r)return{left:"",top:"",right:"",bottom:""};if(Object(z["j"])(e)||!t)return;const n=this._calculateFullWidth(t),a=this._calculateAlignmentPosition(e.x,e.y,i,n);return a?{top:void 0!==a.top?a.top+"px":"auto",left:void 0!==a.left?a.left+"px":"auto",bottom:void 0!==a.bottom?a.bottom+"px":"auto",right:void 0!==a.right?a.right+"px":"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,r){const[i,n]=e,[a,s]=t,{width:o,height:c}=r;return i<=o&&a>o||i>o&&a<=o||n<=c&&s>c||n>c&&s<=c}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const r=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},i=r.left+r.right,n=r.top+r.bottom,a=[],s=[];a[0]=e[0]-i,a[1]=e[1]-n,s[0]=t[0]-i,s[1]=t[1]-n;const{dockOptions:o}=this,c=o.breakpoint;this._dockingThresholdCrossed(a,s,c)&&this._setDockEnabledForViewSize(o),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");t.length&&t[0].focus()}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");t.length&&t[0].focus()}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const r=t.active&&!e;t.screenLocationEnabled=r}_shouldDockAtCurrentViewSize(e){var t,r;const i=e.breakpoint,n=null==(t=this.viewModel)||null==(r=t.view)?void 0:r.ui;if(!n)return!1;const{width:a,height:s}=n;if(isNaN(a)||isNaN(s))return!1;const o=i.hasOwnProperty("width")&&a<=i.width,c=i.hasOwnProperty("height")&&s<=i.height;return o||c}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?Object(cn["a"])(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t&&t.ui&&t.ui.remove(this._spinner,aa),e.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new vn({view:e}),e.ui.add(this._spinner,{key:aa,position:"manual"}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:r}=this.viewModel,i=r.findIndex(e=>e.uid===t),n=r.getItemAt(i);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(i)}_selectFeature(e){const t=e.currentTarget["data-feature-index"];isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"actionsMenuId",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"actionsMenuButtonId",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"featureMenuId",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"titleId",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"contentId",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"hasContent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"featureNavigationVisible",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"collapsible",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"featureMenuVisible",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"contentCollapsed",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"dividedActions",null),Object(l["a"])([Object(Pe["a"])("viewModel.actions")],pa.prototype,"actions",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"actionsMenuOpen",null),Object(l["a"])([Object(j["b"])()],pa.prototype,"alignment",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.autoCloseEnabled")],pa.prototype,"autoCloseEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.autoOpenEnabled")],pa.prototype,"autoOpenEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.defaultPopupTemplateEnabled")],pa.prototype,"defaultPopupTemplateEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.content")],pa.prototype,"content",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"collapsed",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"collapseEnabled",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"currentAlignment",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"currentDockPosition",null),Object(l["a"])([Object(j["b"])()],pa.prototype,"dockOptions",null),Object(l["a"])([Object(j["b"])()],pa.prototype,"dockEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.featureCount")],pa.prototype,"featureCount",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"featureMenuOpen",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.features")],pa.prototype,"features",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.goToOverride")],pa.prototype,"goToOverride",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"headingLevel",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.highlightEnabled")],pa.prototype,"highlightEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.location")],pa.prototype,"location",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],pa.prototype,"label",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"maxInlineActions",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Popup/t9n/Popup")],pa.prototype,"messages",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/t9n/common")],pa.prototype,"messagesCommon",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.promises")],pa.prototype,"promises",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.selectedFeature")],pa.prototype,"selectedFeature",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.selectedFeatureIndex")],pa.prototype,"selectedFeatureIndex",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],pa.prototype,"selectedFeatureWidget",null),Object(l["a"])([Object(j["b"])()],pa.prototype,"spinnerEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.title")],pa.prototype,"title",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.updateLocationEnabled")],pa.prototype,"updateLocationEnabled",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],pa.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:ea}),Object(ra["a"])(["triggerAction","trigger-action"])],pa.prototype,"viewModel",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.visible")],pa.prototype,"visible",void 0),Object(l["a"])([Object(j["b"])()],pa.prototype,"visibleElements",void 0),Object(l["a"])([Object(B["a"])("visibleElements")],pa.prototype,"castVisibleElements",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_close",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_toggleDockEnabled",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_toggleFeatureMenu",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_toggleActionsMenu",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_triggerAction",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_selectFeature",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_next",null),Object(l["a"])([Object(ta["a"])()],pa.prototype,"_previous",null),pa=Object(l["a"])([Object(x["a"])(ua)],pa);const fa=pa,ba=[0,0];function ma(e){const t=(e.ownerDocument||window.document).defaultView,r=e.getBoundingClientRect();return ba[0]=r.left+t.pageXOffset,ba[1]=r.top+t.pageYOffset,ba}function ga(e){e&&(Object(we["b"])(e),e.parentNode&&e.parentNode.removeChild(e))}function ya(e){const t=document.createElement("div");return e.appendChild(t),t}const Oa=16,va=750,_a=512,ja=2,wa=e=>{let t=class extends e{constructor(...e){super(...e),this._freqInfo={freq:Oa,time:va},this._overlayRenderTaskHandle=null,this.height=0,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.ui=null,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.handles.add([this.watch("cursor",e=>{const t=this.surface;t&&t.setAttribute("data-cursor",e)}),this.watch("interacting",e=>{const t=this.surface;t&&t.setAttribute("data-interacting",e.toString())})])}initialize(){this.handles.add(this.watch("ui",(e,t)=>this._handleUIChange(e,t))),this._wireUI(this.ui),this.handles.add([this.on("focus",()=>this.notifyChange("focused")),this.on("blur",()=>this.notifyChange("focused"))])}destroy(){this.destroyed||(this.ui&&(this.ui.destroy(),this.ui=null),this.popup&&!this.popup.destroyed&&this.popup.destroy(),this.container=null)}set container(e){const t=this._get("container");if(t===e)return;const r="dom-size";if(this.handles.remove(r),this._stopMeasuring(),t&&(t.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay.destroy(),this._set("overlay",null),ga(this.root),this._set("root",null),Object(we["d"])(this.userContent,t),ga(this.userContent),this._set("userContent",null)),e){e.classList.add("esri-view");const t=document.createElement("div");t.className="esri-view-user-storage",Object(we["d"])(e,t),e.appendChild(t),this._set("userContent",t);const i=document.createElement("div");i.className="esri-view-root",e.insertBefore(i,e.firstChild),this._set("root",i);const n=document.createElement("div");n.className="esri-view-surface",n.setAttribute("role","application"),n.tabIndex=0,i.appendChild(n),this._set("surface",n);const a=new Ae;i.appendChild(a.surface),this._set("overlay",a),a.watch("needsRender",e=>{e&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=Object(xe["a"])({render:()=>{this.overlay.render()}}):this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null)}),this.forceDOMReadyCycle(),this.handles.add(Object(oe["e"])(()=>this.size,e=>{const[t,r]=e,i="esri-view-surface--inset-outline";t>=document.body.clientWidth||r>=document.body.clientHeight?n.classList.add(i):n.classList.remove(i)},oe["a"]),r),this._set("container",e),this._startMeasuring()}else this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),this._set("container",null)}get focused(){const e=document.activeElement===this.surface;return document.hasFocus()&&e}get popup(){return this._get("popup")||new fa({view:this})}set popup(e){const t=this._get("popup");t&&t!==e&&t.destroy(),this._set("popup",e)}get size(){return[this.width,this.height]}blur(){this.surface&&this.surface.blur()}focus(){this.surface&&this.surface.focus()}pageToContainer(e,t,r){const i=this.position;return e-=i[0],t-=i[1],r?(r[0]=e,r[1]=t):r=[e,t],r}containerToPage(e,t,r){const i=this.position;return e+=i[0],t+=i[1],r?(r[0]=e,r[1]=t):r=[e,t],r}_handleUIChange(e,t){t&&(this.handles.remove("ui"),t.destroy()),e&&this._wireUI(e),this._set("ui",e)}_wireUI(e){this.handles.remove("ui"),e&&(e.view=this,this.handles.add([Object(oe["e"])(()=>this.root,t=>{e.container=t?ya(t):null},oe["a"]),Object(oe["e"])(()=>this.popup,(t,r)=>{const i="popup",n="manual";r&&e.remove(r,i),t&&(t.view=e.view,e.add(t,{key:i,position:n}))},oe["a"])],"ui"))}_stopMeasuring(){this.handles.remove("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const e=this._freqInfo;e.freq=Oa,e.time=va,this.handles.add([(()=>{const t=()=>{e.freq=Oa,e.time=va};return window.addEventListener("resize",t),{remove(){window.removeEventListener("resize",t)}}})(),Object(xe["a"])({prepare:e=>{const t=this._measure(),r=this._freqInfo;if(r.time+=e.deltaTime,t&&(r.freq=Oa,this._get("resizing")||this._set("resizing",!0)),r.time<r.freq)return;r.time=0;const i=this._position();r.freq=i||t?Oa:Math.min(va,r.freq*ja),!t&&r.freq>=_a&&this._get("resizing")&&this._set("resizing",!1)}})],"measuring"),this._measure(),this._position()}_measure(){const e=this.container,t=e?e.clientWidth:0,r=e?e.clientHeight:0;if(0===t||0===r)return this.suspended||this._set("suspended",!0),!1;const i=this.width,n=this.height;return t===i&&r===n?(this.suspended&&this._set("suspended",!1),!1):(this._set("width",t),this._set("height",r),this.suspended&&this._set("suspended",!1),this.emit("resize",{oldWidth:i,oldHeight:n,width:t,height:r}),!0)}_position(){const e=this.container,t=this.position,r=ma(e);return(!t||r[0]!==t[0]||r[1]!==t[1])&&(this._set("position",[r[0],r[1]]),!0)}forceDOMReadyCycle(){}};return Object(l["a"])([Object(j["b"])({value:null,cast:e=>Object(we["a"])(e)})],t.prototype,"container",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"focused",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"height",void 0),Object(l["a"])([Object(j["b"])({type:fa})],t.prototype,"popup",null),Object(l["a"])([Object(j["b"])({type:Ae})],t.prototype,"overlay",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"position",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"resizing",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"root",void 0),Object(l["a"])([Object(j["b"])({value:null,readOnly:!0})],t.prototype,"size",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"surface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"suspended",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"ui",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"userContent",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"width",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"widthBreakpoint",void 0),t=Object(l["a"])([Object(x["a"])("esri.views.DOMContainer")],t),t};const xa=e=>{let t=class extends e{async fetchPopupFeatures(e,t){await this.when();const{location:r,queryArea:i,layerViewsAndGraphics:n,clientOnlyGraphics:a}=await this._prepareFetchPopupFeatures(e,t),s=Promise.resolve(a),o=this._queryLayerPopupFeatures(i,n,t),c=o.map(e=>e.promise);return{location:r,clientOnlyGraphics:a,allGraphicsPromise:Object(_["k"])([s,...c]).then(e=>Array.from(new Set(e.flat()))),promisesPerLayerView:o}}_queryLayerPopupFeatures(e,t,r){return t.map(({layerView:t,graphics:i})=>{const n={clientGraphics:i,event:Object(z["k"])(r)?r.event:null,signal:Object(z["k"])(r)?r.signal:null,defaultPopupTemplateEnabled:!!Object(z["k"])(r)&&!!r.defaultPopupTemplateEnabled},a=t.fetchPopupFeatures(e,n);return{layerView:t,promise:a}})}_isValidPopupGraphic(e,t){return e&&!!e.getEffectivePopupTemplate(Object(z["k"])(t)&&t.defaultPopupTemplateEnabled)}async _prepareFetchPopupFeatures(e,t){const{clientGraphics:r,queryArea:i,location:n}=await this._popupHitTestGraphics(e,t),a=this._getFetchPopupLayerViews(),{layerViewsAndGraphics:s,clientOnlyGraphics:o}=this._graphicsPerFetchPopupLayerView(r,a);return{clientOnlyGraphics:o,layerViewsAndGraphics:s,queryArea:i,location:n}}async _popupHitTestGraphics(e,t){const{results:r,mapPoint:i}=await this.popupHitTest(e),n=r.filter(e=>this._isValidPopupGraphic(e.graphic,t)),a=n.length?n[0].mapPoint:null;return{clientGraphics:n.map(e=>e.graphic),queryArea:i,location:i||a}}_getFetchPopupLayerViews(){const e=[];return this.allLayerViews.forEach(t=>{this._isValidPopupLayerView(t)&&e.push(t)}),Object(z["k"])(this.graphicsView)&&this._isValidPopupLayerView(this.graphicsView)&&e.push(this.graphicsView),e.reverse()}_isValidPopupLayerView(e){return Object(z["k"])(e)&&(!("layer"in e)||!e.suspended)&&"fetchPopupFeatures"in e}_graphicsPerFetchPopupLayerView(e,t){const r=[],i=new Map,n=t.map(e=>{const t=[];return"layer"in e?i.set(e.layer,t):i.set(e.graphics,t),{layerView:e,graphics:t}});for(const a of e){const e=i.get(a.layer)||i.get(a.sourceLayer)||null;e?e.push(a):r.push(a)}return{layerViewsAndGraphics:n,clientOnlyGraphics:r}}};return t=Object(l["a"])([Object(x["a"])("esri.views.PopupView")],t),t};var Ta=r("658b"),Sa=r("c649"),Ea=r("fab3"),Aa=r("44e6"),Ca=r("e64d");const Ra=v["a"].getLogger("esri.support.AnalysesCollection");let Ma=class extends Aa["a"]{constructor(e){super(e),this.handles.add(this.on("before-add",e=>{Object(z["j"])(e.item)||e.item.parent===this.owner&&(Ra.warn("Analysis inside the collection must be unique. Not adding this element again."),e.preventDefault())}))}_own(e){e.parent=this.owner}_release(e){e.parent=null}};Ma=Object(l["a"])([Object(x["a"])("esri.support.AnalysesCollection")],Ma);var Pa=r("f626");let Ia=class extends F["a"]{constructor(e){super(e),this.view=null,this.baseLayerViews=new h["a"],this.referenceLayerViews=new h["a"],this._loadingHandle=Object(Me["a"])(this,"view.map.basemap",e=>{e&&e.load().catch(()=>{})})}destroy(){this._set("view",null),this._loadingHandle&&(this._loadingHandle.remove(),this._loadingHandle=null)}get suspended(){return!this.view||this.view.suspended}get updating(){var e,t;if(this.view&&this.view.suspended)return!1;const r=null==(e=this.view)||null==(t=e.map)?void 0:t.basemap;return!!r&&!!r.loaded&&(this.baseLayerViews.some(e=>e.updating)||this.referenceLayerViews.some(e=>e.updating))}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ia.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ia.prototype,"baseLayerViews",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ia.prototype,"referenceLayerViews",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ia.prototype,"suspended",null),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],Ia.prototype,"updating",null),Ia=Object(l["a"])([Object(x["a"])("esri.views.BasemapView")],Ia);var Da=r("28eb");const La=v["a"].getLogger("esri.views.LayerViewManager");class Na{constructor(e,t,r){this.layer=e,this.view=t,this.layerViewImporter=r,this._controller=new AbortController,this._deferred=Object(_["f"])(),this._started=!1,this.done=!1,Object(_["q"])(this._controller.signal,()=>{const t=new b["a"]("cancelled:layerview-create","layerview creation cancelled",{layer:e});this._deferred.reject(t)})}get promise(){return this._deferred.promise}destroy(){this._controller.abort();const{layerView:e}=this;if(!e)return;const{layer:t,view:r}=this;t.emit("layerview-destroy",{view:r,layerView:e}),r.emit("layerview-destroy",{layer:t,layerView:e}),this.done=!0,this.layer=null,this.layerView=null,this.view=null,this.layerViewImporter=null}async start(){if(this._started)return;this._started=!0;const{_controller:{signal:e},layer:t,view:r}=this;this._map=r.map;try{var i,n;let s,o;if(await t.load({signal:e}),"prefetchResources"in t&&await t.prefetchResources({signal:e}),t.createLayerView)s=await t.createLayerView(r,{signal:e});else{if(!this.layerViewImporter.hasLayerViewModule(t))throw new b["a"]("layer:view-not-supported","No layerview implementation was found");const i=await this.layerViewImporter.importLayerView(t);Object(_["v"])(e),s="default"in i?new i.default({layer:t,view:r}):new i({layer:t,view:r})}const c=()=>{o=Object(z["s"])(o),s.destroyed||s.destroy(),s.layer=null,s.parent=null,s.view=null,this.done=!0};o=Object(_["q"])(e,c),Object(_["v"])(e);try{await s.when()}catch(a){throw c(),a}if(!(null==(i=this._map)||null==(n=i.allLayers)?void 0:n.includes(t)))return c(),void this._deferred.reject(new b["a"]("view:no-layerview-for-layer","The layer has been removed from the map",{layer:t}));this.layerView=s,t.emit("layerview-create",{view:r,layerView:s}),r.emit("layerview-create",{layer:t,layerView:s}),this.done=!0,this._deferred.resolve(s)}catch(a){t.emit("layerview-create-error",{view:r,error:a}),r.emit("layerview-create-error",{layer:t,error:a}),this.done=!0,this._deferred.reject(new b["a"]("layerview:create-error","layerview creation failed",{layer:t,error:a}))}}}let Fa=class extends Le["a"]{constructor(e){super(e),this._layerLayerViewInfoMap=new Map,this._watchUpdatingTracking=new Se["a"],this.supportsGround=!0,this._preloadLayerViewModules=()=>{var e;const t=null==(e=this.view.map)?void 0:e.allLayers;if(t)for(const r of t)this.layerViewImporter.hasLayerViewModule(r)&&this.layerViewImporter.importLayerView(r)},this._reschedule=()=>(Object(z["j"])(this._workPromise)&&(this._workPromise=Object(_["f"])()),this.handles.remove("reschedule"),this.handles.add(Object(xe["b"])(this._doWork),"reschedule"),this._workPromise.promise),this._doWork=()=>{var e,t,r;const i=this.view.map;if(this._map!==i&&(this.clear(),this._map=i),Object(z["j"])(this._workPromise))return void this.notifyChange("updating");this.handles.remove("reschedule"),this.handles.remove("collection-change");const n=new k["a"]({getCollections:()=>this._rootCollectionNames.map(e=>this.get(e)),getChildrenFunction:e=>e&&"layers"in e?e.layers:null});if(!n)return this._workPromise.resolve(),void(this._workPromise=null);for(const o of n)this._createLayerView(o);this._refreshCollections();for(const[o,c]of this._layerLayerViewInfoMap)n.includes(o)||(this._layerLayerViewInfoMap.delete(c.layer),c.destroy());const a=n.filter(e=>"group"===e.type).map(e=>e.layers),s=[null==i||null==(e=i.ground)?void 0:e.layers,null==i||null==(t=i.basemap)?void 0:t.baseLayers,null==i||null==(r=i.basemap)?void 0:r.referenceLayers,null==i?void 0:i.layers,...a].filter(e=>!!e);this.handles.add(s.map(e=>this._watchUpdatingTracking.addOnCollectionChange(()=>e,this._reschedule)),"collection-change"),this._workPromise.resolve(),this._workPromise=null}}initialize(){this.handles.add([Object(oe["b"])(()=>{var e,t;return null==(e=this.view)||null==(t=e.map)?void 0:t.allLayers},"change",this._preloadLayerViewModules,{onListenerAdd:this._preloadLayerViewModules}),Object(oe["e"])(()=>{const e=this.view,t=null==e?void 0:e.map;return[null==t?void 0:t.basemap,null==t?void 0:t.ground,null==t?void 0:t.layers,null==e?void 0:e.ready]},()=>this._reschedule(),oe["d"])]),this._preloadLayerViewModules(),this._reschedule()}destroy(){this.clear(),this._watchUpdatingTracking.destroy(),this._map=null}get _layersToLayerViews(){const e=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.layers","view.layerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"]];return this.supportsGround&&e.push(["view.map.ground.layers","view.groundView.layerViews"]),new Map(e)}get _rootCollectionNames(){return Array.from(this._layersToLayerViews.keys())}get updating(){return Object(z["k"])(this._workPromise)||this._watchUpdatingTracking.updating||Object(Da["c"])(this._layerLayerViewInfoMap,e=>!e.done)}get updatingRemaining(){let e=0;for(const t of this._layerLayerViewInfoMap.values())t.done||++e;return e}clear(){if(!this.destroyed){for(const e of this._layerLayerViewInfoMap.values())e.destroy();this._layerLayerViewInfoMap.clear(),this._refreshCollections()}}async whenLayerView(e){if(await this._reschedule(),!this._layerLayerViewInfoMap.has(e))throw new b["a"]("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:e});return this._layerLayerViewInfoMap.get(e).promise}_refreshCollections(){for(const[e,t]of this._layersToLayerViews)this._populateLayerViewsOwners(this.get(e),this.get(t),this.view);this.notifyChange("updating"),this.notifyChange("updatingRemaining")}_populateLayerViewsOwners(e,t,r){if(!e||!t)return void(t&&t.removeAll());let i=0;for(const n of e){const e=this._layerLayerViewInfoMap.get(n);if(!e||!e.layerView)continue;const a=e.layerView;a.layer=n,a.parent=r,t.getItemAt(i)!==a&&t.splice(i,0,a),n.layers&&this._populateLayerViewsOwners(n.layers,a.layerViews,a),i+=1}i<t.length&&t.splice(i,t.length)}_createLayerView(e){if(this._layerLayerViewInfoMap.has(e))return this.view.ready&&this._layerLayerViewInfoMap.get(e).start(),this.notifyChange("updating"),void this.notifyChange("updatingRemaining");e.load().catch(()=>{}),this.layerViewImporter.hasLayerViewModule(e)&&this.layerViewImporter.importLayerView(e);const t=new Na(e,this.view,this.layerViewImporter);t.promise.then(()=>this._refreshCollections(),t=>{var r,i;t&&(Object(_["m"])(t)||"cancelled:layerview-create"===t.name)||La.error(`Failed to create layerview for layer title:'${null!=(r=e.title)?r:"no title"}', id:'${null!=(i=e.id)?i:"no id"}' of type '${e.type}'.`,{layer:e,error:t}),this._refreshCollections()}),this._layerLayerViewInfoMap.set(e,t),this.view.ready&&t.start(),this.notifyChange("updating"),this.notifyChange("updatingRemaining")}};Object(l["a"])([Object(j["b"])()],Fa.prototype,"_workPromise",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Fa.prototype,"_watchUpdatingTracking",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Fa.prototype,"_layersToLayerViews",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Fa.prototype,"_rootCollectionNames",null),Object(l["a"])([Object(j["b"])()],Fa.prototype,"layerViewImporter",void 0),Object(l["a"])([Object(j["b"])()],Fa.prototype,"supportsGround",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Fa.prototype,"updating",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Fa.prototype,"updatingRemaining",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Fa.prototype,"view",void 0),Fa=Object(l["a"])([Object(x["a"])("esri.views.LayerViewManager")],Fa);const ka=Fa;let Ua=class extends F["a"]{constructor(e){super(e),this.factor=1.5,this.offset=Object(ce["e"])(0,0),this.position=null,this.size=120,this.maskUrl=null,this.maskEnabled=!0,this.overlayUrl=null,this.overlayEnabled=!0,this.visible=!0}get version(){return this.commitProperty("factor"),this.commitProperty("offset"),this.commitProperty("position"),this.commitProperty("visible"),this.commitProperty("size"),this.commitProperty("maskUrl"),this.commitProperty("maskEnabled"),this.commitProperty("overlayUrl"),this.commitProperty("overlayEnabled"),(this._get("version")||0)+1}};Object(l["a"])([Object(j["b"])({type:Number})],Ua.prototype,"factor",void 0),Object(l["a"])([Object(j["b"])({nonNullable:!0})],Ua.prototype,"offset",void 0),Object(l["a"])([Object(j["b"])()],Ua.prototype,"position",void 0),Object(l["a"])([Object(j["b"])({type:Number,range:{min:0}})],Ua.prototype,"size",void 0),Object(l["a"])([Object(j["b"])()],Ua.prototype,"maskUrl",void 0),Object(l["a"])([Object(j["b"])()],Ua.prototype,"maskEnabled",void 0),Object(l["a"])([Object(j["b"])()],Ua.prototype,"overlayUrl",void 0),Object(l["a"])([Object(j["b"])()],Ua.prototype,"overlayEnabled",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ua.prototype,"version",null),Object(l["a"])([Object(j["b"])({type:Boolean})],Ua.prototype,"visible",void 0),Ua=Object(l["a"])([Object(x["a"])("esri.views.Magnifier")],Ua);const za=Ua;var Ba=r("9305");let Va=class extends F["a"]{constructor(e,t){var r;super({}),this._stage=e,this._textureRequests=new Map,this._frameTask=null!=(r=null==t?void 0:t.registerTask(Ba["c"].TEXTURE_UNLOAD))?r:Ba["a"]}normalizeCtorArgs(){return{}}destroy(){super.destroy(),this._frameTask.remove(),this._textureRequests.forEach(e=>this._releaseTextureRequest(e)),this._textureRequests.clear()}get updating(){return this._frameTask.updating}fromData(e,t,r){const i=this.makeUid(e);let n=this._textureRequests.get(i);return n||(n={referenceCount:0,texture:t(),textureAsync:null,abortController:null,onRemove:r},this._stage&&(this._stage.add(n.texture),this._stage.loadImmediate(n.texture)),this._textureRequests.set(i,n)),n.referenceCount++,{uid:i,texture:n.texture,release:()=>this._release(i)}}_release(e){const t=this._textureRequests.get(e);t?(t.referenceCount<1&&console.warn("TextureCollection: reference count is < 1 for "+e),t.referenceCount--,t.referenceCount<1&&this._frameTask.schedule(()=>this._releaseNow(e))):console.warn(`TextureCollection: texture doesn't exist: '${e}'`)}get test(){return{textureRequests:this._textureRequests}}_releaseNow(e){if(!this._textureRequests)return;const t=this._textureRequests.get(e);!t||t.referenceCount>0||(this._releaseTextureRequest(t),this._textureRequests.delete(e))}_releaseTextureRequest(e){var t;e.onRemove&&e.onRemove(),e.texture?null==(t=this._stage)||t.remove(e.texture):e.abortController&&(e.abortController.abort(),e.abortController=null)}makeUid(e,t=null){return Object(z["k"])(t)?`${e}.${t}px`:e}};Object(l["a"])([Object(j["b"])()],Va.prototype,"_frameTask",void 0),Object(l["a"])([Object(j["b"])()],Va.prototype,"updating",null),Va=Object(l["a"])([Object(x["a"])("esri.views.3d.support.TextureCollection")],Va);var Ga,Ha=r("7164");!function(e){e[e.Left=0]="Left",e[e.Middle=1]="Middle",e[e.Right=2]="Right"}(Ga||(Ga={}));const qa=["click","double-click","immediate-click","immediate-double-click","hold","drag","key-down","key-up","pointer-down","pointer-move","pointer-up","pointer-drag","mouse-wheel","pointer-enter","pointer-leave","gamepad","focus","blur"],Wa={};function $a(e){return!!Wa[e]}function Za(e){for(const t of e)if(!$a(t))return!1;return!0}qa.forEach(e=>{Wa[e]=!0});class Xa{constructor(e){this.handlers=new Map,this.counter=0,this.handlerCounts=new Map,this.view=e,this.inputManager=null}connect(e){e&&this.disconnect(),this.inputManager=e,this.handlers.forEach(({handler:e,priority:t},r)=>this.inputManager.installHandlers(r,[e],t))}disconnect(){this.inputManager&&this.handlers.forEach((e,t)=>this.inputManager.uninstallHandlers(t)),this.inputManager=null}destroy(){this.disconnect(),this.handlers.clear(),this.view=null}on(e,t,r,i){const n=Array.isArray(e)?e:e.split(",");if(!Za(n))return n.some($a)&&console.error("Error: registering input events and other events on the view at the same time is not supported."),null;let a,s;Array.isArray(t)?s=t:(a=t,s=[]),"function"==typeof r?a=r:i=r,i=null!=i?i:Cn["b"].DEFAULT;const o=this._createUniqueGroupName(),c=new Ya(this.view,n,s,a);this.handlers.set(o,{handler:c,priority:i});for(const l of n){const e=this.handlerCounts.get(l)||0;this.handlerCounts.set(l,e+1)}return this.inputManager&&this.inputManager.installHandlers(o,[c],i),{remove:()=>this._removeHandler(o,n)}}hasHandler(e){return!!this.handlerCounts.get(e)}_removeHandler(e,t){if(this.handlers.has(e)){this.handlers.delete(e);for(const e of t){const t=this.handlerCounts.get(e);void 0===t?console.error("Trying to remove handler for event that has no handlers registered: ",e):1===t?this.handlerCounts.delete(e):this.handlerCounts.set(e,t-1)}}this.inputManager&&this.inputManager.uninstallHandlers(e)}_createUniqueGroupName(){return this.counter+=1,"viewEvents_"+this.counter}}class Ya extends Ha["a"]{constructor(e,t,r,i){super(!0),this.view=e;for(const n of t)switch(n){case"click":this.registerIncoming("click",r,e=>i(this._wrapClick(e)));break;case"double-click":this.registerIncoming("double-click",r,e=>i(this._wrapDoubleClick(e)));break;case"immediate-click":this.registerIncoming("immediate-click",r,e=>i(this._wrapImmediateClick(e)));break;case"immediate-double-click":this.registerIncoming("immediate-double-click",r,e=>i(this._wrapImmediateDoubleClick(e)));break;case"hold":this.registerIncoming("hold",r,e=>i(this._wrapHold(e)));break;case"drag":this.registerIncoming("drag",r,e=>{const t=this._wrapDrag(e);t&&i(t)});break;case"key-down":this.registerIncoming("key-down",r,e=>i(this._wrapKeyDown(e)));break;case"key-up":this.registerIncoming("key-up",r,e=>i(this._wrapKeyUp(e)));break;case"pointer-down":this.registerIncoming("pointer-down",r,e=>i(this._wrapPointer(e,"pointer-down")));break;case"pointer-move":this.registerIncoming("pointer-move",r,e=>i(this._wrapPointer(e,"pointer-move")));break;case"pointer-up":this.registerIncoming("pointer-up",r,e=>i(this._wrapPointer(e,"pointer-up")));break;case"pointer-drag":this.registerIncoming("pointer-drag",r,e=>i(this._wrapPointerDrag(e)));break;case"mouse-wheel":this.registerIncoming("mouse-wheel",r,e=>i(this._wrapMouseWheel(e)));break;case"pointer-enter":this.registerIncoming("pointer-enter",r,e=>i(this._wrapPointer(e,"pointer-enter")));break;case"pointer-leave":this.registerIncoming("pointer-leave",r,e=>i(this._wrapPointer(e,"pointer-leave")));break;case"gamepad":this.registerIncoming("gamepad",r,e=>{i(this._wrapGamepad(e))});break;case"focus":this.registerIncoming("focus",r,e=>{i(this._wrapFocus(e))});break;case"blur":this.registerIncoming("blur",r,e=>{i(this._wrapBlur(e))})}}_wrapFocus(e){return{type:"focus",timestamp:e.timestamp,native:e.data.native,cancelable:e.cancelable,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapBlur(e){return{type:"blur",timestamp:e.timestamp,native:e.data.native,cancelable:e.cancelable,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapClick(e){const{pointerType:t,button:r,buttons:i,x:n,y:a,native:s,eventId:o}=e.data,{cancelable:c,timestamp:l}=e;return{type:"click",pointerType:t,button:r,buttons:i,x:n,y:a,native:s,timestamp:l,screenPoint:Object(ce["e"])(n,a),mapPoint:this._getMapPoint(n,a),eventId:o,cancelable:c,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapDoubleClick(e){const{pointerType:t,button:r,buttons:i,x:n,y:a,native:s,eventId:o}=e.data,{cancelable:c,timestamp:l}=e;return{type:"double-click",pointerType:t,button:r,buttons:i,x:n,y:a,native:s,timestamp:l,mapPoint:this._getMapPoint(n,a),eventId:o,cancelable:c,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapImmediateClick(e){const{pointerType:t,button:r,buttons:i,x:n,y:a,native:s,eventId:o}=e.data,c=s.pointerId,{cancelable:l,timestamp:u}=e;return{type:"immediate-click",pointerId:c,pointerType:t,button:r,buttons:i,x:n,y:a,native:s,timestamp:u,mapPoint:this._getMapPoint(n,a),eventId:o,cancelable:l,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapImmediateDoubleClick(e){const{pointerType:t,button:r,buttons:i,x:n,y:a,native:s,eventId:o}=e.data,c=s.pointerId,{cancelable:l,timestamp:u}=e;return{type:"immediate-double-click",pointerId:c,pointerType:t,button:r,buttons:i,x:n,y:a,native:s,timestamp:u,mapPoint:this._getMapPoint(n,a),eventId:o,cancelable:l,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapHold(e){const{pointerType:t,button:r,buttons:i,x:n,y:a,native:s}=e.data,{cancelable:o,timestamp:c}=e;return{type:"hold",pointerType:t,button:r,buttons:i,x:n,y:a,native:s,timestamp:c,mapPoint:this._getMapPoint(n,a),cancelable:o,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_getMapPoint(e,t){return this.view.toMap(Object(ce["e"])(e,t),{exclude:[]})}_wrapDrag(e){const t=e.data,{x:r,y:i}=t.center,{action:n,pointerType:a,button:s}=t;if("start"===n&&(this.latestDragStart=t),!this.latestDragStart)return;const o=t.pointer.native,c=t.buttons,{cancelable:l,timestamp:u}=e,d={x:this.latestDragStart.center.x,y:this.latestDragStart.center.y};return"end"===n&&(this.latestDragStart=void 0),{type:"drag",action:n,x:r,y:i,origin:d,pointerType:a,button:s,buttons:c,radius:t.radius,angle:Object(dr["p"])(t.angle),native:o,timestamp:u,cancelable:l,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapKeyDown(e){const{key:t,repeat:r,native:i}=e.data,{cancelable:n,timestamp:a}=e;return{type:"key-down",key:t,repeat:r,native:i,timestamp:a,cancelable:n,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapKeyUp(e){const{key:t,native:r}=e.data,{cancelable:i,timestamp:n}=e;return{type:"key-up",key:t,native:r,timestamp:n,cancelable:i,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapPointer(e,t){const{x:r,y:i,button:n,buttons:a,native:s,eventId:o}=e.data,c=s.pointerId,l=s.pointerType,{cancelable:u,timestamp:d}=e;return{type:t,x:r,y:i,pointerId:c,pointerType:l,button:n,buttons:a,native:s,timestamp:d,eventId:o,cancelable:u,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapPointerDrag(e){const{x:t,y:r,buttons:i,native:n,eventId:a}=e.data.currentEvent,{button:s}=e.data.startEvent,o=e.data.startEvent.native.pointerId,c=e.data.startEvent.native.pointerType,l=e.data.action,u={x:e.data.startEvent.x,y:e.data.startEvent.y},{cancelable:d,timestamp:h}=e;return{type:"pointer-drag",x:t,y:r,pointerId:o,pointerType:c,button:s,buttons:i,action:l,origin:u,native:n,timestamp:h,eventId:a,cancelable:d,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapMouseWheel(e){const{cancelable:t,data:r,timestamp:i}=e,{x:n,y:a,deltaY:s,native:o}=r;return{type:"mouse-wheel",x:n,y:a,deltaY:s,native:o,timestamp:i,cancelable:t,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}_wrapGamepad(e){const{action:t,state:r,device:i}=e.data,{cancelable:n,timestamp:a}=e,{buttons:s,axes:o}=r;return{type:"gamepad",device:i,timestamp:a,action:t,buttons:s,axes:o,cancelable:n,stopPropagation:()=>e.stopPropagation(),async:t=>e.async(t),preventDefault:()=>e.preventDefault()}}}var Ja=r("7298");const Qa=v["a"].getLogger("esri.views.interactive.interactiveToolUtils");function Ka(e){return[e.on("before-add",t=>{const r=t.item;if(null==r||e.includes(r))return Qa.warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."),void t.preventDefault()}),e.on("after-remove",e=>{const t=e.item;t.visible=!1,t.active&&(t.view.activeTool=null),t.destroy()})]}function es(e){return e.visible&&e.getEditableFlag(Ja["a"].USER)&&e.getEditableFlag(Ja["a"].MANAGER)}function ts(e){return Object(ce["e"])(e.x,e.y)}function rs(e,t){const r=(e instanceof HTMLElement?e:e.surface).getBoundingClientRect();return Object(ce["e"])(t.clientX-r.left,t.clientY-r.top)}function is(e,t){return t instanceof Event?rs(e,t):ts(t)}function ns(e){if(e instanceof Event)return!0;if("object"==typeof e&&"type"in e)switch(e.type){case"click":case"double-click":case"pointer-down":case"pointer-drag":case"pointer-enter":case"pointer-leave":case"pointer-up":case"pointer-move":case"immediate-click":case"immediate-double-click":case"hold":case"drag":case"mouse-wheel":return!0;default:return!1}return!1}class as{constructor(){this._pointerLocations=new Map,this._hoveredManipulators=new Map,this._grabbedManipulators=new Map,this._draggedManipulators=new Map,this._stopDrag=!1,this._currentlyActiveTool=null,this._revertToActiveTool=!1,this._cursor=null}get cursor(){return this._cursor}handleInputEvent(e,t){const r=()=>e.stopPropagation();switch(e.type){case"pointer-move":ss(e.pointerType)&&this._pointerLocations.set(e.pointerId,{x:e.x,y:e.y,pointerType:e.pointerType});break;case"drag":this._grabbedManipulators.size>0&&(this._stopDrag=!0),this._stopDrag&&(r(),"end"===e.action&&(this._stopDrag=!1));break;case"pointer-down":{if(!os(e))break;const i=ts(e),n=this._intersect(i,e.pointerType,t.forEachTool);if(Object(z["j"])(n))break;const a=this._findToolAndManipulatorByKey(n,t.forEachTool,ls),s=Object(z["b"])(a,e=>e.manipulator),o=Object(z["b"])(a,e=>e.tool);!(Object(z["k"])(s)&&Object(z["k"])(o)&&s.interactive)||s.grabbable&&s.grabbableForEvent(e)||!s.grabbing||s.dragging||this._ungrabManipulatorBeforeDragging(s,o,e),Object(z["k"])(s)&&s.interactive&&s.grabbable&&s.grabbableForEvent(e)&&!s.grabbing&&(this._grabbedManipulators.set(e.pointerId,{key:n,start:i,pointerType:e.pointerType}),1===this._grabbedManipulators.size&&t.activeTool!==n.tool&&(this._currentlyActiveTool=t.activeTool,this._revertToActiveTool=!0,t.setActiveTool(n.tool)),s.grabbing=!0,s.events.emit("grab-changed",{action:"start",pointerType:e.pointerType,screenPoint:i}),r());break}case"pointer-up":this._handlePointerEnd(e,t);break;case"pointer-drag":{if(!os(e))break;const i=this._grabbedManipulators.get(e.pointerId),n=this._draggedManipulators.get(e.pointerId),a=Object(z["b"])(i||n,({key:e})=>e),s=this._findManipulatorByKey(a,t.forEachTool);if(Object(z["j"])(s))break;const o=ts(e);o.x=Object(dr["f"])(o.x,0,t.view.width),o.y=Object(dr["f"])(o.y,0,t.view.height);const c=Object(z["t"])(i||n).start;switch(e.action){case"start":case"update":"update"!==e.action&&1!==this._grabbedManipulators.size||(s.dragging=!0,n?s.events.emit("drag",{action:"update",start:c,screenPoint:o}):s.events.emit("drag",{action:"start",start:c,screenPoint:o,pointerType:e.pointerType}),this._draggedManipulators.set(e.pointerId,{key:Object(z["t"])(a),start:c}));break;case"end":s.dragging=!1,n&&s.events.emit("drag",{action:"end",start:c,screenPoint:o}),this._draggedManipulators.delete(e.pointerId),this._handlePointerEnd(e,t)}r();break}case"immediate-click":{const i=ts(e),n=this._intersect(i,e.pointerType,t.forEachTool),a=this._findToolAndManipulatorByKey(n,t.forEachTool,ls);if(cs(e)||t.forEachTool(e=>{if((!Object(z["k"])(a)||a.tool!==e||e.automaticManipulatorSelection)&&e.manipulators){let t=!1;e.manipulators.forEach(({manipulator:e})=>{e.selected&&(e.selected=!1,t=!0)}),t&&e.manipulatorSelectionChanged&&e.manipulatorSelectionChanged()}}),Object(z["j"])(a))break;const{manipulator:s,tool:o}=a;if(!s.interactive)break;s.selectable&&o.automaticManipulatorSelection&&(s.selected=!s.selected,o.manipulatorSelectionChanged&&o.manipulatorSelectionChanged());const c=e.native.shiftKey;s.events.emit("immediate-click",{screenPoint:i,button:e.button,pointerType:e.pointerType,shiftKey:c,stopPropagation:r});break}case"click":{const i=ts(e),n=this._intersect(i,e.pointerType,t.forEachTool),a=this._findManipulatorByKey(n,t.forEachTool);if(Object(z["j"])(a)||!a.interactive)break;const s=e.native.shiftKey;a.events.emit(e.type,{screenPoint:i,button:e.button,pointerType:e.pointerType,shiftKey:s}),r();break}case"double-click":{const i=ts(e),n=this._intersect(i,e.pointerType,t.forEachTool),a=this._findManipulatorByKey(n,t.forEachTool);if(Object(z["j"])(a)||!a.interactive)break;const s=e.native.shiftKey;a.events.emit("double-click",{screenPoint:i,button:e.button,pointerType:e.pointerType,shiftKey:s,stopPropagation:r});break}case"immediate-double-click":{const i=ts(e),n=this._intersect(i,e.pointerType,t.forEachTool),a=this._findManipulatorByKey(n,t.forEachTool);if(Object(z["j"])(a)||!a.interactive)break;const s=e.native.shiftKey;a.events.emit("immediate-double-click",{screenPoint:i,button:e.button,pointerType:e.pointerType,shiftKey:s,stopPropagation:r});break}}this._updateCursor(t.forEachTool)}_ungrabManipulatorBeforeDragging(e,t,r){e.grabbing=!1,e.events.emit("grab-changed",{action:"end",pointerType:r.pointerType,screenPoint:ts(r)}),this._grabbedManipulators.forEach(({key:r},i)=>{r.tool===t&&t.manipulators.findById(r.manipulatorId)===e&&this._grabbedManipulators.delete(i)})}_handlePointerEnd(e,t){const r=Object(z["b"])(this._grabbedManipulators.get(e.pointerId),({key:e})=>e),i=this._findManipulatorByKey(r,t.forEachTool);Object(z["k"])(i)&&!i.dragging&&(1===this._grabbedManipulators.size&&0===this._draggedManipulators.size&&this._revertToActiveTool&&(t.setActiveTool(this._currentlyActiveTool),this._revertToActiveTool=!1,this._currentlyActiveTool=null),i.grabbing&&(i.grabbing=!1,i.events.emit("grab-changed",{action:"end",pointerType:e.pointerType,screenPoint:ts(e)})),this._grabbedManipulators.delete(e.pointerId))}_cursorFromMap(e,t){let r=null;return Object(Da["c"])(e,({key:e})=>{const i=this._findManipulatorByKey(e,t);return!!(Object(z["k"])(i)&&i.interactive&&"cursor"in i&&i.cursor)&&(r=i.cursor,!0)}),r}_updateCursor(e){this._grabbedManipulators.size>0?this._cursor=this._cursorFromMap(this._grabbedManipulators,e)||"grabbing":this._hoveredManipulators.size>0?this._cursor=this._cursorFromMap(this._hoveredManipulators,e)||"pointer":this._cursor=null}clearPointers(e,t,r=!0,i){const n=t=>t.tool===e&&(Object(z["j"])(i)||t.manipulatorId===i);this._grabbedManipulators.forEach(({key:e,pointerType:r},i)=>{if(n(e)){this._grabbedManipulators.delete(i);const n=this._findManipulatorByKey(e,t);Object(z["k"])(n)&&(n.grabbing=!1,n.events.emit("grab-changed",{action:"end",screenPoint:null,pointerType:r}))}}),this._draggedManipulators.forEach(({key:e},r)=>{if(n(e)){this._draggedManipulators.delete(r);const i=this._findManipulatorByKey(e,t);Object(z["k"])(i)&&(i.dragging=!1,i.events.emit("drag",{action:"cancel"}))}}),r&&this._hoveredManipulators.forEach(({key:e},r)=>{if(n(e)){this._hoveredManipulators.delete(r);const i=this._findManipulatorByKey(e,t);Object(z["k"])(i)&&(i.hovering=!1)}}),this._updateCursor(t)}_intersect(e,t,r){let i=null;return r(r=>{if(null==r.manipulators||!es(r))return!1;const n=r.manipulators.intersect(e,t);return!Object(z["j"])(n)&&(i={manipulatorId:n.id,tool:r},!0)}),i}updateHoveredStateFromKnownPointers(e){this._pointerLocations.forEach((t,r)=>{this._updateHoveredStateForPointerAtScreenPosition(Object(ce["e"])(t.x,t.y),r,t.pointerType,e)})}handleHoverEvent(e,t){"pointer-up"!==e.type&&"immediate-click"!==e.type&&"pointer-move"!==e.type||!ss(e.pointerType)||this._updateHoveredStateForPointerAtScreenPosition(ts(e),e.pointerId,e.pointerType,t)}_updateHoveredStateForPointerAtScreenPosition(e,t,r,i){const n=this._intersect(e,r,i);let a=this._findManipulatorByKey(n,i);const s=Object(z["b"])(this._hoveredManipulators.get(t),({key:e})=>e),o=this._findManipulatorByKey(s,i);Object(z["k"])(a)&&!a.interactive&&(a=null),o!==a&&(Object(z["k"])(o)&&(o.hovering=!1),Object(z["k"])(a)?(a.hovering=!0,this._hoveredManipulators.set(t,{key:Object(z["t"])(n)})):this._hoveredManipulators.delete(t),this._updateCursor(i))}_findManipulatorByKey(e,t){return this._findToolAndManipulatorByKey(e,t,ls)?ls.manipulator:null}_findToolAndManipulatorByKey(e,t,r){return Object(z["j"])(e)?null:(r.tool=null,r.manipulator=null,t(t=>{if(t!==e.tool||null==t.manipulators||!es(t))return!1;const i=t.manipulators.findById(e.manipulatorId);return!!Object(z["k"])(i)&&(r.manipulator=i,r.tool=t,!0)}),r.manipulator?r:null)}}function ss(e){return"mouse"===e}function os(e){return"mouse"!==e.pointerType||0===e.button}function cs(e){return!!e.native.shiftKey}const ls={manipulator:null,tool:null},us=v["a"].getLogger("esri.views.ToolViewManager"),ds="attached",hs="tools";let ps=class extends Le["a"]{constructor(e){super(e),this._manipulatorState=new as,this.tools=new h["a"],this.cursor=null,this._forEachTool=e=>{for(const t of this.tools.items)if(e(t))return}}initialize(){this.handles.add([this.view.on(qa,e=>{this._handleInputEvent(e)},Cn["b"].TOOL),...Ka(this.tools),this.tools.on("before-remove",({item:e})=>{this._manipulatorState.clearPointers(e,this._forEachTool)}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.detach(),this.handles.removeAll()}set activeTool(e){if(Object(z["k"])(e)&&!this.view.ready)return void us.error("Cannot set active tool while view is not ready.");if(e===this.activeTool)return void(Object(z["k"])(e)&&us.warn("Tool is already active - ignoring activation request."));const t=this.activeTool;this._set("activeTool",e),Object(z["k"])(t)&&t.deactivate(),Object(z["k"])(e)&&e.activate(),this._removeIncompleteTools(e);const r=Object(z["j"])(this.activeTool);for(const i of this.tools){i.setEditableFlag(Ja["a"].MANAGER,r||i===this.activeTool);const e=es(i);!r&&e||this._manipulatorState.clearPointers(i,this._forEachTool,!e)}this._updateCursor()}get updating(){var e,t;return this.updatingHandles.updating||this.tools.some(e=>e.updating)||null!=(e=null==(t=this.textures)?void 0:t.updating)&&e}attach(){"3d"===this.view.type?(this._set("textures",new Va(this.view._stage,this.view.resourceController.scheduler)),this.handles.add([this.view.state.watch("camera",()=>{this._forEachManipulator(e=>{null!=e.onViewChange&&e.onViewChange()})}),this.view.elevationProvider.on("elevation-change",e=>{this._forEachManipulator(t=>{null!=t.onElevationChange&&t.onElevationChange(e)})}),Object(Sa["b"])(()=>this._set("textures",Object(z["d"])(this.textures)))],ds)):this.handles.add(this.view.watch("extent",()=>{this._forEachManipulator(e=>{null!=e.onViewChange&&e.onViewChange()})}))}detach(){Object(z["k"])(this.activeTool)&&(this.activeTool=null),this.tools.removeAll(),this.handles.remove(ds)}_forEachManipulator(e){this._forEachTool(t=>{t.manipulators&&t.manipulators.forEach(({manipulator:r})=>e(r,t))})}_handleInputEvent(e){let t=!1;const r={...e,stopPropagation:()=>{t=!0,e.stopPropagation()}};Object(z["k"])(this.activeTool)?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(r):this._forEachTool(e=>{!t&&e.visible&&e.handleInputEvent(r)}),!t&&"key-down"===e.type&&"Escape"===e.key&&this.activeTool&&(e.stopPropagation(),this.activeTool=null),this._manipulatorState.handleInputEvent(r,{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:e=>{this.activeTool=e},view:this.view}),!t&&Object(z["k"])(this.activeTool)&&this.activeTool.handleInputEventAfter(r),this._manipulatorState.handleHoverEvent(r,this._forEachTool),this._updateCursor()}_refreshToolWatchers(){this.handles.remove(hs),this._forEachTool(e=>{if(e instanceof F["a"]){const t=Object(Me["e"])(e,["cursor","visible","editable"],()=>{es(e)||this._manipulatorState.clearPointers(e,this._forEachTool),this._updateCursor()});this.handles.add(t,hs)}e.manipulators&&this.handles.add(e.manipulators.on("change",t=>{t.removed.forEach(({id:t})=>{this._manipulatorState.clearPointers(e,this._forEachTool,!0,t)}),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}),hs)}),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateCursor(){let e=this._manipulatorState.cursor;this._forEachTool(t=>!(!Object(z["k"])(t.cursor)||!t.visible)&&(e=t.cursor,!0)),this._get("cursor")!==e&&this._set("cursor",e)}_removeIncompleteTools(e){this.tools.filter(t=>(Object(z["j"])(e)||t!==e)&&!t.created).forEach(e=>{this.tools.remove(e)})}};Object(l["a"])([Object(j["b"])({constructOnly:!0,nonNullable:!0})],ps.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,nonNullable:!0})],ps.prototype,"textures",void 0),Object(l["a"])([Object(j["b"])({value:null})],ps.prototype,"activeTool",null),Object(l["a"])([Object(j["b"])({readOnly:!0,type:h["a"]})],ps.prototype,"tools",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ps.prototype,"cursor",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ps.prototype,"updating",null),ps=Object(l["a"])([Object(x["a"])("esri.views.ToolViewManager")],ps);const fs=ps;let bs=class extends F["a"]{constructor(e){super(),this.nativeIndex=null,this._detectedDeviceType="unknown","standard"===e.mapping?this._detectedDeviceType="standard":ms.test(e.id)?this._detectedDeviceType="spacemouse":this._detectedDeviceType="unknown",this.nativeIndex=e.index}get native(){return(navigator.getGamepads?navigator.getGamepads():[])[this.nativeIndex]}get deviceType(){return this._detectedDeviceType}get axisThreshold(){return gs[this.deviceType]}};Object(l["a"])([Object(j["b"])({nonNullable:!0,readOnly:!0})],bs.prototype,"nativeIndex",void 0),Object(l["a"])([Object(j["b"])({type:String,readOnly:!0})],bs.prototype,"deviceType",null),Object(l["a"])([Object(j["b"])({type:Number,readOnly:!0})],bs.prototype,"axisThreshold",null),bs=Object(l["a"])([Object(x["a"])("esri.views.input.gamepad.GamepadInputDevice")],bs);const ms=new RegExp("^(3dconnexion|space(mouse|navigator|pilot|explorer))","i"),gs={standard:.15,spacemouse:.025,unknown:0},ys=bs;let Os=class extends F["a"]{constructor(...e){super(...e),this.devices=new h["a"],this.enabledFocusMode="document"}};Object(l["a"])([Object(j["b"])({type:h["a"].ofType(ys),readOnly:!0})],Os.prototype,"devices",void 0),Object(l["a"])([Object(j["b"])({type:["document","view","none"]})],Os.prototype,"enabledFocusMode",void 0),Os=Object(l["a"])([Object(x["a"])("esri.views.input.gamepad.GamepadSettings")],Os);const vs=Os;let _s=class extends F["a"]{constructor(){super(...arguments),this.gamepad=new vs}};Object(l["a"])([Object(j["b"])({readOnly:!0})],_s.prototype,"gamepad",void 0),_s=Object(l["a"])([Object(x["a"])("esri.views.input.Input")],_s);const js=_s;let ws=class extends F["a"]{constructor(e){super(e),this.enabled=!0,this.device=null,this.mode="pan",this.tiltDirection="forward-down",this.velocityFactor=1}};Object(l["a"])([Object(j["b"])({type:Boolean,nonNullable:!0})],ws.prototype,"enabled",void 0),Object(l["a"])([Object(j["b"])({type:ys})],ws.prototype,"device",void 0),Object(l["a"])([Object(j["b"])({type:["pan","zoom"],nonNullable:!0})],ws.prototype,"mode",void 0),Object(l["a"])([Object(j["b"])({type:["forward-down","forward-up"],nonNullable:!0})],ws.prototype,"tiltDirection",void 0),Object(l["a"])([Object(j["b"])({type:Number,nonNullable:!0})],ws.prototype,"velocityFactor",void 0),ws=Object(l["a"])([Object(x["a"])("esri.views.navigation.gamepad.GamepadSettings")],ws);const xs=ws;let Ts=class extends F["a"]{constructor(e){super(e),this.browserTouchPanEnabled=!0,this.gamepad=new xs,this.momentumEnabled=!0,this.mouseWheelZoomEnabled=!0}};Object(l["a"])([Object(j["b"])({type:Boolean})],Ts.prototype,"browserTouchPanEnabled",void 0),Object(l["a"])([Object(j["b"])({type:xs,nonNullable:!0})],Ts.prototype,"gamepad",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],Ts.prototype,"momentumEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],Ts.prototype,"mouseWheelZoomEnabled",void 0),Ts=Object(l["a"])([Object(x["a"])("esri.views.navigation.Navigation")],Ts);const Ss=Ts;var Es=r("d2f2"),As=r("3c9c");let Cs,Rs=null;async function Ms(e){Rs||(Rs=Promise.resolve().then(r.bind(null,"e2e8")).then(e=>Cs=e)),await Rs,Object(_["v"])(e)}async function Ps(e,t,r,i){if(!e)return null;const n=e.spatialReference;return Object(pe["h"])()||Object(pe["b"])(n,t)?Object(pe["m"])(e,t):Cs?Cs.projectGeometry(e,t,r,i):(await Promise.race([Ms(i),Object(pe["i"])(i)]),Ps(e,t,r,i))}const Is=v["a"].getLogger("esri.views.support.DefaultsFromMap");Is.level="info";let Ds=class extends F["a"]{constructor(e){super(e),this.required={tileInfo:!1,heightModelInfo:!1,extent:!1},this.defaultSpatialReference=null,this.userSpatialReference=null,this.sourcePreloadCount=10,this.priorityCollection=null,this.logDebugInformation=!1,this.requiresExtentInSpatialReference=!0,this.suspended=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._projectExtentTask.task&&(this._debug("Aborting project extent task"),this._projectExtentTask.task=Object(z["a"])(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return Object(z["k"])(this.userSpatialReference)?this.userSpatialReference:Object(z["t"])(this._spatialReferenceTask.spatialReference)}get extent(){return Object(z["t"])(this._extentTask.extent)}get heightModelInfo(){return Object(z["t"])(this._heightModelInfoTask.heightModelInfo)}get vcsWkid(){return Object(z["t"])(this._heightModelInfoTask.vcsWkid)}get latestVcsWkid(){return Object(z["t"])(this._heightModelInfoTask.latestVcsWkid)}get viewingMode(){return Object(z["j"])(this.userSpatialReference)||this.userSpatialReference.equals(Object(z["t"])(this._spatialReferenceTask.spatialReference))?Object(z["t"])(this._spatialReferenceTask.viewingMode):null}get tileInfo(){return Object(z["t"])(this._tileInfoTask.tileInfo)}get mapCollections(){var e,t,r,i;const n=null==(e=this.map)?void 0:e.call(this),a=[];return Object(z["k"])(this.priorityCollection)&&a.push(this.priorityCollection),a.push({parent:null==n?void 0:n.basemap,layers:null==n||null==(t=n.basemap)?void 0:t.baseLayers},{layers:null==n?void 0:n.layers},{parent:null==n?void 0:n.ground,layers:null==n||null==(r=n.ground)?void 0:r.layers},{parent:null==n?void 0:n.basemap,layers:null==n||null==(i=n.basemap)?void 0:i.referenceLayers}),a}get _allLayers(){var e,t;const r=this._collectLayers(this.mapCollections);return this._debug("Collected",null!=(e=null==(t=r.layers)?void 0:t.length)?e:0,"layers, updating",r.updating),r}get _spatialReferenceTask(){var e,t;if(this.suspended)return null!=(t=this._get("_spatialReferenceTask"))?t:{updating:!1};const{layers:r,updating:i}=this._allLayers,n={candidates:null};for(const s of r)if(this._processSpatialReferenceCandidates(s,n),n.candidates&&1===n.candidates.length)break;if(1!==(null==(e=n.candidates)?void 0:e.length)&&i)return{updating:!0};const a=this._pickSpatialReferenceCandidate(n.candidates);return this._debug("Finished spatial reference",Object(z["k"])(a)?`${a.spatialReference.wkid}:${Object(z["k"])(a.viewingMode)?Object(As["b"])(a.viewingMode):"global/local"}`:"none available"),{spatialReference:Object(z["k"])(a)?a.spatialReference:null,viewingMode:Object(z["k"])(a)?a.viewingMode:null,updating:!1}}get _tileInfoTask(){var e,t,r,i,n,a,s,o;if(!this.required.tileInfo)return null!=(o=this._get("_tileInfoTask"))?o:{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const{layers:c,updating:l}=this._collectLayers([{parent:null==(e=this.map)||null==(t=e.call(this))?void 0:t.basemap,layers:null==(r=this.map)||null==(i=r.call(this))||null==(n=i.basemap)?void 0:n.baseLayers},{layers:null==(a=this.map)||null==(s=a.call(this))?void 0:s.layers}]);if(c&&c.length>0&&"tileInfo"in c[0]){const e=c[0].tileInfo;return{tileInfo:e&&e.spatialReference.equals(this.spatialReference)?e:null,updating:!1}}return{updating:l}}get _heightModelInfoTask(){var e,t;if(!this.required.heightModelInfo||this.suspended&&null!=(e=this._get("_heightModelInfoTask"))&&e.heightModelInfo)return null!=(t=this._get("_heightModelInfoTask"))?t:{updating:!1};const{layers:r,updating:i}=this._allLayers;for(const c of r){var n,a;if(this._debug("Considering",null!=(n=null!=(a=c.title)?a:c.id)?n:c.declaredClass,"for height model info"),Object(Es["b"])(c)){const e=Object(Es["a"])(c);var s,o;if(e)return this._debug("Derived height model info",e),{heightModelInfo:e,vcsWkid:null==(s=c.spatialReference)?void 0:s.vcsWkid,latestVcsWkid:null==(o=c.spatialReference)?void 0:o.latestVcsWkid,updating:!1}}this._debug("Layer does not support height models")}return this._debug("No height model info found,","updating",i),{updating:i}}get _extentCandidatesTask(){var e;if(this.suspended||!this.required.extent)return null!=(e=this._get("_extentCandidatesTask"))?e:{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const t=this._allLayers,r=t.updating,i=[];for(const a of t.layers){var n;const e="fullExtents"in a&&a.fullExtents||(Object(z["k"])(a.fullExtent)?[a.fullExtent]:[]),t=this.requiresExtentInSpatialReference?null:e[0],r=null!=(n=e.find(e=>e.spatialReference.equals(this.spatialReference)))?n:t;if(r)return{candidates:[{extent:r,layer:a}],updating:!1};if(this._getSupportedSpatialReferences(a).length>0)for(const n of e)i.push({extent:n,layer:a})}return{candidates:i,updating:r}}get _extentTask(){const{candidates:e,updating:t}=this._extentCandidatesTask;if(t)return{updating:t};if(Object(z["j"])(e)||0===e.length)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const r=this._pickExtentCandidate(e),i=this.spatialReference;return r.extent.equals(this._projectExtentTask.input)&&i.equals(this._projectExtentTask.spatialReference)?{extent:this._projectExtentTask.output,updating:Object(z["k"])(this._projectExtentTask.task)&&!this._projectExtentTask.task.finished}:(Object(z["k"])(this._projectExtentTask.task)&&(this._debug("Aborting project extent task"),this._projectExtentTask.task=Object(z["a"])(this._projectExtentTask.task)),this._debug("Starting project extent task for",r.extent),this._projectExtentTask={input:r.extent.clone(),output:null,spatialReference:i.clone(),task:Object(_["h"])(async e=>{try{const t=await Ps(r.extent,i,r.layer.portalItem,e);this._debug("Project extent task finished",t),this._projectExtentTask={...this._projectExtentTask,task:null,output:t}}catch(t){if(Object(_["n"])(e))return;this._projectExtentTask={...this._projectExtentTask,task:null}}})},{updating:!0})}_processSpatialReferenceCandidates(e,t){var r;const i=this._getSupportedSpatialReferences(e);if(0!==i.length)if(this._debug("Spatial reference candidates from",null!=(r=e.title)?r:e.id,":",i.map(e=>`${e.spatialReference.wkid}:${Object(z["k"])(e.viewingMode)?Object(As["b"])(e.viewingMode):"global/local"}`).join(", ")),t.candidates){const e=[],r=(e,t)=>Object(z["j"])(e.viewingMode)?t.viewingMode:(Object(z["j"])(t.viewingMode)||e.viewingMode===t.viewingMode)&&e.viewingMode;for(const n of t.candidates)for(const t of i){if(!n.spatialReference.equals(t.spatialReference))continue;const i=r(n,t);if(!1!==i){e.push({spatialReference:n.spatialReference,viewingMode:i});break}}e.length>0&&(t.candidates=e)}else t.candidates=i}_pickSpatialReferenceCandidate(e){const t=this.defaultSpatialReference;return!e||e.length<1?Object(z["k"])(t)?{spatialReference:t,viewingMode:null}:null:(Object(z["k"])(t)&&e.length>1&&e.some(({spatialReference:e})=>e.equals(t))&&(e=e.filter(({spatialReference:e})=>e.equals(t))),e.length>1&&e.some(({viewingMode:e})=>e!==As["a"].Local)&&(e=e.filter(({viewingMode:e})=>e!==As["a"].Local)),e[0])}_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===t.length)return[];const r=[];for(const i of t){const t=this.getSpatialReferenceSupport({spatialReference:i,layer:e});if(Object(z["k"])(t)){const e=Object(z["k"])(t.constraints)?t.constraints:[{spatialReference:i}];for(const{spatialReference:t,viewingMode:i}of e)(!this.requiresExtentInSpatialReference||Object(z["j"])(this.userSpatialReference)||t.equals(this.userSpatialReference))&&r.push({spatialReference:t,viewingMode:i})}}return r}_pickExtentCandidate(e){const t=this.spatialReference;return e.find(({extent:e})=>t.equals(e.spatialReference))||e[0]}_collectLayers(e){var t;if("loaded"!==this._loadMaybe(null==(t=this.map)?void 0:t.call(this)))return{layers:[],updating:!0};const r={layers:[],preloading:-1,updating:!1};for(const i of e)if(this._collectCollection(i,r),r.preloading===this.sourcePreloadCount)break;return{layers:r.layers,updating:r.updating}}_collectCollection(e,t){if(e.layers){switch(this._loadMaybe(e.parent)){case"loading":return t.updating=!0,void++t.preloading;case"failed":return}for(const n of e.layers){switch(this._loadMaybe(n)){case"failed":continue;case"loading":t.updating=!0,++t.preloading;break;case"loaded":var r,i;t.updating||(this._debug("Considering layer",null!=(r=null!=(i=n.title)?i:n.id)?r:n.declaredClass),t.layers.push(n)),"layers"in n&&this._collectCollection({layers:n.layers},t)}if(t.preloading===this.sourcePreloadCount)break}}}_loadMaybe(e){return e&&"loadStatus"in e?"not-loaded"===e.loadStatus?(this._debug("Triggering load",null!=(t=null!=(r=e.title)?r:e.id)?t:e.declaredClass),e.load(),"loading"):e.loadStatus:"loaded";var t,r}_debug(...e){this.logDebugInformation&&Is.info(...e)}};Object(l["a"])([Object(j["b"])()],Ds.prototype,"required",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ds.prototype,"map",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ds.prototype,"getSpatialReferenceSupport",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"defaultSpatialReference",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"userSpatialReference",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"sourcePreloadCount",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"priorityCollection",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"logDebugInformation",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"requiresExtentInSpatialReference",void 0),Object(l["a"])([Object(j["b"])()],Ds.prototype,"suspended",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"ready",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"heightModelInfoReady",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"spatialReference",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"extent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"heightModelInfo",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"vcsWkid",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"latestVcsWkid",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"viewingMode",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"tileInfo",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"mapCollections",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"_allLayers",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"_spatialReferenceTask",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"_tileInfoTask",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"_heightModelInfoTask",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ds.prototype,"_extentCandidatesTask",null),Object(l["a"])([Object(j["b"])()],Ds.prototype,"_extentTask",null),Object(l["a"])([Object(j["b"])()],Ds.prototype,"_projectExtentTask",void 0),Ds=Object(l["a"])([Object(x["a"])("esri.views.support.DefaultsFromMap")],Ds);const Ls=Ds;var Ns;const Fs=v["a"].getLogger("esri.views.View");let ks=Ns=class extends(Object(Le["b"])(U["a"].EventedMixin(Object(Ea["b"])(F["a"])))){constructor(e){super(e),this._userSpatialReference=null,this._cursor=null,this.allLayerViews=new k["a"]({getCollections:()=>{var e,t,r;return[null==(e=this.basemapView)?void 0:e.baseLayerViews,null==(t=this.groundView)?void 0:t.layerViews,this.layerViews,null==(r=this.basemapView)?void 0:r.referenceLayerViews]},getChildrenFunction:e=>e.layerViews}),this.groundView=null,this.animation=null,this.basemapView=null,this.fatalError=null,this.extent=null,this.graphics=new Pa["a"],this.analyses=new Ma,this.navigating=!1,this.typeSpecificPreconditionsReady=!0,this.layerViews=new h["a"],this.magnifier=new za,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this.spatialReferenceWarningDelay=1e3,this.supportsGround=!0,this.timeExtent=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this.input=new js,this.navigation=new Ss,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new Xa(this),this.persistableViewModels=new h["a"],this._isValid=!1,this._readyCycleForced=!1,this.handles.add(this.watch("preconditionsReady",e=>{var t,r;e?(this._currentSpatialReference=this.spatialReference,Ns.views.add(this)):(this._currentSpatialReference=null,Ns.views.remove(this)),this.notifyChange("spatialReference"),!e&&this.ready?(null==(t=this.layerViewManager)||t.clear(),null==(r=this.toolViewManager)||r.detach(),Object(z["k"])(this.analysisViewManager)&&this.analysisViewManager.detach(),this._teardown()):e&&!this.ready&&(Object(z["k"])(this.analysisViewManager)&&this.analysisViewManager.attach(),this._startup(),this.toolViewManager.attach())},!0))}initialize(){this.addResolvingPromise(this.validate().then(()=>(this._isValid=!0,Object(oe["g"])(()=>this.ready)))),this.basemapView=new Ia({view:this}),this.layerViewManager=new ka({view:this,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},supportsGround:this.supportsGround}),this.toolViewManager=new fs({view:this}),this._setupSpatialReferenceLogger(),this.handles.add([Object(oe["e"])(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},{sync:!0,initial:!0}),Object(oe["e"])(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},{sync:!0}),Object(oe["e"])(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},{sync:!0,initial:!0})])}_setupSpatialReferenceLogger(){let e=null;this.handles.add([Object(oe["e"])(()=>{var e;return null==(e=this.defaultsFromMap)?void 0:e.ready},t=>{var r;const i=(null==(r=this.map)?void 0:r.allLayers.length)>0;if(t&&!this.spatialReference&&i){if(Object(z["k"])(e))return;const t=Object(Sa["b"])(()=>e=Object(z["a"])(e));e=Object(_["h"])(async t=>{try{await Object(_["a"])(this.spatialReferenceWarningDelay,null,t)}catch{return}finally{e=null}Fs.warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),this.handles.add(t,"spatial-reference-logger-task")}else this.handles.remove("spatial-reference-logger-task")},{sync:!0})])}destroy(){if(this.destroyed)return;this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=Object(z["d"])(this.graphics),this.analyses=Object(z["d"])(this.analyses),this.handles.remove("defaultsFromMap"),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.toolViewManager=Object(z["d"])(this.toolViewManager),this.layerViewManager=Object(z["d"])(this.layerViewManager),this.basemapView=Object(z["d"])(this.basemapView),this.invalidate(),this._emitter.clear(),this.handles.removeAll();const e=this.map;this.map=null,null==e||e.destroy()}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return Fs.error("#toMap()","Not implemented on this instance of View"),null}get _defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new Ls({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:e=>this.getSpatialReferenceSupport(e),...this._defaultsFromMapSettings})}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get interacting(){return this.navigating}get preconditionsReady(){var e;return!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||y["a"].isLoadable(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!(this._currentSpatialReference||null!=(e=this.defaultsFromMap)&&e.ready)||!this.typeSpecificPreconditionsReady)}set map(e){var t;e!==this._get("map")&&(null!=(t=e)&&t.destroyed&&(Fs.warn("#map","The provided map is already destroyed",{map:e}),e=null),y["a"].isLoadable(e)&&e.load().catch(()=>{}),this.initialized&&(this.forceReadyCycle(),this._currentSpatialReference=null),this._set("map",e))}get spatialReference(){var e,t;let r=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||null;return r&&null!=(e=this.defaultsFromMap)&&null!=(t=e.required)&&t.heightModelInfo&&(r=r.clone(),r.vcsWkid=this.defaultsFromMap.vcsWkid,r.latestVcsWkid=this.defaultsFromMap.latestVcsWkid),r}set spatialReference(e){const t=!Object(fe["d"])(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get initialExtent(){var e;return null==(e=this.defaultsFromMap)?void 0:e.extent}get cursor(){const e=this.toolViewManager?this.toolViewManager.cursor:null;return Object(z["k"])(e)?e:this._cursor||"default"}set cursor(e){this._cursor=e,this.notifyChange("cursor")}get size(){return[this.width,this.height]}whenLayerView(e){return this.layerViewManager.whenLayerView(e)}getDefaultSpatialReference(){var e;return null==(e=this.defaultsFromMap)?void 0:e.spatialReference}getDefaultHeightModelInfo(){var e,t,r;return null!=(e=null!=(t=this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)?t:null==(r=this.defaultsFromMap)?void 0:r.heightModelInfo)?e:null}importLayerView(e){throw new b["a"]("importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{}}_validateSpatialReference(e){return Object(z["k"])(this.getSpatialReferenceSupport({spatialReference:e}))}when(e,t){return this.isResolved()&&!this.ready&&Fs.warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(Object(oe["f"])(()=>!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}};ks.views=new h["a"],Object(l["a"])([Object(j["b"])()],ks.prototype,"_userSpatialReference",void 0),Object(l["a"])([Object(Pe["a"])("toolViewManager.activeTool")],ks.prototype,"activeTool",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"allLayerViews",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"groundView",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"animation",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"basemapView",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"_defaultsFromMapSettings",null),Object(l["a"])([Object(j["b"])()],ks.prototype,"defaultsFromMap",null),Object(l["a"])([Object(j["b"])()],ks.prototype,"fatalError",void 0),Object(l["a"])([Object(j["b"])({type:de["a"]})],ks.prototype,"extent",void 0),Object(l["a"])([Object(j["b"])(Object(Aa["b"])(Pa["a"],"graphics"))],ks.prototype,"graphics",void 0),Object(l["a"])([Object(j["b"])(Object(Aa["b"])(Ma,"analyses"))],ks.prototype,"analyses",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,type:Ca["a"]})],ks.prototype,"heightModelInfo",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"interacting",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"navigating",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_currentSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],ks.prototype,"preconditionsReady",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"typeSpecificPreconditionsReady",void 0),Object(l["a"])([Object(j["b"])({type:h["a"],readOnly:!0})],ks.prototype,"layerViews",void 0),Object(l["a"])([Object(j["b"])({type:za})],ks.prototype,"magnifier",void 0),Object(l["a"])([Object(j["b"])({value:null,type:re})],ks.prototype,"map",null),Object(l["a"])([Object(j["b"])()],ks.prototype,"padding",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"ready",void 0),Object(l["a"])([Object(j["b"])({type:ne["a"]})],ks.prototype,"spatialReference",null),Object(l["a"])([Object(j["b"])()],ks.prototype,"spatialReferenceWarningDelay",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"stationary",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"supportsGround",void 0),Object(l["a"])([Object(j["b"])({type:Ta["a"]})],ks.prototype,"timeExtent",void 0),Object(l["a"])([Object(Pe["a"])("toolViewManager.tools")],ks.prototype,"tools",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"toolViewManager",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"type",void 0),Object(l["a"])([Object(j["b"])({type:Number})],ks.prototype,"scale",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"updating",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"initialExtentRequired",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"initialExtent",null),Object(l["a"])([Object(j["b"])()],ks.prototype,"cursor",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"input",void 0),Object(l["a"])([Object(j["b"])({type:Ss,nonNullable:!0})],ks.prototype,"navigation",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"layerViewManager",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"analysisViewManager",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"width",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"height",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"resizing",void 0),Object(l["a"])([Object(j["b"])({value:null,readOnly:!0})],ks.prototype,"size",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"suspended",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"viewEvents",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ks.prototype,"persistableViewModels",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"_isValid",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"_readyCycleForced",void 0),Object(l["a"])([Object(j["b"])()],ks.prototype,"_currentSpatialReference",void 0),ks=Ns=Object(l["a"])([Object(x["a"])("esri.views.View")],ks);const Us=ks;let zs=class extends Ea["a"]{constructor(e){super(e),this.state="running",this.target=null}initialize(){this.addResolvingPromise(new Promise((e,t)=>this._dfd={resolve:e,reject:t}))}get done(){return"finished"===this.state||"stopped"===this.state}stop(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","stopped"),this._dfd.reject(new b["a"]("ViewAnimation stopped")))}finish(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","finished"),this._dfd.resolve())}update(e,t){t||(t=Object(_["o"])(e)?"waiting-for-target":"running"),this._set("target",e),this._set("state",t)}};Object(l["a"])([Object(j["b"])({readOnly:!0})],zs.prototype,"done",null),Object(l["a"])([Object(j["b"])({readOnly:!0,type:String})],zs.prototype,"state",void 0),Object(l["a"])([Object(j["b"])()],zs.prototype,"target",void 0),zs=Object(l["a"])([Object(x["a"])("esri.views.ViewAnimation")],zs),function(e){e.State={RUNNING:"running",STOPPED:"stopped",FINISHED:"finished",WAITING_FOR_TARGET:"waiting-for-target"}}(zs||(zs={}));const Bs=zs;var Vs=r("0554"),Gs=r("a98b");class Hs{constructor(e,t,r,i){const n=e.targetGeometry,a=t.targetGeometry;i?"string"==typeof i&&(i=Object(Vs["b"])(i)||Vs["a"].ease):i=Vs["a"].ease,this.easing=i,this.duration=r,this.sCenterX=n.x,this.sCenterY=n.y,this.sScale=e.scale,this.sRotation=e.rotation,this.tCenterX=a.x,this.tCenterY=a.y,this.tScale=t.scale,this.tRotation=t.rotation,this.dCenterX=this.tCenterX-this.sCenterX,this.dCenterY=this.tCenterY-this.sCenterY,this.dScale=this.tScale-this.sScale,this.dRotation=this.tRotation-this.sRotation,this.dRotation>180?this.dRotation-=360:this.dRotation<-180&&(this.dRotation+=360)}applyRatio(e,t){const r=this.easing(t);let i,n,a,s;t>=1?(i=this.tCenterX,n=this.tCenterY,a=this.tRotation,s=this.tScale):(i=this.sCenterX+r*this.dCenterX,n=this.sCenterY+r*this.dCenterY,a=this.sRotation+r*this.dRotation,s=this.sScale+r*this.dScale),e.targetGeometry.x=i,e.targetGeometry.y=n,e.scale=s,e.rotation=a}}let qs=class extends F["a"]{constructor(e){super(e),this.duration=200,this.transition=null,this.easing=Vs["a"].ease,this.view=null,this.viewpoint=null,this.viewpoint=new ae["a"]({targetGeometry:new he["a"],scale:0,rotation:0}),this._updateTask=Object(xe["a"])({postRender:this._postRender.bind(this)}),this._updateTask.pause()}destroy(){this._updateTask.remove(),this._updateTask=null}animate(e,t,r){this.stop();const i=this.viewpoint;Object(Gs["d"])(i,t),this.transition=new Hs(this.viewpoint,e.target,r&&r.duration||this.duration,r&&r.easing||this.easing);const n=()=>{this.animation===e&&this._updateTask&&("finished"===e.state&&(this.transition.applyRatio(this.viewpoint,1),this.view.state&&(this.view.state.viewpoint=this.viewpoint.clone())),this.animation=null,this.updateFunction=null)};return e.when(n,n),this._startTime=performance.now(),this._updateTask.resume(),this.animation=e,e}animateContinous(e,t){this.stop(),this.updateFunction=t,this.viewpoint=e;const r=new Bs({target:e.clone()}),i=()=>{this.animation===r&&this._updateTask&&(this.animation=null,this.updateFunction=null)};return r.when(i,i),this._startTime=performance.now(),this._updateTask.resume(),this.animation=r,r}stop(){this.animation&&(this.animation.stop(),this.animation=null,this.updateFunction=null)}_postRender(e){const t=this.animation;if(t&&t.state!==Bs.State.STOPPED){if(this.updateFunction)this.updateFunction(this.viewpoint,e.deltaTime);else{const e=(performance.now()-this._startTime)/this.transition.duration,t=e>=1;this.transition.applyRatio(this.viewpoint,e),t&&this.animation.finish()}this.view.state&&(this.view.state.viewpoint=this.viewpoint.clone())}else this._updateTask.pause()}};Object(l["a"])([Object(j["b"])()],qs.prototype,"animation",void 0),Object(l["a"])([Object(j["b"])()],qs.prototype,"duration",void 0),Object(l["a"])([Object(j["b"])()],qs.prototype,"transition",void 0),Object(l["a"])([Object(j["b"])()],qs.prototype,"easing",void 0),Object(l["a"])([Object(j["b"])()],qs.prototype,"view",void 0),Object(l["a"])([Object(j["b"])()],qs.prototype,"viewpoint",void 0),qs=Object(l["a"])([Object(x["a"])("esri.views.2d.AnimationManager")],qs);const Ws=qs;class $s{constructor(e){this.view=e,this._frameTaskHandle=null,this._updateRequested=!1,this.stationary=!0,this.animationInProgress=!1,this.prepare=()=>{this._updateParameters.state=this.view.state,this._updateParameters.stationary=this.view.stationary,this._updateParameters.pixelRatio=window.devicePixelRatio,this._updateParameters.renderingOptions=this.view.renderingOptions},this.update=()=>{this._updateRequested=!1;const{basemapView:e,graphicsView:t,labelManager:r,layerViews:i,state:{id:n}}=this.view;e.baseLayerViews.forEach(this._updateLayerView,this),i.forEach(this._updateLayerView,this),e.referenceLayerViews.forEach(this._updateLayerView,this),Object(z["k"])(r)&&(r.lastUpdateId!==n&&(r.viewChange(),r.lastUpdateId=n),r.updateRequested&&r.processUpdate(this._updateParameters)),Object(z["k"])(t)&&(t.lastUpdateId!==n&&(t.viewChange(),t.lastUpdateId=n),t.updateRequested&&t.processUpdate(this._updateParameters)),this.view.graphicsTileStore.setViewState(this._updateParameters.state),this.animationInProgress||this._updateRequested||this._frameTaskHandle.pause()}}destroy(){this.stop()}start(){this._frameTaskHandle||(this.stationary=this.view.stationary,this._updateParameters={state:this.view.state,pixelRatio:window.devicePixelRatio,stationary:this.stationary,renderingOptions:this.view.renderingOptions},this._stationaryHandle=this.view.watch("stationary",e=>{this.stationary=e,this.requestFrame()}),this._frameTaskHandle=Object(xe["a"])(this),this.requestUpdate())}stop(){this._frameTaskHandle&&(this._updateRequested=!1,this._stationaryHandle.remove(),this._frameTaskHandle.remove(),this._updateParameters=this._stationaryHandle=this._frameTaskHandle=null,this.stationary=!0,this.animationInProgress=!1)}requestUpdate(){this._updateRequested||(this._updateRequested=!0,this.requestFrame())}requestFrame(){this._frameTaskHandle&&this._frameTaskHandle.resume()}_updateLayerView(e){const t=this.view.state,r=e.lastUpdateId;null!=r&&(this.stationary||e.moving)||(e.moving=!0,e.moveStart()),r!==t.id&&e.viewChange(),this.stationary&&e.moving&&(e.moving=!1,e.moveEnd()),e.lastUpdateId=t.id,e.updateRequested&&e.processUpdate(this._updateParameters),"layerViews"in e&&e.layerViews.forEach(this._updateLayerView,this)}}function Zs(){return Promise.all([r.e("chunk-6c50f5ec").then(r.bind(null,"0943")),Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-534c2194")]).then(r.bind(null,"b460"))])}const Xs=()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-2f44d502")]).then(r.bind(null,"02b4"))),Ys=()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-44f12b50")]).then(r.bind(null,"189c6"))),Js={"base-dynamic":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-76ef664d")]).then(r.bind(null,"b969"))),"base-tile":Xs,"bing-maps":Xs,csv:Ys,"geo-rss":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-548008dd")]).then(r.bind(null,"53193"))),feature:Ys,geojson:Ys,graphics:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-19203d7c")]).then(r.bind(null,"c70f"))),group:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-355e99e4")]).then(r.bind(null,"d86a"))),imagery:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-68f9ea7c")]).then(r.bind(null,"7f5c"))),"imagery-tile":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-0b4cc6fb")]).then(r.bind(null,"aebc"))),kml:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-5e7af38d")]).then(r.bind(null,"a0ce"))),"map-image":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-6a26d8d8")]).then(r.bind(null,"e818"))),"map-notes":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-0f5b76e0")]).then(r.bind(null,"791a"))),"ogc-feature":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-44f12b50"),r.e("chunk-02817b8c")]).then(r.bind(null,"6cbe"))),"open-street-map":Xs,route:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-31cfa374")]).then(r.bind(null,"04b6"))),stream:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-44f12b50"),r.e("chunk-2d237116")]).then(r.bind(null,"fa16"))),"subtype-group":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-44f12b50"),r.e("chunk-2d0e62e7")]).then(r.bind(null,"983e"))),tile:Xs,"vector-tile":()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-d2111408"),r.e("chunk-8745edba")]).then(r.bind(null,"46bf"))),wcs:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-0b4cc6fb")]).then(r.bind(null,"aebc"))),"web-tile":Xs,wfs:Ys,wms:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-903c6fe0")]).then(r.bind(null,"2535"))),wmts:()=>Zs().then(()=>Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-41ab6040")]).then(r.bind(null,"4072"))),analysis:null,"base-elevation":null,"building-scene":null,elevation:null,"integrated-mesh":null,"point-cloud":null,voxel:null,scene:null,unknown:null,unsupported:null};function Qs(e){const t=e.declaredClass?e.declaredClass.slice(e.declaredClass.lastIndexOf(".")+1):"Unknown",r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new b["a"](r+":view-not-supported",t+" is not supported in 2D")}const Ks={hasLayerViewModule:e=>Object(z["k"])(Js[e.type]),importLayerView:e=>{const t=Js[e.type];if(!Object(z["k"])(t))throw Qs(e);return t(e)}};var eo,to=r("50e6"),ro=r("2172"),io=r("3349"),no=r("32ed");function ao(e,t){const{spatialReference:r}=t,i=[t.x,t.y];let n=Number.POSITIVE_INFINITY,a=0,s=0;const o=[0,0],c="extent"===e.type?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]:e.rings;for(const l of c)for(let e=0;e<l.length-1;e++){Object(no["g"])(o,i,l,e);const t=Object(io["b"])(i,o);t<n&&(n=t,a=o[0],s=o[1])}return{coordinate:new he["a"]({x:a,y:s,spatialReference:r}),distance:n}}const so=v["a"].getLogger("esri.views.MapView");let oo=eo=class extends F["a"]{constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(Object(z["j"])(this.geometry)||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return Object(pe["m"])(this.geometry,this.spatialReference)}catch(e){return so.error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,t){if(Object(z["j"])(this.normalizedGeometry))return e;const r=e.targetGeometry;if("extent"===this.normalizedGeometry.type?Object(ro["e"])(this.normalizedGeometry,r):Object(ro["g"])(this.normalizedGeometry,r))return e;const{coordinate:i}=ao(this.normalizedGeometry,r);return i?(e.targetGeometry=i,e):e}clone(){var e,t;return new eo({geometry:null==(e=this.geometry)?void 0:e.clone(),spatialReference:null==(t=this.spatialReference)?void 0:t.clone()})}};var co;Object(l["a"])([Object(j["b"])({constructOnly:!0})],oo.prototype,"geometry",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],oo.prototype,"normalizedGeometry",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],oo.prototype,"spatialReference",void 0),oo=eo=Object(l["a"])([Object(x["a"])("esri.views.2d.constraints.GeometryConstraint")],oo);let lo=co=class extends F["a"]{constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(e,t){return this.enabled&&t?(this.rotationEnabled||(e.rotation=t.rotation),e):e}clone(){return new co({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};Object(l["a"])([Object(j["b"])()],lo.prototype,"enabled",void 0),Object(l["a"])([Object(j["b"])()],lo.prototype,"rotationEnabled",void 0),lo=co=Object(l["a"])([Object(x["a"])("esri.views.2d.constraints.RotationConstraint")],lo);const uo=lo;var ho;let po=ho=class extends F["a"]{constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:r,maxScale:i,minZoom:n,maxZoom:a}=this,s=-1,o=-1,c=!1,l=!1;if(0!==r&&0!==i&&r<i&&([r,i]=[i,r]),!t||!t.length)return this._set("effectiveMinScale",r),void this._set("effectiveMaxScale",i);t=t.map(e=>e.clone()),t.sort((e,t)=>t.scale-e.scale),t.forEach((e,t)=>e.level=t);for(const u of t)!c&&r>0&&r>=u.scale&&(s=u.level,c=!0),!l&&i>0&&i>=u.scale&&(o=e?e.level:-1,l=!0),e=u;-1===n&&(n=0===r?0:s),-1===a&&(a=0===i?t.length-1:o),n=Math.max(n,0),n=Math.min(n,t.length-1),a=Math.max(a,0),a=Math.min(a,t.length-1),n>a&&([n,a]=[a,n]),r=t[n].scale,i=t[a].scale,t.splice(0,n),t.splice(a-n+1,t.length),t.forEach((e,t)=>{this._lodByScale[e.scale]=e,this._scales[t]=e.scale}),this._set("effectiveLODs",t),this._set("effectiveMinZoom",n),this._set("effectiveMaxZoom",a),this._set("effectiveMinScale",r),this._set("effectiveMaxScale",i)}constrain(e,t){if(t&&e.scale===t.scale)return e;const r=this.effectiveMinScale,i=this.effectiveMaxScale,n=e.targetGeometry,a=t&&t.targetGeometry,s=0!==i&&e.scale<i,o=0!==r&&e.scale>r;if(s||o){const s=o?r:i;if(a){const r=(s-t.scale)/(e.scale-t.scale);n.x=a.x+(n.x-a.x)*r,n.y=a.y+(n.y-a.y)*r}e.scale=s}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),r=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(r>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const r=Math.round(e-.5),i=Math.round(e);return t[i]+(i-e)*(t[r]-t[i])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let r,i;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let n=0;n<t.length-1;n++){if(r=t[n],i=t[n+1],i===e)return n+this.effectiveMinZoom+1;if(r>e&&i<e)return n+this.effectiveMinZoom+1-(e-i)/(r-i)}}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const r=Math.round(this.scaleToZoom(e));return this.zoomToScale(r+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const r=Math.round(this.scaleToZoom(e));return this.zoomToScale(r-1)}clone(){return new ho({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce((t,r)=>Math.abs(r-e)<=Math.abs(t-e)?r:t,this._scales[0])),this._lodByScale[e].scale}};Object(l["a"])([Object(j["b"])({readOnly:!0})],po.prototype,"effectiveLODs",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],po.prototype,"effectiveMinZoom",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],po.prototype,"effectiveMaxZoom",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],po.prototype,"effectiveMinScale",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],po.prototype,"effectiveMaxScale",void 0),Object(l["a"])([Object(j["b"])()],po.prototype,"lods",void 0),Object(l["a"])([Object(j["b"])()],po.prototype,"minZoom",void 0),Object(l["a"])([Object(j["b"])()],po.prototype,"maxZoom",void 0),Object(l["a"])([Object(j["b"])()],po.prototype,"minScale",void 0),Object(l["a"])([Object(j["b"])()],po.prototype,"maxScale",void 0),Object(l["a"])([Object(j["b"])()],po.prototype,"snapToZoom",void 0),po=ho=Object(l["a"])([Object(x["a"])("esri.views.2d.constraints.ZoomConstraint")],po);const fo=po;var bo=r("1219");const mo={base:null,key:"type",typeMap:{extent:de["a"],polygon:bo["a"]}};let go=class extends F["a"]{constructor(e){super(e),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0}destroy(){this.view=null,this._set("_zoom",null),this._set("_rotation",null),this._set("_geometry",null)}set geometry(e){e?this._set("geometry",e):this._set("geometry",null)}get version(){var e;return this.commitProperty("_zoom"),this.commitProperty("_rotation"),this.commitProperty("_geometry"),(null!=(e=this._get("version"))?e:0)+1}get _defaultLODs(){var e,t,r;const i=null==(e=this.view)||null==(t=e.defaultsFromMap)?void 0:t.tileInfo,n=null==(r=this.view)?void 0:r.spatialReference;return i&&n&&i.spatialReference.equals(n)?i.lods:null}get _geometry(){var e;return new oo({geometry:this.geometry,spatialReference:null==(e=this.view)?void 0:e.spatialReference})}get _rotation(){return new uo({rotationEnabled:this.rotationEnabled})}get _zoom(){const e=this._get("_zoom"),t=this.lods||this._defaultLODs,r=this.minZoom,i=this.maxZoom,n=this.minScale,a=this.maxScale,s=this.snapToZoom;return e&&e.lods===t&&e.minZoom===r&&e.maxZoom===i&&e.minScale===n&&e.maxScale===a&&e.snapToZoom===s?e:new fo({lods:t,minZoom:r,maxZoom:i,minScale:n,maxScale:a,snapToZoom:s})}canZoomInTo(e){const t=this.effectiveMaxScale;return 0===t||e>=t}canZoomOutTo(e){const t=this.effectiveMinScale;return 0===t||e<=t}constrain(e,t){return this._zoom.constrain(e,t),this._rotation.constrain(e,t),this._geometry.constrain(e,t),e}constrainByGeometry(e){return this._geometry.constrain(e)}fit(e){return this._zoom.fit(e)}zoomToScale(e){return this._zoom.zoomToScale(e)}scaleToZoom(e){return this._zoom.scaleToZoom(e)}snapScale(e){return this._zoom.snapToClosestScale(e)}snapToNextScale(e){return this._zoom.snapToNextScale(e)}snapToPreviousScale(e){return this._zoom.snapToPreviousScale(e)}};Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_zoom.effectiveLODs"})],go.prototype,"effectiveLODs",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_zoom.effectiveMinScale"})],go.prototype,"effectiveMinScale",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_zoom.effectiveMaxScale"})],go.prototype,"effectiveMaxScale",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_zoom.effectiveMinZoom"})],go.prototype,"effectiveMinZoom",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_zoom.effectiveMaxZoom"})],go.prototype,"effectiveMaxZoom",void 0),Object(l["a"])([Object(j["b"])({types:mo,value:null})],go.prototype,"geometry",null),Object(l["a"])([Object(j["b"])({type:[to["a"]]})],go.prototype,"lods",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"minScale",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"maxScale",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"minZoom",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"maxZoom",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"rotationEnabled",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"snapToZoom",void 0),Object(l["a"])([Object(j["b"])()],go.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],go.prototype,"version",null),Object(l["a"])([Object(j["b"])()],go.prototype,"_defaultLODs",null),Object(l["a"])([Object(j["b"])({type:oo})],go.prototype,"_geometry",null),Object(l["a"])([Object(j["b"])({type:uo})],go.prototype,"_rotation",null),Object(l["a"])([Object(j["b"])({readOnly:!0,type:fo})],go.prototype,"_zoom",null),go=Object(l["a"])([Object(x["a"])("esri.views.2d.MapViewConstraints")],go);const yo=go;var Oo,vo=r("02f1"),_o=r("4212"),jo=r("a29a"),wo=r("2c63"),xo=r("f7eb"),To=r("1c92"),So=r("8c71"),Eo=r("738e");function Ao(e){return e instanceof Float32Array&&e.length>=2}function Co(e){return Array.isArray(e)&&e.length>=2}function Ro(e){return Ao(e)||Co(e)}const Mo=[0,0];let Po=Oo=class extends m["a"]{constructor(e){super(e),this._viewpoint2D={center:Object(vo["b"])(),rotation:0,scale:0,spatialReference:null},this.center=[0,0],this.extent=new de["a"],this.id=0,this.inverseTransform=Object(xo["a"])(),this.resolution=0,this.rotation=0,this.scale=0,this.transform=Object(xo["a"])(),this.transformNoRotation=Object(xo["a"])(),this.displayMat3=Object(So["b"])(),this.displayViewMat3=Object(So["b"])(),this.viewMat3=Object(So["b"])(),this.viewMat2d=Object(wo["a"])(),this.worldScreenWidth=0,this.size=[0,0]}set pixelRatio(e){this._set("pixelRatio",e),this._update()}set size(e){this._set("size",e),this._update()}set viewpoint(e){if(e){const t=this._viewpoint2D,r=e.targetGeometry;t.center[0]=r.x,t.center[1]=r.y,t.rotation=e.rotation,t.scale=e.scale,t.spatialReference=r.spatialReference}this._update()}copy(e){const t=this.size,r=this.viewpoint;return r&&t?(this.viewpoint=Object(Gs["d"])(r,e.viewpoint),this._set("size",Object(io["c"])(t,e.size))):(this.viewpoint=e.viewpoint.clone(),this._set("size",[e.size[0],e.size[1]])),this._set("pixelRatio",e.pixelRatio),this}clone(){return new Oo({size:this.size,viewpoint:this.viewpoint.clone(),pixelRatio:this.pixelRatio})}toMap(e,t,r){return Ro(t)?Object(io["t"])(e,t,this.inverseTransform):(Mo[0]=t,Mo[1]=r,Object(io["t"])(e,Mo,this.inverseTransform))}toScreen(e,t,r){return Ro(t)?Object(io["t"])(e,t,this.transform):(Mo[0]=t,Mo[1]=r,Object(io["t"])(e,Mo,this.transform))}toScreenNoRotation(e,t,r){return Ro(t)?Object(io["t"])(e,t,this.transformNoRotation):(Mo[0]=t,Mo[1]=r,Object(io["t"])(e,Mo,this.transformNoRotation))}getScreenTransform(e,t){const{center:r}=this._viewpoint2D,i=this._get("pixelRatio")||1,n=this._get("size");return Object(Gs["i"])(e,r,n,t,0,i),e}_update(){const{center:e,spatialReference:t,scale:r,rotation:i}=this._viewpoint2D,n=this._get("pixelRatio")||1,a=this._get("size"),s=new ae["a"]({targetGeometry:new he["a"](e[0],e[1],t),scale:r,rotation:i});if(this._set("viewpoint",s),!a||!t||!r)return;this.resolution=Object(Gs["k"])(s),this.rotation=i,this.scale=r,this.spatialReference=t,Object(io["c"])(this.center,e);const o=0!==a[0]?2/a[0]:0,c=0!==a[1]?-2/a[1]:0;Object(To["o"])(this.displayMat3,o,0,0,0,c,0,-1,1,1);const l=Object(To["b"])(this.viewMat3),u=Object(Eo["b"])(a[0]/2,a[1]/2),d=Object(Eo["b"])(-a[0]/2,-a[1]/2),h=Object(_o["c"])(i);Object(To["c"])(l,l,u),Object(To["n"])(l,l,h),Object(To["c"])(l,l,d),Object(To["l"])(this.displayViewMat3,this.displayMat3,l);const p=Object(jo["a"])(this.viewMat2d,u);return Object(jo["g"])(p,p,h),Object(jo["i"])(p,p,d),Object(Gs["h"])(this.extent,s,a),Object(Gs["l"])(this.transform,s,a,n),Object(jo["e"])(this.inverseTransform,this.transform),Object(Gs["m"])(this.transformNoRotation,s,a,n),this.worldScreenWidth=Object(Gs["n"])(this.spatialReference,this.resolution),this._set("id",this.id+1),this}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Po.prototype,"id",void 0),Object(l["a"])([Object(j["b"])({value:1,json:{write:!0}})],Po.prototype,"pixelRatio",null),Object(l["a"])([Object(j["b"])({json:{write:!0}})],Po.prototype,"size",null),Object(l["a"])([Object(j["b"])()],Po.prototype,"spatialReference",void 0),Object(l["a"])([Object(j["b"])({type:ae["a"],json:{write:!0}})],Po.prototype,"viewpoint",null),Po=Oo=Object(l["a"])([Object(x["a"])("esri.views.2d.ViewState")],Po);const Io=Po;var Do,Lo;let No=Do=class extends F["a"]{constructor(){super(...arguments),this.left=0,this.top=0,this.right=0,this.bottom=0}clone(){return new Do({left:this.left,top:this.top,right:this.right,bottom:this.bottom})}};Object(l["a"])([Object(j["b"])()],No.prototype,"left",void 0),Object(l["a"])([Object(j["b"])()],No.prototype,"top",void 0),Object(l["a"])([Object(j["b"])()],No.prototype,"right",void 0),Object(l["a"])([Object(j["b"])()],No.prototype,"bottom",void 0),No=Do=Object(l["a"])([Object(x["a"])("esri.views.2d.PaddedViewState.Padding")],No);let Fo=Lo=class extends Io{constructor(...e){super(...e),this.paddedViewState=new Io,this._updateContent=(()=>{const e=Object(vo["b"])();return()=>{const t=this._get("size"),r=this._get("padding");if(!t||!r)return;const i=this.paddedViewState;Object(io["s"])(e,r.left+r.right,r.top+r.bottom),Object(io["f"])(e,t,e),Object(io["c"])(i.size,e);const n=i.viewpoint;n&&(this.viewpoint=n)}})(),this.watch(["size","padding"],this._updateContent,!0),this.padding=new No,this.size=[0,0]}set padding(e){this._set("padding",e||new No)}set viewpoint(e){if(e){const t=e.clone();this.paddedViewState.viewpoint=e,Object(Gs["a"])(t,e,this._get("size"),this._get("padding"));const r=this._viewpoint2D,i=t.targetGeometry;r.center[0]=i.x,r.center[1]=i.y,r.rotation=t.rotation,r.scale=t.scale,r.spatialReference=i.spatialReference,this._update()}}clone(){return new Lo({padding:this.padding.clone(),size:this.size.slice(),viewpoint:this.paddedViewState.viewpoint.clone(),pixelRatio:this.pixelRatio})}};Object(l["a"])([Object(j["b"])()],Fo.prototype,"paddedViewState",void 0),Object(l["a"])([Object(j["b"])({type:No})],Fo.prototype,"padding",null),Object(l["a"])([Object(j["b"])()],Fo.prototype,"viewpoint",null),Fo=Lo=Object(l["a"])([Object(x["a"])("esri.views.2d.PaddedViewState")],Fo);const ko=Fo;r("3e7b");var Uo=r("018d");r("ae54"),r("07cd"),r("d302");function zo(e,t){switch(t){case"primary":return"touch"===e.pointerType||0===e.button;case"secondary":return"touch"!==e.pointerType&&2===e.button;case"tertiary":return"touch"!==e.pointerType&&1===e.button}}function Bo(e,t){if("touch"===e.pointerType)return!1;switch(t){case"primary":return 0===e.button;case"secondary":return 2===e.button;case"tertiary":return 1===e.button}}class Vo extends Ha["a"]{constructor(e,t){super(!0),this.view=e,this.registerIncoming("double-click",t,e=>this._handleDoubleClick(e,t))}_handleDoubleClick(e,t){zo(e.data,"primary")&&(e.stopPropagation(),t?this.view.mapViewNavigation.zoomOut([e.data.x,e.data.y]):this.view.mapViewNavigation.zoomIn([e.data.x,e.data.y]))}}class Go extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.pointerType=t,this.registerIncoming("double-tap-drag",r,e=>this._handleDoubleTapDrag(e))}_handleDoubleTapDrag(e){const{data:t}=e,{pointerType:r}=t;if(r!==this.pointerType)return;e.stopPropagation();const{action:i,delta:n}=t,{view:a}=this,{mapViewNavigation:s}=a;switch(i){case"begin":{const{scale:e}=a;this._startScale=e,this._currentScale=e,this._previousDelta=n,s.begin();break}case"update":{if(this._previousDelta.y===n.y)return;this._previousDelta=n;const e=1.015**n.y,t=this._startScale*e,r=t/this._currentScale;s.setViewpointImmediate(r),this._currentScale=t;break}case"end":{const{constraints:e}=a,{effectiveLODs:t,snapToZoom:r}=e;if(!r||!t)return void s.end();const i=e.snapScale(this._currentScale),o=(n.y>0?Math.max(i,e.snapToPreviousScale(this._startScale)):Math.min(i,e.snapToNextScale(this._startScale)))/this._currentScale;s.zoom(o);break}}}}class Ho{constructor(e){this.callbacks=e,this.currentCount=0,this.callbacks.condition||(this.callbacks.condition=()=>!0)}handle(e){const t=e.data,r=t.pointers.size;switch(t.action){case"start":this.currentCount=r,this._emitStart(e);break;case"added":this._emitEnd(this.previousEvent),this.currentCount=r,this._emitStart(e);break;case"update":this._emitUpdate(e);break;case"removed":this.startEvent&&this._emitEnd(this.previousEvent),this.currentCount=r,this._emitStart(e);break;case"end":this._emitEnd(e),this.currentCount=0}this.previousEvent=e}_emitStart(e){this.startEvent=e,this.callbacks.condition(this.currentCount,e)&&this.callbacks.start(this.currentCount,e,this.startEvent)}_emitUpdate(e){this.callbacks.condition(this.currentCount,e)&&this.callbacks.update(this.currentCount,e,this.startEvent)}_emitEnd(e){this.callbacks.condition(this.currentCount,e)&&this.callbacks.end(this.currentCount,e,this.startEvent),this.startEvent=null}}class qo extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.pointerAction=t,this.registerIncoming("drag",r,e=>this._handleDrag(e)),this.registerIncoming("pointer-down",()=>this.stopMomentumNavigation())}onInstall(e){super.onInstall(e),this.dragEventSeparator=new Ho({start:(e,t)=>{this.view.mapViewNavigation.pan.begin(this.view,t.data),t.stopPropagation()},update:(e,t)=>{this.view.mapViewNavigation.pan.update(this.view,t.data),t.stopPropagation()},end:(e,t)=>{this.view.mapViewNavigation.pan.end(this.view,t.data),t.stopPropagation()},condition:(e,t)=>1===e&&zo(t.data,this.pointerAction)})}_handleDrag(e){const t=this.view.mapViewNavigation;t.pinch.zoomMomentum||t.pinch.rotateMomentum?this.stopMomentumNavigation():this.dragEventSeparator.handle(e)}stopMomentumNavigation(){this.view.mapViewNavigation.pan.stopMomentumNavigation()}}class Wo extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.pointerAction=t;const i=this.view.mapViewNavigation;this.dragEventSeparator=new Ho({start:(e,t)=>{i.rotate.begin(this.view,t.data),t.stopPropagation()},update:(e,t)=>{i.rotate.update(this.view,t.data),t.stopPropagation()},end:(e,t)=>{i.rotate.end(),t.stopPropagation()},condition:(e,t)=>1===e&&zo(t.data,this.pointerAction)}),this.registerIncoming("drag",r,e=>this.dragEventSeparator.handle(e))}}var $o=r("e431");function Zo(e){let t=e*e;return e<0&&(t*=-1),t}function Xo(e){return e.translation[0]=0,e.translation[1]=0,e.translation[2]=0,e.heading=0,e.tilt=0,e}function Yo(e,t,r){const i=r,n=e.state,a=e.device,s="forward-down"===t.tiltDirection?1:-1,o=1;return"standard"===a.deviceType?(i.translation[0]=Zo(n.axes[0]),i.translation[1]=Zo(n.axes[1]),i.translation[2]=Zo(n.buttons[7])-Zo(n.buttons[6]),i.heading=Zo(n.axes[2]),i.tilt=Zo(n.axes[3])):"spacemouse"===a.deviceType&&(i.translation[0]=1.2*Zo(n.axes[0]),i.translation[1]=1.2*Zo(n.axes[1]),i.translation[2]=2*-Zo(n.axes[2]),i.heading=1.2*Zo(n.axes[5]),i.tilt=1.2*Zo(n.axes[3])),i.tilt*=s,Object($o["g"])(i.translation,i.translation,o),i}function Jo(e,t){const r=t;return r.translation[0]=e[1]-e[0],r.translation[1]=e[3]-e[2],r.translation[2]=e[4]-e[5],r.heading=e[7]-e[6],r.tilt=e[8]-e[9],r.zoom=e[10]-e[11],r}function Qo(e){return 0===e.translation[0]&&0===e.translation[1]&&0===e.translation[2]&&0===e.heading&&0===e.tilt&&0===e.zoom}class Ko extends Ha["a"]{constructor(e){super(!0),this.view=e,this.frameTask=null,this.watchHandles=new ge["a"],this.currentDevice=null,this.transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this.handle=this.registerIncoming("gamepad",e=>this._handleGamePadEvent(e)),this.handle.pause()}onInstall(e){super.onInstall(e),this.watchHandles.add([Object(Me["a"])(this.view.navigation.gamepad,"enabled",e=>{e?(this.handle.resume(),this.frameTask||(this.frameTask=Object(xe["a"])({update:e=>this._frameUpdate(e.deltaTime)}))):(this.handle.pause(),this.frameTask&&(this.frameTask.remove(),this.frameTask=null))})])}onUninstall(){this.watchHandles.removeAll(),this.frameTask&&(this.frameTask.remove(),this.frameTask=null),super.onUninstall()}_handleGamePadEvent(e){const t=this.view.navigation.gamepad.device;t&&e.data.device!==t||this.currentDevice&&this.currentDevice!==e.data.device||("end"===e.data.action?(this.currentDevice=null,Xo(this.transformation)):(this.currentDevice=e.data.device,Yo(e.data,this.view.navigation.gamepad,this.transformation)))}_frameUpdate(e){const t=this.transformation;if(Qo(t))return;const r=this.view.viewpoint.clone(),i=this.view.navigation.gamepad.velocityFactor,n=tc*i*e;Object(Gs["w"])(r,r,[t.translation[0]*n,-t.translation[1]*n]);const a=1+t.translation[2]*rc*e,s=this.view.constraints.rotationEnabled?-t.heading*ec*e:0,o=this.view.size,c=[o[0]/2,o[1]];Object(Gs["t"])(r,r,a,s,c,o);const l=this.view.constraints.constrain(r,this.view.viewpoint);this.view.viewpoint=l}}const ec=.06,tc=.7,rc=6e-4;class ic extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.keys=t,this._pressed=!1,this._keyMap={[t.left]:"left",[t.right]:"right",[t.up]:"up",[t.down]:"down"},this.registerIncoming("key-down",r,e=>this._handleKeyDown(e)),this.registerIncoming("key-up",r,e=>this._handleKeyUp(e)),this.registerIncoming("blur",r,()=>this._handleBlur())}_handleKeyDown(e){e.data.repeat||this._handleKey(e,!0)}_handleKeyUp(e){this._handleKey(e,!1)}_handleBlur(){this._pressed&&(this._pressed=!1,this.view.mapViewNavigation.stop())}_handleKey(e,t){const r=this._keyMap[e.data.key];if(this._pressed=null!=r,this._pressed){if(t)switch(this.view.mapViewNavigation.begin(),r){case"left":this.view.mapViewNavigation.continousPanLeft();break;case"right":this.view.mapViewNavigation.continousPanRight();break;case"up":this.view.mapViewNavigation.continousPanUp();break;case"down":this.view.mapViewNavigation.continousPanDown()}else this._pressed=!1,this.view.mapViewNavigation.stop();e.stopPropagation()}}}class nc extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.keys=t,this._pressed=!1,this._keyToDirection={[t.clockwiseOption1]:"clockwise",[t.clockwiseOption2]:"clockwise",[t.counterClockwiseOption1]:"counterClockwise",[t.counterClockwiseOption2]:"counterClockwise",[t.resetOption1]:"reset",[t.resetOption2]:"reset"},this.registerIncoming("key-down",r,e=>this._handleKeyDown(e)),this.registerIncoming("key-up",r,e=>this._handleKeyUp(e)),this.registerIncoming("blur",r,()=>this._handleBlur())}_handleKeyDown(e){e.data.repeat||this._handleKey(e,!0)}_handleKeyUp(e){this._handleKey(e,!1)}_handleBlur(){this._pressed&&(this._pressed=!1,this.view.mapViewNavigation.stop())}_handleKey(e,t){const r=e.modifiers;if(r.size>0&&!r.has("Shift")||!this.view.constraints.rotationEnabled)return;const i=this._keyToDirection[e.data.key];if(this._pressed=null!=i,this._pressed){if(t)switch(this.view.mapViewNavigation.begin(),i){case"clockwise":this.view.mapViewNavigation.continousRotateClockwise();break;case"counterClockwise":this.view.mapViewNavigation.continousRotateCounterclockwise();break;case"reset":this.view.mapViewNavigation.resetRotation()}else this._pressed=!1,this.view.mapViewNavigation.stop();e.stopPropagation()}}}var ac;!function(e){e[e.IN=0]="IN",e[e.OUT=1]="OUT"}(ac||(ac={}));class sc extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.keys=t,this._keysToZoomAction={},this.registerIncoming("key-down",r,e=>this._handleKeyDown(e)),t.zoomIn.forEach(e=>this._keysToZoomAction[e]=ac.IN),t.zoomOut.forEach(e=>this._keysToZoomAction[e]=ac.OUT)}_handleKeyDown(e){this._handleKey(e)}_handleKey(e){const t=e.modifiers;if(t.size>0&&!t.has("Shift"))return;const{key:r}=e.data;if(!(r in this._keysToZoomAction))return;const i=this._keysToZoomAction[r],{mapViewNavigation:n}=this.view;let a=null;switch(i){case ac.IN:a=n.zoomIn();break;case ac.OUT:a=n.zoomOut();break;default:return}n.begin(),a.then(()=>n.end()),e.stopPropagation()}}const oc=.6;class cc extends Ha["a"]{constructor(e,t){super(!0),this.view=e,this._canZoom=!0,this.registerIncoming("mouse-wheel",t,e=>this._handleMouseWheel(e))}_handleMouseWheel(e){if(!this.view.navigation.mouseWheelZoomEnabled)return;if(e.preventDefault(),e.stopPropagation(),!this._canZoom)return;const t=this.view.mapViewNavigation,{x:r,y:i,deltaY:n}=e.data,a=1/oc**(1/60*n),s=t.zoom(a,[r,i]);s&&(this._canZoom=!1,s.catch(()=>{}).then(()=>{this._canZoom=!0,t.end()}))}}class lc extends Ha["a"]{constructor(e){super(!0),this.view=e,this.registerIncoming("drag",e=>this._handleDrag(e)),this.registerIncoming("pointer-down",()=>this._stopMomentumNavigation());const t=this.view.mapViewNavigation;this.dragEventSeparator=new Ho({start:(e,r)=>{t.pinch.begin(this.view,r.data),r.stopPropagation()},update:(e,r)=>{t.pinch.update(this.view,r.data),r.stopPropagation()},end:(e,r)=>{t.pinch.end(this.view),r.stopPropagation()},condition:e=>e>=2})}_handleDrag(e){this.dragEventSeparator.handle(e)}_stopMomentumNavigation(){this.view.mapViewNavigation.pinch.stopMomentumNavigation()}}var uc=r("767d");function dc(e){const t=e.native;return t?{buttons:t.buttons.map(e=>e.pressed?e.value?e.value:1:0),axes:t.axes.map(t=>fc(t,e.axisThreshold))}:{buttons:[],axes:[]}}function hc(e,t){if(e.axes.length!==t.axes.length)return!1;if(e.buttons.length!==t.buttons.length)return!1;for(let r=0;r<e.axes.length;r++)if(e.axes[r]!==t.axes[r])return!1;for(let r=0;r<e.buttons.length;r++)if(e.buttons[r]!==t.buttons[r])return!1;return!0}function pc(e){for(let t=0;t<e.axes.length;t++)if(0!==e.axes[t])return!1;for(let t=0;t<e.buttons.length;t++)if(0!==e.buttons[t])return!1;return!0}function fc(e,t){const r=Math.abs(e);return r<t?0:Math.sign(e)*(r-t)/(1-t)}class bc{constructor(e,t){this.element=e,this.input=t,this._hasEventListeners=!1,this._onConnectGamepad=e=>{this._connectGamepad(e.gamepad)},this._onDisconnectGamepad=e=>{const t=e.gamepad,r=t.index,i=this.inputDevices[r];i&&(this._emitGamepadEvent(t,dc(i),!1),this.inputDevices.splice(r,1),this.latestUpdate.splice(r,1),this.input.gamepad.devices.remove(i),this.ensurePollingState())},this.frameTask=null,this.latestUpdate=new Array,this.inputDevices=new Array,this.callback=null;const r="getGamepads"in window.navigator,i=window.isSecureContext;this.supported=r&&i,this.supported&&(this._forEachGamepad(e=>this._connectGamepad(e)),window.addEventListener("gamepadconnected",this._onConnectGamepad),window.addEventListener("gamepaddisconnected",this._onDisconnectGamepad),this.ensurePollingState())}destroy(){this.hasEventListeners=!1,this.supported&&(window.removeEventListener("gamepadconnected",this._onConnectGamepad),window.removeEventListener("gamepaddisconnected",this._onDisconnectGamepad))}set hasEventListeners(e){this._hasEventListeners!==e&&(this._hasEventListeners=e,this.ensurePollingState())}get eventsEnabled(){return this.supported&&this.inputDevices.length>0&&this._hasEventListeners}set onEvent(e){this.callback=e}_connectGamepad(e){const t=new ys(e);"unknown"!==t.deviceType&&(this.inputDevices[e.index]=t,this.input.gamepad.devices.add(t)),this.ensurePollingState()}ensurePollingState(){this.eventsEnabled?this._startPolling():this._stopPolling()}_startPolling(){null==this.frameTask&&(this.frameTask=Object(xe["a"])({update:()=>this._readGamepadState()}))}_stopPolling(){null!=this.frameTask&&(this.frameTask.remove(),this.frameTask=null,this.latestUpdate=new Array)}_readGamepadState(){const e=document.hasFocus(),t=this.element.contains(document.activeElement),r="document"===this.input.gamepad.enabledFocusMode&&!e||"view"===this.input.gamepad.enabledFocusMode&&!t;this._forEachGamepad(e=>{const t=this.inputDevices[e.index];if(!t)return;const i=this.latestUpdate[e.index],n=dc(t),a=r||pc(n);if(i){if(i.timestamp===e.timestamp)return;if(!i.active&&a)return;if(hc(i.state,n))return}this._emitGamepadEvent(e,n,!a)})}_forEachGamepad(e){const t=window.navigator.getGamepads();for(let r=0;r<t.length;r++){const i=t[r];this._validate(i)&&e(i)}}_emitGamepadEvent(e,t,r){const i=this.latestUpdate[e.index],n=i&&i.active;if(!n&&!r)return;const a=!n&&r?"start":n&&r?"update":"end";this.latestUpdate[e.index]={timestamp:e.timestamp,state:t,active:r},this.callback&&this.callback({device:this.inputDevices[e.index],state:t,action:a})}_validate(e){if(!e)return!1;if(!e.connected)return!1;for(let t=0;t<e.axes.length;t++)if(isNaN(e.axes[t]))return!1;return!0}}const mc=Object(E["a"])("trident"),gc=Object(E["a"])("edge"),yc=Object(E["a"])("chrome"),Oc=Object(E["a"])("ff"),vc=Object(E["a"])("safari"),_c={touchNone:"esri-view-surface--touch-none",touchPan:"esri-view-surface--touch-pan"};class jc{constructor(e,t){this.input=t,this._active={},this._activePointerCaptures=new Set,this._keyDownState=new Set,this._eventId=1,this._browserTouchPanningEnabled=!1,this._element=e,e.getAttribute("tabindex")||e.setAttribute("tabindex","0"),this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"pointer-cancel":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost},this._updateTouchAction(),this._element.addEventListener("keydown",this._preventAltKeyDefault),this._gamepadSource=new bc(e,this.input),this._gamepadSource.onEvent=e=>this._callback("gamepad",e)}destroy(){this._callback=null,this.activeEvents=null,this._activePointerCaptures.forEach(e=>{this._releasePointerCaptureSafe(e)}),this._gamepadSource&&(this._gamepadSource.destroy(),this._gamepadSource=null),this._activePointerCaptures=null,this._removeTouchAction(),this._element.removeEventListener("keydown",this._preventAltKeyDefault)}get browserTouchPanningEnabled(){return this._browserTouchPanningEnabled}set browserTouchPanningEnabled(e){this._browserTouchPanningEnabled=e,this._updateTouchAction(),this._updateTouchEventHandling()}set onEventReceived(e){this._callback=e}set activeEvents(e){for(const t in this._active)if(!e||!e.has(t)){const e=this._active[t];this._element.removeEventListener(wc[t],e),delete this._active[t]}e&&e.forEach(e=>{if(!this._active[e]&&wc[e]){const t=(this._eventHandlers[e]||this._handleDefault).bind(this,e);this._element.addEventListener(wc[e],t),this._active[e]=t}}),this._gamepadSource.hasEventListeners=e&&e.has("gamepad")}setPointerCapture(e,t){t?(this._element.setPointerCapture(e.pointerId),this._activePointerCaptures.add(e.pointerId)):(this._releasePointerCaptureSafe(e.pointerId),this._activePointerCaptures.delete(e.pointerId))}_updateTouchAction(){this._element.classList.remove(this._browserTouchPanningEnabled?_c.touchNone:_c.touchPan),this._element.classList.add(this._browserTouchPanningEnabled?_c.touchPan:_c.touchNone)}_updateTouchEventHandling(){this._browserTouchPanningEnabled?this._element.addEventListener("touchmove",this._preventMultiTouchPanning):this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_removeTouchAction(){this._element.classList.remove(_c.touchNone),this._element.classList.remove(_c.touchPan),this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_releasePointerCaptureSafe(e){try{if(this._element.hasPointerCapture&&!this._element.hasPointerCapture(e))return;this._element.releasePointerCapture(e)}catch(t){}}_updateNormalizedPointerLikeEvent(e,t){const r=rs(this._element,e);return jc.test.disableSubpixelCoordinates&&(r.x=Math.round(r.x),r.y=Math.round(r.y)),t.x=r.x,t.y=r.y,t}_handleKey(e,t){const r=Object(uc["a"])(t);r&&"key-up"===e&&this._keyDownState.delete(r);const i={native:t,key:r,repeat:r&&this._keyDownState.has(r)};r&&"key-down"===e&&this._keyDownState.add(i.key),this._callback(e,i)}_handlePointer(e,t){const r=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});this._callback(e,r)}_handlePointerPreventDefault(e,t){const r=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,pointerType:t.pointerType,button:t.button,buttons:t.buttons,eventId:this._eventId++});t.preventDefault(),this._callback(e,r)}_handleMouseWheel(e,t){let r=t.deltaY;switch(t.deltaMode){case 0:(mc||gc)&&(r=r/document.documentElement.clientHeight*600);break;case 1:r*=30;break;case 2:r*=900}mc||gc?r*=.7:yc||vc?r*=.6:Oc&&(r*=1.375);const i=100,n=Math.abs(r);if(n>i){const e=.02;r=r/n*200/(1+Math.exp(-e*(n-i)))}const a=this._updateNormalizedPointerLikeEvent(t,{native:t,x:0,y:0,deltaY:r});this._callback(e,a)}_handlePointerCaptureLost(e,t){this._activePointerCaptures.delete(t.pointerId),this._handleDefault(e,t)}_handleDefault(e,t){const r={native:t};t.preventDefault(),this._callback(e,r)}_preventAltKeyDefault(e){"Alt"===e.key&&e.preventDefault()}_preventMultiTouchPanning(e){e.touches.length>1&&e.preventDefault()}}jc.test={disableSubpixelCoordinates:!1};const wc={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove","mouse-wheel":"wheel","pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","pointer-enter":"pointerenter","pointer-leave":"pointerleave","pointer-cancel":"pointercancel",focus:"focus",blur:"blur"};class xc extends Ha["a"]{constructor(){super(!0),this.registerIncoming("context-menu",e=>{e.data.native.preventDefault()})}}var Tc=r("1729");function Sc(e,t){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)}function Ec(e,t){const r=t.x-e.x,i=t.y-e.y;return Math.sqrt(r*r+i*i)}function Ac(e,t){if(t?(t.radius=0,t.center.x=0,t.center.y=0):t={radius:0,center:Object(ce["e"])()},0===e.length)return t;if(1===e.length)return t.center.x=e[0].x,t.center.y=e[0].y,t;if(2===e.length){const[r,i]=e,[n,a]=[i.x-r.x,i.y-r.y];return t.radius=Math.sqrt(n*n+a*a)/2,t.center.x=(r.x+i.x)/2,t.center.y=(r.y+i.y)/2,t}let r=0,i=0;for(let O=0;O<e.length;O++)r+=e[O].x,i+=e[O].y;r/=e.length,i/=e.length;const n=e.map(e=>e.x-r),a=e.map(e=>e.y-i);let s=0,o=0,c=0,l=0,u=0,d=0,h=0;for(let O=0;O<n.length;O++){const e=n[O],t=a[O],r=e*e,i=t*t;s+=r,o+=i,c+=e*t,l+=r*e,u+=i*t,d+=e*i,h+=t*r}const p=.5*(l+d),f=.5*(u+h),b=s*o-c*c,m=(p*o-f*c)/b,g=(s*f-c*p)/b,y=Object(ce["e"])(m+r,g+i);return{radius:Math.sqrt(m*m+g*g+(s+o)/e.length),center:y}}const Cc={maximumDoubleClickDelay:250,maximumDoubleClickDistance:10,maximumDoubleTouchDelay:350,maximumDoubleTouchDistance:35};class Rc extends Ha["a"]{constructor(e=Cc.maximumDoubleClickDelay,t=Cc.maximumDoubleClickDistance,r=Cc.maximumDoubleTouchDelay,i=Cc.maximumDoubleTouchDistance,n=Tc["a"]){super(!1),this.maximumDoubleClickDelay=e,this.maximumDoubleClickDistance=t,this.maximumDoubleTouchDelay=r,this.maximumDoubleTouchDistance=i,this._clock=n,this._pointerState=new Map,this._click=this.registerOutgoing("click"),this._doubleClick=this.registerOutgoing("double-click"),this.registerIncoming("immediate-click",this._handleImmediateClick.bind(this)),this.registerIncoming("pointer-drag",this._handlePointerDrag.bind(this)),this.registerIncoming("drag",this._handleDrag.bind(this))}onUninstall(){this._pointerState.forEach(e=>e.doubleClickTimeout=Object(z["s"])(e.doubleClickTimeout))}get hasPendingInputs(){return Object(Da["c"])(this._pointerState,e=>null!=e.doubleClickTimeout)}_pointerId(e){const t=e.native;return"mouse"===t.pointerType?`${t.pointerId}:${t.button}`:""+t.pointerType}_handleImmediateClick(e){const t=e.data,r=this._pointerId(t),i=this._pointerState.get(r);if(i){const n="touch"===t.native.pointerType?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;Sc(i.event.data,t)>n?(this._clearDoubleClickTimeout(r,!0),this._startClick(e)):(this._clearDoubleClickTimeout(r,!1),this._doubleClick.emit(i.event.data,void 0,i.event.modifiers))}else this._startClick(e)}_startClick(e){const t=this._pointerId(e.data),r="touch"===e.data.native.pointerType?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay;this._pointerState.set(t,{event:e,doubleClickTimeout:this._clock.setTimeout(()=>this._doubleClickTimeoutExceeded(t),r)}),this.refreshHasPendingInputs()}_handlePointerDrag(e){const t=this._pointerId(e.data.currentEvent);this._clearDoubleClickTimeout(t,!0)}_handleDrag(e){const t=this._pointerId(e.data.pointer);this._clearDoubleClickTimeout(t,!0)}_clearDoubleClickTimeout(e,t){const r=this._pointerState.get(e);r&&(r.doubleClickTimeout.remove(),r.doubleClickTimeout=null,t&&this._doubleClickTimeoutExceeded(e),this._pointerState.delete(e),this.refreshHasPendingInputs())}_doubleClickTimeoutExceeded(e){const t=this._pointerState.get(e);this._click.emit(t.event.data,void 0,t.event.modifiers),t.doubleClickTimeout=null,this._pointerState.delete(e),this.refreshHasPendingInputs()}}class Mc extends Ha["a"]{constructor(e=Cc.maximumDoubleClickDelay,t=Cc.maximumDoubleClickDistance,r=Cc.maximumDoubleTouchDelay,i=Cc.maximumDoubleTouchDistance,n=Tc["a"]){super(!1),this.maximumDoubleClickDelay=e,this.maximumDoubleClickDistance=t,this.maximumDoubleTouchDelay=r,this.maximumDoubleTouchDistance=i,this._clock=n,this._doubleTapDragReady=!1,this._doubleTapDragActive=!1,this._dragStartCenter=Object(ce["e"])(0,0),this._pointerState=new Map,this._doubleTapDrag=this.registerOutgoing("double-tap-drag"),this._dragEventSeparator=new Ho({start:(e,t)=>this._dragStart(e,t),update:(e,t)=>this._dragUpdate(t),end:(e,t)=>this._dragEnd(t)}),this.registerIncoming("drag",e=>this._dragEventSeparator.handle(e)),this.registerIncoming("pointer-down",e=>this._handlePointerDown(e)),this.registerIncoming("pointer-up",()=>this._handlePointerUp())}onUninstall(){this._pointerState.forEach(e=>{null!=e.doubleTapTimeout&&(e.doubleTapTimeout.remove(),e.doubleTapTimeout=null)})}get hasPendingInputs(){return Object(Da["c"])(this._pointerState,e=>null!=e.doubleTapTimeout)}_clearPointerDown(e){const t=this._pointerState.get(e);t&&(t.doubleTapTimeout.remove(),t.doubleTapTimeout=null,this._pointerState.delete(e),this.refreshHasPendingInputs())}_createDoubleTapDragData(e,t,r){const{button:i,buttons:n,pointer:a,pointers:s,pointerType:o,timestamp:c}=r;return{action:e,delta:t,button:i,buttons:n,pointer:a,pointers:s,pointerType:o,timestamp:c}}_dragStart(e,t){if(!this._doubleTapDragReady||1!==e)return;this._doubleTapDragReady=!1,this._doubleTapDragActive=!0;const{data:r,modifiers:i}=t,{center:n}=r;this._dragStartCenter=n;const a=this._createDoubleTapDragData("begin",Object(ce["e"])(0,0),r);this._doubleTapDrag.emit(a,void 0,i),t.stopPropagation()}_dragUpdate(e){if(!this._doubleTapDragActive)return;const{data:t,modifiers:r}=e,{center:i}=t,n=Object(ce["e"])(i.x-this._dragStartCenter.x,i.y-this._dragStartCenter.y),a=this._createDoubleTapDragData("update",n,t);this._doubleTapDrag.emit(a,void 0,r),e.stopPropagation()}_dragEnd(e){if(!this._doubleTapDragActive)return;const{data:t,modifiers:r}=e,{center:i}=t,n=Object(ce["e"])(i.x-this._dragStartCenter.x,i.y-this._dragStartCenter.y),a=this._createDoubleTapDragData("end",n,t);this._doubleTapDrag.emit(a,void 0,r),this._doubleTapDragActive=!1,e.stopPropagation()}_handlePointerDown(e){const{data:t}=e,r=this._pointerId(t),i=this._pointerState.get(r),{pointerType:n}=t.native;if(i){const a="touch"===n?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;this._clearPointerDown(r),Sc(i.event.data,t)>a?this._storePointerDown(e):this._doubleTapDragReady=!0}else this._storePointerDown(e)}_handlePointerUp(){this._doubleTapDragReady=!1}_pointerId(e){const{native:t}=e,{pointerId:r,button:i,pointerType:n}=t;return"mouse"===n?`${r}:${i}`:""+n}_storePointerDown(e){const{data:t}=e,{pointerType:r}=t.native,i=this._pointerId(t),n="touch"===r?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay,a=this._clock.setTimeout(()=>this._clearPointerDown(i),n);this._pointerState.set(i,{event:e,doubleTapTimeout:a}),this.refreshHasPendingInputs()}}var Pc,Ic=r("b0ea");class Dc extends Ha["a"]{constructor(e){super(!1),this.navigationTouch=e,this.startStateModifiers=new Set,this.activePointerMap=new Map,this.isDragging=!1,this.isCurrentDragSuppressed=!1,this.drag=this.registerOutgoing("drag"),this.registerIncoming("pointer-drag",this._handlePointerDrag.bind(this)),this.registerIncoming("pointer-up",this._handlePointerUpAndPointerLost.bind(this)),this.registerIncoming("pointer-capture-lost",this._handlePointerUpAndPointerLost.bind(this)),this.registerIncoming("pointer-cancel",this._handlePointerUpAndPointerLost.bind(this))}_createPayload(e,t,r,i){return{action:e,pointerType:this.pointerType,button:this.mouseButton,buttons:t.buttons,timestamp:i,pointers:Fc(this.activePointerMap),pointer:t,angle:r.angle,radius:r.radius,center:r.center}}_addPointer(e){const t=e.native.pointerId,r=Nc(this.activePointerMap).angle,i={event:e,initialAngle:0,lastAngle:0};this.activePointerMap.set(t,i);const n=kc(i,Lc(this.activePointerMap));i.initialAngle=n,i.lastAngle=n,this._updatePointerAngles(r)}_updatePointer(e){if(e&&null==e.x&&null==e.y)return;const t=e.native.pointerId,r=this.activePointerMap.get(t);r?r.event=e:this._addPointer(e)}_removePointer(e){const t=Nc(this.activePointerMap).angle;this.activePointerMap.delete(e),this._updatePointerAngles(t)}_updatePointerAngles(e){const t=Nc(this.activePointerMap);this.activePointerMap.forEach(r=>{r.initialAngle=kc(r,t)-e,r.lastAngle=kc(r,t)-e})}_emitEvent(e,t,r){const i=Nc(this.activePointerMap);this.drag.emit(this._createPayload(e,t,i,r),void 0,this.startStateModifiers)}_handlePointerUpAndPointerLost(e){const t=e.data.native.pointerId,r=Object(Ic["a"])(e.timestamp);this.activePointerMap.get(t)&&(1===this.activePointerMap.size?(this._updatePointer(e.data),!this.isCurrentDragSuppressed&&this._emitEvent("end",e.data,r),this.isDragging=!1,this.isCurrentDragSuppressed=!1,this._removePointer(t)):(this._removePointer(t),this._emitEvent("removed",e.data,Object(Ic["a"])(e.timestamp))))}_handlePointerDrag(e){const t=e.data,r=t.currentEvent,i=Object(Ic["a"])(e.timestamp);switch(t.action){case"start":case"update":this.isDragging?this.activePointerMap.has(r.native.pointerId)?(this._updatePointer(r),!this.isCurrentDragSuppressed&&this._emitEvent("update",r,i)):(this._addPointer(r),this._emitEvent("added",r,i),this.isCurrentDragSuppressed=this.isSuppressed):(this._updatePointer(r),this.pointerType=e.data.startEvent.pointerType,this.mouseButton=e.data.startEvent.button,this.startStateModifiers=e.modifiers,this.isDragging=!0,this.isCurrentDragSuppressed=this.isSuppressed,!this.isCurrentDragSuppressed&&this._emitEvent("start",r,i))}}get isSuppressed(){return this.navigationTouch&&!this.navigationTouch.browserTouchPanEnabled&&"touch"===this.pointerType&&1===this.activePointerMap.size}}function Lc(e){const t=[];return e.forEach(e=>{t.push(Object(ce["e"])(e.event.x,e.event.y))}),Ac(t)}function Nc(e){const t=Lc(e);let r=0;return e.forEach(e=>{let i=kc(e,t),n=i-e.lastAngle;for(;n>Math.PI;)n-=2*Math.PI;for(;n<-Math.PI;)n+=2*Math.PI;i=e.lastAngle+n,e.lastAngle=i;const a=i-e.initialAngle;r+=a}),r/=e.size||1,{angle:r,radius:t.radius,center:t.center}}function Fc(e){const t=new Map;return e.forEach((e,r)=>t.set(r,e.event)),t}function kc(e,t){const r=e.event,i=r.x-t.center.x,n=r.y-t.center.y;return Math.atan2(n,i)}!function(e){e[e.Left=0]="Left",e[e.Middle=1]="Middle",e[e.Right=2]="Right",e[e.Back=3]="Back",e[e.Forward=4]="Forward",e[e.Undefined=-1]="Undefined"}(Pc||(Pc={}));class Uc extends Ha["a"]{constructor(e=Cc.maximumDoubleClickDelay,t=Cc.maximumDoubleClickDistance,r=Cc.maximumDoubleTouchDelay,i=Cc.maximumDoubleTouchDistance,n=Tc["a"]){super(!1),this.maximumDoubleClickDelay=e,this.maximumDoubleClickDistance=t,this.maximumDoubleTouchDelay=r,this.maximumDoubleTouchDistance=i,this._clock=n,this._pointerState=new Map,this._immediateDoubleClick=this.registerOutgoing("immediate-double-click"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",e=>{this._handlePointerLoss(e,"pointer-up")}),this.registerIncoming("pointer-capture-lost",e=>{this._handlePointerLoss(e,"pointer-capture-lost")}),this.registerIncoming("pointer-cancel",e=>{this._handlePointerLoss(e,"pointer-cancel")})}onUninstall(){this._pointerState.forEach(e=>{e.immediateDoubleClick&&e.immediateDoubleClick.timeoutHandle.remove()}),super.onUninstall()}_handlePointerDown(e){const t=e.data,r=this._pointerId(t);if(!this._pointerState.has(r)){const e={downButton:t.native.button,immediateDoubleClick:null};this._pointerState.set(r,e),this.startCapturingPointer(t.native)}}_handlePointerLoss(e,t){const r=e.data,i=this._pointerId(r),n=this._pointerState.get(i);if(n&&"pointer-up"===t&&n.downButton===r.native.button){const t=n.immediateDoubleClick;if(t){t.timeoutHandle.remove();const i="touch"===e.data.native.pointerType?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;Sc(t,e.data)>i?this._startImmediateDoubleClick(e,n):(this._immediateDoubleClick.emit(e.data,void 0,t.modifiers),this._removeState(r))}else this._startImmediateDoubleClick(e,n)}}_startImmediateDoubleClick(e,t){const r="touch"===e.data.native.pointerType?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay;t.immediateDoubleClick={x:e.data.x,y:e.data.y,modifiers:e.modifiers,timeoutHandle:this._clock.setTimeout(()=>this._removeState(e.data),r)}}_pointerId(e){const t=e.native;return"mouse"===t.pointerType?`${t.pointerId}:${t.button}`:""+t.pointerType}_removeState(e){const t=this._pointerId(e);this._pointerState.delete(t),this.stopCapturingPointer(e.native),this.refreshHasPendingInputs()}}const zc={maximumClickDelay:300,movementUntilMouseDrag:1.5,movementUntilPenDrag:6,movementUntilTouchDrag:6,holdDelay:500};class Bc extends Ha["a"]{constructor(e=zc.maximumClickDelay,t=zc.movementUntilMouseDrag,r=zc.movementUntilPenDrag,i=zc.movementUntilTouchDrag,n=zc.holdDelay,a=Tc["a"]){super(!1),this.maximumClickDelay=e,this.movementUntilMouseDrag=t,this.movementUntilPenDrag=r,this.movementUntilTouchDrag=i,this.holdDelay=n,this._clock=a,this._pointerState=new Map,this._pointerDrag=this.registerOutgoing("pointer-drag"),this._immediateClick=this.registerOutgoing("immediate-click"),this._pointerHold=this.registerOutgoing("hold"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",e=>{this._handlePointerLoss(e,"pointer-up")}),this.registerIncoming("pointer-capture-lost",e=>{this._handlePointerLoss(e,"pointer-capture-lost")}),this.registerIncoming("pointer-cancel",e=>{this._handlePointerLoss(e,"pointer-cancel")}),this._moveHandle=this.registerIncoming("pointer-move",this._handlePointerMove.bind(this)),this._moveHandle.pause()}onUninstall(){this._pointerState.forEach(e=>{null!=e.holdTimeout&&(e.holdTimeout.remove(),e.holdTimeout=null)}),super.onUninstall()}_handlePointerDown(e){const t=e.data,r=t.native.pointerId;let i=null;0===this._pointerState.size&&(i=this._clock.setTimeout(()=>{const t=this._pointerState.get(r);if(t){if(!t.isDragging){const r=t.previousEvent;this._pointerHold.emit(r,void 0,e.modifiers),t.holdEmitted=!0}t.holdTimeout=null}},this.holdDelay));const n={startEvent:t,previousEvent:t,startTimestamp:e.timestamp,isDragging:!1,downButton:t.native.button,holdTimeout:i,modifiers:new Set};this._pointerState.set(r,n),this.startCapturingPointer(t.native),this._moveHandle.resume(),this._pointerState.size>1&&this._startDragging(e)}_createPointerDragData(e,t,r){return{action:e,startEvent:t.startEvent,previousEvent:t.previousEvent,currentEvent:r}}_handlePointerMove(e){const t=e.data,r=t.native.pointerId,i=this._pointerState.get(r);i&&(i.isDragging?this._pointerDrag.emit(this._createPointerDragData("update",i,t),void 0,i.modifiers):Ec(t,i.startEvent)>this._getDragThreshold(t.native.pointerType)&&this._startDragging(e),i.previousEvent=t)}_getDragThreshold(e){switch(e){case"touch":return this.movementUntilTouchDrag;case"pen":return this.movementUntilPenDrag;default:return this.movementUntilMouseDrag}}_startDragging(e){const t=e.data,r=t.native.pointerId;this._pointerState.forEach(i=>{null!=i.holdTimeout&&(i.holdTimeout.remove(),i.holdTimeout=null),i.isDragging||(i.modifiers=e.modifiers,i.isDragging=!0,r===i.startEvent.native.pointerId?this._pointerDrag.emit(this._createPointerDragData("start",i,t)):this._pointerDrag.emit(this._createPointerDragData("start",i,i.previousEvent),e.timestamp))})}_handlePointerLoss(e,t){const r=e.data,i=r.native.pointerId,n=this._pointerState.get(i);n&&(null!=n.holdTimeout&&(n.holdTimeout.remove(),n.holdTimeout=null),n.isDragging?this._pointerDrag.emit(this._createPointerDragData("end",n,"pointer-up"===t?r:n.previousEvent),void 0,n.modifiers):"pointer-up"===t&&n.downButton===r.native.button&&e.timestamp-n.startTimestamp<=this.maximumClickDelay&&!n.holdEmitted&&this._immediateClick.emit(r),this._pointerState.delete(i),this.stopCapturingPointer(r.native),0===this._pointerState.size&&this._moveHandle.pause())}}const Vc={counter:"Ctrl",pan:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown"},zoom:{zoomIn:["=","+"],zoomOut:["-","_"]},rotate:{clockwiseOption1:"a",clockwiseOption2:"A",counterClockwiseOption1:"d",counterClockwiseOption2:"D",resetOption1:"n",resetOption2:"N"}};let Gc=class extends F["a"]{constructor(){super(...arguments),this._handles=new ge["a"]}initialize(){this._handles.add([Object(Me["h"])(this.view,"ready",()=>this._disconnect()),Object(Me["f"])(this.view,"ready",()=>this._connect())])}destroy(){this._handles&&(this._handles.removeAll(),this._handles=null),this._disconnect()}_disconnect(){this._inputManager&&(this.view.viewEvents.disconnect(),this._inputManager.destroy(),this._inputManager=null,this._source.destroy(),this._source=null)}_connect(){const e=this.view.surface,t=new jc(e,this.view.input),r=[new Uc,new Bc,new Rc,new Dc(this.view.navigation),new Mc],i=new Cn["a"]({eventSource:t,recognizers:r});i.installHandlers("prevent-context-menu",[new xc],Cn["b"].INTERNAL),i.installHandlers("navigation",[new lc(this.view),new Ko(this.view),new cc(this.view),new Vo(this.view),new Vo(this.view,[Vc.counter]),new qo(this.view,"primary"),new ic(this.view,Vc.pan),new sc(this.view,Vc.zoom),new nc(this.view,Vc.rotate),new Wo(this.view,"secondary"),new Go(this.view,"touch")],Cn["b"].INTERNAL),this.view.viewEvents.connect(i),this._source=t,this._inputManager=i,Object(Me["a"])(this.view.navigation,"browserTouchPanEnabled",e=>{this._source.browserTouchPanningEnabled=!e})}get test(){return{inputManager:this._inputManager}}};Object(l["a"])([Object(j["b"])()],Gc.prototype,"view",void 0),Gc=Object(l["a"])([Object(x["a"])("esri.views.2d.input.MapViewInputManager")],Gc);const Hc=Gc;var qc=r("c39b");let Wc=0,$c=class extends F["a"]{constructor(){super(...arguments),this.color=new d["a"]([0,255,255]),this.haloOpacity=1,this.fillOpacity=.25}get version(){return Wc++}};Object(l["a"])([Object(j["b"])({readOnly:!0})],$c.prototype,"version",null),Object(l["a"])([Object(j["b"])({type:d["a"]})],$c.prototype,"color",void 0),Object(l["a"])([Object(j["b"])({type:d["a"]})],$c.prototype,"haloColor",void 0),Object(l["a"])([Object(j["b"])()],$c.prototype,"haloOpacity",void 0),Object(l["a"])([Object(j["b"])()],$c.prototype,"fillOpacity",void 0),$c=Object(l["a"])([Object(x["a"])("esri.views.2d.support.HighlightOptions")],$c);const Zc=$c;var Xc=r("4a7a");function Yc(e,t,r,i,n,a,s,o){let c;e.ignorePadding&&(i={left:0,right:0,top:0,bottom:0}),null!=e.width&&null!=e.height?c=[e.width,e.height]:null==e.width&&null!=e.height?c=[e.height,e.height]:null!=e.width&&null==e.height?c=[e.width,e.width]:null==e.width&&null==e.height&&(c=null);const l=r[0]-(i.left+i.right),u=r[1]-(i.top+i.bottom);let d,h,p=e.area||{x:0,y:0,width:l,height:u};if(c){const e=l/u,t=c[0]/c[1];if(t>e){const e=p.width/t;p={x:p.x,y:Math.round(p.y+(p.height-e)/2),width:p.width,height:Math.round(e)}}else{const e=p.height*t;p={x:Math.round(p.x+(p.width-e)/2),y:p.y,width:Math.round(e),height:p.height}}}else c=[p.width,p.height];return c[0]>p.width?(d=Math.min(c[0]/p.width,t),h=c[0]/p.width/d):(d=1,h=c[0]/p.width),{resolutionScale:d,cropArea:{x:Math.round((p.x+i.left)*d),y:Math.round((p.y+i.top)*d),width:Math.round(p.width*d),height:Math.round(p.height*d)},outputScale:h,format:n,quality:a,children:s,rotation:o}}var Jc=r("4dc1"),Qc=r("b2af"),Kc=r("cc15");function el(e){const t=tl(e);if(!t.available)return new b["a"]("webgl:required","WebGL is required but not supported.");if("3d"===e&&t.majorPerformanceCaveat)return new b["a"]("webgl:major-performance-caveat-detected","Your WebGL implementation doesn't seem to support hardware accelerated rendering. Check your browser settings or if your GPU is in a blocklist.");if(!t.supportsHighPrecisionFragment)return new b["a"]("webgl:high-precision-fragment-required","WebGL support for high precision fragment shaders is required but not supported.");if(!t.supportsVertexShaderSamplers)return new b["a"]("webgl:vertex-shader-samplers-required","WebGL support for vertex shader samplers is required but not supported.");if(t.type===Kc["a"].WEBGL1){if(!t.supportsElementIndexUint)return new b["a"]("webgl:element-index-uint-required","WebGL support for uint vertex indices is required but not supported.");if(!t.supportsStandardDerivatives)return new b["a"]("webgl:standard-derivatives-required","WebGL support for standard derivatives is required but not supported.");if(!t.supportsInstancedArrays)return new b["a"]("webgl:instanced-arrays-required","WebGL support for instanced rendering is required but not supported.")}return null}function tl(e){const t=Object(Kc["d"])(e);for(;t.length>1;){const e=Object(Qc["b"])(t.shift());if(e.available)return e}return Object(Qc["b"])(t.shift())}function rl(e){return e&&"nodeType"in e}function il(e){return e&&"function"==typeof e.render}const nl={component:"esri-component"};let al=class extends F["a"]{constructor(){super(...arguments),this.widget=null}destroy(){this.widget&&this.widget.destroy(),this.node=null}get id(){return this.get("widget.id")||this.get("node.id")}set node(e){const t=this._get("node");e!==t&&(e&&e.classList.add(nl.component),t&&t.classList.remove(nl.component),this._set("node",e))}castNode(e){return e?"string"==typeof e||rl(e)?(this._set("widget",null),Object(we["a"])(e)):(il(e)&&!e.domNode&&(e.domNode=document.createElement("div")),this._set("widget",e),e.domNode):(this._set("widget",null),null)}};Object(l["a"])([Object(j["b"])({dependsOn:[]})],al.prototype,"id",null),Object(l["a"])([Object(j["b"])()],al.prototype,"node",null),Object(l["a"])([Object(B["a"])("node")],al.prototype,"castNode",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],al.prototype,"widget",void 0),al=Object(l["a"])([Object(x["a"])("esri.views.ui.Component")],al);const sl=al,ol={left:0,top:0,bottom:0,right:0},cl={bottom:30,top:15,right:15,left:15},ll="manual",ul={ui:"esri-ui",corner:"esri-ui-corner",innerContainer:"esri-ui-inner-container",manualContainer:"esri-ui-manual-container",cornerContainer:"esri-ui-corner-container",topLeft:"esri-ui-top-left",topRight:"esri-ui-top-right",bottomLeft:"esri-ui-bottom-left",bottomRight:"esri-ui-bottom-right"};function dl(e){return e&&!e._started&&"function"==typeof e.postMixInProperties&&"function"==typeof e.buildRendering&&"function"==typeof e.postCreate&&"function"==typeof e.startup}function hl(e){const t=e,r="object"==typeof t&&null!==t&&Object.getPrototypeOf(t);return null!==r&&r!==Object.prototype||!("component"in t||"index"in t||"position"in t)?null:e}function pl(e,{top:t,bottom:r,left:i,right:n}){e.style.top=t,e.style.bottom=r,e.style.left=i,e.style.right=n}let fl=class extends U["a"].EventedAccessor{constructor(e){super(e),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentToKey=new Map,this._handles=new ge["a"],this.view=null,this._applyViewPadding=()=>{const e=this.container;e&&pl(e,this._toPxPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const e=this._innerContainer;e&&pl(e,this._toPxPosition(this.padding))},this._initContainers()}initialize(){this._handles.add([Object(oe["e"])(()=>{var e;return[null==(e=this.view)?void 0:e.padding,this.container]},this._applyViewPadding,oe["a"]),Object(oe["e"])(()=>this.padding,this._applyUIPadding,oe["a"])])}destroy(){this.container=null;for(const e of this._components)e.destroy();this._components.length=0,this._handles.destroy(),this._componentToKey.clear()}set container(e){const t=this._get("container");e!==t&&(e&&(e.classList.add(ul.ui),e.classList.add(Object(_i["a"])()),this._attachContainers(e)),t&&(t.classList.remove(ul.ui),pl(t,{top:"",bottom:"",left:"",right:""}),Object(we["b"])(t)),this._set("container",e))}get height(){const e=this.get("view.height")||0;if(0===e)return e;const t=this._getViewPadding(),r=t.top+t.bottom;return Math.max(e-r,0)}get padding(){return this._get("padding")}set padding(e){e?this._override("padding",e):this._clearOverride("padding")}castPadding(e){return"number"==typeof e?{bottom:e,top:e,right:e,left:e}:{...cl,...e}}get width(){const e=this.get("view.width")||0;if(0===e)return e;const t=this._getViewPadding(),r=t.left+t.right;return Math.max(e-r,0)}add(e,t){let r,i;if(Array.isArray(e))return void e.forEach(e=>this.add(e,t));const n=hl(e);n&&({index:r,position:t,component:e,key:i}=n),t&&"object"==typeof t&&({index:r,key:i,position:t}=t),!e||t&&!this._isValidPosition(t)||this._add(e,t,r,i)}remove(e,t){if(!e)return;if(Array.isArray(e))return e.map(e=>this.remove(e,t));const r=this._find(e);if(r){const i=this._componentToKey;if(i.has(e)&&i.get(e)!==t)return;const n=this._components.indexOf(r);return r.node.parentNode&&r.node.parentNode.removeChild(r.node),this._componentToKey.delete(e),this._components.splice(n,1)[0]}}empty(e){return Array.isArray(e)?e.map(e=>this.empty(e)).reduce((e,t)=>e.concat(t)):(e=e||ll)===ll?Array.prototype.slice.call(this._manualContainer.children).filter(e=>!e.classList.contains(ul.corner)).map(e=>this.remove(e)):this._isValidPosition(e)?Array.prototype.slice.call(this._cornerNameToContainerLookup[e].children).map(this.remove,this):null}move(e,t){if(Array.isArray(e)&&e.forEach(e=>this.move(e,t)),!e)return;let r;const i=hl(e)||hl(t);if(i&&(r=i.index,t=i.position,e=i.component||e),t&&!this._isValidPosition(t))return;const n=this.remove(e);n&&this.add(n,{position:t,index:r})}find(e){if(!e)return null;const t=this._findById(e);return t&&(t.widget||t.node)}getPosition(e){for(const t in this._positionNameToContainerLookup)if(this._positionNameToContainerLookup[t].contains(e))return t;return null}_add(e,t,r,i){e instanceof sl||(e=new sl({node:e})),this._place({component:e,position:t,index:r}),this._components.push(e),i&&this._componentToKey.set(e,i)}_find(e){return e?e instanceof sl?this._findByComponent(e):"string"==typeof e?this._findById(e):this._findByNode(e.domNode||e):null}_getViewPadding(){return this.get("view.padding")||ol}_attachContainers(e){e.appendChild(this._innerContainer),e.appendChild(this._manualContainer)}_initContainers(){const e=document.createElement("div");e.classList.add(ul.innerContainer),e.classList.add(ul.cornerContainer);const t=document.createElement("div");t.classList.add(ul.innerContainer),t.classList.add(ul.manualContainer);const r=document.createElement("div");r.classList.add(ul.topLeft),r.classList.add(ul.corner),e.appendChild(r);const i=document.createElement("div");i.classList.add(ul.topRight),i.classList.add(ul.corner),e.appendChild(i);const n=document.createElement("div");n.classList.add(ul.bottomLeft),n.classList.add(ul.corner),e.appendChild(n);const a=document.createElement("div");a.classList.add(ul.bottomRight),a.classList.add(ul.corner),e.appendChild(a),this._innerContainer=e,this._manualContainer=t;const s=Object(tr["e"])();this._cornerNameToContainerLookup={"top-left":r,"top-right":i,"bottom-left":n,"bottom-right":a,"top-leading":s?i:r,"top-trailing":s?r:i,"bottom-leading":s?a:n,"bottom-trailing":s?n:a},this._positionNameToContainerLookup={manual:t,...this._cornerNameToContainerLookup}}_isValidPosition(e){return!!this._positionNameToContainerLookup[e]}_place(e){const t=e.component,r=e.position||ll,i=e.index,n=this._positionNameToContainerLookup[r],a=i>-1;if(dl(t.widget)&&t.widget.startup(),!a)return void n.appendChild(t.node);const s=Array.prototype.slice.call(n.children);0!==i?i>=s.length?n.appendChild(t.node):Object(we["c"])(t.node,s[i]):n.firstChild?Object(we["c"])(t.node,n.firstChild):n.appendChild(t.node)}_toPxPosition(e){return{top:this._toPxUnit(e.top),left:this._toPxUnit(e.left),right:this._toPxUnit(e.right),bottom:this._toPxUnit(e.bottom)}}_toPxUnit(e){return 0===e?"0":e+"px"}_findByComponent(e){let t,r=null;return this._components.some(i=>(t=i===e,t&&(r=i),t)),r}_findById(e){let t,r=null;return this._components.some(i=>(t=i.id===e,t&&(r=i),t)),r}_findByNode(e){let t,r=null;return this._components.some(i=>(t=i.node===e,t&&(r=i),t)),r}};Object(l["a"])([Object(j["b"])()],fl.prototype,"container",null),Object(l["a"])([Object(j["b"])()],fl.prototype,"height",null),Object(l["a"])([Object(j["b"])({value:cl})],fl.prototype,"padding",null),Object(l["a"])([Object(B["a"])("padding")],fl.prototype,"castPadding",null),Object(l["a"])([Object(j["b"])()],fl.prototype,"view",void 0),Object(l["a"])([Object(j["b"])()],fl.prototype,"width",null),fl=Object(l["a"])([Object(x["a"])("esri.views.ui.UI")],fl);const bl=fl;var ml=r("792b");function gl(e,t){return e&&"copyright"in e&&(!t||"function"==typeof e.originOf&&"user"===e.originOf("copyright"))}function yl(e,t){return e.length!==t.length||e.some((e,r)=>e.text!==t[r].text)}function Ol(e,t,r){r&&t&&(e.find(e=>e.layerView===t&&e.text===r)||e.push({text:r,layerView:t}))}function vl(e){return"bing-maps"===e.type}const _l=[];let jl=class extends Le["a"]{constructor(e){super(e),this._clear=()=>{this._fetchedAttributionData.clear(),this._pendingAttributions.clear(),this.handles.remove("suspension"),this.notifyChange("state")},this._pendingAttributions=new Set,this._fetchedAttributionData=new Map,this.items=new h["a"],this.view=null,this._allLayerViewsChange=e=>{this.handles.remove("suspension");const t=this.get("view.allLayerViews");t&&this.handles.add(t.map(e=>e.watch(["suspended","attributionVisible"],this._updateAttributionItems)),"suspension"),e&&e.removed&&e.removed.forEach(e=>{this._pendingAttributions.delete(e),this._fetchedAttributionData.delete(e)}),this._updateAttributionItems()},this._updateAttributionItems=()=>{const e=this.get("view.allLayerViews");_l.length=0,e?(e.forEach(e=>{if(e.suspended||!e.get("layer.attributionVisible"))return;const t=e.layer;if(gl(t,"user"))return void Ol(_l,e,t.copyright);if(t.hasAttributionData){if(this._fetchedAttributionData.has(e)){const r=this._fetchedAttributionData.get(e);return void(r?Ol(_l,e,this._getDynamicAttribution(r,this.view,t)):gl(t)&&Ol(_l,e,t.copyright))}return void this._fetchAttributionData(e)}const r=t.get("portalItem.accessInformation");Ol(_l,e,r||t.copyright)}),yl(this.items,_l)&&(this.items.removeAll(),this.items.addMany(_l)),_l.length=0,this.notifyChange("state")):this._clear()},this.handles.add([Object(Me["b"])(this,"view.allLayerViews","change",this._allLayerViewsChange,this._allLayerViewsChange,this._clear),Object(Me["k"])(this,"view.stationary",()=>this._updateAttributionItems())])}destroy(){this.view=null,this._fetchedAttributionData.clear(),this._pendingAttributions.clear(),this.items.removeAll()}get state(){return this.get("view.ready")?this._pendingAttributions.size>0?"loading":"ready":"disabled"}async _fetchAttributionData(e){if(this._pendingAttributions.has(e))return;this._pendingAttributions.add(e);const t=await Object(ml["d"])(e.layer.fetchAttributionData());if(this._pendingAttributions.has(e)){const r=t.ok?this._createContributionIndex(t.value,vl(e.layer)):null;this._pendingAttributions.delete(e),this._fetchedAttributionData.set(e,r)}this._updateAttributionItems()}_createContributionIndex(e,t){const r=e.contributors,i={};if(!r)return i;for(let n=0;n<r.length;n++){const e=r[n],a=e.coverageAreas;if(!a)return;for(const r of a){const a=r.bbox,s=r.zoomMin-(t&&r.zoomMin?1:0),o=r.zoomMax-(t&&r.zoomMax?1:0),c={xmin:a[1],ymin:a[0],xmax:a[3],ymax:a[2],spatialReference:ne["a"].WGS84},l={extent:Object(_n["b"])(c),attribution:e.attribution||"",score:null!=r.score?r.score:100,id:n};for(let e=s;e<=o;e++)i[e]=i[e]||[],i[e].push(l)}}return i.maxKey=Math.max.apply(null,Object.keys(i)),i}_getDynamicAttribution(e,t,r){const{extent:i,scale:n}=t;let a=r.tileInfo.scaleToZoom(n);if(a=Math.min(e.maxKey,Math.round(a)),!i||null==a||a<=-1)return"";const s=e[a],o=Object(_n["d"])(i.center.clone().normalize(),t.spatialReference),c={};return s?s.filter(e=>{const t=!c[e.id]&&o&&Object(ro["e"])(e.extent,o);return t&&(c[e.id]=!0),t}).sort((e,t)=>t.score-e.score||e.objectId-t.objectId).map(e=>e.attribution).join(", "):""}};Object(l["a"])([Object(j["b"])({readOnly:!0,type:h["a"]})],jl.prototype,"items",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],jl.prototype,"state",null),Object(l["a"])([Object(j["b"])()],jl.prototype,"view",void 0),jl=Object(l["a"])([Object(x["a"])("esri.widgets.Attribution.AttributionViewModel")],jl);const wl=jl,xl={base:"esri-attribution esri-widget",poweredBy:"esri-attribution__powered-by",sources:"esri-attribution__sources",open:"esri-attribution--open",sourcesOpen:"esri-attribution__sources--open",link:"esri-attribution__link",widgetIcon:"esri-icon-description",interactive:"esri-interactive"};let Tl=class extends Ie["a"]{constructor(e,t){super(e,t),this._isOpen=!1,this._attributionTextOverflowed=!1,this._prevSourceNodeHeight=0,this.iconClass=xl.widgetIcon,this.itemDelimiter=" | ",this.label=void 0,this.messages=null,this.view=null,this.viewModel=new wl}initialize(){this.own(Object(Me["b"])(this,"viewModel.items","change",()=>this.scheduleRender()))}get _isInteractive(){return this._isOpen||this._attributionTextOverflowed}get attributionText(){return this.viewModel.items.reduce((e,t)=>(-1===e.indexOf(t.text)&&e.push(t.text),e),[]).join(this.itemDelimiter)}render(){const e={[xl.open]:this._isOpen};return Object(ir["a"])("div",{bind:this,class:this.classes(xl.base,e),onclick:this._toggleState,onkeydown:this._toggleState},this.renderSourcesNode(),this.renderPoweredBy())}renderPoweredBy(){return Object(ir["a"])("div",{class:xl.poweredBy},"Powered by"," ",Object(ir["a"])("a",{class:xl.link,href:"http://www.esri.com/",target:"_blank",rel:"noreferrer"},"Esri"))}renderSourcesNode(){const e=this._isOpen,t=this._isInteractive,r=t?0:-1,{attributionText:i}=this,n=t?"button":void 0,a={[xl.sourcesOpen]:e,[xl.interactive]:t};return Object(ir["a"])("div",{afterCreate:this._afterSourcesNodeCreate,afterUpdate:this._afterSourcesNodeUpdate,bind:this,class:this.classes(xl.sources,a),innerHTML:i,role:n,tabIndex:r})}_afterSourcesNodeCreate(e){this._prevSourceNodeHeight=e.clientWidth}_afterSourcesNodeUpdate(e){let t=!1;const{clientHeight:r,clientWidth:i,scrollWidth:n}=e,a=n>=i,s=this._attributionTextOverflowed!==a;if(this._attributionTextOverflowed=a,s&&(t=!0),this._isOpen){const e=r<this._prevSourceNodeHeight;this._prevSourceNodeHeight=r,e&&(this._isOpen=!1,t=!0)}t&&this.scheduleRender()}_toggleState(){this._isInteractive&&(this._isOpen=!this._isOpen)}};Object(l["a"])([Object(j["b"])()],Tl.prototype,"_isOpen",void 0),Object(l["a"])([Object(j["b"])()],Tl.prototype,"_isInteractive",null),Object(l["a"])([Object(j["b"])()],Tl.prototype,"_attributionTextOverflowed",void 0),Object(l["a"])([Object(j["b"])()],Tl.prototype,"_prevSourceNodeHeight",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,dependsOn:["viewModel.items.length","itemDelimiter"]})],Tl.prototype,"attributionText",null),Object(l["a"])([Object(j["b"])()],Tl.prototype,"iconClass",void 0),Object(l["a"])([Object(j["b"])()],Tl.prototype,"itemDelimiter",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],Tl.prototype,"label",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Attribution/t9n/Attribution")],Tl.prototype,"messages",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],Tl.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:wl})],Tl.prototype,"viewModel",void 0),Object(l["a"])([Object(ta["a"])()],Tl.prototype,"_toggleState",null),Tl=Object(l["a"])([Object(x["a"])("esri.widgets.Attribution")],Tl);const Sl=Tl,El="esri.widgets.CompassViewModel";let Al=class extends(Wn(F["a"])){constructor(e){super(e),this._handles=new ge["a"],this.orientation={x:0,y:0,z:0},this.view=null,this._updateForCamera=this._updateForCamera.bind(this),this._updateForRotation=this._updateForRotation.bind(this),this._updateRotationWatcher=this._updateRotationWatcher.bind(this)}initialize(){this._handles.add(Object(Me["a"])(this,"view",this._updateRotationWatcher))}destroy(){this._handles.destroy(),this._handles=null,this.view=null}get canShowNorth(){const e=this.get("view.spatialReference");return!(!e||!e.isWebMercator&&!e.isGeographic)}get state(){return this.get("view.ready")?this.canShowNorth?"compass":"rotation":"disabled"}reset(){if(!this.get("view.ready"))return;const e={};"2d"===this.view.type?e.rotation=0:e.heading=0,this.callGoTo({target:e})}_updateForRotation(e){null!=e&&(this.orientation={z:e})}_updateForCamera(e){if(!e)return;const t=-e.heading;this.orientation={x:0,y:0,z:t}}_updateRotationWatcher(e){this._handles.removeAll(),e&&("2d"===e.type?this._handles.add(Object(Me["a"])(this,"view.rotation",this._updateForRotation)):this._handles.add(Object(Me["a"])(this,"view.camera",this._updateForCamera)))}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Al.prototype,"canShowNorth",null),Object(l["a"])([Object(j["b"])()],Al.prototype,"orientation",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Al.prototype,"state",null),Object(l["a"])([Object(j["b"])()],Al.prototype,"view",void 0),Al=Object(l["a"])([Object(x["a"])(El)],Al);const Cl=Al,Rl={base:"esri-compass esri-widget--button esri-widget",text:"esri-icon-font-fallback-text",icon:"esri-compass__icon",rotationIcon:"esri-icon-dial",northIcon:"esri-icon-compass",widgetIcon:"esri-icon-locate-circled",interactive:"esri-interactive",disabled:"esri-disabled"};let Ml=class extends Ie["a"]{constructor(e,t){super(e,t),this.goToOverride=null,this.iconClass=Rl.widgetIcon,this.label=void 0,this.messages=null,this.view=null,this.viewModel=new Cl}reset(){return this.viewModel.reset()}render(){const{orientation:e,state:t}=this.viewModel,r="disabled"===t,i="compass"===("rotation"===t?"rotation":"compass"),n=r?-1:0,a={[Rl.disabled]:r,[Rl.interactive]:!r},s={[Rl.northIcon]:i,[Rl.rotationIcon]:!i},{messages:o}=this;return Object(ir["a"])("div",{bind:this,class:this.classes(Rl.base,a),onclick:this._reset,onkeydown:this._reset,role:"button",tabIndex:n,"aria-label":o.reset,title:o.reset},Object(ir["a"])("span",{"aria-hidden":"true",class:this.classes(Rl.icon,s),styles:this._toRotationTransform(e)}),Object(ir["a"])("span",{class:Rl.text},o.reset))}_reset(){this.viewModel.reset()}_toRotationTransform(e){return{transform:`rotateZ(${e.z}deg)`}}};Object(l["a"])([Object(Pe["a"])("viewModel.goToOverride")],Ml.prototype,"goToOverride",void 0),Object(l["a"])([Object(j["b"])()],Ml.prototype,"iconClass",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],Ml.prototype,"label",void 0),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Compass/t9n/Compass")],Ml.prototype,"messages",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],Ml.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:Cl})],Ml.prototype,"viewModel",void 0),Object(l["a"])([Object(ta["a"])()],Ml.prototype,"_reset",null),Ml=Object(l["a"])([Object(x["a"])("esri.widgets.Compass")],Ml);const Pl=Ml;let Il=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"],this.navigationMode="pan",this.view=null}initialize(){this._handles.add(Object(Me["f"])(this,"view.inputManager",this._setNavigationMode.bind(this)))}destroy(){this._handles.destroy(),this._handles=null,this.view=null}get state(){return this.get("view.ready")&&"3d"===this.view.type?"ready":"disabled"}toggle(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate",this._setNavigationMode())}_setNavigationMode(){this.get("view.inputManager").primaryDragAction="pan"===this.navigationMode?"pan":"rotate"}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Il.prototype,"state",null),Object(l["a"])([Object(j["b"])()],Il.prototype,"navigationMode",void 0),Object(l["a"])([Object(j["b"])()],Il.prototype,"view",void 0),Il=Object(l["a"])([Object(x["a"])("esri.widgets.NavigationToggleViewModel")],Il);const Dl=Il,Ll={base:"esri-navigation-toggle esri-widget",button:"esri-navigation-toggle__button esri-widget--button",activeButton:"esri-navigation-toggle__button--active",panButton:"esri-navigation-toggle__button--pan",rotateButton:"esri-navigation-toggle__button--rotate",isLayoutHorizontal:"esri-navigation-toggle--horizontal",rotationIcon:"esri-icon-rotate",panIcon:"esri-icon-pan",widgetIcon:"esri-icon-pan2",disabled:"esri-disabled"};let Nl=class extends Ie["a"]{constructor(e,t){super(e,t),this.iconClass=Ll.widgetIcon,this.label=void 0,this.messages=null,this.view=null,this.viewModel=new Dl}set layout(e){"horizontal"!==e&&(e="vertical"),this._set("layout",e)}toggle(){return this.viewModel.toggle()}render(){const e="disabled"===this.get("viewModel.state"),t="pan"===this.get("viewModel.navigationMode"),r={[Ll.disabled]:e,[Ll.isLayoutHorizontal]:"horizontal"===this.layout},i={[Ll.activeButton]:t},n={[Ll.activeButton]:!t},a=e?-1:0,s=this.messages.toggle;return Object(ir["a"])("div",{bind:this,class:this.classes(Ll.base,r),onclick:this._toggle,onkeydown:this._toggle,tabIndex:a,"aria-label":s,title:s},Object(ir["a"])("div",{class:this.classes(Ll.button,Ll.panButton,i)},Object(ir["a"])("span",{class:Ll.panIcon})),Object(ir["a"])("div",{class:this.classes(Ll.button,Ll.rotateButton,n)},Object(ir["a"])("span",{class:Ll.rotationIcon})))}_toggle(){this.toggle()}};Object(l["a"])([Object(j["b"])()],Nl.prototype,"iconClass",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],Nl.prototype,"label",void 0),Object(l["a"])([Object(j["b"])({value:"vertical"})],Nl.prototype,"layout",null),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/NavigationToggle/t9n/NavigationToggle")],Nl.prototype,"messages",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],Nl.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:Dl})],Nl.prototype,"viewModel",void 0),Object(l["a"])([Object(ta["a"])()],Nl.prototype,"_toggle",null),Nl=Object(l["a"])([Object(x["a"])("esri.widgets.NavigationToggle")],Nl);const Fl=Nl,kl={button:"esri-widget--button esri-widget",disabled:"esri-disabled",interactive:"esri-interactive",iconText:"esri-icon-font-fallback-text",icon:"esri-icon"};let Ul=class extends Ie["a"]{constructor(){super(...arguments),this.enabled=!0,this.iconClass="",this.title=""}render(){const e=this.enabled?0:-1,t={[kl.disabled]:!this.enabled,[kl.interactive]:this.enabled},r={[this.iconClass]:!!this.iconClass};return Object(ir["a"])("div",{bind:this,class:this.classes(kl.button,t),onclick:this._triggerAction,onkeydown:this._triggerAction,role:"button",tabIndex:e,title:this.title},Object(ir["a"])("span",{"aria-hidden":"true",role:"presentation",class:this.classes(kl.icon,r)}),Object(ir["a"])("span",{class:kl.iconText},this.title))}_triggerAction(){this.action.call(this)}};Object(l["a"])([Object(j["b"])()],Ul.prototype,"action",void 0),Object(l["a"])([Object(j["b"])()],Ul.prototype,"enabled",void 0),Object(l["a"])([Object(j["b"])()],Ul.prototype,"iconClass",void 0),Object(l["a"])([Object(j["b"])()],Ul.prototype,"title",void 0),Object(l["a"])([Object(ta["a"])()],Ul.prototype,"_triggerAction",null),Ul=Object(l["a"])([Object(x["a"])("esri.widgets.IconButton")],Ul);const zl=Ul;let Bl=class extends F["a"]{get canZoomIn(){if(!this.get("view.ready"))return!1;const e=this.get("view.animation.target.scale")||this.get("view.scale"),t=this.get("view.constraints.effectiveMaxScale");return 0===t||e>t}get canZoomOut(){if(!this.get("view.ready"))return!1;const e=this.get("view.animation.target.scale")||this.get("view.scale"),t=this.get("view.constraints.effectiveMinScale");return 0===t||e<t}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Bl.prototype,"canZoomIn",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Bl.prototype,"canZoomOut",null),Object(l["a"])([Object(j["b"])()],Bl.prototype,"view",void 0),Bl=Object(l["a"])([Object(x["a"])("esri.widgets.Zoom.ZoomConditions2D")],Bl);const Vl=Bl;let Gl=class extends F["a"]{get canZoomIn(){return!!this.get("view.ready")}get canZoomOut(){return!!this.get("view.ready")}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Gl.prototype,"canZoomIn",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Gl.prototype,"canZoomOut",null),Object(l["a"])([Object(j["b"])()],Gl.prototype,"view",void 0),Gl=Object(l["a"])([Object(x["a"])("esri.widgets.Zoom.ZoomConditions3D")],Gl);const Hl=Gl;let ql=class extends F["a"]{constructor(e){super(e),this.canZoomIn=!1,this.canZoomOut=!1}destroy(){this.view=null}get state(){return this.get("view.ready")?"ready":"disabled"}set view(e){e?"2d"===e.type?this._zoomConditions=new Vl({view:e}):"3d"===e.type&&(this._zoomConditions=new Hl({view:e})):this._zoomConditions=null,this._set("view",e)}zoomIn(){if(!this.canZoomIn)return;const e=this.view;"2d"===e.type?e.mapViewNavigation.zoomIn():Object(_["l"])(e.goTo({zoomFactor:2}))}zoomOut(){if(!this.canZoomOut)return;const e=this.view;"2d"===e.type?e.mapViewNavigation.zoomOut():Object(_["l"])(e.goTo({zoomFactor:.5}))}};Object(l["a"])([Object(j["b"])()],ql.prototype,"_zoomConditions",void 0),Object(l["a"])([Object(j["b"])({aliasOf:"_zoomConditions.canZoomIn",readOnly:!0})],ql.prototype,"canZoomIn",void 0),Object(l["a"])([Object(j["b"])({aliasOf:"_zoomConditions.canZoomOut",readOnly:!0})],ql.prototype,"canZoomOut",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],ql.prototype,"state",null),Object(l["a"])([Object(j["b"])()],ql.prototype,"view",null),ql=Object(l["a"])([Object(x["a"])("esri.widgets.Zoom.ZoomViewModel")],ql);const Wl=ql,$l={base:"esri-zoom esri-widget",horizontalLayout:"esri-zoom--horizontal",zoomInIcon:"esri-icon-plus",zoomOutIcon:"esri-icon-minus",widgetIcon:"esri-icon-zoom-in-magnifying-glass"};let Zl=class extends Ie["a"]{constructor(e,t){super(e,t),this.iconClass=$l.widgetIcon,this.label=void 0,this.messages=null,this.view=null,this.viewModel=new Wl}initialize(){this._zoomInButton=new zl({action:this.zoomIn.bind(this),iconClass:$l.zoomInIcon}),this._zoomOutButton=new zl({action:this.zoomOut.bind(this),iconClass:$l.zoomOutIcon})}destroy(){this._zoomInButton.destroy(),this._zoomOutButton.destroy(),this._zoomInButton=null,this._zoomOutButton=null}set layout(e){"horizontal"!==e&&(e="vertical"),this._set("layout",e)}render(){const e=this.viewModel,t={[$l.horizontalLayout]:"horizontal"===this.layout};return this._zoomInButton.enabled="ready"===e.state&&e.canZoomIn,this._zoomOutButton.enabled="ready"===e.state&&e.canZoomOut,this._zoomInButton.title=this.messages.zoomIn,this._zoomOutButton.title=this.messages.zoomOut,Object(ir["a"])("div",{class:this.classes($l.base,t)},this._zoomInButton.render(),this._zoomOutButton.render())}zoomIn(){return this.viewModel.zoomIn()}zoomOut(){return this.viewModel.zoomOut()}};Object(l["a"])([Object(j["b"])()],Zl.prototype,"iconClass",void 0),Object(l["a"])([Object(j["b"])({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],Zl.prototype,"label",void 0),Object(l["a"])([Object(j["b"])({value:"vertical"})],Zl.prototype,"layout",null),Object(l["a"])([Object(j["b"])(),Object(rr["a"])("esri/widgets/Zoom/t9n/Zoom")],Zl.prototype,"messages",void 0),Object(l["a"])([Object(Pe["a"])("viewModel.view")],Zl.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:Wl})],Zl.prototype,"viewModel",void 0),Zl=Object(l["a"])([Object(x["a"])("esri.widgets.Zoom")],Zl);const Xl=Zl,Yl="esri.views.ui.DefaultUI";function Jl(e){return e&&void 0!==e.view}v["a"].getLogger(Yl);let Ql=class extends bl{constructor(e){super(e),this._defaultPositionLookup={attribution:"manual",compass:"top-leading","navigation-toggle":"top-leading",zoom:"top-leading"},this.components=[]}initialize(){this._handles.add([Object(oe["e"])(()=>this.components,this._componentsWatcher.bind(this),oe["a"]),Object(oe["e"])(()=>this.view,this._updateViewAwareWidgets.bind(this),oe["a"])])}_add(e,t,r,i){if("string"==typeof e&&this._defaultPositionLookup[e]){if(this._find(e))return;e=this._createComponent(e)}super._add(e,t,r,i)}_removeComponents(e){e.forEach(e=>{const t=this._find(e);t&&(this.remove(t),t.destroy())})}_updateViewAwareWidgets(e){this.components.forEach(t=>{const r=this._find(t),i=r&&r.widget;Jl(i)&&(i.view=e)})}_componentsWatcher(e,t){this._removeComponents(t),this._addComponents(e),this._adjustPadding(e)}_adjustPadding(e){if(-1===e.indexOf("attribution")&&!this._isOverridden("padding")){const{top:e}=this.padding;this.padding=e}}_addComponents(e){this.initialized&&e.forEach(e=>this.add(this._createComponent(e),this._defaultPositionLookup[e]))}_createComponent(e){const t=this._createWidget(e);if(t)return new sl({id:e,node:t})}_createWidget(e){return"attribution"===e?this._createAttribution():"compass"===e?this._createCompass():"navigation-toggle"===e?this._createNavigationToggle():"zoom"===e?this._createZoom():void 0}_createAttribution(){return new Sl({view:this.view})}_createCompass(){return new Pl({view:this.view})}_createNavigationToggle(){return new Fl({view:this.view})}_createZoom(){return new Xl({view:this.view})}};Object(l["a"])([Object(j["b"])()],Ql.prototype,"components",void 0),Ql=Object(l["a"])([Object(x["a"])(Yl)],Ql);const Kl=Ql;let eu=class extends Kl{constructor(e){super(e),this.components=["attribution","zoom"]}};Object(l["a"])([Object(j["b"])()],eu.prototype,"components",void 0),eu=Object(l["a"])([Object(x["a"])("esri.views.ui.2d.DefaultUI2D")],eu);const tu=eu;var ru;let iu=ru=class extends m["a"]{constructor(e){super(e),this.color=new d["a"]([0,0,0,1])}clone(){return new ru(Object(g["a"])({color:this.color}))}};Object(l["a"])([Object(j["b"])({type:d["a"],json:{write:!0}})],iu.prototype,"color",void 0),iu=ru=Object(l["a"])([Object(x["a"])("esri.webmap.background.ColorBackground")],iu);const nu=iu,au=v["a"].getLogger("esri.views.MapView");let su,ou,cu,lu,uu,du;async function hu(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:n,MagnifierView2D:a,Stage:s}]=await Promise.all([r.e("chunk-6c50f5ec").then(r.bind(null,"0943")),Promise.all([r.e("chunk-029272f3"),r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-1659aab9"),r.e("chunk-534c2194")]).then(r.bind(null,"b460"))]);ou=e,cu=t,lu=i,uu=n,du=a,su=s}const pu=160;function fu(e){return e&&"esri.Viewpoint"===e.declaredClass}let bu=class extends(je(wa(xa(Us)))){constructor(e){super(e),this._magnifierView=null,this._stage=null,this._resolveWhenReady=[],this.rootLayerViews=new k["a"]({getCollections:()=>{var e,t;return[null==(e=this.basemapView)?void 0:e.baseLayerViews,this.layerViews,null==(t=this.basemapView)?void 0:t.referenceLayerViews]},getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.fullOpacity=1,this.graphicsView=null,this.labelManager=null,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.rendering=!1,this.supersampleScreenshotsEnabled=!1,this.supportsGround=!1,this._stationaryTimer=null,this.frameTask=new $s(this),this._pePromise=null,this.floors=new h["a"],this.highlightOptions=new Zc,this.inputManager=new Hc({view:this}),this.map=null,this.resizeAlign="center",this.spatialReferenceLocked=!1,this.timeline=new Xc["a"],this.type="2d",this.ui=new tu,this.constraints=new yo,this.padding={top:0,right:0,bottom:0,left:0},this.handles.add([Object(oe["e"])(()=>this.viewpoint,()=>{this._lastStationaryEventTimestamp=performance.now(),this._flipStationary(pu)},oe["c"]),this.on("resize",e=>this._resizeHandler(e)),Object(oe["e"])(()=>{var e;return null==(e=this.animationManager)?void 0:e.animation},e=>{this.animation=e})]),Object(ue["a"])()}destroy(){this._set("preconditionsReady",!1),this._gotoTask=this.frameTask=null,this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new qc["a"](this.featuresTilingScheme)}get initialExtentRequired(){var e;const{scale:t,constraints:r,center:i,viewpoint:n,extent:a}=this;let s=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&null!=(e=this.map.initialViewProperties)&&e.viewpoint)&&!a&&(null!=r&&r.effectiveLODs||(s=-1),(!i||0===t&&-1===s)&&(!n||!Object(z["k"])(n.targetGeometry)||"extent"!==n.targetGeometry.type&&!n.scale))}get resourceManager(){return this._stage.resourceManager}get textureManager(){return this._stage.painter.textureManager}get _defaultsFromMapSettings(){return{required:{tileInfo:!0,heightModelInfo:!1,extent:!1},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get _projectionEngineLoaded(){return!!Object(pe["h"])()||(this._pePromise||(this._pePromise=Object(pe["i"])().finally(()=>{this._pePromise=null})),!1)}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=this.spatialReference,r=Object(z["t"])(e.targetGeometry);return!!Object(pe["b"])(r.spatialReference,t)||this._projectionEngineLoaded}set animation(e){const t=this._get("animation");if(e===t)return;if(t&&t.stop(),!e||e.isFulfilled())return void this._set("animation",null);this._set("animation",e),this.frameTask.animationInProgress=!0;const r=()=>{e===this._get("animation")&&(this._set("animation",null),this.frameTask.requestFrame()),this.frameTask.animationInProgress=!1};e.when(r,r)}get background(){return this.get("map.initialViewProperties.background")||null}set background(e){void 0===e?this._clearOverride("background"):this._override("background",e)}get center(){if(!this.ready)return this._get("center");const{center:e,spatialReference:t}=this.state.paddedViewState;return new he["a"]({x:e[0],y:e[1],spatialReference:t})}set center(e){if(null==e)return;if(!this.ready)return this._set("center",e),void this.notifyChange("initialExtentRequired");let t;try{t=this._project(e,this.spatialReference)}catch(i){return void au.error(new b["a"]("mapview:invalid-center","could not project the value in the view's spatial reference",{input:e,error:i}))}const r=this.viewpoint;Object(Gs["c"])(r,r,t),this.viewpoint=r}set constraints(e){const t=this._get("constraints");t&&(this.handles.remove("map-view-constraints"),t.destroy()),this._set("constraints",e),e&&(e.view=this,this.ready&&(this.state.viewpoint=e.fit(this.state.paddedViewState.viewpoint)),this.handles.add(Object(oe["e"])(()=>e.version,()=>{this.ready&&this.state&&(this.state.viewpoint=e.fit(this.state.paddedViewState.viewpoint))},oe["c"]),"map-view-constraints"))}get extent(){return this.ready?this.state.paddedViewState.extent.clone():this._get("extent")}set extent(e){if(null==e)return;if(!e.width||!e.height)return void au.error(new b["a"]("mapview:invalid-extent","invalid extent size"));if(!this.ready)return this._set("extent",e),this._set("center",null),this._set("viewpoint",null),this._set("scale",0),this._set("zoom",-1),void this.notifyChange("initialExtentRequired");let t;try{t=this._project(e,this.spatialReference)}catch(i){return void au.error(new b["a"]("mapview:invalid-extent","could not project the value in the view's spatial reference",{error:i}))}const r=this.viewpoint;Object(Gs["v"])(r,r,t,this.size,{constraints:this.constraints}),this.viewpoint=r}get padding(){return this.ready?this.state.padding:this._get("padding")}set padding(e){this.ready?(this.state.padding=e,this._set("padding",this.state.padding)):this._set("padding",e)}get resolution(){return this.state?this.state.resolution:0}get rotation(){return this.ready?this.state.rotation:this._get("rotation")}set rotation(e){if(isNaN(e))return;if(!this.ready)return void this._set("rotation",e);const t=this.viewpoint;Object(Gs["s"])(t,t,e),this.viewpoint=t}get scale(){return this.ready?this.state.scale:this._get("scale")}set scale(e){if(!e||isNaN(e))return;if(!this.ready){this._set("scale",e),this._set("zoom",-1);const t=this._get("extent");return t&&(this._set("extent",null),this._set("center",t.center)),void this.notifyChange("initialExtentRequired")}const t=this.viewpoint;Object(Gs["u"])(t,t,e),this.viewpoint=t}get stationary(){return!(this.animation||this.navigating||this.resizing||this._stationaryTimer)}get updating(){return!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||!0===this.layerViewManager.updating||!0===this.labelManager.updating||!0===this.graphicsView.updating||this.allLayerViews.some(e=>!e.destroyed&&!("layerViews"in e)&&!0===e.updating))}get viewpoint(){if(!this.ready)return this._get("viewpoint");const e=this.state.paddedViewState;return e&&e.viewpoint.clone()}set viewpoint(e){if(null==e)return;if(!this.ready)return this._set("viewpoint",e),this._set("extent",null),this._set("center",null),this._set("zoom",-1),this._set("scale",0),void this.notifyChange("initialExtentRequired");let t,r;try{t=this._project(e,this.spatialReference),!e.scale||isNaN(e.scale)?r=new b["a"]("mapview:invalid-viewpoint","invalid scale value of "+e.scale):Object(z["j"])(e.targetGeometry)&&(r=new b["a"]("mapview:invalid-viewpoint","geometry not defined"))}catch(n){r=new b["a"]("mapview:invalid-viewpoint","could not project the value in the view's spatial reference",{error:n})}if(r)return void au.error(r);this._scaleBeforeChangingSpatialReference=null;const i=new ae["a"]({targetGeometry:new he["a"],scale:0,rotation:0});Object(Gs["d"])(i,t),this.constraints.constrain(i,this.state.paddedViewState.viewpoint),this.state.viewpoint=i,this.frameTask.requestFrame(),this._set("viewpoint",i)}get zoom(){return this.ready?this.constraints.scaleToZoom(this.scale):this._get("zoom")}set zoom(e){if(null==e)return;if(!this.ready){this._set("zoom",e),this._set("scale",0);const t=this._get("extent");return t&&(this._set("extent",null),this._set("center",t.center)),void this.notifyChange("initialExtentRequired")}if(!this.constraints.effectiveLODs)return void this._set("zoom",-1);const t=this.viewpoint;Object(Gs["u"])(t,t,this.constraints.zoomToScale(e)),this.viewpoint=t,this._set("zoom",this.constraints.scaleToZoom(this.scale))}get navigating(){return!(!this.mapViewNavigation||!this.mapViewNavigation.interacting)}goTo(e,t){if(e)return this.animation&&(this.animation=null),this._createAnimation(),Object(oe["g"])(()=>this.ready,t).then(()=>{const r={animate:!0,...t},i=Object(Gs["e"])(e,this);return this.animation.update(i),this._gotoTask={},r.animate?this._gotoAnimated(i,r):this._gotoImmediate(i,r)});au.error("#goTo()","target cannot be null or undefined")}async hitTest(e,t){const r=ns(e)?is(this,e):e;if(!this.ready||isNaN(r.x)||isNaN(r.y))return{screenPoint:r,results:[]};let i=new Set,n=!1,a=null,s=null;null!=t&&t.include?Ou(t.include,yu(this,e=>i.add(e),e=>{a||(a=new Set),a.add(e)},e=>i.add(e),()=>n=!0)):(n=!0,i=new Set(this.allLayerViews)),null!=t&&t.exclude&&Ou(t.exclude,yu(this,e=>i.delete(e),e=>{s||(s=new Set),s.add(e)}));const o=this.allLayerViews.filter(e=>!e.suspended&&i.has(e)).reverse(),c=this.toMap(r);let l=(await Promise.all([n?this.graphicsView.hitTest(c):null,...o.map(e=>e.hitTest(c,r))])).filter(z["k"]).flat();return a&&(l=l.filter(e=>a.has(gu(e)))),s&&(l=l.filter(e=>!s.has(gu(e)))),{screenPoint:r,results:l.map(e=>({mapPoint:c,graphic:e}))}}takeScreenshot(e){e=e||{};const t=this.supersampleScreenshotsEnabled?Math.min(4,Object(Jc["d"])(this.size,Math.min(4096,this._stage.context.parameters.maxTextureSize))):1;let r;e.layers?(r=[],e.layers.forEach(e=>{const t=this.allLayerViews.find(t=>t.layer.id===e.id);t&&"container"in t&&t.container&&r.push(t.container)})):r=this._stage.children;const{format:i,quality:n}=Object(Jc["c"])(e.format,e.quality),a=Yc(e,t,this.size,this.padding,i,n,r,e.rotation);return this._stage.takeScreenshot(a)}toMap(e){if(!this.ready)return null;const t=ns(e)?is(this,e):e,r=[0,0],[i,n]=this.state.toMap(r,[t.x,t.y]),a=this.spatialReference;return new he["a"]({x:i,y:n,spatialReference:a})}toScreen(e){if(!this.ready)return null;const t=this._project(e,this.spatialReference),r=[t.x,t.y];return this.state.toScreen(r,r),Object(ce["e"])(r[0],r[1])}on(e,t,r,i){const n=this.inputManager&&this.viewEvents.on(e,t,r,i);return n||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){this.graphicsView&&this.graphicsView.graphicUpdateHandler(e)}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.spatialReference)||null}hasLayerViewModule(e){return Ks.hasLayerViewModule(e)}importLayerView(e){return Ks.importLayerView(e)}pixelSizeAt(){return this.ready?this.state.resolution:(au.error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}popupHitTest(e){return this.hitTest(e).then(t=>({...t,mapPoint:this.toMap(e)}))}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}validate(){let e=el(this.type);return Object(E["a"])("safari")&&Object(E["a"])("safari")<9&&(e=new b["a"]("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:Object(E["a"])("safari")})),Object(z["k"])(e)?(au.warn("#validate()",e.message),Promise.reject(e)):hu()}_createAnimation(){return this.animation&&!this.animation.done||(this.animation=new Bs),this.animation}_cancellableGoTo(e,t,r){const i=()=>e===this._gotoTask,n=r.then(()=>{i()&&(this.animation=null)}).catch(e=>{throw i()&&(this.animation=null,t.done||(t.stop(),this.frameTask.animationInProgress=!1)),e}),a=new Promise(e=>e(n));return t.when().catch(()=>{i()&&a.cancel&&a.cancel()}),a}_gotoImmediate(e,t){const r=this._gotoTask,i=this.animation,n=e.then(e=>{if(Object(_["v"])(t),r!==this._gotoTask)throw new b["a"]("view:goto-interrupted","Goto was interrupted");this.viewpoint=i.target=e,i.finish()});return this._cancellableGoTo(r,i,n)}_flipStationary(e){return null!==this._stationaryTimer||(this._stationaryTimer=setTimeout(()=>{this._stationaryTimer=null;const e=performance.now()-this._lastStationaryEventTimestamp;e<pu&&(this._stationaryTimer=this._flipStationary(e))},e)),this._stationaryTimer}_getDefaultViewpoint(){var e,t,r,i;const{constraints:n,initialExtent:a,map:s}=this;if(!n)return null;const o=s&&"initialViewProperties"in s&&s.initialViewProperties,c={zoom:this._get("zoom"),scale:this._get("scale"),center:this._get("center"),extent:this._get("extent"),rotation:this._get("rotation"),viewpoint:this._get("viewpoint"),spatialReference:this._userSpatialReference};n.effectiveLODs?-1!==c.zoom&&(c.scale=n.zoomToScale(c.zoom)):c.zoom=-1;let l=null,u=null,d=0;const h=c.viewpoint&&c.viewpoint.rotation,p=c.viewpoint&&c.viewpoint.targetGeometry;Object(z["k"])(p)&&("extent"===p.type?l=p:"point"===p.type&&(u=p,d=c.viewpoint.scale));const f=c.extent||l||(null==(e=Object(z["t"])(null==o||null==(t=o.viewpoint)?void 0:t.targetGeometry))?void 0:e.extent)||a,b=c.center||u||(null==f?void 0:f.center),m=c.scale||d||(null==o||null==(r=o.viewpoint)?void 0:r.scale)||f&&Object(Gs["f"])(f,this.size),g=c.rotation||h||(null==o||null==(i=o.viewpoint)?void 0:i.rotation)||0;return b&&m?new ae["a"]({targetGeometry:b,scale:m,rotation:g}):null}_gotoAnimated(e,t){const r=this._gotoTask,i=this.animation,n=e.then(e=>{if(Object(_["v"])(t),r!==this._gotoTask)throw new b["a"]("view:goto-interrupted","Goto was interrupted");return i.update(e),this.animationManager.animate(i,this.viewpoint,t),i.when().then(()=>{},()=>{})});return this._cancellableGoTo(r,i,n)}_project(e,t){var r;const i=e&&e.targetGeometry||e;if(!t)return e;if(!i)return null;if(t.imageCoordinateSystem||null!=(r=i.spatialReference)&&r.imageCoordinateSystem)return e;if(Object(fe["d"])(t,i.spatialReference))return e;const n=Object(pe["m"])(i,t);if(!n)throw new b["a"]("mapview:projection-not-possible","projecting input geometry to target spatial reference returned a null value",{geometry:i,spatialReference:t});return fu(e)?(e.targetGeometry=n,e):n}_resizeHandler(e){if(!this.ready)return;const t=this.state;let r=this.state.paddedViewState.viewpoint;const i=this.state.paddedViewState.size.concat();t.size=[e.width,e.height],Object(Gs["q"])(r,r,i,this.state.paddedViewState.size,this.resizeAlign),r=this.constraints.constrain(r,null),this.state.viewpoint=r}_startup(){var e;this.timeline.begin("MapView Startup");const t=this._getDefaultViewpoint(),r=t.targetGeometry;try{this._project(t,this.spatialReference)}catch(l){var i;au.warn(new le["a"]("mapview:startup-projection-error","projection of initial viewpoint to the view's spatial reference, defaulting to the initial viewpoint.",{center:r.toJSON(),spatialReference:this.spatialReference,error:l})),t.targetGeometry=(null==(i=this.defaultsFromMap.extent)?void 0:i.center)||new he["a"]({x:0,y:0,spatialReference:this.spatialReference})}null==(e=this.constraints)||e.fit(t),this._set("state",new ko({padding:this._get("padding"),size:this.size,viewpoint:t})),this.graphics.owner=this;const n=new su(this.surface,{canvas:this.renderCanvas,supersampleScreenshots:this.supersampleScreenshotsEnabled,contextOptions:{disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},renderingOptions:this.renderingOptions,timeline:this.timeline});this._stage=n,this._magnifierView=new du,this._magnifierView.magnifier=this.magnifier;const a=new lu({view:this});this._set("labelManager",a);const s=new Ws({view:this});this._set("animationManager",s);const o=new uu({view:this,animationManager:s});this._set("mapViewNavigation",o),this._setupSpatialReferenceDependentProperties(),this.handles.add([this.rootLayerViews.on("change",()=>this._updateStageChildren()),n.on("post-render",()=>this._set("rendering",n.renderRequested)),n.on("will-render",()=>this._set("rendering",n.renderRequested)),n.on("webgl-error",e=>this.fatalError=e.error),Object(oe["e"])(()=>this.stationary,e=>n.stationary=e,oe["d"]),Object(oe["e"])(()=>this.background,e=>{n.background=e,this._magnifierView.background=e},oe["d"]),Object(oe["e"])(()=>this.magnifier,e=>this._magnifierView.magnifier=e,oe["d"]),Object(oe["e"])(()=>this.renderingOptions,e=>n.renderingOptions=e,oe["d"]),Object(oe["e"])(()=>this.highlightOptions,e=>n.highlightOptions=e,oe["d"]),Object(oe["e"])(()=>this.state.id,()=>n.state=this.state,oe["d"])],"map-view"),this._updateStageChildren();const c=this._resolveWhenReady;this._resolveWhenReady=[],c.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask&&this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.handles.remove("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this._stage.destroy(),this._stage=null,this._set("graphicsView",null),this._magnifierView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask&&this.frameTask.stop(),this._stationaryTimer&&(clearTimeout(this._stationaryTimer),this._stationaryTimer=null),this._set("ready",!1);const{center:[e,t],spatialReference:r,rotation:i,scale:n}=this.state.paddedViewState,a=new he["a"]({x:e,y:t,spatialReference:r});this._set("viewpoint",null),this._set("extent",null),this._set("center",a),this._set("zoom",-1),this._set("rotation",i),this._set("scale",n),this._set("spatialReference",r),this._set("state",null),this.animation=null}_updateStageChildren(){this._stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this._stage.addChild(e.container)});const e=this.graphicsView;this._stage.addChild(e.container),this._stage.addChild(this._magnifierView)}_setupSpatialReferenceDependentProperties(){const e=new Uo["a"](be["a"].create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",e);const t=new ou({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new cu(e)});this.frameTask.graphicsView=t,this._set("graphicsView",t)}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),this.frameTask.graphicsView=null,e.destroy(),this._set("featuresTilingScheme",null)}_spatialReferenceChanged(e){if(!this.ready)return;this.frameTask.stop();for(const c of this.allLayerViews)c.processDetach();this._destroySpatialReferenceDependentProperties();const t=this.state.paddedViewState.clone();if(Object(z["j"])(this._scaleBeforeChangingSpatialReference))this._scaleBeforeChangingSpatialReference=t.scale;else{const e=t.viewpoint.clone();e.scale=this._scaleBeforeChangingSpatialReference,t.viewpoint=e}const r=t.clone(),[i,n]=t.center;let a=null;try{a=this._project(new he["a"]({x:i,y:n,spatialReference:t.spatialReference}),e)}catch(o){Object(pe["h"])()||au.warn(new le["a"]("mapview:spatial-reference-change","could not project the view's center to the new spatial reference",{center:a.toJSON(),spatialReference:e,error:o}))}a||(a=new he["a"]({x:0,y:0,spatialReference:e}));const s=Object(Gs["c"])(new ae["a"]({targetGeometry:new he["a"],scale:0,rotation:0}),t.viewpoint,a);r.viewpoint=s;try{const i=20,n=[t.size[0]/2,t.size[1]/2],a=[n[0]+i,n[1]],o=t.toMap([0,0],a),{x:c,y:l}=this._project(new he["a"]({x:o[0],y:o[1],spatialReference:t.spatialReference}),e);o[0]=c,o[1]=l,r.toScreen(o,o);const u=Object(Gs["b"])(n,o,a),d=Math.hypot(o[0]-n[0],o[1]-n[1])/i;!Number.isFinite(d)||Math.abs(d)>4?(s.rotation=0,s.targetGeometry=new he["a"]({x:0,y:0,spatialReference:e})):(s.scale*=d,s.scale>Object(E["a"])("mapview-srswitch-adjust-rotation-scale-threshold")?s.rotation=0:s.rotation+=Number.isFinite(u)?u:0)}catch{}this._get("constraints").constrain(s,null),this._get("state").viewpoint=s,this._stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const c of this.allLayerViews)c.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}};Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"animationManager",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],bu.prototype,"deactivatedWebGLExtensions",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],bu.prototype,"debugWebGLExtensions",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"featuresTilingScheme",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"fullOpacity",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"graphicsTileStore",null),Object(l["a"])([Object(j["b"])()],bu.prototype,"graphicsView",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"state",void 0),Object(l["a"])([Object(j["b"])()],bu.prototype,"initialExtentRequired",null),Object(l["a"])([Object(j["b"])()],bu.prototype,"labelManager",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"resourceManager",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"textureManager",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"mapViewNavigation",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],bu.prototype,"renderCanvas",void 0),Object(l["a"])([Object(j["b"])()],bu.prototype,"renderingOptions",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"rendering",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],bu.prototype,"supersampleScreenshotsEnabled",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"supportsGround",void 0),Object(l["a"])([Object(j["b"])()],bu.prototype,"_stationaryTimer",void 0),Object(l["a"])([Object(j["b"])()],bu.prototype,"_defaultsFromMapSettings",null),Object(l["a"])([Object(j["b"])()],bu.prototype,"_pePromise",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"typeSpecificPreconditionsReady",null),Object(l["a"])([Object(j["b"])()],bu.prototype,"animation",null),Object(l["a"])([Object(j["b"])({type:nu})],bu.prototype,"background",null),Object(l["a"])([Object(j["b"])({value:null,type:he["a"],dependsOn:["state.id","ready"]})],bu.prototype,"center",null),Object(l["a"])([Object(j["b"])({type:yo})],bu.prototype,"constraints",null),Object(l["a"])([Object(j["b"])({value:null,type:de["a"],dependsOn:["state.id","ready"]})],bu.prototype,"extent",null),Object(l["a"])([Object(j["b"])()],bu.prototype,"floors",void 0),Object(l["a"])([Object(j["b"])({type:Zc})],bu.prototype,"highlightOptions",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"inputManager",void 0),Object(l["a"])([Object(j["b"])()],bu.prototype,"map",void 0),Object(l["a"])([Object(j["b"])({value:{top:0,right:0,bottom:0,left:0},cast:e=>({top:0,right:0,bottom:0,left:0,...e})})],bu.prototype,"padding",null),Object(l["a"])([Object(j["b"])()],bu.prototype,"resizeAlign",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,dependsOn:["state.id"]})],bu.prototype,"resolution",null),Object(l["a"])([Object(j["b"])({value:0,type:Number,dependsOn:["state.id","ready"]})],bu.prototype,"rotation",null),Object(l["a"])([Object(j["b"])({value:0,type:Number,dependsOn:["state.id","ready"]})],bu.prototype,"scale",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],bu.prototype,"spatialReferenceLocked",void 0),Object(l["a"])([Object(j["b"])()],bu.prototype,"stationary",null),Object(l["a"])([Object(j["b"])({type:Xc["a"],readOnly:!0})],bu.prototype,"timeline",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"type",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],bu.prototype,"updating",null),Object(l["a"])([Object(j["b"])({value:null,type:ae["a"],dependsOn:["state.id","ready"]})],bu.prototype,"viewpoint",null),Object(l["a"])([Object(j["b"])({value:-1,dependsOn:["state.id"]})],bu.prototype,"zoom",null),Object(l["a"])([Object(j["b"])({type:Boolean})],bu.prototype,"navigating",null),Object(l["a"])([Object(j["b"])({type:tu})],bu.prototype,"ui",void 0),bu=Object(l["a"])([Object(x["a"])("esri.views.MapView")],bu);const mu=bu;function gu(e){const t=e.getObjectId();var r,i,n,a;return t?`${null!=(r=null!=(i=null==(n=e.layer)?void 0:n.uid)?i:null==(a=e.sourceLayer)?void 0:a.uid)?r:"MapView"}/${t}`:'"MapView/'+e.uid}function yu(e,t,r,i,n){return a=>{if(a instanceof ie["a"]){if(a.layer===e)null==n||n();else{const t=e.allLayerViews.find(e=>e.layer===a.layer);t&&(null==i||i(t))}r(gu(a))}else{const r=e.allLayerViews.find(e=>e.layer===a);r&&t(r)}}}function Ou(e,t){if(e)if(Object(se["c"])(e))for(const r of e)if(Object(se["c"])(r))for(const e of r)t(e);else t(r);else t(e)}var vu=r("2603"),_u=r("fe80"),ju=r("0b2d"),wu=r("9180"),xu=r("0d9f"),Tu=r("36cf"),Su=r("49a0"),Eu=r("bdba"),Au=r("7a18"),Cu=r("851f"),Ru=r("0cb9"),Mu=r("2ec5");const Pu=v["a"].getLogger("esri.views.support.GroundViewElevationSampler");let Iu=class extends U["a"].EventedAccessor{constructor(e){super(e),this.demResolution={min:-1,max:-1},this.noDataValue=Mu["b"]}initialize(){this.view.basemapTerrain.on("elevation-change",()=>this.emit("changed",{}))}get extent(){const e=this.view.basemapTerrain;return Object(z["k"])(e.extent)&&e.spatialReference?Object(wu["B"])(e.extent,e.spatialReference):null}elevationAt(e){const t=e.spatialReference,r=this.spatialReference;if(!Object(_n["a"])(t,r)){const e=t?t.wkid:"unknown";return Pu.error(`Cannot sample elevation at a location with spatial reference (${e}) different from the view (${r.wkid})`),null}if(Object(z["j"])(this.extent)||!Object(ro["e"])(this.extent,e)){const t=Object(z["k"])(this.extent)?`${this.extent.xmin}, ${this.extent.ymin}, ${this.extent.xmax}, ${this.extent.ymax}`:null;return Pu.warn("#elevationAt()",`Point used to sample elevation (${e.x}, ${e.y}) is outside of the sampler extent (${t})`),this.noDataValue}return Object(Ru["b"])(this.view.elevationProvider,e)}queryElevation(e){return Object(Cu["b"])(e.clone(),this)}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Iu.prototype,"demResolution",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Iu.prototype,"extent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Iu.prototype,"noDataValue",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"view.basemapTerrain.spatialReference"})],Iu.prototype,"spatialReference",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Iu.prototype,"view",void 0),Iu=Object(l["a"])([Object(x["a"])("esri.views.support.GroundViewElevationSampler")],Iu);const Du=Iu;let Lu=class extends F["a"]{constructor(e){super(e),this.handles=new ge["a"],this.view=null,this.layerViews=new h["a"]}initialize(){this.handles.add(Object(Me["f"])(this,"view.map.ground",e=>e.load())),this.handles.add(this.layerViews.on("after-changes",()=>this._layerViewsAfterChangesHandler()))}destroy(){this._set("view",null),this.handles&&(this.handles.destroy(),this.handles=null)}get elevationSampler(){return this.view?"2d"===this.view.type?null:this.view.ready&&this.view.basemapTerrain&&this.view.basemapTerrain.ready?new Du({view:this.view}):null:null}get updating(){return!this.suspended&&this.layerViews.some(e=>e.updating)}get suspended(){return!this.view||this.view.suspended}_layerViewsAfterChangesHandler(){this.handles.remove("updating"),this.handles.add(this.layerViews.map(e=>e.watch("updating",()=>this._updateUpdating(),!0)).toArray(),"updating"),this._updateUpdating()}_updateUpdating(){this.notifyChange("updating")}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Lu.prototype,"elevationSampler",null),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],Lu.prototype,"updating",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Lu.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:h["a"],readOnly:!0})],Lu.prototype,"layerViews",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Lu.prototype,"suspended",null),Lu=Object(l["a"])([Object(x["a"])("esri.views.GroundView")],Lu);const Nu=Lu,Fu=()=>r.e("chunk-0f684222").then(r.bind(null,"cbe4d")),ku=()=>Promise.resolve().then(r.bind(null,"1dc3")),Uu={analysis:()=>r.e("chunk-2d217289").then(r.bind(null,"c611")),"base-dynamic":()=>r.e("chunk-ec210914").then(r.bind(null,"7af4")),"base-elevation":ku,"base-tile":Fu,"bing-maps":Fu,"building-scene":()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-5e807b02"),r.e("chunk-6dc0d0fd")]).then(r.bind(null,"246f")),csv:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-2402613c")]).then(r.bind(null,"88bb")),elevation:ku,feature:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-8bab0a96")]).then(r.bind(null,"6e37")),geojson:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-722e9ff8")]).then(r.bind(null,"66a7")),graphics:()=>Promise.all([r.e("chunk-121d41d5"),r.e("chunk-af6276ba")]).then(r.bind(null,"bb49")),group:()=>r.e("chunk-2d0cc20b").then(r.bind(null,"4d38")),imagery:()=>r.e("chunk-cf9611a8").then(r.bind(null,"3a8b")),"integrated-mesh":()=>Promise.all([r.e("chunk-121d41d5"),r.e("chunk-5e807b02"),r.e("chunk-8d9e337e")]).then(r.bind(null,"f05f")),"map-image":()=>r.e("chunk-665281f1").then(r.bind(null,"997a")),"ogc-feature":()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-499f6514")]).then(r.bind(null,"52c0")),"open-street-map":Fu,"point-cloud":()=>Promise.all([r.e("chunk-33bd1f4e"),r.e("chunk-6c7a01e0")]).then(r.bind(null,"9056")),voxel:()=>r.e("chunk-2d0d640c").then(r.bind(null,"7283")),route:()=>Promise.all([r.e("chunk-121d41d5"),r.e("chunk-42d36847")]).then(r.bind(null,"b452")),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-5e807b02"),r.e("chunk-02473e05")]).then(r.bind(null,"1e7c")):Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-39efb0b6")]).then(r.bind(null,"c5729")),stream:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-7478d1a2")]).then(r.bind(null,"a7bf")),tile:Fu,"imagery-tile":()=>r.e("chunk-dd19b3a0").then(r.bind(null,"1793")),"vector-tile":()=>Promise.all([r.e("chunk-0bf7ec9a"),r.e("chunk-01b259ce"),r.e("chunk-d2111408"),r.e("chunk-4efe1192")]).then(r.bind(null,"ce88")),wcs:()=>r.e("chunk-dd19b3a0").then(r.bind(null,"1793")),"web-tile":Fu,wfs:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-121d41d5"),r.e("chunk-382fcf84"),r.e("chunk-7e86caba")]).then(r.bind(null,"9de2")),wms:()=>r.e("chunk-0e83f8cb").then(r.bind(null,"3dce")),wmts:()=>r.e("chunk-68f8e1d9").then(r.bind(null,"0513")),"geo-rss":null,kml:null,"map-notes":null,"subtype-group":null,unknown:null,unsupported:null};function zu(e){const t=e.declaredClass?e.declaredClass.slice(e.declaredClass.lastIndexOf(".")+1):"Unknown",r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new b["a"](r+":view-not-supported",t+" is not supported in 3D")}const Bu={hasLayerViewModule:e=>Object(z["k"])(Uu[e.type]),importLayerView:e=>{const t=Uu[e.type];if(!Object(z["k"])(t))throw zu(e);return t(e)}},Vu=v["a"].getLogger("esri.views.3d.analysis.AnalysisViewManager3D"),Gu="analyses-owner-handles";var Hu,qu;!function(e){e[e.PENDING=0]="PENDING",e[e.CREATED=1]="CREATED"}(Hu||(Hu={})),function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED"}(qu||(qu={}));let Wu=class extends(Object(Le["b"])(F["a"])){constructor(e){super(e),this._allAnalysisViews=new h["a"],this._creatingViewCount=0,this._items=new Map,this._scheduledUpdateHandle=null,this._analysisModules={"area-measurement":{module:null},"direct-line-measurement":{module:null},"line-of-sight":{module:null},slice:{module:null}}}destroy(){this.detach()}attach(){this.handles.add(this._connectOwner(this.view),Gu)}detach(){this.handles.remove(Gu),this._update(),this._creatingViewCount=0}get updating(){return!this.view.ready||0!==this._creatingViewCount||this._allAnalysisViews.some(e=>e.updating)}get testInfo(){return{allAnalysisViews:this._allAnalysisViews}}whenAnalysisView(e){const t=this._items.get(e);if(Object(z["j"])(t)||t.state.list===qu.REMOVED){const t=new b["a"]("AnalysisViewManager:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});return Promise.reject(t)}return t.createAnalysisViewTask.promise}_connectOwner(e){return this._connectAnalysesCollection(e.analyses)}_connectAnalysesCollection(e){for(const i of e)this._addAnalysis(i);const t=e.on("after-add",e=>this._addAnalysis(e.item)),r=e.on("after-remove",e=>this._removeAnalysis(e.item));return{remove:()=>{t.remove(),r.remove();for(const t of e)this._removeAnalysis(t)}}}_addAnalysis(e){const t=this._items.get(e);if(null==t){const t={state:{view:Hu.PENDING,list:qu.ADDED},analysis:e,view:null,createAnalysisViewTask:null};this._items.set(e,t),t.createAnalysisViewTask=Object(_["h"])(e=>this._createAnalysisViewPromise(t,e))}else t.state.list=qu.ADDED}_removeAnalysis(e){const t=this._items.get(e);null!=t?(t.state.list=qu.REMOVED,this._scheduleUpdate()):Vu.error("Trying to remove analysis which was not added")}_scheduleUpdate(){Object(z["k"])(this._scheduledUpdateHandle)||(this._scheduledUpdateHandle=Object(xe["b"])(()=>this._update()))}_update(){this._scheduledUpdateHandle=Object(z["s"])(this._scheduledUpdateHandle),this._items.forEach(e=>{if(e.state.list===qu.REMOVED)switch(this._items.delete(e.analysis),e.state.view){case Hu.PENDING:e.createAnalysisViewTask=Object(z["a"])(e.createAnalysisViewTask);break;case Hu.CREATED:Object(z["k"])(e.view)&&(this._allAnalysisViews.remove(e.view),e.view=Object(z["d"])(e.view),e.createAnalysisViewTask=null)}})}async _createAnalysisViewPromise(e,t){const r=e.analysis,i=r.type,n=this._analysisModules[i];if(this._creatingViewCount+=1,Object(z["j"])(n.module))try{n.module=await this._loadAnalysisModule(i)}catch(s){throw this._creatingViewCount-=1,s}if(Object(_["n"])(t))throw this._creatingViewCount-=1,Object(_["e"])("AnalysisView creation aborted");const a=new n.module.default({analysis:r,view:this.view});try{await a.when()}catch(s){throw this._creatingViewCount-=1,s}if(Object(_["n"])(t))throw this._creatingViewCount-=1,a.destroy(),Object(_["e"])("AnalysisView creation aborted");return e.view=a,e.state.view=Hu.CREATED,this._allAnalysisViews.add(a),this._creatingViewCount-=1,a}_loadAnalysisModule(e){switch(e){case"area-measurement":return Promise.all([r.e("chunk-2d22cf8c"),r.e("chunk-72413f24"),r.e("chunk-422e17ee")]).then(r.bind(null,"fbed"));case"direct-line-measurement":return Promise.all([r.e("chunk-2d22cf8c"),r.e("chunk-72413f24"),r.e("chunk-e7725ec6")]).then(r.bind(null,"6d28"));case"line-of-sight":return r.e("chunk-743c160e").then(r.bind(null,"d92e"));case"slice":return r.e("chunk-08e8eb9a").then(r.bind(null,"4e85"));default:return null}}};Object(l["a"])([Object(j["b"])()],Wu.prototype,"updating",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Wu.prototype,"view",void 0),Object(l["a"])([Object(j["b"])()],Wu.prototype,"_allAnalysisViews",void 0),Object(l["a"])([Object(j["b"])()],Wu.prototype,"_creatingViewCount",void 0),Wu=Object(l["a"])([Object(x["a"])("esri.views.3d.analysis.AnalysisViewManager3D")],Wu);const $u=Wu;var Zu=r("e20b"),Xu=r("2255"),Yu=r("680b");const Ju=v["a"].getLogger("esri.views.3d.state.Constraints");let Qu=class extends F["a"]{constructor(e){super(e),this.collision=new id,this.distance=1/0,this.minimumPoiDistance=4}get altitude(){return this.mode===As["a"].Local?null:this._get("altitude")||null}set altitude(e){this.mode!==As["a"].Local?this._set("altitude",e):Ju.warn("Altitude constraint is ignored in local scenes")}clampAltitude(e){return this.altitude?Object(dr["f"])(e,this.altitude.min,this.altitude.max):e}clampTilt(e,t){if(!this.tilt)return t;const r=this.tilt(e);return Object(dr["f"])(t,r.min,r.max)}clampDistance(e){return Math.min(e,this.distance)}createDefaultTilt(){return this.mode===As["a"].Local?this._createDefaultTiltLocal():this._createDefaultTiltGlobal()}createConstantMaxTilt(e){return(t,r=rd)=>(r.min=td.min,r.max=e,r)}_createDefaultTiltLocal(){const e=this.collision.enabled?Object(Yu["h"])([[4e3,td.max],[1e4,Object(dr["h"])(88)],[6e6,Object(dr["h"])(88)]]):()=>td.max;return(t,r=rd)=>(r.min=td.min,r.max=e(t),r)}_createDefaultTiltGlobal(){const e=this.collision.enabled?Object(Yu["h"])([[4e3,td.max],[5e4,Object(dr["h"])(88)],[6e6,Object(dr["h"])(88)],[2e7,td.min]]):Object(Yu["h"])([[3e5,td.max],[3e6,Object(dr["h"])(88)],[6e6,Object(dr["h"])(88)],[2e7,td.min]]);return(t,r=rd)=>(r.min=td.min,r.max=e(t),r)}};function Ku(e){return{min:-2e5,max:4*e.radius}}Object(l["a"])([Object(j["b"])()],Qu.prototype,"altitude",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],Qu.prototype,"collision",void 0),Object(l["a"])([Object(j["b"])()],Qu.prototype,"distance",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Qu.prototype,"minimumPoiDistance",void 0),Object(l["a"])([Object(j["b"])()],Qu.prototype,"tilt",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Qu.prototype,"mode",void 0),Qu=Object(l["a"])([Object(x["a"])("esri.views.3d.state.Constraints")],Qu);const ed=Ku(Xu["a"]),td={min:Object(dr["h"])(.5),max:Object(dr["h"])(179.5)},rd={min:0,max:0};let id=class extends F["a"]{constructor(){super(...arguments),this.enabled=!0,this.elevationMargin=5}};Object(l["a"])([Object(j["b"])({type:Boolean})],id.prototype,"enabled",void 0),Object(l["a"])([Object(j["b"])({type:Number})],id.prototype,"elevationMargin",void 0),id=Object(l["a"])([Object(x["a"])("esri.views.3d.state.Constraints.CollisionConstraint")],id);const nd=Qu;let ad=class extends F["a"]{constructor(){super(...arguments),this.min=ed.min,this.max=ed.max}set mode(e){Object(Zu["a"])(v["a"].getLogger(this.declaredClass),"esri.views.SceneView.constraints.altitude.mode is deprecated. The altitude constraint no longer applies to local scenes and does not have an automatic mode anymore.",{version:"4.6"})}get mode(){return Object(Zu["a"])(v["a"].getLogger(this.declaredClass),"esri.views.SceneView.constraints.altitude.mode is deprecated. The altitude constraint no longer applies to local scenes and does not have an automatic mode anymore.",{version:"4.6"}),"manual"}};Object(l["a"])([Object(j["b"])({type:Number})],ad.prototype,"min",void 0),Object(l["a"])([Object(j["b"])({type:Number})],ad.prototype,"max",void 0),ad=Object(l["a"])([Object(x["a"])("esri.views.3d.constraints.AltitudeConstraint")],ad);const sd=ad;let od=class extends F["a"]{constructor(){super(...arguments),this.mode="auto"}get near(){return this._get("near")}set near(e){this._set("near",e),e>=this._get("far")&&(this.far=e+1e-9),this.mode="manual"}castNear(e){return Math.max(1e-8,e)}get far(){return this._get("far")}set far(e){this._set("far",e),e<=this._get("near")&&(this.near=e-1e-9),this.mode="manual"}castFar(e){return Math.max(1e-8,e)}autoUpdate(e,t){"auto"===this.mode&&(this._get("near")!==e&&this._set("near",e),this._get("far")!==t&&this._set("far",t))}};Object(l["a"])([Object(j["b"])({type:Number,value:1e-8})],od.prototype,"near",null),Object(l["a"])([Object(B["a"])("near")],od.prototype,"castNear",null),Object(l["a"])([Object(j["b"])({type:Number,value:1e-8})],od.prototype,"far",null),Object(l["a"])([Object(B["a"])("far")],od.prototype,"castFar",null),Object(l["a"])([Object(j["b"])({type:["auto","manual"]})],od.prototype,"mode",void 0),od=Object(l["a"])([Object(x["a"])("esri.views.3d.constraints.ClipDistanceConstraint")],od);const cd=od,ld={min:Object(dr["p"])(td.min),max:Object(dr["p"])(td.max)};let ud=class extends F["a"]{constructor(){super(...arguments),this.mode="auto"}get max(){return this._get("max")}set max(e){this._set("max",e),this.mode="manual"}castMax(e){return Object(dr["f"])(e,ld.min,ld.max)}autoUpdate(e){"auto"===this.mode&&this._get("max")!==e&&this._set("max",e)}};Object(l["a"])([Object(j["b"])({type:["auto","manual"]})],ud.prototype,"mode",void 0),Object(l["a"])([Object(j["b"])({type:Number,value:ld.max})],ud.prototype,"max",null),Object(l["a"])([Object(B["a"])("max")],ud.prototype,"castMax",null),ud=Object(l["a"])([Object(x["a"])("esri.views.3d.constraints.TiltConstraint")],ud);const dd=ud;let hd=class extends F["a"]{constructor(){super(...arguments),this.tilt=new dd,this.altitude=new sd,this.clipDistance=new cd}};Object(l["a"])([Object(j["b"])({type:dd})],hd.prototype,"tilt",void 0),Object(l["a"])([Object(j["b"])({type:sd})],hd.prototype,"altitude",void 0),Object(l["a"])([Object(j["b"])({type:cd})],hd.prototype,"clipDistance",void 0),hd=Object(l["a"])([Object(x["a"])("esri.views.3d.constraints.Constraints")],hd);const pd=hd;var fd,bd=r("afcf");let md=fd=class extends m["a"]{constructor(e){super(e),this.date=null,this.directShadowsEnabled=!1,this.displayUTCOffset=null}readDate(e,t){return null!=t.datetime&&new Date(t.datetime)||null}writeDate(e,t,r){t[r]=e.getTime()}readDirectShadowsEnabled(e,t){return!!t.directShadows}writedirectShadowsEnabled(e,t,r){e&&(t[r]=e)}writeDisplayUTCOffset(e,t){null!=e&&(t.displayUTCOffset=e)}clone(){return new fd(this.cloneConstructProperties())}cloneConstructProperties(){const e={directShadowsEnabled:this.directShadowsEnabled,displayUTCOffset:null!=this.displayUTCOffset?this.displayUTCOffset:null};return null!=this.date&&(e.date=new Date(this.date.getTime())),e}};Object(l["a"])([Object(j["b"])({type:Date,json:{type:Number,write:{target:"datetime"}}})],md.prototype,"date",void 0),Object(l["a"])([Object(bd["a"])("date",["datetime"])],md.prototype,"readDate",null),Object(l["a"])([Object(T["a"])("date")],md.prototype,"writeDate",null),Object(l["a"])([Object(j["b"])({type:Boolean,json:{default:!1,write:{target:"directShadows"}}})],md.prototype,"directShadowsEnabled",void 0),Object(l["a"])([Object(bd["a"])("directShadowsEnabled",["directShadows"])],md.prototype,"readDirectShadowsEnabled",null),Object(l["a"])([Object(T["a"])("directShadowsEnabled")],md.prototype,"writedirectShadowsEnabled",null),Object(l["a"])([Object(j["b"])({type:Number,json:{write:!0}})],md.prototype,"displayUTCOffset",void 0),Object(l["a"])([Object(T["a"])("displayUTCOffset")],md.prototype,"writeDisplayUTCOffset",null),md=fd=Object(l["a"])([Object(x["a"])("esri.webscene.Lighting")],md);const gd=md;var yd;let Od=yd=class extends(U["a"].EventedMixin(gd)){constructor(e){super(e),this.type="sun",this.cameraTrackingEnabled=!0,this.ambientOcclusionEnabled=!1,this.waterReflectionEnabled=!1,this.positionTimezoneInfo={hours:0,minutes:0,seconds:0,autoUpdated:!0};const t=(new Date).getFullYear(),r=new Date("March 15, "+t+" 12:00:00 UTC");this._set("defaultDate",r),this._set("date",r)}get defaultDate(){return new Date(this._get("defaultDate").getTime())}static fromWebsceneLighting(e){return new yd(e.cloneConstructProperties())}set defaultDate(e){const t=this._get("date")===this._get("defaultDate");e=new Date(e.getTime()),this._set("defaultDate",e),t&&this._set("date",e)}set date(e){null!=e&&(this.positionTimezoneInfo.autoUpdated=!1,this._set("date",new Date(e.getTime())))}autoUpdate(e,t){const r=yd.calculateTimezoneOffset(this.positionTimezoneInfo);this.positionTimezoneInfo.hours=t.hours,this.positionTimezoneInfo.minutes=t.minutes,this.positionTimezoneInfo.seconds=t.seconds;let i=null;null!=e&&(this.positionTimezoneInfo.autoUpdated=!0,i=this.date&&this.date.getTime(),this._set("date",new Date(e.getTime())));const n=yd.calculateTimezoneOffset(this.positionTimezoneInfo);if(r!==n&&(vd.target=this,vd.timezoneOffset=n,this.emit("timezone-will-change",vd)),null!=e)return i!==e.getTime()}clone(){const e=this._get("date")===this._get("defaultDate"),t=new yd({...this.cloneConstructProperties(),defaultDate:this.defaultDate,cameraTrackingEnabled:this.cameraTrackingEnabled,ambientOcclusionEnabled:this.ambientOcclusionEnabled,waterReflectionEnabled:this.waterReflectionEnabled});return e&&t._set("date",t._get("defaultDate")),t.positionTimezoneInfo.autoUpdated=this.positionTimezoneInfo.autoUpdated,t.positionTimezoneInfo.hours=this.positionTimezoneInfo.hours,t.positionTimezoneInfo.minutes=this.positionTimezoneInfo.minutes,t.positionTimezoneInfo.seconds=this.positionTimezoneInfo.seconds,t}cloneWithWebsceneLighting(e){const t=this.clone();return null!=e.date&&(t.date=e.date),t.directShadowsEnabled=e.directShadowsEnabled,t.displayUTCOffset=e.displayUTCOffset,t}};Object(l["a"])([Object(j["b"])({readOnly:!0})],Od.prototype,"type",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],Od.prototype,"cameraTrackingEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],Od.prototype,"ambientOcclusionEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],Od.prototype,"waterReflectionEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Date})],Od.prototype,"defaultDate",null),Object(l["a"])([Object(j["b"])({type:Date})],Od.prototype,"date",null),Od=yd=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.SunLighting")],Od),function(e){function t({hours:e,minutes:t,seconds:r}){return Math.round(e+t/60+r/3600)}e.calculateTimezoneOffset=t}(Od||(Od={}));const vd={target:null,timezoneOffset:0},_d=Od;var jd;let wd=jd=class extends(U["a"].EventedMixin(gd)){constructor(e){super(e),this.type="virtual",this.ambientOcclusionEnabled=!1,this.waterReflectionEnabled=!1}clone(){return new jd({...this.cloneConstructProperties(),ambientOcclusionEnabled:this.ambientOcclusionEnabled,waterReflectionEnabled:this.waterReflectionEnabled})}cloneWithWebsceneLighting(e){const t=this.clone();return t.directShadowsEnabled=e.directShadowsEnabled,t}};Object(l["a"])([Object(j["b"])({readOnly:!0})],wd.prototype,"type",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],wd.prototype,"ambientOcclusionEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],wd.prototype,"waterReflectionEnabled",void 0),wd=jd=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.VirtualLighting")],wd);const xd=wd,Td={key:"type",defaultKeyValue:"sun",base:null,typeMap:{sun:_d,virtual:xd}};var Sd;let Ed=Sd=class extends F["a"]{set quality(e){-1!==["low","high"].indexOf(e)&&this._set("quality",e)}clone(){return new Sd({quality:this.quality})}};Object(l["a"])([Object(j["b"])({type:["low","high"],value:"low"})],Ed.prototype,"quality",null),Ed=Sd=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.SceneViewAtmosphere")],Ed);const Ad=Ed;var Cd=r("698f"),Rd=r("75cc");let Md=class extends m["a"]{constructor(e){super(e)}clone(){}};Object(l["a"])([Object(j["b"])({readOnly:!0,json:{read:!1}})],Md.prototype,"type",void 0),Md=Object(l["a"])([Object(x["a"])("esri.webscene.background.Background")],Md);const Pd=Md;var Id,Dd=r("5c00");const Ld={...Dd["a"],nonNullable:!0};let Nd=Id=class extends Pd{constructor(e){super(e),this.type="color",this.color=new d["a"]([0,0,0,1])}clone(){return new Id(this.cloneProperties())}cloneProperties(){return{color:this.color.clone()}}};Object(l["a"])([Object(A["a"])({color:"color"},{readOnly:!0})],Nd.prototype,"type",void 0),Object(l["a"])([Object(j["b"])(Ld)],Nd.prototype,"color",void 0),Nd=Id=Object(l["a"])([Object(x["a"])("esri.webscene.background.ColorBackground")],Nd);const Fd=Nd,kd={base:Pd,key:"type",typeMap:{color:Fd}};function Ud(e){return(t,r,i)=>{if(!t)return t;for(const n in e.typeMap)if(t.type===n){const r=new e.typeMap[n];return r.read(t,i),r}}}const zd={types:kd,json:{read:Ud(kd),write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.isPresentation})}}};var Bd;const Vd=(e,t,r)=>({enabled:!r||!r.isPresentation});let Gd=Bd=class extends m["a"]{constructor(e){super(e),this.lighting=new gd,this.background=null,this.atmosphereEnabled=!0,this.starsEnabled=!0}clone(){return new Bd(this.cloneConstructProperties())}cloneConstructProperties(){return{lighting:gd.prototype.clone.call(this.lighting),background:Object(g["a"])(this.background),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled}}};Object(l["a"])([Object(j["b"])({type:gd,json:{write:!0}})],Gd.prototype,"lighting",void 0),Object(l["a"])([Object(j["b"])(zd)],Gd.prototype,"background",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:Vd}}})],Gd.prototype,"atmosphereEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:Vd}}})],Gd.prototype,"starsEnabled",void 0),Gd=Bd=Object(l["a"])([Object(x["a"])("esri.webscene.Environment")],Gd);const Hd=Gd;var qd;const Wd=v["a"].getLogger("esri.views.3d.environment.SceneViewEnvironment");let $d=qd=class extends Hd{constructor(e){super(e),this.atmosphere=new Ad,this.lighting=new _d}static fromWebsceneEnvironment(e){const t=e.cloneConstructProperties();return new qd({...t,lighting:_d.fromWebsceneLighting(t.lighting)})}set weather(e){Object(Rd["a"])(null==e?void 0:e.type,Wd)&&this._set("weather",e)}castLighting(e){return this._convertLighting(e)}applyLighting(e){this.lighting=this._convertLighting(e)}_convertLighting(e){return e?e instanceof _d||e instanceof xd?e:e instanceof gd?"sun"===(null==(t=this.lighting)?void 0:t.type)?this.lighting.cloneWithWebsceneLighting(e):_d.fromWebsceneLighting(e):Object(w["k"])(Td,e):new _d;var t}clone(){return new qd({lighting:this.lighting.clone(),atmosphere:this.atmosphere.clone(),weather:this.weather.clone(),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled,background:Object(g["a"])(this.background)})}cloneWithWebsceneEnvironment(e){return new qd({atmosphere:this.atmosphere.clone(),weather:this.weather.clone(),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled,background:Object(g["a"])(this.background),...e.cloneConstructProperties(),lighting:this.lighting.type&&"sun"!==this.lighting.type?_d.fromWebsceneLighting(e.lighting):this.lighting.cloneWithWebsceneLighting(e.lighting)})}};Object(l["a"])([Object(j["b"])({type:Ad,json:{read:!1},nonNullable:!0})],$d.prototype,"atmosphere",void 0),Object(l["a"])([Object(j["b"])({types:Rd["c"],nonNullable:!0,json:{write:!1},value:new Cd["a"]})],$d.prototype,"weather",null),Object(l["a"])([Object(j["b"])({nonNullable:!0})],$d.prototype,"lighting",void 0),Object(l["a"])([Object(B["a"])("lighting")],$d.prototype,"castLighting",null),$d=qd=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.SceneViewEnvironment")],$d);const Zd=$d;var Xd=r("0fc4"),Yd=r("f694"),Jd=r("1091"),Qd=r("d791"),Kd=r("afe1");function eh(e){const t=1e5,r=1e6;return Math.min(1,Math.max(0,(e-t)/(r-t)))}const th=1e4,rh=Object(ju["h"])(5802e-9,13558e-9,331e-7),ih=3,nh=Object(ju["h"])(65e-8*ih,1881e-9*ih,85e-9*ih),ah=3996e-9,sh=.085,oh=1e5;var ch=r("fcb1"),lh=r("c3a4"),uh=r("ca98"),dh=r("da35"),hh=r("fa1e"),ph=r("c829"),fh=r("d17d"),bh=r("189c");class mh extends uh["a"]{initializeProgram(e){const t=mh.shader.get(),r=this.configuration,i=t.build({haze:r.haze});return new ph["a"](e.rctx,i,hh["a"])}initializePipeline(){return this.configuration.haze?Object(bh["g"])({blending:Object(bh["h"])(fh["b"].ONE,fh["b"].ZERO,fh["b"].ONE_MINUS_SRC_COLOR,fh["b"].ONE),colorWrite:bh["d"]}):Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]})}}mh.shader=new lh["a"](ch["a"],()=>r.e("chunk-2d0e6172").then(r.bind(null,"96ed")));class gh extends dh["a"]{constructor(){super(...arguments),this.haze=!1}}Object(l["a"])([Object(dh["b"])()],gh.prototype,"haze",void 0);var yh=r("7c33"),Oh=r("d5f7");class vh{constructor(e){this._view=e,this.type="realistic",this.canRender=!0,this._cameraPosition=Object(ju["f"])(),this._projectionInverse=Object(Kd["d"])(),this._viewInverse=Object(Kd["d"])(),this._heightParameters=Object(Xd["e"])(),this._betasRayleigh=Object(ju["f"])(),this._betasCombined=Object(ju["f"])(),this._scaleHeight=0,this._radii=Object(vo["b"])(),this._nearFar=Object(vo["b"])(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=Xu["a"].radius,this._hazeStrength=1,this._darkenHaze=!1,this._updateRadius(Xu["a"].radius)}destroy(){this._atmosphereTechnique=Object(z["r"])(this._atmosphereTechnique),this._atmosphereHazeTechnique=Object(z["r"])(this._atmosphereHazeTechnique),this._vao=Object(z["e"])(this._vao),this._handles=Object(z["d"])(this._handles)}when(){return Promise.resolve()}initializeRenderContext(e){const t=e.renderContext.rctx;this._handles=new ge["a"],Object(z["k"])(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(Object(Me["b"])(this._view,"basemapTerrain","elevation-change",e=>this._updateElevation(e),()=>this._updateElevation())),this._handles.add(Object(Me["b"])(this._view,"basemapTerrain","elevation-bounds-change",()=>this._updateVisibleElevationBounds()));const r=new gh;r.haze=!1,this._atmosphereTechnique=e.shaderTechniqueRepository.acquire(mh,r),r.haze=!0,this._atmosphereHazeTechnique=e.shaderTechniqueRepository.acquire(mh,r),this._vao=Object(Oh["d"])(t,yh["b"]),this._scaleHeight=sh*oh,Object($o["y"])(this._betasRayleigh,rh[0],rh[1],rh[2]),Object($o["y"])(this._betasCombined,rh[0]+nh[0],rh[1]+nh[1],rh[2]+nh[2])}render(e){this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e,t){this._darkenHaze=t,this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,r){this._update(e.camera);const i=e.rctx.useTechnique(t);e.offscreenRenderingHelper.renderDepthDetached(()=>{i.bindTexture(r,"depthTex"),this._renderCommon(t.program,e)})}_renderCommon(e,t){if(Object(z["j"])(this._vao))return;const r=t.rctx;t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("inverseProjectionMatrix",this._projectionInverse),e.setUniformMatrix4fv("inverseViewMatrix",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform2fv("radii",this._radii),e.setUniform1f("scaleHeight",this._scaleHeight),e.setUniform1f("betaMie",ah),e.setUniform3fv("betaRayleigh",this._betasRayleigh),e.setUniform3fv("betaCombined",this._betasCombined),e.setUniform1f("innerFadeDistance",this._innerFadeDistance),e.setUniform1f("altitudeFade",this._altitudeFade),e.setUniform1f("hazeStrength",this._hazeStrength),r.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(fh["r"].TRIANGLE_STRIP,0,4)}_adjustRadiusForTesselation(e){return e*Math.cos(Math.PI/16/16)}_updateElevation(e){const t=e?e.tile:Object(z["u"])(this._view.basemapTerrain.rootTiles,[null])[0];if(Object(z["j"])(t)||0!==t.level)return;const r=this._adjustRadiusForTesselation(Xu["a"].radius+t.elevationBounds[0]);r!==this._lowerElevationBoundRadius&&(this._lowerElevationBoundRadius=r,this._lowerBoundEarthRadius=-1,this._updateVisibleElevationBounds())}_updateVisibleElevationBounds(){const e=this._adjustRadiusForTesselation(Xu["a"].radius+this._view.basemapTerrain.elevationBounds.min);(this._lowerBoundEarthRadius<0||e<this._lowerBoundEarthRadius)&&this._updateRadius(e)}_updateRadius(e){this._lowerBoundEarthRadius=e,Object(io["s"])(this._radii,e,e+oh),this._innerFadeDistance=2*Math.sqrt((2*e-th)*th)}_update(e){if(Object(z["j"])(e))return;this._cameraHeight=Object($o["r"])(e.eye),this._cameraHeightSq=this._cameraHeight*this._cameraHeight,this._cAtmosphere=this._cameraHeightSq-this._radii[1]*this._radii[1];const t=Math.min(1,Math.max(0,(this._cameraHeight-this._radii[0])/oh));this._heightParameters=Object(Xd["g"])(this._cameraHeight,this._cameraHeightSq,this._cAtmosphere,t),Object($o["m"])(this._cameraPosition,e.eye),Object(Qd["b"])(this._projectionInverse,e.projectionMatrix),Object(Qd["b"])(this._viewInverse,e.viewMatrix),Object(io["s"])(this._nearFar,e.near,e.far),this._altitudeFade=eh(this._cameraHeight-this._lowerBoundEarthRadius),this._hazeStrength=this._darkenHaze?Object(dr["l"])(.6,1,Object(dr["r"])(9500,10500,this._cameraHeight-Xu["a"].radius)):1}static isSupported(e){return e.renderContext.rctx.capabilities.depthTexture}}var _h=r("c8d5");function jh(e){return Object(z["k"])(e)&&Object(z["k"])(e.cubeMap)&&!e.running&&e.coverage>0}var wh=r("dae5"),xh=r("47f8"),Th=r("19f3");class Sh{constructor(e,t,r,i,n,a,s,o,c=.5){this.coverage=e,this.density=t,this.absorption=r,this.cloudSize=i,this.detailSize=n,this.smoothness=a,this.cloudHeight=s,this.raymarchingStepType=o,this.median=c}}const Eh={sunny:new Sh([.1,.7],[.02,.02],[0,0],[.86,.86],[.8,.8],[.5,.5],[.05,.05],Th["b"].SIXTEEN),cloudy:new Sh([.24,.7],[.135,.2],[0,0],[.5,.5],[.65,.7],[.3,.3],[1,1],Th["b"].TWOHUNDRED),rainy:new Sh([.5,.9],[.2,.5],[.3,.6],[.4,.4],[.7,.7],[.5,.5],[1,1],Th["b"].TWOHUNDRED),snowy:new Sh([.5,.9],[.2,.5],[0,0],[.4,.4],[.7,.7],[.5,.5],[1,1],Th["b"].TWOHUNDRED),foggy:new Sh([.8,.8],[.5,.5],[0,0],[.85,.85],[.75,.75],[.8,.8],[.3,.3],Th["b"].HUNDRED)};class Ah extends uh["a"]{constructor(e,t){super(e,t,()=>this.destroy())}initializeProgram(e){const t=Ah.shader.get().build({steps:this.configuration.steps});return new ph["a"](e.rctx,t,hh["a"])}initializePipeline(){return Object(bh["g"])({blending:Object(bh["h"])(fh["b"].ONE,fh["b"].ONE,fh["b"].ZERO,fh["b"].ZERO),depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]})}}Ah.shader=new lh["a"](Th["a"],()=>r.e("chunk-2d209219").then(r.bind(null,"a86b")));class Ch extends dh["a"]{constructor(){super(...arguments),this.steps=Th["b"].SIXTEEN}}Object(l["a"])([Object(dh["b"])({count:Th["b"].COUNT})],Ch.prototype,"steps",void 0);var Rh=r("1a2b"),Mh=r("d267");let Ph=class extends F["a"]{constructor(e){super(e),this._frameTask=null,this._handles=new ge["a"],this._cubeMapSize=Object(E["a"])("esri-mobile")?1024:2048,this._techniques=[],this._techniqueConfiguration=new Ch,this.coverage=Object(dr["l"])(Nh.coverage[0],Nh.coverage[1],.5),this.density=Object(dr["l"])(Nh.density[0],Nh.density[1],.5),this.absorption=Object(dr["l"])(Nh.absorption[0],Nh.absorption[1],.5),this.cloudSize=Object(dr["l"])(Nh.cloudSize[0],Nh.cloudSize[1],.5),this.detailSize=Object(dr["l"])(Nh.detailSize[0],Nh.detailSize[1],.5),this.smoothness=Object(dr["l"])(Nh.smoothness[0],Nh.smoothness[1],.5),this.cloudHeight=Object(dr["l"])(Nh.cloudHeight[0],Nh.cloudHeight[1],.5),this.raymarchingStepType=Nh.raymarchingStepType,this._cloudRadius=0,this._viewMatrix=Object(Kd["d"])(),this._viewMatrix3=Object(wh["b"])(),this.running=!1}_getTechnique(e){const t=this._techniques[e];return t||(this._techniqueConfiguration.steps=e,this._techniques[e]=new Ah({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[e])}initialize(){this._vao=Object(Oh["d"])(this.rctx);const e=Object(Yd["e"])(this.view.spatialReference);this._cloudRadius=.5*e.radius,this.setDirty(),this._frameTask=this.view.resourceController.scheduler.registerTask(Ba["c"].CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(Object(Me["a"])(this,"coverage",()=>this.setDirty())),["coverage","density","absorption","cloudSize","detailSize","smoothness","cloudHeight","raymarchingStepType"].forEach(e=>this._handles.add(Object(Me["a"])(this,e,()=>this.setDirty())))}destroy(){this._handles.destroy(),this._techniques.forEach(e=>Object(z["r"])(e)),this._techniques=null,this._frameBufferCube=Object(z["e"])(this._frameBufferCube),this._vao=Object(z["e"])(this._vao),this._noiseTexture=Object(z["d"])(this._noiseTexture)}_ensureNoiseTexture(){return Object(z["j"])(this._noiseTexture)&&(this._noiseTexture=new Rh["b"](this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture.textureAtlas}get frameBufferCube(){if(Object(z["j"])(this._frameBufferCube)){const e={target:fh["A"].TEXTURE_CUBE_MAP,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].LINEAR,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new Mh["a"](this.rctx,{colorTarget:fh["y"].CUBEMAP,width:this._cubeMapSize,height:this._cubeMapSize},e)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(e,t){const r=e.median,i=e=>{const i=Object(dr["l"])(e[0],e[1],r);return t<.5?Object(dr["l"])(e[0],i,2*t):Object(dr["l"])(i,e[1],2*(t-.5))};this.coverage=i(e.coverage),this.density=i(e.density),this.absorption=i(e.absorption),this.cloudSize=i(e.cloudSize),this.detailSize=i(e.detailSize),this.smoothness=i(e.smoothness),this.cloudHeight=i(e.cloudHeight),this.raymarchingStepType=e.raymarchingStepType}setDirty(){this.running=!0}runTask(e){if(0===this.coverage||Object(z["j"])(this._vao))return void(this.running=!1);const t=this._ensureNoiseTexture();if(Object(z["j"])(t))return void(this.running=!1);const r=this._getTechnique(this.raymarchingStepType);if(!this.rctx.isTechniqueCompiled(r))return;const i=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube);const n=this.rctx.useTechnique(r),a=1+this.absorption,s=Object(dr["l"])(35,120,this.absorption);n.bindTexture(t,"cloudShapeTexture"),n.setUniform1f("cloudRadius",this._cloudRadius),n.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),n.setUniform1f("power",s),n.setUniform1f("sigmaE",a),n.setUniform1f("density",Object(dr["l"])(0,.3,this.density)),n.setUniform1f("cloudSize",Object(dr["l"])(0,.02,Math.max(.01,1-this.cloudSize))),n.setUniform1f("detailSize",Object(dr["l"])(0,.2,Math.max(.01,1-this.detailSize))),n.setUniform1f("smoothness",Object(dr["l"])(0,.5,1-this.smoothness)),n.setUniform1f("cloudHeight",Object(dr["l"])(0,1500,this.cloudHeight)),n.setUniform1f("coverage",this.coverage),this.rctx.bindVAO(this._vao),n.assertCompatibleVertexAttributeLocations(this._vao);for(let o=0;o<5;o++){const e=Ih[o],t=Dh[o];Object(Qd["y"])(this._viewMatrix,Lh,e,t),Object(To["f"])(this._viewMatrix3,this._viewMatrix),n.setUniformMatrix3fv("view",this._viewMatrix3);const r=fh["A"].TEXTURE_CUBE_MAP_POSITIVE_X+o;this.frameBufferCube.setColorTextureTarget(r),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.running=!1,this.rctx.setViewport(i.x,i.y,i.width,i.height),this.requestRender(),e.madeProgress()}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ph.prototype,"rctx",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ph.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ph.prototype,"requestRender",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"_frameTask",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"coverage",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"density",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"absorption",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"cloudSize",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"detailSize",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"smoothness",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"cloudHeight",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"raymarchingStepType",void 0),Object(l["a"])([Object(j["b"])()],Ph.prototype,"running",void 0),Ph=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.CloudsGenerator")],Ph);const Ih=[Object(xh["d"])(1,0,0),Object(xh["d"])(-1,0,0),Object(xh["d"])(0,1,0),Object(xh["d"])(0,-1,0),Object(xh["d"])(0,0,1)],Dh=[Object(xh["d"])(0,1,0),Object(xh["d"])(0,1,0),Object(xh["d"])(0,0,-1),Object(xh["d"])(0,0,1),Object(xh["d"])(0,1,0)],Lh=Object(xh["e"])(),Nh=Eh.sunny;var Fh=r("4bc4");class kh extends uh["a"]{initializeProgram(e){const t=kh.shader.get(),r=this.configuration,i=t.build({haze:r.haze});return new ph["a"](e.rctx,i,hh["a"])}initializePipeline(){return this.configuration.haze?Object(bh["g"])({blending:Object(bh["h"])(fh["b"].ONE,fh["b"].ZERO,fh["b"].ONE_MINUS_SRC_COLOR,fh["b"].ONE),colorWrite:bh["d"]}):Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ZERO,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE),colorWrite:bh["d"]})}}kh.shader=new lh["a"](Fh["a"],()=>r.e("chunk-2d0d0632").then(r.bind(null,"6882")));class Uh extends dh["a"]{constructor(){super(...arguments),this.haze=!1}}Object(l["a"])([Object(dh["b"])()],Uh.prototype,"haze",void 0);let zh=class extends F["a"]{constructor(e){super(e),this._projectionInverse=Object(Kd["d"])(),this._viewInverse=Object(Kd["d"])(),this._nearFar=Object(vo["b"])(),this._fogColor=Object(xh["c"])(),this._fogColorAtNight=Object(xh["c"])(),this._cameraDirection=Object(xh["c"])(),this._foggyFadeStart=.3,this._foggyFadeEnd=.6,this._hazeFadeStart=.7,this._hazeFadeEnd=1,this._strength=4e-6;const t=e.context.renderContext.rctx;this._vao=Object(Oh["d"])(t,yh["b"]);const r=Object(Yd["e"])(e.view.spatialReference);this._planetRadius=r.radius,this._atmosphereRadius=r.radius+oh}destroy(){this._hazeFogTechnique=Object(z["r"])(this._hazeFogTechnique),this._thickFogTechnique=Object(z["r"])(this._thickFogTechnique),this._vao=Object(z["e"])(this._vao)}get _shaderTechniqueRepository(){return this.context.shaderTechniqueRepository}set strength(e){this._strength=e}get strength(){return this._strength}get thickFogTechnique(){if(Object(z["j"])(this._thickFogTechnique)){const e=new Uh;e.haze=!1,this._thickFogTechnique=this._shaderTechniqueRepository.acquire(kh,e)}return this._thickFogTechnique}get hazeFogTechnique(){if(Object(z["j"])(this._hazeFogTechnique)){const e=new Uh;e.haze=!0,this._hazeFogTechnique=this._shaderTechniqueRepository.acquire(kh,e)}return this._hazeFogTechnique}when(){return Promise.resolve()}render(e,t,r){if(0===this.view.basemapTerrain.baseOpacity&&!t)return;if(this._update(e,t,r),this._fogAmount<=0)return;const i=e.offscreenRenderingHelper,n=t?this.thickFogTechnique:this.hazeFogTechnique,a=e.rctx.useTechnique(n);i.renderDepthDetached(()=>{a.bindTexture(i.depthTexture,"depthTex"),this._renderFog(n.program,e)})}_renderFog(e,t){if(Object(z["j"])(this._vao))return!1;const r=t.rctx;return e.setUniform3fv("cameraPosition",t.camera.eye),e.setUniformMatrix4fv("inverseProjectionMatrix",this._projectionInverse),e.setUniformMatrix4fv("inverseViewMatrix",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("fogStrength",this._strength),e.setUniform1f("fogAmount",this._fogAmount),e.setUniform3fv("fogColor",this._fogColor),r.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(fh["r"].TRIANGLE_STRIP,0,4),!0}_update(e,t,r){if(Object(z["j"])(e.camera))return;const i=t?.1:0;r?Object($o["y"])(this._fogColor,.5,.5,.5):t?Object($o["y"])(this._fogColor,1.5,1.5,1.5):Object($o["y"])(this._fogColor,.24,.44,.8),Object($o["g"])(this._fogColorAtNight,this._fogColor,i),Object($o["t"])(this._cameraDirection,e.camera.eye);const n=Math.max(0,Object($o["j"])(this._cameraDirection,e.scenelightingData.lightingMainDirection));Object($o["k"])(this._fogColor,this._fogColorAtNight,this._fogColor,n),Object(Qd["b"])(this._projectionInverse,e.camera.projectionMatrix),Object(Qd["b"])(this._viewInverse,e.camera.viewMatrix),Object(io["s"])(this._nearFar,e.camera.near,e.camera.far);const a=Object($o["r"])(e.camera.eye),s=a*a;this._atmosphereC=s-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=t?1-Object(dr["r"])(this._foggyFadeStart*Rd["b"],this._foggyFadeEnd*Rd["b"],Math.abs(a-this._planetRadius)):1-Object(dr["r"])(this._hazeFadeStart*Rd["b"],this._hazeFadeEnd*Rd["b"],Math.abs(a-this._planetRadius))}static isSupported(e){return e.capabilities.depthTexture}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],zh.prototype,"context",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],zh.prototype,"view",void 0),zh=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.Fog")],zh);var Bh=r("2db0"),Vh=r("76ac");class Gh extends uh["a"]{initializeProgram(e){const t=Gh.shader.get(),r=this.configuration,i=t.build({geometry:r.geometry});return new ph["a"](e.rctx,i,hh["a"])}initializePipeline(){return this.configuration.geometry===Vh["a"].Cylinder?Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),culling:bh["b"],depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]}):Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]})}}Gh.shader=new lh["a"](Vh["b"],()=>r.e("chunk-2d0d7e66").then(r.bind(null,"797e")));class Hh extends dh["a"]{constructor(){super(...arguments),this.geometry=Vh["a"].Cone}}Object(l["a"])([Object(dh["b"])({count:Vh["a"].COUNT})],Hh.prototype,"geometry",void 0);const qh="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAIACAYAAABD1gYFAAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAXVJREFUeNq0k9GWhDAIQ3PjzP9/cuehFqhW19mz++IhkCZAq1prsqT+kSQS9g8Vnqp6VGVWkYVktR6tj3Gr968nLnfwlHzHYyHapkKS73bPd/39eI38AYWj24OGvqdwWjZ3l8IDgacXyl1Dj9tdLOzZiicj+P1YcGk0H2O2vN/VQpTveEHmPHQxZxYlqsQdhUeuCWREuDEvAjqlCqDIMYwIo2ijR1HdYUS58dQrKpgQ0EGeMocsTNXrxzyOhS9kfzlWjn82YuWLqwAnvfNEWJFjYXkJCT0s7AmS0NG4x7Lt6Cpy2MiVPBZmS668QT5AR1cevp7b6CpzQ/ZSNH0vmhy5CsNtdax0MBpXDBiFsrDiMSLKMc8b6hH93bNbEpRsIyHDUhNcfTyeKF16PC7c/2QdczvUnvOB1ylZHVFSMtd5s8C2IW/7w6hwM5GLavLCd1zkiFjB+BwH1DSgctQ7mPOimBLJrw35beSXkd8BM/cCqbXWPgMA+GQQ5sIgkfAAAAAASUVORK5CYII=";var Wh=r("2ebb"),$h=r("fc00"),Zh=r("8e97"),Xh=r("caf7"),Yh=r("b7bd"),Jh=r("7ce4"),Qh=r("a1ff"),Kh=r("8539"),ep=r("0fa6");const tp=v["a"].getLogger("esri.views.3d.environment.PanoramicAtmosphere");class rp{constructor(){this.type="panoramic",this._techniqueConfig=new Hh,this._readyResolver=Object(_["g"])(),this._readyController=new AbortController}destroy(){this._readyResolver.reject(),this._texture=Object(z["e"])(this._texture),this._vao=Object(z["e"])(this._vao),this._readyController=Object(z["a"])(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._techniqueConfig.geometry=Vh["a"].Cylinder,this._technique=e.shaderTechniqueRepository.acquire(Gh,this._techniqueConfig);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=Object(Kh["f"])(this._vao,"geometry"),Object(Bh["a"])(qh,{signal:this._readyController.signal}).then(r=>{this._texture=new Qh["a"](t,{pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].LINEAR,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()}).catch(e=>{Object(_["m"])(e)||tp.error("Unable to initialize atmosphere: image request failed",e),this._readyResolver.reject()})}get canRender(){return null!=this._texture}render(e){const t=e.rctx,r=t.useTechnique(this._technique);r.bindTexture(this._texture,"tex"),Object(Zh["b"])(r,e.camera.projectionMatrix),ip(np,e.camera.viewMatrix),r.setUniformMatrix4fv("view",np),r.setUniform4f("uColor",1,1,1,1),e.scenelightingData.setLightDirectionUniform(r),t.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),t.drawArrays(fh["r"].TRIANGLES,0,this._vaoCount)}renderHaze(){return!1}_createVertexArrayObject(e){const t=Xh["a"].createPolySphereGeometry(1,2,!1),r=t.indices.get(Yh["a"].POSITION);for(let s=0;s<r.length;s+=3){const e=r[s];r[s]=r[s+2],r[s+2]=e}const i=t.vertexAttributes.get(Yh["a"].POSITION).data,n=ap.createBuffer(r.length),a=n.position;for(let s=0;s<r.length;++s){const e=3*r[s];a.set(s,0,i[e]),a.set(s,1,i[e+1]),a.set(s,2,i[e+2])}return new ep["a"](e,hh["a"],{geometry:Object(Wh["a"])(ap)},{geometry:Jh["a"].createVertex(e,fh["D"].STATIC_DRAW,n.buffer)})}}function ip(e,t){Object(Qd["d"])(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const np=Object(Kd["d"])(),ap=Object($h["a"])().vec3f(Yh["a"].POSITION);var sp=r("24b4");class op extends uh["a"]{initializeProgram(e){const t=op.shader.get(),r=this.configuration,i=t.build({type:r.type});return new ph["a"](e.rctx,i,op.attributeLocation)}initializePipeline(){return Object(bh["g"])({blending:Object(bh["h"])(fh["b"].ONE,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]})}}op.shader=new lh["a"](sp["b"],()=>r.e("chunk-2d0aeadf").then(r.bind(null,"0aa9"))),op.attributeLocation=new Map([[Yh["a"].POSITION,0],[Yh["a"].INSTANCEFEATUREATTRIBUTE,1]]);class cp extends dh["a"]{constructor(){super(...arguments),this.type=sp["a"].RAIN}}Object(l["a"])([Object(dh["b"])()],cp.prototype,"type",void 0);var lp=r("c45a");let up=class extends F["a"]{constructor(e){super(e),this._numParticles=25e4,this._rainSpeed=.1,this._snowSpeed=.01,this._opacity=1,this._width=500,this._offset=Object(ju["f"])(),this._tile=Object(ju["f"])(),this._particleColor=Object(xh["c"])(),this._particleColorAtNight=Object(xh["c"])(),this._nightMultiplier=.7,this._cameraDirection=Object(xh["c"])(),this._renderParameters={camera:null,time:0,radius:1},this._animation=new lp["a"],this._updatingTracking=new Se["a"],this._renderParameters.time=0,this._renderParameters.radius=Object(Yd["e"])(e.view.spatialReference).radius,this._shaderTechniqueRepository=e.context.shaderTechniqueRepository}destroy(){this._updatingTracking.destroy(),this._numParticles=0,this._snowTechnique=Object(z["r"])(this._snowTechnique),this._rainTechnique=Object(z["r"])(this._rainTechnique),this._vao=Object(z["e"])(this._vao),this._instanceIdBuffer=Object(z["e"])(this._instanceIdBuffer)}get updating(){return this._updatingTracking.updating}get rainTechnique(){if(Object(z["j"])(this._rainTechnique)){const e=new cp;e.type=sp["a"].RAIN,this._rainTechnique=this._shaderTechniqueRepository.acquire(op,e)}return this._rainTechnique}get snowTechnique(){if(Object(z["j"])(this._snowTechnique)){const e=new cp;e.type=sp["a"].SNOW,this._snowTechnique=this._shaderTechniqueRepository.acquire(op,e)}return this._snowTechnique}update(e){return this._animation.advance(e)}render(e,t,r){const{rctx:i,camera:n}=e;this._ensureResources(i);const a=r===sp["a"].RAIN?this.rainTechnique:this.snowTechnique;if(Object(z["j"])(a)||Object(z["j"])(this._vao)||Object(z["j"])(this._instanceIdBuffer))return;if(Object(z["k"])(e.cloudsCompositionParams)&&(this._opacity=1-e.cloudsCompositionParams.fadeInOutHeight.factor),this._opacity<=0)return;const s=i.useTechnique(a);this._renderParameters.camera=n,this._renderParameters.time=(r===sp["a"].RAIN?this._rainSpeed:this._snowSpeed)*Object(Ic["d"])(this._animation.time),this._update(s,n,r,e),i.bindVAO(this._vao);const o=op.attributeLocation;s.assertCompatibleVertexAttributeLocations(this._vao),Object(Kh["a"])(i,o,this._instanceIdBuffer,hp,0),i.capabilities.instancing.drawArraysInstanced(fh["r"].TRIANGLES,0,3,this._numParticles*t),Object(Kh["e"])(i,o,this._instanceIdBuffer,hp)}_update(e,t,r,i){const n=t.eye;this._tile[0]=Math.floor((n[0]+.5*this._width)/this._width),this._tile[1]=Math.floor((n[1]+.5*this._width)/this._width),this._tile[2]=Math.floor((n[2]+.5*this._width)/this._width),this._offset[0]=n[0]-this._tile[0]*this._width,this._offset[1]=n[1]-this._tile[1]*this._width,this._offset[2]=n[2]-this._tile[2]*this._width,e.setUniform1f("width",this._width),e.setUniform3fv("offset",this._offset),e.setUniformMatrix4fv("view",t.viewMatrix),e.setUniform3fv("cameraPosition",n),Object(Zh["b"])(e,t.projectionMatrix),e.setUniform1f("time",this._renderParameters.time),r===sp["a"].RAIN?Object($o["y"])(this._particleColor,.85,.85,.85):Object($o["y"])(this._particleColor,1,1,1),Object($o["g"])(this._particleColorAtNight,this._particleColor,this._nightMultiplier),Object($o["t"])(this._cameraDirection,n);const a=Math.max(0,Object($o["j"])(this._cameraDirection,i.scenelightingData.lightingMainDirection));Object($o["k"])(this._particleColor,this._particleColorAtNight,this._particleColor,a),e.setUniform3fv("particleColor",this._particleColor),e.setUniform1f("opacity",this._opacity)}_ensureResources(e){Object(z["k"])(this._vao)||(this._vao=this._createVertexArrayObject(e),Object(z["k"])(this._instanceIdBuffer)||(this._instanceIdBuffer=this._createInstanceIndices(e)))}_createInstanceIndices(e){const t=[];for(let r=0;r<this._numParticles;r++)t.push(r);return Jh["a"].createVertex(e,fh["D"].STATIC_DRAW,new Float32Array(t))}_createVertexArrayObject(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new ep["a"](e,op.attributeLocation,{geometry:Object(Wh["a"])(dp)},{geometry:Jh["a"].createVertex(e,fh["D"].STATIC_DRAW,t)})}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],up.prototype,"context",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],up.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],up.prototype,"updating",null),Object(l["a"])([Object(j["b"])()],up.prototype,"_updatingTracking",void 0),up=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.Precipitation")],up);const dp=Object($h["a"])().vec3f(Yh["a"].POSITION),hp=Object(Wh["a"])(Object($h["a"])().f32(Yh["a"].INSTANCEFEATUREATTRIBUTE),1),pp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAIACAYAAAE00TaTAAAACXBIWXMAAA7AAAAOwAFq1okJAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAp1JREFUSMd9lcmSEzEQRCtflnqxYZgIThBDAP//kXDQ0pJtuDhqycxWZ5fKERFCERARIAVEyCjCtSFFEjWVa9q7OdJE0oiidIhKhRBROlhloiGVhaYERQHJWFEwMpYKrjUlibI2cqSJIJEpKNmM2c3GkRTOJDnThTMpnMWu0VFszs3Jfbe5bza3w+a229yOIs6zmP3czfn1K2w/for8+EVU15pNmmyqkeJyclinXNJRu1xrUaJmjmdzJiejVNt7zZVBRAIq1RwrsrrWnez+SR7WmQQP/1itKz2q/pmzuJtYnNy2bth9x9z2NLfDcB7FHOcGx6ebOb9/iPzxG/ztg4iorglFiKjzF9HSNphCoRb1OY3RZQJrYgRdT68bmgXGDdBzrTG8qNS7QP/m19ef7tGlcoH7vESYkK70uoPuOLEetz0IqeGoWQW6MlB/j36EnipYGKPWwDRg/RkNhXCNJIzAhMk6PrDePJNII6JHqM5VWqYApCtNFPe0GFFGtOWopWCrEVBSoiQi06KkRRaD08IlxXa/ifz8Jvz2LvjyLnh7F/r8Rei8a8xfjNkIrpmMOQ1C02COrkTEHxGhh+6DQJfXc/eZprXxcIyVIf1LJVgWvKaHvwI/1aQxtv851SQ/nqGXL6MHFVY3nmhLyqKsWO/+qzWif+yS1TpNKq8NezjGPCV69ciZoQj1PwfN6QRpWyCGVMe1D/AAHt3/gefu1Ign3AVpjOiNXkN90JlpL6TUnzFEUU+Jvks0tkp/dY3Fy1TzI24BWwsYJPyg11Q0FqDwK72xIz2kLojbeuxS1FpgtfNWyMX1gFw0j3W7RNeSHTVEe3VaV7SdCzVywFaEt02w7QH7Eeg4AvZDNdJ+Cu1HENsutO+Byi6ilEBZ9BeCNBJceJIjHgAAAABJRU5ErkJggg==";var fp=r("1153");const bp=v["a"].getLogger("esri.views.3d.environment.SimpleAtmosphere"),mp=128,gp=-th,yp=0,Op=50,vp=()=>1-511/512,_p=Object(Yu["h"])([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);class jp{constructor(e){this.view=e,this.type="simple",this._renderData={texV:Object(vo["b"])(),silCircleCenter:Object(ju["f"])(),silCircleV1:Object(ju["f"])(),silCircleV2:Object(ju["f"])(),altitudeFade:0,innerScale:0,undergroundFadeAlpha:0},this._texture=null,this._fadeVaoCount=0,this._readyResolver=Object(_["g"])(),this._readyController=new AbortController,this.texV1=1,this.canRender=!0,this.isOnMars=Object(fe["i"])(e.spatialReference);const t=Object(Yd["e"])(e.spatialReference);this.planetRadius=t.radius,this.outerRimWidth=t.outerAtmosphereRimWidth,this.innerRimFactor=(this.planetRadius+gp)/this.planetRadius,this.middleRimFactor=(this.planetRadius+yp)/this.planetRadius,this.outerRimFactor=(this.planetRadius+this.outerRimWidth)/this.planetRadius,this.texV0=yp/this.outerRimWidth,this.texVScale=this.texV1-this.texV0}destroy(){this._readyResolver.reject(),this._cameraChangeHandle=Object(z["s"])(this._cameraChangeHandle),this._texture=Object(z["e"])(this._texture),this._fadeVao=Object(z["e"])(this._fadeVao),this._vao=Object(z["e"])(this._vao),this._readyController=Object(z["a"])(this._readyController)}when(){return this._readyResolver.promise}async initializeRenderContext(e){this._shaderTechniqueRepository=e.shaderTechniqueRepository;const t=e.renderContext.rctx;this._cameraChangeHandle=Object(Me["a"])(this.view,"state.camera",()=>e.requestRender(),!0),this._vao=this._createRibbon(t),this._vaoCount=Object(Kh["f"])(this._vao,"geometry"),this._fadeVao=Object(Oh["d"])(t),this._fadeVaoCount=Object(Kh["f"])(this._fadeVao,"geometry");const r=this.isOnMars?pp:qh,i=this._readyController.signal;try{const n=await Object(Bh["a"])(r,{signal:i});Object(_["v"])(i),this._texture=new Qh["a"](t,{pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].LINEAR,flipped:!0},n),e.requestRender(),this._readyController=null,this._readyResolver.resolve()}catch(n){Object(_["m"])(n)||bp.error("Unable to initialize simple atmosphere: image request failed",n),this._readyResolver.reject(n)}}get coneTechnique(){if(Object(z["j"])(this._coneTechnique)){const e=new Hh;e.geometry=Vh["a"].Cone,this._coneTechnique=this._shaderTechniqueRepository.acquire(Gh,e)}return this._coneTechnique}get undergroundTechnique(){if(Object(z["j"])(this._undergroundTechnique)){const e=new Hh;e.geometry=Vh["a"].Underground,this._undergroundTechnique=this._shaderTechniqueRepository.acquire(Gh,e)}return this._undergroundTechnique}render(e){this._update(e.camera);const t=e.rctx;if(this._renderData.undergroundFadeAlpha<1){const r=t.useTechnique(this.coneTechnique);r.setUniformMatrix4fv("proj",e.camera.projectionMatrix),r.setUniformMatrix4fv("view",e.camera.viewMatrix),r.setUniform3fv("silCircleCenter",this._renderData.silCircleCenter),r.setUniform3fv("silCircleV1",this._renderData.silCircleV1),r.setUniform3fv("silCircleV2",this._renderData.silCircleV2),r.setUniform2fv("texV",this._renderData.texV),r.bindTexture(this._texture,"tex"),e.scenelightingData.setLightDirectionUniform(r),r.setUniform1f("altitudeFade",this._renderData.altitudeFade),r.setUniform1f("innerScale",this._renderData.innerScale),t.bindVAO(this._vao),t.drawArrays(fh["r"].TRIANGLES,0,this._vaoCount)}if(this._renderData.undergroundFadeAlpha>0){const r=t.useTechnique(this.undergroundTechnique);r.setUniform1f("undergroundFadeAlpha",this._renderData.undergroundFadeAlpha),e.scenelightingData.setLightDirectionUniform(r),r.setUniform3fv("cameraPosition",e.camera.eye),t.bindVAO(this._fadeVao),t.drawArrays(fh["r"].TRIANGLE_STRIP,0,this._fadeVaoCount)}}renderHaze(){return!1}_update(e){const t=Object(ju["f"])(),r=this.planetRadius,i=Object($o["r"])(e.eye),n=i-r;if(n<0){const e=Math.min(-n/5e3,1);this._renderData.undergroundFadeAlpha=e}else this._renderData.undergroundFadeAlpha=0;const a=Math.max(Op,n),s=r+gp;this._renderData.innerScale=Ep(r+a,r,s)-1,this._renderData.altitudeFade=eh(n),Object($o["g"])(t,e.eye,(r+Op)/i),wp(t,e.center,e.up,r,this._renderData);const o=this._computeScreenRimWidth(e,t,e.up,this._renderData),c=vp(),l=_p(n);let u=this.texV0+c*this.texVScale,d=this.texV0+o*l*this.texVScale;if(n>Op){wp(e.eye,e.center,e.up,r,this._renderData);const t=this._computeScreenRimWidth(e,e.eye,e.up,this._renderData),i=Object(dr["f"])((t-1.5)/(o-1.5),0,1);u=this.texV0+i*c*this.texVScale,d=this.texV0+Object(dr["l"])(this.texV1,o*l,i)*this.texVScale}Object(io["s"])(this._renderData.texV,u,d)}_createRibbon(e){const t=new Float32Array(3+3*mp*3),r=new Uint32Array(3*mp*5);t[0]=0,t[1]=0,t[2]=-1;for(let a=0;a<mp;a++){const e=9*a+3;t[e+0]=a,t[e+1]=this.innerRimFactor,t[e+2]=-1,t[e+3]=a,t[e+4]=this.middleRimFactor,t[e+5]=0,t[e+6]=a,t[e+7]=this.outerRimFactor,t[e+8]=1;const i=3*a+1,n=a===mp-1?1:i+3,s=15*a;r[s+0]=i,r[s+1]=i+1,r[s+2]=n+1,r[s+3]=n+1,r[s+4]=n,r[s+5]=i,r[s+6]=i+1,r[s+7]=i+2,r[s+8]=n+2,r[s+9]=n+2,r[s+10]=n+1,r[s+11]=i+1,r[s+12]=i,r[s+13]=n,r[s+14]=0}const i=Ap.createBuffer(r.length),n=i.position;for(let a=0;a<r.length;++a){const e=3*r[a];n.set(a,0,t[e]),n.set(a,1,t[e+1]),n.set(a,2,t[e+2])}return new ep["a"](e,hh["a"],{geometry:Object(Wh["a"])(Ap)},{geometry:Jh["a"].createVertex(e,fh["D"].STATIC_DRAW,i.buffer)})}_computeScreenRimWidth(e,t,r,i){return Object($o["h"])(Tp,i.silCircleCenter,i.silCircleV2),Object($o["g"])(Sp,Tp,this.outerRimFactor),Object(Qd["o"])(xp,t,Tp,r),Object(fp["i"])(Tp,xp,e.projectionMatrix,e.viewport),Object(fp["i"])(Sp,xp,e.projectionMatrix,e.viewport),Object($o["o"])(Tp,Sp)/e.height}}function wp(e,t,r,i,n){const a=Object($o["r"])(e),s=i*Math.sqrt(a*a-i*i)/a,o=Math.sqrt(i*i-s*s),c=n.silCircleV1,l=n.silCircleV2;return Object($o["g"])(n.silCircleCenter,e,o/a),Object($o["i"])(c,e,t),Object($o["v"])(c)<1&&Object($o["i"])(c,e,r),Object($o["g"])(c,c,s/Object($o["r"])(c)),Object($o["i"])(l,c,e),Object($o["g"])(l,l,s/Object($o["r"])(l)),s}const xp=Object(Kd["d"])(),Tp=Object(ju["f"])(),Sp=Object(ju["f"])();function Ep(e,t,r){return e*e/(Math.sqrt(e*e-t*t)*Math.sqrt(e*e-r*r)+t*r)}const Ap=Object($h["a"])().vec3f(Yh["a"].POSITION);var Cp=r("3111");class Rp extends uh["a"]{constructor(e){super(e,null,()=>this.destroy())}initializeProgram(e){const t=Rp.shader.get().build();return new ph["a"](e.rctx,t,hh["a"])}initializePipeline(){return Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]})}bindPass(e){const t=this._makeInfiniteProjectionMatrix(e.camera.projectionMatrix,e.camera.near,Mp);Object(Qd["n"])(t,t,e.camera.viewMatrix),Object(Qd["n"])(t,t,e.modelMatrix),this.program.setUniformMatrix4fv("transform",t),this.program.setUniform4fv("viewport",e.camera.fullViewport),this.program.setUniform1f("pixelRatio",e.camera.pixelRatio)}_makeInfiniteProjectionMatrix(e,t,r){const i=24e-8;return Object(Qd["d"])(r,e),r[10]=i-1,r[11]=-1,r[14]=(i-2)*t,r}}Rp.shader=new lh["a"](Cp["a"],()=>r.e("chunk-2d229d83").then(r.bind(null,"ded0")));const Mp=Object(Kd["d"])(),Pp=v["a"].getLogger("esri.views.3d.environment.Stars");let Ip=class extends F["a"]{constructor(e){super(e),this._loadDataTask=null,this._numPoints=0,this._renderParameter={camera:null,modelMatrix:Object(Kd["d"])()},this._updatingTracking=new Se["a"]}get updating(){return this._updatingTracking.updating||this.loading}get loading(){return Object(z["k"])(this._loadDataTask)&&!this._loadDataTask.finished}initialize(){this._loadDataTask=this._createLoadDataTask()}destroy(){this._loadDataTask=Object(z["a"])(this._loadDataTask),this._updatingTracking.destroy(),this._numPoints=0,this._technique=Object(z["r"])(this._technique),this._vao=Object(z["e"])(this._vao)}render(e){const{rctx:t,camera:r}=e;if(this._ensureResources(t),Object(z["j"])(this._technique)||Object(z["j"])(this._vao))return;const i=t.useTechnique(this._technique);this._renderParameter.camera=r,this._technique.bindPass(this._renderParameter),t.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),t.drawArrays(fh["r"].POINTS,0,this._numPoints)}_ensureResources(e){if(Object(z["k"])(this._technique)||Object(z["j"])(Up))return;this._technique=new Rp({rctx:e,viewingMode:this.view.state.viewingMode}),this._numPoints=Up.byteLength/Fp;const t=new Float32Array(Up,0,2*this._numPoints),r=new Uint8Array(Up,2*this._numPoints*4,this._numPoints);this._vao=this._createVertexArrayObject(e,t,r,this._numPoints),this._updatingTracking.add(()=>{var e;return null==(e=this.view)?void 0:e.environment.lighting.date},e=>this._update(e),oe["a"])}_computeDayDuration(e){const t=e,r=new Date(e.getFullYear(),0,1,11,58,56);return(+t-+r)/(+new Date(e.getFullYear()+1,0,1,11,58,55)-+r)}_update(e){if(!e)return;const t=(e.getHours()/12+e.getMinutes()/60*(2/24)+e.getSeconds()/60*(2/1440)-.9972222)%2,r=2*this._computeDayDuration(e),i=this._renderParameter.modelMatrix;Object(Qd["d"])(i,Np),Object(Qd["h"])(i,i,-r*Math.PI),Object(Qd["n"])(i,Lp,i),Object(Qd["h"])(i,i,-t*Math.PI),this.requestRender()}_hexToRGB(e){return[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16)]}_unpackUint8Attributes(e){return e>=192?[2.9,e-192]:e>=160?[2.5,e-160]:e>=128?[2,e-128]:e>=96?[1.5,e-96]:e>=64?[1,e-64]:e>=32?[.7,e-32]:[.4,e]}_createVertexArrayObject(e,t,r,i){const n=kp.createBuffer(i),a=n.position,s=n.color,o=n.size;for(let c=0;c<i;c++){const e=t[2*c+0],i=t[2*c+1];a.set(c,0,-Math.cos(e)*Math.sin(i)),a.set(c,1,-Math.sin(e)*Math.sin(i)),a.set(c,2,-Math.cos(i));const n=this._unpackUint8Attributes(r[c]),l=this._hexToRGB(Dp[n[1]]);s.set(c,0,255*l[0]),s.set(c,1,255*l[1]),s.set(c,2,255*l[2]),s.set(c,3,255),o.set(c,n[0])}return new ep["a"](e,hh["a"],{geometry:Object(Wh["a"])(kp)},{geometry:Jh["a"].createVertex(e,fh["D"].STATIC_DRAW,n.buffer)})}_createLoadDataTask(){if(Object(z["k"])(Up))return null;const e=Object(_["h"])(async e=>{const{data:t}=await Object(Qt["a"])("esri/views/3d/environment/resources/stars.wsv",{responseType:"array-buffer",signal:e});this._verifyStarData(t),Up=t});return e.promise.catch(e=>{Object(_["m"])(e)||Pp.error(e)}).then(()=>{this.destroyed||(this.requestRender(),this.notifyChange("updating"))}),e}_verifyStarData(e){if(!e)throw new b["a"]("stars:no-data-received","Failed to create stars because star catalogue is missing");const t=e.byteLength/Fp;if(t%1!=0||t>5e4||t<5e3)throw new b["a"]("stars:invalid-data","Failed to create stars because star catalogue data is invalid")}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ip.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ip.prototype,"requestRender",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ip.prototype,"updating",null),Object(l["a"])([Object(j["b"])()],Ip.prototype,"_loadDataTask",void 0),Object(l["a"])([Object(j["b"])()],Ip.prototype,"_updatingTracking",void 0),Ip=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.Stars")],Ip);const Dp=["9bb2ff","9eb5ff","aabfff","bbccff","ccd8ff ","dae2ff","e4e9ff","eeefff","f8f6ff","fff9fb","fff5ef","fff1e5","ffeddb","ffe9d2","ffe6ca","ffe3c3","ffe0bb","ffddb4","ffdaad","ffd6a5","ffd29c","ffcc8f","ffc178","ffa94b","ff7b00"],Lp=Object(Kd["e"])(1,0,0,0,0,.9174771405229186,.39778850739794974,0,0,-.39778850739794974,.9174771405229186,0,0,0,0,1),Np=Object(Kd["e"])(1,0,0,0,0,.9174771405229186,-.39778850739794974,0,0,.39778850739794974,.9174771405229186,0,0,0,0,1),Fp=9,kp=Object($h["a"])().vec3f(Yh["a"].POSITION).vec4u8(Yh["a"].COLOR).f32(Yh["a"].SIZE);let Up=null;var zp,Bp=r("614d"),Vp=r("badc");const Gp=[Vp["a"].POSTPROCESSING_ENVIRONMENT_OPAQUE,Vp["a"].POSTPROCESSING_ENVIRONMENT_TRANSPARENT];let Hp,qp=zp=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"],this._context=null,this._pendingAtmosphere=null,this._atmosphere=null,this._precipitationEnabled=Object(Jd["b"])()}initialize(){this.view._stage.addRenderPlugin(Gp,this)}destroy(){var e;this._pendingAtmosphere=Object(z["d"])(this._pendingAtmosphere),null!=(null==(e=this.view)?void 0:e._stage)&&this.view._stage.removeRenderPlugin(this),this._handles=Object(z["d"])(this._handles),this._set("view",null)}get atmosphereType(){return Object(z["k"])(this._pendingAtmosphere)?this._pendingAtmosphere.type:Object(z["k"])(this._atmosphere)?this._atmosphere.type:"none"}get canRender(){var e;return!(null==(e=this.view.basemapTerrain)||!e.renderer.canRender)||"global"!==this.view.viewingMode}get needsLinearDepth(){return"realistic"===this._selectAtmosphereType()}updateAnimation(e){return!!Object(z["k"])(this._precipitation)&&this._precipitation.update(e)}get updating(){return Object(z["k"])(this._pendingAtmosphere)||Object(z["k"])(this._stars)&&this._stars.updating||Object(z["k"])(this._clouds)&&this._clouds.running}get weatherVisible(){return Object($o["r"])(this.view.state.camera.eye)-Object(Yd["e"])(this.view.spatialReference).radius<=Rd["b"]}get _stars(){var e,t;const r=this.view,i=null!=(e=null==(t=r.environment)?void 0:t.starsEnabled)&&e,n=this._get("_stars");return!i||Object(z["j"])(this._context)?(Object(z["d"])(n),null):Object(z["k"])(n)?n:new Ip({view:r,requestRender:()=>this._setNeedsRender()})}get _precipitation(){const e=this._get("_precipitation");if(!this._precipitationEnabled||Object(z["j"])(this._context))return Object(z["d"])(e),null;const t=this.view,r=this._context;return Object(z["k"])(e)&&e.context===r?e:(Object(z["d"])(e),new up({context:r,view:t}))}get _clouds(){const e=this._get("_clouds");if(!this.weatherEnabled||Object(z["j"])(this._context))return Object(z["d"])(e),null;if(Object(z["k"])(e))return e;const t=this.view,r=this._context.renderContext.rctx;return Object(z["d"])(e),new Ph({rctx:r,view:t,requestRender:()=>this._setNeedsRender()})}get _cloudComposition(){const e=this._get("_cloudComposition");if(!this.weatherEnabled||Object(z["j"])(this._context))return Object(z["d"])(e),null;const t=this.view.state.viewingMode,r=this._context.renderContext.rctx,i=Object(Yd["e"])(this.view.spatialReference).radius;return Object(z["k"])(e)&&e.viewingMode===t&&e.radius===i?e:(Object(z["d"])(e),new _h["a"]({rctx:r,viewingMode:t,radius:i}))}get _fog(){const e=this._get("_fog");if(!this.weatherEnabled||Object(z["j"])(this._context))return Object(z["d"])(e),null;if(Object(z["k"])(e))return e;const t=this.view,r=this._context;return Object(z["d"])(e),new zh({context:r,view:t})}get weatherEnabled(){var e,t;return!(null==(e=this.view)||null==(t=e.environmentManager)||!t.weatherEnabled)}get precipitationEnabled(){return this._precipitationEnabled}set precipitationEnabled(e){this._precipitationEnabled=e}initializeRenderContext(e=null){this._context=e,this._handles.add([Object(Me["f"])(this.view,"basemapTerrain",()=>this._updateBasemapTerrain(),!0),Object(oe["e"])(()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality}),()=>this._updateAtmosphere(),oe["d"]),Object(oe["e"])(()=>this._stars,()=>this._setNeedsRender()),Object(oe["e"])(()=>this._clouds,()=>this._updateWeather(this._weatherUpdateParameters),oe["a"]),Object(oe["e"])(()=>this._precipitation,()=>this._setNeedsRender()),Object(oe["e"])(()=>this._fog,()=>this._updateFog(this._weatherUpdateParameters),oe["a"]),Object(oe["e"])(()=>this._weatherUpdateParameters,e=>{this._updateWeather(e),this._updateFog(e)},oe["d"])])}uninitializeRenderContext(){this._context=null,this._atmosphere=Object(z["d"])(this._atmosphere),this._set("_stars",Object(z["d"])(this._stars)),this._set("_precipitation",Object(z["d"])(this._precipitation)),this._set("_clouds",Object(z["d"])(this._clouds)),this._set("_cloudComposition",Object(z["d"])(this._cloudComposition)),this._set("_fog",Object(z["d"])(this._fog))}render(e){if(e.pass===Bp["a"].MATERIAL)switch(e.slot){case Vp["a"].POSTPROCESSING_ENVIRONMENT_OPAQUE:Object(z["k"])(this._stars)&&this._stars.render(e),Object(z["k"])(this._atmosphere)&&this._atmosphere.canRender&&(this._atmosphere.render(e),jh(this._clouds)&&Object(z["k"])(this._cloudComposition)&&(this._cloudComposition.render(e,this._clouds,Object(z["k"])(this.view.animation)),this._cloudComposition.isFading&&this._setNeedsRender()));break;case Vp["a"].POSTPROCESSING_ENVIRONMENT_TRANSPARENT:if(Object(z["k"])(this._atmosphere)&&this._atmosphere.canRender){const t=this.weatherEnabled?this.view.environment.weather.type:"disabled";if(this._atmosphere.renderHaze(e,"rainy"===t),Object(z["k"])(this._fog)){const r="foggy"===t||"rainy"===t||"snowy"===t;(r||"realistic"!==this._selectAtmosphereType())&&this._fog.render(e,r,"rainy"===t)}"rainy"!==this.view.environment.weather.type&&"snowy"!==this.view.environment.weather.type||!Object(z["k"])(this._precipitation)||this._precipitation.render(e,this.view.environment.weather.precipitation,"rainy"===this.view.environment.weather.type?sp["a"].RAIN:sp["a"].SNOW)}}}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return Object(z["j"])(e)?null:"rainy"===e.type||"snowy"===e.type?{type:e.type,weatherAdjustment:e.cloudCover,effect:e.precipitation}:{type:e.type,weatherAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){Object(z["j"])(e)||Object(z["j"])(this._clouds)||(this._clouds.applyPreset(Eh[e.type],e.weatherAdjustment),this._setNeedsRender())}_setNeedsRender(){Object(z["k"])(this._context)&&this._context.requestRender()}_updateFog(e){if(!Object(z["j"])(this._fog)&&!Object(z["j"])(e))switch(e.type){case"foggy":this._fog.strength=Object(dr["l"])(3e-5,.005,e.weatherAdjustment**3),this._setNeedsRender();break;case"rainy":case"snowy":this._fog.strength=Object(dr["l"])(4e-6,8e-5,e.effect**3),this._setNeedsRender();break;default:this._fog.strength=4e-6,this._setNeedsRender()}}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;Object(z["k"])(this._pendingAtmosphere)&&(this._pendingAtmosphere!==this._atmosphere&&this._pendingAtmosphere.destroy(),this._pendingAtmosphere=null);const t=this._getAtmosphereClass();if(!t)return Object(z["k"])(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();const r=new t(this.view);Object(z["k"])(this._context)&&r.initializeRenderContext(this._context),Object(z["j"])(this._atmosphere)&&(this._atmosphere=r,this._setNeedsRender()),this._pendingAtmosphere=r,r.when().then(()=>{Object(z["k"])(this._atmosphere)&&this._pendingAtmosphere&&this._pendingAtmosphere!==this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=this._pendingAtmosphere),this._pendingAtmosphere=null,this._setNeedsRender(),this._updateBasemapTerrain()}).catch(()=>{this._pendingAtmosphere===r&&(this._pendingAtmosphere=null)})}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case"none":return null;case"realistic":return vh;case"panoramic":return rp;case"simple":return jp;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),r=this.view.viewingMode;return!e||null==t||Object(fe["j"])(this.view.spatialReference)?"none":"local"===r?"panoramic":"high"===t&&Object(z["k"])(this._context)&&vh.isSupported(this._context)&&Object(fe["g"])(this.view.spatialReference)?"realistic":"simple"}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=Object(z["k"])(this._atmosphere)&&"simple"===this.atmosphereType)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType(),stubGetAtmosphereClass:e=>{Hp=zp.prototype._getAtmosphereClass,zp.prototype._getAtmosphereClass=e},restoreGetAtmosphereClass:()=>{zp.prototype._getAtmosphereClass=Hp},precipitationEnabled:e=>{this.precipitationEnabled=e}}}};function Wp(e,t,r){return $p(e,t.longitude,t.latitude,r.longitude,r.latitude)}function $p(e,t,r,i,n){const a=Object(dr["h"])(r),s=Object(dr["h"])(n),o=a-s,c=Object(dr["h"])(t)-Object(dr["h"])(i),l=Math.sin(o/2),u=Math.sin(c/2),d=2*Object(dr["d"])(Math.sqrt(l*l+Math.cos(a)*Math.cos(s)*u*u))*e;return Math.round(1e4*d)/1e4}function Zp(e,t,r){const i=t.spatialReference,n=Object(Yd["e"])(i),a=new he["a"](t.x,e.y,i),s=new he["a"](r.x,e.y,i),o=new he["a"](e.x,t.y,i),c=new he["a"](e.x,r.y,i);return{lon:Wp(n.radius,a,s),lat:Wp(n.radius,o,c)}}function Xp(e,t,r){const i=t/r,n=Object(dr["h"])(e),a=Math.sin(i/2),s=Math.cos(n),o=2*Object(dr["d"])(Math.sqrt(a*a/(s*s)));return Object(dr["p"])(o)}function Yp(e,t){let r=e/15;return t||(r=Math.round(r)),r}function Jp(e,t){t||(t={hours:0,minutes:0,seconds:0}),t.hours=Yp(e[0],!0);const r=t.hours%1;t.hours-=r,t.minutes=60*r;const i=t.minutes%1;return t.minutes-=i,t.seconds=Math.round(60*i),t}Object(l["a"])([Object(j["b"])({constructOnly:!0})],qp.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],qp.prototype,"updating",null),Object(l["a"])([Object(j["b"])()],qp.prototype,"weatherVisible",null),Object(l["a"])([Object(j["b"])()],qp.prototype,"_context",void 0),Object(l["a"])([Object(j["b"])()],qp.prototype,"_pendingAtmosphere",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],qp.prototype,"_stars",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],qp.prototype,"_precipitation",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],qp.prototype,"_clouds",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],qp.prototype,"_cloudComposition",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],qp.prototype,"_fog",null),Object(l["a"])([Object(j["b"])()],qp.prototype,"weatherEnabled",null),Object(l["a"])([Object(j["b"])()],qp.prototype,"_precipitationEnabled",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],qp.prototype,"_weatherUpdateParameters",null),qp=zp=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.EnvironmentRenderer")],qp);var Qp,Kp,ef,tf={exports:{}};Qp=tf,Kp=function(){var e=Math.PI,t=Math.sin,r=Math.cos,i=Math.tan,n=Math.asin,a=Math.atan2,s=Math.acos,o=e/180,c=864e5,l=2440588,u=2451545,d={dec:0,ra:0};function h(e){return e.valueOf()/c-.5+l}function p(e){return new Date((e+.5-l)*c)}function f(e){return h(e)-u}var b=23.4397*o;function m(e,n){return a(t(e)*r(b)-i(n)*t(b),r(e))}function g(e,i){return n(t(i)*r(b)+r(i)*t(b)*t(e))}function y(e,n,s){return a(t(e),r(e)*t(n)-i(s)*r(n))}function O(e,i,a){return n(t(i)*t(a)+r(i)*r(a)*r(e))}function v(e,t){return o*(280.16+360.9856235*e)-t}function _(e){return o*(357.5291+.98560028*e)}function j(e){return o*(1.9148*t(e)+.02*t(2*e)+3e-4*t(3*e))}function w(t,r){return t+r+102.9372*o+e}function x(e,t){var r=_(e),i=w(r,j(r));return t||(t={dec:0,ra:0}),t.dec=g(i,0),t.ra=m(i,0),t}var T={PolarException:{NORMAL:0,MIDNIGHT_SUN:1,POLAR_NIGHT:2},getPosition:function(e,t,r,i){var n=o*-r,a=o*t,s=f(e),c=x(s,d),l=v(s,n)-c.ra;return i||(i={azimuth:0,altitude:0}),i.azimuth=y(l,a,c.dec),i.altitude=O(l,a,c.dec),i}},S=[[-.83,"sunrise","sunset"]];T.addTime=function(e,t,r){S.push([e,t,r])};var E=9e-4;function A(t,r){return Math.round(t-E-r/(2*e))}function C(t,r,i){return E+(t+r)/(2*e)+i}function R(e,r,i){return u+e+.0053*t(r)-.0069*t(2*i)}function M(e,i,n){return s((t(e)-t(i)*t(n))/(r(i)*r(n)))}function P(e){var i=o*(134.963+13.064993*e),n=o*(93.272+13.22935*e),a=o*(218.316+13.176396*e)+6.289*o*t(i),s=5.128*o*t(n),c=385001-20905*r(i);return{ra:m(a,s),dec:g(a,s),dist:c}}return T.getTimes=function(e,i,n){var a=o*-n,s=o*i,c=A(f(e),a),l=C(0,a,c),u=_(l),d=j(u),h=w(u,d),b=g(h,0),m=R(l,u,h);function y(e){return R(C(M(e,s,b),a,c),u,h)}function O(e){var i=(t(e)-t(s)*t(b))/(r(s)*r(b));return i<-1?T.PolarException.MIDNIGHT_SUN:i>1?T.PolarException.POLAR_NIGHT:T.PolarException.NORMAL}var v,x,E,P,I,D={solarNoon:p(m),nadir:p(m-.5),polarException:T.PolarException.NORMAL};for(v=0,x=S.length;v<x;v+=1)I=m-((P=y((E=S[v])[0]*o))-m),D[E[1]]=p(I),D[E[2]]=p(P);return D.polarException=O(S[0][0]*o),D},T.getMoonPosition=function(e,t,r){var n=o*-r,a=o*t,s=f(e),c=P(s),l=v(s,n)-c.ra,u=O(l,a,c.dec);return u+=.017*o/i(u+10.26*o/(u+5.1*o)),{azimuth:y(l,a,c.dec),altitude:u,distance:c.dist}},T.getMoonFraction=function(e){var i=f(e),n=x(i),o=P(i),c=149598e3,l=s(t(n.dec)*t(o.dec)+r(n.dec)*r(o.dec)*r(n.ra-o.ra)),u=a(c*t(l),o.dist-c*r(l));return(1+r(u))/2},T},void 0!==(ef=Kp())&&(Qp.exports=ef);const rf=tf.exports,nf={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};function af(e,t,r,i,n,a,s){Object($o["y"])(s.ambient.color,1,1,1),s.ambient.intensity=nf.global.ambient,Object($o["y"])(s.direct.color,1,1,1),s.direct.intensity=nf.global.direct;const o=t[2],c=Object(dr["f"])((Math.abs(o)-nf.local.altitude)/(nf.global.altitude-nf.local.altitude),0,1);let l;if(s.globalFactor=c,"sun"===a&&(l=rf.getTimes(e,t[1],t[0])),c<1){let t;if("sun"===a)t=mf(e,l,i);else{const e=ff(i);t={direct:{intensity:nf.local.directAtNoon*e.direct,color:Object(ju["h"])(1,1,1)},ambient:{intensity:nf.local.ambientAtNoon*e.ambient,color:Object(ju["h"])(1,1,1)},timeOfDay:"early afternoon"}}Object($o["k"])(s.ambient.color,t.ambient.color,s.ambient.color,c),s.ambient.intensity=Object(dr["l"])(t.ambient.intensity,s.ambient.intensity,c),Object($o["k"])(s.direct.color,t.direct.color,s.direct.color,c),s.direct.intensity=Object(dr["l"])(t.direct.intensity,s.direct.intensity,c),s.specularStrength="rainy"===i||"snowy"===i||"foggy"===i?0:1,s.environmentStrength="rainy"===i?.7:"snowy"===i||"foggy"===i?.75:1}s.noonFactor="sun"===a?pf(e,l):1,"sun"===a?of(e,t,r,s.direct.directionToLightSource):sf(n,r,s.direct.directionToLightSource)}function sf(e,t,r){t===As["a"].Global?Object($o["t"])(Of,e.eye):Object($o["y"])(Of,0,0,1),Object(Qd["e"])(yf,vf,e.viewRight),Object($o["s"])(r,Of,yf),Object(Qd["e"])(yf,_f,Of),Object($o["s"])(r,r,yf)}function of(e,t,r,i){const n=hf,a=Object(Qd["j"])(df);if(r===As["a"].Global)rf.getPosition(e,0,0,n),Object($o["y"])(i,0,0,-1),Object(Qd["s"])(a,a,-n.azimuth),Object(Qd["p"])(a,a,-n.altitude),Object($o["s"])(i,i,a);else{const r=nf.planarDirection,s=r.globalAngles,o=t[2];let c=(Math.abs(o)-r.localAltitude)/(r.globalAltitude-r.localAltitude);c=Object(dr["f"])(c,0,1),c<1?(rf.getPosition(e,t[1],t[0],n),n.azimuth=(1-c)*n.azimuth+c*s.azimuth,n.altitude=(1-c)*n.altitude+c*s.altitude):(n.azimuth=s.azimuth,n.altitude=s.altitude),Object($o["y"])(i,0,-1,0),Object(Qd["h"])(a,a,-n.azimuth),Object(Qd["s"])(a,a,-n.altitude),Object($o["s"])(i,i,a)}}function cf(e,t){if(t===As["a"].Global)return!0;const r=nf.planarDirection;return Math.abs(e)<r.localAltitude}const lf=Object(ju["h"])(.5773502691896258,-.5773502691896258,.5773502691896258);class uf{constructor(){this.ambient={color:Object(ju["h"])(1,1,1),intensity:.55},this.direct={color:Object(ju["h"])(1,1,1),intensity:.55,directionToLightSource:Object(ju["d"])(lf)},this.noonFactor=.5,this.globalFactor=0,this.specularStrength=1,this.environmentStrength=1}}const df=Object(Kd["d"])(),hf={azimuth:0,altitude:0};function pf(e,t){const r=e.valueOf();let i,n;t.polarException===rf.PolarException.MIDNIGHT_SUN?(i=r-60*(e.getHours()+48)*60*1e3-60*e.getMinutes()*1e3,n=i+432e6):t.polarException===rf.PolarException.POLAR_NIGHT?(i=r-2,n=r-1):(i=t.sunrise.valueOf(),n=t.sunset.valueOf());const a=i+(n-i)/2;return 1-Object(dr["f"])(Math.abs(r-a)/432e5,0,1)}function ff(e){switch(e){case"disabled":case"sunny":case"cloudy":return{direct:1,ambient:1};case"rainy":return{direct:.4,ambient:1.2};case"snowy":return{direct:.5,ambient:1.3};case"foggy":return{direct:.2,ambient:1.6}}}function bf(e,t){const r=(e[0]+e[1]+e[2])/3;for(let i=0;i<3;i++)e[i]=e[i]+(r-e[i])*t;return e}function mf(e,t,r){const i=e.valueOf();let n,a;t.polarException===rf.PolarException.MIDNIGHT_SUN?(n=i-60*(e.getHours()+48)*60*1e3-60*e.getMinutes()*1e3,a=n+432e6):t.polarException===rf.PolarException.POLAR_NIGHT?(n=i-2,a=i-1):(n=t.sunrise.valueOf(),a=t.sunset.valueOf());const s=a-n,o=n+s/2,c=s/4,l=o-c,u=o+c,d=.06*s,h=n-d/2,p=n+d/2,f=a-d/2,b=a+d/2,m=nf.local,g=[.01,m.ambientAtNight],y=[.8,.8,1],O=[.01,.01,.01],v=[m.directAtTwilight,m.ambientAtTwilight],_=[1,.6,.5],j=[.8,.8,1],w=[.9*m.directAtNoon,m.ambientAtNoon],x=[1,.98,.98],T=[.98,.98,1],S=[m.directAtNoon,m.ambientAtNoon],E=[1,1,1],A=[1,1,1],C=w,R=x,M=T,P=v,I=_,D=j;let L,N,F=[0,0],k=[0,0,0],U=[0,0,0];i<h||i>b?(F=g,k=O,U=y,N="night"):i<p?(L=p-h,F=gf(i-h,L,g,v),k=gf(i-h,L,O,_),U=gf(i-h,L,y,j),N="sun rising"):i<l?(L=l-p,F=gf(i-p,L,v,w),k=gf(i-p,L,_,x),U=gf(i-p,L,j,T),N="early morning"):i<o?(L=o-l,F=gf(i-l,L,w,S),k=gf(i-l,L,x,E),U=gf(i-l,L,T,A),N="late morning"):i<u?(L=u-o,F=gf(i-o,L,S,C),k=gf(i-o,L,E,R),U=gf(i-o,L,A,M),N="early afternoon"):i<f?(L=f-u,F=gf(i-u,L,C,P),k=gf(i-u,L,R,I),U=gf(i-u,L,M,D),N="late afternoon"):i<b&&(L=b-f,F=gf(i-f,L,P,g),k=gf(i-f,L,I,O),U=gf(i-f,L,D,y),N="sun setting");let z=0;switch(r){case"rainy":case"foggy":z=.9;case"snowy":z=.5}z>0&&(k=bf(k,z),U=bf(U,z));const B=Object(ju["h"])(k[0],k[1],k[2]),V=Object(ju["h"])(U[0],U[1],U[2]),G=ff(r);return{direct:{intensity:F[0]*G.direct,color:B},ambient:{intensity:F[1]*G.ambient,color:V},timeOfDay:N}}function gf(e,t,r,i){const n=[];for(let a=0;a<r.length;a++)n[a]=(i[a]-r[a])*e/t+r[a];return n}new Date(0);const yf=Object(Kd["d"])(),Of=Object(ju["f"])(),vf=.35,_f=-.5;var jf=r("2bc9");let wf=class extends U["a"].EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new ge["a"],this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new jf["c"],this._ambientLight=new jf["a"],this._moonLight=new jf["b"],this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){var e;return null==(e=this._renderer)?void 0:e.view}get updating(){var e;return!!(!this.disableQueries&&(this._referencePosUpdateQuery||this._referencePosMapCoordsRequested)||null!=(e=this._renderer)&&e.updating)}get weatherEnabled(){var e,t,r;return(null==(e=this._view)?void 0:e.environment.atmosphereEnabled)&&!this._disableWeather&&(null==(t=this._view)||null==(r=t.state)?void 0:r.viewingMode)===As["a"].Global&&Object(fe["g"])(this._view.spatialReference)}get weatherVisible(){var e;return this.weatherEnabled&&(null==(e=this._renderer)?void 0:e.weatherVisible)}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){if(this._renderer)return;this._renderer=new qp({view:e});const t=()=>this._updateRenderParameters(),r=()=>this._cameraHandler(),i=()=>this._updateLighting();this._viewHandles.add([Object(oe["e"])(()=>e.environment.lighting,e=>this._updateLightingHandler(e),oe["c"]),Object(oe["e"])(()=>e.environment.lighting.date,e=>this._lightingDateHandler(e),oe["c"]),Object(oe["e"])(()=>e.stationary,()=>this._interactingStationaryHandler()),Object(oe["e"])(()=>e.environment.lighting.directShadowsEnabled,t,oe["c"]),Object(oe["e"])(()=>e.environment.lighting.ambientOcclusionEnabled,t,oe["c"]),Object(oe["e"])(()=>e.environment.lighting.waterReflectionEnabled,t,oe["c"]),Object(oe["e"])(()=>{var t;return null==(t=e.environment.background)?void 0:t.color},t,oe["c"]),Object(oe["e"])(()=>e.spatialReference,()=>this._resetReferencePosition(!0),oe["c"]),Object(oe["e"])(()=>e.environment.weather.type,i,oe["c"]),Object(oe["e"])(()=>this.weatherEnabled,i,oe["c"]),Object(oe["e"])(()=>e.viewingMode,()=>this._resetReferencePosition(!0),oe["d"]),Object(oe["e"])(()=>"sun"===e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),oe["d"]),Object(oe["e"])(()=>e.state.camera,r,oe["d"]),Object(oe["e"])(()=>this.disableQueries,r)]),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=Object(z["d"])(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("sun"===e.type&&e.cameraTrackingEnabled),this._lightingDateHandler(e.date),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"sun"===(null==e?void 0:e.type)&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==(null==t?void 0:t.type)){if(e){if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!Object(pe["a"])(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),Object(z["k"])(this._referencePosWGS84Comparable)){const e=Jp(this._referencePosWGS84Comparable,Ef);Object(z["k"])(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"sun"===this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=Object(fe["g"])(this._view.spatialReference);if(r&&!Object(pe["a"])(this._view.spatialReference))return!1;const i=e.position;return Object(z["j"])(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=Object(ju["f"])()),r?Object(pe["u"])(i,this._referencePosWGS84Comparable):Object($o["y"])(this._referencePosWGS84Comparable,i.longitude,i.latitude,i.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLighting(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLighting(e){const t=this._view,r=e||t.environment.lighting.date,i=this._referencePosWGS84Comparable,n=Object(z["k"])(i)?xf:Tf;if(Object(z["k"])(i)){const e=this.weatherVisible?t.environment.weather.type:"disabled";af(r,i,t.state.viewingMode,e,t.state.camera,t.environment.lighting.type,n)}const a=this._mainLight,s=n.direct;Object($o["g"])(a.intensity,s.color,s.intensity*Math.PI),Object($o["m"])(a.direction,s.directionToLightSource),a.specularStrength=n.specularStrength,a.environmentStrength=n.environmentStrength;const o=this._ambientLight;Object($o["g"])(o.intensity,n.ambient.color,n.ambient.intensity);const c=this._moonLight;Object($o["k"])(c.intensity,Af,Cf,n.globalFactor);const l=(1-.5*n.globalFactor)*(1-.4*n.noonFactor*(1-n.globalFactor));Object($o["g"])(c.intensity,c.intensity,l),Object($o["m"])(c.direction,s.directionToLightSource),t._stage.renderView.updateLightSources([a,o,c],1-n.noonFactor,n.globalFactor),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||Object(z["j"])(e))return!1;const r=Sf;r.setTime((t||this._view.environment.lighting.date).getTime());const i=Jp(e,Ef);if(Object(z["j"])(i))return!1;let n=this._view.environment.lighting.positionTimezoneInfo;if(n.autoUpdated){if(n.hours===i.hours&&n.minutes===i.minutes&&n.seconds===i.seconds)return!1}else n=i;const a=r.getUTCHours()-(i.hours-n.hours),s=r.getUTCMinutes()-(i.minutes-n.minutes),o=r.getUTCSeconds()-(i.seconds-n.seconds);return r.setUTCHours(a),r.setUTCMinutes(s),r.setUTCSeconds(o),!t&&this._view.environment.lighting.autoUpdate(r,i)}_updateRenderParameters(){const e=this._view._stage;if(!e)return;const t=Object(z["n"])(this._referencePosWGS84Comparable,!0,e=>cf(e[2],this._view.state.viewingMode)),r=this._view.environment.background,i=r instanceof Fd?{type:"color",color:Object(Xd["f"])(d["a"].toUnitRGBA(r.color))}:{type:"color",color:Object(Xd["g"])(0,0,0,1)};e.renderView.setRenderParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,ssao:this._view.environment.lighting.ambientOcclusionEnabled,waterReflectionEnabled:this._view.environment.lighting.waterReflectionEnabled,fillLightsEnabled:"sun"===this._view.environment.lighting.type,background:i})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=Object(_["a"])(this._referencePointUpdateDelay).then(()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}}).catch(e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)}).then(()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))}),t=this._referencePosUpdateTimer=Object(_["a"])(this._referencePointUpdateInterval).then(()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())});this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLighting():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLighting(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],wf.prototype,"updating",null),Object(l["a"])([Object(j["b"])()],wf.prototype,"disableQueries",void 0),Object(l["a"])([Object(j["b"])()],wf.prototype,"_disableWeather",void 0),Object(l["a"])([Object(j["b"])()],wf.prototype,"weatherEnabled",null),Object(l["a"])([Object(j["b"])()],wf.prototype,"weatherVisible",null),Object(l["a"])([Object(j["b"])()],wf.prototype,"referencePositionWGS84Comparable",null),Object(l["a"])([Object(j["b"])()],wf.prototype,"_renderer",void 0),Object(l["a"])([Object(j["b"])()],wf.prototype,"_referencePosWGS84Comparable",void 0),wf=Object(l["a"])([Object(x["a"])("esri.views.3d.environment.SceneViewEnvironmentManager")],wf);const xf=new uf,Tf=new uf,Sf=new Date,Ef={hours:0,minutes:0,seconds:0},Af=Object(ju["h"])(.22,.22,.33),Cf=Object(ju["h"])(.22,.22,.22);var Rf,Mf,Pf,If=r("f895"),Df=r("d18f");function Lf(e,t){return 0!=(e&t)}function Nf(e,t,r,i,n,a){0!==e&&(r?(a.min=Math.min(a.min,t),a.max=Math.max(a.max,t)):null!=i?(a.min-=Math.max(0,(t-a.min)*(1-i)),a.max+=Math.max(0,(t-a.max)*(1-i))):n&&(a.min-=Math.max(0,t-a.min-n),a.max+=Math.max(0,t-a.max-n)))}!function(e){e[e.NONE=0]="NONE",e[e.ZOOM=1]="ZOOM",e[e.TUMBLE=2]="TUMBLE",e[e.LOOK_AROUND=3]="LOOK_AROUND",e[e.PAN=4]="PAN",e[e.ASCEND=5]="ASCEND"}(Rf||(Rf={})),function(e){e[e.NONE=0]="NONE",e[e.TILT=1]="TILT",e[e.ALTITUDE=2]="ALTITUDE",e[e.DISTANCE=4]="DISTANCE",e[e.COLLISION=8]="COLLISION",e[e.ALL=15]="ALL",e[e.ALL_EXCEPT_COLLISION=7]="ALL_EXCEPT_COLLISION"}(Mf||(Mf={})),function(e){e[e.TUMBLE=0]="TUMBLE",e[e.LOOK_AROUND=1]="LOOK_AROUND"}(Pf||(Pf={}));const Ff={selection:Mf.NONE,interactionType:Rf.NONE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:Pf.TUMBLE};function kf(e,t,r,i){return t=t||e.viewForward,Object($o["m"])(i,t),Object($o["g"])(i,i,Math.sign(Object($o["j"])(t,r))),i}var Uf=r("de58");function zf(e,t,r=Ff){const i=Bf(e,t,r);if(0===i)return!1;const n=e.renderCoordsHelper,a=n.getAltitude(t.eye)+i,s=kf(t,r.interactionDirection,Hf(e,t,Math.sign(i),Zf),$f),o=Object($o["m"])(Xf,t.viewForward),c=n.intersectInfiniteManifold(Object(Df["h"])(t.eye,s),a,Yf);return t.eye=Object(z["k"])(c)?c:n.setAltitude(Yf,a,t.eye),t.center=Object(Uf["a"])(Yf,t.eye,o,t.center),!0}function Bf(e,t,r=Ff){if(!Vf(e,r))return 0;const i=qf(e.state.constraints.altitude,Wf);Gf(e,r,i);const n=e.renderCoordsHelper.getAltitude(t.eye),a=Object(dr["f"])(n,i.min,i.max)-n;return Math.abs(a)<=1e-6?0:a}function Vf(e,t){const r=e.state.constraints.altitude;return!(!e.state.isGlobal||!r)&&(t.interactionType!==Rf.TUMBLE||!Lf(t.selection,Mf.TILT))}function Gf(e,t,r){const i=t.interactionType;if(i===Rf.NONE)return;const{min:n,max:a}=r,{interactionStartCamera:s,interactionFactor:o}=t,c=i===Rf.TUMBLE||i===Rf.ZOOM,l=Bf(e,s),u=0===l?0:e.renderCoordsHelper.getAltitude(s.eye);r.min=n,r.max=a,Nf(l,u,c,o,.05*u,r)}function Hf(e,t,r,i){return e.renderCoordsHelper.worldUpAtPosition(t.eye,i),Object($o["g"])(i,i,r),i}function qf(e,t){return t.min=e.min,t.max=e.max,t}const Wf={min:0,max:0},$f=Object(ju["f"])(),Zf=Object(ju["f"])(),Xf=Object(ju["f"])(),Yf=Object(ju["f"])();function Jf(e,t,r=Ff){if(!e.state.isLocal)return 0;const i=e.state.constraints.distance;if(!e.pointsOfInterest.surfaceOrigin.renderLocation||i===1/0)return 0;rb.min=0,rb.max=i,Kf(e,r,rb);const n=eb(e,t),a=rb.max-n;return a>=-1e-6?0:a}function Qf(e,t,r=Ff){const i=Jf(e,t,r);if(0===i)return!1;const n=e.pointsOfInterest.surfaceOrigin,a=eb(e,t)+i,s=Object($o["m"])(ib,t.eye),o=kf(t,r.interactionDirection,tb(e,t,sb),ab);if(!Object(If["e"])(Object(If["k"])(n.renderLocation,a),Object(Df["h"])(t.eye,o),ob))return!1;t.eye=ob;const c=Object($o["l"])(nb,t.eye,s);t.center=Object($o["h"])(ob,t.center,c);const l=e.renderCoordsHelper.getAltitude(t.center),u=e.renderCoordsHelper.intersectInfiniteManifold(t.ray,l,ob);return Object(z["k"])(u)&&(t.center=u),!0}function Kf(e,t,r){const i=t.interactionType;if(i===Rf.NONE)return;const{min:n,max:a}=r,{interactionStartCamera:s,interactionFactor:o}=t,c=i===Rf.ZOOM||i===Rf.PAN,l=Jf(e,s),u=0===l?0:eb(e,s);r.min=n,r.max=a,Nf(l,u,c,o,.05*u,r)}function eb(e,t){const r=e.pointsOfInterest.surfaceOrigin;return Object($o["o"])(t.eye,r.renderLocation)}function tb(e,t,r){const i=e.pointsOfInterest.surfaceOrigin;return Object($o["x"])(r,t.eye,i.renderLocation)}const rb={min:0,max:0},ib=Object(ju["f"])(),nb=Object(ju["f"])(),ab=Object(ju["f"])(),sb=Object(ju["f"])(),ob=Object(ju["f"])();var cb=r("9250");function lb(e,t,r,i){return Object(z["k"])(e.renderCoordsHelper.fromRenderCoords(t.eye,mb,i))&&Object(wu["h"])(r,mb)}function ub(e,t){return e.elevationProvider?Object(z["u"])(e.elevationProvider.getElevation(t[0],t[1],t[2],e.renderCoordsHelper.spatialReference,"ground"),0):0}function db(e,t,r,i){const n=e.state.camera.clone();t&&(n.eye=t,n.center=r,n.up=i),pb(e,n.ray,gb)||Object($o["m"])(gb,n.center);const a=e.state.constraints,s=a.minimumPoiDistance;if(Object($o["n"])(n.eye,gb)<s){const t=a.collision.enabled;Object($o["m"])(yb,n.viewForward),Object($o["g"])(yb,yb,s),t?n.eye=Object($o["l"])(mb,gb,yb):Object($o["h"])(gb,n.eye,yb);const r=e.renderCoordsHelper,i=r.getAltitude(n.eye),o=a.collision.elevationMargin;t&&i<o&&(Object($o["l"])(yb,gb,n.eye),n.eye=r.setAltitude(mb,o,n.eye),Object($o["h"])(gb,n.eye,yb))}return n.center=gb,n}function hb(e,t,r){if(!e.state.isGlobal)return!1;const i=ub(e,t),n=e.stateManager.constraintsManager.nearFarHeuristic,{far:a}=n.compute(t,r,e.renderDataExtent,i,Ob),s=a*a;return Object($o["n"])(t,r)>s}function pb(e,t,r){let i=bb[e.viewingMode];i||(i=Object(cb["b"])(e.state.viewingMode),i.options.backfacesTerrain=!e.state.isGlobal,i.options.invisibleTerrain=!0,bb[e.viewingMode]=i);const{isGlobal:n}=e.state;return!(!e.sceneIntersectionHelper.intersectRay(t,i,r)||hb(e,t.origin,r))||!(!e.renderCoordsHelper.intersectManifold(t,0,r)||hb(e,t.origin,r))||!!n&&fb(t,r,Object(Yd["e"])(e.spatialReference).radius)}function fb(e,t,r){const i=Object($o["j"])(e.origin,e.origin)-r*r,n=i>0?Math.sqrt(i)/3:1;return Object($o["g"])(t,e.direction,n/Object($o["r"])(e.direction)),Object($o["h"])(t,t,e.origin),!0}const bb={},mb=Object(ju["f"])(),gb=Object(ju["f"])(),yb=Object(ju["f"])(),Ob={near:0,far:0};function vb(e,t,r=_b.EYE){const i=e.state.constraints;if(!i.collision.enabled)return!1;const n=ub(e,t.eye),a=e.renderCoordsHelper.getAltitude(t.eye),s=n+i.collision.elevationMargin;if(a>=s)return!1;const o=Object($o["r"])(t.eye);if(Object($o["l"])(jb,t.center,t.eye),t.eye=e.renderCoordsHelper.setAltitude(wb,s,t.eye),r===_b.EYE_AND_CENTER)t.center=Object($o["h"])(jb,t.eye,jb);else if(r===_b.EYE_AND_CENTER_SCALE){const e=(o-a+s)/o;t.center=Object($o["g"])(jb,t.center,e)}return!0}var _b;!function(e){e[e.EYE=0]="EYE",e[e.EYE_AND_CENTER=1]="EYE_AND_CENTER",e[e.EYE_AND_CENTER_SCALE=2]="EYE_AND_CENTER_SCALE"}(_b||(_b={}));const jb=Object(ju["f"])(),wb=Object(ju["f"])();function xb(e,t,r){e.worldUpAtPosition(t,Tb),Object($o["l"])(Sb,r,t);const i=Object($o["r"])(Sb);return 0===i?0:Object(dr["b"])(Object($o["j"])(Sb,Tb)/i)}const Tb=Object(ju["f"])(),Sb=Object(ju["f"])();function Eb(e,t,r=Ff,i=!0){$b.eyeCenterDistance=0,$b.requiresTwoSteps=!1;const n=Ab(e,t,r,void 0,$b);if(0===n)return!1;switch(Object(Qd["e"])(Vb,-n,t.viewRight),r.tiltMode){case Pf.LOOK_AROUND:Object($o["s"])(Bb,t.viewForward,Vb),Object($o["g"])(Bb,Bb,$b.eyeCenterDistance),t.center=Object($o["h"])(Gb,t.eye,Bb);break;case Pf.TUMBLE:Object($o["l"])(Bb,t.center,t.eye),Object($o["s"])(Bb,Bb,Vb),t.eye=Object($o["l"])(Gb,t.center,Bb);break;default:Object(f["a"])(r.tiltMode)}return t.up=Object($o["s"])(Gb,t.up,Vb),!$b.requiresTwoSteps||!i||Eb(e,t,r,!1)}function Ab(e,t,r=Ff,i=Ff,n){if(!e.state.constraints.tilt)return 0;const a=t.distance,s=e.state.constraints.tilt(a,qb);return Ub(e,r,s),i.interactionType===Rf.TUMBLE&&Lf(i.selection,Mf.ALTITUDE)&&zb(e,i.interactionStartCamera,s),r.tiltMode===Pf.LOOK_AROUND||i.tiltMode===Pf.LOOK_AROUND?Rb(e,t,s,n):Cb(e,t,s)}function Cb(e,t,r){const i=xb(e.renderCoordsHelper,t.center,t.eye),n=i-Object(dr["f"])(i,r.min,r.max);return Db(n)?n:0}function Rb(e,t,r,i){switch(i&&(i.requiresTwoSteps=!1),e.viewingMode){case"global":return Pb(e,t,r,i);case"local":return Mb(e,t,r,i);default:return void Object(f["a"])(e.viewingMode)}}function Mb(e,t,r,i){const n=xb(e.renderCoordsHelper,t.center,t.eye),a=Object(dr["f"])(n,r.min,r.max),s=n-a;if(!Db(s))return 0;if(i){const r=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,n=e.renderCoordsHelper.getAltitude(t.eye)-r,s=Math.cos(a);Math.abs(s)>1e-4?i.eyeCenterDistance=n/s:i.eyeCenterDistance=t.distance}return s}function Pb(e,t,r,i){const n=Ib(e,t,Wb),a=Object(dr["f"])(n.tiltAtCenter,r.min,r.max);if(!Db(n.tiltAtCenter-a))return 0;let s,o;return n.centerIsOnSurface?(s=Lb(n),o=Fb(n,s)):(s=n.constraints.clampTilt(n.eyeCenterDistance,n.tiltAtCenter),i&&s<Math.PI/2&&(i.requiresTwoSteps=!0,s=Math.PI/2-1e-5),o=kb(n,s)),i&&(i.eyeCenterDistance=Nb(n,s)),o}function Ib(e,t,r){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,n=i+Object(Yd["e"])(e.spatialReference).radius,a=e.renderCoordsHelper.intersectManifold(t.ray,i,Gb);return r.eyeCenterDistance=t.distance,r.centerIsOnSurface=!1,Object(z["k"])(a)?(r.eyeCenterDistance=Object($o["o"])(t.eye,a),r.tiltAtCenter=xb(e.renderCoordsHelper,a,t.eye),r.centerIsOnSurface=!0):e.state.isLocal?r.tiltAtCenter=xb(e.renderCoordsHelper,t.center,t.eye):(Object(If["h"])(Object(If["j"])(n),t.ray,Gb),r.eyeCenterDistance=Object($o["o"])(t.eye,Gb),r.tiltAtCenter=Object(dr["b"])(-Object($o["j"])(t.viewForward,Object($o["t"])(Gb,Gb)))),r.radius=n,r.eyeRadius=Object($o["r"])(t.eye),r.constraints=e.state.constraints,r}function Db(e){return Math.abs(e)>1e-9}function Lb(e){const{constraints:t,eyeCenterDistance:r,tiltAtCenter:i}=e;let n=i,a=t.clampTilt(r,i);const s=Nb(e,a);if(t.clampTilt(s,i)===a)return a;let o=0;for(;o<10&&Db(a-n);){const r=(n+a)/2,i=Nb(e,r);Db(t.clampTilt(i,r)-r)?n=r:a=r,o++}return a}function Nb(e,t){if(!e.centerIsOnSurface)return e.eyeCenterDistance;const r=Math.PI-Object(dr["f"])(t,0,Math.PI),i=Object(dr["d"])(e.radius/e.eyeRadius*Math.sin(r)),n=Math.PI-r-i,a=Math.sin(n)/Math.sin(r);if(e.eyeRadius<e.radius&&a>1){const t=Math.PI-i,n=Math.PI-r-t;return Math.sin(n)/Math.sin(r)*e.eyeRadius}return a*e.eyeRadius}function Fb(e,t){const r=Object(dr["d"])(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=Object(dr["d"])(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function kb(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function Ub(e,t,r){if(t.interactionType===Rf.NONE)return;const{interactionStartCamera:i,interactionFactor:n}=t,{min:a,max:s}=r,o=Ab(e,i,Ff,t),c=0===o?0:xb(e.renderCoordsHelper,i.center,i.eye);r.min=a,r.max=s,t.interactionType===Rf.TUMBLE?(Lf(t.selection,Mf.ALTITUDE)&&zb(e,i,r),Nf(o,c,!0,n,Hb,r)):Nf(o,c,!1,n,Hb,r)}function zb(e,t,r){if(e.state.isLocal)return;const i=e.state.constraints;if(!i.altitude)return;const n=Object($o["v"])(t.center),a=Math.sqrt(n),s=t.distance,o=Object(Yd["e"])(e.spatialReference).radius,c=i.altitude.min+o,l=i.altitude.max+o,u=(c*c-s*s-n)/(-2*a*s),d=(l*l-s*s-n)/(-2*a*s);r.min=Math.max(r.min,Math.min(Math.PI-Object(dr["b"])(d),r.max)),r.max=Math.min(r.max,Math.PI-Object(dr["b"])(u))}const Bb=Object(ju["f"])(),Vb=Object(Kd["d"])(),Gb=Object(ju["f"])(),Hb=Object(dr["h"])(5),qb={min:0,max:0},Wb={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,eyeCenterDistance:0,tiltAtCenter:0},$b={eyeCenterDistance:0,requiresTwoSteps:!1};function Zb(e){return e}const Xb=e=>e*e,Yb=e=>1-Xb(1-e),Jb=e=>e<.5?Xb(2*e)/2:(Yb(2*(e-.5))+1)/2,Qb=e=>e*e*e,Kb=e=>1-Qb(1-e),em=e=>e<.5?Qb(2*e)/2:(Kb(2*(e-.5))+1)/2,tm=e=>e*e*e*e,rm=e=>1-tm(1-e),im=e=>e<.5?tm(2*e)/2:(rm(2*(e-.5))+1)/2,nm=e=>e*e*e*e*e,am=e=>1-nm(1-e),sm=e=>e<.5?nm(2*e)/2:(am(2*(e-.5))+1)/2,om=e=>1-Math.cos(e*Math.PI/2),cm=e=>1-om(1-e),lm=e=>e<.5?om(2*e)/2:(cm(2*(e-.5))+1)/2,um=e=>2**(10*(e-1)),dm=e=>1-um(1-e),hm=e=>e<.5?um(2*e)/2:(dm(2*(e-.5))+1)/2,pm=e=>-(Math.sqrt(1-e*e)-1),fm=e=>1-pm(1-e),bm=e=>e<.5?pm(2*e)/2:(fm(2*(e-.5))+1)/2;function mm(e){const t=2*(e-Math.sqrt((e-1)*e)),r=t/2/e;return i=>i<r?e*i*i:t*i-t+1}function gm(e,t){return(r,i)=>r<t?t*e(r/t,i):1-e((1-r)/(1-t),i)*(1-t)}const ym=gm(mm(1),1),Om=gm(mm(1),0),vm=gm(mm(1),.5),_m=gm(mm(2),1),jm=gm(mm(2),0),wm=gm(mm(2),.5),xm=gm(mm(3),1),Tm=gm(mm(3),0),Sm=gm(mm(3),.5),Em=gm(mm(4),1),Am=gm(mm(4),0),Cm=gm(mm(4),.5),Rm={linear:Zb,"in-quad":Xb,"out-quad":Yb,"in-out-quad":Jb,"in-coast-quad":ym,"out-coast-quad":Om,"in-out-coast-quad":vm,"in-cubic":Qb,"out-cubic":Kb,"in-out-cubic":em,"in-coast-cubic":_m,"out-coast-cubic":jm,"in-out-coast-cubic":wm,"in-quart":tm,"out-quart":rm,"in-out-quart":im,"in-coast-quart":xm,"out-coast-quart":Tm,"in-out-coast-quart":Sm,"in-quint":nm,"out-quint":am,"in-out-quint":sm,"in-coast-quint":Em,"out-coast-quint":Am,"in-out-coast-quint":Cm,"in-sine":om,"out-sine":cm,"in-out-sine":lm,"in-expo":um,"out-expo":dm,"in-out-expo":hm,"in-circ":pm,"out-circ":fm,"in-out-circ":bm};function Mm(e,t,r=Nm,i=t){let n=!1;i!==t&&i.copyFrom(t),i.computeUp(e.state.viewingMode);for(let o=0;o<Fm;o++){let t=0;for(const a of Lm)if(Lf(r.selection,a.type)){const s=Math.abs(a.error(e,i,r));a.apply(e,i,r)&&(n=!0,t+=s)}if(0===t)break}const a=Lf(r.selection,Mf.COLLISION),s=Pm(r.interactionType,e);return a&&vb(e,i,s)&&(n=!0),n&&i.computeUp(e.state.viewingMode),n}function Pm(e,t){switch(e){case Rf.PAN:return _b.EYE_AND_CENTER;case Rf.ASCEND:return t.state.isGlobal?_b.EYE_AND_CENTER_SCALE:_b.EYE_AND_CENTER;default:return _b.EYE}}function Im(e,t){const r="number"==typeof e?e:Object(io["b"])(e,t),i=Math.min(1,r/150);return em(i)}function Dm(e,t,r){return Ab(e,t,r)*t.distance}const Lm=[{type:Mf.TILT,error:Dm,apply:Eb},{type:Mf.ALTITUDE,error:Bf,apply:zf},{type:Mf.DISTANCE,error:Jf,apply:Qf}],Nm={selection:Mf.ALL,interactionType:Rf.NONE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:Pf.TUMBLE},Fm=5,km=Object(ju["f"])(),Um=Object(ju["f"])(),zm=Object(ju["f"])(),Bm=Object(ju["f"])(),Vm=Object(ju["f"])(),Gm=Object(ju["f"])(),Hm={upward:Object(ju["h"])(0,0,1),forward:Object(ju["h"])(0,1,0),sideway:Object(ju["h"])(1,0,0)},qm=Object(wh["b"])();class Wm{constructor(e=As["a"].Global){this.viewingMode=e,this.center=Object(ju["f"])(),this.pitch=0,this.yaw=0,this.distance=0,this.lookAtDirection=Object(ju["d"])(Hm.forward)}pixelsPerPanAtZoom(e){return this.size/2/(this._zoomToPanScale*e)}zoomAtPixelsPerPan(e){return this.size/2/(this._zoomToPanScale*e)}pixelsPerRotateAtZoom(){const e=Math.max(Math.cos(Math.abs(this.pitch)),.5);return this.size/2/e}compareTo(e,t){if(t||(t={pan:0,rotate:0,sourceZoom:0,targetZoom:0}),this.viewingMode===As["a"].Global){const r=(Object($o["r"])(this.center)+Object($o["r"])(e.center))/2;t.pan=Object(Yu["b"])(this.center,e.center)*r}else t.pan=Object($o["o"])(this.center,e.center);let r=Math.abs(e.yaw-this.yaw);r>=Math.PI&&(r=2*Math.PI-r);const i=Math.abs(e.pitch-this.pitch);return t.rotate=Math.max(r,i),t.sourceZoom=this.distance,t.targetZoom=e.distance,t}interpolate(e,t,r){this.viewingMode===As["a"].Global?Object(Yu["l"])(e.center,t.center,r.pan,this.center):Object($o["k"])(this.center,e.center,t.center,r.pan),this.distance=Object(dr["l"])(e.distance,t.distance,r.zoom),this.pitch=Object(dr["l"])(e.pitch,t.pitch,r.rotate);let i=e.yaw;const n=t.yaw;Math.abs(n-i)>=Math.PI&&(i+=2*(i<n?1:-1)*Math.PI),this.yaw=Object(dr["l"])(i,n,r.rotate)}copyFrom(e){Object($o["m"])(this.center,e.center),this.pitch=e.pitch,this.yaw=e.yaw,this.distance=e.distance,Object($o["m"])(this.lookAtDirection,e.lookAtDirection),this.size=e.size,this.copyFromCommon(e),this.viewingMode=e.viewingMode}copyFromRenderCamera(e){const t=this._lookAtOrientation(e.center,qm);Object($o["m"])(this.center,e.center),Object($o["l"])(Bm,e.center,e.eye),Object($o["z"])(Bm,Bm,t),Object($o["z"])(Vm,e.up,t),this.distance=Object($o["r"])(Bm),Bm[0]/=this.distance,Bm[1]/=this.distance,Bm[2]/=this.distance,this.pitch=this._eyeUpToPitch(Bm),this.yaw=this._eyeUpToYaw(Bm,Vm),this.size=Math.sqrt(e.width*e.width+e.height*e.height),this.copyFromCommon(e)}copyFromCommon(e){this.fov=e.fov,this._zoomToPanScale=Math.atan(.5*this.fov)}copyToRenderCamera(e){const t=this._lookAtOrientation(this.center,qm);Object(To["p"])(t,t),this._axisAngleVec3(Hm.sideway,this.pitch-Math.PI/2,Hm.forward,Bm),this._axisAngleVec3(Hm.upward,this.yaw,Bm),this._axisAngleVec3(Hm.sideway,this.pitch-Math.PI/2,Hm.upward,Vm),this._axisAngleVec3(Hm.upward,this.yaw,Vm),Object($o["g"])(Bm,Bm,this.distance),Object($o["z"])(Bm,Bm,t),Object($o["z"])(Vm,Vm,t),e.center=this.center,e.eye=Object($o["l"])(Bm,this.center,Bm),e.up=Vm}_axisAngleVec3(e,t,r,i=r){const n=Math.cos(t),a=Math.sin(t);return Object($o["g"])(km,r,n),Object($o["i"])(Um,e,r),Object($o["g"])(Um,Um,a),Object($o["g"])(zm,e,(1-n)*Object($o["j"])(e,r)),Object($o["h"])(i,Object($o["h"])(i,km,Um),zm)}_lookAtOrientation(e,t=Object(wh["b"])()){return this._upAtLookAt(e,zm),Object($o["i"])(km,this.lookAtDirection,zm),Object($o["t"])(km,km),0===km[0]&&0===km[1]&&0===km[2]&&Object($o["m"])(km,Hm.sideway),Object($o["i"])(Um,zm,km),Object($o["t"])(Um,Um),t[0]=km[0],t[1]=Um[0],t[2]=zm[0],t[3]=km[1],t[4]=Um[1],t[5]=zm[1],t[6]=km[2],t[7]=Um[2],t[8]=zm[2],t}_upAtLookAt(e,t){return this.viewingMode===As["a"].Local?Object($o["m"])(t,Hm.upward):Object($o["t"])(t,e)}_eyeUpToPitch(e){return Math.PI-Object(Yu["b"])(Hm.upward,e)}_eyeUpToYaw(e,t){const r=Gm;return Math.abs(t[2])<.5?(Object($o["m"])(r,t),e[2]>0&&Object($o["g"])(r,r,-1)):Object($o["m"])(r,e),Object($o["i"])(Um,r,Hm.upward),Object($o["t"])(Um,Um),Object(Yu["b"])(Hm.sideway,Um,Hm.upward)}}var $m=r("171c");const Zm={desiredScreenFlow:2,minDuration:Object(Ic["a"])(500),maxDuration:Object(Ic["a"])(8e3)};class Xm{constructor(e){this.createCamera=e,this.compared={sourceZoom:0,targetZoom:0,pan:0,rotate:0},this.settings={desiredScreenFlow:Zm.desiredScreenFlow},this.source=e(),this.target=e()}clone(){const e=new Xm(this.createCamera);return e.copyFrom(this),e}copyFrom(e){this.update(e.source,e.target,e.settings)}update(e,t,r){this.source!==e&&this.source.copyFrom(e),this.target!==t&&this.target.copyFrom(t),this.compared=this.source.compareTo(this.target,this.compared),this.settings.desiredScreenFlow=null!=r.desiredScreenFlow?r.desiredScreenFlow:Zm.desiredScreenFlow,this.desiredPixelFlow=this.settings.desiredScreenFlow*this.target.size,this.halfWindowSize=this.target.size/2}halfWindowPanAtZoom(e){const t=this.target.pixelsPerPanAtZoom(e);return this.halfWindowSize/t}get hasZoom(){return Math.abs(this.compared.sourceZoom-this.compared.targetZoom)>1e-5}get hasPan(){return this.compared.pan>1e-9}get hasRotate(){return this.compared.rotate>1e-9}}class Ym{constructor(){this.segments=[]}get time(){return this.segments.reduce((e,t)=>Object(Ic["b"])(e+t.time),Object(Ic["b"])(0))}interpolateComponentsAt(e,t){e=Math.min(Math.max(e,0),1),e*=this.time;let r=0,i=0;const n=this.definition;for(let a=0;a<this.segments.length;a++){const s=this.segments[a],o=s.definition;if(e<=s.time||a===this.segments.length-1){t=this.segmentInterpolateComponentsAt(s,e/s.time,t),n.hasPan?t.pan=(r+o.compared.pan*t.pan)/n.compared.pan:t.pan=1,n.hasRotate?t.rotate=(i+o.compared.rotate*t.rotate)/n.compared.rotate:t.rotate=1;const a=t.zoom*(o.compared.targetZoom-o.compared.sourceZoom)+o.compared.sourceZoom,c=this.segments[0].definition.compared.sourceZoom,l=this.segments[this.segments.length-1].definition.compared.targetZoom;return n.hasZoom?t.zoom=(a-c)/(l-c):t.zoom=1,t}e-=s.time,r+=o.compared.pan,i+=o.compared.rotate}}segmentInterpolateComponentsAt(e,t,r){return e.interpolateComponentsAt(t,r)}}class Jm{constructor(e){e&&this.update(e)}get time(){return this._time}update(e){e&&(this.definition?this.definition.copyFrom(e):this.definition=e.clone()),this._updatePrecomputedVariables(),this._updatePixelFlow()}_updatePrecomputedVariables(){const e=this.definition,t=e.compared,r=t.sourceZoom,i=t.targetZoom;this._zoomSign=r>i?1:-1,this._panPixelsAtSource=t.pan*e.source.pixelsPerPanAtZoom(r);const n=(e.source.pixelsPerRotateAtZoom(r)+e.target.pixelsPerRotateAtZoom(i))/2;this._rotatePixels=t.rotate*n}_updatePixelFlow(){const e=this.definition.compared.sourceZoom,t=this.definition.compared.targetZoom,{hasZoom:r,hasPan:i,hasRotate:n}=this.definition;let a=0,s=0;r&&(i&&(a=(t/e-1)/(-1/(this._zoomSign*this.definition.halfWindowSize)*Math.LN2*this._panPixelsAtSource)),n&&(s=this._zoomSign*(Math.log(e/t)/Math.LN2)*this.definition.halfWindowSize/this._rotatePixels)),this._zoomPixelFlow=0,this._panPixelFlow=0,this._rotatePixelFlow=0;const o=this.definition.desiredPixelFlow;if(r&&i&&n){const e=a+s+a*s;this._zoomPixelFlow=a*s/e*o,this._panPixelFlow=s/e*o,this._rotatePixelFlow=a/e*o}else if(r&&i){const e=1+a;this._zoomPixelFlow=a/e*o,this._panPixelFlow=1/e*o}else if(r&&n){const e=1+s;this._zoomPixelFlow=s/e*o,this._rotatePixelFlow=1/e*o}else if(i&&n){const e=this._panPixelsAtSource/this._rotatePixels,t=1+e;this._panPixelFlow=e/t*o,this._rotatePixelFlow=1/t*o}else i?this._panPixelFlow=o:r?this._zoomPixelFlow=o:n&&(this._rotatePixelFlow=o);this._time=n?this.rotateTime:r?this.zoomTime:i?this.panTime:Object(Ic["b"])(0)}get rotateTime(){return this.definition.hasRotate?Object(Ic["b"])(this._rotatePixels/this._rotatePixelFlow):Object(Ic["b"])(0)}get zoomTime(){return this.definition.hasZoom?Object(Ic["b"])(this._zoomSign*(Math.log(this.definition.compared.sourceZoom/this.definition.compared.targetZoom)/Math.LN2)*this.definition.halfWindowSize/this._zoomPixelFlow):Object(Ic["b"])(0)}get panTime(){if(this.definition.hasPan){if(this.definition.hasZoom){const e=-1/(this._zoomSign*this.definition.halfWindowSize)*Math.LN2,t=e*this._panPixelsAtSource;return Object(Ic["b"])(Math.log(t*(this._zoomPixelFlow/this._panPixelFlow)+1)/(e*this._zoomPixelFlow))}return Object(Ic["b"])(this._panPixelsAtSource/this._panPixelFlow)}return Object(Ic["b"])(0)}_interpolateComponentsZoom(e){if(0===e||1===e)return e;if(this.definition.hasZoom){const t=this.definition.compared.sourceZoom,r=this.definition.compared.targetZoom;return(t*(t/r)**-e-t)/(r-t)}return e}_interpolateComponentsPan(e){if(0===e||1===e)return e;if(this.definition.hasPan&&this.definition.hasZoom){const t=-1/(this._zoomSign*this.definition.halfWindowSize)*this._zoomPixelFlow;return 1/this._panPixelsAtSource*(this._panPixelFlow*(2**(t*e*this._time)-1))/(t*Math.LN2)}return e}_interpolateComponentsRotate(e){return e}interpolateComponentsAt(e,t){e=Math.min(Math.max(e,0),1);const r=this._interpolateComponentsZoom(e),i=this._interpolateComponentsPan(e),n=this._interpolateComponentsRotate(e);return t?(t.zoom=r,t.pan=i,t.rotate=n):t={zoom:r,pan:i,rotate:n},t}}function Qm(e,t,r){const i=t-e.compared.sourceZoom,n=e.halfWindowPanAtZoom(i);return-e.halfWindowSize*(r.ascensionFactor*Math.LN2*e.compared.pan+n)*Math.log(e.compared.sourceZoom/t)/(e.desiredPixelFlow*Math.LN2*n)}function Km(e,t,r){const i=1/t,n=Math.log(e.compared.sourceZoom*i),a=1/e.desiredPixelFlow,s=1/Math.LN2,o=t-e.compared.sourceZoom,c=1/o,l=(r.ascensionFactor*Math.LN2*e.compared.pan+e.halfWindowPanAtZoom(o))/e.halfWindowPanAtZoom(1);return e.halfWindowSize*i*a*s*c*l-e.halfWindowSize*n*a*s*c+e.halfWindowSize*n*a*s*l/(o*o)}function eg(e,t,r){const i=t-e.compared.sourceZoom,n=1/i,a=1/t,s=Math.log(e.compared.sourceZoom*a),o=(r.ascensionFactor*Math.LN2*e.compared.pan+e.halfWindowPanAtZoom(i))/e.halfWindowPanAtZoom(1);return e.halfWindowSize*n*(-2*n*a*o+2*n*s+2*a-2*s*o/(i*i)-o/(t*t))/(e.desiredPixelFlow*Math.LN2)}function tg(e,t){return-e.halfWindowSize*Math.log(e.compared.sourceZoom/t)/(e.desiredPixelFlow*Math.LN2)}function rg(e,t){return e.halfWindowSize/(t*e.desiredPixelFlow*Math.LN2)}function ig(e,t){return-e.halfWindowSize/(t*t*e.desiredPixelFlow*Math.LN2)}function ng(e,t,r){return-e.compared.pan*e.halfWindowSize*(r.ascensionFactor+r.descensionFactor-1)/(e.desiredPixelFlow*e.halfWindowPanAtZoom(t))}function ag(e,t,r){return e.compared.pan*e.halfWindowSize*(r.ascensionFactor+r.descensionFactor-1)/(e.desiredPixelFlow*e.halfWindowPanAtZoom(t*t))}function sg(e,t,r){return-2*e.compared.pan*e.halfWindowSize*(r.ascensionFactor+r.descensionFactor-1)/(e.desiredPixelFlow*e.halfWindowPanAtZoom(t*t*t))}function og(e,t,r){return e.halfWindowSize*(-e.halfWindowPanAtZoom(t)-r.descensionFactor*Math.LN2*e.compared.pan+e.halfWindowPanAtZoom(e.compared.targetZoom))*Math.log(t/e.compared.targetZoom)/(e.desiredPixelFlow*Math.LN2*e.halfWindowPanAtZoom(-t+e.compared.targetZoom))}function cg(e,t,r){const i=Math.log(t/e.compared.targetZoom),n=1/e.desiredPixelFlow,a=1/Math.LN2,s=-t+e.compared.targetZoom,o=1/s,c=(-e.halfWindowPanAtZoom(t)-r.descensionFactor*Math.LN2*e.compared.pan+e.halfWindowPanAtZoom(e.compared.targetZoom))/e.halfWindowPanAtZoom(1);return-e.halfWindowSize*i*n*a*o+e.halfWindowSize*i*n*a*c/(s*s)+e.halfWindowSize*n*a*o*c/t}function lg(e,t,r){const i=t-e.compared.targetZoom,n=1/i,a=1/t,s=Math.log(t/e.compared.targetZoom),o=(e.halfWindowPanAtZoom(t)+r.descensionFactor*Math.LN2*e.compared.pan-e.halfWindowPanAtZoom(e.compared.targetZoom))/e.halfWindowPanAtZoom(1);return e.halfWindowSize*n*(-2*n*a*o-2*n*s+2*a+2*s*o/(i*i)-o/(t*t))/(e.desiredPixelFlow*Math.LN2)}function ug(e,t){return e.halfWindowSize*Math.log(t/e.compared.targetZoom)/(e.desiredPixelFlow*Math.LN2)}function dg(e,t){return e.halfWindowSize/(t*e.desiredPixelFlow*Math.LN2)}function hg(e,t){return-e.halfWindowSize/(t*t*e.desiredPixelFlow*Math.LN2)}function pg(e){const t=Math.LN2*e.compared.pan,r=e.compared.sourceZoom-e.compared.targetZoom,i=e.halfWindowPanAtZoom(r),n=e.halfWindowSize*Math.log(e.compared.sourceZoom/e.compared.targetZoom)/(e.desiredPixelFlow*Math.LN2*i);return e.compared.sourceZoom<=e.compared.targetZoom?n*(t-i):n*(t+i)}function fg(e,t){let r=bg(e,t);const i={ascensionFactor:null!=t.ascensionFactor?t.ascensionFactor:.5,descensionFactor:null!=t.descensionFactor?t.descensionFactor:.5},n=0===i.ascensionFactor,a=0===i.descensionFactor,s=n?tg:Qm,o=n?rg:Km,c=n?ig:eg,l=a?ug:og,u=a?dg:cg,d=a?hg:lg,h=t=>s(e,t,i)+ng(e,t,i)+l(e,t,i),p=t=>o(e,t,i)+ag(e,t,i)+u(e,t,i),f=t=>c(e,t,i)+sg(e,t,i)+d(e,t,i);let b=h(r);const m=pg(e);let g;const y=t.maximumIterations||20,O=null!=t.maximumDistance?t.maximumDistance:1/0;for(g=0;g<y;g++){const t=1e-6,i=(p(r)+t)/f(r);if(isNaN(i)||r>=O&&i<0){if(!isFinite(O))return null;r=O,b=h(r);break}if(r-=i,r<e.compared.sourceZoom||r<e.compared.targetZoom)return null;const n=h(r);if(Math.abs(n-b)/b<=.005)break;b=n}return b>.7*m||r<e.compared.sourceZoom||r<e.compared.targetZoom?null:r}function bg(e,t){const r=Math.max(e.compared.sourceZoom,e.compared.targetZoom),i=e.source.zoomAtPixelsPerPan(e.desiredPixelFlow/e.compared.pan)/2;return i<r?null!=t.maximumDistance?r+(t.maximumDistance-r)/2:1.5*r:t.maximumDistance?Math.min(t.maximumDistance,i):i}class mg extends Ym{constructor(e,t){super(),this._preallocSegments=[new Jm,new Jm,new Jm],this.update(e,t)}update(e,t){if(!e)return;this.definition?this.definition.copyFrom(e):this.definition=e.clone();let r=null;t&&t.apex&&(r=fg(e,t.apex)),this.segments.length=0,this._ascensionSegment=null,this._descensionSegment=null,null==r?this._updateWithoutApex():this._updateWithApex(r,t.apex)}segmentInterpolateComponentsAt(e,t,r){return r=e.interpolateComponentsAt(t,r),e===this._ascensionSegment?r.zoom=Yb(r.zoom):e===this._descensionSegment&&(r.zoom=Xb(r.zoom)),r}_updateWithApex(e,t){const[r,i,n]=this._preallocSegments,a=null!=t.ascensionFactor?t.ascensionFactor:.5,s=Math.min(1-a,null!=t.ascensionFactor?t.descensionFactor:.5),o=1-a-s;r.definition?r.definition.copyFrom(this.definition):r.definition=this.definition.clone(),r.definition.compared.targetZoom=e,r.definition.compared.pan=this.definition.compared.pan*a,r.definition.compared.rotate=this.definition.compared.rotate*a,r.update(),this._ascensionSegment=r,this.segments.push(r),o>0&&(i.definition?i.definition.copyFrom(this.definition):i.definition=this.definition.clone(),i.definition.copyFrom(this.definition),i.definition.compared.sourceZoom=e,i.definition.compared.targetZoom=e,i.definition.compared.pan=this.definition.compared.pan*o,i.definition.compared.rotate=this.definition.compared.rotate*o,i.update(),this.segments.push(i)),n.definition?n.definition.copyFrom(this.definition):n.definition=this.definition.clone(),n.definition.compared.sourceZoom=e,n.definition.compared.pan=this.definition.compared.pan*s,n.definition.compared.rotate=this.definition.compared.rotate*s,n.update(),this._descensionSegment=n,this.segments.push(n)}_updateWithoutApex(){const[e]=this._preallocSegments;e.update(this.definition),this.segments.push(e)}}const gg={zoom:0,pan:0,rotate:0};class yg{constructor(e){this.createCamera=e,this._time=Object(Ic["a"])(0),this.definition=new Xm(e),this.path=new mg}get time(){return this._time}update(e,t,r){this.definition.update(e,t,r),this.path.update(this.definition,r),this._time=this._applyTimeSettings(Object(Ic["c"])(this.path.time),r),this._easing=r.easing?r.easing:this._time>=1e3?vm:dm}cameraAt(e,t){t=t||this.createCamera(),e=Math.min(Math.max(0,e),1),e=this._normalizedEasing(e);const r=this.path.interpolateComponentsAt(e,gg);return t.interpolate(this.definition.source,this.definition.target,r),t}_normalizedEasing(e){const t=this._easing(0,this._time),r=this._easing(1,this._time);return(this._easing(e,this._time)-t)/(r-t)}_applyTimeSettings(e,t){const r=null!=t.speedFactor?t.speedFactor:1;null!=t.duration?e=t.duration:null!=t.speedFactor&&(e=Object(Ic["a"])(e/r));const i=null!=t.minDuration?t.minDuration:Zm.minDuration/r,n=null!=t.maxDuration?t.maxDuration:Zm.maxDuration/r;return Object(Ic["a"])(Math.min(Math.max(i,e),n))}}const Og=Object(ju["f"])();class vg{constructor(e){this.currentTime=Object(Ic["a"])(0),this._animation=new yg(()=>new Wm(e)),this._current=new Wm(e)}get finished(){return this.currentTime>=this._animation.time}get time(){return this._animation.time}update(e,t,r){const i=this._animation.definition.source,n=this._animation.definition.target,a=Object($o["l"])(Og,t.center,e.center),s=Object($o["r"])(a);s>=1e-5?(a[0]/=s,a[1]/=s,a[2]/=s):(a[0]=0,a[1]=1,a[0]=0),Object($o["m"])(i.lookAtDirection,a),Object($o["m"])(n.lookAtDirection,a),i.copyFromRenderCamera(e),n.copyFromRenderCamera(t),this._current.copyFrom(i),this._animation.update(i,n,r),this.currentTime=Object(Ic["a"])(0),e.almostEquals(t)&&(this.currentTime=this._animation.time)}cameraAt(e,t){return this._animation.cameraAt(e,this._current),t=t||new $m["b"],this._current.copyToRenderCamera(t),t}step(e,t){return this.finished||(this.currentTime=Object(Ic["a"])(this.currentTime+Object(Ic["c"])(e)),this.currentTime>=this.time&&(this.currentTime=this.time)),this.cameraAt(this.currentTime/this.time,t)}}var _g;!function(e){e.Ready="ready",e.Rejected="rejected",e.Running="running",e.Stopped="stopped",e.Finished="finished"}(_g||(_g={}));let jg=class extends F["a"]{constructor(){super(...arguments),this.state=_g.Ready}get active(){return this.state===_g.Running}get isInteractive(){return!1}get canStop(){return!1}stopController(){return!!this.canStop&&(this.state=_g.Stopped,!0)}finishController(){this.state=_g.Finished}get steppingFinished(){return!1}};Object(l["a"])([Object(j["b"])({readOnly:!0})],jg.prototype,"active",null),Object(l["a"])([Object(j["b"])()],jg.prototype,"state",void 0),jg=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.CameraController")],jg);let wg=class extends jg{get canStop(){return!0}set asyncResult(e){this._asyncResult&&(this._asyncResult.reject(Object(_["e"])()),this._asyncResult=null),this.state===_g.Finished||this.state===_g.Stopped?this.state===_g.Finished?e.resolve():e.reject(Object(_["e"])()):this._asyncResult=e}get asyncResult(){return this._asyncResult}onControllerStart(){this.state=_g.Running,Object(z["k"])(this.viewAnimation)&&this.viewAnimation.when(()=>this.updateStateFromViewAnimation(),()=>this.updateStateFromViewAnimation())}updateStateFromViewAnimation(){!Object(z["k"])(this.viewAnimation)||this.state!==_g.Ready&&this.state!==_g.Running||(this.viewAnimation.state===Bs.State.FINISHED?this.finish():this.viewAnimation.state===Bs.State.STOPPED&&(this.state=_g.Stopped))}onControllerEnd(){Object(z["k"])(this.viewAnimation)&&!this.viewAnimation.done&&(this.state===_g.Finished?this.viewAnimation.finish():this.state===_g.Stopped&&this.viewAnimation.stop()),this._asyncResult&&(this.state===_g.Finished?this._asyncResult.resolve():this._asyncResult.reject(Object(_["e"])()))}finish(){this.finishController()}};wg=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.AnimationController")],wg);let xg=class extends wg{constructor(e){super(e),this.view=null,this.mode="interaction",this.hasTarget=!1}get intersectionHelper(){return this.view.sceneIntersectionHelper}initialize(){this.animation=new vg(this.view.state.viewingMode),this.viewAnimation="interaction"===this.mode?null:new Bs}get isInteractive(){return"interaction"===this.mode}begin(e,t){this.hasTarget=!0;const r=this.animationSettings(t);Tg.copyFrom(this.view.state.camera);const i=Object(cb["b"])(this.view.state.viewingMode);this.intersectionHelper.intersectRay(Tg.ray,i,Sg)&&(Tg.center=Sg),this.animation.update(Tg,e,r),this.animation.finished&&this.finish()}finish(){this.animation.currentTime=this.animation.time,super.finish()}get steppingFinished(){return this.hasTarget&&this.animation.finished}stepController(e,t){this.hasTarget&&this.animation.step(e,t)}onControllerEnd(e){this.hasTarget&&(this.animation.cameraAt(this.animation.currentTime/this.animation.time,e),this.animation.currentTime=this.animation.time),super.onControllerEnd(e)}animationSettings(e={}){return{apex:{maximumDistance:this.view.state.constraints.clampAltitude(1/0)/6,ascensionFactor:void 0,descensionFactor:void 0},...e,easing:"string"==typeof e.easing?Rm[e.easing]:e.easing}}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],xg.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],xg.prototype,"mode",void 0),xg=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.PointToPointAnimationController")],xg);const Tg=new $m["b"],Sg=Object(ju["f"])();var Eg=r("3cac"),Ag=r("7289"),Cg=r("a1b1"),Rg=r("7361"),Mg=r("9990");function Pg(e,t,r,i){const n=Object(Mg["d"])(t,r,Ig);return Object(If["e"])(e,n,i)}const Ig=Object(Df["c"])(),Dg=30,Lg=[1,3e8],Ng=70;function Fg(e,t,r){return r[0]=t[0]/(e.fullWidth/e.pixelRatio),r[1]=t[1]/(e.fullHeight/e.pixelRatio),r}function kg(e){for(;e>Math.PI;)e-=2*Math.PI;for(;e<-Math.PI;)e+=2*Math.PI;return e}function Ug(e,t,r){const i=Object(Qd["e"])(Rg["a"].get(),r[3],Object(Eg["a"])(r));Object($o["l"])(Dy,e.eye,t),Object($o["s"])(Dy,Dy,i),e.eye=Object($o["h"])(Dy,Dy,t),Object($o["l"])(Dy,e.center,t),Object($o["s"])(Dy,Dy,i),e.center=Object($o["h"])(Dy,Dy,t),e.up=Object($o["s"])(Dy,e.up,i)}function zg(e,t,r,i){return Object(Ag["n"])(e,Object(Mg["c"])(t,r,Uy),i)}function Bg(e,t,r,i){return Object(Ag["n"])(e,Object(Mg["d"])(t,r,Uy),i)}function Vg(e,t,r,i){const n=Rg["d"].get();let a=1-r;Object($o["l"])(n,t,e.eye);const s=Object($o["r"])(n);let o=s*(1-a);a>=0&&o<i&&(o=i,a=-(o-s)/s),Math.abs(s-o)<1e-6||(Object($o["g"])(n,n,a),e.eye=Object($o["h"])(Dy,e.eye,n),e.center=Object($o["k"])(Dy,e.center,t,a))}function Gg(e,t,r){t.getScreenCenter(Hg),Pg(e,t,Hg,Dy)&&(t.center=Dy);const i=t.distance,n=i*r;if(Math.abs(i-n)<1e-6)return;const a=Object($o["g"])(Rg["d"].get(),t.viewForward,n);t.eye=Object($o["l"])(Dy,t.center,a)}const Hg=Object(ce["f"])();function qg(e,t){Object($o["y"])(t,0,0,0);for(const r of e)Object($o["h"])(t,t,r);Object($o["g"])(t,t,1/e.length)}function Wg(e,t,r,i){return Math.sin(e/Object($o["r"])(t))*(r+i.radius)}function $g(e,t,r,i){return Wg(Math.PI/2,t,r,i)+(e-Math.PI/2)}var Zg;!function(e){e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal"}(Zg||(Zg={}));const Xg={Elevation:3e4,Angle:Object(dr["h"])(6)},Yg={Pole:.95,Angle:Object(dr["h"])(18),Tilt:45},Jg=Object(dr["h"])(80);function Qg(e,t,r,i,n){const a=Object(ju["f"])(),s=Object(If["c"])();let o=!0,c=!0;return e.intersectScreen(r,a)?s[3]=Object($o["r"])(a):(c=!1,t.aboveGround?s[3]=Math.max(Object($o["r"])(t.center),.9*n.radius):s[3]=Object($o["r"])(t.eye)-t.relativeElevation,i?ry(s,t,r,a):o=Pg(s,t,r,a)),{sphere:s,scenePickPoint:o?a:null,hasGeometryIntersection:c}}function Kg(e,t,r,i){return Object($o["r"])(e.eye)-i.radius>Xg.Elevation?Zg.Horizontal:r?(Object(Mg["d"])(e,t,zy),-Math.sign(e.relativeElevation)*(.5*Math.PI+Object(Cg["a"])(e.eye,zy.direction))<Xg.Angle?Zg.Vertical:Zg.Horizontal):Zg.Vertical}function ey(e,t,r){Object($o["l"])(ty,r,t),e.eye=Object($o["l"])(Dy,e.eye,ty),e.center=Object($o["l"])(Dy,e.center,ty)}const ty=Object(ju["f"])();function ry(e,t,r,i){const n=Object(Mg["d"])(t,r,Uy);return!Object(z["j"])(n)&&(Object(If["h"])(e,n,iy),Object(If["e"])(e,n,i)?!(Object($o["n"])(iy,n.origin)<Object($o["n"])(i,n.origin))||(Object($o["m"])(i,iy),!1):(Object($o["l"])(ny,t.eye,t.center),Object($o["t"])(ny,ny),Object(Ag["f"])(ny,-Object($o["j"])(Object($o["t"])(ny,ny),iy),ay),Object(Ag["n"])(ay,n,i),!1))}const iy=Object(ju["f"])(),ny=Object(ju["f"])(),ay=Object(Ag["d"])();function sy(e,t,r,i,n,a){let s;if(Object($o["i"])(Fy,e,t),Object($o["l"])(Ly,e,t),Object($o["r"])(e)<=n||!i.aboveGround){Object($o["i"])(r,Ly,i.eye);const o=Object($o["j"])(e,t)/(Object($o["r"])(e)*Object($o["r"])(t)),c=Math.cos(Object(dr["f"])(Yu["f"].normalize(Object(dr["h"])(a)),0,Jg));s=-Object(dr["b"])(o)-Math.max(0,Object($o["r"])(t)-n)/(c*n)}else Object($o["l"])(oy,i.eye,i.center),Object($o["i"])(r,Ly,oy),s=-Object($o["r"])(Ly)/n;return Object($o["t"])(r,r),Object($o["g"])(r,r,Object($o["r"])(Fy)),s}const oy=Object(ju["f"])();function cy(e,t,r,i){let n,a;const s=Math.cos(Object(dr["f"])(Yu["f"].normalize(Object(dr["h"])(i)),0,Jg));return n=t>r?-(t-r)/(s*r):t<-r?Math.PI-(t+r)/(s*r):Object(dr["b"])(t/r),a=e>r?-(e-r)/(s*r):e<-r?Math.PI-(e+r)/(s*r):Object(dr["b"])(e/r),(a-n)*r}function ly(e,t,r,i,n,a,s,o,c,l){const u=cy(e[2],t[2],s[3],c),d=l?cy(e[0],t[0],s[3],180):t[0]-e[0],h=Math.sin(o)*d-Math.cos(o)*u,p=Math.cos(o)*d+Math.sin(o)*u;Object($o["t"])(Dy,n);const f=l?h/Math.sqrt(Math.abs(s[3]**2-Object($o["j"])(r,Dy)**2)):h/s[3],b=p/Math.sqrt(Math.abs(s[3]**2-Object($o["j"])(r,i)**2));Object(io["s"])(a,f,b)}function uy(e,t,r,i,n,a,s,o,c,l){Object($o["i"])(Fy,e,t),Object(Tu["c"])(a.up,a.eye,wy,xy,Ty),Object(Tu["c"])([0,0,1],a.eye,vy,_y,jy),Object($o["m"])(r,_y),Object($o["m"])(i,vy),Object($o["t"])(r,r),Object($o["g"])(r,r,Object($o["r"])(Fy)),Object(Tu["o"])(e,Object($o["t"])(xy,xy),Object($o["t"])(Ty,Ty),Object($o["t"])(wy,wy),Sy),Object(Tu["o"])(t,xy,Ty,wy,Ey),ly(Sy,Ey,e,vy,_y,n,s,o,c,l)}function dy(e,t,r,i,n,a,s){Object(Qd["e"])(Ry,n,i),Object(Qd["e"])(My,s,a),Object(Qd["n"])(Py,Ry,My),Object($o["l"])(t,e,r),Object($o["s"])(t,t,Py),Object($o["h"])(t,t,r)}function hy(e,t,r,i,n,a){Object(Qd["e"])(Ry,i,r),Object(Qd["e"])(My,a,n),Object(Qd["n"])(Py,Ry,My),Object($o["l"])(Dy,e.eye,t),Object($o["s"])(Dy,Dy,Py),e.eye=Object($o["h"])(Dy,Dy,t),Object($o["l"])(Dy,e.center,t),Object($o["s"])(Dy,Dy,Py),e.center=Object($o["h"])(Dy,Dy,t),Object($o["l"])(Dy,e.up,t),Object($o["s"])(Dy,Dy,Py),e.up=Object($o["h"])(Dy,Dy,t)}function py(e,t,r,i,n,a,s=Yg.Pole,o=Yg.Angle){const c=Math.abs(i)>Math.PI-o||Math.abs(i)<o,l=Math.abs(e[2])<r*s||Math.abs(t)>r;return!!(c&&l&&a.aboveGround&&n<Yg.Tilt)}function fy(e,t,r,i,n,a){if(a)Object(Eg["c"])(r,i,Cy),Ug(t,e,Cy);else{const a=sy(r,i,ky,t,e[3],n);Ug(t,e,Object(Eg["d"])(ky,a))}}function by(e,t,r,i,n,a,s){const o=s?20:1,c=1e-12;let l,u;Object($o["m"])(Iy,i),Ny.copyFrom(t);for(let d=0;d<o&&Object($o["n"])(r,Iy)>c&&(l=Object($o["n"])(r,Iy),uy(r,Iy,_y,vy,Ay,Ny,e,n,a,s),hy(Ny,e,vy,Ay[1],_y,Ay[0]),dy(Iy,Iy,e,vy,Ay[1],_y,Ay[0]),u=Object($o["n"])(r,Iy),u<l||0===d);d++)t.copyFrom(Ny)}function my(e,t,r,i,n,a,s){py(r,Object($o["j"])(t.up,r),e[3],-Yu["f"].normalize(Object(dr["h"])(n)),a,t,Yg.Pole,Yg.Angle)?by(e,t,r,i,-Yu["f"].normalize(Object(dr["h"])(n)),a,s):fy(e,t,r,i,a,s)}function gy(e,t,r,i,n,a){const{eye:s}=e;Object(Tu["c"])([0,0,1],s,vy,_y,jy);const o=t.translation[0]*r.pan,c="zoom"===n.mode?0:t.translation[1]*r.pan,l=Math.max(Math.sqrt(Math.abs(1-Object($o["j"])(e.center,vy)**2/Object($o["r"])(e.center)**2)),.5),u=(Math.sin(a)*c+Math.cos(a)*o)/l,d=-Math.cos(a)*c+Math.sin(a)*o;switch(Object(Qd["f"])(i.pan.matrix,i.pan.matrix,u,vy),i.pan.enabled=!0,n.mode){case"pan":Object(Qd["f"])(i.pan.matrix,i.pan.matrix,d,_y),i.pan.enabled=!0;break;case"zoom":i.zoom=-t.translation[1]*r.zoom}}function yy(e,t,r,i,n){const{eye:a,viewRight:s}=e,o=Object($o["i"])(Rg["d"].get(),s,a),c=t.translation[0]*r.pan;switch(0!==c&&(Object(Qd["f"])(i.pan.matrix,i.pan.matrix,-c,o),i.pan.enabled=!0),n.mode){case"pan":{const e=t.translation[1]*r.pan;0!==e&&(Object(Qd["f"])(i.pan.matrix,i.pan.matrix,e,s),i.pan.enabled=!0);break}case"zoom":i.zoom=-t.translation[1]*r.zoom}}function Oy(e,t,r,i,n,a,s,o,c){py(e.center,Object($o["j"])(e.up,e.center),Object($o["r"])(e.center),-Yu["f"].normalize(Object(dr["h"])(a)),s,t)?gy(t,r,i,o,c,-Yu["f"].normalize(Object(dr["h"])(n))):yy(t,r,i,o,c)}const vy=Object(ju["f"])(),_y=Object(ju["f"])(),jy=Object(ju["f"])(),wy=Object(ju["f"])(),xy=Object(ju["f"])(),Ty=Object(ju["f"])(),Sy=Object(ju["f"])(),Ey=Object(ju["f"])(),Ay=Object(vo["b"])(),Cy=Object(Eg["b"])(),Ry=Object(Kd["d"])(),My=Object(Kd["d"])(),Py=Object(Kd["d"])(),Iy=Object(ju["f"])(),Dy=Object(ju["f"])(),Ly=Object(ju["f"])(),Ny=new $m["b"],Fy=Object(ju["f"])(),ky=Object(ju["f"])(),Uy={origin:Object(ju["f"])(),direction:Object(ju["f"])()},zy={origin:Object(ju["f"])(),direction:Object(ju["f"])()},By=.6,Vy=4,Gy=12,Hy=60,qy=20;let Wy=class extends xg{constructor(){super(...arguments),this.zoomLocation=Object(ju["f"])(),this.tmpCamera=new $m["b"],this.tmpViewDir=Object(ju["f"])(),this.tmpRayDir={origin:Object(ju["f"])(),direction:Object(ju["f"])()},this.targetOnSphere=Object(ju["f"])(),this.tmpCenter=Object(ju["f"])(),this.constraintOptions={selection:Mf.ALL_EXCEPT_COLLISION,interactionType:Rf.ZOOM,interactionFactor:null,interactionStartCamera:new $m["b"],interactionDirection:null,tiltMode:Pf.TUMBLE},this.sphere=Object(If["c"])()}initialize(){this.intersector=Object(cb["b"])(this.view.state.viewingMode)}zoomStep(e,t){if(!this.active)return;const r=this.view.state,{interactionStartCamera:i}=this.constraintOptions;this.animation.finished?i.copyFrom(r.camera):this.animation.cameraAt(1,i);let n=!1,a=!1;this.intersectionHelper.intersectScreen(t,this.zoomLocation)&&(n=e>0,a=!0),this.tmpCamera.copyFrom(r.camera),n?this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter):this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:Object($o["m"])(this.zoomLocation,this.tmpCamera.center),this._updateCamera(this.tmpCamera,e,this.zoomLocation,t,a),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:Object(Ic["a"])(600),easing:dm}}_updateCamera(e,t,r,i,n){const a=Object(Yd["e"])(this.view.spatialReference);if(Kg(e,i,n,a)===Zg.Horizontal){let n=By**t;this.sphere[3]=Object($o["r"])(r),Object($o["l"])(this.tmpViewDir,e.center,e.eye);const a=Object($o["r"])(this.tmpViewDir);let s=a*n;if(n<=1&&s<Vy&&(s=Vy,n=s/a),Math.abs(a-s)<1e-6)return;const o=Object($o["r"])(e.center);if(this.sphere[3]!==o){const t=this.sphere[3]+n*(o-this.sphere[3]);e.center=Object($o["g"])($y,e.center,t/o)}Object($o["g"])(this.tmpViewDir,this.tmpViewDir,-n),e.eye=Object($o["h"])($y,e.center,this.tmpViewDir),Mm(this.view,e,this.constraintOptions),Object($o["n"])(r,e.center)>1e-12&&Pg(this.sphere,e,i,this.targetOnSphere)&&my(this.sphere,e,r,this.targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let n=By**Math.abs(t);const a=t>0?1:-1;let s;Object(Mg["d"])(e,i,this.tmpRayDir),Object($o["t"])(this.tmpRayDir.direction,this.tmpRayDir.direction),this.view.camera.position.hasZ&&(s=Math.abs(this.view.camera.position.z));let o=Math.max(Gy*s,qy);const c=this.view._stage.renderView.getMinimalDepthForArea(null,i[0],i[1],this.view.state.camera,Hy);o=o>c?c:o,Object($o["g"])(this.tmpRayDir.direction,this.tmpRayDir.direction,o),Object($o["h"])(r,this.tmpRayDir.origin,this.tmpRayDir.direction);let l=o*n;const u=Math.max(Vy,1.01*e.nearFar[0]);if(t>0&&l<u&&(l=u,n=l/o),Math.abs(o-l)<1e-6)return;Object($o["g"])(this.tmpRayDir.direction,this.tmpRayDir.direction,a*(1-n)),e.eye=Object($o["h"])($y,e.eye,this.tmpRayDir.direction),e.center=Object($o["h"])($y,e.center,this.tmpRayDir.direction)}vb(this.view,e)}};Wy=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.global.ZoomStepController")],Wy);const $y=Object(ju["f"])(),Zy=.6,Xy=4,Yy=60,Jy=14,Qy=20;let Ky=class extends xg{constructor(){super(...arguments),this.zoomLocation=Object(ju["f"])(),this.tmpCamera=new $m["b"],this.tmpRayDir=Object(ju["f"])(),this.tmpCenter=Object(ju["f"])(),this.constraintOptions={selection:Mf.ALL,interactionType:Rf.ZOOM,interactionFactor:null,interactionStartCamera:new $m["b"],interactionDirection:null,tiltMode:Pf.TUMBLE}}zoomStep(e,t){if(!this.active)return;const r=this.view.state,{interactionStartCamera:i}=this.constraintOptions;this.animation.finished?i.copyFrom(r.camera):this.animation.cameraAt(1,i),this.tmpCamera.copyFrom(r.camera);const n=Object(cb["b"])(this.view.state.viewingMode);e>0?(this.intersectionHelper.intersectScreenFreePointFallback(t,this.zoomLocation),this.intersectionHelper.intersectRay(this.tmpCamera.ray,n,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter)):this.intersectionHelper.intersectRay(this.tmpCamera.ray,n,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:Object($o["m"])(this.zoomLocation,this.tmpCamera.center);const a=Zy**e;let s=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t[0],t[1],this.view.state.camera,Yy);const o=Math.max(Jy*Math.abs(this.view.camera.position.z),Qy);if(s=s?Math.min(s,o):o,s){const e=Object(ju["f"])();Object($o["l"])(e,this.zoomLocation,this.tmpCamera.eye),s<Object($o["r"])(e)&&(Object($o["t"])(e,e),Object($o["h"])(this.zoomLocation,this.tmpCamera.eye,Object($o["g"])(e,e,s)))}this._updateCamera(this.tmpCamera,a,this.zoomLocation),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:Object(Ic["a"])(600),easing:dm}}_updateCamera(e,t,r){Object($o["l"])(this.tmpRayDir,r,e.eye);const i=Object($o["r"])(this.tmpRayDir);let n=i*t;const a=t<=1,s=Math.max(Xy,1.01*e.nearFar[0]);a&&n<s&&(n=s,t=n/i),Math.abs(i-n)<1e-6||(Object($o["g"])(this.tmpRayDir,this.tmpRayDir,t),e.eye=Object($o["l"])(eO,r,this.tmpRayDir),e.center=Object($o["k"])(eO,e.center,r,1-t),Mm(this.view,e,this.constraintOptions))}};Ky=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.local.ZoomStepController")],Ky);const eO=Object(ju["f"])();class tO extends Ha["a"]{constructor(e,t){super(!0),this.view=e,this.registerIncoming("double-click",t,e=>this._handleDoubleClick(e))}_handleDoubleClick(e){const t=e.data;if(zo(t,"primary")){const r=this.view.state.isGlobal?new Wy({view:this.view,mode:"animation"}):new Ky({view:this.view,mode:"animation"});this.view.state.switchCameraController(r),r.zoomStep(Math.log(.5)/Math.log(.6),Object(ce["f"])(t.x,t.y)),e.stopPropagation()}}}let rO=class extends jg{constructor(){super(...arguments),this.startCamera=new $m["b"],this.currentCamera=new $m["b"]}get isInteractive(){return!0}stepController(e,t){t.copyViewFrom(this.currentCamera),this.currentCamera.copyFrom(t)}onControllerStart(e){this.state=_g.Running,this.startCamera.copyFrom(e),this.currentCamera.copyFrom(e)}onControllerEnd(e){e.copyViewFrom(this.currentCamera)}};var iO;rO=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.InteractiveController")],rO),function(e){e[e.CENTER=0]="CENTER",e[e.EYE=1]="EYE"}(iO||(iO={}));const nO=7,aO=90;let sO=class extends rO{constructor(e){super(e),this.view=null,this.pivot=iO.CENTER,this.lastPoint=Object(vo["b"])(),this.tmpWorldUp=Object(ju["f"])(),this.tmpViewDir=Object(ju["f"])(),this.tmpRotCurPoint=Object(vo["b"])(),this.tmpTransf=Object(Kd["d"])(),this.tmpAxis=Object(ju["f"])(),this.tmpPivotPoint=Object(ju["f"])(),this.pivotPos=Object(ju["f"])(),this.constraintOptions={selection:Mf.ALL,interactionType:Rf.TUMBLE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:Pf.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}initialize(){this.rotScale=this.pivot===iO.CENTER?3:1.5}begin(e){if(this.active){switch(this.pivot){case iO.EYE:Object($o["m"])(this.pivotPos,this.startCamera.eye),this.constraintOptions.interactionType=Rf.LOOK_AROUND,this.constraintOptions.tiltMode=Pf.LOOK_AROUND,this.constraintOptions.selection=Mf.NONE;break;case iO.CENTER:this.intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this.pivotPos)||Object($o["m"])(this.pivotPos,this.startCamera.center),this._constrainPivotPoint(e),this.startCamera.center=this.pivotPos,this.constraintOptions.interactionType=Rf.TUMBLE,this.constraintOptions.tiltMode=Pf.TUMBLE,this.constraintOptions.selection=Mf.ALL&~Mf.DISTANCE}this.constraintOptions.interactionStartCamera=this.startCamera,Fg(this.startCamera,e,this.lastPoint)}}_constrainPivotPoint(e){const t=this.startCamera,r=Object(ju["f"])();Object($o["l"])(r,this.pivotPos,t.eye);let i=Object($o["r"])(r);this.view.camera.position.hasZ&&(i=Math.min(i,nO*Math.abs(this.view.camera.position.z)));const n=Object(Yd["e"])(this.view.spatialReference),a=Object(ce["f"])(t.width/t.pixelRatio*.5,t.height/t.pixelRatio*.5),s=Kg(this.startCamera,a,!0,n);let o=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t.fullWidth/t.pixelRatio*.5,t.fullHeight/t.pixelRatio*.5,t,2.5*aO,aO),c=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),e[0],e[1],t,aO);void 0===o&&void 0===c||(o=void 0===o?c:o,c=void 0===c||s===Zg.Horizontal?o:c,i=o>c?c:o),Object($o["t"])(r,r),Object($o["m"])(this.pivotPos,Object($o["h"])(this.tmpPivotPoint,t.eye,Object($o["g"])(this.tmpPivotPoint,r,i)))}update(e){if(this.active){switch(this.pivot){case iO.EYE:this.currentCamera.center=this._applyRotation(this.currentCamera,e,this.currentCamera.center,this.pivotPos);break;case iO.CENTER:this.currentCamera.center=this.pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,e,this.currentCamera.eye,this.pivotPos)}Mm(this.view,this.currentCamera,this.constraintOptions)}}end(){this.active&&this.finishController()}_applyRotation(e,t,r,i){this.view.renderCoordsHelper.worldUpAtPosition(i,this.tmpWorldUp),Fg(e,t,this.tmpRotCurPoint);let n=(this.lastPoint[1]-this.tmpRotCurPoint[1])*this.rotScale,a=(this.tmpRotCurPoint[0]-this.lastPoint[0])*this.rotScale;Object($o["l"])(this.tmpViewDir,r,i);const s=Object($o["r"])(this.tmpViewDir),o=Object(dr["b"])(Object($o["j"])(this.tmpViewDir,this.tmpWorldUp)/s);if(this.pivot===iO.EYE){n*=-.5;const e=.5*Math.PI-o,t=.5*Math.PI*.99;n=e-Math.max(-t,Math.min(t,e+n))}return n=Object(dr["f"])(n+o,td.min,td.max)-o,Object($o["i"])(this.tmpAxis,e.up,this.tmpViewDir),this.pivot===iO.CENTER&&(a=-a),Object(Qd["e"])(this.tmpTransf,a,this.tmpWorldUp),Object(Qd["f"])(this.tmpTransf,this.tmpTransf,n,this.tmpAxis),Object($o["s"])(this.tmpViewDir,this.tmpViewDir,this.tmpTransf),e.up=Object($o["s"])(oO,e.up,this.tmpTransf),Object($o["h"])(oO,i,this.tmpViewDir),Object(io["c"])(this.lastPoint,this.tmpRotCurPoint),oO}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],sO.prototype,"view",void 0),Object(l["a"])([Object(j["b"])()],sO.prototype,"pivot",void 0),sO=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.RotateController")],sO);const oO=Object(ju["f"])();class cO extends Ha["a"]{constructor(e,t,r,i){super(!0),this.view=e,this.pointerAction=t,this.pivot=r,this.registerIncoming("drag",i,e=>this._handleDrag(e))}_handleDrag(e){const t=e.data;if(t.pointers.size>1)return;if(!Bo(e.data,this.pointerAction))return;const r=Object(ce["f"])(t.center.x,t.center.y);switch(t.action){case"start":this.cameraController&&(this.cameraController.end(),this.cameraController=null),this.cameraController=new sO({view:this.view,pivot:this.pivot}),this.view.state.switchCameraController(this.cameraController),this.cameraController.begin(r);break;case"update":this.cameraController&&this.cameraController.update(r);break;case"end":this.cameraController&&(this.cameraController.end(),this.cameraController=null)}e.stopPropagation()}}let lO=class extends rO{constructor(e){super(e),this.view=null,this.pickPoint=Object(ju["f"])(),this.tmpP0=Object(vo["b"])(),this.panAxisAngle=Object(Eg["b"])(),this.tmpRayDir=Object(ju["f"])(),this.targetOnSphere=Object(ju["f"])(),this.tmpRay={origin:Object(ju["f"])(),direction:Object(ju["f"])()},this.dragBeginPoint=Object(ce["f"])(),this.normalizedAnchorPoint=Object(vo["b"])(),this.constraintOptions={selection:Mf.ALL_EXCEPT_COLLISION,interactionType:Rf.ZOOM,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:Pf.TUMBLE},this.sphere=Object(If["c"])(),this.hasPickPoint=!1}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(e){if(!this.active)return;Object(io["c"])(this.dragBeginPoint,e),Fg(this.startCamera,e,this.normalizedAnchorPoint);const t=Object(Yd["e"])(this.view.spatialReference),r=Qg(this.intersectionHelper,this.startCamera,e,!1,t);if(this.navMode=Kg(this.startCamera,e,r.hasGeometryIntersection,t),this.navMode===Zg.Horizontal)this.hasPickPoint=!!r.scenePickPoint,this.pickPoint=r.scenePickPoint,this.sphere=r.sphere;else{let t;Object(Mg["d"])(this.startCamera,e,this.tmpRay),Object($o["t"])(this.tmpRay.direction,this.tmpRay.direction),this.view.camera.position.hasZ&&(t=Math.abs(this.view.camera.position.z));let r=Object(dr["f"])(Dg*t,Lg[0],Lg[1]);const i=this.view._stage.renderView.getMinimalDepthForArea(null,e[0],e[1],this.view.state.camera,Ng);r=r>i?i:r,this.hasPickPoint=!0,Object($o["g"])(this.tmpRay.direction,this.tmpRay.direction,r),Object($o["h"])(this.pickPoint,this.tmpRay.origin,this.tmpRay.direction)}this.constraintOptions.interactionStartCamera=this.startCamera}update(e){if(this.active){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,this.navMode===Zg.Horizontal){Object($o["l"])(this.tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const t=Object($o["r"])(this.tmpRayDir);Fg(this.currentCamera,e,this.tmpP0);const r=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let i=t*2**r;const n=this.view.state.constraints.minimumPoiDistance;if(r<0&&i<n&&(i=n),Math.abs(t-i)<1e-6)return;if(this.hasPickPoint&&i<t){const e=1-(1-i/t)*(1-this.sphere[3]/Object($o["r"])(this.currentCamera.center));this.currentCamera.center=Object($o["g"])(uO,this.currentCamera.center,e)}Object($o["g"])(this.tmpRayDir,this.tmpRayDir,-i/t),this.currentCamera.eye=Object($o["h"])(uO,this.currentCamera.center,this.tmpRayDir),this.constraintOptions.interactionFactor=Im(this.dragBeginPoint,e),Mm(this.view,this.currentCamera,this.constraintOptions),this.hasPickPoint&&(ry(this.sphere,this.currentCamera,this.dragBeginPoint,this.targetOnSphere),Object(Eg["c"])(this.pickPoint,this.targetOnSphere,this.panAxisAngle),Ug(this.currentCamera,this.sphere,this.panAxisAngle))}else{const t=Object($o["r"])(this.tmpRay.direction);Fg(this.currentCamera,e,this.tmpP0);const r=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let i=t*2**r;const n=this.view.state.constraints.minimumPoiDistance;if(r<0&&i<n&&(i=n),Math.abs(t-i)<1e-6)return;Object($o["g"])(this.tmpRayDir,this.tmpRay.direction,1-i/t),this.currentCamera.eye=Object($o["h"])(uO,this.currentCamera.eye,this.tmpRayDir),this.currentCamera.center=Object($o["h"])(uO,this.currentCamera.center,this.tmpRayDir)}vb(this.view,this.currentCamera)}}end(){this.active&&this.finishController()}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],lO.prototype,"view",void 0),lO=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.global.ZoomController")],lO);const uO=Object(ju["f"])();let dO=class extends rO{constructor(e){super(e),this.view=null,this.tmpP=Object(ju["f"])(),this.tmpDir=Object(ju["f"])(),this.tmpN=Object(ju["f"])(),this.tmpP0=Object(vo["b"])(),this.tmpPoi=Object(ju["f"])(),this.tmpRayDir=Object(ju["f"])(),this.dragBeginPoint=Object(ce["f"])(),this.normalizedAnchorPoint=Object(vo["b"])(),this.constraintOptions={selection:Mf.ALL,interactionType:Rf.ZOOM,interactionFactor:0,interactionStartCamera:null,interactionDirection:Object(ju["f"])(),tiltMode:Pf.TUMBLE},this.plane=Object(Ag["d"])()}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(e){if(!this.active)return;let t;Object(io["c"])(this.dragBeginPoint,e),Fg(this.startCamera,e,this.normalizedAnchorPoint),this.intersectionHelper.intersectScreenFreePointFallback(e,this.tmpP),Object($o["l"])(this.tmpDir,this.tmpP,this.startCamera.eye),Object($o["t"])(this.tmpDir,this.tmpDir),this.view.camera.position.hasZ&&(t=Math.abs(this.view.camera.position.z));let r=Object(dr["f"])(Dg*t,Lg[0],Lg[1]);const i=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),e[0],e[1],this.view.state.camera,Ng);r=r>i?i:r,Object($o["g"])(this.tmpDir,this.tmpDir,r),Object($o["h"])(this.tmpP,this.startCamera.eye,this.tmpDir),Object($o["l"])(this.tmpN,this.startCamera.eye,this.startCamera.center),Object($o["t"])(this.tmpN,this.tmpN),this.tmpN[1]<0&&Object($o["u"])(this.tmpN,this.tmpN),Object(Ag["h"])(this.tmpP,this.tmpN,this.plane),this.constraintOptions.interactionStartCamera=this.startCamera}update(e){if(!this.active)return;zg(this.plane,this.currentCamera,this.dragBeginPoint,this.tmpPoi)||Object($o["m"])(this.tmpPoi,this.currentCamera.center),Fg(this.currentCamera,e,this.tmpP0);let t=4*(this.tmpP0[1]-this.normalizedAnchorPoint[1]);Object(io["c"])(this.normalizedAnchorPoint,this.tmpP0),Object($o["l"])(this.tmpRayDir,this.tmpPoi,this.currentCamera.eye);const r=Object($o["r"])(this.tmpRayDir);let i=r*(1-t);Object($o["m"])(this.constraintOptions.interactionDirection,this.tmpRayDir),Object($o["g"])(this.constraintOptions.interactionDirection,this.constraintOptions.interactionDirection,Math.sign(t)/r);const n=this.view.state.constraints.minimumPoiDistance;t>=0&&i<n&&(i=n,t=-(i-r)/r),Math.abs(r-i)<1e-6||(Object($o["g"])(this.tmpRayDir,this.tmpRayDir,t),this.currentCamera.eye=Object($o["h"])(hO,this.currentCamera.eye,this.tmpRayDir),Object($o["k"])(hO,this.currentCamera.center,this.tmpPoi,t),this.tmpPoi[2]>this.startCamera.center[2]?hO[2]=Math.max(this.startCamera.center[2],hO[2]):hO[2]=Math.min(this.startCamera.center[2],hO[2]),this.currentCamera.center=hO,this.constraintOptions.interactionFactor=Im(this.dragBeginPoint,e),Mm(this.view,this.currentCamera,this.constraintOptions))}end(){this.active&&this.finishController()}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],dO.prototype,"view",void 0),dO=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.local.ZoomController")],dO);const hO=Object(ju["f"])();class pO extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.pointerAction=t,this.registerIncoming("drag",r,e=>this._handleDrag(e))}_handleDrag(e){const t=e.data;if(t.pointers.size>1)return;if(!Bo(e.data,this.pointerAction))return;const r=Object(ce["f"])(t.center.x,t.center.y);switch(t.action){case"start":this.cameraController&&(this.cameraController.end(),this.cameraController=null),this.view.state.isGlobal?this.cameraController=new lO({view:this.view}):this.cameraController=new dO({view:this.view}),this.view.state.switchCameraController(this.cameraController),this.cameraController.begin(r);break;case"update":this.cameraController&&this.cameraController.update(r);break;case"end":this.cameraController&&(this.cameraController.end(),this.cameraController=null)}e.stopPropagation()}}const fO=Object(ju["f"])(),bO=Object(ju["f"])();function mO(){return{direction:Object(ju["f"])(),up:Object(ju["f"])()}}function gO(e,t,r,i,n){let a=Object($o["t"])(fO,e),s=Object($o["j"])(a,i);const o=s>0;s=Math.abs(s),s>.99&&(s=Math.abs(Object($o["j"])(t,i)),s<.99?(Object($o["m"])(a,t),o&&Object($o["g"])(a,a,-1)):a=null);let c=0;if(a){Object($o["g"])(bO,i,Object($o["j"])(i,a)),Object($o["l"])(a,a,bO);const e=Object($o["j"])(a,n)/(Object($o["r"])(a)*Object($o["r"])(n));Object($o["i"])(bO,a,n),c=(Object($o["j"])(bO,i)>0?1:-1)*Object(dr["p"])(Object(dr["b"])(e))}const l=Object(dr["p"])(Object(dr["b"])(-Object($o["j"])(i,e)/Object($o["r"])(e)));return r?(r.heading=c,r.tilt=l,r):{heading:c,tilt:l}}const yO=Object(ju["h"])(0,1,0),OO=Object(ju["h"])(0,0,1),vO=Object(Kd["d"])(),_O=Object(ju["f"])(),jO=Object(ju["f"])();function wO(e,t,r,i=mO()){const{direction:n,up:a}=i;return Object(Qd["c"])(vO,-Object(dr["h"])(t)),Object(Qd["s"])(vO,vO,Object(dr["h"])(r)),Object($o["s"])(n,OO,vO),Object($o["g"])(n,n,-1),Object($o["s"])(a,yO,vO),i}function xO(e,t,r,i){return gO(t,r,i,OO,yO)}function TO(e,t,r,i){const n=wO(e,r,i),a=Object(ju["f"])();return Object($o["g"])(a,n.direction,-t),Object($o["h"])(a,a,e),{up:n.up,eye:a,heading:r,tilt:i}}function SO(e){return Object(dr["p"])(e)}function EO(e){return Object(dr["h"])(e)}function AO(e,t,r,i,n){const a=e.renderSpatialReference,s=e.map&&e.spatialReference||t.spatialReference;return Object(pe["t"])(t,_O,a),Object(pe["t"])(t,jO,a),_O[0]-=r/2,jO[0]+=r/2,_O[1]-=i/2,jO[1]+=i/2,Object(pe["y"])(_O,a,_O,s),Object(pe["y"])(jO,a,jO,s),n?(n.xmin=_O[0],n.ymin=_O[1],n.xmax=jO[0],n.ymax=jO[1],n.spatialReference=s):n=new de["a"](_O[0],_O[1],jO[0],jO[1],s),n}const CO=Object.freeze({__proto__:null,headingTiltToDirectionUp:wO,directionToHeadingTilt:xO,eyeForCenterWithHeadingTilt:TO,lookAtTiltToEyeTilt:SO,eyeTiltToLookAtTilt:EO,toExtent:AO}),RO=Object(ju["h"])(0,0,1),MO=Object($o["t"])(Object(ju["f"])(),Object(ju["h"])(1,1,1)),PO=new Yu["a"](-180,180),IO=Object(Kd["d"])(),DO=Object(ju["f"])(),LO=Object(ju["f"])();function NO(e,t,r,i=mO()){Object($o["i"])(DO,e,RO),0===Object($o["j"])(DO,DO)&&Object($o["i"])(DO,e,MO),Object(Qd["e"])(IO,-Object(dr["h"])(t),e),Object(Qd["f"])(IO,IO,-Object(dr["h"])(r),DO);const{up:n,direction:a}=i;return Object($o["i"])(n,DO,e),Object($o["t"])(n,n),Object($o["s"])(n,n,IO),Object($o["t"])(a,e),Object($o["u"])(a,a),Object($o["s"])(a,a,IO),i}function FO(e,t,r,i){const n=DO,a=LO;return Object($o["t"])(n,e),Object($o["i"])(LO,n,RO),0===Object($o["j"])(LO,LO)&&Object($o["i"])(LO,n,MO),Object($o["i"])(a,LO,n),gO(t,r,i,n,a)}function kO(e,t,r,i){const n={eye:Object(ju["f"])(),up:null,tilt:i,heading:r},a=DO;a[0]=e[0],a[1]=e[2],a[2]=-e[1];const s=t,o=Object(dr["h"])(r),c=Object(dr["h"])(i),l=Math.sin(o),u=Math.cos(o),d=Math.sin(c),h=Math.cos(c),p=Object($o["r"])(a);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/d,t=Object(dr["d"])(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const b=h*s,m=s*s*(d*d),g=u*u*m,y=f-b,O=y*y,v=g*(g+O-a[1]*a[1]);if(v<0)return Object($o["g"])(n.eye,a,f/p),n.tilt=0,n;const _=Math.sqrt(v),j=a[1]*y,w=g+O;let x;if(x=u>0?-_+j:_+j,Math.abs(w)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):Object($o["g"])(n.eye,a,f/p),n.tilt=0,UO(n.eye),zO(n,e);n.eye[1]=x/w;const T=l*l*m,S=d*s,E=u*S*n.eye[1],A=n.eye[1]*n.eye[1],C=1-A,R=Math.sqrt(C),M=g*A+T-2*E*R*y+C*O;return Math.abs(M)<1e-8?(Object($o["g"])(n.eye,a,f/p),n.tilt=0,UO(n.eye),zO(n,e)):(n.eye[0]=(C*(f*a[0]-b*a[0])-S*R*(a[0]*n.eye[1]*u+a[2]*l))/M,n.eye[2]=(C*(f*a[2]-b*a[2])-S*R*(a[2]*n.eye[1]*u-a[0]*l))/M,Object($o["g"])(n.eye,n.eye,f),UO(n.eye),zO(n,e))}function UO(e){const t=e[1];e[1]=-e[2],e[2]=t}function zO(e,t){const r=NO(t,e.heading,e.tilt);return e.up=r.up,e}function BO(e,t,r){const i=Object($o["r"])(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),a=Object(dr["d"])(r/(n/Math.sin(e)));return Object(dr["p"])(e-a)}function VO(e,t,r){const i=Object(dr["h"])(e),n=Object($o["r"])(t);return Object(dr["d"])(r/(n/Math.sin(i)))+i}function GO(e,t,r,i,n){let a,s,o,c;const l=t.latitude,u=Object(Yd["e"])(e.spatialReference).radius,d=t.longitude,h=Xp(l,r,u)/2;a=d-h,s=d+h;const p=Object(dr["h"])(l),f=(1+Math.sin(p))/(1-Math.sin(p)),b=(f+1)*Math.tan(i/u/2),m=b*b;function g(e){const t=Math.PI/2;return(e=Yu["d"].normalize(e,-t))>t&&(e=Math.PI-e),e}if(o=1.5*Math.PI-2*Math.atan(.5*(b+Math.sqrt(4*f+m))),c=o+i/u,o=g(o),c=g(c),c<o){const e=c;c=o,o=e}if(o=Math.max(Object(dr["p"])(o),-90),c=Math.min(Object(dr["p"])(c),90),s=PO.monotonic(a,s),s-a>180){const e=(s-a-180)/2;a+=e,s-=e}const y=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:ne["a"].WGS84;return n?(n.xmin=a,n.ymin=o,n.xmax=s,n.ymax=c,n.spatialReference=y):n=new de["a"](a,o,s,c,y),e.spatialReference&&e.spatialReference.isWebMercator&&Object(_n["b"])(n,!1,n),n}const HO=Object.freeze({__proto__:null,headingTiltToDirectionUp:NO,directionToHeadingTilt:FO,eyeForCenterWithHeadingTilt:kO,lookAtTiltToEyeTilt:BO,eyeTiltToLookAtTilt:VO,toExtent:GO});var qO=r("ce27");const WO=v["a"].getLogger("esri.views.3d.support.cameraUtils"),$O=39.37,ZO=96,XO=1,YO=8,JO=5,QO=1,KO=Object(ju["f"])(),ev=Object(ju["f"])(),tv={heading:0,tilt:0},rv=new he["a"],iv=new Yu["a"](-20037508.342788905,20037508.342788905),nv=new Yu["a"](-180,180);var av;function sv(e){return e.spatialReference||ne["a"].WGS84}function ov(e){return"global"===e.viewingMode?HO:CO}function cv(e,t,r,i,n){return ov(e).headingTiltToDirectionUp(t,r,i,n)}function lv(e,t){if(Object(z["j"])(t))return null;const r=e.renderSpatialReference,i=ov(e).headingTiltToDirectionUp,n=Object(ju["f"])();if(!Object(pe["t"])(t.position,n,r))return null;const a=i(n,t.heading,t.tilt);Object($o["g"])(a.direction,a.direction,e.state.camera.distance),Object($o["h"])(a.direction,a.direction,n);const s=db(e,n,a.direction,a.up);return s.fov=Object(dr["h"])(t.fov),s}!function(e){e[e.LOCKED=0]="LOCKED",e[e.ADJUST=1]="ADJUST"}(av||(av={}));const uv=Object(ju["f"])();function dv(e,t,r){const i=e.renderSpatialReference,n=mv(e,t.eye,t.viewForward,t.up,tv);let a=sv(e);return Object(pe["y"])(t.eye,i,uv,a)||(a=ne["a"].WGS84,Object(pe["y"])(t.eye,i,uv,a)),Object(z["j"])(r)?new vu["a"](new he["a"](uv,a),n.heading,n.tilt,Object(dr["p"])(t.fov)):(r.position.x=uv[0],r.position.y=uv[1],r.position.z=uv[2],r.position.spatialReference=a,r.heading=n.heading,r.tilt=n.tilt,r.fov=Object(dr["p"])(t.fov),r)}function hv(e,t,r){const i=e.state.camera,n=i.width/2/i.pixelRatio;return e.renderCoordsHelper.viewingMode===As["a"].Global&&null!=r&&(t*=Math.cos(Object(dr["h"])(r))),t/=e.renderCoordsHelper.unitInMeters,n/(ZO*$O/t)/Math.tan(i.fovX/2)}function pv(e,t,r){const i=e.state.camera,n=t*Math.tan(i.fovX/2),a=i.width/2/i.pixelRatio;let s=ZO*$O/(a/n);return e.renderCoordsHelper.viewingMode===As["a"].Global&&(s/=Math.cos(Object(dr["h"])(r))),s*=e.renderCoordsHelper.unitInMeters,s}function fv(e,t,r,i,n,a){return bv(e,t,hv(e,r,t.latitude),i,n,a)}function bv(e,t,r,i,n,a){if(kv(a)){const s=new Fv(a.signal);return _v(e,i.heading,i.tilt,t,r,n,s),void s.resolver.promise.then(t=>{const r=Pv(e,t,i.fov);if(!Object(z["j"])(r))return a.resolver.resolve(r);a.resolver.reject()},e=>a.resolver.reject(e))}const s=_v(e,i.heading,i.tilt,t,r,n);return Pv(e,s,i.fov,a)}function mv(e,t,r,i,n){return ov(e).directionToHeadingTilt(t,r,i,n)}function gv(e,t){return!!(e.basemapTerrain&&e.renderCoordsHelper.fromRenderCoords(t,rv,e.spatialReference)&&Object(z["u"])(Object(Ru["b"])(e.elevationProvider,rv),0)>rv.z-QO)}async function yv(e,t,r){if(!e.renderCoordsHelper.fromRenderCoords(t,rv,e.spatialReference))return!1;const i=await e.elevationProvider.queryElevation(rv.x,rv.y,rv.z,rv.spatialReference,"ground",r);return Object(z["u"])(i,0)>rv.z-QO}async function Ov(e,t,r){const i=Object(ju["f"])();if(t)if(t instanceof he["a"]){if(Object(pe["t"])(t,i,e.renderSpatialReference),null==t.z&&null!=e.basemapTerrain){const n=await e.elevationProvider.queryElevation(t.x,t.y,t.z,t.spatialReference,"ground",r);return Object(z["k"])(n)&&e.renderCoordsHelper.setAltitude(i,n),i}}else Object($o["m"])(i,t);else Object($o["m"])(i,e.state.camera.center);return i}function vv(e,t){const r=Object(ju["f"])();if(t&&t instanceof he["a"]){if(Object(pe["t"])(t,r,e.renderSpatialReference),null==t.z&&null!=e.basemapTerrain){const i=Object(Ru["b"])(e.elevationProvider,t);Object(z["k"])(i)&&e.renderCoordsHelper.setAltitude(r,i)}}else Object($o["m"])(r,t||e.state.camera.center);return r}function _v(e,t,r,i,n,a,s){const o=i&&i instanceof he["a"]?i:null;if(kv(s))return Ov(e,i,s.signal).then(i=>{jv(e,t,r,o,i,n,a,s)},e=>s.resolver.reject(e)),null;const c=vv(e,i);return jv(e,t,r,o,c,n,a,s)}function jv(e,t,r,i,n,a,s,o){if(Object(z["j"])(i)){const t=e.renderSpatialReference;if(i=Object(pe["x"])(n,t,sv(e)),Object(z["j"])(i))return null}a=Math.max(a,e.state.constraints.minimumPoiDistance);const c=Sv(e,t,r,n,a,s),l=(0,ov(e).eyeForCenterWithHeadingTilt)(n,a,c.heading,c.tilt);if(s===av.ADJUST&&"global"===e.viewingMode&&r>0){const c=()=>{const c=Rv(e,n,a,Cv(e,a,r,n));return s=r-c<1?av.LOCKED:av.ADJUST,jv(e,t,c,i,n,a,s,o)},u=e.map.ground.navigationConstraint;if(!u||"stay-above"===u.type){if(gv(e,l.eye))return c();if(kv(o))return yv(e,l.eye,o.signal).then(e=>e?c():(o.resolver.resolve({eye:l.eye,up:l.up,center:Object(ju["d"])(n),heading:l.heading,tilt:l.tilt}),null)),null}}const u=!o||kv(o)?{center:Object(ju["f"])(),eye:Object(ju["f"])(),up:Object(ju["f"])(),tilt:0,heading:0}:o;return u.eye=l.eye,u.up=l.up,u.center=Object(ju["d"])(n),u.heading=l.heading,u.tilt=l.tilt,kv(o)&&o.resolver.resolve(u),u}function wv(e,t,r,i,n,a=null){const s=null!=t.zmax&&null!=t.zmin;let o,c,l;if(e.state.isGlobal){if(!Object(qO["a"])(t.spatialReference,As["a"].Global))return kv(a)&&a.resolver.reject(),null;const e=new he["a"](t.xmin,t.ymin,t.spatialReference),r=new he["a"](t.xmax,t.ymax,t.spatialReference),i=t.spatialReference.isGeographic?nv:iv;o=new he["a"]({x:i.center(e.x,r.x),y:(r.y+e.y)/2,z:s?(t.zmax+t.zmin)/2:null,spatialReference:t.spatialReference});const n=Object(Yd["e"])(t.spatialReference),u=Zp(o,e,r);c=u.lon,l=u.lat,i.diff(e.x,r.x)>i.range/2&&(c+=n.halfCircumference),c=Math.min(c,n.halfCircumference),l=Math.min(l,n.halfCircumference)}else{const r=Object(z["u"])(e.renderSpatialReference,t.spatialReference);r.equals(t.spatialReference)||(t=Object(pe["m"])(t,r)),c=t.xmax-t.xmin,l=t.ymax-t.ymin;const i=s?(t.zmax+t.zmin)/2:null;o=new he["a"]({x:t.xmin+.5*c,y:t.ymin+.5*l,z:i,spatialReference:r})}const u=s?t.zmax-t.zmin:0,d=e.state.camera,h=1/Math.tan(d.fovX/2),p=1/Math.tan(d.fovY/2),f=1/Math.tan(d.fov/2),b=Math.max(.5*c*h,.5*l*p,.5*u*f)/XO;if(kv(a)){const t=new Fv(a.signal);return _v(e,r,i,o,b,n,t),void t.resolver.promise.then(t=>{const r=Pv(e,t,e.camera.fov);if(!Object(z["j"])(r))return a.resolver.resolve(r);a.resolver.reject()},e=>a.resolver.reject(e))}const m=_v(e,r,i,o,b,n);return Pv(e,m,e.camera.fov,a)}function xv(e,t,r){const i=e.renderSpatialReference,n=Object(pe["x"])(r,i,sv(e));if(Object(z["j"])(n))return null;const a=Math.tan(t.fovX/2),s=Math.tan(t.fovY/2),o=Object($o["p"])(t.eye,r),c=2*o*a*XO,l=2*o*s*XO;return"global"===e.viewingMode?GO(e,n,c,l):AO(e,n,c,l)}function Tv(e,t,r){const i=e.pointsOfInterest.centerOnSurfaceFrequent.distance;if(Math.log(r/i)/Math.LN2>YO)return!0;const n=e.renderSpatialReference,a=sv(e),s=Object(pe["x"])(t,n,a),o=Object(pe["x"])(e.pointsOfInterest.centerOnSurfaceFrequent.renderLocation,n,a);if(Object(z["j"])(s)||Object(z["j"])(o))return!1;const c=Math.tan(.5*e.state.camera.fov)*i;return o.distance(s)/c>JO}function Sv(e,t,r,i,n,a){let s=0;return a===av.ADJUST&&Tv(e,i,n)?(t=0,s=Av(e,n,r,i)):s=Mv(e,i,n,r),s=e.state.constraints.clampTilt(n,s),{heading:t,tilt:r=Rv(e,i,n,s)}}const Ev=.7;function Av(e,t,r,i){const n=e.state.constraints.tilt(t);n.max=Math.min(n.max,.5*Math.PI);const a=n.min*(1-Ev)+n.max*Ev,s=Mv(e,i,t,r);return Math.min(s,a)}function Cv(e,t,r,i){const n=e.state.constraints.tilt(t);let a=Mv(e,i,t,r);return a=Math.min(a,.5*Math.PI),n.min*(1-Ev)+a*Ev}function Rv(e,t,r,i){return ov(e).lookAtTiltToEyeTilt(i,t,r)}function Mv(e,t,r,i){return ov(e).eyeTiltToLookAtTilt(i,t,r)}function Pv(e,t,r,i){if(Object(z["j"])(t))return null;const n=e.renderSpatialReference,a=Object(pe["x"])(t.eye,n,sv(e));return Object(z["j"])(a)?null:Object(z["k"])(i)?(i.position=a,i.heading=t.heading,i.tilt=t.tilt,i.fov=r,i):new vu["a"](a,t.heading,t.tilt,r)}function Iv(e,t){var r;const i=null==(r=e.basemapTerrain)?void 0:r.tilingScheme;if(i)return i.levelAtScale(t);WO.error("#scaleToZoom()","Cannot compute zoom from scale without a tiling scheme")}function Dv(e,t){var r;const i=null==(r=e.basemapTerrain)?void 0:r.tilingScheme;if(i)return i.scaleAtLevel(t);WO.error("#zoomToScale()","Cannot compute scale from zoom without a tiling scheme")}function Lv(e,t){return e.spatialReference?Object(Su["a"])(t,e.spatialReference):void 0}function Nv(e,t,r){const i=e.renderSpatialReference;let n,a;t||(t=e.state.camera);const s=ne["a"].WGS84;return t instanceof vu["a"]?(n=t.position.latitude,Object(pe["t"])(t.position,KO,i),Object(pe["t"])(r,ev,i),a=Object($o["o"])(KO,ev)):(Object(pe["y"])(t.center,i,ev,s),n=ev[1],a=t.distance),pv(e,a,n)}class Fv{constructor(e){this.signal=e,this.resolver=Object(_["g"])()}}function kv(e){return e&&"resolver"in e}let Uv=class extends rO{constructor(e){super(e),this.transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this.keysButtonState=[0,0,0,0,0,0,0,0,0,0,0,0],this.tmpCamera=new $m["b"],this.constraintOptions={selection:Mf.ALL,interactionType:Rf.NONE,interactionStartCamera:new $m["b"],interactionFactor:0,interactionDirection:null,tiltMode:Pf.LOOK_AROUND}}handleEventGamepad(e){const t=Yo(e,this.view.navigation.gamepad,this.transformation);("end"===e.action||Qo(t))&&this.finishController()}activateDirection(e){this.keysButtonState[e]=1,Jo(this.keysButtonState,this.transformation)}deactivateDirection(e){this.keysButtonState[e]=0;const t=Jo(this.keysButtonState,this.transformation);Qo(t)&&this.finishController()}onControllerStart(e){this.filteredSurfaceElevation=this.view.pointsOfInterest.cameraOnSurface.location.z,this.headingStart=this.view.camera.heading,super.onControllerStart(e)}_updateFilteredSurfaceElevation(e){const t=this.view.pointsOfInterest.cameraOnSurface.location.z,r=1;this.filteredSurfaceElevation+=r*(t-this.filteredSurfaceElevation)*e}stepController(e,t){this._updateStartHeading(),this._updateFilteredSurfaceElevation(e),this.currentCamera.copyViewFrom(t),this._updateCameraCenter(),this.constraintOptions.interactionStartCamera.copyFrom(this.currentCamera),this._calculateControlTransformation(e,this.currentCamera,$v),this._applyDisabledMovementTypes($v),this._applyPan($v.pan),this._applyRotate($v.rotate),this._applyZoom($v.zoom),this._applyAscend($v.ascend),this.constraintOptions.interactionType=Rf.NONE,this.constraintOptions.selection=Mf.COLLISION,Mm(this.view,this.currentCamera,this.constraintOptions),super.stepController(e,t)}_updateStartHeading(){0!==this.transformation.heading&&(this.headingStart=this.view.camera.heading)}_applyRotate(e){if(!e.enabled)return;const t=this.currentCamera;Object($o["l"])(Zv,t.center,t.eye),Object($o["s"])(Zv,Zv,e.matrix),t.center=Object($o["h"])(Zv,Zv,t.eye),t.up=Object($o["s"])(Zv,t.up,e.matrix),this.constraintOptions.interactionType=Rf.LOOK_AROUND,this.constraintOptions.selection=Mf.ALL_EXCEPT_COLLISION,Mm(this.view,t,this.constraintOptions)}_applyPan(e,t=this.currentCamera){e.enabled&&(t.eye=Object($o["s"])(Zv,t.eye,e.matrix),t.center=Object($o["s"])(Zv,t.center,e.matrix),this.view.state.isGlobal&&(t.up=Object($o["s"])(Zv,t.up,e.matrix)),this.constraintOptions.interactionType=Rf.PAN,this.constraintOptions.selection=Mf.ALL,Mm(this.view,t,this.constraintOptions))}_applyZoom(e){if(!e)return;const t=this.currentCamera.viewForward;this.currentCamera.eye=Object($o["h"])(Zv,this.currentCamera.eye,Object($o["g"])(Rg["d"].get(),t,e)),Object($o["m"])(Xv,t),Object($o["u"])(Xv,Xv),this.constraintOptions.interactionDirection=Xv,this.constraintOptions.interactionType=Rf.ZOOM,this.constraintOptions.selection=Mf.ALL_EXCEPT_COLLISION,Mm(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null}_applyAscend(e){if(!e)return;const t=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,Rg["d"].get());if(this.constraintOptions.interactionDirection=Object($o["m"])(Xv,t),this.view.state.isGlobal){const t=Object($o["r"])(this.currentCamera.eye),r=(t+e)/t;this.currentCamera.eye=Object($o["g"])(Zv,this.currentCamera.eye,r),this.currentCamera.center=Object($o["g"])(Zv,this.currentCamera.center,r)}else{const r=Object($o["g"])(Rg["d"].get(),t,e);this.currentCamera.eye=Object($o["h"])(Zv,this.currentCamera.eye,r),this.currentCamera.center=Object($o["h"])(Zv,this.currentCamera.center,r)}this._updateCameraCenter(),this.constraintOptions.interactionType=Rf.ASCEND,this.constraintOptions.selection=Mf.COLLISION,Mm(this.view,this.currentCamera,this.constraintOptions)&&this._updateCameraCenter(),this.constraintOptions.selection=Mf.ALL_EXCEPT_COLLISION,Mm(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null}_calculateControlTransformation(e,t,r){Jv(r);const i=this._computeVelocities(e);this.view.state.isLocal?this._calculateControlTransformationLocal(i,t,r):this._calculateControlTransformationGlobal(i,t,r)}_updateCameraCenter(){const e=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,t=this.view.renderCoordsHelper,r=this.currentCamera.ray;this.currentCamera.center=t.intersectManifoldClosestSilhouette(r,e,Zv)}_calculateControlTransformationLocal(e,t,r){const{viewRight:i,viewForward:n}=t,a=this.transformation,s=this.view.navigation.gamepad,o=Object($o["y"])(Rg["d"].get(),n[0],n[1],0);Object($o["t"])(o,o);const c=a.translation[0]*e.pan;if(0!==c){const e=Object($o["g"])(Rg["d"].get(),i,c);Object(Qd["k"])(r.pan.matrix,r.pan.matrix,e),r.pan.enabled=!0}switch(s.mode){case"pan":{const t=-a.translation[1]*e.pan;if(0!==t){const e=Object($o["g"])(Rg["d"].get(),o,t);Object(Qd["k"])(r.pan.matrix,r.pan.matrix,e),r.pan.enabled=!0}r.zoom=a.zoom*e.zoom;break}case"zoom":r.zoom=(-a.translation[1]+a.zoom)*e.zoom;break;default:Object(f["a"])(s.mode)}const l=a.translation[2]*e.ascend;r.ascend=l;const u=-a.heading*e.rotate;0!==u&&(Object(Qd["f"])(r.rotate.matrix,r.rotate.matrix,u,this.view.renderCoordsHelper.worldUpAtPosition(t.eye,Rg["d"].get())),r.rotate.enabled=!0);const d=a.tilt*e.rotate,h=xb(this.view.renderCoordsHelper,t.center,t.eye),p=Object(dr["f"])(h+d,td.min,td.max)-h;p&&(Object(Qd["f"])(r.rotate.matrix,r.rotate.matrix,p,i),r.rotate.enabled=!0)}_calculateControlTransformationGlobal(e,t,r){const{eye:i,viewRight:n}=t,a=this.transformation,s=this.view.navigation.gamepad,o=Object($o["i"])(Rg["d"].get(),n,i);Object($o["t"])(o,o),Object($o["u"])(o,o),Oy(this.startCamera,t,a,e,this.view.camera.heading,this.headingStart,this.view.camera.tilt,r,s),this.tmpCamera.copyFrom(this.currentCamera),this._applyPan($v.pan,this.tmpCamera);const c=this.view.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,l=a.translation[2]*e.ascend;r.ascend=l;const u=-a.heading*e.rotate;0!==u&&(Object(Qd["f"])(r.rotate.matrix,r.rotate.matrix,u,this.tmpCamera.eye),r.rotate.enabled=!0);const d=a.tilt*e.rotate,h=this._clampTiltDeltaGlobalToValidRange(d,t.ray,c);0!==h&&(Object(Qd["f"])(r.rotate.matrix,r.rotate.matrix,h,this.tmpCamera.viewRight),r.rotate.enabled=!0),r.zoom+=a.zoom*e.zoom}_clampTiltDeltaGlobalToValidRange(e,t,r){const i=Object(Yd["e"])(this.view.spatialReference),n=Wg(td.min,t.origin,r,i);let a=0,s=0;const o=Rg["d"].get();if(this.view.renderCoordsHelper.intersectManifold(t,r,o)){const e=xb(this.view.renderCoordsHelper,o,t.origin);a=Wg(e,t.origin,r,i),s=Wg(td.max,t.origin,r,i)}else{Object(If["h"])(Object(If["j"])(r+i.radius),t,o);const e=Object(dr["b"])(-Object($o["j"])(t.direction,Object($o["t"])(o,o)));a=$g(e,t.origin,r,i),s=$g(td.max,t.origin,r,i)}return Object(dr["f"])(a+e,n,s)-a}_getPointAbsoluteSurfaceElevation(e,t,r){const{renderCoordsHelper:i}=this.view,n=i.getAltitude(e),a=t+Math.abs(n-t);return i.setAltitude(r,a,e),a}_clampedDistanceToSurface(e,t){const{renderCoordsHelper:r}=this.view,{camera:i}=this.view.state,{direction:n}=cv(this.view,t,0,Bv,Yv),a=r.intersectManifoldClosestSilhouette(Object(Df["h"])(t,n),e,Rg["d"].get()),s=Object($o["o"])(t,a),o=r.intersectManifoldClosestSilhouette(Object(Df["h"])(t,Object($o["x"])(Rg["d"].get(),t,i.center)),e,Rg["d"].get()),c=Object($o["o"])(t,o);return Math.min(s,c)}_computeHeadingRotateRadius(e){const{renderCoordsHelper:t,state:r}=this.view,{camera:i,isGlobal:n}=r,a=t.intersectManifoldClosestSilhouette(i.ray,this.filteredSurfaceElevation,Rg["d"].get());if(n){const t=Object($o["l"])(Rg["d"].get(),e,a),r=Object($o["r"])(t);Object($o["g"])(t,t,1/r);const i=Object($o["t"])(Rg["d"].get(),e),n=Object(dr["b"])(Object($o["j"])(i,t));return r*Math.sin(Math.min(Vv,n))}{const r=Object($o["m"])(Rg["d"].get(),e);return t.setAltitude(r,this.filteredSurfaceElevation),Object($o["o"])(a,r)}}_minimumAscendVelocity(){return this.view.state.constraints.collision.enabled?0:Hv}_computeVelocities(e){const t=this.filteredSurfaceElevation,r=t+Object(Yd["e"])(this.view.spatialReference).radius,{camera:i,isGlobal:n}=this.view.state,a=Rg["d"].get(),s=this._getPointAbsoluteSurfaceElevation(i.eye,t,a),o=this._clampedDistanceToSurface(t,a),c=i.width/2,l=Gv*i.width,u=Gv*i.width,d=o*Math.tan(.5*i.fovX)/c,h=d/r,p=d/this._computeHeadingRotateRadius(a),f=s-t;return{pan:(n?h:d)*l*e,ascend:Math.max(this._minimumAscendVelocity()*e,2**(l*e/c)*f-f),zoom:2**(l*e/c)*o-o,rotate:Object(dr["f"])(p*u,qv,Wv)*e}}_applyDisabledMovementTypes(e){!Object(z["k"])(this.disableMovements)||void 0!==this.disableMovements.mode&&this.view.state.viewingMode!==this.disableMovements.mode||(e.zoom=this.disableMovements.zoom?0:e.zoom,e.ascend=this.disableMovements.ascend?0:e.ascend,e.pan.enabled=!this.disableMovements.pan,this.disableMovements.pan&&Object(Qd["j"])(e.pan.matrix),e.rotate.enabled=!this.disableMovements.rotate,this.disableMovements.rotate&&Object(Qd["j"])(e.rotate.matrix))}static activatesFor(e,t){const r=Yo(t,e.navigation.gamepad,zv);return!("end"===t.action||Qo(r))}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Uv.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Uv.prototype,"gamepadDevice",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Uv.prototype,"disableMovements",void 0),Uv=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.GamepadKeyboardController")],Uv);const zv={translation:[0,0,0],heading:0,tilt:0,zoom:0},Bv=80,Vv=Object(dr["h"])(Bv),Gv=.75,Hv=5,qv=Object(dr["h"])(30),Wv=Object(dr["h"])(80),$v={zoom:0,ascend:0,pan:{enabled:!1,matrix:Object(Kd["d"])()},rotate:{enabled:!1,matrix:Object(Kd["d"])()}},Zv=Object(ju["f"])(),Xv=Object(ju["f"])(),Yv=mO();function Jv(e){e.zoom=0,e.ascend=0,e.pan.enabled=!1,Object(Qd["j"])(e.pan.matrix),e.rotate.enabled=!1,Object(Qd["j"])(e.rotate.matrix)}class Qv extends Ha["a"]{constructor(e){super(!0),this.view=e,this.watchHandles=new ge["a"],this.handle=this.registerIncoming("gamepad",e=>this._handleEventGamepad(e)),this.handle.pause()}onInstall(e){super.onInstall(e),this.watchHandles.add([Object(Me["a"])(this.view.navigation.gamepad,"enabled",e=>{e?this.handle.resume():(this.handle.pause(),this.cameraControllerGamepad&&(this.cameraControllerGamepad.finishController(),this.cameraControllerGamepad=null))}),this.view.navigation.gamepad.watch("device",e=>{this.cameraControllerGamepad&&e&&this.cameraControllerGamepad.gamepadDevice!==e&&(this.cameraControllerGamepad.finishController(),this.cameraControllerGamepad=null)})])}onUninstall(){this.watchHandles.removeAll(),super.onUninstall()}_handleEventGamepad(e){const t=this.view.navigation.gamepad.device;if(t&&e.data.device!==t)return;const r=this.cameraControllerGamepad&&this.cameraControllerGamepad.active;if(r||Uv.activatesFor(this.view,e.data)){if(!r){const t=new Uv({view:this.view,gamepadDevice:e.data.device});this.view.state.switchCameraController(t)&&(this.cameraControllerGamepad=t)}this.cameraControllerGamepad&&this.cameraControllerGamepad.active&&this.cameraControllerGamepad.gamepadDevice===e.data.device&&this.cameraControllerGamepad.handleEventGamepad(e.data)}}}var Kv;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.FORWARD=2]="FORWARD",e[e.BACKWARD=3]="BACKWARD",e[e.UP=4]="UP",e[e.DOWN=5]="DOWN",e[e.HEADINGLEFT=6]="HEADINGLEFT",e[e.HEADINGRIGHT=7]="HEADINGRIGHT",e[e.TILTUP=8]="TILTUP",e[e.TILTDOWN=9]="TILTDOWN",e[e.ZOOMIN=10]="ZOOMIN",e[e.ZOOMOUT=11]="ZOOMOUT"}(Kv||(Kv={}));class e_ extends Ha["a"]{constructor(e,t){super(!0),this.view=e,this.disableMovements={pan:!0,zoom:!1,ascend:!0,rotate:!1,mode:As["a"].Local},this.keyToNumber={[t.left]:Kv.LEFT,[t.right]:Kv.RIGHT,[t.forward]:Kv.FORWARD,[t.backward]:Kv.BACKWARD,[t.up]:Kv.UP,[t.down]:Kv.DOWN,[t.headingLeft]:Kv.HEADINGLEFT,[t.headingRight]:Kv.HEADINGRIGHT,[t.tiltUp]:Kv.TILTUP,[t.tiltDown]:Kv.TILTDOWN,[t.zoomIn]:Kv.ZOOMIN,[t.zoomOut]:Kv.ZOOMOUT},this.registerIncoming("key-down",null,e=>this._handleKeyDown(e)),this.registerIncoming("key-up",null,e=>this._handleKeyUp(e)),this.registerIncoming("blur",null,()=>this._handleBlur())}_handleKeyDown(e){if(e.data.native.ctrlKey||e.data.native.metaKey)return;const t=this.keyToNumber[e.data.key];null!=t&&(this.cameraControllerKeyboard&&this.cameraControllerKeyboard.active||(this.cameraControllerKeyboard=new Uv({view:this.view,disableMovements:this.disableMovements}),this.view.state.switchCameraController(this.cameraControllerKeyboard)),this.cameraControllerKeyboard.active&&(this.cameraControllerKeyboard.activateDirection(t),e.stopPropagation()))}_handleBlur(){this.cameraControllerKeyboard&&this.cameraControllerKeyboard.active&&(this.cameraControllerKeyboard.finishController(),this.cameraControllerKeyboard=null)}_handleKeyUp(e){if(e.data.native.ctrlKey||e.data.native.metaKey)return;const t=this.keyToNumber[e.data.key];null!=t&&this.cameraControllerKeyboard&&this.cameraControllerKeyboard.active&&(this.cameraControllerKeyboard.deactivateDirection(t),e.stopPropagation())}}class t_ extends Ha["a"]{constructor(e,t){super(!0),this.view=e,this.registerIncoming("mouse-wheel",t,e=>this._handleMouseWheel(e))}_handleMouseWheel(e){if(!this.view.navigation.mouseWheelZoomEnabled)return;const t=e.data;this.cameraController&&this.cameraController.active||(this.cameraController=this.view.state.isGlobal?new Wy({view:this.view,mode:"interaction"}):new Ky({view:this.view,mode:"interaction"}),this.view.state.switchCameraController(this.cameraController)),this.cameraController.zoomStep(-1/60*t.deltaY,Object(ce["f"])(t.x,t.y)),e.preventDefault(),e.stopPropagation()}}class r_{constructor(e){this._gain=e}reset(e){this._value=e}set gain(e){this._gain=e}get value(){return void 0===this._value?0:this._value}update(e){void 0===this._value?this._value=e:this._value=this._gain*e+(1-this._gain)*this._value}}let i_=class extends wg{constructor(e){super(e),this.view=null,this.beginCamera=new $m["b"],this.elapsedTimeSec=0,this.constraintOptions={selection:Mf.ALL,interactionType:Rf.PAN,interactionFactor:0,interactionStartCamera:new $m["b"],interactionDirection:null,tiltMode:Pf.TUMBLE}}initialize(){this.constraintOptions.interactionType=this.interactionType,this.viewAnimation=new Bs}get steppingFinished(){return this.momentum.isFinished(this.elapsedTimeSec)}onControllerStart(e){this.beginCamera.copyFrom(e),this.constraintOptions.interactionStartCamera=this.beginCamera,super.onControllerStart(e)}stepController(e,t){t.copyViewFrom(this.beginCamera),this.elapsedTimeSec+=e,this.momentumStep(this.elapsedTimeSec,t),Mm(this.view,t,this.constraintOptions)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],i_.prototype,"view",void 0),i_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.momentum.MomentumController")],i_);let n_=class extends i_{constructor(e){super(e),this.interactionType=Rf.PAN,this.tmpPan=Object(ju["f"])()}momentumStep(e,t){const r=this.momentum.value(e);Object($o["g"])(this.tmpPan,this.momentum.direction,r),t.eye=Object($o["l"])(a_,t.eye,this.tmpPan),t.center=Object($o["l"])(a_,t.center,this.tmpPan),this.constraintOptions.interactionDirection=this.tmpPan}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],n_.prototype,"momentum",void 0),n_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.momentum.PanPlanarMomentumController")],n_);const a_=Object(ju["f"])(),s_=Object(ju["f"])(),o_=Object(ju["f"])();let c_=class extends i_{constructor(e){super(e),this.interactionType=Rf.PAN}momentumStep(e,t){const r=this.momentum.value1(e),i=this.momentum.value2(e);Object($o["m"])(o_,t.eye),Object($o["t"])(o_,o_),Object($o["i"])(this.momentum.axis2,o_,this.momentum.axis1),hy(t,s_,this.momentum.axis1,r,this.momentum.axis2,i)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],c_.prototype,"momentum",void 0),c_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.momentum.PanSphericalMomentumController")],c_);let l_=class extends i_{constructor(e){super(e),this.interactionType=Rf.TUMBLE}set center(e){this._set("center",Object(ju["d"])(e))}set axis(e){this._set("axis",Object(ju["d"])(e))}momentumStep(e,t){const r=this.momentum.value(e);Ug(t,this.center,Object(Eg["d"])(this.axis,r))}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],l_.prototype,"momentum",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],l_.prototype,"center",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],l_.prototype,"axis",null),l_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.momentum.MomentumController")],l_);let u_=class extends i_{constructor(e){super(e),this.interactionType=Rf.ZOOM,this.constraintOptions.interactionDirection=Object(ju["f"])()}set zoomCenter(e){this._set("zoomCenter",Object(ju["d"])(e))}momentumStep(e,t){Object($o["m"])(this.constraintOptions.interactionDirection,t.eye);const r=this.momentum.valueDelta(0,e);Vg(t,this.zoomCenter,r,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionDirection=Object($o["x"])(this.constraintOptions.interactionDirection,t.eye,this.constraintOptions.interactionDirection)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],u_.prototype,"momentum",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],u_.prototype,"zoomCenter",null),u_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.momentum.ZoomPlanarMomentumController")],u_);let d_=class extends i_{constructor(e){super(e),this.interactionType=Rf.ZOOM,this.radius=0,this.tmpSceneCenter=Object(ju["f"])(),this.tmpZoomAxisAngle=Object(Eg["b"])(),this.sphere=Object(If["c"])()}set screenCenter(e){this._set("screenCenter",Object(ce["f"])(e[0],e[1]))}set sceneCenter(e){this._set("sceneCenter",Object(ju["d"])(e))}initialize(){this.sphere[3]=this.radius}momentumStep(e,t){const r=this.momentum.valueDelta(0,e);Gg(this.sphere,t,r),this.constraintOptions.interactionType=Rf.ZOOM,Mm(this.view,t,this.constraintOptions),ry(this.sphere,t,this.screenCenter,this.tmpSceneCenter),Object(Eg["c"])(this.sceneCenter,this.tmpSceneCenter,this.tmpZoomAxisAngle),Ug(t,this.sphere,this.tmpZoomAxisAngle),this.constraintOptions.interactionType=Rf.PAN}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],d_.prototype,"momentum",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],d_.prototype,"screenCenter",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],d_.prototype,"sceneCenter",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],d_.prototype,"radius",void 0),d_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.momentum.ZoomSphericalMomentumController")],d_);var h_=r("4e47"),p_=r("0ca1");class f_{constructor(e){this.gain=e}update(e){this.hasFilteredValue?this.filteredValue=(1-this.gain)*this.filteredValue+this.gain*e:this.filteredValue=e}reset(){this.filteredValue=void 0}get hasFilteredValue(){return void 0!==this.filteredValue}}var b_=r("b33e");const m_=1e-5;class g_ extends b_["a"]{constructor(e,t,r,i,n,a=0,s){super(e,t,r),this.angularVelocity1=i,this.axis1=n,this.angularVelocity2=a,this.axis2=s}value1(e){return super.valueFromInitialVelocity(this.angularVelocity1,e)}value2(e){return super.valueFromInitialVelocity(this.angularVelocity2,e)}}class y_{constructor(e=300,t=12,r=.84){this.minimumInitialVelocity=e,this.stopVelocity=t,this.friction=r,this.enabled=!0,this.tmpAxis1=Object(ju["f"])(),this.tmpAxis2=Object(ju["f"])(),this.tmpAngles=Object(vo["b"])(),this.time=new p_["a"](.3),this.screen=[new p_["a"](.4),new p_["a"](.4)],this.angle1=new f_(.6),this.angle2=new f_(.6),this.axis1=Object(ju["f"])(),this.axis2=Object(ju["f"])(),this.lastScene=Object(ju["f"])()}addMomentumDirectRotation(e,t,r,i,n,a){if(this.enabled){if(this.time.hasLastValue){if(this.time.computeDelta(r)<.01)return;let e=sy(this.lastScene,t,this.tmpAxis2,i,n,a);this.angle2.update(0),Object($o["v"])(this.tmpAxis2)<m_?e=0:Object($o["t"])(this.axis1,this.tmpAxis2),this.angle1.update(e),Object($o["m"])(this.lastScene,t)}this.screen[0].update(e[0]),this.screen[1].update(e[1]),this.time.update(r)}}addMomentumPreserveHeading(e,t,r,i,n,a,s){if(this.enabled){if(this.time.hasLastValue){if(this.time.computeDelta(r)<.01)return;uy(this.lastScene,t,this.tmpAxis2,this.tmpAxis1,this.tmpAngles,i,n,a,s,!1),Object($o["v"])(this.tmpAxis2)<m_?(this.angle1.update(0),this.angle2.update(0)):(this.angle1.update(this.tmpAngles[1]),this.angle2.update(this.tmpAngles[0]),Object($o["t"])(this.axis1,this.tmpAxis1),Object($o["t"])(this.axis2,this.tmpAxis2)),Object($o["m"])(this.lastScene,t)}this.screen[0].update(e[0]),this.screen[1].update(e[1]),this.time.update(r)}}reset(){this.screen[0].reset(),this.screen[1].reset(),this.angle1.reset(),this.angle2.reset(),this.time.reset()}evaluateMomentum(){if(!this.enabled||!this.screen[0].hasFilteredDelta)return null;const e=this.screen[0].filteredDelta,t=this.screen[1].filteredDelta,r=Math.sqrt(e*e+t*t)/this.time.filteredDelta;return Math.abs(r)<this.minimumInitialVelocity?null:this.createMomentum(r,this.stopVelocity,this.friction)}createMomentum(e,t,r){const i=this.angle1.filteredValue/this.time.filteredDelta,n=this.angle2.filteredValue/this.time.filteredDelta;return new g_(e,t,r,i,this.axis1,n,this.axis2)}}var O_=r("11d8"),v_=r("8e6f");let __=class extends rO{constructor(e){super(e),this.view=null,this.smoothRotation=new r_(.05),this.rotationAxis=Object(ju["f"])(),this.panningPlane=Object(Ag["d"])(),this.smoothScaling=new r_(.05),this.zoomCenterScreen=Object(ce["f"])(),this.zoomMomentumEstimator=new v_["a"],this.rotationMomentumEstimator=new O_["a"],this.panSphericalMomentumEstimator=new y_,this.panPlanarMomentumEstimator=new h_["a"],this.adjustedSphere=Object(If["c"])(),this.tmp3d=Object(ju["f"])(),this.tmpScreenPointArray=Object(ce["f"])(),this.beginScreenPoint=Object(ce["f"])(),this.beginScenePoint=Object(ju["f"])(),this.screenPickPoint=Object(ce["f"])(),this.navMode=Zg.Horizontal,this.tmpInteractionDirection=Object(ju["f"])(),this.constraintOptions={selection:Mf.ALL,interactionType:Rf.NONE,interactionFactor:0,interactionStartCamera:new $m["b"],interactionDirection:null,tiltMode:Pf.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(e){if(!this.active)return;const t=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=t,this.rotationMomentumEstimator.enabled=t,this.panPlanarMomentumEstimator.enabled=t,this.panSphericalMomentumEstimator.enabled=t,this.beginHeading=-Yu["f"].normalize(Object(dr["h"])(this.view.camera.heading)),this.beginRadius=e.radius,this.pointerCount=e.pointers.size,this.beginAngle=e.angle,this.smoothRotation.reset(),Object(ce["i"])(e.center,this.screenPickPoint),Object(io["c"])(this.beginScreenPoint,this.screenPickPoint);const r=Object(Yd["e"])(this.view.spatialReference),i=Qg(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,r);this.scenePickPoint=i.scenePickPoint,this.sphere=i.sphere,Object($o["m"])(this.beginScenePoint,this.scenePickPoint),this.navMode=Kg(this.startCamera,this.screenPickPoint,i.hasGeometryIntersection,r),this.navMode===Zg.Vertical&&this._preparePlanarPanMode(e),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(e){const t=Object($o["u"])(this.tmp3d,this.startCamera.viewForward);Object(Ag["h"])(this.scenePickPoint,t,this.panningPlane);const r=Object(ce["f"])(this.screenPickPoint[0],0),i=Object(ju["f"])(),n=Object($o["r"])(this.startCamera.eye);this.adjustedSphere[3]=n<this.sphere[3]?n-100:this.sphere[3],ry(this.adjustedSphere,this.startCamera,r,i);const a=Object(ce["d"])();this.startCamera.projectToRenderScreen(i,a);const s=.9*a[1];this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],s),this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint)&&Object(Ag["h"])(this.scenePickPoint,Object(Ag["r"])(this.panningPlane),this.panningPlane);const o=Object(ju["f"])(),c=Object(ju["f"])(),l=Object(ju["f"])(),u=80,d=5,h=50;Object($o["l"])(o,this.scenePickPoint,this.currentCamera.eye),Object($o["t"])(o,o);const p=d*Math.max(Math.abs(this.view.camera.position.z),h),f=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,u),b=f?Math.min(f,p):p;Object($o["m"])(l,Object($o["h"])(c,this.currentCamera.eye,Object($o["g"])(c,o,b))),this.panningPlane[3]=-Object($o["j"])(this.panningPlane,l),this.startCamera.center=Object($o["h"])(c,this.startCamera.eye,Object($o["g"])(c,this.startCamera.viewForward,b));const m=Object(ce["i"])(e.center,this.tmpScreenPointArray);Bg(this.panningPlane,this.startCamera,m,this.beginScenePoint)}update(e){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const t=e.pointers.size>1;this.navMode===Zg.Horizontal?(t&&this._zoomSpherical(e),this._panningSpherical(e),t&&this._rotateSpherical(e)):(t&&this._zoomPlanar(e),this._panningPlanar(e),t&&this._rotatePlanar(e))}end(e){e.pointers.size===this.pointerCount&&this.update(e),this.finishController();const t=this.zoomMomentumEstimator.evaluateMomentum();if(t)return this.navMode===Zg.Horizontal?new d_({view:this.view,momentum:t,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new u_({view:this.view,momentum:t,zoomCenter:this.beginScenePoint});const r=this.rotationMomentumEstimator.evaluateMomentum();if(r)return new l_({view:this.view,momentum:r,center:this.sphere,axis:this.rotationAxis});if(this.navMode===Zg.Horizontal){const e=this.panSphericalMomentumEstimator.evaluateMomentum();if(e)return new c_({view:this.view,momentum:e})}else{const e=this.panPlanarMomentumEstimator.evaluateMomentum();if(e)return new n_({view:this.view,momentum:e})}return null}_zoomSpherical(e){const t=this.beginRadius/e.radius,r=.001875*Math.min(Math.max(e.radius,40),120);this.smoothScaling.gain=r,this.smoothScaling.update(t),Gg(this.sphere,this.currentCamera,this.smoothScaling.value),Object(ce["i"])(e.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*e.timestamp),this.constraintOptions.interactionType=Rf.ZOOM,this.constraintOptions.interactionFactor=Im(e.radius-this.beginRadius),Mm(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(e){const t=Object(ce["i"])(e.center,this.tmpScreenPointArray);ry(this.sphere,this.currentCamera,t,this.tmp3d),py(this.beginScenePoint,Object($o["j"])(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(by(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(t,this.tmp3d,.001*e.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(fy(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(t,this.tmp3d,.001*e.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=Rf.PAN,this.constraintOptions.interactionFactor=Im(this.screenPickPoint,t),Mm(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(e){Object($o["t"])(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||Object($o["u"])(this.rotationAxis,this.rotationAxis);const t=this.smoothRotation.value,r=t+kg(e.angle-t),i=.00125*Math.min(Math.max(e.radius,40),120);this.smoothRotation.gain=i,this.smoothRotation.update(r);const n=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(n,.001*e.timestamp),Ug(this.currentCamera,this.sphere,Object(Eg["d"])(this.rotationAxis,n)),this.constraintOptions.interactionType=Rf.TUMBLE,this.constraintOptions.interactionFactor=Im(e.radius*r),Mm(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(e){const t=Object(ce["i"])(e.center,this.tmpScreenPointArray);Bg(this.panningPlane,this.currentCamera,t,this.tmp3d)&&(ey(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(t,this.tmp3d,.001*e.timestamp),this.constraintOptions.interactionType=Rf.PAN,this.constraintOptions.interactionFactor=Im(this.beginScreenPoint,t),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),Mm(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(e){const t=this.beginRadius/e.radius,r=.001875*Math.min(Math.max(e.radius,40),120);this.smoothScaling.gain=r,this.smoothScaling.update(t),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*e.timestamp),Vg(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=Rf.ZOOM,this.constraintOptions.interactionFactor=Im(e.radius-this.beginRadius),Mm(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(e){Object($o["m"])(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||Object($o["u"])(this.rotationAxis,this.rotationAxis);const t=this.smoothRotation.value;let r=e.angle-t;r=kg(r);const i=t+r,n=.00125*Math.min(Math.max(e.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(i);const a=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(a,.001*e.timestamp),Ug(this.currentCamera,this.sphere,Object(Eg["d"])(this.rotationAxis,a)),this.constraintOptions.interactionType=Rf.TUMBLE,this.constraintOptions.interactionFactor=Im(e.radius*a),Mm(this.view,this.currentCamera,this.constraintOptions)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],__.prototype,"view",void 0),__=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.global.PinchAndPanController")],__);const j_=Object(ju["h"])(0,0,1),w_={ELEVATION_THRESHOLD:3e4,ANGLE_THRESHOLD:16/180*Math.PI},x_=80;let T_=class extends rO{constructor(e){super(e),this.view=null,this.rotationValueSmooth=new r_(.05),this.scalingValueSmooth=new r_(.05),this.planeHorizontal=Object(Ag["d"])(),this.planeVertical=Object(Ag["d"])(),this.rotationMomentumEstimator=new O_["a"],this.panMomentumEstimator=new h_["a"](300,12,.9),this.zoomMomentumEstimator=new v_["a"],this.beginCenter=Object(ju["f"])(),this.tmpPoints=[],this.beginCenterScreen=Object(ce["f"])(),this.tmpCentroid3d=Object(ju["f"])(),this.tmpCentroid2d=Object(ce["f"])(),this.tmp2d=Object(ce["f"])(),this.constraintOptions={selection:Mf.ALL,interactionType:Rf.NONE,interactionFactor:0,interactionStartCamera:new $m["b"],interactionDirection:null,tiltMode:Pf.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(e){if(!this.active)return;const t=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=t,this.rotationMomentumEstimator.enabled=t,this.panMomentumEstimator.enabled=t,this.beginRadius=e.radius,this.pointerCount=e.pointers.size,this.beginAngle=e.angle,this.rotationValueSmooth.reset(),this.scalingValueSmooth.reset(),Object(ce["i"])(e.center,this.beginCenterScreen),Object(Ag["f"])(j_,0,this.planeHorizontal);const r=Object(ju["f"])();this.intersectionHelper.intersectScreenFreePointFallback(this.beginCenterScreen,r);const i=Object(ju["f"])();Object($o["u"])(i,this.startCamera.viewForward);const n=Object(ju["f"])();Object($o["m"])(n,j_);const a=Object($o["j"])(i,n),s=Object(dr["d"])(a<0?-a:a);if(this.panMode=s>=w_.ANGLE_THRESHOLD?Zg.Horizontal:Zg.Vertical,Object(Ag["u"])(this.planeHorizontal,this.planeHorizontal,r),this.startCamera.aboveGround||Object(Ag["q"])(this.planeHorizontal,this.planeHorizontal),this.panMode===Zg.Vertical){Object($o["g"])(n,n,a),Object($o["l"])(this.planeVertical,i,n),Object($o["t"])(this.planeVertical,this.planeVertical),Object(Ag["u"])(this.planeVertical,this.planeVertical,r);const t=Object(ju["f"])(),s=Object(ju["f"])(),o=Object(ju["f"])();Object($o["l"])(t,r,this.currentCamera.eye),Object($o["t"])(t,t);const c=5*Math.max(Math.abs(this.view.camera.position.z),50),l=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),this.beginCenterScreen[0],this.beginCenterScreen[1],this.view.state.camera,x_),u=l?Math.min(l,c):c;Object($o["m"])(o,Object($o["h"])(s,this.currentCamera.eye,Object($o["g"])(s,t,u))),this.planeVertical[3]=-Object($o["j"])(this.planeVertical,o),this.computePlanePoints(e.pointers,this.planeVertical,this.startCamera,this.tmpPoints),qg(this.tmpPoints,this.beginCenter)}else this.computePlanePoints(e.pointers,this.planeHorizontal,this.startCamera,this.tmpPoints),qg(this.tmpPoints,this.beginCenter);this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}update(e){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const t=e.pointers.size>1,r=this.panMode===Zg.Horizontal?this.planeHorizontal:this.planeVertical,i=this.beginCenter;if(t){const t=this.beginRadius/e.radius,r=.001875*Math.min(Math.max(e.radius,40),120);this.scalingValueSmooth.gain=r,this.scalingValueSmooth.update(t),Vg(this.currentCamera,i,this.scalingValueSmooth.value,this.view.state.constraints.minimumPoiDistance),this.zoomMomentumEstimator.add(this.scalingValueSmooth.value,.001*e.timestamp),this.constraintOptions.interactionType=Rf.ZOOM,this.constraintOptions.interactionFactor=Im(Math.abs(e.radius-this.beginRadius)),Mm(this.view,this.currentCamera,this.constraintOptions)}if(this.computePlanePoints(e.pointers,r,this.currentCamera,this.tmpPoints),qg(this.tmpPoints,this.tmpCentroid3d),Object(ce["i"])(e.center,this.tmpCentroid2d),ey(this.currentCamera,i,this.tmpCentroid3d),this.panMomentumEstimator.add(this.tmpCentroid2d,this.tmpCentroid3d,.001*e.timestamp),this.constraintOptions.interactionType=Rf.PAN,this.constraintOptions.interactionFactor=Im(this.beginCenterScreen,this.tmpCentroid2d),Mm(this.view,this.currentCamera,this.constraintOptions),t){const t=this.planeHorizontal,r=i,n=this.rotationValueSmooth.value,a=n+kg(e.angle-n),s=.00125*Math.min(Math.max(e.radius,40),120);this.rotationValueSmooth.gain=s,this.rotationValueSmooth.update(a);const o=this.rotationValueSmooth.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*e.timestamp),Ug(this.currentCamera,r,Object(Eg["d"])(t,o)),this.constraintOptions.interactionType=Rf.TUMBLE,this.constraintOptions.interactionFactor=Im(Math.abs(e.radius*o)),Mm(this.view,this.currentCamera,this.constraintOptions)}}end(e){e.pointers.size===this.pointerCount&&this.update(e),this.finishController();const t=this.zoomMomentumEstimator.evaluateMomentum();if(t)return new u_({view:this.view,momentum:t,zoomCenter:this.beginCenter});const r=this.rotationMomentumEstimator.evaluateMomentum();if(r)return new l_({view:this.view,momentum:r,center:this.beginCenter,axis:Object(Ag["r"])(this.planeHorizontal)});const i=this.panMomentumEstimator.evaluateMomentum();return i?new n_({view:this.view,momentum:i}):null}computePlanePoints(e,t,r,i){i.length=e.size;const n=this.tmp2d;let a=0;return e.forEach(e=>{n[0]=e.x,n[1]=e.y,void 0===i[a]&&(i[a]=Object(ju["f"])()),Bg(t,r,n,i[a]),a+=1}),i}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],T_.prototype,"view",void 0),T_=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.local.PinchAndPanController")],T_);class S_ extends Ha["a"]{constructor(e,t,r){super(!0),this.view=e,this.pointerAction=t,this.lastEndTimestamp=0,this.lastTimestamp=0,this.registerIncoming("drag",r,e=>this._handleDrag(e))}_handleDrag(e){if("mouse"===e.data.pointerType&&!Bo(e.data,this.pointerAction))return;const t=e.timestamp-this.lastEndTimestamp,r=40,i=this.momentum&&this.momentum.active&&t<r;switch(e.data.action){case"start":case"update":if(i)break;this.controller&&this.controller.active?e.data.timestamp-this.lastTimestamp>2&&(this.controller.update(e.data),this.lastTimestamp=e.timestamp):this._startController(e);break;case"end":case"removed":this._endController(e,!0);break;case"added":this._endController(e,!1),this._startController(e)}e.stopPropagation()}_endController(e,t){if(this.controller&&this.controller.active){this.lastEndTimestamp=e.timestamp;const r=this.controller.end(e.data);t&&r&&(this.momentum=r,this.view.state.switchCameraController(this.momentum))}this.controller=null}_startController(e){this.controller=this._createController(),this.view.state.switchCameraController(this.controller),this.controller.begin(e.data),this.lastTimestamp=e.timestamp}_createController(){return this.view.state.isGlobal?new __({view:this.view}):new T_({view:this.view})}}class E_ extends Ha["a"]{constructor(e,t){super(!0),this.view=e,this.registerIncoming("pointer-down",t,()=>this.view.state.stopActiveCameraController())}}class A_ extends Ha["a"]{constructor(e,t){super(!0),this.key=e,this.registerIncoming("key-down",t,e=>this._handleKeyDown(e))}_handleKeyDown(e){e.data.key===this.key&&(this.activate(),e.stopPropagation())}}class C_ extends A_{constructor(e,t,r){super(t,r),this.view=e}activate(){this.view.goTo({heading:0}).catch(()=>{})}}class R_ extends A_{constructor(e,t,r){super(t,r),this.view=e}activate(){this.view.goTo({tilt:0}).catch(()=>{})}}class M_ extends Ha["a"]{constructor(e,t=!1){super(!0),this.view=e,this.invert=t,this.registerIncoming("vertical-two-finger-drag",e=>this._handleTwoFinger(e))}_handleTwoFinger(e){var t,r,i;const n=this.invert?-1:1,a=Object(ce["f"])(0,e.data.delta*n);switch(e.data.action){case"begin":null==(t=this.cameraController)||t.end(),this.cameraController=new sO({view:this.view,pivot:iO.CENTER}),this.view.state.switchCameraController(this.cameraController),this.cameraController.begin(a);break;case"update":null==(r=this.cameraController)||r.update(a);break;case"end":null==(i=this.cameraController)||i.end(),this.cameraController=null}}}class P_ extends Ha["a"]{constructor(e=20,t=40){super(!1),this._threshold=e,this._maxDelta=t,this.state="ready",this.emittedArtificalEnd2=!1,this._vertical=this.registerOutgoing("vertical-two-finger-drag"),this._artificalDrag=this.registerOutgoing("drag"),this.dragEventSeparator=new Ho({start:(e,t)=>this._observeStart(e,t),update:(e,t,r)=>this._observeUpdate(e,t,r),end:(e,t)=>this._observeEnd(t)}),this.registerIncoming("drag",e=>this.dragEventSeparator.handle(e))}get failed(){return"failed"===this.state}_observeStart(e,t){1===e&&this.emittedArtificalEnd2&&(this.emittedArtificalEnd2=!1,this._artificalDrag.emit({action:"start",button:t.data.button,buttons:t.data.buttons,pointerType:t.data.pointerType,timestamp:t.data.timestamp,pointers:t.data.pointers,pointer:t.data.pointer,angle:t.data.angle,radius:t.data.radius,center:t.data.center}),t.stopPropagation()),this.state=2===e?"ready":"failed"}_observeUpdate(e,t,r){if("failed"!==this.state&&2===e)return"active"===this.state?(this._vertical.emit({delta:t.data.center.y-this._thresholdReachedCenter.y,action:"update"}),void t.stopPropagation()):void(this._checkMovementWithinLimits(t.data,r.data)?this._checkVerticalThresholdReached(t.data,r.data)&&(this.state="active",this.emittedArtificalEnd2=!0,this._thresholdReachedCenter=t.data.center,this._artificalDrag.emit({action:"end",button:t.data.button,buttons:t.data.buttons,pointerType:t.data.pointerType,timestamp:t.data.timestamp,pointers:t.data.pointers,pointer:t.data.pointer,angle:t.data.angle,radius:t.data.radius,center:t.data.center}),this._vertical.emit({delta:t.data.center.y-this._thresholdReachedCenter.y,action:"begin"}),t.stopPropagation()):this.state="failed")}_observeEnd(e){"active"===this.state&&(this._vertical.emit({delta:e.data.center.y-this._thresholdReachedCenter.y,action:"end"}),this.state="ready",e.stopPropagation())}_checkMovementWithinLimits(e,t){let r=-1/0,i=1/0,n=-1/0,a=1/0;t.pointers.forEach(e=>{r=Math.max(r,e.x),i=Math.min(i,e.x),n=Math.max(n,e.y),a=Math.min(a,e.y)});let s=-1/0,o=1/0,c=-1/0,l=1/0;e.pointers.forEach(e=>{s=Math.max(s,e.x),o=Math.min(o,e.x),c=Math.max(c,e.y),l=Math.min(l,e.y)});const u=r-i,d=n-a,h=s-o,p=c-l;return Math.abs(e.center.x-t.center.x)<this._threshold&&Math.abs(h-u)<=this._maxDelta&&Math.abs(p-d)<=this._maxDelta}_checkVerticalThresholdReached(e,t){let r=Math.abs(e.center.y-t.center.y);return e.pointers.forEach((e,i)=>{const n=t.pointers.get(i);r=Math.min(r,Math.abs(e.y-n.y))}),r>=this._threshold}}let I_=class extends F["a"]{constructor(){super(...arguments),this._handles=new ge["a"]}destroy(){this._handles&&(this._handles.removeAll(),this._handles=null),this.disconnect()}get primaryDragAction(){return this._get("primaryDragAction")}set primaryDragAction(e){"pan"!==e&&"rotate"!==e||e===this._get("primaryDragAction")||(this._set("primaryDragAction",e),this._updateMode())}get mode(){return this._get("mode")}set mode(e){"default"!==e&&"pro"!==e||e===this._get("mode")||(this._set("mode",e),this._updateMode())}disconnect(){this.view.viewEvents.disconnect(),this._inputManager&&(this._inputManager.destroy(),this._inputManager=null),this._source&&(this._source.destroy(),this._source=null)}connect(){const e=this.view;this._source=new jc(this.view.surface,e.input);const t=[new Uc,new Bc,new Rc,new Dc(this.view.navigation),new P_],r=new Cn["a"]({eventSource:this._source,recognizers:t});this._inputManager=r,r.installHandlers("prevent-context-menu",[new xc],Cn["b"].INTERNAL),this._modeDragPan=new S_(e,"primary"),this._modeDragRotate=new cO(e,"secondary",iO.CENTER),this._modeDragZoom=new pO(e,"tertiary");const i={lookAround:"b",pan:{left:"ArrowLeft",right:"ArrowRight",forward:"ArrowUp",backward:"ArrowDown",up:"u",down:"j",headingLeft:"a",headingRight:"d",tiltUp:"w",tiltDown:"s",zoomIn:"+",zoomOut:"-"},resetHeading:"n",resetTilt:"p"};r.installHandlers("navigation",[new E_(e),new tO(e),new Qv(e),new e_(e,i.pan),new t_(e),new R_(e,i.resetTilt),new C_(e,i.resetHeading),new cO(e,"primary",iO.EYE,[i.lookAround]),new cO(e,"secondary",iO.CENTER,[i.lookAround]),new S_(e,"tertiary",[i.lookAround]),this._modeDragRotate,this._modeDragZoom,this._modeDragPan,new M_(e)],Cn["b"].INTERNAL),this.view.viewEvents.connect(r),this._updateMode(),Object(Me["a"])(this.view.navigation,"browserTouchPanEnabled",e=>{this._source.browserTouchPanningEnabled=!e})}_updateMode(){const e=this.mode,t=this.primaryDragAction,r=D_.get(e).get(t);this._modeDragPan&&(this._modeDragPan.pointerAction=r.pan),this._modeDragRotate&&(this._modeDragRotate.pointerAction=r.rotate),this._modeDragZoom&&(this._modeDragZoom.pointerAction=r.zoom)}get test(){return{inputManager:this._inputManager,modeDragPan:this._modeDragPan,modeDragRotate:this._modeDragRotate,modeDragZoom:this._modeDragZoom}}};Object(l["a"])([Object(j["b"])()],I_.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({value:"pan"})],I_.prototype,"primaryDragAction",null),Object(l["a"])([Object(j["b"])({value:"default"})],I_.prototype,"mode",null),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_inputManager.hasPendingInputs"})],I_.prototype,"hasPendingInputs",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"_inputManager.latestPointerType"})],I_.prototype,"latestPointerType",void 0),Object(l["a"])([Object(j["b"])()],I_.prototype,"_inputManager",void 0),I_=Object(l["a"])([Object(x["a"])("esri.views.3d.input.SceneInputManager")],I_);const D_=new Map,L_=new Map,N_=new Map;L_.set("pan",{pan:"primary",rotate:"secondary",zoom:"tertiary"}),L_.set("rotate",{pan:"secondary",rotate:"primary",zoom:"tertiary"}),N_.set("pan",{pan:"primary",rotate:"tertiary",zoom:"secondary"}),N_.set("rotate",{pan:"tertiary",rotate:"primary",zoom:"secondary"}),D_.set("default",L_),D_.set("pro",N_);const F_=I_;var k_=r("8a44"),U_=r("7577"),z_=r("6611");let B_,V_,G_=!1,H_=!1,q_=!1,W_=!1,$_=null;function Z_(e,t){if(!H_||!V_)return;Y_();const r=V_;let i=0;for(let n=0;n<e.accBinsNumX;n++)for(let t=0;t<e.accBinsNumY;t++){const a=e.accBins[n][e.accBinsNumY-1-t];i+=a.length;const s=n*e.accBinsSizeX,o=(n+1)*e.accBinsSizeX,c=t*e.accBinsSizeY,l=(t+1)*e.accBinsSizeY;r.fillText(a.length.toFixed(),s+5,c+15),Q_(s,o,c,l,"blue")}r.fillText("total totalShownLabels: "+i,70,40),r.fillText("total visible labels: "+t.size,70,50),r.fillText("total numTests: "+e.accNumTests,70,30)}function X_(e){q_=z_["a"].DECONFLICTOR_SHOW_VISIBLE,W_=z_["a"].DECONFLICTOR_SHOW_INVISIBLE,G_=q_||W_,H_=z_["a"].DECONFLICTOR_SHOW_GRID,$_=null,G_||H_?$_=()=>J_(e):B_&&(B_.parentElement.removeChild(B_),B_=null)}function Y_(){$_&&($_(),$_=null)}function J_(e){null==B_&&(B_=document.createElement("canvas"),B_.setAttribute("id","canvas2d"),e.surface.parentElement.style.position="relative",e.surface.parentElement.appendChild(B_));const t=e.width*e.pixelRatio,r=e.height*e.pixelRatio;B_.setAttribute("width",t+"px"),B_.setAttribute("height",r+"px"),B_.setAttribute("style",`position:absolute;left:0px;top:0px;display:block;pointer-events:none;width:${e.width}px;height:${e.height}px`),V_=B_.getContext("2d"),V_.clearRect(0,0,e.width,e.height),V_.font="12px Arial"}function Q_(e,t,r,i,n){Y_();const a=B_.height,s=V_;s.beginPath(),s.lineWidth=1,s.strokeStyle=n,s.moveTo(e,a-r),s.lineTo(t,a-r),s.stroke(),s.lineTo(t,a-i),s.stroke(),s.lineTo(t,a-r),s.stroke(),s.lineTo(e,a-r),s.stroke(),s.lineTo(e,a-r),s.stroke(),s.closePath()}function K_(e,t){G_&&(t&&q_||!t&&W_)&&Q_(e.aabr[0],e.aabr[2],e.aabr[1],e.aabr[3],t?"green":"red")}var ej=r("6431"),tj=r("da1c"),rj=r("2df1");const ij=Object(ju["f"])(),nj=Object(Xd["e"])(),aj=Object(Xd["e"])(),sj=Object(ju["f"])(),oj=Object(Kd["d"])(),cj=Object(If["c"])(),lj=Object(Df["c"])(),uj=Object(ju["f"])(),dj=Object(wu["l"])();class hj{constructor(){this.aabr=Object(wu["l"])(),this.distance=0,this.culled=!1,this.visible=!1}}class pj{constructor(e,t,r={}){this.graphics3DGraphic=e,this.slicePlaneEnabled=t,this.info=r}}class fj{constructor(){this.active=new Map,this.visible=new Map}clear(){this.active.clear(),this.visible.clear()}}class bj{}class mj{constructor(){this.sortArray=new k_["a"]({allocator:e=>e||new bj})}}var gj;!function(e){e[e.Idle=0]="Idle",e[e.Process=1]="Process",e[e.Sort=2]="Sort",e[e.Deconflict=3]="Deconflict",e[e.NumStates=4]="NumStates"}(gj||(gj={}));class yj{constructor(){this.camera=new $m["b"],this.slicePlane=Object(xu["d"])(),this.slicePlaneEnabled=!1}copyFrom(e){this.camera.copyFrom(e.camera),Object(xu["b"])(e.slicePlane,this.slicePlane),this.slicePlaneEnabled=e.slicePlaneEnabled}}let Oj=class extends F["a"]{constructor(){super(...arguments),this._dirty=!1,this._runningViewState=new yj,this._state=gj.Idle,this.graphics=new fj,this.iterators=new mj,this.accBinsNumX=15,this.accBinsNumY=20,this.accBinsSizeX=0,this.accBinsSizeY=0,this.accBins=null,this.accNumTests=0}get dirty(){return this._dirty}get state(){return this._state}destroy(){this.graphics.clear(),this.iterators=null}setDirty(){!this._dirty&&this.graphics.active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==gj.Idle||this._dirty}get updatingProgress(){if(!this.updating)return 1;const e=this._state/gj.NumStates;return this._dirty?.5*e:e}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(e){switch(this._state){case gj.Idle:this._startUpdate(),e.madeProgress();case gj.Process:if(this._state=gj.Process,!this._processActiveGraphics(e))return;case gj.Sort:if(this._state=gj.Sort,!this._sortVisibleGraphics(e))return;case gj.Deconflict:if(this._state=gj.Deconflict,!this._deconflictVisibleGraphics(e))return;default:Z_(this,this.graphics.visible),this._state=gj.Idle,this.notifyChange("updating")}}modifyGraphics(e,t){t?e.forEach(e=>this.addToActiveGraphics(e)):e.forEach(e=>this.removeFromActiveGraphics(e)),this.setDirty()}layerSupportsDeconfliction(e){if(Object(z["j"])(e)||"object3d"!==e.type)return!1;const t=e.stageObject;return 1===(t?t.geometryRecords.length:0)&&t.geometryRecords[0].material instanceof rj["a"]}_startUpdate(){X_(this.view),this._dirty=!1,this._runningViewState.copyFrom(this.viewState);const{fullWidth:e,fullHeight:t}=this._runningViewState.camera;this._initBins(e,t),this._resetIterators()}addToActiveGraphics(e){e.info[this.visibilityGroup]=new hj,this.graphics.active.set(e.graphics3DGraphic.graphic.uid,e),this.setDirty()}removeFromActiveGraphics(e){this._removeFromVisibleGraphics(e),vj(e,this.visibilityGroup),delete e.info[this.visibilityGroup],this.graphics.active.delete(e.graphics3DGraphic.graphic.uid),this.setDirty()}_addToVisibleGraphics(e){this.graphics.visible.set(e.graphics3DGraphic.graphic.uid,e)}_removeFromVisibleGraphics(e){this.graphics.visible.delete(e.graphics3DGraphic.graphic.uid)}_processActiveGraphics(e){const t=this._ensureActiveGraphicsIterator(),r=Object(Qd["b"])(oj,this._runningViewState.camera.projectionMatrix),i="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._runningViewState.camera.relativeElevation>0?cj:null;let n=0;for(Object(z["k"])(i)&&(Object($o["s"])(i,ju["c"],this._runningViewState.camera.viewMatrix),i[3]=Object(Yd["e"])(this.view.spatialReference).radius,n=Object(If["d"])(i,ju["c"]));!e.done;){e.madeProgress();const a=t.next();if(!0===a.done)return this._resetActiveGraphicsIterator(),!0;const s=a.value,o=s&&s.info[this.visibilityGroup];o&&(this._collectGraphics3DGraphics(s,r,i,n),o.culled?this._removeFromVisibleGraphics(s):this._addToVisibleGraphics(s))}return!1}_sortVisibleGraphics(e){const t=this._ensureSortGraphicsIterator();for(;!e.done;){const r=t.next();if(e.madeProgress(),!0===r.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(e){const t=this._ensureVisibleGraphicsIterator(),r=this.visibilityGroup===ej["b"].LABEL;for(;!e.done;){e.madeProgress();const i=t.next();if(!0===i.done)return this._resetVisibleGraphicsIterator(),!0;const n=i.value,a=n.info[this.visibilityGroup];if(!a||a.culled)continue;const s=n.graphics3DGraphic,o=(!r||s.isVisible())&&!this._isConflicted(n);o&&this._addToBins(n),a.visible=o,this._setGraphicVisibility(n,o),K_(a,o)}return!1}_resetIterators(){this.iterators.active=null,this.iterators.visible=null,this.iterators.sort=null}_ensureActiveGraphicsIterator(){return this.iterators.active||(this.iterators.active=_j(this.graphics.active)),this.iterators.active}_resetActiveGraphicsIterator(){this.iterators.active=null}_ensureVisibleGraphicsIterator(){return this.iterators.visible||(this.iterators.visible=_j(this.graphics.visible)),this.iterators.visible}_resetVisibleGraphicsIterator(){this.iterators.visible=null}_ensureSortGraphicsIterator(){return this.iterators.sort||(this.iterators.sort=jj(this.graphics.visible,this.iterators.sortArray,this.visibilityGroup)),this.iterators.sort}_resetSortGraphicsIterator(){this.iterators.sort=null}_collectGraphics3DGraphics(e,t,r,i){const n=e.graphics3DGraphic;if(n.destroyed)return;const a=e.info[this.visibilityGroup];if(!n.isVisible(ej["b"].GRAPHIC,ej["a"].DECONFLICTION))return void(a.culled=!0);const s=this.getGraphicsLayers(n);Object(wu["n"])(a.aabr);let o=null;for(const c of s){if(!this.layerSupportsDeconfliction(c))continue;const n=c.stageObject.geometryRecords[0].material;if(Object(z["j"])(o)){if(o=this._getProjectionInfo(c,t,Tj),o.isOutsideScreen||this._isCulledBySlice(e,ij)||Object(z["k"])(r)&&this._isCulledByHorizon(o,r,i))return void(a.culled=!0);!z_["a"].TESTS_DISABLE_OPTIMIZATIONS&&a.visible&&(o.distance*=.7)}this._expandBoundingRect(a,c,n,o)}Object(z["j"])(o)?a.culled=!0:(a.distance=o.distance,a.culled=!1)}_getProjectionInfo(e,t,r){const i=this._runningViewState.camera,n=e.stageObject,a=n.geometryRecords[0],s=a.material,o=Object(If["g"])(n.boundingVolumeWorldSpace.bounds);Object($o["s"])(ij,o,i.viewMatrix);const c=a.geometry.vertexAttributes,l=c.get(Yh["a"].NORMAL).data,u=c.get(Yh["a"].AUXPOS1).data;return s.applyShaderOffsetsView(ij,l,n.transformation,u,i,r.scaleInfo,ij),Object(U_["l"])(nj,ij[0],ij[1],ij[2],1),Object(U_["m"])(aj,nj,i.projectionMatrix),Object($o["g"])(r.positionNDC,aj,1/aj[3]),s.applyShaderOffsetsNDC(r.positionNDC,u,i,r.positionNDC,sj),r.distanceWithoutPolygonOffset=i.depthNDCToWorld(sj[2]),r.distance=sj[2]===r.positionNDC[2]?r.distanceWithoutPolygonOffset:i.depthNDCToWorld(r.positionNDC[2]),Object(U_["l"])(aj,r.positionNDC[0],r.positionNDC[1],r.positionNDC[2],1),Object(U_["m"])(nj,aj,t),Object(U_["b"])(nj,nj,1/nj[3]),Object($o["y"])(r.positionView,ij[0],ij[1],ij[2]),r}_isCulledByHorizon(e,t,r){return Object($o["m"])(lj.direction,e.positionView),Object($o["y"])(lj.origin,0,0,0),!!Object(If["e"])(t,lj,uj)&&e.distanceWithoutPolygonOffset>r}_isCulledBySlice(e,t){return e.slicePlaneEnabled&&this._runningViewState.slicePlaneEnabled&&Object(xu["f"])(this._runningViewState.slicePlane,t)}_expandBoundingRect(e,t,r,{positionNDC:i,scaleInfo:n}){const a=this._runningViewState.camera,s=t.getScreenSize(wj);Object(tj["a"])(s,n.factor,s),s[0]*=a.pixelRatio,s[1]*=a.pixelRatio;const o=Object(wu["A"])(r.calculateRelativeScreenBounds(s,n.factorAlignment.scale,dj),Object(dr["l"])(0,a.fullWidth,.5+.5*i[0]),Object(dr["l"])(0,a.fullHeight,.5+.5*i[1])),c=this.iconMarginFactor;if(0!==c){const e=c*Math.min(Object(wu["C"])(o),Object(wu["u"])(o));o[0]-=e,o[1]-=e,o[2]+=e,o[3]+=e}Object(wu["p"])(e.aabr,o,e.aabr)}_isConflicted(e){const t=e.graphics3DGraphic.graphic.uid,r=e.info[this.visibilityGroup];for(let i=Math.floor(r.aabr[0]/this.accBinsSizeX);i<=Math.floor(r.aabr[2]/this.accBinsSizeX);i++)if(!(i<0||i>=this.accBinsNumX))for(let e=Math.floor(r.aabr[1]/this.accBinsSizeY);e<=Math.floor(r.aabr[3]/this.accBinsSizeY);e++){if(e<0||e>=this.accBinsNumY)continue;const n=this.accBins[i][e];for(let e=0;e<n.length;e++){const i=n.data[e],a=i.info[this.visibilityGroup];if(a&&a.visible&&i.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,Object(wu["w"])(a.aabr,r.aabr)))return!0}}return!1}_initBins(e,t){if(null==this.accBins){this.accBins=[];for(let e=0;e<this.accBinsNumX;e++){this.accBins.push([]);const e=this.accBins[this.accBins.length-1];for(let t=0;t<this.accBinsNumY;t++)e.push(new k_["a"])}}else for(let r=0;r<this.accBinsNumX;r++)for(let e=0;e<this.accBinsNumY;e++)this.accBins[r][e].clear();this.accBinsSizeX=e/this.accBinsNumX,this.accBinsSizeY=t/this.accBinsNumY,this.accNumTests=0}_addToBins(e){const t=e.info[this.visibilityGroup],r=Math.floor(t.aabr[0]/this.accBinsSizeX),i=Math.floor(t.aabr[2]/this.accBinsSizeX),n=Math.floor(t.aabr[1]/this.accBinsSizeY),a=Math.floor(t.aabr[3]/this.accBinsSizeY);for(let s=r;s<=i;s++)if(!(s<0||s>=this.accBinsNumX))for(let t=n;t<=a;t++)t<0||t>=this.accBinsNumY||this.accBins[s][t].push(e)}_setGraphicVisibility(e,t){const r=e.graphics3DGraphic;r.destroyed||(r.setVisibilityFlag(ej["a"].DECONFLICTION,t,this.visibilityGroup),this.visibilityGroup===ej["b"].LABEL&&this.view.labeler.setLabelGraphicVisibility(r,t))}};function vj(e,t){const r=e.graphics3DGraphic;r.destroyed||r.clearVisibilityFlag(ej["a"].DECONFLICTION,t)}function*_j(e){if(Map.prototype.entries){const t=e.entries();for(let e=t.next();!e.done;e=t.next())yield e.value[1]}else yield*e.values()}function*jj(e,t,r){t.clear(),e.forEach((e,i)=>{const n=t.pushNew();n.id=i,n.prio=e.info?-e.info[r].distance:Number.MAX_VALUE}),yield;const i=t.iterableSort((e,t)=>t.prio-e.prio);for(let n=i.next();!n.done;n=i.next())yield;t.forAll(t=>{const r=e.get(t.id);r&&(e.delete(t.id),e.set(t.id,r))}),t.clear()}Object(l["a"])([Object(j["b"])({constructOnly:!0})],Oj.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],Oj.prototype,"updating",null),Oj=Object(l["a"])([Object(x["a"])("esri.views.3d.layers.graphics.Deconflictor")],Oj);const wj=Object(vo["b"])();class xj{constructor(){this.positionView=Object(ju["f"])(),this.positionNDC=Object(ju["f"])(),this.distance=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}}}get isOutsideScreen(){const e=this.positionNDC;return e[0]<-1||e[1]<-1||e[2]<-1||e[0]>=1||e[1]>=1}}const Tj=new xj,Sj=2e3;let Ej=class extends Oj{constructor(){super(...arguments),this.visibilityGroup=ej["b"].LABEL,this.iconMarginFactor=0,this._lastDeconfliction=0}get viewState(){return this.parent.viewState}runTask(e){if(this.parent.running)return;const t=performance.now();(e.state===Ba["b"].IDLE||t-this._lastDeconfliction>Sj)&&(super.runTask(e),this.state===gj.Idle&&(this._lastDeconfliction=t))}enabledChanged(e,t){this.modifyGraphics(t,e.labelsEnabled)}getGraphicsLayers(e){return e.labelGraphics}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ej.prototype,"parent",void 0),Ej=Object(l["a"])([Object(x["a"])("esri.views.3d.layers.graphics.LabelDeconflictor")],Ej);let Aj=class extends Oj{constructor(){super(...arguments),this._handles=new ge["a"],this._contexts=new Map,this._viewState=new yj,this.visibilityGroup=ej["b"].GRAPHIC,this._iconMarginFactor=-.1}get labels(){return this._labels}get viewState(){return this._viewState}initialize(){this._handles.add([this.view.watch("state.camera",()=>{this._updateViewState(),this.setDirty()}),this.view.watch("map.ground.opacity",(e,t)=>{1!==e&&1!==t||this.setDirty()}),Object(Me["a"])(this.view,"slicePlane",()=>{this._updateSlicePlane(),this._slicePlaneChanged()})]),this._frameTask=this.view.resourceController.scheduler.registerTask(Ba["c"].GRAPHICS_DECONFLICTOR,this),this._labels=new Ej({view:this.view,parent:this})}destroy(){this._labels.destroy(),this._labels=null,this._handles.destroy(),this._handles=null,this._frameTask&&(this._frameTask.remove(),this._frameTask=null)}get iconMarginFactor(){return this._iconMarginFactor}set iconMarginFactor(e){this._iconMarginFactor=e,this.setDirty()}setDirty(){this._contexts.size>0&&(super.setDirty(),this._labels.setDirty())}runTask(e){super.runTask(e),this.running||this._labels.setDirty()}setInitialIconVisibilityFlag(e,t){const r=!(this._graphicSupportsDeconfliction(t)&&Cj(e));t.setVisibilityFlag(ej["a"].DECONFLICTION,r,ej["b"].GRAPHIC)}_updateViewState(){this.view&&this.view.state&&(this._viewState.camera.copyFrom(this.view.state.camera),this._updateSlicePlane())}_updateSlicePlane(){const e=this.view?this.view.slicePlane:null;Object(z["k"])(e)&&Object(xu["k"])(e,this._viewState.camera.viewMatrix,this._viewState.slicePlane),this._viewState.slicePlaneEnabled=Object(z["k"])(e)}_slicePlaneChanged(){Object(Da["c"])(this._contexts,(e,t)=>t.symbolCreationContext.slicePlaneEnabled)&&this.setDirty()}addGraphicsOwner(e){let t=this._contexts.get(e);return null==t&&(t=new Map,this._contexts.set(e,t),this.setDirty()),{addGraphic:r=>this._addGraphic(e,t,r),removeGraphic:e=>this._removeGraphic(t,e),labelingInfoChange:()=>this._labels.enabledChanged(e,t),featureReductionChange:()=>this.enabledChanged(e,t),slicePlaneEnabledChange:()=>this._slicePlaneEnabledChanged(e,t),clear:()=>t.forEach(e=>this._removeGraphic(t,e.graphics3DGraphic))}}removeGraphicsOwner(e){const t=this._contexts.get(e);t&&(t.forEach(e=>this._removeGraphic(t,e.graphics3DGraphic)),this._contexts.delete(e),this.setDirty())}_addGraphic(e,t,r){const i=r.graphic.uid,n=new pj(r,e.symbolCreationContext.slicePlaneEnabled);t.set(i,n),Cj(e)&&this.addToActiveGraphics(n),e.labelsEnabled&&this._labels.addToActiveGraphics(n)}_removeGraphic(e,t){const r=t.graphic.uid,i=e.get(r);i&&(this.removeFromActiveGraphics(i),this._labels.removeFromActiveGraphics(i),e.delete(r),this.setDirty())}enabledChanged(e,t){const r=Cj(e);r||Rj(e),this.modifyGraphics(t,r)}_slicePlaneEnabledChanged(e,t){const r=e.symbolCreationContext.slicePlaneEnabled;t.forEach(e=>e.slicePlaneEnabled=r),this.setDirty()}getGraphicsLayers(e){return e.graphics}_graphicSupportsDeconfliction(e){if(e.isDraped)return!1;const t=e.graphics;if(!t||!t.length)return!1;for(const r of t)if(this.layerSupportsDeconfliction(r))return!0;return!1}};function Cj(e){const t=e.layer;return!(!t||!t.featureReduction||"selection"!==t.featureReduction.type)}function Rj(e){const t=e.graphics3DGraphics;t&&t.forEach(e=>e.clearVisibilityFlag(ej["a"].DECONFLICTION))}Aj=Object(l["a"])([Object(x["a"])("esri.views.3d.layers.graphics.GraphicsDeconflictor")],Aj);var Mj=r("d3cf"),Pj=r("ccac"),Ij=r("38bf"),Dj=r("1a64"),Lj=r("e6bc"),Nj=r("6339"),Fj=r("e384");function kj(e){return e instanceof Fj["a"]?e.graphics3DSymbol:e instanceof Nj["a"]?e:null}var Uj=r("4261");const zj=v["a"].getLogger("esri.views.3d.layers.graphics.labelPlacement");function Bj(e){const t=ew(e);if(Object(z["j"])(t))return null;const r=Vj(e,t);if(Object(z["j"])(r))return null;const i=r.anchor,n=!!t.hasLabelVerticalOffset;return $j({anchor:i,verticalOffset:t.verticalOffset,screenOffset:Object(vo["b"])(),centerOffset:Object(Xd["g"])(0,0,0,-1),centerOffsetUnits:"world",translation:Object(ju["f"])(),elevationOffset:0,hasLabelVerticalOffset:n},r,e)}function Vj(e,t){if(t.anchor)return t;const r=e.labelClass.labelPlacement,i=rw[r],n=i||Wj(e);return r&&!i&&zj.warnOncePerTick(`the requested label placement '${r}' is not currently supported in SceneView`),Hj(n,e)}function Gj(e){const t=e.graphics3DGraphic.graphics3DSymbol,r=kj(t);return Object(z["k"])(r)?r.symbol.symbolLayers.getItemAt(0):null}function Hj(e,t){const r=t.graphics3DGraphic.graphic.geometry;if(Object(z["j"])(r))return null;if(Object(z["k"])(t.disablePlacement))return t.labelClass.labelPlacement?(zj.warnOncePerTick(qj(e.placement,t.disablePlacement.logEntityDescription)),Wj(t)):e;const i=r.type;switch(i){case"polyline":case"polygon":case"extent":case"multipoint":if(t.labelClass.labelPlacement)return zj.warnOncePerTick(qj(e.placement,`'${i}' geometries`)),Wj(t);break;case"point":case"mesh":return e}return e}function qj(e,t){return`the requested label placement '${e}' is currently unsupported for ${t} in SceneView`}function Wj(e){const t=e.graphics3DGraphic.graphic.geometry;if(Object(z["j"])(t))return null;switch(t.type){case"polyline":case"extent":case"multipoint":return{placement:"center-center",normalizedOffset:null,anchor:"center"};case"polygon":{const t=Gj(e);return Object(z["k"])(t)&&"extrude"===t.type?rw["above-center"]:{placement:"center-center",normalizedOffset:null,anchor:"center"}}case"point":case"mesh":return rw["above-center"];default:return}}function $j(e,t,r){const i=r.graphics3DGraphic.graphic.geometry;if(Object(z["j"])(i))return null;switch(i.type){case"point":Xj(e,t,r);break;case"polygon":Zj(e,t,r);break;case"mesh":Qj(e,t,r.graphics3DGraphic.graphics[0])}return e}function Zj(e,t,r){const i=Gj(r);if(!Object(z["j"])(i))switch(i.type){case"extrude":{const i=r.graphics3DGraphic.graphics[0];Object(z["k"])(i)?(i.getBoundingBoxObjectSpace(sw),Object(Uj["e"])(sw,e.translation),e.translation[2]=Object(Uj["u"])(sw)/2):Object($o["y"])(e.translation,0,0,0),Qj(e,t,i);break}}}function Xj(e,t,r){const i=Gj(r);if(Object(z["j"])(i))return;const n=r.graphics3DGraphic.graphics[0];switch(Object(z["k"])(n)?n.getCenterObjectSpace(e.translation):Object($o["y"])(e.translation,0,0,0),i.type){case"icon":case"text":Yj(e,t,r,n);break;case"object":Qj(e,t,n)}}function Yj(e,t,r,i){const{graphics3DGraphic:n}=r,a=Object(z["k"])(i)?i.getScreenSize():null;if(!n.isDraped&&Object(z["k"])(a)){const i=Jj(r);nw[0]=a[0]/2*(t.normalizedOffset[0]-i[0]),nw[1]=a[1]/2*(t.normalizedOffset[1]-i[1]),e.screenOffset[0]=nw[0],e.hasLabelVerticalOffset?(e.centerOffset[1]=nw[1],e.centerOffsetUnits="screen"):e.screenOffset[1]=nw[1]}else e.hasLabelVerticalOffset||"center"===e.anchor||(rw[r.labelClass.labelPlacement]&&zj.warnOncePerTick(`the requested placement '${t.placement}' is currently unsupported for draped graphics`),e.anchor="center")}function Jj(e,t=aw){const{graphics3DGraphic:r}=e,i=r.graphics[0],n=Object(z["k"])(i)?i.stageObject.geometryRecords[0].material:null;if(n&&n instanceof rj["a"]){const e=n.parameters.anchorPos;t[0]=2*(e[0]-.5),t[1]=2*(e[1]-.5)}else t[0]=0,t[1]=0;return t}function Qj(e,t,r){const i=Object(z["k"])(r)?r.getBoundingBoxObjectSpace(sw):sw,n=Object(ju["h"])(i[3]-i[0],i[4]-i[1],i[5]-i[2]),a=Math.sqrt(n[0]*n[0]+n[1]*n[1]);e.centerOffset[0]=a/2*t.normalizedOffset[0];const s=e.translation[2],o=n[2]/2*t.normalizedOffset[1];e.translation[2]=0,e.elevationOffset=s+o;const c=Object($o["r"])(n);e.centerOffset[2]=c/2*t.normalizedOffset[2]}function Kj(e){return"above-center"===e}function ew(e){const t=e.labelClass.labelPlacement,{labelSymbol:r,graphics3DGraphic:i}=e,n=kj(i.graphics3DSymbol),a=Object(z["b"])(n,e=>"point-3d"===e.symbol.type?e.symbol:null),s=rw[t]||Wj(e);return Object(z["k"])(a)&&a.supportsCallout()&&a.hasVisibleVerticalOffset()&&!i.isDraped?{placement:null,hasLabelVerticalOffset:!1,verticalOffset:tw(a.verticalOffset),anchor:null,normalizedOffset:null}:r&&r.hasVisibleVerticalOffset()&&(Object(z["j"])(a)||!a.supportsCallout()||!a.verticalOffset||i.isDraped)?Kj(s.placement)?{placement:"above-center",verticalOffset:tw(r.verticalOffset),anchor:"bottom",normalizedOffset:[0,s.normalizedOffset[1],0],hasLabelVerticalOffset:!0}:(zj.errorOncePerTick("Callouts and vertical offset on labels are currently only supported with 'above-center' label placement (not with "+t+" placement)"),null):{placement:null,verticalOffset:null,anchor:null,normalizedOffset:null,hasLabelVerticalOffset:!1}}function tw(e){const{screenLength:t,minWorldLength:r,maxWorldLength:i}=e;return{screenLength:t,minWorldLength:r,maxWorldLength:i}}const rw={"above-center":{placement:"above-center",normalizedOffset:[0,1,0],anchor:"bottom"},"above-left":{placement:"above-left",normalizedOffset:[-1,1,0],anchor:"bottom-right"},"above-right":{placement:"above-right",normalizedOffset:[1,1,0],anchor:"bottom-left"},"below-center":{placement:"below-center",normalizedOffset:[0,-1,2],anchor:"top"},"below-left":{placement:"below-left",normalizedOffset:[-1,-1,0],anchor:"top-right"},"below-right":{placement:"below-right",normalizedOffset:[1,-1,0],anchor:"top-left"},"center-center":{placement:"center-center",normalizedOffset:[0,0,1],anchor:"center"},"center-left":{placement:"center-left",normalizedOffset:[-1,0,0],anchor:"right"},"center-right":{placement:"center-right",normalizedOffset:[1,0,0],anchor:"left"}},iw={"above-center":["default","esriServerPointLabelPlacementAboveCenter"],"above-left":["esriServerPointLabelPlacementAboveLeft"],"above-right":["esriServerPointLabelPlacementAboveRight"],"below-center":["esriServerPointLabelPlacementBelowCenter"],"below-left":["esriServerPointLabelPlacementBelowLeft"],"below-right":["esriServerPointLabelPlacementBelowRight"],"center-center":["esriServerPointLabelPlacementCenterCenter"],"center-left":["esriServerPointLabelPlacementCenterLeft"],"center-right":["esriServerPointLabelPlacementCenterRight"]};for(const IF in iw){const e=iw[IF],t=rw[IF];e.forEach(e=>{rw[e]=t})}Object.freeze&&(Object.freeze(rw),Object.keys(rw).forEach((function(e){Object.freeze(rw[e]),Object.freeze(rw[e].normalizedOffset)})));const nw=[0,0],aw=[0,0],sw=Object(Uj["h"])();var ow=r("5880");class cw{constructor(e){this._stage=e,this._materials=new Map}get(e){return this._materials.get(e)}add(e,t){this._materials.set(e,t),this._stage.add(t)}dispose(){this._stage.removeMany(Array.from(this._materials.values())),this._materials.clear()}}var lw,uw=r("0494"),dw=r("a37d"),hw=r("f2e0"),pw=r("2765");const fw=512,bw=4096,mw=.85,gw=.95;let yw=lw=class extends F["a"]{constructor(e){super(e),this.type=pw["a"].Texture,this.id=Object(hw["b"])(),this.events=new U["a"],this._glTexture=null,this.needsClear=!1,this.elementsToAddOrUpdate=new Map,this.elementsToRemove=new Map,this.elementsToRender=new Map,this.elements=new Map,this.stageObjects=new Map,this.updating=!1}initialize(){this.stage=this.view._stage,this.canvas=this._create2DCanvas(),this.ctx=this.canvas.getContext("2d"),this.stage.add(this);const e=this._computeAtlasResolution(this.view.width,this.view.height);this._createAtlasRegion(e),this._update2DCanvasSize(),this._resetAtlasCursor()}unload(){this._glTexture=Object(z["e"])(this._glTexture),this.updating=!1,this.events.emit("unloaded")}get width(){return this.atlas.size.width}get height(){return this.atlas.size.height}get requiresFrameUpdates(){return!1}_createDescriptor(e){return{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,flipped:!0,samplingMode:fh["z"].LINEAR_MIPMAP_LINEAR,hasMipmap:!0,preMultiplyAlpha:!0,maxAnisotropy:e.parameters.maxMaxAnisotropy}}get glTexture(){return this._glTexture}load(e){return Object(z["k"])(this._glTexture)||(this._glTexture=new Qh["a"](e,this._createDescriptor(e),this.canvas),this.frameWorker=this.view.resourceController.scheduler.registerTask(Ba["c"].TEXT_TEXTURE_ATLAS,this),this.setDirty()),this._glTexture}dispose(){this.elements=null,this.elementsToAddOrUpdate=null,this.elementsToRemove=null,this.elementsToRender=null,this.frameWorker=Object(z["s"])(this.frameWorker),this._glTexture&&(this.stage.remove(this),this._glTexture=Object(z["e"])(this._glTexture)),this.canvas.width=0,this.canvas.height=0,this.canvas=null,this.ctx=null}_create2DCanvas(){const e=document.createElement("canvas");return e.setAttribute("id","canvas2d"),e.setAttribute("style","display:none"),e.setAttribute("width",fw.toString()),e.setAttribute("height",fw.toString()),e}_update2DCanvasSize(){this.canvas.setAttribute("width",this.atlas.size.width.toString()),this.canvas.setAttribute("height",this.atlas.size.height.toString())}_createAtlasRegion(e=fw){this.atlas={size:{width:e,height:e},cursor:{x:0,y:0},lineHeight:0}}_computeAtlasResolution(e,t){let r=Math.max(e,t);return r+=256,r=Object(dr["n"])(r),r=Math.min(r,bw),r}_resizeAtlas(e,t){t=t||e;const r=this.atlas;r.size.width=e,r.size.height=t,Object(z["k"])(this._glTexture)&&this._glTexture.resize(e,t),this._update2DCanvasSize()}_resetAtlasCursor(){const e=this.atlas;e.cursor.x=Ow,e.cursor.y=Ow+vw,e.lineHeight=0,this.needsClear=!0}_getAtlasUsage(){const e=this.atlas;return(e.cursor.x+e.cursor.y*e.size.width)/(e.size.width*e.size.height)}_getExpectedAtlasUsage(){const e=this.elementsToRemove.size,t=this.elementsToAddOrUpdate.size,r=this.elements.size;return this._getAtlasUsage()/r*(r+t-e)}_addAtlasElement(e,t,r,i){const n=this.atlas,{renderedWidth:a,renderedHeight:s,displayWidth:o,displayHeight:c}=e.textRenderer;e.placement.offset.x=n.cursor.x,e.placement.offset.y=n.cursor.y,e.placement.size.width=a,e.placement.size.height=s,e.placement.size.displayWidth=o,e.placement.size.displayHeight=c,e.placement.uvMinMax=[e.placement.offset.x/n.size.width,1-(e.placement.offset.y+s)/n.size.height,(e.placement.offset.x+a)/n.size.width,1-e.placement.offset.y/n.size.height],n.cursor.x+=r,n.lineHeight=Math.max(n.lineHeight,i),this.elements.set(t,e)}_removeAtlasElement(e){if(e&&this.elements.has(e.textId)){const t=e.placement.offset,r=e.placement.size;this.ctx.clearRect(t.x,t.y,r.width,r.height),this.elements.delete(e.textId)}}_ensureStageObjects(e){const t=this.stageObjects.get(e);if(t)return t;const r=new Set;return this.stageObjects.set(e,r),r}_addStageObject(e,t){this._ensureStageObjects(e).add(t)}_removeStageObject(e,t){const r=this.stageObjects.get(e);r&&r.delete(t)&&(t.geometries[0].vertexAttributes.get(Yh["a"].SIZE).data=[0,0],t.geometryVertexAttrsUpdated(t.geometryRecords[0]))}_processAddition(e,t){const r=this.atlas,i=e.textId,n=e.textRenderer.renderedWidth,a=e.textRenderer.renderedHeight,s=n+Ow,o=a+Ow+vw;if(r.cursor.x+s<r.size.width&&r.cursor.y+o<r.size.height)this._addAtlasElement(e,i,s,o),this.elementsToRender.set(i,e),this.elementsToAddOrUpdate.delete(i);else{if(!(r.cursor.y+o+r.lineHeight<r.size.height)){const e=this._getExpectedAtlasUsage(),i=e>mw&&r.size.width<bw;return i&&this._resizeAtlas(2*r.size.width,2*r.size.height),!t||!i&&e>gw&&r.size.width===bw?(this._processRemovals(),_w.OK):(this._repack(),_w.REPACK)}r.cursor.x=Ow,r.cursor.y+=r.lineHeight,r.lineHeight=0,this._addAtlasElement(e,i,s,o),this.elementsToRender.set(i,e),this.elementsToAddOrUpdate.delete(i)}return _w.OK}_processRemovals(){this.elementsToRemove.forEach((e,t)=>{const r=this.stageObjects.get(t);r&&0!==r.size||this._removeAtlasElement(e),r&&0===r.size&&this.stageObjects.delete(t)}),this.elementsToRemove.clear()}_repack(){this._processRemovals(),this.elements.forEach((e,t)=>{e.rendered=!1,this.elementsToAddOrUpdate.set(t,e)}),this.elements.clear(),this._resetAtlasCursor(),this.elementsToRender.clear()}_processRenderingRequest(e){this.ctx.clearRect(e.placement.offset.x,e.placement.offset.y,e.placement.size.width,e.placement.size.height),e.textRenderer.render(this.ctx,e.placement.offset.x,e.placement.offset.y);const t=this.stageObjects.get(e.textId);t&&t.forEach(t=>{t.geometries[0].vertexAttributes.get(Yh["a"].UV0).data=new Float32Array(e.placement.uvMinMax),t.geometries[0].vertexAttributes.get(Yh["a"].SIZE).data=[e.placement.size.displayWidth,e.placement.size.displayHeight],t.geometryVertexAttrsUpdated(t.geometryRecords[0])}),e.rendered=!0}get running(){return this.updating}runTask(e,t=!0){if(!this._glTexture)return;let r=!1;if(Object(Da["c"])(this.elementsToAddOrUpdate,(e,i)=>{const n=this.elements.get(i);if(n&&n.rendered){const e=this.stageObjects.get(i);return e&&e.forEach(e=>{const t=e.geometries[0].vertexAttributes,r=this.elements.get(i);t.get(Yh["a"].UV0).data=new Float32Array(r.placement.uvMinMax),t.get(Yh["a"].SIZE).data=new Float32Array([r.placement.size.displayWidth,r.placement.size.displayHeight]),e.geometryVertexAttrsUpdated(e.geometryRecords[0])}),this.elementsToAddOrUpdate.delete(i),!1}return this._processAddition(this.elementsToAddOrUpdate.get(i),t)===_w.REPACK&&(r=!0,!0)}),r)return void this.runTask(Ba["e"],!1);let i=!1;this.elementsToRender.size>0&&this.needsClear&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.needsClear=!1),Object(Da["c"])(this.elementsToRender,(t,r)=>(this._processRenderingRequest(t),this.elementsToRender.delete(r),i=!0,e.madeProgress(),e.done)),i&&Object(z["k"])(this._glTexture)&&this._glTexture.setData(this.canvas),this.updating=this.elementsToRender.size>0,!this.updating&&lw.test.orderedRepackingEnabled&&this.repackOrdered()}addTextTexture(e,t){const r=e.key;this.elementsToAddOrUpdate.has(r)||this.elementsToAddOrUpdate.set(r,{textId:r,placement:{offset:{x:0,y:0},size:{width:0,height:0,displayWidth:0,displayHeight:0},uvMinMax:[]},textRenderer:e,rendered:!1}),this._addStageObject(r,t),this.elementsToRemove.delete(r),this.setDirty()}removeTextTexture(e,t){const r=e.key;this.elementsToRemove.set(r,this.elements.get(r)),this._removeStageObject(r,t)}setDirty(){this._glTexture&&(this.updating=!0)}repackOrdered(){if(0===this.elements.size)return;const e=[];this.elements.forEach((t,r)=>e.push({element:t,key:r}));let t=!0;for(let r=0;r<e.length-1;r++)if(e[r].key.localeCompare(e[r+1].key)>0){t=!1;break}if(!t||this.elementsToRemove.size){e.sort((e,t)=>e.key.localeCompare(t.key)),this.elements.clear();for(const{element:t,key:r}of e)this.elements.set(r,t);this._repack(),this.setDirty()}}get test(){const{elements:e,stageObjects:t,elementsToRemove:r,atlas:i}=this,n=this;return{elements:e,stageObjects:t,elementsToRemove:r,atlas:i,_resizeAtlas:(e,t)=>n._resizeAtlas(e,t),run:(e,t)=>n.runTask(e,t)}}};yw.test={orderedRepackingEnabled:!1},Object(l["a"])([Object(j["b"])({constructOnly:!0})],yw.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],yw.prototype,"updating",void 0),yw=lw=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.TextTextureAtlas")],yw);const Ow=2,vw=2;var _w;!function(e){e[e.OK=0]="OK",e[e.REPACK=1]="REPACK"}(_w||(_w={}));const jw=yw;var ww=r("748fd");const xw=v["a"].getLogger("esri.views.3d.layers.graphics.Labeler");let Tw=class extends F["a"]{constructor(){super(...arguments),this._dirty=!1,this._labels=new Map,this._labelsToAdd=new Map,this._labelsToRemove=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this._handles=new ge["a"],this._handles.add([this.view.watch("state.camera",()=>this.setDirty()),this.view.watch("pixelRatio",()=>this._resetAllLabels()),this.view.resourceController.scheduler.registerTask(Ba["c"].LABELER,this)]),this._textTextureAtlas=new jw({view:this.view}),this._hudMaterialCollection=new cw(this.view._stage),this._calloutMaterialCollection=new cw(this.view._stage)}dispose(){this._handles=Object(z["d"])(this._handles),this._textTextureAtlas=Object(z["e"])(this._textTextureAtlas),this._hudMaterialCollection=Object(z["e"])(this._hudMaterialCollection),this._calloutMaterialCollection=Object(z["e"])(this._calloutMaterialCollection),this._labelingContexts.length=0,this._labels.clear(),this._labelsToAdd.clear(),this._labelsToRemove.clear()}_activateLabelingContext(e){e.labels.forEach((e,t)=>{this._labels.set(t,e),e.graphics3DGraphic.setVisibilityFlag(ej["a"].USER_SETTING,!0,ej["b"].LABEL)}),e.active=!0}_deactivateLabelingContext(e){e.labels.forEach((e,t)=>{e.graphics3DGraphic.setVisibilityFlag(ej["a"].USER_SETTING,!1,ej["b"].LABEL),this.setLabelGraphicVisibility(e.graphics3DGraphic,!1),this._labels.delete(t)}),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const r=e.textTextureResources.textRenderers[t._labelIndex];Object(z["k"])(r)&&this._textTextureAtlas.addTextTexture(r,t.stageObject)}e.rendered=!0}_removeLabelTextureFromAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const r=e.textTextureResources.textRenderers[t._labelIndex];Object(z["k"])(r)&&this._textTextureAtlas.removeTextTexture(r,t.stageObject)}e.rendered=!1}get running(){var e;return this.view.ready&&(this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.running)}runTask(e){this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e)}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(Sw(t)){if(!Aw(t)){if(Cw(t)){this._deactivateLabelingContext(t);continue}if(this._createLabelClassContext(t),Ew(t)){this._dirty=!0;continue}if(!Aw(t))continue}Object(Da["c"])(t.labelsToInitialize,(r,i)=>(this._ensureGraphics3DResources(r)&&(this._labels.set(i,r),this.deconflictor.setDirty(),e.madeProgress()),(r.visible&&r.textTextureResources.initialized||!r.visible&&r.hasGraphics3DResources)&&(t.labelsToInitialize.delete(i),e.madeProgress()),e.done))&&(this._dirty=!0)}this._labelsToRemove.forEach(e=>this._removeLabelTextureFromAtlas(e)),this._labelsToAdd.forEach(e=>this._addLabelTextureToAtlas(e)),this._labelsToRemove.clear(),this._labelsToAdd.clear(),this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController.signal;await e.layer.when(),Object(_["v"])(t),e.scaleVisibility&&e.scaleVisibility.updateScaleRangeActive();const r=e.graphics3DCore,i=r.layer,n=i.labelingInfo&&i.labelingInfo.filter(e=>!!e.symbol);if(!n||0===n.length)return;const a=new Array(n.length);let s=!1;await Object(ml["b"])(n,async(i,n)=>{const o=i.symbol,c=kj(r.getOrCreateGraphics3DSymbol(o));if(Object(z["j"])(c))return void xw.error("Failed to create Graphics3DSymbol for label");await c.load(),Object(_["v"])(t);let l=null;Object(Ij["b"])(o)&&o.hasVisibleCallout()&&(l=Object(Dj["a"])(o,r.symbolCreationContext),await l.load(),Object(_["v"])(t));const u=await Object(ml["d"])(Object(Pj["createLabelFunction"])(i,e.layer.fieldsIndex,this.view.spatialReference));if(Object(_["v"])(t),!0===u.ok){const e=await this._createTextRenderParameters(c.symbol);Object(_["v"])(t),a[n]={labelClass:i,labelFunction:u.value,graphics3DSymbol:c,graphics3DCalloutSymbolLayer:l,calloutSymbolLayerIndex:0,textRenderParameters:e}}else xw.error("Label expression failed to evaluate: "+u.error),s=!0}),Object(_["v"])(t),s||(e.labelClassContexts=a)}async _createLabelClassContext(e){return e.labelClassPromise||(e.labelClassPromise=this._createLabelClassContextAsync(e).catch(t=>{if(Object(_["m"])(t))throw t;e.labelClassContexts=null}).then(()=>{e.labelClassAbortController=null,this.notifyChange("updating")}).catch(()=>{}),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.getItemAt(0);return t&&"text"===t.type?dw["a"].fromSymbol(t,this.view.pixelRatio):null}_destroyLabelClassContext(e){for(const r of e.labelClassContexts)--r.graphics3DSymbol.referenced,r.graphics3DSymbol=null;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,t&&t.abort(),e.labelClassContexts=[],e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,r,i,n){const a={text:e.text,centerOffset:r.centerOffset,translation:r.translation,elevationOffset:r.elevationOffset,screenOffset:r.screenOffset,centerOffsetUnits:r.centerOffsetUnits,horizontalPlacement:Object(ow["c"])(r.anchor),verticalPlacement:Object(ow["h"])(r.anchor),verticalOffset:r.verticalOffset,debugDrawLabelBorder:z_["a"].LABELS_SHOW_BORDER,displayWidth:e.displayWidth,displayHeight:e.displayHeight};return Rw.graphic=t,Rw.renderingInfo=null,Rw.layer=i,n.createLabel(Rw,a,this._hudMaterialCollection,this._textTextureAtlas)}_createLineCalloutGraphic(e,t,r,i,n){const a={symbol:t,translation:i.translation,elevationOffset:i.elevationOffset,screenOffset:i.screenOffset,centerOffset:i.centerOffset,centerOffsetUnits:i.centerOffsetUnits,materialCollection:this._calloutMaterialCollection};return Rw.graphic=e,Rw.renderingInfo=a,Rw.layer=n,r.createGraphics3DGraphic(Rw)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const{textTextureResources:r}=e,i=e.labelingContext,n=i.labelClassContexts;if(!n||0===n.length||!i.emptySymbolLabelSupported&&0===t.graphics.length)return!1;let a=!1;const s=t.graphic,o=i.layer,c=Object(Au["a"])(i.layer),l=this.view._stage;for(let u=0;u<n.length;u++){const e=r.textRenderers[u],d=r.labelPlacements[u];if(Object(z["j"])(e)||Object(z["j"])(d))continue;const h=n[u],p=h.graphics3DSymbol,f=p.symbol&&"label-3d"===p.symbol.type?p.symbol:null,b=p.symbolLayers[0];if(!b)continue;b.setElevationInfoOverride(i.elevationInfoOverride);const m=this._createTextSymbolGraphic(e,s,d,o,b);if(!m)return!1;m._labelClass=h.labelClass,m._labelIndex=u,t.addLabelGraphic(m,l,i.stageLayer),t.setVisibilityFlag(ej["a"].USER_SETTING,c,ej["b"].LABEL),t.clearVisibilityFlag(ej["a"].SCALE_RANGE,ej["b"].LABEL),t.setVisibilityFlag(ej["a"].DECONFLICTION,!1,ej["b"].LABEL),a=!0;const g=h.graphics3DCalloutSymbolLayer;if(g&&d.hasLabelVerticalOffset){g.setElevationInfoOverride(i.elevationInfoOverride);const e=this._createLineCalloutGraphic(s,f,g,d,o);Object(z["k"])(e)&&(h.calloutSymbolLayerIndex=t.labelGraphics.length,t.addLabelGraphic(e,l,i.stageLayer))}break}return i.scaleVisibility&&a&&i.scaleVisibility.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const r of e.graphics3DGraphic.labelGraphics){if(null==r._labelClass)continue;const e=t[r._labelIndex].graphics3DSymbol.symbolLayers[0];null!=e&&e.onRemoveGraphic(r)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){const{textTextureResources:t}=e;if(t.initialized)return;const r=e.labelingContext,i=r.labelClassContexts;if(!i||0===i.length)return;const n=e.graphics3DGraphic.graphic;for(let s=0;s<i.length;s++){const o=i[s];if(t.textRenderers[s]=null,t.labelPlacements[s]=null,!o.textRenderParameters)continue;const c=o.labelFunction;let l;if("arcade"===c.type)try{const e=c.needsHydrationToEvaluate()?Object(Mj["c"])(n,r.layer):n;l=c.evaluate(e)}catch(a){l=null}else l=c.evaluate(n);if(Object(z["j"])(l)||""===l||/^\s+$/.test(l))continue;const u=o.graphics3DSymbol,d=u.symbol&&"label-3d"===u.symbol.type?u.symbol:null;if(!u.symbolLayers[0])continue;const h=e.graphics3DGraphic,p=o.labelClass,f=r.disablePlacement,b=Bj({graphics3DGraphic:h,labelSymbol:d,labelClass:p,disablePlacement:f});if(Object(z["j"])(b))continue;const m=Object(ow["c"])(b.anchor),g=Object(ow["f"])(m);t.textRenderers[s]=new uw["b"](l,g,o.textRenderParameters),t.labelPlacements[s]=b}t.initialized=!0}_destroyTextTextureResources(e){const{textTextureResources:t}=e;t.initialized=!1,t.textRenderers=[],t.labelPlacements=[]}_addGraphic(e,t){const r={hasGraphics3DResources:!1,visible:!1,rendered:!1,labelingContext:e,graphics3DGraphic:t,textTextureResources:{initialized:!1,textRenderers:[],labelPlacements:[]}},i=t.graphic.uid;e.labels.set(i,r),e.labelsToInitialize.set(i,r),this.setDirty(),this.deconflictor.setDirty()}_removeGraphic(e,t){const r=t.graphic.uid,i=e.labels.get(r);i&&(this._destroyGraphic(i,r),e.labels.delete(r),e.labelsToInitialize.delete(r),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.has(t)&&(this._labels.delete(t),this._labelsToAdd.delete(t),this._labelsToRemove.delete(t)),e.textTextureResources.initialized&&(this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e)),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const r of t){const t=e.labels.get(r);t&&(this._removeGraphic(e,t.graphics3DGraphic),this._addGraphic(e,t.graphics3DGraphic))}}_globalPropertyChanged(e,t){for(const r of t.labelClassContexts){const i=new Map;t.labels.forEach(e=>{const t=e.graphics3DGraphic;i.set(t.graphic.uid,t)});const n=e=>e.labelGraphics[0];if(Object(z["t"])(r.graphics3DSymbol.symbolLayers[0]).globalPropertyChanged(e,i,n),r.graphics3DCalloutSymbolLayer){const t=e=>e.labelGraphics[r.calloutSymbolLayerIndex];r.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,i,t)}}}_visibilityInfoChange(e){const t=e.layer.labelsVisible;t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.labels.forEach((t,r)=>{this._destroyGraphic(t,r),t.visible=!1,t.rendered=!1,e.labelsToInitialize.set(r,t)}),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,r){const i=r&&r.emptySymbolLabelSupported||!1,n=r&&r.elevationInfoOverride||null,a=r&&r.disablePlacement||null;if(this._findLabelingContext(e))return;const s=e.layer,o={graphics3DCore:e,layer:s,scaleVisibility:t,emptySymbolLabelSupported:i,elevationInfoOverride:n,disablePlacement:a,active:s.labelsVisible,labelClassPromise:null,labelClassAbortController:new AbortController,labelClassContexts:[],labels:new Map,labelsToInitialize:new Map,stageLayer:new ww["a"]({isPickable:!0},s.uid)};return this.view._stage.add(o.stageLayer),this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),featureReductionChange:()=>{},layerLabelsEnabled:()=>Object(Au["a"])(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),clear:()=>{}}}removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const r=this._labelingContexts.indexOf(t);this._labelingContexts.splice(r,1),t.labels.forEach(e=>this._removeGraphic(t,e.graphics3DGraphic)),this.view._stage.remove(t.stageLayer),t.stageLayer=null,this.setDirty()}setLabelGraphicVisibility(e,t){const r=e.graphic.uid,i=this._labels.get(r);i&&i.visible!==t&&(t&&!i.rendered?(this._labelsToAdd.set(r,i),this._labelsToRemove.delete(r),i.textTextureResources.initialized||i.labelingContext.labelsToInitialize.set(r,i)):!t&&i.rendered&&(this._labelsToRemove.set(r,i),this._labelsToAdd.delete(r)),i.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){var e;return this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.updating||this._labelingContexts.some(e=>Ew(e))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce((e,t)=>e+(Ew(t)?0:1),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get test(){return{textTextureAtlas:this._textTextureAtlas,resetAllLabels:()=>this._resetAllLabels()}}};function Sw(e){return e.active&&Object(Au["a"])(e.layer)}function Ew(e){return e.labelClassPromise&&!!e.labelClassAbortController}function Aw(e){return e.labelClassContexts&&e.labelClassContexts.length}function Cw(e){return null===e.labelClassContexts}Object(l["a"])([Object(j["b"])({constructOnly:!0})],Tw.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Tw.prototype,"deconflictor",void 0),Object(l["a"])([Object(j["b"])()],Tw.prototype,"_textTextureAtlas",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],Tw.prototype,"updating",null),Tw=Object(l["a"])([Object(x["a"])("esri.views.3d.layers.graphics.Labeler")],Tw);const Rw=new Lj["a"](null,null,null);var Mw=r("2b60"),Pw=r("3c3b"),Iw=r("22f5");class Dw{constructor(){this.gltfCache=new Map,this.wosrCache=new Map,this.evictHandles=new ge["a"]}loadGLTF(e,t,r){const i=r?"gltfPBR:"+e:"gltf:"+e;return this._fromCache(this.gltfCache,i,t=>Object(Pw["a"])(new Mw["a"](t.streamDataRequester),e,t,r),t)}loadWOSR(e,t){const r=`wosr:${e}:${t.disableTextures}`;return this._fromCache(this.wosrCache,r,t=>Object(Iw["a"])(e,t),t)}destroy(){this.evictHandles.destroy(),this.gltfCache.clear(),this.wosrCache.clear()}get size(){return this.wosrCache.size+this.gltfCache.size}_fromCache(e,t,r,i){return new Promise((n,a)=>{if(Object(_["n"])(i))return void a(Object(_["e"])());const s=Object(_["q"])(i,()=>{this._remove(e,t),a(Object(_["e"])())}),o=e.get(t);if(o)return this.evictHandles.remove(t),o.refCount++,void o.item.then(n,a);const c=new AbortController,l={...i,signal:c.signal},u={refCount:1,abortController:c,item:r(l).then(r=>(u.abortController=null,r.remove=()=>this._remove(e,t),r))};e.set(t,u),u.item.then(e=>{Object(z["k"])(s)&&s.remove(),n(e)},e=>{Object(z["k"])(s)&&s.remove(),a(e)})})}_remove(e,t){const r=e.get(t);r&&(r.refCount--,0===r.refCount&&this.evictHandles.add(Object(Sa["c"])(()=>{e.delete(t),Object(z["k"])(r.abortController)&&r.abortController.abort()},Nw),t))}}const Lw=1e4;let Nw=Lw;class Fw{constructor(e,t,r,i=null){this.lij=[0,0,0],this.extent=Object(wu["l"])(),this.resolution=0,this.loadPriority=0,this.measures={visibility:kw.VISIBLE_ON_SURFACE,screenRect:Object(wu["l"])(),distance:0,shouldSplit:!1},this.used=!1,i&&this.acquire(e,t,r,i)}acquire(e,t,r,i){this.tilingScheme=i,this.id=Fw.id(e,t,r),this.lij[0]=e,this.lij[1]=t,this.lij[2]=r,i.getExtent(e,t,r,this.extent),this.resolution=i.resolutionAtLevel(e)}release(){this.tilingScheme=null}getChildren(e){const t=this.lij[0]+1,r=2*this.lij[1],i=2*this.lij[2];return e?(e[0].acquire(t,r,i,this.tilingScheme),e[1].acquire(t,r+1,i,this.tilingScheme),e[2].acquire(t,r,i+1,this.tilingScheme),e[3].acquire(t,r+1,i+1,this.tilingScheme),e):[new Fw(t,r,i,this.tilingScheme),new Fw(t,r+1,i,this.tilingScheme),new Fw(t,r,i+1,this.tilingScheme),new Fw(t,r+1,i+1,this.tilingScheme)]}copyMeasurementsFrom(e){this.measures.visibility=e.measures.visibility,this.measures.shouldSplit=e.measures.shouldSplit,this.measures.distance=e.measures.distance,Object(wu["k"])(e.measures.screenRect,this.measures.screenRect)}static id(e,t,r){return`${e}/${t}/${r}`}}var kw;!function(e){e[e.INVISIBLE=0]="INVISIBLE",e[e.VISIBLE_WHEN_EXTENDED=1]="VISIBLE_WHEN_EXTENDED",e[e.VISIBLE_ON_SURFACE=2]="VISIBLE_ON_SURFACE"}(kw||(kw={}));var Uw=r("d359"),zw=r("579f"),Bw=r("ecd7");class Vw{constructor(e){this.renderCoordsHelper=e,this.frustum=Object(Uw["f"])(),this._points=Object(Uw["g"])(),this.lines=new Array(12),this._origin=Object(ju["f"])(),this._direction=Object(ju["f"])(),this._altitude=null;for(let t=0;t<12;t++)this.lines[t]={origin:null,direction:Object(ju["f"])(),endpoint:null}}get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}update(e){Object(Uw["h"])(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),Object($o["m"])(this._origin,e.eye),Object($o["m"])(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines()}updatePoints(e){for(let t=0;t<this._points.length;t++)Object($o["m"])(this._points[t],e[t]);Object(Uw["d"])(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return Object(Uw["m"])(this.frustum,e)}intersectsRay(e){return Object(Uw["l"])(this.frustum,e)}intersectsLineSegment(e,t){return Object(Uw["j"])(this.frustum,e,t)}intersectsPoint(e){return Object(Uw["k"])(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;Gw(this.lines[t],e[t],e[r]),Gw(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),Gw(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}}function Gw(e,t,r){e.origin=t,e.endpoint=r,Object($o["x"])(e.direction,t,r)}Vw.planePointIndices=Uw["n"],Vw.nearFarLineIndices=[[Uw["c"].NEAR_BOTTOM_LEFT,Uw["c"].FAR_BOTTOM_LEFT],[Uw["c"].NEAR_BOTTOM_RIGHT,Uw["c"].FAR_BOTTOM_RIGHT],[Uw["c"].NEAR_TOP_RIGHT,Uw["c"].FAR_TOP_RIGHT],[Uw["c"].NEAR_TOP_LEFT,Uw["c"].FAR_TOP_LEFT]];var Hw=r("6b38");class qw{constructor(e){this.renderCoordsHelper=e,this.surfaceElevation=0,this.cache=new Map,this.frustum=new Vw(e),this.extendedFrustum=new Vw(e),this.intersector=new Hw["a"]({renderCoordsHelper:e}),this.renderCoordsHelper=e}begin(e,t){this.surfaceElevation=t,this.aboveGround=this.renderCoordsHelper.getAltitude(e.eye)>t,this.frustum.update(e),this._shortenFrustumFarPlane(this.frustum),this._updateExtendedFrustum(e)}end(){this.cache.clear()}calculate(e){if(this.allTilesInvisible)return kw.INVISIBLE;const t=this.renderCoordsHelper.viewingMode===As["a"].Global&&e.lij[0]>=Ww&&e.lij[0]<$w,r=this._getOrCalculateSingleTileVisibility(e,!t);return r!==kw.INVISIBLE&&t?this._calculateAggregatedChildrenVisibility(e):r}_shortenFrustumFarPlane(e){const t=Vw.nearFarLineIndices,r=e.mutablePoints;for(const i of t){const[e,t]=i,n=r[e],a=r[t];Object($o["l"])(Jw,a,n),Object($o["g"])(Jw,Jw,Xw),Object($o["h"])(r[t],n,Jw)}e.updatePoints(r)}_calculateAggregatedChildrenVisibility(e){let t=kw.INVISIBLE;const r=this.cache.get(e.id);if(null!=r)return r;const i=ex.acquire();e.getChildren(i);for(const n of i){const e=this.calculate(n);if(e!==kw.INVISIBLE&&(t=e,e===kw.VISIBLE_ON_SURFACE))break}return ex.release(i),this.cache.set(e.id,t),t}_getOrCalculateSingleTileVisibility(e,t){const r=this.cache.get(e.id);if(null!=r)return r;const i=this._calculateSingleTileVisibility(e);return t&&this.cache.set(e.id,i),i}_calculateSingleTileVisibility(e){return!this.aboveGround&&this.renderCoordsHelper.viewingMode===As["a"].Global&&e.lij[0]<Zw?this._calculateSingleTileVisibilitySided(e,!1)===kw.INVISIBLE?this._calculateSingleTileVisibilitySided(e,!0):void 0:this._calculateSingleTileVisibilitySided(e,this.aboveGround)}_calculateSingleTileVisibilitySided(e,t){this.intersector.update(e.extent,e.tilingScheme.spatialReference,this.surfaceElevation,t);const r=Object(Yd["e"])(e.tilingScheme.spatialReference).radius;return this.intersector.isVisibleInFrustum(this.extendedFrustum,r)?this.intersector.isVisibleInFrustum(this.frustum,r,!0)?kw.VISIBLE_ON_SURFACE:kw.VISIBLE_WHEN_EXTENDED:kw.INVISIBLE}_updateExtendedFrustum(e){this.extendedFrustum.update(e),this._shortenFrustumFarPlane(this.extendedFrustum);const t=this.renderCoordsHelper.worldUpAtPosition(e.eye,Jw);this.aboveGround||Object($o["u"])(t,t);const r=Object(dr["b"])(-Object($o["j"])(t,e.viewForward));if(this.allTilesInvisible=r>(Math.PI+e.fovY)/2,this.allTilesInvisible)return;if(this.hasExtendedFrustum=r>e.fovY/2,!this.hasExtendedFrustum)return;const i=this._extendedFrustumParameters(),n=this.extendedFrustum.mutablePoints;for(let a=0;a<4;a++){const e=i.pointIndices[a],t=n[e],r=this.renderCoordsHelper.getAltitude(t);if(i.needsAltitudeAdjustment(r)){switch(this.renderCoordsHelper.worldUpAtPosition(t,Jw),e){case Uw["c"].FAR_BOTTOM_LEFT:case Uw["c"].FAR_TOP_LEFT:case Uw["c"].NEAR_BOTTOM_LEFT:case Uw["c"].NEAR_TOP_LEFT:Object(Ag["t"])(this.extendedFrustum.planes[Uw["b"].LEFT],Jw,Jw);break;case Uw["c"].FAR_BOTTOM_RIGHT:case Uw["c"].FAR_TOP_RIGHT:case Uw["c"].NEAR_BOTTOM_RIGHT:case Uw["c"].NEAR_TOP_RIGHT:Object(Ag["t"])(this.extendedFrustum.planes[Uw["b"].RIGHT],Jw,Jw)}Object($o["g"])(Jw,Jw,i.direction),this.renderCoordsHelper.intersectInfiniteManifold(Object(Df["h"])(t,Jw),i.zWithMargin,t)}}if(this.extendedFrustum.updatePoints(n),Object(Ag["g"])(n[Uw["c"].NEAR_BOTTOM_LEFT],n[Uw["c"].NEAR_BOTTOM_RIGHT],n[Uw["c"].NEAR_TOP_RIGHT],Qw),Object(Ag["g"])(n[Uw["c"].NEAR_BOTTOM_RIGHT],n[Uw["c"].NEAR_TOP_RIGHT],n[Uw["c"].NEAR_TOP_LEFT],Kw),Object($o["j"])(Object(Ag["r"])(Qw),Object(Ag["r"])(Kw))<0){const e=this.extendedFrustum.mutablePoints;this.aboveGround?[e[Uw["c"].NEAR_BOTTOM_LEFT],e[Uw["c"].NEAR_BOTTOM_RIGHT]]=[e[Uw["c"].NEAR_BOTTOM_RIGHT],e[Uw["c"].NEAR_BOTTOM_LEFT]]:[e[Uw["c"].NEAR_TOP_LEFT],e[Uw["c"].NEAR_TOP_RIGHT]]=[e[Uw["c"].NEAR_TOP_RIGHT],e[Uw["c"].NEAR_TOP_LEFT]],this.extendedFrustum.updatePoints(e)}}_extendedFrustumParameters(){return this.aboveGround?this._extendedFrustumParametersAboveSurface():this._extendedFrustumParametersBelowSurface()}_extendedFrustumParametersAboveSurface(){const e=this.surfaceElevation-Yw;return{zWithMargin:e,pointIndices:Vw.planePointIndices.bottom,direction:-1,needsAltitudeAdjustment:t=>t>e}}_extendedFrustumParametersBelowSurface(){const e=this.surfaceElevation+Yw;return{zWithMargin:e,pointIndices:Vw.planePointIndices.top,direction:1,needsAltitudeAdjustment:t=>t<e}}}const Ww=2,$w=6,Zw=12,Xw=.95,Yw=1,Jw=Object(ju["f"])(),Qw=Object(Ag["d"])(),Kw=Object(Ag["d"])(),ex=new Bw["a"](Array,e=>{4!==e.length&&(e[0]=new Fw,e[1]=new Fw,e[2]=new Fw,e[3]=new Fw)},e=>{e[0].release(),e[1].release(),e[2].release(),e[3].release()});class tx{constructor(e){this.camera=new $m["b"],this.focusOnMap=[0,0],this.screenRect=Object(wu["l"])(),this.tileSize=e.tileSize,this.renderCoordsHelper=e.renderCoordsHelper,this.tilingScheme=e.tilingScheme,this.visibility=new qw(e.renderCoordsHelper)}begin(e,t,r){this.camera.copyFrom(e),this.surfaceElevation=r,this.focusOnMap[0]=t.x,this.focusOnMap[1]=t.y,Object(wu["t"])(0,0,e.fullWidth,e.fullHeight,this.screenRect),this.visibility.begin(this.camera,r)}end(){this.visibility.end()}updateTile(e){e.measures.visibility=this.visibility.calculate(e),e.measures.distance=Object(wu["m"])(e.extent,this.focusOnMap),e.measures.visibility!==kw.INVISIBLE&&this._updateScreenMeasure(e)}_updateScreenMeasure(e){const t=ix,r=1<<t,i=e.measures.screenRect;Object(wu["n"])(i);let n=0;const a=e.lij[0]+t,s=e.lij[1]<<t,o=e.lij[2]<<t,c=this._tileSizeWithBias(e),l=c*c;for(let u=0;u<r;u++)for(let t=0;t<r;t++)if(n+=this._computeScreenArea(e,a,s+u,o+t,i),n>l)return void(e.measures.shouldSplit=!0);e.measures.shouldSplit=!1}_tileSizeWithBias(e){return e.measures.visibility===kw.VISIBLE_WHEN_EXTENDED?this.tileSize*nx:this.tileSize}_computeScreenArea(e,t,r,i,n){const a=e.measures.visibility===kw.VISIBLE_WHEN_EXTENDED;this._projectToScreen(t,r,i,a,ax),Object(wu["n"])(rx);for(let s=0;s<4;s++)Object(wu["q"])(rx,ax[s]);return Object(wu["p"])(n,rx,n),Object(zw["a"])(ax[0],ax[1],ax[2])+Object(zw["a"])(ax[0],ax[2],ax[3])}_projectToScreen(e,t,r,i,n){this.tilingScheme.ensureMaxLod(e),this.tilingScheme.getExtent(e,t,r,sx),this._toRenderCoords(sx,0,3,cx[0]),this._toRenderCoords(sx,2,3,cx[1]),this._toRenderCoords(sx,2,1,cx[2]),this._toRenderCoords(sx,0,1,cx[3]),i&&(this._projectToPlane(cx,this.camera.frustum[Uw["b"].NEAR]),this._projectToPlane(cx,this.camera.frustum[Uw["b"].TOP]),this._projectToPlane(cx,this.camera.frustum[Uw["b"].BOTTOM]));for(let a=0;a<4;a++)this.camera.projectToRenderScreen(cx[a],ux),this.camera.renderToScreen(ux,n[a])}_projectToPlane(e,t){for(let i=0;i<4;i++)lx[i]=Object(Ag["v"])(t,e[i]);const r=Math.max(lx[0],lx[1],lx[2],lx[3]);if(r>0){const i=Object($o["g"])(ox,Object(Ag["r"])(t),-r);for(let t=0;t<4;t++)Object($o["h"])(e[t],e[t],i)}}_toRenderCoords(e,t,r,i){return ox[0]=e[t],ox[1]=e[r],ox[2]=this.surfaceElevation,this.renderCoordsHelper.toRenderCoords(ox,this.tilingScheme.spatialReference,i),i}}const rx=Object(wu["l"])(),ix=2,nx=5,ax=[Object(ce["f"])(),Object(ce["f"])(),Object(ce["f"])(),Object(ce["f"])()],sx=Object(wu["l"])(),ox=Object(ju["f"])(),cx=[Object(ju["f"])(),Object(ju["f"])(),Object(ju["f"])(),Object(ju["f"])()],lx=[0,0,0,0],ux=Object(ce["d"])();var dx=r("4b49");const hx=v["a"].getLogger("esri.views.3d.layers.support.FeatureTileTree3D");let px=class extends F["a"]{constructor(e){super(e),this.tiles=new h["a"],this.tileSize=512,this._idToTile=new Map,this._handles=new ge["a"],this._clients=new Set,this._dirty=!1,this._newTiles=new k_["a"]}get tilingScheme(){const e=this.tilingSchemeOwner.tilingScheme;return e?e.clone():null}set filterExtent(e){if(Object(z["k"])(e)&&!e.spatialReference.equals(this.viewState.spatialReference))return void hx.error("#extent","extent spatial reference needs to be in the same spatial reference as the view");const t=this._get("filterExtent");if(t===e||Object(z["k"])(t)&&e&&t.equals(e))return;const r=Object(z["k"])(e)?e.clone():null;this._set("filterExtent",r),this._setDirty()}get filterExtentRect(){if(Object(z["j"])(this.filterExtent)||!this.tilingScheme)return null;const e=Object(wu["l"])();return Object(dx["b"])(this.filterExtent,e,this.tilingScheme.spatialReference),e}get rootTileIds(){return this.filterExtentRect?this.tilingScheme.rootTilesInExtent(this.filterExtentRect):[[0,0,0]]}set suspended(e){e!==this._get("suspended")&&(this._set("suspended",e),this._setDirty())}get updating(){return this._dirty||!!this._pendingTiles}initialize(){this._handles.add(this.watch(["tilingScheme","tileSize"],()=>this._reset(),!0)),this._handles.add(Object(Me["a"])(this,["tileSize","cameraOnSurface.location","tilingScheme","viewState.contentCamera","focus.location"],()=>this._setDirty(),!0)),this.scheduler&&(this._frameWorker=this.scheduler.registerTask(Ba["c"].FEATURE_TILE_TREE,this))}destroy(){this._frameWorker=Object(z["s"])(this._frameWorker),this._handles=Object(z["d"])(this._handles)}addClient(){const e=bx();return this._clients.add(e),1===this._clients.size&&this._setDirty(),{remove:()=>this._removeClient(e)}}_removeClient(e){this._clients.delete(e),this._hasClients||this._clear()}get _hasClients(){return this._clients.size>0}_setDirty(){!this._hasClients||this.suspended||this._dirty||(this._frameWorker?(this._dirty=!0,this.notifyChange("updating")):this.runTask(Ba["e"]))}_clear(){this.tiles.removeAll(),this._idToTile.clear(),this._reset(),this._dirty=!1,this.notifyChange("updating")}get running(){return this.updating}runTask(e){this._dirty=!1,this._pendingTiles||(this._startUpdate(),Object(z["k"])(this._frameWorker)&&(this._frameWorker.priority=Ba["c"].FEATURE_TILE_TREE_ACTIVE)),this._subdivideTilesForView(e),!this._pendingTiles&&Object(z["k"])(this._frameWorker)&&(this._frameWorker.priority=Ba["c"].FEATURE_TILE_TREE),this.notifyChange("updating")}_startUpdate(){if(this.suspended)return;if(!this.tilingScheme)return void this._clear();this._tileMeasurements||(this._tileMeasurements=new tx({renderCoordsHelper:this.renderCoordsHelper,tilingScheme:this.tilingScheme,tileSize:this.tileSize}));const e=this.viewState.contentCamera;this._tileMeasurements.begin(e,this.focus.location,this.cameraOnSurface.location.z),this._pendingTiles=this._getRootTiles()}_reset(){this._newTiles.clear(),this._tileMeasurements=null,this._pendingTiles=null,this._setDirty()}_getRootTiles(){return this.rootTileIds.map(e=>new Fw(e[0],e[1],e[2],this.tilingScheme))}_purgeHorizonTiles(e){e.sort((e,t)=>{const r=e.measures.screenRect,i=t.measures.screenRect;return r[1]+r[3]-(i[1]+i[3])}),Object(wu["n"])(mx);for(let t=0;t<e.length;t++)if(Object(wu["p"])(mx,e.data[t].measures.screenRect,mx),Object(wu["u"])(mx)>gx)return e.data.slice(t,e.length);return[]}_subdivideTilesForView(e){if(this._pendingTiles){for(;this._pendingTiles.length>0&&!e.done;){const t=this._pendingTiles.pop();e.madeProgress(),this.filterExtentRect&&!Object(wu["w"])(this.filterExtentRect,t.extent)||(this._tileMeasurements.updateTile(t),t.measures.visibility!==kw.INVISIBLE&&(t.measures.shouldSplit?(this.tilingScheme.ensureMaxLod(t.lij[0]+1),this._pendingTiles.push(...t.getChildren())):this._newTiles.push(t)))}0===this._pendingTiles.length&&(this._updateTiles(this._purgeHorizonTiles(this._newTiles)),this._newTiles.clear(),this._tileMeasurements.end(),this._pendingTiles=null)}}_updateTiles(e){for(const i of this.tiles.items)i.used=!1;const t=e.filter(e=>{const t=this._idToTile.get(e.id);return t?(t.copyMeasurementsFrom(e),t.used=!0):this._idToTile.set(e.id,e),!t}),r=this.tiles.items.filter(e=>!e.used&&(this._idToTile.delete(e.id),!0));this.tiles.removeMany(r),this.tiles.addMany(t),this._sortTiles()}_sortTiles(){this.viewState.fixedContentCamera||this.tiles.sort((e,t)=>e.measures.visibility!==t.measures.visibility?e.measures.visibility===kw.VISIBLE_ON_SURFACE?-1:1:e.measures.distance-t.measures.distance),this.tiles.forEach((e,t)=>e.loadPriority=t)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"scheduler",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"renderCoordsHelper",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"tilingSchemeOwner",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"cameraOnSurface",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"focus",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"viewState",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],px.prototype,"terrain",void 0),Object(l["a"])([Object(j["b"])()],px.prototype,"tiles",void 0),Object(l["a"])([Object(j["b"])()],px.prototype,"tileSize",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],px.prototype,"tilingScheme",null),Object(l["a"])([Object(j["b"])()],px.prototype,"filterExtent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],px.prototype,"filterExtentRect",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],px.prototype,"rootTileIds",null),Object(l["a"])([Object(j["b"])({value:!1})],px.prototype,"suspended",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],px.prototype,"updating",null),px=Object(l["a"])([Object(x["a"])("esri.views.3d.layers.support.FeatureTileTree3D")],px);let fx=0;function bx(){return fx++}const mx=Object(wu["l"])(),gx=10,yx=px;var Ox=r("0646"),vx=r("9714");let _x=class extends F["a"]{constructor(){super(...arguments),this._propertiesPool=new vx["a"]({camera:$m["b"]},this),this._lastSeenCameraProjectionValues=new $m["b"],this.events=new U["a"],this.viewingMode=As["a"].Global,this._cameraChanged=!1,this.updateQueue=new Array,this.processingUpdates=!1}init(e,t){this._set("viewingMode",e),this._set("spatialReference",t),this._set("constraints",new nd({mode:this.viewingMode}))}exit(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new vx["a"]({camera:$m["b"]},this)}createInitialCamera(){if(this.viewingMode===As["a"].Global){const e=Object(Yd["e"])(this.spatialReference).radius;this.camera=new $m["b"](Object(ju["h"])(4*e,0,0),Object(ju["h"])(e,0,0),Object(ju["h"])(0,0,1))}else this.camera=new $m["b"](Object(ju["h"])(0,0,100),Object(ju["h"])(0,0,0),Object(ju["h"])(0,1,0))}get animation(){return this.cameraController instanceof wg&&Object(z["k"])(this.cameraController.viewAnimation)?this.cameraController.viewAnimation:null}get camera(){return this._get("camera")}set camera(e){e!==wx&&wx.copyFrom(e),wx.computeUp(this.viewingMode),xx.camera=wx,this.events.emit("before-camera-change",xx);const t=this._get("camera");if(this._cameraProjectionChanged(this._lastSeenCameraProjectionValues,wx)&&(this._lastSeenCameraProjectionValues.copyFrom(wx),Tx.camera=this._lastSeenCameraProjectionValues,this.events.emit("camera-projection-changed",Tx)),(!t||!t.equals(wx))&&(this._set("camera",this._propertiesPool.get("camera").copyFrom(wx)),this._cameraChanged=!t||!t.almostEquals(wx),this._cameraChanged)){const e=Object(Ox["a"])(()=>{this._cameraChanged=!1,e.remove()})}}get contentCamera(){return Object(z["k"])(this._contentCamera)?this._contentCamera:this.camera}set contentCamera(e){this._contentCamera=Object(z["k"])(e)?e.clone():null}get fixedContentCamera(){return!!Object(z["k"])(this._contentCamera)}get isGlobal(){return this.viewingMode===As["a"].Global}get isLocal(){return this.viewingMode===As["a"].Local}get navigating(){return!(!this.cameraController||!this.cameraController.isInteractive)}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(e&&(e.watch("state",t=>{t!==_g.Finished&&t!==_g.Stopped||(this._set("cameraController",null),this.updateCamera(t=>e.onControllerEnd(t)))},!0),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=_g.Rejected)}switchCameraController(e){return this.cameraController=e,e.state!==_g.Rejected}stopActiveCameraController(){return!(this.cameraController&&!this.cameraController.stopController())}updateCamera(e){this.updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this.updateQueue.length||this.processingUpdates)return;this.processingUpdates=!0;const e=this.updateQueue.shift();wx.copyFrom(this._get("camera")),e(wx),this.camera=wx,this.processingUpdates=!1,this._processUpdateQueue()}_cameraProjectionChanged(e,t){return e.fov!==t.fov||e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||e.padding[$m["a"].TOP]!==t.padding[$m["a"].TOP]||e.padding[$m["a"].RIGHT]!==t.padding[$m["a"].RIGHT]||e.padding[$m["a"].BOTTOM]!==t.padding[$m["a"].BOTTOM]||e.padding[$m["a"].LEFT]!==t.padding[$m["a"].LEFT]}};Object(l["a"])([Object(j["b"])({readOnly:!0,type:Bs})],_x.prototype,"animation",null),Object(l["a"])([Object(j["b"])({type:$m["b"]})],_x.prototype,"camera",null),Object(l["a"])([Object(j["b"])({})],_x.prototype,"_contentCamera",void 0),Object(l["a"])([Object(j["b"])({type:$m["b"]})],_x.prototype,"contentCamera",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"fixedContentCamera",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"constraints",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"events",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"isGlobal",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"isLocal",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"viewingMode",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"spatialReference",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"navigating",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],_x.prototype,"stationary",null),Object(l["a"])([Object(j["b"])()],_x.prototype,"_cameraChanged",void 0),Object(l["a"])([Object(j["b"])()],_x.prototype,"cameraController",null),_x=Object(l["a"])([Object(x["a"])("esri.views.3d.state.ViewState")],_x);const jx=_x,wx=new $m["b"],xx={camera:null},Tx={camera:null};var Sx=r("8048");function Ex(e,t,r){return e===As["a"].Global?new Cx(r):new Ax(t,r)}class Ax{constructor(e,t){this.elevationProvider=e,this._referenceEllipsoid=Object(Yd["e"])(t),this.unitInMeters=Object(Sx["f"])(t,this._referenceEllipsoid.metersPerDegree)}compute(e,t,r,i,n){n||(n={near:0,far:0});let a=e[2]*this.unitInMeters;const s=a,o=a-i,c=this.elevationProvider?this.elevationProvider.elevationBounds:null;c&&(a=o>=0?s-this.unitInMeters*c.min:this.unitInMeters*c.max-s);const l={x:(r=Object(z["k"])(r)?r:new de["a"]({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0})).xmax-r.xmin,y:r.ymax-r.ymin,z:4*Math.max(r.xmax-r.xmin,r.ymax-r.ymin)},u=Math.max(l.x,l.y,l.z);Object($o["l"])(Nx,t,e),Lx[0]=Nx[0]>0?r.xmax:r.xmin,Lx[1]=Nx[1]>0?r.ymax:r.ymin,Lx[2]=Nx[2]>0?u/2:-u/2,Object($o["l"])(Lx,Lx,e),Object($o["t"])(Nx,Nx);const d=1.1*Object($o["j"])(Lx,Nx)*this.unitInMeters,h=Math.sqrt(a*(a+2*this._referenceEllipsoid.radius)),p=Math.max(r.xmax-r.xmin,r.ymax-r.ymin),f=p*Ix*this.unitInMeters,b=p*Dx*this.unitInMeters;let m=Object(dr["f"])((a-b)/(f-b),0,1);m*=m*m;let g=Object(dr["l"])(h,d,m);return g*=Math.max(Math.log(Math.abs(o)),1),g=Math.min(g,Math.max(34064e4,u)),g/=this.unitInMeters,Rx(g,Mx,this.unitInMeters,n)}}class Cx{constructor(e){this._referenceEllipsoid=Object(Yd["e"])(e)}compute(e,t,r,i,n){n||(n={near:0,far:0});const a=Object($o["r"])(e)-this._referenceEllipsoid.radius,s=this._referenceEllipsoid.radius+Math.min(0,i),o=Math.abs(a-i),c=Math.max(o,Math.abs(a));return Rx(1.2*Math.sqrt(c*(c+2*s)),Object(dr["f"])(2e4-(Math.log(c)-7.983)/9.011*19e3,1e3,2e4),1,n)}}function Rx(e,t,r,i){const n=Px/r;return e/t>n?(i.far=e,i.near=i.far/t):(i.near=n,i.far=i.near*t),i}const Mx=2e4,Px=2,Ix=.001,Dx=1e-4,Lx=Object(ju["f"])(),Nx=Object(ju["f"])();let Fx=class extends F["a"]{constructor(e){super(e),this.handles=new ge["a"]}initialize(){this.handles.add(this.view.basemapTerrain.on("elevation-change",e=>this._handleElevationChangeEvent(e)))}destroy(){this.handles&&(this.handles.destroy(),this.handles=null)}_handleElevationChangeEvent(e){if(this.view.state.cameraController)return;const t=this.view.state.camera;lb(this.view,t,e.extent,e.spatialReference)&&this._applyToCurrentCamera()}_applyToCurrentCamera(){this.view.state.updateCamera(e=>{vb(this.view,e,_b.EYE_AND_CENTER)})}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Fx.prototype,"view",void 0),Fx=Object(l["a"])([Object(x["a"])("esri.views.3d.state.ElevationCollisionConstraint")],Fx);const kx=Fx;let Ux=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"],this.nearFarHeuristic=Ex(e.view.state.viewingMode,e.view.basemapTerrain,e.view.renderCoordsHelper.spatialReference)}initialize(){this._handles.add([this.view.watch(["constraints.clipDistance.near","constraints.clipDistance.far"],()=>this._clipDistanceNearFarChanged()),this.view.watch("constraints.clipDistance.mode",()=>this._updateNearFar()),this.view.state.events.on("before-camera-change",e=>this._updateCameraNearFar(e.camera)),this.view.watch("renderDataExtent",()=>this._updateNearFar(),!0),this.view.watch(["constraints.altitude.min","constraints.altitude.max"],()=>this._updateAltitude(),!0),this.view.watch("constraints.tilt.max",()=>this._updateTiltMax(),!0),this.view.watch("constraints.tilt.mode",()=>this._updateTilt(),!0),this.view.watch("state.camera",()=>this._updateTiltAutoMax(),!0),this.view.watch(["map.ground.navigationConstraint.type","constraints.collision.enabled"],()=>this._updateCollision(),!0)]),this.view.state.isLocal&&this._handles.add(Object(Me["a"])(this.view,"renderDataExtent",e=>this._updateLocalSurfaceDistance(e))),this._updateNearFar(),this.view.state.viewingMode!==As["a"].Local&&this._updateAltitude(),this._updateTilt(),this._updateCollision(),this._set("surfaceCollisionConstraint",new kx({view:this.view}))}destroy(){this._handles=Object(z["d"])(this._handles),this.surfaceCollisionConstraint&&(this.surfaceCollisionConstraint.destroy(),this._set("surfaceCollisionConstraint",null))}_clipDistanceNearFarChanged(){var e;const t=null==(e=this.view.constraints)?void 0:e.clipDistance;t&&"auto"!==t.mode&&this.view.state.updateCamera(e=>(this._updateCameraNearFarManual(e,t),!0))}_updateNearFar(){this.view.state.updateCamera(e=>(this._updateCameraNearFar(e),!0))}_updateCameraNearFar(e){const t=this.view.constraints&&this.view.constraints.clipDistance;"manual"===(t?t.mode:"auto")?this._updateCameraNearFarManual(e,t):this._updateCameraNearFarAuto(e,t)}_updateCameraNearFarAuto(e,t){this.nearFarHeuristic.compute(e.eye,e.center,this.view.renderDataExtent,ub(this.view,e.eye),e),t&&t.autoUpdate(e.near,e.far)}_updateCameraNearFarManual(e,t){t&&(e.near=t.near,e.far=t.far)}_updateCollision(){var e,t,r;const i=null==(e=this.view.map)||null==(t=e.ground)||null==(r=t.navigationConstraint)?void 0:r.type,n=!i||"stay-above"===i,a=this.view.state.constraints.collision;if(n!==a.enabled){a.enabled=n,n&&this._reapplyConstraints(Mf.COLLISION);const e=this.view.constraints&&this.view.constraints.tilt;e&&"auto"!==e.mode||this._updateTiltAuto()}}_updateAltitude(){const e=this.view.constraints&&this.view.constraints.altitude;e&&this.view.state.viewingMode!==As["a"].Local?this.view.state.constraints.altitude={min:e.min,max:e.max}:this.view.state.constraints.altitude=null,this._reapplyConstraints()}_updateTiltMax(){const e=this.view.constraints&&this.view.constraints.tilt;e&&"auto"!==e.mode&&(this._updateTiltManual(e),this._reapplyConstraints())}_updateTilt(){const e=this.view.constraints&&this.view.constraints.tilt;"manual"===(e?e.mode:"auto")?this._updateTiltManual(e):this._updateTiltAuto(),this._reapplyConstraints()}_updateTiltManual(e){const t=this.view.state.constraints;t.tilt=t.createConstantMaxTilt(Object(dr["h"])(e.max))}_updateTiltAuto(){const e=this.view.state.constraints;e.tilt=e.createDefaultTilt(),this._updateTiltAutoMax()}_updateTiltAutoMax(){const e=this.view.constraints&&this.view.constraints.tilt;if(!e||"auto"!==e.mode)return;const t=this.view.state.constraints;if(t.tilt){const r=t.tilt(this.view.state.camera.distance).max;e.autoUpdate(Object(dr["p"])(r))}}_updateLocalSurfaceDistance(e){if(Object(z["j"])(e))return;let t=Math.max(e.width,e.height);if(t<=0)return;e.hasZ&&(t=Math.max(t,e.zmax-e.zmin));const r=this.view.state,i=3*t/Math.atan(r.camera.fov/2);i!==r.constraints.distance&&(r.constraints.distance=i)}_reapplyConstraints(e=Mf.ALL){this.view.state.updateCamera(t=>Mm(this.view,t,{selection:e,interactionType:Rf.NONE,interactionFactor:null,interactionStartCamera:null,interactionDirection:null,tiltMode:Pf.TUMBLE}))}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Ux.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],Ux.prototype,"surfaceCollisionConstraint",void 0),Ux=Object(l["a"])([Object(x["a"])("esri.views.3d.state.ConstraintsManager")],Ux);const zx=Ux;let Bx=class extends jg{constructor(e){super(e),this.handles=new ge["a"]}set desiredCamera(e){this._set("desiredCamera",e.clone())}get canStop(){return!0}get constraintEnabled(){return this.view.state.constraints.collision.enabled}onControllerStart(){this.state=_g.Running,this.handles.add(this.view.basemapTerrain.on("elevation-change",e=>this._handleElevationChangeEvent(e))),this._applyCorrection()}onControllerEnd(){this.handles.removeAll()}stepController(){}_handleElevationChangeEvent(e){lb(this.view,this.desiredCamera,e.extent,e.spatialReference)&&this._applyCorrection()}_applyCorrection(){this.view.state.updateCamera(e=>{e.copyViewFrom(this.desiredCamera),vb(this.view,e,_b.EYE_AND_CENTER)||this.constraintEnabled||(this.state=_g.Stopped)})}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],Bx.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],Bx.prototype,"desiredCamera",null),Bx=Object(l["a"])([Object(x["a"])("esri.views.3d.state.controllers.SurfaceCollisionCorrectionController")],Bx);var Vx=r("3760");const Gx=.66;function Hx(e){return 360-Yu["e"].normalize(e)}function qx(e){return Yu["e"].normalize(360-e)}function Wx(e){return Object(z["k"])(e)&&e.resolver&&e.resolver.reject(),null}function $x(e,t){return Object(z["k"])(e)&&e.resolver&&e.resolver.resolve(t),t}function Zx(e,t,r,i=null){if(!t)return Wx(i);const n=e.spatialReference||ne["a"].WGS84;if(Object(z["k"])(t.camera)){const e=Object(_n["d"])(t.camera.position,n);if(Object(z["j"])(e))return Wx(i);const r=t.camera.clone();return r.position=e,$x(i,r)}if(Object(z["j"])(t.targetGeometry))return Wx(i);const a=t.get("targetGeometry.spatialReference");if(a&&!Object(_n["a"])(a,n))return Wx(i);const s=dv(e,e.state.camera);let o=av.ADJUST;if(null!=t.rotation&&(s.heading=Hx(t.rotation),o=av.LOCKED),null!=r&&(s.tilt=r),"point"===t.targetGeometry.type){const r=t.targetGeometry;let n;const a=t.targetGeometry.clone();return n=null!=t.scale?hv(e,t.scale,r.latitude):e.state.camera.distance,bv(e,a,n,s,o,i)}const c=t.targetGeometry.extent;return wv(e,c,s.heading,s.tilt,o,i)}function Xx(e,t,r=null){return Object(z["j"])(r)&&(r=new ae["a"]),eT(e,null,t.clone(),r)}async function Yx(e,t,r){const i=pT(e,t);if(!i)throw new b["a"]("viewpointutils-create:no-target","Missing target for creating viewpoint");const n=new vu["a"]({fov:e.camera.fov}),a=new ae["a"]({camera:n});if(i.target instanceof ae["a"])return fT(await nT(e,i.target,i,r,a));if(i.target instanceof vu["a"])return fT(aT(e,i.target,a));const s=null!=i.scale||null!=i.zoom;if(i.target instanceof de["a"]){const t=i.target.xmin===i.target.xmax||i.target.ymin===i.target.ymax;return fT(s||t?await oT(e,i,i.target.center,n,r,a):await uT(e,i,i.target,n,r,a))}const o={boundingBox:Object(Uj["k"])(),hasZ:!1,screenSpaceObjects:[]},c=s?Qx(e,i):void 0;if(await iT(e,i.target,c,o),isFinite(o.boundingBox[0])){let t;if(Object(Uj["e"])(o.boundingBox,mT),TT.x=mT[0],TT.y=mT[1],TT.z=mT[2],TT.spatialReference=e.spatialReference,isFinite(TT.z)&&o.hasZ?t=Object(Uj["x"])(o.boundingBox):(TT.z=void 0,t=Object(wu["z"])(Object(Uj["F"])(o.boundingBox,vT))),s||t)return fT(await oT(e,i,TT,n,r,a));const c=bT(e,o.screenSpaceObjects);return fT(await hT(e,i,TT,o.boundingBox,c,n,r,a))}return i.position?fT(cT(e,i,n,a)):fT(await lT(e,i,n,r,a))}function Jx(e,t){return null==t.scale&&null!=t.zoom?Dv(e,t.zoom):t.scale}function Qx(e,t){return Lv(e,Jx(e,t))}function Kx(e,t){let r=!1;return null!=t.heading?(e.heading=t.heading,r=!0):null!=t.rotation&&(e.heading=Hx(t.rotation),r=!0),null!=t.tilt&&(e.tilt=t.tilt,r=!0),null!=t.fov&&(e.fov=t.fov),r}function eT(e,t,r,i){const n=e.spatialReference||ne["a"].WGS84;return t=Object(z["k"])(t)?t:lv(e,r),Object(z["j"])(t)||(i.targetGeometry=Object(pe["x"])(t.center,e.renderSpatialReference,n),i.scale=Nv(e,t),i.rotation=qx(r.heading),i.camera=r),i}function tT(e,t,r){if(!t)return;if(!Object(_n["a"])(t.spatialReference,e.spatialReference))throw new b["a"]("viewpointutils:incompatible-spatialreference",`Spatial reference (${t.spatialReference?t.spatialReference.wkid:"unknown"}) is incompatible with the view (${e.spatialReference.wkid})`,{geometry:t});const i=[];if(!t.hasZ&&e.basemapTerrain){let r;switch(t.type){case"point":r=t;break;case"multipoint":case"polyline":r=t.extent.center;break;case"mesh":r=t.origin;break;case"extent":r=t.center;break;case"polygon":r=t.centroid}r&&Object(_n["a"])(r,e.basemapTerrain.spatialReference)?mT[2]=Object(z["u"])(Object(Ru["b"])(e.elevationProvider,r),0):mT[2]=0}(0,ST[t.type])(t,e=>{i.push(e[0],e[1],e[2])},mT);const n=i.length/3;if(0===n)return;const a=new Array(i.length);if(Object(pe["p"])(i,t.spatialReference,0,a,e.spatialReference,0,n)){t.hasZ&&(r.hasZ=!0);for(let e=0;e<a.length;e+=3)t.hasZ?(mT[0]=a[e+0],mT[1]=a[e+1],mT[2]=a[e+2]):(mT[0]=a[e+0],mT[1]=a[e+1]),Object(Uj["r"])(r.boundingBox,mT)}}async function rT(e,t,r,i){const n=await Object(ml["d"])(e.whenViewForGraphic(t));if(!1===n.ok||Object(z["j"])(n.value)||!("whenGraphicBounds"in n.value))return void tT(e,t.geometry,i);const a=n.value,s=await Object(ml["d"])(a.whenGraphicBounds(t,{minDemResolution:r}));if(!1===s.ok)return void tT(e,t.geometry,i);const{screenSpaceObjects:o,boundingBox:c}=s.value;Object(Uj["m"])(i.boundingBox,c),o&&o.forEach(e=>{i.screenSpaceObjects.push(e)}),isFinite(c[2])&&(i.hasZ=!0)}async function iT(e,t,r,i){if(Array.isArray(t)&&2===t.length){const r=t[0],n=t[1];if("number"==typeof r&&"number"==typeof n)return TT.x=r,TT.y=n,TT.z=void 0,TT.spatialReference=e.spatialReference.isGeographic?e.spatialReference:ne["a"].WGS84,void tT(e,TT,i)}t&&"function"==typeof t.map?await Object(_["j"])(t.map(t=>iT(e,t,r,i))):t instanceof Vx["a"]?tT(e,t,i):t instanceof ie["a"]&&await rT(e,t,r,i)}async function nT(e,t,r,i,n){if(Object(z["k"])(t.camera))return aT(e,t.camera,n);n.scale=t.scale,n.rotation=t.rotation,n.targetGeometry=Object(z["k"])(t.targetGeometry)?t.targetGeometry.clone():null,n.camera=null,null!=r.heading?n.rotation=qx(r.heading):null!=r.rotation&&(n.rotation=r.rotation);const a=Jx(e,r);null!=a&&(n.scale=a);const s=new Fv(i);return Zx(e,n,r.tilt,s),n.camera=await s.resolver.promise,n}function aT(e,t,r){const i=e.spatialReference,n=Object(_n["d"])(t.position,i);return Object(z["j"])(n)?null:((t=t.clone()).fov=e.camera.fov,t.position=n,eT(e,null,t,r))}function sT(e,t,r,i,n,a){const s=e.renderSpatialReference;return Object(pe["t"])(r.position,jT,s),Object(pe["t"])(t,wT,s),a.targetGeometry=new he["a"](t),n.position=new he["a"](r.position),Object($o["l"])(_T,wT,jT),mv(e,jT,_T,i.up,n),a.scale=pv(e,Object($o["o"])(jT,wT),a.targetGeometry.latitude),a.rotation=qx(n.heading),a.camera=n,a}async function oT(e,t,r,i,n,a){if(Object(z["j"])(r))throw new b["a"]("createfromcenter","invalid point");a.targetGeometry=r.clone();const s=db(e);if(t.position)return sT(e,a.targetGeometry,t,s,i,a);if(t.zoomFactor){const i=s.distance/t.zoomFactor,n=Object($o["g"])(mT,s.viewForward,-i);s.eye=Object($o["h"])(mT,s.center,n),a.scale=pv(e,i,r.latitude)}dv(e,s,i);const o=Kx(i,t)?av.LOCKED:av.ADJUST;if(!t.zoomFactor){a.scale=Jx(e,t),null==a.scale&&(Object(pe["t"])(r,mT,e.renderSpatialReference),Object(Uw["k"])(s.frustum,mT)?a.scale=pv(e,Object($o["o"])(s.eye,mT),r.latitude):a.scale=Nv(e,s));const c=new Fv(n);fv(e,a.targetGeometry,a.scale,i,o,c),a.camera=await c.resolver.promise}return a}function cT(e,t,r,i){const n=db(e);return Object($o["m"])(_T,n.viewForward),mv(e,n.eye,_T,n.up,xT),r.position=new he["a"](t.position),r.heading=null!=t.heading?t.heading:xT.heading,r.tilt=null!=t.tilt?t.tilt:xT.tilt,eT(e,null,r,i)}async function lT(e,t,r,i,n){const a=db(e);return oT(e,t,Object(pe["x"])(a.center,e.renderSpatialReference,e.spatialReference),r,i,n)}async function uT(e,t,r,i,n,a){a.targetGeometry=r.clone();const s=db(e);dv(e,s,i);const o=Kx(i,t)?av.LOCKED:av.ADJUST,c=new Fv(n);return wv(e,r,i.heading,i.tilt,o,c),a.camera=await c.resolver.promise,a}function dT(e,t,r,i,n){let a=0;r.hasZ?a=r.z:e.basemapTerrain&&(a=Object(z["t"])(Object(Ru["b"])(e.elevationProvider,r))),Object($o["y"])(mT,r.x,r.y,a),Object(pe["d"])(e.spatialReference,mT,gT,e.renderSpatialReference),Object(To["f"])(yT,gT),Object(To["p"])(yT,yT),Object(Uj["k"])(OT);const s=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(let f=0;f<s.length;f++){const t=s[f];let r=i[t[2]];isFinite(r)||(r=a),Object($o["y"])(mT,i[t[0]],i[t[1]],r),Object(pe["y"])(mT,e.spatialReference,mT,e.renderSpatialReference),Object(Uj["r"])(OT,Object($o["z"])(mT,mT,yT))}const o=Object(Uj["G"])(OT),c=Object(Uj["u"])(OT),l=Object(Uj["i"])(OT),u=1/Math.tan(t.fovX/2),d=1/Math.tan(t.fovY/2),h=.5*Math.sqrt(o*o+l*l)*Math.max(d,u)+.5*c,p=.5*c*d+.5*Math.max(o,l);return Math.max(h,p)/n}async function hT(e,t,r,i,n,a,s,o){o.targetGeometry=r.clone();const c=db(e),l=dT(e,c,r,i,n);dv(e,c,a);const u=Kx(a,t)?av.LOCKED:av.ADJUST;o.scale=pv(e,l,o.targetGeometry.latitude);const d=new Fv(s);return fv(e,o.targetGeometry,o.scale,a,u,d),o.camera=await d.resolver.promise,o}function pT(e,t){if(!t||!e.spatialReference)return null;const r={target:null};if("declaredClass"in t||Array.isArray(t))r.target=t;else{for(const e in t)r[e]=t[e];t.center&&!r.target&&(r.target=t.center)}return r}function fT(e){return e&&Object(z["k"])(e.camera)&&(e.rotation=qx(e.camera.heading)),e}function bT(e,t){const r=Gx;if(!t.length)return r;let i=Number.NEGATIVE_INFINITY;for(let n=0;n<t.length;n++){const e=t[n].screenSpaceBoundingRect;i=Math.max(i,Math.abs(e[0]),Math.abs(e[1]),Math.abs(e[2]),Math.abs(e[3]))}return r-i/Math.min(e.width,e.height)*2}const mT=Object(ju["f"])(),gT=Object(Kd["d"])(),yT=Object(wh["b"])(),OT=Object(Uj["h"])(),vT=Object(wu["l"])(),_T=Object(ju["f"])(),jT=Object(ju["f"])(),wT=Object(ju["f"])(),xT={heading:0,tilt:0},TT=new he["a"],ST={point(e,t,r){r[0]=e.x,r[1]=e.y,e.hasZ&&(r[2]=e.z),t(r)},polygon(e,t,r){const i=e.hasZ;for(let n=0;n<e.rings.length;n++){const a=e.rings[n];for(let e=0;e<a.length;e++)r[0]=a[e][0],r[1]=a[e][1],i&&(r[2]=a[e][2]),t(r)}},polyline(e,t,r){const i=e.hasZ;for(let n=0;n<e.paths.length;n++){const a=e.paths[n];for(let e=0;e<a.length;e++)r[0]=a[e][0],r[1]=a[e][1],i&&(r[2]=a[e][2]),t(r)}},multipoint(e,t,r){const i=e.points,n=e.hasZ;for(let a=0;a<i.length;a++)r[0]=i[a][0],r[1]=i[a][1],n&&(r[2]=i[a][2]),t(r)},extent(e,t,r){e.hasZ?(t(Object($o["y"])(r,e.xmin,e.ymin,e.zmin)),t(Object($o["y"])(r,e.xmax,e.ymin,e.zmin)),t(Object($o["y"])(r,e.xmin,e.ymax,e.zmin)),t(Object($o["y"])(r,e.xmax,e.ymax,e.zmin)),t(Object($o["y"])(r,e.xmin,e.ymin,e.zmax)),t(Object($o["y"])(r,e.xmax,e.ymin,e.zmax)),t(Object($o["y"])(r,e.xmin,e.ymax,e.zmax)),t(Object($o["y"])(r,e.xmax,e.ymax,e.zmax))):(t(Object($o["y"])(r,e.xmin,e.ymin,r[2])),t(Object($o["y"])(r,e.xmax,e.ymin,r[2])),t(Object($o["y"])(r,e.xmin,e.ymax,r[2])),t(Object($o["y"])(r,e.xmax,e.ymax,r[2])))},mesh(e,t,r){const i=e.vertexAttributes&&e.vertexAttributes.position;if(i)for(let n=0;n<i.length;n+=3)t(Object($o["y"])(r,i[n+0],i[n+1],i[n+2]))}};class ET{constructor(e,t,r){this.target=e,this.options=t,this.view=r,this.state="pending",this.abortController=null,this.animationController=null,this.promise=new Promise((e,t)=>{this.resolveCallback=e,this.rejectCallback=t;const r=new AbortController;Object(z["k"])(this.options.signal)&&Object(_["q"])(this.options.signal,()=>{this.abort()}),this.abortController=r,this.waitForReady()})}then(e,t){return this.promise.then(e,t)}catch(e){return this.promise.catch(e)}resolve(e){return this.state="finished",this.resolveCallback(e)}reject(e){return this.state="finished",this.rejectCallback(e)}abort(e=!1){switch(this.state){case"pending":case"wait-for-ready":case"wait-for-viewpoint":this.reject(Object(_["e"])());break;case"wait-for-animation-finish":!e&&Object(z["k"])(this.animationController)&&this.view.state.cameraController===this.animationController&&this.animationController.active&&this.animationController.stopController(),this.reject(Object(_["e"])())}}waitForReady(){this.state="wait-for-ready",this.view.ready?this.createViewPoint():Object(Me["j"])(this.view,"ready",this.abortController.signal).then(()=>{this.createViewPoint()},e=>{this.reject(e)})}createViewPoint(){"finished"!==this.state&&(this.state="wait-for-viewpoint",this.animationController=this.options.animate?this._getAnimationController():null,Yx(this.view,this.target,this.abortController.signal).then(e=>{if("finished"===this.state)return;const t=this._getCameraFromViewpoint(e);if(!Object(z["j"])(t))if(this.options.animate){if(Object(z["j"])(this.animationController))return;this.startAnimation(t,this.animationController)}else this.view.stateManager.setStateCamera(t.camera,{applyConstraints:!t.isFullySpecified,positionAndOrientationOnly:!0,doNotCancelGoToOperation:!0}),this.resolve()},e=>{this.reject(e)}))}_getCameraFromViewpoint(e){const t=!!(this.target instanceof ae["a"]&&this.target.camera||this.target instanceof vu["a"]),r=e.camera;if(Object(z["j"])(r))return null;if(!this.view.stateManager.isCompatible(r)){const e=r.position,t=e&&e.spatialReference,i=t?t.wkid:"none",n=this.view.spatialReference.wkid;return this.reject(new b["a"]("GotoAnimation:incompatible-spatialreference",`Resulting camera has an incompatible spatial reference (camera: ${i}, view: ${n})`,{camera:r})),null}const i=lv(this.view,r);return Object(z["j"])(i)?(this.reject(new b["a"]("GotoAnimation:invalid-camera","Resulting camera is invalid")),null):{viewpoint:e,camera:i,isFullySpecified:t}}startAnimation(e,t){this.state="wait-for-animation-finish";const r=t.viewAnimation;if(Object(z["j"])(r))return void this.reject(new b["a"]("GotoAnimation:missing-animation","Unreachable code in view.stateManager"));if(r.update(e.viewpoint,"running"),!t.active||Object(z["j"])(t.viewAnimation)||t.viewAnimation.target!==e.viewpoint||this.view.state.cameraController!==t)return this.abort();let i;e.isFullySpecified?(i=new Bx({view:this.view,desiredCamera:e.camera}),vb(this.view,e.camera,_b.EYE_AND_CENTER)):Mm(this.view,e.camera),t.begin(e.camera,this.options);const n=()=>{const r=this.view.state.cameraController;i&&(r&&r.active?r instanceof xg&&Object(z["k"])(r.viewAnimation)&&r.viewAnimation.target===e.viewpoint&&(this.view.state.cameraController=i):Object(z["k"])(t.viewAnimation)&&t.viewAnimation.target===e.viewpoint&&"finished"===t.state&&(this.view.state.cameraController=i))},a=e=>{if(!Object(z["j"])(this.view.state))switch(t.state){case _g.Finished:switch(this.state){case"pending":case"wait-for-ready":case"wait-for-viewpoint":case"wait-for-animation-finish":this.resolve()}break;case _g.Ready:case _g.Rejected:case _g.Running:case _g.Stopped:switch(this.state){case"pending":case"wait-for-ready":case"wait-for-viewpoint":case"wait-for-animation-finish":this.reject(e)}}};r.when(n,e=>a(e)),t.asyncResult={resolve:()=>a(),reject:e=>a(e)}}_getAnimationController(){let e,t=null;const r=this.view.state.cameraController;return r instanceof xg&&(r.updateStateFromViewAnimation(),r.active&&(e=r,t=e.viewAnimation)),null!=e||(e=new xg({view:this.view,mode:"animation"}),t=e.viewAnimation,this.view.state.switchCameraController(e))?e:(Object(z["k"])(t)&&t.stop(),this.reject(new b["a"]("GotoAnimation:goto-cannot-interrupt","Cannot start an animation while interacting")),null)}}const AT=v["a"].getLogger("esri.views.3d.state.ViewStateManager");let CT=class extends F["a"]{constructor(e){super(e),this.propertiesPool=new vx["a"]({frustum:Vw},this),this.handles=new ge["a"],this.cameraSetByUser=!1,this.gotoOperation=null,this.ready=!1,this.updateDevicePixelRatio=null,this.test={contentCameraResetState:new Map}}get camera(){const e=this._get("camera");if(!this.ready)return e;const t=dv(this.view,this.view.state.camera);return t&&e&&t.equals(e)?e:t}set camera(e){this._updatePropertyBeforeReady("camera",e)||(this.view.elevationProvider.enableElevationCache(!0),this.setStateCamera(lv(this.view,e),{applyConstraints:!1})||AT.error("#camera=","Invalid camera",e),this.view.elevationProvider.enableElevationCache(!1))}get contentCamera(){const e=this._get("contentCamera");if(!this.ready)return e;const t=dv(this.view,this.view.state.contentCamera);return t&&e&&t.equals(e)?e:t}set contentCamera(e){if(this._updatePropertyBeforeReady("contentCamera",e))return;const t=lv(this.view,e);Object(z["j"])(t)?this.view.state.contentCamera=null:(this._updateElevation(t),this.view.state.contentCamera=t)}installContentCameraReset(e){if(this.handles.remove("contentCameraReset"),this.test.contentCameraResetState.clear(),!this.view.state.fixedContentCamera)return!1;const t=this.zoom,r=this.view.state.camera.distance**2,i=Object(ju["g"])(this.view.state.camera.center),n=e.sticky?this.contentCamera.clone():null;return this.handles.add([this.watch("contentCamera",()=>{e.sticky||(this.handles.remove("contentCameraReset"),this.test.contentCameraResetState.clear())}),this.watch("zoom",e=>{this.test.contentCameraResetState.set("view.zoom",Math.abs(e-t)/2),Math.abs(e-t)>2?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=n)}),this.view.state.watch("camera",e=>{const t=Object($o["n"])(i,e.center);this.test.contentCameraResetState.set("camera.center",t/r),t>r?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=n)})],"contentCameraReset"),!0}get center(){return this.ready?this.view.pointsOfInterest.centerOnContent.location:this._get("center")}set center(e){this._updatePropertyBeforeReady("center",e)||(e?this.isCompatible(e)?this.setStateCamera(this._centerToCamera(e),{applyConstraints:!0})?this.view.pointsOfInterest.centerOnContent.runTask():AT.error("#center=","Invalid center",e):AT.error("#center=","Center has an incompatible spatial reference (center: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e):AT.error("#center=","Center may not be null or undefined"))}get extent(){if(!this.ready)return this._get("extent");const e=this.view,t=xv(e,e.state.camera,e.pointsOfInterest.centerOnContent.renderLocation);return Object(z["k"])(t)?t:this._get("extent")}set extent(e){this._updatePropertyBeforeReady("extent",e)||(e?this.isCompatible(e)?this.setStateCamera(this._extentToCamera(e),{applyConstraints:!0})||AT.error("#extent=","Invalid extent",e):AT.error("#extent=","Extent has an incompatible spatial reference (extent: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e):AT.error("#extent=","Extent may not be null or undefined"))}get frustum(){const e=this.propertiesPool.get("frustum");return e.renderCoordsHelper=this.view.renderCoordsHelper,e.update(this.view.state.camera),e}get hasInitialView(){return!!this.view.get("map.initialViewProperties.viewpoint")}get scale(){if(this.ready){const e=this.view.pointsOfInterest.centerOnContent;return pv(this.view,e.distance,e.location.latitude)}return this._get("scale")}set scale(e){this._updatePropertyBeforeReady("scale",e)||this.setStateCamera(this._scaleToCamera(e),{applyConstraints:!0})||AT.error("#scale=","Invalid scale",e)}get padding(){if(!this.ready)return this._get("padding");const e=this.view.state.camera,t=e.padding,r=e.pixelRatio,i=this._get("padding"),n=Math.round(t[$m["a"].TOP]/r),a=Math.round(t[$m["a"].RIGHT]/r),s=Math.round(t[$m["a"].BOTTOM]/r),o=Math.round(t[$m["a"].LEFT]/r);return null!=i&&i.top===n&&i.right===a&&i.bottom===s&&i.left===o?i:{top:n,right:a,bottom:s,left:o}}set padding(e){this._updatePropertyBeforeReady("padding",e)||(this._paddingToArray(e,this.view.state.camera.pixelRatio,NT),this.view.state.updateCamera(e=>e.padding=NT))}_paddingToArray(e,t,r){e?Object(U_["l"])(r,e.top||0,e.right||0,e.bottom||0,e.left||0):Object(U_["l"])(r,0,0,0,0);for(let i=0;i<4;i++)r[i]=Math.round(r[i]*t)}get screenCenter(){const e=this.padding;return Object(ce["e"])((this.view.width-(e.left+e.right))/2+e.left,(this.view.height-(e.top+e.bottom))/2+e.top)}get viewpoint(){return this.ready?Xx(this.view,this.camera):this._get("viewpoint")}set viewpoint(e){if(!this._updatePropertyBeforeReady("viewpoint",e))if(e)if(this.isCompatible(e))this.setStateCamera(this._viewpointToCamera(e),{applyConstraints:!e.camera})||AT.error("#viewpoint=","Invalid viewpoint",e);else{const t=Object(z["k"])(e.camera)?e.camera.position:e.targetGeometry,r=Object(z["k"])(t)&&t.spatialReference;AT.error("#viewpoint=","Viewpoint has an incompatible spatial reference (viewpoint: "+(r?r.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e)}else AT.error("#viewpoint=","Viewpoint may not be null or undefined")}get zoom(){return this.ready?Iv(this.view,this.scale):this._get("zoom")}set zoom(e){this._updatePropertyBeforeReady("zoom",e)||this.setStateCamera(this._zoomToCamera(e),{applyConstraints:!0})||AT.error("#zoom=","Invalid zoom",e)}initialize(){this.handles.add([Object(Me["b"])(this.view,"state.events","before-camera-change",e=>this._updateElevation(e.camera))]),Object(Me["c"])(this.view.state,"camera",e=>this._updateElevation(e),!0),this.handles.add(Object(xe["a"])({prepare:()=>this._prepareFrame()})),this.handles.add(this.view.state.watch("cameraController",()=>{this.cameraSetByUser=!0,this.handles.remove(FT)})),this.handles.add(Object(Me["b"])(this.view,"state.events","camera-projection-changed",()=>this.notifyChange("scale")))}destroy(){this.deinit(),this.handles&&(this.handles.destroy(),this.handles=null),this.propertiesPool&&(this.propertiesPool.destroy(),this.propertiesPool=null)}init(){this.constraintsManager=new zx({view:this.view}),this._prepareFrame();const e=this._getInitialProperties();this.cameraSetByUser=!1,this._set("ready",!0);for(const t of e)this.set(t.name,t.value);if(!this.cameraSetByUser){const e=this.view.get("map.initialViewProperties.viewpoint")||this.view.initialExtent;e&&this.isCompatible(e)?this._setInitialView(e):this.view.state.viewingMode===As["a"].Local&&this.handles.add(Object(Me["j"])(this.view.basemapTerrain,"ready",()=>{this.handles.remove(FT),this._setInitialView(this.view.dataExtent)}),FT)}}deinit(){this._cancelGoToOperation(),this.ready&&(this._override("padding",this.padding),this._set("ready",!1),this._clearOverride("hasInitialView"),this.cameraSetByUser=!1,this.handles.remove(FT),this.constraintsManager&&(this.constraintsManager.destroy(),this.constraintsManager=null))}async goTo(e,t){const r={animate:!0,...t};return Object(z["k"])(this.gotoOperation)&&this.gotoOperation.abort(r.animate),this.gotoOperation=new ET(e,r,this.view),this.view.resourceController.scheduler.stopFrame(),this.gotoOperation}debugSetCameraOnContent(){this.setStateCamera(db(this.view),{applyConstraints:!1})}step(e){const t=this.view.state,r=t&&this.view.state.cameraController;r&&(t.updateCamera(t=>{r.stepController(e,t)}),r.steppingFinished&&r.finishController())}_cancelGoToOperation(){Object(z["k"])(this.gotoOperation)&&(this.gotoOperation.abort(),this.gotoOperation=null)}_getInitialProperties(){const e=new Set,t=[];for(const{propertyName:r,overrides:i}of PT){const n=e.has(r),a=this._isOverridden(r);!n&&a&&t.push({name:r,value:this._get(r)}),this._clearOverride(r),(n||a)&&i.forEach(t=>e.add(t))}return t}_setInitialView(e){if(Object(z["j"])(e)||this.cameraSetByUser)return;if(e instanceof vu["a"])return void this.setStateCamera(lv(this.view,e),{applyConstraints:!1});if(e instanceof ae["a"]){if(e.targetGeometry instanceof de["a"]){const t=wv(this.view,e.targetGeometry,0,.5,av.LOCKED);return void(Object(z["k"])(t)&&this.setStateCamera(lv(this.view,t),{applyConstraints:!0}))}const t={applyConstraints:!e.camera},r=this._viewpointToCamera(e);return void this.setStateCamera(r,t)}const t=wv(this.view,e,0,.5,av.LOCKED);Object(z["k"])(t)&&this.setStateCamera(lv(this.view,t),{applyConstraints:!0})}_updatePropertyBeforeReady(e,t){return!this.ready&&(this._override(e,t),t&&-1!==MT.indexOf(e)&&this._override("hasInitialView",!0),!0)}isCompatible(e){return!Object(z["j"])(e)&&(e instanceof ae["a"]?e.camera?this.isCompatible(e.camera):this.isCompatible(e.targetGeometry):e instanceof vu["a"]?this.isCompatible(e.position):e.spatialReference&&Object(_n["a"])(e.spatialReference,this.view.spatialReference))}_getPreservingHeadingTilt(e=IT){return this.cameraSetByUser?(e.heading=this.camera.heading,e.tilt=this.camera.tilt):(e.heading=0,e.tilt=.5),e}_centerPointAtDistanceToCamera(e,t,r=LT){const{heading:i,tilt:n}=this._getPreservingHeadingTilt(),a=_v(this.view,i,n,e,t,av.ADJUST);return Object(z["j"])(a)?null:(r.copyFrom(this.view.state.camera),r.eye=a.eye,r.center=a.center,r.up=a.up,r)}_centerToCamera(e){const t=this.view.pointsOfInterest.centerOnContent;t.runTask();const r=t.distance;return this._centerPointAtDistanceToCamera(e,r)}_extentToCamera(e){const{heading:t,tilt:r}=this._getPreservingHeadingTilt(),i=wv(this.view,e,t,r,av.ADJUST,DT);return Object(z["k"])(i)?lv(this.view,i):null}_scaleToCamera(e){if(null==e)return null;const t=this.view.pointsOfInterest.centerOnContent;t.runTask();const r=t.renderLocation,i=t.location.latitude,n=hv(this.view,e,i);return this._centerPointAtDistanceToCamera(r,n)}_zoomToCamera(e){return this._scaleToCamera(Dv(this.view,e))}_viewpointToCamera(e){return lv(this.view,Zx(this.view,e))}setStateCamera(e,t){return!(Object(z["j"])(e)||!this.view.state.stopActiveCameraController())&&(this.cameraSetByUser=!0,t.doNotCancelGoToOperation||this._cancelGoToOperation(),this.view.state.updateCamera(r=>{t.positionAndOrientationOnly?(r.eye=e.eye,r.center=e.center,r.up=e.up):r.copyFrom(e),t.applyConstraints&&Mm(this.view,r)}),t.applyConstraints||(this.view.state.cameraController=new Bx({view:this.view,desiredCamera:e})),!0)}_prepareFrame(){const{container:e,canvas:t}=this.view;if(!e||!t)return;Object(z["k"])(this.updateDevicePixelRatio)&&this.updateDevicePixelRatio();const r=this.view.pixelRatio,i=Math.round(e.clientWidth*r),n=Math.round(e.clientHeight*r);if(0!==i&&0!==n&&(t.width===i&&t.height===n||(t.width=i,t.height=n),this.view.state)){const e=this.view.state.camera;e.fullWidth===i&&e.fullHeight===n&&e.pixelRatio===r||(LT.copyFrom(e),LT.pixelRatio!==r&&(this._paddingToArray(this.padding,r,NT),LT.padding=NT),LT.fullWidth=i,LT.fullHeight=n,LT.pixelRatio=r,this.view.state.camera=LT)}}_updateElevation(e){const t=this.view.basemapTerrain&&this.view.basemapTerrain.spatialReference,r=this.view.renderCoordsHelper.getAltitude(e.eye),i=t?ub(this.view,e.eye):0;e.relativeElevation=r-i}};Object(l["a"])([Object(j["b"])({type:vu["a"],dependsOn:["view.state.camera","ready"]})],CT.prototype,"camera",null),Object(l["a"])([Object(j["b"])({type:vu["a"],dependsOn:["view.state.contentCamera","ready"]})],CT.prototype,"contentCamera",null),Object(l["a"])([Object(j["b"])({type:he["a"]})],CT.prototype,"center",null),Object(l["a"])([Object(j["b"])({type:de["a"]})],CT.prototype,"extent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],CT.prototype,"frustum",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],CT.prototype,"hasInitialView",null),Object(l["a"])([Object(j["b"])({readOnly:!0,type:Boolean})],CT.prototype,"ready",void 0),Object(l["a"])([Object(j["b"])({type:Number})],CT.prototype,"scale",null),Object(l["a"])([Object(j["b"])()],CT.prototype,"padding",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],CT.prototype,"screenCenter",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],CT.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({type:ae["a"]})],CT.prototype,"viewpoint",null),Object(l["a"])([Object(j["b"])({type:Number})],CT.prototype,"zoom",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],CT.prototype,"updateDevicePixelRatio",void 0),CT=Object(l["a"])([Object(x["a"])("esri.views.3d.state.ViewStateManager")],CT);const RT=CT,MT=["camera","viewpoint","extent","scale","center","zoom"],PT=[{propertyName:"camera",overrides:["viewpoint"]},{propertyName:"viewpoint",overrides:["extent"]},{propertyName:"extent",overrides:["center","scale"]},{propertyName:"center",overrides:[]},{propertyName:"scale",overrides:["zoom"]},{propertyName:"zoom",overrides:[]},{propertyName:"padding",overrides:[]}],IT={heading:0,tilt:0},DT=new vu["a"],LT=new $m["b"],NT=Object(Xd["e"])(),FT="pending-initial-view";var kT=r("1942"),UT=r("a978");class zT{constructor(e,t,r){this.viewingMode=e,this._forEachLayer=t,this.view=r,this.externalIntersectionHandlers=new k_["a"],this.tolerance=cb["a"],this.tmpRay=Object(Df["c"])(),this.validateHUDIntersector=Object(cb["b"])(this.viewingMode),this.validateHUDIntersector.options.hud=!1}intersectScreen(e,t){return this.intersectRay(this._getPickRay(e,this.tmpRay),VT(this.viewingMode),t)}intersectScreenFreePointFallback(e,t){return this.intersectRayFreePointFallback(this._getPickRay(e,this.tmpRay),t)}intersectRayFreePointFallback(e,t){return this.intersectRay(e,VT(this.viewingMode),t)||this._intersectRayFreePointLocal(e,t)}intersectRay(e,t,r,i){return t.options.selectionMode=!1,t.options.store=kT["c"].MIN,this.computeIntersection(e,t,i),!!t.results.min&&t.results.min.getIntersectionPoint(r)}getCenterRayWithSubpixelOffset(e,t,r=.5,i=.5){return e.getRenderCenter(WT,r,i),WT[0]+=.0466,WT[1]-=.0123,Object(Mg["b"])(e,WT,t)}intersectIntersectorScreen(e,t,r){this.computeIntersection(this._getPickRay(e,this.tmpRay),t,r)}intersectToolIntersectorScreen(e,t,r){const i=this._getPickRay(e,this.tmpRay);this.intersectToolIntersectorRay(i,t,r)}intersectToolIntersectorRay(e,t,r){t.options.selectionMode=!0,this.computeIntersection(e,t,r);const i=t.results.min;this.view.basemapTerrain&&this.view.basemapTerrain.opaque||Object(UT["c"])(i)&&i.intersector!==kT["b"].TERRAIN||(t.options.selectionMode=!1,this.computeIntersection(e,t,r))}setTolerance(e=cb["a"]){this.tolerance=e}addIntersectionHandler(e){this.externalIntersectionHandlers.push(e),this.externalIntersectionHandlers.sort((e,t)=>e.type===kT["b"].TERRAIN?1:t.type===kT["b"].TERRAIN?-1:0)}removeIntersectionHandler(e){this.externalIntersectionHandlers.removeUnordered(e),this.externalIntersectionHandlers.sort((e,t)=>e.type===kT["b"].TERRAIN?1:t.type===kT["b"].TERRAIN?-1:0)}_getPickRay(e,t){const r=this.view.state.camera;return Object(Mg["c"])(r,e,t)}_intersectRayFreePointLocal(e,t){if(this.viewingMode!==As["a"].Local||Object(z["j"])(e))return!1;const r=this.view.renderDataExtent;if(Object(z["j"])(r))return Object($o["h"])(t,e.origin,Object($o["t"])(Rg["d"].get(),e.direction)),!0;const i={x:r.xmax-r.xmin,y:r.ymax-r.ymin,z:8*Math.max(r.xmax-r.xmin,r.ymax-r.ymin)},n=Math.max(i.x,i.y,i.z);if(0===n)return Object($o["h"])(t,e.origin,Object($o["t"])(Rg["d"].get(),e.direction)),!0;const a=this.view.state.camera,s=Math.max(0,r.xmin-a.eye[0],a.eye[0]-r.xmax),o=Math.max(0,r.ymin-a.eye[1],a.eye[1]-r.ymax),c=Math.sqrt(s*s+o*o),l=Math.abs(a.relativeElevation)+Number.MIN_VALUE,u=Math.max(0,Math.log(n/l))**2;let d=n/Math.max(1,u);d=Math.max(d,Math.min(c,n));const h=Object($o["g"])(Rg["d"].get(),e.direction,d/Object($o["r"])(e.direction));return Object($o["h"])(t,e.origin,h),!0}intersectElevationFromScreen(e,t,r=0,i=null){return this._intersectElevation(this._getPickRay(e,this.tmpRay),t,r,i)}_intersectElevation(e,t,r=0,i=null){if(Object(z["j"])(e))return null;const n=Object(z["k"])(t)?t.mode:"absolute-height",a=Object(z["k"])(t)?Object(z["u"])(t.offset,0):0,s="on-the-ground"!==n?a+r:0,o=s/this.view.renderCoordsHelper.unitInMeters;if("absolute-height"===n){if(this.view.renderCoordsHelper.intersectInfiniteManifold(e,s,qT)){const e=this.view.computeMapPointFromVec3d(qT);return e.z-=a,e}return null}const c=this.view.state.camera,l=Object(ce["b"])(Rg["d"].get());c.projectToRenderScreen(e.origin,l);const u=new GT(null,this._forEachLayer),d=this.view.slicePlane,h=Object(z["k"])(d)?Object(UT["d"])(d):null,p=Object(cb["b"])(this.viewingMode);p.options.store=kT["c"].MIN,p.options.verticalOffset=o;const f=e.origin,b=Object($o["h"])(Rg["d"].get(),f,e.direction);p.reset(f,b,c),p.point=l;const m=Object(z["k"])(i)?"type"in i&&"graphics"===i.type?e=>e.metadata.layerUid!==i.uid:e=>e.metadata.graphicUid!==i.uid:null;switch(n){case"relative-to-scene":{const e=e=>(Object(z["j"])(m)||m(e))&&e.metadata&&e.metadata.isElevationSource;p.intersect(u.layers,l,this.tolerance,null,e),this.externalIntersectionHandlers.forAll(e=>{if(e.type===kT["b"].I3S||e.type===kT["b"].TERRAIN){const t=e.slicePlaneEnabled?h:null;e.intersect(p,t,p.rayBegin,p.rayEnd,l)}})}break;case"on-the-ground":case"relative-to-ground":this.externalIntersectionHandlers.forAll(e=>{if(e.isGround){const t=e.slicePlaneEnabled?h:null;e.intersect(p,t,p.rayBegin,p.rayEnd,l)}})}if(p.results.min.getIntersectionPoint(qT)){const e=this.view.computeMapPointFromVec3d(qT);return e.z=r,e}return null}computeIntersection(e,t,r){if(Object(z["j"])(e))return;const i=this.view.state.camera,n=Object(ce["b"])(Rg["d"].get());i.projectToRenderScreen(e.origin,n);const a=new GT(r,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!r||!("include"in r||"exclude"in r);const s=e.origin,o=Object($o["h"])(Rg["d"].get(),e.origin,e.direction);t.reset(s,o,i),t.intersect(a.layers,n,this.tolerance);const c=this.view.slicePlane,l=Object(z["k"])(c)?Object(UT["d"])(c):null;t.intersect(a.sliceableLayers,n,this.tolerance,l);const u=r&&(r.requiresGroundFeedback||r.enableDraped);this.externalIntersectionHandlers.forAll(e=>{if(t.options.isFiltered=!a.filterLayerUid(e.layerUid),e.isGround&&u||!t.options.isFiltered){const r=e.slicePlaneEnabled?l:null;e.intersect(t,r,s,o,n)}});const d=Rg["d"].get();if(r&&r.enableDraped&&t.results.ground.getIntersectionPoint(d)){const e=this.view.basemapTerrain.overlayManager.renderer,r=this.view.renderCoordsHelper.spatialReference,i=Rg["d"].get();this.view.renderCoordsHelper.fromRenderCoords(d,i,this.view.spatialReference),i[2]=Object(z["u"])(this.view.elevationProvider.getElevation(d[0],d[1],d[2],r,"ground"),0),e.intersect(t,i,t.results.ground,e=>a.filterRenderGeometry(e))}t.sortResults();const h=t.results.hud;if(Object(UT["a"])(h)){const e=Object(ce["b"])(Rg["d"].get()),r=Rg["d"].get(),n=Rg["d"].get();this._unprojectHUDResultRay(h.target.center,e,r,n);const s=Object($o["o"])(h.target.center,r)/Object($o["o"])(r,n)*.99;this.validateHUDIntersector.reset(r,n,i),this.validateHUDIntersector.intersect(a.layers,e,this.tolerance),this.validateHUDIntersector.intersect(a.sliceableLayers,e,this.tolerance,l),this.externalIntersectionHandlers.forAll(t=>{if(!a.filterLayerUid(t.layerUid))return;const i=t.slicePlaneEnabled?l:null;t.intersect(this.validateHUDIntersector,i,r,n,e)});const o=this.validateHUDIntersector.results.min;(null==o.dist||s<=o.dist)&&(t.results.min.copy(h),t.results.all.splice(0,0,h))}}_unprojectHUDResultRay(e,t,r,i){const n=this.view.state.camera;n.projectToRenderScreen(e,t);const a=Object(ce["b"])(Rg["d"].get());a[0]=t[0],a[1]=t[1],a[2]=0,n.unprojectFromRenderScreen(a,r),a[2]=1,n.unprojectFromRenderScreen(a,i)}}let BT;function VT(e){return BT&&BT.viewingMode===e||(BT=Object(cb["b"])(e)),BT}class GT{constructor(e,t){this.layers=new Array,this.sliceableLayers=new Array,this.include=null==e?void 0:e.include,this.exclude=null==e?void 0:e.exclude,t(e=>{e.isPickable&&this.filterLayerUid(e.apiLayerUid)&&(e.isSliceable?this.sliceableLayers:this.layers).push(e)})}filterLayerUid(e){const{include:t,exclude:r}=this;return Object(z["j"])(e)?null==t&&null==r:(null==t||t.has(e))&&(null==r||!r.has(e))}filterRenderGeometry(e){return this.filterLayerUid(e.layerUid)}}function HT(e){return"object"==typeof e&&"intersect"in e}const qT=Object(ju["f"])(),WT=Object(ce["d"])();var $T=r("1797");let ZT=class extends(U["a"].EventedMixin(F["a"])){constructor(e){super(e),this.im=new Array,this.ground=new Array,this.scene=new Array,this.handles=new Map,this.lastElevationQuery=null,this.elevationCacheEnabled=!1}destroy(){this._elevationQuery=Object(z["d"])(this._elevationQuery)}get elevationQuery(){return Object(z["j"])(this._elevationQuery)&&(this._elevationQuery=new $T["a"](this.view.resourceController.scheduler,this.view.spatialReference,()=>this.view.map&&this.view.map.ground,{maximumAutoTileRequests:4})),this._elevationQuery}enableElevationCache(e){e||(this.lastElevationQuery=null),this.elevationCacheEnabled=e}getElevation(e,t,r,i,n){if(this.elevationCacheEnabled&&null!=this.lastElevationQuery){const a=this.lastElevationQuery;if(e===a.x&&t===a.y&&r===a.z&&i.equals(a.spatialReference)&&n===a.queryContext)return a.result}let a=null;return a=XT(a,this.im,e,t,r,i,n),Object(z["j"])(a)&&(a=XT(a,this.ground,e,t,r,i,n)),"scene"===n&&(a=XT(a,this.scene,e,t,r,i,n)),this.elevationCacheEnabled&&(this.lastElevationQuery={x:e,y:t,z:r,spatialReference:i,queryContext:n,result:a}),a}queryElevation(e,t,r,i,n,a=null,s=0){const o=Object(_["g"])();return this.elevationQuery.queryElevation(e,t,a,s).then(a=>{"scene"===n&&(a=XT(a,this.scene,e,t,r,i,n)),o.resolve(a)}).catch(a=>{Object(_["m"])(a)?o.reject(a):o.resolve(this.getElevation(e,t,r,i,n))}),o.promise}register(e,t){this.handles.set(t,t.on("elevation-change",e=>this.emit("elevation-change",e))),this[e].push(t)}unregister(e){this.handles.has(e)&&(this.handles.get(e).remove(),this.handles.delete(e));for(const t of[this.im,this.ground,this.scene]){const r=t.indexOf(e);r>-1&&t.splice(r,1)}}};function XT(e,t,r,i,n,a,s){for(const o of t){const t=o.getElevation(r,i,n,a,s);Object(z["k"])(t)&&(e=Object(z["k"])(e)?Math.max(t,e):t)}return e}Object(l["a"])([Object(j["b"])({constructOnly:!0})],ZT.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"view.basemapTerrain.spatialReference"})],ZT.prototype,"spatialReference",void 0),ZT=Object(l["a"])([Object(x["a"])("esri.views.3d.support.CombinedElevationProvider")],ZT);class YT{static isValidProfile(e){return e in YT.profiles}static getDefaultProfile(){return Object(E["a"])("trident")||Object(E["a"])("esri-iPhone")?"low":"medium"}static apply(e,t){const r=YT.profiles[e];t.graphics3D.maxTotalNumberOfFeatures=r.graphics3D.maxTotalNumberOfFeatures,t.graphics3D.maxTotalNumberOfPrimitives=r.graphics3D.maxTotalNumberOfPrimitives,t.graphics3D.polygonLodFactor=r.graphics3D.polygonLodFactor,t.graphics3D.polylineLodFactor=r.graphics3D.polylineLodFactor,t.graphics3D.snapshotAvailable=r.graphics3D.snapshotAvailable;{const e=t.sceneService["3dObject"],i=r.sceneService["3dObject"];e.lodFactor=i.lodFactor,e.lodCrossfadeinDuration=i.lodCrossfadeinDuration,e.lodCrossfadeoutDuration=i.lodCrossfadeoutDuration,e.lodCrossfadeUncoveredDuration=i.lodCrossfadeUncoveredDuration}t.sceneService.point.lodFactor=r.sceneService.point.lodFactor,t.sceneService.integratedMesh.lodFactor=r.sceneService.integratedMesh.lodFactor,t.sceneService.pointCloud.lodFactor=r.sceneService.pointCloud.lodFactor,t.sceneService.uncompressedTextureDownsamplingEnabled=r.sceneService.uncompressedTextureDownsamplingEnabled,t.tiledSurface.lodBias=r.tiledSurface.lodBias,t.tiledSurface.angledSplitBias=r.tiledSurface.angledSplitBias,t.tiledSurface.reduceTileLevelDifferences=r.tiledSurface.reduceTileLevelDifferences,t.tiledSurface.textureFadeDuration=r.tiledSurface.textureFadeDuration,t.heatmap.pixelRatio=r.heatmap.pixelRatio,t.heatmap.maxTotalNumberOfFeatures=r.heatmap.maxTotalNumberOfFeatures,t.antialiasingEnabled=r.antialiasingEnabled,t.physicallyBasedRenderingEnabled=r.physicalBasedRenderingEnabled,t.highQualityTransparency=r.highQualityTransparency,t.memoryLimit=r.memoryLimit,t.additionalCacheMemory=r.additionalCacheMemory,t.frameRate=r.frameRate,t.maximumRenderResolution=r.maximumRenderResolution,t.maximumPixelRatio=r.maximumPixelRatio}}function JT(){const e=!!Object(E["a"])("esri-mobile"),t=!!Object(E["a"])("ios");return{low:{graphics3D:{maxTotalNumberOfFeatures:25e3,maxTotalNumberOfPrimitives:85e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1},heatmap:{pixelRatio:.125,maxTotalNumberOfFeatures:25e3},sceneService:{"3dObject":{lodFactor:.2,lodCrossfadeinDuration:0,lodCrossfadeoutDuration:0,lodCrossfadeUncoveredDuration:0},point:{lodFactor:1},integratedMesh:{lodFactor:.6},pointCloud:{lodFactor:.5},uncompressedTextureDownsamplingEnabled:!0},tiledSurface:{lodBias:-1,angledSplitBias:.5,reduceTileLevelDifferences:!1,textureFadeDuration:0},antialiasingEnabled:!1,physicalBasedRenderingEnabled:!1,highQualityTransparency:!1,memoryLimit:200,additionalCacheMemory:0,frameRate:0,maximumRenderResolution:null,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxTotalNumberOfPrimitives:17e5,polygonLodFactor:e?.8:1,polylineLodFactor:e?1.2:1.5,snapshotAvailable:!t},heatmap:{pixelRatio:.25,maxTotalNumberOfFeatures:5e4},sceneService:{"3dObject":{lodFactor:1,lodCrossfadeinDuration:0,lodCrossfadeoutDuration:0,lodCrossfadeUncoveredDuration:400},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1},uncompressedTextureDownsamplingEnabled:e},tiledSurface:{lodBias:0,angledSplitBias:1,reduceTileLevelDifferences:!Object(E["a"])("disable-feature:reduce-map-tile-levels"),textureFadeDuration:400},antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,memoryLimit:e?600:750,additionalCacheMemory:e?0:150,frameRate:0,maximumRenderResolution:null,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxTotalNumberOfPrimitives:17e5,polygonLodFactor:e?1.2:2,polylineLodFactor:e?1.2:2,snapshotAvailable:!t},heatmap:{pixelRatio:.5,maxTotalNumberOfFeatures:5e4},sceneService:{"3dObject":{lodFactor:1,lodCrossfadeinDuration:0,lodCrossfadeoutDuration:0,lodCrossfadeUncoveredDuration:400},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1},uncompressedTextureDownsamplingEnabled:!1},tiledSurface:{lodBias:0,angledSplitBias:1,reduceTileLevelDifferences:!Object(E["a"])("disable-feature:reduce-map-tile-levels"),textureFadeDuration:400},antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,memoryLimit:e?900:1500,additionalCacheMemory:0,frameRate:0,maximumRenderResolution:e?null:4096,maximumPixelRatio:e?1:null}}}YT.debug={reset(){const e=JT();for(const t in e)YT.profiles[t]=e[t]}},function(e){e.profiles=JT()}(YT||(YT={}));const QT=YT;var KT=r("5ef2");let eS=class extends F["a"]{constructor(){super(...arguments),this.color=new d["a"]([0,255,255]),this.haloColor=null,this.haloOpacity=1,this.fillOpacity=.25,this.shadowOpacity=.4,this.shadowColor=new d["a"]([0,0,0]),this.shadowDifference=.2}static toEngineOptions(e){const t=d["a"].toUnitRGBA(e.color),r=Object(z["k"])(e.haloColor)?d["a"].toUnitRGBA(e.haloColor):t,i=d["a"].toUnitRGBA(e.shadowColor);return{color:Object(KT["c"])(t[0],t[1],t[2],t[3]),haloColor:Object(KT["c"])(r[0],r[1],r[2],r[3]),haloOpacity:e.haloOpacity,haloOpacityOccluded:.25*e.haloOpacity,fillOpacity:e.fillOpacity,fillOpacityOccluded:.25*e.fillOpacity,shadowOpacity:e.shadowOpacity,shadowColor:Object(KT["c"])(i[0],i[1],i[2],i[3]),occludedShadowOpacity:e.shadowOpacity*(1-e.shadowDifference)}}};Object(l["a"])([Object(j["b"])({type:d["a"]})],eS.prototype,"color",void 0),Object(l["a"])([Object(j["b"])({type:d["a"]})],eS.prototype,"haloColor",void 0),Object(l["a"])([Object(j["b"])()],eS.prototype,"haloOpacity",void 0),Object(l["a"])([Object(j["b"])()],eS.prototype,"fillOpacity",void 0),Object(l["a"])([Object(j["b"])()],eS.prototype,"shadowOpacity",void 0),Object(l["a"])([Object(j["b"])({type:d["a"]})],eS.prototype,"shadowColor",void 0),Object(l["a"])([Object(j["b"])()],eS.prototype,"shadowDifference",void 0),eS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.HighlightOptions")],eS);const tS=eS;var rS=r("e2e8"),iS=r("ac91"),nS=r("7e6b");class aS{constructor(e,t){this.spatialReference=t,this.unitInMeters=Object(Sx["f"])(this.spatialReference,Object(Yd["e"])(this.spatialReference).metersPerDegree),this._geometryServiceURLPromise=Object(rS["getGeometryServiceURL"])(e&&e.get("portalItem")).catch(()=>{throw new b["a"]("mapcoordshelper:missing-geometry-service","Must specify geometryService in esri/config")})}async toGeographic(e){const t=await this._geometryServiceURLPromise;let r,i=!0;Array.isArray(e[0])&&"number"!=typeof e[0]?r=e:(r=[e],i=!1);const n=r.map(e=>e instanceof he["a"]?e:new he["a"](e,this.spatialReference)),a=new nS["a"]({geometries:n,outSpatialReference:ne["a"].WGS84}),s=(await Object(iS["a"])(t,a)).map(e=>"point"===e.type?[e.x,e.y]:void 0);return i?s:s[0]}}let sS=class extends F["a"]{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxTotalNumberOfPrimitives=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1}};Object(l["a"])([Object(j["b"])()],sS.prototype,"minTotalNumberOfFeatures",void 0),Object(l["a"])([Object(j["b"])()],sS.prototype,"maxTotalNumberOfFeatures",void 0),Object(l["a"])([Object(j["b"])()],sS.prototype,"maxTotalNumberOfPrimitives",void 0),Object(l["a"])([Object(j["b"])()],sS.prototype,"snapshotAvailable",void 0),Object(l["a"])([Object(j["b"])()],sS.prototype,"polygonLodFactor",void 0),Object(l["a"])([Object(j["b"])()],sS.prototype,"polylineLodFactor",void 0),sS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.Graphics3DSettings")],sS);let oS=class extends F["a"]{constructor(){super(...arguments),this.lodFactor=1}};Object(l["a"])([Object(j["b"])()],oS.prototype,"lodFactor",void 0),oS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.LoDFactorSettings")],oS);let cS=class extends oS{constructor(){super(...arguments),this.lodCrossfadeinDuration=0,this.lodCrossfadeoutDuration=0,this.lodCrossfadeUncoveredDuration=0}};cS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.LoDFactor3DObjectSettings")],cS);let lS=class extends F["a"]{constructor(){super(...arguments),this["3dObject"]=new cS,this.point=new oS,this.integratedMesh=new oS,this.pointCloud=new oS,this.uncompressedTextureDownsamplingEnabled=!1}};Object(l["a"])([Object(j["b"])({type:cS})],lS.prototype,"3dObject",void 0),Object(l["a"])([Object(j["b"])({type:oS})],lS.prototype,"point",void 0),Object(l["a"])([Object(j["b"])({type:oS})],lS.prototype,"integratedMesh",void 0),Object(l["a"])([Object(j["b"])({type:oS})],lS.prototype,"pointCloud",void 0),Object(l["a"])([Object(j["b"])()],lS.prototype,"uncompressedTextureDownsamplingEnabled",void 0),lS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.SceneServiceSettings")],lS);let uS=class extends F["a"]{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.reduceTileLevelDifferences=!0,this.textureFadeDuration=500}};Object(l["a"])([Object(j["b"])()],uS.prototype,"lodBias",void 0),Object(l["a"])([Object(j["b"])()],uS.prototype,"angledSplitBias",void 0),Object(l["a"])([Object(j["b"])()],uS.prototype,"reduceTileLevelDifferences",void 0),Object(l["a"])([Object(j["b"])()],uS.prototype,"textureFadeDuration",void 0),uS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],uS);let dS=class extends F["a"]{constructor(){super(...arguments),this.pixelRatio=1,this.maxTotalNumberOfFeatures=5e4}};Object(l["a"])([Object(j["b"])()],dS.prototype,"pixelRatio",void 0),Object(l["a"])([Object(j["b"])()],dS.prototype,"maxTotalNumberOfFeatures",void 0),dS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.HeatmapSettings")],dS);let hS=class extends F["a"]{constructor(){super(...arguments),this.graphics3D=new sS,this.sceneService=new lS,this.tiledSurface=new uS,this.heatmap=new dS,this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0}};Object(l["a"])([Object(j["b"])({type:sS})],hS.prototype,"graphics3D",void 0),Object(l["a"])([Object(j["b"])({type:lS})],hS.prototype,"sceneService",void 0),Object(l["a"])([Object(j["b"])({type:uS})],hS.prototype,"tiledSurface",void 0),Object(l["a"])([Object(j["b"])({type:dS})],hS.prototype,"heatmap",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"antialiasingEnabled",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"physicallyBasedRenderingEnabled",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"highQualityTransparency",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"memoryLimit",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"additionalCacheMemory",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"frameRate",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"maximumRenderResolution",void 0),Object(l["a"])([Object(j["b"])()],hS.prototype,"maximumPixelRatio",void 0),hS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.QualitySettings.QualitySettings")],hS);const pS=hS;var fS=r("92a1"),bS=r("2aa2"),mS=r("aefa");function gS(e){return"function"==typeof e.getUsedMemory}const yS=v["a"].getLogger("esri.views.3d.support.MemoryController");function OS(e){return new TS(e)}const vS=1,_S=1,jS=.75,wS=.6,xS=1.3;class TS{constructor(e){this._view=e,this.events=new U["a"],this.minQuality=.1,this._maxMemory=500,this._additionalCacheMemory=100,this._quality=1,this._stableQuality=0,this._downscaleMemoryUsed=0,this._canFastRecover=!1,this._memoryUsed=0,this._memoryPredicted=0,this._cacheStorage=new mS["c"],this._numQualityChanges=0,this._updating=!1}destroy(){this.events=null,this._cacheStorage.destroy()}newCache(e,t){return new mS["b"](e,this._cacheStorage,t)}set maxMemory(e){null!=e&&e>0&&(this._stableQuality=0,this._canFastRecover=!1,this._maxMemory<e&&this._updateQuality(vS),this._maxMemory=e)}get maxMemory(){return this._maxMemory}set additionalCacheMemory(e){null!=e&&e>=0&&(this._additionalCacheMemory=e)}disableMemCache(){this._additionalCacheMemory=-4096}get memoryFactor(){return this._quality}get updating(){return this._updating}get usedMemory(){return this._memoryUsed}resetStableQuality(){this._stableQuality=0}update(){if(this._updateMemory(),this._memoryPredicted<=0&&!this._updating)return;let e=this._layersUpdating();if(this._memoryPredicted<wS&&this._canFastRecover)this._downscaleMemoryUsed=0,this._stableQuality=0,this._canFastRecover=!1,this._updateQuality(vS);else if(e)(this._memoryPredicted>1.1*_S||this._memoryUsed>_S)&&(this._stableQuality>0?(this._downscaleMemoryUsed=0,this._updateQuality(this._stableQuality)):this._quality>this.minQuality&&this._downscaleMemoryUsed<this._memoryUsed&&(this._updateQuality(this._quality/xS),this._downscaleMemoryUsed=this._memoryUsed,this._canFastRecover=!1));else if(this._downscaleMemoryUsed=0,this._memoryUsed>_S)this._stableQuality=0,this._canFastRecover=!1,e=this._updateQuality(this._quality/xS),this._downscaleMemoryUsed=this._memoryPredicted;else if(this._stableQuality!==this._quality)if(this._memoryUsed<jS&&this._quality<vS){this._stableQuality=this._quality;const t=.05;e=this._updateQuality(this._quality+t)}else this._quality<1&&(this._canFastRecover=!0);this.updating!==e&&(this._updating=e,this.events.emit("updating-changed",this.updating))}_updateQuality(e){return(e=Math.min(Math.max(e,this.minQuality),vS))!==this._quality&&(this._quality=e,this.events.emit("quality-changed",this._quality),++this._numQualityChanges,!0)}_layersUpdating(){return this._view.allLayerViews.some(e=>!!e.updating)}_updateMemory(){let e=0,t=0;this._view.basemapTerrain&&this._view.basemapTerrain.getUsedMemory&&(e+=this._view.basemapTerrain.getUsedMemory());const r=this._view._stage&&this._view._stage.renderView&&this._view._stage.renderView.edgeView;Object(z["k"])(r)&&(e+=r.usedMemory),this._view.allLayerViews&&this._view.allLayerViews.forEach(r=>{if(gS(r)){const i=r.ignoresMemoryFactor()?this._quality:1;e+=r.getUsedMemory()*i,t+=r.getUnloadedMemory()*i}});const i=null==this._warnMemoryUsage||Math.round(10*e)!==Math.round(10*this._warnMemoryUsage),n=1048576*this._maxMemory;if(e>n&&i){this._warnMemoryUsage=e;const r=e=>(e/1048576).toLocaleString(void 0,{maximumFractionDigits:1})+" MB",i=Math.round(100*this._quality);yS.warn(`Memory Limit exceeded! Limit: ${r(n)} Current: ${r(e)} Projected: ${r(e+t)} Quality: ${i}%`)}this._memoryUsed=e/n,this._memoryPredicted=(e+t)/n;const a=n-e;this._cacheStorage.maxSize=Math.max(0,a+1048576*this._additionalCacheMemory),this.events.emit("memory-used",this._memoryUsed)}get test(){const e=this;return{cacheStorage:this._cacheStorage,resetQualityChanges:()=>{const t=e._numQualityChanges;return e._numQualityChanges=0,t}}}}var SS=r("3af9");let ES=class extends F["a"]{constructor(){super(...arguments),this.updating=!1}};function AS(e,t=(()=>performance.now())){return new CS.ResourceController({view:e,now:t})}var CS;Object(l["a"])([Object(j["b"])({readOnly:!0})],ES.prototype,"updating",void 0),ES=Object(l["a"])([Object(x["a"])("esri.views.3d.support.ResourceController")],ES),function(e){let t=class extends ES{constructor(){super(...arguments),this._scheduler=null,this._memoryController=null,this._streamDataLoader=null,this._cameraChangeTime=0,this._handles=new ge["a"],this._frameTask=null,this._scheduleTask=Ba["a"],this._state=Ba["b"].IDLE}initialize(){this._cameraChangeTime=this.now(),this._scheduler=Object(Ba["d"])(this.now),this._memoryController=OS(this.view),this._streamDataLoader=new SS["b"],this._streamDataLoader.setup(bS["c"],bS["b"],this._scheduler),this._handles.add([this.view.watch("state.camera",(e,t)=>this._cameraChangedHandler(e,t),!0),this.view.watch("stationary",()=>this._stationaryChangedHandler()),this._memoryController.events.on("updating-changed",()=>this.notifyChange("updating"))]),this._frameTask=Object(xe["a"])({update:e=>this._frame(e)}),this._scheduleTask=this._scheduler.registerTask(Ba["c"].RESOURCE_CONTROLLER)}destroy(){this._handles=Object(z["d"])(this._handles),this._scheduleTask.remove(),this._frameTask=Object(z["s"])(this._frameTask),this._streamDataLoader=Object(z["d"])(this._streamDataLoader),this._memoryController=Object(z["d"])(this._memoryController),this._scheduler=Object(z["d"])(this._scheduler)}get updating(){var e,t;return!!(null!=(e=this._memoryController)&&e.updating||null!=(t=this._streamDataLoader)&&t.updating)}get scheduler(){return this._scheduler}get memoryController(){return this._memoryController}schedule(e,t,r){return this._scheduleTask.schedule(e,t,r)}createStreamDataRequester(e){const t=this._streamDataLoader;return{request:(r,i,n)=>t.request(r,i,e,n),get busy(){return!t.hasDownloadSlots(e)}}}_frame(e){this.view.suspended||this.view.stateManager&&(this.view.stateManager.step(Object(Ic["d"])(e.deltaTime)),!this._scheduler)||(this._updateState(),this._scheduler.state=this._state,this._scheduler.updateBudget(e)?(this._memoryController.update(),this._scheduler.frame()):this._memoryController.updating&&this._memoryController.update())}_cameraChangedHandler(e,t){e&&t&&e.almostEquals(t)||(this._cameraChangeTime=this._scheduler.now,this._updateState(),this._scheduler.state=this._state)}_stationaryChangedHandler(){this.memoryController.resetStableQuality()}_updateState(){this.view.animation?this._state=Ba["b"].ANIMATING:this.view.interacting?this._state=Ba["b"].INTERACTING:(this._state===Ba["b"].ANIMATING&&(this._cameraChangeTime=0),this._scheduler.now-this._cameraChangeTime<=r?this._state=Ba["b"].INTERACTING:this._state=Ba["b"].IDLE)}get test(){return{getQueueStats:e=>this._streamDataLoader.test.loadQueue.getStatsForType(e),state:this._state}}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],t.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],t.prototype,"now",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"_scheduler",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"_memoryController",void 0),Object(l["a"])([Object(j["b"])()],t.prototype,"_streamDataLoader",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],t.prototype,"updating",null),t=Object(l["a"])([Object(x["a"])("esri.views.3d.support.ResourceController")],t),e.ResourceController=t;const r=300}(CS||(CS={}));var RS=r("f0b9");function MS(e){return"performanceInfo"in e}var PS=r("8b9d");class IS{constructor(e,t){if(this.layer=null,this.memory=0,this.displayedNumberOfFeatures=0,this.maximumNumberOfFeatures=null,this.totalNumberOfFeatures=null,this.layer=e.layer,this.memory=Object(PS["j"])(e)?t.basemapTerrain.getUsedMemoryForLayerView(e):e.getUsedMemory(),MS(e)){const t=e.performanceInfo;this.displayedNumberOfFeatures=t.displayedNumberOfFeatures,this.maximumNumberOfFeatures=t.maximumNumberOfFeatures,this.totalNumberOfFeatures=t.totalNumberOfFeatures}}}class DS{constructor(e){this.totalMemory=0,this.usedMemory=0,this.quality=1,this.load=0,this.terrainMemory=0,this.edgesMemory=0,this.layerPerformanceInfos=new Array;const t=e.resourceController.memoryController;this.totalMemory=t.maxMemory*RS["a"].MEGABYTES,this.usedMemory=Math.round(t.usedMemory*this.totalMemory),this.quality=t.memoryFactor,this.load=e.resourceController.scheduler.load,this.terrainMemory=e.basemapTerrain?e.basemapTerrain.getUsedMemory():0;const r=e._stage&&e._stage.renderView&&e._stage.renderView.edgeView;this.edgesMemory=Object(z["k"])(r)?r.usedMemory:0,e.allLayerViews.items.forEach(t=>{(gS(t)||Object(PS["j"])(t))&&this.layerPerformanceInfos.push(new IS(t,e))}),this.layerPerformanceInfos.sort((e,t)=>t.memory-e.memory)}}var LS=r("b7c2"),NS=r("1e2c");class FS extends Va{constructor(e,t,r,i){super(t,i),this._streamDataRequester=e,this._parameters=r}async fromUrl(e,t,r){Object(_["v"])(r);const i=Object(z["k"])(r)&&r.signal,n=this.makeUid(e,t);let a=this._textureRequests.get(n);if(!a){const r=new AbortController,i=this._streamDataRequester.request(e,"image",{uid:n,signal:r.signal});a={referenceCount:0,texture:null,textureAsync:null,abortController:r},this._textureRequests.set(n,a),a.textureAsync=i.then(async r=>{const i=this._createTexture(e,r,t);return a.texture=i,a.abortController=null,this._stage.add(i),await this._stage.load(i),{uid:n,texture:i,release:()=>this._release(n)}},e=>{throw a.abortController=null,e})}return a.referenceCount++,new Promise((e,t)=>{Object(_["q"])(i,()=>{t(Object(_["e"])())}),a.textureAsync.then(e,t)}).catch(e=>{throw this._release(n),e})}_createTexture(e,t,r){const i={...this._parameters,powerOfTwoResizeMode:LS["g"].PAD};if(Object(H["z"])(e)){if(r||0===t.width&&0===t.height){const e=t.width?t.height/t.width:1;r=r||64,e>1?(t.width=Math.round(r/e),t.height=r):(t.width=r,t.height=Math.round(r*e))}this._stage.renderView&&this._stage.renderView.renderingContext.driverTest.svgAlwaysPremultipliesAlpha&&(i.preMultiplyAlpha=!1)}return i.width=t.width,i.height=t.height,new NS["a"](t,i)}}class kS{constructor(e){this.textures=null,this.streamDataRequester=null,this.graphicsOwners=[],this.screenSizePerspectiveHandles=null,this.cimSymbolRasterizer=null,this.viewState=e.viewState,this.view=e.view,this.pointsOfInterest=e.pointsOfInterest,this.objectResourceCache=e.objectResourceCache,this.streamDataRequester=e.resourceController.createStreamDataRequester(bS["a"].SYMBOLOGY),this.textures=new FS(this.streamDataRequester,e.view._stage,{preMultiplyAlpha:!0,wrap:{s:fh["B"].CLAMP_TO_EDGE,t:fh["B"].CLAMP_TO_EDGE}},e.resourceController.scheduler);const t=Object(Yd["e"])(this.view.spatialReference).radius;this.screenSizePerspectiveSettings=Object(tj["d"])(e.viewingMode,t),this.screenSizePerspectiveSettingsLabels=Object(tj["c"])(e.viewingMode,t)}destroy(){this.textures.destroy(),this.textures=null,this.streamDataRequester=null}addGraphicsOwner(e){if(!e)return{remove(){}};this.graphicsOwners.push(e);const t="layer"in e?e.watch("layer.screenSizePerspectiveEnabled",()=>this._updateScreenSizePerspectiveEnabled()):null;return this._updateScreenSizePerspectiveEnabled(),{remove:()=>{t&&(t.remove(),Object(S["k"])(this.graphicsOwners,e),this._updateScreenSizePerspectiveEnabled())}}}_updateScreenSizePerspectiveEnabled(){const e=this.graphicsOwners.some(e=>!0===e.get("layer.screenSizePerspectiveEnabled"));if(e&&!this.screenSizePerspectiveHandles){this.screenSizePerspectiveHandles=new ge["a"];const e=()=>this._updateScreenSizePerspectiveSettings();this.screenSizePerspectiveHandles.add([this.pointsOfInterest.centerOnSurfaceInfrequent.watch("distance",e,!0),this.viewState.events.on("camera-projection-changed",e)]),this._updateScreenSizePerspectiveSettings()}else!e&&this.screenSizePerspectiveHandles&&(this.screenSizePerspectiveHandles.destroy(),this.screenSizePerspectiveHandles=null)}_updateScreenSizePerspectiveSettings(){const e=this.pointsOfInterest;US.distance=e.centerOnSurfaceInfrequent.distance,US.fovY=this.viewState.camera.fovY,this.screenSizePerspectiveSettings.update(US),this.screenSizePerspectiveSettingsLabels.update(US),this.view._stage.renderView.requestRender()}}const US={distance:0,fovY:0};r("c128"),r("35c9");var zS=r("7533"),BS=r("6005"),VS=r("a957");class GS{constructor(e,t,r=""){this.graphics=e,this._symbol=new zS["a"]({symbolLayers:[new BS["a"]({material:{color:t},outline:{color:[255,255,255],size:1},resource:{primitive:"circle"}}),new VS["a"]({text:r,halo:{color:"white",size:1/.75},material:{color:t},size:12})]})}show(e,t){if(Object(z["j"])(t))return;this.hide();const r=new he["a"]({x:e[0],y:e[1],z:e[2],spatialReference:t});this._graphic=new ie["a"]({geometry:r,symbol:this._symbol}),this.graphics.add(this._graphic)}hide(){Object(z["k"])(this._graphic)&&(this.graphics.remove(this._graphic),this._graphic=null)}}let HS=class extends F["a"]{constructor(e){super(e),this.handles=new ge["a"]}destroy(){this.handles.destroy()}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],HS.prototype,"renderCoordsHelper",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],HS.prototype,"surface",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],HS.prototype,"state",void 0),HS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.PointOfInterest")],HS);const qS=Array;let WS=class extends HS{constructor(e){super(e),this._dirty=!1,this._propertiesPool=new vx["a"]({location:he["a"],renderLocation:qS},this),this._estimatedSurfaceAltitude=0,this._pendingElevationQueryController=null,this.cameraName="camera",this.renderLocation=Object(ju["f"])(),this.tmpPoint=new he["a"]}initialize(){if(this.scheduler&&this.handles.add(this.scheduler.registerTask(this.task,this)),this.runTask(),this.map){const e=()=>this._setDirty();this.handles.add(Object(Me["b"])(this.map,"ground.layers","change",e,e,e))}this._updateRenderLocation()}destroy(){this._cancelPendingRequest(),this._propertiesPool.destroy(),this._propertiesPool=null}get _camera(){return this.state[this.cameraName]}get location(){const e=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,e,this.state.spatialReference),e}get scale(){const e=this._camera,t=Object($o["o"])(e.eye,this.renderLocation),r={renderCoordsHelper:this.renderCoordsHelper,state:{camera:e}};return pv(r,t,0)}get updating(){return this._dirty||null!=this._pendingElevationQueryController}updateRenderLocation(){this._setDirty(),this._updateRenderLocation()}_setDirty(){this._dirty||(this._dirty=!0,this.notifyChange("updating"))}_cancelPendingRequest(){const e=this._pendingElevationQueryController;e&&(this._pendingElevationQueryController=null,e.abort(),this.notifyChange("updating"))}get running(){return!this._pendingElevationQueryController&&this._dirty}runTask(){if(this._cancelPendingRequest(),this._dirty=!1,this.notifyChange("updating"),!this.map||!this.map.ground)return void this._updateSurfaceAltitude(0);this.renderCoordsHelper.fromRenderCoords(this._camera.eye,this.tmpPoint,this.state.spatialReference);let e=new AbortController;this.map.ground.queryElevation(this.tmpPoint,{signal:e.signal,cache:this.cache}).then(e=>this._updateSurfaceAltitude(e.geometry.z)).catch(e=>{Object(_["m"])(e)||this._updateSurfaceAltitude(0)}).catch(()=>{}).then(()=>{this._pendingElevationQueryController===e&&(this._pendingElevationQueryController=null,this.notifyChange("updating")),e=null}),this._pendingElevationQueryController=e}_updateSurfaceAltitude(e){this._estimatedSurfaceAltitude!==e&&(this._estimatedSurfaceAltitude=e,this._updateRenderLocation())}_updateRenderLocation(){this.renderCoordsHelper.setAltitude($S,this._estimatedSurfaceAltitude,this._camera.eye),Object($o["q"])(this._get("renderLocation"),$S)||this._set("renderLocation",Object($o["m"])(this._propertiesPool.get("renderLocation"),$S))}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],WS.prototype,"scheduler",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],WS.prototype,"cache",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],WS.prototype,"task",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],WS.prototype,"cameraName",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],WS.prototype,"location",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],WS.prototype,"map",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],WS.prototype,"renderLocation",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],WS.prototype,"scale",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],WS.prototype,"updating",null),WS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.CameraOnSurface")],WS);const $S=Object(ju["f"])(),ZS=WS,XS=Array;let YS=class extends HS{constructor(e){super(e),this._propertiesPool=new vx["a"]({location:he["a"],renderLocation:XS},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.cameraName="camera",this.distance=0,this.renderLocation=Object(ju["f"])(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=Object(z["s"])(this._frameWorker),this._propertiesPool=Object(z["d"])(this._propertiesPool)}get _camera(){return this.state[this.cameraName]}get location(){const e=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,e,this.state.spatialReference),e}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get running(){return this.updating}runTask(){this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1}_updateRenderLocation(){const e=QS;let t=this._calculateSurfaceIntersection(this._currentSurfaceAltitude,e);const r=this._currentSurfaceAltitude!==this._latestSurfaceAltitude;!t&&r&&(t=this._calculateSurfaceIntersection(this._latestSurfaceAltitude,e),t&&(this._currentSurfaceAltitude=this._latestSurfaceAltitude));const i=KS;t&&this._latestSurfaceAltitudeChangesDistanceSignificantly(e,i)&&(Object($o["m"])(e,i),this._currentSurfaceAltitude=this._latestSurfaceAltitude),t?this.distance=Object($o["o"])(this._camera.eye,e):(Object($o["g"])(e,this._camera.viewForward,this._get("distance")),Object($o["h"])(e,e,this._camera.eye)),Object($o["q"])(this._get("renderLocation"),e)||this._set("renderLocation",Object($o["m"])(this._propertiesPool.get("renderLocation"),e))}_calculateSurfaceIntersection(e,t){const r=this._camera;if(!this.renderCoordsHelper.intersectManifold(r.ray,e,t))return!1;if(this.state.isGlobal){const i=Object(Yd["e"])(this.renderCoordsHelper.spatialReference).radius,n=i+e,a=Object($o["v"])(r.eye),s=a<n*n,o=Object($o["o"])(r.eye,t);if(s&&o>i/4){const e=n-Math.sqrt(a);return Object($o["g"])(t,r.viewForward,e),Object($o["h"])(t,t,r.eye),!0}}else{const e=this.surface.ready?this.surface.extent:null;Object(z["k"])(e)&&Object(pe["n"])(e,this.surface.spatialReference,eE,this.renderCoordsHelper.spatialReference)&&(t[0]=Object(dr["f"])(t[0],eE[0],eE[2]),t[1]=Object(dr["f"])(t[1],eE[1],eE[3]))}return!0}_latestSurfaceAltitudeChangesDistanceSignificantly(e,t){if(this._latestSurfaceAltitude===this._currentSurfaceAltitude||null==e)return!1;if(this._calculateSurfaceIntersection(this._latestSurfaceAltitude,t)){if(z_["a"].TESTS_DISABLE_OPTIMIZATIONS)return!0;const r=this._camera.eye,i=Object($o["o"])(r,e),n=Object($o["o"])(r,t);if(Math.abs(n-i)/i>JS)return!0}return!1}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],YS.prototype,"scheduler",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],YS.prototype,"task",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],YS.prototype,"cameraName",void 0),Object(l["a"])([Object(j["b"])()],YS.prototype,"distance",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],YS.prototype,"estimateSurfaceAltitudeAtCenter",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],YS.prototype,"location",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],YS.prototype,"renderLocation",void 0),Object(l["a"])([Object(j["b"])()],YS.prototype,"updating",void 0),YS=Object(l["a"])([Object(x["a"])("esri.views.3d.support.CenterOnSurface")],YS);const JS=.05,QS=Object(ju["f"])(),KS=Object(ju["f"])(),eE=Object(wu["l"])(),tE=YS;class rE{constructor(e){this.handles=new ge["a"],this.events=new U["a"],this.contentLayerViews=e.contentLayerViews,this.handles.add(this.contentLayerViews.on("change",e=>this._layerViewsChanged(e))),this._layerViewsChanged({added:this.contentLayerViews.toArray(),removed:[],moved:[],target:this.contentLayerViews})}destroy(){this.handles&&(this.handles.destroy(),this.handles=null)}_layerViewsChanged(e){e.added.forEach(e=>{"esri.views.3d.layers.SceneLayerView3D"===e.declaredClass&&this.handles.add(e.on("visible-geometry-changed",()=>this._contentChanged()),e.uid)}),e.removed.forEach(e=>this.handles.remove(e.uid))}_contentChanged(){this.events.emit("request-update",iE)}}const iE={},nE=Array;let aE=class extends HS{constructor(e){super(e),this._propertiesPool=new vx["a"]({location:he["a"],renderLocation:nE},this),this._dirty=!0,this.renderLocation=this._propertiesPool.get("renderLocation")}initialize(){this.handles.add([this.centerOnSurface.watch("renderLocation",()=>this.updateRenderLocation()),this.state.watch("contentCamera",()=>this.updateRenderLocation())]),this.scheduler&&this.handles.add(this.scheduler.registerTask(Ba["c"].POINT_OF_INTEREST_FREQUENT,this))}destroy(){this._propertiesPool.destroy(),this._propertiesPool=null}get updating(){return this._dirty||this.centerOnSurface.updating}get location(){const e=this._propertiesPool.get("location");return this.renderCoordsHelper.fromRenderCoords(this.renderLocation,e,this.state.spatialReference),e}get running(){return this._dirty}runTask(){const e=this._get("renderLocation"),t=this.centerOnSurface.renderLocation,r=this.renderCoordsHelper,i=this.state.contentCamera;this._dirty=!1,r.worldUpAtPosition(t,sE);const n=Math.max(0,(Math.acos(Object($o["j"])(sE,i.viewForward))-.5*Math.PI)*(i.aboveGround?1:-1));if(Number.isNaN(n)){if(!e||!Object($o["E"])(e,t)){const e=this._propertiesPool.get("renderLocation");Object($o["m"])(e,t),this._set("renderLocation",e)}return}const a=1-Object(dr["f"])(n/(.5*Math.PI),0,1),s=a*a*a;this._calculateScreenHorizontalEdgeOnSurface(cE);const o=this._propertiesPool.get("renderLocation");Object($o["k"])(o,t,cE,s),e&&Object($o["E"])(e,o)||this._set("renderLocation",o)}_calculateScreenHorizontalEdgeOnSurface(e){const t=this.state.contentCamera,r=t.getRenderCenter(Object(ce["d"])());if(r[1]=t.aboveGround?t.padding[$m["a"].BOTTOM]:t.fullHeight-t.padding[$m["a"].TOP],this.estimateSurfaceIntersectionAtRenderPoint(r,e))return e;const i=this.renderCoordsHelper.getAltitude(this.centerOnSurface.renderLocation);if(t.unprojectFromRenderScreen(r,oE)){Object($o["l"])(oE,oE,t.eye);const r=Object($o["t"])(oE,oE);if(this.renderCoordsHelper.intersectManifold(Object(Df["h"])(t.eye,r),i,e))return e}return this.renderCoordsHelper.setAltitude(e,i,t.eye)}updateRenderLocation(){this._dirty=!0}};Object(l["a"])([Object(j["b"])()],aE.prototype,"_dirty",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],aE.prototype,"scheduler",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],aE.prototype,"centerOnSurface",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],aE.prototype,"estimateSurfaceIntersectionAtRenderPoint",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],aE.prototype,"updating",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],aE.prototype,"location",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],aE.prototype,"renderLocation",void 0),aE=Object(l["a"])([Object(x["a"])("esri.views.3d.support.CenterOnSurface")],aE);const sE=Object(ju["f"])(),oE=Object(ju["f"])(),cE=Object(ju["f"])(),lE=aE;let uE=class extends F["a"]{constructor(e){super(e),this.location=null,this._updateController=null,this._handles=new ge["a"]}get renderLocation(){if(!this.location)return null;const e=Object(ju["f"])();return this.view.renderCoordsHelper.toRenderCoords(this.location,e),e}initialize(){this.view.state.isLocal&&(this._handles.add([this.watch(["surfaceView.spatialReference","surfaceView.extent"],()=>this._update()),Object(Me["b"])(this,"surface.layers","change",()=>this._update())]),this._update())}destroy(){this._handles.destroy()}_update(){if(this._updateController&&(this._updateController.abort(),this._updateController=null),!this.surfaceView||Object(z["j"])(this.surfaceView.extent)||!this.surfaceView.spatialReference)return void this._set("location",null);const e=Object(wu["e"])(this.surfaceView.extent),t=new he["a"]({x:e[0],y:e[1],z:0,spatialReference:this.surfaceView.spatialReference});this.surface&&this.surface.layers.length>0?(this._set("location",null),this._updateController=new AbortController,this.surface.queryElevation(t,{noDataValue:0,signal:this._updateController.signal,cache:this.cache}).then(e=>{this._updateController=null,this._set("location",e.geometry)}).catch(e=>{Object(_["m"])(e)||e&&"elevation-query:invalid-layer"===e.name||console.error("StableSurfaceCenter failed to update: ",e)})):this._set("location",t)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],uE.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],uE.prototype,"cache",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"view.map.ground"})],uE.prototype,"surface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"view.basemapTerrain"})],uE.prototype,"surfaceView",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],uE.prototype,"location",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],uE.prototype,"renderLocation",null),uE=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.StableSurfaceCenter")],uE);let dE=class extends F["a"]{constructor(){super(...arguments),this.handles=new ge["a"],this._tileGeometryUpdateExtent=Object(wu["n"])(),this._tileGeometryUpdateSpatialReference=null,this.events=new U["a"],this.updating=!1}initialize(){this.handles.add([this.surface.on("elevation-change",e=>this._tileGeometryChanged(e)),this.scheduler.registerTask(Ba["c"].SURFACE_GEOMETRY_UPDATES,this)])}destroy(){this.handles=Object(z["d"])(this.handles)}get running(){return this.updating}runTask(){this.updating&&(this._centerIntersectsExtent(this._tileGeometryUpdateExtent,this._tileGeometryUpdateSpatialReference)&&this.events.emit("request-update",hE),Object(wu["n"])(this._tileGeometryUpdateExtent),this._set("updating",!1))}_tileGeometryChanged(e){this._tileGeometryUpdateSpatialReference=e.spatialReference,Object(wu["p"])(this._tileGeometryUpdateExtent,e.tile.extent,this._tileGeometryUpdateExtent),this._set("updating",!0)}_furthestCenterOnSurface(){let e=this.centerOnSurfaces[0];for(let t=1;t<this.centerOnSurfaces.length;t++){const r=this.centerOnSurfaces[t];r.distance>e.distance&&(e=r)}return e}_centerIntersectsExtent(e,t){const r=this.state.camera.eye,i=bE,n=this._furthestCenterOnSurface();return this.renderCoordsHelper.fromRenderCoords(r,pE,t),this.renderCoordsHelper.fromRenderCoords(n.renderLocation,fE,t),pE[0]<fE[0]?(i[0]=pE[0],i[2]=fE[0]):(i[0]=fE[0],i[2]=pE[0]),pE[1]<fE[1]?(i[1]=pE[1],i[3]=fE[1]):(i[1]=fE[1],i[3]=pE[1]),Object(wu["w"])(i,e)}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],dE.prototype,"state",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dE.prototype,"centerOnSurfaces",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dE.prototype,"renderCoordsHelper",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dE.prototype,"scheduler",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dE.prototype,"surface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],dE.prototype,"updating",void 0),dE=Object(l["a"])([Object(x["a"])("esri.views.3d.support.SurfaceGeometryUpdates")],dE);const hE={},pE=Object(ju["f"])(),fE=Object(ju["f"])(),bE=Object(wu["n"])();var mE=r("89bf");let gE=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"],this._tmpRay=Object(Df["c"])(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new vx["a"]({renderPointOfView:yE},this),this.renderPointOfView=Object(ju["f"])(),this._pois=new Array,this._debugCenters=new Map}initialize(){var e;const{state:t,basemapTerrain:r,renderCoordsHelper:i,map:n}=this.view;this._surfaceIntersector=Object(cb["b"])(t.viewingMode),t.isGlobal?this._surfaceIntersector.options.backfacesTerrain=!1:this._surfaceIntersector.options.backfacesTerrain=!0,this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=kT["c"].MIN,this._contentIntersector=Object(cb["b"])(t.viewingMode);const a=()=>this._estimateSurfaceAltitudeAtCenter(),s=this.view.resourceController.scheduler,o=Object(z["t"])(null==(e=this.view.basemapTerrain)?void 0:e.elevationQueryCache),c={state:t,scheduler:s,surface:r,renderCoordsHelper:i};this._set("centerOnSurfaceInfrequent",new tE({...c,task:Ba["c"].POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:a})),this._set("centerOnSurfaceFrequent",new tE({...c,task:Ba["c"].POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:a})),this._set("contentCenterOnSurface",new tE({...c,task:Ba["c"].POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:a,cameraName:"contentCamera"})),this._set("centerOnContent",new tE({...c,task:Ba["c"].POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new ZS({...c,cache:o,task:Ba["c"].POINT_OF_INTEREST_INFREQUENT,map:n})),this._set("contentCameraOnSurface",new ZS({...c,cache:o,task:Ba["c"].POINT_OF_INTEREST_INFREQUENT,map:n,cameraName:"contentCamera"})),this._set("surfaceGeometryUpdates",new dE({...c,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new rE({contentLayerViews:this.view.allLayerViews,renderCoordsHelper:i})),this._set("surfaceOrigin",new uE({cache:o,view:this.view})),this._set("focus",new lE({state:t,scheduler:s,surface:r,renderCoordsHelper:i,centerOnSurface:this.contentCenterOnSurface,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.contentCenterOnSurface,this.cameraOnSurface,this.contentCameraOnSurface,this.focus);const l=this.view.graphics;this._debugCenters.set(this.centerOnContent,new GS(l,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new GS(l,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new GS(l,"red","CenterOnSurface")),this._debugCenters.set(this.contentCenterOnSurface,new GS(l,"red","ContentCenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new GS(l,"blue","CameraOnSurface")),this._debugCenters.set(this.contentCameraOnSurface,new GS(l,"blue","ContentCameraOnSurface")),this._debugCenters.set(this.focus,new GS(l,"green","Focus")),this._handles.add([t.watch("camera",e=>this._cameraChanged(e),!0),r.watch("extent",()=>this._updateCenterPointsOfInterest()),Object(Me["g"])(r,"updating",()=>this._updateCenterPointsOfInterest(),!0),this.surfaceGeometryUpdates.events.on("request-update",()=>this._updateCenterPointsOfInterest()),this.contentGeometryUpdates.events.on("request-update",()=>this._updateCenterOnContent()),Object(Me["a"])(z_["a"],"SHOW_POI",e=>this._setDebug(e))]),this._cameraChanged(this.view.state.camera);for(const u of this._pois)u.runTask()}destroy(){this._setDebug(!1),this._handles.destroy(),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this.surfaceOrigin.destroy()}get updating(){var e;return!!(null!=(e=this.surfaceGeometryUpdates)&&e.updating||this._pois.some(e=>e.updating))}get centerRay(){return this._centerRayDirty&&(this._centerRay=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.camera,this._tmpRay),this._centerRayDirty=!1),this._centerRay}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this.centerRay;return Object(z["j"])(e)||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,OE,_E)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(OE):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){if(!this.view.basemapTerrain)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const e=this.centerRay;if(Object(z["j"])(e))return this._surfaceAltitudeAtCenter;const t=e.origin,r=Object($o["h"])(OE,e.origin,e.direction);return this._surfaceIntersector.resetWithRay(e,this.view.state.camera),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,t,r),this._surfaceIntersector.results.min.getIntersectionPoint(OE)&&(this._surfaceAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(OE)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const i=Object(Mg["b"])(t,e,vE);if(Object(z["j"])(i))return null;const n=i.origin,a=Object($o["h"])(OE,i.origin,i.direction);return this._surfaceIntersector.resetWithRay(i,t),this.view.basemapTerrain.intersect(this._surfaceIntersector,null,n,a),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;Object($o["q"])(this.renderPointOfView,t)||this._set("renderPointOfView",Object($o["m"])(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters.forEach(e=>e.hide()),void this._handles.remove("debug");for(const t of this._pois)this._handles.add(Object(Me["a"])(t,"renderLocation",e=>this._debugCenters.get(t).show(e,t.renderCoordsHelper.spatialReference)),"debug")}get test(){return{update:()=>{this.surfaceGeometryUpdates.runTask();for(const e of this._pois)e.runTask()},surfaceGeometryUpdates:this.surfaceGeometryUpdates}}};Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"centerOnContent",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"centerOnSurfaceFrequent",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"centerOnSurfaceInfrequent",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"contentCenterOnSurface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"cameraOnSurface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"contentCameraOnSurface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"focus",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"renderPointOfView",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"surfaceOrigin",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"contentGeometryUpdates",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"surfaceGeometryUpdates",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],gE.prototype,"view",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],gE.prototype,"updating",null),gE=Object(l["a"])([Object(x["a"])("esri.views.3d.support.PointsOfInterest")],gE);const yE=Array,OE=Object(ju["f"])(),vE=Object(Df["c"])(),_E={exclude:new Set([mE["b"]])},jE=gE;var wE=r("8e17");class xE{constructor(e){this.store=e}destroy(){this.store.destroy()}get(e){return this.store.get(e)}put(e,t){this.store.put(e,t,t.values.byteLength+256)}}var TE=r("d378"),SE=r("66b9"),EE=r("1dc3"),AE=r("deae");class CE{constructor(e=0,t=0){this.min=e,this.max=t,this.level=0,this.hasNoDataValues=!1}copyFrom(e){this.min=e.min,this.max=e.max,this.level=e.level,this.hasNoDataValues=e.hasNoDataValues}}class RE{constructor(e,t,r){this.type="elevation",this.samplerData=null,this.level=e[0],this.i=e[1],this.j=e[2],this.extent=t;const i=r.noDataValue,n=r.values;let a=1/0,s=-1/0,o=!0,c=!1;for(let l=0;l<n.length;l++){const e=n[l];e!==i?(a=e<a?e:a,s=e>s?e:s,o=!1):c=!0}o&&(a=0,s=0),s=s>-3e38?s:0,this.samplerData={pixelData:r.values,width:r.width,height:r.height,noDataValue:i,safeWidth:.99999999*(r.width-1),dx:(r.width-1)/(t[2]-t[0]),dy:(r.width-1)/(t[3]-t[1]),x0:t[0],y1:t[3]},this.bounds=[a,s],this.hasNoDataValues=c}release(){this.samplerData=null,this.bounds=null}computeMinMaxValue(e,t,r,i){i.min=1/0,i.max=-1/0,i.hasNoDataValues=!1;const n=e-this.level;if(n<=0)return i;const a=2**n;if(Math.floor(t/a)!==this.i||Math.floor(r/a)!==this.j)return i;let s=1/0,o=-1/0;const c=this.samplerData.width,l=this.samplerData.pixelData,u=.5*Mu["b"];let d=(c-1)/a,h=(r-this.j*a)*d,p=(t-this.i*a)*d;if(d<1){const e=Math.floor(h),t=Math.floor(p),r=e+t*c,n=l[r],a=l[r+1],s=l[r+c],o=l[r+c+1];if(n+a+s+o<u){const r=h-e,c=p-t,l=Object(Yu["c"])(n,a,s,o,r,c),u=Object(Yu["c"])(n,a,s,o,r+d,c),f=Object(Yu["c"])(n,a,s,o,r,c+d),b=Object(Yu["c"])(n,a,s,o,r+d,c+d);return i.min=Math.min(l,u,f,b),i.max=Math.max(l,u,f,b),i}h=e,p=t,d=1}else h=Math.floor(h),p=Math.floor(p),d=Math.ceil(d);for(let f=h;f<=h+d;f++)for(let e=p;e<=p+d;e++){const t=l[f+e*c];t<u?(s=Math.min(s,t),o=Math.max(o,t)):i.hasNoDataValues=!0}return i.min=s,i.max=o,i}}function ME(e,t,r){if(Object(z["j"])(r))return null;for(const i of r){if(!i)continue;const r=i.safeWidth;let n=Object(dr["f"])(i.dy*(i.y1-t),0,r),a=Object(dr["f"])(i.dx*(e-i.x0),0,r);const s=Math.floor(n),o=Math.floor(a),c=i.width,l=s*c+o,u=i.pixelData,d=u[l],h=u[l+1],p=l+c,f=u[p],b=u[p+1];if(d+f+h+b<.5*Mu["b"]){n-=s,a-=o;const e=d+(h-d)*a;return e+(f+(b-f)*a-e)*n}}return null}let PE=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"]}initialize(){this._handles.add([this.layerViews.on("change",()=>this.notifyChange("stencilEnabledExtents"))])}destroy(){this._handles.destroy(),this._handles=null}get layerViewsExtent(){return this._computeLayerViewsExtent()}get tiledLayersExtent(){return this._computeTiledLayersExtent()}get stencilEnabledExtents(){return this._computeStencilEnabledExtents()}_computeStencilEnabledExtents(){const e=[];return this.layerViews.forEach(t=>{const r=t.layer;if("IntegratedMeshLayer"===r.operationalLayerType&&null!=this.viewSpatialReference){const t=NE(r.fullExtent,this.viewSpatialReference);Object(z["k"])(t)&&e.push(Object(wu["s"])(t))}}),e}};function IE(e,t){return e===As["a"].Global?new DE(t):new LE(t)}Object(l["a"])([Object(j["b"])({readOnly:!0})],PE.prototype,"layerViewsExtent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],PE.prototype,"tiledLayersExtent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],PE.prototype,"stencilEnabledExtents",null),Object(l["a"])([Object(j["b"])()],PE.prototype,"viewSpatialReference",void 0),Object(l["a"])([Object(j["b"])()],PE.prototype,"tilingScheme",void 0),Object(l["a"])([Object(j["b"])()],PE.prototype,"defaultTiledLayersExtent",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],PE.prototype,"layers",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],PE.prototype,"layerViews",void 0),PE=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.ExtentHelper")],PE);let DE=class extends PE{_computeLayerViewsExtent(){return this._globalExtent}_computeTiledLayersExtent(){return this._globalExtent}get _globalExtent(){return this.viewSpatialReference.isWebMercator?Mu["k"]:Mu["c"]}};DE=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.ExtentHelperGlobal")],DE);let LE=class extends PE{_computeLayerViewsExtent(){const e=Object(wu["n"])(),t=this.viewSpatialReference;this.layerViews.forEach(r=>{const i=r.layer;if(r.isResolved()&&("graphics"!==i.type||!i.internal)){const i=NE("fullExtentInLocalViewSpatialReference"in r&&r.fullExtentInLocalViewSpatialReference||r.layer.fullExtent,t);Object(wu["p"])(e,i,e)}});const r=Object(wu["c"])(e)?e:null,i=this._get("layerViewsExtent");return Object(wu["o"])(r,i)?i:r}_computeTiledLayersExtent(){const e=this.tilingScheme;if(!e)return null;const t=this.viewSpatialReference,r=Object(wu["n"])();this.layers.forEach(i=>{if(i.loaded&&Object(Au["e"])(i)){const n=Object(PS["d"])(i,t,As["a"].Local);if(Object(z["j"])(n))return;const{tileInfo:a,fullExtent:s}=n;(Object(z["k"])(a)&&Object(PS["h"])(i)&&Object(z["k"])(s)||Object(z["k"])(a)&&e.compatibleWith(a)&&Object(z["k"])(s)&&s.spatialReference.equals(e.spatialReference))&&Object(wu["p"])(r,s,r)}}),Object(wu["p"])(r,this.defaultTiledLayersExtent,r);const i=Object(wu["c"])(r)?r:null,n=this._get("tiledLayersExtent");return Object(wu["o"])(i,n)?n:i}};function NE(e,t){return Object(z["k"])(e)&&!e.spatialReference.equals(t)?Object(pe["A"])(e,e.spatialReference,t):e}LE=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.ExtentHelperLocal")],LE);var FE,kE=r("9b8b");!function(e){e[e.ELEVATION=0]="ELEVATION",e[e.MAP=1]="MAP"}(FE||(FE={}));const UE=[FE.ELEVATION,FE.MAP];var zE=r("648c"),BE=r("4294"),VE=r("7585"),GE=r("f643");function HE(){var e;const t=null==(e=globalThis.require)?void 0:e.modules;if(t){const e=Object.keys(t);for(const r of e)-1!==r.search(".glsl")&&delete t[r]}}const qE=[[-.1,-2,3.9,2],[-.1,-3.9,3.9,.1],[-2,-3.9,2,.1],[-3.9,-3.9,.1,.1],[-3.9,-2,.1,2],[-3.9,-.1,.1,3.9],[-2,-.1,2,3.9],[-.1,-.1,3.9,3.9]];let WE,$E=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"],this._spatialReference=null,this._renderSR=null,this._overlaySREqualsRenderSR=!0,this._drapeSources=new Map,this._drapeTargets=new Set,this._placementDirty=!1,this._contentUpdated=!1,this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1,this._layerViewsDirty=!0,this._hasUnusedRenderTargets=!1,this._longitudeCyclical=null,this._latestOriginId=0,this._maxResolution=Object(E["a"])("esri-mobile")?2048:4096,this._animationTimeLast=0}get running(){return(this._placementDirty||this._layerViewsDirty)&&(this._drapeSources.size>0||this.view.graphics.length>0||z_["a"].OVERLAY_DRAW_DEBUG_TEXTURE)&&!!this._spatialReference&&!this.suspended&&this.surface.ready}get _isSpherical(){return this.view.state.isGlobal}get _worldToPCSRatio(){return Object(z["k"])(this._spatialReference)&&this._spatialReference.isGeographic&&!this.view.state.isLocal?Object(Yd["e"])(this._spatialReference).metersPerDegree:1}get view(){return this.surface.view}get updating(){return this.running||this.renderer.updating||this._contentUpdated}get hasHighlights(){return this.renderer.hasHighlights}get rendersOccluded(){return this.renderer.rendersOccluded}initialize(){const e=this.view;this.renderer=new VE["b"]({view:e,worldToPCSRatio:this._worldToPCSRatio,spatialReference:this._spatialReference}),this._groundIntersector=Object(cb["b"])(this.view.state.viewingMode),this._groundIntersector.options.backfacesTerrain=!0,this._groundIntersector.options.invisibleTerrain=!0,this._groundIntersector.options.hud=!1,this._handles.add([this.renderer.events.on("has-highlights",()=>{this._setDrawTexturesDirty(),this.notifyChange("hasHighlights")}),this.renderer.events.on("has-water",t=>{var r;return null==(r=e._stage)?void 0:r.renderView.setRenderParameters({hasOverlayWater:t})}),this.renderer.events.on("renders-occluded",()=>{this._setDrawTexturesDirty(),this.notifyChange("rendersOccluded")}),this.renderer.events.on("content-changed",()=>this._setDrawTexturesDirty()),this.renderer.events.on("textures-disposed",()=>this.updateDrapeTargets()),e.watch(["pointsOfInterest.renderPointOfView","pointsOfInterest.centerOnSurfaceFrequent.location","pixelRatio"],()=>this.setPlacementDirty()),this.surface.on("elevation-change",()=>this.setPlacementDirty()),e.allLayerViews.on("after-changes",()=>this._layerViewsDirty=!0),e.watch("graphicsView",()=>this._layerViewsDirty=!0),e.on("resize",()=>this.setPlacementDirty()),Object(xe["a"])({preRender:e=>{this._contentUpdated=!1,this.renderer.processSyncLayers(),this._updateLayerViews(),this.renderer.hasOverlays&&(this._dispatchAnimationUpdate(e),this._drawOverlayTextures(this.renderer.overlays,LS["i"].UPDATE)),this._hasUnusedRenderTargets&&this._collectUnusedRenderTargetMemory()}}),e.resourceController.scheduler.registerTask(Ba["c"].OVERLAY,this),e._stage.renderView.events.on("force-camera-for-screenshot",e=>{this._updateOverlays(e,LS["i"].BACKGROUND),this.renderer.hasOverlays&&this._drawOverlayTextures(this.renderer.overlays,LS["i"].BACKGROUND,e)})]),this._updateLayerViews()}destroy(){this._drapeSources.forEach((e,t)=>this.unregisterDrapeSource(t)),this._drapeTargets.forEach(e=>this._unregisterDrapeTarget(e)),this.renderer.dispose(),this._handles&&(this._handles.destroy(),this._handles=null),Object(z["k"])(WE)&&(WE.hide(),WE=null)}get hasOverlays(){return this.renderer.hasOverlays}setSpatialReference(e){this._spatialReference=e,this.renderer.spatialReference=e,this._longitudeCyclical=null;const t=this.view.renderSpatialReference;Object(z["k"])(e)&&Object(z["k"])(t)?(this._renderSR=t,this._overlaySREqualsRenderSR=e.equals(this._renderSR),this._isSpherical&&(this._longitudeCyclical=e.isWebMercator?new Yu["a"](-20037508.342787,20037508.342787):new Yu["a"](-180,180),this.renderer.longitudeCyclical=this._longitudeCyclical),this.renderer&&(this.renderer.worldToPCSRatio=this._worldToPCSRatio)):this.renderer.disposeOverlays()}get gpuMemoryUsage(){return this.renderer.gpuMemoryUsage}_updateLayerViews(){if(!this._layerViewsDirty)return;const e=new Set;for(const r of this.view.allLayerViews.items)e.add(r.uid),"drapeSourceType"in r&&!this._drapeSources.has(r)&&this._registerDrapeSource(r,zE["a"].LAYER_VIEW),"drapeTargetType"in r&&!this._drapeTargets.has(r)&&this._registerDrapeTarget(r);const t=this.view.graphicsView;Object(z["k"])(t)&&!this._drapeSources.has(t)&&(this._registerDrapeSource(t,zE["a"].LAYER_VIEW),e.add(t.uid)),this._drapeSources.forEach((t,r)=>{t!==zE["a"].LAYER_VIEW||e.has(r.uid)||this.unregisterDrapeSource(r)}),this._drapeTargets.forEach(t=>{e.has(t.uid)||this._unregisterDrapeTarget(t)}),this.renderer.updateLayerOrder(),this._setDrawTexturesDirty(),this._layerViewsDirty=!1}registerDrapeSource(e){this._registerDrapeSource(e,zE["a"].EXTERNAL)}_registerDrapeSource(e,t){this._drapeSources.set(e,t),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources),this._updateDrapeSourceExtent(e),this._setContentDirty(),this.notifyChange("running")}_updateDrapeSourceExtent(e){2===this.renderer.overlays.length&&Object(z["k"])(e.setDrapingExtent)&&Object(z["k"])(this._spatialReference)&&e.setDrapingExtent(this.renderer.overlays,this._spatialReference)}unregisterDrapeSource(e){this._drapeSources.has(e)&&(this._drapeSources.delete(e),this.renderer.ensureDrapeSources(this._drapeSources),this._setContentDirty(),this.notifyChange("running"))}_registerDrapeTarget(e){this._drapeTargets.add(e),this._updateDrapeTarget(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources)}updateDrapeTargets(){this._drapeTargets.forEach(e=>this._updateDrapeTarget(e))}_updateDrapeTarget(e){e.setDrapingTextures(this.renderer.overlays)}_unregisterDrapeTarget(e){this._drapeTargets.delete(e),this.renderer.ensureDrapeTargets(this._drapeTargets)}_setContentDirty(){this.setPlacementDirty(),this._setDrawTexturesDirty()}setPlacementDirty(){this._placementDirty=!0}runTask(){this._updateOverlays(this.view.state.camera,LS["i"].UPDATE)}_updateOverlays(e,t){if(!this._spatialReference)return;this._updateLayerViews();const r=Object(BE["c"])(e.fullWidth,e.fullHeight,this._maxResolution);this._computeOverlayExtents(e,r,JE);const i=Object(wu["C"])(JE.inner)/Object(wu["C"])(JE.outer);this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources);const n=this._updateOverlay(kE["b"].INNER,JE.inner,r,1*JE.pixelRatioAdjustment,JE.mapUnitsPerPixel),a=this._updateOverlay(kE["b"].OUTER,JE.outer,r,i*JE.pixelRatioAdjustment,JE.mapUnitsPerPixel);n!==tA.EXTENT&&a!==tA.EXTENT||(this._drapeSources.forEach((e,t)=>this._updateDrapeSourceExtent(t)),this.surface.updateTileOverlayParams(t)),n===tA.NONE&&a===tA.NONE||this._setDrawTexturesDirty(),this._placementDirty=!1}_updateOverlay(e,t,r,i,n){if(0===this.renderer.overlays.length)return tA.NONE;const a=this.renderer.overlays[e],s=a.mapUnitsPerPixel;if(a.mapUnitsPerPixel=n,a.pixelRatio=i,ZE(t,a.extent)&&r===a.resolution)return s===n?tA.NONE:tA.RERENDER_ONLY;Object(wu["k"])(a.extent,t),a.resolution=r;const o=Object(wu["e"])(a.extent);return a.renderLocalOrigin=Object(GE["a"])(o[0],o[1],0,"OV_"+this._latestOriginId++),tA.EXTENT}setTileParameters(e){const t=e.renderData.overlay;if(this.renderer.overlays.length>0){const r=this.renderer.overlays[kE["b"].INNER],i=this.renderer.overlays[kE["b"].OUTER],n=Object(wu["v"])(e.extent,this.surface.extent,QE);this._rectInsideRect(r.extent,n)||this._rectanglesOverlap(n,r.extent)||this._rectanglesOverlap(n,i.extent)?(this._setTileOverlayData(n,kE["b"].INNER,t),this._setTileOverlayData(n,kE["b"].OUTER,t)):(this._clearTileOverlayData(kE["b"].INNER,t),this._clearTileOverlayData(kE["b"].OUTER,t))}else this._clearTileOverlayData(kE["b"].INNER,t),this._clearTileOverlayData(kE["b"].OUTER,t)}overlayPixelSizeInMapUnits(e){if(0===this.renderer.overlays.length)return 0;const t=this.renderer.overlays[kE["b"].INNER],r=this.renderer.overlays[kE["b"].OUTER],i=this._pointIsInExtent(e,t.extent)?t:r;return(i.extent[2]-i.extent[0])/i.resolution}_setTileOverlayData(e,t,r){if(0===this.renderer.overlays.length)return;const i=this.renderer.overlays[t].extent,n=Object(wu["C"])(i),a=Object(wu["u"])(i);let s=e[0];if(this._longitudeCyclical){s=this._longitudeCyclical.minimalMonotonic(i[0],s);const t=this._longitudeCyclical.minimalMonotonic(i[0],e[2]);s>t&&(s=t-(e[2]-e[0]))}r.setScale(t,Object(wu["C"])(e)/n,Object(wu["u"])(e)/a),r.setOffset(t,(s-i[0])/n,(e[1]-i[1])/a)}_clearTileOverlayData(e,t){t.setScale(e,-1,-1),t.setOffset(e,-1,-1)}async reloadShaders(){HE(),await this.renderer.reloadShaders(),this._setDrawTexturesDirty(),this.runTask()}_dispatchAnimationUpdate(e){const t=Object(Ic["a"])(e.time-this._animationTimeLast);(t>=this.surface.view._stage.renderView.animationTimestep||Object(z["k"])(this.forcedAnimationTime)||this._drawTexturesDirty||this._drawTexturesAnimateDirty)&&(this.renderer.updateAnimation({dt:t,forcedTime:this.forcedAnimationTime,camera:this.view.state.camera})&&(this._drawTexturesAnimateDirty=!0),this._animationTimeLast=e.time)}_setDrawTexturesDirty(){this.renderer.hasOverlays?(this._contentUpdated=!0,this._drawTexturesDirty=!0):this.setPlacementDirty()}_intersectGroundFromView(e,t,r,i){const n=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(e,eA,t,r);if(Object(z["j"])(n))return!1;const a=n.origin,s=Object($o["h"])(YE,n.origin,n.direction);return this._groundIntersector.reset(a,s,e),this._groundIntersector.intersect([],null),this.view.basemapTerrain.intersect(this._groundIntersector,null,a,s),this._groundIntersector.results.min.getIntersectionPoint(i)}_findHorizonBasedPointOfInterest(e,t){let r=.5;const i=.55,n=this.view.renderCoordsHelper.getAltitude(e.eye),a=this.view.pointsOfInterest.centerOnSurfaceFrequent,s=1e-5,o=Object(dr["f"])(a.estimatedSurfaceAltitude,e.aboveGround?-1/0:n+s,e.aboveGround?n-s:1/0),c=e.aboveGround;if("global"===this.view.viewingMode){const t=YE;Object(If["h"])(Object(If["j"])(Object(Yd["e"])(this.view.spatialReference).radius+o),Object(Df["h"])(e.eye,e.viewForward),t),Object($o["l"])(t,t,e.eye);const n=Yu["f"].normalize(Object(Cg["b"])(e.viewForward,t,e.viewRight))/e.fovY+.5,a=n<=0||n>=1?.5:i;r=c?a*n:n+a*(1-n)}else{const t=.5*Math.PI-Math.acos(-e.viewForward[2]),n=Math.tan(t),a=Object(Xd["g"])(0,n,1,0),s=Object(U_["m"])(a,a,e.projectionMatrix)[1],o=Object(dr["f"])(.5+.5*s,0,1);r=1===o||0===o?.5:c?o*i:1-(1-o)*i}return!!this._intersectGroundFromView(e,.5,r,t)&&Object($o["D"])(t,e.eye)<a.distance*a.distance}_computeOverlayExtents(e,t,r){const i=this.view.pointsOfInterest.centerOnSurfaceFrequent.renderLocation,n=Object(ju["f"])();this._findHorizonBasedPointOfInterest(e,n)||Object($o["m"])(n,i);const a=Math.max(.1,Object($o["o"])(e.eye,n)),s=xb(this.view.renderCoordsHelper,i,e.eye),o=Math.PI/2-Math.abs(s-Math.PI/2);z_["a"].OVERLAY_SHOW_CENTER?(Object(z["j"])(WE)&&(WE=new GS(this.view.graphics,"red")),WE.show(n,this._renderSR)):Object(z["k"])(WE)&&WE.hide(),this._overlaySREqualsRenderSR||Object(pe["y"])(n,this._renderSR,n,this._spatialReference);const c=this.surface.extent,l=!this._isSpherical&&Object(z["k"])(this._spatialReference)&&this._spatialReference.isGeographic,u=l&&Object(z["k"])(this._spatialReference)?1/Object(Yd["e"])(this._spatialReference).metersPerDegree:1,d=e.perRenderPixelRatio*a*u;r.mapUnitsPerPixel=d/this._worldToPCSRatio;let h=t*d/2,p=!1,f=l?90:1/0;this._isSpherical&&Object(z["k"])(c)&&Object(z["k"])(this._spatialReference)&&(this._spatialReference.isWebMercator?(h/=Math.cos(Object(_n["h"])(n[1])),f=c[3]):(p=!0,h/=Object(Yd["e"])(this._spatialReference).metersPerDegree,f=90),h>=f&&(h=f,n[1]=0,this._spatialReference.isWebMercator&&(n[0]=0)));let b=1;p&&(b=1/Math.max(.2,Math.cos(Math.abs(Object(dr["h"])(n[1])))),h*b>180&&(b=180/h),r.mapUnitsPerPixel*=b);const m=Math.log(2)/12;h=Math.exp(Math.round(Math.log(h)/m)*m);const g=h*b,y=32,O=.5*t/(y*g),v=.5*t/(y*h);n[0]=Math.round(n[0]*O)/O,n[1]=Math.round(n[1]*v)/v;const _=r.inner;_[0]=n[0]-g,_[1]=n[1]-h,_[2]=n[0]+g,_[3]=n[1]+h,this._isSpherical&&this._shiftExtentToFitBounds(_,1/0,f);const j=r.outer;if(6*g>Object(wu["C"])(c))Object(wu["k"])(j,Object(z["t"])(c));else if(o<=.25*Math.PI)j[0]=_[0]-g,j[1]=_[1]-h,j[2]=_[2]+g,j[3]=_[3]+h;else{Object(pe["y"])(e.eye,this._renderSR,YE,this._spatialReference),Object(io["f"])(XE,n,YE);let t=-Math.atan2(XE[1],XE[0])+.125*Math.PI;t<0&&(t+=2*Math.PI);const r=Math.floor(t/(.25*Math.PI));Object(U_["b"])(XE,qE[r],2*h),XE[0]*=b,XE[2]*=b,Object(U_["a"])(j,_,XE)}if(this._isSpherical)j[0]=this._longitudeCyclical.clamp(j[0]),j[2]=this._longitudeCyclical.clamp(j[2]),j[1]=Math.max(j[1],-f),j[3]=Math.min(j[3],f);else{const e=Object(wu["v"])(_,c,QE),t=Object(wu["v"])(j,c,KE);Object(wu["g"])(e,t)&&(j[2]=j[0],j[3]=j[1])}const w=Math.abs(_[2]-_[0])/t;r.mapUnitsPerPixel=Math.max(r.mapUnitsPerPixel,w),r.pixelRatioAdjustment=r.mapUnitsPerPixel/w}_drawOverlayTextures(e,t,r=this.view.state.camera){if(0===e.length||!this._drawTexturesDirty&&!this._drawTexturesAnimateDirty)return;const i=this._drawTexturesDirty;this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1;const n=this._drawOverlay(e[kE["b"].INNER],r),a=this._drawOverlay(e[kE["b"].OUTER],r);n!==LS["n"].CHANGED&&a!==LS["n"].CHANGED||this.surface.updateTileOverlayParams(LS["i"].UPDATE),this._collectUnusedRenderTargetMemory(),this.updateDrapeTargets(),i?(this.surface.requestRender(t),t===LS["i"].UPDATE&&this.surface.requestUpdate()):this.surface.requestRender(LS["i"].BACKGROUND)}_drawOverlay(e,t){return this._longitudeCyclical?e.setupGeometryViewsCyclical(this._longitudeCyclical):e.setupGeometryViewsDirect(),e.draw(this.renderer,t.pixelRatio)}_collectUnusedRenderTargetMemory(){if(this._hasUnusedRenderTargets=!1,this.renderer.hasOverlays){const e=performance.now();this._hasUnusedRenderTargets=this.renderer.collectUnusedRenderTargetMemory(e)}}_rectanglesOverlap(e,t){return!Object(z["j"])(e)&&(this._longitudeCyclical?(this._longitudeCyclical.contains(t[0],t[2],e[0])||this._longitudeCyclical.contains(t[0],t[2],e[2])||this._longitudeCyclical.contains(e[0],e[2],t[0]))&&!(e[1]>t[3]||e[3]<t[1]):Object(wu["w"])(e,t))}_rectInsideRect(e,t){return!Object(z["j"])(t)&&(this._longitudeCyclical?this._longitudeCyclical.contains(e[0],e[2],t[0])&&this._longitudeCyclical.contains(e[0],e[2],t[2])&&t[1]>e[1]&&t[3]<e[3]:Object(wu["g"])(e,t))}_pointIsInExtent(e,t){if(this._longitudeCyclical)return this._longitudeCyclical.contains(t[0],t[2],e.x)&&e.y>=t[1]&&e.y<=t[3];const r=e.x,i=e.y;return r>t[0]&&r<t[2]&&i>t[1]&&i<t[3]}_shiftExtentToFitBounds(e,t,r){let i=0,n=0;e[0]<-t?i=e[0]+t:e[2]>t&&(i=t-e[2]),e[1]<-r?n=e[1]+r:e[3]>r&&(n=r-e[3]),Object(wu["A"])(e,i,n)}get test(){return{renderer:this.renderer,update:()=>this.runTask()}}};function ZE(e,t){const r=1e-5,i=z_["a"].TESTS_DISABLE_OPTIMIZATIONS?0:r*Math.max(e[2]-e[0],e[3]-e[1],t[2]-t[0],t[3]-t[1]);return Math.abs(t[0]-e[0])<=i&&Math.abs(t[1]-e[1])<=i&&Math.abs(t[2]-e[2])<=i&&Math.abs(t[3]-e[3])<=i}Object(l["a"])([Object(j["b"])()],$E.prototype,"_spatialReference",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],$E.prototype,"running",null),Object(l["a"])([Object(j["b"])()],$E.prototype,"_placementDirty",void 0),Object(l["a"])([Object(j["b"])()],$E.prototype,"_contentUpdated",void 0),Object(l["a"])([Object(j["b"])()],$E.prototype,"_layerViewsDirty",void 0),Object(l["a"])([Object(j["b"])()],$E.prototype,"_isSpherical",null),Object(l["a"])([Object(j["b"])()],$E.prototype,"_worldToPCSRatio",null),Object(l["a"])([Object(j["b"])()],$E.prototype,"renderer",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],$E.prototype,"surface",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"surface.suspended"})],$E.prototype,"suspended",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],$E.prototype,"updating",null),Object(l["a"])([Object(j["b"])({type:Boolean})],$E.prototype,"hasHighlights",null),Object(l["a"])([Object(j["b"])({type:Boolean})],$E.prototype,"rendersOccluded",null),$E=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.OverlayManager")],$E);const XE=Object(Xd["e"])(),YE=Object(ju["f"])(),JE={inner:Object(wu["l"])(),outer:Object(wu["l"])(),mapUnitsPerPixel:0,pixelRatioAdjustment:1},QE=Object(wu["l"])(),KE=Object(wu["l"])(),eA=Object(Df["c"])();var tA;!function(e){e[e.NONE=0]="NONE",e[e.EXTENT=1]="EXTENT",e[e.RERENDER_ONLY=2]="RERENDER_ONLY"}(tA||(tA={}));class rA{constructor(e,t){this._factoryCallback=e,this._lengthCallback=t,this._pool=new Map}acquire(e){if(!rA.test.disabled){const t=this._pool.get(e);if(t&&0!==t.length)return t.pop()}try{return this._factoryCallback(e)}catch(t){const r=window.performance&&window.performance.memory;let i="";throw r&&(i=`\n totalJSHeapSize: ${r.totalJSHeapSize}, usedJSHeapSize: ${r.usedJSHeapSize}, jsHeapSizeLimit: ${r.jsHeapSizeLimit}`),console.log("Array allocation of size "+e+" failed: "+t+i),t}}release(e){if(rA.test.disabled)return;const t=this._lengthCallback(e);let r=this._pool.get(t);r||(r=new k_["a"]({shrink:!0}),this._pool.set(t,r)),r.push(e)}clear(){this._pool.clear()}get test(){return{size:this._pool.size}}}rA.test={disabled:!1};var iA=r("7c51");const nA=Object($h["a"])().vec3f(Yh["a"].POSITION).vec2f(Yh["a"].UV0),aA=new rA(e=>nA.createBuffer(e),e=>e.count);class sA{constructor(){this.indices=null,this.vertexAttributes=null,this.boundingBox=Object(Uj["k"])(),this.numSurfaceIndices=0,this.numSkirtIndices=0,this.numWithoutSkirtIndices=0,this.numVertsPerRow=0,this.skirtLength=0,this.uvOffsetAndScale=Object(Xd["e"])()}}class oA{constructor(e,t,r){this.values=e,this.numSurfaceIndices=t,this.numSkirtIndices=r}}function cA(){aA.clear(),pA.clear()}function lA(e){aA.release(e.vertexAttributes),e.vertexAttributes=null,e.indices=null}const uA=65536;function dA(e,t,r,i,n,a,s,o){const c=n[0],l=n[1],u=n[2],d=n[3],h=.1*s.radius*(d-l),p=e.numVertsPerSide-1,f=e.numVertsPerSide*e.numVertsPerSide,b=4*p,m=a&&(o===kE["c"].HAS_SOUTH_POLE||o===kE["c"].HAS_BOTH_POLES),g=a&&(o===kE["c"].HAS_NORTH_POLE||o===kE["c"].HAS_BOTH_POLES),y=aA.acquire(f+b),O=y.position.typedBuffer,v=y.uv0.typedBuffer,_=i.geometryInfo.boundingBox;Object(Uj["k"])(_);const j=t[2]-t[0],w=t[3]-t[1],x=u-c,T=r[0],S=r[1],E=r[2];for(let M=0;M<=p;M++){const e=M/p,r=c+e*x;wA[M]=Math.sin(r),xA[M]=Math.cos(r),TA[M]=e,SA[M]=t[0]+e*j}let A=0;const C=e.samplerData,R=Object(z["k"])(C)&&C.some(e=>Object(z["k"])(e))?(e,t)=>ME(SA[e],t,C):()=>0;for(let M=0;M<=p;M++){let e=M/p;const r=Object(dr["l"])(l,d,e),i=Math.cos(r),n=Math.sin(r);let o;a?(o=s.halfSemiMajorAxis*Math.log((1+n)/(1-n)),e=(o-t[1])/w):o=180*r/Math.PI;for(let t=0;t<=p;t++){const r=TA[t],a=wA[t],c=xA[t],l=s.radius+R(t,o),u=c*i*l-T,d=a*i*l-S,b=n*l-E;mA(u,d,b,_);const y=Mu["d"]*A;O[y+0]=u,O[y+1]=d,O[y+2]=b,v[y+0]=r,v[y+1]=e;const j=yA(t,M,p);if(Object(z["k"])(j)){const t=Mu["d"]*(f+j),i=m&&0===M?-1:g&&M===p?1:0,n=0===i?u:-T,a=0===i?d:-S,o=0===i?b:s.radius*i-E;O[t+0]=n,O[t+1]=a,O[t+2]=o,v[t+0]=0===i?gA(r,e):r,v[t+1]=0===i?h:e,0!==i&&mA(n,a,o,_)}++A}}i.geometryInfo.numVertsPerRow=e.numVertsPerSide,i.geometryInfo.vertexAttributes=y,i.geometryInfo.skirtLength=h,Object(U_["l"])(i.geometryInfo.uvOffsetAndScale,0,0,1,1),fA(i.geometryInfo,e.numVertsPerSide,a?o:kE["c"].REGULAR,e.wireframe),i.intersectionData=null,i.skirtIntersectionData=null}function hA(e,t,r,i,n,a){const s=t[0],o=t[1],c=t[2]-s,l=t[3]-o,u=e.clippingArea,d=Object(z["k"])(u)?Math.max(0,(u[0]-t[0])/c):0,h=Object(z["k"])(u)?Math.max(0,(u[1]-t[1])/l):0,p=Object(z["k"])(u)?Math.min(1,(u[2]-t[0])/c):1,f=Object(z["k"])(u)?Math.min(1,(u[3]-t[1])/l):1,b=p>d?1/(p-d):1,m=f>h?1/(f-h):1,g=-d*b,y=-h*m,O=c*i*.1,v=e.numVertsPerSide-1,_=e.numVertsPerSide*e.numVertsPerSide,j=4*v,w=aA.acquire(_+j),x=w.position.typedBuffer,T=w.uv0.typedBuffer,S=a.geometryInfo.boundingBox;Object(Uj["k"])(S);let E=0;const A=Xu["a"].radius,C=e.samplerData,R=Object(z["k"])(C)&&C.some(e=>Object(z["k"])(e))?(e,t)=>ME(e,t,C):()=>0;for(let M=0;M<=v;M++){const e=M/v;let t=y+e*m,a=o+e*l;Object(z["k"])(u)&&(a<u[1]?(a=u[1],t=0):a>u[3]&&(a=u[3],t=1));const d=a,h=(n?(Math.PI/2-2*Math.atan(Math.exp(-d/A)))*A:d*i)-r[1];for(let n=0;n<=v;n++){const e=n/v;let a=g+e*b,o=s+e*c;Object(z["k"])(u)&&(o<u[0]?(o=u[0],a=0):o>u[2]&&(o=u[2],a=1));const l=R(o,d),p=o*i-r[0],f=l-r[2];mA(p,h,f,S);const m=Mu["d"]*E;x[m+0]=p,x[m+1]=h,x[m+2]=f,T[m+0]=a,T[m+1]=t;const y=yA(n,M,v);if(Object(z["k"])(y)){const e=Mu["d"]*(_+y);x[e+0]=p,x[e+1]=h,x[e+2]=f,T[e+0]=gA(a,t),T[e+1]=O}++E}}a.geometryInfo.numVertsPerRow=e.numVertsPerSide,a.geometryInfo.vertexAttributes=w,a.geometryInfo.skirtLength=O,Object(U_["l"])(a.geometryInfo.uvOffsetAndScale,d,h,p-d,f-h),fA(a.geometryInfo,e.numVertsPerSide,kE["c"].REGULAR,e.wireframe),a.intersectionData=null,a.skirtIntersectionData=null}const pA=new Map;function fA(e,t,r,i){const n=r===kE["c"].HAS_NORTH_POLE||r===kE["c"].HAS_BOTH_POLES,a=t+(i?1024:0)+(n?2048:0);let s=pA.get(a);s||(s=bA(t,n,i),pA.set(a,s)),e.indices=s.values,e.numSurfaceIndices=s.numSurfaceIndices,e.numSkirtIndices=s.numSkirtIndices,e.numWithoutSkirtIndices=e.numSurfaceIndices+(r===kE["c"].REGULAR?0:6*(t-1)*(i?2:1))}function bA(e,t,r){const i=e-1,n=e*e,a=4*i;let s=2*n*3,o=6*a,c=6*(2*i+i-1);r&&(s*=2,o*=2,c*=2);const l=n+a>uA?new Uint32Array(s+o):new Uint16Array(s+o);let u=0,d=0,h=s;for(let p=0;p<=i;p++){let e=0;t&&(e=0===p?c:p===i?-c:0),h+=e;for(let t=0;t<=i;t++){const e=yA(t,p,i);if(Object(z["k"])(e)){const a=OA(t,p,i);if(0!==a){const i=u,s=n+e,o=n+(0===t&&1===p?0:e+1),c=u+a;r?(l[h++]=i,l[h++]=s,l[h++]=s,l[h++]=o,l[h++]=o,l[h++]=i,l[h++]=o,l[h++]=c,l[h++]=c,l[h++]=i,l[h++]=i,l[h++]=o):(l[h++]=i,l[h++]=s,l[h++]=o,l[h++]=o,l[h++]=c,l[h++]=i)}}if(++u,t<i&&p<i){const e=p*(i+1)+t,n=e+1,a=n+(i+1),s=a-1;r?(l[d++]=e,l[d++]=n,l[d++]=n,l[d++]=a,l[d++]=a,l[d++]=e,l[d++]=a,l[d++]=s,l[d++]=s,l[d++]=e,l[d++]=e,l[d++]=a):(l[d++]=e,l[d++]=n,l[d++]=a,l[d++]=a,l[d++]=s,l[d++]=e)}}h-=e}return new oA(l,s,o)}function mA(e,t,r,i){e<i[0]&&(i[0]=e),e>i[3]&&(i[3]=e),t<i[1]&&(i[1]=t),t>i[4]&&(i[4]=t),r<i[2]&&(i[2]=r),r>i[5]&&(i[5]=r)}function gA(e,t){const r=t>e?1:0;return 2+4*r+(1-2*r)*(e+t)}function yA(e,t,r){return 0===t?e:e===r?r+t:t===r?3*r-e:0===e&&t>0?4*r-t:null}function OA(e,t,r){return 0===t&&e!==r?1:e===r&&t!==r?r+1:t===r&&0!==e?-1:0===e&&0!==t?-(r+1):0}function vA(e,t,r,i,n,a,s,o,c,l){const u=a.position,d=a.uv0,h=e[0],p=e[1],f=e[2],b=t[0]-h,m=t[1]-p,g=t[2]-f;i*=3;for(let y=r*=3;y<i;y+=3){const e=n[y],t=n[y+1],r=n[y+2];let i=u.get(e,0),a=u.get(e,1),O=u.get(e,2),v=u.get(t,0),_=u.get(t,1),j=u.get(t,2),w=u.get(r,0),x=u.get(r,1),T=u.get(r,2);if(d.get(e,0)>=2){const e=i+o[0],t=a+o[1],r=O+o[2],n=s/Math.sqrt(e*e+t*t+r*r);i+=e*n,a+=t*n,O+=r*n}if(d.get(t,0)>=2){const e=v+o[0],t=_+o[1],r=j+o[2],i=s/Math.sqrt(e*e+t*t+r*r);v+=e*i,_+=t*i,j+=r*i}if(d.get(r,0)>=2){const e=w+o[0],t=x+o[1],r=T+o[2],i=s/Math.sqrt(e*e+t*t+r*r);w+=e*i,x+=t*i,T+=r*i}Object(z["k"])(c)&&([i,a,O]=c.applyToVertex(i,a,O),[v,_,j]=c.applyToVertex(v,_,j),[w,x,T]=c.applyToVertex(w,x,T));const S=v-i,E=_-a,A=j-O,C=w-i,R=x-a,M=T-O,P=m*M-R*g,I=g*C-M*b,D=b*R-C*m,L=S*P+E*I+A*D;if(Math.abs(L)<=Number.EPSILON)continue;const N=h-i,F=p-a,k=f-O,U=N*P+F*I+k*D;if(L>0){if(U<0||U>L)continue}else if(U>0||U<L)continue;const B=F*A-E*k,V=k*S-A*N,G=N*E-S*F,H=b*B+m*V+g*G;if(L>0){if(H<0||U+H>L)continue}else if(H>0||U+H<L)continue;const q=(C*B+R*V+M*G)/L;q>=0&&l(q,Object(iA["d"])(S,E,A,C,R,M,EA))}}function _A(e,t,r,i,n,a){const s=i.position,o=i.uv0,c=new Map,l=3*t,u=3*r-l,d=new Uint32Array(u);let h=0;for(let f=0;f<u;++f){const t=e[f+l];if(c.has(t))d[f]=c.get(t);else{const e=h++;c.set(t,e),d[f]=e}}const p=new Float64Array(3*h);return c.forEach((e,t)=>{let r=s.get(t,0),i=s.get(t,1),c=s.get(t,2);if(o.get(t,0)>=2){const e=r+a[0],t=i+a[1],s=c+a[2],o=n/Math.sqrt(e*e+t*t+s*s);r+=e*o,i+=t*o,c+=s*o}p[3*e+0]=r,p[3*e+1]=i,p[3*e+2]=c}),{vertices:p,indices:d}}function jA(e,t,r,i,n,a,s,o,c){const l=a.position,u=a.uv0,d=e[0],h=e[1],p=e[2],f=t[0]-d,b=t[1]-h,m=t[2]-p;i*=3;for(let g=r*=3;g<i;g+=3){const e=n[g],t=n[g+1],r=n[g+2];let i=l.get(e,0),a=l.get(e,1),y=l.get(e,2),O=l.get(t,0),v=l.get(t,1),_=l.get(t,2),j=l.get(r,0),w=l.get(r,1),x=l.get(r,2);u.get(e,0)>=2&&(y+=s),u.get(t,0)>=2&&(_+=s),u.get(r,0)>=2&&(x+=s),Object(z["k"])(o)&&([i,a,y]=o.applyToVertex(i,a,y),[O,v,_]=o.applyToVertex(O,v,_),[j,w,x]=o.applyToVertex(j,w,x));const T=O-i,S=v-a,E=_-y,A=j-i,C=w-a,R=x-y,M=b*R-C*m,P=m*A-R*f,I=f*C-A*b,D=T*M+S*P+E*I;if(Math.abs(D)<=Number.EPSILON)continue;const L=d-i,N=h-a,F=p-y,k=L*M+N*P+F*I;if(D>0){if(k<0||k>D)continue}else if(k>0||k<D)continue;const U=N*E-S*F,B=F*T-E*L,V=L*S-T*N,G=f*U+b*B+m*V;if(D>0){if(G<0||k+G>D)continue}else if(G>0||k+G<D)continue;const H=(A*U+C*B+R*V)/D;H>=0&&c(H,Object(iA["d"])(T,S,E,A,C,R,EA))}}const wA=new Array(Mu["f"]+1),xA=new Array(Mu["f"]+1),TA=new Array(Mu["f"]+1),SA=new Array(Mu["f"]+1),EA=Object(ju["f"])();var AA=r("a03d");class CA{get updating(){return!!this._tileRequested}init(e,t,r,i){this.tile=e,this._layerIdx=t,this._layerClass=r,this._suspended=i,this._tileLayerInfo=e.getLayerInfo(t,r),this._tileRequested=null;const n=this._findAncestorWithData();this._setUpsampleTile(n)}startLoading(){return this._requestNext()}dispose(){this._tileRequested&&(this._tileRequested.unrequestLayerData(this._layerIdx,this._layerClass,this),this._tileRequested=null),this.tile=null,this._tileLayerInfo=null}setSuspension(e){e!==this._suspended&&(this._suspended=e,e?this._tileRequested&&(this._tileRequested.unrequestLayerData(this._layerIdx,this._layerClass,this),this._tileRequested=null):this._tileLayerInfo.data||this.update())}update(){const e=this._findAncestorWithData();return this._setUpsampleTile(e),this._requestNext()}dataArrived(e){this._setUpsampleTile(e),this._tileRequested=null,e===this.tile?this.tile.updateRenderData(this._layerClass,kE["e"].FADING):this._requestNext()}dataMissing(){this._tileRequested=null,this._tileLayerInfo.data=null,this._requestNext()}_agentDone(){this.tile.agentDone(this._layerIdx,this._layerClass),this.dispose()}_requestNext(){if(this._suspended)return!0;const e=this._findNextDownload();if(this._tileRequested){if(e===this._tileRequested)return!0;this._tileRequested.unrequestLayerData(this._layerIdx,this._layerClass,this),this._tileRequested=null}return Object(z["k"])(e)?e.requestLayerData(this._layerIdx,this._layerClass,this)&&(this._tileRequested=e):this._agentDone(),!!this._tileRequested}_findNextDownload(){const e=this._layerIdx,t=this._layerClass,r=this.tile.surface.layerViewByIndex(e,t),i=Object(PS["c"])(r),{minLevel:n,maxLevel:a}=r.dataLevelRange,s=this._desiredMinLevelDelta,o=this._progressiveLevelModulo+s,c=this._scaleRangeEnabled?AA["e"]:()=>!0;let l=this.tile;const u=l.level;let d;const h=this._tileLayerInfo.upsampleInfo,p=h?h.tile.level:-1,f=Object(z["i"])(i,"tilemapCache");for(;l&&c(l,i,!1)&&l.level>=n;){const r=l.level,i=u-r,c=l.layerInfo[t][e];if(c.data&&i>=s){r>p&&this._setUpsampleTile(l),c.dataInvalidated&&(d=l);break}if((Object(z["j"])(f)||"unavailable"!==f.getAvailability(l.lij[0],l.lij[1],l.lij[2]))&&r<=a&&!c.data&&!c.dataMissing&&((Object(z["j"])(d)||l.level===n||r%Mu["h"]==0||u-d.level<s)&&(d=l),i>=o))break;l=l.parent}return Object(z["k"])(d)&&u-d.level<s&&this._tileLayerInfo.upsampleInfo&&(d=null),d}_findAncestorWithData(){const e=this.tile.vlevel,t=this._desiredMinLevelDelta;let r;for(let i=this.tile;i;i=i.parent)if(i.hasLayerData(this._layerIdx,this._layerClass)){if(e-i.level>=t)return i;r=i}return r}_setUpsampleTile(e){this._tileLayerInfo.setUpsampleInfo(this.tile,e),this.tile.updateRenderData(this._layerClass,kE["e"].FADING)}get test(){return{findNextDownload:()=>this._findNextDownload(),tileLayerInfo:this._tileLayerInfo}}}class RA extends CA{get _desiredMinLevelDelta(){throw MA}get _progressiveLevelModulo(){throw MA}dispose(){}}const MA=new Error("Abstract method called on TileAgent"),PA=new RA;class IA extends CA{constructor(){super(...arguments),this._scaleRangeEnabled=!1}get _desiredMinLevelDelta(){return Object(Mu["l"])(this.tile.level)-(this.tile.vlevel-this.tile.level)}get _progressiveLevelModulo(){return 0}}class DA extends CA{constructor(){super(),this._scaleRangeEnabled=!0}get _desiredMinLevelDelta(){return 0}get _progressiveLevelModulo(){return Mu["h"]}}var LA=r("d4de");class NA{constructor(){this.waitingAgents=new k_["a"],this._upsampleInfo=null,this.loadingAgent=null,this.requestPromise=null,this.requestAbort=null,this.pendingUpdates=0}static acquire(e){const t=FA.acquire();return t._init(e),t}release(){this.dispose(),kA.delete(this),FA.release(this)}dispose(){this.loadingAgent=Object(z["e"])(this.loadingAgent),this.abortRequest(),this._unsetUpsampleInfo(),this.pendingUpdates=0,this._data=Object(PS["p"])(this._data)}static prune(){FA.prune(0)}_init(e){this.waitingAgents.clear(),this._data=Object(PS["p"])(this._data),this.dataMissing=!1,this.dataInvalidated=!1,this._unsetUpsampleInfo(),this.abortRequest(),this.loadingAgent=null,this.pendingUpdates=0,this._pool=e,this.elevationBounds=null}invalidateSourceData(){this.dataInvalidated=!0,this.dataMissing=!1,this._unsetUpsampleInfo()}abortRequest(){this.requestAbort=Object(z["a"])(this.requestAbort),this.requestPromise=null}get upsampleInfo(){return this._upsampleInfo}_unsetUpsampleInfo(){this._upsampleInfo&&(this._upsampleInfo.tile.unrefMapData(),this._pool.release(this._upsampleInfo),this._upsampleInfo=null)}setUpsampleInfo(e,t){if(e===t||Object(z["j"])(t))this._unsetUpsampleInfo();else{if(null==this._upsampleInfo)this._upsampleInfo=this._pool.acquire();else{if(this._upsampleInfo.tile===t)return;this._upsampleInfo.tile.unrefMapData()}t.refMapData(),Object(AA["d"])(e,t,this._upsampleInfo)}}get data(){return this._data}set data(e){Object(PS["p"])(this._data),this._data=e}}const FA=new Bw["a"](NA,null,()=>{}),kA=new Map;function UA(){kA.size>0&&(console.log(kA.size+" live TilePerLayerInfo allocations:"),kA.forEach(e=>console.log(e,"\n")))}class zA{constructor(e){this._texture=e,this.type="tile-texture",this._refCount=1}retain(){++this._refCount}release(){--this._refCount,0===this._refCount&&this._texture.dispose()}get texture(){return this._texture}generateMipmap(){this._texture.generateMipmap()}get descriptor(){return this._texture.descriptor}}var BA;!function(e){e[e.NONE=0]="NONE",e[e.NONE_HIT_MAXLOD=1]="NONE_HIT_MAXLOD",e[e.SPLIT=2]="SPLIT",e[e.VSPLITMERGE=4]="VSPLITMERGE",e[e.MERGE=8]="MERGE",e[e.RENDERDATA=16]="RENDERDATA",e[e.GEOMETRY=32]="GEOMETRY",e[e.TEXTURE_NOFADING=64]="TEXTURE_NOFADING",e[e.TEXTURE_FADING=128]="TEXTURE_FADING"}(BA||(BA={}));const VA=Object(ju["f"])(),GA=Object(ju["f"])(),HA=Object(ju["f"])(),qA=.1;class WA{constructor(){this.fovX=0,this.fovY=0,this.relativeWidthLimit=0,this.relativeHeightLimit=0,this.maxLod=0,this.angledSplitBias=0,this.aboveGround=!0}}class $A{constructor(){this.lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this.extent=Object(wu["l"])(),this._elevationBounds=Object(vo["b"])(),this.layerInfo=[[],[]],this.extentInRadians=Object(wu["l"])(),this.centerAtSeaLevel=Object(ju["f"])(),this._center=[Object(ju["f"])(),Object(If["c"])(),Object(ju["f"])()],this.up=Object(ju["i"])(),this._isWithinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=KA,this._mapTileMemory=0,this._mapDataRefCount=0,this._screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0}static prune(){YA.prune(0),JA.prune(0),NA.prune()}get usedMemory(){return this._usedMemory===KA&&this._updateMemoryUsed(),this._usedMemory+(this.isCached?0:this.mapTileMemory)}get cachedMemory(){return this.isCached?this.mapTileMemory:0}get mapTileMemory(){this._usedMemory===KA&&this._updateMemoryUsed();let e=this._mapTileMemory;for(const{data:t}of this.layerInfo[FE.MAP])t instanceof SE["a"]&&(e+=t.memoryUsage);return e}get isCached(){return!this.shouldLoad&&this._mapDataRefCount<=0}get maxTesselation(){return this._maxTesselation}get isWithinClippingArea(){return this._isWithinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBounds(){return this._elevationBounds}get level(){return this.lij[0]}get key(){return`${this.lij[0]}/${this.lij[1]}/${this.lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[eC.MIDDLE][3]}get screenDepth(){return this._screenDepth}get visible(){return this._dirty&&this.computeVisibility(),this._visible}computeVisibility(){this._dirty=!1;const e=this._intersectsClippingArea&&this._isVisible(this.surface.frustum);return e!==this._visible&&(this._visible=e,this._surface.emit("tiles-visibility-changed"),this._surface.renderer.setNeedsRender(),this.updateAgentSuspension()),this._visible}get loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){const e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit("tiles-visibility-changed"),this._previouslyRendered=e,this._surface.renderer.setNeedsRender()),e}get shouldLoad(){if(!this.loadable)return!1;if(this._surface.lodSnapping===kE["a"].ON){const e=this.level-this._surface.snapLevel;if(0===e)return!0;if(1===e)return!1}return this.isLeaf}init(e,t,r){this.lij[0]=e[0],this.lij[1]=e[1],this.lij[2]=e[2],this.ellipsoid=Object(Yd["e"])(r.tilingScheme.spatialReference),r.tilingScheme.getExtent(e[0],e[1],e[2],this.extent),r.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this._isWithinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,r.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[eC.MIDDLE][3]=0,this.vlevel=e?e[0]:0,t&&t.elevationBounds?Object(io["c"])(this._elevationBounds,t.elevationBounds):Object(io["s"])(this._elevationBounds,0,0),this._pendingUpdates=0,this.renderData=null,this._screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=t,this.unsetChildren(),this._surface=r,this.updateVisibility();for(const i of UE){const e=r.numLayers(i),t=this.layerInfo[i];for(const r of t)r.release();t.length=e;for(let r=0;r<e;r++)t[r]=NA.acquire(this._surface.upsampleInfoPool),i===FE.ELEVATION&&this.findElevationBoundsForLayer(r,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(r.tilingScheme.pixelSize,Mu["f"])}release(){Object(PS["t"])(!this.renderData,"tile.renderData was not unloaded"),this._surface.upsampleMapCache.pop(this.key);for(const e of UE){for(const t of this.layerInfo[e])t.release();this.layerInfo[e].length=0}this._parent=null,this._surface=null,this._usedMemory=KA}refMapData(){++this._mapDataRefCount,this.isCached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){if(--this._mapDataRefCount,this.isCached){const e=this.cachedMemory;e>0&&(this._surface.upsampleMapCache.put(this.key,this,e),this.setMemoryDirty())}}setMemoryDirty(){this._usedMemory=KA}get cpuImageMemorySize(){const e=4,t=this._surface.tilingScheme.pixelSize;return t*t*e}_updateMemoryUsed(){this._usedMemory=0,this._mapTileMemory=0;const e=this.cpuImageMemorySize;for(const{data:t}of this.layerInfo[FE.MAP])t instanceof zA?this._mapTileMemory+=Object(Kh["d"])(t.texture):t instanceof HTMLImageElement||t instanceof SS["a"]?this._mapTileMemory+=e:t instanceof LA["a"]&&(this._mapTileMemory+=t.memoryUsage);for(const t of this.layerInfo[FE.ELEVATION])this._usedMemory+=t.data?e:0;this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._mapTileMemory+=Object(Kh["d"])(this.renderData.textureDescriptor)),this.isCached&&this._surface.upsampleMapCache.updateSize(this.key,this,this.cachedMemory)}getUsedMemoryForLayer(e,t){const r=this.layerInfo[e][t];if(!r||!r.data)return 0;if(e!==FE.MAP||this.isCached){if(e===FE.ELEVATION)return this.cpuImageMemorySize}else{const e=r.data;if(e instanceof zA)return Object(Kh["d"])(e.texture);if(e instanceof HTMLImageElement||e instanceof SS["a"])return this.cpuImageMemorySize;if(e instanceof SE["a"]||e instanceof LA["a"])return e.memoryUsage}return 0}updateScreenDepth(e){const t=this._center[eC.MIDDLE],r=e,i=t[0],n=t[1],a=t[2],s=r[2]*i+r[6]*n+r[10]*a+r[14];this._screenDepth=s<0?0:s/(r[3]*i+r[7]*n+r[11]*a+r[15])}shouldSplit(e,t,r){if(Object(z["k"])(e.frustum)&&(!this._intersectsClippingArea||!this._isVisible(e.frustum)))return BA.NONE;const i=this.level;Object($o["l"])(VA,this._center[eC.MIDDLE],t);let n=Object($o["v"])(VA),a=eC.MIDDLE;Object($o["l"])(GA,this._center[eC.TOP],t);const s=Object($o["v"])(GA);s<n&&(n=s,a=eC.TOP),Object($o["l"])(GA,this._center[eC.BOTTOM],t);const o=Object($o["v"])(GA);if(o<n&&(n=o,a=eC.BOTTOM),this._edgeLen2>n&&i<e.maxLod)return BA.SPLIT;const c=Math.sqrt(n),l=e.fovX*c*2,u=this._edgeLen/l,d=()=>{const t=i+Math.ceil(-Math.log2(e.relativeWidthLimit/u));return t!==this.vlevel?(this.vlevel=t,BA.VSPLITMERGE):BA.NONE_HIT_MAXLOD};if(r===kE["a"].ON&&1===this._surface.snapLevel-i)return i>=e.maxLod?d():BA.SPLIT;const h=Object($o["j"])(this.up,VA),p=this._elevationBounds[1]-this._elevationBounds[0],f=p/this.edgeLen;if(e.aboveGround&&h>0&&f<.001&&h/c-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-f>0)return BA.NONE;if(u<e.relativeWidthLimit)return this.vlevel!==this.level?(this.vlevel=this.level,BA.VSPLITMERGE):BA.NONE;if(i>=e.maxLod)return d();if(i>6){Object($o["l"])(GA,this._center[a],t),Object($o["g"])(HA,this.up,h),Object($o["l"])(HA,HA,GA);const r=Object($o["v"])(HA);if(r>this.radius*this.radius){Object($o["g"])(HA,HA,this.radius/Math.sqrt(r)),Object($o["h"])(HA,HA,this._center[a]),Object($o["l"])(HA,t,HA);const i=Math.min(1,(Math.abs(Object($o["j"])(HA,this.up))+.5*p+this._curvatureHeight)/Object($o["r"])(HA)),n=qA/e.angledSplitBias,s=e.fovY*c*2;if(i*(this._edgeLen/s)<n*e.relativeHeightLimit)return BA.NONE}}return BA.SPLIT}setChildren(e,t,r,i){Object(PS["t"])(!!(e&&t&&r&&i),"Null child passed"),this._children[0]=e,this._children[1]=t,this._children[2]=r,this._children[3]=i}unsetChildren(){this._children[0]=null,this._children[1]=null,this._children[2]=null,this._children[3]=null}load(e){this.refMapData();for(const t of UE)this._createOrUpdateAgents(0,t);e.loadTile(this)}unload(e){e.unloadTile(this);for(const t of UE){const e=this.layerInfo[t];for(const t of e)t.loadingAgent&&t.loadingAgent!==PA&&(XA(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0}this.resetPendingUpdate(BA.GEOMETRY),this.resetPendingUpdate(BA.TEXTURE_NOFADING),this.resetPendingUpdate(BA.TEXTURE_FADING),this.unrefMapData()}unloadMapData(){const e=this.layerInfo[FE.MAP];for(const t of e)t.loadingAgent&&t.loadingAgent!==PA&&(XA(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0;this.renderData&&this.renderData.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(Object(wu["o"])(e,this._clippingArea))return!1;const t=this._intersectsClippingArea,r=this._isWithinClippingArea;Object(z["k"])(e)?(this._intersectsClippingArea=this.intersectsExtent(e),this._isWithinClippingArea=this._isWithinExtent(e)):(this._intersectsClippingArea=!0,this._isWithinClippingArea=!0),this._clippingArea=e,this.updateVisibility();const i=r&&this._isWithinClippingArea,n=!(r||t||this._isWithinClippingArea||this._intersectsClippingArea);return!this.renderData||i||n||this.setPendingUpdate(BA.GEOMETRY),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty()}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){const r=this.layerInfo[t][e];return!(!r||!r.data||r.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(const e of UE){const t=this.layerInfo[e];for(const e of t)if(e.loadingAgent&&e.loadingAgent!==PA&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return!!this.hasPendingUpdate(BA.SPLIT)||e!==FE.ELEVATION&&!this.loadable}get hasPendingUpdates(){return 0!==this._pendingUpdates}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){this._pendingUpdates|=e,e===BA.SPLIT||e===BA.MERGE?this._surface.setTileTreeDirty():this._surface.requestUpdate()}resetPendingUpdate(e){return!!this.hasPendingUpdate(e)&&(this._pendingUpdates&=~e,!0)}requestLayerData(e,t,r){const i=this.layerInfo[t][e];if(i.waitingAgents.has(r))return console.warn("agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)",this.lij.toString(),r.tile.lij.toString(),t,e),!0;if(i.waitingAgents.push(r),i.data&&!i.dataInvalidated)return console.warn("agent requested existing data (tile %s, agent tile %s, layer: %d/%d)",this.lij.toString(),r.tile.lij.toString(),t,e),r.dataArrived(this),!0;if(i.requestPromise)return!0;Object(z["a"])(i.requestAbort),i.requestAbort=new AbortController;const n=this._surface.requestTileData(this,e,t,i.requestAbort);if(!n)return i.requestAbort=null,!1;const a=()=>{i.requestPromise===n&&(i.requestPromise=null,i.requestAbort=null)};return i.requestPromise=n,n.then(a,a),!0}get isLeaf(){return null==this._children[0]}hasLij(e){return this.lij[0]===e[0]&&this.lij[1]===e[1]&&this.lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;if(this.isLeaf)return null;const t=this._children[0].findByLij(e)||this._children[1].findByLij(e)||this._children[2].findByLij(e)||this._children[3].findByLij(e);return t||null}distanceToSquared(e){return Object($o["v"])(Object($o["l"])(HA,this._center[eC.MIDDLE],e))}containsPoint(e){const t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}unrequestLayerData(e,t,r){const i=this.layerInfo[t][e],n=i.waitingAgents,a=null!=n.removeUnordered(r);Object(PS["t"])(a,"agent has not requested this piece of map data"),n.length<1&&(i.abortRequest(),this._updateMemoryUsed())}dataArrived(e,t,r){const i=this.layerInfo[t][e];i.data=r,i.dataInvalidated=!1,i.waitingAgents.forAll(e=>e.dataArrived(this)),i.waitingAgents.clear(),this._updateMemoryUsed()}dataMissing(e,t,r){r.notInTilemap||console.error(`Tile ${this.lij.toString()} layer ${t}/${e} error ${r}`);const i=this.layerInfo[t][e];i.dataMissing=!0,i.waitingAgents.forAll(e=>e.dataMissing()),i.waitingAgents.clear(),this._updateMemoryUsed()}updateRenderData(e,t){switch(e){case FE.MAP:return this._updateTexture(t);case FE.ELEVATION:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(e===kE["e"].FADING?BA.TEXTURE_NOFADING:BA.TEXTURE_FADING),this.setPendingUpdate(e===kE["e"].FADING?BA.TEXTURE_FADING:BA.TEXTURE_NOFADING))}_updateGeometry(){this.setPendingUpdate(BA.GEOMETRY);for(const e of this.layerInfo[FE.ELEVATION])e.pendingUpdates|=BA.GEOMETRY}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData(),this.restartAgents(t)}computeElevationBounds(){Object(io["s"])(this._elevationBounds,Number.MAX_VALUE,-Number.MAX_VALUE);const e=this.layerInfo[FE.ELEVATION];let t=!0;for(const r of e)Object(z["k"])(r.elevationBounds)&&(this._elevationBounds[0]=Math.min(this._elevationBounds[0],r.elevationBounds.min),this._elevationBounds[1]=Math.max(this._elevationBounds[1],r.elevationBounds.max),r.elevationBounds.hasNoDataValues||(t=!1));t&&(this._elevationBounds[0]=Math.min(this._elevationBounds[0],0),this._elevationBounds[1]=Math.max(this._elevationBounds[1],0)),this.updateRadiusAndCenter(),this._surface.setTileTreeDirty()}_updateCenter(){const e=.5*(this._elevationBounds[0]+this._elevationBounds[1]);Object($o["g"])(HA,this.up,e),Object($o["h"])(this._center[eC.MIDDLE],this.centerAtSeaLevel,HA),Object($o["g"])(HA,this.up,this._elevationBounds[0]),Object($o["h"])(this._center[eC.TOP],this.centerAtSeaLevel,HA),Object($o["g"])(HA,this.up,this._elevationBounds[1]),Object($o["h"])(this._center[eC.BOTTOM],this.centerAtSeaLevel,HA)}findElevationBoundsForLayer(e,t){const r=this.layerInfo[FE.ELEVATION][e];if(Object(z["k"])(r.elevationBounds)&&r.elevationBounds.level>=t)return;const i=this._surface.layerViewByIndex(e,FE.ELEVATION),n=Object(PS["c"])(i);if(!Object(AA["e"])(this,n,!1))return;const a=QA;let s=!1;if(r.data){const e=r.data;a.min=e.bounds[0],a.max=e.bounds[1],a.hasNoDataValues=e.hasNoDataValues,a.level=this.lij[0],s=!0}else{let t,r,i=0;for(let n=this._parent;n&&(!r||i<Object(Mu["l"])(this.level))&&(i=this.vlevel-n.level,t=r||t,r=n.layerInfo[FE.ELEVATION][e].data,!(!r&&t&&i>=Object(Mu["l"])(this.level)));n=n.parent);r=r||t,r&&(r.computeMinMaxValue(this.lij[0],this.lij[1],this.lij[2],a),a.min!==1/0&&(a.level=r.level,s=!0))}s&&(Object(z["j"])(r.elevationBounds)&&(r.elevationBounds=new CE),r.elevationBounds.copyFrom(a))}modifyLayers(e,t,r){const i=this.layerInfo[r];for(const s of i)s.loadingAgent&&s.loadingAgent!==PA&&(XA(s.loadingAgent),s.loadingAgent=null),s.waitingAgents.clear();for(let s=0;s<i.length;++s)void 0===e[s]&&i[s].release();const n=new Array(...i),a=t.length;i.length=a;for(let s=0;s<a;s++){const e=t[s];i[s]=e>-1?n[e]:NA.acquire(this._surface.upsampleInfoPool)}this._updateMemoryUsed()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,kE["e"].FADING))}updateAgents(e){if(this.renderData){const t=this.layerInfo[e];for(const e of t)e.loadingAgent===PA&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(const e of UE){const t=this._isSuspended(e);for(const r of this.layerInfo[e])r.loadingAgent&&r.loadingAgent!==PA&&(r.loadingAgent.setSuspension(t),r.loadingAgent===PA&&this.updateRenderData(e,kE["e"].FADING))}}removeLayerAgent(e,t){const r=this.layerInfo[t][e];r.loadingAgent&&r.loadingAgent!==PA&&r.loadingAgent.dispose(),r.loadingAgent=null}agentDone(e,t){const r=this.layerInfo[t][e];r.loadingAgent=PA,r.data||r.upsampleInfo||this._createOrUpdateAgents(e+1,t)}_createOrUpdateAgents(e,t){const r=this._isSuspended(t),i=this.layerInfo[t];for(let n=e;n<i.length;++n){const e=i[n];let a=!1;const s=this._surface.layerViewByIndex(n,t),o=Object(PS["c"])(s);if(e.loadingAgent?Object(AA["e"])(this,o,!1)?(e.loadingAgent!==PA&&e.loadingAgent.setSuspension(r),e.loadingAgent!==PA&&(a=e.loadingAgent.update())):e.dispose():Object(AA["e"])(this,o,!1)&&(e.loadingAgent=ZA(this,n,t,r),a=e.loadingAgent.startLoading(),a?e.loadingAgent===PA&&this.setPendingUpdate(BA.GEOMETRY):(XA(e.loadingAgent),e.loadingAgent=PA)),e.loadingAgent===PA&&this.updateRenderData(t,kE["e"].FADING),a&&s.isOpaque)return}}_isWithinExtent(e){const t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){const t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationBasedVerticesPerRow(e){const t=this.vlevel-this.level,r=Math.max(this.level-e,Object(Mu["l"])(this.level)-t);return Object(dr["f"])(1+(this.maxTesselation>>r),2,this.maxTesselation+1)}get test(){return{cachedMemory:this.cachedMemory}}}function ZA(e,t,r,i){const n=r===FE.ELEVATION?JA.acquire():YA.acquire();return n.init(e,t,r,i),n}function XA(e){e.dispose(),e instanceof IA?JA.release(e):e instanceof DA&&YA.release(e)}const YA=new Bw["a"](DA),JA=new Bw["a"](IA),QA=new CE,KA=-1;var eC;!function(e){e[e.TOP=0]="TOP",e[e.MIDDLE=1]="MIDDLE",e[e.BOTTOM=2]="BOTTOM"}(eC||(eC={}));class tC extends $A{constructor(e,t,r){super(),this.horizontalScaleFactor=1,this.isWebmercatorOnPlateeCaree=!1,this.extentInRenderSR=Object(wu["l"])(),void 0!==e&&this.init(e,t,r)}init(e,t,r){super.init(e,t,r);const i=r.view.renderSpatialReference,n=r.spatialReference,a=Object(z["k"])(i)&&Object(fe["k"])(i),s=a&&n.isGeographic?this.ellipsoid.radius*Math.PI/180:1;this.horizontalScaleFactor=s,this.isWebmercatorOnPlateeCaree=a&&n.isWebMercator;const o=this.extentInRenderSR,c=this.extent;if(this.isWebmercatorOnPlateeCaree){const e=Object(ju["h"])(c[0],c[1],0);Object(pe["y"])(e,ne["a"].WebMercator,e,ne["a"].PlateCarree);const t=Object(ju["h"])(c[2],c[3],0);Object(pe["y"])(t,ne["a"].WebMercator,t,ne["a"].PlateCarree),o[0]=e[0],o[1]=e[1],o[2]=t[0],o[3]=t[1]}else for(let l=0;l<4;++l)o[l]=c[l]*s;this.centerAtSeaLevel[0]=.5*(o[0]+o[2]),this.centerAtSeaLevel[1]=.5*(o[1]+o[3]),this.centerAtSeaLevel[2]=0,this._edgeLen=Math.max(o[2]-o[0],o[3]-o[1]),this._edgeLen2=this._edgeLen*this._edgeLen,this.updateRadiusAndCenter()}updateRadiusAndCenter(){this._updateCenter();const e=this.extentInRenderSR,t=.5*(e[2]-e[0]),r=.5*(e[3]-e[1]),i=Math.sqrt(t*t+r*r),n=.5*(this.elevationBounds[0]-this.elevationBounds[1]),a=Math.max(i,n);this._center[eC.MIDDLE][3]=a}_isVisible(e){return Object(Uw["i"])(e,this._aabb())}_aabb(){const e=this.extentInRenderSR;return Object(Uj["H"])(e[0],e[1],this.elevationBounds[0],e[2],e[3],this.elevationBounds[1])}intersectsRay(e,t,r,i,n){rC[0]=1/t[0],rC[1]=1/t[1],rC[2]=1/t[2];const a=n*(this.extent[2]-this.extent[0])*this.horizontalScaleFactor*.1;return Object(iA["g"])(this._aabb(),e,rC,r+a,i)}createGeometry(e,t){hA(e,this.extent,t,this.horizontalScaleFactor,this.isWebmercatorOnPlateeCaree,this.renderData),this.setMemoryDirty()}getDefaultVerticesPerRowOnLevel(){return this.level<9?3:2}}const rC=Object(ju["f"])();var iC;!function(e){e[e.BACK_TO_FRONT=-1]="BACK_TO_FRONT",e[e.NONE=0]="NONE",e[e.FRONT_TO_BACK=1]="FRONT_TO_BACK"}(iC||(iC={}));class nC extends $A{constructor(e,t,r){super(),this.obb=new Array(8),this.isWebMercator=!1;for(let i=0;i<8;i++)this.obb[i]=Object(ju["f"])();void 0!==e&&this.init(e,t,r)}init(e,t,r){super.init(e,t,r),this.isWebMercator=r.tilingScheme.spatialReference.isWebMercator;const i=this.ellipsoid.radius,n=this.extentInRadians[0],a=this.extentInRadians[1],s=this.extentInRadians[2],o=this.extentInRadians[3],c=e[0],l=Object(dr["l"])(a,o,.5),u=Object(dr["l"])(n,s,.5),d=0===c?0:Math.min(Math.abs(a),Math.abs(o));this._edgeLen=(s-n)*Math.cos(d)*i,this._edgeLen2=this._edgeLen*this._edgeLen,this._curvatureHeight=i-Math.sqrt(i*i-this._edgeLen2/4),Object(pe["k"])(this.centerAtSeaLevel,u,l,this.ellipsoid.radius,0);const h=Object(ju["g"])(this.centerAtSeaLevel);Object($o["t"])(h,h),this.up=h,this._updateOBB(),this.updateRadiusAndCenter()}updateRadiusAndCenter(){if(0===this.lij[0])Object($o["y"])(this._center[oC.MIDDLE],0,0,0),Object($o["y"])(this._center[oC.TOP],0,0,0),Object($o["y"])(this._center[oC.BOTTOM],0,0,0),this.ellipsoid||(this.ellipsoid=Object(Yd["e"])(this.surface.spatialReference)),this._center[oC.MIDDLE][3]=this.ellipsoid.radius+this.elevationBounds[1];else{this._updateCenter();const e=Math.max(Object($o["n"])(this._center[oC.MIDDLE],this.obb[0]),Object($o["n"])(this._center[oC.MIDDLE],this.obb[1]));this._center[oC.MIDDLE][3]=Math.sqrt(e)}}_isVisible(e){if(!Object(Uw["m"])(e,this._center[oC.MIDDLE]))return!1;if(this.lij[0]<10)return!0;const t=this.obb;for(let r=0;r<Uw["a"].NUM;r++){const i=r===Uw["b"].NEAR,n=e[r];i&&(sC[0]=n[0],sC[1]=n[1],sC[2]=n[2],sC[3]=n[3]-this.surface.view.state.camera.near);const a=i?sC:n;let s;for(s=0;s<8;s++){const e=t[s];if(a[0]*e[0]+a[1]*e[1]+a[2]*e[2]+a[3]<0)break}if(8===s)return!1}return!0}computeElevationBounds(){super.computeElevationBounds(),this._updateOBB()}createGeometry(e,t){const r=this._getPatchType(this.lij[1],this.lij[0]);dA(e,this.extent,t,this.renderData,this.extentInRadians,this.isWebMercator,this.ellipsoid,r),this.setMemoryDirty()}_updateOBB(){const e=this.extentInRadians,t=this.obb;for(let r=0;r<2;r++){const i=this.elevationBounds[r];let n=4*r;Object(pe["k"])(t[n++],e[0],e[1],this.ellipsoid.radius,i),Object(pe["k"])(t[n++],e[0],e[3],this.ellipsoid.radius,i),Object(pe["k"])(t[n++],e[2],e[3],this.ellipsoid.radius,i),Object(pe["k"])(t[n++],e[2],e[1],this.ellipsoid.radius,i)}if(this.isWebMercator)switch(this._getPatchType(this.lij[1],this.lij[0])){case kE["c"].HAS_NORTH_POLE:Object($o["y"])(t[1],0,0,this.ellipsoid.radius),Object($o["y"])(t[2],0,0,this.ellipsoid.radius),Object($o["y"])(t[5],0,0,this.ellipsoid.radius),Object($o["y"])(t[6],0,0,this.ellipsoid.radius);break;case kE["c"].HAS_SOUTH_POLE:Object($o["y"])(t[0],0,0,-this.ellipsoid.radius),Object($o["y"])(t[3],0,0,-this.ellipsoid.radius),Object($o["y"])(t[4],0,0,-this.ellipsoid.radius),Object($o["y"])(t[7],0,0,-this.ellipsoid.radius)}}_getPatchType(e,t){return e===(1<<t)-1?0===e?kE["c"].HAS_BOTH_POLES:kE["c"].HAS_SOUTH_POLE:0===e?kE["c"].HAS_NORTH_POLE:kE["c"].REGULAR}intersectsRay(e,t,r,i,n){const a=this._center[oC.MIDDLE],s=a[3]+r+.2*this.ellipsoid.radius*Math.abs(n*(this.extentInRadians[3]-this.extentInRadians[1])),o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],c=a[0]-e[0],l=a[1]-e[1],u=a[2]-e[2],d=(c*t[0]+l*t[1]+u*t[2])/o,h=t[0]*d-c,p=t[1]*d-l,f=t[2]*d-u;return h*h+p*p+f*f<s*s}getDefaultVerticesPerRowOnLevel(){return this.level<aC.length?aC[this.level]+1:2}}const aC=[128,64,32,16,16,8,8,4],sC=Object(Ag["d"])();var oC;!function(e){e[e.TOP=0]="TOP",e[e.MIDDLE=1]="MIDDLE",e[e.BOTTOM=2]="BOTTOM"}(oC||(oC={}));var cC,lC=r("8190");class uC{constructor(){this.numVertsPerSide=0,this.wireframe=!1}}class dC{constructor(e){this._getFadeDuration=e,this._fadeStart=0,this._delayedTime=0}clear(){this._current=Object(z["d"])(this._current),this._next=Object(z["d"])(this._next),this._waiting=Object(z["d"])(this._waiting),this._delayed=Object(z["d"])(this._delayed)}get current(){if(Object(z["j"])(this._current))return null;if(!this._isFadingEnabled){const e=this._delayed||this._waiting||this._next||this._current;e!==this._current&&(this._current=null,this.clear(),this._current=e)}let e=dC.test.fadeMoment;if(Object(z["k"])(this._delayed)&&(e=e||performance.now(),e>=this._delayedTime&&(this._push(this._delayed,cC.Immediate),this._delayed=null)),Object(z["k"])(this._next)){e=e||performance.now();const t=this._fadeDuration,r=Object(z["k"])(this._current)&&this._next.texture===this._current.texture,i=this._next.type!==kE["e"].FADING,n=e-this._fadeStart>=t;(r||i||n)&&(Object(z["d"])(this._current),this._current=this._next,this._next=this._waiting,this._waiting=null,this._fadeStart=this._alignFadeStart(e))}return this._current}get next(){return this._next}get fadeFactor(){if(Object(z["j"])(this._next))return 1;const e=dC.test.fadeMoment||performance.now(),t=Math.max(0,e-this._fadeStart),r=this._fadeDuration;return t>r?0:1-t/r}get isFading(){return Object(z["k"])(this._next)||Object(z["k"])(this._delayed)}push(e,t=cC.Immediate){this._delayed=Object(z["d"])(this._delayed),this._push(e,t)}_push(e,t){if(this._isFadingEnabled||this.clear(),Object(z["j"])(this._current))return void(this._current=e);const r=dC.test.fadeMoment||performance.now();return t!==cC.Immediate?(this._delayed=e,void(this._delayedTime=r+t)):Object(z["j"])(this._next)?(this._next=e,void(this._fadeStart=this._alignFadeStart(r))):void(Object(z["j"])(e)||(Object(z["d"])(this._waiting),this._waiting=e))}get _fadeDuration(){return Object(z["j"])(this._waiting)?this._getFadeDuration():.5*this._getFadeDuration()}_alignFadeStart(e){const t=this._getFadeDuration();return e+t-e%t}get _isFadingEnabled(){return this._getFadeDuration()>0}}dC.test={fadeMoment:0},function(e){e[e.Immediate=0]="Immediate",e[e.Delayed=5e3]="Delayed"}(cC||(cC={}));class hC{constructor(){this._scales=[-1,-1,-1,-1],this._offsets=[-1,-1,-1,-1]}clear(){this._scales[0]=this._scales[1]=this._scales[2]=this._scales[3]=-1,this._offsets[0]=this._offsets[1]=this._offsets[2]=this._offsets[3]=-1}setScale(e,t,r){this._scales[2*e]=t,this._scales[2*e+1]=r}setOffset(e,t,r){this._offsets[2*e]=t,this._offsets[2*e+1]=r}get scales(){return this._scales}get offsets(){return this._offsets}}class pC{constructor(){this.geometryInfo=new sA,this.intersectionData=null,this.skirtIntersectionData=null,this.geometryState=new uC,this._textureRef=new dC(()=>this.tile.surface.textureFadeDuration),this.overlay=new hC}init(e){this.tile=e,this.clear();const t=this.geometryInfo;t.indices=null,t.vertexAttributes=null,Object(Uj["k"])(t.boundingBox),t.numSurfaceIndices=0,t.numSkirtIndices=0,t.numWithoutSkirtIndices=0,t.numVertsPerRow=0,this.intersectionData=null,this.skirtIntersectionData=null,this.geometryState=new uC,this.localOrigin=null,this.overlay.clear()}clear(){this.releaseGeometry(),this.releaseTexture(),this._textureRef.clear()}updateGeometry(e,t){return!!this._updateGeometryState(t)&&(this._releaseGeometry(),this._createGeometry(e),!0)}releaseGeometry(){return!!this._releaseGeometry()&&(this.geometryState=new uC,!0)}ensureTexture(e,t){return Object(z["k"])(this._texture)&&this._texture.descriptor.width!==e&&this.releaseTexture(),Object(z["j"])(this._texture)&&(this._texture=t(),this.tile.setMemoryDirty()),this._texture}releaseTexture(){Object(z["k"])(this._texture)&&(this._texture.release(),this._texture=null,this.tile.setMemoryDirty())}_updateGeometryState(e){const t=this._getElevationInfo(),r=t.samplerData?this.tile.getElevationBasedVerticesPerRow(t.maxTileLevel):this.tile.getDefaultVerticesPerRowOnLevel();let i=this.tile.clippingArea;this.tile.intersectsClippingArea&&!this.tile.isWithinClippingArea||(i=null);const n=this.geometryState;let a=!1;return n.numVertsPerSide!==r&&(n.numVertsPerSide=r,a=!0),t.changed&&(n.samplerData=t.samplerData,a=!0),Object(S["e"])(n.clippingArea,i)||(n.clippingArea=i,a=!0),n.wireframe!==e&&(n.wireframe=e,a=!0),a}_createGeometry(e){this.tile.createGeometry(this.geometryState,this.localOrigin);const t=this.geometryInfo.vertexAttributes,r=this.geometryInfo.indices,i=e.gl;this._vao=new ep["a"](e,hh["a"],{geometry:Object(Wh["a"])(t.layout)},{geometry:Jh["a"].createVertex(e,i.STATIC_DRAW,t.buffer)},Jh["a"].createIndex(e,i.STATIC_DRAW,r))}_releaseGeometry(){return!!this._vao&&(this._vao.dispose(),this._vao=null,lA(this.geometryInfo),!0)}get vao(){return this._vao}setTextureReference(e,t=cC.Immediate){Object(z["k"])(e)&&e.texture!==this._texture&&this.releaseTexture(),this._textureRef.push(e,t)}get textureReference(){return this._textureRef.current}get nextTextureReference(){return this._textureRef.next}get textureFadeFactor(){return this._textureRef.fadeFactor}get textureIsFading(){return this._textureRef.isFading}_getElevationInfo(){const e=this.geometryState.samplerData,t=this.tile.layerInfo[FE.ELEVATION],r=t.length;let i=new Array(r),n=0,a=0,s=!1;for(let o=0;o<r;o++){const r=t[o];if(r.upsampleInfo){const t=r.upsampleInfo.tile,c=t.layerInfo[FE.ELEVATION][o].data,l=c&&c.samplerData;e&&e[n]===l||(s=!0),i[n++]=l,a=Math.max(a,t.lij[0])}else if(r.data){const t=this.tile.surface.layerViewByIndex(o,FE.ELEVATION);if(Object(AA["e"])(this.tile,t.layer,!1)){const t=r.data;e&&e[n]===t.samplerData||(s=!0),i[n++]=t.samplerData,a=this.tile.level}}}return Object(z["k"])(e)&&e.length!==n&&(s=!0),n>0?i.length=n:i=null,{changed:s,samplerData:i,maxTileLevel:a}}get estimatedGeometryMemoryUsage(){const e=Object(z["n"])(this.intersectionData,0,e=>e.estimatedMemoryUsage)+Object(z["n"])(this.skirtIntersectionData,0,e=>e.estimatedMemoryUsage+e.vertexPositionBuffer.byteLength);return this.geometryInfo.indices.byteLength+this.geometryInfo.vertexAttributes.byteLength+e}get textureDescriptor(){return Object(z["k"])(this._texture)?this._texture.descriptor:null}get test(){return{hasTexture:null!=this._texture}}}class fC{constructor(){this.extent=Object(Xd["e"])(),this.minLevel=0,this.maxLevel=0,this.callback=null}}class bC{constructor(){this._queries=new k_["a"]({initialSize:10}),this._queriesInvPtr=0,this._queryQueue=new k_["a"]({initialSize:30}),this._queryPool=new Bw["a"](fC)}queryVisibleLevelRange(e,t,r,i){const n=this._queryPool.acquire();Object(U_["c"])(n.extent,e),n.minLevel=t||-Number.MAX_VALUE,n.maxLevel=null!=r?r:Number.MAX_VALUE,n.callback=i,this._queryQueue.push(n)}hasPendingQueries(){return 0!==this._queryQueue.length}prepareQueries(){for(;this._queries.length<this._queries.data.length&&this._queryQueue.length>0;){const e=this._queryQueue.pop();this._queries.push(e)}this._queriesInvPtr=this._queries.length}processQueries(){for(let e=0;e<this._queries.length;e++){const t=this._queries.data[e];this._queryPool.release(t),t.callback(e>=this._queriesInvPtr),t.callback=null}this._queries.clear()}scaleQueriesForTile(e){const t=e.level;let r=0;for(;r<this._queriesInvPtr;){const i=this._queries.data[r],n=i.extent;t>=i.minLevel&&t<=i.maxLevel&&n[0]<=e.extent[2]&&n[2]>=e.extent[0]&&n[1]<=e.extent[3]&&n[3]>=e.extent[1]?(this._queries.swapElements(r,this._queriesInvPtr-1),this._queriesInvPtr--):r++}}}var mC=r("6e85");const gC=.125;class yC{constructor(){this._renderParams={context:null,drawPhase:1,state:new Io({viewpoint:new ae["a"]({targetGeometry:new he["a"](0,0),scale:1,rotation:0}),size:[256,256]}),stationary:!0,pixelRatio:1,displayLevel:-1,requiredLevel:-1,globalOpacity:1,renderPass:"background",styleLayer:null,styleLayerUID:-1,painter:null,glyphMosaic:null,spriteMosaic:null,profiler:null,renderingOptions:null,deltaTime:-1,timeline:null,time:0,hasClipping:!1,blendMode:null,dataUploadCounter:0,effects:null,inFadeTransition:!1,requireFBO:!1}}dispose(){this._renderParams=null}render(e,t,r,i,n,a,s,o,c,l){const u=a.adjustLevel(t[0]),d=this._renderParams;d.context=e,d.painter=i,d.glyphMosaic=i.glyphMosaic,d.spriteMosaic=i.spriteMosaic,d.pixelRatio=l,d.displayLevel=u,d.requiredLevel=u;const h=a.getScale(t[0]),[p,f]=a.getShift(t,s*h),b=gC*s*h/c,m=r.transforms.dvs;m[0]=b,m[4]=-b,m[6]=-1-p-o[0]*s*2,m[7]=1+f+(1-o[1])*s*2-2,d.state.size[0]=c,d.state.size[1]=c,r.stage||r.attachWithContext(e),r.triangleCount=0,i.drawTile(d,r,n)}}var OC;!function(e){e[e.NoAlpha=0]="NoAlpha",e[e.SourceAlpha=1]="SourceAlpha",e[e.OneMinusSourceAlpha=2]="OneMinusSourceAlpha",e[e.COUNT=3]="COUNT"}(OC||(OC={}));var vC=r("affb");class _C extends uh["a"]{initializeProgram(e){const t=_C.shader.get().build();return new ph["a"](e.rctx,t,hh["a"])}initializePipeline(){const e=this.configuration.mode===OC.OneMinusSourceAlpha?Object(bh["i"])(fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA):this.configuration.mode===OC.SourceAlpha?Object(bh["i"])(fh["b"].ZERO,fh["b"].SRC_ALPHA):null;return Object(bh["g"])({blending:e,colorWrite:bh["d"]})}}_C.shader=new lh["a"](vC["a"],()=>r.e("chunk-74b47f45").then(r.bind(null,"7a95a")));class jC extends dh["a"]{constructor(){super(...arguments),this.mode=OC.NoAlpha}}Object(l["a"])([Object(dh["b"])({count:OC.COUNT})],jC.prototype,"mode",void 0);r("6b59");var wC=r("f6ac"),xC=r("beba");class TC extends uh["a"]{get uniformLocationInfos(){return this._uniformLocationInfos||(this._uniformLocationInfos=Object(xC["i"])(this._context,this.program)),this._uniformLocationInfos}initializeProgram(e){const t=TC.shader.get(),r=this.configuration,i=t.build({output:r.colorizerType,applyColormap:r.applyColormap,stretchType:r.stretchType});return this._context=e.rctx,new ph["a"](e.rctx,i,hh["a"])}initializePipeline(){const e=this.configuration.mode===OC.OneMinusSourceAlpha?Object(bh["i"])(fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA):this.configuration.mode===OC.SourceAlpha?Object(bh["i"])(fh["b"].ZERO,fh["b"].SRC_ALPHA):null;return Object(bh["g"])({blending:e,colorWrite:bh["d"]})}bindPass(e){Object(xC["k"])(this.program,this.uniformLocationInfos,e.basic),Object(xC["k"])(this.program,this.uniformLocationInfos,e.common),Object(z["k"])(e.colormap)&&Object(xC["k"])(this.program,this.uniformLocationInfos,e.colormap),this.configuration.colorizerType===mC["b"].Stretch&&Object(z["k"])(e.stretch)?Object(xC["k"])(this.program,this.uniformLocationInfos,e.stretch):this.configuration.colorizerType===mC["b"].Hillshade&&Object(z["k"])(e.hillshade)&&Object(xC["k"])(this.program,this.uniformLocationInfos,e.hillshade)}}TC.shader=new lh["a"](wC["a"],()=>r.e("chunk-2d222785").then(r.bind(null,"cf6b")));class SC extends dh["a"]{constructor(){super(...arguments),this.mode=OC.OneMinusSourceAlpha,this.colorizerType=mC["b"].Stretch,this.stretchType=mC["a"].Noop,this.applyColormap=!0}}Object(l["a"])([Object(dh["b"])({count:OC.COUNT})],SC.prototype,"mode",void 0),Object(l["a"])([Object(dh["b"])({count:mC["b"].COUNT})],SC.prototype,"colorizerType",void 0),Object(l["a"])([Object(dh["b"])({count:mC["a"].COUNT})],SC.prototype,"stretchType",void 0),Object(l["a"])([Object(dh["b"])()],SC.prototype,"applyColormap",void 0);class EC{constructor(e,t,r,i,n,a,s){this.texture=e,this.type=t,e.retain(),this.offsetAndScale=Object(Xd["g"])(r.offset[0],r.offset[1],r.scale,r.scale),this.opacities=Object(ju["h"])(i,s?a:0,n)}destroy(){this.texture.release()}}class AC{constructor(e){this._rctx=e,this._pools=new Map}acquire(e){return this._getPool(e).acquire()}release(e){this._getPool(e.width).release(e)}clear(){this._pools.forEach(e=>e.destroy()),this._pools.clear()}_getPool(e){let t=this._pools.get(e);if(!t){const r=Mh["a"].bind(Mh["a"],this._rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].DEPTH_RENDER_BUFFER,width:e,height:e});t=new Bw["a"](r),this._pools.set(e,t)}return t}}class CC{constructor(e,t,r){this._rctx=e,this.tileSize=t,this._techniqueRepository=r,this._backgroundIsGrid=!1,this._backgroundTexture=null,this._backgroundColor=null,this._blackTex=null,this._vectorTileHelper=new yC,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._vaoQuad=Object(Oh["d"])(this._rctx,yh["b"]),this._blackTex=new zA(Object(Oh["a"])(this._rctx,[0,0,0,1])),this._fboPool=new AC(this._rctx)}dispose(){this._fboPool&&(this._fboPool.clear(),this._fboPool=null),this._vaoQuad=Object(z["e"])(this._vaoQuad),this._backgroundTexture=Object(z["r"])(this._backgroundTexture),this._blackTex=Object(z["r"])(this._blackTex),this._blendLayersTechnique=Object(z["r"])(this._blendLayersTechnique),this._applyOpacityTechnique=Object(z["r"])(this._applyOpacityTechnique),this._vectorTileHelper=Object(z["e"])(this._vectorTileHelper)}get blendLayersTechnique(){if(Object(z["j"])(this._blendLayersTechnique)){const e=new jC;e.mode=OC.OneMinusSourceAlpha,this._blendLayersTechnique=this._techniqueRepository.acquire(_C,e)}return this._blendLayersTechnique}get applyOpacityTechnique(){if(Object(z["j"])(this._applyOpacityTechnique)){const e=new jC;e.mode=OC.SourceAlpha,this._applyOpacityTechnique=this._techniqueRepository.acquire(_C,e)}return this._applyOpacityTechnique}get backgroundIsGrid(){return this._backgroundIsGrid}get backgroundColor(){return this._backgroundColor}updateTileTexture(e,t){const r=e.layerInfo[FE.MAP];for(const f of r)f.pendingUpdates&=~(BA.TEXTURE_NOFADING&BA.TEXTURE_FADING);if(!e.renderData)return;const i=e.surface,n=i.baseOpacity;let a=0,s=0,o=this.tileSize,c=!1;const l=i.view.pixelRatio;let u=r.length,d=0;for(;d<r.length&&!c;d++){const t=i.layerViewByIndex(d,FE.MAP),h=t.fullOpacity;if(PC[d]=h,Object(Au["c"])(t.layer)&&u>=r.length&&(u=d),0===h)continue;++s;const p=MC(e,d,IC);p&&(Object(PS["n"])(t)?o=Math.max(o,this.tileSize*l):1===n&&1===h&&(t.isOpaque||this._dataToTexture(p)&&p.sourceLayerInfo.data.descriptor.isOpaque)&&(c=!0),++a)}this._cleanupFBOPool(l,r.length),o=RC(o);const h=o/this.tileSize,p=d-1;0!==a?1===a&&(c||this._backgroundIsGrid||Object(z["k"])(this._backgroundColor))&&this._useLayerTexture(e,p,u,PC[p])||this._composeMapLayers(e,t,p,u,c,PC,o,h):this._useBackgroundTexture(e,s)}_useBackgroundTexture(e,t){let r=cC.Immediate;(e.surface.view.layerViewManager.updating||t>0)&&(r=cC.Delayed),this._backgroundTexture&&Object(z["j"])(e.renderData.textureReference)&&(r=cC.Immediate),e.renderData.setTextureReference(Object(z["k"])(this._backgroundTexture)?new EC(this._backgroundTexture,kE["e"].FADING,DC,e.surface.baseOpacity,1,1,!1):null,r)}_useLayerTexture(e,t,r,i){const n=t<r,a=n?1:e.surface.baseOpacity,s=n?e.surface.baseOpacity:1,o=MC(e,t,IC);return!!this._dataToTexture(o)&&(e.renderData.setTextureReference(new EC(o.sourceLayerInfo.data,kE["e"].FADING,o,a,i,s,!0)),!0)}_composeMapLayers(e,t,r,i,n,a,s,o){const c=this._rctx,l=this._fboPool.acquire(s);c.bindFramebuffer(l),c.setViewport(0,0,s,s),c.setClearColor(0,0,0,0),c.setClearDepth(1),c.clearSafe(fh["e"].COLOR_BUFFER_BIT|fh["e"].DEPTH_BUFFER_BIT);let u=!1;!n&&Object(z["k"])(this._backgroundTexture)&&this._drawRasterData(this.blendLayersTechnique,this._backgroundTexture.texture,1,vo["a"]);const d=e.surface.baseOpacity;let h=!1,p=fh["z"].LINEAR_MIPMAP_LINEAR;for(let y=r;y>=0;y--){const t=MC(e,y,IC);t&&(y<i&&d<1&&!h&&(this._drawRasterData(this.applyOpacityTechnique,this._blackTex.texture,1,vo["a"],d),h=!0),0!==a[y]&&(Object(PS["o"])(t)?u=this._drawVectorData(this.blendLayersTechnique,t,o,a[y],s,l,u):Object(PS["g"])(t)?(this._drawImageryTileData(t,a[y]),this._hasNearestInterpolation(t)&&(p=fh["z"].NEAREST)):this._dataToTexture(t)&&this._drawRasterData(this.blendLayersTechnique,t.sourceLayerInfo.data.texture,t.scale,t.offset,a[y])))}const f=e.renderData.ensureTexture(s,()=>this._buildTexture(s,p)),b=c.bindTexture(f.texture,Qh["a"].TEXTURE_UNIT_FOR_UPDATES),m=f.descriptor;c.gl.copyTexImage2D(c.gl.TEXTURE_2D,0,m.pixelFormat,0,0,m.width,m.height,0),f.generateMipmap(),c.bindTexture(b,Qh["a"].TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(null),this._fboPool.release(l);const g=h?1:d;e.renderData.setTextureReference(new EC(f,t,DC,g,1,1,!1))}_drawQuad(e){this._rctx.bindVAO(this._vaoQuad),e.assertCompatibleVertexAttributeLocations(this._vaoQuad),this._rctx.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(this._vaoQuad,"geometry"))}_drawRasterData(e,t,r,i,n=1){if(Object(z["j"])(t))return;const a=this._rctx.useTechnique(e);a.bindTexture(t,"tex"),a.setUniform1f("scale",r),a.setUniform2f("offset",i[0],i[1]),a.setUniform1f("opacity",n),this._drawQuad(a)}_hasNearestInterpolation(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}_drawImageryTileData(e,t=1){const r=e.sourceLayerInfo.data;if(!r.source)return;e.tile.surface.layerViewByIndex(e.layerIndex,FE.MAP).ensureSymbolizerParameters(r);const i=this._getRasterColorizerTechnique(r),n=this._rctx,a=n.useTechnique(i);if(!r.bind(n))return;r.opacity=t,r.scale=e.scale,r.offset=e.offset;const{names:s,textures:o}=r.getTextures();s.forEach((e,t)=>a.bindTexture(o[t],e)),i.bindPass(r.getUniforms()),this._drawQuad(a),n.bindVAO()}_getRasterColorizerTechnique(e){const t=e.symbolizerParameters,r=["stretch","lut","hillshade"].indexOf(t.type);return Object(z["j"])(this._rasterColorizerConfig)&&(this._rasterColorizerConfig=new SC,this._rctx.gl.getExtension("WEBGL_color_buffer_float"),this._rctx.gl.getExtension("OES_texture_float")),this._rasterColorizerConfig.colorizerType=r,this._rasterColorizerConfig.applyColormap=!!t.colormap,this._rasterColorizerConfig.stretchType=e.hasStretchTypeNone()?mC["a"].Noop:mC["a"].PerBand,this._rasterColorizerTechnique=this._techniqueRepository.releaseAndAcquire(TC,this._rasterColorizerConfig,this._rasterColorizerTechnique),this._rasterColorizerTechnique}_drawVectorData(e,t,r,i,n,a,s){const o=this._rctx,c=t.sourceLayerInfo.data,l=t.tile.surface.layerViewByIndex(t.layerIndex,FE.MAP);let u;return e.bindPipelineState(o),i<1?(u=this._fboPool.acquire(n),o.bindFramebuffer(u),o.setClearColor(1,1,1,0),o.clearSafe(fh["e"].COLOR_BUFFER_BIT|fh["e"].DEPTH_BUFFER_BIT)):s&&o.clearSafe(fh["e"].DEPTH_BUFFER_BIT),this._vectorTileHelper.render(o,t.sourceLod,c,l.painter,l.layer.styleRepository,l.schemaHelper,Math.round(1/t.scale),t.offset,this.tileSize,r),!Object(z["k"])(u)||(o.bindFramebuffer(a),this._drawRasterData(e,u.colorTexture,1,[0,0],i),this._fboPool.release(u),s)}_dataToTexture(e){return Object(PS["i"])(e)&&this._rasterDataToTexture(e),Object(PS["k"])(e)}_rasterDataToTexture(e){const t=e.sourceLayerInfo;t.data=this._buildTexture(t.data),e.tile.setMemoryDirty()}setBackground(e,t){Object(z["r"])(this._backgroundTexture),this._backgroundIsGrid=t,e instanceof HTMLImageElement?(this._backgroundTexture=this._buildTexture(e),this._backgroundColor=null):(this._backgroundTexture=new zA(Object(Oh["a"])(this._rctx,Object(Xd["g"])(e[0]||0,e[1]||0,e[2]||0,1))),this._backgroundColor=Object(ju["h"])(e[0]||0,e[1]||0,e[2]||0))}_buildTexture(e,t=fh["z"].LINEAR_MIPMAP_LINEAR){if(Object(z["j"])(e))return null;const r={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:t,maxAnisotropy:this._maxAnisotropy,flipped:!0,hasMipmap:!0},i=this._rctx;let n;if("number"==typeof e)r.width=r.height=e,n=new zA(new Qh["a"](i,r));else if(e instanceof SS["a"])r.isOpaque=e.isOpaque,n=new zA(new Qh["a"](i,r,e.image)),e.release();else try{n=new zA(new Qh["a"](i,r,e))}catch(s){n=new zA(Object(Oh["c"])(i)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const a=i.bindTexture(n.texture,Qh["a"].TEXTURE_UNIT_FOR_UPDATES);return n.generateMipmap(),i.bindTexture(a,Qh["a"].TEXTURE_UNIT_FOR_UPDATES),n}_cleanupFBOPool(e,t){e===this._lastPixelRatio&&t===this._lastNumLayers||(this._fboPool.clear(),this._lastPixelRatio=e,this._lastNumLayers=t)}get test(){return{backgroundTexture:this._backgroundTexture}}}function RC(e){const t=Object(dr["n"])(e),r=t*t,i=e*e;if(r===i)return e;const n=t/2;return r-i<i-n*n?t:n}function MC(e,t,r){r.layerIndex=t;const i=e.layerInfo[FE.MAP][t];if(i.data)return Object(io["s"])(r.offset,0,0),r.tile=e,r.scale=1,r.sourceLod=e.lij,r.sourceLayerInfo=i,r;const n=i.upsampleInfo;if(n){const e=n.tile.layerInfo[FE.MAP][t];return r.tile=n.tile,Object(io["c"])(r.offset,n.offset),r.scale=n.scale,r.sourceLod=n.tile.lij,r.sourceLayerInfo=e,r}return null}const PC=new Array,IC={tile:null,sourceLayerInfo:null,sourceLod:null,offset:[0,0],scale:1,layerIndex:0},DC={offset:[0,0],scale:1},LC=40,NC=20,FC=.8,kC=15,UC=1e-6;function zC(e,t,r){const i=t,n=r;let a=0,s=1/0;for(let o=0;o<3;++o){{const t=e[o];if(i[o]<t){if(n[o]<=UC)return!1;const e=(t-i[o])/n[o];a=Math.max(a,e)}else if(n[o]<=-UC){const e=(t-i[o])/n[o];s=Math.min(s,e)}if(a>s)return!1}{const t=e[o+3];if(i[o]>t){if(n[o]>=-UC)return!1;const e=(t-i[o])/n[o];a=Math.max(a,e)}else if(n[o]>=UC){const e=(t-i[o])/n[o];s=Math.min(s,e)}if(a>s)return!1}}return!0}class BC{constructor(e,t,r,i,n){this.aabb=e,this.axis=t,this.d=r,this.midStartIndex=i,this.rightStartIndex=n}}class VC{constructor(e,t,r,i){this.globalTriangleVertexIndices=e,this.firstTriangleIndex=t,this.positionAttribute=i,this.rayDirection=Object(ju["f"])(),this.bspNodeTree=new Array,this.vertexPositionBuffer=i.data,this.vertexPositionStride=i.stride;const n=r-t,a=n<=JC?new Uint16Array(n):new Uint32Array(n);this.indices=a;for(let s=0;s<n;++s)a[s]=s;{const s=XC(e,t,r,i.data,i.stride),o=(e,t,r)=>{const i=$C(a,s,e,t),n=t-e;if(n<=NC){const r=new BC(i,void 0,0,e,t);return this.bspNodeTree.push(r),r}const{axis:c,midValue:l}=ZC(i),u=WC(a,s,e,t,c,l),d=(e,t)=>{if(r>kC)return;const i=t-e;return i<NC||i>=FC*n?void 0:o(e,t,r+1)},h=new BC(i,c,l,u.next,u.mid);return this.bspNodeTree.push(h),h.leftNode=d(e,u.next),h.rightNode=d(u.mid,t),h};o(0,n,0),this.triangleVertexIndices=YC(a,e,t,r)}}intersectRayTriangleRange(e,t){{if(e>=t)return;const r=this.triangleVertexIndices,i=this.positionAttribute.data,n=this.positionAttribute.stride,a=this.rayOrigin,s=a[0],o=a[1],c=a[2],l=this.rayDirection,u=l[0],d=l[1],h=l[2];for(let p=e,f=3*e;p<t;++p){const e=r[f]*n,t=i[e],a=i[e+1],l=i[e+2],b=r[f+1]*n,m=i[b],g=i[b+1],y=i[b+2],O=r[f+2]*n,v=i[O],_=i[O+1],j=i[O+2];f+=3;const w=m-t,x=g-a,T=y-l,S=v-t,E=_-a,A=j-l,C=d*A-E*h,R=h*S-A*u,M=u*E-S*d,P=w*C+x*R+T*M;if(Math.abs(P)<=Number.EPSILON)continue;const I=s-t,D=o-a,L=c-l,N=I*C+D*R+L*M;if(P>0){if(N<0||N>P)continue}else if(N>0||N<P)continue;const F=D*T-x*L,k=L*w-T*I,U=I*x-w*D,z=u*F+d*k+h*U;if(P>0){if(z<0||N+z>P)continue}else if(z>0||N+z<P)continue;const B=(S*F+E*k+A*U)/P;if(B>=0){const e=this.indices[p]+this.firstTriangleIndex,t=Object(iA["d"])(w,x,T,S,E,A,GC);this.callback(B,t,e,!1)}}}VC.numFacesTested+=t-e}intersectRay(e,t){VC.numFacesTested=0;const r=Object(ju["h"])(e.r0[0],e.r0[1],e.r0[2]),i=Object(ju["h"])(e.r1[0],e.r1[1],e.r1[2]),n=i[0]-r[0],a=i[1]-r[1],s=i[2]-r[2];if(n*n+a*a+s*s<UC)return;this.rayOrigin=r;const o=this.rayDirection;o[0]=n,o[1]=a,o[2]=s;const c=this.triangleVertexIndices.length/3;this.callback=t;const l=this.bspNodeTree[0];this.intersectRayBSP(l,0,c)}intersectRayBSP(e,t,r){const i=this.rayOrigin,n=this.rayDirection;if(!zC(e.aabb,i,n))return;const a=e.axis,s=e.d;if(i[a]<s||n[a]<0){const r=t,i=e.midStartIndex;if(r<i){const t=e.leftNode;void 0!==t?this.intersectRayBSP(t,r,i):this.intersectRayTriangleRange(r,i)}}if(this.intersectRayTriangleRange(e.midStartIndex,e.rightStartIndex),i[a]>s||n[a]>0){const t=e.rightStartIndex,i=r;if(t<i){const r=e.rightNode;void 0!==r?this.intersectRayBSP(r,t,i):this.intersectRayTriangleRange(t,i)}}}get estimatedMemoryUsage(){return this.triangleVertexIndices.byteLength+this.indices.byteLength}}VC.numFacesTested=0;const GC=Object(ju["f"])(),HC=[1/0,1/0,1/0],qC=[-1/0,-1/0,-1/0];function WC(e,t,r,i,n,a){let s=r,o=i;for(;s<o;){const r=e[s];t[6*r+n+3]<=a?++s:(--o,e[s]=e[o],e[o]=r)}let c=s;for(o=i;c<o;){const r=e[o-1];t[6*r+n]>=a?--o:(e[o-1]=e[c],e[c]=r,++c)}return{next:s,mid:c}}function $C(e,t,r,i){if(i<=r)return Object(Uj["t"])(NaN,NaN,NaN,NaN,NaN,NaN);{const i=6*e[r];for(let e=0;e<3;++e)HC[e]=t[i+0+e],qC[e]=t[i+3+e]}for(let n=r+1;n<i;++n){const r=6*e[n];for(let e=0;e<3;++e)HC[e]=Math.min(HC[e],t[r+0+e]),qC[e]=Math.max(qC[e],t[r+3+e])}return Object(Uj["t"])(HC[0],HC[1],HC[2],qC[0],qC[1],qC[2])}function ZC(e){const t=e[3]-e[0],r=e[4]-e[1],i=e[5]-e[2],n=t>r?t>i?0:r>i?1:2:r>i?1:i>t?2:0;return{axis:n,midValue:(e[n]+e[n+3])/2}}function XC(e,t,r,i,n){const a=r-t,s=new Float32Array(6*a);for(let o=0;o<a;++o){const r=3*(o+t),a=e[r+0]*n,c=e[r+1]*n,l=e[r+2]*n;for(let e=0;e<3;++e){const t=i[a+e],r=i[c+e],n=i[l+e];s[6*o+e]=Math.min(t,r,n),s[6*o+3+e]=Math.max(t,r,n)}}return s}function YC(e,t,r,i){const n=i-r;let a=0;for(let o=r;o<i;++o)for(let e=0;e<3;++e)a=Math.max(t[3*o+e],a);const s=a<=JC?new Uint16Array(3*n):new Uint32Array(3*n);for(let o=0;o<n;++o){const i=3*(e[o]+r);for(let e=0;e<3;++e){const r=t[i+e];s[3*o+e]=r}}return s}const JC=65535;var QC=r("a05b"),KC=r("d272"),eR=r("df77"),tR=r("cd26a"),rR=r("35b3"),iR=r("a7d7"),nR=r("572a"),aR=r("87b7");class sR extends uh["a"]{constructor(){super(...arguments),this.useStencil=!1}initializeProgram(e){const t=sR.shader.get(),r=this.configuration,i=t.build({overlayMode:r.overlayMode,output:r.output,viewingMode:e.viewingMode,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,textureFadingEnabled:r.textureFadingEnabled&&!r.renderOccluded,hasBackgroundColor:r.hasBackgroundColor,useGrid:r.useGrid,receiveShadows:r.receiveShadows&&!r.renderOccluded,receiveAmbientOcclusion:!1,atmosphere:r.atmosphere,tileBorders:r.tileBorders,screenSizePerspective:r.screenSizePerspective,pbrMode:iR["a"].Disabled,ssrEnabled:r.ssrEnabled,highStepCount:!1});return new ph["a"](e.rctx,i,hh["a"])}initializePipeline(){return this._stencilPipelineState=this._createPipeline(!0),this._createPipeline(!1)}_createPipeline(e){const t=this.configuration,r=t.backfaceCullingEnabled&&!t.renderOccluded;return Object(bh["g"])({blending:t.renderOccluded?Object(bh["i"])(fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA):null,culling:r&&bh["b"],depthTest:!t.renderOccluded&&{func:fh["h"].LESS},depthWrite:!t.renderOccluded&&bh["e"],colorWrite:bh["d"],stencilTest:e?Object(aR["c"])(LS["k"].IntegratedMeshMaskExcluded):null})}getPipelineState(e,t){return this.useStencil?this._stencilPipelineState:super.getPipelineState(e,t)}}sR.shader=new lh["a"](nR["a"],()=>r.e("chunk-2d0dacb2").then(r.bind(null,"6cb1")));class oR extends dh["a"]{constructor(){super(...arguments),this.output=QC["a"].Color,this.overlayMode=tR["b"].Disabled,this.atmosphere=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.backfaceCullingEnabled=!1,this.stencilEnabled=!1,this.textureFadingEnabled=!1,this.hasBackgroundColor=!1,this.useGrid=!1,this.renderOccluded=!1,this.ssrEnabled=!1,this.tileBorders=!1,this.screenSizePerspective=!1}}Object(l["a"])([Object(dh["b"])({count:QC["a"].COUNT})],oR.prototype,"output",void 0),Object(l["a"])([Object(dh["b"])({count:tR["b"].COUNT})],oR.prototype,"overlayMode",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"atmosphere",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"receiveShadows",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"slicePlaneEnabled",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"backfaceCullingEnabled",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"stencilEnabled",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"textureFadingEnabled",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"hasBackgroundColor",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"useGrid",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"renderOccluded",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"ssrEnabled",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"tileBorders",void 0),Object(l["a"])([Object(dh["b"])()],oR.prototype,"screenSizePerspective",void 0);const cR=7,lR=10,uR=Object(Uj["h"])(),dR=Object(Xd["e"])();let hR=class extends F["a"]{constructor(e){super(e),this.type=kT["b"].TERRAIN,this.isGround=!0,this.tileSize=256,this.rctx=null,this._isTransparent=!1,this._scaleRangeQueries=new bC,this.renderDataPool=new Bw["a"](pC),this._patchGroups=new Map,this.patchGroupsDirty=!0,this.tileIterator=new AA["b"],this.highestVisibleLODTile=null,this.visible=!0,this._opaque=!0,this._skirtScale=1,this._velvetOverground=!0,this.castShadows=!0,this._ssrEnabled=!1,this.emptyTex=null,this.tileRenderer=null,this.tileBackgroundInitialized=!1,this.tileBackgroundUpdating=!1,this.stencilEnabledLayerExtents=[],this.numTilesRendered=0,this.numTilesCulled=0,this.numOriginsRendered=0,this.overlayOpacity=1,this.needsHighlight=!1,this.renderOccludedFlags=rR["c"].Occlude}get isGlobal(){return this.stage.viewingMode===As["a"].Global}initialize(){const e=[Vp["a"].OPAQUE_TERRAIN,Vp["a"].TRANSPARENT_TERRAIN,Vp["a"].OCCLUDED_TERRAIN];this.stage.addRenderPlugin(e,this)}destroy(){this.stage.removeRenderPlugin(this),cA()}get updating(){return!this.tileBackgroundInitialized||this.tileBackgroundUpdating}get canRender(){return this.visible&&!!this._rootTiles&&this.tileBackgroundInitialized&&!this.renderingDisabled}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setNeedsRender()}set opaque(e){this._opaque!==e&&(this._opaque=e,this.setNeedsRender())}get opaque(){return this._opaque&&!this.shaderTechniqueConfig.slicePlaneEnabled}get needsLinearDepth(){return this.overlayRenderer.hasWater}set isTransparent(e){this._isTransparent!==e&&(this._isTransparent=e,this.setNeedsRender())}get isTransparent(){return this._isTransparent}set skirtScale(e){e!==this._skirtScale&&(this._skirtScale=e,this.setNeedsRender())}get skirtScale(){return this._skirtScale}get renderPatchBorders(){return!!this.shaderTechniqueConfig.tileBorders}set renderPatchBorders(e){this.shaderTechniqueConfig.tileBorders!==e&&(this.shaderTechniqueConfig.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get cullBackFaces(){return this.shaderTechniqueConfig.backfaceCullingEnabled}set cullBackFaces(e){this.shaderTechniqueConfig.backfaceCullingEnabled!==e&&(this.shaderTechniqueConfig.backfaceCullingEnabled=e,this.notifyChange("cullBackFaces"),this.setNeedsRender())}set renderOrder(e){this._set("renderOrder",e),this.setNeedsRender()}set velvetOverground(e){this._velvetOverground!==e&&(this._velvetOverground=e,this.setNeedsRender())}get layerUid(){return mE["b"]}get slicePlaneEnabled(){return this.shaderTechniqueConfig.slicePlaneEnabled}set slicePlaneEnabled(e){this.shaderTechniqueConfig.slicePlaneEnabled!==e&&(this.shaderTechniqueConfig.slicePlaneEnabled=e,this.setNeedsRender())}set textureFadingEnabled(e){this.shaderTechniqueConfig.textureFadingEnabled!==e&&(this.shaderTechniqueConfig.textureFadingEnabled=e,this.setNeedsRender())}setDebugScreenSizePerspective(e){this.shaderTechniqueConfig.screenSizePerspective!==e&&(this.shaderTechniqueConfig.screenSizePerspective=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setNeedsRender()}setNeedsHighlight(e){this.needsHighlight=e,this.setNeedsRender()}setRenderOccludedOverlay(e){this.renderOccludedFlags=e?VE["c"]:rR["c"].Occlude,this.setNeedsRender()}setStencilEnabledLayerExtents(e){this.stencilEnabledLayerExtents=e,this.setNeedsRender()}setTileSize(e){this.tileSize=e,this.tileRenderer&&(this.tileRenderer.tileSize=e),this.setNeedsRender()}loadTile(e){e.renderData||(e.renderData=this.renderDataPool.acquire(),e.renderData.init(e),e.renderData.localOrigin=this._getLocalOriginOfTile(e)),this.updateTileGeometry(e),this.updateTileTexture(e,BA.TEXTURE_FADING)}queryVisibleLevelRange(e,t,r,i){this._scaleRangeQueries.queryVisibleLevelRange(e,t,r,i),this.setNeedsRender()}updateTileTexture(e,t){this.tileRenderer&&this.tileBackgroundInitialized&&(this.tileRenderer.updateTileTexture(e,t===BA.TEXTURE_FADING?kE["e"].FADING:kE["e"].UNFADED),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometry(e){for(const t of e.layerInfo[FE.ELEVATION])t.pendingUpdates&=~BA.GEOMETRY;e.resetPendingUpdate(BA.GEOMETRY),e.renderData.updateGeometry(this.rctx,this.wireframe)&&this.setNeedsRender()}unloadTile(e){e.renderData&&(e.renderData.releaseGeometry()&&this.setNeedsRender(),this.renderDataPool.release(e.renderData),e.renderData.clear(),e.renderData=null,e.setMemoryDirty(),this.setNeedsRender())}_getLocalOriginOfTile(e){const t=lR-cR,r=Math.max(0,Math.floor((e.level-t)/cR)*cR);if(this.isGlobal&&0===r)return ju["c"];for(;e.parent&&e.level>r;)e=e.parent;return e.centerAtSeaLevel}setVisibility(e){this.visible=e,this.setNeedsRender()}getStats(){return{numTilesRendered:this.numTilesRendered,numTilesCulled:this.numTilesCulled,numOriginsRendered:this.numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.allTiles.forAll(t=>{var r;return null==(r=t.renderData)?void 0:r.updateGeometry(this.rctx,e)}),this.setNeedsRender())}setNeedsRender(e=LS["i"].UPDATE){this.patchGroupsDirty=!0,this.context.requestRender(e)}setTileBackground(e){this.tileBackground=e,this._updateTileBackground()}initializeRenderContext(e){this.context=e,this.rctx=e.renderContext.rctx,this.shaderTechniques=e.shaderTechniqueRepository,this.shaderTechniqueConfig=new oR,this.tileRenderer=new CC(this.rctx,this.tileSize,this.shaderTechniques),this.tileBackground&&this._updateTileBackground(),this.emptyTex=Object(Oh["c"])(this.rctx)}uninitializeRenderContext(){null!=this.emptyTex&&(this.emptyTex.dispose(),this.emptyTex=null),this.tileRenderer&&(this.tileRenderer.dispose(),this.tileRenderer=null)}intersect(e,t,r,i){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&!this._opaque)return;const n=gR,a=yR;Object($o["l"])(n,i,r),Object($o["y"])(a,1/n[0],1/n[1],1/n[2]);const s=e.results.min,o=e.results.max,c=e.results.ground,l=e.options.store===kT["c"].MIN,u=!!e.results.ground.target,d=Object(mE["e"])(e.verticalOffset),h=this._skirtScale,p=e.tolerance;let f,b=l&&Object(z["k"])(s.dist)?s.dist:1/0;const m=u=>{const m=u.renderData;if(null==m)return;const g=m.geometryInfo;Object(Uj["B"])(uR,g.boundingBox);const y=m.localOrigin;Object(z["k"])(d)&&(d.localOrigin=y,d.applyToAabb(uR));const O=-h*g.skirtLength;if(0!==O){const e=u.up;Object(Uj["p"])(uR,O*e[0],O*e[1],O*e[2])}const v=uR;if(OR[0]=r[0]-y[0],OR[1]=r[1]-y[1],OR[2]=r[2]-y[2],!Object(iA["g"])(v,OR,a,p,b))return;const _=(e,t,r)=>{e.set(this.type,u,t,r,Kd["a"]),b=l&&Object(z["k"])(s.dist)?s.dist:1/0},j=(a,l)=>{if(Object(z["k"])(l)&&a>=0&&(e.options.backfacesTerrain||Object($o["j"])(l,n)<0)&&(e.options.invisibleTerrain||!e.options.selectionMode||null==t||t(r,i,a))){if((null==c.dist||a<c.dist)&&_(c,a,l),e.options.isFiltered)return;e.options.store===kT["c"].ALL&&(Object(z["j"])(f)?(f=Object(cb["c"])(e.ray),_(f,a,l),e.results.all.push(f)):a<f.dist&&_(f,a,l)),(null==s.dist||a<s.dist)&&_(s,a,l),e.options.store!==kT["c"].MIN&&(null==o.dist||a>o.dist)&&_(o,a,l)}},w=vR;Object($o["l"])(w,i,y);const x=g.indices,T=g.vertexAttributes,S={data:T.getField(Yh["a"].POSITION,lC["u"]).typedBuffer,size:3,stride:T.stride/4},E=g.numWithoutSkirtIndices/3;if(!Object(z["k"])(d)&&E>LC){const e=u.renderData;Object(z["k"])(e.intersectionData)||(e.intersectionData=new VC(x,0,E,S)),e.intersectionData.intersectRay({r0:OR,r1:w},j)}else Object(iA["j"])(OR,w,0,E,x,S,null,d,j);if(0!==O){const e=x.length/3;if(this.isGlobal){const t=e-E;if(!Object(z["k"])(d)&&t>LC){const r=u.renderData;if(!Object(z["k"])(r.skirtIntersectionData)){const i=_A(x,E,e,T,O,y);r.skirtIntersectionData=new VC(i.indices,0,t,{data:i.vertices,stride:3})}r.skirtIntersectionData.intersectRay({r0:OR,r1:w},j)}else vA(OR,w,E,e,x,T,O,y,d,j)}else jA(OR,w,E,e,x,T,O,d,j)}},g=this._rootTiles;Object(z["k"])(g)&&(()=>{const t=this.tileIterator;t.reset(g);const i=e.options.invisibleTerrain;for(;!t.done;){const e=t.next();!(e.visible||i&&e.intersectsClippingArea)||!Object(z["k"])(d)&&!e.intersectsRay(r,n,p,b,h)||u&&this._useStencilForTile(e)?t.skipSubtree():m(e)}})()}prepareTechnique(e){if(e.slot===Vp["a"].OCCLUDED_TERRAIN){if(0==(e.renderOccludedMask&VE["c"]))return null}else{const t=this.opaque?Vp["a"].OPAQUE_TERRAIN:Vp["a"].TRANSPARENT_TERRAIN;if(e.slot!==t)return null}switch(e.pass){case Bp["a"].MATERIAL:{const t=e.shadowMap&&e.shadowMap.enabled;this.shaderTechniqueConfig.receiveShadows!==t&&(this.shaderTechniqueConfig.receiveShadows=t);const r=this.overlayRenderer.isEmpty()?tR["b"].Disabled:this.overlayRenderer.hasWater?tR["b"].EnabledWithWater:tR["b"].Enabled;this.shaderTechniqueConfig.overlayMode!==r&&(this.shaderTechniqueConfig.overlayMode=r);const i=e.slot===Vp["a"].OCCLUDED_TERRAIN?BE["b"].Occluded:BE["b"].ColorAndWater;return this._updateTechnique(QC["a"].Color,i===BE["b"].Occluded)}case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL:case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT:return this.castShadows&&1===e.scenelightingData.globalFactor?this._updateTechnique(QC["a"].Shadow,!1):null;case Bp["a"].MATERIAL_DEPTH:return this.isTransparent&&this.overlayRenderer.isEmpty()?null:this._updateTechnique(QC["a"].Depth,!1);case Bp["a"].MATERIAL_NORMAL:return this._updateTechnique(QC["a"].Normal,!1);case Bp["a"].MATERIAL_HIGHLIGHT:return this.needsHighlight?this._updateTechnique(QC["a"].Highlight,!1):null}return null}render(e,t){const r=e.pass,i=1===e.scenelightingData.globalFactor;switch(this._updatePatchGroups(),t.useStencil=!1,r){case Bp["a"].MATERIAL:{const r=e.slot===Vp["a"].OCCLUDED_TERRAIN?BE["b"].Occluded:BE["b"].ColorAndWater;this._renderMaterialPass(e,t,r);break}case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL:case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT:this.castShadows&&i&&this._renderAuxiliaryPass(e,t,BE["b"].None);break;case Bp["a"].MATERIAL_DEPTH:this.isTransparent&&this.overlayRenderer.isEmpty()||this._renderAuxiliaryPass(e,t,BE["b"].None);break;case Bp["a"].MATERIAL_NORMAL:this._renderAuxiliaryPass(e,t,BE["b"].None);break;case Bp["a"].MATERIAL_HIGHLIGHT:this.needsHighlight&&(this._renderAuxiliaryPass(e,t,BE["b"].Highlight),e.rctx.clearSafe(fh["e"].DEPTH_BUFFER_BIT))}this._scaleRangeQueries.hasPendingQueries()&&this.setNeedsRender()}_renderMaterialPass(e,t,r){const{rctx:i,camera:n}=e;this._ssrEnabled=e.ssrParams.ssrEnabled;const a=i.useTechnique(t,e.slot);this.shaderTechniqueConfig.overlayMode!==tR["b"].Disabled&&r===BE["b"].ColorAndWater&&e.ssrParams&&Object(eR["b"])(a,e.ssrParams),e.shadowMap.bind(a),e.ssaoHelper.bind(a,e.camera),this._bindOverlayData(a,r),a.setUniformMatrix4fv("viewNormal",n.viewInverseTransposeMatrix),Object(Zh["b"])(a,n.projectionMatrix),e.scenelightingData.setUniforms(a,!0,!1);const s=n.viewMatrix;Object($o["y"])(mR,s[12],s[13],s[14]),Object($o["t"])(mR,mR),a.setUniform3fv("viewDirection",mR),this.numTilesRendered=0,this.numTilesCulled=0,this.numOriginsRendered=0,this._scaleRangeQueries.prepareQueries(),this.opaque?this._renderPatchGroups(e,t,r):e.offscreenRenderingHelper.renderToTargets(()=>this._renderPatchGroups(e,t,r),e.offscreenRenderingHelper.tmpColor,e.offscreenRenderingHelper.mainDepth,[0,0,0,0]),this._scaleRangeQueries.processQueries()}_renderAuxiliaryPass(e,t,r){const i=e.rctx.useTechnique(t,e.slot);if(e.pass===Bp["a"].MATERIAL_HIGHLIGHT){const t=e.offscreenRenderingHelper;i.bindTexture(t.depthTexture,"depthTex"),i.setUniform4f("highlightViewportPixelSz",0,0,1/t.width,1/t.height)}else i.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),e.pass!==Bp["a"].MATERIAL_DEPTH&&e.pass!==Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL&&e.pass!==Bp["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT||i.setUniform2fv("nearFar",e.camera.nearFar);this._renderPatchGroupsAuxiliary(e,t,r)}_updateTileBackground(){if(!this.tileRenderer)return;this.tileBackgroundUpdating=!0;const e=()=>{this.tileBackgroundInitialized=!0,this.tileBackgroundUpdating=!1,this.shaderTechniqueConfig.useGrid=this.tileRenderer.backgroundIsGrid,this.shaderTechniqueConfig.hasBackgroundColor=!this.tileRenderer.backgroundIsGrid&&!!Object(z["k"])(this.tileRenderer.backgroundColor),this.allTiles.forAll(e=>this.tileRenderer.updateTileTexture(e,kE["e"].FADING)),this.setNeedsRender()};if("string"==typeof this.tileBackground){const t=this.tileBackground;Object(Bh["a"])(t).then(r=>{t===this.tileBackground&&this.tileRenderer&&(this.tileRenderer.setBackground(r,this.tileBackground===Mu["a"]),e())})}else{const t=this.tileBackground?d["a"].toUnitRGBA(this.tileBackground):[0,0,0,0];this.tileRenderer.setBackground(t,!1),e()}}_updatePatchGroups(){if(this.patchGroupsDirty){if(this.highestVisibleLODTile=null,this._rebuildPatchGroups(),this.renderOrder!==iC.NONE){const e=Array.from(this._patchGroups.values());e.forEach(e=>Object(AA["g"])(this.renderOrder,e)),e.sort((e,t)=>Object(AA["c"])(e[0],t[0],this.renderOrder)),this._patchGroups=new Map(e.map(e=>[e[0].renderData.localOrigin,e]))}this.patchGroupsDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(!Object(z["j"])(e)){this._patchGroups.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this.tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),r=e.renderData;if(!r||e.visible)if(e.rendered){if(r){const i=this._patchGroups.get(r.localOrigin)||new Array;this._patchGroups.set(r.localOrigin,i),i.push(e),(!this.highestVisibleLODTile||e.vlevel>this.highestVisibleLODTile.vlevel)&&(this.highestVisibleLODTile=e),t.skipSubtree()}}else this.numTilesCulled++;else this.numTilesCulled++,t.skipSubtree()}}_useStencilForTile(e){for(const t of this.stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderPatchGroupsAuxiliary(e,t,r){t.program.setUniformMatrix4fv("proj",e.camera.projectionMatrix),t.program.setUniform1f("skirtScale",this._skirtScale),r!==BE["b"].None&&this._bindOverlayData(t.program,r);const i=this.stencilEnabledLayerExtents.length>0;this._patchGroups.forEach(n=>{const a=n[0].renderData.localOrigin;this._bindPatchGroupData(t.program,a,e.camera.eye,e.camera.viewMatrix);for(let s=0;s<n.length;s++)this._renderPatch(e,t,n[s],fh["r"].TRIANGLES,i,r)}),e.rctx.bindVAO(null)}_renderPatchGroups(e,t,r){const i=e.rctx,n=e.camera,a=n.viewMatrix,s=t.program;if(this.shaderTechniqueConfig.screenSizePerspective&&this.pointsOfInterest){const e=Object(tj["d"])(this.stage.viewingMode,this.ellipsoidRadius),t=this.pointsOfInterest.centerOnSurfaceFrequent.distance;e.update({distance:t,fovY:n.fovY}),Object(iA["a"])(e,s,"screenSizePerspective")}const o=this.stencilEnabledLayerExtents.length>0,c=r===BE["b"].Occluded;c&&(s.bindTexture(this.emptyTex,"tex"),s.setUniform1f("blend",1),s.setUniform4fv("texOffsetAndScale",Xd["b"]));const l=Object(z["k"])(this.tileRenderer.backgroundColor)?this.tileRenderer.backgroundColor:ju["c"];this.shaderTechniqueConfig.hasBackgroundColor&&s.setUniform3fv("backgroundColor",l);const u=c?0:this._skirtScale;s.setUniform1f("skirtScale",u);const d=this.wireframe?fh["r"].LINES:fh["r"].TRIANGLES;this.shaderTechniqueConfig.textureFadingEnabled&&s.bindTexture(this.emptyTex,"texNext"),this._patchGroups.forEach(i=>{const l=i[0].renderData.localOrigin;this._bindPatchGroupData(s,l,n.eye,a);const u=e.sliceHelper&&e.sliceHelper.plane;Object(KC["b"])(s,t.configuration,u,{origin:l}),e.shadowMap&&e.shadowMap.bindView(s,l),this.numOriginsRendered++;for(let n=0;n<i.length;n++){const a=i[n],l=a.renderData.textureReference;if(!Object(z["j"])(l)){if(!c){this._scaleRangeQueries.scaleQueriesForTile(a),fR(a.renderData.geometryInfo.uvOffsetAndScale,l.offsetAndScale,dR),s.setUniform4fv("texOffsetAndScale",dR),s.bindTexture(l.texture.texture,"tex");const e=a.renderData.textureFadeFactor,t=e<1?a.renderData.nextTextureReference:null;this.shaderTechniqueConfig.textureFadingEnabled&&Object(z["k"])(t)&&e<1?(fR(a.renderData.geometryInfo.uvOffsetAndScale,t.offsetAndScale,dR),s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",dR),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture(t.texture.texture,"texNext")):s.setUniform1f("fadeFactor",1),a.renderData.textureIsFading&&this.setNeedsRender(),s.setUniform3fv("textureOpacities",l.opacities)}this._renderPatch(e,t,a,d,o,r),a.renderOrder=this.numTilesRendered,this.numTilesRendered++}}}),i.bindVAO(null)}_renderPatch(e,t,r,i,n,a){if(Object(z["j"])(r.renderData.vao.indexBuffer))return;const s=t.program;a!==BE["b"].None&&this._bindOverlayPatchData(s,r.renderData.overlay),n&&(t.useStencil=this._useStencilForTile(r),t.bindPipelineState(e.rctx,e.slot));const o=0===this._skirtScale?r.renderData.geometryInfo.numWithoutSkirtIndices:r.renderData.vao.indexBuffer.size;e.rctx.bindVAO(r.renderData.vao),s.assertCompatibleVertexAttributeLocations(r.renderData.vao),e.rctx.drawElements(i,o,r.renderData.vao.indexBuffer.indexType,0)}_bindPatchGroupData(e,t,r,i){e.setUniform3fv("origin",t),Object(Qd["k"])(bR,i,t),e.setUniformMatrix4fv("view",bR),e.setUniform3f("cameraPosition",r[0]-t[0],r[1]-t[1],r[2]-t[2])}_bindOverlayData(e,t){if(this.shaderTechniqueConfig.overlayMode===tR["b"].Disabled)return;e.setUniform1f("overlayOpacity",this.overlayOpacity);const r=this.overlayRenderer.overlays;if(r.length>kE["b"].INNER){const i=r[kE["b"].INNER],n=i.getColorTexture(t);if(e.bindTexture(Object(z["k"])(n)?n:this.emptyTex,"ovColorTex"),this.shaderTechniqueConfig.overlayMode===tR["b"].EnabledWithWater){const r=i.getNormalTexture(t);e.bindTexture(Object(z["k"])(r)?r:this.emptyTex,"ovWaterTex")}}}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_updateTechnique(e,t){return this.shaderTechniqueConfig.output=e,e===QC["a"].Color&&(this.shaderTechniqueConfig.atmosphere=this.isGlobal&&this._velvetOverground,this.shaderTechniqueConfig.ssrEnabled=this._ssrEnabled),this.shaderTechniqueConfig.renderOccluded=t,this.shaderTechniqueConfig.stencilEnabled=!1,this._shaderTechnique=this.shaderTechniques.releaseAndAcquire(sR,this.shaderTechniqueConfig,this._shaderTechnique),this._shaderTechnique}get test(){return{tileRenderer:this.tileRenderer}}};Object(l["a"])([Object(j["b"])()],hR.prototype,"tileBackgroundInitialized",void 0),Object(l["a"])([Object(j["b"])()],hR.prototype,"tileBackgroundUpdating",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],hR.prototype,"overlayRenderer",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],hR.prototype,"stage",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],hR.prototype,"isGlobal",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],hR.prototype,"allTiles",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],hR.prototype,"ellipsoidRadius",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],hR.prototype,"updating",null),Object(l["a"])([Object(j["b"])({value:!1})],hR.prototype,"renderingDisabled",null),Object(l["a"])([Object(j["b"])()],hR.prototype,"renderPatchBorders",null),Object(l["a"])([Object(j["b"])()],hR.prototype,"cullBackFaces",null),Object(l["a"])([Object(j["b"])({value:iC.FRONT_TO_BACK})],hR.prototype,"renderOrder",null),Object(l["a"])([Object(j["b"])()],hR.prototype,"wireframe",null),hR=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.TerrainRenderer")],hR);const pR=hR;function fR(e,t,r){r[0]=e[0]*t[2]+t[0],r[1]=e[1]*t[3]+t[1],r[2]=e[2]*t[2],r[3]=e[3]*t[3]}const bR=Object(Kd["d"])(),mR=Object(ju["f"])(),gR=Object(ju["f"])(),yR=Object(ju["f"])(),OR=Object(ju["f"])(),vR=Object(ju["f"])();class _R{constructor(){this.numNodes=0,this.numLeaves=0,this.numVisible=0,this.numRendered=0,this.numSplit=0,this.numMerged=0,this.numRenderedPerLevel=new Array,this.numLoadedPerLevel=new Array}}var jR=r("ee83");let wR=class extends F["a"]{constructor(e){super(e),this._handles=new ge["a"]}initialize(){this._handles.add(this.layers.on("change",()=>this._update())),this._handles.add(this.extentHelper.watch("layerViewsExtent",()=>this._setAdHocTilingScheme())),this._update(),this.tilingSchemeLocked||this._setAdHocTilingScheme()}destroy(){this._handles=Object(z["d"])(this._handles),this._waitTask=null}_update(){if(this._waitTask=null,this.tilingSchemeLocked)return;let e;if(this.layers.some(t=>!(!Object(Au["e"])(t)||t.isRejected())&&!(t.isFulfilled()&&!xR(t,this.viewSpatialReference,this.viewingMode))&&(e=t,!Object(PS["m"])(t)&&!Object(PS["h"])(t))),e)if(e.isResolved()){const t=Object(PS["d"])(e,this.viewSpatialReference,this.viewingMode);if(Object(z["k"])(t)){const e=new jR["a"](t.tileInfo);this._lockTilingScheme(e)}}else this._updateWhen(e)}_updateWhen(e){const t=e.when().catch(()=>{}).then(()=>{t!==this._waitTask||this.destroyed||this._update()});this._waitTask=t}_lockTilingScheme(e){if(this.viewingMode===As["a"].Global){const t=e.levels.length-1;e.spatialReference.isWebMercator?e=jR["a"].makeWebMercatorAuxiliarySphere(t):Object(pe["a"])(e.spatialReference)&&(e=jR["a"].makeGCSWithTileSize(e.spatialReference,e.pixelSize,t))}this.tilingSchemeLocked=!0,this.tilingScheme=e,this.extentHelper.tilingScheme=this.tilingScheme,this._updateTiledLayerExtent(),this._handles.removeAll(),this._handles.add(this.extentHelper.watch("tiledLayersExtent",()=>this._updateTiledLayerExtent()))}_updateTiledLayerExtent(){this._set("extent",this.extentHelper.tiledLayersExtent)}_setAdHocTilingScheme(){if(this.viewingMode===As["a"].Global){const e=this.extentHelper.viewSpatialReference,t=Object(pe["a"])(e)||Object(fe["i"])(e)||Object(fe["j"])(e);e.isWebMercator?this.tilingScheme=jR["a"].WebMercatorAuxiliarySphere:t&&(this.tilingScheme=jR["a"].makeGCSWithTileSize(e,256)),this._set("extent",this.extentHelper.layerViewsExtent)}else{const e=this.extentHelper.layerViewsExtent;Object(z["k"])(e)&&!Object(wu["o"])(e,this.extent)&&(this.tilingScheme=jR["a"].fromExtent(e,this.extentHelper.viewSpatialReference),this._set("extent",e))}}get test(){return{lockTilingScheme:e=>this._lockTilingScheme(e),done:!this._waitTask}}};function xR(e,t,r){return Object(z["k"])(Object(PS["d"])(e,t,r))}Object(l["a"])([Object(j["b"])()],wR.prototype,"tilingScheme",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],wR.prototype,"extent",void 0),Object(l["a"])([Object(j["b"])({value:!1})],wR.prototype,"tilingSchemeLocked",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],wR.prototype,"viewSpatialReference",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],wR.prototype,"layers",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],wR.prototype,"extentHelper",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],wR.prototype,"viewingMode",void 0),wR=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.TilingSchemeLogic")],wR);class TR{constructor(){this.offset=Object(vo["b"])(),this.scale=0,this.tile=null}init(e,t,r,i){this.tile=e,this.offset[0]=t,this.offset[1]=r,this.scale=i}dispose(){this.tile=null,this.offset[0]=0,this.offset[1]=0,this.scale=0}}const SR=v["a"].getLogger("esri.views.3d.terrain.TerrainSurface"),ER=.25;let AR=class extends(U["a"].EventedMixin(F["a"])){constructor(e){super(e),this._elevationBounds=new CE,this._iteratorPool=new Bw["a"](AA["b"],e=>e.remove=()=>this._iteratorPool.release(e)),this._postorderIterator=new AA["a"],this._hasPendingUpdates=!1,this._pendingUpdates=0,this._asyncWorkItems=0,this._allTilesDirty=!0,this._allTilesSorted=!0,this._visible=!1,this._usedMemory=IR,this._performanceInfo=new _R,this._viewChanged=!1,this._inFrameTask=!1,this._viewChangeUpdateDirty=!1,this._eyePosRenderSR=Object(ju["f"])(),this._eyePosSurfaceSR=Object(ju["f"])(),this._splitLimits=new WA,this._snapLevel=1/0,this._frustum=Object(Uw["f"])(),this._viewProjectionMatrix=Object(Kd["d"])(),this._layerViews=[new Array,new Array],this._layerIndexByUid=[new Map,new Map],this._basemapLayerViewHandles=new Map,this._handles=new ge["a"],this._watchUpdatingTracking=new Se["a"],this._frameTask=Ba["a"],this._allTiles=new k_["a"],this._upsampleInfoPool=new Bw["a"](TR),this._rootTilesExtent=Object(wu["l"])(),this._maxNumUpdating=1,this.maxTextureScale=1.2,this.backgroundImage=Mu["a"],this.backgroundColor=null,this._layerViewsDirty=!1}initialize(){this._lercDecoder=Object(TE["a"])(this.view.resourceController),this._tilePool=this.view.state.isLocal?new Bw["a"](tC):new Bw["a"](nC);const e=this.view.resourceController.memoryController;this._upsampleMapCache=e.newCache("esri.views.3d.terrain.upsample",e=>e.unloadMapData()),this._elevationQueryCache=new xE(e.newCache("elevation-query")),this._set("overlayManager",new $E({surface:this})),this._handles.add([this.watch("overlayManager.hasHighlights",e=>this._renderer.setNeedsHighlight(e)),this.watch("overlayManager.rendersOccluded",e=>this._renderer.setRenderOccludedOverlay(e))],"overlayManager"),this._renderer=new pR({overlayRenderer:this.overlayManager.renderer,ellipsoidRadius:Object(Yd["e"])(this.view.spatialReference).radius,stage:this.view._stage,allTiles:this._allTiles}),this._handles.add([Object(Me["a"])(this,"baseOpacity",e=>{this._handleLayerViewChanges(),this._updateBaseOpacity(e)},!0),Object(Me["a"])(this,"_background",()=>{this._handleLayerViewChanges(),this._renderer.setTileBackground(this._background)},!0),this.view.watch("pointsOfInterest",e=>{this._renderer.pointsOfInterest=e,this._watchUpdatingTracking.removeAll(),e&&this._watchUpdatingTracking.add(()=>e.focus.renderLocation,()=>()=>this._allTilesSorted=!1)}),Object(Me["a"])(z_["a"],"TERRAIN_TILE_TREE_SHOW_TILES",e=>{e&&!this._treeDebugger?r.e("chunk-5d24f1e4").then(r.bind(null,"2944")).then(({TerrainTileTree3DDebugger:e})=>{!this._treeDebugger&&z_["a"].TERRAIN_TILE_TREE_SHOW_TILES&&(this._treeDebugger=new e({view:this.view}))}):e||(this._treeDebugger=Object(z["d"])(this._treeDebugger))})]),this._extentHelper=IE(this.viewingMode,{layers:this.view.map.allLayers,layerViews:this.view.allLayerViews,viewSpatialReference:this.view.spatialReference});const t=this.view.defaultsFromMap?new k["a"]({getCollections:()=>{var e,t,r;return null==(e=this.view)||null==(t=e.defaultsFromMap)||null==(r=t.mapCollections)?void 0:r.map(({layers:e})=>e)},getChildrenFunction:e=>e&&"layers"in e?e.layers:null}):this.view.map.allLayers,i=new wR({layers:t,extentHelper:this._extentHelper,viewingMode:this.viewingMode,viewSpatialReference:this.view.spatialReference});this._set("tilingSchemeLogic",i),this._updateTilingScheme(),this._elevationDataRequester=this.view.resourceController.createStreamDataRequester(bS["a"].ELEVATION),this._mapDataRequester=this.view.resourceController.createStreamDataRequester(bS["a"].BASEMAP);const n=this.view.resourceController.scheduler;this._frameTask=n.registerTask(Ba["c"].TERRAIN_SURFACE,this),this.view.resourceController.memoryController.events.on("quality-changed",()=>this._viewChangeUpdate()),this._handles.add([Object(Me["a"])(this._extentHelper,"stencilEnabledExtents",e=>this._renderer.setStencilEnabledLayerExtents(e)),this.tilingSchemeLogic.watch("tilingScheme",()=>this._updateTilingScheme(),!0),Object(Me["a"])(this,"extent",()=>this._updateRootTiles()),this.view.on("resize",()=>this._viewChangeUpdate()),this.view.watch("state.camera",()=>this._viewChangeUpdate(),!0),this.view.watch("state.contentCamera",()=>this.view.state.fixedContentCamera&&this._viewChangeUpdate(),!0),this.view.watch("qualitySettings.tiledSurface.lodBias",()=>this._viewChangeUpdate()),Object(Me["a"])(this.view,"qualitySettings.tiledSurface.textureFadeDuration",e=>this._renderer.textureFadingEnabled=e>0),this.view.watch("lodSnapping",()=>this._viewChangeUpdate()),Object(oe["e"])(()=>this._userClippingExtent,()=>this._updateClippingExtent(),oe["c"])]),this._handles.add(this.view.allLayerViews.on("after-changes",()=>this._layerViewsDirty=!0)),this._layerViewsDirty=!0,this._handleLayerViewChanges()}destroy(){this._frameTask.remove(),this._handles.destroy(),this._watchUpdatingTracking.destroy(),this._lercDecoder=Object(z["r"])(this._lercDecoder),this._removeAllTiles(),this._upsampleMapCache=Object(z["d"])(this._upsampleMapCache),this._elevationQueryCache=Object(z["d"])(this._elevationQueryCache),this._set("tilingSchemeLogic",Object(z["d"])(this.tilingSchemeLogic)),this._extentHelper=Object(z["d"])(this._extentHelper),this._basemapLayerViewHandles.forEach((e,t)=>this._unregisterTiledLayerView(t)),this._elevationDataRequester=null,this._mapDataRequester=null,this._set("overlayManager",Object(z["d"])(this.overlayManager)),this._tilePool=Object(z["d"])(this._tilePool),$A.prune(),this._treeDebugger&&(this._treeDebugger.destroy(),this._treeDebugger=null),this._renderer=Object(z["d"])(this._renderer),this._iteratorPool=Object(z["d"])(this._iteratorPool),this._set("view",null),this._upsampleInfoPool=Object(z["d"])(this._upsampleInfoPool),Object(SE["b"])(),UA()}get renderer(){return this._renderer}get frustum(){return this._frustum}get snapLevel(){var e,t;const r=null==(e=this.view.pointsOfInterest)||null==(t=e.contentCameraOnSurface)?void 0:t.scale;if(r){const e=this.view.state.contentCamera;let t=mv(this.view,e.eye,e.viewForward,e.up).tilt;t>90&&(t=180-t);const i=2*(t/90)**2,n=Iv(this.view,r)-i;Math.abs(this._snapLevel-n)>ER&&(Math.round(n)!==Math.round(this._snapLevel)&&(this._viewChanged=!0),this._snapLevel=n)}return Math.round(this._snapLevel)}get lodSnapping(){return this.view.qualitySettings.tiledSurface.reduceTileLevelDifferences?kE["a"].ON:kE["a"].OFF}get upsampleInfoPool(){return this._upsampleInfoPool}get upsampleMapCache(){return this._upsampleMapCache}get elevationQueryCache(){return this._elevationQueryCache}get mapTileRequester(){return this._mapDataRequester}get _userClippingExtent(){const{spatialReference:e}=this,{clippingArea:t}=this.view;if(Object(z["j"])(t)||Object(z["j"])(e))return null;const r=Object(wu["l"])(),i=Object(dx["b"])(t,r,e)?r:null,n=this._get("extent");return Object(wu["o"])(i,n)?n:i}get extent(){const e=Object(wu["v"])(this.groundExtent,this._userClippingExtent,Object(wu["l"])()),t=this._get("extent");return Object(wu["o"])(e,t)?t:e}get groundExtent(){return Object(z["k"])(this._tilingSchemeExtent)?this._tilingSchemeExtent:this._rootTilesExtent}get _tilingSchemeExtent(){var e;return null==(e=this.tilingSchemeLogic)?void 0:e.extent}get updating(){return this._hasPendingUpdates||(this._maxNumUpdating=1),!!((this._watchUpdatingTracking.updating||this._hasPendingUpdates||this._viewChanged||this._allTilesDirty||this._asyncWorkItems>0||!this._allTilesSorted||this._renderer.updating||this._layerViewsDirty)&&this.ready&&!this.suspended||this.overlayManager.updating||this._frameTask.updating)}get updatingProgressValue(){return this._maxNumUpdating=Math.max(this._pendingUpdates,this._maxNumUpdating),1-this._pendingUpdates/this._maxNumUpdating}get viewingMode(){return this.view.state.viewingMode}get ready(){return Object(z["k"])(this.rootTiles)}set renderOrder(e){this._renderer.renderOrder=e,this._set("renderOrder",e)}set skirtScale(e){this._renderer.skirtScale=e}get skirtScale(){return this._renderer.skirtScale}get spatialReference(){var e,t;return null!=(e=null==(t=this.tilingScheme)?void 0:t.spatialReference)?e:null}get _background(){return null!=this.backgroundColor?this.backgroundColor:this.backgroundImage}set slicePlaneEnabled(e){var t,r;this._renderer.slicePlaneEnabled=e,this._set("slicePlaneEnabled",e),null==(t=this.view)||null==(r=t._stage)||r.renderView.setRenderParameters({opaqueTerrain:this.opaque})}set velvetOverground(e){e!==this.velvetOverground&&(this._renderer.velvetOverground=e),this._set("velvetOverground",e)}set visible(e){e!==this._visible&&(this._visible=e,this._renderer.setVisibility(e),this.suspended=!e)}get opaque(){return this._renderer.opaque}set suspended(e){this._set("suspended",e),this._viewChangeUpdate()}intersect(e,t,r,i){this._renderer.intersect(e,t,r,i)}getElevation(e,t,r,i){const n=this.getTileWithElevation(e,t,r,i,DR);return Object(z["j"])(n)?null:ME(DR[0],DR[1],n.renderData.geometryState.samplerData)}getTileWithElevation(e,t,r,i,n=DR){var a;const s=this.rootTiles;if(Object(z["j"])(s)||!s.length)return null;if(0===s[0].layerInfo[FE.ELEVATION].length)return null;if(n[0]=e,n[1]=t,n[2]=r,!Object(pe["y"])(n,i,n,null==(a=this.tilingScheme)?void 0:a.spatialReference))return SR.error("TerrainSurface.getElevation(): could not project given point to tiling scheme coordinate system"),null;for(let o of s){if(!o.containsPoint(n))continue;for(;o&&!o.rendered&&!o.isLeaf;){let e=0;n[0]>.5*(o.extent[0]+o.extent[2])&&(e+=1),n[1]<.5*(o.extent[1]+o.extent[3])&&(e+=2),o=o.children[e]}const e=o.renderData;return e&&e.geometryState.samplerData?o:null}return null}get elevationBounds(){return this._elevationBounds}getScale(e){if(this.tilingScheme){if(!Object(pe["t"])(e,DR,this.spatialReference))return SR.error("TerrainSurface.getScale(): could not project given point to tiling scheme coordinate system"),null;const t=this.rootTiles;if(Object(z["k"])(t))for(let e of t)if(e.containsPoint(DR)){for(;null!=e.children[0];){let t=0;DR[0]>e.children[0].extent[2]&&(t+=1),DR[1]<e.children[0].extent[1]&&(t+=2),e=e.children[t]}return this._getLodBiasCorrectedScale(e.level)}}return 1e100}getSphereScale(e,t){if(!this.tilingScheme)return null;if(!Object(pe["t"])(e,DR,this.spatialReference))return SR.error("TerrainSurface.getSphereScale(): could not project given point to tiling scheme coordinate system"),null;DR[3]=t;let r=null;const i=e=>{if(e&&Object(wu["y"])(e.extent,DR))if(null!=e.children[0])for(const t of e.children)i(t);else{const t=this._getLodBiasCorrectedScale(e.level);r=null==r?t:Math.min(r,t)}},n=this.rootTiles;if(Object(z["k"])(n))for(const a of n)i(a);return r}queryVisibleScaleRange(e,t,r,i){const n=t?this.tilingScheme.levelAtScale(t):0,a=r?this.tilingScheme.levelAtScale(r):1/0,s=this.lodBias;this._renderer.queryVisibleLevelRange(e,n+s,a+s,i)}_updateBaseOpacity(e){const t=this._renderer.opaque;this._renderer.opaque=e>=1,this._renderer.isTransparent=this._allTransparentSurfaceLayers();const r=t===this._renderer.opaque?kE["e"].UNFADED:kE["e"].IMMEDIATE;var i,n;r===kE["e"].IMMEDIATE&&(null==(i=this.view)||null==(n=i._stage)||n.renderView.setRenderParameters({opaqueTerrain:this.opaque})),this._updateTileTextures(r)}_updateTilingScheme(){const e=this.tilingSchemeLogic.tilingScheme;e!==this.tilingScheme&&(Object(PS["t"])(!!e,"tiling scheme cannot be reset to undefined"),this.tilingScheme&&this._removeAllTiles(),this._set("tilingScheme",e),this._updateClippingExtent(),e&&(this._updateTiledLayers(),this._renderer.setTileSize(e.pixelSize),this.overlayManager.setSpatialReference(e.spatialReference),this._updateRootTiles()))}_acquireTile(e,t,r,i){const n=this._tilePool.acquire();return NR[0]=e,NR[1]=t,NR[2]=r,n.init(NR,i,this),n}_updateRootTiles(){const{extent:e,tilingScheme:t}=this;if(!t)return;const r=LR;let i=t.rootTilesInExtent(e,r,5*Mu["g"]);if(Object(z["k"])(this.rootTiles)){if(i.length>Mu["g"])return void SR.warn(Mu["i"]);const e=this.rootTiles.map(e=>e.lij),t=Object(S["d"])(e,i,RR);if(t.removed.length>0||t.added.length>0){const e=this.rootTiles.filter(e=>!(t.removed.findIndex(t=>RR(t,e.lij))>-1)||(this._purgeTile(e),!1));t.added.forEach(t=>e.push(this._newRootTile(t))),this._setRootTiles(e)}}else i.length>Mu["g"]&&(SR.warn(Mu["j"]),i=t.rootTilesInExtent(e,r,Mu["g"])),this._setRootTiles(i.map(e=>this._newRootTile(e)));Object(wu["o"])(r,this._rootTilesExtent)||(this._rootTilesExtent=Object(wu["l"])(r)),this.visible=!0,this._viewChangeUpdate(),this.overlayManager.setPlacementDirty(),this.notifyChange("ready")}_newRootTile(e){const t=this._acquireTile(0,e[1],e[2],null);return t.shouldSplit(this._splitLimits,this._eyePosRenderSR,this.lodSnapping)===BA.SPLIT&&t.setPendingUpdate(BA.SPLIT),this._loadTile(t),t}_setRootTiles(e){if(this._set("rootTiles",e),this._allTiles.clear(),Object(z["k"])(e)){const t=this._iteratorPool.acquire();for(t.reset(e);!t.done;)this._allTiles.push(t.next());t.remove()}this._renderer.setRootTiles(this.rootTiles),this._updateTilesVisibility(e)}_runViewChangeUpdateIfDirty(){this._viewChangeUpdateDirty&&(this._viewChangeUpdateDirty=!1,this._viewChangeUpdate())}_viewChangeUpdate(){this.view&&!this.suspended&&this.tilingScheme&&this._visible&&(this._inFrameTask?this._viewChangeUpdateDirty=!0:(this._viewChangeUpdateDirty=!1,this._updateViewDependentParameters(),this._updateSkirts(),this._updateTilesVisibility(this.rootTiles)))}_updateClippingStatus(e){e.updateClippingStatus(this.extent)&&e.resetPendingUpdate(BA.GEOMETRY)&&this._updateTileGeometry(e)}_updateTilesVisibility(e){if(Object(z["j"])(e))return;const t=Object(AA["f"])(e);let r=t?this._elevationBounds.min:1/0,i=t?this._elevationBounds.max:-1/0;const n=this.view.state.fixedContentCamera,a=this.extent,s=this._viewProjectionMatrix;this.setTileTreeDirty();const o=this._iteratorPool.acquire();for(o.reset(e);!o.done;){const e=o.next();e.updateClippingStatus(a)&&e.resetPendingUpdate(BA.GEOMETRY)&&this._updateTileGeometry(e),e.setPendingUpdate(BA.RENDERDATA);const t=e.computeVisibility();n||t?(e.updateScreenDepth(s),e.renderData&&(r=Math.min(e.elevationBounds[0],r),i=Math.max(e.elevationBounds[1],i))):o.skipSubtree()}o.remove(),this._viewChanged=!0,this._allTilesDirty=!0,isFinite(r)&&isFinite(i)&&(this._elevationBounds.min===r&&this._elevationBounds.max===i||(this._elevationBounds.min=r,this._elevationBounds.max=i,this.emit("elevation-bounds-change",null)))}_updateViewDependentParameters(){const e=this.view.state.camera,t=this.view.state.contentCamera,r=Math.tan(.5*t.fovX),i=Math.tan(.5*t.fovY),n=this.tilingScheme.pixelSize,a=2**-this.lodBias*e.pixelRatio;this._splitLimits.aboveGround=e.aboveGround,this._splitLimits.fovX=r,this._splitLimits.fovY=i,this._splitLimits.relativeWidthLimit=n/e.width*this.maxTextureScale*a,this._splitLimits.relativeHeightLimit=n/e.height*this.maxTextureScale*a,this._splitLimits.maxLod=this.tilingScheme.getMaxLod(),this._splitLimits.angledSplitBias=this.view.qualitySettings.tiledSurface.angledSplitBias,this.view.state.fixedContentCamera?(Object(z["j"])(this._splitLimits.frustum)&&(this._splitLimits.frustum=Object(Uw["f"])()),Object(Uw["e"])(this._splitLimits.frustum,t.frustum)):this._splitLimits.frustum=null,Object(Uw["e"])(this._frustum,e.frustum),Object(Qd["n"])(this._viewProjectionMatrix,t.projectionMatrix,t.viewMatrix),Object($o["m"])(this._eyePosRenderSR,t.eye),Object(pe["y"])(e.eye,this.view.renderSpatialReference,this._eyePosSurfaceSR,this.spatialReference)}_updateSkirts(){const e=this.view.state.camera,t=this.view.state.constraints.collision.enabled?0:1.11*e.near;this.skirtScale=Object(PS["b"])(this,this._eyePosSurfaceSR,t)}_updateRenderData(e){e.rendered&&!e.shouldLoad&&(MR(e)?this._loadChildren(e):PR(e)&&this._loadParent(e))}_updateTileGeometry(e){e.updateVisibility(),this._renderer.updateTileGeometry(e),this._elevationUpdate(e),this._usedMemory=IR}_updateTileTexture(e,t){const r=e.resetPendingUpdate(BA.TEXTURE_FADING)?BA.TEXTURE_FADING:!!e.resetPendingUpdate(BA.TEXTURE_NOFADING)&&BA.TEXTURE_NOFADING;r&&(this._renderer.updateTileTexture(e,r),this._usedMemory=IR,t.madeProgress())}_elevationUpdate(e){kR.spatialReference=this.spatialReference,kR.tile=e,kR.extent=e.extent,this.emit("elevation-change",kR),Object(wu["h"])(e.extent,this._eyePosSurfaceSR)&&this._updateSkirts()}get running(){return this.updating&&this.ready&&!this.suspended}runTask(e){this._handleLayerViewChanges(e),this._frameTask.processQueue(e),this._inFrameTask=!0,this._pendingUpdates=0,this._hasPendingUpdates=!1,this._updateTileStatus(e),this._sortTiles(e);const t=!this.view.state.fixedContentCamera;this._mergeAndSplit(e,t),e.run(()=>this._updateElevation(e)),e.run(()=>this._updateTextures(e)),t||this._mergeAndSplit(e,!0),this._inFrameTask=!1,this._runViewChangeUpdateIfDirty(),e.done&&this.requestUpdate(),this.notifyChange("updatingProgressValue")}_updateTileStatus(e){if(!this._viewChanged||!this.rootTiles||e.done)return;this._viewChanged=!1;const t=this._iteratorPool.acquire();for(t.reset(this.rootTiles);!t.done;){const e=t.next();if(e.loadable){const r=e.shouldSplit(this._splitLimits,this._eyePosRenderSR,this.lodSnapping);if(r===BA.SPLIT){e.resetPendingUpdate(BA.MERGE),e.isLeaf&&(e.setPendingUpdate(BA.SPLIT),t.skipSubtree());continue}e.resetPendingUpdate(BA.SPLIT)&&e.updateAgentSuspension(),r===BA.VSPLITMERGE&&e.updateAgents(FE.ELEVATION)}if(t.skipSubtree(),!e.isLeaf){e.setPendingUpdate(BA.MERGE),e.resetPendingUpdate(BA.SPLIT);const t=this._iteratorPool.acquire();t.resetOne(e);for(let e=t.next();!t.done;e=t.next())this._updateClippingStatus(e),e.updateVisibility(),e.loadable&&e.updateScreenDepth(this._viewProjectionMatrix);t.remove()}}t.remove(),this.requestUpdate(),e.madeProgress()}_sortTiles(e){e.done||this._allTilesSorted||(Object(AA["h"])(this._allTiles,this.view.pointsOfInterest.focus.renderLocation),this._allTilesSorted=!0,this._treeDebugger&&this._treeDebugger.update(),e.madeProgress())}_mergeAndSplit(e,t){if(this.suspended||e.done||!this._allTilesDirty)return;this._allTilesDirty=!1,this.requestUpdate();let r=0;for(;!e.done;){let i=!1;r=0;const n=!this._allTiles.some(n=>{if(r+=n.usedMemory,n.resetPendingUpdate(BA.MERGE)){if(!t)return n.setPendingUpdate(BA.MERGE),e.done;this._mergeTile(n),i=!0,e.madeProgress()}else n.resetPendingUpdate(BA.SPLIT)&&(this._splitTile(n),i=!0,e.madeProgress());return!e.done&&n.resetPendingUpdate(BA.RENDERDATA)&&(this._updateRenderData(n),e.madeProgress()),e.done});if(i&&(this._allTilesSorted=!1,this._allTilesDirty=!0),n){if(this._usedMemory=r,!i)break;this._updateTilesVisibility(this.rootTiles)}else this._allTilesDirty=!0}0===r&&(this._allTilesDirty=!0),this._sortTiles(e)}_updateElevation(e){return this._allTiles.some(t=>(t.resetPendingUpdate(BA.GEOMETRY)&&(this._updateTileGeometry(t),this._updateTileTexture(t,e),e.madeProgress()),e.done)),e.hasProgressed}_updateTextures(e){return this._allTiles.some(t=>(this._updateTileTexture(t,e),e.done)),e.hasProgressed}_updateClippingExtent(){this.spatialReference&&(this.updateTileOverlayParams(LS["i"].UPDATE),this.overlayManager.setPlacementDirty(),this._updateRootTiles())}get lodBias(){const e=this.view.resourceController.memoryController.memoryFactor;return this.view.qualitySettings.tiledSurface.lodBias-(1-e)*Mu["e"]}_getLodBiasCorrectedScale(e){const t=this.tilingScheme.levels,r=Object(dr["f"])(e-this.lodBias,0,t.length-1),i=r-Math.floor(r);return t[Math.floor(r)].scale*(1-i)+t[Math.ceil(r)].scale*i}_removeAllTiles(){Object(z["k"])(this.rootTiles)&&(this.rootTiles.forEach(e=>this._purgeTile(e)),this._setRootTiles(null),this.notifyChange("ready")),this._allTiles.clear(),this.visible=!1}_purgeChildTiles(e){if(e.isLeaf)return!1;let t=this._purgeTile(e.children[0]);return t=this._purgeTile(e.children[1])||t,t=this._purgeTile(e.children[2])||t,t=this._purgeTile(e.children[3])||t,e.unsetChildren(),t}_purgeTile(e){const t=this._purgeChildTiles(e)||e.rendered;return this._allTiles.removeUnordered(e),e.unload(this._renderer),this._tilePool.release(e),t}_splitTile(e){Object(PS["t"])(e.isLeaf,"tile that is already split should not be split again!");const t=e.level+1,r=2*e.lij[1],i=2*e.lij[2];e.setChildren(this._createTile(t,r,i,e),this._createTile(t,r,i+1,e),this._createTile(t,r+1,i,e),this._createTile(t,r+1,i+1,e)),e.setPendingUpdate(BA.RENDERDATA),e.updateAgentSuspension(),this._allTiles.pushArray(e.children),this._allTilesDirty=!0,this._emitTileScaleChange(e,t),++this._performanceInfo.numSplit}_emitTileScaleChange(e,t=e.level){UR.spatialReference=this.spatialReference,UR.extent=e.extent,UR.scale=this._getLodBiasCorrectedScale(t),this.emit("scale-change",UR)}_createTile(e,t,r,i){Object(PS["t"])(!!i,"_createTile sanity check");const n=this._acquireTile(e,t,r,i);return n.updateClippingStatus(this.extent),n.loadable&&(n.updateScreenDepth(this._viewProjectionMatrix),n.shouldSplit(this._splitLimits,this._eyePosRenderSR,this.lodSnapping)===BA.SPLIT&&n.setPendingUpdate(BA.SPLIT)),n}_mergeTile(e){Object(PS["t"])(!e.hasPendingUpdate(BA.SPLIT),"_mergeTile sanity check"),this._purgeChildTiles(e)&&(Object(PS["t"])(!e.renderData,"_mergeTile sanity check"),this._loadTile(e)),this._allTilesDirty=!0,++this._performanceInfo.numMerged,this._emitTileScaleChange(e)}_loadChildren(e){Object(PS["t"])(e.rendered,"parent should be rendered"),e.unload(this._renderer),this._loadTile(e.children[0]),this._loadTile(e.children[1]),this._loadTile(e.children[2]),this._loadTile(e.children[3])}_loadParent(e){const t=e.parent;this._unloadChildren(t),this._loadTile(t)}_unloadChildren(e){e.isLeaf||(this._unloadChildren(e.children[0]),e.children[0].unload(this._renderer),this._unloadChildren(e.children[1]),e.children[1].unload(this._renderer),this._unloadChildren(e.children[2]),e.children[2].unload(this._renderer),this._unloadChildren(e.children[3]),e.children[3].unload(this._renderer))}_loadTile(e){e.load(this._renderer),e.setPendingUpdate(BA.RENDERDATA),this.requestUpdate(),this._allTilesDirty=!0,this.overlayManager&&this.overlayManager.hasOverlays&&this.overlayManager.setTileParameters(e),this._elevationUpdate(e)}_elevationDataArrived(e,t,r){const i=new RE(e.lij,e.extent,r);e.dataArrived(t,FE.ELEVATION,i);const n=[e],a=e.level,s=this._iteratorPool.acquire();for(s.reset(n);!s.done;){const e=s.next();e.findElevationBoundsForLayer(t,a),e.computeElevationBounds()}s.remove(),this._updateTilesVisibility(n)}_handleLayerViewChanges(e=Ba["e"]){if(!this._layerViewsDirty)return;this._layerViewsDirty=!1;let t=!1;const r=new Set;let i=-1;for(const n of this.view.allLayerViews.items)if(r.add(n.uid),Object(PS["j"])(n))if(this._basemapLayerViewHandles.has(n.uid)){const e=this._layerClassFromLayerView(n),r=this._layerIndexByUid[e].get(n.uid);r<i&&(t=!0),i=r}else this._registerTiledLayerView(n),n.layer.loaded&&(t=!0);this._basemapLayerViewHandles.forEach((e,i)=>{r.has(i)||(this._unregisterTiledLayerView(i),t=!0)}),t&&this._updateTiledLayers(),this._renderer.isTransparent=this._allTransparentSurfaceLayers(),e.madeProgress()}_allTransparentSurfaceLayers(){var e,t;let r=0===(null==(e=this.view.map)||null==(t=e.ground)?void 0:t.opacity);for(const i of this.view.allLayerViews.items)if(Object(PS["j"])(i)&&!Object(PS["e"])(i)&&!Object(Au["c"])(i.layer)&&0!==i.fullOpacity)return r=!1,r;return r}_layerClassFromLayerView(e){return Object(PS["e"])(e)?FE.ELEVATION:FE.MAP}_registerTiledLayerView(e){const t=[],r=this._layerClassFromLayerView(e);t.push(e.watch("suspended",()=>this._updateTiledLayers())),t.push(e.watch("fullOpacity",()=>this._updateTileTextures(kE["e"].UNFADED))),t.push(e.layer.watch("effectiveScaleRange",()=>this._restartAllAgents(r))),e.on("data-changed",()=>{const t=this._layerIndexByUid[r].get(e.uid);null!=t&&this._invalidateLayerData(t,r)}),this._basemapLayerViewHandles.set(e.uid,t)}_unregisterTiledLayerView(e){const t=this._basemapLayerViewHandles.get(e);if(t){for(let e=0;e<t.length;e++)t[e].remove();this._basemapLayerViewHandles.delete(e)}}_updateTiledLayers(){if(!this.tilingScheme||this.view.suspended)return;const e=this.view.allLayerViews,t=[[],[]];let r=null;const i=Object(wu["n"])();e.forEach(e=>{const n=e.layer;if(!n||e.suspended||!Object(PS["j"])(e))return;const a=e.fullExtent;if(!a)return void SR.warn("Terrain: Map or elevation layer does not have fullExtent: "+n.id);Object(wu["p"])(i,a,i);const s=this._layerClassFromLayerView(e);if(s===FE.MAP){const t=e.displayLevelRange;t.maxLevel!==1/0&&(null===r||t.maxLevel>r)&&(r=t.maxLevel)}t[s].push(e)});for(const n of UE){const e=this._layerViews[n],r=t[n];r.reverse();const i=r.length;let a=e.length!==i;const s=new Array(i),o=new Array(e.length);this._layerIndexByUid[n].clear();for(let t=0;t<i;t++){const i=r[t].uid;this._layerIndexByUid[n].set(i,t);const c=e.indexOf(r[t]);s[t]=c,t!==c&&(a=!0),c>-1&&(o[c]=t)}if(a){const e=this._postorderIterator;for(e.reset(this.rootTiles);!e.done;)e.next().modifyLayers(o,s,n);this._layerViews[n]=r,this._restartAllAgents(n),this._updateTilesVisibility(this.rootTiles)}}this.tilingScheme.ensureMaxLod(r)&&this._viewChangeUpdate()}_restartAllAgents(e){const t=this._postorderIterator;for(t.reset(this.rootTiles);!t.done;){const r=t.next();r.restartAgents(e),e===FE.ELEVATION&&r.computeElevationBounds()}}layerViewByIndex(e,t){return this._layerViews[t][e]}numLayers(e){return this._layerViews[e].length}_updateTileTextures(e){this._allTiles.forAll(t=>{t.updateAgents(FE.MAP),e===kE["e"].IMMEDIATE?this.renderer.updateTileTexture(t,BA.TEXTURE_NOFADING):t.updateRenderData(FE.MAP,e)}),this._renderer.isTransparent=this._allTransparentSurfaceLayers()}_invalidateLayerData(e,t){this._allTiles.forAll(r=>r.removeLayerAgent(e,t)),this._allTiles.forAll(r=>r.invalidateLayerData(e,t))}setTileTreeDirty(){this._allTilesDirty=!0}requestRender(e=LS["i"].UPDATE){this.renderer.setNeedsRender(e)}requestUpdate(){1==++this._pendingUpdates&&(this._hasPendingUpdates=!0)}requestTileData(e,t,r,i){const n=this.layerViewByIndex(t,r),a=n.layer;return!a.tilemapCache||Object(PS["n"])(n)?this._requestTileData(e,r,n,i):(++this._asyncWorkItems,a.tilemapCache.fetchAvailability(e.lij[0],e.lij[1],e.lij[2],{...i,timeout:6e3}).then(()=>--this._asyncWorkItems).catch(t=>{throw--this._asyncWorkItems,Object(_["m"])(t)||this._dataMissing(e,r,n,{notInTilemap:!0}),t}).then(()=>this._frameTask.schedule(()=>this._requestTileData(e,r,n,i),i.signal)))}_requestTileData(e,t,r,i){return t===FE.ELEVATION?this._requestElevationTileData(e,r,i):this._requestMapTileData(e,r,i)}_requestElevationTileData(e,t,r){if(!Object(PS["e"])(t))return void Object(PS["t"])(!1,"_requestElevationTileData can only be called for elevation layer views");const i=i=>{if(--this._asyncWorkItems,Object(_["n"])(r))return;const n=this._layerIndexByUid[FE.ELEVATION].get(t.uid);null!=n?(this._usedMemory=IR,this.requestUpdate(),this._elevationDataArrived(e,n,i)):SR.warn("TerrainSurface: received data from unknown layer %d %s",FE.ELEVATION,e.lij.toString())},n=r=>{--this._asyncWorkItems,Object(_["m"])(r)||(this._dataMissing(e,FE.ELEVATION,t,r),this.requestUpdate())};if(++this._asyncWorkItems,Object(PS["r"])(t.layer))return t.layer.fetchTile(e.lij[0],e.lij[1],e.lij[2],{noDataValue:Mu["b"],signal:r.signal}).then(e=>{if(Object(_["n"])(r))return SR.warnOnce("A call to fetchTile resolved even though the request was aborted. fetchTile should not resolve if options.signal.aborted is true."),void n(Object(_["e"])());this._frameTask.schedule(()=>i(e),r.signal,n)},n);const a=t.getTileUrl(e.lij[0],e.lij[1],e.lij[2]);return this._elevationDataRequester.request(a,"binary",r).then(e=>this._lercDecoder.decode(e,{noDataValue:Mu["b"]},r.signal)).then(e=>{i({values:e.pixelData,width:e.width,height:e.height,noDataValue:e.noDataValue,minValue:e.minValue,maxValue:e.maxValue})},n)}_requestMapTileData(e,t,r){if(t instanceof EE["default"])return Promise.reject();++this._asyncWorkItems;const i=(i,n)=>{--this._asyncWorkItems,Object(PS["p"])(n),Object(_["n"])(r)||(this._dataMissing(e,FE.MAP,t,i),this.requestUpdate())},n=e=>t=>i(t,e),a=i=>this._frameTask.schedule(()=>{--this._asyncWorkItems,this.requestUpdate(),Object(_["n"])(r)?Object(PS["p"])(i):this._mapTileDataArrived(e,t,i)},r.signal,n(i)).catch(n(i)),s=(e,t=null)=>this._frameTask.schedule(()=>i(e,t));if(Object(PS["n"])(t)){const i=t.schemaHelper.getLevelRowColumn(e.lij);return t.fetchTile(i[0],i[1],i[2],r).then(a,s)}if(Object(PS["f"])(t))return t.fetchTile(e.lij[0],e.lij[1],e.lij[2],r).then(a,s);if(Object(PS["l"])(t)&&Object(PS["r"])(t.layer))return t.layer.fetchTile(e.lij[0],e.lij[1],e.lij[2],r).then(e=>{if(Object(_["n"])(r))return SR.warnOnce("A call to fetchTile resolved even though the request was aborted. fetchTile should not resolve if options.signal.aborted is true."),void s(Object(_["e"])());a(e)},s);let o=t.getTileUrl(e.lij[0],e.lij[1],e.lij[2]);Object(wE["b"])(t.layer)&&t.layer.refreshTimestamp&&(o+=`${o.includes("?")?"&":"?"}_ts=${t.layer.refreshTimestamp}`);const c=t.hasMixedImageFormats?"image+type":"image";return this._mapDataRequester.request(o,c,r).then(a,s)}_mapTileDataArrived(e,t,r){const i=this._layerIndexByUid[FE.MAP].get(t.uid);null!=i?e.dataArrived(i,FE.MAP,r):(Object(PS["p"])(r),SR.warn("TerrainSurface: received data from unknown layer"))}_dataMissing(e,t,r,i){const n=this._layerIndexByUid[t].get(r.uid);null!=n?e.dataMissing(n,t,i):SR.warn("TerrainSurface: received data from unknown layer")}updateTileOverlayParams(e){this.rootTiles&&this.overlayManager&&(this._allTiles.forAll(e=>{e.renderData&&this.overlayManager.setTileParameters(e)}),this._renderer.setNeedsRender(e))}get performanceInfo(){const e=this._performanceInfo;return e.numNodes=this._allTiles.length,e.numLeaves=e.numVisible=e.numRendered=e.numLoadedPerLevel.length=e.numRenderedPerLevel.length=0,this._allTiles.forAll(t=>{t.isLeaf&&e.numLeaves++;const r=t.level;t.renderData&&(e.numLoadedPerLevel[r]=(e.numLoadedPerLevel[r]||0)+1),t.visible&&(e.numVisible++,t.rendered&&(e.numRenderedPerLevel[r]=(e.numRenderedPerLevel[r]||0)+1,e.numRendered++))}),e}getUsedMemory(){return this.tilingScheme?(this._usedMemory===IR&&(this._usedMemory=0,this._allTiles.forAll(e=>this._usedMemory+=e.usedMemory)),this._usedMemory):0}getUsedMemoryForLayerView(e){let t=0;const r=this._layerClassFromLayerView(e),i=this._layerIndexByUid[r].get(e.uid);return this._allTiles.forAll(e=>t+=e.getUsedMemoryForLayer(r,i)),t}getTile(e){if(Object(z["j"])(e)||Object(z["j"])(this.rootTiles))return null;const t=e.split("/").map(e=>+e);if(0===t[0])return this.rootTiles.find(e=>e.lij[1]===t[1]&&e.lij[2]===t[2]);const r=2**t[0],i=Math.floor(t[1]/r),n=Math.floor(t[2]/r);let a;if(this.rootTiles.some(e=>e.lij[1]===i&&e.lij[2]===n&&(a=e,!0)),a){let e=1<<t[0]-1;for(;a.lij[0]<t[0];){let r=t[1]&e?2:0;if((t[2]&e)>0&&r++,!a.children[r])return null;a=a.children[r],e>>=1}return Object(PS["t"])(a.lij[0]===t[0]&&a.lij[1]===t[1]&&a.lij[2]===t[2],"not the right tile?"),a}return null}get test(){const e=this;return{renderer:e._renderer,lercDecoder:e._lercDecoder,forceReload:()=>{Object(z["k"])(e.rootTiles)&&(e._mergeTile(e.rootTiles[0]),e._viewChangeUpdate())},getTiles:()=>e._allTiles.toArray(),getRenderedTiles(){FR.clear(),e._allTiles.forAll(e=>{e.visible&&e.rendered&&FR.push(e)});const t=FR.toArray();return Object(AA["g"])(e.renderOrder,t),t},lockTilingScheme(t,r){e._extentHelper.defaultTiledLayersExtent=r,e.tilingSchemeLogic.test.lockTilingScheme(t)}}}};Object(l["a"])([Object(j["b"])()],AR.prototype,"_renderer",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_hasPendingUpdates",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_asyncWorkItems",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_allTilesDirty",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_allTilesSorted",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_viewChanged",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"_watchUpdatingTracking",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_frameTask",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"snapLevel",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"lodSnapping",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],AR.prototype,"view",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_userClippingExtent",null),Object(l["a"])([Object(j["b"])()],AR.prototype,"_rootTilesExtent",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"extent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"groundExtent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"_tilingSchemeExtent",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"updating",null),Object(l["a"])([Object(j["b"])(AE["a"])],AR.prototype,"updatingProgress",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"updatingProgressValue",null),Object(l["a"])([Object(j["b"])()],AR.prototype,"_maxNumUpdating",void 0),Object(l["a"])([Object(j["b"])({aliasOf:"view.map.ground.opacity"})],AR.prototype,"baseOpacity",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"overlayManager",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"viewingMode",null),Object(l["a"])([Object(j["b"])()],AR.prototype,"maxTextureScale",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"ready",null),Object(l["a"])([Object(j["b"])({value:iC.FRONT_TO_BACK})],AR.prototype,"renderOrder",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"rootTiles",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"spatialReference",null),Object(l["a"])([Object(j["b"])()],AR.prototype,"backgroundImage",void 0),Object(l["a"])([Object(j["b"])({type:d["a"],aliasOf:"view.map.ground.surfaceColor"})],AR.prototype,"backgroundColor",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_background",null),Object(l["a"])([Object(j["b"])({value:!1})],AR.prototype,"slicePlaneEnabled",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"tilingScheme",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"tilingSchemeLogic.tilingSchemeLocked"})],AR.prototype,"tilingSchemeLocked",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],AR.prototype,"tilingSchemeLogic",void 0),Object(l["a"])([Object(j["b"])({value:!0})],AR.prototype,"velvetOverground",null),Object(l["a"])([Object(Pe["a"])("_renderer.wireframe")],AR.prototype,"wireframe",void 0),Object(l["a"])([Object(j["b"])({value:!1})],AR.prototype,"suspended",null),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"view.qualitySettings.tiledSurface.textureFadeDuration"})],AR.prototype,"textureFadeDuration",void 0),Object(l["a"])([Object(j["b"])()],AR.prototype,"_layerViewsDirty",void 0),Object(l["a"])([Object(Pe["a"])("_renderer.renderPatchBorders")],AR.prototype,"renderPatchBorders",void 0),Object(l["a"])([Object(Pe["a"])("_renderer.renderingDisabled")],AR.prototype,"renderingDisabled",void 0),AR=Object(l["a"])([Object(x["a"])("esri.views.3d.terrain.TerrainSurface")],AR);const CR=AR;function RR(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function MR(e){return!e.isLeaf&&(e.children[0].shouldLoad||e.children[1].shouldLoad||e.children[2].shouldLoad||e.children[3].shouldLoad||MR(e.children[0])||MR(e.children[1])||MR(e.children[2])||MR(e.children[3]))}function PR(e){return e.isLeaf&&e.parent&&e.parent.shouldLoad}const IR=-1,DR=Object(Xd["e"])(),LR=Object(wu["l"])(),NR=[0,0,0],FR=new k_["a"],kR={spatialReference:null,tile:null,extent:null,context:"ground"},UR={spatialReference:null,extent:null,scale:0};var zR=r("70a2"),BR=r("fdc9b"),VR=r("697e"),GR=r("adf1"),HR=r("3bd5");let qR=class extends F["a"]{constructor(e){super(e),this._residentGeomRecords=new Map,this._dirtyGeomRecords=new Map,this.dirty=!1}commit(e){this.dirty=!1,this._dirtyGeomRecords.forEach((t,r)=>this.commitLayer(r,e))}commitLayer(e,t){const r=this._dirtyGeomRecords.get(e);r&&(r.forEach((r,i)=>{const n=this._ensureGeomRecord(e,i);r.forEach((e,r)=>{const a=e[0],s=e[1],o=e[2];let c=!1;if(s&HR["a"].Geometry.UPDATE){const e=n.get(r);if(e){const r=e[1];if(o&HR["a"].State.TRANSFORMATION){const e=this.model.getObject(i);this.model.updateRenderGeometryTransformation(e,a,r)&&(c=!0)}c||t.updates.push({renderGeometry:r,updateType:o})}else Object(fp["a"])(!1,"ModelDirtySet.getAddRemoveListFilteredByLayers: invalid update")}if(s&HR["a"].Geometry.REMOVE||c){const e=n.get(r);e?(t.removes.push(e[1]),n.delete(r),e[0].disposed&&VR["a"].pool.release(e[0])):s===HR["a"].Geometry.REMOVE&&Object(fp["a"])(!1,"ModelDirtySet.getAddRemoveListFilteredByLayers: invalid remove")}if(s&HR["a"].Geometry.ADD||c){const e=this.model.getObject(i);if(Object(z["k"])(e)){const i=this.model.getRenderGeometry(e,a),s=[a,i];t.adds.push(i),n.set(r,s)}}}),0===n.size&&this._residentGeomRecords.get(e).delete(i)}),0===this._residentGeomRecords.get(e).size&&this._residentGeomRecords.delete(e),this._dirtyGeomRecords.delete(e))}getResidentRenderGeometries(e,t){const r=this._residentGeomRecords.get(e);r&&r.forEach(e=>e.forEach(e=>t.push(e[1])))}_objectStateChanged(e,t){for(const r of t.geometryRecords)this._updateOrCreateDirtyRecord(t,r,null,HR["a"].Geometry.UPDATE,0,0,HR["a"].Geometry.UPDATE,HR["a"].Geometry.ADD|HR["a"].Geometry.REMOVE,e)}visibilityChanged(e){this._objectStateChanged(HR["a"].State.VISIBILITIES,e)}highlightChanged(e){this._objectStateChanged(HR["a"].State.HIGHLIGHTS,e)}occlusionChanged(e){this._objectStateChanged(HR["a"].State.OCCLUDEES,e)}vertexAttrsUpdated(e){this._updateOrCreateDirtyRecord(e.object,e.record,null,HR["a"].Geometry.UPDATE,0,0,HR["a"].Geometry.UPDATE,HR["a"].Geometry.ADD|HR["a"].Geometry.REMOVE,HR["a"].State.VERTEXATTRS)}layerAdded(e){e.objects.forAll(t=>this._layerObjectAdded(e,t))}layerRemoved(e){e.objects.forAll(t=>this._layerObjectRemoved(e,t))}layerObjectAdded(e){this._layerObjectAdded(e.layer,e.object)}_layerObjectAdded(e,t){const r=e.id;for(const i of t.geometryRecords)this._objectGeometryAdded(t,i,r)}layerObjectRemoved(e){this._layerObjectRemoved(e.layer,e.object)}layerObjectsAdded(e){for(const t of e.objects)this._layerObjectAdded(e.layer,t)}layerObjectsRemoved(e){for(const t of e.objects)this._layerObjectRemoved(e.layer,t)}_layerObjectRemoved(e,t){const r=e.id;for(const i of t.geometryRecords)this._objectGeometryRemoved(t,i,r)}shaderTransformationChanged(e){const t=this._residentGeomRecords.get(e.id);t&&t.forEach((e,t)=>{const r=this.model.getObject(t);r&&r.hasVolativeTransformation()&&e.forEach(e=>{e[1].shaderTransformationChanged()})})}objectTransformation(e){const t=this._getParentLayerId(e),r=e.id;this._ensureGeomRecord(t,r).forEach(r=>{this._updateOrCreateDirtyRecord(e,r[0],t,HR["a"].Geometry.UPDATE,0,0,HR["a"].Geometry.UPDATE,HR["a"].Geometry.ADD|HR["a"].Geometry.REMOVE,HR["a"].State.TRANSFORMATION)})}objectGeometryAdded(e){this._objectGeometryAdded(e.object,e.record)}_objectGeometryAdded(e,t,r=null){this._updateOrCreateDirtyRecord(e,t,r,HR["a"].Geometry.ADD,HR["a"].Geometry.REMOVE,0,0,0)}objectGeometryRemoved(e){this._objectGeometryRemoved(e.object,e.record)}_objectGeometryRemoved(e,t,r=null){this._updateOrCreateDirtyRecord(e,t,r,HR["a"].Geometry.REMOVE,HR["a"].Geometry.ADD,HR["a"].Geometry.UPDATE,0,0)}_updateOrCreateDirtyRecord(e,t,r,i,n,a,s,o,c){r=Object(z["u"])(r,this._getParentLayerId(e));const l=e.id,u=t.id,d=this._ensureDirtyRecord(r,l),h=d.get(u);if(h){const e=h[1];e&n?(d.delete(u),h[0].disposed&&VR["a"].pool.release(h[0])):e&a?(h[1]=i,h[2]=c):e&s?h[2]|=c:e&o||Object(fp["a"])(!1,"ModelDirtySet.objectGeometryAdded: inconsistent state")}else d.set(u,[t,i,c]);this.dirty=this._hasDirtyGeometryRecords}_ensureGeomRecord(e,t){let r=this._residentGeomRecords.get(e);r||(r=new Map,this._residentGeomRecords.set(e,r));let i=r.get(t);return i||(i=new Map,r.set(t,i)),i}get _hasDirtyGeometryRecords(){return Object(Da["c"])(this._dirtyGeomRecords,e=>Object(Da["c"])(e,e=>e&&e.size>0))}_ensureDirtyRecord(e,t){let r=this._dirtyGeomRecords.get(e);r||(r=new Map,this._dirtyGeomRecords.set(e,r));let i=r.get(t);return i||(i=new Map,r.set(t,i)),i}_getParentLayerId(e){return Object(z["k"])(e.parentLayer)?e.parentLayer.id:hw["a"]}formatDebugInfo(){const e=["ADD","UPD",void 0,"REM"];let t="";return this._dirtyGeomRecords.forEach((r,i)=>{r.forEach((r,n)=>{t.length>0&&(t+="\n"),t+=i+"."+n;const a=[];r.forEach(e=>{const t=e[1];a[t]||(a[t]=[]),a[t].push(e[0].geometry.id)});for(let i=0;i<a.length;i++)if(a[i]){t+=" "+e[i-1]+": ";for(let e=0;e<a[i].length;e++)t+=a[i][e]+", "}})}),t}get test(){const e=this;return{get residentLayerCount(){return e._residentGeomRecords.size},get residentObjectCount(){return Array.from(e._residentGeomRecords.values()).reduce((e,t)=>e+t.size,0)}}}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],qR.prototype,"model",void 0),Object(l["a"])([Object(j["b"])()],qR.prototype,"dirty",void 0),qR=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.ModelDirtySet")],qR);const WR=qR;var $R=r("6061");let ZR=class extends F["a"]{constructor(){super(...arguments),this.dirtySet=new WR({model:this}),this._content=new Map,this._originFactory=new GR["a"](null,75e4)}getObject(e){return this._content.get(e)}add(e){const t=e.id;Object(fp["a"])(!this._content.has(t),"Model/Stage already contains object to be added"),this._content.set(t,e),Object(ww["b"])(e)&&this.dirtySet.layerAdded(e)}remove(e){Object(fp["a"])(this._content.has(e.id),"Model/Stage doesn't contain object to be removed"),this._content.delete(e.id),e.unload(),Object(ww["b"])(e)&&this.dirtySet.layerRemoved(e)}addMany(e){for(const t of e)Object(z["k"])(t)&&(Object(fp["a"])(!this._content.has(t.id),"Model/Stage already contains object to be added"),this._content.set(t.id,t))}removeMany(e){for(const t of e)Object(fp["a"])(this._content.has(t.id),"Model/Stage doesn't contain object to be removed"),this._content.delete(t.id),t.unload()}has(e){return this._content.has(e.id)}forEachOfType(e,t){this._content.forEach(r=>{r.type===e&&t(r)})}getRenderGeometry(e,t){const{geometry:r,material:i,id:n,shaderTransformation:a,origin:s,instanceParameters:o}=t,c=new $R["a"](r,i,{id:n,boundingInfo:r.boundingInfo,calculateShaderTransformation:a,castShadow:e.castShadow});return c.updateTransformation(r=>e.getCombinedStaticTransformation(t,r)),c.origin=s||this._originFactory.getOrigin(c.boundingSphere),c.instanceParameters=o,c}updateRenderGeometryTransformation(e,t,r){if(Object(z["j"])(e))return!1;r.updateTransformation(r=>e.getCombinedStaticTransformation(t,r));const i=this._originFactory.getOrigin(r.boundingSphere);return r.origin!==i}getStats(){const e={},t=Array.from(this._content.values());for(let r=0;r<pw["a"].COUNT;++r)e[r]=t.filter(e=>e.type===r).length;return{contentTypes:e,dirtySet:this.dirtySet.formatDebugInfo()}}get test(){return{content:Array.from(this._content.values())}}};Object(l["a"])([Object(j["b"])({constructOnly:!0})],ZR.prototype,"dirtySet",void 0),ZR=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.parts.Model")],ZR);var XR=r("caf1"),YR=r("cee3"),JR=r("a21b");class QR{constructor(e){this._totalCount=e,this._indexRanges=[0,e]}componentCount(){const e=this._indexRanges;let t=0;for(let r=0;r<e.length;r+=2)t+=e[r+1];return t}reset(e){"all"===e||e.length===this._totalCount?this._indexRanges=[0,this._totalCount]:this._indexRanges=KR(e)}forEachComponent(e){const t=this._indexRanges;for(let r=0;r<t.length;r+=2){const i=t[r],n=i+t[r+1];for(let t=i;t<n;t++)if(!e(t))return!1}return!0}forEachComponentRange(e){const t=this._indexRanges;for(let r=0;r<t.length;r+=2){const i=t[r];if(!e(i,i+t[r+1]))return!1}return!0}computeOffsetRanges(e){const t=new Array(this._indexRanges.length),r=this._indexRanges;for(let i=0;i<r.length;i+=2){const n=r[i],a=n+r[i+1],s=e[n],o=e[a];t[i]=s,t[i+1]=o-s}return t}}function KR(e){const t=new Array;if(0===e.length)return t;let r=e[0],i=1;for(let n=1;n<e.length;n++){const a=e[n];r+i===a?i+=1:(t.push(r),t.push(i),r=a,i=1)}return t.push(r),t.push(i),t}class eM extends zR["a"]{constructor(e,t){super(),this.pickability=null,this.highlightCounts=null,this.cachedGeometryRanges=null,this.cachedHighlightRanges=null,this.cachedDefaultRanges=null,this.offsets=Object(JR["m"])(t);const r=this.count;this.visibility=new QR(r),this.materialDataBuffer=e.getBuffer(r),this.materialDataIndices=new Uint16Array(r);for(let i=0;i<r;i++)this.materialDataIndices[i]=this.materialDataBuffer.acquireIndex()}dispose(){super.dispose();for(let e=0;e<this.count;e++)this.materialDataBuffer.releaseIndex(this.materialDataIndices[e])}get count(){return this.offsets.length-1}get geometryRanges(){return Object(z["j"])(this.cachedGeometryRanges)&&(this.cachedGeometryRanges=this.visibility.computeOffsetRanges(this.offsets)),this.cachedGeometryRanges}get highlightRanges(){return Object(z["j"])(this.highlightCounts)?null:(this._updateCachedHighlightRanges(),this.cachedHighlightRanges)}get defaultShadowMapRanges(){return Object(z["j"])(this.highlightCounts)?this.geometryRanges:(this._updateCachedHighlightRanges(),this.cachedDefaultRanges)}highlightsDirty(){this.cachedHighlightRanges=null,this.cachedDefaultRanges=null}visibilityDirty(){this.cachedGeometryRanges=null,this.highlightsDirty()}_updateCachedHighlightRanges(){if((Object(z["j"])(this.cachedHighlightRanges)||Object(z["j"])(this.cachedDefaultRanges))&&Object(z["k"])(this.highlightCounts)){const{highlightRanges:e,defaultRanges:t}=tM(this.highlightCounts,this.visibility,this.offsets);this.cachedHighlightRanges=e,this.cachedDefaultRanges=t}}}function tM(e,t,r){const i=[],n=[];let a=r.length,s=r.length;return t.forEachComponent(t=>(e[t]>0?(a!==t-1&&(i.length&&i.push(r[a+1]-i[i.length-1]),i.push(r[t])),a=t):(s!==t-1&&(n.length&&n.push(r[s+1]-n[n.length-1]),n.push(r[t])),s=t),!0)),i.length&&i.push(r[a+1]-i[i.length-1]),n.length&&n.push(r[s+1]-n[n.length-1]),{highlightRanges:i,defaultRanges:n}}var rM=r("bff6");function iM(e){return"function"==typeof e}function nM(e,t,r,i){if(r>=t)return e;null==e&&(e=sM());const n=e.isVisibleBit;let a=e.data;const s=cM(a),o=r/s|0,c=r-s*o,l=(t-1)/s|0,u=a,d=i===n;if(!(r<u.length*s)&&d){const e=1.5,t=o+1,r=Math.ceil(u.length*e),i=l+1;let n=Math.max(t,r);n=Math.min(n,i),a=new Uint32Array(n),a.set(u)}return o<a.length&&(a[o]=lM(a[o],c,d)),e.data=a,e}function aM(e,t){if(null==e)return!0;const{isVisibleBit:r,data:i}=e,n=cM(i);return t<i.length*n?oM(r,i,t,n):!e.isVisibleBit}function sM(e=!0){return{isVisibleBit:!e,data:new Uint32Array(0)}}function oM(e,t,r,i){const n=r/i|0,a=r-n*i;return uM(t[n],a)===e}function cM(e){const t=8;return e.BYTES_PER_ELEMENT*t}function lM(e,t,r){return e&~(1<<t)|(r?1:0)<<t}function uM(e,t){return 0!=(e&1<<t)}var dM=r("1038");class hM{constructor(e,t){this._indices=Object(z["k"])(e.indices)?e.indices:Object(dM["d"])(e.positions.length/3),this._positions=new lC["u"](e.positions),this._components=t,this._componentIntersectionData=new Array(t.count)}getComponentAabb(e,t){if(Object(z["k"])(this._perComponentAabbs)){for(let r=0;r<6;r++)t[r]=this._perComponentAabbs[6*e+r];return t}return this._computePerComponentAabbs(),this.getComponentAabb(e,t)}getComponentPositions(e,t){t.indices=this._indices,t.data=this._positions.typedBuffer,t.stride=this._positions.typedBufferStride,t.startIndex=this._components.offsets[e],t.endIndex=this._components.offsets[e+1]}intersect(e,t,r,i,n,a){const s={data:this._positions.typedBuffer,stride:this._positions.typedBufferStride,size:3},o=this._indices,c=this._components.offsets,l=Object(iA["c"])(e,t,pM);this._components.visibility.forEachComponent(u=>{if(!aM(this._components.pickability,u))return!0;const d=this.getComponentAabb(u,fM);if(Object(z["k"])(n)&&n.applyToAabb(d),!Object(iA["f"])(d,e,l,r))return!0;const h=c[u]/3,p=c[u+1]/3,f=(e,t,r)=>{a(u,e,Object($o["z"])(t,t,i),r)},b=p-h;return Object(z["j"])(n)&&b>LC?(null==this._componentIntersectionData[u]&&(this._componentIntersectionData[u]=new VC(this._indices,h,p,s)),this._componentIntersectionData[u].intersectRay({r0:e,r1:t},f)):Object(iA["j"])(e,t,h,p,o,s,void 0,n,f),!0})}_computePerComponentAabbs(){const e=this._components.count;this._perComponentAabbs=new Float32Array(6*e);for(let t=0;t<e;t++)this._computeAABB(t)}_computeAABB(e){const t=this._indices,r=this._positions,i=this._components.offsets,n=i[e],a=i[e+1],s=[0,0,0],o=[1/0,1/0,1/0],c=[-1/0,-1/0,-1/0];for(let u=n;u<a;u++){const e=t[u];r.getVec(e,s),Object($o["a"])(o,o,s),Object($o["b"])(c,c,s)}let l=6*e;this._perComponentAabbs[l++]=o[0],this._perComponentAabbs[l++]=o[1],this._perComponentAabbs[l++]=o[2],this._perComponentAabbs[l++]=c[0],this._perComponentAabbs[l++]=c[1],this._perComponentAabbs[l]=c[2]}get positions(){return this._positions}get indices(){return this._indices}}const pM=Object(ju["f"])(),fM=Object(Uj["h"])();class bM{constructor(e,t,r,i){this.material=e,this.drawParameters=t,this.geometry=r,this.meta=i}dispose(){this.material.dispose(),this.geometry.dispose()}}class mM extends zR["a"]{constructor(e,t,r,i){super(),this.primitiveType=t,this.parameters=r,this.indexed=i,this.vao=e}}Object(l["a"])([Object(zR["c"])()],mM.prototype,"vao",void 0);var gM=r("04f0"),yM=r("b139");function OM(e,t){return{near:e,far:t}}function vM(e){return e?_M(e,1/0,-1/0):OM(1/0,-1/0)}function _M(e,t,r){return e.near=t,e.far=r,e}function jM(e,t,r=e){return r.near=Math.min(e.near,t.near),r.far=Math.max(e.far,t.far),r}function wM(e,t){return e.near<=t&&t<=e.far}const xM={near:0,far:0};function TM(e,t){const r=vM(),{eye:i,frustum:n,viewForward:a}=e;t.forAll(e=>{const t=e.obb,s=Object($o["j"])(Object($o["B"])(BM,t.center,i),a),o=Object(YR["k"])(t,a);if(wM(r,s-o)&&wM(r,s+o))return;const c=kM(t,n);if(-1===c)return;if(0===c)return EM.far=s+o,EM.near=s-o,void jM(r,EM);const l=SM.pushNew();l.near=s-o,l.far=s+o,l.mask=c,l.object=e});for(let s=0;s<SM.length;s++){const e=SM.data[s];if(wM(r,e.near)&&wM(r,e.far))continue;EM.far=e.far,EM.near=1/0;const t=LM(e.object.obb,i,RM,t=>{let r=MM;for(let i=0;i<FM&&t.length>0;i++){if(0==(e.mask&1<<i))continue;PM(n[i],t,r);const a=t;t=r,r=a}for(let e=0;e<t.length;e+=3){Object($o["y"])(AM,t.data[e+0],t.data[e+1],t.data[e+2]);const r=Object($o["j"])(Object($o["B"])(AM,AM,i),a);EM.near=Math.min(EM.near,r)}});0===t&&(EM.near=0),jM(r,EM)}return SM.length=0,r}const SM=new k_["a"]({allocator:e=>e||{near:1/0,far:-1/0,mask:0,object:null},deallocator:e=>(e.object=null,e)}),EM=vM(),AM=Object(ju["f"])(),CM=Object(ju["f"])(),RM=new k_["a"]({deallocator:null}),MM=new k_["a"]({deallocator:null});function PM(e,t,r){r.length=0;const i=t.length-3;IM(AM,t,i);const n=Object(Ag["v"])(e,AM);n<=0&&(r.push(AM[0]),r.push(AM[1]),r.push(AM[2]));let a=0,s=n;for(;a<i;a+=3){IM(CM,t,a);const i=Object(Ag["v"])(e,CM);s*i<0&&(Object($o["k"])(AM,CM,AM,i/(i-s)),DM(r,AM)),i<=0&&DM(r,CM),s=i,Object($o["m"])(AM,CM)}s*n<0&&(IM(CM,t,i),Object($o["k"])(AM,CM,AM,n/(n-s)),DM(r,AM))}function IM(e,t,r){return Object($o["y"])(e,t.data[r+0],t.data[r+1],t.data[r+2])}function DM(e,t){e.push(t[0]),e.push(t[1]),e.push(t[2])}function LM(e,t,r,i){Object(gM["b"])(zM,e.quaternion),Object($o["B"])(BM,t,e.center),Object($o["w"])(BM,BM,zM);const n=8*((BM[0]<-e.halfSize[0]?-1:BM[0]>e.halfSize[0]?1:0)+3*(BM[1]<-e.halfSize[1]?-1:BM[1]>e.halfSize[1]?1:0)+9*(BM[2]<-e.halfSize[2]?-1:BM[2]>e.halfSize[2]?1:0)+13),a=NM[n];if(0===a)return a;Object(To["h"])(UM,e.quaternion),Object(To["d"])(UM,UM,e.halfSize);const s=(t,r)=>{const i=NM[n+r+1];return Object($o["y"])(t,((1&i)<<1)-1,(2&i)-1,((4&i)>>1)-1),Object($o["z"])(t,t,UM),Object($o["h"])(t,e.center,t)};return r.length=0,DM(r,s(VM,0)),DM(r,s(GM,1)),DM(r,s(BM,2)),DM(r,s(HM,3)),i(r),1===a||(r.length=0,DM(r,VM),DM(r,HM),DM(r,s(BM,4)),DM(r,s(qM,5)),i(r),2===a||(r.length=0,DM(r,VM),DM(r,qM),DM(r,s(BM,6)),DM(r,GM),i(r))),a}const NM=(()=>{const e=new Int8Array(216);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=8};return r([3,0,6,2,3,1,5,4]),r([2,0,2,3,1,5,4,0]),r([3,1,0,2,3,7,5,4]),r([2,0,1,3,2,6,4,0]),r([1,0,1,3,2,0,0,0]),r([2,1,5,7,3,2,0,0]),r([3,2,0,1,3,7,6,4]),r([2,2,0,1,3,7,6,0]),r([3,3,0,1,5,7,6,2]),r([2,0,1,5,4,6,2,0]),r([1,0,1,5,4,0,0,0]),r([2,1,3,7,5,4,0,0]),r([1,0,2,6,4,0,0,0]),r([0,0,0,0,0,0,0,0]),r([1,1,3,7,5,0,0,0]),r([2,2,3,7,6,4,0,0]),r([1,2,3,7,6,0,0,0]),r([2,3,1,5,7,6,2,0]),r([3,4,0,1,5,7,6,2]),r([2,5,7,6,4,0,1,0]),r([3,5,0,1,3,7,6,4]),r([2,4,5,7,6,2,0,0]),r([1,4,5,7,6,0,0,0]),r([2,5,1,3,7,6,4,0]),r([3,6,0,2,3,7,5,4]),r([2,6,2,3,7,5,4,0]),r([3,7,6,2,3,1,5,4]),e})(),FM=4;function kM(e,t){let r=0;for(let i=0;i<FM;i++){const n=Object(YR["g"])(e,t[i]);if(n>0)return-1;0===n&&(r|=1<<i)}return r}const UM=Object(wh["b"])(),zM=Object(yM["b"])(),BM=Object(ju["f"])(),VM=Object(ju["f"])(),GM=Object(ju["f"])(),HM=Object(ju["f"])(),qM=Object(ju["f"])();class WM{constructor(e){this._objects=e}submit(e,t){this._objects.preSubmit(t),this._objects.visibleObjects.forAll(t=>t.renderable.material.submit(e,t))}queryShadowCasterDepthRange(e){return this._objects.visibleObjects.length?TM(e,this._objects.visibleObjects):null}}var $M,ZM,XM=r("7752"),YM=r("7304"),JM=r("e66f"),QM=r("21ed"),KM=r("bc40");!function(e){e[e.Material=0]="Material",e[e.ShadowMap=1]="ShadowMap",e[e.Highlight=2]="Highlight"}($M||($M={})),function(e){e[e.Color=0]="Color",e[e.Alpha=1]="Alpha",e[e.Depth=2]="Depth",e[e.Normal=3]="Normal"}(ZM||(ZM={}));class eP{constructor(){this.viewTransform=new KM["c"],this.slicePlane=Object(xu["d"])()}}class tP extends eP{constructor(){super(...arguments),this.identifier=$M.Material,this.slicePlaneEnabled=!0,this.transparent=!1,this.integratedMesh=!1,this.transformNormalViewFromGlobal=Object(wh["b"])(),this.nearFar=Object(vo["b"])(),this.inverseViewport=Object(vo["b"])(),this.ambientOcclusionEnabled=!0,this.shadowsEnabled=!0,this.hasFillLights=!0,this.sceneHasOcludees=!1,this.transparencyPassType=LS["l"].NONE}}class rP extends eP{constructor(){super(...arguments),this.identifier=$M.ShadowMap,this.nearFar=Object(vo["b"])()}}class iP extends eP{constructor(){super(...arguments),this.identifier=$M.Highlight,this.inverseViewport=Object(vo["b"])(),this.viewport=Object(Xd["e"])()}}var nP,aP,sP=r("c332"),oP=r("dfaf"),cP=r("6a07"),lP=r("aab5"),uP=r("6a21"),dP=r("7c7f"),hP=r("7438");class pP extends uh["a"]{bindPass(e){const t=this.program;Object(KM["e"])(t,e.viewTransform),Object(KC["b"])(this.program,this.configuration,e.slicePlane),e.identifier===$M.Material&&(void 0!==e.ssrParams&&Object(eR["b"])(this.program,e.ssrParams),t.setUniformMatrix3fv("transformNormalViewFromGlobal",e.transformNormalViewFromGlobal),e.subPass===ZM.Depth&&t.setUniform2fv("nearFar",e.nearFar),e.subPass===ZM.Color&&e.lighting.setUniforms(this.program,e.integratedMesh,e.hasFillLights)),e.identifier===$M.ShadowMap&&this.program.setUniform2fv("nearFar",e.nearFar)}bindMaterial(e,t){this._material=e;const r=this.program;r.setUniform4fv("baseColor",e.baseColor),r.setUniform1f("objectOpacity",e.objectOpacity),r.setUniform1f("textureAlphaCutoff",e.alphaCutoff),e.componentParameters.type===YM["b"].Varying?e.componentParameters.texture.bind(r,"componentColorTex","componentColorTexInvDim"):(r.setUniform4fv("externalColor",e.componentParameters.externalColor),r.setUniform1i("externalColorMixMode",e.componentParameters.externalColorMixMode)),Object(z["k"])(e.baseColorTexture)&&e.baseColorTexture.bind(r,"baseColorTexture","baseColorTextureSize"),this.configuration.output!==QC["a"].Color&&this.configuration.output!==QC["a"].Alpha||(Object(iR["d"])(this.program,e,this.configuration.isSchematic),Object(z["k"])(e.metallicRoughnessTexture)&&e.metallicRoughnessTexture.bind(r,"texMetallicRoughness","texMetallicRoughnessSize"),Object(z["k"])(e.emissionTexture)&&e.emissionTexture.bind(r,"texEmission","texEmissionSize"),Object(z["k"])(e.occlusionTexture)&&e.occlusionTexture.bind(r,"texOcclusion","texOcclusionSize"),Object(z["k"])(e.normalTexture)&&e.normalTexture.bind(r,"normalTexture","normalTextureSize")),e.isIntegratedMesh&&(t.identifier===$M.Material&&t.subPass===ZM.Color?(r.bindTexture(e.overlayColor,"ovColorTex"),r.bindTexture(e.overlayNormal,"ovNormalTex")):t.identifier===$M.Highlight&&r.bindTexture(e.overlayHighlight,"ovColorTex"),r.setUniform1f("overlayOpacity",1)),t.identifier===$M.Highlight&&Object(cP["b"])(this.program,t),t.identifier===$M.Material&&t.subPass===ZM.Color&&(t.ambientOcclusionEnabled&&t.bindAmbientOcclusion(r),t.shadowsEnabled&&t.bindShadowMap(r)),t.identifier!==$M.Material||t.subPass!==ZM.Color&&t.subPass!==ZM.Alpha||!t.multipassTerrainParams.multipassTerrainEnabled||(this.program.setUniform2fv("nearFar",t.nearFar),r.setUniform2fv("inverseViewport",t.inverseViewport),t.multipassTerrainParams.terrainLinearDepthTexture&&r.bindTexture(t.multipassTerrainParams.terrainLinearDepthTexture,"terrainDepthTexture"))}bindDraw(e){if(Object(KM["d"])(this.program,e),this.program.setUniformMatrix3fv("transformNormalGlobalFromModel",e.transformNormalGlobalFromModel),this.program.rebindTextures(),Object(z["k"])(this._material)&&this._material.isIntegratedMesh){const t=this._material.overlayTexScale,r=this._material.overlayTexOffset;this.program.setUniform4fv("overlayTexOffset",[e.toMapSpace[0]*t[0]+r[0],e.toMapSpace[1]*t[1]+r[1],e.toMapSpace[0]*t[2]+r[2],e.toMapSpace[1]*t[3]+r[3]]),this.program.setUniform4fv("overlayTexScale",[e.toMapSpace[2]*t[0],e.toMapSpace[3]*t[1],e.toMapSpace[2]*t[2],e.toMapSpace[3]*t[3]])}}initializeProgram(e){const t=pP.shader.get(),r=this.configuration,i=t.build({multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround,oitEnabled:r.transparencyPassType===LS["l"].Color,output:r.output,normalType:r.integratedMeshMode===aP.None?r.hasNormals?sP["b"].CompressedAttribute:sP["b"].ScreenDerivative:sP["b"].Ground,attributeColor:r.hasVertexColors,attributeTextureCoordinates:r.vertexTextureCoordinates,componentData:r.componentData,alphaDiscardMode:r.alphaDiscardMode,baseColorTexture:r.baseColorTexture,doubleSidedMode:r.doubleSidedMode,receiveAmbientOcclusion:r.receiveAmbientOcclusion,receiveShadows:r.receiveShadows,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,viewingMode:e.viewingMode,vertexDiscardMode:r.vertexDiscardMode,pbrMode:r.integratedMeshMode===aP.ColorOverlayWithWater?iR["a"].WaterOnIntegratedMesh:r.usePBR?r.isSchematic?iR["a"].Schematic:iR["a"].Normal:iR["a"].Disabled,hasMetalnessAndRoughnessTexture:r.hasMetalnessAndRoughnessTexture,hasEmissionTexture:r.hasEmissionTexture,hasOcclusionTexture:r.hasOcclusionTexture,hasNormalTexture:r.hasNormalTexture,vertexTangents:!1,supportsTextureAtlas:!0,doublePrecisionRequiresObfuscation:Object(uP["b"])(e.rctx),overlayEnabled:r.integratedMeshMode===aP.ColorOverlay||r.integratedMeshMode===aP.ColorOverlayWithWater,ssrEnabled:r.ssrEnabled,highStepCount:!1,ellipsoidMode:r.ellipsoidMode});return new ph["a"](e.rctx,i,t.attributeLocations)}_setPipelineState(e){const t=this.configuration,r=t.integratedMeshMode!==aP.None,i=e===LS["l"].NONE,n=e===LS["l"].FrontFace;return Object(bh["g"])({blending:t.output!==QC["a"].Color&&t.output!==QC["a"].Alpha||!t.blendingEnabled?null:i?hP["d"]:Object(hP["f"])(e),culling:Object(bh["c"])(t.cullFace),depthTest:{func:Object(hP["g"])(e)},depthWrite:i||n?bh["e"]:null,colorWrite:bh["d"],stencilWrite:r||t.sceneHasOcludees?aR["j"]:null,stencilTest:r?Object(aR["d"])(LS["k"].IntegratedMeshMaskExcluded):t.sceneHasOcludees?aR["e"]:null,polygonOffset:i||n?t.polygonOffsetEnabled?{factor:2,units:2}:null:hP["a"]})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}pP.shader=new lh["a"](JM["a"],()=>r.e("chunk-2d0c8f4a").then(r.bind(null,"56a4")));class fP extends KM["b"]{constructor(){super(...arguments),this.transformNormalGlobalFromModel=Object(wh["b"])(),this.toMapSpace=Object(Xd["e"])()}}!function(e){e[e.None=0]="None",e[e.Transparent=1]="Transparent",e[e.Opaque=2]="Opaque",e[e.COUNT=3]="COUNT"}(nP||(nP={})),function(e){e[e.None=0]="None",e[e.NoOverlay=1]="NoOverlay",e[e.ColorOverlay=2]="ColorOverlay",e[e.ColorOverlayWithWater=3]="ColorOverlayWithWater",e[e.COUNT=4]="COUNT"}(aP||(aP={}));class bP extends dh["a"]{constructor(){super(...arguments),this.output=QC["a"].Color,this.hasVertexColors=!1,this.hasNormals=!1,this.vertexTextureCoordinates=oP["b"].None,this.componentData=YM["b"].Uniform,this.slicePlaneEnabled=!1,this.cullFace=LS["c"].Back,this.baseColorTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.vertexDiscardMode=QM["b"].None,this.doubleSidedMode=lP["b"].WindingOrder,this.blendingEnabled=!0,this.alphaDiscardMode=LS["a"].Opaque,this.integratedMeshMode=aP.None,this.ssrEnabled=!1,this.polygonOffsetEnabled=!1,this.usePBR=!1,this.isSchematic=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.sceneHasOcludees=!1,this.transparencyPassType=LS["l"].NONE,this.ellipsoidMode=dP["a"].Earth,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(l["a"])([Object(dh["b"])({count:QC["a"].COUNT})],bP.prototype,"output",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"hasVertexColors",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"hasNormals",void 0),Object(l["a"])([Object(dh["b"])({count:oP["b"].COUNT})],bP.prototype,"vertexTextureCoordinates",void 0),Object(l["a"])([Object(dh["b"])({count:YM["b"].COUNT})],bP.prototype,"componentData",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"slicePlaneEnabled",void 0),Object(l["a"])([Object(dh["b"])({count:LS["c"].COUNT})],bP.prototype,"cullFace",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"baseColorTexture",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"receiveAmbientOcclusion",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"receiveShadows",void 0),Object(l["a"])([Object(dh["b"])({count:QM["b"].COUNT})],bP.prototype,"vertexDiscardMode",void 0),Object(l["a"])([Object(dh["b"])({count:lP["b"].COUNT})],bP.prototype,"doubleSidedMode",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"blendingEnabled",void 0),Object(l["a"])([Object(dh["b"])({count:LS["a"].COUNT})],bP.prototype,"alphaDiscardMode",void 0),Object(l["a"])([Object(dh["b"])({count:aP.COUNT})],bP.prototype,"integratedMeshMode",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"ssrEnabled",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"polygonOffsetEnabled",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"usePBR",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"isSchematic",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"hasMetalnessAndRoughnessTexture",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"hasEmissionTexture",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"hasOcclusionTexture",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"hasNormalTexture",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"sceneHasOcludees",void 0),Object(l["a"])([Object(dh["b"])({count:LS["l"].COUNT})],bP.prototype,"transparencyPassType",void 0),Object(l["a"])([Object(dh["b"])({count:dP["a"].COUNT})],bP.prototype,"ellipsoidMode",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"multipassTerrainEnabled",void 0),Object(l["a"])([Object(dh["b"])()],bP.prototype,"cullAboveGround",void 0);class mP{constructor(){this._dirty=!0}_setDirty(){this._dirty=!0}_setClean(){if(this._dirty=!1,null!=this._parameterBlocks)for(const e of this._parameterBlocks)this[e]._setClean()}get dirty(){return this._dirty||this._checkParameterBlocksDirty()}_checkParameterBlocksDirty(){if(null==this._parameterBlocks)return!1;for(const e of this._parameterBlocks)if(this[e].dirty)return!0;return!1}}class gP{constructor(){this._dirty=!0}_setDirty(){this._dirty=!0}_setClean(){this._dirty=!1}get dirty(){return this._dirty}}function yP(e={}){return(t,r)=>{var i;const n=null!=(i=t._parameterCount)?i:0;if(t._parameterCount=n+1,e.vectorOps){const i=e.vectorOps;Object.defineProperty(t,r,{get(){return this[n]},set(e){const t=this[n];if(null==t)this[n]=e;else{if(i.equals(t,e))return;i.copy(t,e)}this._setDirty()}})}else Object.defineProperty(t,r,{get(){return this[n]},set(t){this[n]!==t&&(e.dispose&&this[n]&&this[n].dispose(),this[n]=t,this._setDirty())}})}}function OP(){return(e,t)=>{var r;const i=null!=(r=e._parameterCount)?r:0;e._parameterCount=i+1,e._parameterBlocks=e._parameterBlocks||[],e._parameterBlocks.push(i),Object.defineProperty(e,t,{get(){return this[i]},set(e){this[i]!==e&&(this[i]=e,this._setDirty())}})}}var vP,_P,jP,wP=r("ebd5");class xP extends mP{constructor(){super(...arguments),this.baseColor=Object(KT["c"])(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=Object(xh["d"])(1,1,.5),this.emissiveFactor=Object(xh["d"])(0,0,0),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null,this.overlayTexOffset=Object(Xd["g"])(-1,-1,-1,-1),this.overlayTexScale=Object(Xd["g"])(0,0,0,0),this.overlayColor=null,this.overlayHighlight=null,this.overlayNormal=null,this.objectOpacity=1,this.commonMaterialParameters=new TP,this.componentParameters=new SP,this.alphaCutoff=wP["b"],this.alphaDiscardMode=LS["a"].Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=dP["a"].Earth,this.sceneHasOcludees=!1,this._techniqueConfig=new bP}dispose(){this._technique=Object(z["r"])(this._technique),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}prepareTechnique(e,t,r){const i=this._techniqueConfig;if(i.hasVertexColors=r.colors,i.hasNormals=r.normals,i.vertexTextureCoordinates=r.textureCoordinates,i.usePBR=this.usePBR,i.hasMetalnessAndRoughnessTexture=Object(z["k"])(this.metallicRoughnessTexture),i.hasEmissionTexture=Object(z["k"])(this.emissionTexture),i.hasOcclusionTexture=Object(z["k"])(this.occlusionTexture),i.hasNormalTexture=Object(z["k"])(this.normalTexture),i.transparencyPassType=t.identifier===$M.Material&&null!=t.transparencyPassType?t.transparencyPassType:LS["l"].NONE,i.multipassTerrainEnabled=t.identifier===$M.Material&&null!=t.multipassTerrainParams&&t.multipassTerrainParams.multipassTerrainEnabled,i.cullAboveGround=t.identifier===$M.Material&&null!=t.multipassTerrainParams&&t.multipassTerrainParams.cullAboveGround,i.ellipsoidMode=this.ellipsoidMode,this.dirty){i.componentData=this.componentParameters.type,i.cullFace=this.commonMaterialParameters.cullFace,i.doubleSidedMode=this.commonMaterialParameters.doubleSided?lP["b"].View:lP["b"].None,i.baseColorTexture=Object(z["k"])(this.baseColorTexture),i.isSchematic=this.hasParametersFromSource&&!Object(z["k"])(this.baseColorTexture);const e=this._computeWhichMaterialPass();i.blendingEnabled=e===_P.Transparent||e===_P.OpaqueAndTransparent,i.alphaDiscardMode=this.alphaDiscardMode,i.integratedMeshMode=this.isIntegratedMesh?this.overlayColor?this.overlayNormal?aP.ColorOverlayWithWater:aP.ColorOverlay:aP.NoOverlay:aP.None,i.polygonOffsetEnabled=this.polygonOffsetEnabled,this._setClean()}return i.slicePlaneEnabled=t.slicePlaneEnabled&&this.commonMaterialParameters.slicePlaneEnabled,t.identifier===$M.ShadowMap?(i.output=QC["a"].Shadow,i.vertexDiscardMode=QM["b"].None):t.identifier===$M.Highlight?(i.output=QC["a"].Highlight,i.vertexDiscardMode=QM["b"].None):(this._computeWhichMaterialPass()===_P.OpaqueAndTransparent?i.vertexDiscardMode=t.transparent?QM["b"].Opaque:QM["b"].Transparent:i.vertexDiscardMode=QM["b"].None,i.output=AP(t.subPass),t.subPass===ZM.Alpha&&(i.sceneHasOcludees=t.sceneHasOcludees),t.subPass===ZM.Color?(i.receiveAmbientOcclusion=t.ambientOcclusionEnabled,i.sceneHasOcludees=t.sceneHasOcludees,i.receiveShadows=t.shadowsEnabled,i.ssrEnabled=t.ssrParams.ssrEnabled):(i.receiveAmbientOcclusion=!1,i.receiveShadows=!1)),this._technique=e.releaseAndAcquire(pP,i,this._technique),this._technique}submit(e,t){if(0===this.objectOpacity)return;const r=t.renderable.geometry,i=t.components,n=t.renderable.drawParameters,a=t.renderable.meta.cameraDepthSquared,s=i.geometryRanges,o=i.highlightRanges,c=i.defaultShadowMapRanges;switch(this._computeWhichMaterialPass()){case _P.Opaque:e.materialOpaque.submitDraw(this,r,s,n,a);break;case _P.Transparent:e.materialTransparent.submitDraw(this,r,s,n,a);break;case _P.OpaqueAndTransparent:e.materialOpaque.submitDraw(this,r,s,n,a),e.materialTransparent.submitDraw(this,r,s,n,a);break;case _P.IntegratedMesh:e.materialIntegratedMesh.submitDraw(this,r,s,n,a),this.overlayHighlight&&e.highlightIntegratedMesh.submitDraw(this,r,s,n,a)}const l=this.componentParameters.castShadows!==jP.None;l&&e.shadowMap.submitDraw(this,r,s,n,a),Object(z["k"])(o)&&(e.highlight.submitDraw(this,r,o,n,a),l&&e.highlightShadowMap.submitDraw(this,r,o,n,a)),l&&Object(z["k"])(c)&&e.defaultShadowMap.submitDraw(this,r,c,n,a)}get attributeLocations(){return JM["b"]}_computeWhichMaterialPass(){return this.isIntegratedMesh?_P.IntegratedMesh:this.objectOpacity<1?_P.Transparent:this.componentParameters.opaqueOverride===jP.All?_P.Opaque:this.baseColor[3]<1||this.alphaDiscardMode===LS["a"].Blend||this.alphaDiscardMode===LS["a"].MaskBlend?_P.Transparent:this.componentParameters.transparent===jP.None?_P.Opaque:this.componentParameters.transparent===jP.All?_P.Transparent:_P.OpaqueAndTransparent}}Object(l["a"])([yP({vectorOps:U_["n"]})],xP.prototype,"baseColor",void 0),Object(l["a"])([yP()],xP.prototype,"usePBR",void 0),Object(l["a"])([yP()],xP.prototype,"hasParametersFromSource",void 0),Object(l["a"])([yP({vectorOps:$o["c"]})],xP.prototype,"mrrFactors",void 0),Object(l["a"])([yP({vectorOps:$o["c"]})],xP.prototype,"emissiveFactor",void 0),Object(l["a"])([yP({dispose:!0})],xP.prototype,"baseColorTexture",void 0),Object(l["a"])([yP({dispose:!0})],xP.prototype,"metallicRoughnessTexture",void 0),Object(l["a"])([yP({dispose:!0})],xP.prototype,"emissionTexture",void 0),Object(l["a"])([yP({dispose:!0})],xP.prototype,"occlusionTexture",void 0),Object(l["a"])([yP({dispose:!0})],xP.prototype,"normalTexture",void 0),Object(l["a"])([yP({vectorOps:{equals:U_["g"],copy:U_["c"]}})],xP.prototype,"overlayTexOffset",void 0),Object(l["a"])([yP({vectorOps:{equals:U_["g"],copy:U_["c"]}})],xP.prototype,"overlayTexScale",void 0),Object(l["a"])([yP()],xP.prototype,"overlayColor",void 0),Object(l["a"])([yP()],xP.prototype,"overlayHighlight",void 0),Object(l["a"])([yP()],xP.prototype,"overlayNormal",void 0),Object(l["a"])([yP()],xP.prototype,"objectOpacity",void 0),Object(l["a"])([OP()],xP.prototype,"commonMaterialParameters",void 0),Object(l["a"])([OP()],xP.prototype,"componentParameters",void 0),Object(l["a"])([yP()],xP.prototype,"alphaCutoff",void 0),Object(l["a"])([yP()],xP.prototype,"alphaDiscardMode",void 0),Object(l["a"])([yP()],xP.prototype,"isIntegratedMesh",void 0),Object(l["a"])([yP()],xP.prototype,"polygonOffsetEnabled",void 0),Object(l["a"])([yP()],xP.prototype,"ellipsoidMode",void 0),Object(l["a"])([yP()],xP.prototype,"sceneHasOcludees",void 0),function(e){e[e.VERTEX=0]="VERTEX",e[e.GROUND=1]="GROUND",e[e.SCREEN_DERIVATIVE=2]="SCREEN_DERIVATIVE"}(vP||(vP={})),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(_P||(_P={}));class TP extends gP{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=LS["c"].Back,this.slicePlaneEnabled=!0}}Object(l["a"])([yP()],TP.prototype,"doubleSided",void 0),Object(l["a"])([yP()],TP.prototype,"cullFace",void 0),Object(l["a"])([yP()],TP.prototype,"slicePlaneEnabled",void 0);class SP extends gP{constructor(){super(...arguments),this.externalColor=Object(KT["c"])(1,1,1,1),this.externalColorMixMode=XR["a"].Multiply,this.castShadows=jP.All}get transparent(){return this.externalColor[3]<1?jP.All:jP.None}get opaqueOverride(){return this.externalColorMixMode===XR["a"].Replace&&1===this.externalColor[3]?jP.All:jP.None}get visible(){return this.externalColor[3]>0?jP.All:jP.None}get type(){return YM["b"].Uniform}}Object(l["a"])([yP({vectorOps:U_["n"]})],SP.prototype,"externalColor",void 0),Object(l["a"])([yP()],SP.prototype,"externalColorMixMode",void 0),Object(l["a"])([yP()],SP.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(jP||(jP={}));class EP extends gP{constructor(){super(...arguments),this.texture=null,this.transparent=jP.None,this.opaqueOverride=jP.None,this.castShadows=jP.None}get type(){return YM["b"].Varying}}function AP(e){switch(e){case ZM.Color:return QC["a"].Color;case ZM.Alpha:return QC["a"].Alpha;case ZM.Depth:return QC["a"].Depth;case ZM.Normal:return QC["a"].Normal}}Object(l["a"])([yP()],EP.prototype,"texture",void 0),Object(l["a"])([yP()],EP.prototype,"transparent",void 0),Object(l["a"])([yP()],EP.prototype,"opaqueOverride",void 0),Object(l["a"])([yP()],EP.prototype,"castShadows",void 0);class CP{constructor(e){this._low=Object(xh["c"])(),this._high=Object(xh["c"])(),e&&this.set(e)}get low(){return this._low}get high(){return this._high}set(e){const t=this._low,r=this._high;Object($o["m"])(t,e),Object($o["B"])(r,e,t)}setElements(e,t,r){Object($o["y"])(RP,e,t,r),this.set(RP)}get(e){return Object($o["h"])(e,this._low,this._high)}getLowScaled(e){return Object($o["g"])(e,this._low,1)}}const RP=Object(ju["f"])();class MP{constructor(e){this.maxCount=e,this._nextIndex=0,this.recycledIndices=[]}get activeCount(){return this._nextIndex-this.recycledIndices.length}get availableCount(){return this.recycledIndices.length+this.maxCount-this._nextIndex}acquire(){return this.recycledIndices.length>0?this.recycledIndices.pop():this.availableCount?this._nextIndex++:void 0}release(e){this.recycledIndices.push(e)}}class PP{constructor(e,t=1){this.rctx=e,this.fieldCount=t,this.textureWidth=4096,this.dirty=!0,this.texture=new Qh["a"](this.rctx,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,samplingMode:fh["z"].NEAREST,wrapMode:fh["B"].CLAMP_TO_EDGE,width:this.textureWidth,height:1,flipped:!1}),this.data=new lC["J"](new ArrayBuffer(4*this.textureWidth))}dispose(){this.texture.dispose(),this.texture=void 0,this.data=void 0}setData(e,t,r,i,n,a){const s=e*this.fieldCount+t;this.dirty=!0,this.data.set(s,0,r),this.data.set(s,1,i),this.data.set(s,2,n),this.data.set(s,3,a)}setDataElement(e,t,r,i){const n=e*this.fieldCount+t;this.dirty=!0,this.data.set(n,r,i)}resizeToFit(e){const t=e*this.fieldCount;if(t>=this.data.count){const e=Math.ceil((t+1)/this.textureWidth)*this.textureWidth,r=new lC["J"](new ArrayBuffer(4*e));r.typedBuffer.set(this.data.typedBuffer),this.data=r}}updateTexture(){if(!this.dirty)return;const e=this.texture.descriptor.width,t=this.texture.descriptor.height;this.data.count>e*t&&this.texture.resize(e,this.data.count/e),this.texture.setData(this.data.typedBuffer),this.dirty=!1}bind(e,t,r){e.bindTexture(this.texture,t),e.setUniform2f(r,1/this.texture.descriptor.width,1/this.texture.descriptor.height)}}const IP=65536;class DP{constructor(e,t=1){this.textureBuffer=new PP(e,t),this.indexManager=new MP(IP)}dispose(){this.textureBuffer.dispose(),this.textureBuffer=void 0}get availableCount(){return this.indexManager.availableCount}get activeCount(){return this.indexManager.activeCount}acquireIndex(){const e=this.indexManager.acquire();return this.textureBuffer.resizeToFit(e),e}releaseIndex(e){this.indexManager.release(e)}}class LP{constructor(e,t=1){this.rctx=e,this.fieldCount=t,this.buffers=[]}garbageCollect(){this.buffers=this.buffers.filter(e=>0!==e.activeCount||(e.dispose(),!1))}destroy(){this.buffers.forEach(e=>e.dispose()),this.buffers=[]}getBuffer(e){for(const r of this.buffers)if(r.availableCount>=e)return r;if(e>IP)return null;const t=new DP(this.rctx,this.fieldCount);return this.buffers.push(t),t}updateTextures(){for(const e of this.buffers)e.textureBuffer.updateTexture()}}const NP=v["a"].getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class FP{constructor(e){this._renderManager=e,this._objects=[new k_["a"],new k_["a"]],this._renderSubmit=new WM(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new LP(e.rctx)}dispose(){Object(fp["a"])(0===this._objects[rM["b"].Hidden].length&&0===this._objects[rM["b"].Visible].length,"ObjectCollection should be empty upon disposal"),this._componentBufferManager.destroy()}createObject(e){const t=new rM["a"];return t.toMapSpace=e.toMapSpace.slice(),t.transform=e.transform,t.obb=Object(YR["b"])(e.obb),t.components=new eM(this._componentBufferManager,e.geometry.componentOffsets),t.renderable=this._createRenderable(e,t.components),t.intersectionGeometry=new hM(e.geometry.positionData,t.components),this._objects[t.visible].push(t),t}destroyObject(e){const t=e;this._objects[t.visible].removeUnordered(t),t.dispose(),this._notifyDirty()}setObjectVisibility(e,t){const r=e;t!==r.visible&&(this._objects[r.visible].removeUnordered(r),this._objects[t].push(r),r.visible=t,this._notifyDirty())}preSubmit(e){const t=e.camera.eye;this.visibleObjects.forAll(e=>{const r=Object($o["n"])(t,e.obb.center);e.renderable.meta.cameraDepthSquared=r})}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const r=e.renderable.material;t(r),r.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const r=e;r.components.visibility.reset(t),r.components.visibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.components.visibility.forEachComponent(t)}getComponentCount(e){const t=e,r=t.components.visibility.componentCount();return{visible:r,invisible:t.components.count-r}}setComponentData(e,t){const r=e,i=r.renderable.material;if(iM(t)){const e=r.components,n=e.materialDataBuffer,a=e.materialDataIndices,s={castShadows:!0,pickable:!0,externalColor:Object(KT["b"])(),externalColorMixMode:XR["a"].Multiply},o=n.textureBuffer,c=new Uint8Array(4),l=new Uint32Array(c.buffer);let u=0,d=0,h=0,p=!1,f=0;for(let r=0;r<e.count;r++)t(r,s),u+=+(s.externalColor[3]<1),d+=+(s.externalColorMixMode===XR["a"].Replace&&1===s.externalColor[3]),h+=+s.castShadows,Object(XR["b"])(s.externalColor,s.externalColorMixMode,c),c[2]=254&c[2]|+s.castShadows,o.setData(a[r],0,c[0],c[1],c[2],c[3]),p=p||r>0&&f!==l[0],f=l[0],s.pickable!==aM(e.pickability,r)&&(e.pickability=nM(e.pickability,e.count,r,s.pickable));p?(i.componentParameters=new EP,i.componentParameters.castShadows=UP(h,e.count),i.componentParameters.transparent=UP(u,e.count),i.componentParameters.opaqueOverride=UP(d,e.count),i.componentParameters.texture=o,o.updateTexture()):(i.componentParameters=new SP,i.componentParameters.castShadows=s.castShadows?jP.All:jP.None,i.componentParameters.externalColor=s.externalColor,i.componentParameters.externalColorMixMode=s.externalColorMixMode)}else i.componentParameters=new SP,i.componentParameters.castShadows=t.castShadows?jP.All:jP.None,i.componentParameters.externalColor=t.externalColor,i.componentParameters.externalColorMixMode=t.externalColorMixMode;this._notifyDirty()}getComponentAabb(e,t,r){return e.intersectionGeometry.getComponentAabb(t,r)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,r){return e.intersectionGeometry.getComponentPositions(t,r)}intersect(e,t,r,i,n,a){const s=e;Object(z["k"])(n)&&(n.localOrigin=s.transform.position);const o=Object(To["e"])(zP,s.transform.rotationScale);Object($o["B"])(BP,t,s.transform.position),Object($o["B"])(VP,r,s.transform.position),Object($o["z"])(BP,BP,o),Object($o["z"])(VP,VP,o);const c=Object(To["p"])(zP,o);return s.intersectionGeometry.intersect(BP,VP,i,c,n,a)}addEdges(e,t,r,i){const n=e,{indices:a,positions:s}=n.intersectionGeometry,o=n.components.offsets;return t.addComponentObject(e,n.transform,{center:n.obb.center,radius:Object(YR["l"])(n.obb)},s,a,o,r,i)}addComponentHighlight(e,t){const r=e.components;Object(z["j"])(r.highlightCounts)&&(r.highlightCounts=new Uint32Array(r.count+1)),0===r.highlightCounts[t]++&&(r.highlightsDirty(),this._notifyDirty()),r.highlightCounts[r.count]++}removeComponentHighlight(e,t){const r=e.components;if(Object(z["j"])(r.highlightCounts))return void NP.warn("Removing non-existing highlight.");const i=r.highlightCounts[t],n=r.highlightCounts[r.count];if(0!==i){if(i>1)return r.highlightCounts[t]=i-1,void(r.highlightCounts[r.count]=n-1);r.highlightCounts[t]=0,r.highlightsDirty(),this._notifyDirty(),1===n?r.highlightCounts=null:r.highlightCounts[r.count]=n-1}else NP.warn("Removing non-existing highlight.")}clearHighlights(e){const t=e.components;Object(z["k"])(t.highlightCounts)&&(t.highlightCounts=null,t.highlightsDirty(),this._notifyDirty())}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._objects[rM["b"].Visible]}_createRenderable(e,t){const r=this._renderManager.rctx,i=e.geometry,n=i.vertices.layoutParameters,a=Jh["a"].createVertex(r,fh["D"].STATIC_DRAW,i.vertices.data),s=Object(z["b"])(i.indices,e=>Jh["a"].createIndex(r,fh["D"].STATIC_DRAW,e)),o=Object(Wh["a"])(Object(XM["a"])(n)),c=new Uint16Array(i.vertices.count);for(let g=0;g<t.count;g++){const e=t.offsets[g],r=t.offsets[g+1],n=t.materialDataIndices[g];if(Object(z["k"])(i.indices))for(let t=e;t<r;t++)c[i.indices[t]]=n;else for(let t=e;t<r;t++)c[t]=n}const l=Jh["a"].createVertex(r,fh["D"].STATIC_DRAW,c.buffer),u=new CP(e.transform.position),d=Object(So["a"])(e.transform.rotationScale);Object(To["e"])(d,d),Object(To["p"])(d,d);const h=new fP;Object($o["m"])(h.transformWorldFromModelTL,u.low),Object($o["m"])(h.transformWorldFromModelTH,u.high),Object(To["g"])(h.transformWorldFromModelRS,e.transform.rotationScale),Object(To["g"])(h.transformNormalGlobalFromModel,d),Object(U_["c"])(h.toMapSpace,e.toMapSpace);const p=new xP,f=new ep["a"](r,p.attributeLocations,{data:o,componentIndices:kP},{data:a,componentIndices:l},Object(z["t"])(s)),b=new mM(f,fh["r"].TRIANGLES,n,Object(z["k"])(s)),m={cameraDepthSquared:.5,gpuMemoryEstimate:a.byteSize+l.byteSize+(Object(z["k"])(s)?s.byteSize:0)};return new bM(p,h,b,m)}_notifyDirty(){this._renderManager.notifyDirty()}}const kP=Object(Wh["a"])(Object($h["a"])().u16(Yh["a"].COMPONENTINDEX));function UP(e,t){return e===t?jP.All:0===e?jP.None:jP.Some}const zP=Object(So["b"])(),BP=Object(ju["f"])(),VP=Object(ju["f"])();var GP=r("0e88"),HP=r("e508"),qP=r("079ae");class WP{constructor(e,t){this._rctx=e,this._techniqueRepository=t}dispose(){this._vao=Object(z["e"])(this._vao)}compositeTransparent(e,t,r,i=1){const n=this._rctx;$P.alphaMode=qP["a"].Alpha,$P.function=HP["a"].Transparency,$P.hasOpacityFactor=1!==i;const a=this._techniqueRepository.acquire(qP["b"],$P),s=n.useTechnique(a);s.bindTexture(e,"colorTexture"),s.bindTexture(t,"alphaTexture"),s.bindTexture(r,"frontFaceTexture");const o=this._ensureVAO();n.bindVAO(o),n.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(o,"geometry")),a.release()}composite(e,t=qP["a"].None,r=1,i=HP["a"].Standard,n=kE["b"].INNER){const a=this._rctx;$P.alphaMode=t,$P.function=i,$P.hasOpacityFactor=1!==r;const s=this._techniqueRepository.acquire(qP["b"],$P),o=a.useTechnique(s);o.bindTexture(e,"tex"),$P.hasOpacityFactor&&o.setUniform1f("opacity",r),i===HP["a"].OverlayWithTransparency&&o.setUniform1i("overlayIdx",n);const c=this._ensureVAO();a.bindVAO(c),a.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(c,"geometry")),s.release()}_ensureVAO(){return Object(z["j"])(this._vao)&&(this._vao=Object(Oh["d"])(this._rctx)),this._vao}}const $P=new qP["c"];var ZP=r("661c"),XP=r("0bde");const YP=1e4,JP=100,QP=500,KP=500,eI=.1;function tI(e,t,r){return Object(ZP["b"])(t,e)*(r[1]-r[0])+r[0]}function rI(e,t,r){if(t.size<YP)return gI.compute(e,t);const i=vM();return r.forAll(t=>{t.isVisible&&jM(i,iI(e,t))}),i}function iI(e,t){if(!t.isVisible)return;const r=vM(),i=t.getSpatialQueryAccelerator();return Object(z["k"])(i)?nI(r,e,i):aI(r,e,t.objects),r}function nI(e,t,r){const i=t.eye,n=t.viewForward,a=t.frustum,s=e=>e.isVisible,o=r.objectCount;if(o<QP)_M(bI,t.near,Math.min(e.near,t.far)),r.forEachInDepthRange(i,n,XP["a"].FRONT_TO_BACK,bI,(r,i)=>{sI(e,t,r),bI.far=e.near,i.setRange(bI)},a,s),_M(bI,Math.max(e.far,t.near),t.far),r.forEachInDepthRange(i,n,XP["a"].BACK_TO_FRONT,bI,(r,i)=>{sI(e,t,r),bI.near=e.far,i.setRange(bI)},a,s);else{const i=Math.max(Math.min(o,KP),Math.ceil(o*eI)),c=r.findClosest(n,XP["a"].FRONT_TO_BACK,a,s,i),l=r.findClosest(n,XP["a"].BACK_TO_FRONT,a,s,i);c&&l&&(cI(e,t,c.boundingVolumeWorldSpace.bounds),cI(e,t,l.boundingVolumeWorldSpace.bounds))}}function aI(e,t,r){mI.clear(),r.forAll(e=>{e.isVisible&&0!==e.geometryRecords.length&&mI.add(e)}),mI.empty||(mI.sort(t),_M(bI,t.near,Math.min(e.near,t.far)),mI.forEachInDepthRange(bI,XP["a"].FRONT_TO_BACK,(r,i)=>{i<e.near&&sI(e,t,r)}),_M(bI,Math.max(e.far,t.near),t.far),mI.forEachInDepthRange(bI,XP["a"].BACK_TO_FRONT,(t,r,i)=>{e.far=Math.max(e.far,i)}))}function sI(e,t,r){if(!r.isVisible)return;if(!Object(Uw["m"])(t.frustum,r.boundingVolumeWorldSpace.bounds))return;const i=r.transformation,n=fI;r.geometryRecords.forEach(r=>{Object(Qd["n"])(n,i,r.getShaderTransformation());const a=Object(Yu["i"])(n);oI(e,t,r.geometry.boundingInfo,n,a)})}function oI(e,t,r,i,n){if(Object(z["j"])(r))return;const a=t.eye,s=t.viewForward;Object($o["s"])(pI,r.center,i);const o=s[0]*(pI[0]-a[0])+s[1]*(pI[1]-a[1])+s[2]*(pI[2]-a[2]);if(pI[3]=r.radius*n,!(o-pI[3]>e.near&&o+pI[3]<e.far)&&Object(Uw["m"])(t.frustum,pI))if(r.radius>JP&&r.getChildren()){const a=r.getChildren();for(let r=0;r<8;++r)a[r]&&oI(e,t,a[r],i,n)}else yI.unionDepthRangeWithAABB(e,t.viewProjectionMatrix,i,r.bbMin,r.bbMax)}function cI(e,t,r){const i=t.eye,n=t.viewForward,a=(r[0]-i[0])*n[0]+(r[1]-i[1])*n[1]+(r[2]-i[2])*n[2];e.near=Math.min(e.near,a-r[3]),e.far=Math.max(e.far,a+r[3])}class lI{constructor(){this._items=new k_["a"]({allocator:e=>e||{obj:null,distance:0,near:0,far:0},deallocator:e=>(e.obj=null,e.distance=0,e.near=0,e.far=0,e)})}get length(){return this._items.length}get empty(){return 0===this._items.length}clear(){this._items.clear()}add(e){this._items.pushNew().obj=e}sort(e){const t=e.eye,r=e.viewForward;this._items.forAll(e=>{const i=e.obj.boundingVolumeWorldSpace.bounds,n=(i[0]-t[0])*r[0]+(i[1]-t[1])*r[1]+(i[2]-t[2])*r[2];e.distance=n,e.near=n-i[3],e.far=n+i[3]}),this._items.sort((e,t)=>e.distance-t.distance)}forEachInDepthRange(e,t,r){if(t===XP["a"].FRONT_TO_BACK)for(let i=0;i<this._items.length;++i){const t=this._items.data[i];t.far<e.near||t.near>e.far||r(t.obj,t.near,t.far)}else for(let i=this._items.length-1;i>=0;--i){const t=this._items.data[i];t.far<e.near||t.near>e.far||r(t.obj,t.near,t.far)}}}class uI{constructor(){this.view=Object(Kd["d"])(),this.viewProj=Object(Kd["d"])(),this.frustum=Object(Uw["f"])(),this.geometries=[],this.near=[],this.far=[],this.nearCandidates=[],this.farCandidates=[],this.range={near:0,far:0},this.looseRange={near:0,far:0}}compute(e,t){this._reset(),Object(Qd["d"])(this.view,e.viewMatrix),Object(Qd["n"])(this.viewProj,e.projectionMatrix,this.view),Object(Uw["e"])(this.frustum,e.frustum);const r=this.view,i=r[2],n=r[6],a=r[10],s=r[14],o=this.range;let c=0;if(t.forEach(e=>{if(!e.instanceParameters.visible)return;if(!e.castShadow)return;let t;e.hasShaderTransformation?(e.computeBoundingSphere(e.getShaderTransformation(),pI,1),t=pI):t=e.boundingSphere;const r=i*t[0]+n*t[1]+a*t[2]+s,o=r-t[3],l=r+t[3];this.geometries[c]=e,this.near[c]=-l,this.far[c]=-o,++c}),0===this.geometries.length)return o;for(let h=0;h<this.geometries.length;++h)this.near[h]>o.far&&(o.far=this.near[h]),this.near[h]>2&&this.far[h]<o.near&&(o.near=this.far[h]);const l=this.looseRange;l.near=Math.max(.5*o.near,2),l.far=2*o.far;let u=0,d=0;for(let h=0;h<this.geometries.length;++h)this.near[h]<o.near&&(this.near[h]>=l.near?o.near=this.near[h]:this.nearCandidates[u++]=h),this.far[h]>o.far&&(this.far[h]<=l.far?o.far=this.far[h]:this.farCandidates[d++]=h);if(0===this.nearCandidates.length&&0===this.farCandidates.length)return o;this.nearCandidates.sort((e,t)=>this.near[e]<this.near[t]?-1:this.near[e]>this.near[t]?1:0),this.farCandidates.sort((e,t)=>this.far[e]<this.far[t]?1:this.far[e]>this.far[t]?-1:0);for(let h=0;h<this.nearCandidates.length;++h){const e=this.nearCandidates[h];if(this.near[e]<o.near){const t=this.geometries[e],r=t.boundingInfo;this._includeNearBoundingInfoRec(r,t.getShaderTransformation())}}for(let h=0;h<this.farCandidates.length;++h){const e=this.farCandidates[h];if(this.far[e]>o.far){const t=this.geometries[e],r=t.boundingInfo;this._includeFarBoundingInfoRec(r,t.getShaderTransformation())}}return o}_reset(){this.geometries.length=0,this.near.length=0,this.far.length=0,this.nearCandidates.length=0,this.farCandidates.length=0,this.range.near=Number.MAX_VALUE,this.range.far=-Number.MAX_VALUE}_includeNearBoundingInfoRec(e,t){if(Object(z["j"])(e))return;const r=e.getCenter();Object($o["s"])(pI,r,t);const i=Object(Yu["i"])(t),n=pI[0],a=pI[1],s=pI[2],o=e.getBSRadius()*i,c=this.frustum;if(c[0][0]*n+c[0][1]*a+c[0][2]*s+c[0][3]>o||c[1][0]*n+c[1][1]*a+c[1][2]*s+c[1][3]>o||c[2][0]*n+c[2][1]*a+c[2][2]*s+c[2][3]>o||c[3][0]*n+c[3][1]*a+c[3][2]*s+c[3][3]>o)return;const l=this.view[2]*n+this.view[6]*a+this.view[10]*s+this.view[14],u=l+o;if(!(-(l-o)<2||-u>=this.range.near))if(-u>this.looseRange.near)this.range.near=-u;else{if(o>JP){const r=e.getChildren();if(void 0!==r){for(let e=0;e<8;++e)void 0!==r[e]&&this._includeNearBoundingInfoRec(r[e],t);return}}yI.unionDepthRangeWithAABB(this.range,this.viewProj,t,e.getBBMin(),e.getBBMax())}}_includeFarBoundingInfoRec(e,t){if(Object(z["j"])(e))return;let r=e.getBSRadius();const i=e.getCenter();Object($o["s"])(pI,i,t);const n=Object(Yu["i"])(t),a=pI[0],s=pI[1],o=pI[2];r*=n;const c=this.frustum;if(c[0][0]*a+c[0][1]*s+c[0][2]*o+c[0][3]>r||c[1][0]*a+c[1][1]*s+c[1][2]*o+c[1][3]>r||c[2][0]*a+c[2][1]*s+c[2][2]*o+c[2][3]>r||c[3][0]*a+c[3][1]*s+c[3][2]*o+c[3][3]>r)return;const l=this.view[2]*a+this.view[6]*s+this.view[10]*o+this.view[14]-r;if(!(-l<=this.range.far))if(-l<this.looseRange.far)this.range.far=-l;else{if(r>JP){const r=e.getChildren();if(void 0!==r){for(let e=0;e<8;++e)void 0!==r[e]&&this._includeFarBoundingInfoRec(r[e],t);return}}yI.unionDepthRangeWithAABB(this.range,this.viewProj,t,e.getBBMin(),e.getBBMax())}}}class dI{constructor(){this.modelViewProj=Object(Kd["d"])(),this.clipPosition=[Object(Xd["e"])(),Object(Xd["e"])(),Object(Xd["e"])(),Object(Xd["e"])(),Object(Xd["e"])(),Object(Xd["e"])(),Object(Xd["e"])(),Object(Xd["e"])()]}unionDepthRangeWithAABB(e,t,r,i,n){const a=this.modelViewProj;Object(Qd["n"])(a,t,r);let s=!1;for(let o=0;o<8;++o){const e=this.clipPosition[o],t=0===o||3===o||4===o||7===o?i[0]:n[0],r=0===o||1===o||4===o||5===o?i[1]:n[1],s=o<4?i[2]:n[2];e[0]=a[0]*t+a[4]*r+a[8]*s+a[12],e[1]=a[1]*t+a[5]*r+a[9]*s+a[13],e[2]=a[2]*t+a[6]*r+a[10]*s+a[14],e[3]=a[3]*t+a[7]*r+a[11]*s+a[15]}for(let o=0;o<12;++o){const t=this.clipPosition[hI[o][0]],r=this.clipPosition[hI[o][1]],i=this.clipPosition[hI[o][2]],n=this._clipTriangle(t,r,i);let a=!0;for(let e=0;e<n.length;++e)if(n[e][3]>=2){a=!1;break}if(!a){s=!0;for(let t=0;t<n.length;++t){const r=n[t][3];r<e.near&&(e.near=r),r>e.far&&(e.far=r)}}}return s}_inside(e,t){return 0===t?e[0]>=-e[3]:1===t?e[1]>=-e[3]:2===t?e[0]<=e[3]:3===t?e[1]<=e[3]:void Object(fp["a"])(!1)}_intersect(e,t,r){let i=0;return 0===r?i=(-e[3]-e[0])/(t[0]-e[0]+t[3]-e[3]):1===r?i=(-e[3]-e[1])/(t[1]-e[1]+t[3]-e[3]):2===r?i=(e[3]-e[0])/(t[0]-e[0]-t[3]+e[3]):3===r&&(i=(e[3]-e[1])/(t[1]-e[1]-t[3]+e[3])),Object(U_["j"])(Object(Xd["e"])(),e,t,i)}_clipTriangle(e,t,r){let i=[e,t,r];for(let n=0;n<4;++n){const e=i;i=[];for(let t=0;t<e.length;++t){const r=e[t],a=e[(t+1)%e.length];this._inside(a,n)?(this._inside(r,n)||i.push(this._intersect(r,a,n)),i.push(a)):this._inside(r,n)&&i.push(this._intersect(r,a,n))}}return i}}const hI=[[0,1,3],[2,3,1],[1,5,2],[6,2,5],[5,4,6],[7,6,4],[4,0,7],[3,7,0],[3,2,7],[6,7,2],[4,5,0],[1,0,5]],pI=Object(If["c"])(),fI=Object(Kd["d"])(),bI=vM(),mI=new lI,gI=new uI,yI=new dI;var OI=r("4395"),vI=r("3886"),_I=r("690a");function jI(){const e=new _I["a"];return e.attributes.add(Yh["a"].POSITION,"vec2"),e.vertex.uniforms.add("proj","mat4"),e.vertex.uniforms.add("drawPosition","vec4"),e.varyings.add("vUV","vec2"),e.vertex.code.add(vI["a"]`void main(void) {
  2821. vUV = position;
  2822. gl_Position = vec4(drawPosition.xy + vec2(position - 0.5) * drawPosition.zw, 0.0, 1.0);
  2823. }`),e.fragment.uniforms.add("textureInput","sampler2D"),e.fragment.uniforms.add("textureMask","sampler2D"),e.fragment.uniforms.add("textureOverlay","sampler2D"),e.fragment.uniforms.add("maskEnabled","bool"),e.fragment.uniforms.add("overlayEnabled","bool"),e.fragment.code.add(vI["a"]`const float barrelFactor = 1.1;
  2824. vec2 barrel(vec2 uv) {
  2825. vec2 uvn = uv * 2.0 - 1.0;
  2826. if (uvn.x == 0.0 && uvn.y == 0.0) {
  2827. return vec2(0.5, 0.5);
  2828. }
  2829. float theta = atan(uvn.y, uvn.x);
  2830. float r = pow(length(uvn), barrelFactor);
  2831. return r * vec2(cos(theta), sin(theta)) * 0.5 + 0.5;
  2832. }
  2833. void main() {
  2834. float mask = maskEnabled ? texture2D(textureMask, vUV).a : 1.0;
  2835. vec4 inputColor = texture2D(textureInput, barrel(vUV)) * mask;
  2836. vec4 overlayColor = overlayEnabled ? texture2D(textureOverlay, vUV) : vec4(0);
  2837. gl_FragColor = overlayColor + (1.0 - overlayColor.a) * inputColor;
  2838. }`),e}var wI=r("5015");let xI=class extends F["a"]{constructor(){super(...arguments),this._handles=new ge["a"],this._magnifier=null,this._imageSources=null,this._imageLoadTask=null,this._resources=null,this.events=new U["a"],this.attributeLocations=new Map([[Yh["a"].POSITION,0]]),this.tmpScreenPoint=Object(ce["f"])(),this.tmpRenderPoint=Object(ce["c"])()}get updating(){return Object(z["j"])(this._imageSources)&&Object(z["k"])(this._imageLoadTask)&&!this._imageLoadTask.task.finished}get magnifier(){return this._magnifier}set magnifier(e){if(e===this._magnifier)return;this._handles.removeAll(),this._magnifier=e;const t=()=>{this._updateResourceLoading(),this.events.emit("request-render")};Object(z["k"])(this._magnifier)&&this._handles.add(this._magnifier.watch("version",t)),t()}get enabled(){return Object(z["k"])(this._validMagnifier)}get _validMagnifier(){return Object(z["k"])(this._magnifier)&&this._magnifier.visible&&Object(z["k"])(this._magnifier.position)&&this._magnifier.size>0?this._magnifier:null}get factor(){return Object(z["k"])(this._magnifier)&&this._magnifier.factor||1}dispose(){this._magnifier=null,this._handles.destroy(),Object(z["k"])(this._imageLoadTask)&&(this._imageLoadTask.task.abort(),this._imageLoadTask=null),this._disposeResources()}render(e,t){const r=this._validMagnifier;if(Object(z["j"])(r))return;const i=t.camera.pixelRatio,n=Math.ceil(i*r.size);if(this._updateResources(e,n),Object(z["j"])(this._resources))return;const a=this._resources.program;e.useProgram(a);const s=this._resources.textures,o=Math.ceil(1/this.factor*n);s.input.resize(o,o);const c=t.camera.fullWidth,l=t.camera.fullHeight;Object(ce["i"])(r.position,this.tmpScreenPoint);const u=t.camera.screenToRender(this.tmpScreenPoint,this.tmpRenderPoint),d=.5*o,h=.5*o;u[0]=Object(dr["f"])(u[0],d,c-d-1),u[1]=Object(dr["f"])(u[1],h,l-h-1);const p=Math.floor(u[0]-d),f=Math.floor(u[1]-h);a.bindTexture(s.input,"textureInput"),e.gl.copyTexImage2D(s.input.descriptor.target,0,s.input.descriptor.pixelFormat,p,f,o,o,0);const b=r.offset.x*i,m=r.offset.y*i,g=(u[0]+b)/c*2-1,y=(u[1]-m)/l*2-1,O=n/c*2,v=n/l*2;e.bindVAO(this._resources.vao),a.bindTexture(s.overlay,"textureOverlay"),a.bindTexture(s.mask,"textureMask"),a.setUniform4f("drawPosition",g,y,O,v),a.setUniform1b("maskEnabled",r.maskEnabled),a.setUniform1b("overlayEnabled",r.overlayEnabled),e.setPipelineState(this._resources.pipelineState),e.drawArrays(fh["r"].TRIANGLE_STRIP,0,4)}_updateResourceLoading(){const e=this._validMagnifier;if(Object(z["j"])(e))return;const t=e.maskUrl,r=e.overlayUrl;!Object(z["k"])(this._imageLoadTask)||this._imageLoadTask.maskUrl===t&&this._imageLoadTask.overlayUrl===r||(this._imageLoadTask.task.abort(),this._imageLoadTask=null,this._imageSources=null),Object(z["k"])(this._imageSources)||Object(z["k"])(this._imageLoadTask)||(this._imageLoadTask={maskUrl:t,overlayUrl:r,task:Object(_["h"])(async e=>{const i=Object(z["j"])(t)||Object(z["j"])(r)?Object(wI["a"])(e):null,n=Object(z["k"])(t)?Object(Bh["a"])(t,{signal:e}):i.then(e=>e.mask),a=Object(z["k"])(r)?Object(Bh["a"])(r,{signal:e}):i.then(e=>e.overlay);this._imageSources={mask:await n,overlay:await a},this._disposeResources(),this.events.emit("request-render")})},this._imageLoadTask.task.promise.then(()=>this.notifyChange("updating"),()=>this.notifyChange("updating")))}_updateResources(e,t){if(!this.enabled)return void this._disposeResources();if(Object(z["k"])(this._resources)){if(this._resources.textures.size!==t){const r=this._createTextureResources(e,t);if(Object(z["j"])(r))return void this._disposeResources();this._disposeTextureResources(this._resources.textures),this._resources.textures=r}return}const r=this._createTextureResources(e,t);Object(z["j"])(r)||(this._resources={textures:r,program:this._createProgram(e),vao:Object(Oh["d"])(e,yh["a"],this.attributeLocations,0,1),pipelineState:Object(bh["g"])({blending:Object(bh["i"])(fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA),depthTest:null,depthWrite:null,colorWrite:bh["d"]})})}_disposeResources(){Object(z["j"])(this._resources)||(this._disposeTextureResources(this._resources.textures),this._resources.program.dispose(),this._resources.vao.dispose(),this._resources=null)}_disposeTextureResources(e){e.mask.dispose(),e.overlay.dispose(),e.input.dispose()}_createTextureResources(e,t){if(Object(z["j"])(this._imageSources))return null;this._imageSources.overlay.width=t,this._imageSources.overlay.height=t,this._imageSources.mask.width=t,this._imageSources.mask.height=t;const r=new Qh["a"](e,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,internalFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].LINEAR,flipped:!0,preMultiplyAlpha:!Object(H["z"])(this._imageSources.overlay.src)||!e.driverTest.svgAlwaysPremultipliesAlpha},this._imageSources.overlay),i=new Qh["a"](e,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].ALPHA,internalFormat:fh["p"].ALPHA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].LINEAR,flipped:!0},this._imageSources.mask);return{input:new Qh["a"](e,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,internalFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].LINEAR,flipped:!1}),mask:i,overlay:r,size:t}}_createProgram(e){const t=jI();return new ph["a"](e,t,this.attributeLocations)}};Object(l["a"])([Object(j["b"])()],xI.prototype,"_imageSources",void 0),Object(l["a"])([Object(j["b"])()],xI.prototype,"_imageLoadTask",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],xI.prototype,"updating",null),xI=Object(l["a"])([Object(x["a"])("esri/views/3d/webgl-engine/lib/MagnifierHelper")],xI);const TI=.5,SI=Object(Ic["a"])(1e3/30);var EI;!function(e){e[e.FrontToBack=0]="FrontToBack",e[e.BackToFront=1]="BackToFront"}(EI||(EI={}));class AI{constructor(e,t,r=EI.FrontToBack){this._rctx=e,this._techniqueRepository=t,this._sorting=r,this._draws=new k_["a"]({initialSize:32,allocator:e=>e||{material:null,geometry:null,geometryRanges:null,bindDrawParams:null,depthSquaredHint:0,indexType:0}}),this._passBoundTechniques=new Set,this._previouslyBoundMaterials=new Map,this._previouslyBoundDraw=new Map}submitDraw(e,t,r,i,n){const a=this._draws.pushNew();a.geometry=t,a.geometryRanges=r,a.material=e,a.bindDrawParams=i,a.depthSquaredHint=n,a.indexType=t.indexed?Object(z["t"])(t.vao.indexBuffer).indexType:0}dispatch(e){const t=this._rctx;this._passBoundTechniques.clear(),this._previouslyBoundMaterials.clear(),this._previouslyBoundDraw.clear();let r=null;const i=this._draws.map(t=>t.material.prepareTechnique(this._techniqueRepository,e,t.geometry.parameters)),n=this._draws.length;for(let a=0;a<n;a++){const n=i[a];n===r&&n.configuration.transparencyPassType===LS["l"].NONE||(t.useTechnique(n,e.slot),r=n),this._passBoundTechniques.has(n)||(n.bindPass(e),this._passBoundTechniques.add(n));const s=this._draws.data[a],o=s.geometry;t.bindVAO(o.vao),this._previouslyBoundMaterials.get(n)!==s.material&&(n.bindMaterial(s.material,e),this._previouslyBoundMaterials.set(n,s.material)),this._previouslyBoundDraw.get(n)!==s.bindDrawParams&&(n.bindDraw(s.bindDrawParams),this._previouslyBoundDraw.set(n,s.bindDrawParams));const c=s.geometryRanges,l=c.length;if(0!==s.indexType){const e=CI.get(s.indexType);for(let r=0;r<l;r+=2){const i=c[r],n=c[r+1];t.drawElements(o.primitiveType,n,s.indexType,i*e)}}else for(let e=0;e<l;e+=2){const r=c[e],i=c[e+1];t.drawArrays(o.primitiveType,r,i)}}}prepareSubmit(){this._draws.clear()}finishSubmit(){const e=this._sorting===EI.FrontToBack?1:-1;this._draws.sort((t,r)=>{const i=e*(t.depthSquaredHint-r.depthSquaredHint);return 0!==i?i:t.geometry.vao.size-r.geometry.vao.size})}get count(){return this._draws.length}}const CI=new Map;CI.set(fh["k"].UNSIGNED_BYTE,1),CI.set(fh["k"].UNSIGNED_SHORT,2),CI.set(fh["k"].UNSIGNED_INT,4);class RI{constructor(e,t){this.rctx=e,this.shaderTechniqueRepository=t,this.canRender=!0,this._materialPassParams=new tP,this._shadowPassParams=new rP,this._highlightPassParams=new iP,this._systems=new Set,this._passes={materialOpaque:new AI(e,this.shaderTechniqueRepository),materialTransparent:new AI(e,this.shaderTechniqueRepository,EI.BackToFront),materialIntegratedMesh:new AI(e,this.shaderTechniqueRepository),shadowMap:new AI(e,this.shaderTechniqueRepository),highlight:new AI(e,this.shaderTechniqueRepository),highlightIntegratedMesh:new AI(e,this.shaderTechniqueRepository),highlightShadowMap:new AI(e,this.shaderTechniqueRepository),defaultShadowMap:new AI(e,this.shaderTechniqueRepository)}}register(e){this._systems.add(e)}prepareRender(e){if(0!==this._systems.size){for(const e of Object.values(this._passes))e.prepareSubmit();this._systems.forEach(t=>t.submit(this._passes,{camera:e}));for(const e of Object.values(this._passes))e.finishSubmit();this.shaderTechniqueRepository.frameUpdate()}}render(e){if(0!==this._systems.size)switch(this._configure(e),e.slot){case Vp["a"].OPAQUE_PLUGIN:switch(e.pass){case Bp["a"].MATERIAL:return this._materialPassParams.subPass=ZM.Color,this._configureMaterialColorPass(e),this._passes.materialOpaque.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_DEPTH:return this._materialPassParams.subPass=ZM.Depth,this._passes.materialOpaque.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_NORMAL:return this._materialPassParams.subPass=ZM.Normal,this._passes.materialOpaque.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_HIGHLIGHT:return this._passes.highlight.dispatch(this._highlightPassParams);case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL:return this._passes.shadowMap.dispatch(this._shadowPassParams);case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT:return this._passes.highlightShadowMap.dispatch(this._shadowPassParams);case Bp["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT:return this._passes.defaultShadowMap.dispatch(this._shadowPassParams)}return;case Vp["a"].TRANSPARENT_PLUGIN:switch(e.pass){case Bp["a"].MATERIAL:return this._materialPassParams.subPass=ZM.Color,this._configureMaterialColorPass(e),this._passes.materialTransparent.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_ALPHA:return this._materialPassParams.subPass=ZM.Alpha,this._configureMaterialColorPass(e),this._passes.materialTransparent.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_DEPTH:return this._materialPassParams.subPass=ZM.Depth,this._passes.materialTransparent.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_NORMAL:return this._materialPassParams.subPass=ZM.Normal,this._passes.materialTransparent.dispatch(this._materialPassParams)}return;case Vp["a"].INTEGRATED_MESH:switch(e.pass){case Bp["a"].MATERIAL:return this._materialPassParams.subPass=ZM.Color,this._configureMaterialColorPass(e),this._materialPassParams.ssrParams=e.ssrParams,this._passes.materialIntegratedMesh.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_DEPTH:return this._materialPassParams.subPass=ZM.Depth,this._passes.materialIntegratedMesh.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_NORMAL:return this._materialPassParams.subPass=ZM.Normal,this._passes.materialIntegratedMesh.dispatch(this._materialPassParams);case Bp["a"].MATERIAL_HIGHLIGHT:return this._passes.highlightIntegratedMesh.dispatch(this._highlightPassParams)}return}}notifyDirty(){this._context.requestRender()}slots(){return[Vp["a"].OPAQUE_PLUGIN,Vp["a"].TRANSPARENT_PLUGIN,Vp["a"].INTEGRATED_MESH]}initializeRenderContext(e){this._context=e}uninitializeRenderContext(){}queryDepthRange(e){const t={near:1/0,far:-1/0};return this._systems.forEach(r=>{const i=r.queryShadowCasterDepthRange(e);Object(z["k"])(i)&&jM(t,i,t)}),t}get shadowCastingEnabled(){return this._materialPassParams.shadowsEnabled}set shadowCastingEnabled(e){this._materialPassParams.shadowsEnabled=e}get fillLightsEnabled(){return this._materialPassParams.hasFillLights}set fillLightsEnabled(e){this._materialPassParams.hasFillLights=e}get screenSpaceReflectionsEnabled(){return Object(z["k"])(this._materialPassParams.ssrParams.ssrEnabled)}set screenSpaceReflectionsEnabled(e){this._materialPassParams.ssrParams.ssrEnabled=!!e}_configureMaterialColorPass(e){this._materialPassParams.bindShadowMap=t=>{e.shadowMap.bind(t);const r=this._materialPassParams.viewTransform;Object($o["h"])(MI,r.transformWorldFromViewTL,r.transformWorldFromViewTH),e.shadowMap.bindView(t,MI)},this._materialPassParams.bindAmbientOcclusion=t=>e.ssaoHelper.bind(t,e.camera),this._materialPassParams.ambientOcclusionEnabled=!!e.ssaoHelper&&e.ssaoHelper.ready,this._materialPassParams.sceneHasOcludees=e.hasOccludees}_configure(e){const t=e.pass===Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL||e.pass===Bp["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||e.pass===Bp["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT?this._shadowPassParams:e.pass===Bp["a"].MATERIAL_HIGHLIGHT?this._highlightPassParams:this._materialPassParams;this._updateParameters(e,t)}_updateParameters(e,t){const r=e.camera,i=r.viewInverseTransposeMatrix;Object($o["y"])(MI,i[3],i[7],i[11]),II.set(MI),Object($o["m"])(t.viewTransform.transformWorldFromViewTH,II.high),Object($o["m"])(t.viewTransform.transformWorldFromViewTL,II.low),Object(To["f"])(t.viewTransform.transformViewFromCameraRelativeRS,r.viewMatrix),Object(Qd["d"])(t.viewTransform.transformProjFromView,r.projectionMatrix),t.identifier===$M.Material?(this._materialPassParams.transparent=e.slot===Vp["a"].TRANSPARENT_PLUGIN,this._materialPassParams.integratedMesh=e.slot===Vp["a"].INTEGRATED_MESH,this._materialPassParams.lighting=e.scenelightingData,Object(To["p"])(PI,t.viewTransform.transformViewFromCameraRelativeRS),Object(To["e"])(t.transformNormalViewFromGlobal,PI),Object(io["c"])(t.nearFar,r.nearFar)):t.identifier===$M.ShadowMap?Object(io["c"])(t.nearFar,r.nearFar):t.identifier===$M.Highlight&&(t.highlightDepthTexture=e.highlightDepthTexture,Object(U_["c"])(t.viewport,r.fullViewport)),t.identifier!==$M.Material&&t.identifier!==$M.Highlight||(t.inverseViewport[0]=1/r.fullViewport[2],t.inverseViewport[1]=1/r.fullViewport[3]),Object(xu["e"])(e.sliceHelper.plane,t.slicePlane),Object($o["l"])(t.slicePlane.origin,t.slicePlane.origin,MI),t.slicePlaneEnabled=e.sliceHelper.isEnabled,this._materialPassParams.slot=e.slot,this._materialPassParams.transparencyPassType=e.transparencyPassType,this._materialPassParams.multipassTerrainParams=e.multipassTerrainParams}get needsHighlight(){return this._passes.highlight.count>0||this._passes.highlightIntegratedMesh.count>0}get needsTransparentPass(){return this._passes.materialTransparent.count>0}}const MI=Object(ju["f"])(),PI=Object(wh["b"])(),II=new CP;var DI=r("b566"),LI=r("b616"),NI=r("ce99");const FI=8.6,kI=.4;class UI extends uh["a"]{initializeProgram(e){const t=UI.shader.get().build(this.configuration);return new ph["a"](e.rctx,t,hh["a"])}bindApplyPass(e){this.program.setUniform4fv("uColor",e.color),this.program.setUniform4fv("haloColor",e.haloColor),this.program.setUniform1f("outlineSize",FI),this.program.setUniform1f("blurSize",kI),this.program.setUniform4f("opacities",e.haloOpacity,e.haloOpacityOccluded,e.fillOpacity,e.fillOpacityOccluded)}initializePipeline(){return this.configuration.highlightStage===NI["a"].Apply?Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),colorWrite:bh["d"]}):Object(bh["g"])({colorWrite:bh["d"]})}get primitiveType(){return this.configuration.gridOptimization?fh["r"].TRIANGLES:fh["r"].TRIANGLE_STRIP}}UI.shader=new lh["a"](NI["b"],()=>r.e("chunk-2d0f0fc1").then(r.bind(null,"9f64")));class zI extends dh["a"]{constructor(){super(...arguments),this.highlightStage=NI["a"].Blur,this.gridOptimization=!1}}Object(l["a"])([Object(dh["b"])({count:NI["a"].COUNT})],zI.prototype,"highlightStage",void 0),Object(l["a"])([Object(dh["b"])()],zI.prototype,"gridOptimization",void 0);const BI=32;class VI{constructor(e,t){this._techniqueRep=e,this._rctx=t,this.viewportToRestore=Object(Xd["e"])(),this.defaultOptions={color:Object(KT["c"])(1,0,1,1),haloColor:Object(KT["c"])(1,0,1,1),haloOpacity:1,fillOpacity:.2,haloOpacityOccluded:.25,fillOpacityOccluded:.05,shadowColor:Object(KT["c"])(1,0,1,1),shadowOpacity:.15,occludedShadowOpacity:.075},this._grid={coverageMipmap:null,vao:null,verticalCellCount:0,horizontalCellCount:0,cellPixelSize:0,mipmapLevels:0,viewportWidth:0,viewportHeight:0}}_assertResources(){if(this.quadVAO)return;this.quadVAO=Object(Oh["d"])(this._rctx);const e={colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE,width:0,height:0},t={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:0,height:0};this.blur0Fbo=new Mh["a"](this._rctx,e,t),this.blur1Fbo=new Mh["a"](this._rctx,e,t);const r=new zI;r.highlightStage=NI["a"].Blur,r.gridOptimization=!1,this.blurTechnique=this._techniqueRep.acquire(UI,r),r.highlightStage=NI["a"].Blur,r.gridOptimization=!0,this.blurGridTechnique=this._techniqueRep.acquire(UI,r),r.highlightStage=NI["a"].Apply,r.gridOptimization=!1,this.applyTechnique=this._techniqueRep.acquire(UI,r),r.highlightStage=NI["a"].Apply,r.gridOptimization=!0,this.applyGridTechnique=this._techniqueRep.acquire(UI,r),r.highlightStage=NI["a"].Downsample,r.gridOptimization=!1,this.downsampleTechnique=this._techniqueRep.acquire(UI,r)}dispose(){if(this._grid.coverageMipmap)for(let e=1;e<this._grid.coverageMipmap.length;e++)this._grid.coverageMipmap[e].dispose();this._grid.vao&&this._grid.vao.dispose(!0),this.quadVAO&&(this.quadVAO.dispose(!0),this.quadVAO=null),this.blur0Fbo=Object(z["e"])(this.blur0Fbo),this.blur1Fbo=Object(z["e"])(this.blur1Fbo)}get profilingCallback(){return z_["a"].HIGHLIGHTS_PROFILE_TO_CONSOLE?e=>console.log(e):null}setDefaultOptions(e){this.defaultOptions=e}render(e,t,r){const i=e.pixelRatio,n=z_["a"].HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED,a=this._rctx;this._assertResources(),Object(U_["c"])(this.viewportToRestore,e.fullViewport);const s=e.fullWidth,o=e.fullHeight,c=Math.ceil(s/i),l=Math.ceil(o/i);this.blur0Fbo.resize(c,l),this.blur1Fbo.resize(c,l),a.bindVAO(this.quadVAO);let u=null;const d=n?this.blurGridTechnique:this.blurTechnique,h=a.useTechnique(d);n?(this._gridUpdateResources(t,BI),this._gridComputeMipmap(),u=this._grid.vao,h.bindTexture(this._grid.coverageMipmap[this._grid.mipmapLevels].colorTexture,"coverageTex")):u=this.quadVAO,a.bindVAO(u),a.bindFramebuffer(this.blur0Fbo),a.setViewport(0,0,c,l),a.setClearColor(0,0,0,0),a.clear(fh["e"].COLOR_BUFFER_BIT),h.bindTexture(t.colorTexture,"tex"),h.setUniform2f("blurSize",1/c,0),a.drawArrays(d.primitiveType,0,Object(Kh["f"])(u,"geometry")),a.bindFramebuffer(this.blur1Fbo),a.clear(fh["e"].COLOR_BUFFER_BIT),h.bindTexture(this.blur0Fbo.colorTexture,"tex"),h.setUniform2f("blurSize",0,1/l),a.drawArrays(d.primitiveType,0,Object(Kh["f"])(u,"geometry")),a.bindFramebuffer(r),a.setViewport(this.viewportToRestore[0],this.viewportToRestore[1],this.viewportToRestore[2],this.viewportToRestore[3]);const p=n?this.applyGridTechnique:this.applyTechnique,f=a.useTechnique(p);if(f.bindTexture(this.blur1Fbo.colorTexture,"tex"),f.bindTexture(t.colorTexture,"origin"),n){const e=this._grid.coverageMipmap[this._grid.mipmapLevels].colorTexture;f.bindTexture(e,"coverageTex")}p.bindApplyPass(this.defaultOptions),a.drawArrays(p.primitiveType,0,Object(Kh["f"])(u,"geometry")),a.bindVAO(null)}_gridUpdateResources(e,t){const r=this._rctx,i=this._grid;let n=!1;if(null===i.coverageMipmap&&(i.coverageMipmap=[e],n=!0),i.viewportWidth===e.width&&i.viewportHeight===e.height||(n=!0,i.viewportWidth=e.width,i.viewportHeight=e.height),i.coverageMipmap[0]=e,i.cellPixelSize!==t&&(i.cellPixelSize=t,n=!0),n){for(let e=1;e<i.coverageMipmap.length;e++)i.coverageMipmap[e].dispose();i.mipmapLevels=Math.ceil(Math.log(i.cellPixelSize)*Math.LOG2E),i.coverageMipmap.length=i.mipmapLevels+1;for(let e=0;e<i.mipmapLevels;e++){const t=i.coverageMipmap[e],n={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGB,dataType:fh["q"].UNSIGNED_SHORT_5_6_5,samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:Math.ceil(t.width/2),height:Math.ceil(t.height/2)},a={colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE,width:Math.ceil(t.width/2),height:Math.ceil(t.height/2)};i.coverageMipmap[e+1]=new Mh["a"](r,a,n)}}const a=Math.ceil(e.height/i.cellPixelSize),s=Math.ceil(e.width/i.cellPixelSize);if(!i.vao||i.verticalCellCount!==a||i.horizontalCellCount!==s){i.verticalCellCount=a,i.horizontalCellCount=s;const e=a+1,t=s+1,n=1/a,o=1/s,c=6,l=4,u=new Float32Array(c*l*e*t);let d=0;for(let r=0;r<e;r++)for(let e=0;e<t;e++)u[d+0]=(e-.5)*o*2-1,u[d+1]=(r-.5)*n*2-1,u[d+2]=e*o,u[d+3]=r*n,u[d+4]=(e+.5)*o*2-1,u[d+5]=(r-.5)*n*2-1,u[d+6]=e*o,u[d+7]=r*n,u[d+8]=(e-.5)*o*2-1,u[d+9]=(r+.5)*n*2-1,u[d+10]=e*o,u[d+11]=r*n,u[d+12]=(e-.5)*o*2-1,u[d+13]=(r+.5)*n*2-1,u[d+14]=e*o,u[d+15]=r*n,u[d+16]=(e+.5)*o*2-1,u[d+17]=(r-.5)*n*2-1,u[d+18]=e*o,u[d+19]=r*n,u[d+20]=(e+.5)*o*2-1,u[d+21]=(r+.5)*n*2-1,u[d+22]=e*o,u[d+23]=r*n,d+=c*l;i.vao&&i.vao.dispose(!0),i.vao=new ep["a"](r,hh["a"],{geometry:yh["b"]},{geometry:Jh["a"].createVertex(r,fh["D"].STATIC_DRAW,u)})}}_gridComputeMipmap(){const e=this._rctx,t=this._grid,r=e.useTechnique(this.downsampleTechnique);e.bindVAO(this.quadVAO);for(let i=0;i<t.mipmapLevels;i++){e.bindFramebuffer(t.coverageMipmap[i+1]),r.bindTexture(t.coverageMipmap[i].colorTexture,"tex");const n=t.coverageMipmap[i+1].width,a=t.coverageMipmap[i+1].height;r.setUniform2f("invFramebufferDim",1/n,1/a),e.setViewport(0,0,n,a),e.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(this.quadVAO,"geometry"))}}get gpuMemoryUsage(){let e=(Object(z["k"])(this.blur0Fbo)?this.blur0Fbo.gpuMemoryUsage:0)+(Object(z["k"])(this.blur1Fbo)?this.blur1Fbo.gpuMemoryUsage:0);if(this._grid.coverageMipmap)for(const t of this._grid.coverageMipmap)e+=t.gpuMemoryUsage;return e}get test(){return{coverage:this._grid.coverageMipmap,blur:[this.blur0Fbo,this.blur1Fbo]}}}var GI=r("91b0");const HI={dataType:fh["q"].UNSIGNED_BYTE,internalFormat:fh["p"].RGBA},qI={};class WI{constructor(e){this.rctx=e,this._activeTargets=new Set,this._depthTextures=new Map,this._depthBuffers=new Map,this._colorTextures=new Map,this._framebuffers=new Map,this.depthTextureSupported=e.capabilities.depthTexture}dispose(){this._depthBuffers.forEach(e=>e.dispose()),this._depthBuffers.clear(),this._depthTextures.forEach(e=>e.dispose()),this._depthTextures.clear(),this._colorTextures.forEach(e=>e.dispose()),this._colorTextures.clear(),this._framebuffers.forEach(e=>e.dispose()),this._framebuffers.clear(),this._activeTargets.clear()}disposeTargetResource(e){const t=e.id;this._activeTargets.has(t)&&(this._activeTargets.delete(t),this._disposeWithFramebuffers(this._depthTextures,t),this._disposeWithFramebuffers(this._depthBuffers,t),this._disposeWithFramebuffers(this._colorTextures,t))}_disposeWithFramebuffers(e,t){const r=e.get(t);r&&(this._framebuffers.forEach((e,t)=>{e.colorAttachment!==r&&e.depthStencilAttachment!==r||(e.detachAll(),e.dispose(),this._framebuffers.delete(t))}),r.dispose(),e.delete(t))}getDepthTexture(e,t){if(!this.depthTextureSupported)return null;let r=this._depthTextures.get(e.id);return!r||r.descriptor.width===t.width&&r.descriptor.height===t.height||(r.dispose(),r=null),r||(r=new Qh["a"](this.rctx,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].DEPTH_STENCIL,dataType:fh["q"].UNSIGNED_INT_24_8,samplingMode:fh["z"].NEAREST,wrapMode:fh["B"].CLAMP_TO_EDGE,width:t.width,height:t.height}),this._depthTextures.set(e.id,r),this._activeTargets.add(e.id)),r}getAllocatedDepthTexture(e){return this._depthTextures.get(e.id)}getDepthBuffer(e,t){if(this.depthTextureSupported)return null;let r=this._depthBuffers.get(e.id);return r?r.descriptor.width===t.width&&r.descriptor.height===t.height||r.resize(t.width,t.height):(r=new GI["a"](this.rctx,{internalFormat:fh["s"].DEPTH_STENCIL,...t}),this._depthBuffers.set(e.id,r),this._activeTargets.add(e.id)),r}getColorTexture(e,t){let r=this._colorTextures.get(e.id);return r&&(r.descriptor.width===t.width&&r.descriptor.height===t.height||(r.dispose(),r=null)),r||(r=new Qh["a"](this.rctx,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,internalFormat:e.internalFormat,dataType:e.dataType,samplingMode:null!=e.samplingMode?e.samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:t.width,height:t.height}),this._colorTextures.set(e.id,r),this._activeTargets.add(e.id)),r}getAllocatedColorTexture(e){return this._colorTextures.get(e.id)}registerDepthTarget(e={}){return{id:Object(hw["b"])(),...qI,...e}}registerColorTarget(e={}){return{id:Object(hw["b"])(),...HI,...e}}getFramebuffer(e,t,r){const i=this._getKey(t,r);let n=this._framebuffers.get(i);const a=this.getColorTexture(t,e);if(this.depthTextureSupported){const t=r?this.getDepthTexture(r,e):void 0;return n?((n.width!==e.width||n.height!==e.height||n.colorTexture!==a||n.depthStencilTexture!==t)&&(n.detachAll(),n.resize(e.width,e.height),n.attachColorTexture(a),n.attachDepthStencilTexture(t)),n):(n=Object(z["k"])(r)?new Mh["a"](this.rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].DEPTH_STENCIL_TEXTURE},a,t):new Mh["a"](this.rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE},a),this._framebuffers.set(i,n),n)}const s=r?this.getDepthBuffer(r,e):void 0;return n?((n.width!==e.width||n.height!==e.height||n.colorTexture!==a)&&(n.detachAll(),n.resize(e.width,e.height),n.attachColorTexture(a),n.attachDepthStencilBuffer(s)),n):(n=new Mh["a"](this.rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:r?fh["m"].DEPTH_STENCIL_RENDER_BUFFER:fh["m"].NONE},a,s),this._framebuffers.set(i,n),n)}_getKey(e,t){return`${e.id}_${t?t.id:"X"}_${e.name}${t?"_"+t.name:""}`}get gpuMemoryUsage(){let e=0;const t=new Set,r=r=>{t.has(r)||(t.add(r),e+=Object(Kh["d"])(r))};return this._depthTextures.forEach(r),this._colorTextures.forEach(r),this._depthBuffers.forEach(r),e}}class $I{constructor(e,t){this._rctx=e,this._compositingHelper=t,this._mainColorTarget=0,this._dimensions={width:4,height:4},this._needLastFrameColorTexture=!1,this._background={type:"color",color:[0,0,0,1]};const r=e.type===Kc["a"].WEBGL2;this._renderTargetHelper=new WI(e);const i=this._renderTargetHelper;this.mainColorTargets=[i.registerColorTarget({name:"mainColorTarget0"}),i.registerColorTarget({name:"mainColorTarget1"})],this.frontFaceTarget=i.registerColorTarget({name:"frontFaceTarget"});const n=e=>i.registerColorTarget({name:e,dataType:fh["q"].FLOAT,internalFormat:r?fh["v"].RGBA32F:fh["p"].RGBA,samplingMode:fh["z"].NEAREST});this.colorFloatTarget=n("colorFloatTarget"),this.alphaFloatTarget=n("alphaFloatTarget"),this.mainDepth=i.registerDepthTarget({name:"mainDepth"}),this.linearDepth=i.registerColorTarget({name:"linearDepth",samplingMode:fh["z"].NEAREST}),this.terrainLinearDepth=i.registerColorTarget({name:"terrainLinearDepth"}),this.geometryLinearDepth=i.registerColorTarget({name:"geometryLinearDepth"}),this.normal=i.registerColorTarget({name:"normal"}),this.highlight=i.registerColorTarget({name:"highlight",internalFormat:r?fh["v"].RGBA4:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_SHORT_4_4_4_4}),this.hudVisibility=i.registerColorTarget({name:"hudVisibility",internalFormat:r?fh["v"].RGBA4:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_SHORT_4_4_4_4}),this.tmpColor=i.registerColorTarget({name:"tmpColor"}),this.tmpDepth=i.registerDepthTarget({name:"tmpDepth"}),this.hudColor=i.registerColorTarget({name:"hudColor"})}dispose(){this._renderTargetHelper.dispose()}get width(){return this._dimensions.width}get height(){return this._dimensions.height}set background(e){this._background=e}get background(){return this._background}get currentColorTarget(){return this.mainColorTargets[this._mainColorTarget]}get previousColorTarget(){return this.mainColorTargets[1-this._mainColorTarget]}get framebuffer(){return this.getFramebuffer(this.currentColorTarget,this.mainDepth)}getFramebuffer(e,t){return this._renderTargetHelper.getFramebuffer(this._dimensions,e,t)}get colorTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.currentColorTarget)}get depthTexture(){return this._renderTargetHelper.getAllocatedDepthTexture(this.mainDepth)}get linearDepthTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.linearDepth)}get terrainLinearDepthTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.terrainLinearDepth)}get geometryLinearDepthTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.geometryLinearDepth)}get lastFrameColorTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.previousColorTarget)}get normalTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.normal)}get highlightTexture(){return this._renderTargetHelper.getAllocatedColorTexture(this.highlight)}get hudVisibilityTexture(){return this._getColorTexture(this.hudVisibility)}get tmpColorTexture(){return this._getColorTexture(this.tmpColor)}get hudColorTexture(){return this._getColorTexture(this.hudColor)}get mainColorTexture(){return this._getColorTexture(this.currentColorTarget)}advanceCurrentRenderTarget(){this._mainColorTarget=0===this._mainColorTarget&&this._needLastFrameColorTexture?1:0}initializeFrame(e){const t=this._rctx;this._dimensions.width=e.fullWidth,this._dimensions.height=e.fullHeight,this.bindTarget(this.currentColorTarget,this.mainDepth),t.setClearStencil(0);const r=this._background.color;t.setClearColor(r[0]*r[3],r[1]*r[3],r[2]*r[3],r[3]),t.clearSafe(fh["e"].COLOR_BUFFER_BIT|fh["e"].DEPTH_BUFFER_BIT|fh["e"].STENCIL_BUFFER_BIT)}composite(){Object(z["k"])(this.colorTexture)&&this._compositingHelper.composite(this.colorTexture,qP["a"].None)}renderTmpAndCompositeToMain(e,t,r=!1){this.renderToTargets(e,this.tmpColor,r?this.tmpDepth:this.mainDepth,ZI),this._compositingHelper.composite(this._getColorTexture(this.tmpColor),t)}renderHUDVisibility(e,t=!1){this.renderToTargets(e,this.hudVisibility,t?this.tmpDepth:this.mainDepth,XI)}compositeTransparentTerrainOntoHUDVisibility(){this.renderToTargets(()=>this._compositingHelper.composite(this._getColorTexture(this.tmpColor),qP["a"].None,1,HP["a"].TransparentToHUDVisibility),this.hudVisibility,this.tmpDepth)}renderOITPass(e,t,r){let i,n;switch(t){case LS["l"].Color:i=this.colorFloatTarget,n=[0,0,0,0];break;case LS["l"].Alpha:i=this.alphaFloatTarget,n=[1,1,1,1];break;case LS["l"].FrontFace:i=this.frontFaceTarget,n=[0,0,0,0]}r?this.renderToTargets(e,i,this.tmpDepth,n,!0,!0):this.renderToTargets(e,i,this.mainDepth,n,!1)}compositeTransparentTerrainOntoMain(){this.bindFramebuffer(),this._compositingHelper.composite(this._getColorTexture(this.tmpColor),qP["a"].PremultipliedAlpha)}compositeOccludedOntoMain(e){this.bindFramebuffer(),this._compositingHelper.composite(this._getColorTexture(this.tmpColor),qP["a"].PremultipliedAlpha,e)}compositeTransparentOntoOpaque(e){e?(this.bindTarget(this.hudColor,this.tmpDepth),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clearSafe(fh["e"].COLOR_BUFFER_BIT)):this.bindFramebuffer(),this._compositingHelper.compositeTransparent(this._getColorTexture(this.colorFloatTarget),this._getColorTexture(this.alphaFloatTarget),this._getColorTexture(this.frontFaceTarget))}bindFramebuffer(){this._rctx.bindFramebuffer(this.framebuffer)}renderDepthDetached(e){this.bindTarget(this.currentColorTarget),e(),this.bindTarget(this.currentColorTarget,this.mainDepth)}disposeTarget(e){this._renderTargetHelper.disposeTargetResource(e)}set needLastFrameColorTexture(e){!e&&this._needLastFrameColorTexture&&(this._mainColorTarget=0,this.disposeTarget(this.mainColorTargets[1])),this._needLastFrameColorTexture=e}get needLastFrameColorTexture(){return this._needLastFrameColorTexture}renderToTargets(e,t,r,i,n=!1,a=!1){const s=this._rctx,o=this.bindTarget(t,r);let c=0;if(i){const e=1e-13,t=Math.max(e,i[3]);s.setClearColor(i[0],i[1],i[2],t),c|=fh["e"].COLOR_BUFFER_BIT}return n&&(c|=fh["e"].DEPTH_BUFFER_BIT),!1===a?a=0:(!0===a&&(a=255),c|=fh["e"].STENCIL_BUFFER_BIT),c&&s.clearSafe(c,a),e(),s.gl.flush(),this.bindTarget(this.currentColorTarget,this.mainDepth),o}bindTarget(e,t){const r=this._renderTargetHelper.getFramebuffer(this._dimensions,e,t);return this._rctx.bindFramebuffer(r),r}_getColorTexture(e){return this._renderTargetHelper.getColorTexture(e,this._dimensions)}get gpuMemoryUsage(){let e=0;return this._renderTargetHelper&&(e+=this._renderTargetHelper.gpuMemoryUsage),e}}const ZI=[0,0,0,0],XI=[0,1,0,1];var YI=r("d6e5"),JI=r("9def");class QI{constructor(e){this.context=e,this.renderPlugins=new Array,this.slots=[];for(let t=0;t<Vp["a"].MAX_SLOTS;++t)this.slots[t]=[]}add(e,t,r){const i=()=>{this.renderPlugins.push(t);for(const r of e)this.slots[r].push(t);this.context.requestRender()},n=t.initializeRenderContext(this.context,r);if(Object(_["o"])(n))return n.then(i);i()}remove(e){const t=this.renderPlugins.length;this.renderPlugins=this.renderPlugins.filter(t=>t!==e),Object(fp["a"])(this.renderPlugins.length<t,"Removing non-added render plugin");for(let r=0;r<this.slots.length;++r)this.slots[r]=this.slots[r].filter(t=>t!==e);e.uninitializeRenderContext(),this.context.requestRender()}prepareRender(e,t){for(const r of this.renderPlugins)r.prepareRender&&r.prepareRender(e,t)}updateAnimation(e){let t=!1;return this.renderPlugins.forEach(r=>{r.updateAnimation&&(t=r.updateAnimation(e)||t)}),t}render(){const e=this.slots[this.context.renderContext.slot],t=new Array;e.filter(e=>{if(!e.canRender)return!1;if(KI(e)){const r=e.prepareTechnique(this.context.renderContext);return!!r&&(t.push(r),!0)}return t.push(null),!0}).forEach((e,r)=>e.render(this.context.renderContext,t[r]))}queryDepthRange(e){const t=eD;t.near=1/0,t.far=-1/0;for(const r of this.renderPlugins)if(r.queryDepthRange){const i=r.queryDepthRange(e);i&&jM(t,i,t)}return t}get needsTransparentPass(){return this.renderPlugins.some(e=>e.needsTransparentPass)}get needsHighlight(){return this.renderPlugins.some(e=>e.needsHighlight)}get needsLinearDepth(){return this.renderPlugins.some(e=>e.needsLinearDepth)}get needsLaserlineWithContrastControl(){const e=this.slots[Vp["a"].LASERLINES_CONTRAST_CONTROL];return!!e&&e.length>0}get renderOccludedFlags(){let e=0;return this.renderPlugins.forEach(t=>{t.renderOccludedFlags&&(e|=t.renderOccludedFlags)}),e}}function KI(e){return"prepareTechnique"in e}const eD={near:0,far:0};var tD=r("6ad6");class rD extends uh["a"]{constructor(e,t){super(e,t,()=>this.destroy())}initializeProgram(e){const t=rD.shader.get().build(this.configuration);return new ph["a"](e.rctx,t,hh["a"])}initializePipeline(e){switch(this.configuration.pass){case tD["a"].Accumulate:return Object(bh["g"])({blending:Object(bh["h"])(fh["b"].ONE,fh["b"].ONE,fh["b"].ONE,fh["b"].ONE),colorWrite:bh["d"],depthTest:null,depthWrite:null});case tD["a"].Visualize:case tD["a"].VisualizeCurrent:return Object(bh["g"])({blending:hP["d"],colorWrite:bh["d"],depthTest:null,depthWrite:null})}return Object(bh["g"])({})}bindPass(e){if(this.configuration.pass===tD["a"].Accumulate||this.configuration.pass===tD["a"].VisualizeCurrent){const t=e;this.program.bindTexture(t.linearDepthTexture,"depthMap"),t.shadowMap.bind(this.program),t.shadowMap.bindView(this.program,t.camera.center),this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniformMatrix4fv("inverseViewMatrix",t.inverseViewMatrix),this.program.setUniform4fv("projInfo",t.projInfo),this.program.setUniform2fv("zScale",t.zScale)}else if(this.configuration.pass===tD["a"].Visualize){const t=e;if(this.program.bindTexture(t.shadowCastMap,"shadowCastMap"),this.program.setUniform1f("sampleScale",t.sampleScale),this.program.setUniform1f("opacityFromElevation",t.opacityFromElevation),this.program.setUniform4fv("uColor",t.color),this.configuration.visualization===tD["b"].Gradient&&this.configuration.bandsEnabled){const t=e;this.program.setUniform1f("bandSize",t.bandSize)}else if(this.configuration.visualization===tD["b"].Threshold){const t=e;this.program.setUniform1f("threshold",t.threshold)}}}get primitiveType(){return fh["r"].TRIANGLE_STRIP}}rD.shader=new lh["a"](tD["c"],()=>r.e("chunk-2d0ccf76").then(r.bind(null,"4fd2")));class iD extends dh["a"]{constructor(){super(...arguments),this.pass=tD["a"].Accumulate,this.visualization=tD["b"].Gradient,this.bandsEnabled=!1}}Object(l["a"])([Object(dh["b"])({count:tD["a"].COUNT})],iD.prototype,"pass",void 0),Object(l["a"])([Object(dh["b"])()],iD.prototype,"visualization",void 0),Object(l["a"])([Object(dh["b"])()],iD.prototype,"bandsEnabled",void 0);const nD=Object(Xd["g"])(.01,0,.25,1),aD=4e4,sD=5e4,oD=1/512;let cD=class extends F["a"]{constructor(e,t,r,i){super({}),this._techniqueRepository=e,this._rctx=t,this._shadowAccumulator=r,this._requestRender=i,this._visualizationParams={shadowCastMap:this._shadowCastTexture,sampleScale:0,color:nD,threshold:.5,bandSize:.1,opacityFromElevation:1},this._techniqueConfig=new iD,this._enabled=!1,this._vao=Object(Oh["d"])(t),this._techniqueConfig.pass=tD["a"].Visualize,this._techniqueConfig.visualization=tD["b"].Gradient}normalizeCtorArgs(){return{}}dispose(){this._stop(),this._vao=Object(z["e"])(this._vao),this._techniqueRepository.release(this._technique),this._technique=null,this._shadowAccumulator=null}get visualizeShadowCastTechnique(){return this._technique=this._techniqueRepository.releaseAndAcquire(rD,this._techniqueConfig,this._technique),this._technique}render(){if(!this._isRenderingVisualization)return;this._sampleScale=1/this._computedSamples,this._rctx.bindVAO(this._vao);const e=this.visualizeShadowCastTechnique;this._rctx.useTechnique(e),e.bindPass(this._visualizationParams),this._rctx.drawArrays(e.primitiveType,0,Object(Kh["f"])(this._vao,"geometry"))}setOptions(e){void 0!==e.enabled&&this._setEnabled(e.enabled),void 0!==e.color&&this._setColor(e.color),void 0!==e.threshold&&(this._threshold=e.threshold),void 0!==e.visualization&&(this._visualization=e.visualization),void 0!==e.bandSize&&(this._bandSize=e.bandSize),void 0!==e.bandsEnabled&&(this._bandsEnabled=e.bandsEnabled)}get opacityFromElevation(){return this._visualizationParams.opacityFromElevation}set opacityFromElevation(e){this._visualizationParams.opacityFromElevation!==e&&(this._visualizationParams.opacityFromElevation=e,this.notifyChange("opacityFromElevation"))}get _isRenderingVisualization(){return this._enabled&&this._computedSamples>0&&this.opacityFromElevation>oD}get _computedSamples(){return this._shadowAccumulator.computedSamples}get _shadowCastTexture(){return this._shadowAccumulator.shadowCastTexture}get _sampleScale(){return this._visualizationParams.sampleScale}set _sampleScale(e){this._visualizationParams.sampleScale=e}get _threshold(){return this._visualizationParams.threshold}set _threshold(e){this._threshold!==e&&(this._visualizationParams.threshold=e,this._requestRenderIfRunning())}get _visualization(){return this._techniqueConfig.visualization}set _visualization(e){e!==this._visualization&&(this._techniqueConfig.visualization=e,this._techniqueRepository.release(this._technique),this._technique=null,this._requestRenderIfRunning())}get _bandSize(){return this._visualizationParams.bandSize}set _bandSize(e){e!==this._bandSize&&(this._visualizationParams.bandSize=e,this._requestRenderIfRunning())}get _bandsEnabled(){return this._techniqueConfig.bandsEnabled}set _bandsEnabled(e){e!==this._bandsEnabled&&(this._techniqueConfig.bandsEnabled=e,this._techniqueRepository.release(this._technique),this._technique=null,this._requestRenderIfRunning())}_setColor(e){const t=this._visualizationParams.color;Object(U_["g"])(e,t)||(Object(U_["c"])(this._visualizationParams.color,e),this._requestRenderIfRunning())}_setEnabled(e){e!==this._enabled&&(e?this._start():this._stop())}_requestRenderIfRunning(){this._enabled&&this._requestRender()}_start(){this._enabled=!0,this._requestRender()}_stop(){this._enabled=!1,this._requestRender()}};Object(l["a"])([Object(j["b"])()],cD.prototype,"opacityFromElevation",null),cD=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.ShadowCastRenderer")],cD);class lD{constructor(){this.camera=new $m["b"],this.lightMat=Object(Kd["d"])()}}class uD{constructor(e,t,r=0){this.rctx=e,this.viewingMode=t,this._enabled=!1,this._snapshots=new Array,this.textureSize=0,this.maxTextureSize=0,this.numCascades=1,this.maxNumCascades=4,this.splitSchemeLambda=0,this.warp=!0,this.cascadeDistances=[0,0,0,0,0],this.cascades=[],this.maxTextureSize=this.rctx.parameters.maxTextureSize;for(let i=0;i<4;++i)this.cascades.push(new lD);this.snapshotCount=r}dispose(){this._discardDepthTexture(),this._discardAllSnapshots()}set maxCascades(e){this.maxNumCascades=Object(dr["f"])(Math.floor(e),1,4)}get maxCascades(){return this.maxNumCascades}set enabled(e){this._enabled=e,e||(this._discardDepthTexture(),this._discardAllSnapshots())}get enabled(){return this._enabled}get snapshotCount(){return this._snapshots.length}set snapshotCount(e){const t=this._snapshots.length;if(e>t){const r=e-t;this._snapshots.length=e;for(let e=0;e<r;++e)this._snapshots[t+e]=null}else if(e<this.snapshotCount){const r=t-e;for(let t=0;t<r;++t)this._discardSnapshot(e+t);this._snapshots.length=e}}getSnapshot(e){return this.enabled?this._snapshots[e]:null}getCascades(){for(let e=0;e<this.numCascades;++e)TD[e]=this.cascades[e];return TD.length=this.numCascades,TD}start(e,t,r){Object(fp["a"])(this.enabled),this.textureSize=this._computeTextureSize(e.fullWidth,e.fullHeight),this._ensureDepthTexture();const{near:i,far:n}=this._clampNearFar(r);this._computeCascadeDistances(n,i),this._setupMatrices(e,t);const a=e.viewMatrix,s=e.projectionMatrix;for(let o=0;o<this.numCascades;++o)this._constructCascade(o,s,a,t);this.lastOrigin=null,this.clear()}finish(e){Object(fp["a"])(this.enabled),this.rctx.bindFramebuffer(e)}bind(e){this.enabled?(this._depthTextureUnit=e.bindTexture(this._depthTexture,"shadowMapTex"),e.setUniform1f("depthHalfPixelSz",.5/this.textureSize),e.setUniform1i("numCascades",this.numCascades),e.setUniform4f("cascadeDistances",this.cascadeDistances[0],this.numCascades>1?this.cascadeDistances[1]:1/0,this.numCascades>2?this.cascadeDistances[2]:1/0,this.numCascades>3?this.cascadeDistances[3]:1/0)):e.setUniform1f("depthHalfPixelSz",-1)}bindView(e,t){if(!this.enabled)return;const r=this.lastOrigin;if(!r||r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]){this.lastOrigin=this.lastOrigin||Object(ju["f"])(),Object($o["m"])(this.lastOrigin,t);for(let e=0;e<this.numCascades;++e){Object(Qd["k"])(SD,this.cascades[e].lightMat,t);for(let t=0;t<16;++t)ED[16*e+t]=SD[t]}}e.setUniformMatrix4fv("shadowMapMatrix",ED)}takeCascadeSnapshotTo(e,t){Object(fp["a"])(this.enabled),this._ensureSnapshot(t),this._bindFbo();const r=this.rctx,i=r.bindTexture(this._snapshots[t],Qh["a"].TEXTURE_UNIT_FOR_UPDATES);r.gl.copyTexSubImage2D(fh["A"].TEXTURE_2D,0,e.camera.viewport[0],e.camera.viewport[1],e.camera.viewport[0],e.camera.viewport[1],e.camera.viewport[2],e.camera.viewport[3]),r.bindTexture(i,Qh["a"].TEXTURE_UNIT_FOR_UPDATES)}clear(){const e=this.rctx;this._bindFbo(),e.setClearColor(1,1,1,1),e.clearSafe(fh["e"].COLOR_BUFFER_BIT|fh["e"].DEPTH_BUFFER_BIT)}_computeTextureSize(e,t){const r=.5*Math.log(e*e+t*t)*Math.LOG2E,i=.35,n=2**Math.round(r+i);return Math.min(this.maxTextureSize,2*n)}_ensureDepthTexture(){if(null!=this._depthTexture&&this._depthTexture.descriptor.width===this.textureSize)return;this._discardDepthTexture();const e={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].NEAREST,flipped:!0,width:this.textureSize,height:this.textureSize};this._depthTexture=new Qh["a"](this.rctx,e),this.fbo=new Mh["a"](this.rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].DEPTH_RENDER_BUFFER,width:this.textureSize,height:this.textureSize},this._depthTexture)}_ensureSnapshot(e){const t=this._snapshots[e];if(Object(z["k"])(t)&&t.descriptor.width===this.textureSize)return;this._discardSnapshot(e);const r={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:fh["z"].NEAREST,flipped:!0,width:this.textureSize,height:this.textureSize};this._snapshots[e]=new Qh["a"](this.rctx,r)}_discardDepthTexture(){this.fbo=Object(z["e"])(this.fbo),this._depthTexture=Object(z["e"])(this._depthTexture)}_discardSnapshot(e){this._snapshots[e]=Object(z["e"])(this._snapshots[e])}_discardAllSnapshots(){for(let e=0;e<this.snapshotCount;++e)this._discardSnapshot(e)}_bindFbo(){const e=this.rctx;Object(z["k"])(this._depthTextureUnit)&&(e.bindTexture(null,this._depthTextureUnit),this._depthTextureUnit=null),e.bindFramebuffer(this.fbo)}_constructCascade(e,t,r,i){const n=this.cascades[e],a=-this.cascadeDistances[e],s=-this.cascadeDistances[e+1],o=(t[10]*a+t[14])/Math.abs(t[11]*a+t[15]),c=(t[10]*s+t[14])/Math.abs(t[11]*s+t[15]);Object(fp["a"])(o<c);for(let u=0;u<8;++u){Object(U_["l"])(fD,u%4==0||u%4==3?-1:1,u%4==0||u%4==1?-1:1,u<4?o:c,1),Object(U_["m"])(bD[u],fD,pD);for(let e=0;e<3;++e)bD[u][e]/=bD[u][3]}Object($o["u"])(xD,bD[0]),Object(Qd["k"])(dD,wD,xD),n.camera.viewMatrix=dD;for(let u=0;u<8;++u)Object($o["s"])(bD[u],bD[u],n.camera.viewMatrix);Object($o["m"])(mD,bD[0]),Object($o["m"])(gD,bD[0]);for(let u=1;u<8;++u)for(let e=0;e<3;++e)mD[e]=Math.min(mD[e],bD[u][e]),gD[e]=Math.max(gD[e],bD[u][e]);mD[2]-=200,gD[2]+=200,n.camera.near=-gD[2],n.camera.far=-mD[2],this.warp?this._constructTrapezoidalProjection(r,i,n):this._constructOrthogonalProjection(n),Object(Qd["n"])(n.lightMat,n.camera.projectionMatrix,n.camera.viewMatrix);const l=this.textureSize/2;n.camera.viewport[0]=e%2==0?0:l,n.camera.viewport[1]=0===Math.floor(e/2)?0:l,n.camera.viewport[2]=l,n.camera.viewport[3]=l}_constructOrthogonalProjection(e){Object(Qd["r"])(e.camera.projectionMatrix,mD[0],gD[0],mD[1],gD[1],e.camera.near,e.camera.far)}_constructTrapezoidalProjection(e,t,r){const i=1/bD[0][3],n=1/bD[4][3];Object(fp["a"])(i<n);let a=i+Math.sqrt(i*n);const s=Math.sin(Object(dr["b"])(e[2]*t[0]+e[6]*t[1]+e[10]*t[2]));a/=s,kD(bD,a,s,yD,OD,vD,_D,jD),HD(yD,OD,_D,jD,r.camera.projectionMatrix),r.camera.projectionMatrix[10]=2/(mD[2]-gD[2]),r.camera.projectionMatrix[14]=-(mD[2]+gD[2])/(mD[2]-gD[2])}_setupMatrices(e,t){Object(Qd["n"])(hD,e.projectionMatrix,e.viewMatrix),Object(Qd["b"])(pD,hD);const r=this.viewingMode===As["a"].Global?e.eye:Object($o["y"])(xD,0,0,1);Object(Qd["o"])(wD,[0,0,0],[-t[0],-t[1],-t[2]],r)}_clampNearFar(e){let{near:t,far:r}=e;return t<2&&(t=2),r<2&&(r=2),t>=r&&(t=2,r=4),{near:t,far:r}}_computeCascadeDistances(e,t){this.numCascades=Math.min(1+Math.floor(Object(fp["h"])(e/t,4)),this.maxNumCascades);const r=(e-t)/this.numCascades,i=(e/t)**(1/this.numCascades);let n=t,a=t;for(let s=0;s<this.numCascades+1;++s)this.cascadeDistances[s]=Object(dr["l"])(n,a,this.splitSchemeLambda),n*=i,a+=r}get gpuMemoryUsage(){var e,t;return this._snapshots.reduce((e,t)=>e+Object(Kh["d"])(t),null!=(e=null==(t=this.fbo)?void 0:t.gpuMemoryUsage)?e:0)}get test(){const e=this;return{maxNumCascades:this.maxNumCascades,cascades:this.cascades,textureSize:this.textureSize,depthTexture:this._depthTexture,set splitSchemeLambda(t){e.splitSchemeLambda=t},get splitSchemeLambda(){return e.splitSchemeLambda},set warp(t){e.warp=t},get warp(){return e.warp}}}}const dD=Object(Kd["d"])(),hD=Object(Kd["d"])(),pD=Object(Kd["d"])(),fD=Object(Xd["e"])(),bD=[];for(let IF=0;IF<8;++IF)bD.push(Object(Xd["e"])());const mD=Object(ju["f"])(),gD=Object(ju["f"])(),yD=Object(vo["b"])(),OD=Object(vo["b"])(),vD=Object(vo["b"])(),_D=Object(vo["b"])(),jD=Object(vo["b"])(),wD=Object(Kd["d"])(),xD=Object(ju["f"])(),TD=[],SD=Object(Kd["d"])(),ED=new Float32Array(64),AD=Object(vo["b"])(),CD=Object(vo["b"])(),RD=[Object(vo["b"])(),Object(vo["b"])(),Object(vo["b"])(),Object(vo["b"])()],MD=Object(vo["b"])(),PD=Object(vo["b"])(),ID=Object(vo["b"])(),DD=Object(vo["b"])(),LD=Object(vo["b"])(),ND=Object(vo["b"])(),FD=Object(vo["b"])();function kD(e,t,r,i,n,a,s,o){Object(io["s"])(AD,0,0);for(let _=0;_<4;++_)Object(io["m"])(AD,AD,e[_]);Object(io["g"])(AD,AD,.25),Object(io["s"])(CD,0,0);for(let _=4;_<8;++_)Object(io["m"])(CD,CD,e[_]);Object(io["g"])(CD,CD,.25),Object(io["o"])(RD[0],e[4],e[5],.5),Object(io["o"])(RD[1],e[5],e[6],.5),Object(io["o"])(RD[2],e[6],e[7],.5),Object(io["o"])(RD[3],e[7],e[4],.5);let c=0,l=Object(io["a"])(RD[0],AD);for(let _=1;_<4;++_){const e=Object(io["a"])(RD[_],AD);e<l&&(l=e,c=_)}Object(io["f"])(MD,RD[c],e[c+4]);const u=MD[0];let d,h;MD[0]=-MD[1],MD[1]=u,Object(io["f"])(PD,CD,AD),Object(io["k"])(PD,MD)<0&&Object(io["n"])(MD,MD),Object(io["o"])(MD,MD,PD,r),Object(io["i"])(MD,MD),d=h=Object(io["k"])(Object(io["f"])(ID,e[0],AD),MD);for(let _=1;_<8;++_){const t=Object(io["k"])(Object(io["f"])(ID,e[_],AD),MD);t<d?d=t:t>h&&(h=t)}Object(io["c"])(i,AD),Object(io["g"])(ID,MD,d-t),Object(io["m"])(i,i,ID);let p=-1,f=1,b=0,m=0;for(let _=0;_<8;++_){Object(io["f"])(DD,e[_],i),Object(io["i"])(DD,DD);const t=MD[0]*DD[1]-MD[1]*DD[0];t>0?t>p&&(p=t,b=_):t<f&&(f=t,m=_)}Object(fp["m"])(p>0,"leftArea"),Object(fp["m"])(f<0,"rightArea"),Object(io["g"])(LD,MD,d),Object(io["m"])(LD,LD,AD),Object(io["g"])(ND,MD,h),Object(io["m"])(ND,ND,AD),FD[0]=-MD[1],FD[1]=MD[0];const g=Object(fp["k"])(i,e[m],ND,Object(io["m"])(ID,ND,FD),1,n),y=Object(fp["k"])(i,e[b],ND,ID,1,a),O=Object(fp["k"])(i,e[b],LD,Object(io["m"])(ID,LD,FD),1,s),v=Object(fp["k"])(i,e[m],LD,ID,1,o);Object(fp["m"])(g,"rayRay"),Object(fp["m"])(y,"rayRay"),Object(fp["m"])(O,"rayRay"),Object(fp["m"])(v,"rayRay")}function UD(e,t){return 3*t+e}const zD=Object(vo["b"])();function BD(e,t){return Object(io["s"])(zD,e[t],e[t+3]),zD}const VD=Object(vo["b"])(),GD=Object(wh["b"])();function HD(e,t,r,i,n){Object(io["f"])(VD,r,i),Object(io["g"])(VD,VD,.5),GD[0]=VD[0],GD[1]=VD[1],GD[2]=0,GD[3]=VD[1],GD[4]=-VD[0],GD[5]=0,GD[6]=VD[0]*VD[0]+VD[1]*VD[1],GD[7]=VD[0]*VD[1]-VD[1]*VD[0],GD[8]=1,GD[UD(0,2)]=-Object(io["k"])(BD(GD,0),e),GD[UD(1,2)]=-Object(io["k"])(BD(GD,1),e);let a=Object(io["k"])(BD(GD,0),r)+GD[UD(0,2)],s=Object(io["k"])(BD(GD,1),r)+GD[UD(1,2)],o=Object(io["k"])(BD(GD,0),i)+GD[UD(0,2)],c=Object(io["k"])(BD(GD,1),i)+GD[UD(1,2)];a=-(a+o)/(s+c),GD[UD(0,0)]+=GD[UD(1,0)]*a,GD[UD(0,1)]+=GD[UD(1,1)]*a,GD[UD(0,2)]+=GD[UD(1,2)]*a,a=1/(Object(io["k"])(BD(GD,0),r)+GD[UD(0,2)]),s=1/(Object(io["k"])(BD(GD,1),r)+GD[UD(1,2)]),GD[UD(0,0)]*=a,GD[UD(0,1)]*=a,GD[UD(0,2)]*=a,GD[UD(1,0)]*=s,GD[UD(1,1)]*=s,GD[UD(1,2)]*=s,GD[UD(2,0)]=GD[UD(1,0)],GD[UD(2,1)]=GD[UD(1,1)],GD[UD(2,2)]=GD[UD(1,2)],GD[UD(1,2)]+=1,a=Object(io["k"])(BD(GD,1),t)+GD[UD(1,2)],s=Object(io["k"])(BD(GD,2),t)+GD[UD(2,2)],o=Object(io["k"])(BD(GD,1),r)+GD[UD(1,2)],c=Object(io["k"])(BD(GD,2),r)+GD[UD(2,2)],a=-.5*(a/s+o/c),GD[UD(1,0)]+=GD[UD(2,0)]*a,GD[UD(1,1)]+=GD[UD(2,1)]*a,GD[UD(1,2)]+=GD[UD(2,2)]*a,a=Object(io["k"])(BD(GD,1),t)+GD[UD(1,2)],s=Object(io["k"])(BD(GD,2),t)+GD[UD(2,2)],o=-s/a,GD[UD(1,0)]*=o,GD[UD(1,1)]*=o,GD[UD(1,2)]*=o,n[0]=GD[0],n[1]=GD[1],n[2]=0,n[3]=GD[2],n[4]=GD[3],n[5]=GD[4],n[6]=0,n[7]=GD[5],n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=GD[6],n[13]=GD[7],n[14]=0,n[15]=GD[8]}var qD;let WD=qD=class extends F["a"]{constructor(e,t,r,i,n,a){super({}),this._rctx=e,this._stage=r,this._prepareForShadowMapPass=i,this._renderToShadowMap=n,this._requestRender=a,this._progress=0,this._sampleCount=0,this._cachedCamera=new $m["b"],this._contentCamera=new $m["b"],this._enabled=!1,this._cachedLightDirections=[],this._depthRange=xM,this._previewing=!1,this._handles=new ge["a"],this._cameraForcedForScreenshot=!1,this._shadowMap=new uD(e,r.viewingMode),this._shadowMap.enabled=!0,this._vao=Object(Oh["d"])(e);const s={colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE,width:0,height:0},o={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:0,height:0};this._fbo=new Mh["a"](e,s,o),this._accumulationParams={camera:this._cachedCamera,linearDepthTexture:null,shadowMap:this._shadowMap,inverseViewMatrix:Object(Kd["d"])(),projInfo:Object(Xd["e"])(),zScale:Object(vo["b"])()},this._accumulationRenderer=new cD(t,e,this,a);const c=this._stage.resourceController.scheduler;this._handles.add(c.registerTask(Ba["c"].SHADOW_ACCUMULATOR,this)),this._handles.add(Object(oe["e"])(()=>r.renderView,e=>{this._handles.remove(qD.renderViewHandleKey),Object(z["j"])(e)||this._handles.add(e.events.on("force-camera-for-screenshot",()=>this._cameraForcedForScreenshot=!0),qD.renderViewHandleKey)},oe["d"]))}normalizeCtorArgs(){return{}}get computedSamples(){return this._progress}get shadowCastTexture(){return this._fbo.colorTexture}get isAccumulating(){return this._isPreviewing||this._isRefining}get accumulationTechnique(){if(Object(z["j"])(this._accumulationTechnique)){const e={rctx:this._rctx,viewingMode:this._stage.viewingMode},t=new iD;t.pass=tD["a"].Accumulate,this._accumulationTechnique=new rD(e,t)}return this._accumulationTechnique}get _isRefining(){return this._isActive&&!this._isDoneAccumulating&&!this._previewing}get _isPreviewing(){return this._isActive&&this._previewing}get _isActive(){return this._enabled&&this._sampleCount>0}get _canAccumulate(){return null!==this._accumulationParams.linearDepthTexture&&this._depthRange!==xM&&this._opacityFromElevation>oD}get _isDoneAccumulating(){return this._progress>=this._sampleCount}get _lightDirections(){return this._cachedLightDirections}set _lightDirections(e){const t=this._cachedLightDirections;if(Object(S["e"])(t,e,$o["E"]))return;const r=e.length;t.length=r,this._sampleCount=Math.min(tD["e"],r);for(let i=0;i<r;++i){const r=e[i],n=t[i]||Object(ju["f"])();Object($o["m"])(n,r),t[i]=n}this._invalidate()}get _projInfo(){return this._accumulationParams.projInfo}get _zScale(){return this._accumulationParams.zScale}get _inverseView(){return this._accumulationParams.inverseViewMatrix}get _opacityFromElevation(){return this._accumulationRenderer.opacityFromElevation}set _opacityFromElevation(e){this._accumulationRenderer.opacityFromElevation=e}get running(){return this._isRefining&&this._canAccumulate&&this._progress>0}runTask(e){for(this._prepareForShadowMapPass(this._cachedCamera,this._contentCamera);!e.done&&!this._isDoneAccumulating;)this._accumulateShadow(),e.madeProgress();this._requestRender()}accumulateFixedSamples(){if(!this.isAccumulating||!this._canAccumulate)return;(this._previewing||0===this._progress||this._cameraForcedForScreenshot)&&this._clear();const e=this._cameraForcedForScreenshot?this._sampleCount:Math.min(qD.previewSamples,this._sampleCount-this._progress);for(let t=0;t<e;++t)this._accumulateShadow();this._cameraForcedForScreenshot=!1}render(){this._accumulationRenderer.render()}dispose(){this._stop(),this._handles.destroy(),this._accumulationRenderer=Object(z["e"])(this._accumulationRenderer),this._shadowMap=Object(z["e"])(this._shadowMap),this._fbo=Object(z["e"])(this._fbo),this._vao=Object(z["e"])(this._vao),this._accumulationTechnique=Object(z["r"])(this._accumulationTechnique),this._cachedLightDirections.length=0,this._sampleCount=0}setOptions(e){void 0!==e.enabled&&this._setEnabled(e.enabled),void 0!==e.previewing&&this.setPreviewing(e.previewing),void 0!==e.lightDirections&&this.setLightDirections(e.lightDirections),this._accumulationRenderer.setOptions(e)}setPreviewing(e){this._previewing!==e&&(this._previewing=e,this._requestRenderIfEnabled())}setLightDirections(e){this._lightDirections=e}setAccumulationDependencies(e,t,r,i){this._accumulationParams.linearDepthTexture=e,this._depthRange=t,this._updateCamera(r),this._contentCamera=i,this.notifyChange("_canAccumulate")}readAccumulatedShadow(e,t){if(!this._isActive||this._progress<1||e<0||e>this._fbo.width||t<0||t>this._fbo.height)return 0;const r=$D;return this._fbo.readPixels(e,t,1,1,fh["p"].RGBA,fh["q"].UNSIGNED_BYTE,r),r[0]/this._progress}_start(){this._progress=0,this._enabled=!0}_stop(){this._enabled=!1}_invalidate(){this._progress=0,this._requestRenderIfEnabled()}_clear(){this._rctx.bindFramebuffer(this._fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clearSafe(fh["e"].COLOR_BUFFER_BIT),this._progress=0}_accumulateShadow(){const e=this._lightDirections[this._progress],t=this._cachedCamera;this._renderToShadowMap(this._shadowMap,e,t,this._depthRange),this._rctx.bindFramebuffer(this._fbo);const r=this.accumulationTechnique;this._rctx.useTechnique(r),r.bindPass(this._accumulationParams),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(r.primitiveType,0,Object(Kh["f"])(this._vao,"geometry")),this._progress++}_updateCamera(e){if(e.equals(this._cachedCamera))return;const{fullWidth:t,fullHeight:r,projectionMatrix:i,viewMatrix:n,center:a}=e;this._cachedCamera.copyFrom(e),this._fbo.resize(t,r),Object(fp["f"])(i,t,r,this._projInfo,this._zScale),Object(Qd["k"])(this._inverseView,n,a),Object(Qd["b"])(this._inverseView,this._inverseView),this._opacityFromElevation=1-Object(dr["r"])(aD,sD,e.relativeElevation)}_setEnabled(e){e!==this._enabled&&(e?this._start():this._stop())}_requestRenderIfEnabled(){this._enabled&&this._requestRender()}get test(){return{lightDirections:this._lightDirections,isDone:()=>this._isDoneAccumulating,isActive:()=>this._isActive}}};WD.previewSamples=6,WD.renderViewHandleKey="renderView",Object(l["a"])([Object(j["b"])()],WD.prototype,"_progress",void 0),Object(l["a"])([Object(j["b"])()],WD.prototype,"_sampleCount",void 0),Object(l["a"])([Object(j["b"])()],WD.prototype,"_enabled",void 0),Object(l["a"])([Object(j["b"])()],WD.prototype,"_depthRange",void 0),Object(l["a"])([Object(j["b"])()],WD.prototype,"_previewing",void 0),Object(l["a"])([Object(j["b"])()],WD.prototype,"_accumulationRenderer",void 0),Object(l["a"])([Object(j["b"])()],WD.prototype,"_isRefining",null),Object(l["a"])([Object(j["b"])()],WD.prototype,"_isActive",null),Object(l["a"])([Object(j["b"])()],WD.prototype,"_canAccumulate",null),Object(l["a"])([Object(j["b"])()],WD.prototype,"_isDoneAccumulating",null),Object(l["a"])([Object(j["b"])()],WD.prototype,"_opacityFromElevation",null),Object(l["a"])([Object(j["b"])()],WD.prototype,"running",null),WD=qD=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],WD);const $D=new Uint8Array(4);var ZD=r("65c9");const XD=0,YD=1;class JD extends uh["a"]{constructor(e){super(e,null,()=>this.destroy())}initializeProgram(e){const t=JD.shader.get().build({highlightedThreshold:.99999,selfShadowThreshold:.025});return new ph["a"](e.rctx,t,hh["a"])}initializePipeline(e){return Object(bh["g"])({blending:Object(bh["h"])(fh["b"].SRC_ALPHA,fh["b"].ONE,fh["b"].ONE_MINUS_SRC_ALPHA,fh["b"].ONE_MINUS_SRC_ALPHA),colorWrite:bh["d"],depthTest:null,depthWrite:null})}bindPass(e,t){if(Object(z["j"])(t.linearDepthTexture))return;this.program.bindTexture(t.linearDepthTexture,"depthMap"),this.program.bindTexture(t.highlightColorTexture,"highlightMap"),Object($o["s"])(QD,t.lighting.lightingMainDirection,t.camera.viewInverseTransposeMatrix),Object($o["t"])(QD,QD),Object(fp["f"])(t.camera.projectionMatrix,t.camera.fullWidth,t.camera.fullHeight,eL,KD),Object(Qd["k"])(tL,t.camera.viewMatrix,t.camera.center),Object(Qd["b"])(tL,tL),this.program.setUniform4fv("uColor",e.shadowColor),this.program.setUniform1f("opacity",e.shadowOpacity),this.program.setUniform1f("occludedOpacity",e.occludedShadowOpacity),this.program.setUniform1f("terminationFactor",e.opacityElevation*e.dayNightTerminator),this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniformMatrix4fv("inverseViewMatrix",tL),this.program.setUniform4fv("projInfo",eL),this.program.setUniform2fv("zScale",KD),this.program.setUniform3fv("lightingMainDirectionView",QD),this.program.setUniform2f("texelSize",1/t.linearDepthTexture.descriptor.width,1/t.linearDepthTexture.descriptor.height),t.shadowMap.bind(this.program),t.shadowMap.bindView(this.program,t.camera.center);let r=t.shadowMap.getSnapshot(XD);Object(z["k"])(r)&&this.program.bindTexture(r,"highlightDepthTex"),r=t.shadowMap.getSnapshot(YD),Object(z["k"])(r)&&this.program.bindTexture(r,"defaultDepthTex")}get primitiveType(){return fh["r"].TRIANGLE_STRIP}}JD.shader=new lh["a"](ZD["a"],()=>r.e("chunk-2d0bd404").then(r.bind(null,"2acb")));const QD=Object(ju["f"])(),KD=Object(vo["b"])(),eL=Object(Xd["e"])(),tL=Object(Kd["d"])(),rL=.001953125,iL=4e4,nL=5e4;class aL{constructor(e,t){this._rctx=e,this._viewingMode=t,this._maxOpacity=1,this._parameters={shadowColor:Object(KT["c"])(1,0,1,1),shadowOpacity:.2,occludedShadowOpacity:.1,opacityElevation:1,dayNightTerminator:1},this._vao=Object(Oh["d"])(this._rctx)}get technique(){return Object(z["j"])(this._technique)&&(this._technique=new JD({rctx:this._rctx,viewingMode:this._viewingMode})),this._technique}render(e,t){if(!e.shadowMap.enabled||!e.linearDepthTexture||!this.isVisible)return;const r=this.technique;this._rctx.bindFramebuffer(t),this._rctx.useTechnique(r),r.bindPass(this._parameters,e),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(r.primitiveType,0,Object(Kh["f"])(this._vao,"geometry"))}get gpuMemoryUsage(){var e,t;return null!=(e=null==(t=this._vao)?void 0:t.size)?e:0}setDefaultOptions(e){this._parameters={...this._parameters,...e},this._updateMaxOpacity()}updateParameters(e,t){this._parameters.opacityElevation=1-Object(dr["r"])(iL,nL,e.relativeElevation);const r=this._viewingMode===As["a"].Global?Object($o["t"])(sL,e.center):Object($o["y"])(sL,0,0,1),i=Object($o["j"])(r,t);this._parameters.dayNightTerminator=Object(dr["r"])(0,1,Object(dr["f"])(30*i,0,1))}dispose(){this._vao=Object(z["e"])(this._vao),this._technique=Object(z["r"])(this._technique)}get isVisible(){const{opacityElevation:e,dayNightTerminator:t}=this._parameters;return this._maxOpacity*e*t>=rL}_updateMaxOpacity(){const e=this._parameters,t=e.shadowColor,r=Math.max(e.shadowOpacity,e.occludedShadowOpacity);this._maxOpacity=r*t[3]}}const sL=Object(ju["f"])(),oL=Object(xu["d"])();class cL{constructor(){this._worldPlane=oL}get isEnabled(){return this.plane!==oL}get plane(){return this._worldPlane}set plane(e){this._worldPlane=e||oL}}var lL=r("43a4");class uL extends uh["a"]{initializeProgram(e){const t=uL.shader.get(),r=this.configuration,i=t.build({output:r.output,threshold:.05,localConstrastAdaption:2,maxSearchSteps:8,maxDistanceAreaTex:16});return new ph["a"](e.rctx,i,hh["a"])}initializePipeline(){return Object(bh["g"])({colorWrite:bh["d"]})}}uL.shader=new lh["a"](lL["b"],()=>r.e("chunk-2d237d1f").then(r.bind(null,"fd6a")));class dL extends dh["a"]{constructor(){super(...arguments),this.output=lL["a"].EdgeDetector}}Object(l["a"])([Object(dh["b"])({count:lL["a"].COUNT})],dL.prototype,"output",void 0);let hL=class extends F["a"]{constructor(e,t){super({}),this.rctx=e,this._techniqueRep=t,this._isEnabled=!1}normalizeCtorArgs(){return{}}dispose(){this._abortController=Object(z["a"])(this._abortController),this.disable()}_loadResources(e){if(Object(z["k"])(this._abortController))return!1;if(Object(z["k"])(this._searchTexture))return!0;this._abortController=new AbortController;const t=this._abortController.signal;return r.e("chunk-2d21aaeb").then(r.bind(null,"bd0c")).then(e=>this._loadTextures(e,t)).then(()=>e()).finally(()=>this._abortController=null),!1}_loadTextures(e,t){return Object(_["v"])(t),Promise.all([this._loadTextureFromBase64(e.areaTexture,fh["z"].LINEAR,fh["p"].RGB),this._loadTextureFromBase64(e.searchTexure,fh["z"].NEAREST,fh["p"].LUMINANCE)]).then(([e,r])=>{Object(_["n"])(t)?(e.dispose(),r.dispose(),Object(_["v"])(t)):(this._areaTexture=e,this._searchTexture=r)})}get updating(){return Object(z["k"])(this._abortController)}enable(e){if(this._isEnabled)return!0;if(!this._edgeDetectTechnique||!this._blendWeightsTechnique||!this._blurTechnique){const e=new dL,t=(e,t)=>this._techniqueRep.releaseAndAcquire(uL,e,t);e.output=lL["a"].EdgeDetector,this._edgeDetectTechnique=t(e,this._edgeDetectTechnique),e.output=lL["a"].BlendWeight,this._blendWeightsTechnique=t(e,this._blendWeightsTechnique),e.output=lL["a"].Blur,this._blurTechnique=t(e,this._blurTechnique)}return!!this._loadResources(e)&&(this._vao=Object(Oh["e"])(this.rctx),this._edges=new Mh["a"](this.rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE},{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGB,dataType:fh["q"].UNSIGNED_BYTE,samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:4,height:4}),this._blend=new Mh["a"](this.rctx,{colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE},{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:4,height:4}),this._isEnabled=!0,!0)}disable(){this._isEnabled&&(this._vao=Object(z["e"])(this._vao),this._areaTexture=Object(z["e"])(this._areaTexture),this._searchTexture=Object(z["e"])(this._searchTexture),this._blend=Object(z["e"])(this._blend),this._edges=Object(z["e"])(this._edges),this._isEnabled=!1)}render(e){if(!this._isEnabled)return;const t=this.rctx,r=t.getBoundFramebufferObject(),i={x:0,y:0,width:e.descriptor.width,height:e.descriptor.height};t.bindVAO(this._vao),t.setViewport(i.x,i.y,i.width,i.height),this._edges.resize(i.width,i.height),t.bindFramebuffer(this._edges),t.setClearColor(0,0,0,1),t.clear(fh["e"].COLOR_BUFFER_BIT);const n=t.useTechnique(this._edgeDetectTechnique);n.bindTexture(e,"tColor"),n.setUniform4f("resolution",1/i.width,1/i.height,i.width,i.height),t.drawArrays(fh["r"].TRIANGLES,0,3),this._blend.resize(i.width,i.height),t.bindFramebuffer(this._blend),t.setClearColor(0,0,1,1),t.clear(fh["e"].COLOR_BUFFER_BIT);const a=t.useTechnique(this._blendWeightsTechnique);a.setUniform4f("resolution",1/i.width,1/i.height,i.width,i.height),a.bindTexture(this._searchTexture,"tSearch"),a.bindTexture(this._areaTexture,"tArea"),a.bindTexture(this._edges.colorTexture,"tEdges"),t.drawArrays(fh["r"].TRIANGLES,0,3),t.bindFramebuffer(r),t.setClearColor(0,1,0,1),t.clear(fh["e"].COLOR_BUFFER_BIT);const s=t.useTechnique(this._blurTechnique);s.setUniform4f("resolution",1/i.width,1/i.height,i.width,i.height),s.bindTexture(e,"tColor"),s.bindTexture(this._blend.colorTexture,"tBlendWeights"),t.drawArrays(fh["r"].TRIANGLES,0,3)}_loadTextureFromBase64(e,t,r){const i=new Qh["a"](this.rctx,{pixelFormat:r,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].CLAMP_TO_EDGE,samplingMode:t},null);return Object(Bh["a"])(e).then(e=>(i.resize(e.width,e.height),i.setData(e),i))}};Object(l["a"])([Object(j["b"])()],hL.prototype,"_abortController",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],hL.prototype,"updating",null),hL=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.SmaaRenderPass")],hL);var pL=r("36df");class fL extends uh["a"]{initializeProgram(e){const t=fL.shader.get(),r=this.configuration,i=(fL.filterRadius+1)/2,n=1/(2*i*i),a=t.build({output:r.output,samples:fL.samples,filterRadius:fL.filterRadius,blurFalloff:n});return new ph["a"](e.rctx,a,hh["a"])}initializePipeline(){return Object(bh["g"])({colorWrite:bh["d"]})}}fL.shader=new lh["a"](pL["b"],()=>r.e("chunk-2d0ab6a6").then(r.bind(null,"14d1"))),fL.samples=16,fL.filterRadius=4;class bL extends dh["a"]{constructor(){super(...arguments),this.output=pL["a"].SSAO}}Object(l["a"])([Object(dh["b"])({count:pL["a"].COUNT})],bL.prototype,"output",void 0);class mL{constructor(e,t,r){this._techniqueRep=e,this._rctx=t,this._requestRender=r,this._enabled=!1,this._ssaoTechniqueConfig=new bL,this.quadVAO=null,this._blurSizePx=2,this._attenuation=.5}dispose(){this.quadVAO=Object(z["e"])(this.quadVAO)}disposeOffscreenBuffers(){Object(z["b"])(this._ssaoFBO,e=>e.resize(0,0)),Object(z["b"])(this._blur0FBO,e=>e.resize(0,0)),Object(z["b"])(this._blur1FBO,e=>e.resize(0,0))}set enabled(e){e?this._enable():this._disable()}get enabled(){return this._enabled}get ready(){return this.enabled&&Object(z["k"])(this._noiseTexture)&&Object(z["k"])(this._ssaoFBO)&&Object(z["k"])(this._blur0FBO)&&Object(z["k"])(this._blur1FBO)}computeSSAO(e,t,r){if(!this.enabled||Object(z["j"])(t)||Object(z["j"])(r)||Object(z["j"])(this._noiseTexture)||Object(z["j"])(this._ssaoFBO)||Object(z["j"])(this._blur0FBO)||Object(z["j"])(this._blur1FBO))return;const i=this._rctx,n=e.fullViewport,a=n[2],s=n[3],o=a/this._blurSizePx,c=s/this._blurSizePx;this._ssaoFBO.resize(a,s),this._blur0FBO.resize(o,c),this._blur1FBO.resize(o,c);const l=1,u=1,d=a*l,h=s*u;i.bindFramebuffer(this._ssaoFBO),i.setViewport(0,0,a,s);const p=i.useTechnique(this._ssaoTechnique);p.setUniform2f("rnmScale",a/this._noiseTexture.descriptor.width,s/this._noiseTexture.descriptor.height),Object(fp["f"])(e.projectionMatrix,e.fullWidth,e.fullHeight,yL,gL),p.setUniform4fv("projInfo",yL),p.setUniform2fv("zScale",gL),p.setUniform2fv("nearFar",e.nearFar);let f=1/e.computeRenderPixelSizeAtDist(1);p.setUniform1f("projScale",f*l),p.setUniform2f("screenDimensions",d,h);const b=Object($o["o"])(e.eye,e.center);let m=20*e.computeRenderPixelSizeAtDist(b);m=Math.max(.1,m),p.setUniform1f("radius",m),p.setUniform1f("intensity",4*this._attenuation/m**6),p.bindTexture(this._noiseTexture,"rnm"),p.bindTexture(r,"normalMap"),p.bindTexture(t,"depthMap"),Object(z["j"])(this.quadVAO)&&(this.quadVAO=Object(Oh["d"])(this._rctx)),i.bindVAO(this.quadVAO),i.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(this.quadVAO,"geometry"));const g=i.useTechnique(this._blurTechnique);g.bindTexture(this._ssaoFBO.colorTexture,"tex"),g.bindTexture(r,"normalMap"),g.bindTexture(t,"depthMap"),i.setViewport(0,0,d/this._blurSizePx,h/this._blurSizePx),i.bindFramebuffer(this._blur0FBO),g.setUniform2f("screenDimensions",d,h),g.setUniform2f("blurSize",0,this._blurSizePx*l/h),g.setUniform2fv("nearFar",e.nearFar),b>5e4&&(f=Math.max(0,f-(b-5e4))),g.setUniform1f("projScale",f),i.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(this.quadVAO,"geometry")),g.setUniform2f("blurSize",this._blurSizePx*u/d,0),i.bindFramebuffer(this._blur1FBO),g.bindTexture(this._blur0FBO.colorTexture,"tex"),i.drawArrays(fh["r"].TRIANGLE_STRIP,0,Object(Kh["f"])(this.quadVAO,"geometry")),i.setViewport(n[0],n[1],n[2],n[3])}bind(e,t){this.enabled&&Object(z["k"])(this._blur1FBO)&&Object(z["k"])(this._ssaoFBO)?(e.bindTexture(this._blur1FBO.colorTexture,"ssaoTex"),e.setUniform4f("viewportPixelSz",t.fullViewport[0],t.fullViewport[1],1/this._ssaoFBO.width,1/this._ssaoFBO.height)):e.setUniform4f("viewportPixelSz",-1,-1,-1,-1)}_selectPrograms(){this._ssaoTechniqueConfig.output=pL["a"].SSAO,this._ssaoTechnique=this._techniqueRep.releaseAndAcquire(fL,this._ssaoTechniqueConfig,this._ssaoTechnique),this._ssaoTechniqueConfig.output=pL["a"].Blur,this._blurTechnique=this._techniqueRep.releaseAndAcquire(fL,this._ssaoTechniqueConfig,this._blurTechnique)}_enable(){this.enabled||(this._enabled=!0,this._loadResources(()=>{this._enabled&&this._initialize()}))}_loadResources(e){this._data?e():r.e("chunk-2d0be660").then(r.bind(null,"2fa7")).then(t=>{this._data=t,e()})}_initialize(){const e={target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,samplingMode:fh["z"].LINEAR,wrapMode:fh["B"].CLAMP_TO_EDGE,width:0,height:0},t={colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].NONE};Object(Bh["a"])(this._data.noiseTexture).then(r=>{this._enabled&&(this._ssaoFBO=new Mh["a"](this._rctx,t,e),this._blur0FBO=new Mh["a"](this._rctx,t,e),this._blur1FBO=new Mh["a"](this._rctx,t,e),this._noiseTexture=new Qh["a"](this._rctx,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,hasMipmap:!0,width:r.width,height:r.height},r),this._requestRender())}),this._selectPrograms()}_disable(){this._enabled=!1,this._noiseTexture=Object(z["e"])(this._noiseTexture),this._blur1FBO=Object(z["e"])(this._blur1FBO),this._blur0FBO=Object(z["e"])(this._blur0FBO),this._ssaoFBO=Object(z["e"])(this._ssaoFBO)}get gpuMemoryUsage(){return(Object(z["k"])(this._blur0FBO)?this._blur0FBO.gpuMemoryUsage:0)+(Object(z["k"])(this._blur1FBO)?this._blur1FBO.gpuMemoryUsage:0)+(Object(z["k"])(this._ssaoFBO)?this._ssaoFBO.gpuMemoryUsage:0)}get test(){return{ssao:this._ssaoFBO,blur:this._blur1FBO}}}const gL=Object(vo["b"])(),yL=Object(Xd["e"])();var OL=r("4c96");function vL(e,t){const r=t,i=-e[0],n=-e[1],a=-e[2],s=r[3],o=r[7],c=r[11],l=r[15];r[0]+=s*i,r[1]+=s*n,r[2]+=s*a,r[4]+=o*i,r[5]+=o*n,r[6]+=o*a,r[8]+=c*i,r[9]+=c*n,r[10]+=c*a,r[12]+=l*i,r[13]+=l*n,r[14]+=l*a}function _L(e,t){const r=t,i=e[0],n=e[1],a=e[2];r[12]+=i*r[0]+n*r[4]+a*r[8],r[13]+=i*r[1]+n*r[5]+a*r[9],r[14]+=i*r[2]+n*r[6]+a*r[10],r[14]+=i*r[3]+n*r[7]+a*r[11]}class jL{constructor(e){this.factory=e,this.originData=new Map}acquire(e){return this.register(this.factory.getOrigin(e))}register(e){const t=this.originData.get(e.id);return t?(t.refCount++,t.origin):(this.originData.set(e.id,{refCount:1,viewMatrix:Object(Kd["d"])(),origin:e}),e)}release(e){const t=this.originData.get(e.id);t&&(t.refCount--,0===t.refCount&&this.originData.delete(e.id))}updateViewMatrices(e){this.originData.forEach(t=>{Object(Qd["d"])(t.viewMatrix,e),_L(t.origin.vec3,t.viewMatrix)})}getViewMatrix(e){return this.originData.get(e.id).viewMatrix}}var wL=r("5a22"),xL=r("0c9d"),TL=r("7e0c"),SL=r("0013"),EL=r("c6d7"),AL=r("5e2a"),CL=r("ee2c");const RL=-4e-4,ML=.5;class PL extends uh["a"]{bindPass(e){const t=this.program,{edgeRenderParameters:r,bindParameters:i}=e;Object(KM["e"])(t,r.viewProjectionTransform),t.setUniformMatrix3fv("transformNormalViewFromGlobal",r.transformNormalViewFromGlobal),t.setUniformMatrix4fv("proj",i.camera.projectionMatrix),t.setUniform2f("depthBias",ML,RL),t.setUniform2f("pixelToNDC",2/i.camera.fullViewport[2],2/i.camera.fullViewport[3]),t.setUniform2f("ndcToPixel",i.camera.fullViewport[2]/2,i.camera.fullViewport[3]/2),t.setUniform1f("distanceFalloffFactor",r.distanceFalloffFactor),t.setUniform2f("inverseViewport",1/i.camera.fullViewport[2],1/i.camera.fullViewport[3]),t.setUniform1f("pixelRatio",i.camera.pixelRatio||1)}initializeProgram(e){const t=PL.shader.get(),r=this.configuration,i=t.build({slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,silhouette:r.silhouette,legacy:r.legacy,antialiasing:r.antialiasing,mode:r.mode,doublePrecisionRequiresObfuscation:r.doublePrecisionRequiresObfuscation,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new ph["a"](e.rctx,i,xL["b"])}initializePipeline(e){const t=e.rctx.capabilities.blendMinMax;return Object(bh["g"])(t?{blending:Object(bh["h"])(fh["b"].ONE,fh["b"].ONE,fh["b"].ZERO,fh["b"].ONE,fh["c"].ADD,t.MAX),depthTest:{func:fh["h"].LEQUAL},colorWrite:bh["d"]}:{depthTest:{func:fh["h"].LEQUAL},depthWrite:bh["e"],colorWrite:bh["d"]})}}PL.shader=new lh["a"](AL["a"],()=>r.e("chunk-2d21444b").then(r.bind(null,"afe5")));class IL extends dh["a"]{constructor(){super(...arguments),this.slicePlaneEnabled=!1,this.silhouette=!1,this.legacy=!1,this.antialiasing=!1,this.mode=CL["b"].SOLID,this.doublePrecisionRequiresObfuscation=!1,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(l["a"])([Object(dh["b"])()],IL.prototype,"slicePlaneEnabled",void 0),Object(l["a"])([Object(dh["b"])()],IL.prototype,"silhouette",void 0),Object(l["a"])([Object(dh["b"])()],IL.prototype,"legacy",void 0),Object(l["a"])([Object(dh["b"])()],IL.prototype,"antialiasing",void 0),Object(l["a"])([Object(dh["b"])({count:CL["b"].COUNT})],IL.prototype,"mode",void 0),Object(l["a"])([Object(dh["b"])()],IL.prototype,"doublePrecisionRequiresObfuscation",void 0),Object(l["a"])([Object(dh["b"])()],IL.prototype,"multipassTerrainEnabled",void 0),Object(l["a"])([Object(dh["b"])()],IL.prototype,"cullAboveGround",void 0);var DL=r("dd0e");const LL=8,NL=128,FL={type:"uber",slicePlaneEnabled:!1,sliceHighlightDisabled:!1,strokesTexture:null,legacy:!0};class kL{constructor(){this._value=0}get value(){return this._value}increment(){this._value++}decrement(){this._value--}}const UL={solid:CL["b"].SOLID,sketch:CL["b"].SKETCH,uber:CL["b"].MIXED};class zL{constructor(e,t,r){this.rctx=e,this.shaderTechniqueRepository=t,this.config=new IL,this.technique=null,this.refCount=new kL,this.renderables=new Set,this.sortedRenderables={[DL["a"].TRANSPARENT]:{[DL["a"].TRANSPARENT]:new k_["a"],[DL["a"].OPAQUE]:new k_["a"]},[DL["a"].OPAQUE]:{[DL["a"].TRANSPARENT]:new k_["a"],[DL["a"].OPAQUE]:new k_["a"]}},this.renderablesDirty=!1,this.settings={...FL,...r},this.key=zL.getKey(this.settings.type,this.settings.slicePlaneEnabled,this.settings.legacy);const i=this.settings.strokesTexture.variants;this.writerSettings={variants:i,reducedPrecision:z_["a"].TESTS_DISABLE_OPTIMIZATIONS},this.config.legacy=this.settings.legacy,this.config.mode=UL[this.settings.type],this.config.silhouette=!1,this.config.antialiasing=!!this.rctx.capabilities.blendMinMax,this.config.slicePlaneEnabled=this.settings.slicePlaneEnabled,this.config.doublePrecisionRequiresObfuscation=Object(uP["b"])(e)}dispose(){this.technique=Object(z["r"])(this.technique)}addRenderable(e){this.renderables.add(e),this.renderablesDirty=!0}removeRenderable(e){this.renderables.delete(e),this.renderablesDirty=!0}setRenderablesDirty(){this.renderablesDirty=!0}forEachRenderable(e,t){this.renderablesDirty&&this._sortRenderables(),this.sortedRenderables[t][DL["a"].TRANSPARENT].forAll(e),this.sortedRenderables[t][DL["a"].OPAQUE].forAll(e)}setMultipassParameters(e){this.config.multipassTerrainEnabled=!!e.multipassTerrainEnabled&&e.multipassTerrainEnabled,this.config.cullAboveGround=!!e.cullAboveGround&&e.cullAboveGround}bindRegularEdges(e,t){this.setMultipassParameters(e),this.config.silhouette=!1,this.technique=this.shaderTechniqueRepository.releaseAndAcquire(PL,this.config,this.technique),this.rctx.useTechnique(this.technique,e.slot),this.technique.bindPass({bindParameters:e,edgeRenderParameters:t})}bindSilhouetteEdges(e,t){this.setMultipassParameters(e),this.config.silhouette=!0,this.technique=this.shaderTechniqueRepository.releaseAndAcquire(PL,this.config,this.technique),this.rctx.useTechnique(this.technique,e.slot),this.technique.bindPass({bindParameters:e,edgeRenderParameters:t})}renderRegularEdges(e,t,r){this._render(e,e.regular.vao,t,r)}renderSilhouetteEdges(e,t,r){this._render(e,e.silhouette.vao,t,r)}_render(e,t,r,i){this._setUniforms(e,r),this.rctx.bindVAO(t),this.rctx.capabilities.instancing.drawArraysInstanced(fh["r"].TRIANGLE_FAN,0,4,i)}_setUniforms(e,t){const r=this.technique.program;if(e.components.buffer.textureBuffer.bind(r,BL,VL),t.multipassTerrainEnabled&&(r.setUniform2fv("nearFar",t.camera.nearFar),r.setUniform2fv("inverseViewport",t.inverseViewport),Object(EL["a"])(r,t)),"origin"in e.transform)r.setUniformMatrix4fv("view",t.localViewMatrixForEdges),r.setUniformMatrix4fv("model",e.transform.modelMatrix),Object(KC["b"])(r,this.settings,t.slicePlane,{origin:e.transform.origin.vec3});else{const i=new CP(e.transform.position),n=Object(To["p"])(GL,Object(To["e"])(GL,e.transform.rotationScale)),a=new fP;Object($o["m"])(a.transformWorldFromModelTL,i.low),Object($o["m"])(a.transformWorldFromModelTH,i.high),Object(To["g"])(a.transformWorldFromModelRS,e.transform.rotationScale),Object(To["g"])(a.transformNormalGlobalFromModel,n),Object(KM["d"])(r,a),r.setUniformMatrix3fv("transformNormalGlobalFromModel",a.transformNormalGlobalFromModel);const s=t.camera.viewInverseTransposeMatrix,o=Object($o["y"])(HL,s[3],s[7],s[11]);Object(KC["b"])(r,this.settings,t.slicePlane,{origin:o})}"uber"!==this.settings.type&&"sketch"!==this.settings.type||this._setSketchUniforms(r)}_setSketchUniforms(e){const t=this.settings.strokesTexture,r=t.texture;Object(z["j"])(r)||(e.bindTexture(r,"strokesTexture"),e.setUniform2f("strokesTextureScale",1/r.descriptor.width,1/r.descriptor.height),e.setUniform1f("strokesLog2Resolution",Math.log2(t.resolution)),e.setUniform1f("strokesNormalizationScale",t.normalizationScale),e.setUniform1f("strokesAmplitude",t.amplitude),e.setUniform1f("strokeVariants",t.variants))}_sortRenderables(){this.renderablesDirty=!1,this.sortedRenderables[DL["a"].TRANSPARENT][DL["a"].TRANSPARENT].clear(),this.sortedRenderables[DL["a"].TRANSPARENT][DL["a"].OPAQUE].clear(),this.sortedRenderables[DL["a"].OPAQUE][DL["a"].TRANSPARENT].clear(),this.sortedRenderables[DL["a"].OPAQUE][DL["a"].OPAQUE].clear(),this.renderables.forEach(e=>{e.objectTransparency!==DL["a"].INVISIBLE&&e.edgeTransparency!==DL["a"].INVISIBLE&&this.sortedRenderables[e.objectTransparency][e.edgeTransparency].push(e)});const e=(e,t)=>"origin"in e.transform&&"origin"in t.transform?e.transform.origin.id<t.transform.origin.id?-1:e.transform.origin.id>t.transform.origin.id?1:0:0;this.sortedRenderables[DL["a"].TRANSPARENT][DL["a"].TRANSPARENT].sort(e),this.sortedRenderables[DL["a"].TRANSPARENT][DL["a"].OPAQUE].sort(e),this.sortedRenderables[DL["a"].OPAQUE][DL["a"].TRANSPARENT].sort(e),this.sortedRenderables[DL["a"].OPAQUE][DL["a"].OPAQUE].sort(e)}static getKey(e,t,r){return`edges-t:${e}:${t}:${r}`}}const BL="componentDataTex",VL="componentDataTexInvDim",GL=Object(So["b"])(),HL=Object(ju["f"])();var qL,WL=r("78ba"),$L=r("0480"),ZL=r("2273");class XL extends WL["a"]{constructor(e){super("EdgeProcessingWorker","wrappedWork",e)}async process(e,t,r){if(r)return Object(ZL["work"])(e);const i=this._packInput(e),n=await this.invoke(i,t);return this._unpackOutput(n)}getTransferList(e){return[e.dataBuffer]}_packInput(e){return{dataBuffer:e.data.buffer,writerSettings:e.writerSettings,skipDeduplicate:e.skipDeduplicate,indicesBuffer:e.indices.buffer,indicesType:Object(JR["j"])(e.indices)?"Uint32Array":"Uint16Array",indicesLength:e.indicesLength}}_unpackOutput(e){return{regular:{instancesData:Object($L["b"])(e.regular.instancesData),lodInfo:{lengths:new Float32Array(e.regular.lodInfo.lengths)}},silhouette:{instancesData:Object($L["b"])(e.silhouette.instancesData),lodInfo:{lengths:new Float32Array(e.silhouette.lodInfo.lengths)}},averageEdgeLength:e.averageEdgeLength}}}function YL(e){const t=4,r=tN.resolution,i=r/2,n=new Uint8Array(t*r*r),a=t*r*i,s=tN.amplitude,o=2*s,c=t*r,l=Math.log2(r)+1,u=tN.strokes.length;let d=(l-1)*u*c;for(const{distance:p,pressure:f}of tN.strokes){let e=p,r=f,i=d;for(let s=0;s<l;s++){0!==s&&(e=JL(e,qL.DISTANCE),r=JL(r,qL.PRESSURE));for(let s=0;s<tN.resolution;s++){const c=.5+(e?e[s%e.length]/o:0),l=r?r[s%r.length]:1;Object(ZP["a"])(c,n,i),Object(ZP["a"])(l,n,i+a),i+=t}i-=c*(u+1)}d+=c}const h=new Qh["a"](e,{pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,hasMipmap:!1,samplingMode:fh["z"].LINEAR,width:r,height:r,wrapMode:fh["B"].REPEAT},n);return new eN(r,o,s,u,h)}function JL(e,t){if(!e)return null;const r=e.length/2,i=QL*r,n=new Array(r);let a=0;const s=t===qL.PRESSURE;for(let o=0;o<e.length;o+=2){const t=(e[o]+e[o+1])/2;n[a++]=s?Math.min(i,1-(1-t)*KL):Math.min(i,t*KL)}return n}!function(e){e[e.DISTANCE=0]="DISTANCE",e[e.PRESSURE=1]="PRESSURE"}(qL||(qL={}));const QL=.1,KL=.5;class eN{constructor(e,t,r,i,n){this.resolution=e,this.normalizationScale=t,this.amplitude=r,this.variants=i,this.texture=n}dispose(){this.texture=Object(z["e"])(this.texture)}}const tN={amplitude:8,resolution:256,strokes:[{distance:[-1.59027,-1.59426,-1.59674,-1.59766,-1.59702,-1.59479,-1.59095,-1.5855,-1.57843,-1.56973,-1.55942,-1.5475,-1.53398,-1.5189,-1.50226,-1.4841,-1.46446,-1.44337,-1.42088,-1.39703,-1.37188,-1.34547,-1.31786,-1.28912,-1.2593,-1.22847,-1.19668,-1.16402,-1.13053,-1.09629,-1.06137,-1.02582,-.98972,-.95313,-.91611,-.87872,-.84102,-.80306,-.76488,-.72654,-.68807,-.64952,-.61092,-.57232,-.53375,-.49527,-.45692,-.41874,-.38078,-.34309,-.3057,-.26867,-.23204,-.19585,-.16015,-.12497,-.09036,-.05634,-.02296,.00977,.04183,.07321,.10389,.13386,.16313,.19169,.21956,.24672,.27321,.299,.32413,.34858,.37237,.3955,.41798,.43981,.461,.48154,.50145,.52073,.53939,.55744,.57488,.5917,.6079,.62347,.63837,.65259,.66609,.67885,.69083,.70201,.71235,.72183,.73042,.73812,.7449,.75076,.7557,.75973,.76284,.76507,.76642,.76692,.76659,.76545,.76352,.76083,.7574,.75324,.74837,.74279,.73652,.72959,.72199,.71377,.70493,.69553,.68558,.67515,.66426,.65298,.64135,.62944,.6173,.60499,.59257,.58008,.56759,.55513,.54275,.5305,.51842,.50654,.4949,.48353,.47246,.4617,.45128,.44121,.43149,.42213,.41313,.40448,.39617,.38818,.3805,.37309,.36594,.35902,.35229,.34572,.33927,.33292,.32663,.32035,.31407,.30774,.30135,.29486,.28824,.28148,.27454,.26739,.26002,.25241,.24454,.23639,.22796,.21922,.21016,.20076,.19098,.18082,.17023,.1592,.14768,.13566,.1231,.10996,.09624,.08188,.06688,.05121,.03485,.01778,0,-.0185,-.03771,-.05763,-.07824,-.09952,-.12144,-.14396,-.16706,-.19069,-.21481,-.23938,-.26436,-.28971,-.31539,-.34136,-.36759,-.39404,-.42067,-.44746,-.47437,-.50136,-.52839,-.55544,-.58248,-.60948,-.63642,-.66329,-.6901,-.71684,-.74352,-.77015,-.79675,-.82332,-.84988,-.87644,-.90301,-.92958,-.95615,-.98272,-1.00926,-1.03575,-1.06217,-1.08847,-1.11463,-1.1406,-1.16633,-1.19178,-1.2169,-1.24164,-1.26595,-1.28979,-1.31312,-1.3359,-1.35809,-1.37963,-1.4005,-1.42064,-1.44,-1.45853,-1.47616,-1.49285,-1.50853,-1.52313,-1.53659,-1.54886,-1.55986,-1.56955,-1.57788,-1.5848],pressure:[-.01365,-.00206,.01025,.02327,.03696,.05129,.06619,.08163,.09755,.11393,.1307,.14784,.16531,.18308,.20111,.21938,.23786,.25651,.2753,.29419,.31315,.33215,.35115,.37015,.38913,.40806,.42694,.44576,.46449,.48313,.50167,.5201,.53839,.55653,.57448,.59222,.60971,.62692,.6438,.66033,.67648,.69221,.70753,.72242,.73688,.75093,.76456,.77779,.79063,.80309,.81517,.82686,.83817,.84911,.85967,.86987,.87972,.88924,.89845,.90734,.91594,.92425,.93229,.94005,.94754,.95475,.96166,.96826,.97451,.9804,.98588,.99092,.99549,.99957,.99685,.99381,.99131,.98936,.98796,.98711,.98681,.98706,.98787,.98923,.99113,.99357,.99654,1,.99607,.99171,.98695,.98181,.97634,.97057,.96452,.95824,.95175,.94506,.93818,.93113,.92389,.91647,.90887,.90109,.89314,.88501,.87672,.86831,.85978,.85119,.84256,.83393,.82533,.8168,.80836,.80002,.79181,.78374,.77582,.7681,.76059,.75331,.74629,.73955,.73311,.72697,.72116,.71568,.71054,.70572,.70121,.697,.69304,.68931,.68576,.68236,.67905,.67582,.67262,.66941,.66619,.66291,.65957,.65613,.65259,.64892,.6451,.6411,.6369,.63248,.62783,.62295,.61783,.61247,.60688,.60104,.59498,.58868,.58216,.57542,.56845,.56125,.5538,.5461,.53813,.52986,.52129,.51239,.50316,.49359,.4837,.47349,.46299,.45223,.44124,.43005,.41869,.40719,.39557,.38386,.37207,.36023,.34836,.33648,.32464,.31287,.30119,.28963,.27822,.26698,.25594,.2451,.23448,.22409,.21391,.20394,.19415,.18452,.17503,.16565,.15636,.14713,.13794,.1288,.11968,.11058,.10151,.09247,.08346,.07447,.06552,.05659,.0477,.03885,.03007,.02137,.01278,.00433,-.00393,-.012,-.01983,-.02738,-.03463,-.04155,-.0481,-.05429,-.0601,-.06553,-.07057,-.07524,-.07954,-.08347,-.08703,-.09022,-.09303,-.09544,-.09744,-.09898,-.10004,-.10059,-.1006,-.10005,-.09892,-.0972,-.09487,-.09192,-.08833,-.08409,-.07918,-.07357,-.06724,-.06019,-.0524,-.04386,-.03455,-.02448]},{distance:[-3.46259,-3.47131,-3.47668,-3.47863,-3.47712,-3.4721,-3.46352,-3.45138,-3.43566,-3.41635,-3.39347,-3.36704,-3.33709,-3.30368,-3.26684,-3.22667,-3.18322,-3.1366,-3.08689,-3.0342,-2.97865,-2.92036,-2.85946,-2.79607,-2.73034,-2.66241,-2.59242,-2.52052,-2.44686,-2.37159,-2.29485,-2.2168,-2.13757,-2.05731,-1.97616,-1.89426,-1.81174,-1.72875,-1.64543,-1.56191,-1.47833,-1.39483,-1.3115,-1.22847,-1.14581,-1.06361,-.98193,-.90083,-.82036,-.74054,-.66141,-.583,-.50532,-.4284,-.35228,-.277,-.20261,-.12916,-.05672,.01463,.08485,.15384,.22153,.28784,.35269,.41602,.47776,.53787,.59629,.653,.70799,.76123,.81274,.86253,.9106,.95698,1.0017,1.04477,1.0862,1.126,1.16415,1.20065,1.23546,1.26857,1.29994,1.32953,1.35731,1.38321,1.40719,1.42921,1.44922,1.46719,1.48309,1.49691,1.50862,1.51825,1.52581,1.53133,1.53486,1.53644,1.53616,1.53409,1.53031,1.52493,1.51803,1.50972,1.50009,1.48924,1.47725,1.46421,1.45019,1.43527,1.4195,1.40295,1.38568,1.36778,1.34929,1.3303,1.31087,1.29108,1.27099,1.25066,1.23018,1.2096,1.18898,1.16838,1.14785,1.12745,1.10721,1.08719,1.06741,1.04791,1.02871,1.00986,.99136,.97324,.95551,.93819,.92127,.90476,.88866,.87296,.85767,.84277,.82823,.81406,.80022,.7867,.77346,.76049,.74774,.73519,.72278,.71049,.69827,.68606,.67381,.66145,.64893,.63618,.62313,.60973,.5959,.5816,.56675,.5513,.53516,.51826,.50053,.4819,.46231,.44169,.42002,.39725,.37336,.34834,.32219,.2949,.2665,.23698,.20638,.17469,.14193,.10809,.07316,.03714,0,-.03827,-.07772,-.11836,-.16022,-.20332,-.24768,-.29332,-.34024,-.38844,-.43788,-.48854,-.54036,-.59329,-.64724,-.70211,-.75782,-.81425,-.87128,-.92881,-.98674,-1.04498,-1.10346,-1.1621,-1.22086,-1.27969,-1.33854,-1.3974,-1.45625,-1.51511,-1.57396,-1.63283,-1.69173,-1.75067,-1.80968,-1.86875,-1.9279,-1.98712,-2.04639,-2.10568,-2.16495,-2.22416,-2.28322,-2.34208,-2.40063,-2.4588,-2.51647,-2.57354,-2.62989,-2.68543,-2.74002,-2.79357,-2.84597,-2.89711,-2.94689,-2.99521,-3.04195,-3.087,-3.13023,-3.17152,-3.21075,-3.24779,-3.28252,-3.3148,-3.34451,-3.37154,-3.39577,-3.41709,-3.43539,-3.45059],pressure:[.87183,.87151,.87129,.87118,.87117,.87128,.87149,.87182,.87225,.8728,.87347,.87424,.87513,.87613,.87723,.87845,.87978,.88122,.88276,.88441,.88616,.88801,.88996,.892,.89414,.89637,.89868,.90108,.90356,.90611,.90874,.91144,.91421,.91704,.91993,.92287,.92587,.92892,.93201,.93514,.93831,.94151,.94474,.94799,.95126,.95456,.95786,.96118,.9645,.96783,.97116,.97448,.9778,.98111,.98441,.9877,.99096,.99421,.99742,.99938,.99622,.9931,.99001,.98697,.98397,.98101,.97811,.97526,.97246,.96972,.96703,.96441,.96185,.95935,.95691,.95455,.95225,.95002,.94786,.94577,.94376,.94182,.93995,.93817,.93646,.93483,.93328,.93181,.93042,.92911,.92788,.92673,.92566,.92467,.92376,.92293,.92217,.92149,.92088,.92034,.91987,.91947,.91913,.91886,.91864,.91849,.91838,.91833,.91834,.91839,.91849,.91863,.91883,.91907,.91935,.91968,.92005,.92046,.92092,.92142,.92195,.92253,.92314,.9238,.92449,.92521,.92598,.92677,.9276,.92847,.92936,.93029,.93125,.93224,.93325,.9343,.93537,.93646,.93758,.93872,.93988,.94106,.94225,.94346,.94469,.94593,.94718,.94844,.94971,.95098,.95226,.95354,.95482,.9561,.95738,.95867,.95995,.96122,.9625,.96377,.96504,.9663,.96757,.96883,.97009,.97135,.97261,.97387,.97513,.9764,.97767,.97895,.98023,.98153,.98284,.98416,.98549,.98684,.98821,.9896,.99101,.99244,.99389,.99537,.99688,.99842,1,.99839,.99675,.99508,.99336,.99161,.98982,.98799,.98613,.98422,.98228,.98029,.97827,.97622,.97414,.97202,.96987,.9677,.96551,.9633,.96107,.95882,.95656,.9543,.95202,.94975,.94747,.94519,.94292,.94065,.93838,.93613,.93388,.93164,.92941,.9272,.92499,.9228,.92062,.91846,.91631,.91418,.91207,.90998,.90792,.90588,.90387,.90189,.89995,.89804,.89617,.89434,.89256,.89083,.88914,.88752,.88595,.88443,.88299,.88161,.8803,.87907,.87791,.87683,.87584,.87494,.87412,.8734,.87278,.87225]},{distance:[.39335,.43437,.47737,.52234,.56923,.61801,.66864,.72109,.7753,.83123,.88882,.94801,1.00875,1.07097,1.13461,1.1996,1.26586,1.33333,1.40193,1.47158,1.54221,1.61373,1.68607,1.75913,1.83284,1.90711,1.98186,2.05699,2.13243,2.20809,2.28387,2.35971,2.4355,2.51117,2.58663,2.66179,2.73658,2.81092,2.88473,2.95792,3.03043,3.10217,3.17308,3.24309,3.31211,3.3801,3.44697,3.51267,3.57712,3.64028,3.70208,3.76247,3.8214,3.87881,3.93467,3.98892,4.04152,4.09244,4.14164,4.18908,4.23474,4.27859,4.32061,4.36077,4.39905,4.43544,4.46992,4.50249,4.53314,4.56185,4.58864,4.61349,4.63642,4.65745,4.67657,4.69381,4.7092,4.72274,4.73447,4.74441,4.75259,4.75903,4.76376,4.76682,4.76822,4.768,4.76618,4.76279,4.75786,4.75142,4.74348,4.73409,4.72326,4.71102,4.69739,4.68241,4.6661,4.64849,4.6296,4.60948,4.58816,4.56567,4.54204,4.51732,4.49154,4.46473,4.43694,4.4082,4.37854,4.348,4.31662,4.28443,4.25145,4.21773,4.1833,4.14819,4.11243,4.07606,4.03912,4.00162,3.96361,3.92512,3.88618,3.84683,3.80708,3.76697,3.72653,3.68579,3.64478,3.60351,3.56202,3.52033,3.47845,3.43642,3.39425,3.35196,3.30957,3.2671,3.22455,3.18196,3.13933,3.09668,3.05402,3.01136,2.96873,2.92613,2.88357,2.84108,2.79865,2.75631,2.71407,2.67195,2.62994,2.58807,2.54634,2.50477,2.46338,2.42216,2.38114,2.34032,2.29971,2.25933,2.21916,2.17923,2.13954,2.10008,2.06087,2.02189,1.98316,1.94468,1.90644,1.86845,1.83069,1.79316,1.75586,1.71877,1.68189,1.6452,1.60868,1.57232,1.53611,1.50004,1.46407,1.4282,1.39241,1.35668,1.321,1.28535,1.24972,1.2141,1.17849,1.14286,1.10723,1.07158,1.03593,1.00028,.96464,.92902,.89344,.85793,.8225,.78719,.75203,.71705,.68231,.64784,.61369,.57991,.54656,.51368,.48134,.44959,.41849,.3881,.35848,.32967,.30174,.27474,.24872,.22373,.19982,.17702,.15539,.13497,.11579,.09791,.08137,.06621,.05248,.04022,.02948,.02029,.01271,.00677,.00252,0,-76e-5,27e-5,.00314,.00788,.01451,.02307,.03357,.04604,.0605,.07697,.09546,.11599,.13858,.16322,.18992,.21869,.24952,.28241,.31735,.35434],pressure:[.95248,.95236,.95228,.95223,.95222,.95224,.95231,.95241,.95256,.95274,.95296,.95322,.95352,.95385,.95423,.95465,.9551,.9556,.95613,.9567,.95731,.95796,.95864,.95936,.96012,.96091,.96173,.96259,.96348,.9644,.96535,.96633,.96734,.96838,.96944,.97053,.97164,.97277,.97393,.9751,.97629,.9775,.97873,.97997,.98122,.98249,.98376,.98505,.98634,.98763,.98893,.99023,.99154,.99284,.99414,.99544,.99673,.99802,.9993,.99942,.99816,.99691,.99568,.99445,.99324,.99205,.99087,.98972,.98858,.98746,.98636,.98528,.98423,.9832,.98219,.98121,.98025,.97931,.9784,.97752,.97666,.97582,.97501,.97423,.97347,.97274,.97203,.97135,.9707,.97007,.96948,.9689,.96836,.96784,.96735,.96689,.96646,.96605,.96567,.96533,.965,.96471,.96445,.96421,.964,.96382,.96367,.96355,.96346,.96339,.96335,.96334,.96336,.9634,.96348,.96358,.9637,.96385,.96403,.96423,.96446,.96471,.96499,.96529,.96561,.96595,.96631,.96669,.96709,.96751,.96795,.9684,.96887,.96935,.96984,.97035,.97087,.9714,.97194,.97249,.97304,.97361,.97418,.97476,.97534,.97592,.97651,.97711,.9777,.9783,.9789,.9795,.9801,.9807,.9813,.9819,.9825,.98309,.98369,.98428,.98486,.98545,.98603,.98661,.98718,.98775,.98832,.98888,.98944,.99,.99056,.99112,.99167,.99223,.99279,.99335,.99392,.99449,.99507,.99565,.99624,.99684,.99745,.99807,.9987,.99934,1,.99933,.99866,.99797,.99727,.99656,.99583,.9951,.99435,.99359,.99283,.99205,.99126,.99046,.98966,.98885,.98803,.9872,.98637,.98554,.9847,.98387,.98303,.98219,.98134,.9805,.97967,.97883,.978,.97717,.97634,.97552,.97471,.97389,.97309,.97229,.9715,.97071,.96993,.96915,.96838,.96762,.96687,.96612,.96539,.96466,.96395,.96324,.96255,.96187,.9612,.96055,.95991,.95929,.95869,.95811,.95754,.957,.95648,.95599,.95552,.95508,.95467,.95428,.95393,.9536,.95331,.95305,.95283,.95264]},{distance:[2.85606,2.86149,2.86432,2.8645,2.862,2.85686,2.84912,2.83886,2.82618,2.81117,2.79393,2.77456,2.75314,2.72975,2.70447,2.67734,2.64844,2.61784,2.58564,2.55196,2.5169,2.48057,2.44305,2.40438,2.36462,2.32383,2.28208,2.23943,2.19591,2.15153,2.10628,2.06016,2.01321,1.96548,1.91702,1.86793,1.8183,1.76829,1.71803,1.66767,1.61737,1.56726,1.51746,1.46803,1.41902,1.37044,1.32228,1.27452,1.22716,1.18023,1.13376,1.08781,1.04244,.99769,.95357,.91003,.86701,.82447,.78238,.74069,.69938,.65836,.61758,.57699,.53656,.49627,.45611,.41611,.37632,.33683,.29776,.25924,.22141,.18441,.14839,.11346,.07972,.04727,.01619,-.01348,-.0417,-.0684,-.09351,-.11698,-.13875,-.1588,-.17713,-.19381,-.20889,-.22242,-.23444,-.24501,-.25421,-.26216,-.26897,-.27473,-.27951,-.28336,-.28631,-.28836,-.28948,-.28963,-.28873,-.28673,-.28355,-.27916,-.27354,-.26673,-.25878,-.2498,-.23992,-.22929,-.21802,-.20623,-.19398,-.18134,-.16836,-.1551,-.14163,-.12809,-.11461,-.1013,-.08826,-.07557,-.06335,-.0517,-.04077,-.03065,-.02143,-.01321,-.00606,0,.00496,.00888,.01181,.01385,.01511,.0157,.01574,.01533,.01458,.01358,.0124,.01112,.00979,.00851,.00738,.0065,.006,.00596,.00646,.00754,.00924,.01161,.01471,.01858,.02323,.02865,.03481,.04169,.0493,.05765,.06677,.07671,.08754,.09934,.11222,.12628,.14159,.15823,.17624,.19561,.21632,.23828,.26142,.28563,.31083,.33696,.36397,.39185,.42057,.4501,.48036,.51125,.54264,.5744,.60646,.63871,.67105,.70337,.73556,.76751,.79918,.83048,.86139,.8919,.92202,.95184,.98144,1.01094,1.04045,1.0701,1.10002,1.13029,1.16103,1.1923,1.22416,1.25664,1.28979,1.32364,1.35824,1.39363,1.42985,1.4669,1.50475,1.54332,1.58252,1.62227,1.6625,1.70312,1.744,1.78501,1.82598,1.8668,1.90734,1.94754,1.98732,2.02666,2.06555,2.10402,2.1421,2.17985,2.2173,2.25448,2.29139,2.328,2.36424,2.4,2.43515,2.46955,2.50309,2.53565,2.56717,2.59761,2.62692,2.65505,2.68191,2.7074,2.73138,2.75375,2.7744,2.79324,2.81017,2.82504,2.83772,2.8481],pressure:[.22758,.23641,.24578,.25568,.26609,.27699,.28835,.30016,.31237,.32495,.33789,.35113,.36466,.37843,.39241,.40658,.4209,.43535,.44989,.4645,.47916,.49385,.50853,.5232,.53784,.55243,.56696,.58141,.59578,.61004,.62419,.63821,.65209,.6658,.67934,.69268,.70582,.71873,.73139,.7438,.75594,.76779,.77935,.79061,.80156,.81221,.82254,.83258,.84231,.85176,.86091,.86978,.87837,.88669,.89473,.9025,.91,.91725,.92425,.931,.93752,.9438,.94985,.95566,.96124,.96658,.97168,.97652,.98109,.98539,.98939,.99309,.99646,.99949,.99783,.99552,.99361,.99209,.99098,.99029,.99003,.99019,.99079,.99181,.99324,.9951,.99735,1,.99698,.99361,.98992,.98592,.98163,.97709,.97231,.96731,.96212,.95676,.95122,.94554,.93973,.93378,.92773,.92157,.91532,.90899,.90258,.89612,.88961,.88308,.87653,.87,.8635,.85705,.85068,.8444,.83823,.83219,.82628,.82052,.81493,.80952,.8043,.79929,.7945,.78994,.78561,.78151,.77765,.77402,.77062,.76742,.76443,.76161,.75896,.75645,.75406,.75175,.74951,.7473,.74511,.74289,.74064,.73833,.73592,.73341,.73078,.728,.72507,.72197,.71869,.71522,.71156,.70769,.70363,.69936,.69489,.69021,.68533,.68023,.67492,.66939,.66363,.65765,.65145,.64501,.63833,.63143,.62428,.61691,.60931,.60148,.59344,.58521,.57679,.5682,.55948,.55063,.54167,.53264,.52354,.51439,.50522,.49603,.48686,.47773,.46865,.45964,.45072,.44192,.43324,.42469,.41629,.40804,.39994,.392,.3842,.37655,.36903,.36164,.35437,.3472,.34012,.33312,.3262,.31933,.31251,.30574,.299,.2923,.28563,.27899,.27239,.26583,.25933,.25288,.24652,.24025,.2341,.22808,.22221,.21653,.21104,.20576,.20072,.19592,.19138,.18712,.18313,.17943,.17602,.17292,.17013,.16766,.16551,.16369,.16222,.1611,.16036,.16001,.16007,.16055,.16148,.16286,.16471,.16705,.16988,.17321,.17706,.18144,.18636,.19182,.19785,.20443,.21158,.2193]},{distance:[-2.31317,-2.3191,-2.32189,-2.32154,-2.31811,-2.31174,-2.30254,-2.29062,-2.27609,-2.25904,-2.23954,-2.21767,-2.19355,-2.16732,-2.13907,-2.10885,-2.07672,-2.04268,-2.00677,-1.96911,-1.92985,-1.88914,-1.84713,-1.80397,-1.75979,-1.71467,-1.66864,-1.62171,-1.57395,-1.52546,-1.47625,-1.42628,-1.3755,-1.32384,-1.27131,-1.218,-1.16408,-1.10972,-1.05508,-1.00031,-.94551,-.89077,-.83615,-.7817,-.72757,-.6739,-.62076,-.56821,-.51625,-.46484,-.41397,-.36366,-.314,-.26506,-.21689,-.16957,-.12316,-.07766,-.03301,.01085,.05399,.09643,.13827,.17967,.22079,.26176,.30265,.34342,.38397,.42414,.46381,.50285,.54115,.57863,.61524,.65093,.6856,.71914,.75153,.78275,.81283,.84182,.86972,.89651,.92208,.94634,.96919,.99052,1.01025,1.02835,1.04484,1.05976,1.07309,1.08479,1.09492,1.1036,1.11096,1.11714,1.12224,1.12627,1.12916,1.13083,1.13125,1.13036,1.12816,1.12466,1.11992,1.11397,1.10677,1.09827,1.08849,1.07746,1.06527,1.05203,1.03786,1.02283,1.00695,.99025,.97279,.9546,.93573,.9163,.8965,.8765,.85647,.83652,.81687,.79775,.77939,.76199,.74568,.73049,.71635,.70316,.69082,.67925,.66834,.65804,.64831,.63911,.63032,.62184,.61363,.60564,.59788,.59036,.58308,.57597,.5689,.56177,.55447,.5469,.53896,.53062,.5219,.51283,.5034,.49355,.48335,.47287,.46223,.45154,.44085,.43012,.41923,.40805,.39648,.38441,.37176,.35849,.34458,.32999,.31461,.29833,.28109,.26288,.2437,.22361,.20265,.18082,.15807,.13434,.1096,.0838,.0569,.02894,0,-.0298,-.0604,-.09173,-.12364,-.15594,-.18843,-.22092,-.25331,-.28559,-.31781,-.35006,-.38244,-.41502,-.44785,-.48098,-.5144,-.54811,-.58218,-.61666,-.65153,-.68677,-.72232,-.75807,-.79397,-.83002,-.86628,-.90281,-.93968,-.97693,-1.01465,-1.05282,-1.09139,-1.13031,-1.16956,-1.20917,-1.24905,-1.28907,-1.32908,-1.36891,-1.40844,-1.44765,-1.48658,-1.52527,-1.56376,-1.60206,-1.64016,-1.67801,-1.71552,-1.75264,-1.78936,-1.8257,-1.86161,-1.89702,-1.93182,-1.96584,-1.99894,-2.03102,-2.06203,-2.0919,-2.12056,-2.14794,-2.17397,-2.19852,-2.22138,-2.24235,-2.26129,-2.27805,-2.29243,-2.30422],pressure:[.9681,.97424,.98046,.98674,.99309,.9995,.99404,.98754,.981,.97444,.96785,.96124,.95462,.94801,.94139,.93479,.92822,.92167,.91515,.90868,.90225,.89589,.88959,.88336,.87722,.87115,.86519,.85932,.85356,.84792,.84239,.83699,.83173,.8266,.82162,.81679,.81211,.80759,.80324,.79906,.79505,.79121,.78756,.78409,.78081,.77771,.77481,.77211,.76959,.76728,.76516,.76324,.76153,.76001,.75869,.75757,.75665,.75593,.7554,.75507,.75493,.75498,.75523,.75565,.75627,.75706,.75803,.75917,.76049,.76197,.76361,.76541,.76737,.76947,.77172,.77409,.7766,.77923,.78198,.78484,.7878,.79086,.79401,.79724,.80055,.80394,.8074,.81092,.8145,.81813,.82182,.82556,.82934,.83317,.83703,.84093,.84487,.84884,.85284,.85687,.86094,.86503,.86915,.87329,.87746,.88166,.88587,.89011,.89436,.89863,.90291,.9072,.91149,.91579,.92009,.92438,.92867,.93295,.9372,.94144,.94566,.94985,.954,.95812,.96219,.96623,.97021,.97415,.97802,.98184,.9856,.9893,.99293,.9965,1,.99657,.9932,.98991,.98668,.98352,.98042,.97738,.9744,.97148,.9686,.96577,.96298,.96023,.95751,.95482,.95214,.94949,.94684,.9442,.94156,.93892,.93627,.93361,.93094,.92825,.92555,.92284,.9201,.91735,.91458,.91179,.90899,.90616,.90332,.90047,.8976,.89472,.89183,.88893,.88603,.88314,.88024,.87735,.87448,.87162,.86878,.86597,.86319,.86044,.85774,.85508,.85247,.84993,.84744,.84503,.84269,.84042,.83825,.83616,.83417,.83227,.83048,.8288,.82724,.82578,.82445,.82324,.82215,.82119,.82037,.81967,.81911,.81868,.81839,.81824,.81823,.81835,.81862,.81903,.81957,.82026,.82109,.82206,.82317,.82443,.82583,.82737,.82906,.83089,.83287,.83499,.83726,.83968,.84223,.84494,.84778,.85077,.8539,.85717,.86058,.86412,.86781,.87163,.87559,.87968,.88391,.88826,.89275,.89737,.90211,.90698,.91198,.91709,.92233,.92768,.93315,.93873,.94441,.95019,.95607,.96205]},{distance:[4.72925,4.81721,4.9037,4.98859,5.07177,5.15311,5.23249,5.3098,5.38491,5.45772,5.52811,5.59598,5.66122,5.72375,5.78346,5.84028,5.8941,5.94486,5.99248,6.03689,6.07803,6.11584,6.15028,6.18128,6.20882,6.23285,6.25336,6.27031,6.28369,6.29348,6.29969,6.3023,6.30133,6.29678,6.28867,6.27703,6.26187,6.24324,6.22116,6.19567,6.16683,6.13468,6.09928,6.06068,6.01896,5.97417,5.92639,5.87569,5.82217,5.76589,5.70696,5.64545,5.58147,5.5151,5.44644,5.37559,5.30265,5.2277,5.15085,5.0722,4.99184,4.90987,4.82639,4.74151,4.65533,4.56794,4.47945,4.38996,4.29959,4.20843,4.11658,4.02416,3.93125,3.83796,3.74437,3.65057,3.55666,3.46272,3.36884,3.27509,3.18155,3.08831,2.99545,2.90303,2.81114,2.71984,2.62922,2.53933,2.45026,2.36207,2.27484,2.18862,2.10349,2.01951,1.93675,1.85528,1.77515,1.69644,1.61919,1.54348,1.46935,1.39685,1.32605,1.25698,1.18967,1.12417,1.06049,.99863,.93862,.88044,.82408,.76953,.71676,.66574,.61644,.56882,.52282,.47841,.43553,.39413,.35414,.31551,.27817,.24206,.20712,.17328,.14048,.10866,.07776,.04772,.01848,-.00999,-.03776,-.06487,-.09134,-.11721,-.14251,-.16725,-.19144,-.21509,-.2382,-.26076,-.28275,-.30416,-.32496,-.34511,-.36459,-.38334,-.40134,-.41852,-.43485,-.45026,-.46471,-.47815,-.49052,-.50179,-.51189,-.52081,-.52849,-.5349,-.54003,-.54383,-.54627,-.54734,-.54702,-.54528,-.54211,-.53752,-.53149,-.52403,-.51515,-.50487,-.4932,-.48015,-.46575,-.45001,-.43297,-.41463,-.39503,-.37419,-.35213,-.32887,-.30443,-.27885,-.25214,-.22432,-.19541,-.16544,-.13442,-.10235,-.06926,-.03514,0,.03616,.07336,.11159,.15088,.19125,.23272,.27531,.31906,.36401,.41019,.45764,.5064,.55651,.60802,.66096,.71538,.77129,.82874,.88776,.94836,1.01056,1.07438,1.13982,1.20687,1.27554,1.34581,1.41766,1.49107,1.56599,1.64239,1.72025,1.79951,1.88013,1.96209,2.04532,2.12979,2.21546,2.30226,2.39017,2.47911,2.56905,2.65991,2.75164,2.84416,2.93742,3.03133,3.12582,3.2208,3.31619,3.41191,3.50785,3.60393,3.70006,3.79612,3.89202,3.98765,4.08291,4.17767,4.27182,4.36525,4.45783,4.54944,4.63995],pressure:[.30942,.30838,.30765,.30724,.30715,.30738,.30795,.30884,.31007,.31164,.31354,.31578,.31837,.32129,.32455,.32815,.33209,.33636,.34097,.34591,.35117,.35675,.36265,.36887,.37539,.38221,.38933,.39674,.40442,.41238,.4206,.42907,.43779,.44675,.45593,.46533,.47493,.48473,.49471,.50486,.51517,.52563,.53623,.54694,.55777,.5687,.57971,.59079,.60194,.61313,.62435,.6356,.64686,.65811,.66935,.68056,.69174,.70286,.71391,.72489,.73579,.74659,.75728,.76785,.7783,.7886,.79876,.80877,.81861,.82827,.83776,.84706,.85617,.86507,.87378,.88227,.89056,.89863,.90649,.91412,.92153,.92872,.93568,.94241,.94892,.95519,.96122,.96702,.97258,.97791,.98299,.98783,.99242,.99677,.99911,.99525,.99164,.98827,.98515,.98228,.97966,.97728,.97514,.97324,.97159,.97017,.96898,.96801,.96727,.96674,.96641,.96629,.96635,.96661,.96703,.96762,.96838,.96928,.97032,.97149,.97279,.9742,.97572,.97734,.97905,.98085,.98273,.98468,.98669,.98877,.99091,.99311,.99535,.99765,1,.9976,.99516,.99267,.99014,.98755,.98491,.98222,.97947,.97666,.97378,.97083,.96781,.96471,.96153,.95826,.9549,.95144,.94787,.9442,.94042,.93651,.93249,.92834,.92407,.91966,.91512,.91045,.90564,.90069,.8956,.89037,.885,.87949,.87384,.86806,.86214,.85608,.84988,.84356,.83711,.83053,.82383,.81702,.81009,.80306,.79594,.78872,.78141,.77403,.76657,.75905,.75148,.74385,.73619,.72849,.72076,.71302,.70526,.69749,.68972,.68195,.67419,.66644,.65871,.65099,.64329,.63561,.62795,.62032,.61271,.60512,.59755,.59001,.58248,.57497,.56749,.56002,.55256,.54512,.5377,.5303,.52291,.51554,.50819,.50087,.49358,.48632,.4791,.47192,.4648,.45773,.45072,.44378,.43692,.43015,.42346,.41687,.41039,.40403,.39779,.39168,.38571,.37989,.37423,.36873,.36342,.35828,.35335,.34862,.34409,.3398,.33573,.3319,.32831,.32498,.32192,.31912,.3166,.31436,.31242,.31077]}]};function rN(e){let t=null;for(const r of e){const e=r.type;if(sN(r))if(Object(z["j"])(t))t=e;else if(t!==e)return"uber"}return Object(z["k"])(t)?t:"uber"}function iN(e){let t=DL["a"].INVISIBLE;for(const{material:r}of e)if(aN(r)){if(r.color[3]*r.opacity<1)return DL["a"].TRANSPARENT;t=DL["a"].OPAQUE}return t}function nN(e){let t=DL["a"].INVISIBLE;for(const{material:r}of e)if(aN(r)){switch(r.objectTransparency){case DL["a"].TRANSPARENT:case DL["a"].INVISIBLE:return DL["a"].TRANSPARENT;case DL["a"].OPAQUE:if(r.opacity<1)return DL["a"].TRANSPARENT}t=DL["a"].OPAQUE}return t}function aN(e){return e.size*e.color[3]*e.opacity>0}function sN(e){return e.size*e.color[3]>0}function oN(e,t){const r=Object(S["b"])(e,t,!0);return-1===r?t<e[0]?0:e.length:r}function cN(e,t,r){return e.length-oN(e,t*r.minimumEdgeLength)}function lN(e,t,r,i){for(let n=0;n<e.length;n++){const a=e[n].index,s=t[n],o=t[n+1];if(i)for(let e=s;e<o;e++){const t=i[e];r.set(t,a)}else for(let e=s;e<o;e++)r.set(e,a)}}const uN=v["a"].getLogger("esri.views.3d.webgl-engine.lib.edgeRendering.EdgeView");let dN=class extends F["a"]{constructor(e){super(e),this.updatingHandles=new Se["a"],this.perObjectData=new Map,this.perObjectDataEvictionCache=new Set,this.renderers=new Map,this.numberOfRenderedEdges={[DL["a"].TRANSPARENT]:0,[DL["a"].OPAQUE]:0},this.gpuMemoryUsage=0,this.workerAbort=new AbortController,this.tmpModelPosition=Object(ju["f"])(),this.localOrigins=new jL(new GR["a"](e.renderSR))}initialize(){this.worker=new XL(this.schedule),this.componentColorManager=new LP(this.rctx,2);const e=xL["e"].createBuffer(4);for(let t=0;t<4;t++)e.sideness.set(t,0,0===t||3===t?0:1),e.sideness.set(t,1,0===t||1===t?0:1);this.verticesBufferObject=Jh["a"].createVertex(this.rctx,fh["D"].STATIC_DRAW,e.buffer)}destroy(){this.destroyed||(this.perObjectData.forEach(e=>this._discardObjectEntry(e)),this.perObjectData.clear(),this.strokesTexture=Object(z["e"])(this.strokesTexture),this.componentColorManager=Object(z["d"])(this.componentColorManager),this.workerAbort.abort(),this.worker.destroy(),this.verticesBufferObject=Object(z["e"])(this.verticesBufferObject),this.renderers.clear(),this.updatingHandles.destroy())}get updating(){return this.updatingHandles.updating}get usedMemory(){return this.gpuMemoryUsage}get numberOfRenderedPrimitives(){return this.numberOfRenderedEdges[DL["a"].TRANSPARENT]+this.numberOfRenderedEdges[DL["a"].OPAQUE]}shouldRender(){return this.renderers.size>0}async addComponentObject(e,t,r,i,n,a,s,o){if(this.hasObject(e))return this.getObjectMemoryUsage(e);let c;const l=new fN(new Promise(e=>c=e),r.center,r.radius);this.perObjectData.set(e,l);const u=await this.updatingHandles.addPromise(this._addComponentGeometry(t,l,i,n,a,s,o));return this.setNeedsRender(),c(),u}async addOrUpdateObject3D(e,t,r,i){if(this.destroyed)return void uN.warn("Attempt to add an object to a destroyed instance");const n=this.perObjectData.get(e);let a;(null==n?void 0:n.renderables.length)>0&&this.perObjectDataEvictionCache.add(n);const s=e.boundingVolumeWorldSpace.bounds,o=new fN(new Promise(e=>a=e),Object(If["g"])(s),Object(If["l"])(s));this.perObjectData.set(e,o);const c=new Array;if(r.mergeGeometries&&e.geometries.length>1&&pN(e))c.push(this._addObjectMergedGeometries(e,o,t,r,i));else for(let l=0;l<e.geometries.length;l++){const n=e.geometryRecords[l];if(!n.material.supportsEdges)continue;const a=e.geometries[l];c.push(this._addGeometry(e,o,a,n,t[0],r,i))}await this.updatingHandles.addPromise(Promise.all(c)),this.perObjectDataEvictionCache.delete(o),this._discardObjectEntry(n),this.setNeedsRender(),a()}_discardObjectEntry(e){e&&(e.renderables.length&&(e.renderables.forEach(e=>this._removeRenderable(e)),this.setNeedsRender()),e.loaded=null)}hasObject(e){return this.perObjectData.has(e)}async updateAllComponentOpacities(e,t){const r=t instanceof Array?e=>t[e]:()=>t;(await this.updatingHandles.addPromise(this._getObjectEntry(e))).renderables.forEach(e=>{const t=e.components.meta.length;for(let i=0;i<t;i++){const t=r(i),n=e.components.meta[i],a=n.index;n.material.opacity=t,e.components.buffer.textureBuffer.setDataElement(a,1,3,255*t)}this._updateTransparency(e)}),this.setNeedsRender()}async getObjectMemoryUsage(e){return(await this._getObjectEntry(e)).renderables.reduce((e,t)=>e+t.statistics.gpuMemoryUsage,0)}async updateAllComponentMaterials(e,t,r,i){const n=e instanceof wL["a"],a=!!r.slicePlaneEnabled,s=rN(t),o=zL.getKey(s,a,n);(await this.updatingHandles.addPromise(this._getObjectEntry(e))).renderables.forEach(e=>{if(o!==e.rendererKey){const t=this.renderers.get(e.rendererKey),r=this._acquireRenderer(s,a,n);t.removeRenderable(e),t.refCount.decrement(),e.rendererKey=o,r.addRenderable(e)}for(let r=0;r<t.length;r++)e.components.meta[r].material=t[r];i&&this._updateComponentBuffer(e.components),this._updateTransparency(e)}),this.setNeedsRender()}async updateObjectVisibility(e,t){(await this.updatingHandles.addPromise(this._getObjectEntry(e))).renderables.forEach(e=>e.visible=t),this.setNeedsRender()}removeObject(e){const t=this.perObjectData.get(e);t&&(this.perObjectData.delete(e),this._discardObjectEntry(t))}async _getObjectEntry(e){const t=this.perObjectData.get(e);if(!t)throw"no object";return await t.loaded,t}removeAll(){this.perObjectData.forEach((e,t)=>this.removeObject(t))}render(e,t){if(this.numberOfRenderedEdges[t]=0,Object(z["j"])(this.componentColorManager))return;this.localOrigins.updateViewMatrices(e.camera.viewMatrix);const r=e.camera.viewInverseTransposeMatrix,i=Object(ju["f"])(),n=new CP,a=new KM["c"],s=Object(wh["b"])();Object($o["y"])(i,r[3],r[7],r[11]),n.set(i),Object($o["m"])(a.transformWorldFromViewTH,n.high),Object($o["m"])(a.transformWorldFromViewTL,n.low),Object(To["f"])(a.transformViewFromCameraRelativeRS,e.camera.viewMatrix),Object(Qd["d"])(a.transformProjFromView,e.camera.projectionMatrix);const o=Object(wh["b"])();Object(To["p"])(o,a.transformViewFromCameraRelativeRS),Object(To["e"])(s,o);let c=0,l=0;if(this.renderers.forEach(e=>{0===e.refCount.value?(this.renderers.delete(e.key),e.dispose()):e.forEachRenderable(e=>{e.visible&&(c+=e.statistics.averageEdgeLength,l++)},t)}),this.componentColorManager.garbageCollect(),this.componentColorManager.updateTextures(),0===l)return;const u={distanceFalloffFactor:40*c/l,minimumEdgeLength:e.camera.perScreenPixelRatio,transparency:t,viewProjectionTransform:a,transformNormalViewFromGlobal:s};this._updateObjectCameraDistances(e),this.renderers.forEach(t=>{this._renderRegularEdges(t,e,u),this._renderSilhouetteEdges(t,e,u)})}_updateTransparency(e){const t=iN(e.components.meta),r=nN(e.components.meta);t===e.edgeTransparency&&r===e.objectTransparency||(e.edgeTransparency=t,e.objectTransparency=r,this.renderers.get(e.rendererKey).setRenderablesDirty())}_computeModelTransformWithLocalOrigin(e,t,r){if(e.getCombinedStaticTransformation(t,r),Object(z["k"])(t.origin))this.localOrigins.register(t.origin);else{const e=Object($o["y"])(this.tmpModelPosition,r[12],r[13],r[14]);t.origin=this.localOrigins.acquire(e)}return vL(t.origin.vec3,r),t.origin}_updateComponentBuffer(e){const{meta:t,buffer:r}=e;for(let i=0;i<t.length;i++){const e=t[i].material,n=t[i].index,a=Object(dr["f"])(Math.round(e.size*LL),0,255),s=Object(dr["f"])(e.extensionLength,-NL,255-NL)+NL,o="solid"===e.type?SL["a"].SOLID:SL["a"].SKETCH,c=255*e.opacity,l=e.color,u=255*l[0],d=255*l[1],h=255*l[2],p=255*l[3];r.textureBuffer.setData(n,0,u,d,h,p),r.textureBuffer.setData(n,1,a,s,o,c)}}_createComponentBuffers(e){if(Object(z["j"])(this.componentColorManager))return null;const t=new Array,r=this.componentColorManager.getBuffer(e.length);for(let n=0;n<e.length;n++){const i=e[n],a=r.acquireIndex();t.push({index:a,material:i})}const i={meta:t,buffer:r};return this._updateComponentBuffer(i),i}_extractEdges(e,t,r,i,n,a=n.length){return this.worker.process({data:t,indices:n,indicesLength:a,writerSettings:e,skipDeduplicate:r},this.workerAbort.signal,i)}_createEdgeResources(e){const t={};if(Object(z["j"])(this.verticesBufferObject))return t;if(e.regular.lodInfo.lengths.length>0){const r=new ep["a"](this.rctx,xL["b"],{vertices:xL["f"],instances:TL["a"].glLayout},{vertices:this.verticesBufferObject,instances:Jh["a"].createVertex(this.rctx,fh["D"].STATIC_DRAW,e.regular.instancesData.buffer)});t.regular={vao:r,lod:e.regular.lodInfo}}if(e.silhouette.lodInfo.lengths.length>0){const r=new ep["a"](this.rctx,xL["b"],{vertices:xL["f"],instances:TL["b"].glLayout},{vertices:this.verticesBufferObject,instances:Jh["a"].createVertex(this.rctx,fh["D"].STATIC_DRAW,e.silhouette.instancesData.buffer)});t.silhouette={vao:r,lod:e.silhouette.lodInfo}}return t}async _addGeometry(e,t,r,i,n,a,s){const o=r.vertexAttributes.get(Yh["a"].POSITION),c=r.indices.get(Yh["a"].POSITION),l=Object(Kd["d"])(),u={position:o,indices:c,modelTransform:l,origin:this._computeModelTransformWithLocalOrigin(e,i,l)};return this._addPositionData(t,u,r.edgeIndicesLength,n,a,s)}async _addPositionData(e,t,r,i,n,a=!1){if(null==e.loaded)return;const s=this._createComponentBuffers([i]);if(Object(z["j"])(s)||r<=0)return;const o=this._acquireRenderer(i.type,!!n.slicePlaneEnabled),{modelTransform:c,origin:l}=t,u=t.indices,d=t.position,h=d.data.length/d.size,p=xL["a"].createBuffer(h);for(let O=0;O<h;O++)p.position.set(O,0,d.data[O*d.size+0]),p.position.set(O,1,d.data[O*d.size+1]),p.position.set(O,2,d.data[O*d.size+2]);lN(s.meta,[0,p.componentIndex.count],p.componentIndex);const f=await this.updatingHandles.addPromise(this._extractEdges(o.writerSettings,p,!1,a,u,r));if(null==e.loaded)return;const{regular:b,silhouette:m}=this._createEdgeResources(f),g=(b?b.vao.size:0)+(m?m.vao.size:0),y={regular:b,silhouette:m,transform:{modelMatrix:c,origin:l},statistics:{gpuMemoryUsage:g,externalMemoryUsage:!1,averageEdgeLength:f.averageEdgeLength},components:s,visible:!0,edgeTransparency:iN(s.meta),objectTransparency:nN(s.meta),distanceToCamera:0,rendererKey:o.key};e.renderables.push(y),o.addRenderable(y),this.gpuMemoryUsage+=g}async _addComponentGeometry(e,t,r,i,n,a,s){if(null==t.loaded)return 0;const o=this._createComponentBuffers(a);if(Object(z["j"])(o))return 0;const c=rN(a),l=this._acquireRenderer(c,s.slicePlaneEnabled||!1,!1),u=xL["a"].createBuffer(r.count);Object(OL["a"])(u.position,r),lN(o.meta,n,u.componentIndex,i);const d=!0,h=l.writerSettings,p=await this.updatingHandles.addPromise(this._extractEdges(h,u,d,!1,i));if(null==t.loaded)return 0;const{regular:f,silhouette:b}=this._createEdgeResources(p),m=(f?f.vao.size:0)+(b?b.vao.size:0),g={regular:f,silhouette:b,transform:e,statistics:{gpuMemoryUsage:m,externalMemoryUsage:!0,averageEdgeLength:p.averageEdgeLength},components:o,visible:!0,edgeTransparency:iN(o.meta),objectTransparency:nN(o.meta),distanceToCamera:0,rendererKey:l.key};return t.renderables.push(g),l.addRenderable(g),m}async _addObjectMergedGeometries(e,t,r,i,n){const a=new Map;let s=0,o=null,c=0;for(let g=0;g<e.geometries.length;g++){const t=e.geometries[g],r=e.geometryRecords[g];if(!r.material.supportsEdges)continue;!o&&r.origin&&(o=r);const i=t.vertexAttributes.get(Yh["a"].POSITION);c+=i.data.length/i.size,s+=t.edgeIndicesLength}const l=c>=65536?Uint32Array:Uint16Array,u=s?new l(s):null,d=[];let h=0;for(let g=0;g<e.geometries.length;g++){const t=e.geometries[g];if(!e.geometryRecords[g].material.supportsEdges)continue;const r=t.vertexAttributes.get(Yh["a"].POSITION),i=t.indices.get(Yh["a"].POSITION);let n=a.get(r.data);if(null==n){n=d.length/3;for(let e=0;e<r.data.length;e+=r.size)d.push(r.data[e+0]),d.push(r.data[e+1]),d.push(r.data[e+2]);a.set(r.data,n)}if(i)for(let e=0;e<t.edgeIndicesLength;e++)u[h++]=n+i[e]}const p=o||e.geometryRecords[0],f=Object(Kd["d"])(),b=this._computeModelTransformWithLocalOrigin(e,p,f);for(let g=0;g<e.geometryRecords.length;g++)e.geometryRecords[g].origin=b;const m={position:{data:d,size:3},indices:u,modelTransform:f,origin:b};await this.updatingHandles.addPromise(this._addPositionData(t,m,u.length,r[0],i,n))}_acquireRenderer(e,t,r=!0){const i=zL.getKey(e,t,r);let n=this.renderers.get(i);return Object(z["j"])(this.strokesTexture)&&(this.strokesTexture=YL(this.rctx)),n||(n=new zL(this.rctx,this.techniqueRepository,{type:e,slicePlaneEnabled:t,strokesTexture:this.strokesTexture,legacy:r}),this.renderers.set(i,n)),n.refCount.increment(),n}_removeRenderable(e){hN(e);const t=this.renderers.get(e.rendererKey);if(t){t.removeRenderable(e),t.refCount.decrement(),"origin"in e.transform&&this.localOrigins.release(e.transform.origin),this.gpuMemoryUsage-=e.statistics.externalMemoryUsage?0:e.statistics.gpuMemoryUsage;for(const t of e.components.meta)e.components.buffer.releaseIndex(t.index)}}_updateObjectCameraDistances(e){const t=e.camera.eye,r=e.camera.viewForward,i=Object(ju["f"])(),n=e=>{const{center:n,radius:a}=e;Object($o["B"])(i,n,t);const s=Object($o["j"])(i,r),o=s<-a?1/0:s<a?0:s-a;e.renderables.forEach(e=>e.distanceToCamera=o)};this.perObjectData.forEach(n),this.perObjectDataEvictionCache.forEach(n)}_renderRegularEdges(e,t,r){e.bindRegularEdges(t,r);const i=r.transparency;e.forEachRenderable(n=>{if(!n.visible||!n.regular)return;const a=cN(n.regular.lod.lengths,n.distanceToCamera,r);"origin"in n.transform&&(t.localViewMatrixForEdges=this.localOrigins.getViewMatrix(n.transform.origin)),e.renderRegularEdges(n,t,a),this.numberOfRenderedEdges[i]+=a},i)}_renderSilhouetteEdges(e,t,r){e.bindSilhouetteEdges(t,r);const i=r.transparency;e.forEachRenderable(n=>{if(!n.visible||!n.silhouette)return;const a=cN(n.silhouette.lod.lengths,n.distanceToCamera,r);"origin"in n.transform&&(t.localViewMatrixForEdges=this.localOrigins.getViewMatrix(n.transform.origin)),e.renderSilhouetteEdges(n,t,a),this.numberOfRenderedEdges[i]+=a},i)}};function hN(e){e.regular&&(e.regular.vao.vertexBuffers.instances.dispose(),e.regular.vao.dispose(!1),e.regular.vao=null),e.silhouette&&(e.silhouette.vao.vertexBuffers.instances.dispose(),e.silhouette.vao.dispose(!1),e.silhouette.vao=null)}function pN(e){let t=null,r=null;for(let n=0;n<e.geometries.length;n++){var i;const a=e.geometryRecords[n];if(a.material.supportsEdges){if(t){if(!Object(S["e"])(t,a.transformation))return!1}else t=a.transformation;if(!r&&Object(z["k"])(a.origin))r=a;else if(Object(z["k"])(null==(i=r)?void 0:i.origin)&&Object(z["k"])(a.origin)&&r.origin.id!==a.origin.id)return!1}}return!0}Object(l["a"])([Object(j["b"])({constructOnly:!0})],dN.prototype,"rctx",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dN.prototype,"renderSR",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dN.prototype,"techniqueRepository",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dN.prototype,"setNeedsRender",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],dN.prototype,"schedule",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],dN.prototype,"updatingHandles",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],dN.prototype,"updating",null),dN=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.edgeRendering.EdgeView")],dN);class fN{constructor(e,t,r){this.center=t,this.radius=r,this.renderables=new Array,this.loaded=e,this.loaded.then(()=>{null!=this.loaded&&(this.loaded=!0)})}}var bN=r("2245"),mN=r("191a"),gN=r("2ff3"),yN=r("4c37");function ON(e){const t=e.capabilities.disjointTimerQuery;return Object(z["j"])(t)?null:t.timestampBits()>0?new vN(t):jN?null:new _N(t)}class vN{constructor(e){this.timer=e,this.start=e.createQuery(),e.createTimestamp(this.start)}stop(e,t=50){this.end=this.timer.createQuery(),this.timer.createTimestamp(this.end),this._checkQueryResult(e,t)}_checkQueryResult(e,t){if(!this.timer.resultAvailable(this.end))return void setTimeout(()=>this._checkQueryResult(e,t),t);if(this.timer.disjoint())return void e(null);const r=this.timer.getResult(this.start),i=this.timer.getResult(this.end);e((i-r)/1e6)}}class _N{constructor(e){this.timer=e,this.query=e.createQuery(),jN=!0,this.timer.beginTimeElapsed(this.query)}stop(e,t=50){this.timer.endTimeElapsed(),jN=!1,this._checkQueryResult(e,t)}_checkQueryResult(e,t){const r=this.timer.resultAvailable(this.query),i=this.timer.disjoint();if(!r||i)i?e(null):setTimeout(()=>this._checkQueryResult(e,t),t);else{const t=this.timer.getResult(this.query);e(t/1e6)}}}let jN=!1;var wN;!function(e){e[e.Prepare=0]="Prepare",e[e.Shadowmap=1]="Shadowmap",e[e.Lineardepth=2]="Lineardepth",e[e.Normals=3]="Normals",e[e.SSAO=4]="SSAO",e[e.Opaque=5]="Opaque",e[e.OpaqueEdges=6]="OpaqueEdges",e[e.Transparent=7]="Transparent",e[e.TransparentEdges=8]="TransparentEdges",e[e.Hudvisibility=9]="Hudvisibility",e[e.TransparentTerrain=10]="TransparentTerrain",e[e.Atmosphere=11]="Atmosphere",e[e.Laserline=12]="Laserline",e[e.Occluded=13]="Occluded",e[e.Antialiasing=14]="Antialiasing",e[e.Highlights=15]="Highlights",e[e.HudOccluded=16]="HudOccluded",e[e.HudNotoccluded=17]="HudNotoccluded"}(wN||(wN={}));const xN=["prepare","shadowmap","lineardepth","normals","ssao","opaque","opaque edges","transparent","transparent edges","hudvisibility","transparent terrain","atmosphere","laserline","occluded","antialiasing","highlights","hudOccluded","hudNotoccluded"];class TN extends gN["a"]{constructor(){super("total"),this.total=0,this.frameCount=0}}class SN{constructor(){this._startTime=Object(Ic["a"])(0),this._lastSample=Object(Ic["a"])(0),this._enableGPUTimer=0,this.totalTime=new TN,this.gpuTime=new gN["a"]("gpu",9),this.renderPassTimings=xN.map(e=>new gN["a"](e))}get elapsedTime(){return Object(Ic["a"])(performance.now()-this._startTime)}enableGPUTimer(){return++this._enableGPUTimer,{remove:Object(yN["d"])(()=>--this._enableGPUTimer)}}prerender(e){this._startTime=this._lastSample=Object(Ic["a"])(performance.now()),this._enableGPUTimer&&(this._gpuTimer=ON(e))}advance(e){const t=Object(Ic["a"])(performance.now());this.renderPassTimings[e].record(t-this._lastSample),this._lastSample=t}postrender(){Object(z["k"])(this._gpuTimer)&&(this._gpuTimer.stop(e=>Object(z["k"])(e)&&this.gpuTime.record(e),16),this._gpuTimer=null);const e=performance.now()-this._startTime;this.totalTime.record(e),this.totalTime.total+=e,this.totalTime.frameCount++}}const EN=.9;let AN=class extends F["a"]{constructor(e,t,r,i,n,a,s,o,c){super({}),this._materialRepository=e,this._shaderTechniqueRepository=r,this._rctx=i,this._compositingHelper=n,this._magnifierHelper=a,this._requestRender=s,this._stage=c,this._materialRenderers=new Map,this._needsTransparentPass=!1,this._hasHUDElements=!1,this._hasHighlights=!1,this._hasOccludees=!1,this._hasWater=!1,this._hasOverlayWater=!1,this._content=new Map,this._isRendering=!1,this._fallbackDepthStencilTexture=null,this.performanceInfo=new SN,this._antialiasing=LS["b"].SMAA,this._oitEnabled=!1,this._multipassTerrain=!0,this._opaqueTerrain=!0,this._lighting=new bN["a"],this._hasAnimations=!1,this._animationTimestep=Object(Ic["a"])(0),this._handles=new ge["a"],this._renderHiddenTransparentEdges=()=>{},this._oitUsed=!1,this._smaaPass=new hL(this._rctx,r),this._oitEnabled=this._hasOITSupport,this._requestRender(),this._offscreenRendering=new $I(this._rctx,this._compositingHelper),this._sliceHelper=new cL,this._shadowMap=new uD(this._rctx,c.viewingMode,2),this._ssaoHelper=new mL(r,this._rctx,()=>this._requestRender()),this._highlightHelper=new VI(r,this._rctx),this._shadowHighlightHelper=new aL(this._rctx,c.viewingMode),this._shadowAccumulator=new WD(this._rctx,r,c,(e,t)=>{this.renderPassManager.shadowCastingEnabled=!0,this._renderPlugins.prepareRender(e,t),this.renderPassManager.shadowCastingEnabled=this._shadowMap.enabled},(e,t,r,i)=>{e.start(r,t,i),this._renderShadowCascades(Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL,e),r.setGLViewport(this._rctx),this._ensureCameraBindParameters(r)},()=>this._requestRender()),this._bindParameters={slot:null,camera:null,inverseViewport:Object(vo["b"])(),shadowMap:this._shadowMap,shadowMappingEnabled:this._shadowMap.enabled,ssaoHelper:this._ssaoHelper,ssaoEnabled:this._ssaoHelper.enabled,origin:null,screenToWorldRatio:null,screenToPCSRatio:null,slicePlane:this._sliceHelper.plane,highlightDepthTexture:null,hasOccludees:!1,linearDepthTexture:null,terrainLinearDepthTexture:null,geometryLinearDepthTexture:null,multipassTerrainEnabled:!1,multipassGeometryEnabled:!1,cullAboveGround:!1,lastFrameColorTexture:null,reprojectionMatrix:Kd["a"],ssrEnabled:!1,lighting:this._lighting,highlightColorTexture:null,cloudsCompositionParams:null,hasFillLights:!0},this._renderContext=new YI["b"](this._rctx,this._offscreenRendering,this._lighting,this._shadowMap,this._ssaoHelper,this._sliceHelper),this._renderContext.multipassTerrainParams={camera:null,multipassTerrainEnabled:!1,cullAboveGround:!1,terrainLinearDepthTexture:null},this._renderContext.multipassGeometryParams={multipassGeometryEnabled:!1,geometryLinearDepthTexture:null},this._renderContext.ssrParams={camera:null,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:Kd["a"],ssrEnabled:!1},this._renderPlugins=new QI({renderContext:this._renderContext,shaderTechniqueRepository:r,textureRep:t,materialRep:this._materialRepository,requestRender:this._requestRender,schedule:o}),this.renderPassManager=new RI(this._rctx,this._shaderTechniqueRepository),this._renderPlugins.add(this.renderPassManager.slots(),this.renderPassManager),this._handles.add([Object(Me["a"])(z_["a"],"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(DL["a"].TRANSPARENT):()=>{},this._requestRender()}),Object(Me["a"])(this._stage,"camera",()=>this._requestRender(),!0)])}get hasWater(){return this._hasWater||this._hasOverlayWater}get hasWaterReflection(){return this.hasWater&&this._waterReflectionEnabled}normalizeCtorArgs(){return{}}dispose(){this._handles.destroy(),this._smaaPass.dispose(),this._materialRenderers.forEach(e=>e.dispose()),this._materialRenderers.clear(),this._edgeView=Object(z["d"])(this._edgeView),this._offscreenRendering.dispose(),this._fallbackDepthStencilTexture=Object(z["e"])(this._fallbackDepthStencilTexture),this._shadowMap.enabled=!1,this._shadowMap.dispose(),this._ssaoHelper.enabled=!1,this._ssaoHelper.dispose(),this._highlightHelper.dispose(),this._shadowHighlightHelper.dispose(),this._shadowAccumulator.dispose(),LI["a"].prune(),this._content.clear()}disposeOffscreenBuffers(){this._offscreenRendering.dispose(),this._shadowMap.dispose(),this._smaaPass.disable(),this._ssaoHelper.disposeOffscreenBuffers()}get updating(){return this._antialiasing===LS["b"].SMAA&&this._smaaPass.updating||Object(z["k"])(this._edgeView)&&this._edgeView.updating||this._shadowAccumulator.running||!this.isCameraFinal}ensureEdgeView(){return Object(z["j"])(this._edgeView)&&(this._edgeView=new dN({rctx:this._rctx,renderSR:this._stage.renderSR,techniqueRepository:this._shaderTechniqueRepository,setNeedsRender:()=>this._requestRender(),schedule:e=>this._stage.resourceController.schedule(e)}),this._handles.add(this._edgeView.watch("updating",()=>this._requestRender(),!0)),this._requestRender()),this._edgeView}get edgeView(){return this._edgeView}get isCameraFinal(){return null===this._bindParameters.reprojectionMatrix||Object(Qd["w"])(this._bindParameters.reprojectionMatrix,Kd["a"])}set _reprojectionMatrix(e){Object(Qd["w"])(this._bindParameters.reprojectionMatrix,e)||(this._bindParameters.reprojectionMatrix=e,this.notifyChange("isCameraFinal"))}get hasShadowsEnabled(){var e;return!(null==(e=this._shadowMap)||!e.enabled)}setRenderParameters(e){const{renderPassManager:t,_shadowMap:r,_ssaoHelper:i}=this;void 0!==e.screenSpaceReflectionsEnabled&&t.screenSpaceReflectionsEnabled!==e.screenSpaceReflectionsEnabled&&(t.screenSpaceReflectionsEnabled=e.screenSpaceReflectionsEnabled,this._requestRender()),void 0!==e.fillLightsEnabled&&t.fillLightsEnabled!==e.fillLightsEnabled&&(t.fillLightsEnabled=e.fillLightsEnabled,this._requestRender()),void 0===e.shadowMap||r.enabled===e.shadowMap&&t.shadowCastingEnabled===e.shadowMap||(r.enabled=e.shadowMap,t.shadowCastingEnabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&r.maxCascades!==e.shadowMapMaxCascades&&(r.maxCascades=e.shadowMapMaxCascades,this._requestRender()),void 0!==e.ssao&&i.enabled!==e.ssao&&(i.enabled=e.ssao,this._requestRender()),e.background&&this._offscreenRendering.background!==e.background&&(this._offscreenRendering.background=e.background,this._requestRender());const n=e.antialiasingEnabled?LS["b"].SMAA:LS["b"].NONE;void 0!==e.antialiasingEnabled&&this._antialiasing!==n&&(this._antialiasing=n,this._requestRender()),void 0!==e.highQualityTransparency&&this._multipassTerrain!==e.highQualityTransparency&&(this._multipassTerrain=e.highQualityTransparency,this._oitEnabled=e.highQualityTransparency&&this._hasOITSupport,this._requestRender()),void 0!==e.defaultHighlightOptions&&(this._highlightHelper.setDefaultOptions(e.defaultHighlightOptions),this._shadowHighlightHelper.setDefaultOptions(e.defaultHighlightOptions),this._requestRender()),void 0!==e.slicePlane&&this._sliceHelper.plane!==e.slicePlane&&(this._sliceHelper.plane=Object(z["t"])(e.slicePlane),this._requestRender()),void 0!==e.waterReflectionEnabled&&this._waterReflectionEnabled!==e.waterReflectionEnabled&&(this._waterReflectionEnabled=e.waterReflectionEnabled,this._requestRender()),void 0!==e.fillLightsEnabled&&this._hasFillLights!==e.fillLightsEnabled&&(this._hasFillLights=e.fillLightsEnabled,this._requestRender()),void 0!==e.opaqueTerrain&&this._opaqueTerrain!==e.opaqueTerrain&&(this._opaqueTerrain=e.opaqueTerrain,this._requestRender()),void 0!==e.hasOverlayWater&&this._hasOverlayWater!==e.hasOverlayWater&&(this._hasOverlayWater=e.hasOverlayWater,this._requestRender()),void 0!==e.shadowCastOptions&&this._shadowAccumulator.setOptions(e.shadowCastOptions)}get hasSlicePlane(){return!!this._sliceHelper.plane}get renderPlugins(){return this._renderPlugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlendWorking}modify(e){this._isRendering&&console.warn("Renderer.modify called while rendering");const{adds:t,removes:r,updates:i}=e;if(0===t.length&&0===r.length&&0===i.length)return;r.forAll(({id:e})=>this._content.delete(e)),t.forAll(e=>this._content.set(e.id,e));const n=Object(JI["a"])(e);let a=!1;n.forEach((e,t)=>{let r=this._materialRenderers.get(t);if(!r){if(!(e.adds.length>0))return;r=new mN["a"](this._rctx,this._materialRepository,t),this._materialRenderers.set(t,r)}r.modify(e),r.isEmpty&&(a=!0)}),a&&this._materialRenderers.forEach((e,t)=>{e.isEmpty&&(this._materialRenderers.delete(t),e.dispose())}),this._hasHighlights=Object(Da["c"])(this._materialRenderers,e=>e.hasHighlights),this._hasOccludees=Object(Da["c"])(this._materialRenderers,e=>e.hasOccludees),this._hasWater=Object(Da["c"])(this._materialRenderers,e=>e.hasWater),this._needsTransparentPass=Object(Da["c"])(this._materialRenderers,e=>e.requiresSlot(Vp["a"].TRANSPARENT_MATERIAL,Bp["a"].MATERIAL)),this._hasHUDElements=Object(Da["c"])(this._materialRenderers,e=>e.requiresSlot(Vp["a"].LINE_CALLOUTS_HUD_DEPTH,Bp["a"].MATERIAL)||e.requiresSlot(Vp["a"].HUD_MATERIAL,Bp["a"].MATERIAL)||e.requiresSlot(Vp["a"].LABEL_MATERIAL,Bp["a"].MATERIAL)),this._requestRender()}updateAnimation(e){return this._hasAnimations=!1,this._materialRenderers.forEach(t=>this._hasAnimations=t.updateAnimation(e)||this._hasAnimations),this._hasAnimations=this._renderPlugins.updateAnimation(e)||this._hasAnimations,this._hasAnimations}get animationTimestep(){return this._animationTimestep}updateLightSources(e,t,r){this._lighting.groundLightingFactor=t,this._lighting.globalFactor=r,this._lighting.set(e)}render(e,t,r,i){this._isRendering=!0,this.performanceInfo.prerender(this._rctx),this._bindParameters.lighting=this._lighting,this._renderContext.hasOccludees=this._hasOccludees,this._renderContext.transparencyPassType=this._bindParameters.transparencyPassType=LS["l"].NONE,this._renderContext.hasFillLights=this._bindParameters.hasFillLights=this._hasFillLights;const n=this._offscreenRendering;n.needLastFrameColorTexture=this.hasWaterReflection,n.advanceCurrentRenderTarget();const a=this._sliceHelper.plane;i===LS["d"].OFF&&(this._sliceHelper.plane=null),this._rctx.bindFramebuffer(e),t.setGLViewport(this._rctx),this.needsShadowCast&&(this.renderPassManager.shadowCastingEnabled=!0),this._renderPlugins.prepareRender(t,r),this.performanceInfo.advance(wN.Prepare);const s=this._computeDepthRange(t);this._renderShadowMap(e,t,this._lighting.lightingMainDirection,s),this.performanceInfo.advance(wN.Shadowmap),n.initializeFrame(t),this._ensureBindParameters(t),this._renderLinearDepth(),this.performanceInfo.advance(wN.Lineardepth),this._accumulateShadows(s,t,r),this._renderNormal(),this.performanceInfo.advance(wN.Normals),this._ensureBindParametersSSR(),this._ensureBindParametersCloudsReflections(),this._ssaoHelper.computeSSAO(t,n.linearDepthTexture,n.normalTexture),this.performanceInfo.advance(wN.SSAO),this._renderContext.pass=Bp["a"].MATERIAL,n.bindFramebuffer(),this._renderOpaqueGeometry(),this.performanceInfo.advance(wN.Opaque);const o=this._multipassTerrain&&!this._opaqueTerrain;this._renderTerrainLinearDepth(o),this._setMultipassFlags(o),this._setTerrainCulling(o),this._renderEdges(DL["a"].OPAQUE),this.performanceInfo.advance(wN.OpaqueEdges),this._renderHiddenTransparentEdges();const c=this._needsTransparentPass||this._renderPlugins.needsTransparentPass;c&&(this._oitEnabled?this._renderOrderIndependentTransparency(()=>this._renderTransparentGeometry(),!1):this._renderTransparentGeometry()),this.performanceInfo.advance(wN.Transparent),this._renderGeometryLinearDepth(o);const l=this._renderHUDVisibility();o||this._renderInternalSlot(Vp["a"].LINE_CALLOUTS),this.performanceInfo.advance(wN.Hudvisibility),this._renderEdges(DL["a"].TRANSPARENT,o),this.performanceInfo.advance(wN.TransparentEdges),this._renderSlot(Vp["a"].VOXEL),this._renderTransparentTerrain(),!this._opaqueTerrain&&l&&(o?this._renderLineCallouts(DI["a"].OCCLUDED):n.compositeTransparentTerrainOntoHUDVisibility(),this._renderHUD(DI["a"].OCCLUDED,n.framebuffer),this.performanceInfo.advance(wN.HudOccluded)),this.performanceInfo.advance(wN.TransparentTerrain),this._setTerrainCulling(!1),this._opaqueTerrain||(n.compositeTransparentTerrainOntoMain(),o&&(this._renderEdges(DL["a"].OPAQUE),this.performanceInfo.advance(wN.OpaqueEdges),c&&(this._oitEnabled?this._renderOrderIndependentTransparency(()=>this._renderTransparentGeometry(),!1):this._renderTransparentGeometry()),this.performanceInfo.advance(wN.Transparent),this._renderEdges(DL["a"].TRANSPARENT),this.performanceInfo.advance(wN.TransparentEdges))),o&&this._renderLineCallouts(DI["a"].NOTOCCLUDED),this._setMultipassFlags(!1),this._shadowAccumulator.render(),n.renderToTargets(()=>{this._renderInternalSlot(Vp["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),this._renderSlot(Vp["a"].POSTPROCESSING_ENVIRONMENT_TRANSPARENT),this._renderSlot(Vp["a"].LASERLINES)},n.currentColorTarget,n.mainDepth),this.performanceInfo.advance(wN.Atmosphere),this._renderPlugins.needsLaserlineWithContrastControl&&n.renderTmpAndCompositeToMain(()=>this._renderSlot(Vp["a"].LASERLINES_CONTRAST_CONTROL),qP["a"].PremultipliedAlpha),this.performanceInfo.advance(wN.Laserline),this._renderOccluded(),this.performanceInfo.advance(wN.Occluded);const u=i===LS["d"].ON&&this._magnifierHelper.enabled,d=u&&Object(z["j"])(e)?this._offscreenRendering.getFramebuffer(this._offscreenRendering.tmpColor,this._offscreenRendering.tmpDepth):e;this._rctx.bindFramebuffer(d);const h=this._offscreenRendering.colorTexture;!this._renderAntiAliasing(this._antialiasing,h)&&Object(z["k"])(h)&&this._compositingHelper.composite(h,qP["a"].None),this.performanceInfo.advance(wN.Antialiasing),this._renderHUD(DI["a"].NOTOCCLUDED,d),this.performanceInfo.advance(wN.HudNotoccluded),this._renderHighlights(d,this._bindParameters),this.performanceInfo.advance(wN.Highlights),u&&this._magnifierHelper.render(this._rctx,this._bindParameters),d!==e&&(this._rctx.bindFramebuffer(e),this._compositingHelper.composite(this._offscreenRendering.tmpColorTexture,qP["a"].None)),this._disposeOITBuffers(),this._renderContext.lastFrameCamera.copyFrom(this._renderContext.camera),this._sliceHelper.plane=a,this._isRendering=!1,this.onPostRender&&this.onPostRender(),this.performanceInfo.postrender()}finish(e){if(this._hasAnimations||(this._animationTimestep=Object(Ic["a"])(0)),e===LS["i"].BACKGROUND){this._rctx.gl.getError();const e=this.performanceInfo.elapsedTime/TI;this._animationTimestep=Object(Ic["a"])(Math.max(this._animationTimestep*EN+e*(1-EN),SI))}}readDepthPixels(e,t,r,i,n,a){const s=this._offscreenRendering.bindTarget(this._offscreenRendering.linearDepth,this._offscreenRendering.tmpDepth);if(!this._needsLinearDepth){this._ensureBindParameters(e),this._renderContext.camera.setGLViewport(this._rctx),this._rctx.setClearColor(0,0,0,0);const t=fh["e"].COLOR_BUFFER_BIT|fh["e"].DEPTH_BUFFER_BIT|fh["e"].STENCIL_BUFFER_BIT;this._rctx.clearSafe(t),this._renderGeometryAndTransparentTerrainPass(Bp["a"].MATERIAL_DEPTH)}s.readPixels(t,r,i,n,fh["p"].RGBA,fh["q"].UNSIGNED_BYTE,a)}readAccumulatedShadow(e,t){return this._shadowAccumulator.readAccumulatedShadow(e,t)}_setMultipassFlags(e){this._renderContext.multipassTerrainParams.multipassTerrainEnabled=this._bindParameters.multipassTerrainEnabled=e,this._renderContext.multipassGeometryParams.multipassGeometryEnabled=this._bindParameters.multipassGeometryEnabled=e}_setTerrainCulling(e){this._renderContext.multipassTerrainParams.cullAboveGround=this._bindParameters.cullAboveGround=e}_renderSlot(e){this._renderContext.slot=e,this._renderPlugins.render()}_renderEdges(e,t=!1){const r=this._edgeView;Object(z["k"])(r)&&r.shouldRender()&&this._offscreenRendering.renderTmpAndCompositeToMain(()=>r.render(this._bindParameters,e),qP["a"].Alpha,t)}_renderShadowMap(e,t,r,i){const n=this._shadowMap;n.enabled&&(n.start(t,r,i),this._shadowHighlightHelper.updateParameters(t,r),this.needsShadowHighlight?(this._renderShadowCascades(Bp["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT,this._shadowMap,e=>n.takeCascadeSnapshotTo(e,XD)),n.clear(),this._renderShadowCascades(Bp["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT,this._shadowMap,e=>{n.takeCascadeSnapshotTo(e,YD),this._renderGeometryAndTransparentTerrainPass(Bp["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT)})):this._renderShadowCascades(Bp["a"].MATERIAL_DEPTH_SHADOWMAP_ALL),n.finish(e),t.setGLViewport(this._rctx))}_renderShadowCascades(e,t=this._shadowMap,r=(e=>{})){for(const i of t.getCascades())i.camera.setGLViewport(this._rctx),this._ensureCameraBindParameters(i.camera),this._renderGeometryAndTransparentTerrainPass(e),r(i)}get _needsLinearDepth(){return this._ssaoHelper.enabled||this._renderPlugins.needsLinearDepth||this._hasWater&&this._waterReflectionEnabled||this.needsShadowHighlight||this.needsShadowCast}_renderLinearDepth(){this._needsLinearDepth?this._offscreenRendering.renderToTargets(()=>this._renderGeometryAndTransparentTerrainPass(Bp["a"].MATERIAL_DEPTH),this._offscreenRendering.linearDepth,this._offscreenRendering.tmpDepth,[0,0,0,0],!0,!0):this._offscreenRendering.disposeTarget(this._offscreenRendering.linearDepth),this._renderContext.ssrParams.linearDepthTexture=this._bindParameters.linearDepthTexture=this._offscreenRendering.linearDepthTexture}_renderTerrainLinearDepth(e){if(e){const e=this._renderContext.pass;this._renderContext.pass=Bp["a"].MATERIAL_DEPTH,this._offscreenRendering.renderToTargets(()=>this._renderTransparentTerrain(),this._offscreenRendering.terrainLinearDepth,this._offscreenRendering.tmpDepth,[-1e10,-1e10,-1e10,1],!0,!0),this._renderContext.pass=e}else this._offscreenRendering.disposeTarget(this._offscreenRendering.terrainLinearDepth);this._renderContext.multipassTerrainParams.terrainLinearDepthTexture=this._bindParameters.terrainLinearDepthTexture=this._offscreenRendering.terrainLinearDepthTexture}_renderGeometryLinearDepth(e){if(e){const e=this._renderContext.pass;this._offscreenRendering.renderToTargets(()=>this._renderGeometryPass(Bp["a"].MATERIAL_DEPTH),this._offscreenRendering.geometryLinearDepth,this._offscreenRendering.tmpDepth,[1,1,1,1],!0,!0),this._renderContext.pass=e}else this._offscreenRendering.disposeTarget(this._offscreenRendering.geometryLinearDepth);this._renderContext.multipassGeometryParams.geometryLinearDepthTexture=this._bindParameters.geometryLinearDepthTexture=this._offscreenRendering.geometryLinearDepthTexture}get needsNormal(){return this._ssaoHelper.enabled}_renderNormal(){this.needsNormal?this._offscreenRendering.renderToTargets(()=>{this._renderGeometryAndTransparentTerrainPass(Bp["a"].MATERIAL_NORMAL)},this._offscreenRendering.normal,this._offscreenRendering.tmpDepth,[0,0,0,0],!0,!0):this._offscreenRendering.disposeTarget(this._offscreenRendering.normal)}get needsDepthRange(){return this._shadowMap.enabled||this.needsShadowCast}_computeDepthRange(e){if(!this.needsDepthRange)return xM;const t=rI(e,this._content,this._stage.layers);return jM(t,this.renderPlugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}_renderGeometryAndTransparentTerrainPass(e){this._renderContext.pass=e,this._renderGeometryPass(e),this._renderTransparentTerrain()}_renderGeometryPass(e){this._renderContext.pass=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderOpaqueGeometry(){this._renderSlot(Vp["a"].INTEGRATED_MESH),this._renderSlot(Vp["a"].OPAQUE_TERRAIN),this._renderInternalSlot(Vp["a"].OPAQUE_MATERIAL),this._renderSlot(Vp["a"].OPAQUE_PLUGIN),this._renderSlot(Vp["a"].POSTPROCESSING_ENVIRONMENT_OPAQUE)}_renderTransparentGeometry(){this._renderInternalSlot(Vp["a"].TRANSPARENT_MATERIAL),this._renderSlot(Vp["a"].TRANSPARENT_PLUGIN)}_renderTransparentTerrain(){this._renderSlot(Vp["a"].TRANSPARENT_TERRAIN)}_renderHUDVisibility(){let e=!1;return this._renderContext.offscreenRenderingHelper&&this._renderContext.offscreenRenderingHelper.renderHUDVisibility(()=>{this._bindParameters.hudVisibilityTexture=this._renderContext.offscreenRenderingHelper.hudVisibilityTexture,e=this._renderInternalSlot(Vp["a"].OCCLUSION_PIXELS)},this._multipassTerrain&&!this._opaqueTerrain),e}_renderLineCallouts(e){this._bindParameters.renderTransparentlyOccludedHUD=e,e===DI["a"].OCCLUDED?this._offscreenRendering.renderToTargets(()=>this._renderInternalSlot(Vp["a"].LINE_CALLOUTS),this._offscreenRendering.currentColorTarget,this._offscreenRendering.tmpDepth,void 0,!0,!0):this._renderInternalSlot(Vp["a"].LINE_CALLOUTS)}_renderHUD(e,t){this._hasHUDElements&&(this._oitEnabled?(this._renderOrderIndependentTransparency(()=>this._renderHUDElements(e),!0),this._rctx.bindFramebuffer(t),this._compositingHelper.composite(this._offscreenRendering.hudColorTexture,qP["a"].PremultipliedAlpha)):e===DI["a"].OCCLUDED?this._offscreenRendering.renderToTargets(()=>this._renderHUDElements(DI["a"].OCCLUDED),this._offscreenRendering.currentColorTarget,this._offscreenRendering.tmpDepth,void 0,!0,!0):this._renderHUDElements(e))}_renderHUDElements(e){this._bindParameters.renderTransparentlyOccludedHUD=e,this._renderInternalSlot(Vp["a"].LINE_CALLOUTS_HUD_DEPTH),this._renderInternalSlot(Vp["a"].HUD_MATERIAL),this._renderInternalSlot(Vp["a"].LABEL_MATERIAL)}get needsHighlight(){return this._hasHighlights||this._renderPlugins.needsHighlight}get needsShadowHighlight(){return this._shadowMap.enabled&&this._shadowHighlightHelper.isVisible&&this.needsHighlight}_renderHighlights(e,t){if(!this.needsHighlight)return void this._offscreenRendering.disposeTarget(this._offscreenRendering.highlight);const r=this._highlightHelper,i=r.profilingCallback&&ON(this._renderContext.rctx);this._renderContext.highlightDepthTexture=t.highlightDepthTexture;const n=this._offscreenRendering.renderToTargets(()=>{this._renderGeometryAndTransparentTerrainPass(Bp["a"].MATERIAL_HIGHLIGHT),this._rctx.clearSafe(fh["e"].DEPTH_BUFFER_BIT),this._renderHUDElements(DI["a"].BOTH)},this._offscreenRendering.highlight,this._offscreenRendering.tmpDepth,[0,0,0,0],!0,!0);this._bindParameters.highlightColorTexture=n.colorTexture,this.needsShadowHighlight&&this._shadowHighlightHelper.render(t,e),r.render(this._renderContext.camera,n,e),Object(z["k"])(i)&&r.profilingCallback&&i.stop(e=>{r.profilingCallback&&r.profilingCallback(e)})}get needsShadowCast(){return this._shadowAccumulator.isAccumulating}_accumulateShadows(e,t,r){this.needsShadowCast&&(this._shadowAccumulator.setAccumulationDependencies(this._offscreenRendering.linearDepthTexture,e,t,r),this._shadowAccumulator.accumulateFixedSamples(),this.renderPassManager.shadowCastingEnabled=this._shadowMap.enabled)}_renderOrderIndependentTransparency(e,t){const r=r=>{this._renderContext.transparencyPassType=r,this._bindParameters.transparencyPassType=this._renderContext.transparencyPassType,this._offscreenRendering.renderOITPass(()=>e(),r,t)},i=this._renderContext.pass;this._renderContext.pass=Bp["a"].MATERIAL_ALPHA,r(LS["l"].Alpha),this._renderContext.pass=Bp["a"].MATERIAL,r(LS["l"].Color),r(LS["l"].FrontFace),this._offscreenRendering.compositeTransparentOntoOpaque(t),this._renderContext.transparencyPassType=LS["l"].NONE,this._bindParameters.transparencyPassType=this._renderContext.transparencyPassType,this._renderContext.pass=i,this._oitUsed=!0}_disposeOITBuffers(){this._oitUsed||(this._offscreenRendering.disposeTarget(this._offscreenRendering.alphaFloatTarget),this._offscreenRendering.disposeTarget(this._offscreenRendering.colorFloatTarget),this._offscreenRendering.disposeTarget(this._offscreenRendering.frontFaceTarget)),this._oitUsed=!1}_renderOccluded(){let e=0;this._materialRenderers.forEach((t,r)=>{r&&r.isVisible()&&r.renderOccluded===rR["c"].OccludeAndTransparentStencil&&(e|=r.renderOccluded,MN.push(r))});const t=this._offscreenRendering,r=(r,i,n,a,s)=>{0!=(e&i)&&(t.renderToTargets(n,t.tmpColor,t.mainDepth,[0,0,0,0],a,s),t.compositeOccludedOntoMain(r))};0!==MN.length&&(this._renderInternalSlot(Vp["a"].OCCLUDER_MATERIAL,MN),r(.5,rR["c"].OccludeAndTransparentStencil,()=>this._renderInternalSlot(Vp["a"].TRANSPARENT_OCCLUDER_MATERIAL,MN),!1,!1),MN.length=0),this._materialRenderers.forEach((t,r)=>{r&&r.isVisible()&&(r.renderOccluded===rR["c"].OccludeAndTransparent||r.renderOccluded===rR["c"].Transparent||r.renderOccluded===rR["c"].Opaque)&&(e|=r.renderOccluded,RN.push(r))});const i=this._renderPlugins.renderOccludedFlags;if(e|=i,!e)return;const n=e=>{this._renderContext.renderOccludedMask=e,i>rR["c"].Occlude&&this._renderSlot(Vp["a"].OCCLUDED_TERRAIN),this._renderInternalSlot(Vp["a"].OPAQUE_MATERIAL,RN),this._renderInternalSlot(Vp["a"].TRANSPARENT_MATERIAL,RN),this._renderInternalSlot(Vp["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,RN),this._renderContext.resetRenderOccludedMask()};this._renderContext.pass=Bp["a"].MATERIAL,r(.5,rR["c"].OccludeAndTransparent,()=>n(rR["c"].OccludeAndTransparent),!0,LS["k"].OutlineVisualElementMask),r(.5,rR["c"].Transparent,()=>n(rR["c"].Transparent),!0,LS["k"].OutlineVisualElementMask),r(1,rR["c"].Opaque,()=>n(rR["c"].Opaque),!0,LS["k"].OutlineVisualElementMask),RN.length=0}_renderAntiAliasing(e,t){if(e===LS["b"].SMAA){if(this._smaaPass.enable(()=>this._requestRender())&&Object(z["k"])(t))return this._smaaPass.render(t),!0}else this._smaaPass.disable();return!1}_ensureCameraBindParameters(e){this._renderContext.camera=e,this._bindParameters.camera=this._renderContext.camera,this._bindParameters.inverseViewport[0]=1/this._renderContext.camera.fullViewport[2],this._bindParameters.inverseViewport[1]=1/this._renderContext.camera.fullViewport[3]}_ensureBindParameters(e){var t;this._ensureCameraBindParameters(e);const r=this._renderContext.offscreenRenderingHelper;this._bindParameters.shadowMap=this._renderContext.shadowMap,this._bindParameters.shadowMappingEnabled=this._renderContext.shadowMap.enabled,this._bindParameters.ssaoHelper=this._renderContext.ssaoHelper,this._bindParameters.ssaoEnabled=this._renderContext.ssaoHelper.enabled,this._bindParameters.slicePlane=this._renderContext.sliceHelper.plane,this._bindParameters.hasOccludees=this._renderContext.hasOccludees,this._renderContext.multipassTerrainParams.camera=this._renderContext.camera,this._bindParameters.hudVisibilityTexture=r.hudVisibilityTexture,this._bindParameters.highlightDepthTexture=null!=(t=r.depthTexture)?t:this._getFallbackDepthTexture()}_ensureBindParametersSSR(){this.hasWaterReflection?(this._renderContext.lastFrameCamera.equals(this._renderContext.camera)?this._renderContext.ssrParams.reprojectionMatrix=this._reprojectionMatrix=Kd["a"]:(Object(Qd["k"])(PN,this._renderContext.lastFrameCamera.viewMatrix,this._bindParameters.origin?this._bindParameters.origin:[0,0,0]),Object(Qd["k"])(DN,this._renderContext.camera.viewMatrix,this._bindParameters.origin?this._bindParameters.origin:[0,0,0]),Object(Qd["b"])(DN,DN),Object(Qd["b"])(IN,this._renderContext.camera.projectionMatrix),Object(Qd["n"])(LN,DN,IN),Object(Qd["n"])(LN,PN,LN),Object(Qd["n"])(LN,this._renderContext.lastFrameCamera.projectionMatrix,LN),this._renderContext.ssrParams.reprojectionMatrix=this._reprojectionMatrix=LN),this._renderContext.ssrParams.camera=this._renderContext.camera,this._renderContext.ssrParams.lastFrameColorTexture=this._bindParameters.lastFrameColorTexture=this._offscreenRendering.lastFrameColorTexture):this._renderContext.ssrParams.lastFrameColorTexture=this._bindParameters.lastFrameColorTexture=null,this._renderContext.ssrParams.ssrEnabled=this._bindParameters.ssrEnabled=this.hasWaterReflection}_ensureBindParametersCloudsReflections(){this._bindParameters.cloudsCompositionParams=this._renderContext.cloudsCompositionParams}_renderInternalSlot(e,t){let r=!1;return this._bindParameters.slot=e,Object(z["k"])(t)?t.forEach(t=>{if(!t.shouldRender(this._renderContext))return;const i=this._materialRenderers.get(t);Object(z["k"])(i)&&(r=i.render(e,this._renderContext.pass,this._bindParameters)||r)}):this._materialRenderers.forEach((t,i)=>{i.shouldRender(this._renderContext)&&(r=t.render(e,this._renderContext.pass,this._bindParameters)||r)}),r}_getFallbackDepthTexture(){return this._fallbackDepthStencilTexture||(this._fallbackDepthStencilTexture=Object(Oh["b"])(this._rctx)),this._fallbackDepthStencilTexture}get gpuMemoryUsage(){var e,t,r,i,n,a,s,o,c,l;return{offscreen:null!=(e=null==(t=this._offscreenRendering)?void 0:t.gpuMemoryUsage)?e:0,highlights:(null!=(r=null==(i=this._highlightHelper)?void 0:i.gpuMemoryUsage)?r:0)+(null!=(n=null==(a=this._shadowHighlightHelper)?void 0:a.gpuMemoryUsage)?n:0),shadows:null!=(s=null==(o=this._shadowMap)?void 0:o.gpuMemoryUsage)?s:0,ssao:null!=(c=null==(l=this._ssaoHelper)?void 0:l.gpuMemoryUsage)?c:0}}get test(){const e=this;return{offscreen:this._offscreenRendering,shadowMap:this._shadowMap,ssao:this._ssaoHelper,highlight:this._highlightHelper,lighting:this._lighting,materialRenderers:this._materialRenderers,shadowAccumulator:this._shadowAccumulator,getFramebufferTexture:t=>{var r;switch(t){case CN.Color:return e._offscreenRendering.colorTexture;case CN.LinearDepth:return e._offscreenRendering.linearDepthTexture;case CN.Normals:return e._offscreenRendering.normalTexture;case CN.ShadowMap:return null==(r=e._shadowMap)?void 0:r.test.depthTexture;case CN.HudVisibility:return e._offscreenRendering.hudVisibilityTexture;case CN.Highlight:return e._offscreenRendering.highlightTexture}}}}};var CN;Object(l["a"])([Object(j["b"])()],AN.prototype,"_shadowAccumulator",void 0),Object(l["a"])([Object(j["b"])()],AN.prototype,"_smaaPass",void 0),Object(l["a"])([Object(j["b"])()],AN.prototype,"_antialiasing",void 0),Object(l["a"])([Object(j["b"])()],AN.prototype,"_edgeView",void 0),Object(l["a"])([Object(j["b"])()],AN.prototype,"updating",null),Object(l["a"])([Object(j["b"])()],AN.prototype,"isCameraFinal",null),AN=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.Renderer")],AN),function(e){e[e.Color=0]="Color",e[e.LinearDepth=1]="LinearDepth",e[e.Normals=2]="Normals",e[e.ShadowMap=3]="ShadowMap",e[e.HudVisibility=4]="HudVisibility",e[e.Highlight=5]="Highlight"}(CN||(CN={}));const RN=[],MN=[],PN=Object(Kd["d"])(),IN=Object(Kd["d"])(),DN=Object(Kd["d"])(),LN=Object(Kd["d"])();var NN=r("6df2");class FN extends NN["a"]{constructor(e,t,r){super(e,t),this.newCache=r,this._refCount=1}dispose(){--this._refCount>0||super.dispose()}ref(){++this._refCount}useTechnique(e,t=null,r){return this.useProgram(e.program),e.bindPipelineState(this,t,r),e.program}isTechniqueCompiled(e){return e.program.isCompiled}get test(){return this.programCache.test}}var kN=r("7aed");const UN=v["a"].getLogger("esri.views.3d.webgl-engine.lib.TextureRepository");let zN=class extends F["a"]{constructor(e,t,r){super({}),this._stage=e,this._techniqueRepository=t,this._rctx=r,this._textures=new Map,this._loadingCount=0,this._frameUpdates=new Map,this.events=new U["a"],this._frameTask=e.resourceController.scheduler.registerTask(Ba["c"].TEXTURE_UNLOAD)}normalizeCtorArgs(){return{}}dispose(){this._frameTask.remove(),this._stage.forEachOfType(pw["a"].Texture,e=>e.unload())}get updating(){return this._loadingCount>0||this._frameTask.updating}get textureTechnique(){return Object(z["j"])(this._textureTechnique)&&(this._textureTechnique=this._techniqueRepository.acquire(kN["a"],new kN["b"])),this._textureTechnique}acquire(e){const t=this._textures.get(e);return t?(t.ref(),Object(z["u"])(t.loadingPromise,t)):this._createNewRef(e)}update(){let e=!1;this._frameUpdates.forEach(t=>{const r=t.texture.frameUpdate(this._rctx,this.textureTechnique,t.previousToken);r>=0&&r!==t.previousToken&&(t.previousToken=r,e=!0)}),e&&this.events.emit("changed",LS["i"].BACKGROUND)}_createNewRef(e){const t=this._stage.getObject(e);if(Object(z["j"])(t))return Object(fp["a"])(void 0!==t),null;const r=t.events.on("unloaded",()=>{r.remove(),this._onTextureUnloaded(e)}),i=new BN(e,()=>{this._frameTask.schedule(()=>{i.isUnreferenced&&t.unload()})});return this._textures.set(e,i),i.ref(),Object(z["k"])(t.glTexture)?(this._updateGLTexture(i,t.glTexture),t.requiresFrameUpdates&&this._frameUpdates.set(e,{texture:t,previousToken:-1}),i):(this._loadingCount++,i.loadingPromise=this._stage.schedule(()=>{const r=t.load(this._rctx,()=>this.textureTechnique),n=r=>(this._loadingCount--,i.loadingPromise=null,this._updateGLTexture(i,r),t.requiresFrameUpdates&&this._frameUpdates.set(e,{texture:t,previousToken:-1}),i),a=e=>(this._loadingCount--,i.loadingPromise=null,Object(_["m"])(e)||UN.error(e),null);return Object(_["o"])(r)?r.then(n,a):n(r)}),i.loadingPromise)}_updateGLTexture(e,t){e.glTexture=t,this.events.emit("changed",LS["i"].UPDATE)}_onTextureUnloaded(e){this._textures.delete(e),this._frameUpdates.delete(e)}};Object(l["a"])([Object(j["b"])()],zN.prototype,"_loadingCount",void 0),Object(l["a"])([Object(j["b"])()],zN.prototype,"_frameTask",void 0),Object(l["a"])([Object(j["b"])()],zN.prototype,"updating",null),zN=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.lib.TextureRepository")],zN);class BN{constructor(e,t){this.id=e,this._release=t,this._refCount=0}get isUnreferenced(){return 0===this._refCount}ref(){++this._refCount}release(){--this._refCount,this._refCount>0||(0!==this._refCount?(UN.error("Cannot dereference texture that has no references!"),this._refCount=0):this._release())}}var VN=r("c1c0");const GN=v["a"].getLogger("esri.views.3d.webgl-engine.materials.internal.waterMaterialUtils");let HN=class extends F["a"]{constructor(){super(...arguments),this._data=new Array,this.loadingState=LS["j"].NOT_LOADED}dispose(){this.loadingState=LS["j"].NOT_LOADED,this._data.forEach(e=>e.dispose()),this._data.length=0}get updating(){return this.loadingState===LS["j"].LOADING}get ready(){return this.loadingState===LS["j"].LOADED}loadTextures(e){const t=[Object(Qt["b"])("esri/images/materials/water/normals.jpg"),Object(Qt["b"])("esri/images/materials/water/perturbation.jpg")];this.loadingState=LS["j"].LOADING,Promise.all(t.map(e=>Object(Bh["a"])(e))).then(t=>{t.forEach(t=>this._data.push(new Qh["a"](e,{target:fh["A"].TEXTURE_2D,pixelFormat:fh["p"].RGBA,dataType:fh["q"].UNSIGNED_BYTE,wrapMode:fh["B"].REPEAT,samplingMode:fh["z"].LINEAR_MIPMAP_LINEAR,hasMipmap:!0,maxAnisotropy:8,width:t.width,height:t.height},t))),this.loadingState=LS["j"].LOADED}).catch(e=>{GN.error("Failed to load textures for water material.",e),this.loadingState=LS["j"].NOT_LOADED})}bind(e){this.ready&&(e.bindTexture(this._data[0],"texWaveNormal"),e.bindTexture(this._data[1],"texWavePerturbation"))}};Object(l["a"])([Object(j["b"])()],HN.prototype,"loadingState",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],HN.prototype,"updating",null),HN=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.materials.internal.WaterTextureRepository")],HN);class qN extends zR["a"]{constructor(e,t,r,i,n,a){super(),this._rctx=e,this._renderScene=t,this._requestRenderScene=r,this._renderOverlay=i,this._forceCameraHook=n,this._disposeOffscreenBuffers=a,this.supersample=!0,this._screenshotQueue=new Array}dispose(){this._rctx=null}takeScreenshot(e){this._requestRenderScene(LS["i"].BACKGROUND);const t=Object(_["g"])();return this._screenshotQueue.push({settings:e,resolver:t}),t.promise}update(e){for(const t of this._screenshotQueue){if(this.isDisposed){t.resolver.reject();continue}const r={...t.settings,pixelRatio:t.settings.pixelRatio*e.viewCamera.pixelRatio},i=this._ensureScreenshotEncodeCanvas(),n=this._renderScreenshot(e,r),a=Object(Jc["b"])(n,r,i,{flipY:!0,premultipliedAlpha:!0});t.resolver(a)}this._screenshotQueue.length=0}_renderScreenshotOverlay(e,t,r){if(Object(z["j"])(this._renderOverlay))return t;e.width=t.width,e.height=t.height;const i=e.getContext("2d"),n=r.pixelRatio;return i.save(),i.translate(0,t.height),i.scale(1,-1),r.region&&i.translate(-r.region.x,-r.region.y),i.scale(n,n),t=this._renderOverlay(e,t),i.restore(),t}_readbackScreenshot(e,t){return e.resample?this._readbackScreenshotResampled(e,t):this._readbackScreenshotImmediate(e,t)}_readbackScreenshotResampled(e,t){const{framebufferWidth:r,framebufferHeight:i,region:n,resample:a}=e,s=this._ensureScreenshotEncodeCanvas();let o=Object(Jc["a"])(r,i,s);this._rctx.gl.readPixels(0,0,r,i,fh["p"].RGBA,fh["k"].UNSIGNED_BYTE,new Uint8Array(o.data.buffer)),t(),o=this._renderScreenshotOverlay(s,o,{...e,region:null});const c=Object(Jc["a"])(n.width,n.height,s);return Object(Jc["e"])(o,c,!0,a.region.x,i-(a.region.y+a.region.height),a.region.width,a.region.height)}_readbackScreenshotImmediate(e,t){const{framebufferHeight:r,region:i}=e,n=this._ensureScreenshotEncodeCanvas(),a=Object(Jc["a"])(i.width,i.height,n);return this._rctx.gl.readPixels(i.x,r-(i.y+i.height),i.width,i.height,fh["p"].RGBA,fh["k"].UNSIGNED_BYTE,new Uint8Array(a.data.buffer)),t(),this._renderScreenshotOverlay(n,a,e)}_renderScreenshot(e,t){let r=null;const i=e.viewCamera,{framebufferWidth:n,framebufferHeight:a}=t;let s=!1;const o=t.disableDecorations&&e.frameHasDecorations,c=n!==i.fullWidth||a!==i.fullHeight,l=t.ignorePadding&&i.pixelRatio!==t.pixelRatio,u=c||o||l;if(u){const e=i.clone();if(t.ignorePadding){const r=Object(Xd["d"])(e.padding);for(let i=0;i<4;i++)r[i]=Math.round(r[i]/e.pixelRatio*t.pixelRatio);e.padding=r}e.fullWidth=n,e.fullHeight=a,e.pixelRatio=t.pixelRatio;const o=i.fovX-e.fovX,c=i.fovY-e.fovY;o<0&&o<c?e.fovX=i.fovX:c<0&&c<o&&(e.fovY=i.fovY),this._forceCameraHook(e),s=!0,r=new Mh["a"](this._rctx,{width:e.fullWidth,height:e.fullHeight,colorTarget:fh["y"].TEXTURE,depthStencilTarget:fh["m"].DEPTH_STENCIL_RENDER_BUFFER}),this._renderScene(r,e,t.disableDecorations?LS["d"].OFF:LS["d"].ON),this._disposeOffscreenBuffers()}const d=()=>{this._rctx.bindFramebuffer(null),Object(z["e"])(r)},h=this._readbackScreenshot(t,d);if(d(),u&&!this._rctx.contextAttributes.alpha)for(let p=3;p<h.data.length;p+=4)h.data[p]=255;return s&&this._forceCameraHook(i),h}_ensureScreenshotEncodeCanvas(){return this._screenshotEncodeCanvas||(this._screenshotEncodeCanvas=document.createElement("canvas")),this._screenshotEncodeCanvas}}const WN=v["a"].getLogger("esri.views.3d.webgl-engine.parts.View");let $N=class extends(Object(zR["b"])(F["a"])){constructor(e){super({}),this.events=new U["a"],this.waterTextureRepository=new HN,this._magnifierHelper=new xI,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._container=e.container,this._initializeContext(e),Object(Me["a"])(this.waterTextureRepository,"loadingState",()=>this.requestRender()),this._magnifierHelper.events.on("request-render",()=>this.requestRender()),this._stippleTextureRepository=new VN["a"](this._rctx),this._shaderTechniqueRepository=new GP["a"]({rctx:this._rctx,viewingMode:e.viewingMode,stippleTextureRepository:this._stippleTextureRepository,waterTextureRepository:this.waterTextureRepository}),this._textureRepository=new zN(e,this._shaderTechniqueRepository,this._rctx),this._textureRepository.events.on("changed",e=>this.requestRender(e)),this._materialRepository=new OI["a"](this._textureRepository,this._shaderTechniqueRepository,()=>this.requestRender(),()=>this.requestRender()),this._compositingHelper=new WP(this._rctx,this._shaderTechniqueRepository),this._renderer=new AN(this._materialRepository,this._textureRepository,this._shaderTechniqueRepository,this._rctx,this._compositingHelper,this._magnifierHelper,e=>this.requestRender(e),(t,r)=>e.schedule(t,r),e),this._screenshotManager=new qN(this._rctx,(e,t,r)=>this._renderer.render(e,t,t,r),e=>this.requestRender(e),e.options.screenshot.renderOverlay,e=>this.events.emit("force-camera-for-screenshot",e),()=>this._renderer.disposeOffscreenBuffers()),this._registerFrameTask(e)}normalizeCtorArgs(){return{}}dispose(){this._container.contains(this._canvas)&&this._container.removeChild(this._canvas),this._frameTask=Object(z["s"])(this._frameTask),this._shaderTechniqueRepository=Object(z["e"])(this._shaderTechniqueRepository),super.dispose(),this._tmpDepthBuffer=null,this._rctx=null}get performanceInfo(){const e=this._rctx.gl;return{renderer:this._renderer.performanceInfo,textureMemory:void 0!==e.getUsedTextureMemory?e.getUsedTextureMemory():void 0,renderbufferMemory:void 0!==e.getUsedRenderbufferMemory?e.getUsedRenderbufferMemory():void 0,VBOMemory:void 0!==e.getUsedVBOMemory?e.getUsedVBOMemory():void 0}}requestRender(e=LS["i"].UPDATE){e===LS["i"].UPDATE?this._needsUpdate=!0:this._needsRender=!0}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this._renderer.updating||this._textureRepository.updating||this.waterTextureRepository.updating||this._magnifierHelper.updating}ensureEdgeView(){return this._renderer.ensureEdgeView()}get edgeView(){return this._renderer.edgeView}get textureRepository(){return this._textureRepository}get compositingHelper(){return this._compositingHelper}set magnifier(e){this._magnifierHelper.magnifier=e}updateLightSources(e,t,r){this._renderer.updateLightSources(e,t,r),this.requestRender()}setRenderParameters(e){void 0!==e.idleSuspend&&this._idleSuspend!==!!e.idleSuspend&&(this._idleSuspend=!!e.idleSuspend,this.requestRender()),this._renderer.setRenderParameters(e)}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}modify(e){this._renderer.modify(e),e.clear()}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e)}get hasShadowsEnabled(){return this._renderer.hasShadowsEnabled}readAccumulatedShadow(e){return this._renderer.readAccumulatedShadow(e[0],e[1])}getMinimalDepthForArea(e,t,r,i,n,a=n){const s=i.constrainWindowSize(t,r,n*i.pixelRatio,a*i.pixelRatio),o=this._ensureDepthBuffer(s);this._renderer.readDepthPixels(i,s[0],s[1],s[2],s[3],o);let c=Number.MAX_VALUE;for(let l=0;l<s[2]*s[3];l++){const e=tI(4*l,o,i.nearFar);c>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(c=e)}if(Object(z["k"])(e)){const n=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);Object(z["k"])(n)&&c>n&&n!==i.nearFar[0]&&n!==i.nearFar[1]&&(c=n)}return c===Number.MAX_VALUE?void 0:c}_ensureDepthBuffer(e){const t=4*e[2]*e[3];return(Object(z["j"])(this._tmpDepthBuffer)||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}get renderPlugins(){return this._renderer.renderPlugins}get test(){return{renderer:this._renderer}}get gpuMemoryUsage(){return this._renderer.gpuMemoryUsage}async reloadShaders(){HE(),await this._shaderTechniqueRepository.reloadAll(),this.requestRender()}get animationTimestep(){return this._renderer.animationTimestep}_registerFrameTask(e){const t=e.state,r={viewCamera:t.camera,frameHasDecorations:!1};let i=!1,n=LS["i"].BACKGROUND,a=!1;const s={preRender:r=>{i=this.updating,n=this._needsUpdate?LS["i"].UPDATE:LS["i"].BACKGROUND,e.processSyncLayers();const a=Object(Ic["a"])(r.time-this._lastAnimationUpdate);(a>this.animationTimestep||Object(z["k"])(this.forcedAnimationTime)||i||this._needsRender)&&(this._renderer.updateAnimation({camera:t.camera,dt:a,forcedTime:this.forcedAnimationTime})&&this.requestRender(LS["i"].BACKGROUND),this._lastAnimationUpdate=r.time)},render:()=>{if((this._needsUpdate||this._needsRender||!this._idleSuspend||!this._renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const e=this._needsUpdate&&this._idleSuspend&&this._renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this._renderer.render(null,t.camera,t.contentCamera,LS["d"].ON),a=!0,e&&this._renderer.hasWaterReflection&&(this.requestRender(LS["i"].BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:()=>{r.viewCamera=t.camera,r.frameHasDecorations=this._renderer.hasSlicePlane||this._magnifierHelper.enabled,this._textureRepository.update(),this._screenshotManager.update(r)},finish:()=>{a&&(this._renderer.finish(n),a=!1)}};this._frameTask=Object(xe["a"])(s)}_initializeContext(e){const t=e.options;this._canvas=t.canvas,this._canvas||(this._canvas=document.createElement("canvas")),this._canvas.setAttribute("style","width: 100%; height:100%; display:block;");const r={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:null==t.stencil||t.stencil,powerPreference:"high-performance"},i=Object(Kc["c"])("3d",this._canvas,r);if(Object(z["j"])(i)){const e=Object(E["a"])("esri-force-webgl");WN.error(e)}else this._rctx=this._newRenderingContext(i,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&WN.error("WebGL context has alpha channel even though no alpha channel was requested"),!this._rctx.contextAttributes.alpha&&Object(E["a"])("safari")>=11&&(this._container.style.backgroundColor="black"),this._container.appendChild(this._canvas)}_newRenderingContext(e,t){const r={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8},i=(e,r)=>t.resourceController.memoryController.newCache(e,r);if(ZN.enableContextCache){let t=XN.get(e);return t?(t.configure(r),t.newCache=i,t.ref(),t):(t=new FN(e,r,i),XN.set(e,t),t.ref(),t)}return new FN(e,r,i)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("standardDerivatives"),this._rctx.capabilities.enable("shaderTextureLOD"),this._rctx.capabilities.enable("textureFloat")}get componentObjectCollection(){return Object(z["j"])(this._componentObjectCollection)&&(this._componentObjectCollection=new FP(this._renderer.renderPassManager)),this._componentObjectCollection}set componentObjectCollection(e){this._componentObjectCollection=e}};Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],$N.prototype,"updating",null),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_rctx",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_container",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_canvas",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_stippleTextureRepository",void 0),Object(l["a"])([Object(zR["c"])(),Object(j["b"])()],$N.prototype,"waterTextureRepository",void 0),Object(l["a"])([Object(zR["c"])(),Object(j["b"])()],$N.prototype,"_magnifierHelper",void 0),Object(l["a"])([Object(zR["c"])(),Object(j["b"])()],$N.prototype,"_textureRepository",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_compositingHelper",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_renderer",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_screenshotManager",void 0),Object(l["a"])([Object(zR["c"])()],$N.prototype,"componentObjectCollection",null),Object(l["a"])([Object(zR["c"])()],$N.prototype,"_componentObjectCollection",void 0),Object(l["a"])([Object(j["b"])()],$N.prototype,"_needsUpdate",void 0),Object(l["a"])([Object(j["b"])()],$N.prototype,"_needsWaterReflectionUpdate",void 0),$N=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.parts.RenderView")],$N);const ZN={enableContextCache:!1,disposeContextCache:()=>{XN.forEach(e=>e.dispose()),XN.clear()}},XN=new Map;var YN;let JN=YN=class extends(Object(zR["b"])(F["a"])){constructor(e){super(e),this._handles=new ge["a"],this._model=new ZR,this._layers=new k_["a"],this._changeSet=new BR["a"],this._layerSyncSet=new Set}initialize(){this._set("renderView",new $N(this)),this._frameTask=this.resourceController.scheduler.registerTask(Ba["c"].STAGE,this),this._handles.add(this._frameTask)}destroy(){VR["a"].pool.prune(0),this._handles.destroy(),this.dispose()}get viewingMode(){return this.state.viewingMode}get updating(){return this._model.dirtySet.dirty||this.renderView.updating||this._frameTask.updating}add(e){this._model.add(e),Object(ww["b"])(e)&&(e.attachStage(this),this._addLayer(e)),this.renderView.requestRender()}remove(e){Object(z["j"])(e)||(this.renderView.requestRender(),this._model.remove(e),Object(ww["b"])(e)&&(this._removeLayer(e),e.detachStage()))}addMany(e){Object(z["k"])(e)&&(this._model.addMany(e),this.renderView.requestRender())}removeMany(e){Object(z["k"])(e)&&(this._model.removeMany(e),this.renderView.requestRender())}async load(e){Object(z["j"])(e)||(Array.isArray(e)||(e=[e]),await Object(_["b"])(e.filter(e=>Object(z["j"])(e.glTexture)).map(e=>this.schedule(()=>this._model.has(e)?e.load(this.renderView.renderingContext,()=>this.renderView.textureRepository.textureTechnique):null))))}loadImmediate(e){return e.load(this.renderView.renderingContext,()=>this.renderView.textureRepository.textureTechnique)}forEachOfType(e,t){this._model.forEachOfType(e,t)}handleEvent(e,t){this.destroyed||(this._model.dirtySet[e](t),this.renderView.requestRender())}get running(){return this._model.dirtySet.dirty}runTask(e){this._frameTask.processQueue(e),e.done||this._commit()}_commit(){const e=this._model.dirtySet;YN.DebugSettings.logDirtySet&&console.log("Dirty set: "+e.formatDebugInfo()),e.commit(this._changeSet),YN.DebugSettings.logDirtySet&&(console.log("RGs add: "+this._changeSet.adds.map(e=>e.id)),console.log("RGs remove: "+this._changeSet.removes.map(e=>e.id))),this._layerSyncSet.clear(),this.renderView.modify(this._changeSet),this.renderView.requestRender()}schedule(e,t){return this._frameTask.schedule(e,t)}syncLayer(e){this._layerSyncSet.add(e),this.renderView.requestRender()}processSyncLayers(){const e=this._model.dirtySet;this._layers.forAll(t=>{(this._layerSyncSet.has(t.id)||t.updatePolicy===LS["m"].SYNC)&&(e.commitLayer(t.id,this._changeSet),this._layerSyncSet.delete(t.id))});for(const t of this._layerSyncSet)e.commitLayer(t,this._changeSet);this._layerSyncSet.clear(),this.renderView.modify(this._changeSet)}getObject(e){return this._model.getObject(e)}get layers(){return this._layers}_addLayer(e){this._layers.some(t=>t===e)||this._layers.push(e)}_removeLayer(e){this._commit(),null!=this._layers.removeUnordered(e)&&(this._model.dirtySet.getResidentRenderGeometries(e.id,this._changeSet.removes),this.renderView.modify(this._changeSet))}addRenderPlugin(e,t,r){const i=this.renderView.renderPlugins.add(e,t,r),n=()=>{HT(t)&&this.sceneIntersectionHelper.addIntersectionHandler(t)};if(Object(_["o"])(i))return i.then(n);n()}removeRenderPlugin(e){HT(e)&&this.sceneIntersectionHelper.removeIntersectionHandler(e),this.renderView.renderPlugins.remove(e)}get performanceInfo(){return{renderView:this.renderView.performanceInfo,model:this._model.getStats()}}get test(){const e=this;return{getCount:t=>e._model.test.content.filter(e=>e.type===t).length,model:e._model}}};JN.DebugSettings={endFrameContentValidation:!1,logDirtySet:!1},Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"resourceController",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"options",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"state",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"sceneIntersectionHelper",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],JN.prototype,"viewingMode",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"container",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"renderSR",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"_handles",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],JN.prototype,"updating",null),Object(l["a"])([Object(j["b"])({constructOnly:!0})],JN.prototype,"_model",void 0),Object(l["a"])([Object(zR["c"])(),Object(j["b"])()],JN.prototype,"renderView",void 0),JN=YN=Object(l["a"])([Object(x["a"])("esri.views.3d.webgl-engine.Stage")],JN);var QN=r("5c33");async function KN(e,t){if("2d"===e.type)return e.hitTest(t);const r=await e.hitTest(t),i=r.results[0],n=r.results.findIndex(e=>e.distance!==i.distance);return-1!==n&&(r.results=r.results.slice(0,n)),r}let eF=class extends Kl{constructor(e){super(e),this.components=["attribution","zoom","navigation-toggle","compass"]}};Object(l["a"])([Object(j["b"])()],eF.prototype,"components",void 0),eF=Object(l["a"])([Object(x["a"])("esri.views.ui.3d.DefaultUI3D")],eF);const tF=eF,rF=v["a"].getLogger("esri.views.SceneView");let iF=class extends(je(wa(xa(Us)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new vx["a"]({slicePlane:xu["a"]},this),this._resourceController=AS(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new Aj({view:this}),this.labeler=new Tw({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new Ma,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new pd,this.environmentManager=new wf,this.extent=null,this.floors=new h["a"],this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new $u({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new jx,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new tF,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new tS,Object(ue["a"])(),e&&e.environment||(this._defaults.environment=new Zd,this.environment=this._defaults.environment);const t=(e=null)=>{Object(z["k"])(e)&&e.type===_u["a"].MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach(async e=>{try{await e.when()}catch{}this._updatingChanged()}))};this.handles.add([Object(oe["b"])(()=>{var e;return null==(e=this.map)?void 0:e.allLayers},"after-changes",e=>t(e),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),this.watch("map",e=>{e&&e.load&&e.load().catch(()=>{})})]),this.inputManager=new F_({view:this});const r=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new RT({view:this,updateDevicePixelRatio:r})}initialize(){this.groundView=new Nu({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(Object(oe["b"])(()=>{var e;return null==(e=this.map)?void 0:e.allLayers},"after-changes",e,{onListenerAdd:e,onListenerRemove:e})),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},oe["a"]),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},oe["a"]),this.updatingHandles.add(()=>this.qualitySettings.frameRate,e=>Object(xe["c"])(e>0?1e3/Math.ceil(e):0),oe["a"]),this.updatingHandles.add(()=>z_["a"].SCENEVIEW_LOCKING_LOG,e=>this.defaultsFromMap.logDebugInformation=e,oe["a"]),this.updatingHandles.add(()=>{var e;return null==(e=this.map)?void 0:e.ground},e,oe["d"]),this.updatingHandles.add(()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity},()=>this._updateDefaultHitTestOptions(),oe["d"]),this.handles.add(this.watch("spatialReference",()=>this.notifyChange("clippingArea"),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=Object(z["d"])(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=Object(z["d"])(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=Object(z["d"])(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!this._userClippingArea&&!this.get("map.clippingEnabled")||Object(z["j"])(e)?(this._clippingArea=null,null):e instanceof de["a"]?this.spatialReference&&(e=sF(e,this.spatialReference),Object(z["j"])(e))?(rF.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),Object(z["j"])(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(rF.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&Object(z["k"])(e)?rF.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===As["a"].Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return Object(z["j"])(t)||Object(z["j"])(e)||t.spatialReference.equals(e)?t:sF(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||ne["a"].WGS84,r=sF(this.clippingArea,t);Object(z["k"])(r)&&(e=Object(z["k"])(e)?e.intersection(r):r);const i=this._get("dataExtent");return Object(z["k"])(e)&&e.equals(i)?i:e}get groundAndLayersExtent(){const e=this.spatialReference||ne["a"].WGS84;let t;const r=r=>{const i=sF(r,e);Object(z["j"])(i)||(Object(z["k"])(t)?t.union(i):t=i.clone())},i=this.basemapTerrain;if(null!=i&&i.spatialReference){const e=i.groundExtent;r(new de["a"]({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:i.spatialReference}))}if(this.map){const e=e=>{!Object(z["k"])(e.fullExtent)||"graphics"===e.type&&e.internal||r(e.fullExtent)};this.map.allLayers.forEach(t=>e(t))}if(Object(z["j"])(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const n=this._get("groundAndLayersExtent");return t.equals(n)?n:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof Zd?e:e instanceof Hd?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):Zd.fromWebsceneEnvironment(e):Object(w["m"])(Zd,e):new Zd}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){Object(z["k"])(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:r}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=r){const t=r/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){Object(z["k"])(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||Object(z["k"])(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(Object(z["j"])(this.state)||this.state.stationary)}set qualityProfile(e){QT.isValidProfile(e)&&(QT.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||QT.getDefaultProfile()}set slicePlane(e){if(Object(z["k"])(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),Object(z["j"])(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");Object(xu["b"])(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Object(Su["a"])(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?Ca["a"].deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,r;if(this.destroyed)return!1;let i=0,n=this.layerViewManager.updating,a=n?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(e=>{if(e.isFulfilled()){if(e.updating){if(n=!0,e.suspended||Object(PS["j"])(e))return;++a,i+=e.updatingProgress}}else++a});for(const s of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(Object(z["k"])(s)&&s.updating){const e=.1;a+=e,i+=.5*e}for(const s of[this.deconflictor,this.labeler,this.basemapTerrain])Object(z["k"])(s)&&s.updating&&(++a,i+=s.updatingProgress);if(n=!!(n||a>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(r=t.allLayers)&&r.some(e=>!e.isFulfilled())),n?(this._numUpdating=Math.max(a,this._numUpdating),i+=this._numUpdating-a):this._numUpdating=0,this._numUpdating>0?i/=this._numUpdating:i=n?0:1,this._get("updatingProgress")!==i){const e=this._resourceController.scheduler.now;if(i<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);i=this.updatingProgress*(1-t)+i*t}this._set("updatingProgress",i),this._lastUpdateTime=n&&i<1?e:0}return n}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(Object(z["k"])(t))return Object(As["b"])(t);const r=this.spatialReference;return r?Object(z["k"])(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&r.equals(this.defaultsFromMap.spatialReference)?Object(As["b"])(this.defaultsFromMap.viewingMode):Object(qO["a"])(r,As["a"].Global)?"global":"local":"global"}set viewingMode(e){this.ready?rF.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new DS(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,r,i){const n=this.viewEvents.on(e,t,r,i);return n||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return rF.error("#toMap()","Scene view cannot be used before it is ready"),null;const r=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,i=Object(z["k"])(r.graphics)&&(Object(z["k"])(r.graphics.include)||Object(z["k"])(r.graphics.exclude)),n=ns(e)?is(this,e):e,a=Object(ce["i"])(n);r.enableDraped=r.include&&!r.include.has(mE["b"])||r.exclude&&r.exclude.has(mE["b"]);const s=this.sceneIntersectionHelper,o=Object(cb["b"])(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=i?kT["c"].ALL:kT["c"].MIN,s.intersectIntersectorScreen(a,o,r),i){for(const e of o.results.all){const t=Object(QN["a"])(e,this);if(Object(z["j"])(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(r.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return rF.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=Object(z["u"])(null==e.z&&Object(Ru["b"])(this.elevationProvider,e),0);return Object(pe["t"])(e,cF,this.renderSpatialReference,t),this.state.camera.projectToScreen(cF,lF),Object(ce["e"])(lF[0],lF[1])}pixelSizeAt(e){return this.ready?e?(Object(pe["t"])(e,cF,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(cF)):0:(rF.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return rF.error("#hitTest()","Scene view cannot be used before it is ready"),null;const r=ns(e)?is(this,e):e,i=Object(ce["f"])(r.x,r.y),n=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;n.requiresGroundFeedback=!0,n.enableDraped=!0;const a=Object(cb["b"])(this.state.viewingMode);a.options.selectionMode=!0,a.options.store=kT["c"].ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(i,a,n);const s=this._intersectResultsToHits(a.results.all,n.graphics),o=a.results.ground,c=Object(QN["b"])(o,this),l=Object(z["k"])(c)&&"type"in c&&"integrated-mesh"===c.type?c:null,u={screenPoint:r,results:s,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:Object(UT["c"])(o)?o.distanceInRenderSpace:0,layer:l}};return z_["a"].SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(u.intersector=a),Promise.resolve(u)}popupHitTest(e){return KN(this,e).then(({results:t,ground:r})=>{let i=null;return!(0===t.length||Math.abs(Object(z["u"])(t[0].distance,0)-r.distance)<1e-5)||r.layer&&"integrated-mesh"===r.layer.type||(i=r.mapPoint),{results:t,screenPoint:e,mapPoint:i}})}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(await this.whenReady(),Object(z["j"])(e.parent))throw new b["a"]("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});return"analysis"===e.parent.type?(await this.whenLayerView(e.parent)).whenAnalysisView(e):this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then(()=>{const t=Object(Jc["g"])(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Object(Jc["f"])(t,this.supersampleScreenshotsEnabled,this.padding))})}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return Bu.importLayerView(e)}hasLayerViewModule(e){return Bu.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,r,i;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=el(this.type);if(Object(E["a"])("safari")&&Object(E["a"])("safari")<9&&(e=new b["a"]("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:Object(E["a"])("safari")})),Object(z["k"])(e))throw rF.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const r=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return Object(z["k"])(r)?Object(As["c"])(r):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const r=this._predeterminedViewingMode;if(Object(z["k"])(r))return this._validateSpatialReferenceForViewingMode(e,t,r)?{constraints:this._makeSpatialReferenceConstraints(e,t,r)}:null;const i=this._validateSpatialReferenceForViewingMode(e,t,As["a"].Local),n=this._validateSpatialReferenceForViewingMode(e,t,As["a"].Global);return i||n?i&&n?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:i?{constraints:this._makeSpatialReferenceConstraints(e,t,As["a"].Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,As["a"].Global)}:null}_validateSpatialReferenceForViewingMode(e,t,r){return!!Object(qO["a"])(e,r)&&(!!Object(z["j"])(t)||!!Object(Au["d"])(t)||(!Object(Au["e"])(t)||!Object(z["j"])(Object(PS["d"])(t,e,r)))&&(!Object(Au["f"])(t)||r!==As["a"].Global))}_makeSpatialReferenceConstraints(e,t,r){if(Object(z["j"])(t))return[{spatialReference:e,viewingMode:r}];const i=e.isWebMercator,n=e.isWGS84;return Object(Au["d"])(t)&&(i||n)?n&&r!==As["a"].Local&&null!==Object(PS["a"])(t.tileInfo,t.fullExtent,e,As["a"].Global)?[{spatialReference:i?ne["a"].WGS84:ne["a"].WebMercator,viewingMode:r}]:[{spatialReference:e,viewingMode:r},{spatialReference:ne["a"].WebMercator,viewingMode:r}]:Object(Au["e"])(t)||Object(Au["f"])(t)||!i&&!n?Object(Au["e"])(t)&&i&&r!==As["a"].Global?[{spatialReference:e,viewingMode:r},{spatialReference:ne["a"].WGS84,viewingMode:As["a"].Local}]:[{spatialReference:e,viewingMode:r}]:[{spatialReference:e,viewingMode:r},{spatialReference:i?ne["a"].WGS84:ne["a"].WebMercator,viewingMode:r}]}_validateSpatialReference(e){const t=Object(z["k"])(this.getSpatialReferenceSupport({spatialReference:e})),r=this._predeterminedViewingMode;return t||(Object(z["k"])(r)?rF.warnOnce(`Spatial reference defined on view not supported in ${Object(As["b"])(r)} viewing mode.`):e.isGeographic&&rF.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}computeMapPointFromVec3d(e,t){let r=this.spatialReference||ne["a"].WGS84;return Object(pe["y"])(e,this.renderSpatialReference,e,r)||(r=ne["a"].WGS84,Object(pe["y"])(e,this.renderSpatialReference,e,r)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=r):t=new he["a"](e,r),t}trackGraphicState(e){if(!e.graphic)return rF.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let r=null,i=!1;const n=t=>{var n;!i&&Object(z["k"])(t)&&"processor"in t&&"graphics-3d"===(null==(n=t.processor)?void 0:n.type)&&t.processor.graphicsCore&&(r=t.processor.graphicsCore.trackGraphicState(e))};return Object(z["k"])(t)?n(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>n(e),()=>{}).catch(()=>{}),{remove:()=>{i=!0,Object(z["k"])(r)&&(r.remove(),r=null)}}}highlight(e){if(Array.isArray(e))return Object(Sa["a"])(e.map(e=>this.highlight(e)));if(h["a"].isCollection(e))return Object(Sa["a"])(e.toArray().map(e=>this.highlight(e)));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):Object(Sa["b"])()}maskOccludee(e){if(!e)return rF.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let r=null,i=!1;const n=t=>{!i&&Object(z["k"])(t)&&Object(Rn["d"])(t)&&(r=t.maskOccludee(e))};return Object(z["k"])(t)?n(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>n(e),()=>{}).catch(()=>{}),{remove:()=>{i=!0,Object(z["k"])(r)&&(r.remove(),r=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find(t=>t.layer===e.layer):null}graphicChanged(e){Object(z["k"])(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await Object(oe["g"])(()=>this.graphicsView),this.graphicsView;if(!e.layer||!this.map)throw new b["a"]("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,r)=>{const i=this.map.allLayers.on("change",n=>{-1!==n.added.indexOf(e.layer)&&(i.remove(),this.whenLayerView(e.layer).then(t,r))})}):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,oF.INCLUDE),r=this._externalToInternalRenderItems(e.exclude,oF.EXCLUDE);return{include:t.layerUids,exclude:r.layerUids,graphics:{include:t.graphicUids,exclude:r.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(cF)?(t=this.computeMapPointFromVec3d(cF,t),e.intersector===kT["b"].TERRAIN&&this.basemapTerrain&&(t.z=Object(z["u"])(Object(Ru["b"])(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const r=new Array;let i=null;for(let n=0;n<e.length;n++){const a=e[n],s=Object(QN["b"])(a,this);if(Object(z["k"])(s)&&(s===this.map.ground||"type"in s&&"integrated-mesh"===s.type))break;const o=Object(QN["a"])(a,this);if(!Object(z["k"])(o))continue;if(Object(z["j"])(i)&&n!==e.length-1&&(i=new Set),Object(z["k"])(i)){const e=this._getGraphicFilterUid(o);if(i.has(e))continue;i.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const c=this._intersectResultToMapPoint(a),l=a.distanceInRenderSpace;r.push({graphic:o,mapPoint:c,distance:l})}return r}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return"u-"+e.uid}_testGraphicUidFilter(e,t){const r=this._getGraphicFilterUid(t);return Object(z["j"])(e)||(Object(z["j"])(e.include)||e.include.has(r))&&(Object(z["j"])(e.exclude)||!e.exclude.has(r))}_externalToInternalRenderItems(e,t,r={layerUids:null,graphicUids:null}){if(!e)return r;if(e instanceof ie["a"])aF(r,this._getGraphicFilterUid(e)),t===oF.INCLUDE&&(Object(z["k"])(this.graphicsView)&&e.layer===this?nF(r,this.graphicsView.processor.layer.id):e.layer&&nF(r,e.layer.uid));else if(Object(se["c"])(e))for(const i of e)i===this.graphics&&Object(z["k"])(this.graphicsView)?nF(r,this.graphicsView.processor.layer.id):i instanceof N?i===this.map.ground&&nF(r,mE["b"]):this._externalToInternalRenderItems(i,t,r);else nF(r,e.uid);return r}_initBasemapTerrain(){this._set("basemapTerrain",new CR({view:this})),this._set("elevationProvider",new ZT({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new jE({view:this})),this._set("featureTiles",new yx({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=Object(z["k"])(this.basemapTerrain.extent)?Object(pe["m"])(Object(wu["B"])(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;Object(z["k"])(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add(()=>z_["a"].FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(r.e("chunk-4e3aac9c").then(r.bind(null,"8e365"))).then(({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&z_["a"].FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))}):e||!this.featureTreeDebugger||z_["a"].FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)},oe["d"]),this.updatingHandles.add(()=>this.clippingArea,e,oe["d"]),this.updatingHandles.add(()=>this.basemapTerrain.extent,e,oe["d"])],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new aS(this.map,e));const t=this.state.isGlobal,r=Object(Tu["k"])(t,e);r!==this.renderSpatialReference&&(this._set("renderCoordsHelper",fS["a"].create(this.state.viewingMode,r)),t||this.handles.add(this.watch("basemapTerrain.extent",e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!Object(pe["n"])(e,this.basemapTerrain.spatialReference,uF,t)||(this.renderCoordsHelper.extent=uF)},!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(cb["a"]/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){Object(z["k"])(e)&&e.type===_u["a"].MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],()=>this._updatingChanged(),!0)],"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const r=e.getContext("2d");return r.putImageData(t,0,0),this.overlay.renderCanvas(e),r.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new zT(this.state.viewingMode,e=>this._stage.layers.forAll(e),this);this._set("sceneIntersectionHelper",t);const r=Object(we["a"])(this.surface),{resourceController:i,state:n,renderSpatialReference:a}=this;this._stage=new JN({options:e,container:r,resourceController:i,state:n,sceneIntersectionHelper:t,renderSR:a}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=Object(Ce["c"])(this._stage.renderView.canvas,"webglcontextlost",()=>this.fatalError=new b["a"]("webgl-context-lost")),this.handles.add([this.updatingHandles.add(()=>this.qualitySettings.antialiasingEnabled,()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled}),oe["a"]),this.updatingHandles.add(()=>this.qualitySettings.highQualityTransparency,()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency}),oe["a"]),Object(oe["e"])(()=>this.magnifier,e=>this._stage.renderView.magnifier=e,oe["d"])],"stage");const s=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:tS.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add(()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference],s),"stage"),s(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(cb["a"]/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new kS({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new Dw})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await Promise.all([r.e("chunk-121d41d5"),r.e("chunk-680cbc92")]).then(r.bind(null,"3c0a"))).default;Object(_["v"])(e),await Object(oe["g"])(()=>{var e;return!0===(null==(e=this.basemapTerrain)?void 0:e.ready)},e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),Object(z["k"])(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=Object(As["c"])(this.viewingMode);if(e===As["a"].Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(Object(oe["b"])(()=>this.graphics,"after-changes",()=>this._createGraphicsViewIfNeeded()),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(mE["b"]);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(mE["b"]);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return Eu["a"].getInstance().getVoxelWasmPerSceneView(this)}};function nF(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function aF(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function sF(e,t){return Object(z["k"])(e)&&Object(pe["b"])(e.spatialReference,t)?Object(pe["m"])(e,t):null}var oF;Object(l["a"])([Object(j["b"])()],iF.prototype,"_userClippingArea",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"_resourceController",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"_stage",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"deconflictor",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"labeler",void 0),Object(l["a"])([Object(j["b"])(Object(Aa["b"])(Ma,"analyses"))],iF.prototype,"analyses",void 0),Object(l["a"])([Object(j["b"])({type:Bs,readOnly:!0,aliasOf:"state.animation"})],iF.prototype,"animation",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"basemapTerrain",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"elevationProvider",void 0),Object(l["a"])([Object(j["b"])({type:vu["a"],aliasOf:"stateManager.camera"})],iF.prototype,"camera",void 0),Object(l["a"])([Object(j["b"])({type:vu["a"],aliasOf:"stateManager.contentCamera"})],iF.prototype,"contentCamera",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"canvas",void 0),Object(l["a"])([Object(j["b"])({type:he["a"],aliasOf:"stateManager.center"})],iF.prototype,"center",void 0),Object(l["a"])([Object(j["b"])({type:de["a"]})],iF.prototype,"clippingArea",null),Object(l["a"])([Object(j["b"])({type:pd})],iF.prototype,"constraints",void 0),Object(l["a"])([Object(j["b"])({type:de["a"],readOnly:!0})],iF.prototype,"renderDataExtent",null),Object(l["a"])([Object(j["b"])({type:de["a"],readOnly:!0})],iF.prototype,"dataExtent",null),Object(l["a"])([Object(j["b"])({type:de["a"],readOnly:!0})],iF.prototype,"groundAndLayersExtent",null),Object(l["a"])([Object(j["b"])({value:null,type:Zd})],iF.prototype,"environment",null),Object(l["a"])([Object(B["a"])("environment")],iF.prototype,"castEnvironment",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"environmentManager",void 0),Object(l["a"])([Object(j["b"])({type:de["a"],aliasOf:"stateManager.extent"})],iF.prototype,"extent",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"floors",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0,aliasOf:"stateManager.screenCenter"})],iF.prototype,"screenCenter",void 0),Object(l["a"])([Object(j["b"])({type:Number})],iF.prototype,"pixelRatio",null),Object(l["a"])([Object(j["b"])({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],iF.prototype,"maximumPixelRatio",null),Object(l["a"])([Object(j["b"])({aliasOf:"stateManager.frustum"})],iF.prototype,"frustum",void 0),Object(l["a"])([Object(j["b"])({type:Number,readOnly:!0})],iF.prototype,"fullOpacity",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"graphicsView",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"analysisViewManager",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"groundView",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],iF.prototype,"initialExtentRequired",null),Object(l["a"])([Object(j["b"])()],iF.prototype,"_defaultsFromMapSettings",null),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0})],iF.prototype,"interacting",null),Object(l["a"])([Object(j["b"])()],iF.prototype,"stationary",null),Object(l["a"])([Object(j["b"])({aliasOf:"state.navigating"})],iF.prototype,"navigating",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"map",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"mapCoordsHelper",void 0),Object(l["a"])([Object(j["b"])({aliasOf:"stateManager.padding"})],iF.prototype,"padding",void 0),Object(l["a"])([Object(j["b"])({type:jE,readOnly:!0})],iF.prototype,"pointsOfInterest",void 0),Object(l["a"])([Object(j["b"])({type:yx,readOnly:!0})],iF.prototype,"featureTiles",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"featureTreeDebugger",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],iF.prototype,"screenSizePerspectiveEnabled",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],iF.prototype,"deactivatedWebGLExtensions",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],iF.prototype,"debugWebGLExtensions",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],iF.prototype,"renderCanvas",void 0),Object(l["a"])([Object(j["b"])({constructOnly:!0})],iF.prototype,"state",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"inputManager",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"stateManager",void 0),Object(l["a"])([Object(j["b"])({type:["low","medium","high"]})],iF.prototype,"qualityProfile",null),Object(l["a"])([Object(j["b"])({type:pS,get(){let e=this._get("qualitySettings");return e||(e=new pS,QT.apply(this.qualityProfile,e)),e}})],iF.prototype,"qualitySettings",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"slicePlane",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"typeSpecificPreconditionsReady",null),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"renderCoordsHelper",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"sceneIntersectionHelper",void 0),Object(l["a"])([Object(j["b"])({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],iF.prototype,"resolution",null),Object(l["a"])([Object(j["b"])({type:Number,aliasOf:"stateManager.scale"})],iF.prototype,"scale",void 0),Object(l["a"])([Object(j["b"])()],iF.prototype,"heightModelInfo",null),Object(l["a"])([Object(j["b"])()],iF.prototype,"spatialReference",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,constructOnly:!0})],iF.prototype,"alphaCompositingEnabled",void 0),Object(l["a"])([Object(j["b"])({type:Boolean})],iF.prototype,"supersampleScreenshotsEnabled",void 0),Object(l["a"])([Object(j["b"])({readOnly:!0})],iF.prototype,"type",void 0),Object(l["a"])([Object(j["b"])({type:tF})],iF.prototype,"ui",void 0),Object(l["a"])([Object(j["b"])({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],iF.prototype,"updating",null),Object(l["a"])([Object(j["b"])({type:Number,readOnly:!0,dependsOn:["updating"]})],iF.prototype,"updatingProgress",void 0),Object(l["a"])([Object(j["b"])({type:["global","local"]})],iF.prototype,"viewingMode",null),Object(l["a"])([Object(j["b"])({type:ae["a"],aliasOf:"stateManager.viewpoint"})],iF.prototype,"viewpoint",void 0),Object(l["a"])([Object(j["b"])({type:Number,aliasOf:"stateManager.zoom"})],iF.prototype,"zoom",void 0),Object(l["a"])([Object(j["b"])({type:tS})],iF.prototype,"highlightOptions",void 0),iF=Object(l["a"])([Object(x["a"])("esri.views.SceneView")],iF),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(oF||(oF={}));const cF=Object(ju["f"])(),lF=Object(ce["f"])(),uF=Object(wu["l"])(),dF=iF;var hF=r("53f8"),pF=r("ce0b"),fF=r("4dc9"),bF=(r("164a6"),"http://10.155.32.4:9080/arcgis/rest/services/nxmap/MapServer"),mF=null,gF=null,yF=null,OF=null,vF=null,_F=null,jF=null,wF=null,xF=[],TF=[],SF=[],EF=[],AF=[],CF={name:"arcgis",components:{},props:{data:{type:Object,default:function(){return{mode:"2D",title:"宁夏地图",center:[106.230909,38.487193],height:654,tilt:65,scale:128e3,rotation:0,ox:0,oy:0}}}},emits:{when:null,clickMap:null},data:function(){return{fanStateImgMapping:[{name:"待机",code:"0",img:r("e9e3")},{name:"运行",code:"1",img:r("7221")},{name:"故障",code:"2",img:r("2ab1")},{name:"离线",code:"3",img:r("6609")},{name:"检修",code:"4",img:r("af85")},{name:"限电",code:"5",img:r("dd41")},{name:"限停",code:"6",img:r("ecf2")}],syzImg:r("86f2"),markers:[],pointer:!1,teleport:!1}},methods:{worldToScreen:function(e){},screenToWorld:function(e){},oToLL:function(e,t){return{x:899e-8*e,y:1141e-8*t}},initMap:function(){var e=this;mF=new u["default"]({baseLayers:[new hF["default"]({url:bF,title:this.data.title,spatialReference:ne["a"].WGS84})],title:this.data.title,spatialReference:ne["a"].WGS84}),gF=new re({basemap:mF}),yF="3D"==this.data.mode?new dF({map:gF,center:this.data.center,camera:{position:{x:this.data.center[0],y:this.data.center[1],z:this.data.height},tilt:this.data.tilt},container:this.$el.querySelector("#viewDiv")}):new mu({map:gF,center:this.data.center,container:this.$el.querySelector("#viewDiv"),rotation:this.data.rotation}),yF.scale=this.data.scale,yF.ui._removeComponents(["attribution"]),yF.when((function(){e.when(),e.$emit("when")}))},when:function(){var e=this;this.teleport=!0,OF=new pF["a"]({graphics:[]}),vF=new pF["a"]({graphics:[]}),_F=new pF["a"]({graphics:[]}),jF=new pF["a"]({graphics:[]}),wF=new pF["a"]({graphics:[]}),gF.add(vF),gF.add(OF),gF.add(_F),gF.add(jF),gF.add(wF),yF.on("click",(function(t){yF.hitTest(t).then((function(t){var r=null;if(t.results.length){var i=["picture-marker","text"];t.results.forEach((function(e){i.indexOf(e.graphic.symbol.type)>=0&&(r=e.graphic.attributes)}))}null!=r&&e.$emit("clickMap",r)}))})),yF.on("pointer-move",(function(t){yF.hitTest(t).then((function(t){var r=null;if(t.results.length){var i=["picture-marker","text"];t.results.forEach((function(e){i.indexOf(e.graphic.symbol.type)>=0&&(r=e.graphic.attributes)}))}e.pointer=!!r}))})),yF.watch("extent",(function(t){e.markers.forEach((function(e,r){var i=AF[r],n=yF.toScreen(i.geometry);e.x=n.x-e.ox,e.y=n.y-e.oy,e.canScale&&(e.scale=.0272/t.height,t.height<.295?e.show||(e.show=!0,i.symbol=new fF["a"]({color:"transparent",outline:{color:[255,255,255],width:0}})):e.show&&(e.show=!1,i.symbol=new fF["a"]({color:[5,187,76,.75],outline:{color:[5,187,76],width:2}})))}))}))},getFanImg:function(e){var t=this.fanStateImgMapping.find((function(t){return t.name==e||t.code==e}));return t?t.img:(console.error(e,"对应的图片不存在"),"")},addHtmlPoint:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e[0]+=this.oToLL(this.data.ox,this.data.oy).x,e[1]+=this.oToLL(this.data.ox,this.data.oy).y;var a={geometry:{type:"point",spatialReference:ne["a"].WGS84,x:e[0],y:e[1]},symbol:{type:"simple-marker",color:"transparent",outline:{color:[255,255,255],width:0}},attributes:{},popupTemplate:null},s=new ie["a"](a);AF.push(s),wF.add(s);var o=yF.toScreen(s.geometry),c={slot:t,ox:r,oy:i,x:o.x-r,y:o.y-i,scale:1,canScale:n,show:!0};return this.markers.push(c),c},addImagePoint:function(e,t,r,i){var n={geometry:{type:"point",spatialReference:ne["a"].WGS84,x:e[0],y:e[1]},symbol:{type:"picture-marker",url:this.tempImg,width:r,height:i,xoffset:0,yoffset:0},attributes:{},popupTemplate:null},a=new ie["a"](n);EF.push(a),jF.add(a)},remove:function(e,t){if("html"==e){var r=this.markers.findIndex((function(e){return e.slot==t.slot}));this.markers.splice(r,1);var i=AF[r];AF.splice(r,1),wF.remove(i)}else console.info("arcgis: No type:",e)},addImgPoint:function(e){var t=JSON.parse(JSON.stringify(e));t.geometry.type="point",t.geometry.spatialReference=ne["a"].WGS84,t.geometry.x+=this.oToLL(this.data.ox,this.data.oy).x,t.geometry.y+=this.oToLL(this.data.ox,this.data.oy).y,t.symbol={type:"picture-marker",url:"升压站"==t.attributes.type?this.syzImg:this.getFanImg(t.attributes.state),width:"升压站"==t.attributes.type?"96px":"48px",height:"升压站"==t.attributes.type?"96px":"48px",xoffset:0,yoffset:18};var r=new ie["a"](t);xF.push(r),OF.add(r),this.addImgText(e)},addImgText:function(e){var t=JSON.parse(JSON.stringify(e));t.geometry.type="point",t.geometry.spatialReference=ne["a"].WGS84,t.geometry.x+=this.oToLL(this.data.ox,this.data.oy).x,t.geometry.y+=this.oToLL(this.data.ox,this.data.oy).y,t.symbol={type:"text",color:"white",haloColor:"black",haloSize:"1px",text:t.attributes.code,xoffset:0,yoffset:-10,font:{size:12,weight:"bold"}};var r=new ie["a"](t);SF.push(r),_F.add(r)},addLine:function(e){var t=this,r=JSON.parse(JSON.stringify(e));r.geometry.type="polyline",r.geometry.spatialReference=ne["a"].WGS84,r.geometry.paths.forEach((function(e){e[0]+=t.oToLL(t.data.ox,t.data.oy).x,e[1]+=t.oToLL(t.data.ox,t.data.oy).y})),r.symbol={type:"simple-line",color:"#05bb4c",width:r.attributes.width};var i=new ie["a"](r);TF.push(i),vF.add(i)},addFanByJson:function(e,t){var r=this;t.forEach((function(e){r.addLine(e)}))},goto:function(e){yF.goTo({center:e}).catch((function(e){"AbortError"!=e.name&&console.error(e)}))}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){mF=null,gF=null,yF=null,OF=null,vF=null,_F=null,jF=null,wF=null,xF=[],TF=[],SF=[],EF=[],AF=[],this.initMap()},beforeUpdate:function(){},updated:function(){}},RF=(r("74b6"),r("6b0d")),MF=r.n(RF);const PF=MF()(CF,[["render",o]]);t["a"]=PF},b2af:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var i=r("b2b2"),n=r("cc15");let a,s;function o(e){switch(e){case n["a"].WEBGL1:return c();case n["a"].WEBGL2:return l()}}function c(){return a||(a=f()),a}function l(){return s||(s=b()),s}class u{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1}}class d extends u{constructor(){super(...arguments),this.type=n["a"].WEBGL1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1}}class h extends u{constructor(){super(...arguments),this.type=n["a"].WEBGL2}}function p(e,t){if(e===n["a"].WEBGL1&&void 0===typeof WebGLRenderingContext||e===n["a"].WEBGL2&&void 0===typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let a=Object(n["b"])(r,e,{failIfMajorPerformanceCaveat:!0});if(Object(i["j"])(a)&&(a=Object(n["b"])(r,e),Object(i["k"])(a)&&(t.majorPerformanceCaveat=!0)),Object(i["j"])(a))return a;if(e===n["a"].WEBGL1){const e=a.getParameter(a.VERSION),r=null==e?void 0:e.match(/^WebGL\s+([\d.]*)/);if(r){const e=parseFloat(r[1]);t.available=e>=.94}}else t.available=!0;t.maxTextureSize=a.getParameter(a.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT);return s&&(t.supportsHighPrecisionFragment=s.precision>0),a}function f(){const e=new d,t=p(n["a"].WEBGL1,e);return Object(i["j"])(t)||(e.supportsElementIndexUint=null!==t.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==t.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==t.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==t.getExtension("OES_texture_float")),e}function b(){const e=new h,t=p(n["a"].WEBGL2,e);return Object(i["j"])(t),e}},b2b2:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return T})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return p})),r.d(t,"f",(function(){return g})),r.d(t,"g",(function(){return w})),r.d(t,"h",(function(){return _})),r.d(t,"i",(function(){return x})),r.d(t,"j",(function(){return a})),r.d(t,"k",(function(){return n})),r.d(t,"l",(function(){return s})),r.d(t,"m",(function(){return v})),r.d(t,"n",(function(){return j})),r.d(t,"o",(function(){return O})),r.d(t,"p",(function(){return i})),r.d(t,"q",(function(){return y})),r.d(t,"r",(function(){return m})),r.d(t,"s",(function(){return f})),r.d(t,"t",(function(){return c})),r.d(t,"u",(function(){return u})),r.d(t,"v",(function(){return l})),r.d(t,"w",(function(){return d}));const i=null;function n(e){return null!=e}function a(e){return null==e}function s(e){return void 0===e}function o(e,t){return n(e)?t(e):i}function c(e){return e}function l(e,t){if(a(e))throw new Error(t);return e}function u(e,t){return n(e)?e:"function"==typeof t?t():t}function d(e,t){return n(e)?e:t}function h(e){return n(e)&&e.destroy(),null}function p(e){return n(e)&&e.dispose(),null}function f(e){return n(e)&&e.remove(),null}function b(e){return n(e)&&e.abort(),null}function m(e){return n(e)&&e.release(),null}function g(e,t){return n(e)&&n(t)?e.equals(t):e===t}function y(e){return null}function O(e,t){const r=new Array;return e.forEach(e=>{const i=t(e);n(i)&&r.push(i)}),r}function v(e,t){const r=new Array;for(const i of e)r.push(j(i,null,t));return r}function _(e,t){for(const r of e)o(r,t)}function j(e,t,r){return n(e)?r(e):t}function w(e){return e.filter(e=>n(e))}function x(e,...t){let r=e;for(let i=0;i<t.length&&r;++i)r=r[t[i]];return r}function T(e){return e}},b2cd:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var i=r("1325"),n=r("2eab"),a=r("ce50"),s=r("e92d"),o=r("e041");const c=s["a"].getLogger("esri.assets");function l(e,t){return Object(n["default"])(u(e),t)}function u(e){if(!i["a"].assetsPath)throw c.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new a["a"]("assets:path-not-set","config.assetsPath is not set");return Object(o["B"])(i["a"].assetsPath,e)}},b32b:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(e){super(e),this.type=null}};Object(i["a"])([Object(a["b"])({readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=Object(i["a"])([Object(s["a"])("esri.rest.support.ColorRamp")],o);const c=o},b33e:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e,t,r){this._initialVelocity=e,this._stopVelocity=t,this._friction=r,this._duration=Math.abs(Math.log(Math.abs(this._initialVelocity)/this._stopVelocity)/Math.log(1-this._friction))}get duration(){return this._duration}isFinished(e){return e>this.duration}get friction(){return this._friction}value(e){return this.valueFromInitialVelocity(this._initialVelocity,e)}valueDelta(e,t){const r=this.value(e);return this.value(e+t)-r}valueFromInitialVelocity(e,t){t=Math.min(t,this.duration);const r=1-this.friction;return e*(r**t-1)/Math.log(r)}}},b3a9:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("6c97"),n=r("3886"),a=r("b7bd"),s=r("ee2c");function o(e,t){const r=e.vertex;switch(e.include(s["a"],t),e.attributes.add(a["a"].SIDENESS,"vec2"),t.mode===s["b"].MIXED?r.code.add(n["a"]`struct UnpackedAttributes {
  2839. vec2 sideness;
  2840. vec2 sidenessNorm;
  2841. float lineWidthPixels;
  2842. float extensionLengthPixels;
  2843. float type;
  2844. };`):r.code.add(n["a"]`struct UnpackedAttributes {
  2845. vec2 sideness;
  2846. vec2 sidenessNorm;
  2847. float lineWidthPixels;
  2848. float extensionLengthPixels;
  2849. };`),t.mode){case s["b"].MIXED:r.code.add(n["a"]`UnpackedAttributes unpackAttributes(ComponentData component) {
  2850. vec2 sidenessNorm = sideness;
  2851. vec2 sideness = sidenessNorm * 2.0 - 1.0;
  2852. float fType = component.type;
  2853. float extensionLengthPixels = component.extensionLength;
  2854. float lineWidth = component.lineWidth;
  2855. if (fType <= 0.0) {
  2856. extensionLengthPixels *= variantExtension * 2.0 - 1.0;
  2857. }
  2858. return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);
  2859. }`);break;case s["b"].SKETCH:r.code.add(n["a"]`UnpackedAttributes unpackAttributes(ComponentData component) {
  2860. vec2 sidenessNorm = sideness;
  2861. vec2 sideness = sidenessNorm * 2.0 - 1.0;
  2862. float extensionLengthPixels = component.extensionLength;
  2863. extensionLengthPixels *= variantExtension * 2.0 - 1.0;
  2864. float lineWidth = component.lineWidth;
  2865. return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);
  2866. }`);break;case s["b"].SOLID:r.code.add(n["a"]`UnpackedAttributes unpackAttributes(ComponentData component) {
  2867. vec2 sidenessNorm = sideness;
  2868. vec2 sideness = sidenessNorm * 2.0 - 1.0;
  2869. float extensionLengthPixels = component.extensionLength;
  2870. float lineWidth = component.lineWidth;
  2871. return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);
  2872. }`);break;case s["b"].COUNT:break;default:Object(i["a"])(t.mode)}}},b3b6:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return l}));var i=r("9d1d");const n=/\{([^\}]+)\}/g;function a(e){return null==e?"":e}function s(e,t){return e.replace(n,"object"==typeof t?(e,r)=>a(Object(i["b"])(r,t)):(e,r)=>a(t(r)))}function o(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,e=>t&&-1!==t.indexOf(e)?e:"\\"+e)}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},b418:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("6d5b"),n=r("3626"),a=r("3886");function s(e,t){e.include(i["a"],t),e.fragment.include(n["a"]);const r=e.fragment;r.uniforms.add("baseColor","vec4"),r.uniforms.add("objectOpacity","float"),t.attributeColor?r.code.add(a["a"]`vec3 _baseColor() {
  2873. return baseColor.rgb * vColor.rgb;
  2874. }
  2875. float _baseOpacity() {
  2876. return baseColor.a * vColor.a;
  2877. }`):r.code.add(a["a"]`vec3 _baseColor() {
  2878. return baseColor.rgb;
  2879. }
  2880. float _baseOpacity() {
  2881. return baseColor.a;
  2882. }`),r.code.add(a["a"]`vec4 computeMaterialColor(vec4 textureColor, vec4 externalColor, int externalColorMixMode) {
  2883. vec3 baseColor = _baseColor();
  2884. float baseOpacity = _baseOpacity();
  2885. vec3 color = mixExternalColor(
  2886. baseColor,
  2887. textureColor.rgb,
  2888. externalColor.rgb,
  2889. externalColorMixMode
  2890. );
  2891. float opacity = objectOpacity * mixExternalOpacity(
  2892. baseOpacity,
  2893. textureColor.a,
  2894. externalColor.a,
  2895. externalColorMixMode
  2896. );
  2897. return vec4(color, opacity);
  2898. }`)}},b423:function(e,t,r){"use strict";r.d(t,"a",(function(){return M}));var i,n=r("a4ee"),a=r("1fd7"),s=r("fa8a"),o=r("7ffa"),c=r("e92d"),l=r("b2b2"),u=r("59b2"),d=r("1a3e"),h=r("448d"),p=r("afcf"),f=r("d386"),b=r("09db"),m=r("cea0"),g=r("c1da"),y=r("667b"),O=r("be4d"),v=r("f11b"),_=r("82e4"),j=r("d611"),w=r("82fa");const x=c["a"].getLogger("esri.renderers.ClassBreaksRenderer"),T="log",S="percent-of-total",E="field",A=new s["a"]({esriNormalizeByLog:T,esriNormalizeByPercentOfTotal:S,esriNormalizeByField:E}),C=Object(m["m"])(v["a"]);let R=i=class extends(Object(O["a"])(y["a"])){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,t,r){if(!Array.isArray(e))return;let i=t.minValue;return e.map(e=>{const t=new v["a"];return t.read(e,r),null==t.minValue&&(t.minValue=i),null==t.maxValue&&(t.maxValue=t.minValue),i=t.maxValue,t})}writeClassBreakInfos(e,t,r,i){const n=e.map(e=>e.write({},i));this._areClassBreaksConsecutive()&&n.forEach(e=>delete e.classMinValue),t[r]=n}castField(e){return null==e?e:"function"==typeof e?(x.error(".field: field must be a string value"),null):Object(m["l"])(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&E||r&&S||null,t&&r&&x.warn("warning: both normalizationField and normalizationTotal are set!")):e!==E&&e!==S||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,t,r){let i=null;i="number"==typeof e?new v["a"]({minValue:e,maxValue:t,symbol:Object(a["a"])(r)}):C(Object(o["a"])(e)),this.classBreakInfos.push(i),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,t){const r=this.classBreakInfos.length;for(let i=0;i<r;i++){const r=[this.classBreakInfos[i].minValue,this.classBreakInfos[i].maxValue];if(r[0]===e&&r[1]===t){this.classBreakInfos.splice(i,1);break}}}getBreakIndex(e,t){return this.valueExpression&&(Object(l["j"])(t)||Object(l["j"])(t.arcade))&&x.warn(""),this.valueExpression?this._getBreakIndexForExpression(e,t):this._getBreakIndexForField(e)}async getClassBreakInfo(e,t){let r=t;this.valueExpression&&(Object(l["j"])(t)||Object(l["j"])(t.arcade))&&(r={...r,arcade:await Object(w["e"])()});const i=this.getBreakIndex(e,r);return-1!==i?this.classBreakInfos[i]:null}getSymbol(e,t){if(this.valueExpression&&(Object(l["j"])(t)||Object(l["j"])(t.arcade)))return void x.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const r=this.getBreakIndex(e,t);return r>-1?this.classBreakInfos[r].symbol:this.defaultSymbol}async getSymbolAsync(e,t){let r=t;if(this.valueExpression&&(Object(l["j"])(t)||Object(l["j"])(t.arcade))){const e=await Object(w["e"])(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),r={...r,arcade:e}}const i=this.getBreakIndex(e,r);return i>-1?this.classBreakInfos[i].symbol:this.defaultSymbol}getSymbols(){const e=[];return this.classBreakInfos.forEach(t=>{t.symbol&&e.push(t.symbol)}),this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),r=`${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;return`${e}.${t}.${this.classBreakInfos.reduce((e,t)=>e+t.getMeshHash(),"")}.${r}.${this.field}.${this.valueExpression}`}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){return new i({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:Object(o["a"])(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:Object(o["a"])(this.visualVariables),legendOptions:Object(o["a"])(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}async collectRequiredFields(e,t){const r=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(r)}async collectSymbolFields(e,t){const r=[...this.getSymbols().map(r=>r.collectRequiredFields(e,t)),Object(g["a"])(e,t,this.valueExpression)];Object(g["d"])(e,t,this.field),Object(g["d"])(e,t,this.normalizationField),await Promise.all(r)}_getBreakIndexForExpression(e,t){const{viewingMode:r,scale:i,spatialReference:n,arcade:a}=Object(l["u"])(t,{});let s=this._compiledValueExpression.valueExpression===this.valueExpression?this._compiledValueExpression.compiledFunction:null;const o=Object(l["t"])(a).arcadeUtils;if(!s){const e=o.createSyntaxTree(this.valueExpression);s=o.createFunction(e),this._compiledValueExpression.compiledFunction=s}this._compiledValueExpression.valueExpression=this.valueExpression;const c=o.executeFunction(s,o.createExecContext(e,o.getViewInfo({viewingMode:r,scale:i,spatialReference:n})));return this._getBreakIndexfromInfos(c)}_getBreakIndexForField(e){const t=this.field,r=e.attributes,i=this.normalizationType;let n=parseFloat(r[t]);if(i){const e=this.normalizationTotal,t=parseFloat(r[this.normalizationField]);if(i===T)n=Math.log(n)*Math.LOG10E;else if(i!==S||isNaN(e)){if(i===E&&!isNaN(t)){if(isNaN(n)||isNaN(t))return-1;n/=t}}else n=n/e*100}return this._getBreakIndexfromInfos(n)}_getBreakIndexfromInfos(e){const t=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(let r=0;r<this.classBreakInfos.length;r++){const i=[this.classBreakInfos[r].minValue,this.classBreakInfos[r].maxValue];if(i[0]<=e&&(t?e<=i[1]:e<i[1]))return r}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,t=e.length;for(let r=1;r<t;r++)if(e[r-1].maxValue!==e[r].minValue)return!1;return!0}};Object(n["a"])([Object(u["b"])(_["a"])],R.prototype,"backgroundFillSymbol",void 0),Object(n["a"])([Object(u["b"])({type:[v["a"]]})],R.prototype,"classBreakInfos",void 0),Object(n["a"])([Object(p["a"])("classBreakInfos")],R.prototype,"readClassBreakInfos",null),Object(n["a"])([Object(b["a"])("classBreakInfos")],R.prototype,"writeClassBreakInfos",null),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],R.prototype,"defaultLabel",void 0),Object(n["a"])([Object(u["b"])(_["b"])],R.prototype,"defaultSymbol",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],R.prototype,"field",void 0),Object(n["a"])([Object(d["a"])("field")],R.prototype,"castField",null),Object(n["a"])([Object(u["b"])({type:Boolean})],R.prototype,"isMaxInclusive",void 0),Object(n["a"])([Object(u["b"])({type:j["a"],json:{write:!0}})],R.prototype,"legendOptions",void 0),Object(n["a"])([Object(u["b"])({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],R.prototype,"minValue",null),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],R.prototype,"normalizationField",void 0),Object(n["a"])([Object(u["b"])({type:Number,cast:e=>Object(m["i"])(e),json:{write:!0}})],R.prototype,"normalizationTotal",void 0),Object(n["a"])([Object(u["b"])({type:A.apiValues,value:null,json:{type:A.jsonValues,read:A.read,write:A.write}})],R.prototype,"normalizationType",null),Object(n["a"])([Object(h["a"])({classBreaks:"class-breaks"})],R.prototype,"type",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],R.prototype,"valueExpression",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],R.prototype,"valueExpressionTitle",void 0),R=i=Object(n["a"])([Object(f["a"])("esri.renderers.ClassBreaksRenderer")],R);const M=R},b48d:function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var i,n=r("a4ee"),a=r("9ef0"),s=r("7ffa"),o=r("4adc"),c=r("cea0"),l=r("448d"),u=r("59b2"),d=r("d386"),h=r("c1da"),p=r("667b"),f=r("be4d"),b=r("6a0ed"),m=r("e92d"),g=(r("b50f"),r("c120"),r("1a3e"));const y=m["a"].getLogger("esri.renderers.support.AttributeColorInfo");let O=i=class extends b["a"]{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(y.error(".field: field must be a string value"),null):Object(c["l"])(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new i({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};Object(n["a"])([Object(u["b"])({type:a["a"],json:{type:[Number],write:!0}})],O.prototype,"color",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],O.prototype,"field",void 0),Object(n["a"])([Object(g["a"])("field")],O.prototype,"castField",null),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],O.prototype,"label",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],O.prototype,"valueExpression",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],O.prototype,"valueExpressionTitle",void 0),O=i=Object(n["a"])([Object(d["a"])("esri.renderers.support.AttributeColorInfo")],O);const v=O;var _;let j=_=class extends b["a"]{constructor(){super(...arguments),this.unit=null}clone(){return new _({unit:this.unit})}};Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],j.prototype,"unit",void 0),j=_=Object(n["a"])([Object(d["a"])("esri.renderers.support.DotDensityLegendOptions")],j);const w=j;var x,T=r("0d76"),S=r("db52");let E=x=class extends(Object(f["a"])(p["a"])){constructor(e){super(e),this.attributes=null,this.backgroundColor=new a["a"]([0,0,0,0]),this.blendDots=!0,this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new S["a"],this.dotValue=null,this.referenceDotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new T["a"]({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes&&this.attributes.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new x({attributes:Object(s["a"])(this.attributes),backgroundColor:Object(s["a"])(this.backgroundColor),dotBlendingEnabled:Object(s["a"])(this.dotBlendingEnabled),dotShape:Object(s["a"])(this.dotShape),dotSize:Object(s["a"])(this.dotSize),dotValue:Object(s["a"])(this.dotValue),legendOptions:Object(s["a"])(this.legendOptions),outline:Object(s["a"])(this.outline),referenceScale:Object(s["a"])(this.referenceScale),visualVariables:Object(s["a"])(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){return`${this.attributes.map(e=>e.field||e.valueExpression||"")}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const r of this.attributes)r.valueExpression&&await Object(h["a"])(e,t,r.valueExpression),r.field&&e.add(r.field)}};Object(n["a"])([Object(u["b"])({type:[v],json:{write:!0}})],E.prototype,"attributes",void 0),Object(n["a"])([Object(u["b"])({type:a["a"],json:{write:!0}})],E.prototype,"backgroundColor",void 0),Object(n["a"])([Object(u["b"])({type:Boolean}),Object(o["a"])("dotBlendingEnabled")],E.prototype,"blendDots",void 0),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0}})],E.prototype,"dotBlendingEnabled",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!1}})],E.prototype,"dotShape",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1}}}})],E.prototype,"dotSize",void 0),Object(n["a"])([Object(u["b"])({type:w,json:{write:!0}})],E.prototype,"legendOptions",void 0),Object(n["a"])([Object(u["b"])({type:S["a"],json:{default:null,write:!0}})],E.prototype,"outline",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0}})],E.prototype,"dotValue",void 0),Object(n["a"])([Object(u["b"])({type:Number}),Object(o["a"])("dotValue")],E.prototype,"referenceDotValue",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0}})],E.prototype,"referenceScale",void 0),Object(n["a"])([Object(u["b"])({type:Number,json:{write:!0}})],E.prototype,"seed",void 0),Object(n["a"])([Object(l["a"])({dotDensity:"dot-density"})],E.prototype,"type",void 0),E=x=Object(n["a"])([Object(d["a"])("esri.renderers.DotDensityRenderer")],E);const A=E},b49d:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return o}));var i=r("b09a"),n=r("3886"),a=r("b7bd");function s(e,t){e.attributes.add(a["a"].FEATUREVALUE,"vec4"),e.vertex.code.add(n["a"]`bool isCapVertex() {
  2899. return featureValue.w == 1.0;
  2900. }`),e.vertex.uniforms.add("size","vec3"),t.vvSize?(e.vertex.uniforms.add("vvSizeMinSize","vec3"),e.vertex.uniforms.add("vvSizeMaxSize","vec3"),e.vertex.uniforms.add("vvSizeOffset","vec3"),e.vertex.uniforms.add("vvSizeFactor","vec3"),e.vertex.code.add(n["a"]`vec2 getSize() {
  2901. return size.xy*clamp(vvSizeOffset + featureValue.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
  2902. }`)):e.vertex.code.add(n["a"]`vec2 getSize(){
  2903. return size.xy;
  2904. }`),t.vvOpacity?(e.vertex.constants.add("vvOpacityNumber","int",8),e.vertex.code.add(n["a"]`uniform float vvOpacityValues[vvOpacityNumber];
  2905. uniform float vvOpacityOpacities[vvOpacityNumber];
  2906. vec4 applyOpacity(vec4 color) {
  2907. float value = featureValue.z;
  2908. if (value <= vvOpacityValues[0]) {
  2909. return vec4( color.xyz, vvOpacityOpacities[0]);
  2910. }
  2911. for (int i = 1; i < vvOpacityNumber; ++i) {
  2912. if (vvOpacityValues[i] >= value) {
  2913. float f = (value - vvOpacityValues[i-1]) / (vvOpacityValues[i] - vvOpacityValues[i-1]);
  2914. return vec4( color.xyz, mix(vvOpacityOpacities[i-1], vvOpacityOpacities[i], f));
  2915. }
  2916. }
  2917. return vec4( color.xyz, vvOpacityOpacities[vvOpacityNumber - 1]);
  2918. }`)):e.vertex.code.add(n["a"]`vec4 applyOpacity(vec4 color){
  2919. return color;
  2920. }`),t.vvColor?(e.vertex.constants.add("vvColorNumber","int",8),e.vertex.code.add(n["a"]`uniform float vvColorValues[vvColorNumber];
  2921. uniform vec4 vvColorColors[vvColorNumber];
  2922. vec4 getColor() {
  2923. float value = featureValue.y;
  2924. if (value <= vvColorValues[0]) {
  2925. return applyOpacity(vvColorColors[0]);
  2926. }
  2927. for (int i = 1; i < vvColorNumber; ++i) {
  2928. if (vvColorValues[i] >= value) {
  2929. float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);
  2930. return applyOpacity(mix(vvColorColors[i-1], vvColorColors[i], f));
  2931. }
  2932. }
  2933. return applyOpacity(vvColorColors[vvColorNumber - 1]);
  2934. }`)):e.vertex.code.add(n["a"]`vec4 getColor(){
  2935. return applyOpacity(vec4(1, 1, 1, 1));
  2936. }`),e.include(i["a"]),e.attributes.add(a["a"].PROFILERIGHT,"vec4"),e.attributes.add(a["a"].PROFILEUP,"vec4"),e.attributes.add(a["a"].PROFILEVERTEXANDNORMAL,"vec4"),e.vertex.code.add(n["a"]`vec3 calculateVPos() {
  2937. vec2 size = getSize();
  2938. vec3 origin = position;
  2939. vec3 right = profileRight.xyz;
  2940. vec3 up = profileUp.xyz;
  2941. vec3 forward = cross(up, right);
  2942. vec2 profileVertex = profileVertexAndNormal.xy * size;
  2943. vec2 profileNormal = profileVertexAndNormal.zw;
  2944. float positionOffsetAlongProfilePlaneNormal = 0.0;
  2945. float normalOffsetAlongProfilePlaneNormal = 0.0;`),e.vertex.code.add(n["a"]`if(!isCapVertex()) {
  2946. vec2 rotationRight = vec2(profileRight.w, profileUp.w);
  2947. float maxDistance = length(rotationRight);`),e.vertex.code.add(n["a"]`rotationRight = maxDistance > 0.0 ? normalize(rotationRight) : vec2(0, 0);
  2948. float rx = dot(profileVertex, rotationRight);
  2949. if (abs(rx) > maxDistance) {
  2950. vec2 rotationUp = vec2(-rotationRight.y, rotationRight.x);
  2951. float ry = dot(profileVertex, rotationUp);
  2952. profileVertex = rotationRight * maxDistance * sign(rx) + rotationUp * ry;
  2953. }
  2954. }else{
  2955. positionOffsetAlongProfilePlaneNormal = profileRight.w * size[0];
  2956. normalOffsetAlongProfilePlaneNormal = profileUp.w;
  2957. }
  2958. vec3 offset = right * profileVertex.x + up * profileVertex.y + forward * positionOffsetAlongProfilePlaneNormal;
  2959. return origin + offset;
  2960. }`),e.vertex.code.add(n["a"]`vec3 localNormal() {
  2961. vec3 right = profileRight.xyz;
  2962. vec3 up = profileUp.xyz;
  2963. vec3 forward = cross(up, right);
  2964. vec2 profileNormal = profileVertexAndNormal.zw;
  2965. vec3 normal = right * profileNormal.x + up * profileNormal.y;
  2966. if(isCapVertex()) {
  2967. normal += forward * profileUp.w;
  2968. }
  2969. return normal;
  2970. }`)}function o(e,t){t.vvSizeEnabled&&(e.setUniform3fv("vvSizeMinSize",t.vvSizeMinSize),e.setUniform3fv("vvSizeMaxSize",t.vvSizeMaxSize),e.setUniform3fv("vvSizeOffset",t.vvSizeOffset),e.setUniform3fv("vvSizeFactor",t.vvSizeFactor)),t.vvColorEnabled&&(e.setUniform1fv("vvColorValues",t.vvColorValues),e.setUniform4fv("vvColorColors",t.vvColorColors)),t.vvOpacityEnabled&&(e.setUniform1fv("vvOpacityValues",t.vvOpacityValues),e.setUniform1fv("vvOpacityOpacities",t.vvOpacityOpacities))}},b4c2:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.vertex.code.add(i["a"]`vec3 applySkirts(inout vec2 uv, vec3 vpos, vec3 vnormal, float skirtScale) {
  2971. float skirtLength = 0.0;
  2972. if (uv.x >= 2.0) {
  2973. skirtLength = uv.y * skirtScale;
  2974. vec2 x = vec2(uv.x) - vec2(3.5, 4.5);
  2975. uv = clamp(vec2(1.5) - abs(x), vec2(0.0), vec2(1.0));
  2976. }
  2977. return vpos - vnormal * skirtLength;
  2978. }`)}},b4c8:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("dae5"),n=r("47f8");const a={vvSizeEnabled:!1,vvSizeMinSize:Object(n["d"])(1,1,1),vvSizeMaxSize:Object(n["d"])(100,100,100),vvSizeOffset:Object(n["d"])(0,0,0),vvSizeFactor:Object(n["d"])(1,1,1),vvSizeValue:Object(n["d"])(1,1,1),vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvOpacityEnabled:!1,vvOpacityValues:[0,0,0,0,0,0,0,0],vvOpacityOpacities:[1,1,1,1,1,1,1,1],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:Object(i["b"])()}},b50f:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return f})),r.d(t,"g",(function(){return g})),r.d(t,"h",(function(){return c})),r.d(t,"i",(function(){return h})),r.d(t,"j",(function(){return x})),r.d(t,"k",(function(){return y})),r.d(t,"l",(function(){return v})),r.d(t,"m",(function(){return j})),r.d(t,"n",(function(){return l})),r.d(t,"o",(function(){return a}));var i=r("b2b2"),n=r("880d");function a(e,t){return t?e.filter((e,r,i)=>i.findIndex(t.bind(null,e))===r):e.filter((e,t,r)=>r.indexOf(e)===t)}function s(e,t,r){if(Object(i["j"])(e)&&Object(i["j"])(t))return!0;if(Object(i["j"])(e)||Object(i["j"])(t)||e.length!==t.length)return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function o(e,t,r){let i,n;return r?(i=t.filter(t=>!e.some(e=>r(e,t))),n=e.filter(e=>!t.some(t=>r(t,e)))):(i=t.filter(t=>!e.includes(t)),n=e.filter(e=>!t.includes(e))),{added:i,removed:n}}function c(e){return e&&"number"==typeof e.length}function l(e,t){const r=e.length;if(0===r)return[];const i=[];for(let n=0;n<r;n+=t)i.push(e.slice(n,n+t));return i}const u=!!Array.prototype.fill;function d(e,t){if(u)return new Array(e).fill(t);const r=new Array(e);for(let i=0;i<e;i++)r[i]=t;return r}function h(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let i=e;i<t;i++)r[i-e]=i;return r}function p(e,t,r){const i=e.length;let n=0,a=i-1;for(;n<a;){const r=n+Math.floor((a-n)/2);t>e[r]?n=r+1:a=r}const s=e[n];return r?t>=e[i-1]?-1:s===t?n:n-1:s===t?n:-1}function f(e){return e.reduce((e,t)=>e.concat(t||[]),[])}class b{constructor(){this.last=0}}const m=new b;function g(e,t,r,i){i=i||m;const n=Math.max(0,i.last-10);for(let s=n;s<r;++s)if(e[s]===t)return i.last=s,s;const a=Math.min(n,r);for(let s=0;s<a;++s)if(e[s]===t)return i.last=s,s;return-1}function y(e,t,r,i){const n=null==r?e.length:r,a=g(e,t,n,i);if(-1!==a)return e[a]=e[n-1],null==r&&e.pop(),t}const O=new Set;function v(e,t,r=e.length,i=t.length,n,a){if(0===i||0===r)return r;O.clear();for(let o=0;o<i;++o)O.add(t[o]);n=n||m;const s=Math.max(0,n.last-10);for(let o=s;o<r;++o)if(O.has(e[o])&&(a&&a.push(e[o]),O.delete(e[o]),e[o]=e[r-1],--r,--o,0===O.size||0===r))return O.clear(),r;for(let o=0;o<s;++o)if(O.has(e[o])&&(a&&a.push(e[o]),O.delete(e[o]),e[o]=e[r-1],--r,--o,0===O.size||0===r))return O.clear(),r;return O.clear(),r}function _(e){return e?(w.seed=e,()=>w.getFloat()):Math.random}function j(e,t){const r=_(t);for(let i=e.length-1;i>0;i--){const t=Math.floor(r()*(i+1)),n=e[i];e[i]=e[t],e[t]=n}return e}const w=new n["a"];function x(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}},b541:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("b2b2"),n=r("f4cc"),a=r("8ca7"),s=r("5815");class o{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class c{constructor(e){this._deferreds=new Map,this._controllers=new Map,this._processingItems=new Map,this._isPaused=!1,this._schedule=null,this._task=null,this.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new a["a"](e.peeker),this.process=e.process;const t=e.scheduler;e.priority&&Object(i["k"])(t)&&(this._task=t.registerTask(e.priority,this))}destroy(){this.clear(),this._schedule&&(this._schedule.remove(),this._schedule=null),this._task&&(this._task.remove(),this._task=null)}get length(){return this._processingItems.size+this._queue.length}abort(e){const t=this._controllers.get(e);t&&t.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach(t=>e.push(t)),this._controllers.clear(),e.forEach(e=>e.abort()),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}get(e){const t=this._deferreds.get(e);return t?t.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._isPaused||(this._isPaused=!0,this._cancelNext())}push(e,t){const r=this.get(e);if(r)return r;const a=new AbortController;let s=null;t&&(s=Object(n["q"])(t,()=>a.abort()));const o=()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),c(),u.reject(Object(n["e"])())},c=()=>{l.remove(),Object(i["k"])(s)&&s.remove(),this._deferreds.delete(e),this._controllers.delete(e),this._queue.remove(e),this._processingItems.delete(e),this._scheduleNext()},l=Object(n["r"])(a.signal,o),u=Object(n["f"])();return this._deferreds.set(e,u),this._controllers.set(e,a),u.promise.then(c,c),this._queue.push(e),this._scheduleNext(),u.promise}last(){return this._queue.last()}peek(){return this._queue.peek()}popLast(){return this._queue.popLast()}reset(){const e=[];this._processingItems.forEach(t=>e.push(t)),this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._isPaused&&(this._isPaused=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}get running(){return!this._isPaused&&this._queue.length>0&&this._processingItems.size<this.concurrency}runTask(e){for(;!e.done&&this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop()),e.madeProgress()}_scheduleNext(){this._task||this._isPaused||this._schedule||(this._schedule=Object(s["b"])(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(Object(i["j"])(e))return;let t;const r=new AbortController,a=new o(e,r);this._processingItems.set(e,a);try{t=this.process(e,r.signal)}catch(s){this._processError(a,s)}Object(n["o"])(t)?(a.promise=t,t.then(e=>this._processResult(a,e),e=>this._processError(a,e))):this._processResult(a,t)}get test(){return{update:e=>this.runTask(e)}}}},b566:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.OCCLUDED=0]="OCCLUDED",e[e.NOTOCCLUDED=1]="NOTOCCLUDED",e[e.BOTH=2]="BOTH",e[e.COUNT=3]="COUNT"}(i||(i={}))},b5a9:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=(r("e92d"),r("cea0"),r("b50f"),r("c120"),r("2dd4"),r("448d")),s=r("d386"),o=r("4338");let c=i=class extends o["a"]{constructor(e){super(e),this.type="inherited"}clone(){return new i}};Object(n["a"])([Object(a["a"])({inherited:"inherited"})],c.prototype,"type",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.layers.support.InheritedDomain")],c);const l=c},b616:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("8a44"),n=r("e431"),a=r("0b2d"),s=r("1153");class o{constructor(e,t,r,i){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.indices=r,this.position=i,this.center=Object(a["f"])(),Object(s["a"])(e.length>=1),Object(s["a"])(r.length%this._numIndexPerPrimitive==0),Object(s["a"])(r.length>=e.length*this._numIndexPerPrimitive),Object(s["a"])(3===i.size||4===i.size);const{data:o,size:l}=i,u=e.length;let d=l*r[this._numIndexPerPrimitive*e[0]];c.clear(),c.push(d),this.bbMin=Object(a["h"])(o[d],o[d+1],o[d+2]),this.bbMax=Object(a["d"])(this.bbMin);for(let n=0;n<u;++n){const t=this._numIndexPerPrimitive*e[n];for(let e=0;e<this._numIndexPerPrimitive;++e){d=l*r[t+e],c.push(d);let i=o[d];this.bbMin[0]=Math.min(i,this.bbMin[0]),this.bbMax[0]=Math.max(i,this.bbMax[0]),i=o[d+1],this.bbMin[1]=Math.min(i,this.bbMin[1]),this.bbMax[1]=Math.max(i,this.bbMax[1]),i=o[d+2],this.bbMin[2]=Math.min(i,this.bbMin[2]),this.bbMax[2]=Math.max(i,this.bbMax[2])}}Object(n["k"])(this.center,this.bbMin,this.bbMax,.5),this.radius=.5*Math.max(Math.max(this.bbMax[0]-this.bbMin[0],this.bbMax[1]-this.bbMin[1]),this.bbMax[2]-this.bbMin[2]);let h=this.radius*this.radius;for(let n=0;n<c.length;++n){d=c.getItemAt(n);const e=o[d]-this.center[0],t=o[d+1]-this.center[1],r=o[d+2]-this.center[2],i=e*e+t*t+r*r;if(i<=h)continue;const a=Math.sqrt(i),s=.5*(a-this.radius);this.radius=this.radius+s,h=this.radius*this.radius;const l=s/a;this.center[0]+=e*l,this.center[1]+=t*l,this.center[2]+=r*l}c.clear()}getCenter(){return this.center}getBSRadius(){return this.radius}getBBMin(){return this.bbMin}getBBMax(){return this.bbMax}getChildren(){if(this._children)return this._children;if(Object(n["n"])(this.bbMin,this.bbMax)>1){const e=Object(n["k"])(Object(a["f"])(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let n=0;n<8;++n)i[n]=0;const{data:s,size:c}=this.position;for(let n=0;n<t;++n){let t=0;const a=this._numIndexPerPrimitive*this.primitiveIndices[n];let o=c*this.indices[a],l=s[o],u=s[o+1],d=s[o+2];for(let e=1;e<this._numIndexPerPrimitive;++e){o=c*this.indices[a+e];const t=s[o],r=s[o+1],i=s[o+2];t<l&&(l=t),r<u&&(u=r),i<d&&(d=i)}l<e[0]&&(t|=1),u<e[1]&&(t|=2),d<e[2]&&(t|=4),r[n]=t,++i[t]}let l=0;for(let n=0;n<8;++n)i[n]>0&&++l;if(l<2)return;const u=new Array(8);for(let n=0;n<8;++n)u[n]=i[n]>0?new Uint32Array(i[n]):void 0;for(let n=0;n<8;++n)i[n]=0;for(let n=0;n<t;++n){const e=r[n];u[e][i[e]++]=this.primitiveIndices[n]}this._children=new Array(8);for(let n=0;n<8;++n)void 0!==u[n]&&(this._children[n]=new o(u[n],this._numIndexPerPrimitive,this.indices,this.position))}return this._children}static prune(){c.prune()}}const c=new i["a"]({deallocator:null})},b623:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return l}));var i=r("b2b2"),n=r("d791"),a=r("afe1"),s=r("1153"),o=r("9cc4");function c(e,t){return Object(i["j"])(e)&&(e=[]),e.push(t),e}function l(e,t){if(Object(i["j"])(e))return null;const r=e.filter(e=>e!==t);return 0===r.length?null:r}function u(e){return!!Object(i["k"])(e)&&!e.visible}function d(e,t,r){const a=e.origin.vec3;Object(s["l"])(b,-a[0],-a[1],-a[2]),Object(i["k"])(e.transformation)?Object(n["n"])(t,b,e.transformation):Object(n["d"])(t,b),r&&(Object(n["b"])(r,t),Object(n["u"])(r,r))}function h(e,t,r,i,n){p[0]=e.get(t,0),p[1]=e.get(t,1),p[2]=e.get(t,2),Object(o["a"])(p,f,3),r.set(n,0,f[0]),i.set(n,0,f[1]),r.set(n,1,f[2]),i.set(n,1,f[3]),r.set(n,2,f[4]),i.set(n,2,f[5])}const p=new Float64Array(3),f=new Float32Array(6),b=Object(a["d"])()},b691:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var i=r("2aad"),n=r("ebd5"),a=r("3886"),s=r("690a"),o=r("b7c2"),c=r("77f2");function l(e){const t=new s["a"],{mode:r}=e;return t.include(i["a"]),t.include(n["a"],{alphaDiscardMode:o["a"].Blend}),t.fragment.uniforms.add("densityMap","sampler2D"),t.fragment.uniforms.add("tex","sampler2D"),t.fragment.uniforms.add("densityNormalizer","float"),t.fragment.uniforms.add("minDensity","float"),r===c["a"].KernelDensity&&t.fragment.uniforms.add("densityMultiplier","float"),t.fragment.code.add(a["a"]`
  2979. void main() {
  2980. float density = texture2D(densityMap, uv).r${r===c["a"].KernelDensity?a["a"]` * densityMultiplier`:""};
  2981. float densityRatio = (density - minDensity) * densityNormalizer;
  2982. vec4 color = texture2D(tex, vec2(clamp(densityRatio, 0.0, 1.0), 0.5));
  2983. discardOrAdjustAlpha(color);
  2984. gl_FragColor = color;
  2985. }
  2986. `),t}const u=Object.freeze({__proto__:null,build:l,get HeatmapMode(){return c["a"]}})},b724:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("fc29"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("0224");let l=i=class extends a["a"]{constructor(){super(...arguments),this.portal=null}clone(){return new i({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}};Object(n["a"])([Object(s["b"])({type:String})],l.prototype,"name",void 0),Object(n["a"])([Object(s["b"])({type:String})],l.prototype,"styleUrl",void 0),Object(n["a"])([Object(s["b"])({type:String})],l.prototype,"styleName",void 0),Object(n["a"])([Object(s["b"])({type:c["a"]})],l.prototype,"portal",void 0),l=i=Object(n["a"])([Object(o["a"])("esri.symbols.support.StyleOrigin")],l);const u=l},b742:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var i,n=r("a4ee"),a=(r("e06a"),r("6a0ed")),s=r("7ffa"),o=r("59b2"),c=r("cea0"),l=r("d386"),u=r("09db"),d=r("624c"),h=r("5996");let p=i=class extends a["a"]{constructor(e){super(e),this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i(Object(s["a"])({dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};Object(n["a"])([Object(o["b"])({type:d["a"],json:{write:!0}})],p.prototype,"dynamicDataSource",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],p.prototype,"geometryPrecision",void 0),Object(n["a"])([Object(o["b"])({type:Date})],p.prototype,"historicMoment",void 0),Object(n["a"])([Object(u["a"])("historicMoment")],p.prototype,"_writeHistoricMoment",null),Object(n["a"])([Object(o["b"])({type:Number,json:{write:!0}})],p.prototype,"maxAllowableOffset",void 0),Object(n["a"])([Object(o["b"])({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),Object(n["a"])([Object(o["b"])({type:[String],json:{write:!0}})],p.prototype,"orderByFields",void 0),Object(n["a"])([Object(o["b"])({type:[String],json:{write:!0}})],p.prototype,"outFields",void 0),Object(n["a"])([Object(o["b"])({type:h["a"],json:{read:{source:"outSR"},write:{target:"outSR"}}})],p.prototype,"outSpatialReference",void 0),Object(n["a"])([Object(o["b"])({json:{write:!0}})],p.prototype,"relationshipId",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),Object(n["a"])([Object(u["a"])("start"),Object(u["a"])("num")],p.prototype,"writeStart",null),Object(n["a"])([Object(o["b"])({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),Object(n["a"])([Object(o["b"])({json:{write:!0}})],p.prototype,"returnGeometry",void 0),Object(n["a"])([Object(o["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],p.prototype,"returnM",void 0),Object(n["a"])([Object(o["b"])({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],p.prototype,"returnZ",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=i=Object(n["a"])([Object(l["a"])("esri.rest.support.RelationshipQuery")],p),p.from=Object(c["m"])(p);const f=p},b745:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("bb72"),n=r("e9fc"),a=r("69dd");async function s(e,t,r){const s=Object(i["c"])(e);return Object(n["executeQueryForIds"])(s,a["a"].from(t),{...r}).then(e=>e.data.objectIds)}},b7bd:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e.POSITION="position",e.NORMAL="normal",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.MAPPOS="mapPos",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.NORMALCOMPRESSED="normalCompressed",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.MODELORIGINHI="modelOriginHi",e.MODELORIGINLO="modelOriginLo",e.MODEL="model",e.MODELNORMAL="modelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude"}(i||(i={}))},b7c2:function(e,t,r){"use strict";var i,n,a,s,o,c,l,u,d,h,p,f,b,m;r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return n})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"h",(function(){return h})),r.d(t,"i",(function(){return o})),r.d(t,"j",(function(){return c})),r.d(t,"k",(function(){return l})),r.d(t,"l",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"n",(function(){return f})),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(n||(n={})),function(e){e[e.NONE=0]="NONE",e[e.SMAA=1]="SMAA"}(a||(a={})),function(e){e[e.Color=0]="Color",e[e.Alpha=1]="Alpha",e[e.FrontFace=2]="FrontFace",e[e.NONE=3]="NONE",e[e.COUNT=4]="COUNT"}(s||(s={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(c||(c={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(l||(l={})),function(e){e[e.ASYNC=0]="ASYNC",e[e.SYNC=1]="SYNC"}(u||(u={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(d||(d={})),function(e){e[e.Triangle=0]="Triangle",e[e.Point=1]="Point",e[e.Line=2]="Line"}(h||(h={})),function(e){e[e.STRETCH=1]="STRETCH",e[e.PAD=2]="PAD"}(p||(p={})),function(e){e[e.CHANGED=0]="CHANGED",e[e.UNCHANGED=1]="UNCHANGED"}(f||(f={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(b||(b={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(m||(m={}))},b855:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s}));var i=r("02f1"),n=r("35b3");const a={waveStrength:.06,waveTextureRepeat:32,waveDirection:Object(i["f"])(1,0),waveVelocity:.05,flowStrength:.015,flowOffset:-.5,animationSpeed:.35,color:[0,0,0,0],transparent:!0,writeDepth:!0,slicePlaneEnabled:!1,isDraped:!1,receiveShadows:!0,ssrEnabled:!1,...n["a"]},s={"calm-small":{waveStrength:.005,perturbationStrength:.02,textureRepeat:12,waveVelocity:.01},"rippled-small":{waveStrength:.02,perturbationStrength:.09,textureRepeat:32,waveVelocity:.07},"slight-small":{waveStrength:.05,perturbationStrength:.07,textureRepeat:28,waveVelocity:.1},"moderate-small":{waveStrength:.075,perturbationStrength:.07,textureRepeat:24,waveVelocity:.1},"calm-medium":{waveStrength:.003125,perturbationStrength:.01,textureRepeat:8,waveVelocity:.02},"rippled-medium":{waveStrength:.035,perturbationStrength:.015,textureRepeat:12,waveVelocity:.07},"slight-medium":{waveStrength:.06,perturbationStrength:.015,textureRepeat:8,waveVelocity:.12},"moderate-medium":{waveStrength:.09,perturbationStrength:.03,textureRepeat:4,waveVelocity:.12},"calm-large":{waveStrength:.01,perturbationStrength:0,textureRepeat:4,waveVelocity:.05},"rippled-large":{waveStrength:.025,perturbationStrength:.01,textureRepeat:8,waveVelocity:.11},"slight-large":{waveStrength:.06,perturbationStrength:.02,textureRepeat:3,waveVelocity:.13},"moderate-large":{waveStrength:.14,perturbationStrength:.03,textureRepeat:2,waveVelocity:.15}}},b90c:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n,a=r("eb37"),s=r("ce50"),o=r("7a2a"),c=(r("5f6c"),r("22f1")),l={exports:{}};function u(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=d(e);return t&&0!==t.length?t:null}const t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new s["a"]("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:d(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let r=0;r<t.length-1;r++){if(!Object(c["a"])(t[r].effects,t[r+1].effects))throw new s["a"]("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[r].effects,b:t[r+1].effects});Object(c["c"])(t[r].effects,t[r+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function d(e){let t;if(!e)return[];try{t=l.exports.parse(e)}catch(r){throw new s["a"]("effect:invalid-syntax","Invalid effect syntax",{value:e,error:r})}return t.map(e=>h(e))}function h(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return p(e);case"opacity":return f(e);case"hue-rotate":return b(e);case"blur":return m(e);case"drop-shadow":return g(e);case"bloom":return y(e)}}catch(t){throw t.details.filter=e,t}throw new s["a"]("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}function p(e){let t=1;return O(e.parameters,1),1===e.parameters.length&&(t=A(e.parameters[0])),new o["c"](e.name,t)}function f(e){let t=1;return O(e.parameters,1),1===e.parameters.length&&(t=A(e.parameters[0])),new o["f"](t)}function b(e){let t=0;return O(e.parameters,1),1===e.parameters.length&&(t=R(e.parameters[0])),new o["e"](t)}function m(e){let t=0;return O(e.parameters,1),1===e.parameters.length&&(t=M(e.parameters[0]),_(t,e.parameters[0])),new o["b"](t)}function g(e){const t=[];let r=null;for(const i of e.parameters)if("color"===i.type){if(t.length&&Object.freeze(t),r)throw new s["a"]("effect:type-error","Accepts only one color",{});r=P(i)}else{const e=M(i);if(Object.isFrozen(t))throw new s["a"]("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&_(e,i)}if(t.length<2||t.length>3)throw new s["a"]("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new o["d"](t[0],t[1],t[2]||0,r||I("black"))}function y(e){let t=1,r=0,i=0;return O(e.parameters,3),e.parameters[0]&&(t=A(e.parameters[0])),e.parameters[1]&&(r=M(e.parameters[1]),_(r,e.parameters[1])),e.parameters[2]&&(i=A(e.parameters[2])),new o["a"](t,r,i)}function O(e,t){if(e.length>t)throw new s["a"]("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function v(e){if("color"===e.type)return"<color>";if(e.unit){if(S[e.unit])return"<length>";if(x[e.unit])return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function _(e,t){if(e<0)throw new s["a"]("effect:type-error","Negative values are not allowed, Actual: "+e,{term:t})}function j(e){if("quantity"!==e.type||null!==e.unit)throw new s["a"]("effect:type-error","Expected <double>, Actual: "+v(e),{term:e})}function w(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new s["a"]("effect:type-error","Expected <double> or <percentage>, Actual: "+v(e),{term:e})}n=function(){function e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function t(e,r,i,n){var a=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(a,t.prototype),a.expected=r,a.found=i,a.location=n,a.name="SyntaxError",a}function r(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function i(e,r){var i,n={},a=(r=void 0!==r?r:{}).grammarSource,s={start:$e},o=$e,c="none",l=")",u=",",d="(",h="%",p="px",f="cm",b="mm",m="in",g="pt",y="pc",O="deg",v="rad",_="grad",j="turn",w="#",x=".",T="e",S=/^[ \t\n\r]/,E=/^[a-z\-]/,A=/^[0-9a-fA-F]/,C=/^[+\-]/,R=/^[0-9]/,M=Ve("none"),P=Ue("none",!1),I=Ue(")",!1),D=Ue(",",!1),L=Ve("whitespace"),N=ze([" ","\t","\n","\r"],!1,!1),F=Ve("function"),k=Ue("(",!1),U=Ve("identifier"),z=ze([["a","z"],"-"],!1,!1),B=Ve("percentage"),V=Ue("%",!1),G=Ve("length"),H=Ue("px",!1),q=Ue("cm",!1),W=Ue("mm",!1),$=Ue("in",!1),Z=Ue("pt",!1),X=Ue("pc",!1),Y=Ve("angle"),J=Ue("deg",!1),Q=Ue("rad",!1),K=Ue("grad",!1),ee=Ue("turn",!1),te=Ve("number"),re=Ve("color"),ie=Ue("#",!1),ne=ze([["0","9"],["a","f"],["A","F"]],!1,!1),ae=ze(["+","-"],!1,!1),se=ze([["0","9"]],!1,!1),oe=Ue(".",!1),ce=Ue("e",!1),le=function(){return[]},ue=function(e,t){return{type:"function",name:e,parameters:t||[]}},de=function(e,t){return t.length>0?lt(e,t,3):[e]},he=function(e){return{type:"quantity",value:e.value,unit:e.unit}},pe=function(e){return{type:"color",colorType:e.type,value:e.value}},fe=function(e){return e},be=function(){return ke()},me=function(e){return{value:e,unit:"%"}},ge=function(e){return{value:e,unit:"px"}},ye=function(e){return{value:e,unit:"cm"}},Oe=function(e){return{value:e,unit:"mm"}},ve=function(e){return{value:e,unit:"in"}},_e=function(e){return{value:e,unit:"pt"}},je=function(e){return{value:e,unit:"pc"}},we=function(e){return{value:e,unit:"deg"}},xe=function(e){return{value:e,unit:"rad"}},Te=function(e){return{value:e,unit:"grad"}},Se=function(e){return{value:e,unit:"turn"}},Ee=function(e){return{value:e,unit:null}},Ae=function(){return{type:"hex",value:ke()}},Ce=function(e){return{type:"function",value:e}},Re=function(){return{type:"named",value:ke()}},Me=function(){return parseFloat(ke())},Pe=0,Ie=0,De=[{line:1,column:1}],Le=0,Ne=[],Fe=0;if("startRule"in r){if(!(r.startRule in s))throw new Error("Can't start parsing from rule \""+r.startRule+'".');o=s[r.startRule]}function ke(){return e.substring(Ie,Pe)}function Ue(e,t){return{type:"literal",text:e,ignoreCase:t}}function ze(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Be(){return{type:"end"}}function Ve(e){return{type:"other",description:e}}function Ge(t){var r,i=De[t];if(i)return i;for(r=t-1;!De[r];)r--;for(i={line:(i=De[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return De[t]=i,i}function He(e,t){var r=Ge(e),i=Ge(t);return{source:a,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:i.line,column:i.column}}}function qe(e){Pe<Le||(Pe>Le&&(Le=Pe,Ne=[]),Ne.push(e))}function We(e,r,i){return new t(t.buildMessage(e,r),e,r,i)}function $e(){var e;return(e=Ze())===n&&(e=Xe()),e}function Ze(){var t,r;return Fe++,t=Pe,Ke(),e.substr(Pe,4)===c?(r=c,Pe+=4):(r=n,0===Fe&&qe(P)),r!==n?(Ke(),Ie=t,t=le()):(Pe=t,t=n),Fe--,t===n&&0===Fe&&qe(M),t}function Xe(){var e,t;if(e=[],(t=Ye())!==n)for(;t!==n;)e.push(t),t=Ye();else e=n;return e}function Ye(){var t,r,i,a;return t=Pe,Ke(),(r=et())!==n?(Ke(),(i=Je())===n&&(i=null),Ke(),41===e.charCodeAt(Pe)?(a=l,Pe++):(a=n,0===Fe&&qe(I)),a!==n?(Ke(),Ie=t,t=ue(r,i)):(Pe=t,t=n)):(Pe=t,t=n),t}function Je(){var t,r,i,a,s,o,c,l;if(t=Pe,(r=Qe())!==n){for(i=[],a=Pe,s=Ke(),44===e.charCodeAt(Pe)?(o=u,Pe++):(o=n,0===Fe&&qe(D)),o===n&&(o=null),c=Ke(),(l=Qe())!==n?a=s=[s,o,c,l]:(Pe=a,a=n);a!==n;)i.push(a),a=Pe,s=Ke(),44===e.charCodeAt(Pe)?(o=u,Pe++):(o=n,0===Fe&&qe(D)),o===n&&(o=null),c=Ke(),(l=Qe())!==n?a=s=[s,o,c,l]:(Pe=a,a=n);Ie=t,t=de(r,i)}else Pe=t,t=n;return t}function Qe(){var e,t;return e=Pe,(t=rt())===n&&(t=it())===n&&(t=nt())===n&&(t=at()),t!==n&&(Ie=e,t=he(t)),(e=t)===n&&(e=Pe,(t=st())!==n&&(Ie=e,t=pe(t)),e=t),e}function Ke(){var t,r;for(Fe++,t=[],S.test(e.charAt(Pe))?(r=e.charAt(Pe),Pe++):(r=n,0===Fe&&qe(N));r!==n;)t.push(r),S.test(e.charAt(Pe))?(r=e.charAt(Pe),Pe++):(r=n,0===Fe&&qe(N));return Fe--,r=n,0===Fe&&qe(L),t}function et(){var t,r,i;return Fe++,t=Pe,(r=tt())!==n?(40===e.charCodeAt(Pe)?(i=d,Pe++):(i=n,0===Fe&&qe(k)),i!==n?(Ie=t,t=fe(r)):(Pe=t,t=n)):(Pe=t,t=n),Fe--,t===n&&(r=n,0===Fe&&qe(F)),t}function tt(){var t,r,i;if(Fe++,t=Pe,r=[],E.test(e.charAt(Pe))?(i=e.charAt(Pe),Pe++):(i=n,0===Fe&&qe(z)),i!==n)for(;i!==n;)r.push(i),E.test(e.charAt(Pe))?(i=e.charAt(Pe),Pe++):(i=n,0===Fe&&qe(z));else r=n;return r!==n&&(Ie=t,r=be()),Fe--,(t=r)===n&&(r=n,0===Fe&&qe(U)),t}function rt(){var t,r,i;return Fe++,t=Pe,Ke(),(r=ot())!==n?(37===e.charCodeAt(Pe)?(i=h,Pe++):(i=n,0===Fe&&qe(V)),i!==n?(Ie=t,t=me(r)):(Pe=t,t=n)):(Pe=t,t=n),Fe--,t===n&&0===Fe&&qe(B),t}function it(){var t,r,i;return Fe++,t=Pe,Ke(),(r=ot())!==n?(e.substr(Pe,2)===p?(i=p,Pe+=2):(i=n,0===Fe&&qe(H)),i!==n?(Ie=t,t=ge(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,Ke(),(r=ot())!==n?(e.substr(Pe,2)===f?(i=f,Pe+=2):(i=n,0===Fe&&qe(q)),i!==n?(Ie=t,t=ye(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,Ke(),(r=ot())!==n?(e.substr(Pe,2)===b?(i=b,Pe+=2):(i=n,0===Fe&&qe(W)),i!==n?(Ie=t,t=Oe(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,Ke(),(r=ot())!==n?(e.substr(Pe,2)===m?(i=m,Pe+=2):(i=n,0===Fe&&qe($)),i!==n?(Ie=t,t=ve(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,Ke(),(r=ot())!==n?(e.substr(Pe,2)===g?(i=g,Pe+=2):(i=n,0===Fe&&qe(Z)),i!==n?(Ie=t,t=_e(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,Ke(),(r=ot())!==n?(e.substr(Pe,2)===y?(i=y,Pe+=2):(i=n,0===Fe&&qe(X)),i!==n?(Ie=t,t=je(r)):(Pe=t,t=n)):(Pe=t,t=n)))))),Fe--,t===n&&0===Fe&&qe(G),t}function nt(){var t,r,i;return Fe++,t=Pe,(r=ot())!==n?(e.substr(Pe,3)===O?(i=O,Pe+=3):(i=n,0===Fe&&qe(J)),i!==n?(Ie=t,t=we(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,(r=ot())!==n?(e.substr(Pe,3)===v?(i=v,Pe+=3):(i=n,0===Fe&&qe(Q)),i!==n?(Ie=t,t=xe(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,(r=ot())!==n?(e.substr(Pe,4)===_?(i=_,Pe+=4):(i=n,0===Fe&&qe(K)),i!==n?(Ie=t,t=Te(r)):(Pe=t,t=n)):(Pe=t,t=n),t===n&&(t=Pe,(r=ot())!==n?(e.substr(Pe,4)===j?(i=j,Pe+=4):(i=n,0===Fe&&qe(ee)),i!==n?(Ie=t,t=Se(r)):(Pe=t,t=n)):(Pe=t,t=n)))),Fe--,t===n&&(r=n,0===Fe&&qe(Y)),t}function at(){var e,t;return Fe++,e=Pe,Ke(),(t=ot())!==n?(Ie=e,e=Ee(t)):(Pe=e,e=n),Fe--,e===n&&0===Fe&&qe(te),e}function st(){var t,r,i,a;if(Fe++,t=Pe,35===e.charCodeAt(Pe)?(r=w,Pe++):(r=n,0===Fe&&qe(ie)),r!==n){if(i=[],A.test(e.charAt(Pe))?(a=e.charAt(Pe),Pe++):(a=n,0===Fe&&qe(ne)),a!==n)for(;a!==n;)i.push(a),A.test(e.charAt(Pe))?(a=e.charAt(Pe),Pe++):(a=n,0===Fe&&qe(ne));else i=n;i!==n?(Ie=t,t=Ae()):(Pe=t,t=n)}else Pe=t,t=n;return t===n&&(t=Pe,(r=Ye())!==n&&(Ie=t,r=Ce(r)),(t=r)===n&&(t=Pe,(r=tt())!==n&&(Ie=t,r=Re()),t=r)),Fe--,t===n&&(r=n,0===Fe&&qe(re)),t}function ot(){var t,r,i,a,s,o,c;for(t=Pe,C.test(e.charAt(Pe))?(e.charAt(Pe),Pe++):0===Fe&&qe(ae),r=Pe,i=[],R.test(e.charAt(Pe))?(a=e.charAt(Pe),Pe++):(a=n,0===Fe&&qe(se));a!==n;)i.push(a),R.test(e.charAt(Pe))?(a=e.charAt(Pe),Pe++):(a=n,0===Fe&&qe(se));if(46===e.charCodeAt(Pe)?(a=x,Pe++):(a=n,0===Fe&&qe(oe)),a!==n){if(s=[],R.test(e.charAt(Pe))?(o=e.charAt(Pe),Pe++):(o=n,0===Fe&&qe(se)),o!==n)for(;o!==n;)s.push(o),R.test(e.charAt(Pe))?(o=e.charAt(Pe),Pe++):(o=n,0===Fe&&qe(se));else s=n;s!==n?r=i=[i,a,s]:(Pe=r,r=n)}else Pe=r,r=n;if(r===n)if(r=[],R.test(e.charAt(Pe))?(i=e.charAt(Pe),Pe++):(i=n,0===Fe&&qe(se)),i!==n)for(;i!==n;)r.push(i),R.test(e.charAt(Pe))?(i=e.charAt(Pe),Pe++):(i=n,0===Fe&&qe(se));else r=n;if(r!==n){if(i=Pe,101===e.charCodeAt(Pe)?(a=T,Pe++):(a=n,0===Fe&&qe(ce)),a!==n){if(C.test(e.charAt(Pe))?(s=e.charAt(Pe),Pe++):(s=n,0===Fe&&qe(ae)),s===n&&(s=null),o=[],R.test(e.charAt(Pe))?(c=e.charAt(Pe),Pe++):(c=n,0===Fe&&qe(se)),c!==n)for(;c!==n;)o.push(c),R.test(e.charAt(Pe))?(c=e.charAt(Pe),Pe++):(c=n,0===Fe&&qe(se));else o=n;o!==n?i=a=[a,s,o]:(Pe=i,i=n)}else Pe=i,i=n;i===n&&(i=null),Ie=t,t=Me()}else Pe=t,t=n;return t}function ct(e,t){return e.map((function(e){return e[t]}))}function lt(e,t,r){return[e].concat(ct(t,r))}if((i=o())!==n&&Pe===e.length)return i;throw i!==n&&Pe<e.length&&qe(Be()),We(Ne,Le<e.length?e.charAt(Le):null,Le<e.length?He(Le,Le+1):He(Le,Le))}return e(t,Error),t.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var i,n=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){n=e[i].text.split(/\r\n|\n|\r/g);break}var a=this.location.start,s=this.location.source+":"+a.line+":"+a.column;if(n){var o=this.location.end,c=r("",a.line.toString().length),l=n[a.line-1],u=a.line===o.line?o.column:l.length+1;t+="\n --\x3e "+s+"\n"+c+" |\n"+a.line+" | "+l+"\n"+c+" | "+r("",a.column-1)+r("",u-a.column,"^")}else t+="\n at "+s}return t},t.buildMessage=function(e,t){var r={literal:function(e){return'"'+n(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.inverted?"^":"")+t+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function s(e){return r[e.type](e)}function o(e){var t,r,i=e.map(s);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}function c(e){return e?'"'+n(e)+'"':"end of input"}return"Expected "+o(e)+" but "+c(t)+" found."},{SyntaxError:t,parse:i}},(i=l).exports&&(i.exports=n());const x={deg:1,grad:.9,rad:180/Math.PI,turn:360};function T(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=x[e.unit]))throw new s["a"]("effect:type-error","Expected <angle>, Actual: "+v(e),{term:e})}const S={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function E(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=S[e.unit]))throw new s["a"]("effect:type-error","Expected <length>, Actual: "+v(e),{term:e})}function A(e){w(e);const t=e.value;return _(t,e),"%"===e.unit?.01*t:t}function C(e){return j(e),_(e.value,e),e.value}function R(e){return T(e),e.value*x[e.unit]||0}function M(e){return E(e),e.value*S[e.unit]||0}function P(e){switch(e.colorType){case"hex":return Object(a["c"])(e.value);case"named":return I(e.value);case"function":return N(e.value)}}function I(e){if(!Object(a["e"])(e))throw new s["a"]("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return Object(a["b"])(e)}const D=/^rgba?/i,L=/^hsla?/i;function N(e){if(O(e.parameters,4),D.test(e.name))return[A(e.parameters[0]),A(e.parameters[1]),A(e.parameters[2]),e.parameters[3]?A(e.parameters[3]):1];if(L.test(e.name))return Object(a["d"])(C(e.parameters[0]),A(e.parameters[1]),A(e.parameters[2]),e.parameters[3]?A(e.parameters[3]):1);throw new s["a"]("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}},b911:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("ce50"),a=r("e041"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("09db"),l=r("0964"),u=r("c478");const d={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,OGCFeatureLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-map/basemap":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},"web-map/tables":{ArcGISFeatureLayer:!0},"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0}};var h=r("22f4");const p=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&Object(u["a"])(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){!e||i&&"tables"===i.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e||"Layer"}read(e,t){t&&(t.layer=this),Object(l["b"])(this,e,t=>super.read(e,t),t)}write(e,t){if(null!=t&&t.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,i=d[e];let a=i&&i[this.operationalLayerType];var r;if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(a=!1),!a)return null==(r=t.messages)||r.push(new n["a"]("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const i=super.write(e,{...t,layer:this}),s=!!t&&!!t.messages&&!!t.messages.filter(e=>e instanceof n["a"]&&"web-document-write:property-required"===e.name).length;var o;return Object(a["v"])(null==i?void 0:i.url)?(null==t||null==(o=t.messages)||o.push(new n["a"]("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:i}beforeSave(){}};return Object(i["a"])([Object(s["b"])({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),Object(i["a"])([Object(s["b"])({json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}})],t.prototype,"listMode",void 0),Object(i["a"])([Object(c["a"])("listMode")],t.prototype,"writeListMode",null),Object(i["a"])([Object(s["b"])({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),Object(i["a"])([Object(c["a"])("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),Object(i["a"])([Object(s["b"])(h["h"])],t.prototype,"opacity",void 0),Object(i["a"])([Object(s["b"])({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),Object(i["a"])([Object(c["a"])("title")],t.prototype,"writeTitle",null),Object(i["a"])([Object(s["b"])({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=Object(i["a"])([Object(o["a"])("esri.layers.mixins.OperationalLayer")],t),t}},ba58:function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return R})),r.d(t,"c",(function(){return S})),r.d(t,"d",(function(){return M})),r.d(t,"e",(function(){return j})),r.d(t,"f",(function(){return C})),r.d(t,"g",(function(){return x})),r.d(t,"h",(function(){return T})),r.d(t,"i",(function(){return w})),r.d(t,"j",(function(){return A}));var i=r("b2b2"),n=r("d791"),a=r("afe1"),s=r("0b2d"),o=r("7577"),c=r("0fc4"),l=r("8188"),u=r("4261"),d=r("9180"),h=r("57e5"),p=r("32ed"),f=r("1a54"),b=r("d3cf"),m=r("b7bd");function g(e,t){if("point"===e.type)return _(e,t,!1);if(Object(b["d"])(e))switch(e.type){case"extent":return _(e.center,t,!1);case"polygon":return _(e.centroid,t,!1);case"polyline":return _(y(e),t,!0);case"mesh":return _(e.origin,t,!1)}else switch(e.type){case"extent":return _(O(e),t,!0);case"polygon":return _(v(e),t,!0);case"polyline":return _(y(e),t,!0)}}function y(e){const t=e.paths[0];if(!t||0===t.length)return null;const r=Object(p["e"])(t,Object(p["d"])(t)/2);return Object(f["j"])(r[0],r[1],r[2],e.spatialReference)}function O(e){const t=isFinite(e.zmin);return Object(f["j"])(.5*(e.xmax+e.xmin),.5*(e.ymax+e.ymin),t?.5*(e.zmax+e.zmin):void 0,e.spatialReference)}function v(e){const t=e.rings[0];if(!t||0===t.length)return null;const r=Object(h["c"])(e.rings,e.hasZ);return Object(f["j"])(r[0],r[1],r[2],e.spatialReference)}function _(e,t,r){const i=r?e:Object(b["a"])(e);return t&&e?Object(l["s"])(e,i,t)?i:null:i}function j(e,t,r,i=0){if(e){t||(t=Object(d["l"])());const n=e;let a=.5*n.width*(r-1),s=.5*n.height*(r-1);return n.width<1e-7*n.height?a+=s/20:n.height<1e-7*n.width&&(s+=a/20),Object(o["l"])(t,n.xmin-a-i,n.ymin-s-i,n.xmax+a+i,n.ymax+s+i),t}return null}function w(e,t){for(let r=0;r<e.geometries.length;++r){const i=e.geometries[r].getMutableAttribute(m["a"].AUXPOS1);i&&i.data[3]!==t&&(i.data[3]=t,e.geometryVertexAttrsUpdated(e.geometryRecords[r]))}}function x(e,t){const r=Object(c["d"])(c["a"]);return Object(i["k"])(e)&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),Object(i["k"])(t)?r[3]=t:Object(i["k"])(e)&&e.length>3&&(r[3]=e[3]),r}function T(e,t,r,n,a,s=[0,0,0,0]){for(let o=0;o<3;++o)Object(i["k"])(e)&&null!=e[o]?s[o]=e[o]:Object(i["k"])(r)&&null!=r[o]?s[o]=r[o]:s[o]=a[o];return Object(i["k"])(t)?s[3]=t:Object(i["k"])(n)?s[3]=n:s[3]=a[3],s}function S(e=s["a"],t,r,n=1){const a=new Array(3);if(Object(i["j"])(t)||Object(i["j"])(r))a[0]=1,a[1]=1,a[2]=1;else{let i,n=0;for(let s=2;s>=0;s--){const o=e[s];let c;const l=null!=o,u=0===s&&!i&&!l,d=r[s];"symbol-value"===o||u?c=0!==d?t[s]/d:1:l&&"proportional"!==o&&isFinite(o)&&(c=0!==d?o/d:1),null!=c&&(a[s]=c,i=c,n=Math.max(n,Math.abs(c)))}for(let e=2;e>=0;e--)null==a[e]?a[e]=i:0===a[e]&&(a[e]=.001*n)}for(let i=2;i>=0;i--)a[i]/=n;return Object(s["g"])(a)}function E(e){return null!=e.isPrimitive}function A(e){return E(e)&&(e=[e.width,e.depth,e.height]),C(e)?null:"Symbol sizes may not be negative values"}function C(e){if(Array.isArray(e)){for(const t of e)if(!C(t))return!1;return!0}return null==e||e>=0}function R(e,t,r,i=Object(a["d"])()){const s=e||0,o=t||0,c=r||0;return 0!==s&&Object(n["h"])(i,i,-s/180*Math.PI),0!==o&&Object(n["s"])(i,i,o/180*Math.PI),0!==c&&Object(n["p"])(i,i,c/180*Math.PI),i}function M(e,t){return null!=t.minDemResolution?t.minDemResolution:Object(u["x"])(e)?t.minDemResolutionForPoints:.01*Object(u["y"])(e)}},ba6a:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("ecd7");class n{constructor(){this.spans=[]}acquire(e){this.lodInfo=e}release(){this.lodInfo=null,this.spans.length=0}forEach(e,t){const{spans:r,lodInfo:i}=this,{level:n}=i;if(0!==r.length)for(const{row:a,colFrom:s,colTo:o}of r)for(let r=s;r<=o;r++)e.call(t,n,a,i.normalizeCol(r),i.getWorldForColumn(r))}}n.pool=new i["a"](n)},badc:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_PLUGIN=3]="OPAQUE_PLUGIN",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_PLUGIN=5]="TRANSPARENT_PLUGIN",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL=7]="TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.POSTPROCESSING_ENVIRONMENT_OPAQUE=12]="POSTPROCESSING_ENVIRONMENT_OPAQUE",e[e.POSTPROCESSING_ENVIRONMENT_TRANSPARENT=13]="POSTPROCESSING_ENVIRONMENT_TRANSPARENT",e[e.LASERLINES=14]="LASERLINES",e[e.LASERLINES_CONTRAST_CONTROL=15]="LASERLINES_CONTRAST_CONTROL",e[e.HUD_MATERIAL=16]="HUD_MATERIAL",e[e.LABEL_MATERIAL=17]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=18]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=19]="LINE_CALLOUTS_HUD_DEPTH",e[e.DRAPED_MATERIAL=20]="DRAPED_MATERIAL",e[e.DRAPED_WATER=21]="DRAPED_WATER",e[e.VOXEL=22]="VOXEL",e[e.MAX_SLOTS=23]="MAX_SLOTS"}(i||(i={}))},bb72:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return a}));r("b2b2");var i=r("e041");r("49a0"),r("f353");function n(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?Object(i["M"])(e):e}function s(e,t,r){const i={};for(const n in e){if("declaredClass"===n)continue;const a=e[n];if(null!=a&&"function"!=typeof a)if(Array.isArray(a)){i[n]=[];for(let e=0;e<a.length;e++)i[n][e]=s(a[e])}else if("object"==typeof a)if(a.toJSON){const e=a.toJSON(r&&r[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?a:JSON.stringify(a);else i[n]=a}return i}},bc05:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return c}));r("b2b2");var i=r("ff93"),n=r("cba1");function a(e,t,r,i,n,a){const s=r-n;if(s>=0)return(t>>s)+(i-(a<<s))*(e>>s);const o=-s;return t-(a-(i<<o))*(e>>o)<<o}class s{constructor(e,t,r){this._rows=Math.ceil(t/r),this._columns=Math.ceil(e/r),this._cellSize=r,this.cells=new Array(this._rows);for(let i=0;i<this._rows;i++){this.cells[i]=new Array(this._columns);for(let e=0;e<this._columns;e++)this.cells[i][e]=[]}}getCell(e,t){const r=Math.min(Math.max(Math.floor(t/this._cellSize),0),this._rows-1),i=Math.min(Math.max(Math.floor(e/this._cellSize),0),this._columns-1);return this.cells[r]&&this.cells[r][i]||null}getCellSpan(e,t,r,i){return[Math.min(Math.max(Math.floor(e/this._cellSize),0),this.columns-1),Math.min(Math.max(Math.floor(t/this._cellSize),0),this.rows-1),Math.min(Math.max(Math.floor(r/this._cellSize),0),this.columns-1),Math.min(Math.max(Math.floor(i/this._cellSize),0),this.rows-1)]}get cellSize(){return this._cellSize}get columns(){return this._columns}get rows(){return this._rows}}function o(e,t,r,i,a,s){const o=t[i++];for(let c=0;c<o;c++){const o=new n["a"](s);o.xTile=t[i++],o.yTile=t[i++],o.hash=t[i++],o.priority=t[i++];const c=t[i++];for(let e=0;e<c;e++){const e=t[i++],n=t[i++],a=t[i++],s=t[i++],c=!!t[i++],l=t[i++],u=r[i++],d=r[i++],h=t[i++],p=t[i++];o.colliders.push({xTile:e,yTile:n,dxPixels:a,dyPixels:s,hard:c,partIndex:l,width:h,height:p,minLod:u,maxLod:d})}const l=e[i++];for(let t=0;t<l;t++)o.textVertexRanges.push([e[i++],e[i++]]);const u=e[i++];for(let t=0;t<u;t++)o.iconVertexRanges.push([e[i++],e[i++]]);a.push(o)}return i}function c(e,t,r){for(const[i,n]of e.symbols)l(e,t,r,n,i)}function l(e,t,r,n,a){const s=e.layerData.get(a);if(s.type===i["a"].SYMBOL){for(const t of n){const i=t.unique;let n;if(t.selectedForRendering){const t=i.parts[0],a=t.startOpacity,s=t.targetOpacity;e.allSymbolsFadingOut=e.allSymbolsFadingOut&&0===s;const o=r?Math.floor(127*a)|s<<7:s?255:0;n=o<<24|o<<16|o<<8|o}else n=0;for(const[e,r]of t.iconVertexRanges)for(let t=e;t<e+r;t+=4)s.iconOpacity[t/4]=n;if(t.selectedForRendering){const t=i.parts[1],a=t.startOpacity,s=t.targetOpacity;e.allSymbolsFadingOut=e.allSymbolsFadingOut&&0===s;const o=r?Math.floor(127*a)|s<<7:s?255:0;n=o<<24|o<<16|o<<8|o}else n=0;for(const[e,r]of t.textVertexRanges)for(let t=e;t<e+r;t+=4)s.textOpacity[t/4]=n}s.lastOpacityUpdate=t,s.opacityChanged=!0}}},bc40:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return p}));var i=r("dae5"),n=r("afe1"),a=r("0b2d"),s=r("b09a"),o=r("6a21"),c=r("3886");function l(e,t){e.include(s["a"]),e.vertex.include(o["a"],t),e.varyings.add("vPositionWorldCameraRelative","vec3"),e.varyings.add("vPosition_view","vec3"),e.vertex.uniforms.add("transformWorldFromModelRS","mat3"),e.vertex.uniforms.add("transformWorldFromModelTH","vec3"),e.vertex.uniforms.add("transformWorldFromModelTL","vec3"),e.vertex.uniforms.add("transformWorldFromViewTH","vec3"),e.vertex.uniforms.add("transformWorldFromViewTL","vec3"),e.vertex.uniforms.add("transformViewFromCameraRelativeRS","mat3"),e.vertex.uniforms.add("transformProjFromView","mat4"),e.vertex.code.add(c["a"]`vec3 positionWorldCameraRelative() {
  2987. vec3 rotatedModelPosition = transformWorldFromModelRS * positionModel();
  2988. vec3 transform_CameraRelativeFromModel = dpAdd(
  2989. transformWorldFromModelTL,
  2990. transformWorldFromModelTH,
  2991. -transformWorldFromViewTL,
  2992. -transformWorldFromViewTH
  2993. );
  2994. return transform_CameraRelativeFromModel + rotatedModelPosition;
  2995. }
  2996. vec3 position_view() {
  2997. return transformViewFromCameraRelativeRS * positionWorldCameraRelative();
  2998. }
  2999. void forwardPosition() {
  3000. vPositionWorldCameraRelative = positionWorldCameraRelative();
  3001. vPosition_view = position_view();
  3002. gl_Position = transformProjFromView * vec4(vPosition_view, 1.0);
  3003. }
  3004. vec3 positionWorld() {
  3005. return transformWorldFromViewTL + vPositionWorldCameraRelative;
  3006. }`),e.fragment.uniforms.add("transformWorldFromViewTL","vec3"),e.fragment.code.add(c["a"]`vec3 positionWorld() {
  3007. return transformWorldFromViewTL + vPositionWorldCameraRelative;
  3008. }`)}class u{constructor(){this.transformWorldFromModelRS=Object(i["b"])(),this.transformWorldFromModelTH=Object(a["f"])(),this.transformWorldFromModelTL=Object(a["f"])()}}class d{constructor(){this.transformWorldFromViewTH=Object(a["f"])(),this.transformWorldFromViewTL=Object(a["f"])(),this.transformViewFromCameraRelativeRS=Object(i["b"])(),this.transformProjFromView=Object(n["d"])()}}function h(e,t){e.setUniformMatrix3fv("transformWorldFromModelRS",t.transformWorldFromModelRS),e.setUniform3fv("transformWorldFromModelTH",t.transformWorldFromModelTH),e.setUniform3fv("transformWorldFromModelTL",t.transformWorldFromModelTL)}function p(e,t){e.setUniform3fv("transformWorldFromViewTH",t.transformWorldFromViewTH),e.setUniform3fv("transformWorldFromViewTL",t.transformWorldFromViewTL),e.setUniformMatrix4fv("transformProjFromView",t.transformProjFromView),e.setUniformMatrix3fv("transformViewFromCameraRelativeRS",t.transformViewFromCameraRelativeRS)}},bc66:function(e,t){function r(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}r.keys=function(){return[]},r.resolve=r,e.exports=r,r.id="bc66"},bd75:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("a05b"),n=r("3886");function a(e,t){t.output===i["a"].Color&&t.receiveShadows?(e.varyings.add("linearDepth","float"),e.vertex.code.add(n["a"]`void forwardLinearDepth() { linearDepth = gl_Position.w; }`)):t.output===i["a"].Depth||t.output===i["a"].Shadow?(e.varyings.add("linearDepth","float"),e.vertex.uniforms.add("nearFar","vec2"),e.vertex.code.add(n["a"]`void forwardLinearDepth() {
  3009. linearDepth = (-position_view().z - nearFar[0]) / (nearFar[1] - nearFar[0]);
  3010. }`)):e.vertex.code.add(n["a"]`void forwardLinearDepth() {}`)}},bd7e:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return h})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return p}));var i=r("38a4"),n=r("2119"),a=r("e431"),s=r("0b2d"),o=r("7361");function c(e){return e?{origin:Object(s["d"])(e.origin),vector:Object(s["d"])(e.vector)}:{origin:Object(s["f"])(),vector:Object(s["f"])()}}function l(e,t){const r=y.get();return r.origin=e,r.vector=t,r}function u(e,t,r=c()){return Object(a["m"])(r.origin,e),Object(a["m"])(r.vector,t),r}function d(e,t,r=c()){return Object(a["m"])(r.origin,e),Object(a["l"])(r.vector,t,e),r}function h(e,t){const r=Object(a["l"])(o["d"].get(),t,e.origin),n=Object(a["j"])(e.vector,r),s=Object(a["j"])(e.vector,e.vector),c=Object(i["f"])(n/s,0,1),l=Object(a["l"])(o["d"].get(),Object(a["g"])(o["d"].get(),e.vector,c),r);return Object(a["j"])(l,l)}function p(e,t,r,n,s){const{vector:c,origin:l}=e,u=Object(a["l"])(o["d"].get(),t,l),d=Object(a["j"])(c,u)/Object(a["v"])(c);return Object(a["g"])(s,c,Object(i["f"])(d,r,n)),Object(a["h"])(s,s,e.origin)}function f(e,t){if(m(e,l(t.origin,t.direction),!1,g)){const{tA:t,pB:r,distance2:i}=g;if(t>=0&&t<=1)return i;if(t<0)return Object(a["n"])(e.origin,r);if(t>1)return Object(a["n"])(Object(a["h"])(o["d"].get(),e.origin,e.vector),r)}return null}function b(e,t,r){return!!m(e,t,!0,g)&&(Object(a["m"])(r,g.pA),!0)}function m(e,t,r,n){const s=1e-6,c=e.origin,l=Object(a["h"])(o["d"].get(),c,e.vector),u=t.origin,d=Object(a["h"])(o["d"].get(),u,t.vector),h=o["d"].get(),p=o["d"].get();if(h[0]=c[0]-u[0],h[1]=c[1]-u[1],h[2]=c[2]-u[2],p[0]=d[0]-u[0],p[1]=d[1]-u[1],p[2]=d[2]-u[2],Math.abs(p[0])<s&&Math.abs(p[1])<s&&Math.abs(p[2])<s)return!1;const f=o["d"].get();if(f[0]=l[0]-c[0],f[1]=l[1]-c[1],f[2]=l[2]-c[2],Math.abs(f[0])<s&&Math.abs(f[1])<s&&Math.abs(f[2])<s)return!1;const b=h[0]*p[0]+h[1]*p[1]+h[2]*p[2],m=p[0]*f[0]+p[1]*f[1]+p[2]*f[2],g=h[0]*f[0]+h[1]*f[1]+h[2]*f[2],y=p[0]*p[0]+p[1]*p[1]+p[2]*p[2],O=(f[0]*f[0]+f[1]*f[1]+f[2]*f[2])*y-m*m;if(Math.abs(O)<s)return!1;let v=(b*m-g*y)/O,_=(b+m*v)/y;r&&(v=Object(i["f"])(v,0,1),_=Object(i["f"])(_,0,1));const j=o["d"].get(),w=o["d"].get();return j[0]=c[0]+v*f[0],j[1]=c[1]+v*f[1],j[2]=c[2]+v*f[2],w[0]=u[0]+_*p[0],w[1]=u[1]+_*p[1],w[2]=u[2]+_*p[2],n.tA=v,n.tB=_,n.pA=j,n.pB=w,n.distance2=Object(a["n"])(j,w),!0}const g={tA:0,tB:0,pA:Object(s["f"])(),pB:Object(s["f"])(),distance2:0},y=new n["a"](()=>({origin:null,vector:null}))},bdba:function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i,n,a,s,o,c=r("2eab"),l=r("c120"),u=r("e92d"),d=r("b2b2"),h=r("f4cc"),p=r("477c");!function(e){e[e.Binary=0]="Binary",e[e.JSON=1]="JSON"}(i||(i={})),function(e){e[e.TreeIndex=0]="TreeIndex",e[e.TreeStats=1]="TreeStats",e[e.TreeData=2]="TreeData",e[e.BrickBundles=3]="BrickBundles",e[e.Section=4]="Section",e[e.VariableStats=5]="VariableStats"}(n||(n={})),function(e){e[e.None=1]="None",e[e.Front=2]="Front",e[e.Back=3]="Back"}(a||(a={})),function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High"}(s||(s={})),function(e){e[e.None=0]="None",e[e.StaticSections=1]="StaticSections",e[e.Slices=2]="Slices",e[e.DynamicSections=4]="DynamicSections",e[e.GhostShell=8]="GhostShell",e[e.Isosurface=16]="Isosurface",e[e.Quality=32]="Quality",e[e.SunLocation=64]="SunLocation",e[e.StaticSectionSelection=128]="StaticSectionSelection",e[e.ExaggerationAndOffset=256]="ExaggerationAndOffset",e[e.CurrentTime=512]="CurrentTime",e[e.CurrentVariable=1024]="CurrentVariable",e[e.DeleteIsosurface=2048]="DeleteIsosurface",e[e.ContainerVisibility=4096]="ContainerVisibility",e[e.RenderMode=8192]="RenderMode",e[e.Optimization=16384]="Optimization"}(o||(o={}));var f=r("b2cd");function b(e){return new Promise(t=>r.e("chunk-7482a7c3").then(r.bind(null,"50c5f")).then(e=>e.v).then(({default:r})=>{const i=r({locateFile:m,preinitializedWebGLContext:e,onRuntimeInitialized:()=>t(i)})})).catch(e=>Promise.reject(e))}function m(e){return Object(f["b"])("esri/libs/vxl/"+e)}var g=r("614d"),y=r("badc"),O=r("cc15"),v=r("d17d");const _=u["a"].getLogger("esri.layers.VoxelWasmPerScene");var j;!function(e){e[e.Lifetime=1]="Lifetime",e[e.RequestResponse=2]="RequestResponse",e[e.Rendering=3]="Rendering",e[e.Error=4]="Error"}(j||(j={}));class w{constructor(e){this._halfIntTexturesAvailable=!1,this._havePreparedWithAllLayers=!1,this._renderPluginContext=null,this._vxl=null,this._pluginIsActive=!1,this._moreToLoad=!1,this._viewportWidth=-1,this._viewportHeight=-1,this._newLayers=[],this._layers=new Map,this._renderPass=g["a"].MATERIAL,this._renderSlot=y["a"].VOXEL,this._rctx=null,this._renderTargetToRestore=null,this._lastFrameWasStationary=!1,this._wasmMemBlockSizes=[512,1024,2048,4096,8192,16384,32768,65536],this._wasmMemBlocks=new Map,this._dbgFlags=new Set,this._view=e,this._initialize()}get canRender(){return!!this._vxl&&"local"===this._view.viewingMode}_dbg(e,t){this._dbgFlags.has(e)&&(e===j.Error?_.error(t):_.warn(t))}_removeRenderPlugin(){this._pluginIsActive&&this._view._stage&&(this._dbg(j.Lifetime,"--removeRenderPlugin--"),this._view._stage.removeRenderPlugin(this)),this._pluginIsActive=!1}_initialize(){this._dbg(j.Lifetime,"--initialize--");for(const e of this._wasmMemBlockSizes)this._wasmMemBlocks.set(e,0);this._readyWatchHandle=Object(p["e"])(()=>this._view.ready,e=>{e&&"local"===this._view.viewingMode?(this._dbg(j.Lifetime,"view ready status changed to ready on a local view, calling addRenderPlugin"),this._view._stage.addRenderPlugin([this._renderSlot],this),this._pluginIsActive=!0):(this._dbg(j.Lifetime,"view ready status changed, not ready or not a local view!"),this._removeRenderPlugin())},{initial:!0}),this._qualityWatchHandle=Object(p["e"])(()=>{var e;return null==(e=this._view)?void 0:e.qualityProfile},e=>{this._dbg(j.Rendering,"qualityProfile changed to "+e),this._vxl&&this._vxl.set_quality(this._toWasmQuality(e))},{initial:!0}),this._timeExtentWatchHandle=Object(p["e"])(()=>{var e;return null==(e=this._view)?void 0:e.timeExtent},()=>{if(this._vxl){var e;const t=this._getTimeArgs(null==(e=this._view)?void 0:e.timeExtent);this._dbg(j.Rendering,"sceneView timeExtent changed to useTime="+t.useTime+" st="+t.startTime+" et="+t.endTime),this._vxl.set_scene_time_extent(t.startTime,t.endTime,t.useTime),this._renderPluginContext.requestRender()}},{initial:!0}),this._stationaryWatchHandle=Object(p["e"])(()=>{var e;return null==(e=this._view)?void 0:e.stationary},e=>{this._vxl&&e&&!this._lastFrameWasStationary&&this._renderPluginContext.requestRender()})}initializeRenderContext(e){this._dbg(j.Lifetime,"--initializeRenderContext--");const t=e.renderContext.rctx;t.type===O["a"].WEBGL2?(this._renderPluginContext=e,this._rctx=e.renderContext.rctx,this._halfIntTexturesAvailable=!!this._rctx.capabilities.textureNorm16,this._initializeWasm(t.gl)):this._dbg(j.Error,"WebGL 1 context only!")}uninitializeRenderContext(){this._renderPluginContext=null,this._rctx=null,this._dbg(j.Lifetime,"--uninitializeRenderContext--")}_restoreFramebuffer(){if(!this._renderTargetToRestore)return;const e=this._renderTargetToRestore.fbo;if(!this._rctx)return void this._dbg(j.Error,"no context in restoreFramebuffer!");this._rctx.bindFramebuffer(e,!0);const t=this._renderTargetToRestore.viewport;this._rctx.setViewport(t.x,t.y,t.width,t.height)}_bindPreviousDepthToSlot(e,t){const r=!!this._rctx,i=!!this._renderTargetToRestore;if(!r||!i)return 0;const n=this._renderTargetToRestore.fbo.depthStencilTexture;return n?(0===t?this._rctx.bindTexture(null,e,!0):this._rctx.bindTexture(n,e,!0),1):(this._dbg(j.Error,"no depth/stencil texture exists!"),0)}_modifyResourceCount(e,t,r){if(!this._rctx)return void this._dbg(j.Error,"modifyAllocation callback has no rendering context!");const i=e;1===r?this._rctx.instanceCounter.increment(i,t):this._rctx.instanceCounter.decrement(i,t)}_setBlendState(e,t,r,i){this._rctx?(this._rctx.setBlendingEnabled(1===e),this._rctx.setBlendFunction(t,r),this._rctx.setBlendEquation(i)):this._dbg(j.Error,"setBlendState callback has no rendering context!")}_setFrontFace(e){this._rctx?this._rctx.setFrontFace(e):this._dbg(j.Error,"setFrontFace callback has no rendering context!")}_setDepthStencilStateFunction(e,t,r){this._rctx?(this._rctx.setDepthFunction(r),this._rctx.setDepthTestEnabled(1===e),this._rctx.setDepthWriteEnabled(1===t),this._rctx.setStencilTestEnabled(!1),this._rctx.setStencilFunction(v["h"].ALWAYS,0,255),this._rctx.setStencilOpSeparate(v["n"].FRONT,v["w"].KEEP,v["w"].INCR,v["w"].KEEP),this._rctx.setStencilOpSeparate(v["n"].BACK,v["w"].KEEP,v["w"].DECR,v["w"].KEEP)):this._dbg(j.Error,"setDepthStencilStateFunction callback has no rendering context!")}_setRasterizerState(e){if(this._rctx)switch(e){case a.None:this._rctx.setFaceCullingEnabled(!1);break;case a.Back:this._rctx.setCullFace(v["n"].BACK),this._rctx.setFaceCullingEnabled(!0);break;case a.Front:this._rctx.setCullFace(v["n"].FRONT),this._rctx.setFaceCullingEnabled(!0)}else this._dbg(j.Error,"setRasterizerState callback has no rendering context!")}_setViewport(e,t,r,i){this._rctx?this._rctx.setViewport(e,t,r,i):this._dbg(j.Error,"setViewport callback has no rendering context!")}_updateMemoryUsage(){this._layers.forEach((e,t)=>{if(e.needMemoryUsageUpdate){const r=this._vxl.estimate_memory_usage(t);r>=0&&(e.needMemoryUsageUpdate=!1,e.layerView.setUsedMemory(r))}})}_syncRequestsResponses(){this._layers.forEach((e,t)=>{const r=[];e.responses.forEach((i,a)=>{r.push(a),this._dbg(j.RequestResponse,"responding for requestID:"+a+" size:"+i.size),this._vxl.respond(t,a,i),i.requestType!==n.TreeIndex&&i.requestType!==n.Section||(e.needMemoryUsageUpdate=!0)});const i=e.responses;for(const n of r)i.delete(n);const a=this._vxl.get_new_requests(t),s=e.abortController.signal;for(const n in a){e.outstandingRequestCount+=1,1===e.outstandingRequestCount&&e.layerView.updatingFlagChanged();const t=a[n],r={responseType:"array-buffer",signal:s};this._dbg(j.RequestResponse,"making requestID:"+n+" url:"+t.url),Object(c["default"])(t.url,r).then(r=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),this._dbg(j.RequestResponse,"have response for requestID:"+n);let a=0;if(r.data.byteLength>0){a=this._vxl._malloc(r.data.byteLength);const e=new Uint8Array(this._vxl.HEAPU8.buffer,a,r.data.byteLength),t=new Uint8Array(r.data);for(let i=0;i<r.data.byteLength;++i)e[i]=t[i]}i.set(+n,{responseType:t.responseType,ptr:a,size:r.data.byteLength,success:!0,requestType:t.requestType})}).catch(r=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),Object(h["m"])(r)||(this._dbg(j.Error,`requestID:${n} failed, error=${r.toString()}`),i.set(+n,{responseType:t.responseType,ptr:0,size:0,success:!1,requestType:t.requestType}))})}})}updateWasmCamera(e){this._vxl.set_projection_matrix.apply(this._vxl,e.projectionMatrix),this._vxl.set_view_matrix.apply(this._vxl,e.viewMatrix),this._vxl.set_near_far(e.near,e.far)}isUpdating(e){return!(this._vxl||!this._vxlPromise)||!!this._layers.has(e)&&this._layers.get(e).outstandingRequestCount>0}setEnabled(e,t){this._layers.forEach((r,i)=>{r.layerView===e&&(this._vxl.set_enabled(i,t),this._renderPluginContext.requestRender())})}setSlices(e,t){const r={mask:o.Slices,slices:{planes:t,currentEditPlane:-1}};return this._doMaskedUIUpdate(e,r,!0)}setDynamicSections(e,t){const r={mask:o.DynamicSections,dynamicSections:{planes:t,currentEditPlane:-1}};return this._doMaskedUIUpdate(e,r,!0)}setStaticSections(e,t){const r={mask:o.StaticSections,staticSections:t};return this._doMaskedUIUpdate(e,r,!0)}setCurrentVariable(e,t){const r={mask:o.CurrentVariable,currentVariable:t};return this._doMaskedUIUpdate(e,r,!0)}setRenderMode(e,t){const r={mask:o.RenderMode,renderMode:t};return this._doMaskedUIUpdate(e,r,!0)}_doMaskedUIUpdate(e,t,r){if(!this._vxl)return!1;let i=!1;return this._layers.forEach((r,n)=>{if(r.layerView===e){const e={str:JSON.stringify(t),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(i=1===this._vxl.handle_masked_ui_update(n,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}}),i&&r&&this._renderPluginContext.requestRender(),i}addVoxelLayer(e){if(!this._vxl){const t={layerView:e,resolveCallback:null,rejectCallback:null},r=new Promise((e,r)=>{t.resolveCallback=e,t.rejectCallback=r});return this._newLayers.push(t),r}const t=this._addVoxelLayer(e);return t<0?Promise.reject(-1):Promise.resolve(t)}removeVoxelLayer(e){if(!this._vxl){const t=this._newLayers.findIndex(t=>e===t.layerView);t>=0&&(this._newLayers[t].resolveCallback(-1),this._newLayers.splice(t,1));const r=this._newLayers.length;return 0===r&&(this._dbg(j.Lifetime," no voxel layers left after removing a layer, removing RenderPlugin and destroying"),this.destroy()),r}let t=-1;this._layers.forEach((r,i)=>{r.layerView===e&&(t=i,r.abortController.abort(),this._vxl.remove_layer(t))}),t>=0&&this._layers.delete(t);const r=this._layers.size;return 0===r&&(this._dbg(j.Lifetime," no voxel layers left after removing a layer, removing RenderPlugin and destroying"),this.destroy()),r}_getBlockSize(e){for(const t of this._wasmMemBlockSizes)if(e<t)return t;return-1}_allocateBlock(e){e.byteCount=this._vxl.lengthBytesUTF8(e.str)+1;const t=this._getBlockSize(e.byteCount);return t<0?(e.isReusable=!1,e.ptr=this._vxl._malloc(e.byteCount)):(e.isReusable=!0,e.ptr=this._wasmMemBlocks.get(t),0===e.ptr&&(e.ptr=this._vxl._malloc(t),this._wasmMemBlocks.set(t,e.ptr))),0!==e.ptr&&(this._vxl.stringToUTF8(e.str,e.ptr,e.byteCount),!0)}_getTimeArgs(e){let t=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=!1;return Object(d["k"])(e)&&(e.isAllTime?i=!0:(Object(d["k"])(e.start)&&(i=!0,t=e.start.getTime()/1e3),Object(d["k"])(e.end)&&(i=!0,r=e.end.getTime()/1e3))),{startTime:t,endTime:r,useTime:i}}_addVoxelLayer(e){var t;const r=e.layer;let i=-1;const n=r.getConfiguration();if(n.length<1)return-1;const a={str:n,byteCount:0,ptr:0,isReusable:!1};if(!this._allocateBlock(a))return-1;const s=this._getTimeArgs(null==(t=this._view)?void 0:t.timeExtent),o=this._view.spatialReference.isWGS84&&r.spatialReference.isWGS84?111319.49079327357:1;if(i=this._vxl.add_layer(r.serviceRoot,a.ptr,a.byteCount,o,o,s.startTime,s.endTime,s.useTime,this._toWasmQuality(this._view.qualityProfile)),a.isReusable||this._vxl._free(a.ptr),i>=0){const t=new AbortController;if(this._layers.set(i,{layerView:e,responses:new Map,outstandingRequestCount:0,abortController:t,needMemoryUsageUpdate:!1}),!this._halfIntTexturesAvailable||Object(l["a"])("mac")){const t=[];let r="";for(const i of e.layer.variables)"Int16"!==i.renderingFormat.type&&"UInt16"!==i.renderingFormat.type||(t.push(i.name),i.id===e.layer.style.currentVariableId&&(r=i.name));""!==r&&_.error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&_.warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}return Object(l["a"])("esri-mobile")&&_.warnOnce("Mobile support differs across devices. Voxel layer might not display as expected."),i}return-1}prepareRender(e){if(!this._vxl)return;const t=e.viewForward,r=e.eye;this._vxl.update_camera_pos_and_direction(r[0],r[1],r[2],t[0],t[1],t[2]);const i=this._vxl.cull();this._dbg(j.RequestResponse,"missingResourceCount="+i),this._moreToLoad=i>0,this._havePreparedWithAllLayers=0===this._newLayers.length,this._updateMemoryUsage()}render(e){if(!this._vxl||e.pass!==this._renderPass||e.slot!==this._renderSlot)return;for(const r of this._newLayers){const e=this._addVoxelLayer(r.layerView);-1===e?r.rejectCallback(-1):r.resolveCallback(e)}if(this._newLayers=[],0===this._layers.size)return void this._dbg(j.Error,"No voxel layers but RenderPlugin instance is being asked to render!");this._renderTargetToRestore={fbo:this._rctx.getBoundFramebufferObject(),viewport:this._rctx.getViewport()},this._syncRequestsResponses(),this._lastFrameWasStationary=this._view.stationary,this._rctx.setPolygonOffsetFillEnabled(!1),this._rctx.setScissorTestEnabled(!1),this._rctx.setColorMask(!0,!0,!0,!0),this._vxl.begin_color_frame(!this._view.stationary||this._moreToLoad,e.scenelightingData.lightingMainDirection[0],e.scenelightingData.lightingMainDirection[1],e.scenelightingData.lightingMainDirection[2]);const t=this._renderTargetToRestore.viewport;t.width===this._viewportWidth&&t.height===this._viewportHeight||(this._viewportWidth=t.width,this._viewportHeight=t.height,this._vxl.set_viewport(t.width,t.height),this._layers.forEach(e=>{e.needMemoryUsageUpdate=!0})),0===t.x&&0===t.y||this._dbg(j.Error,"Unsupported viewport parameters detected!"),this.updateWasmCamera(e.camera),this._vxl.draw(),this._renderTargetToRestore.fbo=null,e.rctx.externalTextureUnitUpdate(this._vxl.get_texture_units_bound_in_frame(),this._vxl.get_active_texture_unit()),e.rctx.externalVertexArrayObjectUpdate(),e.rctx.externalVertexBufferUpdate(),this._rctx.externalProgramUpdate(),(this._moreToLoad||!this._havePreparedWithAllLayers&&this._layers.size>0)&&this._renderPluginContext.requestRender()}destroy(){this._dbg(j.Lifetime,"--destroy--"),this._removeRenderPlugin(),this._readyWatchHandle=Object(d["s"])(this._readyWatchHandle),this._qualityWatchHandle=Object(d["s"])(this._qualityWatchHandle),this._timeExtentWatchHandle=Object(d["s"])(this._timeExtentWatchHandle),this._stationaryWatchHandle=Object(d["s"])(this._stationaryWatchHandle),this._vxl&&(this._layers.forEach(e=>{e.abortController.abort()}),this._wasmMemBlocks.forEach(e=>{0!==e&&this._vxl._free(e)}),this._vxl.uninitialize_voxel_wasm(),this._vxl=null)}_initializeWasm(e){return this._vxl?Promise.resolve():(this._vxlPromise||(this._vxlPromise=b(e).then(e=>{var t;if(this._vxl=e,this._vxlPromise=null,this._newLayers.length<=0)return this._dbg(j.Lifetime," no voxel layers left after WASM downloaded, removing RenderPlugin and destroying"),void this.destroy();const r=this._getTimeArgs(null==(t=this._view)?void 0:t.timeExtent),i=this._vxl.addFunction(this._restoreFramebuffer.bind(this),"v"),n=this._vxl.addFunction(this._setBlendState.bind(this),"viiii"),a=this._vxl.addFunction(this._setFrontFace.bind(this),"vi"),s=this._vxl.addFunction(this._setRasterizerState.bind(this),"vi"),o=this._vxl.addFunction(this._setDepthStencilStateFunction.bind(this),"viii"),c=this._vxl.addFunction(this._setViewport.bind(this),"viiii"),u=this._vxl.addFunction(this._bindPreviousDepthToSlot.bind(this),"iii"),d=this._vxl.addFunction(this._modifyResourceCount.bind(this),"viii"),h=this._halfIntTexturesAvailable&&!Object(l["a"])("mac");this._vxl.initialize_voxel_wasm(i,n,a,s,o,c,u,d,r.startTime,r.endTime,r.useTime,h),this._renderPluginContext&&this._renderPluginContext.requestRender()}).catch(()=>{for(const e of this._newLayers)e.rejectCallback(-2);this._dbg(j.Error," WASM failed to download, removing RenderPlugin and destroying"),this.destroy()})),this._vxlPromise)}pickDepth(e,t,r){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const i=r.viewport[3]-t;if(e<0||e>r.viewport[2]||t<0||t>r.viewport[3])return this._dbg(j.Error,`pickDepth: outOfRange, screenXY=[${e}, ${i}], vp=[${r.viewport.toString()}]`),null;this._renderTargetToRestore={fbo:this._rctx.getBoundFramebufferObject(),viewport:this._rctx.getViewport()};const n=r.viewForward,a=r.eye;this._vxl.update_camera_pos_and_direction(a[0],a[1],a[2],n[0],n[1],n[2]),this.updateWasmCamera(r),this._vxl.begin_frame();const s=this._vxl.pick_depth(e,i);return this._renderTargetToRestore.fbo=null,this._rctx.externalTextureUnitUpdate(this._vxl.get_texture_units_bound_in_frame(),this._vxl.get_active_texture_unit()),this._rctx.externalVertexArrayObjectUpdate(),this._rctx.externalVertexBufferUpdate(),this._rctx.externalProgramUpdate(),s.success?s.distanceToCamera:null}_toWasmQuality(e){switch(e){case"low":return 0;case"medium":return 1;case"high":return 2}}}class x{constructor(){this.view2WASM=new Map}static getInstance(){return x.instance||(x.instance=new x),x.instance}getVoxelWasmPerSceneView(e){return this.view2WASM.has(e)?this.view2WASM.get(e):null}isUpdating(e,t){return!!this.view2WASM.has(e)&&this.view2WASM.get(e).isUpdating(t)}addLayer(e,t){return this.view2WASM.has(e)||this.view2WASM.set(e,new w(e)),this.view2WASM.get(e).addVoxelLayer(t)}removeLayer(e,t){this.view2WASM.has(e)&&this.view2WASM.get(e).removeVoxelLayer(t)<1&&this.view2WASM.delete(e)}setLayerEnabled(e,t,r){this.view2WASM.has(e)&&this.view2WASM.get(e).setEnabled(t,r)}setLayerSlices(e,t){let r=!1;return this.view2WASM.forEach((i,n)=>{n.allLayerViews.filter(e=>"voxel-3d"===e.type).forEach(n=>{n.layer===e&&(r=i.setSlices(n,t))})}),r}setLayerDynamicSections(e,t){let r=!1;return this.view2WASM.forEach((i,n)=>{n.allLayerViews.filter(e=>"voxel-3d"===e.type).forEach(n=>{n.layer===e&&(r=i.setDynamicSections(n,t))})}),r}setLayerCurrentVariable(e,t){let r=!1;return this.view2WASM.forEach((i,n)=>{n.allLayerViews.filter(e=>"voxel-3d"===e.type).forEach(n=>{n.layer===e&&(r=i.setCurrentVariable(n,t))})}),r}setLayerRenderMode(e,t){let r=!1;return this.view2WASM.forEach((i,n)=>{n.allLayerViews.filter(e=>"voxel-3d"===e.type).forEach(n=>{n.layer===e&&(r=i.setRenderMode(n,t))})}),r}setLayerStaticSections(e,t){let r=!1;return this.view2WASM.forEach((i,n)=>{n.allLayerViews.filter(e=>"voxel-3d"===e.type).forEach(n=>{n.layer===e&&(r=i.setStaticSections(n,t))})}),r}}},be24:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return o}));var i=r("3886"),n=r("b7bd");function a(e,t){t.vvInstancingEnabled&&(t.vvSize||t.vvColor)&&e.attributes.add(n["a"].INSTANCEFEATUREATTRIBUTE,"vec4"),t.vvSize?(e.vertex.uniforms.add("vvSizeMinSize","vec3"),e.vertex.uniforms.add("vvSizeMaxSize","vec3"),e.vertex.uniforms.add("vvSizeOffset","vec3"),e.vertex.uniforms.add("vvSizeFactor","vec3"),e.vertex.uniforms.add("vvSymbolRotationMatrix","mat3"),e.vertex.uniforms.add("vvSymbolAnchor","vec3"),e.vertex.code.add(i["a"]`vec3 vvScale(vec4 _featureAttribute) {
  3011. return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize);
  3012. }
  3013. vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) {
  3014. return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position + vvSymbolAnchor)), 1.0);
  3015. }`),e.vertex.code.add(i["a"]`
  3016. const float eps = 1.192092896e-07;
  3017. vec4 vvTransformNormal(vec3 _normal, vec4 _featureAttribute) {
  3018. vec3 vvScale = clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize + eps, vvSizeMaxSize);
  3019. return vec4(vvSymbolRotationMatrix * _normal / vvScale, 1.0);
  3020. }
  3021. ${t.vvInstancingEnabled?i["a"]`
  3022. vec4 vvLocalNormal(vec3 _normal) {
  3023. return vvTransformNormal(_normal, instanceFeatureAttribute);
  3024. }
  3025. vec4 localPosition() {
  3026. return vvTransformPosition(position, instanceFeatureAttribute);
  3027. }`:""}
  3028. `)):e.vertex.code.add(i["a"]`vec4 localPosition() { return vec4(position, 1.0); }
  3029. vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),t.vvColor?(e.vertex.constants.add("vvColorNumber","int",8),e.vertex.code.add(i["a"]`
  3030. uniform float vvColorValues[vvColorNumber];
  3031. uniform vec4 vvColorColors[vvColorNumber];
  3032. vec4 vvGetColor(vec4 featureAttribute, float values[vvColorNumber], vec4 colors[vvColorNumber]) {
  3033. float value = featureAttribute.y;
  3034. if (value <= values[0]) {
  3035. return colors[0];
  3036. }
  3037. for (int i = 1; i < vvColorNumber; ++i) {
  3038. if (values[i] >= value) {
  3039. float f = (value - values[i-1]) / (values[i] - values[i-1]);
  3040. return mix(colors[i-1], colors[i], f);
  3041. }
  3042. }
  3043. return colors[vvColorNumber - 1];
  3044. }
  3045. ${t.vvInstancingEnabled?i["a"]`
  3046. vec4 vvColor() {
  3047. return vvGetColor(instanceFeatureAttribute, vvColorValues, vvColorColors);
  3048. }`:""}
  3049. `)):e.vertex.code.add(i["a"]`vec4 vvColor() { return vec4(1.0); }`)}function s(e,t){t.vvSizeEnabled&&(e.setUniform3fv("vvSizeMinSize",t.vvSizeMinSize),e.setUniform3fv("vvSizeMaxSize",t.vvSizeMaxSize),e.setUniform3fv("vvSizeOffset",t.vvSizeOffset),e.setUniform3fv("vvSizeFactor",t.vvSizeFactor)),t.vvColorEnabled&&(e.setUniform1fv("vvColorValues",t.vvColorValues),e.setUniform4fv("vvColorColors",t.vvColorColors))}function o(e,t){s(e,t),t.vvOpacityEnabled&&(e.setUniform1fv("vvOpacityValues",t.vvOpacityValues),e.setUniform1fv("vvOpacityOpacities",t.vvOpacityOpacities))}function c(e,t){s(e,t),t.vvSizeEnabled&&(e.setUniform3fv("vvSymbolAnchor",t.vvSymbolAnchor),e.setUniformMatrix3fv("vvSymbolRotationMatrix",t.vvSymbolRotationMatrix))}},be4d:function(e,t,r){"use strict";r.d(t,"a",(function(){return N}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0")),o=r("afcf"),c=r("d386"),l=r("09db"),u=r("c1da"),d=r("5dd5"),h=r("3f60");let p=i=class extends d["a"]{constructor(e){super(e),this.type="color",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value),this._set("stops",e)}clone(){return new i({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(e=>e.clone()),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};Object(n["a"])([Object(a["b"])({readOnly:!0})],p.prototype,"cache",null),Object(n["a"])([Object(a["b"])({type:["color"],json:{type:["colorInfo"]}})],p.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],p.prototype,"normalizationField",void 0),Object(n["a"])([Object(a["b"])({type:[h["a"]],json:{write:!0}})],p.prototype,"stops",null),p=i=Object(n["a"])([Object(c["a"])("esri.renderers.visualVariables.ColorVariable")],p);const f=p;var b,m=r("6a0ed"),g=r("42be");let y=b=class extends m["a"]{constructor(e){super(e),this.label=null,this.opacity=null,this.value=null}readOpacity(e,t){return Object(g["b"])(t.transparency)}writeOpacity(e,t,r){t[r]=Object(g["a"])(e)}clone(){return new b({label:this.label,opacity:this.opacity,value:this.value})}};Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],y.prototype,"label",void 0),Object(n["a"])([Object(a["b"])({type:Number,json:{type:s["a"],write:{target:"transparency"}}})],y.prototype,"opacity",void 0),Object(n["a"])([Object(o["a"])("opacity",["transparency"])],y.prototype,"readOpacity",null),Object(n["a"])([Object(l["a"])("opacity")],y.prototype,"writeOpacity",null),Object(n["a"])([Object(a["b"])({type:Number,json:{write:!0}})],y.prototype,"value",void 0),y=b=Object(n["a"])([Object(c["a"])("esri.renderers.visualVariables.support.OpacityStop")],y);const O=y;var v;let _=v=class extends d["a"]{constructor(e){super(e),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value),this._set("stops",e)}clone(){return new v({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(e=>e.clone()),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};Object(n["a"])([Object(a["b"])({readOnly:!0})],_.prototype,"cache",null),Object(n["a"])([Object(a["b"])({type:["opacity"],json:{type:["transparencyInfo"]}})],_.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],_.prototype,"normalizationField",void 0),Object(n["a"])([Object(a["b"])({type:[O],json:{write:!0}})],_.prototype,"stops",null),_=v=Object(n["a"])([Object(c["a"])("esri.renderers.visualVariables.OpacityVariable")],_);const j=_;var w=r("4f37"),x=r("c3fcb"),T=r("fc29"),S=r("fa8a"),E=r("e92d"),A=r("0028");const C=E["a"].getLogger("esri.renderers.visualVariables.VisualVariableFactory"),R={color:f,size:x["a"],opacity:j,rotation:w["a"]},M=new S["a"]({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),P=/^\[([^\]]+)\]$/i;let I=class extends T["a"]{constructor(){super(...arguments),this.colorVariables=null,this.opacityVariables=null,this.rotationVariables=null,this.sizeVariables=null}set visualVariables(e){if(this._resetVariables(),(e=e&&e.filter(e=>!!e))&&e.length){for(const t of e)switch(t.type){case"color":this.colorVariables.push(t);break;case"opacity":this.opacityVariables.push(t);break;case"rotation":this.rotationVariables.push(t);break;case"size":this.sizeVariables.push(t)}this.sizeVariables.length&&this.sizeVariables.some(e=>!!e.target)&&e.sort((e,t)=>{let r=null;return r=e.target===t.target?0:e.target?1:-1,r});for(let t=0;t<e.length;t++)e[t].index=t;this._set("visualVariables",e)}else this._set("visualVariables",e)}readVariables(e,t,r){const{rotationExpression:i,rotationType:n}=t,a=i&&i.match(P),s=a&&a[1];if(s&&(e||(e=[]),e.push({type:"rotationInfo",rotationType:n,field:s})),e)return e.map(e=>{const t=M.read(e.type),i=R[t];i||(C.warn("Unknown variable type: "+t),r&&r.messages&&r.messages.push(new A["a"]("visual-variable:unsupported",`visualVariable of type '${t}' is not supported`,{definition:e,context:r})));const n=new i;return n.read(e,r),n})}writeVariables(e,t){const r=[];for(const i of e){const e=i.toJSON(t);e&&r.push(e)}return r}_resetVariables(){this.colorVariables=[],this.opacityVariables=[],this.rotationVariables=[],this.sizeVariables=[]}};Object(n["a"])([Object(a["b"])()],I.prototype,"visualVariables",null),I=Object(n["a"])([Object(c["a"])("esri.renderers.visualVariables.VisualVariableFactory")],I);const D=I,L={base:d["a"],key:"type",typeMap:{opacity:j,color:f,rotation:w["a"],size:x["a"]}},N=e=>{let t=class extends e{constructor(){super(...arguments),this._vvFactory=new D}set visualVariables(e){this._vvFactory.visualVariables=e,this._set("visualVariables",this._vvFactory.visualVariables)}readVisualVariables(e,t,r){return this._vvFactory.readVariables(e,t,r)}writeVisualVariables(e,t,r,i){t[r]=this._vvFactory.writeVariables(e,i)}get arcadeRequiredForVisualVariables(){if(!this.visualVariables)return!1;for(const e of this.visualVariables)if(e.arcadeRequired)return!0;return!1}hasVisualVariables(e,t){return e?this.getVisualVariablesForType(e,t).length>0:this.getVisualVariablesForType("size",t).length>0||this.getVisualVariablesForType("color",t).length>0||this.getVisualVariablesForType("opacity",t).length>0||this.getVisualVariablesForType("rotation",t).length>0}getVisualVariablesForType(e,t){const r=this.visualVariables;return r?r.filter(r=>r.type===e&&("string"==typeof t?r.target===t:!1!==t||!r.target)):[]}async collectVVRequiredFields(e,t){let r=[];this.visualVariables&&(r=r.concat(this.visualVariables));for(const i of r)i&&(i.field&&Object(u["d"])(e,t,i.field),i.normalizationField&&Object(u["d"])(e,t,i.normalizationField),i.valueExpression&&await Object(u["a"])(e,t,i.valueExpression))}};return Object(n["a"])([Object(a["b"])({types:[L],value:null,json:{write:!0}})],t.prototype,"visualVariables",null),Object(n["a"])([Object(o["a"])("visualVariables",["visualVariables","rotationType","rotationExpression"])],t.prototype,"readVisualVariables",null),Object(n["a"])([Object(l["a"])("visualVariables")],t.prototype,"writeVisualVariables",null),t=Object(n["a"])([Object(c["a"])("esri.renderers.mixins.VisualVariablesMixin")],t),t}},bea9:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("f2e0");class n{constructor(e){this.channel=e,this.id=Object(i["b"])()}}},beba:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return d})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return l})),r.d(t,"g",(function(){return p})),r.d(t,"h",(function(){return h})),r.d(t,"i",(function(){return f})),r.d(t,"j",(function(){return m})),r.d(t,"k",(function(){return b}));var i=r("cc15"),n=r("d17d"),a=(r("d267"),r("a1ff"));function s(e,t,r="nearest",s=!1){var o;const c=!(s&&"u8"===t.pixelType),l=c?n["q"].FLOAT:n["q"].UNSIGNED_BYTE,u=null==t.pixels||0===t.pixels.length?null:c?t.getAsRGBAFloat():t.getAsRGBA(),d=null==(o=e.capabilities.textureFloat)?void 0:o.textureFloatLinear,h={width:t.width,height:t.height,target:n["A"].TEXTURE_2D,pixelFormat:n["p"].RGBA,internalFormat:e.type===i["a"].WEBGL2&&c?n["v"].RGBA32F:n["p"].RGBA,samplingMode:!d||"bilinear"!==r&&"cubic"!==r?n["z"].NEAREST:n["z"].LINEAR,dataType:l,wrapMode:n["B"].CLAMP_TO_EDGE,flipped:!1};return new a["a"](e,h,u)}function o(e,t){const{spacing:r,offsets:s,coefficients:o,size:[c,l]}=t,u=r[0]>1,d={width:u?4*c:c,height:l,target:n["A"].TEXTURE_2D,pixelFormat:n["p"].RGBA,internalFormat:e.type===i["a"].WEBGL2?n["v"].RGBA32F:n["p"].RGBA,dataType:n["q"].FLOAT,samplingMode:n["z"].NEAREST,wrapMode:n["B"].CLAMP_TO_EDGE,flipped:!1},h=new Float32Array(u?c*l*16:2*s.length);if(u)for(let i=0,n=0;i<o.length;i++)h[n++]=o[i],i%3==2&&(h[n++]=1);else for(let i=0;i<l;i++)for(let e=0;e<c;e++){const t=4*(i*c+e),r=2*(e*l+i);h[t]=s[r],h[t+1]=s[r+1],h[t+3]=-1===s[r]?0:1}return new a["a"](e,d,h)}function c(e,t){const r={width:t.length/4,height:1,target:n["A"].TEXTURE_2D,pixelFormat:n["p"].RGBA,internalFormat:n["p"].RGBA,dataType:n["q"].UNSIGNED_BYTE,samplingMode:n["z"].NEAREST,wrapMode:n["B"].CLAMP_TO_EDGE,flipped:!1};return new a["a"](e,r,t)}function l(e,t,r,i=1,n=!0,a=!1){return{u_flipY:n,u_isFloatTexture:a,u_applyTransform:!!e,u_opacity:i,u_transformSpacing:e?e.spacing:null,u_transformGridSize:e?e.size:null,u_targetImageSize:t,u_srcImageSize:r}}function u(e,t){return{u_colormapOffset:t||0,u_colormapMaxIndex:e?e.length/4-1:null}}function d(e,t){return{u_scale:e,u_offset:t}}function h(e){return{u_bandCount:e.bandCount,u_minOutput:e.outMin,u_maxOutput:e.outMax,u_minCutOff:e.minCutOff,u_maxCutOff:e.maxCutOff,u_factor:e.factor,u_useGamma:e.useGamma,u_gamma:e.gamma,u_gammaCorrection:e.gammaCorrection}}function p(e){return{u_hillshadeType:e.hillshadeType,u_sinZcosAs:e.sinZcosAs,u_sinZsinAs:e.sinZsinAs,u_cosZs:e.cosZs,u_weights:e.weights,u_factor:e.factor,u_minValue:e.minValue,u_maxValue:e.maxValue}}function f(e,t){const r=e.gl,i=t.glName,n=r.getProgramParameter(i,r.ACTIVE_UNIFORMS),a=new Map;let s;for(let o=0;o<n;o++)s=r.getActiveUniform(i,o),s&&a.set(s.name,{location:r.getUniformLocation(i,s.name),info:s});return a}function b(e,t,r){Object.keys(r).forEach(i=>{const n=t.get(i)||t.get(i+"[0]");n&&g(e,i,r[i],n)})}function m(e,t,r,i){r.length===i.length&&(i.some(e=>null==e)||r.some(e=>null==e)||r.forEach((r,n)=>{t.setUniform1i(r,n),e.bindTexture(i[n],n)}))}function g(e,t,r,i){if(null===i||null==r)return!1;const{info:a}=i;switch(a.type){case n["C"].FLOAT:a.size>1?e.setUniform1fv(t,r):e.setUniform1f(t,r);break;case n["C"].FLOAT_VEC2:e.setUniform2fv(t,r);break;case n["C"].FLOAT_VEC3:e.setUniform3fv(t,r);break;case n["C"].FLOAT_VEC4:e.setUniform4fv(t,r);break;case n["C"].FLOAT_MAT3:e.setUniformMatrix3fv(t,r);break;case n["C"].FLOAT_MAT4:e.setUniformMatrix4fv(t,r);break;case n["C"].INT:a.size>1?e.setUniform1iv(t,r):e.setUniform1i(t,r);break;case n["C"].BOOL:e.setUniform1i(t,r?1:0);break;case n["C"].INT_VEC2:case n["C"].BOOL_VEC2:e.setUniform2iv(t,r);break;case n["C"].INT_VEC3:case n["C"].BOOL_VEC3:e.setUniform3iv(t,r);break;case n["C"].INT_VEC4:case n["C"].BOOL_VEC4:e.setUniform4iv(t,r);break;default:return!1}return!0}},bff6:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));var i,n=r("a4ee"),a=r("70a2");class s extends a["a"]{constructor(){super(...arguments),this.visible=i.Hidden}}Object(n["a"])([Object(a["c"])()],s.prototype,"renderable",void 0),Object(n["a"])([Object(a["c"])()],s.prototype,"components",void 0),function(e){e[e.Hidden=0]="Hidden",e[e.Visible=1]="Visible"}(i||(i={}))},c047:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var i=r("b2cd"),n=r("6323");async function a(e){if(!e)return;const t=e.indexOf("-vector")>-1?e.slice(0,e.indexOf("-vector")):e,r=await Object(n["a"])("esri/t9n/basemaps");return r[e]||r[t]}const s={streets:{id:"streets",classic:!0,deprecated:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets.jpg")},baseMapLayers:[{id:"streets-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Street Map",showLegend:!1,visibility:!0,opacity:1}]},satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Boundaries and Places",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},topo:{id:"topo",classic:!0,deprecated:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/topo.jpg")},baseMapLayers:[{id:"topo-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Topo Map",showLegend:!1,visibility:!0,opacity:1}]},gray:{id:"gray",classic:!0,deprecated:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/gray.jpg")},baseMapLayers:[{id:"gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"dark-gray":{id:"dark-gray",classic:!0,deprecated:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/dark-gray.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"dark-gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"national-geographic":{id:"national-geographic",classic:!0,deprecated:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/national-geographic.jpg")},baseMapLayers:[{id:"national-geographic-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",title:"NatGeo World Map",showLegend:!1,layerType:"ArcGISTiledMapServiceLayer",visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"arcgis-imagery":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/hybrid.jpg")},title:"Imagery Hybrid",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-imagery-standard":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/satellite.jpg")},title:"Imagery",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"}]},"arcgis-imagery-labels":{title:"Hybrid [Reference]",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-light-gray":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/gray-vector.jpg")},title:"Light Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Base",title:"Light Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Labels",title:"Light Gray Canvas Labels",isReference:!0}]},"arcgis-dark-gray":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/dark-gray.jpg")},title:"Dark Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Base",title:"Dark Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Labels",title:"Dark Gray Canvas Labels",isReference:!0}]},"arcgis-navigation":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-navigation.jpg")},title:"Navigation",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Navigation",title:"World Navigation Map"}]},"arcgis-navigation-night":{title:"Navigation (Dark Mode)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:NavigationNight",title:"World Navigation Map (Dark Mode)"}]},"arcgis-streets":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-vector.jpg")},title:"Streets",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Streets",title:"World Street Map"}]},"arcgis-streets-night":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-night.jpg")},title:"Streets (Night)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsNight",title:"World Street Map (Night)"}]},"arcgis-streets-relief":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/streets-relief.jpg")},title:"Streets (with Relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsRelief:Base",title:"World Street Map (with Relief)"}]},"arcgis-topographic":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/topo.jpg")},title:"Topographic",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Topographic:Base",title:"World Topographic Map"}]},"arcgis-oceans":{get thumbnailUrl(){return Object(i["b"])("esri/images/basemap/oceans.jpg")},title:"Oceans",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Ocean Base",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Oceans:Labels",title:"World Ocean Reference",isReference:!0}]},"osm-standard":{title:"OpenStreetMap",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Standard",title:"OpenStreetMap"}]},"osm-standard-relief":{title:"OpenStreetMap (with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StandardRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-streets":{title:"OpenStreetMap (Streets)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Streets",title:"OpenStreetMap (Streets)"}]},"osm-streets-relief":{title:"OpenStreetMap (Streets with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StreetsRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-light-gray":{title:"OpenStreetMap (Light Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Base",title:"OSM (Light Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Labels",title:"OSM (Light Gray Reference)",isReference:!0}]},"osm-dark-gray":{title:"OpenStreetMap (Dark Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Base",title:"OSM (Dark Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Labels",title:"OSM (Dark Gray Reference)",isReference:!0}]},"arcgis-terrain":{title:"Terrain with Labels",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Base",title:"World Terrain Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Detail",title:"World Terrain Reference",isReference:!0}]},"arcgis-community":{title:"Community",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community",title:"Community"}]},"arcgis-charted-territory":{title:"Charted Territory",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ChartedTerritory:Base",title:"Charted Territory"}]},"arcgis-colored-pencil":{title:"Colored Pencil",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ColoredPencil",title:"Colored Pencil"}]},"arcgis-nova":{title:"Nova",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Nova",title:"Nova"}]},"arcgis-modern-antique":{title:"Modern Antique",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ModernAntique:Base",title:"Modern Antique"}]},"arcgis-midcentury":{title:"Mid-Century",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Midcentury",title:"Mid-Century"}]},"arcgis-newspaper":{title:"Newspaper",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Newspaper",title:"Newspaper"}]},"arcgis-hillshade-light":{title:"Hillshade",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"}]},"arcgis-hillshade-dark":{title:"Hillshade (Dark)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade (Dark)",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade_Dark/MapServer"}]}}},c0d3:function(e,t,r){"use strict";r.d(t,"a",(function(){return g})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return O}));r("c120");var i=r("e92d"),n=r("4c37"),a=r("a9da");let s,o=[];const c=i["a"].getLogger("esri.core.Accessor");function l(e){void 0!==s&&s.onObservableAccessed(e)}let u=!1,d=!1;function h(e,t,r){if(u)return f(e,t,r);b(e);const i=t.call(r);return m(),i}function p(e,t){return h(void 0,e,t)}function f(e,t,r){const i=u;u=!0,b(e);let n=null;try{n=t.call(r)}catch(o){d&&c.error(o)}return m(),u=i,n}function b(e){s=e,o.push(e)}function m(){const e=o.pop();s=o.length>0?o[o.length-1]:void 0,void 0!==e&&e.onTrackingEnd()}function g(e,t){if(t.flags&a["a"].DepTrackingInitialized)return;const r=d;d=!1,t.flags&a["a"].AutoTracked?f(t,t.metadata.get,e):O(e,t),d=r}const y=[];function O(e,t){t.flags&a["a"].ExplicitlyTracking||(t.flags|=a["a"].ExplicitlyTracking,f(t,()=>{const r=t.metadata.dependsOn||y;for(const t of r)if("string"==typeof t&&-1===t.indexOf("."))v(e,t,!1);else{const r=Object(n["f"])(t);for(let t=0,i=e;t<r.length&&null!=i&&"object"==typeof i;++t)i=v(i,r[t],t!==r.length-1)}}),t.flags&=~a["a"].ExplicitlyTracking)}function v(e,t,r){const i="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(i,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.getItemAt(t)}const a=Object(n["a"])(e),s=null==a?void 0:a.properties.get(i);return s&&(l(s),g(e,s)),r?e[i]:void 0}},c120:function(e,t,r){"use strict";var i,n;let a;var s,o;function c(e){return"function"==typeof a[e]?a[e]=a[e](globalThis):a[e]}r.d(t,"a",(function(){return c})),a=null!=(i=globalThis.dojoConfig)&&i.has||null!=(n=globalThis.esriConfig)&&n.has?{...null==(s=globalThis.dojoConfig)?void 0:s.has,...null==(o=globalThis.esriConfig)?void 0:o.has}:{},c.add=(e,t,r,i)=>((i||void 0===a[e])&&(a[e]=t),r&&c(e)),c.cache=a,c.add("esri-deprecation-warnings",!0),(()=>{var e;c.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(c.add("host-browser",t),c.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),c.add("dom",t),c("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,i=parseFloat(r);if(c.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),c.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),c.add("khtml",r.includes("Konqueror")?i:void 0),c.add("edge",parseFloat(t.split("Edge/")[1])||void 0),c.add("opr",parseFloat(t.split("OPR/")[1])||void 0),c.add("webkit",!c("wp")&&!c("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),c.add("chrome",!c("edge")&&!c("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),c.add("android",!c("wp")&&parseFloat(t.split("Android ")[1])||void 0),c.add("safari",!r.includes("Safari")||c("wp")||c("chrome")||c("android")||c("edge")||c("opr")?void 0:parseFloat(r.split("Version/")[1])),c.add("mac",r.includes("Macintosh")),!c("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",i=parseFloat(r.replace(/_/,".").replace(/_/g,""));c.add(e,i),c.add("ios",i)}c.add("trident",parseFloat(r.split("Trident/")[1])||void 0),c("webkit")||(!t.includes("Gecko")||c("wp")||c("khtml")||c("trident")||c("edge")||c.add("mozilla",i),c("mozilla")&&c.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&c.add("esri-mobile",t),r&&c.add("esri-iPhone",r),c.add("esri-geolocation",!!navigator.geolocation)}c.add("esri-canvas-svg-support",!c("trident")),c.add("esri-wasm","WebAssembly"in globalThis),c.add("esri-shared-array-buffer",()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t}),c.add("esri-atomics","Atomics"in globalThis),c.add("esri-workers","Worker"in globalThis),c.add("web-feat:cache","caches"in globalThis),c.add("esri-workers-arraybuffer-transfer",!c("safari")||Number(c("safari"))>=12),c.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),c.add("featurelayer-simplify-payload-size-factors",[1,1,4]),c.add("featurelayer-snapshot-enabled",!0),c.add("featurelayer-snapshot-point-min-threshold",8e4),c.add("featurelayer-snapshot-point-max-threshold",4e5),c.add("featurelayer-snapshot-point-coverage",.1),c.add("featurelayer-advanced-symbols",!1),c.add("featurelayer-pbf",!0),c.add("featurelayer-pbf-statistics",!1),c.add("feature-layers-workers",!0),c.add("feature-polyline-generalization-factor",1),c.add("mapview-transitions-duration",200),c.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),c.add("mapserver-pbf-enabled",!1),c("host-webworker")||c("host-browser")&&(c.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),c.add("esri-image-decode",()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then(()=>{c.add("esri-image-decode",!0,!0,!0)}).catch(()=>{c.add("esri-image-decode",!1,!0,!0)})}return!1}),c.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})()},c128:function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var i,n=r("a4ee"),a=r("b2b2"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("448d")),c=r("d386"),l=r("961d"),u=r("f6ab"),d=r("90dc"),h=r("4d68"),p=r("cc88"),f=r("08f6"),b=(r("e92d"),r("2dd4"),r("a3af"));let m=i=class extends b["a"]{constructor(e){super(e),this.colorMixMode=null}clone(){const e={color:Object(a["k"])(this.color)?this.color.clone():null,colorMixMode:this.colorMixMode};return new i(e)}};Object(n["a"])([Object(o["a"])({multiply:"multiply",replace:"replace",tint:"tint"})],m.prototype,"colorMixMode",void 0),m=i=Object(n["a"])([Object(c["a"])("esri.symbols.support.Symbol3DFillMaterial")],m);var g,y=r("9ef0"),O=r("6a0ed"),v=r("a915"),_=r("5c00"),j=r("af3d");let w=g=class extends O["a"]{constructor(e){super(e),this.color=new y["a"]([0,0,0,1]),this.size=Object(v["h"])(1),this.pattern=null,this.patternCap="butt"}clone(){const e={color:Object(a["k"])(this.color)?this.color.clone():null,size:this.size,pattern:Object(a["k"])(this.pattern)?this.pattern.clone():null,patternCap:this.patternCap};return new g(e)}};var x;Object(n["a"])([Object(s["b"])(_["a"])],w.prototype,"color",void 0),Object(n["a"])([Object(s["b"])(_["b"])],w.prototype,"size",void 0),Object(n["a"])([Object(s["b"])(p["a"])],w.prototype,"pattern",void 0),Object(n["a"])([Object(s["b"])({type:j["a"],json:{default:"butt",write:{overridePolicy(){return{enabled:Object(a["k"])(this.pattern)}}}}})],w.prototype,"patternCap",void 0),w=g=Object(n["a"])([Object(c["a"])("esri.symbols.support.Symbol3DOutline")],w);let T=x=class extends l["a"]{constructor(e){super(e),this.type="fill",this.material=null,this.pattern=null,this.castShadows=!0,this.outline=null,this.edges=null}clone(){const e={edges:Object(a["k"])(this.edges)?this.edges.clone():null,enabled:this.enabled,material:Object(a["k"])(this.material)?this.material.clone():null,pattern:Object(a["k"])(this.pattern)?this.pattern.clone():null,castShadows:this.castShadows,outline:Object(a["k"])(this.outline)?this.outline.clone():null};return new x(e)}static fromSimpleFillSymbol(e){var t,r,i,n,a,s;const o=e.outline&&e.outline.style&&"inside-frame"!==e.outline.style&&"solid"!==e.outline.style?new d["a"]({style:e.outline.style}):null,c={size:null!=(t=null==(r=e.outline)?void 0:r.width)?t:0,color:(null!=(i=null==(n=e.outline)?void 0:n.color)?i:f["c"]).clone(),pattern:o};return o&&null!=(a=e.outline)&&a.cap&&(c.patternCap=e.outline.cap),new x({material:new m({color:(null!=(s=e.color)?s:f["b"]).clone()}),pattern:e.style&&"solid"!==e.style?new h["a"]({style:e.style}):null,outline:c})}};Object(n["a"])([Object(o["a"])({Fill:"fill"},{readOnly:!0})],T.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:m,json:{write:!0}})],T.prototype,"material",void 0),Object(n["a"])([Object(s["b"])(p["b"])],T.prototype,"pattern",void 0),Object(n["a"])([Object(s["b"])({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],T.prototype,"castShadows",void 0),Object(n["a"])([Object(s["b"])({type:w,json:{write:!0}})],T.prototype,"outline",void 0),Object(n["a"])([Object(s["b"])(u["a"])],T.prototype,"edges",void 0),T=x=Object(n["a"])([Object(c["a"])("esri.symbols.FillSymbol3DLayer")],T);const S=T},c15d:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i=r("a4ee"),n=r("9ef0"),a=r("6a0ed"),s=r("7ffa"),o=r("a915"),c=r("59b2"),l=(r("cea0"),r("d386")),u=r("5c00");let d=class extends a["a"]{constructor(e){super(e),this.color=new n["a"]([0,0,0,1]),this.extensionLength=0,this.size=Object(o["h"])(1)}clone(){}cloneProperties(){return{color:Object(s["a"])(this.color),size:this.size,extensionLength:this.extensionLength}}};Object(i["a"])([Object(c["b"])({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],d.prototype,"type",void 0),Object(i["a"])([Object(c["b"])(u["a"])],d.prototype,"color",void 0),Object(i["a"])([Object(c["b"])({...u["b"],json:{write:{overridePolicy:e=>({enabled:!!e})}}})],d.prototype,"extensionLength",void 0),Object(i["a"])([Object(c["b"])(u["b"])],d.prototype,"size",void 0),d=Object(i["a"])([Object(l["a"])("esri.symbols.edges.Edges3D")],d);const h=d},c15d3:function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return p}));var i=r("b2b2"),n=r("b2cd");function a(){if(Object(i["j"])(s)){const e=e=>Object(n["b"])("esri/libs/basisu/"+e);s=r.e("chunk-0d0331bd").then(r.bind(null,"a58f")).then(e=>e.b).then(({default:t})=>t({locateFile:e}).then(e=>(e.initializeBasis(),delete e.then,e)))}return s}let s;var o;!function(e){e[e.ETC1_RGB=0]="ETC1_RGB",e[e.ETC2_RGBA=1]="ETC2_RGBA",e[e.BC1_RGB=2]="BC1_RGB",e[e.BC3_RGBA=3]="BC3_RGBA",e[e.BC4_R=4]="BC4_R",e[e.BC5_RG=5]="BC5_RG",e[e.BC7_M6_RGB=6]="BC7_M6_RGB",e[e.BC7_M5_RGBA=7]="BC7_M5_RGBA",e[e.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",e[e.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",e[e.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",e[e.ATC_RGB=11]="ATC_RGB",e[e.ATC_RGBA=12]="ATC_RGBA",e[e.FXT1_RGB=17]="FXT1_RGB",e[e.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",e[e.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",e[e.ETC2_EAC_R11=20]="ETC2_EAC_R11",e[e.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",e[e.RGBA32=13]="RGBA32",e[e.RGB565=14]="RGB565",e[e.BGR565=15]="BGR565",e[e.RGBA4444=16]="RGBA4444"}(o||(o={}));var c=r("d17d"),l=r("a1ff"),u=r("8539");let d=null,h=null;async function p(){return Object(i["j"])(h)&&(h=a(),d=await h),h}function f(e,t){if(Object(i["j"])(d))return e.byteLength;const r=new d.BasisFile(new Uint8Array(e)),n=g(r)?m(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),n}function b(e,t){if(Object(i["j"])(d))return e.byteLength;const r=new d.KTX2File(new Uint8Array(e)),n=y(r)?m(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),n}function m(e,t,r,i,n){const a=Object(u["b"])(t?c["i"].COMPRESSED_RGBA8_ETC2_EAC:c["i"].COMPRESSED_RGB8_ETC2),s=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*a*s)}function g(e){return e.getNumImages()>=1&&!e.isUASTC()}function y(e){return e.getFaces()>=1&&e.isETC1S()}async function O(e,t,r){Object(i["j"])(d)&&(d=await p());const n=new d.BasisFile(new Uint8Array(r));if(!g(n))return null;n.startTranscoding();const a=_(e,t,n.getNumLevels(0),n.getHasAlpha(),n.getImageWidth(0,0),n.getImageHeight(0,0),(e,t)=>n.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>n.transcodeImage(r,0,e,t,0,0));return n.close(),n.delete(),a}async function v(e,t,r){Object(i["j"])(d)&&(d=await p());const n=new d.KTX2File(new Uint8Array(r));if(!y(n))return null;n.startTranscoding();const a=_(e,t,n.getLevels(),n.getHasAlpha(),n.getWidth(),n.getHeight(),(e,t)=>n.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>n.transcodeImage(r,e,0,0,t,0,-1,-1));return n.close(),n.delete(),a}function _(e,t,r,i,n,a,s,u){const{compressedTextureETC:d,compressedTextureS3TC:h}=e.capabilities,[p,f]=d?i?[o.ETC2_RGBA,c["i"].COMPRESSED_RGBA8_ETC2_EAC]:[o.ETC1_RGB,c["i"].COMPRESSED_RGB8_ETC2]:h?i?[o.BC3_RGBA,c["i"].COMPRESSED_RGBA_S3TC_DXT5_EXT]:[o.BC1_RGB,c["i"].COMPRESSED_RGB_S3TC_DXT1_EXT]:[o.RGBA32,c["p"].RGBA],b=t.hasMipmap?r:Math.min(1,r),m=[];for(let o=0;o<b;o++)m.push(new Uint8Array(s(o,p))),u(o,p,m[o]);const g=m.length>1,y=g?c["z"].LINEAR_MIPMAP_LINEAR:c["z"].LINEAR,O={...t,samplingMode:y,hasMipmap:g,internalFormat:f,width:n,height:a};return new l["a"](e,O,{type:"compressed",levels:m})}},c1c0:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("661c"),n=r("b2b2"),a=r("d17d"),s=r("a1ff");class o{constructor(e){this._rctx=e,this.cache=new Map}dispose(){this.cache.forEach(e=>e.texture=Object(n["e"])(e.texture)),this.cache.clear()}_acquire(e){if(Object(n["j"])(e))return null;const t=this._patternId(e),r=this.cache.get(t);if(r)return r.refCount++,r.bind;const i=e.pixelRatio,{encodedData:o,sdfNormalizer:l,pixels:u,paddedPixels:d}=c(e.pattern,i),h=u/i,p={refCount:1,texture:null,bind:e=>(Object(n["j"])(p.texture)&&(p.texture=new s["a"](this._rctx,{width:d,height:1,internalFormat:a["p"].RGBA,pixelFormat:a["p"].RGBA,dataType:a["q"].UNSIGNED_BYTE,wrapMode:a["B"].CLAMP_TO_EDGE},o)),e.bindTexture(p.texture,"stipplePatternTexture"),{pixelSize:h,sdfNormalizer:l,pixels:u})};return this.cache.set(t,p),p.bind}release(e){if(Object(n["j"])(e))return;const t=this._patternId(e),r=this.cache.get(t);r&&(r.refCount--,0===r.refCount&&(Object(n["k"])(r.texture)&&r.texture.dispose(),this.cache.delete(t)))}swap(e,t){const r=this._acquire(t);return this.release(e),r}_patternId(e){return`${e.pattern.join(",")}-r${e.pixelRatio}`}}function c(e,t){const r=e.map(e=>Math.round(e*t)),n=1/t,a=Math.floor(r.reduce((e,t)=>e+t)),s=r.reduce((e,t)=>Math.max(e,t)),o=(Math.floor(.5*(s-1))+.5)*n,c=[];let l=1;for(const i of r){for(let e=0;e<i;e++){const t=l*(Math.min(e,i-1-e)+.5)*n/o*.5+.5;c.push(t)}l=-l}const u=Math.round(r[0]/2),d=[...c.slice(u),...c.slice(0,u)],h=a+2,p=new Uint8Array(4*h);let f=4;for(const b of d)Object(i["a"])(b,p,f),f+=4;return p.copyWithin(0,f-4,f),p.copyWithin(f,4,8),{encodedData:p,sdfNormalizer:o,paddedPixels:h,pixels:a}}},c1da:function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return x})),r.d(t,"c",(function(){return S})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return m})),r.d(t,"f",(function(){return E})),r.d(t,"g",(function(){return M})),r.d(t,"h",(function(){return A})),r.d(t,"i",(function(){return ie})),r.d(t,"j",(function(){return b})),r.d(t,"k",(function(){return d})),r.d(t,"l",(function(){return p})),r.d(t,"m",(function(){return _})),r.d(t,"n",(function(){return R})),r.d(t,"o",(function(){return I})),r.d(t,"p",(function(){return H})),r.d(t,"q",(function(){return q})),r.d(t,"r",(function(){return V})),r.d(t,"s",(function(){return ne})),r.d(t,"t",(function(){return Z})),r.d(t,"u",(function(){return y})),r.d(t,"v",(function(){return X})),r.d(t,"w",(function(){return re}));var i,n=r("ce50"),a=r("b2b2"),s=r("9d1d");function o(e,t){switch(e.type){case"range":{const r="range"in e?e.range[0]:e.minValue,n="range"in e?e.range[1]:e.maxValue;if(+t<r||+t>n)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every(e=>null==e||e.code!==t))return i.INVALID_CODED_VALUE}return null}!function(e){e.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",e.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"}(i||(i={}));var c=r("82fa");const l=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],u=["field","normalizationField"];function d(e,t){if(null!=e&&null!=t)for(const r of Array.isArray(e)?e:[e])if(h(l,r,t),"visualVariables"in r&&r.visualVariables)for(const e of r.visualVariables)h(u,e,t)}function h(e,t,r){if(e)for(const i of e){const e=Object(s["b"])(i,t),n=e&&"function"!=typeof e&&r.get(e);n&&Object(s["c"])(i,n.name,t)}}function p(e,t){if(null!=e&&null!=t&&t.fields.length)if("startField"in e){const r=t.get(e.startField),i=t.get(e.endField);e.startField=r&&r.name||null,e.endField=i&&i.name||null}else{const r=t.get(e.startTimeField),i=t.get(e.endTimeField);e.startTimeField=r&&r.name||null,e.endTimeField=i&&i.name||null}}const f=new Set;function b(e,t){return e&&t?(f.clear(),m(f,e,t),Array.from(f).sort()):[]}function m(e,t,r){var i;if(r)if(null!=t&&null!=(i=t.fields)&&i.length)if(r.includes("*"))for(const{name:n}of t.fields)e.add(n);else for(const n of r)g(e,t,n);else{if(r.includes("*"))return e.clear(),void e.add("*");for(const t of r)e.add(t)}}function g(e,t,r){if("string"==typeof r)if(t){const i=t.get(r);i&&e.add(i.name)}else e.add(r)}function y(e,t){return Object(a["j"])(t)||Object(a["j"])(e)?[]:t.includes("*")?e.fields.map(e=>e.name):t}async function O(e,t,r){var i;if(!r)return;const{arcadeUtils:n}=await Object(c["e"])(),a=n.extractFieldNames(r,null==t||null==(i=t.fields)?void 0:i.map(e=>e.name));for(const s of a)g(e,t,s)}async function v(e,t,i){if(i&&"1=1"!==i){const a=(await r.e("chunk-2d0d03a7").then(r.bind(null,"66a2"))).WhereClause.create(i,t);if(!a.isStandardized)throw new n["a"]("fieldUtils:collectFilterFields","Where clause is not standardized");m(e,t,a.fieldNames)}}function _({displayField:e,fields:t}){return e||(t&&t.length?w(t,"name-or-title")||w(t,"unique-identifier")||w(t,"type-or-category")||j(t):null)}function j(e){for(const t of e){if(!t||!t.name)continue;const e=t.name.toLowerCase();if(e.indexOf("name")>-1||e.indexOf("title")>-1)return t.name}return null}function w(e,t){for(const r of e)if(r&&r.valueType&&r.valueType===t)return r.name;return null}async function x(e,t){if(!t)return;const r=Object(s["b"])("elevationInfo.featureExpressionInfo",t);return r?r.collectRequiredFields(e,t.fieldsIndex):void 0}async function T(e,t,r){r.outStatistic.onStatisticValueExpression?O(e,t,r.outStatistic.onStatisticValueExpression):e.add(r.outStatistic.onStatisticField)}async function S(e,t,r){var i,n;if(!t||!r||"cluster"!==r.type)return;const a=[];if(null!=(i=r.popupTemplate)&&i.expressionInfos&&a.push(...r.popupTemplate.expressionInfos.map(r=>O(e,t.fieldsIndex,r.expression))),Array.isArray(null==(n=r.popupTemplate)?void 0:n.content)){const i=r.popupTemplate.content;for(const r of i)"expression"===r.type&&r.expressionInfo&&a.push(O(e,t.fieldsIndex,r.expressionInfo.expression))}r.fields&&a.push(...r.fields.map(r=>T(e,t.fieldsIndex,r))),await Promise.all(a)}async function E(e,t,r){t&&(t.timeInfo&&Object(a["k"])(r)&&r.timeExtent&&m(e,t.fieldsIndex,[t.timeInfo.startField,t.timeInfo.endField]),t.floorInfo&&m(e,t.fieldsIndex,[t.floorInfo.floorField]),Object(a["k"])(r)&&Object(a["k"])(r.where)&&await v(e,t.fieldsIndex,r.where))}async function A(e,t,r){t&&r&&await Promise.all(r.map(r=>C(e,t,r)))}async function C(e,t,r){t&&r&&(r.valueExpression?await O(e,t.fieldsIndex,r.valueExpression):r.field&&g(e,t.fieldsIndex,r.field))}function R(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;return t?b(e.fieldsIndex,[t&&t.creatorField,t&&t.creationDateField,t&&t.editorField,t&&t.editDateField]):[]}async function M(e,t){const{labelingInfo:r,fieldsIndex:i}=t;r&&r.length&&await Promise.all(r.map(t=>P(e,i,t)))}async function P(e,t,r){if(!r)return;const i=r.getLabelExpression(),n=r.where;if("arcade"===i.type)await O(e,t,i.expression);else{const r=i.expression.match(/{[^}]*}/g);r&&r.forEach(r=>{g(e,t,r.slice(1,-1))})}await v(e,t,n)}function I(e){const t=e.defaultValue;return void 0!==t&&B(e,t)?t:e.nullable?null:void 0}function D(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function L(e){return null===e||D(e)}const N="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function F(e){return null===e||N(e)}function k(e){return null!=e&&"string"==typeof e}function U(e){return null===e||k(e)}function z(){return!0}function B(e,t){let r;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":r=e.nullable?F:N;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":r=e.nullable?L:D;break;case"string":case"esriFieldTypeString":r=e.nullable?U:k;break;default:r=z}return 1===arguments.length?r:r(t)}const V=["integer","small-integer","single","double"],G=new Set([...V,"esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function H(e){return null!=e&&G.has(e.type)}function q(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}var W,$;function Z(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function X(e,t){return e.nullable&&null===t?null:H(e)&&!Y(e.type,Number(t))?W.OUT_OF_RANGE:B(e,t)?e.domain?o(e.domain,t):null:$.INVALID_TYPE}function Y(e,t){const r="string"==typeof e?J(e):e;return!!r&&(r.isInteger?N(t)&&t>=r.min&&t<=r.max:t>=r.min&&t<=r.max)}function J(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Q;case"esriFieldTypeInteger":case"integer":return K;case"esriFieldTypeSingle":case"single":return ee;case"esriFieldTypeDouble":case"double":return te}}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(W||(W={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}($||($={}));const Q={min:-32768,max:32767,isInteger:!0},K={min:-2147483648,max:2147483647,isInteger:!0},ee={min:-34e37,max:12e37,isInteger:!1},te={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function re(e,t,r){switch(e){case i.INVALID_CODED_VALUE:return`Value ${r} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${r} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case $.INVALID_TYPE:return`Value ${r} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case W.OUT_OF_RANGE:{const{min:e,max:i}=J(t.type);return`Value ${r} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${i}`}}}function ie(e,t){return!ne(e,t,null)}function ne(e,t,r){if(!t||!t.attributes||!e){if(Object(a["k"])(r))for(const t of e)r.add(t);return!0}const i=t.attributes;let n=!1;for(const s of e)if(!(s in i)){if(n=!0,!Object(a["k"])(r))break;r.add(s)}return n}},c246:function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var i,n=r("a4ee"),a=r("1fd7"),s=r("fa8a"),o=r("6a0ed"),c=r("7ffa"),l=r("a915"),u=r("59b2"),d=(r("cea0"),r("afcf")),h=r("d386"),p=r("09db"),f=(r("b50f"),r("c120"),r("7b39"));let b=i=class extends o["a"]{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?Object(f["a"])(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=Object(f["a"])(this.value)),null!=e&&(t[r]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};Object(n["a"])([Object(u["b"])({type:String,json:{write:{writerEnsuresNonNull:!0}}})],b.prototype,"expression",void 0),Object(n["a"])([Object(d["a"])("expression",["expression","value"])],b.prototype,"readExpression",null),Object(n["a"])([Object(p["a"])("expression")],b.prototype,"writeExpression",null),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],b.prototype,"title",void 0),Object(n["a"])([Object(u["b"])({json:{read:!1,write:!1}})],b.prototype,"value",void 0),b=i=Object(n["a"])([Object(h["a"])("esri.layers.support.LabelExpressionInfo")],b);const m=b;var g,y=r("a6c1"),O=r("6174");const v=new s["a"]({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function _(e){return!e||"service"!==e.origin&&!j(e.layer)}function j(e){return"map-image"===(null==e?void 0:e.type)}function w(e){var t,r;return!!j(e)&&!(null==(t=e.capabilities)||null==(r=t.exportMap)||!r.supportsArcadeExpressionForLabeling)}function x(e){return _(e)||w(e.layer)}let T=g=class extends o["a"]{constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=y["d"],this.useCodedValues=void 0,this.where=null}static evaluateWhere(e,t){const r=function(e,t,r){switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){const e=r(t[i[0]],i[1],i[2]),n=i[3],a=r(t[i[4]],i[5],i[6]);switch(n){case"AND":return e&&a;case"OR":return e||a}}return!1}catch(i){console.log("Error.: can't parse = "+e)}}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=Object(f["f"])(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=Object(f["e"])(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&_(i))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const n=e.toJSON(i);n.expression&&(t[r]=n)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return Object(f["b"])(this)}getLabelExpressionArcade(){return Object(f["c"])(this)}getLabelExpressionSingleField(){return Object(f["d"])(this)}hash(){return JSON.stringify(this)}clone(){return new g({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:Object(c["a"])(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:Object(c["a"])(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],T.prototype,"name",void 0),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],T.prototype,"allowOverrun",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1}}}})],T.prototype,"deconflictionStrategy",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===(null==r?void 0:r.origin)&&w(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],T.prototype,"labelExpression",void 0),Object(n["a"])([Object(d["a"])("labelExpression")],T.prototype,"readLabelExpression",null),Object(n["a"])([Object(p["a"])("labelExpression")],T.prototype,"writeLabelExpression",null),Object(n["a"])([Object(u["b"])({type:m,json:{write:{overridePolicy:(e,t,r)=>x(r)?{allowNull:!0}:{enabled:!1}}}})],T.prototype,"labelExpressionInfo",void 0),Object(n["a"])([Object(p["a"])("labelExpressionInfo")],T.prototype,"writeLabelExpressionInfo",null),Object(n["a"])([Object(u["b"])({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],T.prototype,"labelPlacement",void 0),Object(n["a"])([Object(u["b"])({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],T.prototype,"labelPosition",void 0),Object(n["a"])([Object(u["b"])({type:Number})],T.prototype,"maxScale",void 0),Object(n["a"])([Object(p["a"])("maxScale")],T.prototype,"writeMaxScale",null),Object(n["a"])([Object(u["b"])({type:Number})],T.prototype,"minScale",void 0),Object(n["a"])([Object(p["a"])("minScale")],T.prototype,"writeMinScale",null),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:!1}}}})],T.prototype,"repeatLabel",void 0),Object(n["a"])([Object(u["b"])({type:Number,cast:l["j"],json:{write:!0,origins:{"web-scene":{write:!1}}}})],T.prototype,"repeatLabelDistance",void 0),Object(n["a"])([Object(u["b"])({types:a["g"],json:{origins:{"web-scene":{types:a["h"],write:O["c"],default:null}},write:O["c"],default:null}})],T.prototype,"symbol",void 0),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0}})],T.prototype,"useCodedValues",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:!0}})],T.prototype,"where",void 0),T=g=Object(n["a"])([Object(h["a"])("esri.layers.support.LabelClass")],T);const S=T},c24e:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("aefa");class n{constructor(e,t){this._storage=new i["c"],this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,r){this._storage.put(e,t,r,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},c2d1:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("a05b"),n=r("501b"),a=r("3886");function s(e,t){e.fragment.include(n["a"]),t.output===i["a"].Shadow?(e.extensions.add("GL_OES_standard_derivatives"),e.fragment.code.add(a["a"]`float _calculateFragDepth(const in float depth) {
  3050. const float SLOPE_SCALE = 2.0;
  3051. const float BIAS = 2.0 * .000015259;
  3052. float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
  3053. float result = depth + SLOPE_SCALE * m + BIAS;
  3054. return clamp(result, .0, .999999);
  3055. }
  3056. void outputDepth(float _linearDepth) {
  3057. gl_FragColor = float2rgba(_calculateFragDepth(_linearDepth));
  3058. }`)):t.output===i["a"].Depth&&e.fragment.code.add(a["a"]`void outputDepth(float _linearDepth) {
  3059. gl_FragColor = float2rgba(_linearDepth);
  3060. }`)}},c332:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a}));var i=r("3886");function n(e){const t=i["a"]`vec3 decodeNormal(vec2 f) {
  3061. float z = 1.0 - abs(f.x) - abs(f.y);
  3062. return vec3(f + sign(f) * min(z, 0.0), z);
  3063. }`;e.fragment.code.add(t),e.vertex.code.add(t)}var a,s=r("b7bd");function o(e,t){t.normalType===a.Attribute&&(e.attributes.add(s["a"].NORMAL,"vec3"),e.vertex.code.add(i["a"]`vec3 normalModel() {
  3064. return normal;
  3065. }`)),t.normalType===a.CompressedAttribute&&(e.include(n),e.attributes.add(s["a"].NORMALCOMPRESSED,"vec2"),e.vertex.code.add(i["a"]`vec3 normalModel() {
  3066. return decodeNormal(normalCompressed);
  3067. }`)),t.normalType===a.ScreenDerivative&&(e.extensions.add("GL_OES_standard_derivatives"),e.fragment.code.add(i["a"]`vec3 screenDerivativeNormal(vec3 positionView) {
  3068. return normalize(cross(dFdx(positionView), dFdy(positionView)));
  3069. }`))}!function(e){e[e.Attribute=0]="Attribute",e[e.CompressedAttribute=1]="CompressedAttribute",e[e.Ground=2]="Ground",e[e.ScreenDerivative=3]="ScreenDerivative",e[e.COUNT=4]="COUNT"}(a||(a={}))},c332f:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e,t){const r=e.vertex;t.silhouette?(r.code.add(i["a"]`bool isSilhouetteEdge(vec3 viewDir, vec3 normalA, vec3 normalB) {
  3070. float faceAVisible = dot(viewDir, normalA);
  3071. float faceBVisible = dot(viewDir, normalB);
  3072. return faceAVisible * faceBVisible < 0.0;
  3073. }`),t.legacy?r.code.add(i["a"]`bool discardNonSilhouetteEdges(vec3 viewPos, vec3 worldPos) {
  3074. vec3 viewNormalA = _modelToViewNormal(normalA);
  3075. vec3 viewNormalB = _modelToViewNormal(normalB);
  3076. vec3 viewDir = -viewPos;
  3077. if (isSilhouetteEdge(viewDir, viewNormalA, viewNormalB)) {
  3078. return false;
  3079. }
  3080. gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
  3081. return true;
  3082. }`):r.code.add(i["a"]`bool discardNonSilhouetteEdges(vec3 viewPos, vec3 worldPos) {
  3083. vec3 worldNormalA = _modelToWorldNormal(normalA);
  3084. vec3 worldNormalB = _modelToWorldNormal(normalB);
  3085. vec3 viewDir = -worldPos;
  3086. if (isSilhouetteEdge(viewDir, worldNormalA, worldNormalB)) {
  3087. return false;
  3088. }
  3089. gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
  3090. return true;
  3091. }`)):r.code.add(i["a"]`bool discardNonSilhouetteEdges(vec3 viewPos, vec3 worldPos) {
  3092. return false;
  3093. }`)}},c39b:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i=r("ce6d"),n=r("c120"),a=r("901f"),s=r("ee0e"),o=r("ba6a"),c=r("ae54");const l={added:[],removed:[]},u=new Set,d=new c["a"](0,0,0,0);class h extends i["a"]{constructor(e){super(),this._tiles=new Map,this._index=Object(a["a"])(9,Object(n["a"])("esri-csp-restrictions")?e=>({minX:e.bounds[0],minY:e.bounds[1],maxX:e.bounds[2],maxY:e.bounds[3]}):[".bounds[0]",".bounds[1]",".bounds[2]",".bounds[3]"]),this.tiles=[],this.tileScheme=e}destroy(){this.clear()}clear(){this.tiles.length=0,this._tiles.clear(),this._index.clear()}has(e){return this._tiles.has(e)}get(e){return this._tiles.get(e)}boundsIntersections(e){return this._index.search({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]})}updateTiles(e){const t={added:[],removed:[]};for(const r of e.added)if(!this.has(r)){const e=new s["a"](this.tileScheme,r);this._tiles.set(r,e),this._index.insert(e),t.added.push(e)}for(const r of e.removed)if(this.has(r)){const e=this.get(r);this._tiles.delete(r),this._index.remove(e),t.removed.push(e)}this.tiles.length=0,this._tiles.forEach(e=>this.tiles.push(e)),(t.added.length||t.removed.length)&&this.emit("update",t)}setViewState(e){const t=this.tileScheme.getTileCoverage(e,0);if(!t)return;const{spans:r,lodInfo:i}=t,{level:n}=i;if(r.length>0)for(const{row:a,colFrom:o,colTo:c}of r)for(let e=o;e<=c;e++){const t=d.set(n,a,i.normalizeCol(e),i.getWorldForColumn(e)).id;if(u.add(t),!this.has(t)){const e=new s["a"](this.tileScheme,t);this._tiles.set(t,e),this._index.insert(e),this.tiles.push(e),l.added.push(e)}}for(let a=this.tiles.length-1;a>=0;a--){const e=this.tiles[a];u.has(e.id)||(this._tiles.delete(e.id),this.tiles.splice(a,1),this._index.remove(e),l.removed.push(e))}(l.added.length||l.removed.length)&&this.emit("update",l),o["a"].pool.release(t),u.clear(),l.added.length=0,l.removed.length=0}}},c3a3:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e,t){const r=e.fragment;r.constants.add("coverageTestThreshold","float",.01),t.antialiasing?r.code.add(i["a"]`#define discardByCoverage(radius, coverage) { if (coverage < coverageTestThreshold) discard; }`):r.code.add(i["a"]`#define discardByCoverage(radius, coverage) { float coverageLimit = radius <= 0.5 ? coverageTestThreshold : 0.75; if (coverage < coverageLimit) discard; }`)}},c3a4:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e,t){this._module=e,this._loadModule=t}get(){return this._module}async reload(){return this._module=await this._loadModule(),this._module}}},c3fcb:function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var i,n=r("a4ee"),a=r("ce50"),s=r("fa8a"),o=r("e92d"),c=r("a915"),l=r("59b2"),u=(r("b50f"),r("c120"),r("1a3e")),d=r("afcf"),h=r("d386"),p=r("09db"),f=r("5dd5"),b=r("9a81"),m=(r("cea0"),r("5b83"));let g=i=class extends m["a"]{constructor(){super(...arguments),this.customValues=null}clone(){return new i({title:this.title,showLegend:this.showLegend,customValues:this.customValues&&this.customValues.slice(0)})}};Object(n["a"])([Object(l["b"])({type:[Number],json:{write:!0}})],g.prototype,"customValues",void 0),g=i=Object(n["a"])([Object(h["a"])("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],g);const y=g;var O,v=r("86f2d"),_=r("d297");const j=o["a"].getLogger("esri.renderers.visualVariables.SizeVariable"),w=new s["a"]({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),x=new s["a"]({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});function T(e){if(null!=e)return"string"==typeof e||"number"==typeof e?Object(c["j"])(e):"size"===e.type?Object(v["e"])(e)?e:(delete(e={...e}).type,new E(e)):void 0}function S(e,t,r){if("object"!=typeof e)return e;const i=new E;return i.read(e,r),i}let E=O=class extends f["a"]{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:_["viewScaleRE"].test(this.valueExpression)}}set expression(e){j.warn("'expression' is deprecated since version 4.2. Use 'valueExpression' instead. The only supported expression is 'view.scale'."),"view.scale"===e?(this.valueExpression="$view.scale",this._set("expression",e)):this._set("expression",null)}set index(e){Object(v["e"])(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),Object(v["e"])(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return Object(v["c"])(this)}set maxDataValue(e){e&&this.stops&&(j.warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}set maxSize(e){e&&this.stops&&(j.warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",e)}castMaxSize(e){return T(e)}readMaxSize(e,t,r){return S(e,t,r)}set minDataValue(e){e&&this.stops&&(j.warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}set minSize(e){e&&this.stops&&(j.warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",e)}castMinSize(e){return T(e)}readMinSize(e,t,r){return S(e,t,r)}get arcadeRequired(){return!!this.valueExpression||this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(j.warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return Object(v["d"])(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,r,i){if("$view.scale"===e){if(i&&i.messages){const e=this.index,t="string"==typeof e?e:`visualVariables[${e}]`;i.messages.push(new a["a"]("property:unsupported",this.type+"VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:t+".valueExpression",context:i}))}}else t[r]=e}readValueUnit(e){return e?x.read(e):null}clone(){return new O({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:Object(v["e"])(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:Object(v["e"])(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone()})}flipSizes(){if(this.transformationType===v["b"].ClampedLinear){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if(this.transformationType===v["b"].Stops){const e=this.stops,t=e.map(e=>e.size).reverse(),r=e.length;for(let i=0;i<r;i++)e[i].size=t[i];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};Object(n["a"])([Object(l["b"])({readOnly:!0})],E.prototype,"cache",null),Object(n["a"])([Object(l["b"])({type:w.apiValues,json:{type:w.jsonValues,origins:{"web-map":{read:!1}},read:w.read,write:w.write}})],E.prototype,"axis",void 0),Object(n["a"])([Object(l["b"])({type:String,value:null,json:{read:!1}})],E.prototype,"expression",null),Object(n["a"])([Object(l["b"])()],E.prototype,"index",null),Object(n["a"])([Object(l["b"])({type:String,readOnly:!0})],E.prototype,"inputValueType",null),Object(n["a"])([Object(l["b"])({type:y,json:{write:!0}})],E.prototype,"legendOptions",void 0),Object(n["a"])([Object(l["b"])({type:Number,value:null,json:{write:!0}})],E.prototype,"maxDataValue",null),Object(n["a"])([Object(l["b"])({type:Number,value:null,json:{write:!0}})],E.prototype,"maxSize",null),Object(n["a"])([Object(u["a"])("maxSize")],E.prototype,"castMaxSize",null),Object(n["a"])([Object(d["a"])("maxSize")],E.prototype,"readMaxSize",null),Object(n["a"])([Object(l["b"])({type:Number,value:null,json:{write:!0}})],E.prototype,"minDataValue",null),Object(n["a"])([Object(l["b"])({type:Number,value:null,json:{write:!0}})],E.prototype,"minSize",null),Object(n["a"])([Object(u["a"])("minSize")],E.prototype,"castMinSize",null),Object(n["a"])([Object(d["a"])("minSize")],E.prototype,"readMinSize",null),Object(n["a"])([Object(l["b"])({type:String,json:{write:!0}})],E.prototype,"normalizationField",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],E.prototype,"arcadeRequired",null),Object(n["a"])([Object(l["b"])({type:String})],E.prototype,"scaleBy",void 0),Object(n["a"])([Object(l["b"])({type:[b["a"]],value:null,json:{write:!0}})],E.prototype,"stops",null),Object(n["a"])([Object(l["b"])({type:["outline"],json:{write:!0}})],E.prototype,"target",void 0),Object(n["a"])([Object(l["b"])({type:String,readOnly:!0})],E.prototype,"transformationType",null),Object(n["a"])([Object(l["b"])({type:["size"],json:{type:["sizeInfo"]}})],E.prototype,"type",void 0),Object(n["a"])([Object(l["b"])({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],E.prototype,"useSymbolValue",void 0),Object(n["a"])([Object(l["b"])({type:String,json:{write:!0}})],E.prototype,"valueExpression",void 0),Object(n["a"])([Object(d["a"])("valueExpression",["valueExpression","expression"])],E.prototype,"readValueExpression",null),Object(n["a"])([Object(p["a"])("web-scene","valueExpression")],E.prototype,"writeValueExpressionWebScene",null),Object(n["a"])([Object(l["b"])({type:["radius","diameter","area","width","distance"],json:{write:!0}})],E.prototype,"valueRepresentation",void 0),Object(n["a"])([Object(l["b"])({type:x.apiValues,json:{write:x.write,origins:{"web-map":{read:!1},"web-scene":{write:!0}}}})],E.prototype,"valueUnit",void 0),Object(n["a"])([Object(d["a"])("valueUnit")],E.prototype,"readValueUnit",null),E=O=Object(n["a"])([Object(h["a"])("esri.renderers.visualVariables.SizeVariable")],E);const A=E},c45a:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("b2b2"),n=r("b0ea");class a{constructor(){this.enabled=!0,this._time=0}get time(){return Object(n["a"])(this._time)}advance(e){return Object(i["k"])(e.forcedTime)?this._time!==e.forcedTime&&(this._time=e.forcedTime,!0):!(!this.enabled||0===e.dt)&&(this._time+=e.dt,!0)}}},c478:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f}));var i=r("b50f"),n=r("ce50"),a=r("e92d"),s=r("92ef"),o=r("4c37"),c=r("7ed0");const l=a["a"].getLogger("esri.core.accessorSupport.write");function u(e,t,r,i,n){var a,s;const o={};return null==(a=t.write)||null==(s=a.writer)||s.call(e,i,o,r,n),o}function d(e,t,r,i,a,o){if(!i||!i.write)return!1;const c=e.get(r);if(!a&&i.write.overridePolicy){const t=i.write.overridePolicy.call(e,c,r,o);void 0!==t&&(a=t)}if(a||(a=i.write),!a||!1===a.enabled)return!1;if((null===c&&!a.allowNull&&!a.writerEnsuresNonNull||void 0===c)&&a.isRequired){const t=new n["a"]("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&o&&o.messages?o.messages.push(t):t&&!o&&l.error(t.name,t.message),!1}return void 0!==c&&(!(null===c&&!a.allowNull&&!a.writerEnsuresNonNull)&&(!((!t.store.multipleOriginsSupported||t.store.originOf(r)===s["a"].DEFAULTS)&&h(e,r,o,i,c))&&!(!a.ignoreOrigin&&o&&o.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<Object(s["e"])(o.origin))))}function h(e,t,r,n,a){const s=n.default;if(void 0===s)return!1;if(null!=n.defaultEquals)return n.defaultEquals(a);if("function"==typeof s){if(Array.isArray(a)){const n=s.call(e,t,r);return Object(i["e"])(n,a)}return!1}return s===a}function p(e,t,r,i){const n=Object(o["a"])(e),a=n.metadatas,s=Object(c["c"])(a[t],i);return!!s&&d(e,n,t,s,r,i)}function f(e,t,r){if(e&&"function"==typeof e.toJSON&&(!e.toJSON.isDefaultToJSON||!e.write))return Object(o["c"])(t,e.toJSON());const i=Object(o["a"])(e),n=i.metadatas;for(const h in n){const p=Object(c["c"])(n[h],r);if(!d(e,i,h,p,void 0,r))continue;const f=e.get(h),b=u(e,p,p.write&&"string"==typeof p.write.target?p.write.target:h,f,r);var a,l;Object.keys(b).length>0&&(t=Object(o["c"])(t,b),null!=r&&null!=(a=r.resources)&&null!=(l=a.pendingOperations)&&l.length&&Promise.all(r.resources.pendingOperations).then(()=>Object(o["c"])(t,b)),r&&r.writtenProperties&&r.writtenProperties.push({target:e,propName:h,oldOrigin:Object(s["d"])(i.store.originOf(h)),newOrigin:r.origin}))}return t}},c47a:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));r("b2b2");function i(e,t){for(const r of e.entries())if(t(r[0]))return!0;return!1}},c514:function(e,t,r){"use strict";function i(e){return window.WebGL2RenderingContext&&e instanceof window.WebGL2RenderingContext}r.d(t,"a",(function(){return i}))},c51b:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.vertex.code.add(i["a"]`const float PI = 3.141592653589793;`),e.fragment.code.add(i["a"]`const float PI = 3.141592653589793;
  3094. const float LIGHT_NORMALIZATION = 1.0 / PI;
  3095. const float INV_PI = 0.3183098861837907;
  3096. const float HALF_PI = 1.570796326794897;`)}},c528:function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var i=r("a4ee"),n=r("2c4f"),a=r("7d7d"),s=r("e92d"),o=r("e041"),c=r("0028"),l=r("59b2"),u=(r("b50f"),r("c120"),r("1a3e")),d=r("afcf"),h=r("d386"),p=r("09db"),f=r("0224"),b=r("fcf2"),m=r("05c5"),g=r("c128"),y=r("6005"),O=r("8d66"),v=r("e1bb"),_=r("3ad7"),j=r("0d93"),w=r("961d"),x=r("a957"),T=r("16e0"),S=r("b724"),E=r("505a");const A={icon:y["a"],object:v["a"],line:O["a"],path:_["a"],fill:g["a"],extrude:m["a"],text:x["a"],water:T["a"]},C=n["a"].ofType({base:w["a"],key:"type",typeMap:A,errorContext:"symbol-layer"}),R=s["a"].getLogger("esri.symbols.Symbol3D");let M=class extends j["a"]{constructor(e){super(e),this.styleOrigin=null,this.thumbnail=null,this.type=null;const t=this.__accessor__&&this.__accessor__.metadatas&&this.__accessor__.metadatas.symbolLayers,r=t&&t.type||n["a"];this._set("symbolLayers",new r)}get color(){return null}set color(e){this.initialized&&R.error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")}set symbolLayers(e){Object(a["b"])(e,this._get("symbolLayers"))}readStyleOrigin(e,t,r){if(e.styleUrl&&e.name){const t=Object(b["b"])(e.styleUrl,r);return new S["a"]({styleUrl:t,name:e.name})}if(e.styleName&&e.name)return new S["a"]({portal:r&&r.portal||f["a"].getDefault(),styleName:e.styleName,name:e.name});r&&r.messages&&r.messages.push(new c["a"]("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:r,definition:e}))}writeStyleOrigin(e,t,r,i){if(e.styleUrl&&e.name){let r=Object(b["f"])(e.styleUrl,i);Object(o["u"])(r)&&(r=Object(o["F"])(r)),t.styleOrigin={styleUrl:r,name:e.name}}else e.styleName&&e.name&&(e.portal&&i&&i.portal&&!Object(o["t"])(e.portal.restUrl,i.portal.restUrl)?i&&i.messages&&i.messages.push(new c["a"]("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):t.styleOrigin={styleName:e.styleName,name:e.name})}normalizeCtorArgs(e){return e instanceof w["a"]||e&&A[e.type]?{symbolLayers:[e]}:Array.isArray(e)?{symbolLayers:e}:e}};Object(i["a"])([Object(l["b"])({json:{read:!1,write:!1}})],M.prototype,"color",null),Object(i["a"])([Object(l["b"])({type:C,nonNullable:!0,json:{write:!0}}),Object(u["a"])(a["a"])],M.prototype,"symbolLayers",null),Object(i["a"])([Object(l["b"])({type:S["a"]})],M.prototype,"styleOrigin",void 0),Object(i["a"])([Object(d["a"])("styleOrigin")],M.prototype,"readStyleOrigin",null),Object(i["a"])([Object(p["a"])("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],M.prototype,"writeStyleOrigin",null),Object(i["a"])([Object(l["b"])({type:E["a"],json:{read:!1}})],M.prototype,"thumbnail",void 0),Object(i["a"])([Object(l["b"])({type:["point-3d","line-3d","polygon-3d","mesh-3d","label-3d"],readOnly:!0})],M.prototype,"type",void 0),M=Object(i["a"])([Object(h["a"])("esri.symbols.Symbol3D")],M);const P=M},c649:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s}));var i=r("b2b2");function n(e){return a(()=>e.forEach(e=>Object(i["k"])(e)&&e.remove()))}function a(e){return{remove:()=>{e&&(e(),e=void 0)}}}function s(e,t){const r=setTimeout(e,t);return a(()=>clearTimeout(r))}},c6ac:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return s}));r("c120");function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8;default:return}}function n(e){switch(e){case"u8":case"u16":case"u32":return!1;case"i8":case"i16":case"i32":case"f32":case"f64":return!0;default:return}}function a(e){switch(e){case"u8":case"u16":case"u32":case"i8":case"i16":case"i32":return!0;case"f32":case"f64":return!1;default:return}}function s(e){switch(e){case"u8":return 255;case"u16":return 65535;case"u32":return 4294967295;case"i8":return 127;case"i16":return 32767;case"i32":return 2147483647;case"f32":return 3402823e32;case"f64":return 179769e303;default:return}}},c6d7:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n}));var i=r("3886");function n(e,t){e.fragment.uniforms.add("terrainDepthTexture","sampler2D"),e.fragment.uniforms.add("nearFar","vec2"),e.fragment.uniforms.add("inverseViewport","vec2"),e.fragment.code.add(i["a"]`
  3097. // Compare the linearized depths of fragment and terrain. Discard fragments on the wrong side of the terrain.
  3098. void terrainDepthTest(vec4 fragCoord, float fragmentDepth){
  3099. float terrainDepth = linearDepthFromTexture(terrainDepthTexture, fragCoord.xy * inverseViewport, nearFar);
  3100. if(fragmentDepth ${t.cullAboveGround?">":"<="} terrainDepth){
  3101. discard;
  3102. }
  3103. }
  3104. `)}function a(e,t){t.multipassTerrainEnabled&&t.terrainLinearDepthTexture&&e.bindTexture(t.terrainLinearDepthTexture,"terrainDepthTexture")}},c740:function(e,t,r){"use strict";var i=r("23e7"),n=r("b727").findIndex,a=r("44d2"),s="findIndex",o=!0;s in[]&&Array(1)[s]((function(){o=!1})),i({target:"Array",proto:!0,forced:o},{findIndex:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}}),a(s)},c829:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("b2b2"),n=r("8a44"),a=r("1956");class s{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new n["a"]({deallocator:null}),this._glProgram=e.programCache.acquire(t.generateSource("vertex"),t.generateSource("fragment"),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this._fragmentUniforms=Object(a["b"])()?t.fragmentUniforms.entries:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get isCompiled(){return this._glProgram.isCompiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2f(e,t,r){this._glProgram.setUniform2f(e,t,r)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3f(e,t,r,i){this._glProgram.setUniform3f(e,t,r,i)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4f(e,t,r,i,n){this._glProgram.setUniform4f(e,t,r,i,n)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(Object(i["j"])(e)||null==e.glName){const e=this._textures.get(t);return e&&(this._context.bindTexture(null,e.unit),this._freeTextureUnit(e),this._textures.delete(t)),null}let r=this._textures.get(t);return null==r?(r=this._allocTextureUnit(e),this._textures.set(t,r)):r.texture=e,this._context.useProgram(this),this.setUniform1i(t,r.unit),this._context.bindTexture(e,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)}),Object(i["k"])(this._fragmentUniforms)&&this._fragmentUniforms.forEach(e=>{if(("sampler2D"===e.type||"samplerCube"===e.type)&&!this._textures.has(e.name))throw new Error(`Texture sampler ${e.name} has no bound texture`)})}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}},c89c:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("bb72"),n=r("e9fc"),a=r("69dd");async function s(e,t,r){const s=Object(i["c"])(e);return Object(n["executeQueryForCount"])(s,a["a"].from(t),{...r}).then(e=>e.data.count)}},c8d5:function(e,t,r){"use strict";r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return C}));var i=r("a4ee"),n=r("fc29"),a=r("38a4"),s=r("b2b2"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("d791"),u=r("afe1"),d=r("e431"),h=r("0b2d"),p=r("3cac"),f=r("b165"),b=r("c3a4"),m=r("ca98"),g=r("fa1e"),y=r("c829"),O=r("d17d"),v=r("189c");class _ extends m["a"]{constructor(e){super(e,null,()=>this.destroy())}initializeProgram(e){const t=_.shader.get().build();return new y["a"](e.rctx,t,g["a"])}initializePipeline(){return Object(v["g"])({blending:Object(v["i"])(O["b"].ONE,O["b"].SRC_ALPHA),depthTest:{func:O["h"].LEQUAL},colorWrite:v["d"]})}}_.shader=new b["a"](f["a"],()=>r.e("chunk-2d22cac2").then(r.bind(null,"f3dc")));var j=r("75cc"),w=r("d5f7");let x=class extends n["a"]{constructor(e){super(e),this._inverseProjectionMatrix=Object(u["d"])(),this._inverseViewMatrix=Object(u["d"])(),this._technique=new _(e),this._vao=Object(w["d"])(e.rctx),this._setDefaultParallax(e.radius)}destroy(){this._technique=Object(s["r"])(this._technique),this._vao=Object(s["e"])(this._vao)}render(e,t,r){this._parameters.clouds=t;const i=e.camera;if(Object(s["j"])(this._vao)||Object(s["j"])(i))return;const n=e.rctx,a=n.useTechnique(this._technique);e.scenelightingData.setLightDirectionUniform(a),e.scenelightingData.setUniforms(a,!1,!1),Object(l["b"])(this._inverseProjectionMatrix,i.projectionMatrix),Object(l["b"])(this._inverseViewMatrix,i.viewMatrix),a.setUniformMatrix4fv("inverseProjectionMatrix",this._inverseProjectionMatrix),a.setUniformMatrix4fv("inverseViewMatrix",this._inverseViewMatrix),a.setUniform2f("cloudVariables",this._parameters.clouds.coverage,this._parameters.clouds.absorption),this._setParallaxParams(i.eye,r),e.cloudsCompositionParams=this._parameters,C(a,i,this._parameters),n.bindVAO(this._vao),a.assertCompatibleVertexAttributeLocations(this._vao),n.drawArrays(O["r"].TRIANGLE_STRIP,0,4)}get isFading(){return this._parameters.crossFade.stage!==E.FINISHED||this._parameters.fadeInOut.stage!==S.FINISHED||this._parameters.fadeIn.stage!==T.FINISHED||this._parameters.fadeInOutHeight.stage!==A.FINISHED}_setDefaultParallax(e){this._parameters={parallax:{anchorPointClouds:Object(h["f"])(),radius:e,cloudsHeight:1e5,radiusCurvatureCorrectionFactor:0,transform:Object(u["d"])()},parallaxNew:{anchorPointClouds:Object(h["f"])(),radius:e,cloudsHeight:1e5,radiusCurvatureCorrectionFactor:0,transform:Object(u["d"])()},crossFade:{stage:E.FINISHED,factor:0,distanceThresholdFactor:.3},fadeInOut:{stage:S.FINISHED,factor:0,distanceThresholdFactor:.6},fadeIn:{stage:T.FINISHED,factor:0,distanceThresholdFactor:2},fadeInOutHeight:{stage:A.FINISHED,factor:-1},cameraPositionLastFrame:Object(h["f"])(),startTime:0,startTimeHeightFade:0,clouds:null}}_isCameraPositionFinal(e){return Object(d["E"])(this._parameters.cameraPositionLastFrame,e)}_setFadeInStage(e){const t=this._isCameraPositionFinal(e);this._parameters.fadeIn.stage===T.FINISHED&&(this._parameters.fadeIn.factor=1,Object(d["m"])(this._parameters.parallax.anchorPointClouds,P),this._parameters.fadeIn.stage=T.CHANGE_ANCHOR,this._parameters.crossFade.stage=E.FINISHED,this._parameters.fadeInOut.stage=S.FINISHED),this._parameters.fadeIn.stage===T.CHANGE_ANCHOR&&t&&(Object(d["m"])(this._parameters.parallax.anchorPointClouds,P),this._parameters.fadeIn.stage=T.FADE_IN,this._parameters.startTime=performance.now()),this._parameters.fadeIn.factor>0&&this._parameters.fadeIn.stage===T.FADE_IN&&(this._parameters.fadeIn.factor=1-(performance.now()-this._parameters.startTime)/500),this._parameters.fadeIn.factor<=0&&this._parameters.fadeIn.stage===T.FADE_IN&&(this._parameters.fadeIn.stage=T.FINISHED,this._parameters.fadeIn.factor=0)}_setCrossFadingStage(){this._parameters.crossFade.stage===E.FINISHED&&(Object(d["m"])(this._parameters.parallaxNew.anchorPointClouds,P),this._parameters.startTime=performance.now(),this._parameters.crossFade.factor=0,this._parameters.crossFade.stage=E.CROSS_FADE),this._parameters.crossFade.factor<1&&this._parameters.crossFade.stage===E.CROSS_FADE&&(this._parameters.crossFade.factor=(performance.now()-this._parameters.startTime)/500),this._parameters.crossFade.factor>=1&&this._parameters.crossFade.stage===E.CROSS_FADE&&(this._parameters.crossFade.stage=E.FINISHED,this._parameters.crossFade.factor=1,Object(d["m"])(this._parameters.parallax.anchorPointClouds,this._parameters.parallaxNew.anchorPointClouds))}_setFadeInOutStage(e){this._parameters.fadeInOut.stage===S.FINISHED&&(this._parameters.startTime=performance.now(),this._parameters.fadeInOut.factor=0,this._parameters.fadeInOut.stage=S.FADE_OUT),this._parameters.fadeInOut.factor<1&&this._parameters.fadeInOut.stage===S.FADE_OUT&&(this._parameters.fadeInOut.factor=(performance.now()-this._parameters.startTime)/250),this._parameters.fadeInOut.factor>=1&&this._parameters.fadeInOut.stage===S.FADE_OUT&&(this._parameters.fadeInOut.factor=1,Object(d["m"])(this._parameters.parallax.anchorPointClouds,P)),this._parameters.fadeInOut.factor>=1&&this._parameters.fadeInOut.stage===S.FADE_OUT&&this._isCameraPositionFinal(e)&&(this._parameters.startTime=performance.now(),this._parameters.fadeInOut.factor=1,this._parameters.fadeInOut.stage=S.FADE_IN,this._parameters.crossFade.stage=E.FINISHED,this._parameters.crossFade.factor=0),this._parameters.fadeInOut.factor>0&&this._parameters.fadeInOut.stage===S.FADE_IN&&(this._parameters.fadeInOut.factor=1-(performance.now()-this._parameters.startTime)/500),this._parameters.fadeInOut.factor<=0&&this._parameters.fadeInOut.stage===S.FADE_IN&&(this._parameters.fadeInOut.stage=S.FINISHED,this._parameters.fadeInOut.factor=0)}_setFadeInOutHeight(e){const t=performance.now();this._parameters.startTimeHeightFade=this._parameters.fadeInOutHeight.stage===A.FINISHED?t:this._parameters.startTimeHeightFade,e?this._parameters.fadeInOutHeight.factor+=(t-this._parameters.startTimeHeightFade)/500:this._parameters.fadeInOutHeight.factor-=(t-this._parameters.startTimeHeightFade)/500,this._parameters.startTimeHeightFade=t,this._parameters.fadeInOutHeight.factor=Object(a["f"])(this._parameters.fadeInOutHeight.factor,0,1),this._parameters.fadeInOutHeight.stage=A.HEIGHT_FADE}_setParallaxParams(e,t){this._parameters.fadeInOutHeight.factor<0&&(this._parameters.fadeInOutHeight.factor=Object(d["r"])(e)-this._parameters.parallax.radius>j["b"]?1:0),Object(d["t"])(P,e),Object(d["g"])(P,P,this._parameters.parallax.radius),0===this._parameters.parallax.anchorPointClouds[0]&&0===this._parameters.parallax.anchorPointClouds[1]&&0===this._parameters.parallax.anchorPointClouds[2]&&Object(d["m"])(this._parameters.parallax.anchorPointClouds,P);const r=Object(d["r"])(Object(d["l"])(I,this._parameters.parallax.anchorPointClouds,P));let i=!0;r>this._parameters.fadeIn.distanceThresholdFactor*this._parameters.parallax.cloudsHeight||this._parameters.fadeIn.stage!==T.FINISHED?this._setFadeInStage(e):r>this._parameters.fadeInOut.distanceThresholdFactor*this._parameters.parallax.cloudsHeight||this._parameters.fadeInOut.stage!==S.FINISHED?this._setFadeInOutStage(e):r>this._parameters.crossFade.distanceThresholdFactor*this._parameters.parallax.cloudsHeight&&!t||this._parameters.crossFade.stage!==E.FINISHED?this._setCrossFadingStage():i=!1;const n=Object(d["r"])(e),a=n-this._parameters.parallax.radius;(a>1.7*j["b"]||a<-j["b"])&&this._parameters.fadeInOutHeight.factor<1?this._parameters.fadeInOutHeight.factor=1:(a>j["b"]||a<-.35*j["b"])&&this._parameters.fadeInOutHeight.factor<1?this._setFadeInOutHeight(!0):a<j["b"]&&a>-.35*j["b"]&&this._parameters.fadeInOutHeight.factor>0?this._setFadeInOutHeight(!1):this._parameters.fadeInOutHeight.stage=A.FINISHED,this._parameters.parallax.radiusCurvatureCorrectionFactor=.84*Math.sqrt(Math.max(n*n-this._parameters.parallax.radius*this._parameters.parallax.radius,0))/n,Object(p["c"])(R,this._parameters.parallax.anchorPointClouds,M),this._parameters.parallax.transform=Object(u["d"])(),Object(l["f"])(this._parameters.parallax.transform,this._parameters.parallax.transform,M[3],Object(p["a"])(M)),i&&(Object(p["c"])(R,this._parameters.parallaxNew.anchorPointClouds,M),this._parameters.parallaxNew.transform=Object(u["d"])(),Object(l["f"])(this._parameters.parallaxNew.transform,this._parameters.parallaxNew.transform,M[3],Object(p["a"])(M))),Object(d["m"])(this._parameters.cameraPositionLastFrame,e)}};var T,S,E,A;function C(e,t,r){e.bindTexture(r.clouds.cubeMap.colorTexture,"cubeMap"),e.setUniform1f("cloudsHeight",r.parallax.cloudsHeight),e.setUniformMatrix4fv("rotationMatrixClouds",r.parallax.transform),e.setUniformMatrix4fv("rotationMatrixCloudsCrossFade",r.parallaxNew.transform),e.setUniform3fv("anchorPosition",r.parallax.anchorPointClouds),e.setUniform3fv("anchorPositionCrossFade",r.parallaxNew.anchorPointClouds),r.fadeInOut.stage!==S.FINISHED?e.setUniform1f("totalFadeInOut",r.fadeInOutHeight.factor+Math.max(Object(a["f"])(r.fadeInOut.factor,0,1))):e.setUniform1f("totalFadeInOut",r.fadeInOutHeight.factor+Math.max(Object(a["f"])(r.fadeIn.factor,0,1))),e.setUniform1f("radiusCurvatureCorrectionFactor",r.parallax.radiusCurvatureCorrectionFactor),e.setUniform1i("crossFade",r.crossFade.stage),e.setUniform1f("crossFadeAnchorFactor",Object(a["f"])(r.crossFade.factor,0,1)),e.setUniform1f("radius",r.parallax.radius),e.setUniform3fv("cameraPosition",t.eye)}Object(i["a"])([Object(o["b"])({constructOnly:!0})],x.prototype,"rctx",void 0),Object(i["a"])([Object(o["b"])({constructOnly:!0})],x.prototype,"viewingMode",void 0),Object(i["a"])([Object(o["b"])({constructOnly:!0})],x.prototype,"radius",void 0),x=Object(i["a"])([Object(c["a"])("esri.views.3d.environment.CloudsComposition")],x),function(e){e[e.FINISHED=0]="FINISHED",e[e.CHANGE_ANCHOR=1]="CHANGE_ANCHOR",e[e.FADE_IN=2]="FADE_IN"}(T||(T={})),function(e){e[e.FINISHED=0]="FINISHED",e[e.FADE_OUT=1]="FADE_OUT",e[e.FADE_IN=2]="FADE_IN"}(S||(S={})),function(e){e[e.FINISHED=0]="FINISHED",e[e.CROSS_FADE=1]="CROSS_FADE"}(E||(E={})),function(e){e[e.FINISHED=0]="FINISHED",e[e.HEIGHT_FADE=1]="HEIGHT_FADE"}(A||(A={}));const R=Object(h["h"])(0,0,1),M=Object(p["b"])(),P=Object(h["f"])(),I=Object(h["f"])()},c8d6:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0")),c=r("d386");function l(e){const{exifInfo:t,exifName:r,tagName:i}=e;if(!t||!r||!i)return null;const n=t.find(e=>e.name===r);return n?u({tagName:i,tags:n.tags}):null}function u(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find(e=>e.name===t);return i&&i.value||null}const d={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let h=i=class extends a["a"]{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=l({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return d[t]||null}clone(){return new i({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};Object(n["a"])([Object(s["b"])({type:String})],h.prototype,"contentType",void 0),Object(n["a"])([Object(s["b"])()],h.prototype,"exifInfo",void 0),Object(n["a"])([Object(s["b"])({readOnly:!0})],h.prototype,"orientationInfo",null),Object(n["a"])([Object(s["b"])({type:o["a"]})],h.prototype,"id",void 0),Object(n["a"])([Object(s["b"])({type:String})],h.prototype,"globalId",void 0),Object(n["a"])([Object(s["b"])({type:String})],h.prototype,"keywords",void 0),Object(n["a"])([Object(s["b"])({type:String})],h.prototype,"name",void 0),Object(n["a"])([Object(s["b"])({json:{read:!1}})],h.prototype,"parentGlobalId",void 0),Object(n["a"])([Object(s["b"])({json:{read:!1}})],h.prototype,"parentObjectId",void 0),Object(n["a"])([Object(s["b"])({type:o["a"]})],h.prototype,"size",void 0),Object(n["a"])([Object(s["b"])({json:{read:!1}})],h.prototype,"url",void 0),h=i=Object(n["a"])([Object(c["a"])("esri.layers.support.AttachmentInfo")],h);const p=h},c919:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=(r("e92d"),r("cea0"),r("b50f"),r("c120"),r("2dd4"),r("448d")),s=r("d386"),o=r("c15d");let c=i=class extends o["a"]{constructor(e){super(e),this.type="solid"}clone(){return new i(this.cloneProperties())}};Object(n["a"])([Object(a["a"])({solid:"solid"},{readOnly:!0})],c.prototype,"type",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.symbols.support.SolidEdges3D")],c);const l=c},ca67:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var i=r("2aad"),n=r("3886"),a=r("690a");function s(){const e=new a["a"];e.include(i["a"],!1),e.fragment.uniforms.add("tileRows","float").add("tileSize","float");const t=2,r=8;return e.fragment.code.add(n["a"]`
  3105. float remap(float x, float low1, float high1, float low2, float high2) {
  3106. return low2 + (x - low1) * (high2 - low2) / (high1 - low1);
  3107. }
  3108. float saturate(float x) {
  3109. return clamp(x, 0.0, 1.0);
  3110. }
  3111. vec4 taylorInvSqrt(vec4 r) {
  3112. return 1.79284291400159 - 0.85373472095314 * r;
  3113. }
  3114. vec4 mod289(vec4 x) {
  3115. return x - floor( x * (1.0 / 289.0)) * 289.0;
  3116. }
  3117. vec4 permute(vec4 x) {
  3118. return mod289(((x * 34.0) + 1.0) * x);
  3119. }
  3120. vec4 fade(vec4 t) {
  3121. return (t * t * t) * (t * (t * vec4(6.0) - vec4(15.0)) + vec4(10.0));
  3122. }
  3123. float glmPerlin(vec4 Position, vec4 rep) {
  3124. vec4 Pi0 = mod(floor(Position), rep);
  3125. vec4 Pi1 = mod(Pi0 + 1.0, rep);
  3126. vec4 Pf0 = fract(Position);
  3127. vec4 Pf1 = Pf0 - 1.0;
  3128. vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
  3129. vec4 iy = vec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y);
  3130. vec4 ixy = permute(permute(ix) + iy);
  3131. vec4 ixy0 = permute(ixy + vec4(Pi0.z));
  3132. vec4 ixy1 = permute(ixy + vec4(Pi1.z));
  3133. vec4 ixy00 = permute(ixy0 + vec4(Pi0.w));
  3134. vec4 ixy01 = permute(ixy0 + vec4(Pi1.w));
  3135. vec4 ixy10 = permute(ixy1 + vec4(Pi0.w));
  3136. vec4 ixy11 = permute(ixy1 + vec4(Pi1.w));
  3137. vec4 gx00 = ixy00 / 7.0;
  3138. vec4 gy00 = floor(gx00) / 7.0;
  3139. vec4 gz00 = floor(gy00) / 6.0;
  3140. gx00 = fract(gx00) - 0.5;
  3141. gy00 = fract(gy00) - 0.5;
  3142. gz00 = fract(gz00) - 0.5;
  3143. vec4 gw00 = vec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00);
  3144. vec4 sw00 = step(gw00, vec4(0.0));
  3145. gx00 -= sw00 * (step(0.0, gx00) - 0.5);
  3146. gy00 -= sw00 * (step(0.0, gy00) - 0.5);
  3147. vec4 gx01 = ixy01 / 7.0;
  3148. vec4 gy01 = floor(gx01) / 7.0;
  3149. vec4 gz01 = floor(gy01) / 6.0;
  3150. gx01 = fract(gx01) - 0.5;
  3151. gy01 = fract(gy01) - 0.5;
  3152. gz01 = fract(gz01) - 0.5;
  3153. vec4 gw01 = vec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01);
  3154. vec4 sw01 = step(gw01, vec4(0.0));
  3155. gx01 -= sw01 * (step(0.0, gx01) - 0.5);
  3156. gy01 -= sw01 * (step(0.0, gy01) - 0.5);
  3157. vec4 gx10 = ixy10 / 7.0;
  3158. vec4 gy10 = floor(gx10) / 7.0;
  3159. vec4 gz10 = floor(gy10) / 6.0;
  3160. gx10 = fract(gx10) - 0.5;
  3161. gy10 = fract(gy10) - 0.5;
  3162. gz10 = fract(gz10) - 0.5;
  3163. vec4 gw10 = vec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10);
  3164. vec4 sw10 = step(gw10, vec4(0.0));
  3165. gx10 -= sw10 * (step(0.0, gx10) - 0.5);
  3166. gy10 -= sw10 * (step(0.0, gy10) - 0.5);
  3167. vec4 gx11 = ixy11 / 7.0;
  3168. vec4 gy11 = floor(gx11) / 7.0;
  3169. vec4 gz11 = floor(gy11) / 6.0;
  3170. gx11 = fract(gx11) - 0.5;
  3171. gy11 = fract(gy11) - 0.5;
  3172. gz11 = fract(gz11) - 0.5;
  3173. vec4 gw11 = vec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11);
  3174. vec4 sw11 = step(gw11, vec4(0.0));
  3175. gx11 -= sw11 * (step(0.0, gx11) - 0.5);
  3176. gy11 -= sw11 * (step(0.0, gy11) - 0.5);
  3177. vec4 g0000 = vec4(gx00.x, gy00.x, gz00.x, gw00.x);
  3178. vec4 g1000 = vec4(gx00.y, gy00.y, gz00.y, gw00.y);
  3179. vec4 g0100 = vec4(gx00.z, gy00.z, gz00.z, gw00.z);
  3180. vec4 g1100 = vec4(gx00.w, gy00.w, gz00.w, gw00.w);
  3181. vec4 g0010 = vec4(gx10.x, gy10.x, gz10.x, gw10.x);
  3182. vec4 g1010 = vec4(gx10.y, gy10.y, gz10.y, gw10.y);
  3183. vec4 g0110 = vec4(gx10.z, gy10.z, gz10.z, gw10.z);
  3184. vec4 g1110 = vec4(gx10.w, gy10.w, gz10.w, gw10.w);
  3185. vec4 g0001 = vec4(gx01.x, gy01.x, gz01.x, gw01.x);
  3186. vec4 g1001 = vec4(gx01.y, gy01.y, gz01.y, gw01.y);
  3187. vec4 g0101 = vec4(gx01.z, gy01.z, gz01.z, gw01.z);
  3188. vec4 g1101 = vec4(gx01.w, gy01.w, gz01.w, gw01.w);
  3189. vec4 g0011 = vec4(gx11.x, gy11.x, gz11.x, gw11.x);
  3190. vec4 g1011 = vec4(gx11.y, gy11.y, gz11.y, gw11.y);
  3191. vec4 g0111 = vec4(gx11.z, gy11.z, gz11.z, gw11.z);
  3192. vec4 g1111 = vec4(gx11.w, gy11.w, gz11.w, gw11.w);
  3193. vec4 norm00 = taylorInvSqrt(vec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));
  3194. g0000 *= norm00.x;
  3195. g0100 *= norm00.y;
  3196. g1000 *= norm00.z;
  3197. g1100 *= norm00.w;
  3198. vec4 norm01 = taylorInvSqrt(vec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));
  3199. g0001 *= norm01.x;
  3200. g0101 *= norm01.y;
  3201. g1001 *= norm01.z;
  3202. g1101 *= norm01.w;
  3203. vec4 norm10 = taylorInvSqrt(vec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));
  3204. g0010 *= norm10.x;
  3205. g0110 *= norm10.y;
  3206. g1010 *= norm10.z;
  3207. g1110 *= norm10.w;
  3208. vec4 norm11 = taylorInvSqrt(vec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));
  3209. g0011 *= norm11.x;
  3210. g0111 *= norm11.y;
  3211. g1011 *= norm11.z;
  3212. g1111 *= norm11.w;
  3213. float n0000 = dot(g0000, Pf0);
  3214. float n1000 = dot(g1000, vec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w));
  3215. float n0100 = dot(g0100, vec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w));
  3216. float n1100 = dot(g1100, vec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w));
  3217. float n0010 = dot(g0010, vec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w));
  3218. float n1010 = dot(g1010, vec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w));
  3219. float n0110 = dot(g0110, vec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w));
  3220. float n1110 = dot(g1110, vec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w));
  3221. float n0001 = dot(g0001, vec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w));
  3222. float n1001 = dot(g1001, vec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w));
  3223. float n0101 = dot(g0101, vec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w));
  3224. float n1101 = dot(g1101, vec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w));
  3225. float n0011 = dot(g0011, vec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w));
  3226. float n1011 = dot(g1011, vec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w));
  3227. float n0111 = dot(g0111, vec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w));
  3228. float n1111 = dot(g1111, Pf1);
  3229. vec4 fade_xyzw = fade(Pf0);
  3230. vec4 n_0w = mix(vec4(n0000, n1000, n0100, n1100), vec4(n0001, n1001, n0101, n1101), fade_xyzw.w);
  3231. vec4 n_1w = mix(vec4(n0010, n1010, n0110, n1110), vec4(n0011, n1011, n0111, n1111), fade_xyzw.w);
  3232. vec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z);
  3233. vec2 n_yzw = mix(vec2(n_zw.x, n_zw.y), vec2(n_zw.z, n_zw.w), fade_xyzw.y);
  3234. float n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);
  3235. return 2.2 * n_xyzw;
  3236. }
  3237. float getPerlinNoise(vec3 pos, float frequency) {
  3238. float octaveFrequencyFactor = 2.0;
  3239. float sum = 0.0;
  3240. float weightSum = 0.0;
  3241. float weight = 1.0;
  3242. for (int oct = 0; oct < 3; oct++) {
  3243. vec3 p = pos * frequency;
  3244. float val = 0.5 + 0.5 * glmPerlin(vec4(p, 0.0), vec4(frequency));
  3245. sum += val * weight;
  3246. weightSum += weight;
  3247. weight *= 0.5;
  3248. frequency *= octaveFrequencyFactor;
  3249. }
  3250. float noise = (sum / weightSum);
  3251. noise = saturate(noise);
  3252. return noise;
  3253. }
  3254. float hash(float p) {
  3255. p = fract(p * 0.1031);
  3256. p *= p + 33.33;
  3257. p *= p + p;
  3258. return fract(p);;
  3259. }
  3260. float noise(vec3 x) {
  3261. vec3 p = floor(x);
  3262. vec3 f = fract(x);
  3263. f = f * f * (3.0 - 2.0 * f);
  3264. float n = p.x + p.y * 57.0 + 113.0 * p.z;
  3265. return mix(
  3266. mix(
  3267. mix(hash(n + 0.0), hash(n + 1.0), f.x),
  3268. mix(hash(n + 57.0), hash(n + 58.0), f.x),
  3269. f.y),
  3270. mix(
  3271. mix(hash(n + 113.0), hash(n + 114.0), f.x),
  3272. mix(hash(n + 170.0), hash(n + 171.0), f.x),
  3273. f.y),
  3274. f.z);
  3275. }
  3276. float worley(vec3 pos, float numCells) {
  3277. vec3 p = pos * numCells;
  3278. float d = 1.0e10;
  3279. for (int x = -1; x <= 1; x++) {
  3280. for (int y = -1; y <= 1; y++) {
  3281. for (int z = -1; z <= 1; z++) {
  3282. vec3 tp = floor(p) + vec3(x, y, z);
  3283. tp = p - tp - noise(mod(tp, numCells));
  3284. d = min(d, dot(tp, tp));
  3285. }
  3286. }
  3287. }
  3288. return 1.0 - clamp(d, 0.0, 1.0);
  3289. }
  3290. vec3 get3Dfrom2D(vec2 uv, float tileRows) {
  3291. vec2 tile = floor(uv);
  3292. float z = floor(tileRows * tile.y + tile.x);
  3293. return vec3(fract(uv), z);
  3294. }
  3295. float getTextureForPointPerlinWorley(vec3 p) {
  3296. float perlinNoise = getPerlinNoise(p, ${n["a"].float(r)});
  3297. float worley0 = worley(p, ${n["a"].float(t)} * 2.0);
  3298. float worley1 = worley(p, ${n["a"].float(t)} * 8.0);
  3299. float worley2 = worley(p, ${n["a"].float(t)} * 14.0);
  3300. float worleyFBM = worley0 * 0.625 + worley1 * 0.25 + worley2 * 0.125;
  3301. return remap(perlinNoise, 0.0, 1.0, worleyFBM, 1.0);
  3302. }
  3303. float getTextureForPointWorley(vec3 p) {
  3304. float worley0 = worley(p, ${n["a"].float(t)});
  3305. float worley1 = worley(p, ${n["a"].float(t)} * 2.0);
  3306. float worley2 = worley(p, ${n["a"].float(t)} * 4.0);
  3307. float worley3 = worley(p, ${n["a"].float(t)} * 8.0);
  3308. float FBM0 = worley0 * 0.625 + worley1 * 0.25 + worley2 * 0.125;
  3309. float FBM1 = worley1 * 0.625 + worley2 * 0.25 + worley3 * 0.125;
  3310. float FBM2 = worley2 * 0.75 + worley3 * 0.25;
  3311. return FBM0 * 0.625 + FBM1 * 0.25 + FBM2 * 0.125;
  3312. }
  3313. `),e.fragment.code.add(n["a"]`void main() {
  3314. float padWidth = 1.0;
  3315. float paddedSize = tileSize + 2.0 * padWidth;
  3316. float tileCount = tileRows * tileRows;
  3317. vec2 tile = floor((gl_FragCoord.xy - 0.5) / paddedSize);
  3318. bool padCell = false;
  3319. if (mod(gl_FragCoord.x, paddedSize) == 0.5 || mod(gl_FragCoord.x, paddedSize) == paddedSize - 0.5) {
  3320. padCell = true;
  3321. }
  3322. if (mod(gl_FragCoord.y, paddedSize) == 0.5 || mod(gl_FragCoord.y, paddedSize) == paddedSize - 0.5) {
  3323. padCell = true;
  3324. }
  3325. bool startPadX = false;
  3326. bool startPadY = false;
  3327. bool endPadX = false;
  3328. bool endPadY = false;
  3329. if (gl_FragCoord.x == tile.x * paddedSize + 0.5) {
  3330. startPadX = true;
  3331. }
  3332. if (gl_FragCoord.y == tile.y * paddedSize + 0.5) {
  3333. startPadY = true;
  3334. }
  3335. if (gl_FragCoord.x == (tile.x + 1.0) * paddedSize - 0.5) {
  3336. endPadX = true;
  3337. }
  3338. if (gl_FragCoord.y == (tile.y + 1.0) * paddedSize - 0.5) {
  3339. endPadY = true;
  3340. }
  3341. vec2 padding = vec2(2.0 * padWidth) * tile;
  3342. vec2 uv;
  3343. if (padCell) {
  3344. vec2 pixel = gl_FragCoord.xy - padWidth - padding;
  3345. if (startPadX) {
  3346. pixel.x += tileSize;
  3347. }
  3348. if (startPadY) {
  3349. pixel.y += tileSize;
  3350. }
  3351. if (endPadX) {
  3352. pixel.x -= tileSize;
  3353. }
  3354. if (endPadY) {
  3355. pixel.y -= tileSize;
  3356. }
  3357. uv = vec2(pixel.xy / tileSize);
  3358. } else {
  3359. vec2 pixel = gl_FragCoord.xy - padWidth - padding;
  3360. uv = vec2(pixel.xy / tileSize);
  3361. }
  3362. vec3 p_ = get3Dfrom2D(uv, tileRows);
  3363. vec3 p = p_;
  3364. p.z /= (tileRows * tileRows);
  3365. float worleyPerlinNoise = getTextureForPointPerlinWorley(p);
  3366. float worleyNoise = getTextureForPointWorley(p);
  3367. gl_FragColor.r = saturate(remap(worleyPerlinNoise, worleyNoise, 1.0, 0.0, 1.0));
  3368. p_ = mod(p_ + 1.0, tileRows * tileRows);
  3369. p = p_;
  3370. p.z /= (tileRows * tileRows);
  3371. worleyPerlinNoise = getTextureForPointPerlinWorley(p);
  3372. worleyNoise = getTextureForPointWorley(p);
  3373. gl_FragColor.g = saturate(remap(worleyPerlinNoise, worleyNoise, 1.0, 0.0, 1.0));
  3374. gl_FragColor.ba = vec2(0.0, 1.0);
  3375. }`),e}const o=Object.freeze({__proto__:null,build:s})},ca98:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("b2b2"),n=r("d17d");class a{constructor(e,t,r){this.release=r,t&&(this._config=t.snapshot()),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}destroy(){this._program=Object(i["e"])(this._program),this._pipeline=this._config=null}reload(e){Object(i["e"])(this._program),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}get program(){return this._program}get key(){return this._config.key}get configuration(){return this._config}bindPass(e,t){}bindMaterial(e,t){}bindDraw(e){}bindPipelineState(e,t=null,r){e.setPipelineState(this.getPipelineState(t,r))}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}get primitiveType(){return n["r"].TRIANGLES}getPipelineState(e,t){return this._pipeline}}},caf1:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return s}));var i,n=r("38a4"),a=r("b2b2");function s(e){switch(e){case"multiply":default:return i.Multiply;case"ignore":return i.Ignore;case"replace":return i.Replace;case"tint":return i.Tint}}function o(e,t,r){if(Object(a["j"])(e)||t===i.Ignore)return r[0]=255,r[1]=255,r[2]=255,void(r[3]=255);const s=Object(n["f"])(Math.round(e[3]*l),0,l),o=0===s||t===i.Tint?0:t===i.Replace?u:d;r[0]=Object(n["f"])(Math.round(e[0]*c),0,c),r[1]=Object(n["f"])(Math.round(e[1]*c),0,c),r[2]=Object(n["f"])(Math.round(e[2]*c),0,c),r[3]=s+o}!function(e){e[e.Multiply=1]="Multiply",e[e.Ignore=2]="Ignore",e[e.Replace=3]="Replace",e[e.Tint=4]="Tint"}(i||(i={}));const c=255,l=85,u=l,d=2*l},caf7:function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var i,n=r("e431"),a=r("47f8"),s=r("0b2d"),o=r("7289"),c=r("d18f"),l=r("b7c2");!function(e){function t(e,t){const r=e[t],i=e[t+1],n=e[t+2];return Math.sqrt(r*r+i*i+n*n)}function r(e,t){const r=e[t],i=e[t+1],n=e[t+2],a=1/Math.sqrt(r*r+i*i+n*n);e[t]*=a,e[t+1]*=a,e[t+2]*=a}function i(e,t,r){e[t]*=r,e[t+1]*=r,e[t+2]*=r}function n(e,t,r,i,n,a=t){(n=n||e)[a]=e[t]+r[i],n[a+1]=e[t+1]+r[i+1],n[a+2]=e[t+2]+r[i+2]}function a(e,t,r,i,n,a=t){(n=n||e)[a]=e[t]-r[i],n[a+1]=e[t+1]-r[i+1],n[a+2]=e[t+2]-r[i+2]}e.length=t,e.normalize=r,e.scale=i,e.add=n,e.subtract=a}(i||(i={}));var u=r("0278"),d=r("1038"),h=r("1153"),p=r("b7bd");const f=i;var b,m,g,y;!function(e){const t=.5,r=[[-t,-t,t],[t,-t,t],[t,t,t],[-t,t,t],[-t,-t,-t],[t,-t,-t],[t,t,-t],[-t,t,-t]],i=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],n=[0,0,1,0,1,1,0,1],a=new Uint16Array([0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5]),s=new Uint16Array(36);for(let l=0;l<6;l++)for(let e=0;e<6;e++)s[6*l+e]=l;const o=new Uint16Array(36);for(let l=0;l<6;l++)o[6*l+0]=0,o[6*l+1]=1,o[6*l+2]=2,o[6*l+3]=2,o[6*l+4]=3,o[6*l+5]=0;function c(e){Array.isArray(e)||(e=[e,e,e]);const t=new Array(24);for(let i=0;i<8;i++)t[3*i]=r[i][0]*e[0],t[3*i+1]=r[i][1]*e[1],t[3*i+2]=r[i][2]*e[2];return new u["a"]([[p["a"].POSITION,{size:3,data:t,exclusive:!0}],[p["a"].NORMAL,{size:3,data:i}],[p["a"].UV0,{size:2,data:n}]],[[p["a"].POSITION,a],[p["a"].NORMAL,s],[p["a"].UV0,o]])}e.createGeometry=c}(b||(b={})),function(e){const t=.5,r=[[-t,0,-t],[t,0,-t],[t,0,t],[-t,0,t],[0,-t,0],[0,t,0]],i=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],n=new Uint16Array([5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0]),a=new Uint16Array([0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7]);function s(e){Array.isArray(e)||(e=[e,e,e]);const t=new Array(18);for(let i=0;i<6;i++)t[3*i]=r[i][0]*e[0],t[3*i+1]=r[i][1]*e[1],t[3*i+2]=r[i][2]*e[2];return new u["a"]([[p["a"].POSITION,{size:3,data:t,exclusive:!0}],[p["a"].NORMAL,{size:3,data:i}]],[[p["a"].POSITION,n],[p["a"].NORMAL,a]])}e.createGeometry=s}(m||(m={})),function(e){const t=.5,r=0,i=Object(a["d"])(-t,r,-t),s=Object(a["d"])(t,r,-t),o=Object(a["d"])(0,r,t),c=Object(a["d"])(0,r+t,0),l=Object(a["c"])(),d=Object(a["c"])(),h=Object(a["c"])(),f=Object(a["c"])(),b=Object(a["c"])();Object(n["l"])(l,i,c),Object(n["l"])(d,i,s),Object(n["i"])(h,l,d),Object(n["t"])(h,h),Object(n["l"])(l,s,c),Object(n["l"])(d,s,o),Object(n["i"])(f,l,d),Object(n["t"])(f,f),Object(n["l"])(l,o,c),Object(n["l"])(d,o,i),Object(n["i"])(b,l,d),Object(n["t"])(b,b);const m=[i,s,o,c],g=[0,-1,0,h[0],h[1],h[2],f[0],f[1],f[2],b[0],b[1],b[2]],y=[0,1,2,3,1,0,3,2,1,3,0,2],O=[0,0,0,1,1,1,2,2,2,3,3,3];function v(e){Array.isArray(e)||(e=[e,e,e]);const t=new Array(12);for(let r=0;r<4;r++)t[3*r]=m[r][0]*e[0],t[3*r+1]=m[r][1]*e[1],t[3*r+2]=m[r][2]*e[2];return new u["a"]([[p["a"].POSITION,{size:3,data:t,exclusive:!0}],[p["a"].NORMAL,{size:3,data:g}]],[[p["a"].POSITION,new Uint16Array(y)],[p["a"].NORMAL,new Uint16Array(O)]])}e.createGeometry=v}(g||(g={})),function(e){function t(e,t,r,i={uv:!0}){const n=-Math.PI,a=2*Math.PI,s=-Math.PI/2,o=Math.PI,c=Math.max(3,Math.floor(t)),l=Math.max(2,Math.floor(r)),d=(c+1)*(l+1),h=new Float32Array(3*d),f=new Float32Array(3*d),b=new Float32Array(2*d),m=[];let g=0;for(let u=0;u<=l;u++){const t=[],r=u/l,i=s+r*o,d=Math.cos(i);for(let s=0;s<=c;s++){const o=s/c,l=n+o*a,u=Math.cos(l)*d,p=Math.sin(i),m=-Math.sin(l)*d;h[3*g]=u*e,h[3*g+1]=p*e,h[3*g+2]=m*e,f[3*g]=u,f[3*g+1]=p,f[3*g+2]=m,b[2*g]=o,b[2*g+1]=r,t.push(g),++g}m.push(t)}const y=new Uint32Array(2*c*(l-1)*3);g=0;for(let u=0;u<l;u++)for(let e=0;e<c;e++){const t=m[u][e],r=m[u][e+1],i=m[u+1][e+1],n=m[u+1][e];0===u?(y[g++]=t,y[g++]=i,y[g++]=n):u===l-1?(y[g++]=t,y[g++]=r,y[g++]=i):(y[g++]=t,y[g++]=r,y[g++]=i,y[g++]=i,y[g++]=n,y[g++]=t)}const O=[[p["a"].POSITION,y],[p["a"].NORMAL,y]],v=[[p["a"].POSITION,{size:3,data:h,exclusive:!0}],[p["a"].NORMAL,{size:3,data:f,exclusive:!0}]];return i.uv&&(v.push([p["a"].UV0,{size:2,data:b,exclusive:!0}]),O.push([p["a"].UV0,y])),i.offset&&(O[0][0]=p["a"].OFFSET,v[0][0]=p["a"].OFFSET,O.push([p["a"].POSITION,new Uint32Array(y.length)]),v.push([p["a"].POSITION,{size:3,data:Float64Array.from(i.offset),exclusive:!0}])),new u["a"](v,O)}function r(e,t,r){const i=e;let n,a;if(r)n=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],a=new Uint32Array([0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1]);else{const e=i*(1+Math.sqrt(5))/2;n=[-i,e,0,i,e,0,-i,-e,0,i,-e,0,0,-i,e,0,i,e,0,-i,-e,0,i,-e,e,0,-i,e,0,i,-e,0,-i,-e,0,i],a=new Uint32Array([0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1])}for(let u=0;u<n.length;u+=3)f.scale(n,u,e/f.length(n,u));let s={};function o(t,r){t>r&&([t,r]=[r,t]);const i=t.toString()+"."+r.toString();if(s[i])return s[i];let a=n.length;return n.length+=3,f.add(n,3*t,n,3*r,n,a),f.scale(n,a,e/f.length(n,a)),a/=3,s[i]=a,a}for(let u=0;u<t;u++){const e=a.length,t=new Uint32Array(4*e);for(let r=0;r<e;r+=3){const e=a[r],i=a[r+1],n=a[r+2],s=o(e,i),c=o(i,n),l=o(n,e),u=4*r;t[u]=e,t[u+1]=s,t[u+2]=l,t[u+3]=i,t[u+4]=c,t[u+5]=s,t[u+6]=n,t[u+7]=l,t[u+8]=c,t[u+9]=s,t[u+10]=c,t[u+11]=l}a=t,s={}}const c=new Float32Array(n);for(let u=0;u<c.length;u+=3)f.normalize(c,u);const l=[[p["a"].POSITION,a],[p["a"].NORMAL,a]],d=[[p["a"].POSITION,{size:3,data:new Float32Array(n),exclusive:!0}],[p["a"].NORMAL,{size:3,data:c,exclusive:!0}]];return new u["a"](d,l)}function i(e,t,r,i,n,a,s){const o=t?[t[0],t[1],t[2]]:[0,0,0],c=e?[e[0],e[1],e[2]]:[0,0,1];a=a||[0,0];const d=r?[255*r[0],255*r[1],255*r[2],r.length>3?255*r[3]:255]:[255,255,255,255],h=null!=i&&2===i.length?i:[1,1],f=[[p["a"].POSITION,{size:3,data:o,exclusive:!0}],[p["a"].NORMAL,{size:3,data:c,exclusive:!0}],[p["a"].UV0,{size:a.length,data:a}],[p["a"].COLOR,{size:4,data:d,exclusive:!0}],[p["a"].SIZE,{size:2,data:h}]];if(null!=n){const e=new Float32Array([n[0],n[1],n[2],n[3]]);f.push([p["a"].AUXPOS1,{size:4,data:e}])}if(null!=s){const e=new Float32Array([s[0],s[1],s[2],s[3]]);f.push([p["a"].AUXPOS2,{size:4,data:e}])}return new u["a"](f,null,l["h"].Point)}function y(e,t,r,i,n,a,s,o){if(null!=e){const{data:t}=o.getMutableAttribute(p["a"].NORMAL);t[0]=e[0],t[1]=e[1],t[2]=e[2]}if(null!=t){const{data:e}=o.getMutableAttribute(p["a"].POSITION);e[0]=t[0],e[1]=t[1],e[2]=t[2]}if(null!=r){const{data:e}=o.getMutableAttribute(p["a"].COLOR);e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3]}if(null!=i){const{data:e}=o.getMutableAttribute(p["a"].SIZE);e[0]=i[0],e[1]=i[1]}if(null!=n){const{data:e}=o.getMutableAttribute(p["a"].AUXPOS1);e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3]}if(null!=a){const{data:e}=o.getMutableAttribute(p["a"].UV0);e[0]=a[0],e[1]=a[1]}if(null!=s){const{data:e}=o.getMutableAttribute(p["a"].AUXPOS2);e[0]=s[0],e[1]=s[1],e[2]=s[2],e[3]=s[3]}}function _(e,t){const r=new Float32Array(3*e.length),i=new Float32Array(t?3*e.length:3),n=new Uint32Array(e.length),a=new Uint32Array(e.length);for(let l=0;l<e.length;l++)r[3*l]=e[l][0],r[3*l+1]=e[l][1],r[3*l+2]=e[l][2],t&&(i[3*l]=t[l][0],i[3*l+1]=t[l][1],i[3*l+2]=t[l][2]),n[l]=l,a[l]=0;t||(i[0]=0,i[1]=1,i[2]=0);const s=[0,0],o=[[p["a"].POSITION,n],[p["a"].NORMAL,t?n:a],[p["a"].UV0,a]],c=[[p["a"].POSITION,{size:3,data:r,exclusive:!0}],[p["a"].NORMAL,{size:3,data:i,exclusive:!0}],[p["a"].UV0,{size:2,data:s,exclusive:!0}]];return new u["a"](c,o,l["h"].Point)}function j(){const e=[0,0,0,0,0,100,100,0,0],t=new Uint16Array([0,1,2]),r=[0,1,0],i=new Uint16Array([0,0,0]),n=[0,0],a=new Uint16Array([0,0,0]),s=[[p["a"].POSITION,t],[p["a"].NORMAL,i],[p["a"].UV0,a]],o=[[p["a"].POSITION,{size:3,data:e,exclusive:!0}],[p["a"].NORMAL,{size:3,data:r,exclusive:!0}],[p["a"].UV0,{size:2,data:n,exclusive:!0}]];return new u["a"](o,s)}e.createBoxGeometry=b.createGeometry,e.createDiamondGeometry=m.createGeometry,e.createTetrahedronGeometry=g.createGeometry,e.createSphereGeometry=t,e.createPolySphereGeometry=r,e.createPointGeometry=i,e.updatePointGeometry=y,e.createPointArrayGeometry=_,e.createTriangleGeometry=j;const w=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function x(e=w){const t=new Array(12);for(let l=0;l<4;l++)for(let r=0;r<3;r++)t[3*l+r]=e[l][r];const r=new Uint32Array([0,1,2,2,3,0]),i=[0,0,1],n=new Uint32Array([0,0,0,0,0,0]),a=[0,0,1,0,1,1,0,1],s=[255,255,255,255],o=[[p["a"].POSITION,r],[p["a"].NORMAL,n],[p["a"].UV0,r],[p["a"].COLOR,n]],c=[[p["a"].POSITION,{size:3,data:t,exclusive:!0}],[p["a"].NORMAL,{size:3,data:i,exclusive:!0}],[p["a"].UV0,{size:2,data:a,exclusive:!0}],[p["a"].COLOR,{size:4,data:s,exclusive:!0}]];return new u["a"](c,o)}function T(e,t,r,i,n=!0,s=!0){let o=0;const c=t,l=e;let d=Object(a["d"])(0,o,0),h=Object(a["d"])(0,o+l,0),f=Object(a["d"])(0,-1,0),b=Object(a["d"])(0,1,0);i&&(o=l,h=Object(a["d"])(0,0,0),d=Object(a["d"])(0,o,0),f=Object(a["d"])(0,1,0),b=Object(a["d"])(0,-1,0));const m=[h,d],g=[f,b],y=r+2,O=Math.sqrt(l*l+c*c);if(i)for(let u=r-1;u>=0;u--){const e=u*(2*Math.PI/r),t=Object(a["d"])(Math.cos(e)*c,o,Math.sin(e)*c);m.push(t);const i=Object(a["d"])(l*Math.cos(e)/O,-c/O,l*Math.sin(e)/O);g.push(i)}else for(let u=0;u<r;u++){const e=u*(2*Math.PI/r),t=Object(a["d"])(Math.cos(e)*c,o,Math.sin(e)*c);m.push(t);const i=Object(a["d"])(l*Math.cos(e)/O,c/O,l*Math.sin(e)/O);g.push(i)}const v=new Uint32Array(2*(r+2)*3),_=new Uint32Array(2*(r+2)*3);let j=0,w=0;if(n){for(let e=3;e<m.length;e++)v[j++]=1,v[j++]=e-1,v[j++]=e,_[w++]=0,_[w++]=0,_[w++]=0;v[j++]=m.length-1,v[j++]=2,v[j++]=1,_[w++]=0,_[w++]=0,_[w++]=0}if(s){for(let e=3;e<m.length;e++)v[j++]=e,v[j++]=e-1,v[j++]=0,_[w++]=e,_[w++]=e-1,_[w++]=1;v[j++]=0,v[j++]=2,v[j++]=m.length-1,_[w++]=1,_[w++]=2,_[w++]=g.length-1}const x=new Float32Array(3*y);for(let a=0;a<y;a++)x[3*a]=m[a][0],x[3*a+1]=m[a][1],x[3*a+2]=m[a][2];const T=new Float32Array(3*y);for(let a=0;a<y;a++)T[3*a]=g[a][0],T[3*a+1]=g[a][1],T[3*a+2]=g[a][2];const S=[[p["a"].POSITION,v],[p["a"].NORMAL,_]],E=[[p["a"].POSITION,{size:3,data:x,exclusive:!0}],[p["a"].NORMAL,{size:3,data:T,exclusive:!0}]];return new u["a"](E,S)}function S(e,t,r,i,s,o){const c=i?Object(a["a"])(i):Object(a["d"])(1,0,0),l=s?Object(a["a"])(s):Object(a["d"])(0,0,0);o=null==o||o;const d=Object(a["c"])();Object(n["t"])(d,c);const h=Object(a["c"])();Object(n["g"])(h,d,Math.abs(e));const f=Object(a["c"])();Object(n["g"])(f,h,-.5),Object(n["h"])(f,f,l);const b=Object(a["d"])(0,1,0);Math.abs(1-Object(n["j"])(d,b))<.2&&Object(n["y"])(b,0,0,1);const m=Object(a["c"])();Object(n["i"])(m,d,b),Object(n["t"])(m,m),Object(n["i"])(b,m,d);const g=2*r+(o?2:0),y=r+(o?2:0),O=new Float32Array(3*g),v=new Float32Array(3*y),_=new Float32Array(2*g),j=new Uint32Array(3*r*(o?4:2)),w=new Uint32Array(3*r*(o?4:2));o&&(O[3*(g-2)+0]=f[0],O[3*(g-2)+1]=f[1],O[3*(g-2)+2]=f[2],_[2*(g-2)]=0,_[2*(g-2)+1]=0,O[3*(g-1)+0]=O[3*(g-2)+0]+h[0],O[3*(g-1)+1]=O[3*(g-2)+1]+h[1],O[3*(g-1)+2]=O[3*(g-2)+2]+h[2],_[2*(g-1)]=1,_[2*(g-1)+1]=1,v[3*(y-2)+0]=-d[0],v[3*(y-2)+1]=-d[1],v[3*(y-2)+2]=-d[2],v[3*(y-1)+0]=d[0],v[3*(y-1)+1]=d[1],v[3*(y-1)+2]=d[2]);const x=function(e,t,r){j[e]=t,w[e]=r};let T=0;const S=Object(a["c"])(),E=Object(a["c"])();for(let a=0;a<r;a++){const e=a*(2*Math.PI/r);Object(n["g"])(S,b,Math.sin(e)),Object(n["g"])(E,m,Math.cos(e)),Object(n["h"])(S,S,E),v[3*a+0]=S[0],v[3*a+1]=S[1],v[3*a+2]=S[2],Object(n["g"])(S,S,t),Object(n["h"])(S,S,f),O[3*a+0]=S[0],O[3*a+1]=S[1],O[3*a+2]=S[2],_[2*a+0]=a/r,_[2*a+1]=0,O[3*(a+r)+0]=O[3*a+0]+h[0],O[3*(a+r)+1]=O[3*a+1]+h[1],O[3*(a+r)+2]=O[3*a+2]+h[2],_[2*(a+r)+0]=a/r,_[2*a+1]=1;const i=(a+1)%r;x(T++,a,a),x(T++,a+r,a),x(T++,i,i),x(T++,i,i),x(T++,a+r,a),x(T++,i+r,i)}if(o){for(let e=0;e<r;e++){const t=(e+1)%r;x(T++,g-2,y-2),x(T++,e,y-2),x(T++,t,y-2)}for(let e=0;e<r;e++){const t=(e+1)%r;x(T++,e+r,y-1),x(T++,g-1,y-1),x(T++,t+r,y-1)}}const A=[[p["a"].POSITION,j],[p["a"].NORMAL,w],[p["a"].UV0,j]],C=[[p["a"].POSITION,{size:3,data:O,exclusive:!0}],[p["a"].NORMAL,{size:3,data:v,exclusive:!0}],[p["a"].UV0,{size:2,data:_,exclusive:!0}]];return new u["a"](C,A)}function E(t,r,i,n,a){i=i||10,n=null==n||n,Object(h["a"])(t.length>1);const s=[[0,0,0]],o=[],c=[];for(let e=0;e<i;e++){o.push([0,-e-1,-(e+1)%i-1]);const t=e/i*2*Math.PI;c.push([Math.cos(t)*r,Math.sin(t)*r])}return e.createPathExtrusionGeometry(c,t,s,o,n,a)}function A(e,t,r,i,l,d=Object(a["d"])(0,0,0)){const h=e.length,f=new Float32Array(t.length*h*3+(6*r.length||0)),b=new Float32Array(t.length*h*3+(r?6:0)),m=(t.length-1)*h*6+3*i.length*2,g=new Uint32Array(m),y=new Uint32Array(m);let v=0,_=0,j=0,w=0;const x=Object(a["c"])(),T=Object(a["c"])(),S=Object(a["c"])(),E=Object(a["c"])(),A=Object(a["c"])(),C=Object(a["c"])(),R=Object(a["c"])(),M=Object(s["f"])(),P=Object(a["c"])(),I=Object(a["c"])(),L=Object(a["c"])(),N=Object(a["c"])(),F=Object(a["c"])(),k=Object(o["d"])();Object(n["y"])(P,0,1,0),Object(n["l"])(T,t[1],t[0]),Object(n["t"])(T,T),l?(Object(n["h"])(M,t[0],d),Object(n["t"])(S,M)):Object(n["y"])(S,0,0,1),D(T,S,P,P,A,S,O),Object(n["m"])(E,S),Object(n["m"])(N,A);for(let a=0;a<r.length;a++)Object(n["g"])(C,A,r[a][0]),Object(n["g"])(M,S,r[a][2]),Object(n["h"])(C,C,M),Object(n["h"])(C,C,t[0]),f[v++]=C[0],f[v++]=C[1],f[v++]=C[2];b[_++]=-T[0],b[_++]=-T[1],b[_++]=-T[2];for(let n=0;n<i.length;n++)g[j++]=i[n][0]>0?i[n][0]:-i[n][0]-1+r.length,g[j++]=i[n][1]>0?i[n][1]:-i[n][1]-1+r.length,g[j++]=i[n][2]>0?i[n][2]:-i[n][2]-1+r.length,y[w++]=0,y[w++]=0,y[w++]=0;let U=r.length;const z=r.length-1;for(let a=0;a<t.length;a++){let r=!1;a>0&&(Object(n["m"])(x,T),a<t.length-1?(Object(n["l"])(T,t[a+1],t[a]),Object(n["t"])(T,T)):r=!0,Object(n["h"])(I,x,T),Object(n["t"])(I,I),Object(n["h"])(L,t[a-1],E),Object(o["h"])(t[a],I,k),Object(o["n"])(k,Object(c["h"])(L,x),M)?(Object(n["l"])(M,M,t[a]),Object(n["t"])(S,M),Object(n["i"])(A,I,S),Object(n["t"])(A,A)):D(I,E,N,P,A,S,O),Object(n["m"])(E,S),Object(n["m"])(N,A)),l&&(Object(n["h"])(M,t[a],d),Object(n["t"])(F,M));for(let i=0;i<h;i++)if(Object(n["g"])(C,A,e[i][0]),Object(n["g"])(M,S,e[i][1]),Object(n["h"])(C,C,M),Object(n["t"])(R,C),b[_++]=R[0],b[_++]=R[1],b[_++]=R[2],Object(n["h"])(C,C,t[a]),f[v++]=C[0],f[v++]=C[1],f[v++]=C[2],!r){const e=(i+1)%h;g[j++]=U+i,g[j++]=U+h+i,g[j++]=U+e,g[j++]=U+e,g[j++]=U+h+i,g[j++]=U+h+e;for(let t=0;t<6;t++)y[w++]=g[j-6+t]-z}U+=h}const B=t[t.length-1];for(let a=0;a<r.length;a++)Object(n["g"])(C,A,r[a][0]),Object(n["g"])(M,S,r[a][1]),Object(n["h"])(C,C,M),Object(n["h"])(C,C,B),f[v++]=C[0],f[v++]=C[1],f[v++]=C[2];const V=_/3;b[_++]=T[0],b[_++]=T[1],b[_++]=T[2];const G=U-h;for(let n=0;n<i.length;n++)g[j++]=i[n][0]>=0?U+i[n][0]:-i[n][0]-1+G,g[j++]=i[n][2]>=0?U+i[n][2]:-i[n][2]-1+G,g[j++]=i[n][1]>=0?U+i[n][1]:-i[n][1]-1+G,y[w++]=V,y[w++]=V,y[w++]=V;const H=[[p["a"].POSITION,g],[p["a"].NORMAL,y]],q=[[p["a"].POSITION,{size:3,data:f,exclusive:!0}],[p["a"].NORMAL,{size:3,data:b,exclusive:!0}]];return new u["a"](q,H)}function C(e,t,r){Object(h["a"])(e.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),Object(h["a"])(3===e[0].length,"createPolylineGeometry(): malformed vertex"),Object(h["a"])(null==t||t.length===e.length,"createPolylineGeometry: need same number of points and normals"),Object(h["a"])(null==t||3===t[0].length,"createPolylineGeometry(): malformed normal");const i=new Float64Array(3*e.length),n=new Uint32Array(2*(e.length-1));let a=0,s=0;for(let l=0;l<e.length;l++){for(let t=0;t<3;t++)i[a++]=e[l][t];l>0&&(n[s++]=l-1,n[s++]=l)}const o=[],c=[];if(o.push([p["a"].POSITION,n]),c.push([p["a"].POSITION,{size:3,data:i,exclusive:!0}]),t){const r=new Float32Array(3*t.length);let i=0;for(let n=0;n<e.length;n++)for(let e=0;e<3;e++)r[i++]=t[n][e];o.push([p["a"].NORMAL,n]),c.push([p["a"].NORMAL,{size:3,data:r,exclusive:!0}])}return r&&(c.push([p["a"].COLOR,{size:4,data:r}]),o.push([p["a"].COLOR,Object(d["d"])(r.length/4)])),new u["a"](c,o,l["h"].Line)}function R(e,t,r,i,n=0){const a=new Array(18),s=[[-t,n,i/2],[r,n,i/2],[0,e+n,i/2],[-t,n,-i/2],[r,n,-i/2],[0,e+n,-i/2]],o=new Uint16Array([0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5]);for(let c=0;c<6;c++)a[3*c]=s[c][0],a[3*c+1]=s[c][1],a[3*c+2]=s[c][2];return new u["a"]([[p["a"].POSITION,{size:3,data:a,exclusive:!0}]],[[p["a"].POSITION,o]])}function M(e,t){const r=e.getMutableAttribute(p["a"].POSITION).data;for(let i=0;i<r.length;i+=3){const e=r[i],a=r[i+1],s=r[i+2];Object(n["y"])(v,e,a,s),Object(n["s"])(v,v,t),r[i]=v[0],r[i+1]=v[1],r[i+2]=v[2]}}function P(e,t=e){const r=e.vertexAttributes,i=r.get(p["a"].POSITION).data,n=r.get(p["a"].NORMAL).data;if(n){const e=t.getMutableAttribute(p["a"].NORMAL).data;for(let t=0;t<n.length;t+=3){const r=n[t+1];e[t+1]=-n[t+2],e[t+2]=r}}if(i){const e=t.getMutableAttribute(p["a"].POSITION).data;for(let t=0;t<i.length;t+=3){const r=i[t+1];e[t+1]=-i[t+2],e[t+2]=r}}return t}function I(e,t,r,i,a){return!(Math.abs(Object(n["j"])(t,e))>a)&&(Object(n["i"])(r,e,t),Object(n["t"])(r,r),Object(n["i"])(i,r,e),Object(n["t"])(i,i),!0)}function D(e,t,r,i,n,a,s){return I(e,t,n,a,s)||I(e,r,n,a,s)||I(e,i,n,a,s)}e.createSquareGeometry=x,e.createConeGeometry=T,e.createCylinderGeometry=S,e.createTubeGeometry=E,e.createPathExtrusionGeometry=A,e.createPolylineGeometry=C,e.createExtrudedTriangle=R,e.transformInPlace=M,e.cgToGIS=P,e.makeOrthoBasisDirUp=I,e.makeOrthoBasisDirUpFallback=D}(y||(y={}));const O=.99619469809,v=Object(a["c"])(),_=y},cb26:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e){this._notify=e,this._accessed=[],this._handles=[],this._invalidCount=0}destroy(){this._accessed.length=0,this.clear()}onInvalidated(){this._invalidCount++}onCommitted(){const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}onObservableAccessed(e){this._accessed.includes(e)||this._accessed.push(e)}onTrackingEnd(){const e=this._handles,t=this._accessed;for(let r=0;r<t.length;++r)e.push(t[r].observe(this));t.length=0}clear(){const e=this._handles;for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}},cb72:function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i,n=r("a4ee"),a=r("2603"),s=r("e06a"),o=r("6a0ed"),c=r("b2b2"),l=r("59b2"),u=(r("b50f"),r("c120"),r("1a3e")),d=r("d386"),h=r("a9ab");let p=i=class extends o["a"]{constructor(e){super(e),this.rotation=0,this.scale=0,this.targetGeometry=null,this.camera=null}castRotation(e){return(e%=360)<0&&(e+=360),e}clone(){return new i({rotation:this.rotation,scale:this.scale,targetGeometry:Object(c["k"])(this.targetGeometry)?this.targetGeometry.clone():null,camera:Object(c["k"])(this.camera)?this.camera.clone():null})}};function f(){return{enabled:!this.camera}}Object(n["a"])([Object(l["b"])({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:f}}}}})],p.prototype,"rotation",void 0),Object(n["a"])([Object(u["a"])("rotation")],p.prototype,"castRotation",null),Object(n["a"])([Object(l["b"])({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:f}}}}})],p.prototype,"scale",void 0),Object(n["a"])([Object(l["b"])({types:s["a"],json:{read:h["a"],write:!0,origins:{"web-scene":{read:h["a"],write:{overridePolicy:f}}}}})],p.prototype,"targetGeometry",void 0),Object(n["a"])([Object(l["b"])({type:a["a"],json:{write:!0}})],p.prototype,"camera",void 0),p=i=Object(n["a"])([Object(d["a"])("esri.Viewpoint")],p);const b=p},cba1:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));class i{constructor(e){this.xTile=0,this.yTile=0,this.hash=0,this.priority=1,this.colliders=[],this.textVertexRanges=[],this.iconVertexRanges=[],this.tile=e}}class n{constructor(){this.tileSymbols=[],this.parts=[{startTime:0,startOpacity:0,targetOpacity:0,show:!1},{startTime:0,startOpacity:0,targetOpacity:0,show:!1}],this.show=!1}}},cbf3:function(e,t,r){"use strict";function i(e){return(t,r)=>{t[r]=e}}r.d(t,"a",(function(){return i}))},cc15:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o}));var i,n=r("c120"),a=r("b2b2");function s(e,t,r={}){const i=o(e);for(;i.length>1;){const e=l(t,i.shift(),r);if(Object(a["k"])(e))return e}return c(t,i.shift(),r)}function o(e){const t=Object(n["a"])("esri-force-webgl");if(t===i.WEBGL1||t===i.WEBGL2)return[t];switch(e){case"2d":return[i.WEBGL1];case"3d":return[i.WEBGL2,i.WEBGL1]}}function c(e,t,r={}){if(!window.WebGLRenderingContext)return u(e,d),null;const i=l(e,t,r);return Object(a["j"])(i)&&u(e,h),i}function l(e,t,r={}){const n=t===i.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];let a=null;for(const i of n){try{a=e.getContext(i,r)}catch(c){}if(a)break}return a}function u(e,t){const r=e.parentNode;r&&(r.innerHTML='<table style="background-color: #8CE; width: 100%; height: 100%;"><tr><td align="center"><div style="display: table-cell; vertical-align: middle;"><div style="">'+t+"</div></div></td></tr></table>")}!function(e){e[e.WEBGL1=1]="WEBGL1",e[e.WEBGL2=2]="WEBGL2"}(i||(i={}));const d='This page requires a browser that supports WebGL.<br/><a href="http://get.webgl.org">Click here to upgrade your browser.</a>',h='It doesn\'t appear your computer can support WebGL.<br/><a href="http://get.webgl.org/troubleshooting/">Click here for more information.</a>'},cc88:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var i=r("880c"),n=r("90dc"),a=r("46e8"),s=r("4d68");const o={types:{key:"type",base:a["a"],typeMap:{style:s["a"]}},json:{write:!0}},c={types:{key:"type",base:i["a"],typeMap:{style:n["a"]}},json:{write:!0}}},ccac:function(e,t,r){"use strict";r.r(t),r.d(t,"createLabelFunction",(function(){return p})),r.d(t,"formatField",(function(){return f}));var i=r("ce50"),n=r("e92d"),a=r("4653"),s=r("21e2"),o=r("c1da"),c=r("7b39"),l=r("82fa");const u=n["a"].getLogger("esri.layers.support.labelFormatUtils"),d={type:"simple",evaluate:()=>null},h={getAttribute:(e,t)=>e.field(t)};async function p(e,t,n){if(!e||!e.symbol)return d;const a=e.where,s=Object(c["b"])(e),o=a?await r.e("chunk-2d0d03a7").then(r.bind(null,"66a2")):null;let p;if("arcade"===s.type){const e=await Object(l["c"])(s.expression,n,t);p={type:"arcade",evaluate(t){try{const r=e.evaluate({$feature:"attributes"in t?e.repurposeFeature(t):t});if(null!=r)return r.toString()}catch(n){u.error(new i["a"]("bad-arcade-expression","Encountered an error when evaluating label expression for feature",{feature:t,expression:s}))}return null},needsHydrationToEvaluate:()=>null==Object(c["e"])(s.expression)}}else p={type:"simple",evaluate:e=>s.expression.replace(/{[^}]*}/g,r=>{const i=r.slice(1,-1),n=t.get(i);if(!n)return r;let a=null;return"attributes"in e?e&&e.attributes&&(a=e.attributes[n.name]):a=e.field(n.name),null==a?"":f(a,n)})};if(a){let e;try{e=o.WhereClause.create(a,t)}catch(b){return d}const r=p.evaluate;p.evaluate=t=>{const i="attributes"in t?void 0:h;return e.testFeature(t,i)?r(t):null}}return p}function f(e,t){if(null==e)return"";const r=t.domain;if(r)if("codedValue"===r.type||"coded-value"===r.type){const t=e;for(const e of r.codedValues)if(e.code===t)return e.name}else if("range"===r.type){const t=+e,i="range"in r?r.range[0]:r.minValue,n="range"in r?r.range[1]:r.maxValue;if(i<=t&&t<=n)return r.name}let i=e;return"date"===t.type||"esriFieldTypeDate"===t.type?i=Object(a["b"])(i,Object(a["a"])("short-date")):Object(o["p"])(t)&&(i=Object(s["b"])(+i)),i||""}},cd26a:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var i,n=r("dea3"),a=r("a7d7"),s=r("e550"),o=r("3886");function c(e,t){e.extensions.add("GL_OES_standard_derivatives"),t.pbrMode!==a["a"].Water&&t.pbrMode!==a["a"].WaterOnIntegratedMesh||e.include(s["a"],t),e.vertex.uniforms.add("overlayTexOffset","vec4"),e.vertex.uniforms.add("overlayTexScale","vec4"),e.varyings.add("vtcOverlay","vec4"),e.vertex.code.add(o["a"]`void setOverlayVTC(in vec2 uv) {
  3376. vtcOverlay = vec4(uv, uv) * overlayTexScale + overlayTexOffset;
  3377. }`),e.fragment.uniforms.add("ovColorTex","sampler2D"),e.fragment.uniforms.add("overlayOpacity","float"),e.fragment.code.add(o["a"]`bool isValid(vec2 uv, vec2 dxdy) {
  3378. return (uv.x >= 0.0 + dxdy.x) && (uv.x <= 1.0 - dxdy.x) && (uv.y >= 0.0 + dxdy.y) && (uv.y <= 1.0 - dxdy.y);
  3379. }
  3380. vec4 getOverlayColor(sampler2D ov0Tex, vec4 texCoords) {
  3381. vec4 color0 = texture2D(ov0Tex, vec2(texCoords.x * 0.5, texCoords.y));
  3382. vec4 color1 = texture2D(ov0Tex, vec2(texCoords.z * 0.5 + 0.5, texCoords.w));
  3383. bool isValid0 = isValid(texCoords.xy, fwidth(texCoords.xy));
  3384. bool isValid1 = isValid(texCoords.zw, vec2(0.0, 0.0));
  3385. return mix(color1 * float(isValid1), color0, float(isValid0));
  3386. }`),e.fragment.code.add(o["a"]`vec4 getCombinedOverlayColor() {
  3387. return overlayOpacity * getOverlayColor(ovColorTex, vtcOverlay);
  3388. }`),t.pbrMode!==a["a"].Water&&t.pbrMode!==a["a"].WaterOnIntegratedMesh||(e.include(n["a"]),e.fragment.code.add(o["a"]`vec4 getOverlayWaterColor(vec4 maskInput, vec4 colorInput, vec3 vposEyeDir,
  3389. float shadow, vec3 localUp, mat3 tbn, vec3 position, vec3 positionWorld) {
  3390. vec3 n = normalize(tbn * (2.0 * maskInput.rgb - vec3(1.0)));
  3391. vec3 v = vposEyeDir;
  3392. vec3 final = getSeaColor(n, v, lightingMainDirection, colorInput.rgb, lightingMainIntensity, localUp, 1.0 - shadow, maskInput.w, position, positionWorld);
  3393. return vec4(final, colorInput.w);
  3394. }`))}!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.EnabledWithWater=2]="EnabledWithWater",e[e.COUNT=3]="COUNT"}(i||(i={}))},cdd0:function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return O})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return y}));var i=r("b2cd"),n=r("9ef0"),a=r("2eab"),s=r("d7f2"),o=r("a915"),c=r("d445");const l="picture-fill",u="simple-fill",d="simple-line",h="simple-marker",p="text",f="cim",b=new s["a"](1e3);function m(e){const t=e.style;let r=null;if(e)switch(e.type){case h:"cross"!==t&&"x"!==t&&(r=e.color);break;case u:"solid"===t?r=e.color:"none"!==t&&(r={type:"pattern",x:0,y:0,src:Object(i["b"])(`esri/symbols/patterns/${t}.png`),width:5,height:5});break;case l:r={type:"pattern",src:e.url,width:Object(o["g"])(e.width)*e.xscale,height:Object(o["g"])(e.height)*e.yscale,x:Object(o["g"])(e.xoffset),y:Object(o["g"])(e.yoffset)};break;case p:r=e.color;break;case f:r=Object(c["a"])(e)}return r}function g(e,t){const r=e+"-"+t;return void 0!==b.get(r)?Promise.resolve(b.get(r)):Object(a["default"])(e,{responseType:"image"}).then(e=>{const i=e.data,n=i.naturalWidth,a=i.naturalHeight,s=document.createElement("canvas");s.width=n,s.height=a;const o=s.getContext("2d");o.fillStyle=t,o.fillRect(0,0,n,a),o.globalCompositeOperation="destination-in",o.drawImage(i,0,0);const c=s.toDataURL();return b.put(r,c),c})}function y(e){if(!e)return null;let t;switch(e.type){case u:case l:case h:t=y(e.outline);break;case d:{const r=Object(o["g"])(e.width);"none"!==e.style&&0!==r&&(t={color:e.color,style:O(e.style),width:r,cap:e.cap,join:"miter"===e.join?Object(o["g"])(e.miterLimit):e.join});break}default:t=null}return t}const O=function(){const e={};return function(t){if(e[t])return e[t];const r=t.replace(/-/g,"");return e[t]=r,r}}(),v=new n["a"]([128,128,128])},ce0b:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),s=r("44e6"),o=r("a6a3"),c=r("997b"),l=r("5a62"),u=r("f626"),d=r("fd14");let h=class extends(Object(c["a"])(Object(l["a"])(o["a"]))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new u["a"],this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};Object(i["a"])([Object(n["b"])({type:d["a"]})],h.prototype,"elevationInfo",void 0),Object(i["a"])([Object(n["b"])(Object(s["b"])(u["a"],"graphics"))],h.prototype,"graphics",void 0),Object(i["a"])([Object(n["b"])({type:["show","hide"]})],h.prototype,"listMode",void 0),Object(i["a"])([Object(n["b"])()],h.prototype,"screenSizePerspectiveEnabled",void 0),Object(i["a"])([Object(n["b"])({readOnly:!0})],h.prototype,"type",void 0),Object(i["a"])([Object(n["b"])({constructOnly:!0})],h.prototype,"internal",void 0),h=Object(i["a"])([Object(a["a"])("esri.layers.GraphicsLayer")],h);const p=h},ce27:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("0386"),n=r("3c9c");function a(e,t){return null!=e&&(null==t||(t===n["a"].Local?!e.isGeographic||e.isWGS84||e.wkid===i["a"].CGCS2000:e.isWebMercator||e.isWGS84||e.wkid===i["a"].CGCS2000||e.wkid===i["a"].GCSMARS2000||e.wkid===i["a"].GCSMARS2000_SPHERE||e.wkid===i["a"].GCSMOON2000))}},ce50:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("7ffa"),n=r("e92d"),a=r("3423");class s extends a["a"]{constructor(e,t,r){if(super(e,t,r),!(this instanceof s))return new s(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return Object(i["a"])(t)}catch(s){return"[object]"}}))}}catch(e){throw n["a"].getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new s(e.name,e.message,e.details)}}s.prototype.type="error"},ce6d:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("fc29"),a=r("c649"),s=r("d386");class o{constructor(){this._emitter=new o.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this.target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const r=this._listenersMap&&this._listenersMap.get(e);if(!r)return!1;const i=this.target||this;return[...r].forEach(e=>{e.call(i,t)}),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map(e=>this.on(e,t));return Object(a["a"])(r)}if(e.indexOf(",")>-1)throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),{remove:()=>{const r=this._listenersMap&&this._listenersMap.get(e)||[],i=r.indexOf(t);i>=0&&r.splice(i,1)}}}once(e,t){const r=this.on(e,e=>{r.remove(),t.call(null,e)});return r}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=Object(i["a"])([Object(s["a"])("esri.core.Evented")],r),r};let r=class extends n["a"]{constructor(){super(...arguments),this._emitter=new o.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=Object(i["a"])([Object(s["a"])("esri.core.Evented")],r),e.EventedAccessor=r}(o||(o={}));const c=o},ce99:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return o}));var i,n=r("3886"),a=r("690a"),s=r("b7bd");function o(e){const t=new a["a"],r=t.vertex.code,o=t.fragment.code;return t.attributes.add(s["a"].POSITION,"vec2"),e.highlightStage===i.Downsample&&(r.add(n["a"]`void main() {
  3395. gl_Position = vec4(vec2(1.0) - position * 2.0, 0.0, 1.0);
  3396. }`),t.fragment.uniforms.add("tex","sampler2D"),t.fragment.uniforms.add("invFramebufferDim","vec2"),o.add(n["a"]`void main() {
  3397. vec2 coord = gl_FragCoord.xy * invFramebufferDim;
  3398. vec4 value = texture2D(tex, coord);
  3399. float mx = floor(max(value.g, value.b));
  3400. gl_FragColor = vec4(ceil(value.r), mx, mx, 1.0);
  3401. }`)),e.highlightStage===i.Blur&&(t.attributes.add(s["a"].UV0,"vec2"),e.gridOptimization?(t.vertex.uniforms.add("coverageTex","sampler2D"),t.fragment.uniforms.add("blurSize","vec2"),t.varyings.add("blurCoordinate","vec3")):(t.vertex.uniforms.add("blurSize","vec2"),t.varyings.add("blurCoordinates[5]","vec2")),r.add(n["a"]`
  3402. void main() {
  3403. gl_Position = vec4(position, 0.0, 1.0);
  3404. ${e.gridOptimization?n["a"]`
  3405. vec4 cov = texture2D(coverageTex, uv0);
  3406. if (cov.r == 0.0) {
  3407. gl_Position = vec4(0.0);
  3408. }
  3409. blurCoordinate = vec3(gl_Position.xy * 0.5 + vec2(0.5), max(cov.g, cov.b));
  3410. `:n["a"]`
  3411. vec2 uv = position.xy * 0.5 + vec2(0.5);
  3412. blurCoordinates[0] = uv;
  3413. blurCoordinates[1] = uv + blurSize * 1.407333;
  3414. blurCoordinates[2] = uv - blurSize * 1.407333;
  3415. blurCoordinates[3] = uv + blurSize * 3.294215;
  3416. blurCoordinates[4] = uv - blurSize * 3.294215;
  3417. `}
  3418. }`),t.fragment.uniforms.add("tex","sampler2D"),o.add(n["a"]`
  3419. void main() {
  3420. ${e.gridOptimization?n["a"]`
  3421. vec2 uv = blurCoordinate.xy;
  3422. vec4 center = texture2D(tex, uv);
  3423. // do not blur if no pixel or all pixels in neighborhood are set
  3424. if (blurCoordinate.z == 1.0) {
  3425. gl_FragColor = center;
  3426. } else {
  3427. vec4 sum = vec4(0.0);
  3428. sum += center * 0.204164;
  3429. sum += texture2D(tex, uv + blurSize * 1.407333) * 0.304005;
  3430. sum += texture2D(tex, uv - blurSize * 1.407333) * 0.304005;
  3431. sum += texture2D(tex, uv + blurSize * 3.294215) * 0.093913;
  3432. sum += texture2D(tex, uv - blurSize * 3.294215) * 0.093913;
  3433. gl_FragColor = sum;
  3434. }`:n["a"]`
  3435. vec4 sum = vec4(0.0);
  3436. sum += texture2D(tex, blurCoordinates[0]) * 0.204164;
  3437. sum += texture2D(tex, blurCoordinates[1]) * 0.304005;
  3438. sum += texture2D(tex, blurCoordinates[2]) * 0.304005;
  3439. sum += texture2D(tex, blurCoordinates[3]) * 0.093913;
  3440. sum += texture2D(tex, blurCoordinates[4]) * 0.093913;
  3441. gl_FragColor = sum;`}
  3442. }`)),e.highlightStage===i.Apply&&(t.varyings.add("uv","vec2"),e.gridOptimization&&(t.attributes.add(s["a"].UV0,"vec2"),t.vertex.uniforms.add("coverageTex","sampler2D")),r.add(n["a"]`
  3443. void main() {
  3444. ${e.gridOptimization?n["a"]`
  3445. vec4 cov = texture2D(coverageTex, uv0);
  3446. // if no highlight pixel set in this block, hide block
  3447. if (cov.r == 0.0) {
  3448. gl_Position = vec4(0.0);
  3449. return;
  3450. }`:""}
  3451. gl_Position = vec4(position, 0.0, 1.0);
  3452. uv = position.xy * 0.5 + vec2(0.5);
  3453. }`),t.fragment.uniforms.add("tex","sampler2D"),t.fragment.uniforms.add("origin","sampler2D"),t.fragment.uniforms.add("uColor","vec4"),t.fragment.uniforms.add("haloColor","vec4"),t.fragment.uniforms.add("outlineSize","float"),t.fragment.uniforms.add("blurSize","float"),t.fragment.uniforms.add("opacities","vec4"),o.add(n["a"]`void main() {
  3454. vec4 blurredHighlightValue = texture2D(tex, uv);
  3455. float highlightIntensity = blurredHighlightValue.a;
  3456. if (highlightIntensity == 0.0) {
  3457. discard;
  3458. }
  3459. vec4 origin_color = texture2D(origin, uv);
  3460. float outlineIntensity;
  3461. float fillIntensity;
  3462. if (blurredHighlightValue.g > blurredHighlightValue.b) {
  3463. outlineIntensity = haloColor.w * opacities[1];
  3464. fillIntensity = uColor.w * opacities[3];
  3465. }
  3466. else {
  3467. outlineIntensity = haloColor.w * opacities[0];
  3468. fillIntensity = uColor.w * opacities[2];
  3469. }
  3470. float inner = 1.0 - outlineSize / 9.0;
  3471. float outer = 1.0 - (outlineSize + blurSize) / 9.0;
  3472. float outlineFactor = smoothstep(outer, inner, highlightIntensity);
  3473. float fillFactor = any(notEqual(origin_color, vec4(0.0, 0.0, 0.0, 0.0))) ? 1.0 : 0.0;
  3474. float intensity = outlineIntensity * outlineFactor * (1.0 - fillFactor) + fillIntensity * fillFactor;
  3475. gl_FragColor = vec4(mix(haloColor.rgb, uColor.rgb, fillFactor), intensity);
  3476. }`)),t}!function(e){e[e.Blur=0]="Blur",e[e.Apply=1]="Apply",e[e.Downsample=2]="Downsample",e[e.COUNT=3]="COUNT"}(i||(i={}));const c=Object.freeze({__proto__:null,get HighlightCompositionPass(){return i},build:o})},cea0:function(e,t,r){"use strict";r.d(t,"a",(function(){return R})),r.d(t,"b",(function(){return w})),r.d(t,"c",(function(){return j})),r.d(t,"d",(function(){return g})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return I})),r.d(t,"g",(function(){return S})),r.d(t,"h",(function(){return T})),r.d(t,"i",(function(){return l})),r.d(t,"j",(function(){return A})),r.d(t,"k",(function(){return C})),r.d(t,"l",(function(){return c})),r.d(t,"m",(function(){return _})),r.d(t,"n",(function(){return P})),r.d(t,"o",(function(){return E})),r.d(t,"p",(function(){return M}));r("c120");var i=r("e92d"),n=r("28eb");const a=i["a"].getLogger("esri.core.Accessor");function s(e){return null==e?e:new Date(e)}function o(e){return null==e?e:!!e}function c(e){return null==e?e:e.toString()}function l(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function u(e){return null==e?e:Math.round(parseFloat(e))}function d(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function h(e,t){return null!=t&&e&&!(t instanceof e)}function p(e){return e&&"isCollection"in e}function f(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function b(e,t){if(!t||!t.constructor||!p(t.constructor))return m(e,t)?t:new e(t);const r=f(e.prototype.itemType),i=f(t.constructor.prototype.itemType);return r?i?r===i?t:r.prototype.isPrototypeOf(i.prototype)?new e(t):(m(e,t),t):new e(t):t}function m(e,t){return!!d(t)&&(a.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+y(e)+"'"),!0)}function g(e,t){return null==t?t:p(e)?b(e,t):h(e,t)?m(e,t)?t:new e(t):t}function y(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const O=new WeakMap;function v(e){switch(e){case Number:return l;case R:return u;case Boolean:return o;case String:return c;case Date:return s;default:return Object(n["b"])(O,e,()=>g.bind(null,e))}}function _(e,t){const r=v(e);return 1===arguments.length?r:r(t)}function j(e,t,r){return 1===arguments.length?j.bind(null,e):t?Array.isArray(t)?t.map(t=>e(t,r)):[e(t,r)]:t}function w(e,t){return 1===arguments.length?j(_.bind(null,e)):j(_.bind(null,e),t)}function x(e,t,r){return 0!==t&&Array.isArray(r)?r.map(r=>x(e,t-1,r)):e(r)}function T(e,t,r){if(2===arguments.length)return T.bind(null,e,t);if(!r)return r;let i=t,n=r=x(e,t,r);for(;i>0&&Array.isArray(n);)i--,n=n[0];if(void 0!==n)for(let a=0;a<i;a++)r=[r];return r}function S(e,t,r){return 2===arguments.length?T(_.bind(null,e),t):T(_.bind(null,e),t,r)}function E(e){return!!Array.isArray(e)&&!e.some(t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)})}function A(e,t){if(2===arguments.length)return A(e).call(null,t);const r=new Set,i=e.filter(e=>"function"!=typeof e),n=e.filter(e=>"function"==typeof e);for(const a of e)"string"!=typeof a&&"number"!=typeof a||r.add(a);let s=null,o=null;return(e,t)=>{if(null==e)return e;const c=typeof e,l="string"===c||"number"===c;return l&&(r.has(e)||n.some(e=>"string"===c&&e===String||"number"===c&&e===Number))||"object"===c&&n.some(t=>!h(e,t))?e:(l&&i.length?(s||(s=i.map(e=>"string"==typeof e?`'${e}'`:""+e).join(", ")),a.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${s}`)):"object"==typeof e&&n.length?(o||(o=n.map(e=>y(e)).join(", ")),a.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${o}`)):a.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function C(e,t){if(2===arguments.length)return C(e).call(null,t);const r={},i=[],n=[];for(const a in e.typeMap){const t=e.typeMap[a];r[a]=_(t),i.push(y(t)),n.push(a)}const s=()=>`'${i.join("', '")}'`,o=()=>`'${n.join("', '")}'`,c="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!h(e.base,t))return t;if(null==t)return t;const i=c(t)||e.defaultKeyValue,n=r[i];if(!n)return a.error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!h(e.typeMap[i],t))return t;if("string"==typeof e.key&&!d(t)){const r={};for(const i in t)i!==e.key&&(r[i]=t[i]);return n(r)}return n(t)}}class R{}const M={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function P(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function I(e){switch(e.type){case"native":return _(e.value);case"array":return j(I(e.value));case"one-of":return D(e);default:return null}}function D(e){let t=null;return(r,i)=>N(r,e)?r:(null==t&&(t=L(e)),a.error("Accessor#set","Invalid property value, value needs to be of type "+t),i&&(i.valid=!1),null)}function L(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case R:return"integer";case Date:return"date";default:return y(e.value)}case"array":return"array of "+L(e.value);case"one-of":{const t=e.values.map(e=>L(e));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function N(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case R:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some(e=>!N(e,t.value));case"one-of":return t.values.some(t=>N(e,t))}}},ceaf:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("5986");let c=i=class extends o["a"]{constructor(e){super(e),this.image=null,this.type="toggle",this.value=!1}clone(){return new i({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};Object(n["a"])([Object(a["b"])()],c.prototype,"image",void 0),Object(n["a"])([Object(a["b"])()],c.prototype,"value",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.support.Action.ActionToggle")],c);const l=c},cee3:function(e,t,r){"use strict";r.d(t,"a",(function(){return ve})),r.d(t,"b",(function(){return je})),r.d(t,"c",(function(){return xe})),r.d(t,"d",(function(){return Pe})),r.d(t,"e",(function(){return _e})),r.d(t,"f",(function(){return Re})),r.d(t,"g",(function(){return Te})),r.d(t,"h",(function(){return Ce})),r.d(t,"i",(function(){return Ae})),r.d(t,"j",(function(){return Ee})),r.d(t,"k",(function(){return Me})),r.d(t,"l",(function(){return Ie})),r.d(t,"m",(function(){return we})),r.d(t,"n",(function(){return Se}));var i=r("1c92"),n=r("dae5"),a=r("04f0"),s=r("e764"),o=r("b139"),c=r("e431"),l=r("47f8"),u=r("0b2d"),d=(r("7577"),r("0fc4")),h=r("4261"),p=r("7289");const f=1e-6,b=[0,0,0],m=[0,0,0];function g(e,t){const{data:r,size:i}=e,n=r.length/i;if(n<=0)return;const a=new ie(e);se(b,a.minProj,a.maxProj),ce(b,b,.5),oe(m,a.maxProj,a.minProj);const s=ae(m),o=new ne;o.quality=s,n<14&&(e={data:new Float64Array(a.buffer,112,42),size:3});const c=[0,0,0],l=[0,0,0],u=[0,0,0],d=[0,0,0],h=[0,0,0],p=[0,0,0],f=[0,0,0];switch(y(a,e,f,c,l,u,d,h,p,o)){case 1:return void G(b,m,t);case 2:return void Y(e,d,t)}E(e,f,c,l,u,d,h,p,o),J(e,o.b0,o.b1,o.b2,$,Z);const g=[0,0,0];oe(g,Z,$),o.quality=ae(g),o.quality<s?te(o.b0,o.b1,o.b2,$,Z,g,t):G(b,m,t)}function y(e,t,r,i,n,a,s,o,c,l){return A(e,i,n),pe(i,n)<f?1:(oe(s,i,n),de(s,s),R(t,i,s,a)<f?2:(oe(o,n,a),de(o,o),oe(c,a,i),de(c,c),ue(r,o,s),de(r,r),U(t,r,s,o,c,l),0))}const O=[0,0,0],v=[0,0,0],_=[0,0,0],j=[0,0,0],w=[0,0,0],x=[0,0,0],T=[0,0,0],S=[0,0,0];function E(e,t,r,i,n,a,s,o,c){P(e,t,r,O,v),void 0!==O[0]&&(oe(_,O,r),de(_,_),oe(j,O,i),de(j,j),oe(w,O,n),de(w,w),ue(x,j,a),de(x,x),ue(T,w,s),de(T,T),ue(S,_,o),de(S,S),U(e,x,a,j,_,c),U(e,T,s,w,j,c),U(e,S,o,_,w,c)),void 0!==v[0]&&(oe(_,v,r),de(_,_),oe(j,v,i),de(j,j),oe(w,v,n),de(w,w),ue(x,j,a),de(x,x),ue(T,w,s),de(T,T),ue(S,_,o),de(S,S),U(e,x,a,j,_,c),U(e,T,s,w,j,c),U(e,S,o,_,w,c))}function A(e,t,r){let i=pe(e.maxVert[0],e.minVert[0]),n=0;for(let a=1;a<7;++a){const t=pe(e.maxVert[a],e.minVert[a]);t>i&&(i=t,n=a)}le(t,e.minVert[n]),le(r,e.maxVert[n])}const C=[0,0,0];function R(e,t,r,i){const{data:n,size:a}=e;let s=Number.NEGATIVE_INFINITY,o=0;for(let c=0;c<n.length;c+=a){C[0]=n[c]-t[0],C[1]=n[c+1]-t[1],C[2]=n[c+2]-t[2];const e=r[0]*C[0]+r[1]*C[1]+r[2]*C[2],i=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],a=C[0]*C[0]+C[1]*C[1]+C[2]*C[2]-e*e/i;a>s&&(s=a,o=c)}return le(i,n,o),s}const M=[0,0];function P(e,t,r,i,n){V(e,t,M,n,i);const a=fe(r,t);M[1]-f<=a&&(i[0]=void 0),M[0]+f>=a&&(n[0]=void 0)}const I=[0,0,0],D=[0,0,0],L=[0,0,0],N=[0,0,0],F=[0,0,0],k=[0,0,0];function U(e,t,r,i,n,a){if(he(t)<f)return;ue(I,r,t),ue(D,i,t),ue(L,n,t),B(e,t,M),F[1]=M[0],N[1]=M[1],k[1]=N[1]-F[1];const s=[r,i,n],o=[I,D,L];for(let c=0;c<3;++c){B(e,s[c],M),F[0]=M[0],N[0]=M[1],B(e,o[c],M),F[2]=M[0],N[2]=M[1],k[0]=N[0]-F[0],k[2]=N[2]-F[2];const r=ae(k);r<a.quality&&(le(a.b0,s[c]),le(a.b1,t),le(a.b2,o[c]),a.quality=r)}}const z=[0,0,0];function B(e,t,r){const{data:i,size:n}=e;r[0]=Number.POSITIVE_INFINITY,r[1]=Number.NEGATIVE_INFINITY;for(let a=0;a<i.length;a+=n){const e=i[a]*t[0]+i[a+1]*t[1]+i[a+2]*t[2];r[0]=Math.min(r[0],e),r[1]=Math.max(r[1],e)}}function V(e,t,r,i,n){const{data:a,size:s}=e;le(i,a),le(n,i),r[0]=fe(z,t),r[1]=r[0];for(let o=s;o<a.length;o+=s){const e=a[o]*t[0]+a[o+1]*t[1]+a[o+2]*t[2];e<r[0]&&(r[0]=e,le(i,a,o)),e>r[1]&&(r[1]=e,le(n,a,o))}}function G(e,t,r){le(r.center,e),ce(r.halfSize,t,.5),r.quaternion[0]=0,r.quaternion[1]=0,r.quaternion[2]=0,r.quaternion[3]=1}const H=[0,0,0],q=[0,0,0],W=[0,0,0],$=[0,0,0],Z=[0,0,0],X=[0,0,0];function Y(e,t,r){le(H,t),Math.abs(t[0])>Math.abs(t[1])&&Math.abs(t[0])>Math.abs(t[2])?H[0]=0:Math.abs(t[1])>Math.abs(t[2])?H[1]=0:H[2]=0,he(H)<f&&(H[0]=H[1]=H[2]=1),ue(q,t,H),de(q,q),ue(W,t,q),de(W,W),J(e,t,q,W,$,Z),oe(X,Z,$),te(t,q,W,$,Z,X,r)}function J(e,t,r,i,n,a){B(e,t,M),n[0]=M[0],a[0]=M[1],B(e,r,M),n[1]=M[0],a[1]=M[1],B(e,i,M),n[2]=M[0],a[2]=M[1]}const Q=[0,0,0],K=[1,0,0,0,1,0,0,0,1],ee=[0,0,0];function te(e,t,r,i,n,a,s){K[0]=e[0],K[1]=e[1],K[2]=e[2],K[3]=t[0],K[4]=t[1],K[5]=t[2],K[6]=r[0],K[7]=r[1],K[8]=r[2],be(s.quaternion,K),se(ee,i,n),ce(ee,ee,.5),ce(s.center,e,ee[0]),ce(Q,t,ee[1]),se(s.center,s.center,Q),ce(Q,r,ee[2]),se(s.center,s.center,Q),ce(s.halfSize,a,.5)}const re=7;class ie{constructor(e){this.minVert=new Array(re),this.maxVert=new Array(re);const t=64*re;this.buffer=new ArrayBuffer(t);let r=0;this.minProj=new Float64Array(this.buffer,r,re),r+=8*re,this.maxProj=new Float64Array(this.buffer,r,re),r+=8*re;for(let o=0;o<re;++o)this.minVert[o]=new Float64Array(this.buffer,r,3),r+=24;for(let o=0;o<re;++o)this.maxVert[o]=new Float64Array(this.buffer,r,3),r+=24;for(let o=0;o<re;++o)this.minProj[o]=Number.POSITIVE_INFINITY,this.maxProj[o]=Number.NEGATIVE_INFINITY;const i=new Array(re),n=new Array(re),{data:a,size:s}=e;for(let o=0;o<a.length;o+=s){let e=a[o];e<this.minProj[0]&&(this.minProj[0]=e,i[0]=o),e>this.maxProj[0]&&(this.maxProj[0]=e,n[0]=o),e=a[o+1],e<this.minProj[1]&&(this.minProj[1]=e,i[1]=o),e>this.maxProj[1]&&(this.maxProj[1]=e,n[1]=o),e=a[o+2],e<this.minProj[2]&&(this.minProj[2]=e,i[2]=o),e>this.maxProj[2]&&(this.maxProj[2]=e,n[2]=o),e=a[o]+a[o+1]+a[o+2],e<this.minProj[3]&&(this.minProj[3]=e,i[3]=o),e>this.maxProj[3]&&(this.maxProj[3]=e,n[3]=o),e=a[o]+a[o+1]-a[o+2],e<this.minProj[4]&&(this.minProj[4]=e,i[4]=o),e>this.maxProj[4]&&(this.maxProj[4]=e,n[4]=o),e=a[o]-a[o+1]+a[o+2],e<this.minProj[5]&&(this.minProj[5]=e,i[5]=o),e>this.maxProj[5]&&(this.maxProj[5]=e,n[5]=o),e=a[o]-a[o+1]-a[o+2],e<this.minProj[6]&&(this.minProj[6]=e,i[6]=o),e>this.maxProj[6]&&(this.maxProj[6]=e,n[6]=o)}for(let o=0;o<re;++o){let e=i[o];le(this.minVert[o],a,e),e=n[o],le(this.maxVert[o],a,e)}}}class ne{constructor(){this.b0=[1,0,0],this.b1=[0,1,0],this.b2=[0,0,1],this.quality=0}}function ae(e){return e[0]*e[1]+e[0]*e[2]+e[1]*e[2]}function se(e,t,r){e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2]}function oe(e,t,r){e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2]}function ce(e,t,r){e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r}function le(e,t,r=0){e[0]=t[r+0],e[1]=t[r+1],e[2]=t[r+2]}function ue(e,t,r){const i=t[0],n=t[1],a=t[2],s=r[0],o=r[1],c=r[2];e[0]=n*c-a*o,e[1]=a*s-i*c,e[2]=i*o-n*s}function de(e,t){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];if(r>0){const i=1/Math.sqrt(r);e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i}}function he(e){return e[0]*e[0]+e[1]*e[1]+e[2]*e[2]}function pe(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function fe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function be(e,t){const r=t[0]+t[4]+t[8];if(r>0){let i=Math.sqrt(r+1);e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i}else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const i=(r+1)%3,n=(r+2)%3;let a=Math.sqrt(t[3*r+r]-t[3*i+i]-t[3*n+n]+1);e[r]=.5*a,a=.5/a,e[3]=(t[3*i+n]-t[3*n+i])*a,e[i]=(t[3*i+r]+t[3*r+i])*a,e[n]=(t[3*n+r]+t[3*r+n])*a}}const me=Object(o["b"])(),ge=Object(u["f"])(),ye=Object(u["f"])(),Oe=(Object(d["e"])(),Object(n["b"])());class ve{constructor(e){const t=56,r=0,i=24,n=36,a=e*t;this.buffer=new ArrayBuffer(a),this.obbs=new Array(e);for(let o=0;o<e;o++)this.obbs[o]={center:Object(u["e"])(this.buffer,t*o+r),halfSize:Object(l["b"])(this.buffer,t*o+i),quaternion:Object(s["a"])(this.buffer,t*o+n)}}}function _e(e=[0,0,0],t=[-1,-1,-1],r=[0,0,0,1]){return{center:Object(u["d"])(e),halfSize:Object(l["a"])(t),quaternion:Object(s["c"])(r)}}function je(e){return _e(e.center,e.halfSize,e.quaternion)}function we(e,t){Object(c["m"])(t.center,e.center),Object(c["m"])(t.halfSize,e.halfSize),Object(a["a"])(t.quaternion,e.quaternion)}function xe(e,t){return t=t||_e(),g(e,t),t}function Te(e,t){const r=Object(p["v"])(t,e.center),i=Me(e,Object(p["r"])(t));return r>i?1:r<-i?-1:0}function Se(e,t){t||(t=Object(h["h"])());const r=Object(i["h"])(Oe,e.quaternion),n=e.halfSize[0]*Math.abs(r[0])+e.halfSize[1]*Math.abs(r[3])+e.halfSize[2]*Math.abs(r[6]),a=e.halfSize[0]*Math.abs(r[1])+e.halfSize[1]*Math.abs(r[4])+e.halfSize[2]*Math.abs(r[7]),s=e.halfSize[0]*Math.abs(r[2])+e.halfSize[1]*Math.abs(r[5])+e.halfSize[2]*Math.abs(r[8]);return t[0]=e.center[0]-n,t[1]=e.center[1]-a,t[2]=e.center[2]-s,t[3]=e.center[0]+n,t[4]=e.center[1]+a,t[5]=e.center[2]+s,t}function Ee(e,t){return Object(p["v"])(t,e.center)-Me(e,Object(p["r"])(t))}function Ae(e,t){return Object(p["v"])(t,e.center)+Me(e,Object(p["r"])(t))}function Ce(e,t){return Te(e,t[0])<=0&&Te(e,t[1])<=0&&Te(e,t[2])<=0&&Te(e,t[3])<=0&&Te(e,t[4])<=0&&Te(e,t[5])<=0}function Re(e,t,r,i=0){Object(a["b"])(me,e.quaternion),Object(c["l"])(ge,t,e.center);const n=Object(c["w"])(ge,ge,me),s=Object(c["w"])(ye,r,me);let o=-1/0,l=1/0;for(let a=0;a<3;a++)if(Math.abs(s[a])>1e-6){const t=(i+e.halfSize[a]-n[a])/s[a],r=(-i-e.halfSize[a]-n[a])/s[a];o=Math.max(o,Math.min(t,r)),l=Math.min(l,Math.max(t,r))}else if(n[a]>e.halfSize[a]+i||n[a]<-e.halfSize[a]-i)return!1;return o<=l}(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let i=0;i<r.length;i++)e[t+i]=r[i];t+=6};r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4])})();function Me(e,t){Object(a["b"])(me,e.quaternion),Object(c["w"])(ge,t,me);const r=e.halfSize;return Math.abs(ge[0]*r[0])+Math.abs(ge[1]*r[1])+Math.abs(ge[2]*r[2])}function Pe(e,t){for(let r=0;r<8;++r){const i=t[r];i[0]=1&r?-e.halfSize[0]:e.halfSize[0],i[1]=2&r?-e.halfSize[1]:e.halfSize[1],i[2]=4&r?-e.halfSize[2]:e.halfSize[2],Object(c["w"])(i,i,e.quaternion),Object(c["h"])(i,i,e.center)}}function Ie(e){return Object(c["A"])(e.halfSize)}},cf49:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i=r("1fd7"),n=r("ce50"),a=r("ddc2"),s=r("7533"),o=r("db52"),c=r("6e07"),l=r("4dc9"),u=r("37e7"),d=r("0d76"),h=r("35c9"),p=r("21ba"),f=r("9fab");const b={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function m(e,t=b){if(!e)return{symbol:null};const{retainId:r=b.retainId,ignoreDrivers:m=b.ignoreDrivers,hasLabelingContext:g=b.hasLabelingContext,retainCIM:y=b.retainCIM}=t;let O;if(Object(i["c"])(e)||e instanceof a["a"])O=e.clone();else if("cim"===e.type){var v,_;const t=null==(v=e.data)||null==(_=v.symbol)?void 0:_.type;if("CIMPointSymbol"!==t)return{error:new n["a"]("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${t||"unknown"}' is unsupported in 3D`,{symbol:e})};O=y?e.clone():s["a"].fromCIMSymbol(e)}else if(e instanceof o["a"])O=c["a"].fromSimpleLineSymbol(e);else if(e instanceof l["a"])O=s["a"].fromSimpleMarkerSymbol(e);else if(e instanceof u["a"])O=s["a"].fromPictureMarkerSymbol(e);else if(e instanceof d["a"])O=h["a"].fromSimpleFillSymbol(e);else{if(!(e instanceof p["a"]))return{error:new n["a"]("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};O=g?f["a"].fromTextSymbol(e):s["a"].fromTextSymbol(e)}if(r&&"cim"!==O.type&&(O.id=e.id),m&&Object(i["c"])(O))for(let i=0;i<O.symbolLayers.length;++i)O.symbolLayers.getItemAt(i)._ignoreDrivers=!0;return{symbol:O}}},cf9c:function(e,t,r){"use strict";function i(e){return"string"==typeof e?document.getElementById(e):e}function n(e){for(;e.hasChildNodes();)e.removeChild(e.firstChild)}function a(e,t){const r=t.parentNode;r&&r.insertBefore(e,t)}function s(e,t){for(;;){const r=e.firstChild;if(!r)break;t.appendChild(r)}}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return s}));(()=>{if("function"==typeof Element.prototype.closest)return(e,t)=>e.closest(t);const e=Element.prototype.matches||Element.prototype.msMatchesSelector})()},d017:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return o}));var i=r("501b"),n=r("3886");function a(e){e.fragment.include(i["a"]),e.fragment.uniforms.add("shadowMapTex","sampler2D"),e.fragment.uniforms.add("numCascades","int"),e.fragment.uniforms.add("cascadeDistances","vec4"),e.fragment.uniforms.add("shadowMapMatrix","mat4",4),e.fragment.uniforms.add("depthHalfPixelSz","float"),e.fragment.code.add(n["a"]`int chooseCascade(float _linearDepth, out mat4 mat) {
  3477. vec4 distance = cascadeDistances;
  3478. float depth = _linearDepth;
  3479. int i = depth < distance[1] ? 0 : depth < distance[2] ? 1 : depth < distance[3] ? 2 : 3;
  3480. mat = i == 0 ? shadowMapMatrix[0] : i == 1 ? shadowMapMatrix[1] : i == 2 ? shadowMapMatrix[2] : shadowMapMatrix[3];
  3481. return i;
  3482. }
  3483. vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
  3484. vec4 lv = mat * vec4(_vpos, 1.0);
  3485. lv.xy /= lv.w;
  3486. return 0.5 * lv.xyz + vec3(0.5);
  3487. }
  3488. vec2 cascadeCoordinates(int i, vec3 lvpos) {
  3489. return vec2(float(i - 2 * (i / 2)) * 0.5, float(i / 2) * 0.5) + 0.5 * lvpos.xy;
  3490. }
  3491. float readShadowMapDepth(vec2 uv, sampler2D _depthTex) {
  3492. return rgba2float(texture2D(_depthTex, uv));
  3493. }
  3494. float posIsInShadow(vec2 uv, vec3 lvpos, sampler2D _depthTex) {
  3495. return readShadowMapDepth(uv, _depthTex) < lvpos.z ? 1.0 : 0.0;
  3496. }
  3497. float filterShadow(vec2 uv, vec3 lvpos, float halfPixelSize, sampler2D _depthTex) {
  3498. float texSize = 0.5 / halfPixelSize;
  3499. vec2 st = fract((vec2(halfPixelSize) + uv) * texSize);
  3500. float s00 = posIsInShadow(uv + vec2(-halfPixelSize, -halfPixelSize), lvpos, _depthTex);
  3501. float s10 = posIsInShadow(uv + vec2(halfPixelSize, -halfPixelSize), lvpos, _depthTex);
  3502. float s11 = posIsInShadow(uv + vec2(halfPixelSize, halfPixelSize), lvpos, _depthTex);
  3503. float s01 = posIsInShadow(uv + vec2(-halfPixelSize, halfPixelSize), lvpos, _depthTex);
  3504. return mix(mix(s00, s10, st.x), mix(s01, s11, st.x), st.y);
  3505. }
  3506. float readShadowMap(const in vec3 _vpos, float _linearDepth) {
  3507. mat4 mat;
  3508. int i = chooseCascade(_linearDepth, mat);
  3509. if (i >= numCascades) { return 0.0; }
  3510. vec3 lvpos = lightSpacePosition(_vpos, mat);
  3511. if (lvpos.z >= 1.0) { return 0.0; }
  3512. if (lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) { return 0.0; }
  3513. vec2 uv = cascadeCoordinates(i, lvpos);
  3514. return filterShadow(uv, lvpos, depthHalfPixelSz, shadowMapTex);
  3515. }`)}function s(e,t){t.shadowMappingEnabled&&(t.shadowMap.bind(e),t.shadowMap.bindView(e,t.origin))}function o(e,t,r){t.shadowMappingEnabled&&t.shadowMap.bindView(e,r)}function c(e,t){t.shadowMappingEnabled&&t.shadowMap.bindView(e,t.origin)}},d047:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("501b"),n=r("3886");function a(e){e.include(i["a"]),e.code.add(n["a"]`float linearDepthFromFloat(float depth, vec2 nearFar) {
  3516. return -(depth * (nearFar[1] - nearFar[0]) + nearFar[0]);
  3517. }
  3518. float linearDepthFromTexture(sampler2D depthTex, vec2 uv, vec2 nearFar) {
  3519. return linearDepthFromFloat(rgba2float(texture2D(depthTex, uv)), nearFar);
  3520. }`)}},d099:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("2e3f"),c=r("a7a7");let l=i=class extends c["a"]{constructor(e){super(e),this.expressionInfo=null,this.type="expression"}clone(){var e;return new i({expressionInfo:null==(e=this.expressionInfo)?void 0:e.clone()})}};Object(n["a"])([Object(a["b"])({type:o["a"],json:{write:!0}})],l.prototype,"expressionInfo",void 0),Object(n["a"])([Object(a["b"])({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(s["a"])("esri.popup.content.ExpressionContent")],l);const u=l},d0cb:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return l}));var i,n=r("b566"),a=r("2f98"),s=r("3886"),o=r("b7bd");function c(e,t){const r=e;r.include(a["a"]),r.attributes.add(o["a"].POSITION,"vec3"),r.attributes.add(o["a"].NORMAL,"vec3"),r.attributes.add(o["a"].AUXPOS1,"vec4"),r.vertex.uniforms.add("proj","mat4"),r.vertex.uniforms.add("view","mat4"),r.vertex.uniforms.add("viewNormal","mat4"),r.vertex.uniforms.add("viewport","vec4"),r.vertex.uniforms.add("cameraPosition","vec3"),r.vertex.uniforms.add("polygonOffset","float"),r.vertex.uniforms.add("cameraGroundRelative","float"),r.vertex.uniforms.add("pixelRatio","float"),r.vertex.uniforms.add("perDistancePixelRatio","float"),r.vertex.uniforms.add("renderTransparentlyOccludedHUD","float"),t.verticalOffsetEnabled&&r.vertex.uniforms.add("verticalOffset","vec4"),t.screenSizePerspectiveEnabled&&r.vertex.uniforms.add("screenSizePerspectiveAlignment","vec4"),r.vertex.uniforms.add("hudVisibilityTexture","sampler2D"),r.vertex.constants.add("smallOffsetAngle","float",.984807753012208),r.vertex.code.add(s["a"]`struct ProjectHUDAux {
  3521. vec3 posModel;
  3522. vec3 posView;
  3523. vec3 vnormal;
  3524. float distanceToCamera;
  3525. float absCosAngle;
  3526. };`),r.vertex.code.add(s["a"]`float applyHUDViewDependentPolygonOffset(float pointGroundDistance, float absCosAngle, inout vec3 posView) {
  3527. float pointGroundSign = sign(pointGroundDistance);
  3528. if (pointGroundSign == 0.0) {
  3529. pointGroundSign = cameraGroundRelative;
  3530. }
  3531. float groundRelative = cameraGroundRelative * pointGroundSign;
  3532. if (polygonOffset > .0) {
  3533. float cosAlpha = clamp(absCosAngle, 0.01, 1.0);
  3534. float tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;
  3535. float factor = (1.0 - tanAlpha / viewport[2]);
  3536. if (groundRelative > 0.0) {
  3537. posView *= factor;
  3538. }
  3539. else {
  3540. posView /= factor;
  3541. }
  3542. }
  3543. return groundRelative;
  3544. }`),t.isDraped||r.vertex.code.add(s["a"]`void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {
  3545. float distanceToCamera = length(posView);
  3546. float pixelOffset = distanceToCamera * perDistancePixelRatio * 0.5;
  3547. vec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;
  3548. vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;
  3549. posModel += modelOffset;
  3550. posView += viewOffset;
  3551. }`),r.vertex.code.add(s["a"]`
  3552. vec4 projectPositionHUD(out ProjectHUDAux aux) {
  3553. // centerOffset is in view space and is used to implement world size offsetting
  3554. // of labels with respect to objects. It also pulls the label towards the viewer
  3555. // so that the label is visible in front of the object.
  3556. vec3 centerOffset = auxpos1.xyz;
  3557. // The pointGroundDistance is the distance of the geometry to the ground and is
  3558. // negative if the point is below the ground, or positive if the point is above
  3559. // ground.
  3560. float pointGroundDistance = auxpos1.w;
  3561. aux.posModel = position;
  3562. aux.posView = (view * vec4(aux.posModel, 1.0)).xyz;
  3563. aux.vnormal = normal;
  3564. ${t.isDraped?"":"applyHUDVerticalGroundOffset(aux.vnormal, aux.posModel, aux.posView);"}
  3565. // Screen sized offset in world space, used for example for line callouts
  3566. // Note: keep this implementation in sync with the CPU implementation, see
  3567. // - MaterialUtil.verticalOffsetAtDistance
  3568. // - HUDMaterial.applyVerticalOffsetTransformation
  3569. aux.distanceToCamera = length(aux.posView);
  3570. vec3 viewDirObjSpace = normalize(cameraPosition - aux.posModel);
  3571. float cosAngle = dot(aux.vnormal, viewDirObjSpace);
  3572. aux.absCosAngle = abs(cosAngle);
  3573. ${t.screenSizePerspectiveEnabled&&(t.verticalOffsetEnabled||t.screenCenterOffsetUnitsEnabled===i.Screen)?"vec4 perspectiveFactor = screenSizePerspectiveScaleFactor(aux.absCosAngle, aux.distanceToCamera, screenSizePerspectiveAlignment);":""}
  3574. ${t.verticalOffsetEnabled?t.screenSizePerspectiveEnabled?"float verticalOffsetScreenHeight = applyScreenSizePerspectiveScaleFactorFloat(verticalOffset.x, perspectiveFactor);":"float verticalOffsetScreenHeight = verticalOffset.x;":""}
  3575. ${t.verticalOffsetEnabled?s["a"]`
  3576. float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * aux.distanceToCamera, verticalOffset.z, verticalOffset.w);
  3577. vec3 modelOffset = aux.vnormal * worldOffset;
  3578. aux.posModel += modelOffset;
  3579. vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;
  3580. aux.posView += viewOffset;
  3581. // Since we elevate the object, we need to take that into account
  3582. // in the distance to ground
  3583. pointGroundDistance += worldOffset;`:""}
  3584. float groundRelative = applyHUDViewDependentPolygonOffset(pointGroundDistance, aux.absCosAngle, aux.posView);
  3585. ${t.screenCenterOffsetUnitsEnabled!==i.Screen?s["a"]`
  3586. // Apply x/y in view space, but z in screen space (i.e. along posView direction)
  3587. aux.posView += vec3(centerOffset.x, centerOffset.y, 0.0);
  3588. // Same material all have same z != 0.0 condition so should not lead to
  3589. // branch fragmentation and will save a normalization if it's not needed
  3590. if (centerOffset.z != 0.0) {
  3591. aux.posView -= normalize(aux.posView) * centerOffset.z;
  3592. }
  3593. `:""}
  3594. vec4 posProj = proj * vec4(aux.posView, 1.0);
  3595. ${t.screenCenterOffsetUnitsEnabled===i.Screen?t.screenSizePerspectiveEnabled?"float centerOffsetY = applyScreenSizePerspectiveScaleFactorFloat(centerOffset.y, perspectiveFactor);":"float centerOffsetY = centerOffset.y;":""}
  3596. ${t.screenCenterOffsetUnitsEnabled===i.Screen?"posProj.xy += vec2(centerOffset.x, centerOffsetY) * pixelRatio * 2.0 / viewport.zw * posProj.w;":""}
  3597. // constant part of polygon offset emulation
  3598. posProj.z -= groundRelative * polygonOffset * posProj.w;
  3599. return posProj;
  3600. }
  3601. `),r.vertex.code.add(s["a"]`bool testVisibilityHUD(vec4 posProj) {
  3602. vec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);
  3603. vec4 occlusionPixel = texture2D(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);
  3604. if (renderTransparentlyOccludedHUD > 0.5) {
  3605. return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * renderTransparentlyOccludedHUD < 1.0;
  3606. }
  3607. return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;
  3608. }`)}function l(e,t){e.setUniform1f("renderTransparentlyOccludedHUD",t.renderTransparentlyOccludedHUD===n["a"].OCCLUDED?1:t.renderTransparentlyOccludedHUD===n["a"].NOTOCCLUDED?0:.75)}!function(e){e[e.World=0]="World",e[e.Screen=1]="Screen",e[e.COUNT=2]="COUNT"}(i||(i={}))},d0e9:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("a7a7");let c=i=class extends o["a"]{constructor(e){super(e),this.text=null,this.type="text"}clone(){return new i({text:this.text})}};Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],c.prototype,"text",void 0),Object(n["a"])([Object(a["b"])({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=i=Object(n["a"])([Object(s["a"])("esri.popup.content.TextContent")],c);const l=c},d17d:function(e,t,r){"use strict";var i,n,a,s,o,c,l,u,d,h,p,f,b,m,g,y,O,v,_,j,w,x;r.d(t,"a",(function(){return T})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return i})),r.d(t,"f",(function(){return I})),r.d(t,"g",(function(){return E})),r.d(t,"h",(function(){return d})),r.d(t,"i",(function(){return C})),r.d(t,"j",(function(){return l})),r.d(t,"k",(function(){return u})),r.d(t,"l",(function(){return A})),r.d(t,"m",(function(){return x})),r.d(t,"n",(function(){return c})),r.d(t,"o",(function(){return j})),r.d(t,"p",(function(){return m})),r.d(t,"q",(function(){return y})),r.d(t,"r",(function(){return n})),r.d(t,"s",(function(){return O})),r.d(t,"t",(function(){return S})),r.d(t,"u",(function(){return _})),r.d(t,"v",(function(){return g})),r.d(t,"w",(function(){return h})),r.d(t,"x",(function(){return D})),r.d(t,"y",(function(){return w})),r.d(t,"z",(function(){return p})),r.d(t,"A",(function(){return b})),r.d(t,"B",(function(){return f})),r.d(t,"C",(function(){return R})),r.d(t,"D",(function(){return v})),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(i||(i={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(n||(n={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(a||(a={})),function(e){e[e.ADD=32774]="ADD",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(s||(s={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER"}(o||(o={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(c||(c={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(l||(l={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(u||(u={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(d||(d={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(h||(h={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(p||(p={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(f||(f={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(b||(b={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(m||(m={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(g||(g={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(y||(y={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(O||(O={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(v||(v={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(_||(_={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(j||(j={})),function(e){e[e.TEXTURE=0]="TEXTURE",e[e.RENDER_BUFFER=1]="RENDER_BUFFER",e[e.CUBEMAP=2]="CUBEMAP"}(w||(w={})),function(e){e[e.NONE=0]="NONE",e[e.DEPTH_RENDER_BUFFER=1]="DEPTH_RENDER_BUFFER",e[e.STENCIL_RENDER_BUFFER=2]="STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_RENDER_BUFFER=3]="DEPTH_STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_TEXTURE=4]="DEPTH_STENCIL_TEXTURE"}(x||(x={}));const T=33984;var S,E;!function(e){e[e.Texture=0]="Texture",e[e.Buffer=1]="Buffer",e[e.VAO=2]="VAO",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.Framebuffer=5]="Framebuffer",e[e.Renderbuffer=6]="Renderbuffer",e[e.Sync=7]="Sync",e[e.COUNT=8]="COUNT"}(S||(S={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(E||(E={}));const A=33306;var C,R,M,P,I,D,L;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(C||(C={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(R||(R={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(M||(M={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(P||(P={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(I||(I={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(D||(D={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(L||(L={}))},d18f:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return f})),r.d(t,"e",(function(){return l})),r.d(t,"f",(function(){return h})),r.d(t,"g",(function(){return p})),r.d(t,"h",(function(){return u}));var i=r("b50f"),n=r("2119"),a=r("e431"),s=r("0b2d"),o=r("7361");function c(e){return e?{origin:Object(s["d"])(e.origin),direction:Object(s["d"])(e.direction)}:{origin:Object(s["f"])(),direction:Object(s["f"])()}}function l(e,t){return Object(i["e"])(e.origin,t.origin)&&Object(i["e"])(e.direction,t.direction)}function u(e,t){const r=g.get();return r.origin=e,r.direction=t,r}function d(e,t=c()){return p(e.origin,e.direction,t)}function h(e,t,r=c()){return Object(a["m"])(r.origin,e),Object(a["l"])(r.direction,t,e),r}function p(e,t,r=c()){return Object(a["m"])(r.origin,e),Object(a["m"])(r.direction,t),r}function f(e,t){const r=Object(a["i"])(o["d"].get(),Object(a["t"])(o["d"].get(),e.direction),Object(a["l"])(o["d"].get(),t,e.origin));return Object(a["j"])(r,r)}function b(e,t,r){const i=Object(a["j"])(e.direction,Object(a["l"])(r,t,e.origin));return Object(a["h"])(r,e.origin,Object(a["g"])(r,e.direction,i)),r}function m(){return{origin:null,direction:null}}const g=new n["a"](m)},d1ac:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return u}));var i=r("9ef0"),n=r("b2b2"),a=r("d297");function s(e,t){if(!e||e.symbol)return null;const r=t&&t.renderer;return e&&Object(n["k"])(r)&&r.getObservationRenderer?r.getObservationRenderer(e):r}function o(e,t){if(Object(n["k"])(e.symbol))return e.symbol;const r=s(e,t);return Object(n["k"])(r)&&"dot-density"!==r.type?r.getSymbol(e,t):null}function c(e,t){const r=s(e,t),i=o(e,t);if(Object(n["j"])(i))return null;const c={renderer:r,symbol:i};if(Object(n["j"])(r)||!("visualVariables"in r)||!r.visualVariables)return c;const l=Object(a["getVisualVariableValues"])(r,e,t),u=["proportional","proportional","proportional"];for(const{variable:n,value:a}of l)switch(n.type){case"color":c.color=a.toRgba();break;case"size":if("outline"===n.target)c.outlineSize=a;else{const e=n.axis,t=n.useSymbolValue?"symbol-value":a;switch(e){case"width":u[0]=t;break;case"depth":u[1]=t;break;case"height":u[2]=t;break;case"width-and-depth":u[0]=u[1]=t;break;default:u[0]=u[1]=u[2]=t}}break;case"opacity":c.opacity=a;break;case"rotation":switch(n.axis){case"tilt":c.tilt=a;break;case"roll":c.roll=a;break;default:c.heading=a}}return"proportional"===u[0]&&"proportional"===u[1]&&"proportional"===u[2]||(c.size=u),c}async function l(e,t){if(Object(n["k"])(e.symbol))return e.symbol;const r=s(e,t);return Object(n["k"])(r)&&r.getSymbolAsync(e,{...t,abortOptions:{signal:t.signal}})}async function u(e,t){const r=s(e,t),n=await l(e,t);if(!n)return null;const o={renderer:r,symbol:n};if(!r||!("visualVariables"in r)||!r.visualVariables)return o;const c=Object(a["getVisualVariableValues"])(r,e,t),u=["proportional","proportional","proportional"];for(const{variable:a,value:s}of c)if("color"===a.type)o.color=i["a"].toUnitRGBA(s);else if("size"===a.type)if("outline"===a.target)o.outlineSize=s;else{const e=a.axis,t=a.useSymbolValue?"symbol-value":s;"width"===e?u[0]=t:"depth"===e?u[1]=t:"height"===e?u[2]=t:u[0]=u[1]="width-and-depth"===e?t:u[2]=t}else"opacity"===a.type?o.opacity=s:"rotation"===a.type&&"tilt"===a.axis?o.tilt=s:"rotation"===a.type&&"roll"===a.axis?o.roll=s:"rotation"===a.type&&(o.heading=s);return(isFinite(u[0])||isFinite(u[1])||isFinite(u[2]))&&(o.size=u),o}function d(e,t=0){const r=e[t];return"number"==typeof r&&isFinite(r)?r:null}function h(e){for(let t=0;t<3;t++){const r=e[t];if("number"==typeof r)return isFinite(r)?r:0}return 0}},d1bc:function(e,t,r){"use strict";r.d(t,"a",(function(){return B}));r("c120");var i=r("b2b2"),n=r("d17d");const a=["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"];var s,o={exports:{}};void 0!==(s=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"])&&(o.exports=s);const c=o.exports;var l,u={exports:{}};l=u,function(e){var t=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"];void 0!==t&&(l.exports=t)}();const d=u.exports;var h={exports:{}};!function(e){!function(t){var r=function(){return["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]}();void 0!==r&&(e.exports=r)}()}(h);const p=h.exports;var f=999,b=9999,m=0,g=1,y=2,O=3,v=4,_=5,j=6,w=7,x=8,T=9,S=10,E=11,A=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function C(){var e,t,r,i=0,n=0,a=f,s=[],o=[],l=1,u=0,h=0,C=!1,R=!1,M="";return function(e){return o=[],null!==e?I(e.replace?e.replace(/\r\n/g,"\n"):e):D()};function P(e){e.length&&o.push({type:A[a],data:e,position:h,line:l,column:u})}function I(t){var s;for(i=0,r=(M+=t).length;e=M[i],i<r;){switch(s=i,a){case m:i=U();break;case g:i=k();break;case y:i=F();break;case O:i=z();break;case v:i=G();break;case E:i=V();break;case _:i=H();break;case b:i=q();break;case T:i=N();break;case f:i=L()}s!==i&&("\n"===M[s]?(u=0,++l):++u)}return n+=i,M=M.slice(i),o}function D(e){return s.length&&P(s.join("")),a=S,P("(eof)"),o}function L(){return s=s.length?[]:s,"/"===t&&"*"===e?(h=n+i-1,a=m,t=e,i+1):"/"===t&&"/"===e?(h=n+i-1,a=g,t=e,i+1):"#"===e?(a=y,h=n+i,i):/\s/.test(e)?(a=T,h=n+i,i):(C=/\d/.test(e),R=/[^\w_]/.test(e),h=n+i,a=C?v:R?O:b,i)}function N(){return/[^\s]/g.test(e)?(P(s.join("")),a=f,i):(s.push(e),t=e,i+1)}function F(){return"\r"!==e&&"\n"!==e||"\\"===t?(s.push(e),t=e,i+1):(P(s.join("")),a=f,i)}function k(){return F()}function U(){return"/"===e&&"*"===t?(s.push(e),P(s.join("")),a=f,i+1):(s.push(e),t=e,i+1)}function z(){if("."===t&&/\d/.test(e))return a=_,i;if("/"===t&&"*"===e)return a=m,i;if("/"===t&&"/"===e)return a=g,i;if("."===e&&s.length){for(;B(s););return a=_,i}if(";"===e||")"===e||"("===e){if(s.length)for(;B(s););return P(e),a=f,i+1}var r=2===s.length&&"="!==e;if(/[\w_\d\s]/.test(e)||r){for(;B(s););return a=f,i}return s.push(e),t=e,i+1}function B(e){for(var t,r,i=0;;){if(t=d.indexOf(e.slice(0,e.length+i).join("")),r=d[t],-1===t){if(i--+e.length>0)continue;r=e.slice(0,1).join("")}return P(r),h+=r.length,(s=s.slice(r.length)).length}}function V(){return/[^a-fA-F0-9]/.test(e)?(P(s.join("")),a=f,i):(s.push(e),t=e,i+1)}function G(){return"."===e||/[eE]/.test(e)?(s.push(e),a=_,t=e,i+1):"x"===e&&1===s.length&&"0"===s[0]?(a=E,s.push(e),t=e,i+1):/[^\d]/.test(e)?(P(s.join("")),a=f,i):(s.push(e),t=e,i+1)}function H(){return"f"===e&&(s.push(e),t=e,i+=1),/[eE]/.test(e)||"-"===e&&/[eE]/.test(t)?(s.push(e),t=e,i+1):/[^\d]/.test(e)?(P(s.join("")),a=f,i):(s.push(e),t=e,i+1)}function q(){if(/[^\d\w_]/.test(e)){var r=s.join("");return a=c.indexOf(r)>-1?x:p.indexOf(r)>-1?w:j,P(s.join("")),a=f,i}return s.push(e),t=e,i+1}}function R(e){var t=C(),r=[];return(r=r.concat(t(e))).concat(t(null))}function M(e){return R(e)}function P(e){return e.map(e=>"eof"!==e.type?e.data:"").join("")}const I=["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"];function D(e,t="100",r="300 es"){const i=/^\s*\#version\s+([0-9]+(\s+[a-zA-Z]+)?)\s*/;for(const n of e)if("preprocessor"===n.type){const e=i.exec(n.data);if(e){const i=e[1].replace(/\s\s+/g," ");if(i===r)return i;if(i===t)return n.data="#version "+r,t;throw new Error("unknown glsl version: "+i)}}return e.splice(0,0,{type:"preprocessor",data:"#version "+r},{type:"whitespace",data:"\n"}),null}function L(e,t){for(let r=t-1;r>=0;r--){const t=e[r];if("whitespace"!==t.type&&"block-comment"!==t.type){if("keyword"!==t.type)break;if("attribute"===t.data||"in"===t.data)return!0}}return!1}function N(e,t,r,i){i=i||r;for(const n of e)if("ident"===n.type&&n.data===r)return i in t?t[i]++:t[i]=0,N(e,t,i+"_"+t[i],i);return r}function F(e,t,r="afterVersion"){function i(e,t){for(let r=t;r<e.length;r++){const t=e[r];if("operator"===t.type&&";"===t.data)return r}return null}function n(e){let t=-1,n=0,a=-1;for(let s=0;s<e.length;s++){const o=e[s];if("preprocessor"===o.type&&(o.data.match(/\#(if|ifdef|ifndef)\s+.+/)?++n:o.data.match(/\#endif\s*.*/)&&--n),"afterVersion"!==r&&"afterPrecision"!==r||"preprocessor"===o.type&&/^#version/.test(o.data)&&(a=Math.max(a,s)),"afterPrecision"===r&&"keyword"===o.type&&"precision"===o.data){const t=i(e,s);if(null===t)throw new Error("precision statement not followed by any semicolons!");a=Math.max(a,t)}t<a&&0===n&&(t=s)}return t+1}const a={data:"\n",type:"whitespace"},s=t=>t<e.length&&/[^\r\n]$/.test(e[t].data);let o=n(e);s(o-1)&&e.splice(o++,0,a);for(const c of t)e.splice(o++,0,c);s(o-1)&&s(o)&&e.splice(o,0,a)}function k(e,t,r,i="lowp"){F(e,[{type:"keyword",data:"out"},{type:"whitespace",data:" "},{type:"keyword",data:i},{type:"whitespace",data:" "},{type:"keyword",data:r},{type:"whitespace",data:" "},{type:"ident",data:t},{type:"operator",data:";"}],"afterPrecision")}function U(e,t,r,i,n="lowp"){F(e,[{type:"keyword",data:"layout"},{type:"operator",data:"("},{type:"keyword",data:"location"},{type:"whitespace",data:" "},{type:"operator",data:"="},{type:"whitespace",data:" "},{type:"integer",data:i.toString()},{type:"operator",data:")"},{type:"whitespace",data:" "},{type:"keyword",data:"out"},{type:"whitespace",data:" "},{type:"keyword",data:n},{type:"whitespace",data:" "},{type:"keyword",data:r},{type:"whitespace",data:" "},{type:"ident",data:t},{type:"operator",data:";"}],"afterPrecision")}function z(e,t){let r,i,n=-1;for(let a=t;a<e.length;a++){const t=e[a];if("operator"===t.type&&("["===t.data&&(r=a),"]"===t.data)){i=a;break}"integer"===t.type&&(n=parseInt(t.data,10))}return r&&i&&e.splice(r,i-r+1),n}function B(e,t){const r=H(e);if(Object(i["k"])(r))return r;const s=M(e);if("300 es"===D(s,"100","300 es"))return e;let o=null,c=null;const l={},u={};for(let i=0;i<s.length;++i){const e=s[i];switch(e.type){case"keyword":t===n["u"].VERTEX_SHADER&&"attribute"===e.data?e.data="in":"varying"===e.data&&(e.data=t===n["u"].VERTEX_SHADER?"out":"in");break;case"builtin":if(/^texture(2D|Cube)(Proj)?(Lod|Grad)?(EXT)?$/.test(e.data.trim())&&(e.data=e.data.replace(/(2D|Cube|EXT)/g,"")),t===n["u"].FRAGMENT_SHADER&&"gl_FragColor"===e.data&&(o||(o=N(s,l,"fragColor"),k(s,o,"vec4")),e.data=o),t===n["u"].FRAGMENT_SHADER&&"gl_FragData"===e.data){const t=z(s,i+1),r=N(s,l,"fragData");U(s,r,"vec4",t,"mediump"),e.data=r}else t===n["u"].FRAGMENT_SHADER&&"gl_FragDepthEXT"===e.data&&(c||(c=N(s,l,"gl_FragDepth")),e.data=c);break;case"ident":if(a.indexOf(e.data)>=0){if(t===n["u"].VERTEX_SHADER&&L(s,i))throw new Error("attribute in vertex shader uses a name that is a reserved word in glsl 300 es");e.data in u||(u[e.data]=N(s,l,e.data)),e.data=u[e.data]}}}for(let i=s.length-1;i>=0;--i){const e=s[i];if("preprocessor"===e.type){const t=e.data.match(/\#extension\s+(.*)\:/);if(t&&t[1]&&I.indexOf(t[1].trim())>=0){const e=s[i+1];s.splice(i,e&&"whitespace"===e.type?2:1)}const r=e.data.match(/\#ifdef\s+(.*)/);r&&r[1]&&I.indexOf(r[1].trim())>=0&&(e.data="#if 1");const n=e.data.match(/\#ifndef\s+(.*)/);n&&n[1]&&I.indexOf(n[1].trim())>=0&&(e.data="#if 0")}}return q(e,P(s))}const V={enableCache:!1},G=new Map;function H(e){return V.enableCache?G.get(e):null}function q(e,t){return V.enableCache&&G.set(e,t),t}},d267:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("e92d"),n=r("b2b2"),a=r("7ce4"),s=r("1956"),o=r("cc15"),c=r("d17d"),l=r("91b0"),u=r("a1ff"),d=r("8539");const h=i["a"].getLogger("esri.views.webgl.FrameBufferObject");class p{constructor(e,t,r=null,i=null){if(this._context=e,this._glName=null,this._depthAttachment=null,this._stencilAttachment=null,this._colorAttachments=new Map,this._initialized=!1,this._desc={...t},e.instanceCounter.increment(c["t"].Framebuffer,this),Object(n["k"])(r)){Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;++e){const t=r[e],i=c["g"].COLOR_ATTACHMENT0+e;let n;m(t)?(f(t)?(n=t.descriptor,this._colorAttachments.set(i,t)):(n=t,this._colorAttachments.set(i,new u["a"](this._context,n))),y(n,this._desc)):(b(t)?(n=t.descriptor,this._colorAttachments.set(i,t)):(n=t,this._colorAttachments.set(i,new l["a"](this._context,n))),O(n,this._desc)),this._validateColorAttachmentPoint(i)}}if(Object(n["k"])(i)){let e,t;if(m(i))this._context.capabilities.depthTexture||console.error("Setting the depth/stencil texture as an attachment requires WEBGL_depth_texture or WebGL2"),f(i)?(t=i.descriptor,this._depthStencilTexture=i):(t=i,this._depthStencilTexture=new u["a"](this._context,t)),y(t,this._desc);else{var a;b(i)?(t=i.descriptor,e=i):(t=i,e=new l["a"](this._context,t));const r=null!=(a=this._desc.depthStencilTarget)?a:c["m"].DEPTH_STENCIL_RENDER_BUFFER;r===c["m"].STENCIL_RENDER_BUFFER?this._stencilAttachment=e:r===c["m"].DEPTH_RENDER_BUFFER||r===c["m"].DEPTH_STENCIL_RENDER_BUFFER?this._depthAttachment=e:console.error('If a Renderbuffer is provided, "depthStencilTarget" must be one of STENCIL_RENDER_BUFFER, DEPTH_RENDER_BUFFER or DEPTH_STENCIL_RENDER_BUFFER'),O(t,this._desc)}}}dispose(){if(!this._desc)return;const e=this._context.getBoundFramebufferObject();this._disposeColorAttachments(),this._disposeDepthStencilAttachments(),this._glName&&(this._context.gl.deleteFramebuffer(this._glName),this._glName=null),this._context.bindFramebuffer(e),this._context.instanceCounter.decrement(c["t"].Framebuffer,this),this._desc=null}get glName(){return this._glName}get descriptor(){return this._desc}get colorTexture(){const e=this._colorAttachments.get(c["g"].COLOR_ATTACHMENT0);return e&&f(e)?e:null}get colorAttachment(){return this._colorAttachments.get(c["g"].COLOR_ATTACHMENT0)}get depthStencilAttachment(){return this._depthStencilTexture||this._depthAttachment||this._stencilAttachment}get depthStencilTexture(){return this._depthStencilTexture}get width(){return this._desc.width}get height(){return this._desc.height}get gpuMemoryUsage(){return[...this._colorAttachments].reduce((e,[t,r])=>e+Object(d["d"])(r),0)+Object(d["d"])(this.depthStencilAttachment)}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&f(t)?t:null}attachColorTexture(e,t=c["g"].COLOR_ATTACHMENT0){e&&(this._validateColorAttachmentPoint(t),y(e.descriptor,this._desc),this._disposeColorAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t)),this._colorAttachments.set(t,e))}detachColorTexture(e=c["g"].COLOR_ATTACHMENT0){const t=this._colorAttachments.get(e);if(f(t)){const r=t;return this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e)),this._colorAttachments.delete(e),r}}setColorTextureTarget(e,t=c["g"].COLOR_ATTACHMENT0){const r=this._colorAttachments.get(t);f(r)&&this._framebufferTexture2D(r.glName,t,e)}attachDepthStencilTexture(e){if(Object(n["j"])(e))return;const t=e.descriptor;t.pixelFormat!==c["p"].DEPTH_STENCIL&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),t.dataType!==c["q"].UNSIGNED_INT_24_8&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),y(t,this._desc),this._desc.depthStencilTarget&&this._desc.depthStencilTarget!==c["m"].DEPTH_STENCIL_TEXTURE&&(this._desc.depthStencilTarget=c["m"].DEPTH_STENCIL_TEXTURE),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,c["l"])),this._depthStencilTexture=e}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,c["l"])),this._depthStencilTexture=null,e}attachDepthStencilBuffer(e){if(Object(n["j"])(e))return;const t=e.descriptor;if(t.internalFormat!==c["s"].DEPTH_STENCIL&&t.internalFormat!==c["s"].DEPTH_COMPONENT16&&console.error("Depth/Stencil buffer must have correct internalFormat"),O(t,this._desc),this._disposeDepthStencilAttachments(),this._desc.depthStencilTarget=t.internalFormat===c["s"].DEPTH_STENCIL?c["m"].DEPTH_STENCIL_RENDER_BUFFER:c["m"].DEPTH_RENDER_BUFFER,this._initialized){this._context.bindFramebuffer(this);const t=this._context.gl,r=this._desc.depthStencilTarget===c["m"].DEPTH_RENDER_BUFFER?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT;t.framebufferRenderbuffer(c["o"].FRAMEBUFFER,r,t.RENDERBUFFER,e.glName)}this._depthAttachment=e}detachDepthStencilBuffer(){const e=this._context.gl,t=this._depthAttachment;if(t&&this._initialized){this._context.bindFramebuffer(this);const t=this._desc.depthStencilTarget===c["m"].DEPTH_RENDER_BUFFER?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT;e.framebufferRenderbuffer(c["o"].FRAMEBUFFER,t,e.RENDERBUFFER,null)}return this._depthAttachment=null,t}detachAll(){this._colorAttachments.forEach((e,t)=>this._detachColorAttachment(t)),this.detachDepthStencilBuffer(),this.detachDepthStencilTexture()}copyToTexture(e,t,r,i,n,a,s){(e<0||t<0||n<0||a<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const o=this._desc,l=s.descriptor;s.descriptor.target!==c["A"].TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(e+r>o.width||t+i>o.height||n+r>l.width||a+i>l.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const d=this._context,h=d.bindTexture(s,u["a"].TEXTURE_UNIT_FOR_UPDATES);d.setActiveTexture(u["a"].TEXTURE_UNIT_FOR_UPDATES),d.bindFramebuffer(this),d.gl.copyTexSubImage2D(c["A"].TEXTURE_2D,0,n,a,e,t,r,i),d.bindTexture(h,u["a"].TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,a,s){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),s||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,a,s)}async readPixelsAsync(e,t,r,i,n,l,u){if(this._context.type!==o["a"].WEBGL2)return Object(s["b"])()&&console.warn("Attempting to read pixels using pixel buffer object without WebGL2"),void this.readPixels(e,t,r,i,n,l,u);const d=this._context.gl,h=a["a"].createPixelPack(this._context,c["D"].STREAM_READ,u.byteLength);this._context.bindBuffer(h),this._context.bindFramebuffer(this),d.readPixels(e,t,r,i,n,l,0),this._context.unbindBuffer(c["d"].PIXEL_PACK_BUFFER),await h.getSubDataAsync(u),h.dispose()}resize(e,t){const r=this._desc;if(r.width!==e||r.height!==t){if(!this._initialized)return r.width=e,r.height=t,this._colorAttachments.forEach(r=>{r&&r.resize(e,t)}),void(this._depthStencilTexture&&this._depthStencilTexture.resize(e,t));r.width=e,r.height=t,this._colorAttachments.forEach(r=>{r&&r.resize(e,t)}),null!=this._depthStencilTexture?this._depthStencilTexture.resize(e,t):(this._depthAttachment||this._stencilAttachment)&&(this._depthAttachment&&this._depthAttachment.resize(e,t),this._stencilAttachment&&this._stencilAttachment.resize(e,t)),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1}}initializeAndBind(e=c["o"].FRAMEBUFFER){var t,r,i,n;const a=this._context.gl;if(this._initialized)return void a.bindFramebuffer(e,this.glName);this._glName&&a.deleteFramebuffer(this._glName);const o=this._context,d=a.createFramebuffer(),h=this._desc,p=null!=(t=h.colorTarget)?t:c["y"].RENDER_BUFFER,b=null!=(r=h.width)?r:1,m=null!=(i=h.height)?i:1;if(a.bindFramebuffer(e,d),0===this._colorAttachments.size)if(p===c["y"].TEXTURE||p===c["y"].CUBEMAP)this._colorAttachments.set(c["g"].COLOR_ATTACHMENT0,g(o,h,this.descriptor.colorTarget===c["y"].CUBEMAP?c["A"].TEXTURE_CUBE_MAP:c["A"].TEXTURE_2D));else{const e=new l["a"](o,{internalFormat:c["v"].RGBA4,width:b,height:m});this._colorAttachments.set(c["g"].COLOR_ATTACHMENT0,e)}this._colorAttachments.forEach((t,r)=>{t&&(f(t)?this._framebufferTexture2D(t.glName,r,v(t),e):a.framebufferRenderbuffer(e,r,a.RENDERBUFFER,t.glName))});const y=null!=(n=h.depthStencilTarget)?n:c["m"].NONE;switch(y){case c["m"].DEPTH_RENDER_BUFFER:case c["m"].DEPTH_STENCIL_RENDER_BUFFER:{this._depthAttachment||(this._depthAttachment=new l["a"](o,{internalFormat:h.depthStencilTarget===c["m"].DEPTH_RENDER_BUFFER?c["s"].DEPTH_COMPONENT16:c["s"].DEPTH_STENCIL,width:b,height:m}));const t=y===c["m"].DEPTH_RENDER_BUFFER?a.DEPTH_ATTACHMENT:a.DEPTH_STENCIL_ATTACHMENT;a.framebufferRenderbuffer(e,t,a.RENDERBUFFER,this._depthAttachment.glName);break}case c["m"].STENCIL_RENDER_BUFFER:this._stencilAttachment||(this._stencilAttachment=new l["a"](o,{internalFormat:c["s"].STENCIL_INDEX8,width:b,height:m})),a.framebufferRenderbuffer(e,a.STENCIL_ATTACHMENT,a.RENDERBUFFER,this._stencilAttachment.glName);break;case c["m"].DEPTH_STENCIL_TEXTURE:if(!this._depthStencilTexture){o.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!");const e={target:c["A"].TEXTURE_2D,pixelFormat:c["p"].DEPTH_STENCIL,dataType:c["q"].UNSIGNED_INT_24_8,samplingMode:c["z"].NEAREST,wrapMode:c["B"].CLAMP_TO_EDGE,width:b,height:m};this._depthStencilTexture=new u["a"](o,e)}this._framebufferTexture2D(this._depthStencilTexture.glName,a.DEPTH_STENCIL_ATTACHMENT,v(this._depthStencilTexture),e)}Object(s["c"])()&&a.checkFramebufferStatus(e)!==a.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=d,this._initialized=!0}_framebufferTexture2D(e,t=c["g"].COLOR_ATTACHMENT0,r=c["A"].TEXTURE_2D,i=c["o"].FRAMEBUFFER,n=0){this._context.gl.framebufferTexture2D(i,t,r,e,n)}_detachColorAttachment(e){Object(s["b"])()&&console.warn("Detaching an FBO attachment can be a slow due to invalidating framebuffer completeness!");const t=this._context.gl,r=this._colorAttachments.get(e);return f(r)?this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e)):this._initialized&&(this._context.bindFramebuffer(this),t.framebufferRenderbuffer(c["o"].FRAMEBUFFER,e,t.RENDERBUFFER,null)),this._colorAttachments.delete(e),r}_disposeColorAttachments(){this._colorAttachments.forEach((e,t)=>{this._detachColorAttachment(t),e.dispose()}),this._colorAttachments.clear()}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);const t=this._desc.depthStencilTarget===c["m"].DEPTH_RENDER_BUFFER?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT;e.framebufferRenderbuffer(c["o"].FRAMEBUFFER,t,e.RENDERBUFFER,null)}this._depthAttachment.dispose(),this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),e.framebufferRenderbuffer(c["o"].FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,null)),this._stencilAttachment.dispose(),this._stencilAttachment=null),this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,e.DEPTH_STENCIL_ATTACHMENT)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)}_validateColorAttachmentPoint(e){if(-1===p._MAX_COLOR_ATTACHMENTS){const e=this._context.capabilities.drawBuffers;if(e){const t=this._context.gl;p._MAX_COLOR_ATTACHMENTS=t.getParameter(e.MAX_COLOR_ATTACHMENTS)}else p._MAX_COLOR_ATTACHMENTS=1}const t=e-c["g"].COLOR_ATTACHMENT0;t+1>p._MAX_COLOR_ATTACHMENTS&&h.error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${p._MAX_COLOR_ATTACHMENTS} color attachments`)}}function f(e){return"type"in e&&"texture"===e.type}function b(e){return"type"in e&&"renderbuffer"===e.type}function m(e){return f(e)||"pixelFormat"in e}function g(e,t,r){return new u["a"](e,{target:r,pixelFormat:c["p"].RGBA,dataType:c["q"].UNSIGNED_BYTE,samplingMode:c["z"].NEAREST,wrapMode:c["B"].CLAMP_TO_EDGE,width:t.width,height:t.height})}function y(e,t){e.target!==c["A"].TEXTURE_2D&&e.target!==c["A"].TEXTURE_CUBE_MAP&&console.error("Texture type must be TEXTURE_2D or TEXTURE_CUBE_MAP!"),void 0!==t.width&&t.width>=0&&void 0!==t.height&&t.height>=0?t.width===e.width&&t.height===e.height||console.error("Color attachment texture must match the framebuffer's!"):(t.width=e.width,t.height=e.height)}function O(e,t){void 0!==t.width&&t.width>=0&&void 0!==t.height&&t.height>=0?t.width===e.width&&t.height===e.height||console.error("Renderbuffer dimensions must match the framebuffer's!"):(t.width=e.width,t.height=e.height)}function v(e){return e.descriptor.target===c["A"].TEXTURE_CUBE_MAP?c["A"].TEXTURE_CUBE_MAP_POSITIVE_X:c["A"].TEXTURE_2D}p._MAX_COLOR_ATTACHMENTS=-1},d272:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u}));var i=r("b2b2"),n=r("d791"),a=r("afe1"),s=r("e431"),o=r("0b2d"),c=r("3886");function l(e,t){if(t.slicePlaneEnabled){e.extensions.add("GL_OES_standard_derivatives"),t.sliceEnabledForVertexPrograms&&(e.vertex.uniforms.add("slicePlaneOrigin","vec3"),e.vertex.uniforms.add("slicePlaneBasis1","vec3"),e.vertex.uniforms.add("slicePlaneBasis2","vec3")),e.fragment.uniforms.add("slicePlaneOrigin","vec3"),e.fragment.uniforms.add("slicePlaneBasis1","vec3"),e.fragment.uniforms.add("slicePlaneBasis2","vec3");const r=c["a"]`struct SliceFactors {
  3609. float front;
  3610. float side0;
  3611. float side1;
  3612. float side2;
  3613. float side3;
  3614. };
  3615. SliceFactors calculateSliceFactors(vec3 pos) {
  3616. vec3 rel = pos - slicePlaneOrigin;
  3617. vec3 slicePlaneNormal = -cross(slicePlaneBasis1, slicePlaneBasis2);
  3618. float slicePlaneW = -dot(slicePlaneNormal, slicePlaneOrigin);
  3619. float basis1Len2 = dot(slicePlaneBasis1, slicePlaneBasis1);
  3620. float basis2Len2 = dot(slicePlaneBasis2, slicePlaneBasis2);
  3621. float basis1Dot = dot(slicePlaneBasis1, rel);
  3622. float basis2Dot = dot(slicePlaneBasis2, rel);
  3623. return SliceFactors(
  3624. dot(slicePlaneNormal, pos) + slicePlaneW,
  3625. -basis1Dot - basis1Len2,
  3626. basis1Dot - basis1Len2,
  3627. -basis2Dot - basis2Len2,
  3628. basis2Dot - basis2Len2
  3629. );
  3630. }
  3631. bool sliceByFactors(SliceFactors factors) {
  3632. return factors.front < 0.0
  3633. && factors.side0 < 0.0
  3634. && factors.side1 < 0.0
  3635. && factors.side2 < 0.0
  3636. && factors.side3 < 0.0;
  3637. }
  3638. bool sliceEnabled() {
  3639. return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0;
  3640. }
  3641. bool sliceByPlane(vec3 pos) {
  3642. return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
  3643. }
  3644. #define rejectBySlice(_pos_) sliceByPlane(_pos_)
  3645. #define discardBySlice(_pos_) { if (sliceByPlane(_pos_)) discard; }`,i=c["a"]`vec4 applySliceHighlight(vec4 color, vec3 pos) {
  3646. SliceFactors factors = calculateSliceFactors(pos);
  3647. const float HIGHLIGHT_WIDTH = 1.0;
  3648. const vec4 HIGHLIGHT_COLOR = vec4(0.0, 0.0, 0.0, 0.3);
  3649. factors.front /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.front);
  3650. factors.side0 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side0);
  3651. factors.side1 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side1);
  3652. factors.side2 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side2);
  3653. factors.side3 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side3);
  3654. if (sliceByFactors(factors)) {
  3655. return color;
  3656. }
  3657. float highlightFactor = (1.0 - step(0.5, factors.front))
  3658. * (1.0 - step(0.5, factors.side0))
  3659. * (1.0 - step(0.5, factors.side1))
  3660. * (1.0 - step(0.5, factors.side2))
  3661. * (1.0 - step(0.5, factors.side3));
  3662. return mix(color, vec4(HIGHLIGHT_COLOR.rgb, color.a), highlightFactor * HIGHLIGHT_COLOR.a);
  3663. }`,n=t.sliceHighlightDisabled?c["a"]`#define highlightSlice(_color_, _pos_) (_color_)`:c["a"]`
  3664. ${i}
  3665. #define highlightSlice(_color_, _pos_) (sliceEnabled() ? applySliceHighlight(_color_, _pos_) : (_color_))
  3666. `;t.sliceEnabledForVertexPrograms&&e.vertex.code.add(r),e.fragment.code.add(r),e.fragment.code.add(n)}else{const r=c["a"]`#define rejectBySlice(_pos_) false
  3667. #define discardBySlice(_pos_) {}
  3668. #define highlightSlice(_color_, _pos_) (_color_)`;t.sliceEnabledForVertexPrograms&&e.vertex.code.add(r),e.fragment.code.add(r)}}function u(e,t,r){d(e,t,r.slicePlane,{origin:r.origin})}function d(e,t,r,a){if(t.slicePlaneEnabled)if(Object(i["k"])(r)){if(Object(s["m"])(h,r.origin),Object(s["m"])(p,r.basis1),Object(s["m"])(f,r.basis2),Object(i["k"])(a)&&Object(i["k"])(a.origin)&&Object(s["l"])(h,r.origin,a.origin),Object(i["k"])(a)&&Object(i["k"])(a.view)){const e=Object(i["k"])(a.origin)?Object(n["k"])(b,a.view,a.origin):a.view;Object(s["h"])(p,p,h),Object(s["h"])(f,f,h),Object(s["s"])(h,h,e),Object(s["s"])(p,p,e),Object(s["s"])(f,f,e),Object(s["l"])(p,p,h),Object(s["l"])(f,f,h)}e.setUniform3fv("slicePlaneOrigin",h),e.setUniform3fv("slicePlaneBasis1",p),e.setUniform3fv("slicePlaneBasis2",f)}else e.setUniform3fv("slicePlaneBasis1",o["c"]),e.setUniform3fv("slicePlaneBasis2",o["c"]),e.setUniform3fv("slicePlaneOrigin",o["c"])}const h=Object(o["f"])(),p=Object(o["f"])(),f=Object(o["f"])(),b=Object(a["d"])()},d288:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("9ef0"),s=r("7ffa"),o=r("b2b2"),c=r("a915"),l=r("59b2"),u=(r("cea0"),r("448d")),d=r("d386"),h=r("70f6"),p=r("8f07"),f=r("5c00");let b=i=class extends h["a"]{constructor(e){super(e),this.type="line",this.color=new a["a"]([0,0,0,1]),this.size=Object(c["h"])(1),this.border=null}get visible(){return this.size>0&&Object(o["k"])(this.color)&&this.color.a>0}clone(){return new i({color:Object(s["a"])(this.color),size:this.size,border:Object(s["a"])(this.border)})}};Object(n["a"])([Object(u["a"])({line:"line"},{readOnly:!0})],b.prototype,"type",void 0),Object(n["a"])([Object(l["b"])(f["a"])],b.prototype,"color",void 0),Object(n["a"])([Object(l["b"])(f["b"])],b.prototype,"size",void 0),Object(n["a"])([Object(l["b"])({type:p["a"],json:{write:!0}})],b.prototype,"border",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],b.prototype,"visible",null),b=i=Object(n["a"])([Object(d["a"])("esri.symbols.callouts.LineCallout3D")],b);const m=b},d297:function(e,t,r){"use strict";r.r(t),r.d(t,"getAllSizes",(function(){return I})),r.d(t,"getColor",(function(){return f})),r.d(t,"getOpacity",(function(){return b})),r.d(t,"getRotationAngle",(function(){return m})),r.d(t,"getSize",(function(){return O})),r.d(t,"getSizeForValue",(function(){return C})),r.d(t,"getSizeFromNumberOrVariable",(function(){return v})),r.d(t,"getSizeRangeAtScale",(function(){return R})),r.d(t,"getVisualVariableValues",(function(){return M})),r.d(t,"viewScaleRE",(function(){return p}));var i=r("9ef0"),n=r("8d60"),a=r("6c97"),s=r("e92d"),o=r("b2b2"),c=r("9b40"),l=r("86f2d");const u=s["a"].getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),d=new n["a"],h=Math.PI,p=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function f(e,t,r){const n="visualVariables"in e&&e.visualVariables?e.visualVariables.find(e=>"color"===e.type):e;if(!n)return;if("esri.renderers.visualVariables.ColorVariable"!==n.declaredClass)return void u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const a="number"==typeof t,s=a?null:t,c=s&&s.attributes;let l=a?t:null;const d=n.field,{ipData:h,hasExpression:p}=n.cache;let f=n.cache.compiledFunc;if(!d&&!p){const e=n.stops;return e&&e[0]&&e[0].color}if("number"!=typeof l)if(p){if(!Object(o["k"])(r)||!Object(o["k"])(r.arcade))return void u.error("Use of arcade expressions requires an arcade context");const e={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},t=r.arcade.arcadeUtils,i=t.getViewInfo(e),a=t.createExecContext(s,i);if(!f){const e=t.createSyntaxTree(n.valueExpression);f=t.createFunction(e),n.cache.compiledFunc=f}l=t.executeFunction(f,a)}else c&&(l=c[d]);const b=n.normalizationField,m=c?parseFloat(c[b]):void 0;if(null!=l&&(!b||a||!isNaN(m)&&0!==m)){isNaN(m)||a||(l/=m);const e=P(l,h);if(e){const t=e[0],a=e[1],s=t===a?n.stops[t].color:i["a"].blendColors(n.stops[t].color,n.stops[a].color,e[2],Object(o["k"])(r)?r.color:void 0);return new i["a"](s)}}}function b(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(e=>"opacity"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.OpacityVariable"!==i.declaredClass)return void u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const n="number"==typeof t,a=n?null:t,s=a&&a.attributes;let c=n?t:null;const l=i.field,{ipData:d,hasExpression:h}=i.cache;let p=i.cache.compiledFunc;if(!l&&!h){const e=i.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof c)if(h){if(Object(o["j"])(r)||Object(o["j"])(r.arcade))return void u.error("Use of arcade expressions requires an arcade context");const e={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},t=r.arcade.arcadeUtils,n=t.getViewInfo(e),s=t.createExecContext(a,n);if(!p){const e=t.createSyntaxTree(i.valueExpression);p=t.createFunction(e),i.cache.compiledFunc=p}c=t.executeFunction(p,s)}else s&&(c=s[l]);const f=i.normalizationField,b=s?parseFloat(s[f]):void 0;if(null!=c&&(!f||n||!isNaN(b)&&0!==b)){isNaN(b)||n||(c/=b);const e=P(c,d);if(e){const t=e[0],r=e[1];if(t===r)return i.stops[t].opacity;{const n=i.stops[t].opacity;return n+(i.stops[r].opacity-n)*e[2]}}}}function m(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(e=>"rotation"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.RotationVariable"!==i.declaredClass)return void u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const n=i.axis||"heading",a="heading"===n&&"arithmetic"===i.rotationType?90:0,s="heading"===n&&"arithmetic"===i.rotationType?-1:1,c="number"==typeof t?null:t,l=c&&c.attributes,d=i.field,{hasExpression:h}=i.cache;let p=i.cache.compiledFunc,f=0;if(!d&&!h)return f;if(h){if(Object(o["j"])(r)||Object(o["j"])(r.arcade))return void u.error("Use of arcade expressions requires an arcade context");const e={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},t=r.arcade.arcadeUtils,n=t.getViewInfo(e),a=t.createExecContext(c,n);if(!p){const e=t.createSyntaxTree(i.valueExpression);p=t.createFunction(e),i.cache.compiledFunc=p}f=t.executeFunction(p,a)}else l&&(f=l[d]||0);return f="number"!=typeof f||isNaN(f)?null:a+s*f,f}function g(e,t,r){const i="number"==typeof t,n=i?null:t,a=n&&n.attributes;let s=i?t:null;const{isScaleDriven:c}=e.cache;let d=e.cache.compiledFunc;if(c){const t=Object(o["k"])(r)?r.scale:void 0,i=Object(o["k"])(r)?r.view:void 0;s=null==t||"3d"===i?y(e):t}else if(!i)switch(e.inputValueType){case l["a"].Expression:{if(Object(o["j"])(r)||Object(o["j"])(r.arcade))return void u.error("Use of arcade expressions requires an arcade context");const t={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},i=r.arcade.arcadeUtils,a=i.getViewInfo(t),c=i.createExecContext(n,a);if(!d){const t=i.createSyntaxTree(e.valueExpression);d=i.createFunction(t),e.cache.compiledFunc=d}s=i.executeFunction(d,c);break}case l["a"].Field:a&&(s=a[e.field]);break;case l["a"].Unknown:s=null}if(!Object(l["f"])(s))return null;if(i||!e.normalizationField)return s;const h=a?parseFloat(a[e.normalizationField]):null;return Object(l["f"])(h)&&0!==h?s/h:null}function y(e){let t=null,r=null;const i=e.stops;return i?(t=i[0].value,r=i[i.length-1].value):(t=e.minDataValue||0,r=e.maxDataValue||0),(t+r)/2}function O(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(e=>"size"===e.type):e;if(!i)return;if("esri.renderers.visualVariables.SizeVariable"!==i.declaredClass)return void u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const n=C(g(i,t,r),i,t,r,i.cache.ipData);return null==n||isNaN(n)?0:n}function v(e,t,r){return null==e?null:Object(l["e"])(e)?O(e,t,r):Object(l["f"])(e)?e:null}function _(e,t,r){return Object(l["f"])(r)&&e>r?r:Object(l["f"])(t)&&e<t?t:e}function j(e,t,r,i){return e+(v(t.minSize,r,i)||t.minDataValue)}function w(e,t,r){const i=e.stops;let n=i&&i.length&&i[0].size;return null==n&&(n=e.minSize),v(n,t,r)}function x(e,t,r,i){const n=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),a=v(t.minSize,r,i),s=v(t.maxSize,r,i),c=Object(o["k"])(i)?i.shape:void 0;if(e<=t.minDataValue)return a;if(e>=t.maxDataValue)return s;if("area"===t.scaleBy&&c){const e="circle"===c,t=e?h*(a/2)**2:a*a,r=t+n*((e?h*(s/2)**2:s*s)-t);return e?2*Math.sqrt(r/h):Math.sqrt(r)}return a+n*(s-a)}function T(e,t,r,i){const n=Object(o["k"])(i)?i.shape:void 0,a=e/t.minDataValue,s=v(t.minSize,r,i),c=v(t.maxSize,r,i);let l=null;return l="circle"===n?2*Math.sqrt(a*(s/2)**2):"square"===n||"diamond"===n||"image"===n?Math.sqrt(a*s**2):a*s,_(l,s,c)}function S(e,t,r,i,n){const[a,s,o]=P(e,n);if(a===s)return v(t.stops[a].size,r,i);{const e=v(t.stops[a].size,r,i);return e+(v(t.stops[s].size,r,i)-e)*o}}function E(e,t,r,i){const n=(Object(o["k"])(i)&&i.resolution?i.resolution:1)*c["a"][t.valueUnit],a=v(t.minSize,r,i),s=v(t.maxSize,r,i),{valueRepresentation:l}=t;let u=null;return u="area"===l?2*Math.sqrt(e/h)/n:"radius"===l||"distance"===l?2*e/n:e/n,_(u,a,s)}function A(e){return e}function C(e,t,r,i,n){switch(t.transformationType){case l["b"].Additive:return j(e,t,r,i);case l["b"].Constant:return w(t,r,i);case l["b"].ClampedLinear:return x(e,t,r,i);case l["b"].Proportional:return T(e,t,r,i);case l["b"].Stops:return S(e,t,r,i,n);case l["b"].RealWorldSize:return E(e,t,r,i);case l["b"].Identity:return A(e);case l["b"].Unknown:return null}}function R(e,t,r){const{isScaleDriven:i}=e.cache;if(!(i&&"3d"===r||t))return null;const n={scale:t,view:r};let a=v(e.minSize,d,n),s=v(e.maxSize,d,n);if(null!=a||null!=s){if(a>s){const e=s;s=a,a=e}return{minSize:a,maxSize:s}}}function M(e,t,r){if(!e.visualVariables)return;const i=[],n=[],a=[],s=[],o=[];for(const c of e.visualVariables)switch(c.type){case"color":n.push(c);break;case"opacity":a.push(c);break;case"rotation":o.push(c);break;case"size":s.push(c)}return n.forEach(e=>{const n=f(e,t,r);i.push({variable:e,value:n})}),a.forEach(e=>{const n=b(e,t,r);i.push({variable:e,value:n})}),o.forEach(e=>{const n=m(e,t,r);i.push({variable:e,value:n})}),s.forEach(e=>{const n=O(e,t,r);i.push({variable:e,value:n})}),i.filter(e=>null!=e.value)}function P(e,t){if(!t)return;let r=0,i=t.length-1;return t.some((t,n)=>e<t?(i=n,!0):(r=n,!1)),[r,i,(e-t[r])/(t[i]-t[r])]}function I(e,t,r){const i=["proportional","proportional","proportional"];for(const n of e){const e=n.useSymbolValue?"symbol-value":O(n,t,r);switch(n.axis){case"width":i[0]=e;break;case"depth":i[1]=e;break;case"height":i[2]=e;break;case"width-and-depth":i[0]=e,i[1]=e;break;case"all":case void 0:case null:i[0]=e,i[1]=e,i[2]=e;break;default:Object(a["a"])(n.axis)}}return i}},d2f2:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return c}));r("c120");var i,n=r("ce50"),a=r("b2b2"),s=r("e64d"),o=r("54b4");function c(e,t,r){const a=h(e),o=t,c=l(a,o,r);if(a){const t=s["a"].deriveUnitFromSR(a,e.spatialReference).heightUnit;if(!r&&t!==a.heightUnit){const e=new n["a"]("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${t})`,{horizontalUnit:t});return new n["a"]("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:a,error:e})}}if(!d(e)||c===i.Unsupported)return new n["a"]("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:a});switch(c){case i.Units:{const e=a.heightUnit||"unknown",t=o.heightUnit||"unknown",r=new n["a"]("layerview:incompatible-height-unit",`The vertical units of the layer (${e}) must match the vertical units of the scene (${t})`,{layerUnit:e,sceneUnit:t});return new n["a"]("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:a,sceneHeightModelInfo:o,error:r})}case i.HeightModel:{const e=a.heightModel||"unknown",t=o.heightModel||"unknown",r=new n["a"]("layerview:incompatible-height-model",`The height model of the layer (${e}) must match the height model of the scene (${t})`,{layerHeightModel:e,sceneHeightModel:t});return new n["a"]("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:a,sceneHeightModelInfo:o,error:r})}case i.CRS:{const e=a.vertCRS||"unknown",t=o.vertCRS||"unknown",r=new n["a"]("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${e}) must match the vertical datum of the scene (${t})`,{layerDatum:e,sceneDatum:t});return new n["a"]("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:a,sceneHeightModelInfo:o,error:r})}}return null}function l(e,t,r){if(!u(e)||!u(t))return i.Unsupported;if(null==e||null==t)return i.Ok;if(!r&&e.heightUnit!==t.heightUnit)return i.Units;if(e.heightModel!==t.heightModel)return i.HeightModel;switch(e.heightModel){case"gravity-related-height":return i.Ok;case"ellipsoidal":return e.vertCRS===t.vertCRS?i.Ok:i.CRS;default:return i.Unsupported}}function u(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function d(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!b(e)}function h(e){const t=e.url&&Object(o["e"])(e.url);return null==(e.spatialReference&&e.spatialReference.vcsWkid)&&Object(a["k"])(t)&&"ImageServer"===t.serverType||!p(e)||!e.heightModelInfo?b(e)?s["a"].deriveUnitFromSR(y,e.spatialReference):null:e.heightModelInfo}function p(e){return"heightModelInfo"in e}function f(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"wfs":return!0;default:return!1}}function b(e){return f(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):g(e)}function m(e){return null!=e.layers||g(e)||f(e)||p(e)}function g(e){switch(e.type){case"building-scene":case"elevation":case"integrated-mesh":case"point-cloud":case"scene":case"voxel":return!0;case"analysis":case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"csv":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"map-image":case"map-notes":case"ogc-feature":case"open-street-map":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}!function(e){e[e.Ok=0]="Ok",e[e.Units=1]="Units",e[e.HeightModel=2]="HeightModel",e[e.CRS=3]="CRS",e[e.Unsupported=4]="Unsupported"}(i||(i={}));const y=new s["a"]({heightModel:"gravity-related-height"})},d302:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("9180"),n=r("3349");class a{constructor(e,t,r){this.maxSize=e,this.tileInfoView=t,this.removedFunc=r,this._tilePerId=new Map,this._tileKeysPerLevel=[]}has(e){return this._tilePerId.has(e)}get(e){return this._tilePerId.get(e)}pop(e){const t=this._tilePerId.get(e);if(!t)return null;const r=t.key.level,i=this._tileKeysPerLevel[r];s(this._tilePerId,e);for(let n=0;n<i.length;n++)if(i[n].id===e){i.splice(n,1);break}return t.visible=!0,t}add(e){e.visible=!1;const t=e.key,r=t.id;if(this._tilePerId.has(r))return;this._tilePerId.set(r,e);const i=t.level;this._tileKeysPerLevel[i]||(this._tileKeysPerLevel[i]=[]),this._tileKeysPerLevel[i].push(t)}prune(e,t,r){let i=this._tilePerId.size;if(i<=this.maxSize)return;let n=this._tileKeysPerLevel.length-1;for(;i>this.maxSize&&n>=0;)n!==e&&(i=this._pruneAroundCenterTile(i,t,r,n)),n--;i>this.maxSize&&(i=this._pruneAroundCenterTile(i,t,r,e))}_pruneAroundCenterTile(e,t,r,i){const a=this._tileKeysPerLevel[i];if(!a||0===a.length)return e;const{size:s,origin:o}=this.tileInfoView.tileInfo,c=r*s[0],l=r*s[1],u=[0,0],d=[0,0];for(a.sort((e,r)=>(u[0]=o.x+c*(e.col+.5),u[1]=o.y-l*(e.row+.5),d[0]=o.x+c*(r.col+.5),d[1]=o.y-l*(r.row+.5),Object(n["a"])(u,t)-Object(n["a"])(d,t)));a.length>0;){const t=a.pop();if(this._removeTile(t.id),--e===this.maxSize)break}return e}_removeTile(e){const t=this._tilePerId.get(e);this.removedFunc&&this.removedFunc(t),s(this._tilePerId,e)}}function s(e,t){e.delete(t)}var o=r("ba6a"),c=r("ae54");const l=new c["a"](0,0,0,0),u=new Map,d=[],h=[];class p{constructor(e){this._previousScale=Number.POSITIVE_INFINITY,this.cachePolicy="keep",this.coveragePolicy="closest",this.resampling=!0,this.tileIndex=new Map,this.tiles=[],this.buffer=192,this.acquireTile=e.acquireTile,this.releaseTile=e.releaseTile,this.tileInfoView=e.tileInfoView,this.resampling=null==e.resampling||!!e.resampling,e.cachePolicy&&(this.cachePolicy=e.cachePolicy),e.coveragePolicy&&(this.coveragePolicy=e.coveragePolicy),null!=e.buffer&&(this.buffer=e.buffer),e.cacheSize&&(this._tileCache=new a(e.cacheSize,this.tileInfoView,e=>{this.releaseTile(e)}))}destroy(){this.tileIndex.clear()}update(e){const{resampling:t,tileIndex:r}=this,i=this.tileInfoView.getTileCoverage(e.state,this.buffer,this.coveragePolicy);if(h.length=0,d.length=0,u.clear(),!i)return;const{minScale:n,maxScale:a}=this.tileInfoView.tileInfo,{spans:s,lodInfo:c}=i,{level:p}=c,{scale:f,center:b,resolution:m}=e.state,g=!e.stationary&&f>this._previousScale;if(this._previousScale=f,this.tiles.length=0,!t&&(f>n||f<a))return this.tiles.length=0,u.clear(),r.forEach(e=>{this.releaseTile(e)}),r.clear(),h.length=0,d.length=0,u.clear(),o["a"].pool.release(i),!0;r.forEach(e=>e.visible=!0);let y=0,O=0;if(s.length>0)for(const{row:o,colFrom:d,colTo:h}of s)for(let e=d;e<=h;e++){y++;const t=l.set(p,o,c.normalizeCol(e),c.getWorldForColumn(e)).id;if(r.has(t)){const e=r.get(t);e.isReady?(u.set(t,e),O++):g||this._addParentTile(t,u)}else{let e;if(this._tileCache&&this._tileCache.has(t)){if(e=this._tileCache.pop(t),this.tileIndex.set(t,e),e.isReady){u.set(t,e),O++;continue}}else e=this.acquireTile(l),this.tileIndex.set(t,e);g||this._addParentTile(t,u)}}const v=O===y;r.forEach((e,t)=>{if(l.set(t),u.has(t))return;const r=this.tileInfoView.intersects(i,l),n="purge"===this.cachePolicy?l.level!==p:l.level>p;!r||!g&&v?!n&&r||d.push(t):e.isReady?n&&"purge"===this.cachePolicy&&this._hasReadyAncestor(l,p)?d.push(t):h.push(t):n&&d.push(t)});for(const o of h){const e=r.get(o);e&&e.isReady&&u.set(o,e)}for(const o of d){const e=r.get(o);this._tileCache?this._tileCache.add(e):this.releaseTile(e),r.delete(o)}return u.forEach(e=>this.tiles.push(e)),r.forEach(e=>{u.has(e.key.id)||(e.visible=!1)}),this._tileCache&&this._tileCache.prune(p,b,m),o["a"].pool.release(i),u.clear(),v}clear(e=!0){const{tileIndex:t}=this;e&&t.forEach(e=>{this.releaseTile(e)}),t.clear()}updateCacheSize(e){this._tileCache&&(this._tileCache.maxSize=e)}_addParentTile(e,t){let r=e,i=null;for(;r=this.tileInfoView.getTileParentId(r),r;)if(this.tileIndex.has(r)){if(i=this.tileIndex.get(r),i&&i.isReady){t.has(i.key.id)||t.set(i.key.id,i);break}}else if(this._tileCache&&this._tileCache.has(r)&&(i=this._tileCache.pop(r),this.tileIndex.set(r,i),i&&i.isReady)){t.has(i.key.id)||t.set(i.key.id,i);break}}_hasReadyAncestor(e,t){const r=Object(i["l"])();this.tileInfoView.getTileBounds(r,e,!0);for(const n of this.tileIndex.values())if(n.isReady&&n.key.level>=t&&n.key.level<e.level){const e=Object(i["l"])();if(this.tileInfoView.getTileBounds(e,n.key,!0),Object(i["g"])(e,r))return!0}return!1}}},d347:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("fc29"),a=r("af40"),s=r("b2b2"),o=r("477c"),c=r("5815"),l=r("59b2"),u=r("d386");let d=class extends n["a"]{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new a["a"],this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r={}){return this._installWatch(e,t,r,o["e"])}addWhen(e,t,r={}){return this._installWatch(e,t,r,o["f"])}addOnCollectionChange(e,t,{initial:r=!1}={}){const i=++this.handleId;return this.handles.add([Object(o["b"])(e,"after-changes",this._createSyncUpdatingCallback(),o["c"]),Object(o["b"])(e,"change",t,{onListenerAdd:r?e=>t({added:e.toArray(),removed:[]}):void 0})],i),{remove:()=>this.handles.remove(i)}}addPromise(e){if(Object(s["j"])(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(h)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const r=()=>this.handles.remove(t);return e.then(r,r),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,r={},i){const n=++this.handleId;r.sync||this._installSyncUpdatingWatch(e,n);const a=i(e,t,r);return this.handles.add(a,n),{remove:()=>this.handles.remove(n)}}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),i=Object(o["e"])(e,r,{sync:!0,equals:()=>!1});return this.handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this.handles.remove(h),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add(Object(c["b"])(()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(h))}),h)}}};Object(i["a"])([Object(l["b"])({readOnly:!0})],d.prototype,"updating",void 0),d=Object(i["a"])([Object(u["a"])("esri.views.support.WatchUpdatingTracking")],d);const h=-42;var p;!function(e){e[e.NONE=0]="NONE",e[e.SYNC=1]="SYNC",e[e.INIT=2]="INIT"}(p||(p={}))},d359:function(e,t,r){"use strict";r.d(t,"a",(function(){return C})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return _})),r.d(t,"e",(function(){return O})),r.d(t,"f",(function(){return g})),r.d(t,"g",(function(){return y})),r.d(t,"h",(function(){return v})),r.d(t,"i",(function(){return S})),r.d(t,"j",(function(){return x})),r.d(t,"k",(function(){return T})),r.d(t,"l",(function(){return w})),r.d(t,"m",(function(){return j})),r.d(t,"n",(function(){return A}));var i=r("2119"),n=r("d791"),a=r("e431"),s=r("0b2d"),o=r("7577"),c=r("0fc4"),l=r("d18f"),u=r("7361");function d(e){return e?{ray:Object(l["c"])(e.ray),c0:e.c0,c1:e.c1}:{ray:Object(l["c"])(),c0:0,c1:Number.MAX_VALUE}}function h(e,t=d()){return Object(l["b"])(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}function p(e,t,r=d()){const i=Object(a["r"])(e.vector);return Object(l["g"])(e.origin,t,r.ray),r.c0=0,r.c1=i,r}new i["a"](()=>({c0:0,c1:0,ray:null}));var f,b,m=r("7289");function g(e){return e?[Object(m["d"])(e[0]),Object(m["d"])(e[1]),Object(m["d"])(e[2]),Object(m["d"])(e[3]),Object(m["d"])(e[4]),Object(m["d"])(e[5])]:[Object(m["d"])(),Object(m["d"])(),Object(m["d"])(),Object(m["d"])(),Object(m["d"])(),Object(m["d"])()]}function y(){return[Object(s["f"])(),Object(s["f"])(),Object(s["f"])(),Object(s["f"])(),Object(s["f"])(),Object(s["f"])(),Object(s["f"])(),Object(s["f"])()]}function O(e,t){for(let r=0;r<C.NUM;r++)Object(m["c"])(e[r],t[r])}function v(e,t,r,i=I){const s=Object(n["n"])(u["a"].get(),t,e);Object(n["b"])(s,s);for(let n=0;n<R.NUM;++n){const e=Object(o["m"])(u["e"].get(),M[n],s);Object(a["y"])(i[n],e[0]/e[3],e[1]/e[3],e[2]/e[3])}_(r,i)}function _(e,t){Object(m["g"])(t[b.FAR_BOTTOM_LEFT],t[b.NEAR_BOTTOM_LEFT],t[b.NEAR_TOP_LEFT],e[f.LEFT]),Object(m["g"])(t[b.NEAR_BOTTOM_RIGHT],t[b.FAR_BOTTOM_RIGHT],t[b.FAR_TOP_RIGHT],e[f.RIGHT]),Object(m["g"])(t[b.FAR_BOTTOM_LEFT],t[b.FAR_BOTTOM_RIGHT],t[b.NEAR_BOTTOM_RIGHT],e[f.BOTTOM]),Object(m["g"])(t[b.NEAR_TOP_LEFT],t[b.NEAR_TOP_RIGHT],t[b.FAR_TOP_RIGHT],e[f.TOP]),Object(m["g"])(t[b.NEAR_BOTTOM_LEFT],t[b.NEAR_BOTTOM_RIGHT],t[b.NEAR_TOP_RIGHT],e[f.NEAR]),Object(m["g"])(t[b.FAR_BOTTOM_RIGHT],t[b.FAR_BOTTOM_LEFT],t[b.FAR_TOP_LEFT],e[f.FAR])}function j(e,t){for(let r=0;r<C.NUM;r++){const i=e[r];if(i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]>=t[3])return!1}return!0}function w(e,t){return E(e,h(t,P.get()))}function x(e,t,r){return E(e,p(t,r,P.get()))}function T(e,t){for(let r=0;r<C.NUM;r++)if(Object(m["v"])(e[r],t)>0)return!1;return!0}function S(e,t){for(let r=0;r<C.NUM;r++)if(Object(m["o"])(e[r],t))return!1;return!0}function E(e,t){for(let r=0;r<C.NUM;r++)if(!Object(m["a"])(e[r],t))return!1;return!0}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.BOTTOM=2]="BOTTOM",e[e.TOP=3]="TOP",e[e.NEAR=4]="NEAR",e[e.FAR=5]="FAR"}(f||(f={})),function(e){e[e.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",e[e.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",e[e.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",e[e.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",e[e.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",e[e.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",e[e.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",e[e.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(b||(b={}));const A={bottom:[b.FAR_BOTTOM_RIGHT,b.NEAR_BOTTOM_RIGHT,b.NEAR_BOTTOM_LEFT,b.FAR_BOTTOM_LEFT],near:[b.NEAR_BOTTOM_LEFT,b.NEAR_BOTTOM_RIGHT,b.NEAR_TOP_RIGHT,b.NEAR_TOP_LEFT],far:[b.FAR_BOTTOM_RIGHT,b.FAR_BOTTOM_LEFT,b.FAR_TOP_LEFT,b.FAR_TOP_RIGHT],right:[b.NEAR_BOTTOM_RIGHT,b.FAR_BOTTOM_RIGHT,b.FAR_TOP_RIGHT,b.NEAR_TOP_RIGHT],left:[b.FAR_BOTTOM_LEFT,b.NEAR_BOTTOM_LEFT,b.NEAR_TOP_LEFT,b.FAR_TOP_LEFT],top:[b.FAR_TOP_LEFT,b.NEAR_TOP_LEFT,b.NEAR_TOP_RIGHT,b.FAR_TOP_RIGHT]};var C,R;!function(e){e[e.NUM=6]="NUM"}(C||(C={})),function(e){e[e.NUM=8]="NUM"}(R||(R={}));const M=[Object(c["g"])(-1,-1,-1,1),Object(c["g"])(1,-1,-1,1),Object(c["g"])(1,1,-1,1),Object(c["g"])(-1,1,-1,1),Object(c["g"])(-1,-1,1,1),Object(c["g"])(1,-1,1,1),Object(c["g"])(1,1,1,1),Object(c["g"])(-1,1,1,1)],P=new i["a"](d),I=y()},d36e:function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var i=r("a05b"),n=r("b7c2"),a=r("d7f7"),s=r("b061"),o=r("35b3"),c=r("7438"),l=r("badc"),u=r("8675"),d=r("7c51"),h=r("a4ee"),p=r("d272"),f=r("6a07"),b=r("c6d7"),m=r("8e97"),g=r("c3a4"),y=r("ca98"),O=r("da35"),v=r("fa1e"),_=r("c829"),j=r("87b7"),w=r("1962"),x=r("189c");class T extends y["a"]{initializeProgram(e){const t=T.shader.get(),r=this.configuration,i=t.build({output:r.output,oitEnabled:r.transparencyPassType===n["l"].Color,attributeColor:r.vertexColors,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new _["a"](e.rctx,i,v["a"])}bindPass(e,t){Object(m["b"])(this.program,t.camera.projectionMatrix),this.program.setUniform4fv("eColor",e.color),this.configuration.output===i["a"].Highlight&&Object(f["b"])(this.program,t),(this.configuration.output===i["a"].Depth||t.multipassTerrainEnabled)&&this.program.setUniform2fv("nearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(b["a"])(this.program,t))}bindDraw(e){Object(m["c"])(this.program,e),this.program.rebindTextures(),Object(p["c"])(this.program,this.configuration,e)}_createPipeline(e,t){const r=this.configuration,a=e===n["l"].NONE,s=e===n["l"].FrontFace;return Object(x["g"])({blending:r.output!==i["a"].Color&&r.output!==i["a"].Alpha||!r.transparent?null:a?c["d"]:Object(c["f"])(e),culling:Object(x["c"])(r.cullFace),depthTest:{func:Object(c["g"])(e)},depthWrite:a||s?r.writeDepth&&x["e"]:null,colorWrite:x["d"],stencilWrite:r.sceneHasOcludees?j["j"]:null,stencilTest:r.sceneHasOcludees?t?j["f"]:j["e"]:null,polygonOffset:a||s?r.polygonOffset&&S:Object(c["e"])(r.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._createPipeline(this.configuration.transparencyPassType,!0),this._createPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}T.shader=new g["a"](w["a"],()=>r.e("chunk-2d0de726").then(r.bind(null,"864f")));const S={factor:1,units:1};class E extends O["a"]{constructor(){super(...arguments),this.output=i["a"].Color,this.cullFace=n["c"].None,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.polygonOffset=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=n["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}Object(h["a"])([Object(O["b"])({count:i["a"].COUNT})],E.prototype,"output",void 0),Object(h["a"])([Object(O["b"])({count:n["c"].COUNT})],E.prototype,"cullFace",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"slicePlaneEnabled",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"vertexColors",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"transparent",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"polygonOffset",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"enableOffset",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"writeDepth",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"sceneHasOcludees",void 0),Object(h["a"])([Object(O["b"])({count:n["l"].COUNT})],E.prototype,"transparencyPassType",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"multipassTerrainEnabled",void 0),Object(h["a"])([Object(O["b"])()],E.prototype,"cullAboveGround",void 0);class A extends o["b"]{constructor(e){super(e,R),this.supportsEdges=!0,this.techniqueConfig=new E}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<c["b"],this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,t,r,i,n,a,s){Object(d["i"])(e,t,i,n,a,void 0,s)}requiresSlot(e,t){return e===l["a"].DRAPED_MATERIAL||(Object(s["b"])(t)===i["a"].Highlight?e===l["a"].OPAQUE_MATERIAL:e===(this.parameters.transparent?this.parameters.writeDepth?l["a"].TRANSPARENT_MATERIAL:l["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:l["a"].OPAQUE_MATERIAL))}createGLMaterial(e){return e.output===i["a"].Color||e.output===i["a"].Alpha||e.output===i["a"].Highlight||e.output===i["a"].Depth&&this.parameters.writeLinearDepth?new C(e):null}createBufferWriter(){return new u["a"](u["b"])}}class C extends a["a"]{updateParameters(e){return this.ensureTechnique(T,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==i["a"].Color&&this._output!==i["a"].Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const R={color:[1,1,1,1],transparent:!1,writeDepth:!0,writeLinearDepth:!1,vertexColors:!1,polygonOffset:!1,slicePlaneEnabled:!1,cullFace:n["c"].None,sceneHasOcludees:!1,...o["a"]}},d378:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b2b2"),n=r("78ba");class a extends n["a"]{constructor(e=null){super("LercWorker","_decode",e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}getTransferList(e){return[e.buffer]}release(){--this.ref<=0&&(s.forEach((e,t)=>{e===this&&s.delete(t)}),this.destroy())}}const s=new Map;function o(e=null){let t=s.get(Object(i["t"])(e));return t||(Object(i["k"])(e)?(t=new a(t=>e.schedule(t)),s.set(e,t)):(t=new a,s.set(null,t))),++t.ref,t}},d386:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));r("c120");var i=r("3eec"),n=r("7af8"),a=r("c0d3"),s=r("7ed0");const o=new Set,c=new Set;function l(e){return t=>{t.prototype.declaredClass=e,d(t);const r=[],i=[];let a=t.prototype;for(;a;)a.hasOwnProperty("initialize")&&!o.has(a.initialize)&&(o.add(a.initialize),r.push(a.initialize)),a.hasOwnProperty("destroy")&&!c.has(a.destroy)&&(c.add(a.destroy),i.push(a.destroy)),a=Object.getPrototypeOf(a);o.clear(),c.clear();class s extends t{constructor(...e){if(super(...e),this.constructor===s&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let e=r.length-1;e>=0;e--)r[e].call(this)}}),i.length){let e=!1;Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!e){e=!0;for(let e=0;e<i.length;e++)i[e].call(this)}}})}this.postscript(...e)}}}return s.__accessorMetadata__=Object(n["a"])(t.prototype),s.prototype.declaredClass=e,s}}function u(e,t){return null==t.get?function(){const t=this.__accessor__.properties.get(e);if(void 0===t)return;Object(a["d"])(t);const r=this.__accessor__.store;return r.has(e)?r.get(e):t.metadata.value}:function(){const t=this.__accessor__.properties.get(e);if(void 0!==t)return t.getComputed()}}function d(e){const t=e.prototype,r=Object(n["a"])(t).properties,a={};for(const n of Object.getOwnPropertyNames(r)){const e=r[n];Object(s["d"])(e),a[n]={enumerable:!0,configurable:!0,get:u(n,e),set(t){const r=this.__accessor__;if(void 0!==r){if(!Object.isFrozen(this)){if(r.initialized&&e.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${n}' of ${this.declaredClass}`);if(r.lifecycle===i["a"].CONSTRUCTED&&e.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${n}' of ${this.declaredClass}`);r.set(n,t)}}else Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:t})}}}Object.defineProperties(e.prototype,a)}},d3ac:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),n=r("fc29"),a=(r("c120"),r("7ffa")),s=r("e92d"),o=r("b2b2"),c=r("92ef"),l=r("4c37"),u=r("d386");s["a"].getLogger("esri.core.Clonable");const d=e=>{let t=class extends e{clone(){const e=Object(o["v"])(Object(l["a"])(this),"unable to clone instance of non-accessor class"),t=e.metadatas,r=e.store,i={},n=new Map;for(const o in t){const e=t[o],s=null==r?void 0:r.originOf(o),l=e.clonable;if(e.readOnly||!1===l||s!==c["a"].USER&&s!==c["a"].DEFAULTS&&s!==c["a"].WEB_MAP&&s!==c["a"].WEB_SCENE)continue;const u=this[o];let d=null;d="function"==typeof l?l(u):"reference"===l?u:Object(a["d"])(u),null!=u&&null==d||(s===c["a"].DEFAULTS?n.set(o,d):i[o]=d)}const s=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){var u;const e=null==(u=Object(l["a"])(s))?void 0:u.store;if(e)for(const[t,r]of n)e.set(t,r,c["a"].DEFAULTS)}return s}};return t=Object(i["a"])([Object(u["a"])("esri.core.Clonable")],t),t};let h=class extends(d(n["a"])){};h=Object(i["a"])([Object(u["a"])("esri.core.Clonable")],h)},d3cf:function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return l}));var i=r("8d60"),n=(r("c120"),r("7ffa")),a=r("b2b2"),s=r("a21b"),o=r("a9ab"),c=r("1a54");function l(e){return"declaredClass"in e}function u(e){return"declaredClass"in e}function d(e){return"declaredClass"in e}function h(e,t){if(!e)return null;if(d(e))return e;const r=new i["a"]({layer:t,sourceLayer:t});return r.visible=e.visible,r.symbol=Object(n["a"])(e.symbol),r.attributes=Object(n["a"])(e.attributes),r.geometry=p(e.geometry),r}function p(e){return Object(a["j"])(e)?null:l(e)?e:Object(o["a"])(f(e))}function f(e){const t=e.spatialReference.toJSON();switch(e.type){case"point":{const{x:r,y:i,z:n,m:a}=e;return{x:r,y:i,z:n,m:a,spatialReference:t}}case"polygon":{const{rings:r,hasZ:i,hasM:n}=e;return{rings:b(r),hasZ:i,hasM:n,spatialReference:t}}case"polyline":{const{paths:r,hasZ:i,hasM:n}=e;return{paths:b(r),hasZ:i,hasM:n,spatialReference:t}}case"extent":{const{xmin:r,xmax:i,ymin:n,ymax:a,zmin:s,zmax:o,mmin:c,mmax:l,hasZ:u,hasM:d}=e;return{xmin:r,xmax:i,ymin:n,ymax:a,zmin:s,zmax:o,mmin:c,mmax:l,hasZ:u,hasM:d,spatialReference:t}}case"multipoint":{const{points:r,hasZ:i,hasM:n}=e;return{points:y(r)?m(r):r,hasZ:i,hasM:n,spatialReference:t}}default:return}}function b(e){return g(e)?e.map(e=>m(e)):e}function m(e){return e.map(e=>Object(s["n"])(e))}function g(e){for(const t of e)if(0!==t.length)return y(t);return!1}function y(e){return e.length&&(Object(s["d"])(e[0])||Object(s["e"])(e[0]))}function O(e,t){if(!e)return null;let r;if(u(e)){if(null==t)return e.clone();if(u(t))return t.copy(e)}return null!=t?(r=t,r.x=e.x,r.y=e.y,r.spatialReference=e.spatialReference,e.hasZ?(r.z=e.z,r.hasZ=e.hasZ):(r.z=null,r.hasZ=!1),e.hasM?(r.m=e.m,r.hasM=!0):(r.m=null,r.hasM=!1)):(r=Object(c["j"])(e.x,e.y,e.z,e.spatialReference),e.hasM&&(r.m=e.m,r.hasM=!0)),r}},d408:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return _})),r.d(t,"d",(function(){return w})),r.d(t,"e",(function(){return L}));r("c120");var i,n=r("b2b2"),a=r("a21b"),s=r("3349"),o=r("e431"),c=r("0b2d"),l=r("8188"),u=r("f694"),d=r("1666"),h=r("3c9c"),p=r("ed70"),f=r("2e0f"),b=r("7585"),m=r("b7c2"),g=r("0278"),y=r("b7bd"),O=r("9a68");function v(e){const t=[],r=[];x(e,r,t);const i=r[0][1].data,n=t[0][1].length,a=new Uint16Array(n);return T(e,r,t),S(e,r,t,a),A(e,r,t,a),E(e,r,t,a),C(e,r,t,a),R(e,r,t,a),M(e,r,t,i),new g["a"](r,t,m["h"].Line)}function _(e,t,r,i){const n="polygon"===e.type?d["a"].CCW_IS_HOLE:d["a"].NONE,a="polygon"===e.type?e.rings:e.paths,{position:s,outlines:o}=Object(d["b"])(a,e.hasZ,n),c=new Float64Array(s.length),l=Object(f["d"])(s,e.spatialReference,0,c,0,s,0,s.length/3,t,r,i),u=null!=l;return{lines:u?j(o,s,c):[],projectionSuccess:u,sampledElevation:l}}function j(e,t,r){const i=new Array;for(const{index:n,count:a}of e){if(a<=1)continue;const e=3*n,s=e+3*a;i.push({position:t.subarray(e,s),mapPosition:r?r.subarray(e,s):void 0})}return i}function w(e,t){const r="polygon"===e.type?d["a"].CCW_IS_HOLE:d["a"].NONE,i="polygon"===e.type?e.rings:e.paths,{position:n,outlines:a}=Object(d["b"])(i,!1,r),s=Object(l["p"])(n,e.spatialReference,0,n,t,0,n.length/3);for(let o=2;o<n.length;o+=3)n[o]=b["a"];return{lines:s?j(a,n):[],projectionSuccess:s}}function x(e,t,r){const{attributeData:{position:n},removeDuplicateStartEnd:s}=e,o=P(n)&&s===i.REMOVE,c=n.length/3-(o?1:0),l=new Uint32Array(2*(c-1)),u=o?Object(a["m"])(n,0,n.length-3):n;let d=0;for(let i=0;i<c-1;i++)l[d++]=i,l[d++]=i+1;t.push([y["a"].POSITION,{size:3,data:u,exclusive:o}]),r.push([y["a"].POSITION,l])}function T(e,t,r){const i=e.attributeData.mapPosition;Object(n["j"])(i)||(r.push([y["a"].MAPPOS,r[0][1]]),t.push([y["a"].MAPPOS,{size:3,data:i}]))}function S(e,t,r,i){if(Object(n["k"])(e.attributeData.colorFeature))return;const a=e.attributeData.color;t.push([y["a"].COLOR,{size:4,data:Object(n["u"])(a,p["c"])}]),r.push([y["a"].COLOR,i])}function E(e,t,r,i){const a=e.attributeData.colorFeature;Object(n["j"])(a)||(t.push([y["a"].COLORFEATUREATTRIBUTE,{size:1,data:new Float32Array([a])}]),r.push([y["a"].COLOR,i]))}function A(e,t,r,i){if(Object(n["k"])(e.attributeData.sizeFeature))return;const a=e.attributeData.size;t.push([y["a"].SIZE,{size:1,data:[Object(n["u"])(a,1)]}]),r.push([y["a"].SIZE,i])}function C(e,t,r,i){const a=e.attributeData.sizeFeature;Object(n["j"])(a)||(t.push([y["a"].SIZEFEATUREATTRIBUTE,{size:1,data:new Float32Array([a])}]),r.push([y["a"].SIZEFEATUREATTRIBUTE,i]))}function R(e,t,r,i){const a=e.attributeData.opacityFeature;Object(n["j"])(a)||(t.push([y["a"].OPACITYFEATUREATTRIBUTE,{size:1,data:new Float32Array([a])}]),r.push([y["a"].OPACITYFEATUREATTRIBUTE,i]))}function M(e,t,r,i){if(Object(n["j"])(e.overlayInfo)||e.overlayInfo.renderCoordsHelper.viewingMode!==h["a"].Global||!e.overlayInfo.spatialReference.isGeographic)return;const a=new Float64Array(i.length),c=Object(u["e"])(e.overlayInfo.spatialReference);for(let n=0;n<a.length;n+=3)Object(l["l"])(i,n,a,n,c);const d=i.length/3,p=new Float32Array(d+1);let f=I,b=D,m=0,g=0;Object(o["y"])(f,a[g++],a[g++],a[g++]),p[0]=0;for(let n=1;n<d+1;++n)n===d&&(g=0),Object(o["y"])(b,a[g++],a[g++],a[g++]),m+=Object(s["d"])(f,b),p[n]=m,[f,b]=[b,f];t.push([y["a"].DISTANCETOSTART,{size:1,data:p}]),r.push([y["a"].DISTANCETOSTART,r[0][1]])}function P(e){const t=e.length;return e[0]===e[t-3]&&e[1]===e[t-2]&&e[2]===e[t-1]}!function(e){e[e.KEEP=0]="KEEP",e[e.REMOVE=1]="REMOVE"}(i||(i={}));const I=Object(c["f"])(),D=Object(c["f"])();function L(e){switch(e){case"butt":return O["a"].BUTT;case"square":return O["a"].SQUARE;case"round":return O["a"].ROUND;default:return null}}},d409:function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var i=r("a4ee"),n=r("2c4f"),a=r("4d10"),s=r("ce50"),o=r("e92d"),c=r("59b2"),l=(r("b50f"),r("c120"),r("4c37")),u=(r("cea0"),r("d386")),d=r("92ef"),h=r("e9d0"),p=r("2258");const f=o["a"].getLogger("esri.layers.TileLayer");function b(e,t){const r=[],i={};return e?(e.forEach(e=>{const n=new h["a"];if(n.read(e,t),i[n.id]=n,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(n)}else r.unshift(n)}),r):r}const m=n["a"].ofType(h["a"]);function g(e,t){e&&e.forEach(e=>{t(e),e.sublayers&&e.sublayers.length&&g(e.sublayers,t)})}const y=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new a["a"]({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[d["a"].SERVICE]:{},[d["a"].PORTAL_ITEM]:{},[d["a"].WEB_SCENE]:{},[d["a"].WEB_MAP]:{}},this.handles.add(this.watch("sublayers",(e,t)=>this._handleSublayersChange(e,t),!0))}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=Object(d["e"])(t.origin);if(i<d["a"].SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>d["a"].SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:n,origin:a}=this.createSublayersForOrigin("web-document"),s=Object(l["a"])(this);s.setDefaultOrigin(a),this._set("sublayers",new m(n)),s.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=Object(d["e"])("web-document"===e?"web-map":e);let r=d["a"].SERVICE,i=this.sublayersSourceJSON[d["a"].SERVICE].layers,n=this.sublayersSourceJSON[d["a"].SERVICE].context,a=null;const s=[d["a"].PORTAL_ITEM,d["a"].WEB_SCENE,d["a"].WEB_MAP].filter(e=>e<=t);for(const d of s){const e=this.sublayersSourceJSON[d];Object(p["b"])(e.layers)&&(r=d,i=e.layers,n=e.context,e.visibleLayers&&(a={visibleLayers:e.visibleLayers,context:e.context}))}const o=[d["a"].PORTAL_ITEM,d["a"].WEB_SCENE,d["a"].WEB_MAP].filter(e=>e>r&&e<=t);let c=null;for(const d of o){const{layers:e,visibleLayers:t,context:r}=this.sublayersSourceJSON[d];e&&(c={layers:e,context:r}),t&&(a={visibleLayers:t,context:r})}const l=b(i,n),u=new Map,h=new Set;if(c)for(const d of c.layers)u.set(d.id,d);if(a)for(const d of a.visibleLayers)h.add(d);return g(l,e=>{c&&e.read(u.get(e.id),c.context),a&&e.read({defaultVisibility:h.has(e.id)},a.context)}),{origin:Object(d["c"])(r),sublayers:new m({items:l})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.handles.remove("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this,e.layer=this}),this.handles.add([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null})],"sublayers-owner"),"tile"===this.type&&this.handles.add(e.on("before-changes",e=>{f.error(new s["a"]("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()}),"sublayers-owner"))}};return Object(i["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"allSublayers",void 0),Object(i["a"])([Object(c["b"])({readOnly:!0,type:n["a"].ofType(h["a"])})],t.prototype,"serviceSublayers",void 0),Object(i["a"])([Object(c["b"])({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),Object(i["a"])([Object(c["b"])({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=Object(i["a"])([Object(u["a"])("esri.layers.mixins.SublayersOwner")],t),t}},d445:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return s}));var i=r("9ef0"),n=r("36b8");function a(e){const t=Object(n["n"])(e);if("CIMTextSymbol"===t.type)return t.height;let r=0;if(t.symbolLayers)for(const i of t.symbolLayers)Object(n["i"])(i)&&i.size>r?r=i.size:Object(n["k"])(i)&&i.width>r?r=i.width:Object(n["h"])(i);return r}function s(e,t,r){const i=Object(n["n"])(e),s=a(e);0!==s?c(i,t/s,!1,r):o(i,t)}function o(e,t){if("CIMTextSymbol"!==e.type){if(e.symbolLayers)for(const r of e.symbolLayers)switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":r.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":r.width=t}}else e.height=t}function c(e,t,r,i){if("CIMTextSymbol"!==e.type){if(r&&e.effects)for(const r of e.effects)d(r,t);if(e.symbolLayers)for(const r of e.symbolLayers)switch(r.type){case"CIMPictureMarker":case"CIMVectorMarker":l(r,t,i);break;case"CIMPictureStroke":case"CIMSolidStroke":null!=i&&i.preserveOutlineWidth||!r.width||(r.width*=t);break;case"CIMPictureFill":r.height&&(r.height*=t),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t);break;case"CIMHatchFill":c(r.lineSymbol,t,!0,{...i,preserveOutlineWidth:!1}),r.offsetX&&(r.offsetX*=t),r.offsetY&&(r.offsetY*=t),r.separation&&(r.separation*=t)}}else e.height*=t}function l(e,t,r){if(e.markerPlacement&&u(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size*=t,"CIMVectorMarker"===e.type&&e.markerGraphics)for(const i of e.markerGraphics)e.scaleSymbolsProportionally||c(i.symbol,t,!0,r)}function u(e,t){switch(Object(n["j"])(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length){const r=e.placementTemplate.map(e=>e*t);e.placementTemplate=r}break;case"CIMMarkerPlacementAlongLineVariableSize":if(e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length){const r=e.placementTemplate.map(e=>e*t);e.placementTemplate=r}break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}function d(e,t){switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length){const r=e.dashTemplate.map(e=>e*t);e.dashTemplate=r}break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function h(e){const t=[];return p(Object(n["n"])(e),t),t.length?new i["a"](Object(n["e"])(t[0])):null}function p(e,t){let r;r="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(r.symbolLayers)for(const a of r.symbolLayers)if(!(a.colorLocked||i&&(Object(n["k"])(a)||Object(n["i"])(a)&&a.markerPlacement&&Object(n["j"])(a.markerPlacement))))switch(a.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":a.tintColor&&f(t,a.tintColor);break;case"CIMVectorMarker":a.markerGraphics.forEach(e=>{p(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":f(t,a.color);break;case"CIMHatchFill":p(a.lineSymbol,t)}}function f(e,t){for(const r of e)if(r.join(".")===t.join("."))return;e.push(t)}},d4de:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b2b2"),n=r("d17d"),a=r("beba");const s={bandCount:3,outMin:0,outMax:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,stretchType:"none",type:"stretch"};class o{constructor(e,t,r=null,i=null){this.type="raster-tile",this._memoryUsed=null,this._source=null,this._symbolizerParameters=null,this._bandIds=null,this._interpolation=null,this._dirty=!1,this._transformGrid=null,this.isRendereredSource=!1,this.symbolizerRenderer=null,this.rawPixelData=null,this.lij=null,this.scale=1,this.offset=[0,0],this.opacity=1,this.lij=e,this.source=t,this.width=r||t.width,this.height=i||t.height}get source(){return this._source}set source(e){this._source=e,this._rasterTexture&&(this._rasterTexture.dispose(),this._rasterTexture=null,this._memoryUsed=null)}get symbolizerParameters(){return this.isRendereredSource?{...s,maxCutOff:[1,1,1],factor:[1,1,1]}:this._symbolizerParameters||s}set symbolizerParameters(e){this._symbolizerParameters=e}get bandIds(){return this._bandIds}set bandIds(e){Object(i["k"])(e)&&e.length>0?this._bandIds&&e.every((e,t)=>!!this._bandIds[t]&&e===this._bandIds[t])||(this._bandIds=e,this._dirty=!0):this._bandIds=null}get interpolation(){return this._interpolation||"nearest"}set interpolation(e){if(this._interpolation=e,this._rasterTexture){const t=this._getRasterTextureInterpolation(e);this._rasterTexture.setSamplingMode("bilinear"===t?n["z"].LINEAR:n["z"].NEAREST)}}get transformGrid(){return this._transformGrid}set transformGrid(e){this._transformGrid=e,this._transformGridTexture&&(this._transformGridTexture.dispose(),this._transformGridTexture=null,this._memoryUsed=null)}bind(e){return!!(this.source&&this.source.pixels&&this.source.pixels.length>0)&&(this._rasterTexture&&!this._dirty||this._updateRasterTexture(e,this.bandIds),this._rasterTexture&&(this._updateColormapTexture(e),this.transformGrid&&!this._transformGridTexture&&(this._transformGridTexture=Object(a["c"])(e,this.transformGrid))),!0)}getUniforms(){const e=Object(a["d"])(this.scale,this.offset),{symbolizerParameters:t,transformGrid:r,width:i,height:n,opacity:s}=this;return{basic:e,common:Object(a["f"])(r,[i,n],[this.source.width,this.source.height],s),colormap:t.colormap?Object(a["e"])(t.colormap,t.colormapOffset):null,stretch:"stretch"===this.symbolizerParameters.type?Object(a["h"])(this.symbolizerParameters):null,hillshade:"hillshade"===this.symbolizerParameters.type?Object(a["g"])(this.symbolizerParameters):null}}getTextures(){const e=new Array,t=[];return this._rasterTexture&&(t.push(this._rasterTexture),e.push("u_image"),this._transformGridTexture&&(t.push(this._transformGridTexture),e.push("u_transformGrid")),this._colormapTexture&&(t.push(this._colormapTexture),e.push("u_colormap"))),{names:e,textures:t}}get memoryUsage(){if(Object(i["j"])(this._memoryUsed)){const e=this.getTextures();if(null==e)return 0;this._memoryUsed=e.textures.map(e=>e.descriptor.width*e.descriptor.height*4).reduce((e,t)=>e+t,0)}return this._memoryUsed}release(){return this._rasterTexture=Object(i["e"])(this._rasterTexture),this._transformGridTexture=Object(i["e"])(this._transformGridTexture),this._colormapTexture=Object(i["e"])(this._colormapTexture),this.source=null,this.transformGrid=null,this.rawPixelData=null,!0}_updateRasterTexture(e,t){const r=this.source?this.source.extractBands(t):null;if(!(r&&r.pixels&&r.pixels.length>0))return void(this._rasterTexture&&(this._rasterTexture.dispose(),this._rasterTexture=null));const n=Object(i["j"])(t)&&Object(i["j"])(this.bandIds)||Object(i["k"])(t)&&Object(i["k"])(this.bandIds)&&t.join("")===this.bandIds.join("");if(this._rasterTexture){if(n)return;this._rasterTexture.dispose(),this._rasterTexture=null}const s=this._getRasterTextureInterpolation(this.interpolation);this._rasterTexture=Object(a["b"])(e,r,s,this.isRendereredSource||this.hasStretchTypeNone())}hasStretchTypeNone(){return"stretchType"in this.symbolizerParameters&&"none"===this.symbolizerParameters.stretchType&&!this.symbolizerParameters.useGamma&&"u8"===this.source.pixelType}_getRasterTextureInterpolation(e){return"lut"===this.symbolizerParameters.type||"nearest"===e||"majority"===e?"nearest":"bilinear"}_updateColormapTexture(e){const t=this._colormap,r=this.symbolizerParameters.colormap;return r?t?r.length!==t.length||r.some((e,r)=>e!==t[r])?(this._colormapTexture&&(this._colormapTexture.dispose(),this._colormapTexture=null),this._colormapTexture=Object(a["a"])(e,r),void(this._colormap=r)):void 0:(this._colormapTexture=Object(a["a"])(e,r),void(this._colormap=r)):(this._colormapTexture&&(this._colormapTexture.dispose(),this._colormapTexture=null),void(this._colormap=null))}}},d4e6:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return c}));var i=r("ce50"),n=r("9d1d"),a=r("b90c"),s=r("22f1");function o(e,t,r){try{return u(e)}catch(o){var i;null==r||null==(i=r.messages)||i.push(o)}return null}function c(e,t,r,i){try{const i=l(e);Object(n["c"])(r,i,t)}catch(c){i.messages&&i.messages.push(c)}}function l(e){const t=Object(a["a"])(e);return t?Object(s["b"])(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}function u(e){if(!e||0===e.length)return null;if(d(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:h(r.value)});return t}return h(e)}function d(e){const t=e[0];return!!t&&"scale"in t}function h(e){if(!e||!e.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[p(r,"amount")];break;case"blur":e=[p(r,"radius","pt")];break;case"hue-rotate":e=[p(r,"angle","deg")];break;case"drop-shadow":e=[p(r,"xoffset","pt"),p(r,"yoffset","pt"),p(r,"blurRadius","pt"),f(r,"color")];break;case"bloom":e=[p(r,"strength"),p(r,"radius","pt"),p(r,"threshold")]}const i=`${r.type}(${e.filter(Boolean).join(" ")})`;Object(a["a"])(i),t.push(i)}return t.join(" ")}function p(e,t,r){if(null==e[t])throw new i["a"]("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function f(e,t){if(null==e[t])throw new i["a"]("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},d539:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u}));var i=r("0b2d"),n=r("a05b"),a=r("6a21"),s=r("3886"),o=r("b7bd"),c=r("9cc4");function l(e,t){t.instanced&&t.instancedDoublePrecision&&(e.attributes.add(o["a"].MODELORIGINHI,"vec3"),e.attributes.add(o["a"].MODELORIGINLO,"vec3"),e.attributes.add(o["a"].MODEL,"mat3"),e.attributes.add(o["a"].MODELNORMAL,"mat3")),t.instancedDoublePrecision&&(e.vertex.include(a["a"],t),e.vertex.uniforms.add("viewOriginHi","vec3"),e.vertex.uniforms.add("viewOriginLo","vec3"));const r=[s["a"]`
  3669. vec3 calculateVPos() {
  3670. ${t.instancedDoublePrecision?"return model * localPosition().xyz;":"return localPosition().xyz;"}
  3671. }
  3672. `,s["a"]`
  3673. vec3 subtractOrigin(vec3 _pos) {
  3674. ${t.instancedDoublePrecision?s["a"]`
  3675. vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -modelOriginHi, -modelOriginLo);
  3676. return _pos - originDelta;`:"return vpos;"}
  3677. }
  3678. `,s["a"]`
  3679. vec3 dpNormal(vec4 _normal) {
  3680. ${t.instancedDoublePrecision?"return normalize(modelNormal * _normal.xyz);":"return normalize(_normal.xyz);"}
  3681. }
  3682. `,s["a"]`
  3683. vec3 dpNormalView(vec4 _normal) {
  3684. ${t.instancedDoublePrecision?"return normalize((viewNormal * vec4(modelNormal * _normal.xyz, 1.0)).xyz);":"return normalize((viewNormal * _normal).xyz);"}
  3685. }
  3686. `,t.vertexTangents?s["a"]`
  3687. vec4 dpTransformVertexTangent(vec4 _tangent) {
  3688. ${t.instancedDoublePrecision?"return vec4(modelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
  3689. }
  3690. `:s["a"]``];e.vertex.code.add(r[0]),e.vertex.code.add(r[1]),e.vertex.code.add(r[2]),t.output===n["a"].Normal&&e.vertex.code.add(r[3]),e.vertex.code.add(r[4])}function u(e,t){Object(c["b"])(t,d,h,3),e.setUniform3fv("viewOriginHi",d),e.setUniform3fv("viewOriginLo",h)}const d=Object(i["f"])(),h=Object(i["f"])()},d56e:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("a05b"),n=r("3886"),a=r("1956");function s(e,t){const r=n["a"]`
  3691. /*
  3692. * ${t.name}
  3693. * ${t.output===i["a"].Color?"RenderOutput: Color":t.output===i["a"].Depth?"RenderOutput: Depth":t.output===i["a"].Shadow?"RenderOutput: Shadow":t.output===i["a"].Normal?"RenderOutput: Normal":t.output===i["a"].Highlight?"RenderOutput: Highlight":""}
  3694. */
  3695. `;Object(a["c"])()&&(e.fragment.code.add(r),e.vertex.code.add(r))}},d5f7:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return h})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return u}));var i=r("fa1e"),n=r("7c33"),a=r("7ce4"),s=r("d17d"),o=r("a1ff"),c=r("0fa6");function l(e,t=n["a"],r=i["a"],o=-1,l=1){let u=null;return u=t===n["b"]?new Float32Array([o,o,0,0,l,o,1,0,o,l,0,1,l,l,1,1]):new Float32Array([o,o,l,o,o,l,l,l]),new c["a"](e,r,{geometry:t},{geometry:a["a"].createVertex(e,s["D"].STATIC_DRAW,u)})}function u(e,t=n["a"],r=i["a"]){const o=new Float32Array([-1,-1,3,-1,-1,3]);return new c["a"](e,r,{geometry:t},{geometry:a["a"].createVertex(e,s["D"].STATIC_DRAW,o)})}const d=4;function h(e,t=d){return new o["a"](e,{target:s["A"].TEXTURE_2D,pixelFormat:s["p"].RGBA,dataType:s["q"].UNSIGNED_BYTE,samplingMode:s["z"].NEAREST,width:t,height:t})}function p(e,t,r=d){const i=new Uint8Array(r*r*4);for(let n=0;n<i.length;n+=4)i[n+0]=255*t[0],i[n+1]=255*t[1],i[n+2]=255*t[2],i[n+3]=255*t[3];return new o["a"](e,{target:s["A"].TEXTURE_2D,pixelFormat:s["p"].RGBA,dataType:s["q"].UNSIGNED_BYTE,samplingMode:s["z"].NEAREST,width:r,height:r},i)}function f(e){return new o["a"](e,{target:s["A"].TEXTURE_2D,pixelFormat:s["p"].RGBA,dataType:s["q"].UNSIGNED_BYTE,samplingMode:s["z"].NEAREST,width:1,height:1},new Uint8Array([255,255,255,255]))}},d611:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(){super(...arguments),this.title=null}clone(){return new i({title:this.title})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.renderers.support.LegendOptions")],c);const l=c},d636:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return n}));var i=r("2255");const n=Math.PI/180,a=/SPHEROID\[([^\]]+)]/i,s=i["a"].radius,o=i["a"].eccentricitySquared,c={a1:s*o,a2:s*o*s*o,a3:s*o*o/2,a4:s*o*s*o*2.5,a5:s*o+s*o*o/2,a6:1-o},l={4267:{a:6378206.4,f:1/294.9786982},4269:{a:6378137,f:1/298.257222101},4326:{a:i["a"].radius,f:i["a"].flattening},104900:{a:2439700,f:0},104901:{a:6051e3,f:0},104902:{a:6051800,f:0},104903:{a:i["c"].radius,f:i["c"].flattening},104904:{a:3393400,f:1/192.0430107526882},104905:{a:i["b"].radius,f:i["b"].flattening},104906:{a:6200,f:0},104907:{a:11100,f:0},104908:{a:71492e3,f:.06487439154031222},104909:{a:8200,f:0},104910:{a:83500,f:0},104911:{a:1e4,f:0},104912:{a:2409300,f:0},104913:{a:15e3,f:0},104914:{a:4e4,f:0},104915:{a:1562090,f:0},104916:{a:2632345,f:0},104917:{a:85e3,f:0},104918:{a:1821460,f:0},104919:{a:5e3,f:0},104920:{a:12e3,f:0},104921:{a:3e4,f:3},104922:{a:18e3,f:0},104923:{a:14e3,f:0},104924:{a:49300,f:0},104925:{a:60268e3,f:1/10.2079945799458},104926:{a:16e3,f:0},104927:{a:9500,f:0},104928:{a:56e4,f:0},104929:{a:249400,f:0},104930:{a:59500,f:0},104931:{a:16e3,f:0},104932:{a:133e3,f:0},104933:{a:718e3,f:0},104934:{a:888e3,f:0},104935:{a:1986300,f:0},104936:{a:1e4,f:0},104937:{a:41900,f:0},104938:{a:11e4,f:0},104939:{a:50100,f:0},104940:{a:764e3,f:0},104941:{a:11e3,f:0},104942:{a:529800,f:0},104943:{a:2575e3,f:0},104944:{a:25559e3,f:1/43.61604095563141},104945:{a:578900,f:0},104946:{a:33e3,f:0},104947:{a:21e3,f:0},104948:{a:13e3,f:0},104949:{a:31e3,f:0},104950:{a:27e3,f:0},104951:{a:42e3,f:0},104952:{a:235800,f:0},104953:{a:761400,f:0},104954:{a:15e3,f:0},104955:{a:54e3,f:0},104956:{a:77e3,f:0},104957:{a:27e3,f:0},104958:{a:788900,f:0},104959:{a:584700,f:0},104960:{a:24764e3,f:.01708124697141011},104961:{a:74e3,f:0},104962:{a:79e3,f:0},104963:{a:104e3,f:.14423076923076922},104964:{a:29e3,f:0},104965:{a:17e4,f:0},104966:{a:208e3,f:0},104967:{a:4e4,f:0},104968:{a:1352600,f:0},104969:{a:1195e3,f:0},104970:{a:593e3,f:0},104971:{a:i["b"].radius,f:0},104972:{a:47e4,f:0},104973:{a:255e3,f:0},104974:{a:2439400,f:0}}},d6e5:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var i=r("171c"),n=r("35b3"),a=r("614d"),s=r("badc");class o{constructor(e){this.rctx=e,this.camera=null,this.lastFrameCamera=new i["b"],this.pass=a["a"].MATERIAL,this.slot=s["a"].OPAQUE_MATERIAL,this.highlightDepthTexture=null,this.renderOccludedMask=l,this.hasOccludees=!1,this.hasFillLights=!0}resetRenderOccludedMask(){this.renderOccludedMask=l}get isHighlightPass(){return this.pass===a["a"].MATERIAL_HIGHLIGHT}}class c extends o{constructor(e,t,r,i,n,a){super(e),this.offscreenRenderingHelper=t,this.scenelightingData=r,this.shadowMap=i,this.ssaoHelper=n,this.sliceHelper=a}}const l=n["c"].Occlude|n["c"].OccludeAndTransparent|n["c"].OccludeAndTransparentStencil},d791:function(e,t,r){"use strict";r.d(t,"a",(function(){return A})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return x})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return _})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return O})),r.d(t,"h",(function(){return y})),r.d(t,"i",(function(){return f})),r.d(t,"j",(function(){return o})),r.d(t,"k",(function(){return p})),r.d(t,"l",(function(){return I})),r.d(t,"m",(function(){return D})),r.d(t,"n",(function(){return h})),r.d(t,"o",(function(){return k})),r.d(t,"p",(function(){return g})),r.d(t,"q",(function(){return Z})),r.d(t,"r",(function(){return F})),r.d(t,"s",(function(){return m})),r.d(t,"t",(function(){return s})),r.d(t,"u",(function(){return c})),r.d(t,"v",(function(){return v})),r.d(t,"w",(function(){return $})),r.d(t,"x",(function(){return W})),r.d(t,"y",(function(){return U})),r.d(t,"z",(function(){return j}));var i=r("0b2d"),n=r("4212");function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function s(e,t,r,i,n,a,s,o,c,l,u,d,h,p,f,b,m){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=a,e[5]=s,e[6]=o,e[7]=c,e[8]=l,e[9]=u,e[10]=d,e[11]=h,e[12]=p,e[13]=f,e[14]=b,e[15]=m,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function c(e,t){if(e===t){const r=t[1],i=t[2],n=t[3],a=t[6],s=t[7],o=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=n,e[13]=s,e[14]=o}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],c=t[6],l=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],b=t[13],m=t[14],g=t[15],y=r*o-i*s,O=r*c-n*s,v=r*l-a*s,_=i*c-n*o,j=i*l-a*o,w=n*l-a*c,x=u*b-d*f,T=u*m-h*f,S=u*g-p*f,E=d*m-h*b,A=d*g-p*b,C=h*g-p*m;let R=y*C-O*A+v*E+_*S-j*T+w*x;return R?(R=1/R,e[0]=(o*C-c*A+l*E)*R,e[1]=(n*A-i*C-a*E)*R,e[2]=(b*w-m*j+g*_)*R,e[3]=(h*j-d*w-p*_)*R,e[4]=(c*S-s*C-l*T)*R,e[5]=(r*C-n*S+a*T)*R,e[6]=(m*v-f*w-g*O)*R,e[7]=(u*w-h*v+p*O)*R,e[8]=(s*A-o*S+l*x)*R,e[9]=(i*S-r*A-a*x)*R,e[10]=(f*j-b*v+g*y)*R,e[11]=(d*v-u*j-p*y)*R,e[12]=(o*T-s*E-c*x)*R,e[13]=(r*E-i*T+n*x)*R,e[14]=(b*O-f*_-m*y)*R,e[15]=(u*_-d*O+h*y)*R,e):null}function u(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],c=t[6],l=t[7],u=t[8],d=t[9],h=t[10],p=t[11],f=t[12],b=t[13],m=t[14],g=t[15];return e[0]=o*(h*g-p*m)-d*(c*g-l*m)+b*(c*p-l*h),e[1]=-(i*(h*g-p*m)-d*(n*g-a*m)+b*(n*p-a*h)),e[2]=i*(c*g-l*m)-o*(n*g-a*m)+b*(n*l-a*c),e[3]=-(i*(c*p-l*h)-o*(n*p-a*h)+d*(n*l-a*c)),e[4]=-(s*(h*g-p*m)-u*(c*g-l*m)+f*(c*p-l*h)),e[5]=r*(h*g-p*m)-u*(n*g-a*m)+f*(n*p-a*h),e[6]=-(r*(c*g-l*m)-s*(n*g-a*m)+f*(n*l-a*c)),e[7]=r*(c*p-l*h)-s*(n*p-a*h)+u*(n*l-a*c),e[8]=s*(d*g-p*b)-u*(o*g-l*b)+f*(o*p-l*d),e[9]=-(r*(d*g-p*b)-u*(i*g-a*b)+f*(i*p-a*d)),e[10]=r*(o*g-l*b)-s*(i*g-a*b)+f*(i*l-a*o),e[11]=-(r*(o*p-l*d)-s*(i*p-a*d)+u*(i*l-a*o)),e[12]=-(s*(d*m-h*b)-u*(o*m-c*b)+f*(o*h-c*d)),e[13]=r*(d*m-h*b)-u*(i*m-n*b)+f*(i*h-n*d),e[14]=-(r*(o*m-c*b)-s*(i*m-n*b)+f*(i*c-n*o)),e[15]=r*(o*h-c*d)-s*(i*h-n*d)+u*(i*c-n*o),e}function d(e){const t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],s=e[5],o=e[6],c=e[7],l=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],b=e[14],m=e[15];return(t*s-r*a)*(d*m-h*b)-(t*o-i*a)*(u*m-h*f)+(t*c-n*a)*(u*b-d*f)+(r*o-i*s)*(l*m-h*p)-(r*c-n*s)*(l*b-d*p)+(i*c-n*o)*(l*f-u*p)}function h(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=t[4],c=t[5],l=t[6],u=t[7],d=t[8],h=t[9],p=t[10],f=t[11],b=t[12],m=t[13],g=t[14],y=t[15];let O=r[0],v=r[1],_=r[2],j=r[3];return e[0]=O*i+v*o+_*d+j*b,e[1]=O*n+v*c+_*h+j*m,e[2]=O*a+v*l+_*p+j*g,e[3]=O*s+v*u+_*f+j*y,O=r[4],v=r[5],_=r[6],j=r[7],e[4]=O*i+v*o+_*d+j*b,e[5]=O*n+v*c+_*h+j*m,e[6]=O*a+v*l+_*p+j*g,e[7]=O*s+v*u+_*f+j*y,O=r[8],v=r[9],_=r[10],j=r[11],e[8]=O*i+v*o+_*d+j*b,e[9]=O*n+v*c+_*h+j*m,e[10]=O*a+v*l+_*p+j*g,e[11]=O*s+v*u+_*f+j*y,O=r[12],v=r[13],_=r[14],j=r[15],e[12]=O*i+v*o+_*d+j*b,e[13]=O*n+v*c+_*h+j*m,e[14]=O*a+v*l+_*p+j*g,e[15]=O*s+v*u+_*f+j*y,e}function p(e,t,r){const i=r[0],n=r[1],a=r[2];let s,o,c,l,u,d,h,p,f,b,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(s=t[0],o=t[1],c=t[2],l=t[3],u=t[4],d=t[5],h=t[6],p=t[7],f=t[8],b=t[9],m=t[10],g=t[11],e[0]=s,e[1]=o,e[2]=c,e[3]=l,e[4]=u,e[5]=d,e[6]=h,e[7]=p,e[8]=f,e[9]=b,e[10]=m,e[11]=g,e[12]=s*i+u*n+f*a+t[12],e[13]=o*i+d*n+b*a+t[13],e[14]=c*i+h*n+m*a+t[14],e[15]=l*i+p*n+g*a+t[15]),e}function f(e,t,r){const i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function b(e,t,r,i){let a,s,o,c,l,u,d,h,p,f,b,m,g,y,O,v,_,j,w,x,T,S,E,A,C=i[0],R=i[1],M=i[2],P=Math.sqrt(C*C+R*R+M*M);return P<n["a"]?null:(P=1/P,C*=P,R*=P,M*=P,a=Math.sin(r),s=Math.cos(r),o=1-s,c=t[0],l=t[1],u=t[2],d=t[3],h=t[4],p=t[5],f=t[6],b=t[7],m=t[8],g=t[9],y=t[10],O=t[11],v=C*C*o+s,_=R*C*o+M*a,j=M*C*o-R*a,w=C*R*o-M*a,x=R*R*o+s,T=M*R*o+C*a,S=C*M*o+R*a,E=R*M*o-C*a,A=M*M*o+s,e[0]=c*v+h*_+m*j,e[1]=l*v+p*_+g*j,e[2]=u*v+f*_+y*j,e[3]=d*v+b*_+O*j,e[4]=c*w+h*x+m*T,e[5]=l*w+p*x+g*T,e[6]=u*w+f*x+y*T,e[7]=d*w+b*x+O*T,e[8]=c*S+h*E+m*A,e[9]=l*S+p*E+g*A,e[10]=u*S+f*E+y*A,e[11]=d*S+b*E+O*A,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function m(e,t,r){const i=Math.sin(r),n=Math.cos(r),a=t[4],s=t[5],o=t[6],c=t[7],l=t[8],u=t[9],d=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+l*i,e[5]=s*n+u*i,e[6]=o*n+d*i,e[7]=c*n+h*i,e[8]=l*n-a*i,e[9]=u*n-s*i,e[10]=d*n-o*i,e[11]=h*n-c*i,e}function g(e,t,r){const i=Math.sin(r),n=Math.cos(r),a=t[0],s=t[1],o=t[2],c=t[3],l=t[8],u=t[9],d=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-l*i,e[1]=s*n-u*i,e[2]=o*n-d*i,e[3]=c*n-h*i,e[8]=a*i+l*n,e[9]=s*i+u*n,e[10]=o*i+d*n,e[11]=c*i+h*n,e}function y(e,t,r){const i=Math.sin(r),n=Math.cos(r),a=t[0],s=t[1],o=t[2],c=t[3],l=t[4],u=t[5],d=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+l*i,e[1]=s*n+u*i,e[2]=o*n+d*i,e[3]=c*n+h*i,e[4]=l*n-a*i,e[5]=u*n-s*i,e[6]=d*n-o*i,e[7]=h*n-c*i,e}function O(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function v(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _(e,t,r){let i,a,s,o=r[0],c=r[1],l=r[2],u=Math.sqrt(o*o+c*c+l*l);return u<n["a"]?null:(u=1/u,o*=u,c*=u,l*=u,i=Math.sin(t),a=Math.cos(t),s=1-a,e[0]=o*o*s+a,e[1]=c*o*s+l*i,e[2]=l*o*s-c*i,e[3]=0,e[4]=o*c*s-l*i,e[5]=c*c*s+a,e[6]=l*c*s+o*i,e[7]=0,e[8]=o*l*s+c*i,e[9]=c*l*s-o*i,e[10]=l*l*s+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function j(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function w(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function x(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function T(e,t,r){const i=t[0],n=t[1],a=t[2],s=t[3],o=i+i,c=n+n,l=a+a,u=i*o,d=i*c,h=i*l,p=n*c,f=n*l,b=a*l,m=s*o,g=s*c,y=s*l;return e[0]=1-(p+b),e[1]=d+y,e[2]=h-g,e[3]=0,e[4]=d-y,e[5]=1-(u+b),e[6]=f+m,e[7]=0,e[8]=h+g,e[9]=f-m,e[10]=1-(u+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function S(e,t){const r=E,i=-t[0],n=-t[1],a=-t[2],s=t[3],o=t[4],c=t[5],l=t[6],u=t[7],d=i*i+n*n+a*a+s*s;return d>0?(r[0]=2*(o*s+u*i+c*a-l*n)/d,r[1]=2*(c*s+u*n+l*i-o*a)/d,r[2]=2*(l*s+u*a+o*n-c*i)/d):(r[0]=2*(o*s+u*i+c*a-l*n),r[1]=2*(c*s+u*n+l*i-o*a),r[2]=2*(l*s+u*a+o*n-c*i)),T(e,t,r),e}const E=Object(i["f"])();function A(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function C(e,t){const r=t[0],i=t[1],n=t[2],a=t[4],s=t[5],o=t[6],c=t[8],l=t[9],u=t[10];return e[0]=Math.sqrt(r*r+i*i+n*n),e[1]=Math.sqrt(a*a+s*s+o*o),e[2]=Math.sqrt(c*c+l*l+u*u),e}function R(e,t){const r=t[0]+t[5]+t[10];let i=0;return r>0?(i=2*Math.sqrt(r+1),e[3]=.25*i,e[0]=(t[6]-t[9])/i,e[1]=(t[8]-t[2])/i,e[2]=(t[1]-t[4])/i):t[0]>t[5]&&t[0]>t[10]?(i=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/i,e[0]=.25*i,e[1]=(t[1]+t[4])/i,e[2]=(t[8]+t[2])/i):t[5]>t[10]?(i=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/i,e[0]=(t[1]+t[4])/i,e[1]=.25*i,e[2]=(t[6]+t[9])/i):(i=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/i,e[0]=(t[8]+t[2])/i,e[1]=(t[6]+t[9])/i,e[2]=.25*i),e}function M(e,t,r,i){const n=t[0],a=t[1],s=t[2],o=t[3],c=n+n,l=a+a,u=s+s,d=n*c,h=n*l,p=n*u,f=a*l,b=a*u,m=s*u,g=o*c,y=o*l,O=o*u,v=i[0],_=i[1],j=i[2];return e[0]=(1-(f+m))*v,e[1]=(h+O)*v,e[2]=(p-y)*v,e[3]=0,e[4]=(h-O)*_,e[5]=(1-(d+m))*_,e[6]=(b+g)*_,e[7]=0,e[8]=(p+y)*j,e[9]=(b-g)*j,e[10]=(1-(d+f))*j,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function P(e,t,r,i,n){const a=t[0],s=t[1],o=t[2],c=t[3],l=a+a,u=s+s,d=o+o,h=a*l,p=a*u,f=a*d,b=s*u,m=s*d,g=o*d,y=c*l,O=c*u,v=c*d,_=i[0],j=i[1],w=i[2],x=n[0],T=n[1],S=n[2],E=(1-(b+g))*_,A=(p+v)*_,C=(f-O)*_,R=(p-v)*j,M=(1-(h+g))*j,P=(m+y)*j,I=(f+O)*w,D=(m-y)*w,L=(1-(h+b))*w;return e[0]=E,e[1]=A,e[2]=C,e[3]=0,e[4]=R,e[5]=M,e[6]=P,e[7]=0,e[8]=I,e[9]=D,e[10]=L,e[11]=0,e[12]=r[0]+x-(E*x+R*T+I*S),e[13]=r[1]+T-(A*x+M*T+D*S),e[14]=r[2]+S-(C*x+P*T+L*S),e[15]=1,e}function I(e,t){const r=t[0],i=t[1],n=t[2],a=t[3],s=r+r,o=i+i,c=n+n,l=r*s,u=i*s,d=i*o,h=n*s,p=n*o,f=n*c,b=a*s,m=a*o,g=a*c;return e[0]=1-d-f,e[1]=u+g,e[2]=h-m,e[3]=0,e[4]=u-g,e[5]=1-l-f,e[6]=p+b,e[7]=0,e[8]=h+m,e[9]=p-b,e[10]=1-l-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function D(e,t,r,i,n,a,s){const o=1/(r-t),c=1/(n-i),l=1/(a-s);return e[0]=2*a*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*c,e[6]=0,e[7]=0,e[8]=(r+t)*o,e[9]=(n+i)*c,e[10]=(s+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=s*a*2*l,e[15]=0,e}function L(e,t,r,i,n){const a=1/Math.tan(t/2);let s;return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=n&&n!==1/0?(s=1/(i-n),e[10]=(n+i)*s,e[14]=2*n*i*s):(e[10]=-1,e[14]=-2*i),e}function N(e,t,r,i){const n=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),s=Math.tan(t.leftDegrees*Math.PI/180),o=Math.tan(t.rightDegrees*Math.PI/180),c=2/(s+o),l=2/(n+a);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(s-o)*c*.5,e[9]=(n-a)*l*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}function F(e,t,r,i,n,a,s){const o=1/(t-r),c=1/(i-n),l=1/(a-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+r)*o,e[13]=(n+i)*c,e[14]=(s+a)*l,e[15]=1,e}function k(e,t,r,i){let a,s,c,l,u,d,h,p,f,b;const m=t[0],g=t[1],y=t[2],O=i[0],v=i[1],_=i[2],j=r[0],w=r[1],x=r[2];return Math.abs(m-j)<n["a"]&&Math.abs(g-w)<n["a"]&&Math.abs(y-x)<n["a"]?o(e):(h=m-j,p=g-w,f=y-x,b=1/Math.sqrt(h*h+p*p+f*f),h*=b,p*=b,f*=b,a=v*f-_*p,s=_*h-O*f,c=O*p-v*h,b=Math.sqrt(a*a+s*s+c*c),b?(b=1/b,a*=b,s*=b,c*=b):(a=0,s=0,c=0),l=p*c-f*s,u=f*a-h*c,d=h*s-p*a,b=Math.sqrt(l*l+u*u+d*d),b?(b=1/b,l*=b,u*=b,d*=b):(l=0,u=0,d=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=s,e[5]=u,e[6]=p,e[7]=0,e[8]=c,e[9]=d,e[10]=f,e[11]=0,e[12]=-(a*m+s*g+c*y),e[13]=-(l*m+u*g+d*y),e[14]=-(h*m+p*g+f*y),e[15]=1,e)}function U(e,t,r,i){const n=t[0],a=t[1],s=t[2],o=i[0],c=i[1],l=i[2];let u=n-r[0],d=a-r[1],h=s-r[2],p=u*u+d*d+h*h;p>0&&(p=1/Math.sqrt(p),u*=p,d*=p,h*=p);let f=c*h-l*d,b=l*u-o*h,m=o*d-c*u;return p=f*f+b*b+m*m,p>0&&(p=1/Math.sqrt(p),f*=p,b*=p,m*=p),e[0]=f,e[1]=b,e[2]=m,e[3]=0,e[4]=d*m-h*b,e[5]=h*f-u*m,e[6]=u*b-d*f,e[7]=0,e[8]=u,e[9]=d,e[10]=h,e[11]=0,e[12]=n,e[13]=a,e[14]=s,e[15]=1,e}function z(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function B(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)}function V(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function G(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function H(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function q(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e[9]=t[9]+r[9]*i,e[10]=t[10]+r[10]*i,e[11]=t[11]+r[11]*i,e[12]=t[12]+r[12]*i,e[13]=t[13]+r[13]*i,e[14]=t[14]+r[14]*i,e[15]=t[15]+r[15]*i,e}function W(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function $(e,t){if(e===t)return!0;const r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],c=e[5],l=e[6],u=e[7],d=e[8],h=e[9],p=e[10],f=e[11],b=e[12],m=e[13],g=e[14],y=e[15],O=t[0],v=t[1],_=t[2],j=t[3],w=t[4],x=t[5],T=t[6],S=t[7],E=t[8],A=t[9],C=t[10],R=t[11],M=t[12],P=t[13],I=t[14],D=t[15];return Math.abs(r-O)<=n["a"]*Math.max(1,Math.abs(r),Math.abs(O))&&Math.abs(i-v)<=n["a"]*Math.max(1,Math.abs(i),Math.abs(v))&&Math.abs(a-_)<=n["a"]*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(s-j)<=n["a"]*Math.max(1,Math.abs(s),Math.abs(j))&&Math.abs(o-w)<=n["a"]*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(c-x)<=n["a"]*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(l-T)<=n["a"]*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(u-S)<=n["a"]*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(d-E)<=n["a"]*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(h-A)<=n["a"]*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(p-C)<=n["a"]*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(f-R)<=n["a"]*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(b-M)<=n["a"]*Math.max(1,Math.abs(b),Math.abs(M))&&Math.abs(m-P)<=n["a"]*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-I)<=n["a"]*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-D)<=n["a"]*Math.max(1,Math.abs(y),Math.abs(D))}function Z(e){const t=n["a"],r=e[0],i=e[1],a=e[2],s=e[4],o=e[5],c=e[6],l=e[8],u=e[9],d=e[10];return Math.abs(1-(r*r+s*s+l*l))<=t&&Math.abs(1-(i*i+o*o+u*u))<=t&&Math.abs(1-(a*a+c*c+d*d))<=t}const X=h,Y=G;Object.freeze({__proto__:null,copy:a,set:s,identity:o,transpose:c,invert:l,adjoint:u,determinant:d,multiply:h,translate:p,scale:f,rotate:b,rotateX:m,rotateY:g,rotateZ:y,fromTranslation:O,fromScaling:v,fromRotation:_,fromXRotation:j,fromYRotation:w,fromZRotation:x,fromRotationTranslation:T,fromQuat2:S,getTranslation:A,getScaling:C,getRotation:R,fromRotationTranslationScale:M,fromRotationTranslationScaleOrigin:P,fromQuat:I,frustum:D,perspective:L,perspectiveFromFieldOfView:N,ortho:F,lookAt:k,targetTo:U,str:z,frob:B,add:V,subtract:G,multiplyScalar:H,multiplyScalarAndAdd:q,exactEquals:W,equals:$,isOrthoNormal:Z,mul:X,sub:Y})},d7f2:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("aefa");class n{constructor(e,t){this._storage=new i["c"],this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t){this._storage.put(e,t,1,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}}},d7f7:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("b7c2");class n{constructor(e){this._material=e.material,this._techniqueRep=e.techniqueRep,this._output=e.output}dispose(){this._techniqueRep.release(this._technique)}get technique(){return this._technique}ensureTechnique(e,t,r=this._output){return this._technique=this._techniqueRep.releaseAndAcquire(e,this._material.getTechniqueConfig(r,t),this._technique),this._technique}ensureResources(e){return i["j"].LOADED}}},d81c:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("fa8a");const n=Object(i["b"])()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},d822:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("deae2"),n=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},a=function(e,t){for(var r=0,i=e.length;r<i;r++){var s=e[r];Array.isArray(s)?a(s,t):null!=s&&!1!==s&&(s.hasOwnProperty("vnodeSelector")||(s=n(s)),t.push(s))}},s=function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var n=[];return a(r,n),{vnodeSelector:e,properties:t||void 0,children:n,text:void 0,domNode:null}};function o(e,t,...r){return"function"!=typeof e||Object(i["b"])(e)?s(e,t,...r):e(t,...r)}},d8b2:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var i=r("f7be"),n=r("2eab"),a=r("e041"),s=r("e38c"),o=r("c8d6");function c(e){const t=e.toJSON();return t.attachmentTypes&&(t.attachmentTypes=t.attachmentTypes.join(",")),t.keywords&&(t.keywords=t.keywords.join(",")),t.globalIds&&(t.globalIds=t.globalIds.join(",")),t.objectIds&&(t.objectIds=t.objectIds.join(",")),t.size&&(t.size=t.size.join(",")),t}function l(e,t){const r={};for(const n of e){const{parentObjectId:e,parentGlobalId:s,attachmentInfos:c}=n;for(const n of c){const{id:c}=n,l=Object(a["b"])(Object(i["a"])(`${t}/${e}/attachments/${c}`)),u=o["a"].fromJSON(n);u.set({url:l,parentObjectId:e,parentGlobalId:s}),r[e]?r[e].push(u):r[e]=[u]}}return r}function u(e,t,r){let i={query:Object(s["a"])({...e.query,f:"json",...c(t)})};return r&&(i={...r,...i,query:{...r.query,...i.query}}),Object(n["default"])(e.path+"/queryAttachments",i)}},d8be:function(e,t,r){},d981:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n}));var i=r("3886");function n(e){e.fragment.code.add(i["a"]`float normals2FoamIntensity(vec3 n, float waveStrength){
  3696. float normalizationFactor = max(0.015, waveStrength);
  3697. return max((n.x + n.y)*0.3303545/normalizationFactor + 0.3303545, 0.0);
  3698. }`)}function a(e){e.fragment.code.add(i["a"]`vec3 foamIntensity2FoamColor(float foamIntensityExternal, float foamPixelIntensity, vec3 skyZenitColor, float dayMod){
  3699. return foamIntensityExternal * (0.075 * skyZenitColor * pow(foamPixelIntensity, 4.) + 50.* pow(foamPixelIntensity, 23.0)) * dayMod;
  3700. }`)}},d9fd:function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var i,n=r("a4ee"),a=r("9d1d"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("fa8a"),l=r("6a0ed");const u=new c["a"]({asc:"ascending",desc:"descending"});let d=i=class extends l["a"]{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],d.prototype,"field",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),Object(n["a"])([Object(s["b"])({type:u.apiValues,json:{read:u.read,write:u.write}})],d.prototype,"order",void 0),d=i=Object(n["a"])([Object(o["a"])("esri.layers.support.OrderByInfo")],d);const h=d;function p(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new h;return n.read(i,r),[n]}function f(e,t,r,i){const n=e.find(e=>!!e.field);n&&Object(a["c"])(r,[n.toJSON()],t)}const b=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return Object(n["a"])([Object(s["b"])({type:[h],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:p},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=Object(n["a"])([Object(o["a"])("esri.layers.mixins.OrderedLayer")],t),t}},da00:function(e,t,r){"use strict";r.d(t,"a",(function(){return I}));var i,n=r("a4ee"),a=r("1fd7"),s=r("ce50"),o=r("7ffa"),c=r("e92d"),l=r("b2b2"),u=r("9d1d"),d=r("59b2"),h=r("1a3e"),p=r("448d"),f=r("afcf"),b=r("d386"),m=r("09db"),g=r("0f1c"),y=r("cea0"),O=r("c1da"),v=r("0224"),_=r("667b"),j=r("be4d"),w=r("82e4"),x=r("d611"),T=r("99f3"),S=r("82fa"),E=r("fcf2"),A=r("343a"),C=r("ddc2");const R=c["a"].getLogger("esri.renderers.UniqueValueRenderer"),M=Object(y["m"])(T["a"]);let P=i=class extends(Object(j["a"])(_["a"])){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this.type="unique-value",this.backgroundFillSymbol=null,this.field=null,this.field2=null,this.field3=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.fieldDelimiter=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let r=!1;const i={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let n=0;n<t.length;n++){const a=e.find(e=>e.value===t[n].value);a?Object(g["a"])(a,t[n])?(i.changed.push({type:"complete",oldValue:a,newValue:t[n]}),r=!0):i.unchanged.push({oldValue:a,newValue:t[n]}):(i.added.push(t[n]),r=!0)}for(let n=0;n<e.length;n++)t.find(t=>t.value===e[n].value)||(i.removed.push(e[n]),r=!0);return r?i:void 0}},this._set("uniqueValueInfos",[])}get _cache(){return{compiledFunc:null}}castField(e){return null==e||"function"==typeof e?e:Object(y["l"])(e)}writeField(e,t,r,i){"string"==typeof e?t[r]=e:i&&i.messages?i.messages.push(new s["a"]("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):R.error(".field: cannot write field to JSON since it's not a string value")}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}readPortal(e,t,r){return r.portal||v["a"].getDefault()}readStyleOrigin(e,t,r){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=Object(E["b"])(t.styleUrl,r);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,r,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=Object(E["f"])(e.styleUrl,i))}set uniqueValueInfos(e){this.styleOrigin?R.error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void R.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let r;r="object"==typeof e?M(e):new T["a"]({value:e,symbol:Object(a["a"])(t)}),this.uniqueValueInfos.push(r),this._valueInfoMap[r.value]=r}removeUniqueValueInfo(e){if(this.styleOrigin)R.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");else for(let t=0;t<this.uniqueValueInfos.length;t++)if(this.uniqueValueInfos[t].value===e+""){delete this._valueInfoMap[e],this.uniqueValueInfos.splice(t,1);break}}async getUniqueValueInfo(e,t){let r=t;return this.valueExpression&&(Object(l["j"])(t)||Object(l["j"])(t.arcade))&&(r={...r,arcade:await Object(S["e"])()}),this._getUniqueValueInfo(e,r)}getSymbol(e,t){if(this.valueExpression&&(Object(l["j"])(t)||Object(l["j"])(t.arcade)))return void R.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const r=this._getUniqueValueInfo(e,t);return r&&r.symbol||this.defaultSymbol}async getSymbolAsync(e,t){let r=t;if(this.valueExpression&&(Object(l["j"])(r)||Object(l["j"])(r.arcade))){const e=await Object(S["e"])(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),r={...r,arcade:e}}const i=this._getUniqueValueInfo(e,r);return i&&i.symbol||this.defaultSymbol}getSymbols(){const e=[];for(const t of this.uniqueValueInfos)t.symbol&&e.push(t.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){return`${JSON.stringify(this.backgroundFillSymbol)}.${JSON.stringify(this.defaultSymbol)}.${this.uniqueValueInfos.reduce((e,t)=>e+t.getMeshHash(),"")}.${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}.${this.valueExpression}`}clone(){const e=new i({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:Object(o["a"])(this.defaultSymbol),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:Object(o["a"])(this.visualVariables),legendOptions:Object(o["a"])(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:Object(o["a"])(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=Object(o["a"])(this.uniqueValueInfos);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(Object(o["a"])(this.styleOrigin))),Object.freeze(t)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const r=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(r)}async collectSymbolFields(e,t){const r=[...this.getSymbols().map(r=>r.collectRequiredFields(e,t)),Object(O["a"])(e,t,this.valueExpression)];Object(O["d"])(e,t,this.field),Object(O["d"])(e,t,this.field2),Object(O["d"])(e,t,this.field3),await Promise.all(r)}populateFromStyle(){return Object(A["b"])(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e&&e.data&&Array.isArray(e.data.items)&&e.data.items.forEach(r=>{const i=new C["a"]({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:r.name});this.defaultSymbol||r.name!==e.data.defaultItem||(this.defaultSymbol=i,this._isDefaultSymbolDerived=!0);const n=new T["a"]({value:r.name,symbol:i});t.push(n),this._valueInfoMap[r.name]=n}),this._set("uniqueValueInfos",Object.freeze(t)),!this.defaultSymbol&&this.uniqueValueInfos.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateValueInfoMap(){this._valueInfoMap={},this.uniqueValueInfos.forEach(e=>this._valueInfoMap[e.value+""]=e)}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:r,scale:i,spatialReference:n,arcade:a}=Object(l["u"])(t,{});let s=this._cache.compiledFunc;const o=Object(l["t"])(a).arcadeUtils;if(!s){const e=o.createSyntaxTree(this.valueExpression);s=o.createFunction(e),this._cache.compiledFunc=s}const c=o.executeFunction(s,o.createExecContext(e,o.getViewInfo({viewingMode:r,scale:i,spatialReference:n})));return this._valueInfoMap[c+""]}_getUnqiueValueInfoForFields(e){const t=this.field,r=e.attributes;let i;if("function"!=typeof t&&this.field2){const e=this.field2,n=this.field3,a=[];t&&a.push(r[t]),e&&a.push(r[e]),n&&a.push(r[n]),i=a.join(this.fieldDelimiter||"")}else"function"==typeof t?i=t(e):t&&(i=r[t]);return this._valueInfoMap[i+""]}static fromPortalStyle(e,t){const r=new i(t&&t.properties);r._set("styleOrigin",Object.freeze({styleName:e})),r._set("portal",t&&t.portal||v["a"].getDefault());const n=r.populateFromStyle();return n.catch(t=>{R.error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),n}static fromStyleUrl(e,t){const r=new i(t&&t.properties);r._set("styleOrigin",Object.freeze({styleUrl:e}));const n=r.populateFromStyle();return n.catch(t=>{R.error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),n}};Object(n["a"])([Object(d["b"])({readOnly:!0})],P.prototype,"_cache",null),Object(n["a"])([Object(p["a"])({uniqueValue:"unique-value"})],P.prototype,"type",void 0),Object(n["a"])([Object(d["b"])(w["a"])],P.prototype,"backgroundFillSymbol",void 0),Object(n["a"])([Object(d["b"])({json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],P.prototype,"field",void 0),Object(n["a"])([Object(h["a"])("field")],P.prototype,"castField",null),Object(n["a"])([Object(m["a"])("field")],P.prototype,"writeField",null),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],P.prototype,"field2",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],P.prototype,"field3",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],P.prototype,"valueExpression",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],P.prototype,"valueExpressionTitle",void 0),Object(n["a"])([Object(d["b"])({type:x["a"],json:{write:!0}})],P.prototype,"legendOptions",void 0),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],P.prototype,"defaultLabel",void 0),Object(n["a"])([Object(d["b"])(Object(u["a"])({...w["b"]},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],P.prototype,"defaultSymbol",null),Object(n["a"])([Object(d["b"])({type:String,json:{write:!0}})],P.prototype,"fieldDelimiter",void 0),Object(n["a"])([Object(d["b"])({type:v["a"],readOnly:!0})],P.prototype,"portal",void 0),Object(n["a"])([Object(f["a"])("portal",["styleName"])],P.prototype,"readPortal",null),Object(n["a"])([Object(d["b"])({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],P.prototype,"styleOrigin",void 0),Object(n["a"])([Object(f["a"])("styleOrigin",["styleName","styleUrl"])],P.prototype,"readStyleOrigin",null),Object(n["a"])([Object(m["a"])("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],P.prototype,"writeStyleOrigin",null),Object(n["a"])([Object(d["b"])({type:[T["a"]],json:{write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],P.prototype,"uniqueValueInfos",null),P=i=Object(n["a"])([Object(b["a"])("esri.renderers.UniqueValueRenderer")],P);const I=P},da1c:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return f}));var i=r("38a4"),n=r("3c9c");function a(e,t){return new b(e,m,t)}function s(e,t){const{curvatureDependent:r,scaleStart:i,scaleFallOffRange:n}=m;return new b(e,{curvatureDependent:{min:{curvature:r.min.curvature,tiltAngle:r.min.tiltAngle,scaleFallOffFactor:g.curvatureDependent.min.scaleFallOffFactor},max:{curvature:r.max.curvature,tiltAngle:r.max.tiltAngle,scaleFallOffFactor:g.curvatureDependent.max.scaleFallOffFactor}},scaleStart:i,scaleFallOffRange:n,minPixelSize:g.minPixelSize},t)}function o(e){return Math.abs(e*e*e)}function c(e,t,r){const i=r.parameters,n=r.paddingPixelsOverride;return O.scale=Math.min(i.divisor/(t-i.offset),1),O.factor=o(e),O.minPixelSize=i.minPixelSize,O.paddingPixels=n,O}function l(e,t){return 0===e?t.minPixelSize:t.minPixelSize*(1+2*t.paddingPixels/e)}function u(e,t){return Math.max(Object(i["l"])(e*t.scale,e,t.factor),l(e,t))}function d(e,t,r){const i=c(e,t,r);return i.minPixelSize=0,i.paddingPixels=0,u(1,i)}function h(e,t,r,i){i.scale=d(e,t,r),i.factor=0,i.minPixelSize=r.parameters.minPixelSize,i.paddingPixels=r.paddingPixelsOverride}function p(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,l(e[1],t)/Math.max(1e-5,e[1])),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function f(e,t,r,i){return u(e,c(t,r,i))}class b{constructor(e,t,r,i=y(),a){this.viewingMode=e,this.description=t,this.ellipsoidRadius=r,this.parameters=i,this._paddingPixelsOverride=a,this.viewingMode===n["a"].Local?(this.coverageCompensation=this._surfaceCoverageCompensationLocal,this.calculateCurvatureDependentParameters=this._calculateCurvatureDependentParametersLocal):(this.coverageCompensation=this._surfaceCoverageCompensationGlobal,this.calculateCurvatureDependentParameters=this._calculateCurvatureDependentParametersGlobal)}get paddingPixelsOverride(){return this._paddingPixelsOverride||this.parameters.paddingPixels}update(e){return(!this.parameters||this.parameters.camera.fovY!==e.fovY||this.parameters.camera.distance!==e.distance)&&(this._calculateParameters(e,this.ellipsoidRadius,this.parameters),!0)}overridePadding(e){return e!==this.paddingPixelsOverride?new b(this.viewingMode,this.description,this.ellipsoidRadius,this.parameters,e):this}_calculateParameters(e,t,r){const{scaleStart:i,scaleFallOffRange:n,minPixelSize:a}=this.description,{fovY:s,distance:o}=e,c=this.calculateCurvatureDependentParameters(e,t),l=this.coverageCompensation(e,t,c),{tiltAngle:u,scaleFallOffFactor:d}=c,h=Math.sin(u)*o,p=.5*Math.PI-u-s*(.5-i*l),f=h/Math.cos(p),b=p+s*n*l,m=(f-d*(h/Math.cos(b)))/(1-d);return r.camera.fovY=e.fovY,r.camera.distance=e.distance,r.offset=m,r.divisor=f-m,r.minPixelSize=a,r}_calculateCurvatureDependentParametersLocal(e,t,r=v){return r.tiltAngle=this.description.curvatureDependent.min.tiltAngle,r.scaleFallOffFactor=this.description.curvatureDependent.min.scaleFallOffFactor,r}_calculateCurvatureDependentParametersGlobal(e,t,r=v){const n=this.description.curvatureDependent,a=1+e.distance/t,s=Math.sqrt(a*a-1),[o,c]=[n.min.curvature,n.max.curvature],l=Object(i["f"])((s-o)/(c-o),0,1),[u,d]=[n.min,n.max];return r.tiltAngle=Object(i["l"])(u.tiltAngle,d.tiltAngle,l),r.scaleFallOffFactor=Object(i["l"])(u.scaleFallOffFactor,d.scaleFallOffFactor,l),r}_surfaceCoverageCompensationLocal(e,t,r){return(e.fovY-r.tiltAngle)/e.fovY}_surfaceCoverageCompensationGlobal(e,t,r){const i=t*t,n=r.tiltAngle+.5*Math.PI,{fovY:a,distance:s}=e,o=s*s+i-2*Math.cos(n)*s*t,c=Math.sqrt(o),l=Math.sqrt(o-i);return(Math.acos(l/c)-Math.asin(t/(c/Math.sin(n)))+.5*a)/a}}const m={curvatureDependent:{min:{curvature:Object(i["h"])(10),tiltAngle:Object(i["h"])(12),scaleFallOffFactor:.5},max:{curvature:Object(i["h"])(70),tiltAngle:Object(i["h"])(40),scaleFallOffFactor:.8}},scaleStart:.3,scaleFallOffRange:.65,minPixelSize:0},g={curvatureDependent:{min:{scaleFallOffFactor:.7},max:{scaleFallOffFactor:.95}},minPixelSize:14};function y(){return{camera:{distance:0,fovY:0},divisor:0,offset:0,minPixelSize:0,paddingPixels:0}}const O={scale:0,factor:0,minPixelSize:0,paddingPixels:0},v={tiltAngle:0,scaleFallOffFactor:0}},da35:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));class i{constructor(){this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits?this._parameterBits.map(()=>0):[],this._parameterNames||(this._parameterNames=[])}get key(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}snapshot(){const e=this._parameterNames,t={key:this.key};for(const r of e)t[r]=this[r];return t}}function n(e={}){return(t,r)=>{var i,n;t._parameterNames=null!=(i=t._parameterNames)?i:[],t._parameterNames.push(r);const a=t._parameterNames.length-1,s=e.count||2,o=Math.ceil(Math.log2(s)),c=null!=(n=t._parameterBits)?n:[0];let l=0;for(;c[l]+o>16;)l++,l>=c.length&&c.push(0);t._parameterBits=c;const u=c[l],d=(1<<o)-1<<u;c[l]+=o,Object.defineProperty(t,r,{get(){return this[a]},set(e){if(this[a]!==e&&(this[a]=e,this._keyDirty=!0,this._parameterBits[l]=this._parameterBits[l]&~d|+e<<u&d,"number"!=typeof e&&"boolean"!=typeof e))throw"Configuration value for "+r+" must be boolean or number, got "+typeof e}})}}},dae5:function(e,t,r){"use strict";function i(){return[1,0,0,0,1,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]}function a(e,t,r,i,n,a,s,o,c){return[e,t,r,i,n,a,s,o,c]}function s(e,t){return new Float64Array(e,t,9)}r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s})},db21:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return s}));const i=!0,n=32,a=1.5,s=200},db52:function(e,t,r){"use strict";r.d(t,"a",(function(){return x}));var i=r("a4ee"),n=r("fa8a"),a=r("7ffa"),s=r("a915"),o=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=(r("b50f"),r("c120"),r("0d93"));let d=class extends u["a"]{constructor(e){super(e),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};Object(i["a"])([Object(c["a"])({esriSLS:"simple-line"},{readOnly:!0})],d.prototype,"type",void 0),Object(i["a"])([Object(o["b"])({type:Number,cast:s["j"],json:{write:!0}})],d.prototype,"width",void 0),d=Object(i["a"])([Object(l["a"])("esri.symbols.LineSymbol")],d);const h=d;var p,f=r("9ef0"),b=r("6a0ed"),m=r("afcf"),g=r("09db"),y=r("ea87");let O=p=class extends b["a"]{constructor(e){super(e),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(e,t,r,i){"web-map"===(null==i?void 0:i.origin)?t[r]="arrow":t[r]=e}set color(e){this._set("color",e)}readColor(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}writeColor(e,t,r,i){"web-map"===(null==i?void 0:i.origin)||(t[r]=e)}clone(){return new p({color:Object(a["a"])(this.color),placement:this.placement,style:this.style})}hash(){var e;return`${this.placement}.${null==(e=this.color)?void 0:e.hash()}.${this.style}`}};Object(i["a"])([Object(o["b"])({type:["begin","end","begin-end"],json:{write:!0}})],O.prototype,"placement",void 0),Object(i["a"])([Object(c["a"])({"line-marker":"line-marker"},{readOnly:!0}),Object(o["b"])({json:{origins:{"web-map":{write:!1}}}})],O.prototype,"type",void 0),Object(i["a"])([Object(o["b"])({type:y["b"]})],O.prototype,"style",void 0),Object(i["a"])([Object(g["a"])("style")],O.prototype,"writeStyle",null),Object(i["a"])([Object(o["b"])({type:f["a"],value:null,json:{write:{allowNull:!0}}})],O.prototype,"color",null),Object(i["a"])([Object(m["a"])("color")],O.prototype,"readColor",null),Object(i["a"])([Object(g["a"])("color")],O.prototype,"writeColor",null),O=p=Object(i["a"])([Object(l["a"])("esri.symbols.LineSymbolMarker")],O);const v=O;var _;const j=new n["a"]({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSInsideFrame:"inside-frame",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let w=_=class extends h{constructor(...e){super(...e),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(e,t,r,i,n,a){if(e&&"string"!=typeof e)return e;const o={};return null!=e&&(o.style=e),null!=t&&(o.color=t),null!=r&&(o.width=Object(s["j"])(r)),null!=i&&(o.cap=i),null!=n&&(o.join=n),null!=a&&(o.miterLimit=Object(s["j"])(a)),o}clone(){var e;return new _({color:Object(a["a"])(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:null==(e=this.marker)?void 0:e.clone()})}hash(){var e,t;return`${super.hash()}.${null==(e=this.color)?void 0:e.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${null==(t=this.marker)?void 0:t.hash()}`}};Object(i["a"])([Object(c["a"])({esriSLS:"simple-line"},{readOnly:!0})],w.prototype,"type",void 0),Object(i["a"])([Object(o["b"])({type:j.apiValues,json:{read:j.read,write:j.write}})],w.prototype,"style",void 0),Object(i["a"])([Object(o["b"])({type:["butt","round","square"],json:{write:{overridePolicy:(e,t,r)=>({enabled:"round"!==e&&(null==r||null==r.origin)})}}})],w.prototype,"cap",void 0),Object(i["a"])([Object(o["b"])({type:["miter","round","bevel"],json:{write:{overridePolicy:(e,t,r)=>({enabled:"round"!==e&&(null==r||null==r.origin)})}}})],w.prototype,"join",void 0),Object(i["a"])([Object(o["b"])({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":v}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],w.prototype,"marker",void 0),Object(i["a"])([Object(o["b"])({type:Number,json:{read:!1,write:!1}})],w.prototype,"miterLimit",void 0),w=_=Object(i["a"])([Object(l["a"])("esri.symbols.SimpleLineSymbol")],w);const x=w},dbad:function(e,t,r){"use strict";r.d(t,"a",(function(){return J})),r.d(t,"b",(function(){return re}));var i=r("b2b2"),n=r("dae5"),a=r("e431"),s=r("0b2d"),o=r("3c9c"),c=r("fc00"),l=r("a05b"),u=r("aab5"),d=r("ebd5"),h=r("b7c2"),p=r("68af"),f=r("35b3"),b=r("7438"),m=r("614d"),g=r("badc"),y=r("b7bd"),O=r("89bf"),v=r("5957"),_=r("7c51"),j=r("a4ee"),w=r("e92d"),x=r("d272"),T=r("d539"),S=r("c332"),E=r("dfaf"),A=r("17b0"),C=r("6a07"),R=r("c6d7"),M=r("a7d7"),P=r("d017"),I=r("be24"),D=r("6a21"),L=r("8e97"),N=r("c3a4"),F=r("ca98"),k=r("da35"),U=r("fa1e"),z=r("c829"),B=r("87b7"),V=r("0310"),G=r("d17d"),H=r("189c");const q=w["a"].getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class W extends F["a"]{initializeProgram(e){const t=W.shader.get(),r=this.configuration,i=t.build({oitEnabled:r.transparencyPassType===h["l"].Color,output:r.output,viewingMode:e.viewingMode,receiveShadows:r.receiveShadows,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:r.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:r.symbolColors,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!0,instanced:r.instanced,instancedColor:r.instancedColor,instancedDoublePrecision:r.instancedDoublePrecision,pbrMode:r.usePBR?r.isSchematic?M["a"].Schematic:M["a"].Normal:M["a"].Disabled,hasMetalnessAndRoughnessTexture:r.hasMetalnessAndRoughnessTexture,hasEmissionTexture:r.hasEmissionTexture,hasOcclusionTexture:r.hasOcclusionTexture,hasNormalTexture:r.hasNormalTexture,hasColorTexture:r.hasColorTexture,hasModelTransformation:r.hasModelTransformation,receiveAmbientOcclusion:r.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:r.normalsTypeDerivate?S["b"].ScreenDerivative:S["b"].Attribute,doubleSidedMode:r.doubleSidedMode,vertexTangents:r.vertexTangents,attributeTextureCoordinates:r.hasMetalnessAndRoughnessTexture||r.hasEmissionTexture||r.hasOcclusionTexture||r.hasNormalTexture||r.hasColorTexture?E["b"].Default:E["b"].None,textureAlphaPremultiplied:r.textureAlphaPremultiplied,attributeColor:r.vertexColors,screenSizePerspectiveEnabled:r.screenSizePerspective,verticalOffsetEnabled:r.verticalOffset,offsetBackfaces:r.offsetBackfaces,doublePrecisionRequiresObfuscation:Object(D["b"])(e.rctx),alphaDiscardMode:r.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new z["a"](e.rctx,i,U["a"])}bindPass(e,t){var r,n;Object(L["b"])(this.program,t.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(Object(i["k"])(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):q.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===l["a"].Depth||t.multipassTerrainEnabled||a===l["a"].Shadow)&&this.program.setUniform2fv("nearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(R["a"])(this.program,t)),a===l["a"].Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",_["b"][e.colorMixMode])),a===l["a"].Color?(t.lighting.setUniforms(this.program,!1,t.hasFillLights),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",_["b"][e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&Object(M["d"])(this.program,e,this.configuration.isSchematic)):a===l["a"].Highlight&&Object(C["b"])(this.program,t),Object(I["c"])(this.program,e),Object(A["b"])(this.program,e,t),Object(_["a"])(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==h["a"].Mask&&e.textureAlphaMode!==h["a"].MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(r=t.shadowMap)||r.bind(this.program),null==(n=t.ssaoHelper)||n.bind(this.program,t.camera)}bindDraw(e){const t=this.configuration.instancedDoublePrecision?Object(s["h"])(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;Object(L["d"])(this.program,t,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===l["a"].Color||this.configuration.output===l["a"].Alpha||this.configuration.output===l["a"].Depth&&this.configuration.screenSizePerspective||this.configuration.output===l["a"].Normal&&this.configuration.screenSizePerspective||this.configuration.output===l["a"].Highlight&&this.configuration.screenSizePerspective)&&Object(L["a"])(this.program,t,e.camera.viewInverseTransposeMatrix),this.configuration.output===l["a"].Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&Object(T["b"])(this.program,t),Object(x["b"])(this.program,this.configuration,e.slicePlane,{origin:t}),this.configuration.output===l["a"].Color&&Object(P["d"])(this.program,e,t)}_convertDepthTestFunction(e){return e===h["e"].Lequal?G["h"].LEQUAL:G["h"].LESS}_setPipeline(e,t){const r=this.configuration,i=e===h["l"].NONE,n=e===h["l"].FrontFace;return Object(H["g"])({blending:r.output!==l["a"].Color&&r.output!==l["a"].Alpha||!r.transparent?null:i?b["d"]:Object(b["f"])(e),culling:$(r)&&Object(H["c"])(r.cullFace),depthTest:{func:Object(b["g"])(e,this._convertDepthTestFunction(r.customDepthTest))},depthWrite:i||n?r.writeDepth&&H["e"]:null,colorWrite:H["d"],stencilWrite:r.sceneHasOcludees?B["j"]:null,stencilTest:r.sceneHasOcludees?t?B["f"]:B["e"]:null,polygonOffset:i||n?null:Object(b["e"])(r.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}function $(e){return e.cullFace?e.cullFace!==h["c"].None:!e.slicePlaneEnabled&&!e.transparent&&!e.doubleSidedMode}W.shader=new N["a"](V["a"],()=>r.e("chunk-2d0cb6c5").then(r.bind(null,"4a35")));class Z extends k["a"]{constructor(){super(...arguments),this.output=l["a"].Color,this.alphaDiscardMode=h["a"].Opaque,this.doubleSidedMode=u["b"].None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=h["c"].None,this.transparencyPassType=h["l"].NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1,this.customDepthTest=h["e"].Less}}Object(j["a"])([Object(k["b"])({count:l["a"].COUNT})],Z.prototype,"output",void 0),Object(j["a"])([Object(k["b"])({count:h["a"].COUNT})],Z.prototype,"alphaDiscardMode",void 0),Object(j["a"])([Object(k["b"])({count:u["b"].COUNT})],Z.prototype,"doubleSidedMode",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"isSchematic",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"vertexColors",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"offsetBackfaces",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"symbolColors",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"vvSize",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"vvColor",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"verticalOffset",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"receiveShadows",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"slicePlaneEnabled",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"sliceHighlightDisabled",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"receiveAmbientOcclusion",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"screenSizePerspective",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"textureAlphaPremultiplied",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"hasColorTexture",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"usePBR",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"hasMetalnessAndRoughnessTexture",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"hasEmissionTexture",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"hasOcclusionTexture",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"hasNormalTexture",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"instanced",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"instancedColor",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"instancedDoublePrecision",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"vertexTangents",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"normalsTypeDerivate",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"writeDepth",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"sceneHasOcludees",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"transparent",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"enableOffset",void 0),Object(j["a"])([Object(k["b"])({count:h["c"].COUNT})],Z.prototype,"cullFace",void 0),Object(j["a"])([Object(k["b"])({count:h["l"].COUNT})],Z.prototype,"transparencyPassType",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"multipassTerrainEnabled",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"cullAboveGround",void 0),Object(j["a"])([Object(k["b"])()],Z.prototype,"hasModelTransformation",void 0),Object(j["a"])([Object(k["b"])({count:h["e"].COUNT})],Z.prototype,"customDepthTest",void 0);var X=r("b0ab");class Y extends W{initializeProgram(e){const t=Y.shader.get(),r=this.configuration,i=t.build({oitEnabled:r.transparencyPassType===h["l"].Color,output:r.output,viewingMode:e.viewingMode,receiveShadows:r.receiveShadows,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:r.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:r.symbolColors,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!0,instanced:r.instanced,instancedColor:r.instancedColor,instancedDoublePrecision:r.instancedDoublePrecision,pbrMode:r.usePBR?M["a"].Normal:M["a"].Disabled,hasMetalnessAndRoughnessTexture:!1,hasEmissionTexture:!1,hasOcclusionTexture:!1,hasNormalTexture:!1,hasColorTexture:r.hasColorTexture,hasModelTransformation:!1,receiveAmbientOcclusion:r.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:S["b"].Attribute,doubleSidedMode:u["b"].WindingOrder,vertexTangents:!1,attributeTextureCoordinates:r.hasColorTexture?E["b"].Default:E["b"].None,textureAlphaPremultiplied:r.textureAlphaPremultiplied,attributeColor:r.vertexColors,screenSizePerspectiveEnabled:r.screenSizePerspective,verticalOffsetEnabled:r.verticalOffset,offsetBackfaces:r.offsetBackfaces,doublePrecisionRequiresObfuscation:Object(D["b"])(e.rctx),alphaDiscardMode:r.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new z["a"](e.rctx,i,U["a"])}}Y.shader=new N["a"](X["a"],()=>r.e("chunk-2d0ab897").then(r.bind(null,"1662")));class J extends f["b"]{constructor(e){super(e,K),this.supportsEdges=!0,this.techniqueConfig=new Z,this.vertexBufferLayout=te(this.parameters),this.instanceBufferLayout=e.instanced?re(this.parameters):null}isVisibleInPass(e){return e!==m["a"].MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==m["a"].MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==m["a"].MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const t=e.instanced,r=e.vertexColors,i=e.symbolColors,n=!!t&&t.indexOf("color")>-1,a=e.vvColorEnabled,s="replace"===e.colorMixMode,o=e.opacity>0,c=e.externalColor&&e.externalColor[3]>0;return r&&(n||a||i)?!!s||o:r?s?c:o:n||a||i?!!s||o:s?c:o}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.hasNormalTexture=!!this.parameters.normalTextureId,this.techniqueConfig.hasColorTexture=!!this.parameters.textureId,this.techniqueConfig.vertexTangents=this.parameters.vertexTangents,this.techniqueConfig.instanced=!!this.parameters.instanced,this.techniqueConfig.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.verticalOffset=null!==this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=null!==this.parameters.screenSizePerspective,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sliceHighlightDisabled=this.parameters.sliceHighlightDisabled,this.techniqueConfig.alphaDiscardMode=this.parameters.textureAlphaMode,this.techniqueConfig.normalsTypeDerivate="screenDerivative"===this.parameters.normals,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,Object(i["k"])(this.parameters.customDepthTest)&&(this.techniqueConfig.customDepthTest=this.parameters.customDepthTest),this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.cullFace=this.parameters.slicePlaneEnabled?h["c"].None:this.parameters.cullFace,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig.hasModelTransformation=Object(i["k"])(this.parameters.modelTransformation),e!==l["a"].Color&&e!==l["a"].Alpha||(this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.symbolColors=this.parameters.symbolColors,this.parameters.treeRendering?this.techniqueConfig.doubleSidedMode=u["b"].WindingOrder:this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u["b"].View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u["b"].WindingOrder:u["b"].None,this.techniqueConfig.instancedColor=!!this.parameters.instanced&&this.parameters.instanced.indexOf("color")>-1,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this.techniqueConfig.receiveAmbientOcclusion=!!t.ssaoEnabled&&this.parameters.receiveSSAO,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this.techniqueConfig.usePBR=this.parameters.usePBR,this.techniqueConfig.hasMetalnessAndRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this.techniqueConfig.hasEmissionTexture=!!this.parameters.emissiveTextureId,this.techniqueConfig.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this.techniqueConfig.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this.techniqueConfig.isSchematic=this.parameters.usePBR&&this.parameters.isSchematic,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<b["b"]),this.techniqueConfig}intersect(e,t,r,i,n,s,c){if(null!==this.parameters.verticalOffset){const e=i.camera;Object(a["y"])(ce,r[12],r[13],r[14]);let t=null;switch(i.viewingMode){case o["a"].Global:t=Object(a["t"])(se,ce);break;case o["a"].Local:t=Object(a["m"])(se,ae)}let c=0;if(null!==this.parameters.verticalOffset){const r=Object(a["l"])(le,ce,e.eye),i=Object(a["r"])(r),n=Object(a["g"])(r,r,1/i);let s=null;this.parameters.screenSizePerspective&&(s=Object(a["j"])(t,n)),c+=Object(_["l"])(e,i,this.parameters.verticalOffset,s,this.parameters.screenSizePerspective)}Object(a["g"])(t,t,c),Object(a["z"])(oe,t,i.transform.inverseRotation),n=Object(a["l"])(ie,n,oe),s=Object(a["l"])(ne,s,oe)}Object(_["i"])(e,t,i,n,s,Object(O["d"])(i.verticalOffset),c)}requiresSlot(e){return e===(this.parameters.transparent?this.parameters.writeDepth?g["a"].TRANSPARENT_MATERIAL:g["a"].TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:g["a"].OPAQUE_MATERIAL)||e===g["a"].DRAPED_MATERIAL}createGLMaterial(e){return e.output===l["a"].Color||e.output===l["a"].Alpha||e.output===l["a"].Depth||e.output===l["a"].Normal||e.output===l["a"].Shadow||e.output===l["a"].Highlight?new Q(e):null}createBufferWriter(){return new ee(this.vertexBufferLayout,this.instanceBufferLayout)}}class Q extends p["a"]{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this.ensureTechnique(t.treeRendering?Y:W,e)}_updateShadowState(e){e.shadowMappingEnabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMappingEnabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==l["a"].Color&&this._output!==l["a"].Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.parameters,e),this.bindTextures(t.program)}}const K={textureId:void 0,initTextureTransparent:!1,isSchematic:!1,usePBR:!1,normalTextureId:void 0,vertexTangents:!1,occlusionTextureId:void 0,emissiveTextureId:void 0,metallicRoughnessTextureId:void 0,emissiveFactor:[0,0,0],mrrFactors:[0,1,.5],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],externalColor:[1,1,1,1],colorMixMode:"multiply",opacity:1,layerOpacity:1,vertexColors:!1,symbolColors:!1,doubleSided:!1,doubleSidedType:"normal",cullFace:h["c"].Back,instanced:void 0,instancedDoublePrecision:!1,normals:"default",receiveSSAO:!0,fillLightsEnabled:!0,receiveShadows:!0,castShadows:!0,shadowMappingEnabled:!1,verticalOffset:null,screenSizePerspective:null,slicePlaneEnabled:!1,sliceHighlightDisabled:!1,offsetTransparentBackfaces:!1,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvSizeValue:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:Object(n["b"])(),modelTransformation:null,transparent:!1,writeDepth:!0,customDepthTest:h["e"].Less,textureAlphaMode:h["a"].Blend,textureAlphaCutoff:d["b"],textureAlphaPremultiplied:!1,sceneHasOcludees:!1,...f["a"]};class ee{constructor(e,t){this.vertexBufferLayout=e,this.instanceBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(y["a"].POSITION).length}write(e,t,r,i){Object(v["d"])(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i)}}function te(e){const t=e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId,r=Object(c["a"])().vec3f(y["a"].POSITION).vec3f(y["a"].NORMAL);return e.vertexTangents&&r.vec4f(y["a"].TANGENT),t&&r.vec2f(y["a"].UV0),e.vertexColors&&r.vec4u8(y["a"].COLOR),e.symbolColors&&r.vec4u8(y["a"].SYMBOLCOLOR),r}function re(e){let t=Object(c["a"])();return t=e.instancedDoublePrecision?t.vec3f(y["a"].MODELORIGINHI).vec3f(y["a"].MODELORIGINLO).mat3f(y["a"].MODEL).mat3f(y["a"].MODELNORMAL):t.mat4f(y["a"].MODEL).mat4f(y["a"].MODELNORMAL),e.instanced&&e.instanced.indexOf("color")>-1&&(t=t.vec4f(y["a"].INSTANCECOLOR)),e.instanced&&e.instanced.indexOf("featureAttribute")>-1&&(t=t.vec4f(y["a"].INSTANCEFEATUREATTRIBUTE)),t}const ie=Object(s["f"])(),ne=Object(s["f"])(),ae=Object(s["h"])(0,0,1),se=Object(s["f"])(),oe=Object(s["f"])(),ce=Object(s["f"])(),le=Object(s["f"])()},dbbf:function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var i=r("f7be"),n=r("ce50"),a=r("9d83"),s=r("b2b2"),o=r("f4cc"),c=r("9c4c"),l=r("49fa");const u={statsWorker:()=>r.e("chunk-e40fb29e").then(r.bind(null,"926b")),geometryEngineWorker:()=>Promise.all([r.e("chunk-2d22cf8c"),r.e("chunk-252da140")]).then(r.bind(null,"0f9c")),CSVSourceWorker:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-9a959fca")]).then(r.bind(null,"d77e")),EdgeProcessingWorker:()=>Promise.resolve().then(r.bind(null,"2273")),ElevationSamplerWorker:()=>r.e("chunk-3ecd40d4").then(r.bind(null,"0959")),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-00dc3a48")]).then(r.bind(null,"615f")),GeoJSONSourceWorker:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-528f064d")]).then(r.bind(null,"054a")),LercWorker:()=>r.e("chunk-2d21021b").then(r.bind(null,"b71a")),MemorySourceWorker:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-cce14d88")]).then(r.bind(null,"1a59")),PBFDecoderWorker:()=>r.e("chunk-2d0a36fb").then(r.bind(null,"01bf")),Pipeline:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-425aac71")]).then(r.bind(null,"0c45")),PointCloudWorker:()=>Promise.all([r.e("chunk-33bd1f4e"),r.e("chunk-2d21405d")]).then(r.bind(null,"aebe")),RasterWorker:()=>Promise.all([r.e("chunk-cfae2ce4"),r.e("chunk-f1516bda")]).then(r.bind(null,"0c00")),SceneLayerWorker:()=>r.e("chunk-579fe43e").then(r.bind(null,"2a00")),WFSSourceWorker:()=>Promise.all([r.e("chunk-2d0d03a7"),r.e("chunk-f09b0350"),r.e("chunk-b3709d6c")]).then(r.bind(null,"727a")),WorkerTileHandler:()=>Promise.all([r.e("chunk-d2111408"),r.e("chunk-d134a92a")]).then(r.bind(null,"54b6"))},{CLOSE:d,ABORT:h,INVOKE:p,RESPONSE:f,OPEN_PORT:b,ON:m}=c["a"];class g{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c["a"].ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new g(e=>this._onInvokeMessage(e)),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const i=new y(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=i),y.clients.set(i,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:d}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const i=r&&r.signal,a=r&&r.transferList;if(!this._port)return Promise.reject(new n["a"]("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const s=Object(c["b"])();return new Promise((r,n)=>{const c=Object(o["r"])(i,()=>{var e;const t=this._outJobs.get(s);t&&(this._outJobs.delete(s),null==(e=t.abortHandle)||e.remove(),this._post({type:h,jobId:s}),n(Object(o["e"])()))}),l={resolve:r,reject:n,abortHandle:c,debugInfo:e};this._outJobs.set(s,l),this._post({type:p,jobId:s,methodName:e,abortable:null!=i},t,a)})}on(e,t){const r=new MessageChannel;function i(e){t(e.data)}return this._port.postMessage({type:c["a"].ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",i),r.port1.start(),{remove(){r.port1.postMessage({type:c["a"].CLOSE}),r.port1.close(),r.port1.removeEventListener("message",i)}}}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach(e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject(Object(o["e"])(`Worker closing, aborting job calling '${e.debugInfo}'`))}),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){Object(s["k"])(this._schedule)?this._schedule(()=>this._processMessage(e)):this._processMessage(e)}_processMessage(e){const t=Object(c["d"])(e);if(t)switch(t.type){case f:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case h:this._onAbortMessage(t);break;case d:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case m:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);this._invokeQueue.push(e),i&&(i.controller&&i.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:n}=e,a=n?new AbortController:null,s=this._inJobs;let l,u=this._client,d=u[t];try{if(!d&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],d=u[e[t+1]]}if("function"!=typeof d)throw new TypeError(t+" is not a function");l=d.call(u,i,{client:this,signal:a?a.signal:null})}catch(h){return void this._post({type:f,jobId:r,error:Object(c["e"])(h)})}Object(o["o"])(l)?(s.set(r,{controller:a,promise:l}),l.then(e=>{s.has(r)&&(s.delete(r),this._post({type:f,jobId:r},e))},e=>{s.has(r)&&(s.delete(r),Object(o["m"])(e)||this._post({type:f,jobId:r,error:Object(c["e"])(e||{message:"Error encountered at method "+t})}))})):this._post({type:f,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,e=>{t.postMessage(e)}),i=Object(a["c"])(e.port,"message",e=>{Object(c["d"])(e).type===c["a"].CLOSE&&(i.remove(),r.remove(),t.close())})}_onResponseMessage(e){var t;const{jobId:r,error:i,data:a}=e,s=this._outJobs;if(!s.has(r))return;const o=s.get(r);s.delete(r),null==(t=o.abortHandle)||t.remove(),i?o.reject(n["a"].fromJSON(JSON.parse(i))):o.resolve(a)}_post(e,t,r){return Object(c["c"])(this._port,e,t,r)}}y.kernelInfo={revision:l["b"],version:i["d"],buildDate:l["a"]},y.clients=new Map},dc56:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return a}));var i=r("c6ac");function n(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride,o=r?r.count:t.count;let c=(r&&r.dstIndex?r.dstIndex:0)*n,l=(r&&r.srcIndex?r.srcIndex:0)*s;for(let u=0;u<o;++u)i[c]=a[l],i[c+1]=a[l+1],c+=n,l+=s}function a(e,t,r){const a=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,c=t.typedBufferStride,l=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*s,d=(r&&r.srcIndex?r.srcIndex:0)*c;if(Object(i["b"])(t.elementType)){const e=Object(i["d"])(t.elementType);if(Object(i["c"])(t.elementType))for(let t=0;t<l;++t)a[u]=Math.max(o[d]/e,-1),a[u+1]=Math.max(o[d+1]/e,-1),u+=s,d+=c;else for(let t=0;t<l;++t)a[u]=o[d]/e,a[u+1]=o[d+1]/e,u+=s,d+=c}else n(e,t,r);return e}function s(e,t,r,i){var n,a;const s=e.typedBuffer,o=e.typedBufferStride,c=null!=(n=null==i?void 0:i.count)?n:e.count;let l=(null!=(a=null==i?void 0:i.dstIndex)?a:0)*o;for(let u=0;u<c;++u)s[l]=t,s[l+1]=r,l+=o}Object.freeze({__proto__:null,copy:n,normalizeIntegerBuffer:a,fill:s})},dd0e:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.INVISIBLE=0]="INVISIBLE",e[e.TRANSPARENT=1]="TRANSPARENT",e[e.OPAQUE=2]="OPAQUE"}(i||(i={}))},dd41:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENjk5QUIzMEM5RDExMUVCOTg5QUE0QzlCODM5NTEzMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENjk5QUIzMUM5RDExMUVCOTg5QUE0QzlCODM5NTEzMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQ2OTlBQjJFQzlEMTExRUI5ODlBQTRDOUI4Mzk1MTMwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQ2OTlBQjJGQzlEMTExRUI5ODlBQTRDOUI4Mzk1MTMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nndhxAAABoRJREFUeNrUWWtMU2cYfr9zTs85LaWUSwuUAnIrXgABZYY5mZeYLZlx05K4JfuzqYs/lOluJstcsgyXmZA53ZYZs2TRxWSbdNMY4zQj6vAyFS8zoIJcpZQCLci9l3PZe4rMS2YUpEC/pPna93t78vB8z3srIMsyTPRrY8bqrGA8V3lREIRF+8EKQVpBAazyk4UhBZj1kDkhBZjxEf0mizUhdCThA55IMDd0GPYTipJgdkgARilY1AwPlEgyQgIwSiGdZzkEDMkhARilkKnhNUALEBcqDCfyLA+MQAyhwbBIkjW8GgMPdEEJ6AkvyyIYOIVhH1GP2t5Ns75JC2Sxn5M/+6bO1jrNGAajomGVj9AbM60xH5mKz8U3MT+9qJu71thKN2IWiZ9eDAtEp2QJnubAYJcdC5csVs1f+DzQPQJ07G1juqSu+eh2ZBoBBl2Toxm8fi+s/uAt1czcHBAc/XCy/DA0M267RMPxaSOJkgxrVlgfFeYY7IRZLy0AbUxEwH6q/ChUtlY19kVLad/W2nzPlIWUpngiFuqVjXLS7mXFK7SW/Gxwnq+DP38+BLOLCqCy5tyNAb2cjWClaZHWlM4ssoty6AYY7fw3loMhJQEyEbQsyfBP5QUYCpdLJwLshDC8KcNaFN1On0hVm7ikV/KAjwgDT0cvCK4hqKmsgoJZ8+BU9Vm5K1HYvrPJtm1KAWN+XW+w03teyHiOcvW6ocHeCB6N7NV4aE55rpeTxHxTFm02JsCxCyfAZRKPltnLV0wJ4PeSrd8b7MyGpblF0OK8A9UDjQO9MdIWzALnLE59jeQXoN48kMMNk+1RndSKgtQ84vF54OxgTS3qOR8lMjQpGsbgorAY/BV7h9mQM2MOHL912n9eVV/WHSdF7Gqw/UBkSODUHLAcq7iHI6Mr22eIMyvuXq6uab4Fi7TZmZGdlH2jxZoWdMAINkrXTTUt4rMWCSpZOum7fqjTLEbtbLZ9OBpU2PyYeLUaWCweCD7QsWE5rvvSWZ7tSBVWnu+pds1ikyINbfRNTIPLgwYYM0FOtJO6E95NJZ0Zrq5yzhBTy1rLVyHQgYc1BrGcmkeGOaXVND54trvedqS0+6DhoqZ5GxCQYlvo45tTrSUTDrgk3boa+4DLfhZc7alC4Y728gJkreUx7aWB4xEwi5KQIeb/fL5uspV2JYj67ljp1xgHvfP9pOJ9E1aat6RYPw/vo9ZjhK9DjT7xwZREDJyGB8kjABmGqMf54c14cHsdb26rpp+UY1ycwXy9GO3CuAFvTrF+gldMtrsPPvX0gAxHKpIQWR9Qg0T/JP97N1WAel7Gesh3+Ad8iraOMQNWWkNgoeweE2MZkSJ5BCywHkXP+qf93u7btgrcKhBw8rgYRqCucY5IOoVhL2pYeT/W7z8uNoI4hBLtaNAhYG0IzHQQpgSdUjgoeeIBP3MDv4OseRhwBPD/5WGRhD16/ujaKv8ydQzbM4RcHO81I5UOGRYgfFpJQvlZqsss/j6gl9wilmqLI+IqdmpsgGEErO9XRYsMSIM6qRfzeEVburBkSiSBKU+Hyf4PUwdTmJM6B1Ky0iDeYgZNnA72lO6C0aCLjjPAqmIr6ax36Foampdeqb26tDdasvdHSq+Z65nLkwJYyc9RTqphgSFbN+9lpWHXAGNQgypODUw0prNhDyhBp0LAfsEP6thwMMlJYNQZIN+SC9duXzf/XV91CRuhtaZG5segSwKZPVxozNEVZi0AVoWpi6WB0jBAa1Ug0CKoVCpoqW2A/r4+8Ht9AbtyrvgRQiDPMheWZRUR7CH2tloE7SQApvLSzen3CwVFgNAE74oCURTBlJkIF06dhis1VRCfbg7YlXPFb3RZkjIggTcwtDD2f96MWRIyJYs+4f6krgyasohTiyCBWqeBNR+/ff8M7WK3N7Arfg8uURJBJtAfdIb79dKPN5tugdfnHQHlE0EaEkAc8GM6EEbA3wOrfA7Y8VzxG12XblRBC+12JzQwvwUd8FcttpKL0u2z+48dgIa2RmwjEXC/H8QeLwhuT4BRocc3siuf0a6cK35dPV1w+molnOm81oPzX96kDqE4KWzSuakvzHK0NjHeDMb4OIgyGQJZQx3Gg2fQA56+Yehpd4HL2QmtTjvYvZ3+uzHSfh8vv5NYx0jjqXTP/LsETiOvYh+7jvWSbNyN2EsowcRgwRBxgvb7ONnt5+RaBHkAbftGgY63NP8rwACqnUw6wvfjUAAAAABJRU5ErkJggg=="},ddc2:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("e92d"),s=r("f4cc"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("448d")),l=r("d386"),u=r("0224"),d=r("fcf2"),h=r("0d93"),p=r("505a");const f=a["a"].getLogger("esri.symbols.WebStyleSymbol");let b=i=class extends h["a"]{constructor(e){super(e),this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}read(e,t){this.portal=t?t.portal:void 0,super.read(e,t)}clone(){return new i({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(e){return this._fetchSymbol("webRef",e)}fetchCIMSymbol(e){return this._fetchSymbol("cimRef",e)}async _fetchSymbol(e,t){const r=await m();Object(s["v"])(t);const i=r.resolveWebStyleSymbol(this,{portal:this.portal},e,t);return i.catch(e=>{f.error("#fetchSymbol()","Failed to create symbol from style",e)}),i}};function m(){return r.e("chunk-2d0c516a").then(r.bind(null,"3e35"))}Object(n["a"])([Object(o["b"])({json:{write:!1}})],b.prototype,"color",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],b.prototype,"styleName",void 0),Object(n["a"])([Object(o["b"])({type:u["a"],json:{write:!1}})],b.prototype,"portal",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{read:d["e"],write:d["g"]}})],b.prototype,"styleUrl",void 0),Object(n["a"])([Object(o["b"])({type:p["a"],json:{read:!1}})],b.prototype,"thumbnail",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{write:!0}})],b.prototype,"name",void 0),Object(n["a"])([Object(c["a"])({styleSymbolReference:"web-style"},{readOnly:!0})],b.prototype,"type",void 0),b=i=Object(n["a"])([Object(l["a"])("esri.symbols.WebStyleSymbol")],b);const g=b},de47:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("501b"),n=r("3886"),a=r("ee2c"),s=r("b3a9");function o(e,t){const r=e.vertex;e.include(s["a"],t);const o=e.fragment;switch(Object(a["c"])(t)&&(r.uniforms.add("strokesTextureScale","vec2"),r.uniforms.add("strokesLog2Resolution","float"),r.uniforms.add("strokeVariants","float"),e.varyings.add("vStrokeUV","vec2"),o.uniforms.add("strokesTexture","sampler2D"),o.uniforms.add("strokesNormalizationScale","float"),r.code.add(n["a"]`void calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {
  3701. vec2 sidenessNorm = unpackedAttributes.sidenessNorm;
  3702. float lineIndex = clamp(ceil(log2(lineLength)), 0.0, strokesLog2Resolution);
  3703. vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + variantStroke + 0.5) * strokesTextureScale;
  3704. vStrokeUV.x += variantOffset;
  3705. }`),e.fragment.include(i["a"]),o.code.add(n["a"]`float calculateLineOffsetSketch() {
  3706. float offsetNorm = rgba2float(texture2D(strokesTexture, vStrokeUV));
  3707. return (offsetNorm - 0.5) * strokesNormalizationScale;
  3708. }
  3709. float calculateLinePressureSketch() {
  3710. return rgba2float(texture2D(strokesTexture, vStrokeUV + vec2(0.0, 0.5)));
  3711. }`)),t.mode){case a["b"].SOLID:r.code.add(n["a"]`void calculateStyleOutputs(UnpackedAttributes unpackedAttributes) {}`),o.code.add(n["a"]`float calculateLineOffset() {
  3712. return 0.0;
  3713. }
  3714. float calculateLinePressure() {
  3715. return 1.0;
  3716. }`);break;case a["b"].SKETCH:r.code.add(n["a"]`void calculateStyleOutputs(UnpackedAttributes unpackedAttributes)
  3717. {
  3718. calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);
  3719. }`),o.code.add(n["a"]`float calculateLineOffset() {
  3720. return calculateLineOffsetSketch();
  3721. }
  3722. float calculateLinePressure() {
  3723. return calculateLinePressureSketch();
  3724. }`);break;case a["b"].MIXED:e.varyings.add("vType","float"),r.code.add(n["a"]`void calculateStyleOutputs(UnpackedAttributes unpackedAttributes)
  3725. {
  3726. vType = unpackedAttributes.type;
  3727. if (unpackedAttributes.type <= 0.0) {
  3728. calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);
  3729. }
  3730. }`),o.code.add(n["a"]`float calculateLineOffset() {
  3731. if (vType <= 0.0) {
  3732. return calculateLineOffsetSketch();
  3733. }
  3734. else {
  3735. return 0.0;
  3736. }
  3737. }
  3738. float calculateLinePressure() {
  3739. if (vType <= 0.0) {
  3740. return calculateLinePressureSketch();
  3741. }
  3742. else {
  3743. return 1.0;
  3744. }
  3745. }`)}}},de58:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var i=r("02f1"),n=r("e431"),a=r("0b2d"),s=r("7289");function o(e,t,r,i){return h(e,t,r,u(i,t,r,!0))}function c(e,t,r,i){const a=Object(n["j"])(r,Object(n["l"])(e,i,t));return Object(n["h"])(e,t,Object(n["g"])(e,r,a))}const l={dir:Object(a["f"])(),len:0,clip:Object(i["b"])()};function u(e,t,r,i){const a=l;return e?(r&&i&&(a.len=Object(n["o"])(t,r)),Object(n["m"])(a.dir,e)):i?(a.len=Object(n["o"])(t,r),Object(n["l"])(a.dir,r,t),Object(n["g"])(a.dir,a.dir,1/a.len)):(Object(n["l"])(a.dir,r,t),Object(n["t"])(a.dir,a.dir)),a}function d(e,t,r){const i=Object(n["j"])(Object(s["r"])(e),r.dir),a=-Object(s["v"])(e,t);if(a<0&&i>=0)return!1;if(i>-1e-6&&i<1e-6)return a>0;if((a<0||i<0)&&!(a<0&&i<0))return!0;const o=a/i;return i>0?o<r.clip[1]&&(r.clip[1]=o):o>r.clip[0]&&(r.clip[0]=o),r.clip[0]<=r.clip[1]}function h(e,t,r,i){i.clip[0]=0,i.clip[1]=r?i.len:Number.MAX_VALUE;for(let n=0;n<e.length;n++)if(!d(e[n],t,i))return!1;return!0}},dea3:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){const t=e.fragment;t.uniforms.add("lightingMainDirection","vec3"),t.uniforms.add("lightingMainIntensity","vec3"),t.uniforms.add("lightingFixedFactor","float"),t.uniforms.add("lightingSpecularStrength","float"),t.uniforms.add("lightingEnvironmentStrength","float"),t.code.add(i["a"]`vec3 evaluateMainLighting(vec3 normal_global, float shadowing) {
  3746. float dotVal = clamp(dot(normal_global, lightingMainDirection), 0.0, 1.0);
  3747. dotVal = mix(dotVal, 1.0, lightingFixedFactor);
  3748. return lightingMainIntensity * ((1.0 - shadowing) * dotVal);
  3749. }`)}},deae:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));const i={value:.5,readOnly:!0},n={readOnly:!0,value:.5,get(){return this.updating?this.updatingProgressValue:1}}},deae2:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return c}));var i=r("c649");const n=Symbol("widget"),a=[],s={},o=new WeakMap;function c(e,t){let r=t.children;if(r&&r.length)for(let n=0;n<r.length;++n)r[n]=c(e,r[n]);else r=a;const i=t.vnodeSelector;if(h(i)){const n=t.properties||s,a=n.key||i;return{vnodeSelector:"div",properties:{key:a,afterCreate:l,afterUpdate:u,afterRemoved:d,parentWidget:e,widgetConstructor:i,widgetProperties:{...n,key:a,children:r}},children:void 0,text:void 0,domNode:null}}return t}function l(e,t,r,{parentWidget:n,widgetConstructor:a,widgetProperties:s}){const c=new a(s);c.container=e,o.set(e,c),null==c.afterCreate||c.afterCreate(c,e),n._internalHandles.add(Object(i["b"])(()=>d(e)))}function u(e,t,r,{widgetProperties:i}){const n=o.get(e);n&&(n.set(i),null==n.afterUpdate||n.afterUpdate(n,e))}function d(e){const t=o.get(e);t&&(t.destroy(),o.delete(e))}function h(e){return"function"==typeof e&&e[n]}},dee7:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("9ef0"),s=r("6a0ed"),o=r("b2b2"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("88da");let d=i=class extends s["a"]{constructor(e){super(e),this.color=null,this.colorTexture=null,this.normalTexture=null,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=Object(o["k"])(e)?e.get(this):null;if(r)return r;const n=new i(this.clonePropertiesWithDeduplication(t));return Object(o["k"])(e)&&e.set(this,n),n}clonePropertiesWithDeduplication(e){return{color:Object(o["k"])(this.color)?this.color.clone():null,colorTexture:Object(o["k"])(this.colorTexture)?this.colorTexture.cloneWithDeduplication(e):null,normalTexture:Object(o["k"])(this.normalTexture)?this.normalTexture.cloneWithDeduplication(e):null,alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided}}};Object(n["a"])([Object(c["b"])({type:a["a"],json:{write:!0}})],d.prototype,"color",void 0),Object(n["a"])([Object(c["b"])({type:u["a"],json:{write:!0}})],d.prototype,"colorTexture",void 0),Object(n["a"])([Object(c["b"])({type:u["a"],json:{write:!0}})],d.prototype,"normalTexture",void 0),Object(n["a"])([Object(c["b"])({nonNullable:!0,json:{write:!0}})],d.prototype,"alphaMode",void 0),Object(n["a"])([Object(c["b"])({nonNullable:!0,json:{write:!0}})],d.prototype,"alphaCutoff",void 0),Object(n["a"])([Object(c["b"])({nonNullable:!0,json:{write:!0}})],d.prototype,"doubleSided",void 0),d=i=Object(n["a"])([Object(l["a"])("esri.geometry.support.MeshMaterial")],d);const h=d},df3d:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("448d")),o=r("d386"),c=r("4338");let l=i=class extends c["a"]{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new i({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};Object(n["a"])([Object(a["b"])({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],l.prototype,"maxValue",void 0),Object(n["a"])([Object(a["b"])({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],l.prototype,"minValue",void 0),Object(n["a"])([Object(s["a"])({range:"range"})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(o["a"])("esri.layers.support.RangeDomain")],l);const u=l},df77:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var i=r("d047"),n=r("3886");function a(e){e.fragment.uniforms.add("lastFrameColorMap","sampler2D"),e.fragment.uniforms.add("reprojectionMatrix","mat4"),e.fragment.uniforms.add("proj","mat4"),e.fragment.code.add(n["a"]`vec2 reprojectionCoordinate(vec3 projectionCoordinate)
  3750. {
  3751. vec4 zw = proj * vec4(0.0, 0.0, -projectionCoordinate.z, 1.0);
  3752. vec4 reprojectedCoord = reprojectionMatrix * vec4(zw.w * (projectionCoordinate.xy * 2.0 - 1.0), zw.z, zw.w);
  3753. reprojectedCoord.xy /= reprojectedCoord.w;
  3754. return reprojectedCoord.xy * 0.5 + 0.5;
  3755. }`)}function s(e,t){e.bindTexture(t.lastFrameColorTexture,"lastFrameColorMap"),e.setUniformMatrix4fv("reprojectionMatrix",t.reprojectionMatrix),e.setUniformMatrix4fv("proj",t.camera.projectionMatrix)}function o(e,t){e.fragment.uniforms.add("nearFar","vec2"),e.fragment.uniforms.add("depthMapView","sampler2D"),e.fragment.uniforms.add("view","mat4"),e.fragment.uniforms.add("invResolutionHeight","float"),e.fragment.include(i["a"]),e.include(a),e.fragment.code.add(n["a"]`
  3756. const int maxSteps = ${t.highStepCount?"150;":"75;"}
  3757. vec4 applyProjectionMat(mat4 projectionMat, vec3 x)
  3758. {
  3759. vec4 projectedCoord = projectionMat * vec4(x, 1.0);
  3760. projectedCoord.xy /= projectedCoord.w;
  3761. projectedCoord.xy = projectedCoord.xy*0.5 + 0.5;
  3762. return projectedCoord;
  3763. }
  3764. vec3 screenSpaceIntersection(vec3 dir, vec3 startPosition, vec3 viewDir, vec3 normal)
  3765. {
  3766. vec3 viewPos = startPosition;
  3767. vec3 viewPosEnd = startPosition;
  3768. // Project the start position to the screen
  3769. vec4 projectedCoordStart = applyProjectionMat(proj, viewPos);
  3770. vec3 Q0 = viewPos / projectedCoordStart.w; // homogeneous camera space
  3771. float k0 = 1.0/ projectedCoordStart.w;
  3772. // advance the position in the direction of the reflection
  3773. viewPos += dir;
  3774. vec4 projectedCoordVanishingPoint = applyProjectionMat(proj, dir);
  3775. // Project the advanced position to the screen
  3776. vec4 projectedCoordEnd = applyProjectionMat(proj, viewPos);
  3777. vec3 Q1 = viewPos / projectedCoordEnd.w; // homogeneous camera space
  3778. float k1 = 1.0/ projectedCoordEnd.w;
  3779. // calculate the reflection direction in the screen space
  3780. vec2 projectedCoordDir = (projectedCoordEnd.xy - projectedCoordStart.xy);
  3781. vec2 projectedCoordDistVanishingPoint = (projectedCoordVanishingPoint.xy - projectedCoordStart.xy);
  3782. float yMod = min(abs(projectedCoordDistVanishingPoint.y), 1.0);
  3783. float projectedCoordDirLength = length(projectedCoordDir);
  3784. float maxSt = float(maxSteps);
  3785. // normalize the projection direction depending on maximum steps
  3786. // this determines how blocky the reflection looks
  3787. vec2 dP = yMod * (projectedCoordDir)/(maxSt * projectedCoordDirLength);
  3788. // Normalize the homogeneous camera space coordinates
  3789. vec3 dQ = yMod * (Q1 - Q0)/(maxSt * projectedCoordDirLength);
  3790. float dk = yMod * (k1 - k0)/(maxSt * projectedCoordDirLength);
  3791. // initialize the variables for ray marching
  3792. vec2 P = projectedCoordStart.xy;
  3793. vec3 Q = Q0;
  3794. float k = k0;
  3795. float rayStartZ = -startPosition.z; // estimated ray start depth value
  3796. float rayEndZ = -startPosition.z; // estimated ray end depth value
  3797. float prevEstimateZ = -startPosition.z;
  3798. float rayDiffZ = 0.0;
  3799. float dDepth;
  3800. float depth;
  3801. float rayDiffZOld = 0.0;
  3802. // early outs
  3803. if (dot(normal, dir) < 0.0 || dot(-viewDir, normal) < 0.0)
  3804. return vec3(P, 0.0);
  3805. for(int i = 0; i < maxSteps-1; i++)
  3806. {
  3807. depth = -linearDepthFromTexture(depthMapView, P, nearFar); // get linear depth from the depth buffer
  3808. // estimate depth of the marching ray
  3809. rayStartZ = prevEstimateZ;
  3810. dDepth = -rayStartZ - depth;
  3811. rayEndZ = (dQ.z * 0.5 + Q.z)/ ((dk * 0.5 + k));
  3812. rayDiffZ = rayEndZ- rayStartZ;
  3813. prevEstimateZ = rayEndZ;
  3814. if(-rayEndZ > nearFar[1] || -rayEndZ < nearFar[0] || P.y < 0.0 || P.y > 1.0 )
  3815. {
  3816. return vec3(P, 0.);
  3817. }
  3818. // If we detect a hit - return the intersection point, two conditions:
  3819. // - dDepth > 0.0 - sampled point depth is in front of estimated depth
  3820. // - if difference between dDepth and rayDiffZOld is not too large
  3821. // - if difference between dDepth and 0.025/abs(k) is not too large
  3822. // - if the sampled depth is not behind far plane or in front of near plane
  3823. if((dDepth) < 0.025/abs(k) + abs(rayDiffZ) && dDepth > 0.0 && depth > nearFar[0] && depth < nearFar[1] && abs(P.y - projectedCoordStart.y) > invResolutionHeight)
  3824. {
  3825. return vec3(P, depth);
  3826. }
  3827. // continue with ray marching
  3828. P += dP;
  3829. Q.z += dQ.z;
  3830. k += dk;
  3831. rayDiffZOld = rayDiffZ;
  3832. }
  3833. return vec3(P, 0.0);
  3834. }
  3835. `)}function c(e,t){t.ssrEnabled&&(e.bindTexture(t.linearDepthTexture,"depthMapView"),e.setUniform2fv("nearFar",t.camera.nearFar),e.setUniformMatrix4fv("view",t.camera.viewMatrix),e.setUniform1f("invResolutionHeight",1/t.camera.height),s(e,t))}},dfa0:function(e,t,r){"use strict";r.d(t,"a",(function(){return V})),r.d(t,"b",(function(){return H}));var i=r("ce50"),n=r("c120"),a=r("f4cc"),s=r("67c2"),o=r("dbbf"),c=r("f7be"),l=r("e92d"),u=r("9c4c"),d=r("b2cd"),h=r("1325"),p=(r("1b8f"),r("e041"));const f={};function b(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}function m(e){var t;const r={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(r.async=!0),e.hasOwnProperty("isDebug")||(r.isDebug=!1),e.baseUrl||(r.baseUrl=f.baseUrl),null==(t=f.packages)||t.forEach(e=>{b(r.packages,e)}),r}var g=r("2ab7");class y{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(t=>{this[t]=(...r)=>e[t](...r)})}}class O{constructor(){this._dispatcher=new y,this._workerPostMessage({type:u["a"].HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){Object(g["a"])(()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))})}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){Object(g["a"])(()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))})}async _workerMessageHandler(e){const t=Object(u["d"])(e);if(t&&t.type===u["a"].OPEN){const{modulePath:e,jobId:r}=t;let i=await o["a"].loadWorker(e);i||(i=await import(e));const n=o["a"].connect(i);this._workerPostMessage({type:u["a"].OPENED,jobId:r,data:n})}}}var v=r("2035"),_=r("49fa");const j=l["a"].getLogger("esri.core.workers"),{HANDSHAKE:w}=u["a"],x='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});';let T,S;const E="Failed to create Worker. Fallback to execute module in main thread";async function A(){if(!Object(n["a"])("esri-workers")||(Object(n["a"])("mozilla"),0))return C(new O);if(!T&&!S)try{const e=x.replace('"{CONFIGURATION}"',`'${R()}'`);T=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(t){S=t||{}}let e;if(T)try{e=new Worker(T,{name:"esri-worker-"+M++})}catch(t){j.warn(E,S),e=new O}else j.warn(E,S),e=new O;return C(e)}async function C(e){return new Promise(t=>{function r(n){const a=Object(u["d"])(n);a&&a.type===w&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),j.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new O).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)})}function R(){let e;if(null!=h["a"].default){const t={...h["a"]};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h["a"]));e.assetsPath=Object(p["C"])(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=Object(v["b"])(),e.has={"esri-csp-restrictions":Object(n["a"])("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":Object(n["a"])("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":Object(n["a"])("esri-2d-query-centroid-enabled"),"featurelayer-pbf":Object(n["a"])("featurelayer-pbf"),"featurelayer-simplify-thresholds":Object(n["a"])("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":Object(n["a"])("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":Object(n["a"])("featurelayer-simplify-mobile-factor"),"esri-atomics":Object(n["a"])("esri-atomics"),"esri-shared-array-buffer":Object(n["a"])("esri-shared-array-buffer"),"esri-tiles-debug":Object(n["a"])("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":Object(n["a"])("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":Object(n["a"])("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=Object(p["C"])(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=Object(p["C"])(e.workers.workerPath):e.workers.workerPath=Object(p["C"])(Object(d["b"])("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h["a"].workers.loaderConfig,r=m({baseUrl:null==t?void 0:t.baseUrl,locale:Object(v["b"])(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...null==t?void 0:t.has},map:{...null==t?void 0:t.map},paths:{...null==t?void 0:t.paths},packages:(null==t?void 0:t.packages)||[]}),i={version:c["d"],buildDate:_["a"],revision:_["b"]};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}let M=0;const P=l["a"].getLogger("esri.core.workers"),{ABORT:I,INVOKE:D,OPEN:L,OPENED:N,RESPONSE:F}=u["a"];class k{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",e=>{e.preventDefault(),P.error(e)})}static async create(e){const t=await A();return new k(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=Object(u["b"])();return new Promise((t,n)=>{const s={resolve:t,reject:n,abortHandle:Object(a["r"])(r,()=>{this._outJobs.delete(i),this._post({type:I,jobId:i})})};this._outJobs.set(i,s),this._post({type:L,jobId:i,modulePath:e})})}_onMessage(e){const t=Object(u["d"])(e);if(t)switch(t.type){case N:this._onOpenedMessage(t);break;case F:this._onResponseMessage(t);break;case I:this._onAbortMessage(t);break;case D:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:n}=e,s=n?new AbortController:null,o=this._inJobs,l=c["e"][t];let d;try{if("function"!=typeof l)throw new TypeError(t+" is not a function");d=l.call(null,i,{signal:s?s.signal:null})}catch(h){return void this._post({type:F,jobId:r,error:Object(u["e"])(h)})}Object(a["o"])(d)?(o.set(r,{controller:s,promise:d}),d.then(e=>{o.has(r)&&(o.delete(r),this._post({type:F,jobId:r},e))},e=>{o.has(r)&&(o.delete(r),e||(e={message:"Error encountered at method"+t}),Object(a["m"])(e)||this._post({type:F,jobId:r,error:Object(u["e"])(e||{message:"Error encountered at method "+t})}))})):this._post({type:F,jobId:r},d)}_onOpenedMessage(e){var t;const{jobId:r,data:i}=e,n=this._outJobs.get(r);n&&(this._outJobs.delete(r),null==(t=n.abortHandle)||t.remove(),n.resolve(i))}_onResponseMessage(e){var t;const{jobId:r,error:n,data:a}=e,s=this._outJobs.get(r);s&&(this._outJobs.delete(r),null==(t=s.abortHandle)||t.remove(),n?s.reject(i["a"].fromJSON(JSON.parse(n))):s.resolve(a))}_post(e,t,r){return Object(u["c"])(this.worker,e,t,r)}}let U=Object(n["a"])("esri-workers-debug")?1:Object(n["a"])("host-browser")?navigator.hardwareConcurrency-1:0;U||(U=Object(n["a"])("safari")&&Object(n["a"])("mac")||Object(n["a"])("trident")?7:2);let z=0;const B=[];function V(){$()}async function G(e,t){const r=new s["a"];return await r.open(e,t),r}async function H(e,t={}){if("string"!=typeof e)throw new i["a"]("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if(Object(n["a"])("host-webworker")&&!Object(n["a"])("esri-workers")&&(r="local"),"local"===r){let r=await o["a"].loadWorker(e);r||(r=await import(e)),Object(a["v"])(t.signal);const i=t.client||r;return G([o["a"].connect(r)],{...t,client:i})}if(await $(),Object(a["v"])(t.signal),"dedicated"===r){const r=z++%U;return G([await B[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,U);if(r<U){const i=new Array(r);for(let n=0;n<r;++n){const r=z++%U;i[n]=B[r].open(e,t)}return G(i,t)}}return G(B.map(r=>r.open(e,t)),t)}let q,W=null;async function $(){if(W)return W;q=new AbortController;const e=[];for(let t=0;t<U;t++){const r=k.create(t).then(e=>(B[t]=e,e));e.push(r)}return W=Promise.all(e),W}},dfaf:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i}));var i,n=r("3886"),a=r("b7bd");function s(e,t){t.attributeTextureCoordinates===i.Default&&(e.attributes.add(a["a"].UV0,"vec2"),e.varyings.add("vuv0","vec2"),e.vertex.code.add(n["a"]`void forwardTextureCoordinates() {
  3836. vuv0 = uv0;
  3837. }`)),t.attributeTextureCoordinates===i.Atlas&&(e.attributes.add(a["a"].UV0,"vec2"),e.varyings.add("vuv0","vec2"),e.attributes.add(a["a"].UVREGION,"vec4"),e.varyings.add("vuvRegion","vec4"),e.vertex.code.add(n["a"]`void forwardTextureCoordinates() {
  3838. vuv0 = uv0;
  3839. vuvRegion = uvRegion;
  3840. }`)),t.attributeTextureCoordinates===i.None&&e.vertex.code.add(n["a"]`void forwardTextureCoordinates() {}`)}!function(e){e[e.None=0]="None",e[e.Default=1]="Default",e[e.Atlas=2]="Atlas",e[e.COUNT=3]="COUNT"}(i||(i={}))},dff3:function(e,t,r){"use strict";r.d(t,"a",(function(){return j}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("b2b2"),c=r("8048"),l=r("59b2"),u=(r("b50f"),r("c120"),r("cea0")),d=r("afcf"),h=r("d386"),p=r("09db"),f=r("4ae5"),b=r("5996"),m=r("9180"),g=r("7f83"),y=r("9786"),O=r("50e6");const v=new a["a"]({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let _=i=class extends s["a"]{constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}static create(e={}){const{resolutionFactor:t=1,scales:r,size:n=256,spatialReference:a=b["a"].WebMercator,numLODs:s=24}=e;if(!Object(g["l"])(a)){const e=[];if(r)for(let t=0;t<r.length;t++){const i=r[t];e.push({level:t,scale:i,resolution:i})}else{let t=5e-4;for(let r=s-1;r>=0;r--)e.unshift({level:r,scale:t,resolution:t}),t*=2}return new i({dpi:96,lods:e,origin:new f["a"](0,0,a),size:[n,n],spatialReference:a})}const o=Object(g["e"])(a),l=e.origin?new f["a"]({x:e.origin.x,y:e.origin.y,spatialReference:a}):new f["a"](o?{x:o.origin[0],y:o.origin[1],spatialReference:a}:{x:0,y:0,spatialReference:a}),u=96,d=1/(39.37*Object(c["f"])(a)*u),h=[];if(r)for(let i=0;i<r.length;i++){const e=r[i],t=e*d;h.push({level:i,scale:e,resolution:t})}else{let e=Object(g["h"])(a)?512/n*591657527.5917094:256/n*591657527.591555;const r=Math.ceil(s/t);h.push({level:0,scale:e,resolution:e*d});for(let i=1;i<r;i++){const r=e/2**t,n=r*d;h.push({level:i,scale:r,resolution:n}),e=r}}return new i({dpi:u,lods:h,origin:l,size:[n,n],spatialReference:a})}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const r=Object(g["e"])(e);return e.isWrappable&&Math.abs(r.origin[0]-t.x)<=r.dx}return!1}readOrigin(e,t){return f["a"].fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,r=0;const i=[];this._levelToLOD={},e&&(t=-1/0,r=1/0,e.forEach(e=>{i.push(e.scale),t=e.scale>t?e.scale:t,r=e.scale<r?e.scale:r,this._levelToLOD[e.level]=e})),this._set("scales",i),this._set("minScale",t),this._set("maxScale",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];{const r=Math.floor(e),i=r+1;return t[r]/(t[r]/t[i])**(e-r)}}scaleToZoom(e){const t=this.scales,r=t.length-1;let i=0;for(;i<r;i++){const r=t[i],n=t[i+1];if(r<=e)return i;if(n===e)return i+1;if(r>e&&n<e)return i+Math.log(r/e)/Math.log(r/n)}return i}snapScale(e,t=.95){const r=this.scaleToZoom(e);return r%Math.floor(r)>=t?this.zoomToScale(Math.ceil(r)):this.zoomToScale(Math.floor(r))}tileAt(e,t,r,i){const n=this.lodAt(e);if(!n)return null;let a,s;if("number"==typeof t)a=t,s=r;else if(Object(g["d"])(t.spatialReference,this.spatialReference))a=t.x,s=t.y,i=r;else{const e=Object(y["d"])(t,this.spatialReference);if(Object(o["j"])(e))return null;a=e.x,s=e.y,i=r}const c=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i={id:null,level:0,row:0,col:0,extent:Object(m["l"])()}),i.level=e,i.row=Math.floor((this.origin.y-s)/l+.001),i.col=Math.floor((a-this.origin.x)/c+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let r=this.lodAt(e.level);if(!r&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(r=t)}if(!r)return;const n=e.level-r.level,a=r.resolution*this.size[0]/2**n,s=r.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=Object(m["l"])()),e.extent[0]=this.origin.x+e.col*a,e.extent[1]=this.origin.y-(e.row+1)*s,e.extent[2]=e.extent[0]+a,e.extent[3]=e.extent[1]+s}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel)&&(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),!0)}getTileBounds(e,t){const{resolution:r}=this.lodAt(t.level),i=r*this.size[0],n=r*this.size[1];return e[0]=this.origin.x+t.col*i,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+i,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD&&this._levelToLOD[e]||null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const r=[],n=this.lods.length;for(let i=0;i<n;i++){const e=this.lods[i],n=e.resolution*t;r.push(new O["a"]({level:e.level,scale:e.scale,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:r})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let r=0;r<e.length;r++){const i=e[r];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};Object(n["a"])([Object(l["b"])({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),Object(n["a"])([Object(l["b"])({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),Object(n["a"])([Object(l["b"])({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],_.prototype,"isWrappable",null),Object(n["a"])([Object(l["b"])({type:f["a"],json:{write:!0}})],_.prototype,"origin",void 0),Object(n["a"])([Object(d["a"])("origin")],_.prototype,"readOrigin",null),Object(n["a"])([Object(l["b"])({type:[O["a"]],value:null,json:{write:!0}})],_.prototype,"lods",null),Object(n["a"])([Object(l["b"])({readOnly:!0})],_.prototype,"minScale",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],_.prototype,"maxScale",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],_.prototype,"scales",void 0),Object(n["a"])([Object(l["b"])({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),Object(n["a"])([Object(d["a"])("size",["rows","cols"])],_.prototype,"readSize",null),Object(n["a"])([Object(p["a"])("size",{cols:{type:u["a"]},rows:{type:u["a"]}})],_.prototype,"writeSize",null),Object(n["a"])([Object(l["b"])({type:b["a"],json:{write:!0}})],_.prototype,"spatialReference",void 0),_=i=Object(n["a"])([Object(h["a"])("esri.layers.support.TileInfo")],_),function(e){var t;(t=e.ExtrapolateOptions||(e.ExtrapolateOptions={}))[t.NONE=0]="NONE",t[t.POWER_OF_TWO=1]="POWER_OF_TWO"}(_||(_={}));const j=_},e041:function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return P})),r.d(t,"c",(function(){return N})),r.d(t,"d",(function(){return Ee})),r.d(t,"e",(function(){return Ae})),r.d(t,"f",(function(){return K})),r.d(t,"g",(function(){return we})),r.d(t,"h",(function(){return te})),r.d(t,"i",(function(){return Q})),r.d(t,"j",(function(){return ie})),r.d(t,"k",(function(){return T})),r.d(t,"l",(function(){return x})),r.d(t,"m",(function(){return ge})),r.d(t,"n",(function(){return z})),r.d(t,"o",(function(){return Z})),r.d(t,"p",(function(){return Ce})),r.d(t,"q",(function(){return F})),r.d(t,"r",(function(){return M})),r.d(t,"s",(function(){return B})),r.d(t,"t",(function(){return k})),r.d(t,"u",(function(){return X})),r.d(t,"v",(function(){return Y})),r.d(t,"w",(function(){return J})),r.d(t,"x",(function(){return ce})),r.d(t,"y",(function(){return se})),r.d(t,"z",(function(){return Te})),r.d(t,"A",(function(){return V})),r.d(t,"B",(function(){return $})),r.d(t,"C",(function(){return H})),r.d(t,"D",(function(){return re})),r.d(t,"E",(function(){return q})),r.d(t,"F",(function(){return W})),r.d(t,"G",(function(){return R})),r.d(t,"H",(function(){return A})),r.d(t,"I",(function(){return me})),r.d(t,"J",(function(){return Se})),r.d(t,"K",(function(){return Oe})),r.d(t,"L",(function(){return de})),r.d(t,"M",(function(){return E}));var i=r("1325"),n=r("ce50"),a=r("e92d"),s=r("b2b2");const o=a["a"].getLogger("esri.core.urlUtils"),c=i["a"].request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,d=/^\s*http:/i,h=/^\s*https:/i,p=/^\s*file:/i,f=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,m=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),g=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=Object(s["c"])(this.uri.match(m));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=Object(s["c"])(this.authority.match(g)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const O={},v=new y(i["a"].applicationUrl);let _=v;const j=S();let w=j;const x=()=>_,T=()=>w;function S(){const e=Object(s["c"])(_.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${_.scheme}://${_.host}${null!=_.port?":"+_.port:""}${t}`}function E(e){const t={path:null,query:null},r=new y(e),i=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,i),t.query=A(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function A(e){const t=e.split("&"),r={};for(const i of t){if(!i)continue;const e=i.indexOf("=");let t,n;e<0?(t=decodeURIComponent(i),n=""):(t=decodeURIComponent(i.slice(0,e)),n=decodeURIComponent(i.slice(e+1)));let a=r[t];"string"==typeof a&&(a=r[t]=[a]),Array.isArray(a)?a.push(n):r[t]=n}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function R(e,t){return e?t&&"function"==typeof t?Object.keys(e).map(r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r]))).join("&"):Object.keys(e).map(r=>{const i=e[r];if(null==i)return"";const n=encodeURIComponent(r)+"=",a=t&&t[r];return a?n+encodeURIComponent(a(i)):Array.isArray(i)?i.map(e=>C(e)?n+encodeURIComponent(JSON.stringify(e)):n+encodeURIComponent(e)).join("&"):C(i)?n+encodeURIComponent(JSON.stringify(i)):n+encodeURIComponent(i)}).filter(e=>e).join("&"):""}function M(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ce(e);const i=F(e);i&&(r=i.proxyUrl)}else t=!!e;if(!r)throw o.warn(l),new n["a"]("urlutils:proxy-not-set",l);return t&&pe()&&(r=de(r)),E(r)}function P(e){const t=F(e);let r,i;if(t){const e=D(t.proxyUrl);r=e.path,i=e.query?A(e.query):null}if(r){const t=E(e);e=r+"?"+t.path;const n=R({...i,...t.query});n&&(e=`${e}?${n}`)}return e}const I={path:"",query:""};function D(e){const t=e.indexOf("?");return-1!==t?(I.path=e.slice(0,t),I.query=e.slice(t+1)):(I.path=e,I.query=null),I}function L(e){return(e=fe(e=ye(e=D(e).path),!0)).toLowerCase()}function N(e){const t={proxyUrl:e.proxyUrl,urlPrefix:L(e.urlPrefix)},r=c.proxyRules,i=t.urlPrefix;let n=r.length;for(let a=0;a<r.length;a++){const e=r[a].urlPrefix;if(0===i.indexOf(e)){if(i.length===e.length)return-1;n=a;break}0===e.indexOf(i)&&(n=a+1)}return r.splice(n,0,t),n}function F(e){const t=c.proxyRules,r=L(e);for(let i=0;i<t.length;i++)if(0===r.indexOf(t[i].urlPrefix))return t[i]}function k(e,t){return e=U(e),t=U(t),fe(e)===fe(t)}function U(e){const t=(e=W(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function z(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const i of r)if(Array.isArray(i.urls)){if(i.urls.some(t))return i}else if(t(i.urls))return i;return null}function B(e,t,r=!1){const i=xe(e),n=xe(t);return!(!r&&i.scheme!==n.scheme)&&null!=i.host&&null!=n.host&&i.host.toLowerCase()===n.host.toLowerCase()&&i.port===n.port}function V(e){if("string"==typeof e){if(!X(e))return!0;e=xe(e)}if(B(e,_))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const i=G(t[r]);for(let t=0;t<i.length;t++)if(B(e,i[t]))return!0}return!1}function G(e){return O[e]||(oe(e)||se(e)?O[e]=[new y(H(e))]:O[e]=[new y("http://"+e),new y("https://"+e)]),O[e]}function H(e,t=w,r){return se(e)?r&&r.preserveProtocolRelative?e:"http"===_.scheme&&_.authority===Z(e).slice(2)?"http:"+e:"https:"+e:oe(e)?e:Object(s["c"])($("/"===e[0]?be(t):t,e))}function q(e,t=w,r){if(!X(e))return e;const i=W(e),n=i.toLowerCase(),a=W(t).toLowerCase().replace(/\/+$/,""),s=r?W(r).toLowerCase().replace(/\/+$/,""):null;if(s&&0!==a.indexOf(s))return e;const o=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=o(n,"/",n.indexOf("//")+2),l=-1;for(;n.slice(0,c+1)===a.slice(0,c)+"/"&&(l=c+1,c!==n.length);)c=o(n,"/",c+1);if(-1===l)return e;if(s&&l<s.length)return e;e=i.slice(l);const u=a.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let d=0;d<u;d++)e="../"+e;else e="./"+e;return e}function W(e){return je(e=_e(e=ve(e=H(e=e.trim()))))}function $(...e){const t=e.filter(s["k"]);if(!t||!t.length)return;const r=[];if(X(t[0])){const e=t[0],i=e.indexOf("//");-1!==i&&(r.push(e.slice(0,i+1)),ue(t[0])&&(r[0]+="/"),t[0]=e.slice(i+2))}else"/"===t[0][0]&&r.push("");const i=t.reduce((e,t)=>t?e.concat(t.split("/")):e,[]);for(let n=0;n<i.length;n++){const e=i[n];".."===e&&r.length>0&&".."!==r[r.length-1]?r.pop():(!e&&n===i.length-1||e&&("."!==e||0===r.length))&&r.push(e)}return r.join("/")}function Z(e,t=!1){if(Y(e)||J(e))return null;let r=e.indexOf("://");if(-1===r&&se(e))r=2;else{if(-1===r)return null;r+=3}const i=e.indexOf("/",r);return-1!==i&&(e=e.slice(0,i)),t&&(e=fe(e,!0)),e}function X(e){return se(e)||oe(e)}function Y(e){return null!=e&&"blob:"===e.slice(0,5)}function J(e){return"data:"===e.slice(0,5)}function Q(e){const t=te(e);if(!t||!t.isBase64)return null;const r=atob(t.data),i=new Uint8Array(r.length);for(let n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return i.buffer}function K(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const ee=/^data:(.*?)(;base64)?,(.*)$/;function te(e){const t=e.match(ee);if(!t)return null;const[,r,i,n]=t;return{mediaType:r,isBase64:!!i,data:n}}function re(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ie(e,t){ne(e,t)||ae(e,t)}function ne(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const i=URL.createObjectURL(e);return r.download=t,r.href=i,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i),!0}function ae(e,t){return!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}function se(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function oe(e){return u.test(e)}function ce(e){return h.test(e)||"https"===_.scheme&&se(e)}function le(e){return d.test(e)||"http"===_.scheme&&se(e)}function ue(e){return p.test(e)}function de(e){return se(e)?"https:"+e:e.replace(d,"https:")}function he(){return"http"===_.scheme}function pe(){return"https"===_.scheme}function fe(e,t=!1){return se(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function be(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}function me(e){let t=0;if(X(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ge(e,t){if(!e)return"";const r=E(e).path.replace(/\/+$/,""),i=r.substring(r.lastIndexOf("/")+1);if(null==t||!t.length)return i;const n=new RegExp(`.(${t.join("|")})$`,"ig");return i.replace(n,"")}function ye(e){return e&&"/"===e[e.length-1]?e:e+"/"}function Oe(e){return e.replace(/\/+$/,"")}function ve(e){if(/^https?:\/\//i.test(e)){const t=D(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+="?"+t.query)}return e}function _e(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function je(e){const t=c.httpsDomains;if(!le(e))return e;const r=e.indexOf("/",7);let i;if(i=-1===r?e:e.slice(0,r),i=i.toLowerCase().slice(7),f.test(i)){if(!i.endsWith(":80"))return e;i=i.slice(0,-3),e=e.replace(":80","")}return he()&&i===_.authority&&!b.test(e)||(pe()&&i===_.authority||t&&t.some(e=>i===e||i.endsWith("."+e))||pe()&&!F(e))&&(e=de(e)),e}function we(e,t,r){if(!(t&&r&&e&&X(e)))return e;const i=e.indexOf("//"),n=e.indexOf("/",i+2),a=e.indexOf(":",i+2),s=Math.min(n<0?e.length:n,a<0?e.length:a);return e.slice(i+2,s).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,i+2)}${r}${e.slice(s)}`}function xe(e){return"string"==typeof e?new y(H(e)):(e.scheme||(e.scheme=_.scheme),e)}function Te(e){return Me.test(e)}function Se(e,t){const r=E(e),i=Object.keys(r.query||{});return i.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${i.join(", ")}.`),r.path}function Ee(e,t,r){const i=E(e),n=i.query||{};return n[t]=String(r),`${i.path}?${R(n)}`}function Ae(e,t){const r=E(e),i=r.query||{};for(const a in t)i[a]=t[a];const n=R(i);return n?`${r.path}?${n}`:r.path}function Ce(e){if(Object(s["j"])(e))return null;const t=e.match(Re);return t?t[1]:null}const Re=/.*?\.([^\/]*)$/,Me=/(^data:image\/svg|\.svg$)/i},e06a:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("cea0"),n=r("3af1"),a=r("3760"),s=r("57dc"),o=r("4ae5"),c=r("1219"),l=r("521c");r("5996"),r("74e2"),r("a9ab");const u={base:a["a"],key:"type",typeMap:{extent:n["a"],multipoint:s["a"],point:o["a"],polyline:l["a"],polygon:c["a"]}};Object(i["k"])(u)},e1bb:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("b2b2"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("448d")),c=r("d386"),l=r("961d"),u=r("8c11"),d=r("fc29");let h=i=class extends d["a"]{constructor(){super(...arguments),this.x=0,this.y=0,this.z=0}clone(){return new i({x:this.x,y:this.y,z:this.z})}};Object(n["a"])([Object(s["b"])({type:Number})],h.prototype,"x",void 0),Object(n["a"])([Object(s["b"])({type:Number})],h.prototype,"y",void 0),Object(n["a"])([Object(s["b"])({type:Number})],h.prototype,"z",void 0),h=i=Object(n["a"])([Object(c["a"])("esri.symbols.support.Symbol3DAnchorPosition3D")],h);var p,f=r("a3af");let b=p=class extends l["a"]{constructor(e){super(e),this.material=null,this.castShadows=!0,this.resource=null,this.type="object",this.width=void 0,this.height=void 0,this.depth=void 0,this.anchor=void 0,this.anchorPosition=void 0,this.heading=void 0,this.tilt=void 0,this.roll=void 0}clone(){return new p({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),depth:this.depth,enabled:this.enabled,height:this.height,material:Object(a["k"])(this.material)?this.material.clone():null,castShadows:this.castShadows,resource:this.resource&&this.resource.clone(),width:this.width})}get isPrimitive(){return!this.resource||"string"!=typeof this.resource.href}};Object(n["a"])([Object(s["b"])({type:f["a"],json:{write:!0}})],b.prototype,"material",void 0),Object(n["a"])([Object(s["b"])({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],b.prototype,"castShadows",void 0),Object(n["a"])([Object(s["b"])({type:u["a"],json:{write:!0}})],b.prototype,"resource",void 0),Object(n["a"])([Object(o["a"])({Object:"object"},{readOnly:!0})],b.prototype,"type",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],b.prototype,"width",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],b.prototype,"height",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],b.prototype,"depth",void 0),Object(n["a"])([Object(o["a"])({center:"center",top:"top",bottom:"bottom",origin:"origin",relative:"relative"}),Object(s["b"])({json:{default:"origin"}})],b.prototype,"anchor",void 0),Object(n["a"])([Object(s["b"])({type:h,json:{type:[Number],read:{reader:e=>new h({x:e[0],y:e[1],z:e[2]})},write:{writer:(e,t)=>{t.anchorPosition=[e.x,e.y,e.z]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],b.prototype,"anchorPosition",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],b.prototype,"heading",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],b.prototype,"tilt",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{write:!0}})],b.prototype,"roll",void 0),Object(n["a"])([Object(s["b"])({readOnly:!0})],b.prototype,"isPrimitive",null),b=p=Object(n["a"])([Object(c["a"])("esri.symbols.ObjectSymbol3DLayer")],b);const m=b},e1fa:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("1b19"),c=r("b08e");let l=i=class extends o["a"]{constructor(e){super(e),this.type="bar-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};Object(n["a"])([Object(a["b"])({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:c["a"].write}})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(s["a"])("esri.popup.content.BarChartMediaInfo")],l);const u=l},e20b:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return o}));var i=r("c120");const n=new Set;function a(e,t,r=!1){r&&n.has(t)||(r&&n.add(t),e.warn("🛑 DEPRECATED - "+t))}function s(e,t,r={}){if(Object(i["a"])("esri-deprecation-warnings")){const{moduleName:i}=r;c(e,"Function: "+((i?i+"::":"")+t+"()"),r)}}function o(e,t,r={}){if(Object(i["a"])("esri-deprecation-warnings")){const{moduleName:i}=r;c(e,"Property: "+((i?i+"::":"")+t),r)}}function c(e,t,r={}){if(Object(i["a"])("esri-deprecation-warnings")){const{replacement:i,version:n,see:s,warnOnce:o}=r;let c=t;i&&(c+="\n\t🛠️ Replacement: "+i),n&&(c+="\n\t⚙️ Version: "+n),s&&(c+=`\n\t🔗 See ${s} for more details.`),a(e,c,o)}}},e2e8:function(e,t,r){"use strict";r.r(t),r.d(t,"getGeometryServiceURL",(function(){return c})),r.d(t,"projectGeometry",(function(){return l}));var i=r("1325"),n=r("ce50"),a=r("0224"),s=r("ac91"),o=r("7e6b");async function c(e=null,t){var r,s;if(i["a"].geometryServiceUrl)return i["a"].geometryServiceUrl;if(!e)throw new n["a"]("internal:geometry-service-url-not-configured");let o;o="portal"in e?e.portal||a["a"].getDefault():e,await o.load({signal:t});const c=null==(r=o.helperServices)||null==(s=r.geometry)?void 0:s.url;if(!c)throw new n["a"]("internal:geometry-service-url-not-configured");return c}async function l(e,t,r=null,i){const a=await c(r,i),l=new o["a"];l.geometries=[e],l.outSpatialReference=t;const u=await Object(s["a"])(a,l,{signal:i});if(u&&Array.isArray(u)&&1===u.length)return u[0];throw new n["a"]("internal:geometry-service-projection-failed")}},e384:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("b2b2"),n=r("fa73"),a=r("5e82"),s=r("a803");class o extends a["b"]{constructor(e,t,r){super(t),this.symbol=e,this.convert=r,this.graphics3DSymbol=null,this.referenced=0}getSymbolLayerSize(e){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.getSymbolLayerSize(e):null}get symbolLayers(){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.symbolLayers:[]}get extentPadding(){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.extentPadding:0}async doLoad(e){const t=await this.symbol.fetchSymbol({signal:e});t.id=this.symbol.id,this.graphics3DSymbol=this.convert(t),Object(i["k"])(this.graphics3DSymbol)&&await this.graphics3DSymbol.load()}createGraphics3DGraphic(e){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.createGraphics3DGraphic(e,this):null}get complexity(){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.complexity:s["e"]}globalPropertyChanged(e,t){return!!Object(i["k"])(this.graphics3DSymbol)&&this.graphics3DSymbol.globalPropertyChanged(e,t)}applyRendererDiff(e,t){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.applyRendererDiff(e,t):n["a"].Recreate_Symbol}prepareSymbolPatch(e){Object(i["k"])(this.graphics3DSymbol)&&this.graphics3DSymbol.prepareSymbolPatch(e)}updateGeometry(e,t){return!!Object(i["k"])(this.graphics3DSymbol)&&this.graphics3DSymbol.updateGeometry(e,t)}onRemoveGraphic(){}getFastUpdateStatus(){return Object(i["k"])(this.graphics3DSymbol)?this.graphics3DSymbol.getFastUpdateStatus():{loading:1,fast:0,slow:0}}destroy(){Object(i["k"])(this.graphics3DSymbol)&&this.graphics3DSymbol.destroy(),this.graphics3DSymbol=void 0,super.destroy()}get destroyed(){return void 0===this.graphics3DSymbol}}},e38c:function(e,t,r){"use strict";function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,"a",(function(){return i}))},e42f:function(e,t,r){"use strict";function i(e,t,r,i){let n=null,a=1e3;"number"==typeof t?(a=t,i=r):(n=null!=t?t:null,a=r);let s,o=0;const c=()=>{o=0,e.apply(i,s)},l=(...e)=>{n&&n.apply(i,e),s=e,a?o||(o=setTimeout(c,a)):c()};return l.remove=()=>{o&&(clearTimeout(o),o=0)},l.forceUpdate=()=>{o&&(clearTimeout(o),c())},l.hasPendingUpdates=()=>!!o,l}r.d(t,"a",(function(){return i}))},e431:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return J})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return y})),r.d(t,"g",(function(){return g})),r.d(t,"h",(function(){return c})),r.d(t,"i",(function(){return S})),r.d(t,"j",(function(){return T})),r.d(t,"k",(function(){return E})),r.d(t,"l",(function(){return l})),r.d(t,"m",(function(){return s})),r.d(t,"n",(function(){return v})),r.d(t,"o",(function(){return O})),r.d(t,"p",(function(){return $})),r.d(t,"q",(function(){return B})),r.d(t,"r",(function(){return a})),r.d(t,"s",(function(){return M})),r.d(t,"t",(function(){return x})),r.d(t,"u",(function(){return j})),r.d(t,"v",(function(){return _})),r.d(t,"w",(function(){return I})),r.d(t,"x",(function(){return G})),r.d(t,"y",(function(){return o})),r.d(t,"z",(function(){return P})),r.d(t,"A",(function(){return X})),r.d(t,"B",(function(){return H})),r.d(t,"C",(function(){return Y})),r.d(t,"D",(function(){return Z})),r.d(t,"E",(function(){return V})),r.d(t,"F",(function(){return F}));var i=r("0b2d"),n=r("4212");function a(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function c(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function l(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function u(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function d(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function h(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function p(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function f(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function b(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function g(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function y(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function O(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function v(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function _(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function j(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function w(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function x(e,t){const r=t[0],i=t[1],n=t[2];let a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}function T(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function S(e,t,r){const i=t[0],n=t[1],a=t[2],s=r[0],o=r[1],c=r[2];return e[0]=n*c-a*o,e[1]=a*s-i*c,e[2]=i*o-n*s,e}function E(e,t,r,i){const n=t[0],a=t[1],s=t[2];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e[2]=s+i*(r[2]-s),e}function A(e,t,r,i,n,a){const s=a*a,o=s*(2*a-3)+1,c=s*(a-2)+a,l=s*(a-1),u=s*(3-2*a);return e[0]=t[0]*o+r[0]*c+i[0]*l+n[0]*u,e[1]=t[1]*o+r[1]*c+i[1]*l+n[1]*u,e[2]=t[2]*o+r[2]*c+i[2]*l+n[2]*u,e}function C(e,t,r,i,n,a){const s=1-a,o=s*s,c=a*a,l=o*s,u=3*a*o,d=3*c*s,h=c*a;return e[0]=t[0]*l+r[0]*u+i[0]*d+n[0]*h,e[1]=t[1]*l+r[1]*u+i[1]*d+n[1]*h,e[2]=t[2]*l+r[2]*u+i[2]*d+n[2]*h,e}function R(e,t){t=t||1;const r=2*Object(n["b"])()*Math.PI,i=2*Object(n["b"])()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=i*t,e}function M(e,t,r){const i=t[0],n=t[1],a=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12],e[1]=r[1]*i+r[5]*n+r[9]*a+r[13],e[2]=r[2]*i+r[6]*n+r[10]*a+r[14],e}function P(e,t,r){const i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}function I(e,t,r){const i=r[0],n=r[1],a=r[2],s=r[3],o=t[0],c=t[1],l=t[2];let u=n*l-a*c,d=a*o-i*l,h=i*c-n*o,p=n*h-a*d,f=a*u-i*h,b=i*d-n*u;const m=2*s;return u*=m,d*=m,h*=m,p*=2,f*=2,b*=2,e[0]=o+u+p,e[1]=c+d+f,e[2]=l+h+b,e}function D(e,t,r,i){const n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function L(e,t,r,i){const n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function N(e,t,r,i){const n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function F(e,t){s(k,e),s(U,t),x(k,k),x(U,U);const r=T(k,U);return r>1?0:r<-1?Math.PI:Math.acos(r)}const k=Object(i["f"])(),U=Object(i["f"])();function z(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function B(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function V(e,t){if(e===t)return!0;const r=e[0],i=e[1],a=e[2],s=t[0],o=t[1],c=t[2];return Math.abs(r-s)<=n["a"]*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-o)<=n["a"]*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(a-c)<=n["a"]*Math.max(1,Math.abs(a),Math.abs(c))}function G(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],a=r[2]-t[2];let s=i*i+n*n+a*a;return s>0?(s=1/Math.sqrt(s),e[0]=i*s,e[1]=n*s,e[2]=a*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const H=l,q=u,W=d,$=O,Z=v,X=a,Y=_,J=Object.freeze({__proto__:null,length:a,copy:s,set:o,add:c,subtract:l,multiply:u,divide:d,ceil:h,floor:p,min:f,max:b,round:m,scale:g,scaleAndAdd:y,distance:O,squaredDistance:v,squaredLength:_,negate:j,inverse:w,normalize:x,dot:T,cross:S,lerp:E,hermite:A,bezier:C,random:R,transformMat4:M,transformMat3:P,transformQuat:I,rotateX:D,rotateY:L,rotateZ:N,angle:F,str:z,exactEquals:B,equals:V,direction:G,sub:H,mul:q,div:W,dist:$,sqrDist:Z,len:X,sqrLen:Y})},e4b1:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var i=r("1c92"),n=r("7c4b"),a=r("ae54");class s extends n["a"]{constructor(e,t,r,i,n,s=i,o=n){super(),this.triangleCountReportedInDebug=0,this.triangleCount=0,this.texture=null,this.key=new a["a"](e),this.x=t,this.y=r,this.width=i,this.height=n,this.rangeX=s,this.rangeY=o}destroy(){this.texture&&(this.texture.dispose(),this.texture=null)}setTransform(e,t){const r=t/(e.resolution*e.pixelRatio),n=this.transforms.tileMat3,[a,s]=e.toScreenNoRotation([0,0],[this.x,this.y]),o=this.width/this.rangeX*r,c=this.height/this.rangeY*r;Object(i["o"])(n,o,0,0,0,c,0,a,s,1),Object(i["l"])(this.transforms.dvs,e.displayViewMat3,n)}}},e4c1:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return a}));var i=r("6415");function n(e,t,r){if(e.count!==t.count)return void i["a"].error("source and destination buffers need to have the same number of elements");const n=e.count,a=r[0],s=r[1],o=r[2],c=r[3],l=r[4],u=r[5],d=r[6],h=r[7],p=r[8],f=r[9],b=r[10],m=r[11],g=r[12],y=r[13],O=r[14],v=r[15],_=e.typedBuffer,j=e.typedBufferStride,w=t.typedBuffer,x=t.typedBufferStride;for(let i=0;i<n;i++){const e=i*j,t=i*x,r=w[t],n=w[t+1],T=w[t+2],S=w[t+3];_[e]=a*r+l*n+p*T+g*S,_[e+1]=s*r+u*n+f*T+y*S,_[e+2]=o*r+d*n+b*T+O*S,_[e+3]=c*r+h*n+m*T+v*S}}function a(e,t,r){if(e.count!==t.count)return void i["a"].error("source and destination buffers need to have the same number of elements");const n=e.count,a=r[0],s=r[1],o=r[2],c=r[3],l=r[4],u=r[5],d=r[6],h=r[7],p=r[8],f=e.typedBuffer,b=e.typedBufferStride,m=t.typedBuffer,g=t.typedBufferStride;for(let i=0;i<n;i++){const e=i*b,t=i*g,r=m[t],n=m[t+1],y=m[t+2],O=m[t+3];f[e]=a*r+c*n+d*y,f[e+1]=s*r+l*n+h*y,f[e+2]=o*r+u*n+p*y,f[e+3]=O}}function s(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,s=t.typedBuffer,o=t.typedBufferStride;for(let c=0;c<i;c++){const e=c*a,t=c*o;n[e]=r*s[t],n[e+1]=r*s[t+1],n[e+2]=r*s[t+2],n[e+3]=r*s[t+3]}}function o(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,s=t.typedBuffer,o=t.typedBufferStride;for(let c=0;c<i;c++){const e=c*a,t=c*o;n[e]=s[t]>>r,n[e+1]=s[t+1]>>r,n[e+2]=s[t+2]>>r,n[e+3]=s[t+3]>>r}}Object.freeze({__proto__:null,transformMat4:n,transformMat3:a,scale:s,shiftRight:o})},e508:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return o}));var i,n=r("2aad"),a=r("3886"),s=r("690a");function o(e){const t=new s["a"];return t.include(n["a"]),t.fragment.uniforms.add("tex","sampler2D"),e.function===i.Standard&&(e.hasOpacityFactor?(t.fragment.uniforms.add("opacity","float"),t.fragment.code.add(a["a"]`void main() {
  3841. gl_FragColor = texture2D(tex, uv) * opacity;
  3842. }`)):t.fragment.code.add(a["a"]`void main() {
  3843. gl_FragColor = texture2D(tex, uv);
  3844. }`)),e.function===i.OverlayWithTransparency&&(t.fragment.uniforms.add("overlayIdx","int"),e.hasOpacityFactor&&t.fragment.uniforms.add("opacity","float"),t.fragment.code.add(a["a"]`
  3845. void main() {
  3846. vec2 overlayUV = overlayIdx == 0 ? vec2(uv.x * 0.5, uv.y) : vec2(uv.x * 0.5 + 0.5, uv.y);
  3847. gl_FragColor = texture2D(tex, overlayUV) ${e.hasOpacityFactor?"* opacity":""};
  3848. }`)),e.function===i.TransparentToHUDVisibility&&t.fragment.code.add(a["a"]`void main() {
  3849. gl_FragColor = vec4(1.0 - texture2D(tex, uv).a);
  3850. }`),e.function===i.Transparency&&(t.fragment.uniforms.add("colorTexture","sampler2D"),t.fragment.uniforms.add("alphaTexture","sampler2D"),t.fragment.uniforms.add("frontFaceTexture","sampler2D"),t.fragment.code.add(a["a"]`void main() {
  3851. vec4 srcColor = texture2D(colorTexture, uv);
  3852. float srcAlpha = texture2D(alphaTexture, uv).r;
  3853. vec4 frontFace = texture2D(frontFaceTexture, uv);
  3854. if(srcColor.a <= 1e-5){
  3855. discard;
  3856. }
  3857. gl_FragColor = vec4(mix(srcColor.rgb/srcColor.a, frontFace.rgb, frontFace.a), 1.0 - srcAlpha);
  3858. }`)),t}!function(e){e[e.Standard=0]="Standard",e[e.TransparentToHUDVisibility=1]="TransparentToHUDVisibility",e[e.Transparency=2]="Transparency",e[e.OverlayWithTransparency=3]="OverlayWithTransparency",e[e.COUNT=4]="COUNT"}(i||(i={}));const c=Object.freeze({__proto__:null,get CompositingFunction(){return i},build:o})},e550:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("d981"),n=r("f159"),a=r("5d5f"),s=r("df77"),o=r("aff7"),c=r("3886");function l(e,t){e.include(a["a"],t),e.include(n["a"]),e.include(i["a"]),t.cloudsReflectionsEnabled&&e.include(o["a"]),t.ssrEnabled&&e.include(s["a"],t),e.fragment.constants.add("fresnelSky","vec3",[.02,1,15]).add("fresnelMaterial","vec2",[.02,.1]).add("roughness","float",.015).add("foamIntensityExternal","float",1.7).add("ssrIntensity","float",.65).add("ssrHeightFadeStart","float",3e5).add("ssrHeightFadeEnd","float",5e5).add("waterDiffusion","float",.92).add("waterSeaColorMod","float",.8).add("correctionViewingPowerFactor","float",.4).add("skyZenitColor","vec3",[.52,.68,.9]).add("skyColor","vec3",[.67,.79,.9]).add("cloudFresnelModifier","vec2",[1.2,.01]),e.fragment.code.add(c["a"]`PBRShadingWater shadingInfo;
  3859. vec3 getSkyGradientColor(in float cosTheta, in vec3 horizon, in vec3 zenit) {
  3860. float exponent = pow((1.0 - cosTheta), fresnelSky[2]);
  3861. return mix(zenit, horizon, exponent);
  3862. }`),e.fragment.code.add(c["a"]`vec3 getSeaColor(in vec3 n, in vec3 v, in vec3 l, vec3 color, in vec3 lightIntensity, in vec3 localUp, in float shadow, float foamIntensity, vec3 positionView, vec3 position) {
  3863. float reflectionHit = 0.0;
  3864. float reflectionHitDiffused = 0.0;
  3865. vec3 seaWaterColor = linearizeGamma(color);
  3866. vec3 h = normalize(l + v);
  3867. shadingInfo.NdotL = clamp(dot(n, l), 0.0, 1.0);
  3868. shadingInfo.NdotV = clamp(dot(n, v), 0.001, 1.0);
  3869. shadingInfo.VdotN = clamp(dot(v, n), 0.001, 1.0);
  3870. shadingInfo.NdotH = clamp(dot(n, h), 0.0, 1.0);
  3871. shadingInfo.VdotH = clamp(dot(v, h), 0.0, 1.0);
  3872. shadingInfo.LdotH = clamp(dot(l, h), 0.0, 1.0);
  3873. float upDotV = max(dot(localUp,v), 0.0);
  3874. vec3 skyHorizon = linearizeGamma(skyColor);
  3875. vec3 skyZenit = linearizeGamma(skyZenitColor);
  3876. vec3 skyColor = getSkyGradientColor(upDotV, skyHorizon, skyZenit );
  3877. float upDotL = max(dot(localUp,l),0.0);
  3878. float daytimeMod = 0.1 + upDotL * 0.9;
  3879. skyColor *= daytimeMod;
  3880. float shadowModifier = clamp(shadow, 0.8, 1.0);
  3881. vec3 fresnelModifier = fresnelReflection(shadingInfo.VdotN, vec3(fresnelSky[0]), fresnelSky[1]);
  3882. vec3 reflSky = lightingEnvironmentStrength * fresnelModifier * skyColor * shadowModifier;
  3883. vec3 reflSea = seaWaterColor * mix(skyColor, upDotL * lightIntensity * LIGHT_NORMALIZATION, 2.0 / 3.0) * shadowModifier;
  3884. vec3 specular = vec3(0.0);
  3885. if(upDotV > 0.0 && upDotL > 0.0) {
  3886. vec3 specularSun = brdfSpecularWater(shadingInfo, roughness, vec3(fresnelMaterial[0]), fresnelMaterial[1]);
  3887. vec3 incidentLight = lightIntensity * LIGHT_NORMALIZATION * shadow;
  3888. specular = lightingSpecularStrength * shadingInfo.NdotL * incidentLight * specularSun;
  3889. }
  3890. vec3 foam = vec3(0.0);
  3891. if(upDotV > 0.0) {
  3892. foam = foamIntensity2FoamColor(foamIntensityExternal, foamIntensity, skyZenitColor, daytimeMod);
  3893. }
  3894. float correctionViewingFactor = pow(max(dot(v, localUp), 0.0), correctionViewingPowerFactor);
  3895. vec3 normalCorrectedClouds = mix(localUp, n, correctionViewingFactor);
  3896. vec3 reflectedWorld = normalize(reflect(-v, normalCorrectedClouds));`),t.cloudsReflectionsEnabled&&e.fragment.code.add(c["a"]`vec4 cloudsColor = crossFade == 0 ? renderCloud(reflectedWorld, position) : renderCloudCrossFade(reflectedWorld, position);
  3897. cloudsColor.a = 1.0 - cloudsColor.a;
  3898. cloudsColor = pow(cloudsColor, vec4(GAMMA));
  3899. cloudsColor *= clamp(fresnelModifier.y*cloudFresnelModifier[0] - cloudFresnelModifier[1], 0.0, 1.0) * (1.0 - totalFadeInOut);`),t.ssrEnabled?e.fragment.code.add(c["a"]`vec4 viewPosition = vec4(positionView.xyz, 1.0);
  3900. vec3 viewDir = normalize(viewPosition.xyz);
  3901. vec4 viewNormalVectorCoordinate = view *vec4(n, 0.0);
  3902. vec3 viewNormal = normalize(viewNormalVectorCoordinate.xyz);
  3903. vec4 viewUp = view *vec4(localUp, 0.0);
  3904. vec3 viewNormalCorrectedSSR = mix(viewUp.xyz, viewNormal, correctionViewingFactor);
  3905. vec3 reflected = normalize(reflect(viewDir, viewNormalCorrectedSSR));
  3906. vec3 hitCoordinate = screenSpaceIntersection( normalize(reflected), viewPosition.xyz, viewDir, viewUp.xyz);
  3907. vec3 reflectedColor = vec3(0.0);
  3908. if (hitCoordinate.z > 0.0)
  3909. {
  3910. vec2 reprojectedCoordinate = reprojectionCoordinate(hitCoordinate);
  3911. vec2 dCoords = smoothstep(0.3, 0.6, abs(vec2(0.5, 0.5) - hitCoordinate.xy));
  3912. float heightMod = smoothstep(ssrHeightFadeEnd, ssrHeightFadeStart, -positionView.z);
  3913. reflectionHit = clamp(1.0 - (1.3*dCoords.y), 0.0, 1.0) * heightMod;
  3914. reflectionHitDiffused = waterDiffusion * reflectionHit;
  3915. reflectedColor = linearizeGamma(texture2D(lastFrameColorMap, reprojectedCoordinate).xyz)* reflectionHitDiffused * fresnelModifier.y * ssrIntensity;
  3916. }
  3917. float seaColorMod = mix(waterSeaColorMod, waterSeaColorMod*0.5, reflectionHitDiffused);
  3918. vec3 waterRenderedColor = tonemapACES((1.0 - reflectionHitDiffused) * reflSky + reflectedColor + reflSea * seaColorMod + specular + foam);`):e.fragment.code.add(c["a"]`vec3 waterRenderedColor = tonemapACES(reflSky + reflSea * waterSeaColorMod + specular + foam);`),t.cloudsReflectionsEnabled?t.ssrEnabled?e.fragment.code.add(c["a"]`return waterRenderedColor * (1.0 - (1.0 - reflectionHit) * cloudsColor.a) + (1.0 - reflectionHit) * cloudsColor.xyz;
  3919. }`):e.fragment.code.add(c["a"]`return waterRenderedColor * (1.0 - cloudsColor.a) + cloudsColor.xyz;
  3920. }`):e.fragment.code.add(c["a"]`return waterRenderedColor;
  3921. }`)}},e5ec:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386"));let c=i=class extends a["a"]{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],c.prototype,"name",void 0),Object(n["a"])([Object(s["b"])({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=Object(n["a"])([Object(o["a"])("esri.layers.support.CodedValue")],c);const l=c},e64d:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var i,n=r("a4ee"),a=r("b50f"),s=r("fa8a"),o=r("6a0ed"),c=r("8048"),l=r("0028"),u=r("59b2"),d=(r("c120"),r("cea0"),r("afcf")),h=r("d386"),p=r("09db");const f=Object(s["b"])()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),b=f.jsonValues.slice();Object(a["k"])(b,"orthometric");const m=Object(s["b"])()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends o["a"]{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){const i=f.read(e);return i||(r&&r.messages&&r.messages.push(O(e,{context:r})),null)}readHeightUnit(e,t,r){const i=m.read(e);return i||(r&&r.messages&&r.messages.push(y(e,{context:r})),null)}readHeightUnitService(e,t,r){const i=Object(c["t"])(e)||m.read(e);return i||(r&&r.messages&&r.messages.push(y(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=Object(c["i"])(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new l["a"]("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}function O(e,t){return new l["a"]("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}Object(n["a"])([Object(u["b"])({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:b,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),Object(n["a"])([Object(p["a"])("web-scene","heightModel")],g.prototype,"writeHeightModel",null),Object(n["a"])([Object(d["a"])(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),Object(n["a"])([Object(u["b"])({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),Object(n["a"])([Object(d["a"])("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),Object(n["a"])([Object(d["a"])("service","heightUnit")],g.prototype,"readHeightUnitService",null),Object(n["a"])([Object(u["b"])({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),Object(n["a"])([Object(d["a"])("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=Object(n["a"])([Object(h["a"])("esri.geometry.HeightModelInfo")],g);const v=g},e658:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i=r("a4ee"),n=r("2c4f"),a=r("7d7d"),s=r("e92d"),o=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386"));const l="esri.support.TablesMixin",u=s["a"].getLogger(l);function d(e){return e&&"group"===e.type}function h(e,t,r){if(e)for(let i=0,n=e.length;i<n;i++){const n=e.getItemAt(i);if(n[t]===r)return n;if(d(n)){const e=h(n.tables,t,r);if(e)return e}}}const p=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new n["a"],this.tables.on("after-add",e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&u.error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)}),this.tables.on("after-remove",e=>{e.item.parent=null})}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",Object(a["b"])(e,this._get("tables")))}findTableById(e){return h(this.tables,"id",e)}findTableByUid(e){return h(this.tables,"uid",e)}};return Object(i["a"])([Object(o["b"])()],t.prototype,"tables",null),t=Object(i["a"])([Object(c["a"])(l)],t),t}},e66f:function(e,t,r){"use strict";r.d(t,"a",(function(){return D})),r.d(t,"b",(function(){return P})),r.d(t,"c",(function(){return I}));var i=r("2255"),n=r("3c9c"),a=r("7304"),s=r("21ed"),o=r("bd75"),c=r("a05b"),l=r("d272"),u=r("c332"),d=r("dfaf"),h=r("6d5b"),p=r("7d11"),f=r("bc40"),b=r("c2d1"),m=r("6a07"),g=r("d047"),y=r("b418"),O=r("0d7a"),v=r("6316"),_=r("ea4b"),j=r("c6d7"),w=r("a7d7"),x=r("73d4"),T=r("d017"),S=r("cd26a"),E=r("ebd5"),A=r("7c7f"),C=r("3886"),R=r("690a"),M=r("b7bd");const P=new Map([[M["a"].POSITION,0],[M["a"].NORMAL,1],[M["a"].NORMALCOMPRESSED,1],[M["a"].COLOR,2],[M["a"].UV0,3],[M["a"].UVREGION,4],[M["a"].COMPONENTINDEX,5]]);function I(e){const t=new R["a"];t.include(f["a"],e),t.include(p["a"],e),t.include(h["a"],e),t.include(d["a"],e),t.include(o["a"],e),t.include(a["a"],e),t.include(E["a"],e),t.include(l["a"],e),t.include(x["a"],e),t.include(s["a"],e),t.fragment.uniforms.add("view","mat4"),e.pbrMode!==w["a"].Normal&&e.pbrMode!==w["a"].Schematic||(t.include(w["c"],e),e.hasNormalTexture&&t.include(O["a"],e)),e.output===c["a"].Shadow&&e.componentData===a["b"].Varying?t.vertex.code.add(C["a"]`#define discardShadows(castShadows) { if(!castShadows) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`):t.vertex.code.add(C["a"]`#define discardShadows(castShadows) {}`);const r=e.overlayEnabled&&e.output===c["a"].Color&&e.pbrMode===w["a"].WaterOnIntegratedMesh;return e.overlayEnabled&&(t.include(_["a"],e),t.include(S["a"],e),e.viewingMode===n["a"].Global?t.vertex.code.add(C["a"]`
  3922. const float invEllipsoidRadius = ${C["a"].float(1/(e.ellipsoidMode===A["a"].Earth?i["a"].radius:e.ellipsoidMode===A["a"].Mars?i["b"].radius:i["c"].radius))};
  3923. vec2 projectOverlay(vec3 pos) {
  3924. return pos.xy / (1.0 + invEllipsoidRadius * pos.z);
  3925. }
  3926. `):t.vertex.code.add(C["a"]`vec2 projectOverlay(vec3 pos) { return pos.xy; }`)),r&&(t.varyings.add("tbnTangent","vec3"),t.varyings.add("tbnBiTangent","vec3"),t.varyings.add("groundNormal","vec3"),t.varyings.add("positionView","vec3")),t.vertex.code.add(C["a"]`
  3927. void main() {
  3928. bool castShadows;
  3929. vec4 externalColor = forwardExternalColor(castShadows);
  3930. discardShadows(castShadows);
  3931. vertexDiscardByOpacity(externalColor.a);
  3932. if (externalColor.a < ${C["a"].float(E["c"])}) {
  3933. // Discard this vertex
  3934. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  3935. return;
  3936. }
  3937. forwardPosition();
  3938. forwardNormal();
  3939. ${r?C["a"]`
  3940. positionView = position_view();
  3941. ${e.viewingMode===n["a"].Global?C["a"]`
  3942. groundNormal = normalize(positionWorld());
  3943. tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), groundNormal));
  3944. tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:C["a"]`
  3945. groundNormal = vec3(0.0, 0.0, 1.0);
  3946. tbnTangent = vec3(1.0, 0.0, 0.0);
  3947. tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`}
  3948. `:""}
  3949. ${e.overlayEnabled?C["a"]`setOverlayVTC(projectOverlay(position));`:""}
  3950. forwardTextureCoordinates();
  3951. forwardVertexColor();
  3952. forwardLinearDepth(); // depends on forwardPosition()
  3953. }
  3954. `),e.output===c["a"].Alpha&&(t.fragment.include(g["a"]),e.multipassTerrainEnabled&&t.include(j["b"],e),t.include(y["a"],e),t.fragment.code.add(C["a"]`
  3955. void main() {
  3956. discardBySlice(vPositionWorldCameraRelative);
  3957. ${e.multipassTerrainEnabled?C["a"]`terrainDepthTest(gl_FragCoord, vPosition_view.z);`:""}
  3958. vec4 textureColor = readBaseColorTexture();
  3959. discardOrAdjustAlpha(textureColor);
  3960. vec4 externalColor;
  3961. int externalColorMixMode;
  3962. readExternalColor(externalColor, externalColorMixMode);
  3963. vec4 materialColor = computeMaterialColor(
  3964. textureColor,
  3965. externalColor,
  3966. externalColorMixMode
  3967. );
  3968. ${e.overlayEnabled?C["a"]`
  3969. vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
  3970. vec4 overlayColor = overlayOpacity * overlayColorOpaque;
  3971. materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;`:""}
  3972. gl_FragColor = vec4(materialColor.a);
  3973. }
  3974. `)),e.output===c["a"].Color&&(t.fragment.include(g["a"]),e.multipassTerrainEnabled&&t.include(j["b"],e),t.include(y["a"],e),t.include(v["a"],e),t.include(_["a"],e),r&&t.fragment.uniforms.add("ovNormalTex","sampler2D"),e.receiveShadows?(t.include(T["a"],e),t.fragment.code.add(C["a"]`float evaluateShadow() {
  3975. return readShadowMap(vPositionWorldCameraRelative, linearDepth);
  3976. }`)):t.fragment.code.add(C["a"]`float evaluateShadow() { return 0.0; }`),t.fragment.code.add(C["a"]`
  3977. void main() {
  3978. discardBySlice(vPositionWorldCameraRelative);
  3979. ${e.multipassTerrainEnabled?C["a"]`terrainDepthTest(gl_FragCoord, vPosition_view.z);`:""}
  3980. vec4 textureColor = readBaseColorTexture();
  3981. discardOrAdjustAlpha(textureColor);
  3982. vec4 externalColor;
  3983. int externalColorMixMode;
  3984. readExternalColor(externalColor, externalColorMixMode);
  3985. vec4 materialColor = computeMaterialColor(
  3986. textureColor,
  3987. externalColor,
  3988. externalColorMixMode
  3989. );
  3990. ${e.overlayEnabled?C["a"]`
  3991. vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
  3992. vec4 overlayColor = overlayOpacity * overlayColorOpaque;
  3993. materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;`:""}
  3994. `),e.pbrMode===w["a"].Normal||e.pbrMode===w["a"].Schematic?(t.fragment.code.add(C["a"]`
  3995. ${e.pbrMode===w["a"].Normal?C["a"]`
  3996. applyPBRFactors();
  3997. if (int(externalColorMixMode) == 3) {
  3998. mrr = vec3(0.0, 0.6, 0.2);
  3999. }`:""}
  4000. vec3 normalVertex = shadingNormalWorld();
  4001. float additionalIrradiance = 0.02 * lightingMainIntensity[2];
  4002. `),e.hasNormalTexture?t.fragment.code.add(C["a"]`mat3 tangentSpace = computeTangentSpace(normalVertex, vPositionWorldCameraRelative, vuv0);
  4003. vec3 shadingNormal = computeTextureNormal(tangentSpace, vuv0);`):t.fragment.code.add(C["a"]`vec3 shadingNormal = normalVertex;`),t.fragment.code.add(C["a"]`${e.viewingMode===n["a"].Global?C["a"]`vec3 normalGround = normalize(positionWorld());`:C["a"]`vec3 normalGround = vec3(0.0, 0.0, 1.0);`}
  4004. `),t.fragment.code.add(C["a"]`vec3 viewDir = normalize(vPositionWorldCameraRelative);
  4005. float ssao = 1.0 - occlusion * (1.0 - evaluateAmbientOcclusion());
  4006. vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
  4007. vec4 shadedColor = vec4(evaluateSceneLightingPBR(shadingNormal, materialColor.rgb, evaluateShadow(), ssao, additionalLight, viewDir, normalGround, mrr, emission, additionalIrradiance), materialColor.a);`)):(e.receiveShadows?t.fragment.code.add(C["a"]`float shadow = evaluateShadow();`):e.viewingMode===n["a"].Global?t.fragment.code.add(C["a"]`float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());
  4008. float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);`):t.fragment.code.add(C["a"]`float shadow = 0.0;`),t.fragment.code.add(C["a"]`
  4009. float ambientOcclusion = evaluateAmbientOcclusion();
  4010. // At global scale we create some additional ambient light based on the main light to simulate global illumination
  4011. vec3 additionalLight = evaluateAdditionalLighting(ambientOcclusion, positionWorld());
  4012. vec4 shadedColor = vec4(evaluateSceneLighting(shadingNormalWorld(), materialColor.rgb, shadow, ambientOcclusion, additionalLight), materialColor.a);
  4013. ${r?C["a"]`
  4014. vec4 overlayWaterMask = getOverlayColor(ovNormalTex, vtcOverlay);
  4015. float waterNormalLength = length(overlayWaterMask);
  4016. if (waterNormalLength > 0.95) {
  4017. mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, groundNormal);
  4018. vec4 waterOverlayColor = vec4(overlayColorOpaque.xyz, overlayColor.w);
  4019. vec4 waterColorLinear = getOverlayWaterColor(overlayWaterMask, waterOverlayColor, -normalize(vPositionWorldCameraRelative), shadow, groundNormal, tbnMatrix, positionView, positionWorld());
  4020. vec4 waterColorNonLinear = delinearizeGamma(vec4(waterColorLinear.xyz, 1.0));
  4021. // un-gamma the ground color to mix in linear space
  4022. shadedColor = mix(shadedColor, waterColorNonLinear, waterColorLinear.w);
  4023. }`:""}
  4024. `)),t.fragment.code.add(C["a"]`
  4025. gl_FragColor = highlightSlice(shadedColor, vPositionWorldCameraRelative);
  4026. ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  4027. }
  4028. `)),e.output!==c["a"].Depth&&e.output!==c["a"].Shadow||(t.include(b["a"],e),t.fragment.code.add(C["a"]`void main() {
  4029. discardBySlice(vPositionWorldCameraRelative);
  4030. vec4 textureColor = readBaseColorTexture();
  4031. discardOrAdjustAlpha(textureColor);
  4032. outputDepth(linearDepth);
  4033. }`)),e.output===c["a"].Normal&&(t.include(v["a"],e),t.fragment.code.add(C["a"]`
  4034. void main() {
  4035. discardBySlice(vPositionWorldCameraRelative);
  4036. vec4 textureColor = readBaseColorTexture();
  4037. discardOrAdjustAlpha(textureColor);
  4038. // note: the alpha component needs to be 1.0 in order for this material
  4039. // to influence ambient occlusion, see the ssao fragment shader
  4040. float alpha = ${e.normalType===u["b"].Ground?"0.0":"1.0"};
  4041. gl_FragColor = vec4(vec3(.5) + .5 * shadingNormal_view(), alpha);
  4042. }
  4043. `)),e.output===c["a"].Highlight&&(t.include(m["a"]),t.fragment.code.add(C["a"]`
  4044. void main() {
  4045. discardBySlice(vPositionWorldCameraRelative);
  4046. vec4 textureColor = readBaseColorTexture();
  4047. discardOrAdjustAlpha(textureColor);
  4048. ${e.overlayEnabled?C["a"]`
  4049. vec4 overlayColor = getCombinedOverlayColor();
  4050. if (overlayColor.a == 0.0) {
  4051. gl_FragColor = vec4(0.0);
  4052. return;
  4053. }`:""}
  4054. outputHighlight();
  4055. }
  4056. `)),t}const D=Object.freeze({__proto__:null,attributeLocations:P,build:I})},e694:function(e,t,r){"use strict";r.d(t,"a",(function(){return O})),r.d(t,"b",(function(){return v}));var i=r("a4ee"),n=r("fc29"),a=r("b2b2"),s=r("382b"),o=r("7ffa"),c=r("92ef");class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(c["b"]),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[c["a"].DEFAULTS];r&&r.forEach((e,r)=>{t.set(r,Object(o["a"])(e),c["a"].DEFAULTS)});for(let i=c["a"].SERVICE;i<c["b"];i++){const r=this._originStores[i];r&&r.forEach((r,n)=>{e&&e.has(n)||t.set(n,Object(o["a"])(r),i)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=c["a"].USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||Object(a["c"])(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=c["a"].USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),n=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),n!==i}originOf(e){return this._propertyOriginMap.get(e)||c["a"].DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r("0964"),d=r("4c37"),h=r("d386");const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=Object(a["c"])(Object(d["a"])(this)),r=t.store,i=new l;t.store=i,Object(s["a"])(t,r,i)}read(e,t){Object(u["a"])(this,e,t)}getAtOrigin(e,t){const r=f(this),i=Object(c["e"])(t);if("string"==typeof e)return r.get(e,i);const n={};return e.forEach(e=>{n[e]=r.get(e,i)}),n}originOf(e){return Object(c["c"])(this.originIdOf(e))}originIdOf(e){return f(this).originOf(e)}revert(e,t){const r=f(this),i=Object(c["e"])(t),n=Object(d["a"])(this);let a;a="string"==typeof e?"*"===e?r.keys(i):[e]:e,a.forEach(e=>{n.invalidate(e),r.revert(e,i),n.commit(e)})}};return t=Object(i["a"])([Object(h["a"])("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function f(e){return Object(d["a"])(e).store}let b=class extends(p(n["a"])){};b=Object(i["a"])([Object(h["a"])("esri.core.ReadOnlyMultiOriginJSONSupport")],b);var m=r("c478");const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return y(this).delete(e,Object(c["e"])(t))}write(e={},t){return Object(m["b"])(this,e=e||{},t),e}setAtOrigin(e,t,r){Object(d["a"])(this).setAtOrigin(e,t,Object(c["e"])(r))}removeOrigin(e){const t=y(this),r=Object(c["e"])(e),i=t.keys(r);for(const n of i)t.originOf(n)===r&&t.set(n,t.get(n,r),c["a"].USER)}updateOrigin(e,t){const r=y(this),i=Object(c["e"])(t),n=this.get(e);for(let a=i+1;a<c["b"];++a)r.delete(e,a);r.set(e,n,i)}toJSON(e){return this.write({},e)}};return t=Object(i["a"])([Object(h["a"])("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function y(e){return Object(d["a"])(e).store}const O=e=>{let t=class extends(g(p(e))){constructor(...e){super(...e)}};return t=Object(i["a"])([Object(h["a"])("esri.core.MultiOriginJSONSupport")],t),t};let v=class extends(O(n["a"])){};v=Object(i["a"])([Object(h["a"])("esri.core.MultiOriginJSONSupport")],v)},e6aa:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("3886"),n=r("b7bd");function a(e,t){e.vertex.uniforms.add("intrinsicWidth","float"),t.vvSize?(e.attributes.add(n["a"].SIZEFEATUREATTRIBUTE,"float"),e.vertex.uniforms.add("vvSizeMinSize","vec3"),e.vertex.uniforms.add("vvSizeMaxSize","vec3"),e.vertex.uniforms.add("vvSizeOffset","vec3"),e.vertex.uniforms.add("vvSizeFactor","vec3"),e.vertex.code.add(i["a"]`float getSize() {
  4057. return intrinsicWidth * clamp(vvSizeOffset + sizeFeatureAttribute * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).x;
  4058. }`)):(e.attributes.add(n["a"].SIZE,"float"),e.vertex.code.add(i["a"]`float getSize(){
  4059. return intrinsicWidth * size;
  4060. }`)),t.vvOpacity?(e.attributes.add(n["a"].OPACITYFEATUREATTRIBUTE,"float"),e.vertex.constants.add("vvOpacityNumber","int",8),e.vertex.code.add(i["a"]`uniform float vvOpacityValues[vvOpacityNumber];
  4061. uniform float vvOpacityOpacities[vvOpacityNumber];
  4062. float interpolateOpacity( float value ){
  4063. if (value <= vvOpacityValues[0]) {
  4064. return vvOpacityOpacities[0];
  4065. }
  4066. for (int i = 1; i < vvOpacityNumber; ++i) {
  4067. if (vvOpacityValues[i] >= value) {
  4068. float f = (value - vvOpacityValues[i-1]) / (vvOpacityValues[i] - vvOpacityValues[i-1]);
  4069. return mix(vvOpacityOpacities[i-1], vvOpacityOpacities[i], f);
  4070. }
  4071. }
  4072. return vvOpacityOpacities[vvOpacityNumber - 1];
  4073. }
  4074. vec4 applyOpacity( vec4 color ){
  4075. return vec4(color.xyz, interpolateOpacity(opacityFeatureAttribute));
  4076. }`)):e.vertex.code.add(i["a"]`vec4 applyOpacity( vec4 color ){
  4077. return color;
  4078. }`),t.vvColor?(e.attributes.add(n["a"].COLORFEATUREATTRIBUTE,"float"),e.vertex.constants.add("vvColorNumber","int",8),e.vertex.code.add(i["a"]`uniform float vvColorValues[vvColorNumber];
  4079. uniform vec4 vvColorColors[vvColorNumber];
  4080. vec4 interpolateColor( float value ) {
  4081. if (value <= vvColorValues[0]) {
  4082. return vvColorColors[0];
  4083. }
  4084. for (int i = 1; i < vvColorNumber; ++i) {
  4085. if (vvColorValues[i] >= value) {
  4086. float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);
  4087. return mix(vvColorColors[i-1], vvColorColors[i], f);
  4088. }
  4089. }
  4090. return vvColorColors[vvColorNumber - 1];
  4091. }
  4092. vec4 getColor(){
  4093. return applyOpacity(interpolateColor(colorFeatureAttribute));
  4094. }`)):(e.attributes.add(n["a"].COLOR,"vec4"),e.vertex.code.add(i["a"]`vec4 getColor(){
  4095. return applyOpacity(color);
  4096. }`))}},e6bc:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(e,t,r){this.graphic=e,this.renderingInfo=t,this.layer=r}}},e6c2:function(e,t,r){"use strict";r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return A})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return w}));var i=r("702a");const n="http://www.w3.org/",a=n+"2000/svg",s=n+"1999/xlink";let o,c=[],l=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},u=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),d=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},h=(e,t,r)=>{if(""!==t.vnodeSelector)for(let i=r;i<e.length;i++)if(u(e[i],t))return i;return-1},p=(e,t,r,i)=>{let n=e[t];if(""===n.vnodeSelector)return;let a=n.properties;if(!(a?void 0===a.key?a.bind:a.key:void 0))for(let s=0;s<e.length;s++)if(s!==t){let t=e[s];if(u(t,n))throw new Error(`${r.vnodeSelector} had a ${n.vnodeSelector} child ${"added"===i?i:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},f=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},b=[],m=!1,g=e=>{(e.children||[]).forEach(g),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},y=()=>{m=!1,b.forEach(g),b.length=0},O=e=>{b.push(e),m||(m=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(y,{timeout:16}):setTimeout(y,16))},v=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let i=()=>{t.parentNode&&(t.parentNode.removeChild(t),O(e))};return void r(t,i,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),O(e))},_=(e,t,r)=>{if(!t)return;let n=r.eventHandlerInterceptor,o=Object.keys(t),c=o.length;for(let l=0;l<c;l++){let c=o[l],u=t[c];if("className"===c)throw new Error('Property "className" is not supported, use "class".');if("class"===c)T(e,u,!0);else if("classes"===c){let t=Object.keys(u),r=t.length;for(let i=0;i<r;i++){let r=t[i];u[r]&&e.classList.add(r)}}else if("styles"===c){let t=Object.keys(u),i=t.length;for(let n=0;n<i;n++){let i=t[n],a=u[i];a&&(d(a),r.styleApplyer(e,i,a))}}else if("key"!==c&&null!=u){let o=typeof u;"function"===o?(0===c.lastIndexOf("on",0)&&(n&&(u=n(c,u,e,t)),"oninput"===c&&function(){let e=u;u=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[c]=u):r.namespace===a?"href"===c?e.setAttributeNS(s,c,u):e.setAttribute(c,u):"string"===o&&"value"!==c?"innerHTML"===c?e[c]=i["f"].sanitize(u):e.setAttribute(c,u):e[c]=u}}},j=(e,t,r)=>{if(t)for(let i of t)x(i,e,void 0,r)},w=(e,t,r)=>{j(e,t.children,r),t.text&&(e.textContent=t.text),_(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},x=(e,t,r,i)=>{let n,s=0,o=e.vnodeSelector,c=t.ownerDocument;if(""===o)n=e.domNode=c.createTextNode(e.text),void 0!==r?t.insertBefore(n,r):t.appendChild(n);else{for(let u=0;u<=o.length;++u){let d=o.charAt(u);if(u===o.length||"."===d||"#"===d){let d=o.charAt(s-1),h=o.slice(s,u);"."===d?n.classList.add(h):"#"===d?n.id=h:("svg"===h&&(i=l(i,{namespace:a})),void 0!==i.namespace?n=e.domNode=c.createElementNS(i.namespace,h):(n=e.domNode=e.domNode||c.createElement(h),"input"===h&&e.properties&&void 0!==e.properties.type&&n.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(n,r):n.parentNode!==t&&t.appendChild(n)),s=u+1}}w(n,e,i)}},T=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},S=(e,t,r,n)=>{if(!r)return;let o=!1,c=Object.keys(r),l=c.length;for(let u=0;u<l;u++){let l=c[u],h=r[l],p=t[l];if("class"===l)p!==h&&(T(e,p,!1),T(e,h,!0));else if("classes"===l){let t=e.classList,r=Object.keys(h),i=r.length;for(let e=0;e<i;e++){let i=r[e],n=!!h[i];n!==!!p[i]&&(o=!0,n?t.add(i):t.remove(i))}}else if("styles"===l){let t=Object.keys(h),r=t.length;for(let i=0;i<r;i++){let r=t[i],a=h[r];a!==p[r]&&(o=!0,a?(d(a),n.styleApplyer(e,r,a)):n.styleApplyer(e,r,""))}}else if(h||"string"!=typeof p||(h=""),"value"===l){let t=e[l];t!==h&&(e["oninput-value"]?t===e["oninput-value"]:h!==p)&&(e[l]=h,e["oninput-value"]=void 0),h!==p&&(o=!0)}else if(h!==p){let t=typeof h;"function"===t&&n.eventHandlerInterceptor||(n.namespace===a?"href"===l?e.setAttributeNS(s,l,h):e.setAttribute(l,h):"string"===t?"innerHTML"===l?e[l]=i["f"].sanitize(h):"role"===l&&""===h?e.removeAttribute(l):e.setAttribute(l,h):e[l]!==h&&(e[l]=h),o=!0)}}return o},E=(e,t,r,i,n)=>{if(r===i)return!1;i=i||c;let a,s=(r=r||c).length,l=i.length,d=0,b=0,m=!1;for(;b<l;){let c=d<s?r[d]:void 0,l=i[b];if(void 0!==c&&u(c,l))m=o(c,l,n)||m,d++;else{let c=h(r,l,d+1);if(c>=0){for(a=d;a<c;a++)v(r[a]),p(r,a,e,"removed");m=o(r[c],l,n)||m,d=c+1}else x(l,t,d<s?r[d].domNode:void 0,n),f(l),p(i,b,e,"added")}b++}if(s>d)for(a=d;a<s;a++)v(r[a]),p(r,a,e,"removed");return m};o=(e,t,r)=>{let i=e.domNode,n=!1;if(e===t)return!1;let s=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=i.ownerDocument.createTextNode(t.text);return i.parentNode.replaceChild(e,i),t.domNode=e,n=!0,n}t.domNode=i}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=l(r,{namespace:a})),e.text!==t.text&&(s=!0,void 0===t.text?i.removeChild(i.firstChild):i.textContent=t.text),t.domNode=i,s=E(t,i,e.children,t.children,r)||s,s=S(i,e.properties,t.properties,r)||s,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[i,r,t.vnodeSelector,t.properties,t.children]);return s&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(i,t.properties,e.properties),n};let A=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let i=e;e=r,o(i,r,t)},domNode:e.domNode})},e764:function(e,t,r){"use strict";function i(){const e=new Float32Array(4);return e[3]=1,e}function n(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(e,t,r,i){const n=new Float32Array(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function s(e,t){return new Float32Array(e,t,4)}r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n}));Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s})},e87c:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("b2b2"),n=r("b0f5");function a(e,t,r){if(!r||!r.features||!r.hasZ)return;const a=Object(n["a"])(r.geometryType,t,e.outSpatialReference);if(!Object(i["j"])(a))for(const i of r.features)a(i.geometry)}},e92d:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("1325"),n=(r("c120"),r("b2b2")),a=r("b3b6");const s={info:0,warn:1,error:2,none:3};class o{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,o._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=o.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=o._loggers;return o._loggers=e,t},set throttlingDisabled(e){o._throttlingDisabled=e}}}static getLogger(e){let t=o._loggers[e];return t||(t=new o({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!o._throttlingDisabled){const i=this._argsToKey(r),n=this._loggedMessages[e].get(i);if("once"===t&&null!=n||"oncePerTick"===t&&n&&n>=o._tickCounter)return;this._loggedMessages[e].set(i,o._tickCounter),o._scheduleTickCounterIncrement()}for(const t of i["a"].log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;Object(n["k"])(r);){const t=r[e];if(Object(n["k"])(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=i["a"].log.level?i["a"].log.level:"warn";return s[this._parentWithMember("level",t)]<=s[e]}_argsToKey(...e){const t=(e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]";return Object(a["b"])(JSON.stringify(e,t))}static _scheduleTickCounterIncrement(){o._tickCounterScheduled||(o._tickCounterScheduled=!0,Promise.resolve().then(()=>{o._tickCounter++,o._tickCounterScheduled=!1}))}}o._loggers={},o._tickCounter=0,o._tickCounterScheduled=!1,o._throttlingDisabled=!1},e9a4:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var i,n=r("a4ee"),a=r("fc29"),s=r("fa8a"),o=r("7ffa"),c=r("b2b2"),l=r("59b2"),u=(r("cea0"),r("d386")),d=r("3af1"),h=r("5996"),p=r("9786");const f=new s["a"]({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let b=i=class extends a["a"]{constructor(e){super(e),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}clone(){return new i({categories:this.categories?Object(o["a"])(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(e,t){let r,i;if(this.categories&&(r=this.categories.map(e=>Array.isArray(e)?JSON.stringify(e):e)),this.extent){const e=Object(p["d"])(this.extent,h["a"].WGS84);Object(c["k"])(e)&&(i=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let n=this.query;!this.disableExtraQuery&&e.extraQuery&&(n="("+n+")"+e.extraQuery);const a={categories:r,bbox:i,q:n,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(a.sortField=this.sortField.split(",").map(e=>f.toJSON(e.trim())).join(","),a.sortOrder=this.sortOrder),{query:{...t,...a}}}};Object(n["a"])([Object(l["b"])()],b.prototype,"categories",void 0),Object(n["a"])([Object(l["b"])()],b.prototype,"disableExtraQuery",void 0),Object(n["a"])([Object(l["b"])({type:d["a"]})],b.prototype,"extent",void 0),Object(n["a"])([Object(l["b"])()],b.prototype,"filter",void 0),Object(n["a"])([Object(l["b"])()],b.prototype,"num",void 0),Object(n["a"])([Object(l["b"])()],b.prototype,"query",void 0),Object(n["a"])([Object(l["b"])()],b.prototype,"sortField",void 0),Object(n["a"])([Object(l["b"])()],b.prototype,"sortOrder",null),Object(n["a"])([Object(l["b"])()],b.prototype,"start",void 0),b=i=Object(n["a"])([Object(u["a"])("esri.portal.PortalQueryParams")],b);const m=b},e9d0:function(e,t,r){"use strict";r.d(t,"a",(function(){return $}));var i,n=r("a4ee"),a=(r("e06a"),r("4856")),s=(r("b423"),r("261a"),r("b48d"),r("478c"),r("667b"),r("ff57"),r("da00"),r("f976"),r("5cdb")),o=r("2eab"),c=r("1fd7"),l=r("2c4f"),u=r("ce50"),d=r("9096"),h=r("a5d8"),p=r("7ffa"),f=r("6d5f"),b=r("e92d"),m=r("b2b2"),g=r("e694"),y=r("e041"),O=r("59b2"),v=r("4c37"),_=r("1a3e"),j=r("afcf"),w=r("d386"),x=r("09db"),T=r("cea0"),S=r("92ef"),E=r("a2b1"),A=r("a1f3"),C=r("80b7"),R=r("c246"),M=r("00c5"),P=r("624c"),I=r("5a61"),D=r("69dd"),L=r("f51b"),N=r("f353"),F=r("3af1");function k(e){return e&&"esriSMS"===e.type}function U(e,t,r){var i;const n=this.originIdOf(t)>=Object(S["e"])(r.origin);return{ignoreOrigin:!0,allowNull:n,enabled:!!r&&"map-image"===(null==(i=r.layer)?void 0:i.type)&&(r.writeSublayerStructure||n)}}function z(e,t,r){var i;return{enabled:!!r&&"tile"===(null==(i=r.layer)?void 0:i.type)&&this._isOverridden(t)}}function B(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function V(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=Object(S["e"])(r.origin))}}const G=b["a"].getLogger("esri.layers.support.Sublayer");let H=0;const q=new Set;q.add("layer"),q.add("parent"),q.add("loaded"),q.add("loadStatus"),q.add("loadError"),q.add("loadWarnings");let W=i=class extends(Object(d["b"])(Object(g["a"])(Object(h["b"])(f["a"])))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null}async load(e){return this.addResolvingPromise((async()=>{var t;if(!this.layer&&!this.url)throw new u["a"]("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});let r=null;if(!this.layer||this.originIdOf("url")>S["a"].SERVICE||"data-layer"===(null==(t=this.source)?void 0:t.type))r=(await Object(o["default"])(this.url,{responseType:"json",query:{f:"json"},...e})).data;else{var i;let t=this.id;"map-layer"===(null==(i=this.source)?void 0:i.type)&&(t=this.source.mapLayerId),r=await this.layer.fetchSublayerInfo(t,e)}r&&(this.sourceJSON=r,this.read({layerDefinition:r},{origin:"service"}))})()),this}readCapabilities(e,t){const r=(e=(t=t.layerDefinition||t).capabilities||e)?e.toLowerCase().split(",").map(e=>e.trim()):[];return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:-1!==r.indexOf("query")}}}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get fieldsIndex(){return new C["a"](this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeGlobalID"===r.type)return r.name}get id(){const e=this._get("id");return null==e?H++:e}set id(e){this._get("id")!==e&&(!1!==this.get("layer.capabilities.exportMap.supportsDynamicLayers")?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach(t=>t.layer=e)}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeOID"===r.type)return r.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*(null!=r.transparency?r.transparency:r.drawingInfo.transparency)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=Object(T["e"])(this.parent.id):t.parentLayerId=-1}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){if(e)for(const t of e.getSymbols())if(Object(c["c"])(t)){G.warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new I["a"]({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return Object(T["m"])(l["a"].ofType(i),e)}writeSublayers(e,t,r){this.get("sublayers.length")&&(t[r]=this.sublayers.map(e=>e.id).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return null}get url(){var e,t;const r=null!=(e=null==(t=this.layer)?void 0:t.parsedUrl)?e:this._lastParsedUrl,i=this.source;if(!r)return null;if(this._lastParsedUrl=r,"map-layer"===(null==i?void 0:i.type))return`${r.path}/${i.mapLayerId}`;const n={layer:JSON.stringify({source:this.source})};return`${r.path}/dynamicLayer?${Object(y["G"])(n)}`}set url(e){e?this._override("url",e):this._clearOverride("url")}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=Object(v["a"])(this),t=new i;return Object(v["a"])(t).store=e.clone(q),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return Object(L["a"])(this,e)}createQuery(){return new D["a"]({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){var e,t;if(this.hasOwnProperty("sublayers"))return null;const i=null==(e=this.layer)?void 0:e.parsedUrl,n=new(0,(await Promise.resolve().then(r.bind(null,"5bd5"))).default)({url:i.path});return i&&this.source&&("map-layer"===this.source.type?n.layerId=this.source.mapLayerId:n.dynamicDataSource=this.source),null!=this.layer.refreshInterval&&(n.refreshInterval=this.layer.refreshInterval),this.definitionExpression&&(n.definitionExpression=this.definitionExpression),this.floorInfo&&(n.floorInfo=Object(p["a"])(this.floorInfo)),this.originIdOf("labelingInfo")>S["a"].SERVICE&&(n.labelingInfo=Object(p["a"])(this.labelingInfo)),this.originIdOf("labelsVisible")>S["a"].DEFAULTS&&(n.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>S["a"].DEFAULTS&&(n.legendEnabled=this.legendEnabled),this.originIdOf("visible")>S["a"].DEFAULTS&&(n.visible=this.visible),this.originIdOf("minScale")>S["a"].DEFAULTS&&(n.minScale=this.minScale),this.originIdOf("maxScale")>S["a"].DEFAULTS&&(n.maxScale=this.maxScale),this.originIdOf("opacity")>S["a"].DEFAULTS&&(n.opacity=this.opacity),this.originIdOf("popupTemplate")>S["a"].DEFAULTS&&(n.popupTemplate=Object(p["a"])(this.popupTemplate)),this.originIdOf("renderer")>S["a"].SERVICE&&(n.renderer=Object(p["a"])(this.renderer)),"data-layer"===(null==(t=this.source)?void 0:t.type)&&(n.dynamicDataSource=this.source.clone()),this.originIdOf("title")>S["a"].DEFAULTS&&(n.title=this.title),"map-image"===this.layer.type&&this.layer.originIdOf("customParameters")>S["a"].DEFAULTS&&(n.customParameters=this.layer.customParameters),"tile"===this.layer.type&&this.layer.originIdOf("customParameters")>S["a"].DEFAULTS&&(n.customParameters=this.layer.customParameters),n}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let n=null;return r.some(e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(n=e),!!n)}),n}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryFeatures(e=this.createQuery(),t){var i,n,a,s;if(await this.load(),!this.get("capabilities.operations.supportsQuery"))throw new u["a"]("Sublayer.queryFeatures","this layer doesn't support queries.");const[{executeQuery:o},{default:c}]=await Promise.all([Promise.resolve().then(r.bind(null,"e9fc")),Promise.resolve().then(r.bind(null,"2edc"))]),l=await o(this.url,D["a"].from(e),null!=(i=null==(n=this.layer)?void 0:n.spatialReference)?i:null,{...t,query:{...null==(a=this.layer)?void 0:a.customParameters,token:null==(s=this.layer)?void 0:s.apiKey}}),d=c.fromJSON(l.data);if(null!=d&&d.features)for(const r of d.features)r.sourceLayer=this;return d}toExportImageJSON(e){var t;const r={id:this.id,source:(null==(t=this.source)?void 0:t.toJSON())||{mapLayerId:this.id,type:"mapLayer"}};if(this.definitionExpression){const t=Object(m["k"])(e)?Object(N["a"])(e,this):this.definitionExpression;r.definitionExpression=t}else Object(m["k"])(e)&&(r.definitionExpression=e);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,t)=>(e[t]=this.originIdOf(t),e),{}),n=Object.keys(i).some(e=>i[e]>S["a"].SERVICE);if(n){const e=r.drawingInfo={};i.renderer>S["a"].SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>S["a"].SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>S["a"].SERVICE&&(e.labelingInfo=this.labelingInfo?this.labelingInfo.map(e=>e.write({},{origin:"service",layer:this.layer})):null,e.showLabels=!0),i.opacity>S["a"].SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return r}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){const r="uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:[];for(const e of r)k(e.symbol)&&t(e.symbol);"symbol"in e&&k(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&k(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let n,a;switch(e){case"definitionExpression":case"floorInfo":n="supportsSublayerDefinitionExpression";case"minScale":case"maxScale":case"visible":n="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":n="supportsDynamicLayers",a="supportsModification"}const s=Object(v["a"])(this).getDefaultOrigin();if("service"!==s){if(n&&!1===this.get("layer.capabilities.exportMap."+n))return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${n}'`);if(a&&!1===this.get("capabilities.exportMap."+a))return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${a}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==s&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.handles.removeAll()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.handles.add([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{const t=this.get("layer.capabilities.exportMap.supportsSublayersChanges");null==t||t||(G.error(new u["a"]("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,t){G.error(new u["a"]("sublayer:locked",`Property '${e}' can't be changed on Sublayer from the layer '${this.layer.id}'`,{reason:t,sublayer:this,layer:this.layer}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===B||e===U,isTileImageLayerOverridePolicy:e=>e===z},Object(n["a"])([Object(O["b"])({readOnly:!0})],W.prototype,"capabilities",void 0),Object(n["a"])([Object(j["a"])("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),Object(n["a"])([Object(O["b"])({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:U}}})],W.prototype,"definitionExpression",null),Object(n["a"])([Object(O["b"])({type:[A["a"]],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),Object(n["a"])([Object(O["b"])({readOnly:!0})],W.prototype,"fieldsIndex",null),Object(n["a"])([Object(O["b"])({type:M["a"],value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:U},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),Object(n["a"])([Object(O["b"])({type:F["a"],json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),Object(n["a"])([Object(O["b"])({type:String})],W.prototype,"globalIdField",void 0),Object(n["a"])([Object(j["a"])("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),Object(n["a"])([Object(O["b"])({type:T["a"],json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),Object(n["a"])([Object(O["b"])({value:null,type:[R["a"]],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:B}}})],W.prototype,"labelingInfo",null),Object(n["a"])([Object(x["a"])("labelingInfo")],W.prototype,"writeLabelingInfo",null),Object(n["a"])([Object(O["b"])({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:B}}})],W.prototype,"labelsVisible",null),Object(n["a"])([Object(O["b"])({value:null})],W.prototype,"layer",null),Object(n["a"])([Object(O["b"])({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:V}}})],W.prototype,"legendEnabled",void 0),Object(n["a"])([Object(O["b"])({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),Object(n["a"])([Object(O["b"])({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"minScale",null),Object(n["a"])([Object(j["a"])("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),Object(n["a"])([Object(O["b"])({type:Number,value:0,json:{write:{overridePolicy:B}}})],W.prototype,"maxScale",null),Object(n["a"])([Object(j["a"])("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),Object(n["a"])([Object(O["b"])({readOnly:!0})],W.prototype,"effectiveScaleRange",null),Object(n["a"])([Object(O["b"])({type:String})],W.prototype,"objectIdField",void 0),Object(n["a"])([Object(j["a"])("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),Object(n["a"])([Object(O["b"])({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:B}}})],W.prototype,"opacity",null),Object(n["a"])([Object(j["a"])("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),Object(n["a"])([Object(x["a"])("opacity")],W.prototype,"writeOpacity",null),Object(n["a"])([Object(O["b"])({json:{type:T["a"],write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:B}}})],W.prototype,"parent",void 0),Object(n["a"])([Object(x["a"])("parent")],W.prototype,"writeParent",null),Object(n["a"])([Object(O["b"])({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:V,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),Object(n["a"])([Object(O["b"])({type:a["a"],json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:V}}})],W.prototype,"popupTemplate",void 0),Object(n["a"])([Object(O["b"])({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),Object(n["a"])([Object(O["b"])({types:s["a"],value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B},origins:{"web-scene":{types:s["b"],name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:B}}}}})],W.prototype,"renderer",null),Object(n["a"])([Object(O["b"])({types:{key:"type",base:null,typeMap:{"data-layer":P["a"],"map-layer":I["a"]}},cast(e){if(e){if("mapLayerId"in e)return Object(T["d"])(I["a"],e);if("dataSource"in e)return Object(T["d"])(P["a"],e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:B}}})],W.prototype,"source",null),Object(n["a"])([Object(O["b"])()],W.prototype,"sourceJSON",void 0),Object(n["a"])([Object(O["b"])({value:null,json:{type:[T["a"]],write:{target:"subLayerIds",allowNull:!0,overridePolicy:B}}})],W.prototype,"sublayers",null),Object(n["a"])([Object(_["a"])("sublayers")],W.prototype,"castSublayers",null),Object(n["a"])([Object(x["a"])("sublayers")],W.prototype,"writeSublayers",null),Object(n["a"])([Object(O["b"])({type:String,json:{name:"name",write:{overridePolicy:V}}})],W.prototype,"title",void 0),Object(n["a"])([Object(O["b"])({type:String})],W.prototype,"typeIdField",void 0),Object(n["a"])([Object(j["a"])("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),Object(n["a"])([Object(O["b"])({type:[E["a"]],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),Object(n["a"])([Object(O["b"])({type:String,json:{read:{source:"layerUrl"},write:{target:"layerUrl",overridePolicy:z}}})],W.prototype,"url",null),Object(n["a"])([Object(O["b"])({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:B}}})],W.prototype,"visible",null),Object(n["a"])([Object(x["a"])("visible")],W.prototype,"writeVisible",null),W=i=Object(n["a"])([Object(w["a"])("esri.layers.support.Sublayer")],W);const $=W},e9d6:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return p})),r.d(t,"g",(function(){return d})),r.d(t,"h",(function(){return f}));var i=r("e92d"),n=r("d3cf"),a=r("82fa");const s=i["a"].getLogger("esri.views.3d.layers.graphics.featureExpressionInfoUtils");function o(e){return{cachedResult:e.cachedResult,arcade:e.arcade?{func:e.arcade.func,context:e.arcade.modules.arcadeUtils.createExecContext(null,{sr:e.arcade.context.spatialReference}),modules:e.arcade.modules}:null}}function c(e){const t=e&&e.expression;if("string"==typeof t){const e=m(t);if(null!=e)return{cachedResult:e}}return null}async function l(e,t,r){const i=e&&e.expression;if("string"!=typeof i)return null;const n=m(i);if(null!=n)return{cachedResult:n};const s=await Object(a["e"])(),o=s.arcadeUtils,c=o.createSyntaxTree(i);return o.dependsOnView(c)?(null!=r&&r.error("Expressions containing '$view' are not supported on ElevationInfo"),{cachedResult:0}):{arcade:{func:o.createFunction(c),context:o.createExecContext(null,{sr:t}),modules:s}}}function u(e,t,r){return e.arcadeUtils.createFeature(t.attributes,t.geometry,r)}function d(e,t){if(null!=e&&!b(e)){if(!t||!e.arcade)return void s.errorOncePerTick("Arcade support required but not provided");const r=t;r._geometry&&(r._geometry=Object(n["b"])(r._geometry)),e.arcade.modules.arcadeUtils.updateExecContext(e.arcade.context,t)}}function h(e){if(null!=e){if(b(e))return e.cachedResult;const t=e.arcade;let r=e.arcade.modules.arcadeUtils.executeFunction(t.func,t.context);return"number"!=typeof r&&(e.cachedResult=0,r=0),r}return 0}function p(e,t=!1){let r=e&&e.featureExpressionInfo;const i=r&&r.expression;return t||"0"===i||(r=null),r}const f={cachedResult:0};function b(e){return null!=e.cachedResult}function m(e){return"0"===e?0:null}},e9e3:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFMDhENDRFRUM5RDExMUVCOTgyQ0ZDNjhERjU3OTM1RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFMDhENDRFRkM5RDExMUVCOTgyQ0ZDNjhERjU3OTM1RiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkUwOEQ0NEVDQzlEMTExRUI5ODJDRkM2OERGNTc5MzVGIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkUwOEQ0NEVEQzlEMTExRUI5ODJDRkM2OERGNTc5MzVGIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+zPOAzQAABpZJREFUeNrUWGtsU2UYfk972nPt6dpudevYhW7dxmCbDnYDBARJNBq8EA1R/+gGITFq/OE/LzGif9T4B1TkYtBgjEYRiUZMUDE4YYzBdDg3GGO06wZb263turbn5vtVB2pEYKywfklz+n3fe06fPt/z3g7oug4z/Wl83LMgHc8lHwOkYWhGeS2kaaQFsGqUl2QUYIWOz88whpNZTU+U5WcOYEOS1SmtJpM0bEDAlRkBGKVQxvEm0AyqJyMAI7OlAsfiVS3KFMDlFoFDhpXcTAFcwCPDmlHJyQzABrWIMKwaZCkdgOkZT8uUmiNwDInF3NRaY0vJY6pBWUErzMs/7+z1ziqGMTo4LQJPABsXP1GevXCjqzWU1f9h1TJX87jVewajSN6sYlg3KBKPDLOcCcYln/+u5StM9yy9E2LyKHQPdNN6WFuEZvtmDWA8eqmrdwAm4wl4et2TpvoF1RCI+mD3N5/BpJ/28bpx/6xhuLHZsyBhDwtnvRTcXr0EBIGB0MQwfPj1p/D7seAZftIxr3VnT/J6foMiRfFMDNSrOSIOBx69+3GxsXIRtA/sh+1ffQQ1Hg+c6gj9xsazqhCsNivCGqnMJvgRv8pPiI8sXQ/u3FJomF8LuqZDZ3cfmBOWTTMBdkYYbmr2LIuIQ9/mu0VmeelDIPE2GJ04B2MJHxzsPASrl9TCl9+26VK44NW2bf0v3FTADS0l68OS793VK6oM/gtB+KWnH0wyn1CZBKPrGhhlRq2vm2v0FOfDrj0HQAq7vmrf6rv3pgCu31D0DoatjWvvXgzdfV443RWKCrHsZynN2KoWjZ6U1QSwg65qmZ58NSpeuHd5UyUVi8ehqzXUw8WzalEisRuiYXQuAyaDH8es5zY21ZbD3n0d8uBReMMSzbUe3t63HSnIF1kRWDNDzC3I6BpbqLji6HfDXW0neqF6qaM8Klzwoe5L0g4YwdpjXLC/cql0u1E1aV0HI19Yw3PsbdvOPjflVFj8uATOAhyDJSboqYoN03Fvx9vDVbaQe82J1uHRwgrBFpYGu1H/q9MGGBmpxrB1bpILFp78abw9a6zY3b7V+wACjf4j04F+S4phhiHgnX/fO7zj9L7OzcGckROmFyjcHLMO7G9ocT8944Abm0sfxDrgmFE1j9pD7qaOd4bqkLWBy5SXOUJKEizxkOz/sjmyrX+TFMnPEidu+SRi8b9Vt6Fw14wBrl8/95VJLvS2FHG1nNgyUvzzjlOHr1AP54jcnxpGtu2Xs8OTiR/d6l1nHS90Yw9YiX5xCCV3xcz7vwYN6+c+TyB0bg5cdfeAgG0phpMpSWRdyf6vk6pDPa+S6fgWlN6LuHb+mgGT0tAI5jcIE9fYcdhEdDo2TgDrWVd7H57cAbwcQMBF02IYgY5Os0WShKmwht+v9f7L+UY6ezpRuBQlxEzo6YSLTkfpMw74uuvhsueof8xZysoShnmGI/2d8O/9f4/e1/Wbx7Aj4LlVNSp8yulQEppBscwqSZDXUlJ4zh4szgMGzaQlCwePa+ykecrpFCHiMGi0xiakcUvEdcARLL3jpkgCQ56UMEe+idrPN91a44T5JQtgXkEV5Eol8MybL8FU8ZPvzIOND6+hevxdUveZvpVHjvWt5GMOHxe33R+wnz52QwCT+BwVh/sqFnFSw6IasPJ2cLAlkM2VgI0thon4JKScDiUhyxo4LW4wFCrgdJqgfmEetB8fmtN2eOAopvjmoO3M+2mXBDK7t7KOk5YtLgDGbASTgQeWtgJvcoBB44ExmaDjdDsExscgnkik1sk+saPQ/+pq82DlqnwqbPG/lx0oE9MPmIncVl7muPQAigYjZQaaYkBVAeYX1cDH338AP7Qdh4rCytQ62Sd2U2NeeTY48ow0OuXatEuCwkCbTKqX3vToCqh6EhQ9AXaeh9c3bL64J2sxCMb7U/vE7u9DUTWSZSJpZxjbm/d//W0Ej1u5CCqujENMDsCEPJqaE3DkSuZkneyT+cW0f8QHMT8bCNr7Pr8hPR0pBSOWoSV3rXJDhScHLGYX2JgisDJzUpolMiCME7Dj2D2HEgMQSfph6HwYfsE/298ph4QJZ03Accp7rYlj2k0odgpPxfjAa2KuLM4tskNBrgsKcwowajgwSkgQjUcgHAuAd8QLvgtDcNYbhOCgLvOx7A9MCrth1NGrTSfTXfd7CexG7lPoeItCJ6rw6tQpldaMCo0JQ8UOWqYVJkCrTA+tsLtxbdcU0Omm5j8EGACO8m7WolR2NQAAAABJRU5ErkJggg=="},e9fc:function(e,t,r){"use strict";r.r(t),r.d(t,"encodeGeometry",(function(){return h})),r.d(t,"executeQuery",(function(){return f})),r.d(t,"executeQueryForCount",(function(){return y})),r.d(t,"executeQueryForExtent",(function(){return O})),r.d(t,"executeQueryForIds",(function(){return g})),r.d(t,"executeQueryPBF",(function(){return b})),r.d(t,"executeQueryPBFBuffer",(function(){return m})),r.d(t,"queryToQueryStringParameters",(function(){return p})),r.d(t,"runQuery",(function(){return v}));var i=r("2eab"),n=r("b2b2"),a=r("e041"),s=r("a9ab"),o=r("a8d5"),c=r("e38c"),l=r("072f"),u=r("e87c");const d="Layer does not support extent calculation.";function h(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}function p(e,t){const r=e.geometry,i=e.toJSON();delete i.compactGeometryEnabled,delete i.defaultSpatialReferenceEnabled;const a=i,o=e.outSpatialReference;let c,l;if(Object(n["k"])(r)&&(c=r.spatialReference,l=r.spatialReference.wkid||JSON.stringify(r.spatialReference),a.geometryType=Object(s["c"])(r),a.geometry=h(r,e.compactGeometryEnabled),a.inSR=l),i.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=i.groupByFieldsForStatistics.join(",")),i.objectIds&&(a.objectIds=i.objectIds.join(",")),i.orderByFields&&(a.orderByFields=i.orderByFields.join(",")),!i.outFields||!i.returnDistinctValues&&(null!=t&&t.returnCountOnly||null!=t&&t.returnExtentOnly||null!=t&&t.returnIdsOnly)?delete a.outFields:-1!==i.outFields.indexOf("*")?a.outFields="*":a.outFields=i.outFields.join(","),i.outSR?a.outSR=i.outSR.wkid||JSON.stringify(i.outSR):r&&(i.returnGeometry||i.returnCentroid)&&(a.outSR=a.inSR),i.returnGeometry&&delete i.returnGeometry,i.outStatistics&&(a.outStatistics=JSON.stringify(i.outStatistics)),i.pixelSize&&(a.pixelSize=JSON.stringify(i.pixelSize)),i.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&Object(n["k"])(c)&&Object(n["k"])(e.quantizationParameters)&&Object(n["k"])(e.quantizationParameters.extent)&&c.equals(e.quantizationParameters.extent.spatialReference)&&delete i.quantizationParameters.extent.spatialReference,a.quantizationParameters=JSON.stringify(i.quantizationParameters)),i.parameterValues&&(a.parameterValues=JSON.stringify(i.parameterValues)),i.rangeValues&&(a.rangeValues=JSON.stringify(i.rangeValues)),i.dynamicDataSource&&(a.layer=JSON.stringify({source:i.dynamicDataSource}),delete i.dynamicDataSource),i.timeExtent){const e=i.timeExtent,{start:t,end:r}=e;null==t&&null==r||(a.time=t===r?t:`${null==t?"null":t},${null==r?"null":r}`),delete i.timeExtent}return e.defaultSpatialReferenceEnabled&&Object(n["k"])(c)&&Object(n["k"])(o)&&c.equals(o)&&(a.defaultSR=a.inSR,delete a.inSR,delete a.outSR),a}async function f(e,t,r,i){const a=Object(n["k"])(t.timeExtent)&&t.timeExtent.isEmpty?{data:{features:[]}}:await v(e,t,"json",i);return Object(u["a"])(t,r,a.data),a}async function b(e,t,r,i){if(Object(n["k"])(t.timeExtent)&&t.timeExtent.isEmpty)return Promise.resolve({data:r.createFeatureResult()});const a=await m(e,t,i),s=a;return s.data=Object(l["a"])(a.data,r),s}function m(e,t,r){return v(e,t,"pbf",r)}function g(e,t,r){return Object(n["k"])(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):v(e,t,"json",r,{returnIdsOnly:!0})}function y(e,t,r){return Object(n["k"])(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):v(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}function O(e,t,r){return Object(n["k"])(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):v(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then(e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(d);if(t.hasOwnProperty("count"))throw new Error(d);return e})}function v(e,t,r,s={},l={}){const u="string"==typeof e?Object(a["M"])(e):e,d=t.geometry?[t.geometry]:[];return s.responseType="pbf"===r?"array-buffer":"json",Object(o["a"])(d,null,s).then(e=>{const o=e&&e[0];Object(n["k"])(o)&&((t=t.clone()).geometry=o);const d=Object(c["a"])({...u.query,f:r,...l,...p(t,l)});return Object(i["default"])(Object(a["B"])(u.path,"query"),{...s,query:{...d,...s.query}})})}},ea44:function(e,t,r){"use strict";r.d(t,"a",(function(){return w})),r.d(t,"b",(function(){return j}));var i=r("bd75"),n=r("a05b"),a=r("d272"),s=r("4db9"),o=r("6a07"),c=r("d047"),l=r("2906"),u=r("dea3"),d=r("c6d7"),h=r("040b"),p=r("a7d7"),f=r("d017"),b=r("e550"),m=r("33e2"),g=r("ebd5"),y=r("4377"),O=r("3886"),v=r("690a"),_=r("b7bd");function j(e){const t=new v["a"];return t.include(s["a"],{linearDepth:!1}),t.attributes.add(_["a"].POSITION,"vec3"),t.attributes.add(_["a"].UV0,"vec2"),t.vertex.uniforms.add("proj","mat4").add("view","mat4").add("localOrigin","vec3"),t.vertex.uniforms.add("waterColor","vec4"),e.output!==n["a"].Color&&e.output!==n["a"].Alpha||(t.include(h["a"],e),t.include(i["a"],e),t.varyings.add("vuv","vec2"),t.varyings.add("vpos","vec3"),t.varyings.add("vnormal","vec3"),t.varyings.add("vtbnMatrix","mat3"),t.fragment.uniforms.add("localOrigin","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),t.vertex.code.add(O["a"]`
  4097. void main(void) {
  4098. if (waterColor.a < ${O["a"].float(g["c"])}) {
  4099. // Discard this vertex
  4100. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  4101. return;
  4102. }
  4103. vuv = uv0;
  4104. vpos = position;
  4105. vnormal = getLocalUp(vpos, localOrigin);
  4106. vtbnMatrix = getTBNMatrix(vnormal);
  4107. ${e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":""}
  4108. gl_Position = transformPosition(proj, view, vpos);
  4109. ${e.output===n["a"].Color?"forwardLinearDepth();":""}
  4110. }
  4111. `)),e.multipassTerrainEnabled&&(t.fragment.include(c["a"]),t.include(d["b"],e)),e.output===n["a"].Alpha&&(t.include(a["a"],e),t.fragment.uniforms.add("waterColor","vec4"),t.fragment.code.add(O["a"]`
  4112. void main() {
  4113. discardBySlice(vpos);
  4114. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  4115. gl_FragColor = vec4(waterColor.a);
  4116. }
  4117. `)),e.output===n["a"].Color&&(t.include(u["a"]),t.include(l["a"],{pbrMode:p["a"].Disabled,lightingSphericalHarmonicsOrder:2}),t.include(m["a"],e),t.include(a["a"],e),e.receiveShadows&&t.include(f["a"],e),t.include(b["a"],e),t.fragment.uniforms.add("waterColor","vec4").add("lightingMainDirection","vec3").add("lightingMainIntensity","vec3").add("lightingSpecularStrength","float").add("lightingEnvironmentStrength","float").add("cameraPosition","vec3").add("timeElapsed","float").add("view","mat4"),t.fragment.include(y["a"]),t.fragment.code.add(O["a"]`
  4118. void main() {
  4119. discardBySlice(vpos);
  4120. ${e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":""}
  4121. vec3 localUp = vnormal;
  4122. // the created normal is in tangent space
  4123. vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
  4124. // we rotate the normal according to the tangent-bitangent-normal-Matrix
  4125. vec3 n = normalize(vtbnMatrix * tangentNormalFoam.xyz);
  4126. vec3 v = -normalize(vpos - cameraPosition);
  4127. float shadow = ${e.receiveShadows?O["a"]`1.0 - readShadowMap(vpos, linearDepth)`:"1.0"};
  4128. vec4 vPosView = view*vec4(vpos, 1.0);
  4129. vec4 final = vec4(getSeaColor(n, v, lightingMainDirection, waterColor.rgb, lightingMainIntensity, localUp, shadow, tangentNormalFoam.w, vPosView.xyz, vpos + localOrigin), waterColor.w);
  4130. // gamma correction
  4131. gl_FragColor = delinearizeGamma(final);
  4132. gl_FragColor = highlightSlice(gl_FragColor, vpos);
  4133. ${e.oitEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""}
  4134. }
  4135. `)),e.output===n["a"].Normal&&(t.include(h["a"],e),t.include(m["a"],e),t.include(a["a"],e),t.varyings.add("vpos","vec3"),t.varyings.add("vuv","vec2"),t.vertex.code.add(O["a"]`
  4136. void main(void) {
  4137. if (waterColor.a < ${O["a"].float(g["c"])}) {
  4138. // Discard this vertex
  4139. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  4140. return;
  4141. }
  4142. vuv = uv0;
  4143. vpos = position;
  4144. gl_Position = transformPosition(proj, view, vpos);
  4145. }
  4146. `),t.fragment.uniforms.add("timeElapsed","float"),t.fragment.code.add(O["a"]`void main() {
  4147. discardBySlice(vpos);
  4148. vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
  4149. tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
  4150. gl_FragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);
  4151. }`)),e.output===n["a"].Draped&&(t.varyings.add("vpos","vec3"),t.vertex.code.add(O["a"]`
  4152. void main(void) {
  4153. if (waterColor.a < ${O["a"].float(g["c"])}) {
  4154. // Discard this vertex
  4155. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  4156. return;
  4157. }
  4158. vpos = position;
  4159. gl_Position = transformPosition(proj, view, vpos);
  4160. }
  4161. `),t.fragment.uniforms.add("waterColor","vec4"),t.fragment.code.add(O["a"]`void main() {
  4162. gl_FragColor = waterColor;
  4163. }`)),e.output===n["a"].Highlight&&(t.include(o["a"]),t.varyings.add("vpos","vec3"),t.vertex.code.add(O["a"]`
  4164. void main(void) {
  4165. if (waterColor.a < ${O["a"].float(g["c"])}) {
  4166. // Discard this vertex
  4167. gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
  4168. return;
  4169. }
  4170. vpos = position;
  4171. gl_Position = transformPosition(proj, view, vpos);
  4172. }
  4173. `),t.include(a["a"],e),t.fragment.code.add(O["a"]`void main() {
  4174. discardBySlice(vpos);
  4175. outputHighlight();
  4176. }`)),t}const w=Object.freeze({__proto__:null,build:j})},ea4b:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i=r("3c9c"),n=r("2906"),a=r("7088"),s=r("dea3"),o=r("5d5f"),c=r("a7d7"),l=r("c51b"),u=r("d017"),d=r("3886");function h(e,t){const r=e.fragment;e.include(s["a"]),e.include(a["a"],t),t.pbrMode!==c["a"].Disabled&&e.include(o["a"],t),e.include(n["a"],t),t.receiveShadows&&e.include(u["a"],t),r.uniforms.add("lightingGlobalFactor","float"),r.uniforms.add("ambientBoostFactor","float"),r.uniforms.add("hasFillLights","bool"),e.include(l["a"]),r.code.add(d["a"]`
  4177. const float GAMMA_SRGB = 2.1;
  4178. const float INV_GAMMA_SRGB = 0.4761904;
  4179. ${t.pbrMode===c["a"].Disabled?"":"const vec3 GROUND_REFLECTANCE = vec3(0.2);"}
  4180. `),r.code.add(d["a"]`
  4181. float additionalDirectedAmbientLight(vec3 vPosWorld) {
  4182. float vndl = dot(${t.viewingMode===i["a"].Global?d["a"]`normalize(vPosWorld)`:d["a"]`vec3(0.0, 0.0, 1.0)`}, lightingMainDirection);
  4183. return smoothstep(0.0, 1.0, clamp(vndl * 2.5, 0.0, 1.0));
  4184. }
  4185. `),r.code.add(d["a"]`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
  4186. float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
  4187. return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * lightingMainIntensity;
  4188. }`),t.pbrMode===c["a"].Disabled||t.pbrMode===c["a"].WaterOnIntegratedMesh?r.code.add(d["a"]`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight)
  4189. {
  4190. vec3 mainLighting = evaluateMainLighting(normalWorld, shadow);
  4191. vec3 ambientLighting = calculateAmbientIrradiance(normalWorld, ssao);
  4192. vec3 albedoLinear = pow(albedo, vec3(GAMMA_SRGB));
  4193. vec3 totalLight = mainLighting + ambientLighting + additionalLight;
  4194. totalLight = min(totalLight, vec3(PI));
  4195. vec3 outColor = vec3((albedoLinear / PI) * totalLight);
  4196. return pow(outColor, vec3(INV_GAMMA_SRGB));
  4197. }`):t.pbrMode!==c["a"].Normal&&t.pbrMode!==c["a"].Schematic||(r.code.add(d["a"]`const float fillLightIntensity = 0.25;
  4198. const float horizonLightDiffusion = 0.4;
  4199. const float additionalAmbientIrradianceFactor = 0.02;
  4200. vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight, vec3 viewDir, vec3 normalGround, vec3 mrr, vec3 _emission, float additionalAmbientIrradiance)
  4201. {
  4202. vec3 viewDirection = -viewDir;
  4203. vec3 mainLightDirection = lightingMainDirection;
  4204. vec3 h = normalize(viewDirection + mainLightDirection);
  4205. PBRShadingInfo inputs;
  4206. inputs.NdotL = clamp(dot(normal, mainLightDirection), 0.001, 1.0);
  4207. inputs.NdotV = clamp(abs(dot(normal, viewDirection)), 0.001, 1.0);
  4208. inputs.NdotH = clamp(dot(normal, h), 0.0, 1.0);
  4209. inputs.VdotH = clamp(dot(viewDirection, h), 0.0, 1.0);
  4210. inputs.NdotNG = clamp(dot(normal, normalGround), -1.0, 1.0);
  4211. vec3 reflectedView = normalize(reflect(viewDirection, normal));
  4212. inputs.RdotNG = clamp(dot(reflectedView, normalGround), -1.0, 1.0);
  4213. inputs.albedoLinear = pow(albedo, vec3(GAMMA_SRGB));
  4214. inputs.ssao = ssao;
  4215. inputs.metalness = mrr[0];
  4216. inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);`),r.code.add(d["a"]`inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
  4217. inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
  4218. inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);`),r.code.add(d["a"]`vec3 ambientDir = vec3(5.0 * normalGround[1] - normalGround[0] * normalGround[2], - 5.0 * normalGround[0] - normalGround[2] * normalGround[1], normalGround[1] * normalGround[1] + normalGround[0] * normalGround[0]);
  4219. ambientDir = ambientDir != vec3(0.0)? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
  4220. inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
  4221. vec3 mainLightIrradianceComponent = inputs.NdotL * (1.0 - shadow) * lightingMainIntensity;
  4222. vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * lightingMainIntensity * fillLightIntensity;
  4223. vec3 ambientLightIrradianceComponent = calculateAmbientIrradiance(normal, ssao) + additionalLight;
  4224. inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
  4225. inputs.groundIrradianceToSurface = GROUND_REFLECTANCE * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;`),r.code.add(d["a"]`vec3 horizonRingDir = inputs.RdotNG * normalGround - reflectedView;
  4226. vec3 horizonRingH = normalize(viewDirection + horizonRingDir);
  4227. inputs.NdotH_Horizon = dot(normal, horizonRingH);
  4228. vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(inputs.NdotH, inputs.roughness) * lightingMainIntensity * (1.0 - shadow);
  4229. vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistribution(inputs.NdotH_Horizon, min(inputs.roughness + horizonLightDiffusion, 1.0)) * lightingMainIntensity * fillLightIntensity;
  4230. vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance(ssao) + additionalLight;
  4231. inputs.skyRadianceToSurface = ambientLightRadianceComponent + mainLightRadianceComponent + horizonLightRadianceComponent;
  4232. inputs.groundRadianceToSurface = GROUND_REFLECTANCE * (ambientLightRadianceComponent + horizonLightRadianceComponent) + mainLightRadianceComponent;
  4233. inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + GROUND_REFLECTANCE[1]);`),r.code.add(d["a"]`
  4234. vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
  4235. vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
  4236. vec3 emissionComponent = pow(_emission, vec3(GAMMA_SRGB));
  4237. vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent + emissionComponent;
  4238. ${t.pbrMode===c["a"].Schematic?d["a"]`vec3 outColor = pow(max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance), vec3(INV_GAMMA_SRGB));`:d["a"]`vec3 outColor = pow(blackLevelSoftCompression(outColorLinear, inputs), vec3(INV_GAMMA_SRGB));`}
  4239. return outColor;
  4240. }
  4241. `))}},ea87:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n}));const i=["begin","end","begin-end"],n=["arrow","circle","square","diamond","cross","x"]},eb37:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return n}));const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return i[e]||i[e.toLowerCase()]}function a(e){var t;return null!=(t=i[e])?t:i[e.toLowerCase()]}function s(e){return[...a(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function c(e,t,r,i=1){const n=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,s=2*r-a;return[Math.round(255*o(s,a,n+1/3)),Math.round(255*o(s,a,n)),Math.round(255*o(s,a,n-1/3)),i]}function l(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,a=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const o=[0,0,0,1];let c;return a&&(c=s&i,s>>=r,o[3]=n*c/255),c=s&i,s>>=r,o[2]=n*c,c=s&i,s>>=r,o[1]=n*c,c=s&i,s>>=r,o[0]=n*c,o}},ebb2:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("7ffa"),o=r("59b2"),c=r("cea0"),l=r("d386"),u=r("09db");let d=i=class extends a["a"]{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i(Object(s["a"])({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};Object(n["a"])([Object(o["b"])({type:[String],json:{write:!0}})],d.prototype,"attachmentTypes",void 0),Object(n["a"])([Object(o["b"])({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],d.prototype,"attachmentsWhere",void 0),Object(n["a"])([Object(o["b"])({type:[String],json:{write:!0}})],d.prototype,"keywords",void 0),Object(n["a"])([Object(o["b"])({type:[Number],json:{write:!0}})],d.prototype,"globalIds",void 0),Object(n["a"])([Object(o["b"])({json:{write:!0}})],d.prototype,"name",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),Object(n["a"])([Object(o["b"])({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),Object(n["a"])([Object(o["b"])({type:Boolean,json:{default:!1,write:!0}})],d.prototype,"returnMetadata",void 0),Object(n["a"])([Object(o["b"])({type:[Number],json:{write:!0}})],d.prototype,"size",void 0),Object(n["a"])([Object(o["b"])({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),Object(n["a"])([Object(u["a"])("start"),Object(u["a"])("num")],d.prototype,"writeStart",null),Object(n["a"])([Object(o["b"])({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=i=Object(n["a"])([Object(l["a"])("esri.rest.support.AttachmentQuery")],d),d.from=Object(c["m"])(d);const h=d},ebd5:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s}));var i=r("3886"),n=r("b7c2");const a=.1,s=.001;function o(e,t){const r=e.fragment;switch(t.alphaDiscardMode){case n["a"].Blend:r.code.add(i["a"]`
  4242. #define discardOrAdjustAlpha(color) { if (color.a < ${i["a"].float(s)}) { discard; } }
  4243. `);break;case n["a"].Opaque:r.code.add(i["a"]`void discardOrAdjustAlpha(inout vec4 color) {
  4244. color.a = 1.0;
  4245. }`);break;case n["a"].Mask:r.uniforms.add("textureAlphaCutoff","float"),r.code.add(i["a"]`#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } else { color.a = 1.0; } }`);break;case n["a"].MaskBlend:e.fragment.uniforms.add("textureAlphaCutoff","float"),e.fragment.code.add(i["a"]`#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } }`)}}},ec13:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"d",(function(){return u}));var i=r("9ef0"),n=(r("c120"),r("b2b2")),a=r("a915"),s=r("0fc4");function o(e){return"fill"===e.type}function c(e){return"extrude"===e.type}var l=r("dd0e");function u(e){return e&&e.enabled&&(c(e)||o(e))&&Object(n["k"])(e.edges)}function d(e){return e&&e.enabled&&e.edges||null}function h(e,t){return p(d(e),t)}function p(e,t){if(Object(n["j"])(e))return null;const r=Object(n["k"])(e.color)?Object(s["f"])(i["a"].toUnitRGBA(e.color)):Object(s["g"])(0,0,0,0),o=Object(a["g"])(e.size),c=Object(a["g"])(e.extensionLength);switch(e.type){case"solid":return f({color:r,size:o,extensionLength:c,...t});case"sketch":return b({color:r,size:o,extensionLength:c,...t});default:return}}function f(e){return{...m,...e,type:"solid"}}function b(e){return{...g,...e,type:"sketch"}}const m={color:Object(s["g"])(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:l["a"].OPAQUE},g={color:Object(s["g"])(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:l["a"].OPAQUE}},ecc1:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("a4ee"),n=r("6a0ed"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386"));let o=class extends n["a"]{constructor(){super(...arguments),this.type=null}};Object(i["a"])([Object(a["b"])({type:["selection","cluster"],readOnly:!0,json:{read:!1,write:!0}})],o.prototype,"type",void 0),o=Object(i["a"])([Object(s["a"])("esri.layers.support.FeatureReduction")],o);const c=o},ecd7:function(e,t,r){"use strict";function i(e){return e&&e.release&&"function"==typeof e.release}function n(e){return e&&e.acquire&&"function"==typeof e.acquire}r.d(t,"a",(function(){return a}));class a{constructor(e,t,r,i=1,n=0){if(this.ctor=e,this.acquireFunction=t,this.releaseFunction=r,this.allocationSize=i,this._pool=new Array(n),this._initialSize=n,this.ctor)for(let a=0;a<n;a++)this._pool[a]=new this.ctor;this.allocationSize=Math.max(i,1)}destroy(){this.prune(0)}acquire(...e){let t;if(a.test.disabled)t=new this.ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this.ctor}t=this._pool.pop()}return this.acquireFunction?this.acquireFunction(t,...e):n(t)&&t.acquire(...e),t}release(e){e&&!a.test.disabled&&(this.releaseFunction?this.releaseFunction(e):i(e)&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}a.test={disabled:!1}},ecf2:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFQUJCMjk2NkM5RDExMUVCQjFBN0JDNzE0REVCQzcyQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFQUJCMjk2N0M5RDExMUVCQjFBN0JDNzE0REVCQzcyQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkVBQkIyOTY0QzlEMTExRUJCMUE3QkM3MTRERUJDNzJCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkVBQkIyOTY1QzlEMTExRUJCMUE3QkM3MTRERUJDNzJCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+OjwY0gAABadJREFUeNrUWFlIY1cYPolxjzFqXKcat2q1xqU4YiiW6fRJOp0u89KHliqdKYNQpai4F4r7gn1RWkrpMIW+lNLSGYodhygWbcEVRStu1WrcE/c9Jvb7Q64EqcyouZocONzcc04u3/nu9//n+y87Ojpilu5lZWUxfDyXupDx0BwcHO4wnhovgJ2cnF61KcAuLi4v2xRgZ2dnKXR8zZYk4WRnZxdnM4AdHR2FIpEo2iYAl5eXR4BgBsAv2gRgoVAYbm9vzyAJuU0ABrORxDBysZ+tMBxIDKN72wrDcgQdBZ6ED8AiSz8Q2vWGHCi1OXNjVVVVH2ADN7a3t78oLi6esSrAkIIPMYzDw660tFTm6en5SKFQKL28vNjMzMxHyCJBRUVF89YEWEIME+iIiIi58PBwe5lMxg4ODtjm5qYIGk/EssdWA5i0u7CwwHQ6HYuNjbWXSCRsd3eXzc/Ps+npafXh4eETqwm6ioqKGEjAdXl5meFKGYPt7e0ZwY6MjPwzNzcXVlJScmAVGoZeHUJDQ/8KCwtjJAGtVssmJibIubHh4eG/l5aWFABrsIq0Rs4sMDBwDkDFcrmcicViI2iqENbW1tjq6mqZJcBSE9BDLyiD18Bsc0hIiKNUKqWgY/v7+0YNkzQQeKyvr+9odHS0PCcnp+RKAVdXV98DoK/j4+OF6+vrRq1ubGzsu7u7O9I88q4+Ojrajtju6upi4+Pjv2VmZt66EsD19fVfAez9hIQEBn2yoaGhrdnZ2c+QBf5MTk4eMhgMrLOzM9bNza0cMrkF4AJKbe3t7SNY/woksnMpGkZwCRsaGv6Iioq6TwHW0dGha2lpqZucnHTPy8v7ViAQXCNZUIbAbzcwentwcPAllUo1ODU1xVJSUiKxATV0H8Z7lgBYT39//z6lUhk0NjZmaG5ufgQJfAi2tszMTwD8BCOG8dvo2HCyjeKiqKysfAu6/i4mJkaGfD0M/b9ZWFj4lBeGcaTGIrCm/fz8gtra2rrBWmhWVta75mBNXsKXAONKgH3M5woKCh6npaV5t7a2lkCKBsjkSU1NTabFAcO8vBcZGdmDQ0AzMDCgzMjIuA4T8+8p9tLbZOBJErL/W5Obm1uGNySFRH7E0f0l2kOLSaKurq7U19f3HiL8bn5+/jMfTICJYdIwuudp6/Bm9nB5H1rOw6n4U2NjY/vKysoNjB+eG3BtbW0xWBKkp6c/d/UAZj04hgFY+qz1pjd1HXp+AwdOI6T3OTS/eGbAZA2JYBMTZ6k4PMw0LH3e/yH4VLiowLj8XAwDqOacBl7CpTX0M1cdp8UGbyUSAIs5hum3LdR0rmaSsDjgC9vLpqamk4CduKAj8CfnT7bU1NSrY7i3tzceJ5gLl9YA3M2qJEGfpWAbf4GZ0cLYGJKSkvrg1Bw4hpG/vWAzDRqNZh1mXgWb+fqVSAIpT4Jk/3tcXJySPDDVbR4eHszV1ZX19PQwTsNUbcA3CGDgJShAb8LM30SZpF5cXHwHLq/nUgBTfg4ODp6Ar5AQUKqQCSh1lPZMr9czThJkXQk0XYl1Wo8NvoCSv6u/v/9jbPgB75IAs78SWGKWQJmCi5nlXoYj1ljWE3ga5xinRqDh+ASwpt90d3eLLwNwArF5XAEIBMdAqdFGqPikIhR6Pp6jdVyj/+M5ImzmDu+SAGt68rpco9dN99SJSQSe+Vq2s7NjnDtZ2ZjuN3lnGAHzYGtri3GgCRTKImPRycmAwNCV7mmc5umea1T/qdVqLTT8M++As7OzM2HeO1C/GdkjIFQl0wcT+sJDY1ynexqneW4DpG9IZhWAEy61CEWl8GlAQEAFKhAxZQfKBvQ9grIGBRrHOCrnY/DQtQ4b/R5v6JPExETDeU66C3+XQJ32NoLoLgAr0H0AloJJBMB6SEEHsFr0EQD/AWMPOaDnPZr/E2AA1mYbW9FTiWQAAAAASUVORK5CYII="},ed70:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s}));var i=r("0fc4");const n=1.2,a=i["b"],s=i["a"]},ed91:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("1b19"),c=r("b08e");let l=i=class extends o["a"]{constructor(e){super(e),this.type="pie-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};Object(n["a"])([Object(a["b"])({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:c["a"].write}})],l.prototype,"type",void 0),l=i=Object(n["a"])([Object(s["a"])("esri.popup.content.PieChartMediaInfo")],l);const u=l},ee0e:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var i=r("556f"),n=r("3af1"),a=r("9180"),s=r("79e4"),o=r("ae54");class c{constructor(e,t){this.key=new o["a"](0,0,0,0),this.bounds=Object(a["l"])(),this.objectIds=new Set,this.key.set(t);const r=e.getLODInfoAt(this.key);this.tileInfoView=e,this.tileInfoView.getTileBounds(this.bounds,this.key,!0),this.resolution=r.resolution,this.scale=r.scale,this.level=r.level}get id(){return this.key.id}get extent(){return n["a"].fromBounds(this.bounds,this.tileInfoView.tileInfo.spatialReference)}get transform(){return{originPosition:"upperLeft",scale:[this.resolution,this.resolution],translate:[this.bounds[0],this.bounds[3]]}}createChildTiles(){const e=this.key.getChildKeys(),t=i["a"].acquire();for(let r=0;r<e.length;r++)t[r]=new c(this.tileInfoView,e[r]);return t}getQuantizationParameters(){return s["a"].fromJSON({mode:"view",originPosition:"upperLeft",tolerance:this.resolution,extent:{xmin:this.bounds[0],ymin:this.bounds[1],xmax:this.bounds[2],ymax:this.bounds[3],spatialReference:this.tileInfoView.tileInfo.spatialReference}})}}},ee2c:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return c}));var i,n=r("6a21"),a=r("3886"),s=r("b7bd");function o(e,t){const r=e.vertex;r.uniforms.add("distanceFalloffFactor","float"),r.code.add(a["a"]`float distanceBasedPerspectiveFactor(float distance) {
  4246. return clamp(sqrt(distanceFalloffFactor / distance), 0.0, 1.0);
  4247. }`),r.uniforms.add("componentDataTex","sampler2D"),r.uniforms.add("componentDataTexInvDim","vec2"),e.attributes.add(s["a"].COMPONENTINDEX,"float"),r.constants.add("componentColorFieldOffset","float",0),r.constants.add("componentOtherFieldOffset","float",1),r.constants.add("componentFieldCount","float",2),r.constants.add("lineWidthFractionFactor","float",8),r.constants.add("extensionLengthOffset","float",128),r.constants.add("componentTexWidth","float",4096),r.code.add(a["a"]`vec2 _componentTextureCoords(float componentIndex, float fieldOffset) {
  4248. float fieldIndex = componentFieldCount * componentIndex + fieldOffset;
  4249. float rowIndex = floor(fieldIndex / componentTexWidth);
  4250. float colIndex = mod(fieldIndex, componentTexWidth);
  4251. vec2 linearIndex = vec2(
  4252. (colIndex + 0.5) / componentTexWidth,
  4253. (rowIndex + 0.5) * componentDataTexInvDim.y
  4254. );
  4255. return linearIndex;
  4256. }
  4257. struct ComponentData {
  4258. vec4 color;
  4259. float lineWidth;
  4260. float extensionLength;
  4261. float type;
  4262. };
  4263. ComponentData readComponentData() {
  4264. vec2 colorIndex = _componentTextureCoords(componentIndex, componentColorFieldOffset);
  4265. vec2 otherIndex = _componentTextureCoords(componentIndex, componentOtherFieldOffset);
  4266. vec4 colorValue = texture2D(componentDataTex, colorIndex);
  4267. vec4 otherValue = texture2D(componentDataTex, otherIndex);
  4268. return ComponentData(
  4269. vec4(colorValue.rgb, colorValue.a * otherValue.w),
  4270. otherValue.x * (255.0 / lineWidthFractionFactor),
  4271. otherValue.y * 255.0 - extensionLengthOffset,
  4272. -(otherValue.z * 255.0) + 0.5
  4273. );
  4274. }`),t.legacy?r.code.add(a["a"]`vec3 _modelToWorldNormal(vec3 normal) {
  4275. return (model * vec4(normal, 0.0)).xyz;
  4276. }
  4277. vec3 _modelToViewNormal(vec3 normal) {
  4278. return (view * model * vec4(normal, 0.0)).xyz;
  4279. }`):(r.uniforms.add("transformNormalGlobalFromModel","mat3"),r.code.add(a["a"]`vec3 _modelToWorldNormal(vec3 normal) {
  4280. return transformNormalGlobalFromModel * normal;
  4281. }`)),t.silhouette?(e.attributes.add(s["a"].NORMALA,"vec3"),e.attributes.add(s["a"].NORMALB,"vec3"),r.code.add(a["a"]`vec3 worldNormal() {
  4282. return _modelToWorldNormal(normalize(normalA + normalB));
  4283. }`)):(e.attributes.add(s["a"].NORMAL,"vec3"),r.code.add(a["a"]`vec3 worldNormal() {
  4284. return _modelToWorldNormal(normal);
  4285. }`)),t.legacy?r.code.add(a["a"]`vec3 worldFromModelPosition(vec3 position) {
  4286. return (model * vec4(position, 1.0)).xyz;
  4287. }
  4288. vec3 viewFromModelPosition(vec3 position) {
  4289. return (view * vec4(worldFromModelPosition(position), 1.0)).xyz;
  4290. }
  4291. vec4 projFromViewPosition(vec3 position) {
  4292. return proj * vec4(position, 1.0);
  4293. }`):(e.vertex.include(n["a"],t),r.code.add(a["a"]`vec3 worldFromModelPosition(vec3 position) {
  4294. vec3 rotatedModelPosition = transformWorldFromModelRS * position;
  4295. vec3 transform_CameraRelativeFromModel = dpAdd(
  4296. transformWorldFromModelTL,
  4297. transformWorldFromModelTH,
  4298. -transformWorldFromViewTL,
  4299. -transformWorldFromViewTH
  4300. );
  4301. return transform_CameraRelativeFromModel + rotatedModelPosition;
  4302. }
  4303. vec3 viewFromModelPosition(vec3 position) {
  4304. return transformViewFromCameraRelativeRS * worldFromModelPosition(position);
  4305. }
  4306. vec4 projFromViewPosition(vec3 position) {
  4307. return transformProjFromView * vec4(position, 1.0);
  4308. }`)),r.code.add(a["a"]`float calculateExtensionLength(float extensionLength, float lineLength) {
  4309. return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);
  4310. }`)}function c(e){return e.mode===i.SKETCH||e.mode===i.MIXED}!function(e){e[e.SOLID=0]="SOLID",e[e.SKETCH=1]="SKETCH",e[e.MIXED=2]="MIXED",e[e.COUNT=3]="COUNT"}(i||(i={}))},ee83:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return m}));var i=r("ce50"),n=r("38a4"),a=r("b2b2"),s=r("8048"),o=r("3af1"),c=r("8188"),l=r("5996"),u=r("9180"),d=r("7f83"),h=r("9786"),p=r("dff3");const f=12;class b{constructor(e){const t=b.checkUnsupported(e);if(Object(a["k"])(t))throw t;const r=Object(a["t"])(e);this.spatialReference=r.spatialReference,this._isWebMercator=this.spatialReference.isWebMercator,this._isGCS=Object(c["a"])(this.spatialReference)||Object(d["i"])(this.spatialReference)||Object(d["j"])(this.spatialReference),this.origin=[r.origin.x,r.origin.y],this.pixelSize=r.size[0],this.dpi=r.dpi;const i=r.lods.reduce((function(e,t,r){return t.level<e.min&&(e.min=t.level,e.minIndex=r),e.max=Math.max(e.max,t.level),e}),{min:1/0,minIndex:0,max:-1/0}),n=r.lods[i.minIndex],s=2**n.level;let o=n.resolution*s,l=n.scale*s;this.levels=new Array(i.max+1);for(let a=0;a<this.levels.length;a++)this.levels[a]={resolution:o,scale:l,tileSize:[o*r.size[0],o*r.size[1]]},o/=2,l/=2}clone(){return new b(this.toTileInfo())}toTileInfo(){return new p["a"]({dpi:this.dpi,origin:{x:this.origin[0],y:this.origin[1],spatialReference:this.spatialReference},size:[this.pixelSize,this.pixelSize],spatialReference:this.spatialReference,lods:this.levels.map((e,t)=>({level:t,scale:e.scale,resolution:e.resolution}))})}getExtent(e,t,r,i){const n=this.levels[e],a=n.tileSize[0],s=n.tileSize[1];i[0]=this.origin[0]+r*a,i[2]=i[0]+a,i[3]=this.origin[1]-t*s,i[1]=i[3]-s}convertExtentToRadians(e,t){this._isWebMercator?(t[0]=Object(h["f"])(e[0]),t[1]=Object(h["h"])(e[1]),t[2]=Object(h["f"])(e[2]),t[3]=Object(h["h"])(e[3])):this._isGCS&&(t[0]=Object(n["h"])(e[0]),t[1]=Object(n["h"])(e[1]),t[2]=Object(n["h"])(e[2]),t[3]=Object(n["h"])(e[3]))}getExtentGeometry(e,t,r,i=new o["a"]){return this.getExtent(e,t,r,g),i.spatialReference=this.spatialReference,i.xmin=g[0],i.ymin=g[1],i.xmax=g[2],i.ymax=g[3],i.zmin=void 0,i.zmax=void 0,i}ensureMaxLod(e){if(null==e)return!1;let t=!1;for(;this.levels.length<=e;){const e=this.levels[this.levels.length-1],r=e.resolution/2;this.levels.push({resolution:r,scale:e.scale/2,tileSize:[r*this.pixelSize,r*this.pixelSize]}),t=!0}return t}capMaxLod(e){this.levels.length>e+1&&(this.levels.length=e+1)}getMaxLod(){return this.levels.length-1}scaleAtLevel(e){return this.levels[0].scale/2**e}levelAtScale(e){const t=this.levels[0].scale;return e>=t?0:Math.log(t/e)*Math.LOG2E}resolutionAtLevel(e){return this.levels[0].resolution/2**e}compatibleWith(e){if(!(e instanceof b)){if(b.checkUnsupported(e))return!1;e=new b(e)}if(!e.spatialReference.equals(this.spatialReference))return!1;if(e.pixelSize!==this.pixelSize)return!1;const t=Math.min(this.levels.length,e.levels.length)-1,r=this.levels[t].resolution;let i=.5*r;return!(!Object(n["i"])(e.origin[0],this.origin[0],i)||!Object(n["i"])(e.origin[1],this.origin[1],i))&&(i=.5*r/2**t/this.pixelSize*f,Object(n["i"])(r,e.levels[t].resolution,i))}rootTilesInExtent(e,t=null,r=1/0){const i=new Array,n=this.levels[0].tileSize;if(Object(a["j"])(e)||0===n[0]||0===n[1])return i;b.computeRowColExtent(e,n,this.origin,g);let s=g[1],o=g[3],c=g[0],l=g[2];const u=l-c,d=o-s;if(u*d>r){const e=Math.floor(Math.sqrt(r));d>e&&(s=s+Math.floor(.5*d)-Math.floor(.5*e),o=s+e),u>e&&(c=c+Math.floor(.5*u)-Math.floor(.5*e),l=c+e)}for(let a=s;a<o;a++)for(let e=c;e<l;e++)i.push([0,a,e]);return Object(a["k"])(t)&&(t[0]=this.origin[0]+c*n[0],t[1]=this.origin[1]-o*n[1],t[2]=this.origin[0]+l*n[0],t[3]=this.origin[1]-s*n[1]),i}static computeRowColExtent(e,t,r,i){const n=.001*(e[2]-e[0]+(e[3]-e[1]));i[0]=Math.max(0,Math.floor((e[0]+n-r[0])/t[0])),i[2]=Math.max(0,Math.ceil((e[2]-n-r[0])/t[0])),i[1]=Math.max(0,Math.floor((r[1]-e[3]+n)/t[1])),i[3]=Math.max(0,Math.ceil((r[1]-e[1]-n)/t[1]))}static isPowerOfTwo(e){const t=e.lods,r=t[0].resolution*2**t[0].level;return!t.some((function(e){return!Object(n["j"])(e.resolution,r/2**e.level)}))}static hasGapInLevels(e){const t=e.lods.map((function(e){return e.level}));t.sort((function(e,t){return e-t}));for(let r=1;r<t.length;r++)if(t[r]!==t[0]+r)return!0;return!1}static tileSizeSupported(e){const t=e.size[1];return t===e.size[0]&&0==(t&t-1)&&t>=128&&t<=512}static hasOriginPerLODs(e){const t=e.origin;return e.lods.some(e=>null!=e.origin&&(e.origin[0]!==t.x||e.origin[1]!==t.y))}static getMissingTileInfoError(){return new i["a"]("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")}static checkUnsupported(e){return Object(a["j"])(e)?m():e.lods.length<1?new i["a"]("tilingscheme:generic","Tiling scheme must have at least one level"):b.isPowerOfTwo(e)?b.hasGapInLevels(e)?new i["a"]("tilingscheme:gaps","Tiling scheme levels must not have gaps between min and max level"):b.tileSizeSupported(e)?b.hasOriginPerLODs(e)?new i["a"]("tilingscheme:multiple-origin","Tiling scheme levels must not have their own origin"):null:new i["a"]("tilingscheme:tile-size","Tiles must be square and size must be one of [128, 256, 512]"):new i["a"]("tilingscheme:power-of-two","Tiling scheme must be power of two")}static fromExtent(e,t){const r=e[2]-e[0],i=e[3]-e[1],n=Object(s["f"])(t),a=1.2*Math.max(r,i),o=256,c=96,l=.0254,u=new b(new p["a"]({size:[o,o],origin:{x:e[0]-.5*(a-r),y:e[3]+.5*(a-i)},lods:[{level:0,resolution:a/o,scale:1/(o/c*l/(a*n))}],spatialReference:t}));return u.ensureMaxLod(20),u}static makeWebMercatorAuxiliarySphere(e){const t=new b(b.WebMercatorAuxiliarySphereTileInfo);return t.ensureMaxLod(e),t}static makeGCSWithTileSize(e,t=256,r=16){const i=256/t,n=new b(new p["a"]({size:[t,t],origin:{x:-180,y:90,spatialReference:e},spatialReference:e,lods:[{level:0,resolution:.703125*i,scale:295497598.570834*i}]}));return n.ensureMaxLod(r),n}get test(){return{isWebMercator:this._isWebMercator,isGCS:this._isGCS}}}function m(){return new i["a"]("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")}b.WebMercatorAuxiliarySphereTileInfo=new p["a"]({size:[256,256],origin:{x:-20037508.342787,y:20037508.342787,spatialReference:l["a"].WebMercator},spatialReference:l["a"].WebMercator,lods:[{level:0,resolution:156543.03392800014,scale:591657527.591555}]}),b.WebMercatorAuxiliarySphere=b.makeWebMercatorAuxiliarySphere(19);const g=Object(u["l"])()},eed5:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},f0b9:function(e,t,r){"use strict";function i(e){return 32+e.length}function n(){return 16}function a(e){if(!e)return 0;let t=32;for(const r in e)if(e.hasOwnProperty(r)){const a=e[r];switch(typeof a){case"string":t+=i(a);break;case"number":t+=n();break;case"boolean":t+=4}}return t}function s(e,t){return 32+e.length*t}var o;r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return i})),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(o||(o={}))},f0ba:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("7ffa"),o=r("e92d"),c=r("59b2"),l=r("1a3e"),u=r("d386"),d=r("cea0"),h=r("dee7"),p=r("83fa"),f=r("f5e7");const b=o["a"].getLogger("esri.geometry.support.MeshComponent");let m=i=class extends a["a"]{constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}static from(e){return Object(d["d"])(i,e)}castFaces(e){return Object(f["b"])(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},b)}castMaterial(e){return Object(d["d"])(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?p["a"]:h["a"],e)}clone(){return new i({faces:Object(s["a"])(this.faces),shading:this.shading,material:Object(s["a"])(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const r={faces:Object(s["a"])(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new i(r)}};Object(n["a"])([Object(c["b"])({json:{write:!0}})],m.prototype,"faces",void 0),Object(n["a"])([Object(l["a"])("faces")],m.prototype,"castFaces",null),Object(n["a"])([Object(c["b"])({type:h["a"],json:{write:!0}})],m.prototype,"material",void 0),Object(n["a"])([Object(l["a"])("material")],m.prototype,"castMaterial",null),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],m.prototype,"shading",void 0),Object(n["a"])([Object(c["b"])({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=i=Object(n["a"])([Object(u["a"])("esri.geometry.support.MeshComponent")],m);const g=m},f11b:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("82e4");let l=i=class extends a["a"]{constructor(e){super(e),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}clone(){return new i({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol);return`${this.minValue}.${this.maxValue}.${e}`}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],l.prototype,"description",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],l.prototype,"label",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],l.prototype,"minValue",void 0),Object(n["a"])([Object(s["b"])({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],l.prototype,"maxValue",void 0),Object(n["a"])([Object(s["b"])(c["b"])],l.prototype,"symbol",void 0),l=i=Object(n["a"])([Object(o["a"])("esri.renderers.support.ClassBreakInfo")],l);const u=l},f159:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("3886");function n(e){e.fragment.code.add(i["a"]`const float GAMMA = 2.2;
  4311. const float INV_GAMMA = 0.4545454545;
  4312. vec4 delinearizeGamma(vec4 color) {
  4313. return vec4(pow(color.rgb, vec3(INV_GAMMA)), color.w);
  4314. }
  4315. vec3 linearizeGamma(vec3 color) {
  4316. return pow(color, vec3(GAMMA));
  4317. }`)}},f1a4:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d}));var i=r("a4ee"),n=r("ce50"),a=r("6a0ed"),s=r("59b2"),o=(r("b50f"),r("c120"),r("cea0")),c=r("d386"),l=r("e9a4");let u=class extends a["a"]{constructor(e){super(e),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){const e=this.get("portal.restUrl");return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal._request(this.url+"/categorySchema",e).then(t=>{const r=t.categorySchema||[];return r.some(e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source)?this._fetchCategorySchemaSet("LivingAtlas",e):r})}fetchMembers(e){return this.portal._request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+="&w="+e),t}toJSON(){throw new n["a"]("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(e,t){let r=Object(o["m"])(l["a"],e);return parseFloat(this.portal.currentVersion)>5?(r=r||new l["a"],this.portal._queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new l["a"],r.query="group:"+this.id+(r.query?" "+r.query:""),this.portal.queryItems(r,t))}_fetchCategorySchemaSet(e,t){return this.portal._fetchSelf(this.portal.authMode,!0,t).then(e=>{const r=e.contentCategorySetsGroupQuery;if(r){const e=new l["a"];return e.disableExtraQuery=!0,e.num=1,e.query=r,this.portal.queryGroups(e,t)}throw new n["a"]("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(r=>{if(r.total){const i=r.results[0],n=new l["a"];return n.num=1,n.query=`typekeywords:"${e}"`,i.queryItems(n,t)}throw new n["a"]("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(e=>e.total?e.results[0].fetchData("json",t).then(e=>{const t=e&&e.categorySchema;return t&&t.length?t:[]}):[])}};Object(i["a"])([Object(s["b"])()],u.prototype,"access",void 0),Object(i["a"])([Object(s["b"])({type:Date})],u.prototype,"created",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"description",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"id",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"isInvitationOnly",void 0),Object(i["a"])([Object(s["b"])({type:Date})],u.prototype,"modified",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"owner",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"portal",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"snippet",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"sortField",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"sortOrder",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"tags",void 0),Object(i["a"])([Object(s["b"])()],u.prototype,"thumbnail",void 0),Object(i["a"])([Object(s["b"])({readOnly:!0})],u.prototype,"thumbnailUrl",null),Object(i["a"])([Object(s["b"])()],u.prototype,"title",void 0),Object(i["a"])([Object(s["b"])({readOnly:!0})],u.prototype,"url",null),u=Object(i["a"])([Object(c["a"])("esri.portal.PortalGroup")],u);const d=u},f2e0:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));let i=0;const n=0;function a(){return++i}},f33e:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return n})),r.d(t,"e",(function(){return a}));var i=r("b50f");function n(e){const t=[];return e.levels.forEach(e=>{e.components.forEach(e=>{t.push(e.material)})}),Object(i["o"])(t)}function a(e){const t=new Array;return e.levels.forEach(e=>{e.components.forEach(e=>{e.textures&&t.push(...e.textures)})}),Object(i["o"])(t)}function s(e){const t=[];return e.components.forEach(e=>{t.push(e.geometry)}),Object(i["o"])(t)}function o(e){const t=[];return e.levels.forEach(e=>{e.components.forEach(e=>{t.push(e.geometry)})}),Object(i["o"])(t)}function c(e){return s(e).reduce((e,t)=>e+t.indexCount/3,0)}},f353:function(e,t,r){"use strict";function i(e){var t;const r=e.layer;return"floorInfo"in r&&null!=(t=r.floorInfo)&&t.floorField&&"floors"in e.view?s(e.view.floors,r.floorInfo.floorField):null}function n(e,t){var r;return"floorInfo"in t&&null!=(r=t.floorInfo)&&r.floorField?s(e,t.floorInfo.floorField):null}function a(e,t){const{definitionExpression:r}=t;return e?r?`(${r}) AND (${e})`:e:r}function s(e,t){if(null==e||!e.length)return null;const r=e.filter(e=>""!==e).map(e=>`'${e}'`);return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return n}))},f46e:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("a4ee"),n=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386"));function s(e){return"portalItem"in e}const o=e=>{let t=class extends e{get apiKey(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):s(this)?null==(e=this.portalItem)?void 0:e.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return Object(i["a"])([Object(n["b"])({type:String})],t.prototype,"apiKey",null),t=Object(i["a"])([Object(a["a"])("esri.layers.mixins.APIKeyMixin")],t),t}},f4cc:function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return P})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return j})),r.d(t,"g",(function(){return M})),r.d(t,"h",(function(){return I})),r.d(t,"i",(function(){return R})),r.d(t,"j",(function(){return w})),r.d(t,"k",(function(){return x})),r.d(t,"l",(function(){return v})),r.d(t,"m",(function(){return O})),r.d(t,"n",(function(){return p})),r.d(t,"o",(function(){return A})),r.d(t,"p",(function(){return _})),r.d(t,"q",(function(){return m})),r.d(t,"r",(function(){return g})),r.d(t,"s",(function(){return T})),r.d(t,"t",(function(){return S})),r.d(t,"u",(function(){return f})),r.d(t,"v",(function(){return d})),r.d(t,"w",(function(){return b})),r.d(t,"x",(function(){return D})),r.d(t,"y",(function(){return C})),r.d(t,"z",(function(){return y}));var i=r("1729"),n=r("ce50"),a=r("9d83"),s=r("e92d"),o=r("b2b2");function c(e){return Promise.all(e)}function l(e){return new Promise((t,r)=>{try{e(t,r)}catch(i){Promise.resolve().then(()=>r(i))}})}function u(e="Aborted"){return new n["a"]("AbortError",e)}function d(e,t="Aborted"){if(p(e))throw u(t)}function h(e){return Object(o["k"])(e)?"aborted"in e?e:e.signal:e}function p(e){const t=h(e);return Object(o["k"])(t)&&t.aborted}function f(e){if(O(e))throw e}function b(e){if(!O(e))throw e}function m(e,t){const r=h(e);if(!Object(o["j"])(r)){if(!r.aborted)return Object(a["d"])(r,"abort",()=>t());t()}}function g(e,t){const r=h(e);if(!Object(o["j"])(r))return d(r),Object(a["d"])(r,"abort",()=>t(u()))}function y(e,t){const r=h(t);return Object(o["j"])(r)?e:new Promise((r,i)=>{let n=m(t,()=>i(u()));const a=()=>n=Object(o["s"])(n);e.then(a,a),e.then(r,i)})}function O(e){return e&&"AbortError"===e.name}function v(e){return e.catch(e=>{if(!O(e))throw e})}function _(e,t=s["a"].getLogger("esri")){return e.catch(e=>{O(e)||t.error(e)})}function j(){let e=null;const t=new Promise((t,r)=>{e={promise:void 0,resolve:t,reject:r}});return e.promise=t,e}function w(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return w(t.map(t=>e[t])).then(e=>{const r={};return t.forEach((t,i)=>r[t]=e[i]),r})}const t=e;return l(e=>{const r=[];let i=t.length;0===i&&e(r),t.forEach(t=>{const n={promise:t||Promise.resolve(t)};r.push(n),n.promise.then(e=>{n.value=e}).catch(e=>{n.error=e}).then(()=>{--i,0===i&&e(r)})})})}function x(e){return w(e).then(e=>e.filter(e=>!!e.value).map(e=>e.value))}function T(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function E(e,t,r){const i=new AbortController;return m(r,()=>i.abort()),new Promise((r,n)=>{let a=setTimeout(()=>{a=0,r(t)},e);m(i,()=>{a&&(clearTimeout(a),n(u()))})})}function A(e){return e&&"function"==typeof e.then}function C(e){return A(e)?e:Promise.resolve(e)}function R(e,t=-1){let r,i,n,a,s=null;const c=(...l)=>{if(r){i=l,a&&a.reject(u()),a=j();const e=Object(o["c"])(a.promise);if(s){const e=s;s=null,e.abort()}return e}if(n=a||j(),a=null,t>0){const i=new AbortController;r=C(e(...l,i.signal));const n=r;E(t).then(()=>{r===n&&(a?i.abort():s=i)})}else r=1,r=C(e(...l));const d=()=>{const e=i;i=n=r=s=null,null!=e&&c(...e)},h=r,p=n;return h.then(d,d),h.then(p.resolve,p.reject),Object(o["c"])(p.promise)};return c}function M(){let e,t;const r=new Promise((r,i)=>{e=r,t=i}),n=t=>{e(t)};return n.resolve=t=>e(t),n.reject=e=>t(e),n.timeout=(e,t)=>i["a"].setTimeout(()=>n.reject(t),e),n.promise=r,n}function P(e,t){return e.then(t,t)}function I(e,t){let r,i=new AbortController;const n=e(i.signal);let a={promise:n,finished:!1,abort:()=>{i&&(i.abort(),i=null)}};const s=()=>{a&&(a.finished=!0,a=null),Object(o["k"])(r)&&(r.remove(),r=null),i=null};return n.then(s,s),r=m(t,()=>{Object(o["k"])(a)&&a.abort()}),a}function D(e){return Promise.resolve().then(()=>{d(e)})}},f51b:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("4856"),n=r("c1da"),a=r("1289"),s=(r("a7a7"),r("69c9"),r("d099"),r("18bf")),o=(r("3cacd"),r("d0e9"),r("9f91")),c=r("8802");const l=["oid","global-id"],u=["oid","global-id","guid"];function d({displayField:e,editFieldsInfo:t,fields:r,objectIdField:n,title:a},s){if(!r)return null;const o=y({editFieldsInfo:t,fields:r,objectIdField:n},s);if(!o.length)return null;const c=_({titleBase:a,fields:r,displayField:e}),l=v();return new i["a"]({title:c,content:l,fieldInfos:o})}const h=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],p=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!m(e.name,t)&&(!r||e.name!==r)&&!(l.indexOf(e.type)>-1)&&!h.some(t=>t.test(e.name));function f(e,t){const r=e;return t&&(e=e.filter(e=>-1===t.indexOf(e.type))),e===r&&(e=e.slice()),e.sort(b),e}function b(e,t){return"oid"===e.type?-1:"oid"===t.type?1:j(e)?-1:j(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:n,editorField:a}=t;return-1!==[r&&r.toLowerCase(),i&&i.toLowerCase(),n&&n.toLowerCase(),a&&a.toLowerCase()].indexOf(e.toLowerCase())}function g(e,t){return e.editable&&-1===u.indexOf(e.type)&&!m(e.name,t)}function y({editFieldsInfo:e,fields:t,objectIdField:r},i){return f(t,(null==i?void 0:i.ignoreFieldTypes)||w).map(t=>new o["a"]({fieldName:t.name,isEditable:g(t,e),label:t.alias,format:O(t),visible:p(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:null==i?void 0:i.visibleFieldNames})}))}function O(e){switch(e.type){case"small-integer":case"integer":case"single":return new c["a"]({digitSeparator:!0,places:0});case"double":return new c["a"]({digitSeparator:!0,places:2});case"date":return new c["a"]({dateFormat:"long-month-day-year"});default:return null}}function v(){return[new s["a"],new a["a"]]}function _(e){const t=Object(n["m"])(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r}function j(e){return"name"===(e.name&&e.name.toLowerCase())||("name"===(e.alias&&e.alias.toLowerCase())||void 0)}const w=["geometry","blob","raster","guid","xml"]},f547:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return y}));var i=r("2172");function n(e,t){return Object(i["e"])(e,t)}function a(e,t){const r=e.hasZ&&t.hasZ;let i,n,a;if(e.xmin<=t.xmin){if(i=t.xmin,e.xmax<i)return!1}else if(i=e.xmin,t.xmax<i)return!1;if(e.ymin<=t.ymin){if(n=t.ymin,e.ymax<n)return!1}else if(n=e.ymin,t.ymax<n)return!1;if(r&&t.hasZ)if(e.zmin<=t.zmin){if(a=t.zmin,e.zmax<a)return!1}else if(a=e.zmin,t.zmax<a)return!1;return!0}function s(e,t){const{points:r,hasZ:n}=t,a=n?i["b"]:i["a"];for(const i of r)if(a(e,i))return!0;return!1}const o=[0,0],c=[0,0],l=[0,0],u=[0,0],d=[o,c,l,u],h=[[l,o],[o,c],[c,u],[u,l]];function p(e,t){o[0]=e.xmin,o[1]=e.ymax,c[0]=e.xmax,c[1]=e.ymax,l[0]=e.xmin,l[1]=e.ymin,u[0]=e.xmax,u[1]=e.ymin;for(const r of d)if(Object(i["f"])(t,r))return!0;for(const r of t.rings){if(!r.length)continue;let t=r[0];if(Object(i["a"])(e,t))return!0;for(let n=1;n<r.length;n++){const a=r[n];if(Object(i["a"])(e,a)||g(t,a,h))return!0;t=a}}return!1}function f(e,t){o[0]=e.xmin,o[1]=e.ymax,c[0]=e.xmax,c[1]=e.ymax,l[0]=e.xmin,l[1]=e.ymin,u[0]=e.xmax,u[1]=e.ymin;const r=t.paths;for(const n of r){if(!r.length)continue;let t=n[0];if(Object(i["a"])(e,t))return!0;for(let r=1;r<n.length;r++){const a=n[r];if(Object(i["a"])(e,a)||g(t,a,h))return!0;t=a}}return!1}const b=[0,0];function m(e){for(let t=0;t<e.length;t++){const r=e[t];for(let n=0;n<r.length-1;n++){const i=r[n],a=r[n+1];for(let r=t+1;r<e.length;r++)for(let t=0;t<e[r].length-1;t++){const n=e[r][t],s=e[r][t+1];if(y(i,a,n,s,b)&&!(b[0]===i[0]&&b[1]===i[1]||b[0]===n[0]&&b[1]===n[1]||b[0]===a[0]&&b[1]===a[1]||b[0]===s[0]&&b[1]===s[1]))return!0}}const i=r.length;if(!(i<=4))for(let e=0;e<i-3;e++){let t=i-1;0===e&&(t=i-2);const n=r[e],a=r[e+1];for(let i=e+2;i<t;i++){const e=r[i],t=r[i+1];if(y(n,a,e,t,b)&&!(b[0]===n[0]&&b[1]===n[1]||b[0]===e[0]&&b[1]===e[1]||b[0]===a[0]&&b[1]===a[1]||b[0]===t[0]&&b[1]===t[1]))return!0}}}return!1}function g(e,t,r){for(let i=0;i<r.length;i++)if(y(e,t,r[i][0],r[i][1]))return!0;return!1}function y(e,t,r,i,n){const[a,s]=e,[o,c]=t,[l,u]=r,[d,h]=i,p=d-l,f=a-l,b=o-a,m=h-u,g=s-u,y=c-s,O=m*b-p*y;if(0===O)return!1;const v=(p*g-m*f)/O,_=(b*g-y*f)/O;return v>=0&&v<=1&&_>=0&&_<=1&&(n&&(n[0]=a+v*(o-a),n[1]=s+v*(c-s)),!0)}function O(e){switch(e){case"esriGeometryEnvelope":case"extent":return a;case"esriGeometryMultipoint":case"multipoint":return s;case"esriGeometryPoint":case"point":return n;case"esriGeometryPolygon":case"polygon":return p;case"esriGeometryPolyline":case"polyline":return f}}},f5e7:function(e,t,r){"use strict";r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return f}));var i,n=r("a4ee"),a=r("6a0ed"),s=r("7ffa"),o=r("e92d"),c=r("59b2"),l=r("1a3e"),u=r("d386");const d=o["a"].getLogger("esri.geometry.support.MeshVertexAttributes");let h=i=class extends a["a"]{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return f(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},d)}castPosition(e){return e&&e instanceof Float32Array&&d.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),f(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},d)}castUv(e){return f(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},d)}castNormal(e){return f(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},d)}castTangent(e){return f(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},d)}clone(){const e={position:Object(s["a"])(this.position),uv:Object(s["a"])(this.uv),normal:Object(s["a"])(this.normal),tangent:Object(s["a"])(this.tangent),color:Object(s["a"])(this.color)};return new i(e)}clonePositional(){const e={position:Object(s["a"])(this.position),normal:Object(s["a"])(this.normal),tangent:Object(s["a"])(this.tangent),uv:this.uv,color:this.color};return new i(e)}};function p(e,t,r,i){const{loggerTag:n,stride:a}=t;return e.length%a!=0?(i.error(n,"Invalid array length, expected a multiple of "+a),new r([])):e}function f(e,t,r,i,n){if(!e)return e;if(e instanceof t)return p(e,i,t,n);for(const a of r)if(e instanceof a)return p(new t(e),i,t,n);if(Array.isArray(e))return p(new t(e),i,t,n);{const i=r.map(e=>`'${e.name}'`);return n.error(`Failed to set property, expected one of ${i}, but got ${e.constructor.name}`),new t([])}}function b(e,t,r){t[r]=m(e)}function m(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}Object(n["a"])([Object(c["b"])({json:{write:b}})],h.prototype,"color",void 0),Object(n["a"])([Object(l["a"])("color")],h.prototype,"castColor",null),Object(n["a"])([Object(c["b"])({nonNullable:!0,json:{write:b}})],h.prototype,"position",void 0),Object(n["a"])([Object(l["a"])("position")],h.prototype,"castPosition",null),Object(n["a"])([Object(c["b"])({json:{write:b}})],h.prototype,"uv",void 0),Object(n["a"])([Object(l["a"])("uv")],h.prototype,"castUv",null),Object(n["a"])([Object(c["b"])({json:{write:b}})],h.prototype,"normal",void 0),Object(n["a"])([Object(l["a"])("normal")],h.prototype,"castNormal",null),Object(n["a"])([Object(c["b"])({json:{write:b}})],h.prototype,"tangent",void 0),Object(n["a"])([Object(l["a"])("tangent")],h.prototype,"castTangent",null),h=i=Object(n["a"])([Object(u["a"])("esri.geometry.support.MeshVertexAttributes")],h)},f626:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("a4ee"),n=r("8d60"),a=(r("e92d"),r("cea0")),s=(r("b50f"),r("c120"),r("2dd4"),r("cbf3")),o=r("d386"),c=r("44e6");let l=class extends c["a"]{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};Object(i["a"])([Object(s["a"])({Type:n["a"],ensureType:Object(a["m"])(n["a"])})],l.prototype,"itemType",void 0),l=Object(i["a"])([Object(o["a"])("esri.support.GraphicsCollection")],l)},f643:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var i=r("0b2d");class n{constructor(e,t){this.vec3=e,this.id=t}}function a(e,t,r,a){return new n(Object(i["h"])(e,t,r),a)}},f694:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return u})),r.d(t,"e",(function(){return h})),r.d(t,"f",(function(){return p})),r.d(t,"g",(function(){return d}));var i=r("5996"),n=r("2255"),a=r("7f83");function s(e){return new i["a"]({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const o=s(n["a"]),c=s(n["b"]),l=s(n["c"]),u=new i["a"]({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n["a"].radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function d(e){return e&&(Object(a["i"])(e)||e===c)?c:e&&(Object(a["j"])(e)||e===l)?l:o}function h(e){return e&&(Object(a["i"])(e)||e===c)?n["b"]:e&&(Object(a["j"])(e)||e===l)?n["c"]:n["a"]}function p(e){return Object(a["n"])(e)?n["b"]:Object(a["o"])(e)?n["c"]:n["a"]}},f6ab:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i,n=r("c15d"),a=r("a4ee"),s=(r("e92d"),r("cea0"),r("b50f"),r("c120"),r("2dd4"),r("448d")),o=r("d386");let c=i=class extends n["a"]{constructor(e){super(e),this.type="sketch"}clone(){return new i(this.cloneProperties())}};Object(a["a"])([Object(s["a"])({sketch:"sketch"},{readOnly:!0})],c.prototype,"type",void 0),c=i=Object(a["a"])([Object(o["a"])("esri.symbols.edges.SketchEdges3D")],c);const l=c;var u=r("c919");const d={types:{key:"type",base:n["a"],typeMap:{solid:u["a"],sketch:l}},json:{write:!0}}},f6ac:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return u}));var i=r("6e85"),n=r("2f00"),a=r("2eb0"),s=r("7697"),o=r("4377"),c=r("3886"),l=r("690a");function u(e){const t=new l["a"];return t.include(n["a"]),t.include(s["a"]),t.include(a["a"]),e.output===i["b"].Stretch?h(t,e):e.output===i["b"].Lut?d(t):e.output===i["b"].Hillshade&&p(t,e),t}function d(e){e.fragment.code.add(c["a"]`void main() {
  4318. vec2 pixelLocation = getPixelLocation(v_texcoord);
  4319. if (isOutside(pixelLocation)) {
  4320. gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
  4321. return;
  4322. }
  4323. vec4 currentPixel = getPixel(pixelLocation);
  4324. gl_FragColor = colormap(currentPixel, true);
  4325. }`)}function h(e,t){e.fragment.uniforms.add("u_bandCount","int"),e.fragment.uniforms.add("u_minCutOff","float",3),e.fragment.uniforms.add("u_maxCutOff","float",3),e.fragment.uniforms.add("u_factor","float",3),e.fragment.uniforms.add("u_minOutput","float"),e.fragment.uniforms.add("u_maxOutput","float"),e.fragment.uniforms.add("u_useGamma","bool"),e.fragment.uniforms.add("u_gamma","float",3),e.fragment.uniforms.add("u_gammaCorrection","float",3),e.fragment.code.add(c["a"]`float stretchOneValue(float val, float minCutOff, float maxCutOff, float minOutput, float maxOutput, float factor, bool useGamma, float gamma, float gammaCorrection) {
  4326. if (val >= maxCutOff) {
  4327. return maxOutput;
  4328. } else if (val <= minCutOff) {
  4329. return minOutput;
  4330. }
  4331. float stretchedVal;
  4332. if (useGamma) {
  4333. float tempf = 1.0;
  4334. float outRange = maxOutput - minOutput;
  4335. float relativeVal = (val - minCutOff) / (maxCutOff - minCutOff);
  4336. if (gamma > 1.0) {
  4337. tempf -= pow(1.0 / outRange, relativeVal * gammaCorrection);
  4338. }
  4339. stretchedVal = (tempf * outRange * pow(relativeVal, 1.0 / gamma) + minOutput) / 255.0;
  4340. } else {
  4341. stretchedVal = minOutput + (val - minCutOff) * factor;
  4342. }
  4343. return stretchedVal;
  4344. }`);const r=t.applyColormap?c["a"]`gl_FragColor = colormap(vec4(grayVal, grayVal, grayVal, currentPixel.a), !u_useGamma);`:c["a"]`gl_FragColor = vec4(grayVal, grayVal, grayVal, 1.0) * currentPixel.a * u_opacity;`;e.fragment.code.add(c["a"]`
  4345. void main() {
  4346. vec2 pixelLocation = getPixelLocation(v_texcoord);
  4347. if (isOutside(pixelLocation)) {
  4348. gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
  4349. return;
  4350. }
  4351. vec4 currentPixel = getPixel(pixelLocation);
  4352. ${t.stretchType===i["a"].Noop?c["a"]`
  4353. gl_FragColor = vec4(currentPixel.rgb, 1.0) * currentPixel.a * u_opacity;`:c["a"]`
  4354. if (currentPixel.a == 0.0) {
  4355. gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
  4356. return;
  4357. }
  4358. if (u_bandCount == 1) {
  4359. float grayVal = stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_useGamma, u_gamma[0], u_gammaCorrection[0]);
  4360. ${r}
  4361. } else {
  4362. float redVal = stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_useGamma, u_gamma[0], u_gammaCorrection[0]);
  4363. float greenVal = stretchOneValue(currentPixel.g, u_minCutOff[1], u_maxCutOff[1], u_minOutput, u_maxOutput, u_factor[1], u_useGamma, u_gamma[1], u_gammaCorrection[1]);
  4364. float blueVal = stretchOneValue(currentPixel.b, u_minCutOff[2], u_maxCutOff[2], u_minOutput, u_maxOutput, u_factor[2], u_useGamma, u_gamma[2], u_gammaCorrection[2]);
  4365. gl_FragColor = vec4(redVal, greenVal, blueVal, 1.0) * currentPixel.a * u_opacity;
  4366. }`}
  4367. }`)}function p(e,t){e.fragment.uniforms.add("u_hillshadeType","int"),e.fragment.uniforms.add("u_sinZcosAs","float",6),e.fragment.uniforms.add("u_sinZsinAs","float",6),e.fragment.uniforms.add("u_cosZs","float",6),e.fragment.uniforms.add("u_weights","float",6),e.fragment.uniforms.add("u_factor","vec2"),e.fragment.uniforms.add("u_applyColormap","bool"),e.fragment.uniforms.add("u_minValue","float"),e.fragment.uniforms.add("u_maxValue","float"),e.fragment.uniforms.add("u_srcImageSize","vec2"),e.fragment.include(o["a"]),e.fragment.code.add(c["a"]`vec4 overlay(float val, float minValue, float maxValue, float hillshade, float alpha) {
  4368. val = clamp((val - minValue) / (maxValue - minValue), 0.0, 1.0);
  4369. vec4 rgb = colormap(vec4(val, val, val, 1.0), false);
  4370. vec3 hsv = rgb2hsv(rgb.xyz);
  4371. hsv.z = hillshade;
  4372. return vec4(hsv2rgb(hsv) * alpha, alpha);
  4373. }`),e.fragment.code.add(c["a"]`float getNeighborHoodAlpha(float a, float b, float c, float d, float e, float f, float g, float h, float i){
  4374. if (a == 0.0 || a == 0.0 || a==0.0 || a == 0.0 || a == 0.0 || a==0.0 || a == 0.0 || a == 0.0 || a==0.0) {
  4375. return 0.0;
  4376. } else {
  4377. return e;
  4378. }
  4379. }`);const r=t.applyColormap?c["a"]`gl_FragColor = overlay(ve.r, u_minValue, u_maxValue, hillshade, alpha);`:c["a"]`hillshade *= alpha;
  4380. gl_FragColor = vec4(hillshade, hillshade, hillshade, alpha);`;e.fragment.code.add(c["a"]`
  4381. void main() {
  4382. vec2 pixelLocation = getPixelLocation(v_texcoord);
  4383. if (isOutside(pixelLocation)) {
  4384. gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
  4385. return;
  4386. }
  4387. vec4 currentPixel = getPixel(pixelLocation);
  4388. if (currentPixel.a == 0.0) {
  4389. gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
  4390. return;
  4391. }
  4392. //mirror edge pixels
  4393. vec2 axy = vec2(-1.0, -1.0);
  4394. vec2 bxy = vec2(0.0, -1.0);
  4395. vec2 cxy = vec2(1.0, -1.0);
  4396. vec2 dxy = vec2(-1.0, 0.0);
  4397. vec2 fxy = vec2(1.0, 0.0);
  4398. vec2 gxy = vec2(-1.0, 1.0);
  4399. vec2 hxy = vec2(0.0, 1.0);
  4400. vec2 ixy = vec2(1.0, 1.0);
  4401. vec2 onePixel = 1.0 / u_srcImageSize;
  4402. if (pixelLocation.s < onePixel.s) {
  4403. axy[0] = 1.0;
  4404. dxy[0] = 1.0;
  4405. gxy[0] = 1.0;
  4406. }
  4407. if (pixelLocation.t < onePixel.t) {
  4408. axy[1] = 1.0;
  4409. bxy[1] = 1.0;
  4410. cxy[1] = 1.0;
  4411. }
  4412. if (pixelLocation.s > 1.0 - onePixel.s) {
  4413. cxy[0] = -1.0;
  4414. fxy[0] = -1.0;
  4415. ixy[0] = -1.0;
  4416. }
  4417. if (pixelLocation.t > 1.0 - onePixel.t) {
  4418. gxy[1] = -1.0;
  4419. hxy[1] = -1.0;
  4420. ixy[1] = -1.0;
  4421. }
  4422. // calculate hillshade
  4423. vec4 va = texture2D(u_image, pixelLocation + onePixel * axy);
  4424. vec4 vb = texture2D(u_image, pixelLocation + onePixel * bxy);
  4425. vec4 vc = texture2D(u_image, pixelLocation + onePixel * cxy);
  4426. vec4 vd = texture2D(u_image, pixelLocation + onePixel * dxy);
  4427. vec4 ve = texture2D(u_image, pixelLocation);
  4428. vec4 vf = texture2D(u_image, pixelLocation + onePixel * fxy);
  4429. vec4 vg = texture2D(u_image, pixelLocation + onePixel * gxy);
  4430. vec4 vh = texture2D(u_image, pixelLocation + onePixel * hxy);
  4431. vec4 vi = texture2D(u_image, pixelLocation + onePixel * ixy);
  4432. // calculate the rate of z change along the x, y, and diagonal direction
  4433. float dzx = (vc + 2.0 * vf + vi - va - 2.0 * vd - vg).r * u_factor.s;
  4434. float dzy = (vg + 2.0 * vh + vi - va - 2.0 * vb - vc).r * u_factor.t;
  4435. float dzd = sqrt(1.0 + dzx * dzx + dzy * dzy);
  4436. float hillshade = 0.0;
  4437. // traditional single light source
  4438. if (u_hillshadeType == 0){
  4439. float cosDelta = u_sinZsinAs[0] * dzy - u_sinZcosAs[0] * dzx;
  4440. float z = (u_cosZs[0] + cosDelta) / dzd;
  4441. if (z < 0.0) z = 0.0;
  4442. hillshade = z;
  4443. } else {
  4444. // multi-directional with 6 light sources
  4445. for (int k = 0; k < 6; k++) {
  4446. float cosDelta = u_sinZsinAs[k] * dzy - u_sinZcosAs[k] * dzx;
  4447. float z = (u_cosZs[k] + cosDelta) / dzd;
  4448. if (z < 0.0) z = 0.0;
  4449. hillshade = hillshade + z * u_weights[k];
  4450. if (k == 5) break;
  4451. }
  4452. }
  4453. // set color
  4454. float alpha = getNeighborHoodAlpha(va.a, vb.a, vc.a, vd.a, ve.a, vf.a, vg.a, vh.a, vi.a);
  4455. alpha *= u_opacity;
  4456. ${r}
  4457. }
  4458. `)}const f=Object.freeze({__proto__:null,build:u})},f70f:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return c}));var i=r("521c"),n=r("5996"),a=r("a9ab");const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i["a"]({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n["a"].WebMercator}),minus180Line:new i["a"]({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n["a"].WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i["a"]({paths:[[[180,-180],[180,180]]],spatialReference:n["a"].WGS84}),minus180Line:new i["a"]({paths:[[[-180,-180],[-180,180]]],spatialReference:n["a"].WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=l(e);for(const i of r)for(const e of i)e[0]+=t;return e}function l(e){return Object(a["g"])(e)?e.rings:e.paths}function u(e){const t=(null==e?void 0:e.isWebMercator)?102100:4326;return[s[t].minX,s[t].maxX]}},f7be:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return c})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return s}));var i=r("c120"),n=r("e041");r("49fa");const a="4.23",s={async request(e,t){var i;const{default:a}=await Promise.resolve().then(r.bind(null,"2eab")),s=e.options,o=s.responseType;s.signal=null==t?void 0:t.signal,s.responseType="native"===o||"native-request-init"===o?"native-request-init":["blob","json","text"].includes(o)&&null!=(i=Object(n["n"])(e.url))&&i.after?o:"array-buffer";const c=await a(e.url,s),l={data:c.data,ssl:c.ssl};switch(c.requestOptions.responseType){case"native-request-init":return delete l.data.signal,l;case"blob":l.data=await l.data.arrayBuffer();break;case"json":l.data=(new TextEncoder).encode(JSON.stringify(l.data)).buffer;break;case"text":l.data=(new TextEncoder).encode(l.data).buffer}return{result:l,transferList:[l.data]}}};let o;function c(e){o=e}function l(e){const t=o&&o.findCredential(e);return t&&t.token?Object(n["d"])(e,"token",t.token):e}Object(i["a"])("host-webworker")||(Object(i["a"])("edge")||Object(i["a"])("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},f7eb:function(e,t,r){"use strict";function i(){return[1,0,0,1,0,0]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,r,i,n,a){return[e,t,r,i,n,a]}function s(e,t){return new Float64Array(e,t,6)}r.d(t,"a",(function(){return i}));Object.freeze({__proto__:null,create:i,clone:n,fromValues:a,createView:s})},f806:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var i,n=r("a4ee"),a=r("658b"),s=r("2b92"),o=r("6a0ed"),c=r("7ffa"),l=r("b2b2"),u=r("59b2"),d=(r("cea0"),r("afcf")),h=r("d386"),p=r("09db");r("b50f"),r("c120");let f=i=class extends o["a"]{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new i({respectsDaylightSaving:e,timezone:t})}};Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0}})],f.prototype,"respectsDaylightSaving",void 0),Object(n["a"])([Object(d["a"])("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],f.prototype,"readRespectsDaylightSaving",null),Object(n["a"])([Object(u["b"])({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],f.prototype,"timezone",void 0),f=i=Object(n["a"])([Object(h["a"])("esri.layers.support.TimeReference")],f);const b=f;var m,g=r("d81c");let y=m=class extends o["a"]{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new a["a"]({start:r,end:i})}writeFullTimeExtent(e,t){e&&Object(l["k"])(e.start)&&Object(l["k"])(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new s["a"]({value:t.timeInterval,unit:g["a"].fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new s["a"]({value:t.defaultTimeInterval,unit:g["a"].fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const r=e.toJSON();t.timeInterval=r.value,t.timeIntervalUnits=r.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:r,interval:i,startField:n,timeReference:a,fullTimeExtent:s,trackIdField:o,useTime:l}=this;return new m({cumulative:e,endField:t,hasLiveData:r,interval:i,startField:n,timeReference:Object(c["a"])(a),fullTimeExtent:Object(c["a"])(s),trackIdField:o,useTime:l})}};Object(n["a"])([Object(u["b"])({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],y.prototype,"cumulative",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],y.prototype,"endField",void 0),Object(n["a"])([Object(u["b"])({type:a["a"],json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),Object(n["a"])([Object(d["a"])("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),Object(n["a"])([Object(p["a"])("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),Object(n["a"])([Object(u["b"])({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),Object(n["a"])([Object(u["b"])({type:s["a"],json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),Object(n["a"])([Object(d["a"])("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),Object(n["a"])([Object(p["a"])("interval")],y.prototype,"writeInterval",null),Object(n["a"])([Object(u["b"])({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],y.prototype,"startField",void 0),Object(n["a"])([Object(u["b"])({type:b,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"timeReference",void 0),Object(n["a"])([Object(u["b"])({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),Object(n["a"])([Object(u["b"])({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],y.prototype,"useTime",void 0),y=m=Object(n["a"])([Object(h["a"])("esri.layers.support.TimeInfo")],y);const O=y},f830:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var i=r("fdc9"),n=r("b32b"),a=r("00cd");const s={key:"type",base:n["a"],typeMap:{algorithmic:i["a"],multipart:a["a"]}};function o(e){return e&&e.type?"algorithmic"===e.type?i["a"].fromJSON(e):"multipart"===e.type?a["a"].fromJSON(e):null:null}},f895:function(e,t,r){"use strict";r.d(t,"a",(function(){return v})),r.d(t,"b",(function(){return g})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return D})),r.d(t,"e",(function(){return E})),r.d(t,"f",(function(){return x})),r.d(t,"g",(function(){return w})),r.d(t,"h",(function(){return M})),r.d(t,"i",(function(){return C})),r.d(t,"j",(function(){return _})),r.d(t,"k",(function(){return y})),r.d(t,"l",(function(){return j})),r.d(t,"m",(function(){return V})),r.d(t,"n",(function(){return O}));r("c120");var i=r("e92d"),n=r("38a4"),a=r("b2b2"),s=r("d791"),o=r("e431"),c=r("0b2d"),l=r("7577"),u=r("0fc4"),d=r("3a35"),h=r("d18f"),p=r("a1b1"),f=r("7361");const b=i["a"].getLogger("esri.geometry.support.sphere");function m(){return Object(u["e"])()}function g(e,t=m()){return Object(l["c"])(t,e)}function y(e,t){return Object(u["g"])(e[0],e[1],e[2],t)}function O(e){return e}function v(e){e[0]=e[1]=e[2]=e[3]=0}function _(e){return e}function j(e){return Array.isArray(e)?e[3]:e}function w(e){return Array.isArray(e)?e:z}function x(e,t,r,i){return Object(u["g"])(e,t,r,i)}function T(e,t,r){return e!==r&&Object(o["m"])(r,e),r[3]=e[3]+t,r}function S(e,t,r){return b.error("sphere.setExtent is not yet supported"),e===r?r:g(e,r)}function E(e,t,r){if(Object(a["j"])(t))return!1;const{origin:i,direction:n}=t,s=A;s[0]=i[0]-e[0],s[1]=i[1]-e[1],s[2]=i[2]-e[2];const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=2*(n[0]*s[0]+n[1]*s[1]+n[2]*s[2]),l=c*c-4*o*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-e[3]*e[3]);if(l<0)return!1;const u=Math.sqrt(l);let d=(-c-u)/(2*o);const h=(-c+u)/(2*o);return(d<0||h<d&&h>0)&&(d=h),!(d<0)&&(r&&(r[0]=i[0]+n[0]*d,r[1]=i[1]+n[1]*d,r[2]=i[2]+n[2]*d),!0)}const A=Object(c["f"])();function C(e,t){return E(e,t,null)}function R(e,t,r){if(E(e,t,r))return r;const i=M(e,t,f["d"].get());return Object(o["h"])(r,t.origin,Object(o["g"])(f["d"].get(),t.direction,Object(o["o"])(t.origin,i)/Object(o["r"])(t.direction))),r}function M(e,t,r){const i=f["d"].get(),n=f["a"].get();Object(o["i"])(i,t.origin,t.direction);const a=j(e);Object(o["i"])(r,i,t.origin),Object(o["g"])(r,r,1/Object(o["r"])(r)*a);const c=L(e,t.origin),l=Object(p["a"])(t.origin,r);return Object(s["e"])(n,l+c,i),Object(o["s"])(r,r,n),r}function P(e,t,r){return E(e,t,r)?r:(Object(h["a"])(t,w(e),r),I(e,r,r))}function I(e,t,r){const i=Object(o["l"])(f["d"].get(),t,w(e)),n=Object(o["g"])(f["d"].get(),i,e[3]/Object(o["r"])(i));return Object(o["h"])(r,n,w(e))}function D(e,t){const r=Object(o["l"])(f["d"].get(),t,w(e)),i=Object(o["v"])(r),n=e[3]*e[3];return Math.sqrt(Math.abs(i-n))}function L(e,t){const r=Object(o["l"])(f["d"].get(),t,w(e)),i=Object(o["r"])(r),a=j(e),s=a+Math.abs(a-i);return Object(n["b"])(a/s)}const N=Object(c["f"])();function F(e,t,r,i){const a=Object(o["l"])(N,t,w(e));switch(r){case d["a"].X:{const e=Object(n["e"])(a,N)[2];return Object(o["y"])(i,-Math.sin(e),Math.cos(e),0)}case d["a"].Y:{const e=Object(n["e"])(a,N),t=e[1],r=e[2],s=Math.sin(t);return Object(o["y"])(i,-s*Math.cos(r),-s*Math.sin(r),Math.cos(t))}case d["a"].Z:return Object(o["t"])(i,a);default:return}}function k(e,t){const r=Object(o["l"])(B,t,w(e));return Object(o["r"])(r)-e[3]}function U(e,t,r,i){const n=k(e,t),a=F(e,t,d["a"].Z,B),s=Object(o["g"])(B,a,r-n);return Object(o["h"])(i,t,s)}const z=Object(c["f"])(),B=Object(c["f"])(),V=Object.freeze({__proto__:null,create:m,copy:g,fromCenterAndRadius:y,wrap:O,clear:v,fromRadius:_,getRadius:j,getCenter:w,fromValues:x,elevate:T,setExtent:S,intersectRay:E,intersectsRay:C,intersectRayClosestSilhouette:R,closestPointOnSilhouette:M,closestPoint:P,projectPoint:I,distanceToSilhouette:D,angleToSilhouette:L,axisAt:F,altitudeAt:k,setAltitudeAt:U})},f8d4:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return y})),r.d(t,"c",(function(){return O}));var i=r("28b1");function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function a(e){return void 0!==e.points}function s(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths}function c(e){return void 0!==e.rings}const l=[];function u(e,t,r,i){return{xmin:e,ymin:t,xmax:r,ymax:i}}function d(e,t,r,i,n,a){return{xmin:e,ymin:t,zmin:r,xmax:i,ymax:n,zmax:a}}function h(e,t,r,i,n,a){return{xmin:e,ymin:t,mmin:r,xmax:i,ymax:n,mmax:a}}function p(e,t,r,i,n,a,s,o){return{xmin:e,ymin:t,zmin:r,mmin:i,xmax:n,ymax:a,zmax:s,mmax:o}}function f(e,t=!1,r=!1){return t?r?p(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]):d(e[0],e[1],e[2],e[3],e[4],e[5]):r?h(e[0],e[1],e[2],e[3],e[4],e[5]):u(e[0],e[1],e[2],e[3])}function b(e){return e?n(e)?e:s(e)?g(e):c(e)?y(e):o(e)?O(e):a(e)?m(e):null:null}function m(e){const{hasZ:t,hasM:r,points:n}=e;return f(Object(i["c"])(l,n,t,r),t,r)}function g(e){const{x:t,y:r,z:i,m:n}=e,a=null!=n;return null!=i?a?p(t,r,i,n,t,r,i,n):d(t,r,i,t,r,i):a?h(t,r,n,t,r,n):u(t,r,t,r)}function y(e){const{hasZ:t,hasM:r,rings:n}=e,a=Object(i["d"])(l,n,t,r);return a?f(a,t,r):null}function O(e){const{hasZ:t,hasM:r,paths:n}=e,a=Object(i["d"])(l,n,t,r);return a?f(a,t,r):null}},f976:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return c}));var i=r("0028"),n=r("0b86"),a=r("5cdb");function s(e,t){return c(e,null,t)}const o=Object(n["b"])({types:a["a"]});function c(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r&&r.messages&&r.messages.push(new i["a"]("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):o(e,t,r):null}},f97e:function(e,t,r){"use strict";r.d(t,"a",(function(){return C})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return x}));var i=r("ce50"),n=r("b2b2"),a=r("013b"),s=r("8152"),o=r("86e7");const c=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function d(e){return e>=c.length?null:c[e]}function h(e){return e>=l.length?null:l[e]}function p(e){return e>=u.length?null:u[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function b(e,t,r){const i=3,n=t.createPointGeometry(r);for(;e.next();)switch(e.tag()){case i:{const r=e.getUInt32(),i=e.pos()+r;let a=0;for(;e.pos()<i;)t.addCoordinatePoint(n,e.getSInt64(),a++);break}default:e.skip()}return n}function m(e,t,r){const i=2,n=3,a=t.createGeometry(r),s=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;e.next();)switch(e.tag()){case i:{const r=e.getUInt32(),i=e.pos()+r;let n=0;for(;e.pos()<i;)t.addLength(a,e.getUInt32(),n++);break}case n:{const r=e.getUInt32(),i=e.pos()+r;let n=0;for(t.allocateCoordinates(a);e.pos()<i;)t.addCoordinate(a,e.getSInt64(),n),n++,n===s&&(n=0);break}default:e.skip()}return a}function g(e){const t=1,r=2,i=3,n=new s["a"];let a="esriGeometryPoint";for(;e.next();)switch(e.tag()){case r:{const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r;)n.lengths.push(e.getUInt32());break}case i:{const t=e.getUInt32(),r=e.pos()+t;for(;e.pos()<r;)n.coords.push(e.getSInt64());break}case t:a=o["a"][e.getEnum()];break;default:e.skip()}return{queryGeometry:n,queryGeometryType:a}}function y(e){const t=1,r=2,i=3,n=4,a=5,s=6,o=7,c=8,l=9;for(;e.next();)switch(e.tag()){case t:return e.getString();case r:return e.getFloat();case i:return e.getDouble();case n:return e.getSInt32();case a:return e.getUInt32();case s:return e.getInt64();case o:return e.getUInt64();case c:return e.getSInt64();case l:return e.getBool();default:return e.skip(),null}return null}function O(e){const t=1,r=2,i=3,n=4,a=5,s=6,o={type:d(0)};for(;e.next();)switch(e.tag()){case t:o.name=e.getString();break;case r:o.type=d(e.getEnum());break;case i:o.alias=e.getString();break;case n:o.sqlType=h(e.getEnum());break;case a:e.skip();break;case s:o.defaultValue=e.getString();break;default:e.skip()}return o}function v(e){const t=1,r=2,i={};for(;e.next();)switch(e.tag()){case t:i.name=e.getString();break;case r:i.isSystemMaintained=e.getBool();break;default:e.skip()}return i}function _(e,t,r,i){const n=1,a=2,s=4,o=t.createFeature(r);let c=0;for(;e.next();)switch(e.tag()){case n:{const t=i[c++].name;o.attributes[t]=e.processMessage(y);break}case a:o.geometry=e.processMessageWithArgs(m,t,r);break;case s:o.centroid=e.processMessageWithArgs(b,t,r);break;default:e.skip()}return o}function j(e){const t=1,r=2,i=3,n=4,a=[1,1,1,1];for(;e.next();)switch(e.tag()){case t:a[0]=e.getDouble();break;case r:a[1]=e.getDouble();break;case n:a[2]=e.getDouble();break;case i:a[3]=e.getDouble();break;default:e.skip()}return a}function w(e){const t=1,r=2,i=3,n=4,a=[0,0,0,0];for(;e.next();)switch(e.tag()){case t:a[0]=e.getDouble();break;case r:a[1]=e.getDouble();break;case n:a[2]=e.getDouble();break;case i:a[3]=e.getDouble();break;default:e.skip()}return a}function x(e){const t=1,r=2,i=3,n={originPosition:p(0)};for(;e.next();)switch(e.tag()){case t:n.originPosition=p(e.getEnum());break;case r:n.scale=e.processMessage(j);break;case i:n.translate=e.processMessage(w);break;default:e.skip()}return n}function T(e){const t=1,r=2,i=3,n={};for(;e.next();)switch(e.tag()){case t:n.shapeAreaFieldName=e.getString();break;case r:n.shapeLengthFieldName=e.getString();break;case i:n.units=e.getString();break;default:e.skip()}return n}function S(e,t){const r=1,i=2,n=3,a=4,s=5,o=t.createSpatialReference();for(;e.next();)switch(e.tag()){case r:o.wkid=e.getUInt32();break;case s:o.wkt=e.getString();break;case i:o.latestWkid=e.getUInt32();break;case n:o.vcsWkid=e.getUInt32();break;case a:o.latestVcsWkid=e.getUInt32();break;default:e.skip()}return o}function E(e,t){const r=1,i=2,n=3,a=4,s=5,o=7,c=8,l=9,u=10,d=11,h=12,p=13,b=15,m=t.createFeatureResult();m.geometryType=f(t,0);let g=!1;for(;e.next();)switch(e.tag()){case r:m.objectIdFieldName=e.getString();break;case n:m.globalIdFieldName=e.getString();break;case a:m.geohashFieldName=e.getString();break;case s:m.geometryProperties=e.processMessage(T);break;case o:m.geometryType=f(t,e.getEnum());break;case c:m.spatialReference=e.processMessageWithArgs(S,t);break;case u:m.hasZ=e.getBool();break;case d:m.hasM=e.getBool();break;case h:m.transform=e.processMessage(x);break;case l:{const t=e.getBool();m.exceededTransferLimit=t;break}case p:t.addField(m,e.processMessage(O));break;case b:g||(t.prepareFeatures(m),g=!0),t.addFeature(m,e.processMessageWithArgs(_,t,m,m.fields));break;case i:m.uniqueIdField=e.processMessage(v);break;default:e.skip()}return t.finishFeatureResult(m),m}function A(e,t){const r=1,i=4,a={};let s=null;for(;e.next();)switch(e.tag()){case i:s=e.processMessageWithArgs(g);break;case r:a.featureResult=e.processMessageWithArgs(E,t);break;default:e.skip()}return Object(n["k"])(s)&&a.featureResult&&t.addQueryGeometry(a,s),a}function C(e,t){try{const r=2,i=new a["a"](new Uint8Array(e),new DataView(e)),n={};for(;i.next();)i.tag()===r?n.queryResult=i.processMessageWithArgs(A,t):i.skip();return n}catch(r){throw new i["a"]("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:r})}}},f9d0:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get(e,t){var r;return null==(r=this._outer.get(e))?void 0:r.get(t)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}forEach(e){this._outer.forEach((t,r)=>e(t,r))}}},fa1e:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("b7bd");const n=new Map([[i["a"].POSITION,0],[i["a"].NORMAL,1],[i["a"].UV0,2],[i["a"].COLOR,3],[i["a"].SIZE,4],[i["a"].TANGENT,4],[i["a"].AUXPOS1,5],[i["a"].SYMBOLCOLOR,5],[i["a"].AUXPOS2,6],[i["a"].FEATUREATTRIBUTE,6],[i["a"].INSTANCEFEATUREATTRIBUTE,6],[i["a"].INSTANCECOLOR,7],[i["a"].MODEL,8],[i["a"].MODELNORMAL,12],[i["a"].MODELORIGINHI,11],[i["a"].MODELORIGINLO,15]])},fa2a:function(e,t,r){"use strict";function i(e){const t=[];return function*(){yield*t;for(const r of e)t.push(r),yield r}}function n(e,t){for(const r of e)if(null!=r&&t(r))return r}function a(e){return null!=e&&"function"==typeof e[Symbol.iterator]}r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return a}))},fa73:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.Recreate_Symbol=0]="Recreate_Symbol",e[e.Recreate_Graphics=1]="Recreate_Graphics",e[e.Fast_Update=2]="Fast_Update"}(i||(i={}))},fa8a:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));var i=r("9d1d");class n{constructor(e,t={ignoreUnknown:!1,useNumericKeys:!1}){this.jsonToAPI=e,this.options=t,this.apiValues=[],this.jsonValues=[],this.apiToJSON=this._invertMap(e),this.apiValues=this._getKeysSorted(this.apiToJSON),this.jsonValues=this._getKeysSorted(this.jsonToAPI),this.read=e=>this.fromJSON(e),this.write=(e,t,r)=>{const n=this.toJSON(e);void 0!==n&&Object(i["c"])(r,n,t)},this.write.isJSONMapWriter=!0}toJSON(e){if(this.apiToJSON.hasOwnProperty(e)){const t=this.apiToJSON[e];return this.options.useNumericKeys?+t:t}return this.options.ignoreUnknown?void 0:e}fromJSON(e){return this.jsonToAPI.hasOwnProperty(e)?this.jsonToAPI[e]:this.options.ignoreUnknown?void 0:e}_invertMap(e){const t={};for(const r in e)t[e[r]]=r;return t}_getKeysSorted(e){const t=[];for(const r in e)t.push(r);return t.sort(),t}}function a(){return function(e,t){return new n(e,{ignoreUnknown:!0,...t})}}},fa90:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("9b9d"),c=r("6a0ed");let l=i=class extends c["a"]{constructor(e){super(e),this.linkURL=null,this.sourceURL=null}clone(){return new i({linkURL:this.linkURL,sourceURL:this.sourceURL})}};Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],l.prototype,"linkURL",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],l.prototype,"sourceURL",void 0),l=i=Object(n["a"])([Object(s["a"])("esri.popup.content.support.ImageMediaInfoValue")],l);const u=l;var d;let h=d=class extends o["a"]{constructor(e){super(e),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new d({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};Object(n["a"])([Object(a["b"])({type:Number,json:{write:!0}})],h.prototype,"refreshInterval",void 0),Object(n["a"])([Object(a["b"])({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],h.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({type:u,json:{write:!0}})],h.prototype,"value",void 0),h=d=Object(n["a"])([Object(s["a"])("esri.popup.content.ImageMediaInfo")],h);const p=h},fab3:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var i,n=r("a4ee"),a=r("fc29"),s=r("b2b2"),o=r("f4cc"),c=r("d386");!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(i||(i={}));class l{constructor(e){this.instance=e,this._resolver=Object(o["f"])(),this._status=i.PENDING,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=i.RESOLVED,this._cleanUp()},()=>{this._status=i.REJECTED,this._cleanUp()})}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return this._status===i.RESOLVED}isRejected(){return this._status===i.REJECTED}isFulfilled(){return this._status!==i.PENDING}abort(){this._resolver.reject(Object(o["e"])())}when(e,t){return this._resolver.promise.then(e,t)}_cleanUp(){this._allPromise=this._resolvingPromises=this._allPromise=null}_tryResolve(){if(this.isFulfilled())return;const e=Object(o["f"])(),t=[...this._resolvingPromises,Object(s["c"])(e.promise)],r=this._allPromise=Promise.all(t);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)},e=>{this.isFulfilled()||this._allPromise!==r||Object(o["m"])(e)||this._resolver.reject(e)}),e.resolve()}}const u=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new l(this),this.addResolvingPromise(Promise.resolve())}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return new Promise((e,t)=>{this._promiseProps.when(e,t)}).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=Object(n["a"])([Object(c["a"])("esri.core.Promise")],t),t};let d=class extends(u(a["a"])){};d=Object(n["a"])([Object(c["a"])("esri.core.Promise")],d)},fc00:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var i=r("8190"),n=r("c6ac");class a{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const r of e.fieldNames){const t=e.fields.get(r);this[r]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new a(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t,r,i){const n=this.stride;if(n%4==0){const a=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(a)}else{const a=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(a)}}}class s{constructor(){this.stride=0,this.fields=new Map,this.fieldNames=[]}vec2f(e,t){return this._appendField(e,i["m"],t),this}vec2f64(e,t){return this._appendField(e,i["n"],t),this}vec3f(e,t){return this._appendField(e,i["u"],t),this}vec3f64(e,t){return this._appendField(e,i["v"],t),this}vec4f(e,t){return this._appendField(e,i["C"],t),this}vec4f64(e,t){return this._appendField(e,i["D"],t),this}mat3f(e,t){return this._appendField(e,i["f"],t),this}mat3f64(e,t){return this._appendField(e,i["g"],t),this}mat4f(e,t){return this._appendField(e,i["h"],t),this}mat4f64(e,t){return this._appendField(e,i["i"],t),this}vec4u8(e,t){return this._appendField(e,i["J"],t),this}f32(e,t){return this._appendField(e,i["a"],t),this}f64(e,t){return this._appendField(e,i["b"],t),this}u8(e,t){return this._appendField(e,i["l"],t),this}u16(e,t){return this._appendField(e,i["j"],t),this}i8(e,t){return this._appendField(e,i["e"],t),this}vec2i8(e,t){return this._appendField(e,i["q"],t),this}vec2i16(e,t){return this._appendField(e,i["o"],t),this}vec2u8(e,t){return this._appendField(e,i["t"],t),this}vec4u16(e,t){return this._appendField(e,i["H"],t),this}u32(e,t){return this._appendField(e,i["k"],t),this}_appendField(e,t,r){const i=t.ElementCount*Object(n["a"])(t.ElementType),a=this.stride;this.fields.set(e,{size:i,constructor:t,offset:a,optional:r}),this.stride+=i,this.fieldNames.push(e)}alignTo(e){return this.stride=Math.floor((this.stride+e-1)/e)*e,this}hasField(e){return this.fieldNames.indexOf(e)>=0}createBuffer(e){return new a(this,e)}createView(e){return new a(this,e)}clone(){const e=new s;return e.stride=this.stride,e.fields=new Map,this.fields.forEach((t,r)=>e.fields.set(r,t)),e.fieldNames=this.fieldNames.slice(),e.BufferType=this.BufferType,e}}function o(){return new s}},fc29:function(e,t,r){"use strict";r.d(t,"a",(function(){return A}));var i=r("e20b"),n=r("e92d"),a=r("9d9d"),s=r("3eec"),o=r("7af8"),c=(r("c120"),r("7ffa")),l=r("ecd7"),u=r("92ef"),d=r("c0d3"),h=r("a9da"),p=r("9b86");class f{constructor(e,t,r){this.properties=e,this.propertyName=t,this.metadata=r,this._observers=null,this._accessed=null,this._handles=null,this.flags=h["a"].Dirty|(r.nonNullable?h["a"].NonNullable:0)|(r.hasOwnProperty("value")?h["a"].HasDefaultValue:0)|(void 0===r.get?h["a"].DepTrackingInitialized:0)|(void 0===r.dependsOn?h["a"].AutoTracked:0)}destroy(){this._accessed=null,this._observers=null,this._clearObservationHandles()}getComputed(){Object(d["d"])(this);const e=this.properties.store,t=this.propertyName,r=this.flags,i=e.get(t);if(r&h["a"].Computing)return i;if(~r&h["a"].Dirty&&e.has(t))return i;this.flags|=h["a"].Computing;const n=this.properties.host;let a;r&h["a"].AutoTracked?a=Object(d["b"])(this,this.metadata.get,n):(Object(d["e"])(n,this),a=this.metadata.get.call(n)),e.set(t,a,u["a"].COMPUTED);const s=e.get(t);return s===i?this.flags&=~h["a"].Dirty:Object(d["c"])(this.commit,this),this.flags&=~h["a"].Computing,s}onObservableAccessed(e){e!==this&&(null===this._accessed&&(this._accessed=[]),this._accessed.includes(e)||this._accessed.push(e))}onTrackingEnd(){this._clearObservationHandles(),this.flags|=h["a"].DepTrackingInitialized;const e=this._accessed;if(null===e)return;let t=this._handles;null===t&&(t=this._handles=[]);for(let r=0;r<e.length;++r)t.push(e[r].observe(this));e.length=0}observe(e){return null===this._observers&&(this._observers=[]),this._observers.includes(e)||this._observers.push(e),new p["a"](this._observers,e)}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}onInvalidated(){~this.flags&h["a"].Overriden&&(this.flags|=h["a"].Dirty);const e=this._observers;if(null!==e)for(let t=0;t<e.length;++t)e[t].onInvalidated()}commit(){this.flags&=~h["a"].Dirty,this.onCommitted()}onCommitted(){if(null===this._observers)return;const e=this._observers.slice();for(let t=0;t<e.length;++t)e[t].onCommitted()}_clearObservationHandles(){const e=this._handles;if(null!==e){for(let t=0;t<e.length;++t)e[t].remove();e.length=0}}}class b{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new b;return this._values.forEach((r,i)=>{e&&e.has(i)||t.set(i,Object(c["a"])(r))}),t}get(e){return this._values.get(e)}originOf(){return u["a"].USER}keys(){return[...this._values.keys()]}set(e,t){this._values.set(e,t)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}forEach(e){this._values.forEach(e)}}var m=r("4c37");function g(e,t,r){return void 0!==e}function y(e,t,r,i){return void 0!==e&&(!(null==r&&e.flags&h["a"].NonNullable)||(i.lifecycle,s["a"].INITIALIZING,!1))}function O(e){return e&&"function"==typeof e.destroy}n["a"].getLogger("esri.core.accessorSupport.Properties");class v{constructor(e){this.host=e,this.properties=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=s["a"].INITIALIZING,this.store=new b,this._origin=u["a"].USER;const t=this.host.constructor.__accessorMetadata__,r=t.properties;for(const i in r){const e=new f(this,i,r[i]);this.properties.set(i,e)}this.metadatas=r,this._autoDestroy=t.autoDestroy}initialize(){this.lifecycle=s["a"].CONSTRUCTING}constructed(){this.lifecycle=s["a"].CONSTRUCTED}destroy(){if(this.destroyed=!0,this._autoDestroy)for(const[e,t]of this.properties){const r=this.internalGet(e);r&&O(r)&&(r.destroy(),~t.flags&h["a"].NonNullable&&this._internalSet(t,null)),t.destroy()}else for(const[e,t]of this.properties)t.destroy()}get initialized(){return this.lifecycle!==s["a"].INITIALIZING}get(e){const t=this.properties.get(e);if(t.metadata.get)return t.getComputed();Object(d["d"])(t);const r=this.store;return r.has(e)?r.get(e):t.metadata.value}originOf(e){const t=this.store.originOf(e);if(void 0===t){const t=this.properties.get(e);if(void 0!==t&&t.flags&h["a"].HasDefaultValue)return"defaults"}return Object(u["c"])(t)}has(e){return!!this.properties.has(e)&&this.store.has(e)}keys(){return[...this.properties.keys()]}internalGet(e){const t=this.properties.get(e);if(g(t))return this.store.has(e)?this.store.get(e):t.metadata.value}internalSet(e,t){const r=this.properties.get(e);g(r)&&this._internalSet(r,t)}getDependsInfo(e,t,r){const i=this.properties.get(t);if(!g(i))return"";const n=new Set,a=Object(d["b"])({onObservableAccessed:e=>n.add(e),onTrackingEnd:()=>{}},()=>{var t;return null==(t=i.metadata.get)?void 0:t.call(e)});let s=`${r}${e.declaredClass.split(".").pop()}.${t}: ${a}\n`;if(0===n.size)return s;r+=" ";for(const o of n){if(!(o instanceof f))continue;const e=o.properties.host,t=o.propertyName,i=Object(m["a"])(e);s+=i?i.getDependsInfo(e,t,r):`${r}${t}: undefined\n`}return s}setAtOrigin(e,t,r){const i=this.properties.get(e);if(g(i))return this._setAtOrigin(i,t,r)}isOverridden(e){const t=this.properties.get(e);return void 0!==t&&!!(t.flags&h["a"].Overriden)}clearOverride(e){const t=this.properties.get(e);void 0!==t&&t.flags&h["a"].Overriden&&(t.flags&=~h["a"].Overriden,t.notifyChange())}override(e,t){const r=this.properties.get(e);if(!y(r,e,t,this))return;const i=r.metadata.cast;if(i){const e=this._cast(i,t),{valid:r,value:n}=e;if(j.release(e),!r)return;t=n}r.flags|=h["a"].Overriden,this._internalSet(r,t)}set(e,t){const r=this.properties.get(e);if(!y(r,e,t,this))return;const i=r.metadata.cast;if(i){const e=this._cast(i,t),{valid:r,value:n}=e;if(j.release(e),!r)return;t=n}const n=r.metadata.set;n?n.call(this.host,t):this._internalSet(r,t)}setDefaultOrigin(e){this._origin=Object(u["e"])(e)}getDefaultOrigin(){return Object(u["c"])(this._origin)}notifyChange(e){const t=this.properties.get(e);void 0!==t&&t.notifyChange()}invalidate(e){const t=this.properties.get(e);void 0!==t&&t.invalidate()}commit(e){const t=this.properties.get(e);void 0!==t&&t.commit()}_internalSet(e,t){const r=this.lifecycle!==s["a"].INITIALIZING?this._origin:u["a"].DEFAULTS;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const i=this.store,n=e.propertyName;i.has(n,r)&&Object(c["b"])(t,i.get(n))&&~e.flags&h["a"].Overriden&&r===i.originOf(n)||(e.invalidate(),i.set(n,t,r),e.commit(),Object(d["a"])(this.host,e))}_cast(e,t){const r=j.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}class _{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}}const j=new l["a"](_);var w=r("2dd4"),x=r("0646"),T=r("59b2"),S=r("d386");function E(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor&&e.constructor.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}class A{constructor(...e){if(this.constructor===A)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{enumerable:!1,value:new v(this)}),e.length>0&&this.normalizeCtorArgs&&(this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,e))}static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:i}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const n=this;class a extends n{constructor(...e){super(...e),this.inherited=null,i&&i.apply(this,e)}}Object(o["a"])(a.prototype);for(const s in e){const t=e[s];a.prototype[s]="function"==typeof t?function(...e){const r=this.inherited;let i;this.inherited=function(...e){if(n.prototype[s])return n.prototype[s].apply(this,e)};try{i=t.apply(this,e)}catch(a){throw this.inherited=r,a}return this.inherited=r,i}:e[s]}for(const s in t){const e=E(t[s]);Object(T["b"])(e)(a.prototype,s)}return Object(S["a"])(r)(a)}postscript(e){const t=this.__accessor__,r=t.ctorArgs||e;t.initialize(),r&&(this.set(r),t.ctorArgs=null),t.constructed(),this.initialize()}initialize(){}destroy(){this.destroyed||(Object(x["c"])(this),this.__accessor__.destroy())}get initialized(){return this.__accessor__&&this.__accessor__.initialized||!1}get constructed(){return this.__accessor__&&this.__accessor__.lifecycle===s["a"].CONSTRUCTED||!1}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(e){this.get(e)}get(e){return Object(a["b"])(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}isInstanceOf(e){return Object(i["b"])(n["a"].getLogger(this.declaredClass),"isInstanceOf",{replacement:"Use instanceof directly",version:"4.16"}),this instanceof e}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return Object(w["a"])(this,e,t),this}watch(e,t,r){return Object(x["d"])(this,e,t,r)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_override(e,t){return this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}},fcb1:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return l}));var i=r("dfaf"),n=r("d047"),a=r("f159"),s=r("3886"),o=r("690a"),c=r("b7bd");function l(e){const t=new o["a"];return t.attributes.add(c["a"].POSITION,"vec2"),t.include(i["a"],{attributeTextureCoordinates:i["b"].Default}),t.varyings.add("worldRay","vec3"),t.varyings.add("eyeDir","vec3"),t.vertex.uniforms.add("inverseProjectionMatrix","mat4"),t.vertex.uniforms.add("inverseViewMatrix","mat4"),t.vertex.code.add(s["a"]`void main(void) {
  4459. vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1, 1)).xyz;
  4460. eyeDir = posViewNear;
  4461. worldRay = (inverseViewMatrix * vec4(posViewNear, 0)).xyz;
  4462. forwardTextureCoordinates();
  4463. gl_Position = vec4(position, 1, 1);
  4464. }`),t.fragment.uniforms.add("lightingMainDirection","vec3").add("radii","vec2").add("scaleHeight","float").add("cameraPosition","vec3").add("nearFar","vec2").add("heightParameters","vec4").add("innerFadeDistance","float").add("altitudeFade","float").add("depthTex","sampler2D").add("betaRayleigh","vec3").add("betaCombined","vec3").add("betaMie","float").add("hazeStrength","float"),t.include(a["a"]),e.haze&&t.fragment.include(n["a"]),t.fragment.code.add(s["a"]`vec2 sphereIntersect(vec3 start, vec3 dir, float radius, bool planet) {
  4465. float a = dot(dir, dir);
  4466. float b = 2.0 * dot(dir, start);
  4467. float c = planet ? heightParameters[1] - radius * radius : heightParameters[2];
  4468. float d = (b * b) - 4.0 * a * c;
  4469. if (d < 0.0) {
  4470. return vec2(1e5, -1e5);
  4471. }
  4472. return vec2((-b - sqrt(d)) / (2.0 * a), (-b + sqrt(d)) / (2.0 * a));
  4473. }`),t.fragment.code.add(s["a"]`float chapmanApproximation(float X, float h, float cosZenith) {
  4474. float c = sqrt(X + h);
  4475. float cExpH = c * exp(-h);
  4476. if (cosZenith >= 0.0) {
  4477. return cExpH / (c * cosZenith + 1.0);
  4478. } else {
  4479. float x0 = sqrt(1.0 - cosZenith * cosZenith) * (X + h);
  4480. float c0 = sqrt(x0);
  4481. return 2.0 * c0 * exp(X - x0) - cExpH / (1.0 - c * cosZenith);
  4482. }
  4483. }`),t.fragment.code.add(s["a"]`float getOpticalDepth(vec3 position, vec3 dir, float h) {
  4484. return scaleHeight * chapmanApproximation(radii[0] / scaleHeight, h, dot(normalize(position), dir));
  4485. }`),t.fragment.code.add(s["a"]`
  4486. const int STEPS = 6;
  4487. float getGlow(float dist, float radius, float intensity) {
  4488. return pow(radius / max(dist, 1e-6), intensity);
  4489. }
  4490. vec3 getAtmosphereColour(vec3 cameraPos, vec3 rayDir, vec3 lightDir, float terrainDepth) {
  4491. float reducedPlanetRadius = radii[0] - 20000.0;
  4492. vec2 rayPlanetIntersect = sphereIntersect(cameraPos, rayDir, reducedPlanetRadius, true);
  4493. vec2 rayAtmosphereIntersect = sphereIntersect(cameraPos, rayDir, radii[1], false);
  4494. bool hitsAtmosphere = (rayAtmosphereIntersect.x <= rayAtmosphereIntersect.y) && rayAtmosphereIntersect.x > 0.0;
  4495. bool insideAtmosphere = heightParameters[0] < radii[1];
  4496. if (!(hitsAtmosphere || insideAtmosphere)) {
  4497. return vec3(0);
  4498. }
  4499. bool hitsPlanet = (rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.x > 0.0;
  4500. float start = insideAtmosphere ? 0.0 : rayAtmosphereIntersect.x;
  4501. if (heightParameters[0] < reducedPlanetRadius) {
  4502. // Long light rays from the night side of the planet lead to numerical instability
  4503. // Do not render the atmosphere in such cases
  4504. if (dot(rayDir, normalize(cameraPos)) < -0.025) {
  4505. return vec3(0);
  4506. }
  4507. start = rayPlanetIntersect.y;
  4508. }
  4509. float end = hitsPlanet ? rayPlanetIntersect.x : rayAtmosphereIntersect.y;
  4510. float maxEnd = end;
  4511. ${e.haze?s["a"]`if (terrainDepth != -1.0) { end = terrainDepth; }`:""}
  4512. vec3 samplePoint = cameraPos + rayDir * end;
  4513. float multiplier = hitsPlanet ? -1.0 : 1.0;
  4514. vec3 scattering = vec3(0);
  4515. float scaleFract = (length(samplePoint) - radii[0]) / scaleHeight;
  4516. float lastOpticalDepth = getOpticalDepth(samplePoint, rayDir, scaleFract);
  4517. float stepSize = (end - start) / float(STEPS);
  4518. for (int i = 0; i < STEPS; i++) {
  4519. samplePoint -= stepSize * rayDir;
  4520. scaleFract = (length(samplePoint) - radii[0]) / scaleHeight;
  4521. float opticalDepth = multiplier * getOpticalDepth(samplePoint, rayDir * multiplier, scaleFract);
  4522. if (i > 0) {
  4523. scattering *= ${e.haze?s["a"]``:" mix(2.5, 1.0, clamp((length(cameraPos) - radii[0]) / 50e3, 0.0, 1.0)) * "} exp(-(mix(betaCombined, betaRayleigh, 0.5) + betaMie) * max(0.0, (opticalDepth - lastOpticalDepth)));
  4524. }
  4525. if (dot(normalize(samplePoint), lightDir) > -0.3) {
  4526. float scale = exp(-scaleFract);
  4527. float lightDepth = getOpticalDepth(samplePoint, lightDir, scaleFract);
  4528. scattering += scale * exp(-(betaCombined + betaMie) * lightDepth);
  4529. ${e.haze?"":s["a"]`scattering += scale * exp(-(0.25 * betaCombined ) * lightDepth);`}
  4530. }
  4531. lastOpticalDepth = opticalDepth;
  4532. }
  4533. float mu = dot(rayDir, lightDir);
  4534. float mumu = 1.0 + mu * mu;
  4535. float phaseRayleigh = 0.05968310365 * mumu;
  4536. ${e.haze?s["a"]`return 3.0 * scattering * stepSize * phaseRayleigh * betaRayleigh;`:s["a"]`
  4537. const float g = 0.8;
  4538. const float gg = g * g;
  4539. float phaseMie = end == maxEnd ? 0.11936620731 * ((1.0 - gg) * mumu) / (pow(1.0 + gg - 2.0 * mu * g, 1.5) * (2.0 + gg)) : 0.0;
  4540. phaseMie += getGlow(1.0 - mu, 5e-5, 3.0) * smoothstep(0.01, 0.1, length(scattering));
  4541. phaseMie = clamp(phaseMie, 0.0, 128.0);
  4542. return 3.0 * scattering * stepSize * (phaseRayleigh * betaRayleigh + 0.025 * phaseMie * betaMie);`}
  4543. }
  4544. vec3 tonemapACES(vec3 x) {
  4545. return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
  4546. }
  4547. vec4 applyUndergroundAtmosphere(vec3 rayDir, vec3 lightDirection, vec4 fragColor) {
  4548. vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, radii[0], true);
  4549. if (!((rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.y > 0.0)) {
  4550. return fragColor;
  4551. }
  4552. float lightAngle = dot(lightDirection, normalize(cameraPosition + rayDir * max(0.0, rayPlanetIntersect.x)));
  4553. vec4 surfaceColor = vec4(vec3(max(0.0, (smoothstep(-1.0, 0.8, 2.0 * lightAngle)))), 1.0 - altitudeFade);
  4554. float relDist = (rayPlanetIntersect.y - max(0.0, rayPlanetIntersect.x)) / innerFadeDistance;
  4555. if (relDist > 1.0) {
  4556. return surfaceColor;
  4557. }
  4558. return mix(gl_FragColor, surfaceColor, smoothstep(0.0, 1.0, relDist * relDist));
  4559. }
  4560. void main() {
  4561. vec3 rayDir = normalize(worldRay);
  4562. float terrainDepth = -1.0;
  4563. ${e.haze?s["a"]`
  4564. vec4 depthSample = texture2D(depthTex, vuv0).rgba;
  4565. if (depthSample != vec4(0)) {
  4566. vec3 cameraSpaceRay = normalize(eyeDir);
  4567. cameraSpaceRay /= cameraSpaceRay.z;
  4568. cameraSpaceRay *= -linearDepthFromTexture(depthTex, vuv0, nearFar);
  4569. terrainDepth = max(0.0, length(cameraSpaceRay));
  4570. }`:s["a"]`
  4571. float depthSample = texture2D(depthTex, vuv0).r;
  4572. if (depthSample != 1.0) {
  4573. gl_FragColor = vec4(0);
  4574. return;
  4575. }`}
  4576. ${e.haze?s["a"]`
  4577. vec3 col = vec3(0);
  4578. float fadeOut = smoothstep(-10000.0, -15000.0, heightParameters[0] - radii[0]);
  4579. if(depthSample != vec4(0)){
  4580. col = (1.0 - fadeOut) * hazeStrength * getAtmosphereColour(cameraPosition, rayDir, lightingMainDirection, terrainDepth);
  4581. }
  4582. float alpha = 1.0 - fadeOut;`:s["a"]`
  4583. vec3 col = getAtmosphereColour(cameraPosition, rayDir, lightingMainDirection, terrainDepth);;
  4584. float alpha = smoothstep(0.0, mix(0.15, 0.01, heightParameters[3]), length(col));`}
  4585. col = tonemapACES(col);
  4586. gl_FragColor = delinearizeGamma(vec4(col, alpha));
  4587. ${e.haze?"":s["a"]`
  4588. if (depthSample == 1.0) {
  4589. gl_FragColor = applyUndergroundAtmosphere(rayDir, lightingMainDirection, gl_FragColor);
  4590. }`}
  4591. }
  4592. `),t}const u=Object.freeze({__proto__:null,build:l})},fcf2:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return b})),r.d(t,"e",(function(){return o})),r.d(t,"f",(function(){return s})),r.d(t,"g",(function(){return c}));var i=r("b2b2"),n=r("e041");function a(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=Object(n["C"])(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=Object(n["E"])(e,t.portalItem.itemUrl);u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return p(e,t&&t.portal)}function s(e,t,r=f.YES){if(!e)return e;!Object(n["u"])(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let i=Object(n["C"])(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const a=p(r,t.portal);i=Object(n["E"])(p(i,t.portal),a,a),i!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(i)}}return i=h(i,t&&t.portal),Object(n["u"])(i)&&(i=Object(n["F"])(i)),null!=t&&t.resources&&null!=t&&t.portalItem&&!Object(n["u"])(i)&&!Object(n["w"])(i)&&r===f.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(i)}),i}function o(e,t,r){return a(e,r)}function c(e,t,r,i){const n=s(e,i);void 0!==n&&(t[r]=n)}const l=/\/items\/([^\/]+)\/resources\//,u=/^\.\/resources\//;function d(e){const t=Object(i["k"])(e)?e.match(l):null;return Object(i["k"])(t)?t[1]:null}function h(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?Object(n["g"])(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,i=Object(n["l"])();return Object(n["s"])(i,`${i.scheme}://${r}`)?Object(n["g"])(e,t.portalHostname,r):Object(n["g"])(e,r,t.portalHostname)}var f;!function(e){e[e.YES=0]="YES",e[e.NO=1]="NO"}(f||(f={}));const b=Object.freeze({__proto__:null,fromJSON:a,toJSON:s,read:o,write:c,itemIdFromResourceUrl:d,get MarkKeep(){return f}})},fd14:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var i,n=r("a4ee"),a=r("fa8a"),s=r("6a0ed"),o=r("b2b2"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("afcf")),u=r("d386"),d=r("09db"),h=r("c1da");let p=i=class extends s["a"]{async collectRequiredFields(e,t){return Object(h["a"])(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}};Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],p.prototype,"expression",void 0),Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=Object(n["a"])([Object(u["a"])("esri.layers.support.FeatureExpressionInfo")],p);const f=p;var b,m=r("8076");const g=Object(a["b"])()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new a["a"]({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let O=b=class extends s["a"]{constructor(){super(...arguments),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,i){t[r]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):Object(o["k"])(e)||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new b({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}};Object(n["a"])([Object(c["b"])({type:f,json:{write:!0}})],O.prototype,"featureExpressionInfo",void 0),Object(n["a"])([Object(l["a"])("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],O.prototype,"readFeatureExpressionInfo",null),Object(n["a"])([Object(d["a"])("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],O.prototype,"writeFeatureExpressionInfo",null),Object(n["a"])([Object(c["b"])({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],O.prototype,"mode",null),Object(n["a"])([Object(c["b"])({type:Number,json:{write:!0}})],O.prototype,"offset",void 0),Object(n["a"])([Object(c["b"])({type:m["b"],json:{type:String,read:y.read,write:y.write}})],O.prototype,"unit",null),O=b=Object(n["a"])([Object(u["a"])("esri.layers.support.ElevationInfo")],O);const v=O},fdc9:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("9ef0"),s=r("7ffa"),o=r("59b2"),c=r("cea0"),l=r("448d"),u=r("d386"),d=r("b32b");let h=i=class extends d["a"]{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new i({fromColor:Object(s["a"])(this.fromColor),toColor:Object(s["a"])(this.toColor),algorithm:this.algorithm})}};Object(n["a"])([Object(l["a"])({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],h.prototype,"algorithm",void 0),Object(n["a"])([Object(o["b"])({type:a["a"],json:{type:[c["a"]],write:!0}})],h.prototype,"fromColor",void 0),Object(n["a"])([Object(o["b"])({type:a["a"],json:{type:[c["a"]],write:!0}})],h.prototype,"toColor",void 0),Object(n["a"])([Object(o["b"])({type:["algorithmic"]})],h.prototype,"type",void 0),h=i=Object(n["a"])([Object(u["a"])("esri.rest.support.AlgorithmicColorRamp")],h);const p=h},fdc9b:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s}));var i=r("8a44");class n{constructor(){this.adds=new i["a"],this.removes=new i["a"],this.updates=new i["a"]({allocator:e=>e||new a,deallocator:e=>(e.renderGeometry=null,e)})}clear(){this.adds.clear(),this.removes.clear(),this.updates.clear()}prune(){this.adds.prune(),this.removes.prune(),this.updates.prune()}}class a{}class s{constructor(){this.adds=new Array,this.removes=new Array,this.updates=new Array}}},fe80:function(e,t,r){"use strict";var i;r.d(t,"a",(function(){return i})),function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}))},feab:function(e,t,r){"use strict";function i(e){return e.split(",").map(e=>e.trim())}function n(e){return t=>{t.hasOwnProperty("_delegatedEventNames")||(t._delegatedEventNames=t._delegatedEventNames?t._delegatedEventNames.slice():[]);const r=t._delegatedEventNames,n=Array.isArray(e)?e:i(e);r.push(...n)}}r.d(t,"a",(function(){return n}))},feec:function(e,t,r){"use strict";r.d(t,"a",(function(){return ce}));var i=r("a4ee"),n=r("ce50"),a=r("c120"),s=r("b2b2"),o=r("f4cc"),c=r("59b2"),l=(r("b50f"),r("cea0"),r("d386")),u=r("624c"),d=r("bb72"),h=r("d8b2"),p=r("ebb2");async function f(e,t,r){const i=Object(d["c"])(e);return Object(h["a"])(i,p["a"].from(t),{...r}).then(e=>Object(h["b"])(e.data.attachmentGroups,i.path))}var b=r("c89c"),m=(r("e06a"),r("e9fc")),g=r("69dd"),y=r("3af1");async function O(e,t,r){const i=Object(d["c"])(e);return Object(m["executeQueryForExtent"])(i,g["a"].from(t),{...r}).then(e=>({count:e.data.count,extent:y["a"].fromJSON(e.data.extent)}))}var v=r("b745"),_=r("a1d1"),j=r("6c97"),w=r("b0f5"),x=r("6655");function T(e,t){return t}function S(e,t,r,i){switch(r){case 0:return R(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?R(e,t+i,1):M(e,t+i,1)}}function E(e,t,r,i){return 2===r?R(e,t,2):S(e,t,r,i)}function A(e,t,r,i){return 2===r?R(e,t,3):S(e,t,r,i)}function C(e,t,r,i){return 3===r?R(e,t,3):E(e,t,r,i)}function R({translate:e,scale:t},r,i){return e[i]+r*t[i]}function M({translate:e,scale:t},r,i){return e[i]-r*t[i]}class P{constructor(e){this.options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this.previousCoordinate=[0,0],this.transform=null,this.applyTransform=T,this.lengths=[],this.currentLengthIndex=0,this.toAddInCurrentPath=0,this.vertexDimension=0,this.coordinateBuffer=null,this.coordinateBufferPtr=0,this._attributesConstructor=function(){}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this.options.applyTransform&&(e.transform=null),this._attributesConstructor=function(){},this.coordinateBuffer=null,this.lengths.length=0,!e.hasZ)return;const t=Object(w["a"])(e.geometryType,this.options.sourceSpatialReference,e.spatialReference);if(!Object(s["j"])(t))for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){e.fields.push(t);const r=e.fields.map(e=>e.name);this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this.transform=e.transform,this.options.applyTransform&&e.transform&&(this.applyTransform=this._deriveApplyTransform(e)),this.vertexDimension=2,e.hasZ&&this.vertexDimension++,e.hasM&&this.vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;default:Object(j["a"])(e.geometryType)}}createFeature(){return this.lengths.length=0,this.currentLengthIndex=0,this.previousCoordinate[0]=0,this.previousCoordinate[1]=0,this.coordinateBuffer=null,this.coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this.lengths.length&&(this.toAddInCurrentPath=t),this.lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,n=Object(x["A"])(r.clone(),r,!1,!1,this.transform),a=Object(x["l"])(n,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...a}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){switch(t=this.applyTransform(this.transform,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;return t<=1&&(r=this.previousCoordinate[t],this.previousCoordinate[t]+=e),this.applyTransform(this.transform,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this.toAddInCurrentPath--&&(e.push([]),this.toAddInCurrentPath=this.lengths[++this.currentLengthIndex]-1,this.previousCoordinate[0]=0,this.previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),n=e[e.length-1];0===r&&(this.coordinateBufferPtr=0,this.coordinateBuffer=new Array(this.vertexDimension),n.push(this.coordinateBuffer)),this.coordinateBuffer[this.coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?C:t?E:r?A:S}}var I=r("2edc");async function D(e,t,r){const i=Object(d["c"])(e),n={...r},a=g["a"].from(t),s=!a.quantizationParameters,{data:o}=await Object(m["executeQueryPBF"])(i,a,new P({sourceSpatialReference:a.sourceSpatialReference,applyTransform:s}),n);return o}var L=r("2eab"),N=r("e38c");function F(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),!r.outFields||null!=t&&t.returnCountOnly?delete r.outFields:-1!==r.outFields.indexOf("*")?r.outFields="*":r.outFields=r.outFields.join(","),r.outSpatialReference&&(r.outSR=r.outSR.wkid||JSON.stringify(r.outSR.toJSON()),delete r.outSpatialReference),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function k(e,t,r){const i=await z(e,t,r),n=i.data,a=n.geometryType,s=n.spatialReference,o={};for(const c of n.relatedRecordGroups){const e={fields:void 0,objectIdFieldName:void 0,geometryType:a,spatialReference:s,hasZ:!!n.hasZ,hasM:!!n.hasM,features:c.relatedRecords};if(null!=c.objectId)o[c.objectId]=e;else for(const t in c)c.hasOwnProperty(t)&&"relatedRecords"!==t&&(o[c[t]]=e)}return{...i,data:o}}async function U(e,t,r){const i=await z(e,t,r,{returnCountOnly:!0}),n=i.data,a={};for(const s of n.relatedRecordGroups)null!=s.objectId&&(a[s.objectId]=s.count);return{...i,data:a}}async function z(e,t,r={},i){const n=Object(N["a"])({...e.query,f:"json",...i,...F(t,i)});return Object(L["default"])(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...n}})}var B=r("b742");async function V(e,t,r){t=B["a"].from(t);const i=Object(d["c"])(e);return k(i,t,r).then(e=>{const t=e.data,r={};return Object.keys(t).forEach(e=>r[e]=I["default"].fromJSON(t[e])),r})}async function G(e,t,r){t=B["a"].from(t);const i=Object(d["c"])(e);return U(i,t,{...r}).then(e=>e.data)}var H=r("e041"),q=r("a9ab"),W=r("a8d5"),$=r("e87c");const Z="Layer does not support extent calculation.";function X(e,t){var r,i;const n=e.geometry,a=e.toJSON(),o=a;if(Object(s["k"])(n)&&(o.geometry=JSON.stringify(n),o.geometryType=Object(q["c"])(n),o.inSR=n.spatialReference.wkid||JSON.stringify(n.spatialReference)),null!=(r=a.topFilter)&&r.groupByFields&&(o.topFilter.groupByFields=a.topFilter.groupByFields.join(",")),null!=(i=a.topFilter)&&i.orderByFields&&(o.topFilter.orderByFields=a.topFilter.orderByFields.join(",")),a.topFilter&&(o.topFilter=JSON.stringify(o.topFilter)),a.objectIds&&(o.objectIds=a.objectIds.join(",")),a.orderByFields&&(o.orderByFields=a.orderByFields.join(",")),a.outFields&&!(null!=t&&t.returnCountOnly||null!=t&&t.returnExtentOnly||null!=t&&t.returnIdsOnly)?-1!==a.outFields.indexOf("*")?o.outFields="*":o.outFields=a.outFields.join(","):delete o.outFields,a.outSR?o.outSR=a.outSR.wkid||JSON.stringify(a.outSR):n&&a.returnGeometry&&(o.outSR=o.inSR),a.returnGeometry&&delete a.returnGeometry,a.timeExtent){const e=a.timeExtent,{start:t,end:r}=e;null==t&&null==r||(o.time=t===r?t:`${null==t?"null":t},${null==r?"null":r}`),delete a.timeExtent}return o}async function Y(e,t,r,i){const n=await ee(e,t,"json",i);return Object($["a"])(t,r,n.data),n}async function J(e,t,r){return Object(s["k"])(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):ee(e,t,"json",r,{returnIdsOnly:!0})}async function Q(e,t,r){return Object(s["k"])(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):ee(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then(e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(Z);if(t.hasOwnProperty("count"))throw new Error(Z);return e})}function K(e,t,r){return Object(s["k"])(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):ee(e,t,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}function ee(e,t,r,i={},n={}){const a="string"==typeof e?Object(H["M"])(e):e,o=t.geometry?[t.geometry]:[];return i.responseType="pbf"===r?"array-buffer":"json",Object(W["a"])(o,null,i).then(e=>{const o=e&&e[0];Object(s["k"])(o)&&((t=t.clone()).geometry=o);const c=Object(N["a"])({...a.query,f:r,...n,...X(t,n)});return Object(L["default"])(Object(H["B"])(a.path,"queryTopFeatures"),{...i,query:{...c,...i.query}})})}var te=r("7949");async function re(e,t,r,i){const n=Object(d["c"])(e),a={...i},{data:s}=await Y(n,te["a"].from(t),r,a);return I["default"].fromJSON(s)}async function ie(e,t,r){const i=Object(d["c"])(e);return(await J(i,te["a"].from(t),{...r})).data.objectIds}async function ne(e,t,r){const i=Object(d["c"])(e),n=await Q(i,te["a"].from(t),{...r});return{count:n.data.count,extent:y["a"].fromJSON(n.data.extent)}}async function ae(e,t,r){const i=Object(d["c"])(e);return(await K(i,te["a"].from(t),{...r})).data.count}var se=r("9209");let oe=class extends se["a"]{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.format="json",this.gdbVersion=null,this.infoFor3D=null,this.sourceSpatialReference=null}execute(e,t){return this.executeJSON(e,t).then(r=>this.featureSetFromJSON(e,r,t))}async executeJSON(e,t){var r;const i={...this.requestOptions,...t},n=this._normalizeQuery(e),s=null!=(null==(r=e.outStatistics)?void 0:r[0]),o=Object(a["a"])("featurelayer-pbf-statistics"),c=!s||o;let l;if("pbf"===this.format&&c)try{l=await D(this.url,n,i)}catch(u){if("query:parsing-pbf"!==u.name)throw u;this.format="json"}return"json"!==this.format&&c||(l=await Object(_["b"])(this.url,n,i)),this._normalizeFields(l.fields),l}async featureSetFromJSON(e,t,i){if(!(this._queryIs3DObjectFormat(e)&&Object(s["k"])(this.infoFor3D)&&t.features&&t.features.length))return I["default"].fromJSON(t);const{meshFeatureSetFromJSON:n}=await Object(o["z"])(r.e("chunk-8c86bcce").then(r.bind(null,"0387")),i);return n(e,this.infoFor3D,t)}executeForCount(e,t){const r={...this.requestOptions,...t},i=this._normalizeQuery(e);return Object(b["a"])(this.url,i,r)}executeForExtent(e,t){const r={...this.requestOptions,...t},i=this._normalizeQuery(e);return O(this.url,i,r)}executeForIds(e,t){const r={...this.requestOptions,...t},i=this._normalizeQuery(e);return Object(v["a"])(this.url,i,r)}executeRelationshipQuery(e,t){e=B["a"].from(e);const r={...this.requestOptions,...t};return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),V(this.url,e,r)}executeRelationshipQueryForCount(e,t){e=B["a"].from(e);const r={...this.requestOptions,...t};return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),G(this.url,e,r)}executeAttachmentQuery(e,t){const r={...this.requestOptions,...t};return f(this.url,e,r)}executeTopFeaturesQuery(e,t){const r={...this.requestOptions,...t};return re(this.parsedUrl,e,this.sourceSpatialReference,r)}executeForTopIds(e,t){const r={...this.requestOptions,...t};return ie(this.parsedUrl,e,r)}executeForTopExtents(e,t){const r={...this.requestOptions,...t};return ne(this.parsedUrl,e,r)}executeForTopCount(e,t){const r={...this.requestOptions,...t};return ae(this.parsedUrl,e,r)}_normalizeQuery(e){let t=g["a"].from(e);if(t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?u["a"].from(e.dynamicDataSource):this.dynamicDataSource),Object(s["k"])(this.infoFor3D)&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;for(const e of this.infoFor3D.queryFormats){if("3D_glb"===e.id){t.formatOf3DObjects=e.id;break}"3D_gltf"!==e.id||t.formatOf3DObjects||(t.formatOf3DObjects=e.id)}if(!t.formatOf3DObjects)throw new n["a"]("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(Object(s["j"])(t.outFields)||!t.outFields.includes("*")){t=t===e?t.clone():t,Object(s["j"])(t.outFields)&&(t.outFields=[]);const{originX:r,originY:i,originZ:n,translationX:a,translationY:o,translationZ:c,scaleX:l,scaleY:u,scaleZ:d,rotationX:h,rotationY:p,rotationZ:f,rotationDeg:b}=this.infoFor3D.transformFieldRoles;t.outFields.push(r,i,n,a,o,c,l,u,d,h,p,f,b)}}return t}_normalizeFields(e){if(Object(s["k"])(this.fieldsIndex)&&Object(s["k"])(e))for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return Object(s["k"])(this.infoFor3D)&&e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};Object(i["a"])([Object(c["b"])({type:u["a"]})],oe.prototype,"dynamicDataSource",void 0),Object(i["a"])([Object(c["b"])()],oe.prototype,"fieldsIndex",void 0),Object(i["a"])([Object(c["b"])()],oe.prototype,"format",void 0),Object(i["a"])([Object(c["b"])()],oe.prototype,"gdbVersion",void 0),Object(i["a"])([Object(c["b"])()],oe.prototype,"infoFor3D",void 0),Object(i["a"])([Object(c["b"])()],oe.prototype,"sourceSpatialReference",void 0),oe=Object(i["a"])([Object(l["a"])("esri.tasks.QueryTask")],oe);const ce=oe},ff57:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,n=r("a4ee"),a=r("7ffa"),s=r("59b2"),o=(r("cea0"),r("448d")),c=r("d386"),l=r("667b"),u=r("be4d"),d=r("82e4");let h=i=class extends(Object(u["a"])(l["a"])){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.getSymbols().map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){return this.getSymbols().reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:Object(a["a"])(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],h.prototype,"description",void 0),Object(n["a"])([Object(s["b"])({type:String,json:{write:!0}})],h.prototype,"label",void 0),Object(n["a"])([Object(s["b"])(d["b"])],h.prototype,"symbol",void 0),Object(n["a"])([Object(o["a"])({simple:"simple"})],h.prototype,"type",void 0),h=i=Object(n["a"])([Object(c["a"])("esri.renderers.SimpleRenderer")],h);const p=h},ff93:function(e,t,r){"use strict";var i,n,a,s,o;r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return o})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.FILL_VERTEX=1]="FILL_VERTEX",e[e.FILL_DD_VERTEX=2]="FILL_DD_VERTEX",e[e.FILL_INDEX=3]="FILL_INDEX",e[e.OUTLINE_VERTEX=4]="OUTLINE_VERTEX",e[e.OUTLINE_DD_VERTEX=5]="OUTLINE_DD_VERTEX",e[e.OUTLINE_INDEX=6]="OUTLINE_INDEX",e[e.LINE_VERTEX=7]="LINE_VERTEX",e[e.LINE_DD_VERTEX=8]="LINE_DD_VERTEX",e[e.LINE_INDEX=9]="LINE_INDEX",e[e.ICON_VERTEX=10]="ICON_VERTEX",e[e.ICON_DD_VERTEX=11]="ICON_DD_VERTEX",e[e.ICON_INDEX=12]="ICON_INDEX",e[e.TEXT_VERTEX=13]="TEXT_VERTEX",e[e.TEXT_DD_VERTEX=14]="TEXT_DD_VERTEX",e[e.TEXT_INDEX=15]="TEXT_INDEX",e[e.CIRCLE_VERTEX=16]="CIRCLE_VERTEX",e[e.CIRCLE_INDEX=17]="CIRCLE_INDEX"}(i||(i={})),function(e){e[e.FILL=1]="FILL",e[e.LINE=2]="LINE",e[e.SYMBOL=3]="SYMBOL",e[e.CIRCLE=4]="CIRCLE"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.OPAQUE=1]="OPAQUE",e[e.TRANSLUCENT=2]="TRANSLUCENT",e[e.SYMBOLS=3]="SYMBOLS",e[e.HITTEST=4]="HITTEST"}(a||(a={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.FILL=1]="FILL",e[e.OUTLINE=2]="OUTLINE",e[e.LINE=3]="LINE",e[e.ICON=4]="ICON",e[e.CIRCLE=5]="CIRCLE",e[e.TEXT=6]="TEXT",e[e.TILEINFO=7]="TILEINFO"}(s||(s={})),function(e){e[e.PAINTER_CHANGED=0]="PAINTER_CHANGED",e[e.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",e[e.LAYER_CHANGED=2]="LAYER_CHANGED",e[e.LAYER_REMOVED=3]="LAYER_REMOVED",e[e.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(o||(o={}))}}]);
  4593. //# sourceMappingURL=windsitemap~windsitemap1.00616a98.js.map