maps.js 634 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891
  1. ;(function (config) {
  2. var ba = navigator.userAgent.toLowerCase(),
  3. ca = window,
  4. fa = document,
  5. ga = fa.documentElement
  6. function ma(a) {
  7. return -1 !== ba.indexOf(a)
  8. }
  9. var na = /([a-z0-9]*\d+[a-z0-9]*)/
  10. function pa() {
  11. var a = qa
  12. if (!a) return null
  13. var a = a.toLowerCase(),
  14. b = null
  15. if ((b = a.match(/angle \((.*)\)/))) (a = b[1]), (a = a.replace(/\s*direct3d.*$/, ''))
  16. a = a.replace(/\s*\([^\)]*wddm[^\)]*\)/, '')
  17. if (0 <= a.indexOf('intel')) {
  18. b = ['Intel']
  19. 0 <= a.indexOf('mobile') && b.push('Mobile')
  20. ;(0 <= a.indexOf('gma') || 0 <= a.indexOf('graphics media accelerator')) && b.push('GMA')
  21. if (0 <= a.indexOf('haswell')) b.push('Haswell')
  22. else if (0 <= a.indexOf('ivy')) b.push('HD 4000')
  23. else if (0 <= a.indexOf('sandy')) b.push('HD 3000')
  24. else if (0 <= a.indexOf('ironlake')) b.push('HD')
  25. else {
  26. 0 <= a.indexOf('hd') && b.push('HD')
  27. var c = a.match(na)
  28. c && c[1] && b.push(c[1].toUpperCase())
  29. }
  30. return (b = b.join(' '))
  31. }
  32. return 0 <= a.indexOf('nvidia') || 0 <= a.indexOf('quadro') || 0 <= a.indexOf('geforce') || 0 <= a.indexOf('nvs')
  33. ? ((b = ['nVidia']),
  34. 0 <= a.indexOf('geforce') && b.push('geForce'),
  35. 0 <= a.indexOf('quadro') && b.push('Quadro'),
  36. 0 <= a.indexOf('nvs') && b.push('NVS'),
  37. a.match(/\bion\b/) && b.push('ION'),
  38. a.match(/gtx\b/)
  39. ? b.push('GTX')
  40. : a.match(/gts\b/)
  41. ? b.push('GTS')
  42. : a.match(/gt\b/)
  43. ? b.push('GT')
  44. : a.match(/gs\b/)
  45. ? b.push('GS')
  46. : a.match(/ge\b/)
  47. ? b.push('GE')
  48. : a.match(/fx\b/) && b.push('FX'),
  49. (c = a.match(na)) && c[1] && b.push(c[1].toUpperCase().replace('GS', '')),
  50. 0 <= a.indexOf('titan') ? b.push('TITAN') : 0 <= a.indexOf('ti') && b.push('Ti'),
  51. (b = b.join(' ')))
  52. : 0 <= a.indexOf('amd') || 0 <= a.indexOf('ati') || 0 <= a.indexOf('radeon') || 0 <= a.indexOf('firegl') || 0 <= a.indexOf('firepro')
  53. ? ((b = ['AMD']),
  54. 0 <= a.indexOf('mobil') && b.push('Mobility'),
  55. (c = a.indexOf('radeon')),
  56. 0 <= c && b.push('Radeon'),
  57. 0 <= a.indexOf('firepro') ? b.push('FirePro') : 0 <= a.indexOf('firegl') && b.push('FireGL'),
  58. 0 <= a.indexOf('hd') && b.push('HD'),
  59. 0 <= c && (a = a.substring(c)),
  60. (c = a.match(na)) && c[1] && b.push(c[1].toUpperCase().replace('HD', '')),
  61. (b = b.join(' ')))
  62. : a.substring(0, 100)
  63. }
  64. var ra = 'microsoft basic render driver;vmware svga 3d;Intel 965GM;Intel B43;Intel G41;Intel G45;Intel G965;Intel GMA 3600;Intel Mobile 4;Intel Mobile 45;Intel Mobile 965'.split(';'),
  65. sa = 'ActiveXObject' in ca,
  66. va = ('devicePixelRatio' in ca && 1 < ca.devicePixelRatio) || (sa && 'matchMedia' in ca && ca.matchMedia('(min-resolution:144dpi)') && ca.matchMedia('(min-resolution:144dpi)').matches),
  67. wa = ma('windows nt'),
  68. xa = -1 !== ba.search(/windows nt [1-5]\./),
  69. ya = -1 !== ba.search(/windows nt 5\.[12]/),
  70. za = xa && !ya
  71. ma('windows nt 10')
  72. var Da = ma('windows phone'),
  73. Ea = ma('macintosh'),
  74. Fa = ma('Mb2345Browser'),
  75. Ga = ma('ipad;') || ma('ipad '),
  76. Ja = Ga && va,
  77. Ka = ma('ipod touch;'),
  78. La = ma('iphone;') || ma('iphone '),
  79. Ma = La || Ga || Ka,
  80. Na = Ma && -1 !== ba.search(/ os [456]_/)
  81. Ma && ba.search(/ os [4-8]_/)
  82. Ma && ba.search(/ os [78]_/)
  83. Ma && ma('os 8_')
  84. var Qa = Ma && ma('os 10_'),
  85. Ra = Ma && ma('os 15_'),
  86. Sa = ma('android'),
  87. Ta = 0
  88. Sa && (Ta = parseInt(ba.split('android ')[1]) || 0)
  89. var Ua = Sa && 4 > Ta
  90. ;(Sa && 5 <= Ta) || ba.search(/android 4.4/)
  91. var Va = Sa ? 'android' : Ma ? 'ios' : wa ? 'windows' : Ea ? 'mac' : 'other',
  92. Wa = sa && !ca.XMLHttpRequest,
  93. Xa = sa && !fa.querySelector,
  94. Ya = sa && !fa.addEventListener,
  95. Za = sa && ma('msie 9'),
  96. $a = sa && ma('msie 10'),
  97. ab = sa && ma('rv:11'),
  98. bb = Ya || Za,
  99. cb = ma('edge'),
  100. db = ma('qtweb'),
  101. eb = ma('ucbrowser'),
  102. fb = ma('alipay') || (Sa && eb),
  103. gb = ma('miuibrowser'),
  104. hb = ma('micromessenger'),
  105. ib = ma('mqqbrowser'),
  106. jb = ma('baidubrowser'),
  107. chrome = (ma('chrome') || ma('crios')) && !hb && !jb && !ib && !cb && !gb,
  108. kb = chrome && ma('chromium'),
  109. lb = chrome && !kb && (30 < parseInt(ba.split('chrome/')[1]) || 30 < parseInt(ba.split('crios/')[1])),
  110. mb = ma('firefox'),
  111. nb = mb && 27 < parseInt(ba.split('firefox/')[1]),
  112. ob = (Ea || Ma) && ma('safari') && ma('version/'),
  113. pb = Ea && ob && 7 < parseInt(ba.split('version/')[1]),
  114. qb = Ma && ma('aliapp'),
  115. rb = Ma && ((!ib && !eb && !hb && !chrome && !mb && !ob) || (qb && !eb)),
  116. sb = Sa || Ma || Da || ma('mobile'),
  117. tb = 'ontouchstart' in fa,
  118. ub = ca.navigator && ca.navigator.msPointerEnabled && !!ca.navigator.msMaxTouchPoints,
  119. vb = ca.navigator && !!ca.navigator.maxTouchPoints,
  120. wb = !tb && (vb || ub),
  121. xb = tb || wb,
  122. yb = (function () {
  123. if (!sb) return ca.devicePixelRatio || 1
  124. var a = document.getElementsByTagName('meta')
  125. if (window.parent && window.parent !== window)
  126. try {
  127. if (window.parent.location.origin === window.location.origin) a = window.parent.document.getElementsByTagName('meta')
  128. else return 1
  129. } catch (b) {
  130. return 1
  131. }
  132. for (var c = a.length - 1; 0 <= c; c -= 1)
  133. if ('viewport' === a[c].name) {
  134. var c = a[c].content,
  135. d
  136. ;-1 !== c.indexOf('initial-scale') && (d = parseFloat(c.split('initial-scale=')[1]))
  137. a = -1 !== c.indexOf('minimum-scale') ? parseFloat(c.split('minimum-scale=')[1]) : 0
  138. c = -1 !== c.indexOf('maximum-scale') ? parseFloat(c.split('maximum-scale=')[1]) : Infinity
  139. if (d) {
  140. if (c >= a) return d > c ? c : d < a ? a : d
  141. } else if (c >= a) return 1 <= a ? 1 : Math.min(c, 1)
  142. console && console.log && console.log('viewport\u53c2\u6570\u4e0d\u5408\u6cd5')
  143. return null
  144. }
  145. })(),
  146. zb = va && (!sb || (!!yb && 1 <= yb)),
  147. Ab = sa && 'transition' in ga.style,
  148. Bb = !!fa.createElementNS && !!fa.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect,
  149. Cb = fa.createElement('canvas'),
  150. Db = !(!Cb || !Cb.getContext),
  151. Eb = window.URL || window.webkitURL,
  152. Fb = !0 !== window.disableWorker && !sa && !cb && !(eb && Sa) && window.Worker && Eb && Eb.createObjectURL && window.Blob,
  153. Gb = '',
  154. qa = '',
  155. Jb = 0,
  156. Kb = window.forceWebGL ? { alpha: !0, antialias: !0, depth: !0 } : { alpha: !0, antialias: !0, depth: !0, failIfMajorPerformanceCaveat: !0, preserveDrawingBuffer: !0, stencil: !0 },
  157. Lb = (function () {
  158. if (!window.forceWebGL && (!Db || !Fb || (rb && qb && !eb))) return !1
  159. for (var a = ['webgl', 'experimental-webgl', 'moz-webgl'], b = null, c = 0; c < a.length; c += 1) {
  160. try {
  161. b = Cb.getContext(a[c], Kb)
  162. } catch (d) {}
  163. if (b) {
  164. if (b.drawingBufferWidth !== Cb.width || b.drawingBufferHeight !== Cb.height) break
  165. if (window.forceWebGL) return (Gb = a[c]), (Jb = Infinity), !0
  166. if (!b.getShaderPrecisionFormat || !b.getParameter || !b.getExtension) break
  167. Jb = b.getParameter(b.MAX_RENDERBUFFER_SIZE)
  168. var e = b.getParameter(b.MAX_VIEWPORT_DIMS)
  169. if (!e) break
  170. Jb = Math.min(Jb, e[0], e[1])
  171. ob && 'mac' === Va && (Jb = Math.min(Jb, 4096))
  172. e = Math.max(screen.width, screen.height)
  173. zb && (e *= Math.min(2, window.devicePixelRatio || 1))
  174. if (e > Jb) break
  175. if (23 > b.getShaderPrecisionFormat(35632, 36338).precision || 23 > b.getShaderPrecisionFormat(35633, 36338).precision) break
  176. qa = b.getExtension('WEBGL_debug_renderer_info') ? b.getParameter(37446) : null
  177. if ((b = pa()) && -1 !== ra.indexOf(b)) break
  178. Gb = a[c]
  179. return !0
  180. }
  181. }
  182. return !1
  183. })(),
  184. Mb = Lb && (lb || nb || pb) && ('mac' === Va || 'windows' === Va) && !sb,
  185. Nb = !window.Uint8Array || !Db || db || Da || (sb && mb) || Za || Na || Ja || Ka || Ua || ma('gt-n710') || za,
  186. Ob = !Nb && !Mb,
  187. Pb = Mb ? 'vw' : Nb ? 'd' : Ob ? 'dv' : 'v',
  188. Qb = ma('webkit'),
  189. Rb = 'WebKitCSSMatrix' in ca && 'm11' in new window.WebKitCSSMatrix(),
  190. Sb = 'MozPerspective' in ga.style,
  191. Tb = 'OTransition' in ga.style,
  192. Ub = Ab || Rb || Sb || Tb,
  193. Vb = void 0 !== config[8] ? config[8] : !0,
  194. Wb = void 0 !== config[9] ? config[9] : !0,
  195. Xb = void 0 !== config[10] ? config[10] : !0,
  196. Yb = void 0 !== config[11] ? config[11] : !0,
  197. Zb = void 0 !== config[12] ? config[12] : null,
  198. $b = !Bb && sb && Db,
  199. ac = !0
  200. try {
  201. if ('undefined' === typeof ca.localStorage) ac = !1
  202. else {
  203. var bc = new Date().getTime() + ''
  204. ca.localStorage.setItem('_test', bc)
  205. ca.localStorage.getItem('_test') !== bc && (ac = !1)
  206. ca.localStorage.removeItem('_test')
  207. }
  208. } catch (cc) {
  209. ac = !1
  210. }
  211. var dc = parseInt(ba.split('chrome/')[1]),
  212. ec = Vb && Db
  213. config.l = {
  214. Tra: Ga,
  215. Ura: La,
  216. size: La ? 100 : Sa ? 200 : 500,
  217. nz: Ea,
  218. $za: wa,
  219. ED: Ma,
  220. fFa: Qa,
  221. zJ: Ra,
  222. Xl: Sa,
  223. cma: Ua,
  224. L3: fb,
  225. Dz: Va,
  226. VH: jb,
  227. ewa: ib,
  228. AE: ob,
  229. C$: hb,
  230. Es: sa,
  231. zi: Wa,
  232. sv: Xa,
  233. j5: Za,
  234. i5: $a,
  235. Ue: Ya,
  236. l5: bb,
  237. Xra: ab,
  238. spa: cb,
  239. $ra: sa && !ab,
  240. Xta: Fa,
  241. Gv: ac,
  242. Ni: ec && ac && Yb && !sb && chrome,
  243. lf: Zb,
  244. geolocation: sb || (sa && !Ya) || cb,
  245. oza: eb,
  246. qL: eb && !chrome,
  247. chrome: chrome,
  248. j3: !0,
  249. bR: mb,
  250. ba: sb,
  251. jua: sb && Qb,
  252. G6: sb && Rb,
  253. iua: sb && ca.opera,
  254. Jc: va,
  255. yL: yb,
  256. ja: zb,
  257. Tf: xb,
  258. I6: ub,
  259. FT: vb,
  260. P7: wb,
  261. sna: chrome && 57 <= dc,
  262. tna: !sb && chrome && 64 <= dc,
  263. B$: Qb,
  264. Yra: Ab,
  265. CL: Rb,
  266. jqa: Sb,
  267. bva: Tb,
  268. RH: Ub,
  269. En: Bb,
  270. il: Db,
  271. GS: Fb,
  272. jA: Xb,
  273. Mf: Mb,
  274. y$: Gb,
  275. z$: Kb,
  276. TR: qa,
  277. Vta: Jb,
  278. AAa: !1,
  279. Xp: Vb && !Nb,
  280. T1: Vb ? Pb : 'd',
  281. p2: Vb ? Lb : !1,
  282. bL: ec,
  283. qp: Vb && Lb,
  284. rFa: Vb && (!Nb || Lb),
  285. wq: Wb && !!ca.WebSocket && !jb,
  286. cGa: $b,
  287. kva: Db || $b ? 'c' : 'd',
  288. }
  289. var fc = config
  290. config = void 0
  291. var gc = {
  292. overlay: ['style'],
  293. 'AMap.IndoorMap': ['AMap.CustomLayer', 'cvector'],
  294. 'AMap.IndoorMap3D': ['Map3D'],
  295. 'AMap.MarkerList': ['AMap.TplUtils'],
  296. Map3D: ['vectorlayer', 'wgl', 'AMap.CustomLayer', 'rbush'],
  297. 'AMap.Heatmap': ['AMap.CustomLayer'],
  298. 'AMap.DistrictLayer': ['MVT'],
  299. vectorForeign: ['gridmap', 'MVT'],
  300. 'AMap.GltfLoader': ['AMap.CustomLayer', 'Map3D'],
  301. 'AMap.LabelsLayer': ['rbush', 'promise'],
  302. }
  303. window.AMap
  304. ? ((window.AMap.version = '1630999129934'),
  305. (window.AMap.uL = {
  306. vM: function (a) {
  307. a(fc)
  308. },
  309. }))
  310. : (window.AMap = {
  311. version: '1630999129934',
  312. uL: {
  313. vM: function (a) {
  314. a(fc)
  315. },
  316. },
  317. })
  318. fc.Dk = '1630999129934'
  319. fc.Ru = gc
  320. for (
  321. var hc = document.head || document.getElementsByTagName('head')[0],
  322. ic =
  323. '.vml{behavior:url(#default#VML);display:inline-block;position:absolute}.amap-custom{top:0;left:0;position:absolute}.amap-container img{max-width:none!important;max-height:none!important}.amap-container{touch-action:none;position:relative;overflow:hidden;background:#fcf9f2 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0AgMAAAC2uDcZAAAADFBMVEX////////////////1pQ5zAAAABHRSTlMAgP/AWuZC2AAAAVhJREFUeAFiYGAQYGDEQjAB2rcDC4BiGIqiU7abdKlO2QkeIClyPsDHweMKtOPHIJ1Op6/w7Y4fdqfT6VpndzqdrnV2p9PpWmd3Oj3qWndSoKp+2J1Op7vr7E6n07XO7nQ6XevsTqfTtc7udPo4/f787E6n0911dqfT6VpndzqdrnV2p9PpWmd3Ot27Ce8m6HS6u85dR6fTtU7r6HS61mkdnU7XOrvT6XTvJuxOp9PddXan0+laZ3c6na51dDpd67SOTqd7N+HdBJ1Od9e56+h0utZpHZ1O1zq70+l0rbM7nU73bsLudDrdXWd3Ol3rtI5Op2ud1tHpdK3TOjqd7t2EdxN0Ot1dZ3c6na51dqfT6VpndzqdrnV2p9Pp3k3Q6XR3nbuOTqdrndbR6XSt0zo6na51Wken072bsDudTnfX2Z1Op2ud3el0utbZnU7XOq2j0+t0uncTD1gO4zoT5doZAAAAAElFTkSuQmCC);-ms-touch-action:none}.amap-drags,.amap-layers{width:100%;height:100%;position:absolute;overflow:hidden}.amap-layers canvas{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.amap-layer img{pointer-events:none}.amap-e,.amap-maps{width:100%;height:100%}.amap-maps,.amap-e,.amap-layers,.amap-tile,.amap-tile-container{position:absolute;left:0;top:0;overflow:hidden}.amap-context{position:absolute;left:0;top:0}.amap-overlays,.amap-markers,.amap-marker{position:absolute;left:0;top:0}.amap-layers{z-index:0}.amap-overlays{z-index:110;cursor:default}.amap-markers{z-index:120}.amap-controls{z-index:150}.amap-copyright{position:absolute;display:block!important;left:77px;height:16px;bottom:0;padding-bottom:3px;font-size:11px;font-family:Arial,sans-serif;z-index:160}.amap-logo{position:absolute;bottom:1px;left:1px;z-index:160;height:20px}.amap-logo img{width:73px!important;height:20px!important;border:0;vertical-align:baseline!important}.amap-icon{position:relative;z-index:1}.amap-icon img{position:absolute;z-index:-1}.amap-marker-label{position:absolute;z-index:2;border:1px solid blue;background-color:white;white-space:nowrap;cursor:default;padding:3px;font-size:12px;line-height:14px}.amap-info{position:absolute;left:0;z-index:140;width:320px}.amap-menu{position:absolute;z-index:140;_width:100px}.amap-info-close{position:absolute;right:5px;_right:12px;+right:11px;top:5px;_top:2px;+top:2px;color:#c3c3c3;text-decoration:none;font:bold 16px/14px Tahoma,Verdana,sans-serif;width:14px;height:14px}.amap-info-outer,.amap-menu-outer{box-shadow:0 1px 2px rgba(0,0,0,0.1);background:none repeat scroll 0 0 white;border-radius:2px;padding:1px;text-align:left}.amap-menu-outer:hover{box-shadow:0 1px 2px rgba(0,0,0,0.3)}.amap-info-contentContainer:hover .amap-info-outer{box-shadow:0 1px 2px rgba(0,0,0,0.3)}.amap-info-content{position:relative;background:#fff;padding:10px 18px 10px 10px;line-height:1.4;overflow:auto}.amap-marker-content{position:relative}.amap-info{_width:320px}.amap-menu{_width:100px}.amap-info-sharp-old{overflow:hidden;position:absolute;background-image:url(http://webapi.amap.com/images/arrows.png)}.bottom-center .amap-info-sharp-old{height:12px;margin:0 auto;width:20px;background-position:center 12px;top:100%;margin-top:-9px;left:50%;margin-left:-10px}.bottom-left .amap-info-sharp-old{height:12px;width:13px;background-position:-16px -46px;top:100%;margin-top:-9px}.bottom-right .amap-info-sharp-old{height:12px;width:13px;top:-1px;background-position:-56px -46px;left:100%;margin-left:-13px;top:100%;margin-top:-9px}.middle-left .amap-info-sharp-old{height:20px;width:12px;background-position:left;top:50%;margin-top:-10px;margin-left:-11px}.center .amap-info-sharp-old{display:none}.middle-right .amap-info-sharp-old{height:20px;margin-right:0;width:12px;background-position:right;left:100%;margin-left:-9px;top:50%;margin-top:-10px}.top-center .amap-info-sharp-old{height:12px;margin:0 auto;width:20px;background-position:top;top:0;margin-top:-3px;left:50%;margin-left:-10px}.top-left .amap-info-sharp-old{height:12px;width:13px;background-position:-16px -3px;top:0;margin-top:-3px}.top-right .amap-info-sharp-old{height:12px;width:13px;background-position:-56px -3px;left:100%;margin-left:-13px;top:0;margin-top:-3px}.amap-info-sharp{position:absolute}.bottom-center .amap-info-sharp{bottom:0;left:50%;margin-left:-8px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}.bottom-center .amap-info-sharp:after{position:absolute;content:"";margin-left:-8px;margin-top:-7px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid rgba(0,0,0,0.3);filter:blur(2px);z-index:-1}.amap-info-contentContainer:hover.bottom-center .amap-info-sharp:after{border-top:8px solid rgba(0,0,0,0.5)}.bottom-left .amap-info-sharp{border-color:transparent #fff;border-width:0 0 10px 10px;border-style:solid}.bottom-left .amap-info-sharp:after{position:absolute;content:"";margin-left:-10px;border-color:transparent rgba(0,0,0,0.3);border-width:0 0 10px 10px;border-style:solid;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.bottom-left .amap-info-sharp:after{border-color:transparent rgba(0,0,0,0.5)}.bottom-left .amap-info-content{border-radius:2px 2px 2px 0}.bottom-right .amap-info-sharp{right:0;border-top:10px solid #fff;border-left:10px solid transparent}.bottom-right .amap-info-sharp:after{position:absolute;margin-top:-9px;margin-left:-10px;content:"";border-top:10px solid rgba(0,0,0,0.3);border-left:10px solid transparent;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.bottom-right .amap-info-sharp:after{border-top:10px solid rgba(0,0,0,0.5)}.bottom-right .amap-info-content{border-radius:2px 2px 0 2px}.top-center .amap-info-sharp{top:0;left:50%;margin-left:-8px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #fff}.top-center .amap-info-sharp:after{position:absolute;content:"";margin-top:0;margin-left:-8px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid rgba(0,0,0,0.3);filter:blur(1px);z-index:-1}.top-left .amap-info-sharp{left:0;top:0;border-bottom:10px solid #fff;border-right:10px solid transparent}.top-left .amap-info-sharp:after{position:absolute;content:"";margin-top:0;margin-left:0;border-bottom:10px solid rgba(0,0,0,0.3);border-right:10px solid transparent;filter:blur(1px);z-index:-1}.top-right .amap-info-sharp{right:0;top:0;border-bottom:10px solid #fff;border-left:10px solid transparent}.top-right .amap-info-sharp:after{position:absolute;content:"";margin-top:0;margin-left:-10px;border-bottom:10px solid rgba(0,0,0,0.3);border-left:10px solid transparent;filter:blur(1px);z-index:-1}.middle-right .amap-info-sharp{right:0;top:50%;margin-top:-8px;border-top:8px solid transparent;border-left:8px solid #fff;border-bottom:8px solid transparent}.middle-right .amap-info-sharp:after{position:absolute;content:"";margin-top:-8px;margin-left:-8px;border-top:8px solid transparent;border-left:8px solid rgba(0,0,0,0.3);border-bottom:8px solid transparent;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.middle-right .amap-info-sharp:after{border-left:8px solid rgba(0,0,0,0.5)}.middle-left .amap-info-sharp{left:0;top:50%;margin-top:-8px;border-top:8px solid transparent;border-right:8px solid #fff;border-bottom:8px solid transparent}.middle-left .amap-info-sharp:after{position:absolute;content:"";margin-top:-8px;margin-left:0;border-top:8px solid transparent;border-right:8px solid rgba(0,0,0,0.3);border-bottom:8px solid transparent;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.middle-left .amap-info-sharp:after{border-right:8px solid rgba(0,0,0,0.5)}.amap-info-contentContainer.top-left,.amap-info-contentContainer.top-center,.amap-info-contentContainer.top-right{padding-top:8px}.amap-info-contentContainer.bottom-left,.amap-info-contentContainer.bottom-center,.amap-info-contentContainer.bottom-right{padding-bottom:8px}.amap-info-contentContainer.middle-right{padding-right:8px}.amap-info-contentContainer.middle-left{padding-left:8px}.amap-menu-outer{margin:0;padding:0;list-style-type:none}ul.amap-menu-outer li{cursor:pointer;height:35px;line-height:35px;word-break:break-all;padding:0 10px;font-size:12px;white-space:nowrap}ul.amap-menu-outer li a{text-decoration:none;font-size:13px;margin:0 5px;color:#000;padding:5px 5px}ul.amap-menu-outer li:hover{background-color:#f3f3ee}.amap-overlay-text-container{display:block;width:auto;word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#fff;padding:2px 3px;border:1px solid #ccc;border-radius:3px}.amap-overlay-text-container.amap-overlay-text-empty{display:none}.amap-info-content-ie8{border:1px solid #9c9c9c}'.replace(
  324. /url\((['"]?)(?:\.\.\/)+/g,
  325. 'url($1' + fc[2].split(',')[0] + '/'
  326. ),
  327. jc = null,
  328. kc = 0,
  329. lc = hc.childNodes.length;
  330. kc < lc;
  331. kc++
  332. )
  333. if (1 === hc.childNodes[kc].nodeType) {
  334. jc = hc.childNodes[kc]
  335. break
  336. }
  337. if (ic)
  338. if (hc) {
  339. var mc = document.createElement('style')
  340. mc.setAttribute('type', 'text/css')
  341. mc.setAttribute('class', 'AMap.style')
  342. mc.styleSheet ? (mc.styleSheet.cssText = ic) : (mc.innerHTML = ic)
  343. jc ? hc.insertBefore(mc, jc) : hc.appendChild(mc)
  344. } else document.write("<style type='text/css'>" + ic + '</style>')
  345. var g = g || { Ca: { Je: 0, kr: [], Fj: {} } },
  346. z = { o: {}, control: {}, B: {} }
  347. g.ODa = (function (a) {
  348. var b = Function
  349. return function () {
  350. return new b('return ' + a)()
  351. }
  352. })()
  353. g.CLASS_NAME = 'AMap'
  354. g.c = g.BuryPoint = {}
  355. g.c.add = g.BuryPoint.add = function (a, b, c) {
  356. a.w5 || a.C || !(a = a.CLASS_NAME) || ((a = a.replace('AMap.', '')), g.zA.lp(a, b, c))
  357. }
  358. var nc = { lang: 1, baseRender: 1, overlayRender: 1, viewMode: 1 }
  359. g.c.ya = g.BuryPoint.addOptions = function (a, b) {
  360. if (!a.dva)
  361. if (b && (b.innerLayer || b.innerOverlay)) a.w5 = !0
  362. else {
  363. a.dva = !0
  364. var c = a.CLASS_NAME
  365. if (c) {
  366. c = c.replace('AMap.', '')
  367. g.zA.lp(c)
  368. b = b || {}
  369. for (var d in b) b.hasOwnProperty(d) && ('Map' === c && d in nc ? g.zA.lp(c, d, b[d]) : g.zA.lp(c, d))
  370. }
  371. }
  372. }
  373. g.da = function () {}
  374. g.da.extend = g.da.extend = function (a) {
  375. function b() {}
  376. function c() {
  377. var a = this.initialize || this.A
  378. a && a.apply(this, arguments)
  379. if (!d && this.Mi) {
  380. a = document.createElement('style')
  381. a.setAttribute('type', 'text/css')
  382. this.CLASS_NAME && a.setAttribute('class', this.CLASS_NAME)
  383. this.Mi = this.Mi.replace(/url\((['"]?)(?:\.\.\/)*/g, 'url($1' + g.r.Gb + '/')
  384. a.styleSheet ? (a.styleSheet.cssText = this.Mi) : (a.innerHTML = this.Mi)
  385. for (var b = document.head || document.getElementsByTagName('head')[0], c = null, e = 0, f = b.childNodes.length; e < f; e++)
  386. if (1 === b.childNodes[e].nodeType) {
  387. c = b.childNodes[e]
  388. break
  389. }
  390. c ? b.insertBefore(a, c) : b.appendChild(a)
  391. }
  392. d = !0
  393. }
  394. var d = !1
  395. b.prototype = this.prototype
  396. var e = new b()
  397. e.constructor = c
  398. c.prototype = e
  399. c.prototype.Ch = c.prototype['super'] = function (a) {
  400. return a.callee.ma.apply(this, a)
  401. }
  402. for (var f in this) this.hasOwnProperty(f) && 'prototype' !== f && (c[f] = this[f])
  403. a.t9 && (g.extend(c, a.t9), (a.t9 = null))
  404. a.ka && (g.extend.apply(null, [e].concat(a.ka)), (a.ka = null))
  405. a.w && e.w && (a.w = g.extend({}, e.w, a.w))
  406. var h = e.constructor.wsa,
  407. k = {}
  408. if (void 0 !== h) for (f in h) h.hasOwnProperty(f) && (k[h[f]] = f)
  409. for (f in a)
  410. if (Object.prototype.hasOwnProperty.call(a, f)) {
  411. var l = f,
  412. m = f
  413. h && k[f] && (m = k[f])
  414. 'function' === typeof a[l] && 'function' === typeof e[m] && (a[l].ma = e[m])
  415. }
  416. g.extend(e, a)
  417. a.toString && (e.toString = a.toString)
  418. c.bd = this.prototype
  419. return c
  420. }
  421. g.da.Hb = g.da.include = function (a) {
  422. g.extend(this.prototype, a)
  423. }
  424. g.extend = function (a) {
  425. var b = Array.prototype.slice.call(arguments, 1),
  426. c,
  427. d,
  428. e,
  429. f
  430. d = 0
  431. for (e = b.length; d < e; d += 1)
  432. if (((f = b[d] || {}), Object.assign)) Object.assign(a, f)
  433. else for (c in f) Object.prototype.hasOwnProperty.call(f, c) && (a[c] = f[c])
  434. return a
  435. }
  436. g.da.Xb = function (a) {
  437. for (var b in a)
  438. if (a.hasOwnProperty(b)) {
  439. var c = a[b]
  440. if ('string' === typeof c) this.prototype[b] && (this.prototype[c] = this.prototype[b])
  441. else for (var d = 0, e = c.length; d < e; d++) this.prototype[b] && (this.prototype[c[d]] = this.prototype[b])
  442. }
  443. }
  444. g.zA = {
  445. Fj: {},
  446. getKey: function (a, b) {
  447. a = a || ''
  448. return void 0 !== b && a ? a + '@' + b : a
  449. },
  450. lp: function (a, b, c) {
  451. this.Fj[a] || (this.Fj[a] = {})
  452. b = this.getKey(b, c)
  453. void 0 == this.Fj[a][b] && (this.Fj[a][b] = 0)
  454. },
  455. send: function () {
  456. var a = [],
  457. b
  458. for (b in this.Fj)
  459. if (this.Fj.hasOwnProperty(b)) {
  460. var c = this.Fj[b],
  461. d = [],
  462. e
  463. for (e in c) c.hasOwnProperty(e) && 0 == c[e] && (d.push(e), (c[e] = 1))
  464. d.length && a.push(b + '~' + d.join(','))
  465. }
  466. a.length &&
  467. ((a = ['type=nfl', 'k=' + g.r.key, 'm=' + (g.l.ba ? 1 : 0), 'pf=' + g.l.Dz, 'v=' + g.r.ln, 'branch=JSAPI', 'log=' + a.join('!')]),
  468. (a = g.r.tc + '://webapi.amap.com/count?' + a.join('&')),
  469. new g.jb.zb(a))
  470. },
  471. }
  472. setInterval(function () {
  473. g.zA.send()
  474. }, 1e4)
  475. g.va = {
  476. h: function (a, b, c, d, e) {
  477. if (this.ve(a, b, c || this)) return this
  478. var f = (this.mf = this.mf || {})
  479. f[a] = f[a] || []
  480. e ? f[a].unshift({ xb: b, bf: c || this, Cj: d }) : f[a].push({ xb: b, bf: c || this, Cj: d })
  481. return this
  482. },
  483. ve: function (a, b, c) {
  484. var d = this.mf
  485. if (b && c) {
  486. if (d && a in d && d[a]) for (var e = 0; e < d[a].length; e += 1) if (d[a][e].xb === b && d[a][e].bf === c) return !0
  487. return !1
  488. }
  489. return d && a in d && d[a] && 0 < d[a].length
  490. },
  491. G: function (a, b, c) {
  492. if (!this.ve(a)) return this
  493. var d = this.mf
  494. if (d && d[a])
  495. for (var e = 0; e < d[a].length; e += 1)
  496. if (!((d[a][e].xb !== b && 'mv' !== b) || (c && d[a][e].bf !== c))) {
  497. d[a].splice(e, 1)
  498. d[a].length || (d[a] = null)
  499. break
  500. }
  501. return this
  502. },
  503. cK: function (a, b) {
  504. if (!this.ve(a)) return this
  505. var c = this.mf
  506. if (c && c[a])
  507. for (var d = 0; d < c[a].length; d += 1)
  508. if (!b || c[a][d].bf === b) {
  509. c[a].splice(d, 1)
  510. c[a].length || (c[a] = null)
  511. break
  512. }
  513. return this
  514. },
  515. q: function (a, b) {
  516. if (!this.ve(a)) return this
  517. var c = { type: a }
  518. void 0 !== b &&
  519. (b instanceof Array
  520. ? ((c = b.slice(0)), (c.type = a))
  521. : 'string' === typeof b || 'number' === typeof b || 'boolean' === typeof b
  522. ? (c.value = b)
  523. : g.a.EJ(b)
  524. ? (c.value = b)
  525. : (c = g.extend(c, b)))
  526. for (var d = [].concat(this.mf[a]), e = 0; e < d.length; e += 1) d[e].xb && (d[e].xb.call(d[e].bf || this, c), d[e] && d[e].Cj && this.mf[a] && this.mf[a].splice(e, 1))
  527. return this
  528. },
  529. ti: function (a) {
  530. a ? this.mf && this.mf[a] && (this.mf[a] = null) : (this.mf = null)
  531. return this
  532. },
  533. }
  534. g.va.on || (g.va.on = g.va.h)
  535. g.va.off || (g.va.off = g.va.G)
  536. g.va.emit || (g.va.emit = g.va.q)
  537. g.Ze = {
  538. set: function (a, b, c) {
  539. var d = this.Hl
  540. if (d && d[a]) {
  541. var d = d[a],
  542. e = 'set' + this.I4(a)
  543. if (d[e]) {
  544. var f = !1
  545. !0 == d.C ? (f = !0) : (d.C = !0)
  546. d[e](b, c)
  547. f || (d.C = !1)
  548. c || this.BK(a, b)
  549. } else d.set(a, b, c)
  550. } else ((this.Ce = this.Ce || {})[a] = b), c || this.BK(a, b)
  551. },
  552. I4: (function () {
  553. var a = {}
  554. return function (b) {
  555. a[b] || (a[b] = b.charAt(0).toUpperCase() + b.substr(1))
  556. return a[b]
  557. }
  558. })(),
  559. get: function (a, b, c) {
  560. var d,
  561. e = this.Hl
  562. d = 'get' + this.I4(a)
  563. if (e && e[a]) return (c = e[a]), c[d] ? ((a = !1), !0 == c.C ? (a = !0) : (c.C = !0), (b = c[d](b)), a || (c.C = !1), b) : c.get(a, b)
  564. if (!c && this[d]) return (a = !1), !0 == this.C ? (a = !0) : (this.C = !0), (b = this[d](b)), a || (this.C = !1), b
  565. if (this.Ce && this.Ce.hasOwnProperty(a)) return this.Ce[a]
  566. },
  567. X: function (a, b, c) {
  568. this.Hl || (this.Hl = {})
  569. this.Hl[a] !== b &&
  570. (b.h(
  571. a,
  572. function (b) {
  573. this.BK(a, b)
  574. },
  575. this
  576. ),
  577. (this.Hl[a] = b),
  578. c || this.BK(a))
  579. },
  580. af: function (a, b, c) {
  581. for (var d = 0; d < a.length; d += 1) this.X(a[d], b, !c)
  582. },
  583. xl: function (a) {
  584. this.Hl && this.Hl[a] && (this.Hl[a].G(a, 'mv', this), (this.Hl[a] = void 0))
  585. },
  586. yl: function () {
  587. if (this.Hl) for (var a in this.Hl) this.Hl.hasOwnProperty(a) && this.xl(a)
  588. },
  589. BK: function (a, b) {
  590. var c = a + 'Changed'
  591. if (this[c]) this[c](b)
  592. this.q(a, b)
  593. },
  594. vFa: function (a, b, c) {
  595. var d = new (g.da.extend({ ka: [g.va, g.Ze] }))()
  596. d.bQ = function () {
  597. for (var b = !0, e = 0; e < a.length; e += 1) d.get(a[e]) || (b = !1)
  598. b && (d.yl(), c())
  599. }
  600. for (var e = 0; e < a.length; e += 1) d.X(a[e], b)
  601. },
  602. jf: function (a, b) {
  603. var c, d
  604. for (c in a) a.hasOwnProperty(c) && ((d = a[c]), this.set(c, d, b))
  605. },
  606. }
  607. g.r = {
  608. localStorage: !0,
  609. QH: 500,
  610. Ae: !0,
  611. De: { dark: '#202020', blue_night: '#090d20', test: '#033447', mapv: '#000001', techblue: '#000b11', insight: '#19212a', default: '#fcf9f2' },
  612. dK: { normal: 'normal', dark: 'dark', light: 'light', fresh: 'fresh', test: 'blue', blue_night: 'blue', mapv: 'darkblue', insight: 'grey' },
  613. key: 'e661b00bdf2c44cccf71ef6070ef41b8',
  614. tc: 'http',
  615. Rd: [115.423412, 39.442759, 117.514625, 41.060816, 116.405285, 39.904989],
  616. Zd: 'http://restapi.amap.com',
  617. Gb: 'http://webapi.amap.com',
  618. oK: 'http://gaode.com',
  619. Iv: 'http://m.amap.com',
  620. OD: 'http://webrd0{1,2,3,4}.is.autonavi.com/appmaptile?lang=[lang]&size=1&scale=1&style=8&x=[x]&y=[y]&z=[z]',
  621. SJ: 'http://wprd0{1,2,3,4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x=[x]&y=[y]&z=[z]&scl=1&ltype=3',
  622. xU: 'http://webst0{1,2,3,4}.is.autonavi.com/appmaptile?style=6&x=[x]&y=[y]&z=[z]',
  623. OK: 'http://webst0{1,2,3,4}.is.autonavi.com/appmaptile?x=[x]&y=[y]&z=[z]&lang=zh_cn&size=1&scale=1&style=8',
  624. PK: 'http://wprd0{1,2,3,4}.is.autonavi.com/appmaptile?x=[x]&y=[y]&z=[z]&lang=zh_cn&size=1&scl=1&style=8&ltype=11',
  625. TE: 'http://wprd0{1,2,3,4}.is.autonavi.com/appmaptile?lang=[lang]&size=1&style=7&x=[x]&y=[y]&z=[z]',
  626. wL: 'http://vector.amap.com',
  627. vL: 'vdata.amap.com',
  628. eAa: 'ws',
  629. SI: 'http://a.amap.com/jsapi/static/image/',
  630. Vn: 0,
  631. }
  632. function oc(a) {
  633. g.da.Ru = a.Ru
  634. g.l = a.l
  635. g.Qva = a[7]
  636. a.l = null
  637. g.r.Gb = a[2].split(',')[0]
  638. g.r.Dk = a.Dk
  639. g.r.MJ = a.MJ
  640. var b = (g.r.tc = g.r.Gb.split(':')[0])
  641. 'https' === b &&
  642. ((g.r.eAa = 'wss'),
  643. (g.r.Zd = g.r.Zd.replace('http', 'https')),
  644. (g.r.OD = g.r.OD.replace('http', 'https')),
  645. (g.r.SJ = g.r.SJ.replace('http', 'https')),
  646. (g.r.xU = g.r.xU.replace('http', 'https')),
  647. (g.r.OK = g.r.OK.replace('http', 'https')),
  648. (g.r.PK = g.r.PK.replace('http', 'https')),
  649. (g.r.TE = g.r.TE.replace('http', 'https')),
  650. (g.r.wL = g.r.wL.replace('http', 'https')),
  651. (g.r.SI = g.r.SI.replace('http', 'https')))
  652. var c = window.location.href
  653. 0 !== c.indexOf('http') && window.parent && window.parent !== window && (c = window.parent.location.href)
  654. ;-1 != c.indexOf('?') && (c = c.substr(0, c.indexOf('?')))
  655. g.r.cqa = c
  656. c = encodeURIComponent(c)
  657. g.r.Up = c
  658. g.r.Hi = g.r.Gb + '/theme/v1.3/markers/' + (g.l.Jc ? 'b' : 'n')
  659. var d = document.createElement('style')
  660. d.type = 'text/css'
  661. g.r.Boa = 'url(' + b + '://webapi.amap.com/theme/v1.3/openhand.cur),default'
  662. var e = '.amap-container{cursor:' + g.r.Boa + ';}.amap-drag{cursor:url(' + b + '://webapi.amap.com/theme/v1.3/closedhand.cur),default;}'
  663. d.styleSheet
  664. ? ((b = function () {
  665. try {
  666. d.styleSheet.cssText = e
  667. } catch (a) {}
  668. }),
  669. d.styleSheet.disabled ? setTimeout(b, 10) : b())
  670. : d.appendChild(document.createTextNode(e))
  671. ;(document.head || document.getElementsByTagName('head')[0]).appendChild(d)
  672. g.r.mode = Number(a[3])
  673. g.r.Rd = a[1]
  674. g.r.key = a[0]
  675. g.r.ln = a[4]
  676. g.r.Mc = a[5]
  677. g.r.Nla = a[6]
  678. g.r.RQ = a[13]
  679. pc()
  680. }
  681. function pc() {
  682. try {
  683. if (window.localStorage)
  684. for (var a = window.localStorage.length; 0 <= a; a -= 1) {
  685. var b = window.localStorage.key(a)
  686. if (b && '_AMap_' === b.slice(0, 6)) {
  687. var c = window.localStorage.getItem(b),
  688. c = JSON.parse(c || {})
  689. '_AMap_anole' === b
  690. ? c.version !== g.l.lf && window.localStorage.removeItem(b)
  691. : '_AMap_data.tileKeys' === b
  692. ? (c.vdataVer === g.l.lf && c.apiVer === g.r.Dk) || window.localStorage.removeItem(b)
  693. : c.version !== g.r.Dk && window.localStorage.removeItem(b)
  694. }
  695. }
  696. } catch (d) {}
  697. }
  698. window.AMap && window.AMap.uL && window.AMap.uL.vM && window.AMap.uL.vM(oc)
  699. g.Lm = { Pu: Math.PI / 180, iwa: 180 / Math.PI, PQ: 6378137 }
  700. ;(function () {
  701. function a(a) {
  702. return 'undefined' === typeof a ? '' : a
  703. }
  704. g.$h = {
  705. era: function (b) {
  706. b.name = a(b.name)
  707. var c = [b.y, b.x, b.name]
  708. if (g.l.ba) {
  709. var d = [g.r.Iv + '/callAPP?', 'src=jsapi_q']
  710. d.push('&ios=' + encodeURIComponent('viewMap?sourceApplication=jsapi_q&dev=0&poiname=' + b.name + '&lat=' + b.y + '&lon=' + b.x))
  711. d.push('&android=' + encodeURIComponent('androidamap?action=shorturl&q=' + c.join(',') + '&sourceApplication=jsapi_q'))
  712. d.push('&wp=' + encodeURIComponent('viewMap?sourceApplication=jsapi_q&dev=0&poiname=' + b.name + '&lat=' + b.y + '&lon=' + b.x))
  713. d.push('&mo=' + encodeURIComponent(g.r.Iv + '?q=' + c.join(',') + '&callapp=0&sourceApplication=jsapi_q'))
  714. return d.join('')
  715. }
  716. return g.r.oK + '?q=' + c.join(',') + '&src=jsapi_q'
  717. },
  718. u4: function (b) {
  719. b.name = a(b.name)
  720. b.address = a(b.address)
  721. b.x = a(b.x)
  722. b.y = a(b.y)
  723. var c = [b.id, b.y, b.x, b.name, b.address]
  724. if (g.l.ba) {
  725. var d = [g.r.Iv + '/callAPP?', 'src=jsapi_p']
  726. d.push('&ios=' + encodeURIComponent('multiPointShow?sourceApplication=jsapi_p&dev=0&q=' + [b.y, b.x, b.name, b.address, b.id].join() + '&title=' + b.name))
  727. d.push('&android=' + encodeURIComponent('androidamap?action=shorturl&p=' + c.join(',') + '&sourceApplication=jsapi_p'))
  728. d.push('&wp=' + encodeURIComponent('multiPointShow?sourceApplication=jsapi_p&dev=0&q=' + [b.y, b.x, b.name, b.address, b.id].join() + '&title=' + b.name))
  729. return d.join('')
  730. }
  731. return g.r.oK + '?p=' + c.join(',') + '&src=jsapi_p'
  732. },
  733. s4: function (b) {
  734. if (g.l.ba) {
  735. var c = [g.r.Iv + '/callAPP?', 'src=jsapi_detail']
  736. c.push('&ios=' + encodeURIComponent('viewPOIDetail?sourceApplication=jsapi_detail&poiid=' + b.id))
  737. b.name = a(b.name)
  738. b.x = a(b.x)
  739. b.y = a(b.y)
  740. c.push(
  741. '&android=' +
  742. encodeURIComponent(
  743. 'androidamap?action=openFeature&featureName=PoiDetail&poiid=' + b.id + '&poiname=' + b.name + '&x=' + b.x + '&y=' + b.y + '&sourceApplication=jsapi_detail'
  744. )
  745. )
  746. c.push('&wp=' + encodeURIComponent('viewPOIDetail?sourceApplication=jsapi_detail&poiid=' + b.id))
  747. c.push('&mo=' + encodeURIComponent(g.r.Iv + '/detail/index/poiid=' + b.id + '&sourceApplication=jsapi_detail'))
  748. return c.join('')
  749. }
  750. return g.r.oK + '/detail/' + b.id + '?src=jsapi_detail'
  751. },
  752. KR: function (b) {
  753. b.sname = a(b.sname)
  754. '' === b.sname && (b.sname = '\u8d77\u70b9')
  755. b.dname = a(b.dname)
  756. '' === b.dname && (b.dname = '\u7ec8\u70b9')
  757. b.mcount = a(b.mcount)
  758. b.my = a(b.my)
  759. b.mx = a(b.mx)
  760. b.mname = a(b.mname)
  761. var c = [b.sy, b.sx, b.sname, b.dy, b.dx, b.dname, b.m, b.t, b.mcount, b.my, b.mx, b.mname]
  762. if (g.l.ba) {
  763. var d = [g.r.Iv + '/callAPP?', 'src=jsapi_r_' + b.t]
  764. d.push(
  765. '&ios=' +
  766. encodeURIComponent(
  767. 'path?sourceApplication=jsapi_r_' +
  768. b.t +
  769. '&dev=0&slat=' +
  770. b.sy +
  771. '&slon=' +
  772. b.sx +
  773. '&sname=' +
  774. b.sname +
  775. '&dlat=' +
  776. b.dy +
  777. '&dlon=' +
  778. b.dx +
  779. '&dname=' +
  780. b.dname +
  781. '&m=' +
  782. b.m +
  783. '&t=' +
  784. b.t +
  785. '&vian=0&vialons=&vialats=&vianames='
  786. )
  787. )
  788. var e = b.t
  789. 0 === b.t ? (e = 2) : 2 === b.t && (e = 4)
  790. d.push(
  791. '&android=' +
  792. encodeURIComponent(
  793. 'androidamap://route?sourceApplication=jsapi_r_' +
  794. b.t +
  795. '&slat=' +
  796. b.sy +
  797. '&slon=' +
  798. b.sx +
  799. '&sname=' +
  800. b.sname +
  801. '&dlat=' +
  802. b.dy +
  803. '&dlon=' +
  804. b.dx +
  805. '&dname=' +
  806. b.dname +
  807. '&dev=0&' +
  808. b.m +
  809. '&t=' +
  810. e
  811. )
  812. )
  813. d.push(
  814. '&wp=' +
  815. encodeURIComponent(
  816. 'path?sourceApplication=jsapi_r_' +
  817. b.t +
  818. '&dev=0&slat=' +
  819. b.sy +
  820. '&slon=' +
  821. b.sx +
  822. '&sname=' +
  823. b.sname +
  824. '&dlat=' +
  825. b.dy +
  826. '&dlon=' +
  827. b.dx +
  828. '&dname=' +
  829. b.dname +
  830. '&m=' +
  831. b.m +
  832. '&t=' +
  833. b.t +
  834. '&vian=0&vialons=&vialats=&vianames='
  835. )
  836. )
  837. d.push('&mo=' + encodeURIComponent(g.r.Iv + '/?r=' + c.join(',') + '&callapp=0&sourceApplication=jsapi_r_' + b.t))
  838. return d.join('')
  839. }
  840. return g.r.oK + '?r=' + c.join(',') + 'src=jsapi_r_' + b.t
  841. },
  842. mt: function (a) {
  843. g.l.ba ? (window.location.href = a) : window.open(a)
  844. },
  845. }
  846. })()
  847. 'function' !== typeof Object.keys &&
  848. (Object.keys = function (a) {
  849. var b = [],
  850. c
  851. for (c in a) a.hasOwnProperty(c) && b.push(c)
  852. return b
  853. })
  854. g.a = {
  855. CLASS_NAME: 'AMap.Util',
  856. cL: [],
  857. Fa: 268435456,
  858. bp: [215440491, 106744817],
  859. Bw: (function () {
  860. var a = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
  861. return function (b, c) {
  862. var d = [],
  863. e
  864. c = c || a.length
  865. if (b) for (e = 0; e < b; e++) d[e] = a[0 | (Math.random() * c)]
  866. else {
  867. var f
  868. d[8] = d[13] = d[18] = d[23] = '-'
  869. d[14] = '4'
  870. for (e = 0; 36 > e; e++) d[e] || ((f = 0 | (16 * Math.random())), (d[e] = a[19 === e ? (f & 3) | 8 : f]))
  871. }
  872. return d.join('')
  873. }
  874. })(),
  875. iR: {
  876. start: function (a) {
  877. a.startTime = new Date()
  878. a.kt = []
  879. var b = new Date().getTime()
  880. a.id = requestAnimationFrame(function d() {
  881. var e = new Date().getTime()
  882. a.kt.push(e - b)
  883. b = e
  884. a.id = requestAnimationFrame(d)
  885. })
  886. },
  887. cancel: function (a) {
  888. a.id && cancelAnimationFrame(a.id)
  889. },
  890. stop: function (a) {
  891. a.goa = new Date() - a.startTime
  892. this.cancel(a)
  893. a.iR = Math.round(1e3 / (a.goa / (a.kt.length + 1)))
  894. },
  895. },
  896. F4: function (a, b, c) {
  897. var d = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : !1
  898. if (a === b) return b
  899. switch (3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : 'linear') {
  900. case 'ease':
  901. c = g.Kw.EI(0.25, 0.1, 0.25, 1)(c)
  902. break
  903. case 'ease-in':
  904. c = g.Kw.EI(0.42, 0, 1, 1)(c)
  905. break
  906. case 'ease-out':
  907. c = g.Kw.EI(0, 0, 0.58, 1)(c)
  908. break
  909. case 'ease-in-out':
  910. c = g.Kw.EI(0.42, 0, 0.58, 1)(c)
  911. }
  912. var e = a + (b - a) * c
  913. d && (e >>= 0)
  914. return e
  915. },
  916. createObjectURL: function (a) {
  917. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'text/javascript; charset=utf-8',
  918. c = null
  919. try {
  920. c = (window.URL || window.webkitURL).createObjectURL(new Blob([a], { type: b }))
  921. } catch (d) {
  922. c = null
  923. }
  924. return c
  925. },
  926. revokeObjectURL: function (a) {
  927. ;(window.URL || window.webkitURL).revokeObjectURL(a)
  928. },
  929. LCa: function (a) {
  930. for (var b = {}, c = 0, d = a.length; c < d; c++) b[a[c]] = c
  931. return b
  932. },
  933. mD: function (a) {
  934. var b = {}
  935. if (g.a.jk(a, 'object')) for (var c in a) a.hasOwnProperty(c) && (b[a[c]] = c)
  936. return b
  937. },
  938. Of: function (a, b) {
  939. for (var c = 0, d = b.length; c < d; c += 1) a.push(b[c])
  940. },
  941. create:
  942. 'function' === typeof Object.create
  943. ? Object.create
  944. : function (a, b) {
  945. function c() {}
  946. c.prototype = a
  947. var d = new c(),
  948. e
  949. for (e in b) b.hasOwnProperty(e) && (d[e] = b[e])
  950. return d
  951. },
  952. cb: function (a) {
  953. if ('object' === typeof a && null !== a) {
  954. if (a.V6 || this.jk(a, 'Float32Array') || this.jk(a, 'Uint16Array')) return a
  955. var b = this.isArray(a) ? [] : {},
  956. c
  957. for (c in a) a.hasOwnProperty(c) && (b[c] = g.a.cb(a[c]))
  958. return b
  959. }
  960. return a
  961. },
  962. J5: function (a) {
  963. return (a | 0) === a
  964. },
  965. Exa:
  966. 'function' === typeof Object.setPrototypeOf
  967. ? Object.setPrototypeOf
  968. : function (a, b) {
  969. for (var c in b) a[c] = b[c]
  970. },
  971. Ph: function (a) {
  972. return 'function' === typeof a
  973. },
  974. gma: function (a) {
  975. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'webgl'
  976. if (!a) return a
  977. for (var c = [], d = 0, e = a.length; d < e; d += 2) {
  978. var f = parseInt(a.substr(d, 2), 16)
  979. if ('webgl' === b || ('rgba' === b && 0 === d)) f = this.wb(f / 255, 3)
  980. c.push(f)
  981. }
  982. c.push(c.shift())
  983. return c
  984. },
  985. Rs: function () {},
  986. keys:
  987. 'function' === typeof Object.keys
  988. ? Object.keys
  989. : function (a) {
  990. var b = [],
  991. c
  992. for (c in a) a.hasOwnProperty(c) && b.push(c)
  993. return b
  994. },
  995. map: function (a, b) {
  996. var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null,
  997. d = []
  998. if (a && a.length)
  999. g.a.Tb(a, function () {
  1000. for (var e = arguments.length, f = Array(e), h = 0; h < e; h++) f[h] = arguments[h]
  1001. d[f[1]] = b.apply(c || a, f)
  1002. })
  1003. else return a
  1004. return d
  1005. },
  1006. forEach: function (a, b) {
  1007. if (a && a.length) {
  1008. var c = a.length
  1009. if (0 < c && (b(a[0], 0), 1 < c)) {
  1010. b(a[1], 1)
  1011. for (var d = 2; d < c; d++) b(a[d], d)
  1012. }
  1013. }
  1014. },
  1015. Tb: function (a, b) {
  1016. var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
  1017. if (a && a.length) for (var d = 0, e = a.length; d < e && !1 !== b.call(c, a[d], d, a); d++);
  1018. },
  1019. find: function (a, b) {
  1020. for (var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null, d = 0, e = a.length; d < e; d++)
  1021. if ('function' === typeof b) {
  1022. if (b.call(c, a[d], d, a)) return a[d]
  1023. } else if (a[d] === b) return a[d]
  1024. return null
  1025. },
  1026. EJ: function (a) {
  1027. return 'object' === typeof HTMLElement ? a instanceof HTMLElement : a && 'object' === typeof a && 1 === a.nodeType && 'string' === typeof a.nodeName
  1028. },
  1029. xw: function (a, b) {
  1030. var c = 'ASDFGHJKLQWERTYUIO!sdfghjkleiu3~yr5-P&mq9`%zCN*b=8@^xpVM',
  1031. d,
  1032. e
  1033. 'v5' < (b || 'v5') ? ((d = c.length), (e = 512)) : ((d = 27), (c = c.substr(0, 27)), (e = 333))
  1034. var f, h, k, l, m
  1035. h = []
  1036. k = NaN
  1037. l = 0
  1038. for (m = a.length; l < m; l++) (f = a[l]), (f = c.indexOf(f)), isNaN(k) ? (k = f * d) : (h.push(k + f - e), (k = NaN))
  1039. return h
  1040. },
  1041. nxa: function (a, b) {
  1042. for (var c = 1, c = 512 < b.length ? Math.round(Math.pow(b.length, 0.5)) : b.length, d = Math.ceil(b.length / c), e = 0; e < d; e += 1) {
  1043. var f = c * e,
  1044. h = f + c
  1045. h > b.length && (h = b.length)
  1046. for (; f < h; f += 1) a(b[f])
  1047. }
  1048. },
  1049. jDa: function (a) {
  1050. if (/^rgba\(/.test(a)) return this.Xv(a)
  1051. var b = (a = this.lI(a))
  1052. '#' === a[0] &&
  1053. ((a = a.substring(1)),
  1054. 3 === a.length &&
  1055. (a = a.replace(/./g, function (a) {
  1056. return a + a
  1057. })),
  1058. (b = this.Rr(8 === a.length ? a : 'ff' + a)))
  1059. return this.Xv(b)
  1060. },
  1061. lI: function () {
  1062. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : '',
  1063. a = a.toLowerCase(),
  1064. b = {
  1065. aliceblue: '#f0f8ff',
  1066. antiquewhite: '#faebd7',
  1067. aqua: '#00ffff',
  1068. aquamarine: '#7fffd4',
  1069. azure: '#f0ffff',
  1070. beige: '#f5f5dc',
  1071. bisque: '#ffe4c4',
  1072. black: '#000000',
  1073. blanchedalmond: '#ffebcd',
  1074. blue: '#0000ff',
  1075. blueviolet: '#8a2be2',
  1076. brown: '#a52a2a',
  1077. burlywood: '#deb887',
  1078. cadetblue: '#5f9ea0',
  1079. chartreuse: '#7fff00',
  1080. chocolate: '#d2691e',
  1081. coral: '#ff7f50',
  1082. cornflowerblue: '#6495ed',
  1083. cornsilk: '#fff8dc',
  1084. crimson: '#dc143c',
  1085. cyan: '#00ffff',
  1086. darkblue: '#00008b',
  1087. darkcyan: '#008b8b',
  1088. darkgoldenrod: '#b8860b',
  1089. darkgray: '#a9a9a9',
  1090. darkgreen: '#006400',
  1091. darkkhaki: '#bdb76b',
  1092. darkmagenta: '#8b008b',
  1093. darkolivegreen: '#556b2f',
  1094. darkorange: '#ff8c00',
  1095. darkorchid: '#9932cc',
  1096. darkred: '#8b0000',
  1097. darksalmon: '#e9967a',
  1098. darkseagreen: '#8fbc8f',
  1099. darkslateblue: '#483d8b',
  1100. darkslategray: '#2f4f4f',
  1101. darkturquoise: '#00ced1',
  1102. darkviolet: '#9400d3',
  1103. deeppink: '#ff1493',
  1104. deepskyblue: '#00bfff',
  1105. dimgray: '#696969',
  1106. dodgerblue: '#1e90ff',
  1107. firebrick: '#b22222',
  1108. floralwhite: '#fffaf0',
  1109. forestgreen: '#228b22',
  1110. fuchsia: '#ff00ff',
  1111. gainsboro: '#dcdcdc',
  1112. ghostwhite: '#f8f8ff',
  1113. gold: '#ffd700',
  1114. goldenrod: '#daa520',
  1115. gray: '#808080',
  1116. green: '#008000',
  1117. greenyellow: '#adff2f',
  1118. honeydew: '#f0fff0',
  1119. hotpink: '#ff69b4',
  1120. indianred: '#cd5c5c',
  1121. indigo: '#4b0082',
  1122. ivory: '#fffff0',
  1123. khaki: '#f0e68c',
  1124. lavender: '#e6e6fa',
  1125. lavenderblush: '#fff0f5',
  1126. lawngreen: '#7cfc00',
  1127. lemonchiffon: '#fffacd',
  1128. lightblue: '#add8e6',
  1129. lightcoral: '#f08080',
  1130. lightcyan: '#e0ffff',
  1131. lightgoldenrodyellow: '#fafad2',
  1132. lightgrey: '#d3d3d3',
  1133. lightgreen: '#90ee90',
  1134. lightpink: '#ffb6c1',
  1135. lightsalmon: '#ffa07a',
  1136. lightseagreen: '#20b2aa',
  1137. lightskyblue: '#87cefa',
  1138. lightslategray: '#778899',
  1139. lightsteelblue: '#b0c4de',
  1140. lightyellow: '#ffffe0',
  1141. lime: '#00ff00',
  1142. limegreen: '#32cd32',
  1143. linen: '#faf0e6',
  1144. magenta: '#ff00ff',
  1145. maroon: '#800000',
  1146. mediumaquamarine: '#66cdaa',
  1147. mediumblue: '#0000cd',
  1148. mediumorchid: '#ba55d3',
  1149. mediumpurple: '#9370d8',
  1150. mediumseagreen: '#3cb371',
  1151. mediumslateblue: '#7b68ee',
  1152. mediumspringgreen: '#00fa9a',
  1153. mediumturquoise: '#48d1cc',
  1154. mediumvioletred: '#c71585',
  1155. midnightblue: '#191970',
  1156. mintcream: '#f5fffa',
  1157. mistyrose: '#ffe4e1',
  1158. moccasin: '#ffe4b5',
  1159. navajowhite: '#ffdead',
  1160. navy: '#000080',
  1161. oldlace: '#fdf5e6',
  1162. olive: '#808000',
  1163. olivedrab: '#6b8e23',
  1164. orange: '#ffa500',
  1165. orangered: '#ff4500',
  1166. orchid: '#da70d6',
  1167. palegoldenrod: '#eee8aa',
  1168. palegreen: '#98fb98',
  1169. paleturquoise: '#afeeee',
  1170. palevioletred: '#d87093',
  1171. papayawhip: '#ffefd5',
  1172. peachpuff: '#ffdab9',
  1173. peru: '#cd853f',
  1174. pink: '#ffc0cb',
  1175. plum: '#dda0dd',
  1176. powderblue: '#b0e0e6',
  1177. purple: '#800080',
  1178. rebeccapurple: '#663399',
  1179. red: '#ff0000',
  1180. rosybrown: '#bc8f8f',
  1181. royalblue: '#4169e1',
  1182. saddlebrown: '#8b4513',
  1183. salmon: '#fa8072',
  1184. sandybrown: '#f4a460',
  1185. seagreen: '#2e8b57',
  1186. seashell: '#fff5ee',
  1187. sienna: '#a0522d',
  1188. silver: '#c0c0c0',
  1189. skyblue: '#87ceeb',
  1190. slateblue: '#6a5acd',
  1191. slategray: '#708090',
  1192. snow: '#fffafa',
  1193. springgreen: '#00ff7f',
  1194. steelblue: '#4682b4',
  1195. tan: '#d2b48c',
  1196. teal: '#008080',
  1197. thistle: '#d8bfd8',
  1198. tomato: '#ff6347',
  1199. turquoise: '#40e0d0',
  1200. violet: '#ee82ee',
  1201. wheat: '#f5deb3',
  1202. white: '#ffffff',
  1203. whitesmoke: '#f5f5f5',
  1204. yellow: '#ffff00',
  1205. yellowgreen: '#9acd32',
  1206. }
  1207. return 'string' === typeof a ? (b[a.toLowerCase()] ? b[a.toLowerCase()] : a) : a
  1208. },
  1209. FI: function (a, b, c) {
  1210. var d, e
  1211. d = Math.floor(c / 2)
  1212. e = c - d
  1213. d = ((1 << d) - 1) << e
  1214. e = (1 << e) - 1
  1215. return [c, (a & d) | (b & e), (b & d) | (a & e)]
  1216. },
  1217. GI: function (a) {
  1218. return a ? encodeURIComponent(a) : ''
  1219. },
  1220. Zc: function (a, b, c, d) {
  1221. c = a[b].i[c]
  1222. if ('undefined' === typeof c) return null
  1223. a = a[b].s
  1224. if ('number' === typeof c) return a[c]
  1225. for (; 'undefined' === typeof c[d.toString()] && !((d -= 1), 3 > d); );
  1226. d = c[d.toString()]
  1227. return 'number' === typeof d ? a[d] : null
  1228. },
  1229. Xv: function (a) {
  1230. a = a.split(',')
  1231. a[0] = parseFloat(a[0].split('rgba(')[1]) / 255
  1232. a[1] = parseFloat(a[1]) / 255
  1233. a[2] = parseFloat(a[2]) / 255
  1234. a[3] = parseFloat(a[3])
  1235. return a
  1236. },
  1237. axa: function (a) {
  1238. a = a.split(',')
  1239. a[0] = parseFloat(a[0].split('rgb(')[1]) / 255
  1240. a[1] = parseFloat(a[1]) / 255
  1241. a[2] = parseFloat(a[2]) / 255
  1242. return a
  1243. },
  1244. sU: function (a) {
  1245. return 'rgba(' + 255 * a[0] + ',' + 255 * a[1] + ',' + 255 * a[2] + ',' + a[3] + ')'
  1246. },
  1247. Ona: function (a) {
  1248. return this.sU(this.Zl(a))
  1249. },
  1250. Zl: function (a) {
  1251. if (a instanceof Array) return 3 == a.length && a.push(1), a
  1252. a = this.lI(a)
  1253. if (0 == a.indexOf('#')) {
  1254. if (4 === a.length)
  1255. return (
  1256. (a = a.substr(1).replace(/./g, function (a) {
  1257. return a + a
  1258. })),
  1259. this.op(a)
  1260. )
  1261. if (7 == a.length) return this.op(a.substr(1))
  1262. if (9 == a.length) return (a = a.substr(1)), this.Xk(a.substr(6) + a.substr(0, 6))
  1263. } else {
  1264. if (0 == a.indexOf('rgb(')) return (a = this.axa(a)), a.push(1), a
  1265. if (0 == a.indexOf('rgba(')) return this.Xv(a)
  1266. }
  1267. },
  1268. B8: function (a) {
  1269. return g.a.Rr('ff' + a)
  1270. },
  1271. Rr: function (a) {
  1272. for (var b = [], c = 0, d = a.length; c < d; c += 2) b.push(parseInt(a.substr(c, 2), 16))
  1273. b.push((b.shift() / 255).toFixed(2))
  1274. return 'rgba(' + b.join(',') + ')'
  1275. },
  1276. op: function (a) {
  1277. return g.a.Xk('ff' + a)
  1278. },
  1279. Xk: function (a) {
  1280. for (var b = [], c = 0, d = a.length; c < d; c += 2) b.push(parseInt(a.substr(c, 2), 16) / 255)
  1281. b.push(b.shift())
  1282. return b
  1283. },
  1284. uh: function (a) {
  1285. for (var b in a) if (a.hasOwnProperty(b)) return !1
  1286. return !0
  1287. },
  1288. Fo: function (a, b) {
  1289. 0 <= b && a.splice(b, 1)
  1290. return a
  1291. },
  1292. aya: function (a, b) {
  1293. return a.startsWith ? a.startsWith(b) : a.substr(0, b.length) === b
  1294. },
  1295. Ay: function (a, b) {
  1296. var c = g.a.indexOf(a, b)
  1297. return g.a.Fo(a, c)
  1298. },
  1299. filter: function (a, b, c) {
  1300. var d = []
  1301. g.a.Tb(a, function (a, f) {
  1302. b.call(c, a, f) && d.push(a)
  1303. })
  1304. return d
  1305. },
  1306. indexOf: function (a, b) {
  1307. if (!a || !a.length) return -1
  1308. if (a.indexOf) return a.indexOf(b)
  1309. for (var c = 0; c < a.length; c += 1) if (a[c] === b) return c
  1310. return -1
  1311. },
  1312. cD: function (a, b) {
  1313. return a.endsWith ? a.endsWith(b) : a.length < b.length ? !1 : a.substr(a.length - b.length) == b ? !0 : !1
  1314. },
  1315. bind: (function () {
  1316. var a = !1
  1317. Function.prototype.bind && (a = !0)
  1318. return function (b, c) {
  1319. var d = 2 < arguments.length ? Array.prototype.slice.call(arguments, 2) : null
  1320. return a
  1321. ? d
  1322. ? (d.unshift(c), b.bind.apply(b, d))
  1323. : b.bind(c)
  1324. : function () {
  1325. return b.apply(c, d || arguments)
  1326. }
  1327. }
  1328. })(),
  1329. ub: function (a, b) {
  1330. b = b || {}
  1331. a.w = g.extend({}, a.w, b)
  1332. return a.w
  1333. },
  1334. Fna: function (a, b, c) {
  1335. return 'function' == typeof b ? this.KP(a, !0, this.Ama(b, c, 1)) : this.KP(a, !0)
  1336. },
  1337. KP: function (a, b, c, d, e, f, h) {
  1338. var k
  1339. c && (k = e ? c(a, d, e) : c(a))
  1340. if (void 0 !== k) return k
  1341. if (!this.O5(a)) return a
  1342. if ((d = this.isArray(a))) {
  1343. if (((k = this.nsa(a)), !b)) return this.ima(a, k)
  1344. } else {
  1345. var l = Object.prototype.toString.call(a),
  1346. m = '[object Function]' == l
  1347. if ('[object Object]' == l || '[object Arguments]' == l || (m && !e)) {
  1348. if (((k = this.osa(m ? {} : a)), !b)) return this.rma(k, a)
  1349. } else return e ? a : {}
  1350. }
  1351. f || (f = [])
  1352. h || (h = [])
  1353. for (e = f.length; e--; ) if (f[e] == a) return h[e]
  1354. f.push(a)
  1355. h.push(k)
  1356. ;(d ? this.jma : this.wma)(a, function (d, e) {
  1357. k[e] = g.a.KP(d, b, c, e, a, f, h)
  1358. })
  1359. return k
  1360. },
  1361. rma: function (a, b) {
  1362. return null == b ? a : this.uma(b, Object.keys(b), a)
  1363. },
  1364. O5: function (a) {
  1365. var b = typeof a
  1366. return !!a && ('object' == b || 'function' == b)
  1367. },
  1368. oFa: function (a) {
  1369. return !!a && 'object' == typeof a
  1370. },
  1371. mFa: function (a) {
  1372. return 'number' == typeof a && -1 < a && 0 == a % 1 && 9007199254740991 >= a
  1373. },
  1374. nsa: function (a) {
  1375. var b = a.length,
  1376. c = new a.constructor(b)
  1377. b && 'string' == typeof a[0] && Object.hasOwnProperty.call(a, 'index') && ((c.index = a.index), (c.input = a.input))
  1378. return c
  1379. },
  1380. ima: function (a, b) {
  1381. var c = -1,
  1382. d = a.length
  1383. for (b || (b = Array(d)); ++c < d; ) b[c] = a[c]
  1384. return b
  1385. },
  1386. osa: function (a) {
  1387. a = a.constructor
  1388. ;('function' == typeof a && a instanceof a) || (a = Object)
  1389. return new a()
  1390. },
  1391. Ama: function (a, b, c) {
  1392. if ('function' != typeof a) return this.rv
  1393. if (void 0 === b) return a
  1394. switch (c) {
  1395. case 1:
  1396. return function (c) {
  1397. return a.call(b, c)
  1398. }
  1399. case 3:
  1400. return function (c, e, f) {
  1401. return a.call(b, c, e, f)
  1402. }
  1403. case 4:
  1404. return function (c, e, f, h) {
  1405. return a.call(b, c, e, f, h)
  1406. }
  1407. case 5:
  1408. return function (c, e, f, h, k) {
  1409. return a.call(b, c, e, f, h, k)
  1410. }
  1411. }
  1412. return function () {
  1413. return a.apply(b, arguments)
  1414. }
  1415. },
  1416. jma: function (a, b) {
  1417. for (var c = -1, d = a.length; ++c < d && !1 !== b(a[c], c, a); );
  1418. return a
  1419. },
  1420. rv: function (a) {
  1421. return a
  1422. },
  1423. hoa: function (a) {
  1424. return function (b, c, d) {
  1425. var e = g.a.Bya(b)
  1426. d = d(b)
  1427. for (var f = d.length, h = a ? f : -1; a ? h-- : ++h < f; ) {
  1428. var k = d[h]
  1429. if (!1 === c(e[k], k, e)) break
  1430. }
  1431. return b
  1432. }
  1433. },
  1434. wma: function (a, b) {
  1435. return g.a.hoa()(a, b, Object.keys)
  1436. },
  1437. Bya: function (a) {
  1438. return g.a.O5(a) ? a : Object(a)
  1439. },
  1440. uma: function (a, b, c) {
  1441. c || (c = {})
  1442. for (var d = -1, e = b.length; ++d < e; ) {
  1443. var f = b[d]
  1444. c[f] = a[f]
  1445. }
  1446. return c
  1447. },
  1448. x3: function () {
  1449. return !1
  1450. },
  1451. join: function (a, b) {
  1452. if (a.join) return a.join(b)
  1453. var c = [],
  1454. d
  1455. for (d in a) a.hasOwnProperty(d) && c.push(d + '=' + (a[d] || ''))
  1456. return c.join(b)
  1457. },
  1458. f4: function (a, b) {
  1459. return (a || '') + Math.round(Math.random() * Math.pow(10, b || 6))
  1460. },
  1461. yb: (function () {
  1462. var a = 0
  1463. return function (b) {
  1464. b._amap_id || ((a += 1), (b._amap_id = a))
  1465. return b._amap_id
  1466. }
  1467. })(),
  1468. wpa: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
  1469. dg: Date.now
  1470. ? function () {
  1471. return Date.now()
  1472. }
  1473. : function () {
  1474. return new Date().getTime()
  1475. },
  1476. LD: function (a, b, c, d) {
  1477. var e
  1478. if (d) {
  1479. var f = 0,
  1480. h,
  1481. k = this.dg
  1482. e = function () {
  1483. h = k()
  1484. if (h - f < b) return !1
  1485. f = h
  1486. a.apply(c, arguments)
  1487. }
  1488. } else {
  1489. var l, m, n
  1490. n = function () {
  1491. l = !1
  1492. m && (e.apply(c, m), (m = !1))
  1493. }
  1494. e = function () {
  1495. l ? (m = arguments) : ((l = !0), a.apply(c, arguments), setTimeout(n, b))
  1496. }
  1497. }
  1498. return e
  1499. },
  1500. wb: function (a, b) {
  1501. if (a === a << 0) return a
  1502. var c = Math.pow(10, b || 0)
  1503. return Math.round(parseFloat(a) * c) / c
  1504. },
  1505. isArray: Array.isArray
  1506. ? Array.isArray
  1507. : function (a) {
  1508. return this.jk(a, 'array')
  1509. },
  1510. jk: function (a, b) {
  1511. return Object.prototype.toString.call(a).split(' ')[1].slice(0, -1).toLowerCase() === b.toLowerCase()
  1512. },
  1513. ka:
  1514. 'function' === typeof Array.prototype.ka
  1515. ? function (a, b) {
  1516. return a.ka(b)
  1517. }
  1518. : function (a, b) {
  1519. return -1 !== this.indexOf(a, b)
  1520. },
  1521. x9: function (a) {
  1522. var b = 0
  1523. if (0 === a.length) return b
  1524. for (var c, d = 0, e = a.length; d < e; d += 1) (c = a.charCodeAt(d)), (b = (b << 5) - b + c), (b &= b)
  1525. return b
  1526. },
  1527. wDa: function (a, b) {
  1528. b = b ? Math.ceil(parseInt(b.substr(6)) / 24) : 1
  1529. for (var c = '', d = 0, e = a.length; d < e; d++) c += String.fromCharCode((a.charCodeAt(d) - 256 - b + 65535) % 65535)
  1530. return c
  1531. },
  1532. Eoa: function (a, b) {
  1533. var c = (a + '').slice(-2),
  1534. d = (b + '').slice(-2)
  1535. a = a.slice(0, -2)
  1536. b = b.slice(0, -2)
  1537. var e = parseInt((d + c).slice(1)),
  1538. f = Math.ceil(e / 250) % 2 ? 1 : -1,
  1539. d = parseInt('1' + d) / 3e3
  1540. a -= (parseInt('1' + c) / 3e3) * f
  1541. b -= d * (1 < e / 500 ? 1 : -1)
  1542. return new g.U(parseFloat(a).toFixed(5), parseFloat(b).toFixed(5))
  1543. },
  1544. a7: function (a) {
  1545. return 'undefined' !== typeof JSON && JSON.stringify ? g.a.x9(JSON.stringify(a)) : null
  1546. },
  1547. EHa: function (a, b) {
  1548. if (b || !a.hasOwnProperty('_amap_hash')) {
  1549. var c = g.a.a7(a)
  1550. c && (a._amap_hash = c)
  1551. }
  1552. return a._amap_hash
  1553. },
  1554. iepngFix: function (a) {
  1555. function b() {
  1556. for (var a; c.length; ) (a = c.shift()), window.DD_belatedPNG.fixPng(a)
  1557. d.ES = !0
  1558. }
  1559. this.M7 || ((this.M7 = []), (this.ES = !1))
  1560. var c = this.M7,
  1561. d = this
  1562. if ('img' === a.tagName.toLowerCase()) c.push(a)
  1563. else {
  1564. a = a.getElementsByTagName('*')
  1565. for (var e = 0; e < a.length; e += 1) c.push(a[e])
  1566. }
  1567. window.DD_belatedPNG && this.ES
  1568. ? setTimeout(function () {
  1569. b()
  1570. }, 100)
  1571. : this.ES || g.tb.load('AMap.FixPng', b)
  1572. },
  1573. Ka: function (a) {
  1574. if (g.a.isArray(a))
  1575. if (g.a.isArray(a[0])) for (var b = 0; b < a.length; b += 1) a[b] = g.a.Ka(a[b])
  1576. else if (((b = typeof a[0]), 'string' === b || 'number' === b)) return new g.U(a[0], a[1])
  1577. return a
  1578. },
  1579. gAa: function (a) {
  1580. for (var b = [], c = 0, d = a.length; c < d; c += 1) b[c] = [a[c].x, a[c].y]
  1581. return b
  1582. },
  1583. Lq: function (a) {
  1584. return g.a.isArray(a) ? new g.xd(a[0], a[1]) : a
  1585. },
  1586. DP: function (a) {
  1587. var b = a.type,
  1588. c = a.UU,
  1589. d = a.error
  1590. a = new g.jb.XMLHttpRequest(a.url, { Ed: void 0 === b ? 'GET' : b, O2: a.data, pU: 'text/plain' })
  1591. a.h(
  1592. 'complete',
  1593. function (a) {
  1594. a = JSON.parse(a.data)
  1595. c && c(a)
  1596. },
  1597. this
  1598. )
  1599. a.h(
  1600. 'error',
  1601. function () {
  1602. var a = { errmsg: 'REQUEST_FAILED' }
  1603. d && d(a)
  1604. },
  1605. this
  1606. )
  1607. },
  1608. }
  1609. ;(function () {
  1610. function a(a) {
  1611. window.clearTimeout(a)
  1612. }
  1613. function b(a) {
  1614. var b,
  1615. c,
  1616. d = ['webkit', 'moz', 'o', 'ms']
  1617. for (b = 0; b < d.length && !c; b += 1) c = window[d[b] + a]
  1618. return c
  1619. }
  1620. function c(a) {
  1621. var b = +new Date(),
  1622. c = Math.max(0, (g.l.Xl ? 50 : 20) - (b - d))
  1623. d = b + c
  1624. return window.setTimeout(a, c)
  1625. }
  1626. var d = 0,
  1627. e = window.requestAnimationFrame || b('RequestAnimationFrame') || c,
  1628. f = window.cancelAnimationFrame || b('CancelAnimationFrame') || b('CancelRequestAnimationFrame') || a
  1629. g.a.Wc = function (a, b, c, d) {
  1630. if (c) b ? g.a.bind(a, b).call(b, d) : a()
  1631. else
  1632. return e(function () {
  1633. b ? g.a.bind(a, b).call(b, d) : a()
  1634. })
  1635. }
  1636. g.a.ri = function (a) {
  1637. a && f.call(window, a)
  1638. }
  1639. })()
  1640. g.a.qU = window.requestIdleCallback
  1641. ? function (a, b) {
  1642. return window.requestIdleCallback(a, b)
  1643. }
  1644. : function (a) {
  1645. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},
  1646. c = g.a.dg()
  1647. return setTimeout(function () {
  1648. a({
  1649. didTimeout: !1,
  1650. timeRemaining: function () {
  1651. return Math.max(0, 70 - (g.a.dg() - c))
  1652. },
  1653. })
  1654. }, b.timeout || 0)
  1655. }
  1656. g.a.$P = window.cancelIdleCallback
  1657. ? function (a) {
  1658. return window.cancelIdleCallback(a)
  1659. }
  1660. : function (a) {
  1661. clearTimeout(a)
  1662. }
  1663. ;(function (a) {
  1664. var b = 1,
  1665. c = {}
  1666. a.a.Cxa = function (a, b) {
  1667. if (c[a]) {
  1668. var f = c[a]
  1669. f.GE = 1
  1670. f.result = b
  1671. if (f.nn) {
  1672. for (var h = f.nn, k = 0, l = h.length; k < l; k++) h[k].call(null, b)
  1673. f.nn = null
  1674. }
  1675. }
  1676. }
  1677. a.a.Bna = function (a) {
  1678. c[a] = null
  1679. }
  1680. a.a.Qza = function (a, b) {
  1681. if (c[a]) {
  1682. var f = c[a]
  1683. 0 < f.GE ? b(null, f.result) : (f.nn || (f.nn = []), f.nn.push(b))
  1684. } else b(null, a)
  1685. }
  1686. a.a.ER = function (d, e) {
  1687. var f = navigator.geolocation
  1688. if (!a.l.ED || 'https:' === document.location.protocol) return d(null, f)
  1689. var h
  1690. e && e.Rza && ((h = 'f' + b++), (c[h] = { GE: 0 }))
  1691. var k = null,
  1692. l = !1
  1693. e &&
  1694. e.timeout &&
  1695. (k = setTimeout(function () {
  1696. k = void 0
  1697. d({ code: 3, info: 'TIME_OUT', message: 'Get geolocation time out.' })
  1698. l = !0
  1699. }, e.timeout))
  1700. f.getCurrentPosition(
  1701. function () {
  1702. l || (clearTimeout(k), (k = void 0), d(null, f))
  1703. },
  1704. function (b) {
  1705. l ||
  1706. (clearTimeout(k),
  1707. (k = void 0),
  1708. 2 === b.code && 0 < b.message.indexOf('permission')
  1709. ? a.tb.load('AMap.GeoRemoteLoc', function () {
  1710. d(null, a.qaa, h)
  1711. })
  1712. : d(null, f))
  1713. },
  1714. { timeout: 1e3 }
  1715. )
  1716. return h
  1717. }
  1718. })(g)
  1719. ;(function (a) {
  1720. var b = a.da.extend({ ka: [a.va], A: function () {} })
  1721. a.Lj = new b()
  1722. })(g)
  1723. ;(function (a) {
  1724. var b = a.da.extend({
  1725. ka: [a.va],
  1726. A: function () {
  1727. this.mga()
  1728. },
  1729. mga: function () {
  1730. a.Lj && a.Lj.h('vecTileParsed.buildings', this.Tfa, this)
  1731. },
  1732. H5: function (a) {
  1733. return a.map.FZ
  1734. },
  1735. Rqa: function (a) {
  1736. return this.H5(a) ? a.map.PN : null
  1737. },
  1738. zxa: function (a, b) {
  1739. if (b) {
  1740. var e = b.map
  1741. e && (e.PN ? e.PN.toString() : '') !== (a ? a.toString() : '') && ((e.PN = a || []), e.set('display', 0))
  1742. }
  1743. },
  1744. W8: function (a, b) {
  1745. if (b) {
  1746. var e = b.map
  1747. e && e.FZ !== a && ((e.FZ = a), e.set('display', 0))
  1748. }
  1749. },
  1750. PBa: function () {},
  1751. BZ: function (a, b) {
  1752. if (a) for (var e = 0, f = a.length; e < f; e++) a[e] && 0 > b.indexOf(a[e]) && b.push(a[e])
  1753. },
  1754. B3: function (b) {
  1755. if (!b) return null
  1756. b = b.map.la
  1757. for (var d = 0, e = b.length; d < e; d++)
  1758. if (a.o.ei && b[d] instanceof a.o.ei && b[d].ga && b[d].ga.length && (-1 !== b[d].ga.indexOf('building') || -1 !== b[d].ga.indexOf('poilabel')) && b[d].Ra) {
  1759. var f = b[d].S.get('tiles', null, !0)
  1760. if (f && f.length) return b[d]
  1761. }
  1762. return null
  1763. },
  1764. oqa: function (a) {
  1765. if ((a = this.B3(a))) {
  1766. if ((a = a.S.get('tiles', null, !0))) a = a[0]
  1767. else return null
  1768. if (!a || !a.length) return null
  1769. for (var b = [], e = 0, f = a.length; e < f; e++) {
  1770. var h = a[e]
  1771. h.pe && h.pe.tf && this.BZ(h.pe.tf, b)
  1772. }
  1773. return b
  1774. }
  1775. },
  1776. Tfa: function (a) {
  1777. if (a.rp && a.rp.pe) {
  1778. var b = a.rp.pe.tf
  1779. if (b) {
  1780. var e = []
  1781. this.BZ(b, e)
  1782. this.q('vecTileParsed.builds.found', { m2: e, rp: a.rp })
  1783. }
  1784. }
  1785. },
  1786. })
  1787. a.Mj = new b()
  1788. })(g)
  1789. ;(function (a) {
  1790. function b() {
  1791. return {
  1792. checkup: function () {
  1793. var a = Array.prototype.slice.call(arguments, 0)
  1794. a.pop()(null, a)
  1795. },
  1796. }
  1797. }
  1798. function c(a) {
  1799. return {
  1800. injectCode: function (b, c) {
  1801. var d = null,
  1802. e = null
  1803. try {
  1804. d = new Function('self', b)(a)
  1805. } catch (f) {
  1806. console.error('error', e), (e = f.toString())
  1807. }
  1808. c(e, d)
  1809. },
  1810. }
  1811. }
  1812. function d(a) {
  1813. function b(c, d) {
  1814. function e(a, b, c) {
  1815. a = { $z: Date.now(), Oz: h, error: a, result: b, Hq: !1, cl: !1 }
  1816. if (c) for (var f in c) c.hasOwnProperty(f) && (a[f] = c[f])
  1817. d(a)
  1818. }
  1819. var f = c.gS,
  1820. h = c.Oz,
  1821. l = c.lQ,
  1822. m = c.BC,
  1823. n = c.hma || [],
  1824. p = a._wkHandlers[f]
  1825. p ? (p[l] ? (m ? p[l].apply(p, n.concat(e)) : e(null, p[l].apply(p, n))) : e('Unknown cmd: ' + l)) : e('Can not find handler for: ' + f)
  1826. }
  1827. var c = [],
  1828. d = null,
  1829. e = null
  1830. for (d in this._wkHandlers) -1 !== d.indexOf('_def_') && (e = this._wkHandlers.YFa = d)
  1831. 'function' === typeof this._wkHandlers[e].A && this._wkHandlers[e].A.call(this._wkHandlers[e])
  1832. a.yu = function (a) {
  1833. c.push.apply(c, a)
  1834. }
  1835. a.addEventListener(
  1836. 'message',
  1837. function (d) {
  1838. function e(b) {
  1839. if (t) {
  1840. t.push(b)
  1841. var d = !!b.Hq
  1842. d || n++
  1843. b = n >= h || b.cl
  1844. if (d || b) {
  1845. d = 1 < t.length ? { Vwa: t } : t[0]
  1846. d.$z = Date.now()
  1847. d.mHa = p
  1848. if (c.length) {
  1849. try {
  1850. a.postMessage(d, c)
  1851. } catch (f) {
  1852. a.postMessage(d), console.error(f)
  1853. }
  1854. c.length = 0
  1855. } else a.postMessage(d)
  1856. t.length = 0
  1857. b && (e = t = null)
  1858. }
  1859. } else console.error('Seemed callback already sent!!', b, b.result.lc)
  1860. }
  1861. var f = d.data
  1862. d = f.Twa || [f]
  1863. for (var h = d.length, n = 0, p = Date.now() - f.$z, t = [], f = 0; f < h; f++) b(d[f], e)
  1864. },
  1865. !1
  1866. )
  1867. }
  1868. function e(d, h) {
  1869. this.w = a.extend({ batchSend: !0, lazy: !1, libPolyfills: null }, h)
  1870. this.Qp = []
  1871. this.WA = this.w.clientId || 'w' + f++
  1872. this.w.onReady && this.lT(this.w.onReady)
  1873. this.mG = this.Wea()
  1874. if ('function' === typeof d) {
  1875. var m = {}
  1876. m[this.mG] = d
  1877. d = m
  1878. }
  1879. d[e.SR] = c
  1880. d[this.JY()] = b
  1881. this.CG = d
  1882. this.PB(null)
  1883. this.w.lazy || this.ky()
  1884. a.Hra || !1 === this.w.hostWorker || (a.Hra = this)
  1885. this.lo && this.lo.A && this.lo.A.call(this.lo)
  1886. }
  1887. var f = 1,
  1888. h = 1
  1889. a.extend(e, {
  1890. SR: '_g_',
  1891. Nxa: function (a) {
  1892. if (!a.cca) {
  1893. var b = []
  1894. a.addEventListener(
  1895. 'message',
  1896. function (a) {
  1897. a = a.data
  1898. a = a.Vwa || [a]
  1899. for (var c = 0, d = a.length; c < d; c++) {
  1900. var e = a[c],
  1901. f
  1902. a: {
  1903. f = e.Oz
  1904. for (var h = !e.cl, k = 0, v = b.length; k < v; k++) {
  1905. var w = b[k]
  1906. if (f === w.Oz) {
  1907. h || b.splice(k, 1)
  1908. f = w
  1909. break a
  1910. }
  1911. }
  1912. f = void 0
  1913. }
  1914. f && f.BC(e.error, e.result, !0)
  1915. }
  1916. },
  1917. !1
  1918. )
  1919. a.Rba = b
  1920. a.cca = !0
  1921. }
  1922. },
  1923. })
  1924. a.extend(e.prototype, {
  1925. Wea: function () {
  1926. return '_def_' + this.WA
  1927. },
  1928. JY: function () {
  1929. return '_cln_' + this.WA
  1930. },
  1931. jka: function () {
  1932. var a = Array.prototype.slice.call(arguments, 0)
  1933. this.z0 = a
  1934. if (this.Qx) {
  1935. for (var b = 0, c = this.Qx.length; b < c; b++) this.Qx[b].apply(null, a)
  1936. this.Qx.length = 0
  1937. }
  1938. },
  1939. yu: function (a) {
  1940. this.aka && this.Qp.push.apply(this.Qp, a)
  1941. },
  1942. lT: function (a) {
  1943. this.z0 ? a.apply(null, this.z0) : (this.Qx || (this.Qx = []), this.Qx.push(a))
  1944. },
  1945. ky: function (b) {
  1946. var c = this
  1947. if (!c.GX) {
  1948. c.GX = !0
  1949. var d = function (d, e) {
  1950. d && a.l.GS && console.warn(d)
  1951. c.jka.call(c, d, e)
  1952. b && b(d, e)
  1953. }
  1954. a.l.GS
  1955. ? this.Xja(function (a, b) {
  1956. b
  1957. ? this.tga(b, function (a, c) {
  1958. a ? d(a) : (this.PB(c), (this.zP = c), (this.Qp.length = 0), (this.lo = null), d(null, { yma: b, bAa: c }))
  1959. })
  1960. : d('Worker start failed!')
  1961. })
  1962. : d('Worker not supported!')
  1963. }
  1964. },
  1965. wf: function (b, c) {
  1966. var d = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : a.a.Rs,
  1967. f = this
  1968. b = b || f.mG
  1969. var h = {}
  1970. if (a.a.jk(c, 'object')) {
  1971. var q = 'return {',
  1972. r
  1973. for (r in c)
  1974. if (c.hasOwnProperty(r))
  1975. var s = c[r],
  1976. q =
  1977. 'function' === typeof s
  1978. ? q + ('\n\t' + r + ': ' + s.toString() + ',')
  1979. : 'object' === typeof s
  1980. ? q + ('\n\t' + r + ': ' + JSON.stringify(s) + ',')
  1981. : q + ('\n\t' + r + ': "' + s + '",')
  1982. c = new Function(q + '\n}')
  1983. }
  1984. f.lX(b, c, h)
  1985. f.PB(null, h)
  1986. f.lT(function (a) {
  1987. a
  1988. ? d(a)
  1989. : f.zP
  1990. ? ((a = f.QY(c, f.BN(f.WA, b), !0)),
  1991. f.zP.sendMessage(e.SR + ':injectCode', a, function (a, b) {
  1992. a || f.PB(f.zP, h)
  1993. d(a, b)
  1994. }))
  1995. : d('Worker msger missing!!')
  1996. })
  1997. },
  1998. BN: function (a, b) {
  1999. if (!a || !b) throw Error('clientId or ns missing!!')
  2000. return a + '_' + b
  2001. },
  2002. tfa: function (a, b, c) {
  2003. function d() {
  2004. var b = Array.prototype.slice.call(arguments, 0)
  2005. c.sendMessage.apply(c, [a].concat(b))
  2006. }
  2007. var e = this
  2008. if (!c)
  2009. return function () {
  2010. var a = b.apply(e.lo, arguments)
  2011. e.GX || ('untilCall' === e.w.lazy && e.ky())
  2012. return a
  2013. }
  2014. d._proxy2Worker = !0
  2015. return d
  2016. },
  2017. Vca: function (a) {
  2018. var b = {},
  2019. c
  2020. for (c in a) a.hasOwnProperty(c) && this.lX(c, a[c], b)
  2021. return b
  2022. },
  2023. lX: function (a, b, c) {
  2024. b = b.call(null, !1)
  2025. for (var d in b) b.hasOwnProperty(d) && ((c[a + ':' + d] = b[d]), a === this.mG && (c[d] = b[d]))
  2026. },
  2027. PB: function (a, b) {
  2028. if (!b) this.lo || (this.lo = this.Vca(this.CG)), (b = this.lo)
  2029. else if (this.lo) for (var c in b) b.hasOwnProperty(c) && (this.lo[c] = b[c])
  2030. for (c in b)
  2031. if (b.hasOwnProperty(c)) {
  2032. var d = b[c]
  2033. 'function' === typeof d && (this[c] = this.tfa(c, d, a))
  2034. }
  2035. this.aka = !!a
  2036. },
  2037. QY: function (a, b) {
  2038. var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1,
  2039. d = a.toString(),
  2040. e,
  2041. d = d.replace(/^function([^\(]*)\(/, function () {
  2042. e = '_prep_h' + h++
  2043. return 'function ' + e + '('
  2044. })
  2045. return e
  2046. ? '\n\t\t\t\t' +
  2047. d +
  2048. "\n\t\t\t\tif (self._wkHandlers['" +
  2049. b +
  2050. "'] && " +
  2051. !c +
  2052. ") {\n\t\t\t\t\tthrow new Error('" +
  2053. b +
  2054. " already exists!')\n\t\t\t\t} else {\n\t\t\t\t\tif (" +
  2055. c +
  2056. " && self._wkHandlers['" +
  2057. b +
  2058. "']) {\n\t\t\t\t\t\tvar handlerFunObj = " +
  2059. e +
  2060. ".call(null, self) || {}\n\n\t\t\t\t\t\tif (typeof Object.assign === 'function') {\n\t\t\t\t\t\t\tObject.assign(self._wkHandlers['" +
  2061. b +
  2062. "'], handlerFunObj)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (var key in handlerFunObj) {\n\t\t\t\t\t\t\t\tif (handlerFunObj.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\t\tself._wkHandlers['" +
  2063. b +
  2064. "'][key] = handlerFunObj[key]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself._wkHandlers['" +
  2065. b +
  2066. "'] = " +
  2067. e +
  2068. '.call(null, self) || {}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t' +
  2069. e +
  2070. ' = null;\n\t\t\t'
  2071. : (console.error('No function match!!'), !1)
  2072. },
  2073. Xja: function (a) {
  2074. var b = this.WA,
  2075. c = [],
  2076. d
  2077. for (d in this.CG)
  2078. if (this.CG.hasOwnProperty(d)) {
  2079. var f = this.QY(this.CG[d], this.BN(b, d))
  2080. f && c.push(f)
  2081. }
  2082. b = this.w.libPolyfills || []
  2083. d = 0
  2084. for (f = b.length; d < f; d++) b[d] = '(' + b[d].toString() + ')(self);'
  2085. var h = b.join(';\n') + ';\n' + c.join(';\n'),
  2086. c = this.w.hostWorker,
  2087. r = this
  2088. c && c !== r
  2089. ? c.lT(function (b, c) {
  2090. b
  2091. ? a.call(r, b)
  2092. : c.bAa.sendMessage(e.SR + ':injectCode', h, function (b) {
  2093. b ? a.call(r, b) : a.call(r, null, c.yma)
  2094. })
  2095. })
  2096. : a.call(r, null, r.nla(h))
  2097. },
  2098. nla: function (b) {
  2099. b = ['self._wkHandlers={};', b, '(' + d.toString() + ')(self)'].join('')
  2100. var c
  2101. try {
  2102. var e = a.a.createObjectURL(b)
  2103. c = new Worker(e)
  2104. setTimeout(function () {
  2105. a.a.revokeObjectURL(e)
  2106. e = null
  2107. }, 5e3)
  2108. } catch (f) {
  2109. return
  2110. }
  2111. return c
  2112. },
  2113. Oda: function (b) {
  2114. var c = 1,
  2115. d = b.Rba,
  2116. e = this,
  2117. f = !!e.w.batchSend
  2118. return function (h) {
  2119. var r = Array.prototype.slice.call(arguments, 1),
  2120. s = 'function' === typeof r[r.length - 1] ? r.pop() : null,
  2121. u = e.WA,
  2122. v = h.split(':'),
  2123. w = e.mG
  2124. 1 < v.length && ((h = v[1]), (w = v[0]))
  2125. r = { $z: a.a.dg(), gS: e.BN(u, w), BC: !!s, Oz: u + '_' + c++, lQ: h, hma: r }
  2126. s && d.push({ lQ: r.lQ, gS: r.gS, $z: r.$z, Oz: r.Oz, BC: s })
  2127. f ? e.xca(b, r) : e.Ox(b, r)
  2128. }
  2129. },
  2130. Ox: function (a, b) {
  2131. if (this.Qp.length) {
  2132. try {
  2133. a.postMessage(b, this.Qp)
  2134. } catch (c) {
  2135. a.postMessage(b), console.error(c)
  2136. }
  2137. this.Qp.length = 0
  2138. } else a.postMessage(b)
  2139. },
  2140. xca: function (b, c) {
  2141. b.vO || (b.vO = [])
  2142. b.vO.push(c)
  2143. if (!b.q0) {
  2144. var d = this
  2145. b.q0 = setTimeout(function () {
  2146. b.q0 = null
  2147. var c = b.vO
  2148. c.length && (d.Ox(b, 1 === c.length ? c[0] : { $z: a.a.dg(), Twa: c }), (c.length = 0))
  2149. }, 0)
  2150. }
  2151. },
  2152. ela: function (a) {
  2153. var b = this
  2154. a.addEventListener(
  2155. 'error',
  2156. function (a) {
  2157. console.error(a)
  2158. b.PB(null)
  2159. },
  2160. !1
  2161. )
  2162. e.Nxa(a)
  2163. },
  2164. tga: function (a, b) {
  2165. var c = this
  2166. c.ela(a)
  2167. var d = this.Oda(a)
  2168. if (e.tda) b.call(c, null, { sendMessage: d })
  2169. else {
  2170. e.tda = !0
  2171. var f = [
  2172. c.JY() + ':checkup',
  2173. Math.random().toFixed(5) + '',
  2174. Math.round(1e3 * Math.random()),
  2175. !1,
  2176. function (a, e) {
  2177. var h = !0
  2178. if (a || !e || e.length !== f.length - 2) h = !1
  2179. else
  2180. for (var k = 0, v = e.length; k < v; k++)
  2181. if (e[k] !== f[k + 1]) {
  2182. h = !1
  2183. break
  2184. }
  2185. h ? b.call(c, null, { sendMessage: d }) : (console.error(a), b.call(c, 'Self checkup failed!!'))
  2186. },
  2187. ]
  2188. d.apply(c, f)
  2189. }
  2190. },
  2191. })
  2192. a.IA = e
  2193. })(g)
  2194. ;(function () {
  2195. if (!g.TL) {
  2196. g.TL = { oba: {}, BD: {} }
  2197. var a = g.TL,
  2198. b = g.TL.oba,
  2199. c = g.a,
  2200. d = g.r
  2201. b.start = function (b) {
  2202. a.BD[b.id] = {
  2203. K: b.K,
  2204. time: { u5: c.dg() },
  2205. Xma: function () {
  2206. return c.dg() - this.time.u5
  2207. },
  2208. }
  2209. }
  2210. b.end = function (b) {
  2211. var d = a.BD[b.id],
  2212. e = d.time,
  2213. d = c.bind(d.Xma, d),
  2214. l = b.index,
  2215. m = b.key
  2216. 'function' !== typeof b.Mc && (b.Mc = function () {})
  2217. if (void 0 === e[m]) void 0 === l ? (e[m] = d()) : ((e[m] = []), (e[m][l] = d()))
  2218. else if (void 0 !== l && void 0 === e[m][l]) e[m][l] = d()
  2219. else return b.Mc(Error('Duplicate Invoke'))
  2220. b.Mc(null)
  2221. }
  2222. b.push = function (b) {
  2223. var c = a.BD[b.id].time,
  2224. d = b.key,
  2225. e = b.Jg
  2226. 'function' !== typeof b.Mc && (b.Mc = function () {})
  2227. if (void 0 === c[d]) c[d] = e
  2228. else return b.Mc(Error('Duplicate Invoke'))
  2229. b.Mc(null)
  2230. }
  2231. b.send = function (b) {
  2232. var c = d.tc + '://webapi.amap.com/count?',
  2233. k = g.extend(e({ K: a.BD[b.id].K }), b.params || {}),
  2234. l = g.a
  2235. b.params && b.params.rs && !b.params.type && ((b = a.BD[b.id].time), delete b.u5, (k = g.extend(k, b)))
  2236. b = []
  2237. for (var m in k) l.isArray(k[m]) ? b.push([m, k[m].join('-')].join('=')) : b.push([m, k[m]].join('='))
  2238. b.push('jl=' + (d.MJ ? 1 : 0))
  2239. if (l.jk(window.performance, 'performance') && l.jk(window.performance.getEntriesByType, 'function')) {
  2240. var n = 0,
  2241. p = ['webapi.amap.com', 'jsapi-test.amap.test', 'localhost'],
  2242. q = ['/maps', '/css']
  2243. l.Tb(window.performance.getEntriesByType('resource'), function (a) {
  2244. var b = void 0,
  2245. c = void 0
  2246. a.name.match(/:\/\/([^:?#/]+)/) && (b = RegExp.$1)
  2247. a.name.match(/[^\/](\/[^/?#:]+)/) && (c = RegExp.$1)
  2248. b && c && l.ka(p, b) && l.ka(q, c) && (n += parseInt(a.responseEnd - a.startTime))
  2249. })
  2250. 0 !== n && b.push('sd=' + n)
  2251. }
  2252. new g.jb.zb(c + b.join('&'))
  2253. }
  2254. var e = function (a) {
  2255. var b = g.l
  2256. a = g.f.S3(a.K)
  2257. return {
  2258. type: 'q',
  2259. resolution: a.width + '*' + a.height,
  2260. k: d.key,
  2261. u: d.Up,
  2262. iw: b.Mf ? 1 : 0,
  2263. cw: b.p2 ? 1 : 0,
  2264. gc: b.TR,
  2265. m: b.ba ? 1 : 0,
  2266. cv: b.Xp ? 1 : 0,
  2267. pf: b.Dz,
  2268. dpr: window.devicePixelRatio,
  2269. screenwidth: screen.width,
  2270. scale: b.yL || 0,
  2271. detect: b.ja ? 1 : 0,
  2272. v: d.ln,
  2273. }
  2274. }
  2275. }
  2276. })()
  2277. ;(function () {
  2278. if (!g.HL) {
  2279. var a = g.a.mD({ r: 'Conf', extend: 'extend', l: 'Browser', xw: 'uncodeCoords' })
  2280. g.HL = function () {
  2281. var b = new g.IA(
  2282. function () {
  2283. return {
  2284. A: function () {
  2285. this.px = { ok: 0, mE: 0 }
  2286. this.Rk = {}
  2287. this.qo = []
  2288. this.Pp = {}
  2289. this.Vj = {}
  2290. this.Rt = 0
  2291. this.d_ = 500
  2292. },
  2293. xh: function (a, b) {
  2294. var e = a.Md,
  2295. f = a.Ie,
  2296. h = 'building' === a.ga[0]
  2297. ;((f && e !== this.px.mE && this.px.mE) || (!f && !h && e !== this.px.ok && this.px.ok)) && this.Lla(!!f)
  2298. f ? (this.px.mE = e) : h || (this.px.ok = e)
  2299. this.qta(a, b)
  2300. },
  2301. Lla: function (a) {
  2302. if (a) this.gX()
  2303. else if (!a && Object.keys(this.Rk).length) for (var b in this.Rk) this.Rk.hasOwnProperty(b) && ((a = this.Rk[b]), a.Mt || a.abort())
  2304. },
  2305. Kya: function () {
  2306. this.Rt > this.d_ && this.bU(Object.keys(this.Vj).slice(0, Math.floor(this.d_ / 2)))
  2307. },
  2308. bU: function (a) {
  2309. for (var b = 0, e = a.length; b < e; b++) delete this.Vj[a[b]]
  2310. this.Rt -= a.length
  2311. },
  2312. NC: function (a) {
  2313. var b = a.ga
  2314. a = a.Ie
  2315. var e = new XMLHttpRequest()
  2316. e.Nq = ''
  2317. e.yE = [new Date().getTime() + '_' + Math.random(), a ? 1 : 0, b.join('|')].join('-')
  2318. return e
  2319. },
  2320. Z4: function (a, b, e) {
  2321. var f = this,
  2322. h = a.Ib,
  2323. k = a.Ie,
  2324. l = [],
  2325. m = h.filter(function (a) {
  2326. var b = f.Vj[a.key]
  2327. if (b) {
  2328. if (b.WZ) return !0
  2329. l.push(a.key)
  2330. }
  2331. return !1
  2332. }),
  2333. n = !1
  2334. if (m.length && ((n = m.length === h.length) || 'function' !== typeof b || b(a, m), !k)) {
  2335. var p = []
  2336. m.forEach(function (a) {
  2337. a = a.key
  2338. p.push.apply(p, f.Vj[a])
  2339. delete f.Vj[a]
  2340. })
  2341. this.Rt -= m.length
  2342. this.Us(this.extend({}, a, { dF: p, Md: a.Md, Cn: n }), e)
  2343. }
  2344. !k && l.length && this.bU(l)
  2345. this.Kya()
  2346. return n
  2347. },
  2348. qta: function (a, b) {
  2349. function e(e, f) {
  2350. var m = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1
  2351. if (p.Rk[q.yE] || p.iga(q)) {
  2352. var n = e.split('|')
  2353. f && (n[0] = f + n[0])
  2354. var t = n,
  2355. x = ''
  2356. n[n.length - 1] && ((x = n[n.length - 1]), (t = n.splice(0, n.length - 1)))
  2357. if (k)
  2358. for (var n = 0, y = t.length; n < y; n++) {
  2359. if (t[n]) {
  2360. var E = JSON.parse(t[n])
  2361. if (E.length) {
  2362. var C = E[0].split('-').slice(0, -1).join('/')
  2363. p.Vj[C] ? p.Vj[C].push(E) : ((p.Vj[C] = [E]), p.Rt++)
  2364. m && (p.Vj[C].WZ = !0)
  2365. }
  2366. }
  2367. }
  2368. else p.Us(p.extend({}, a, { dF: t, Md: h, Cn: m, yS: !0 }), b)
  2369. return x
  2370. }
  2371. r || (p.Ll(l, b), (r = !0))
  2372. }
  2373. var f = this,
  2374. h = a.Md,
  2375. k = a.Ie,
  2376. l = a.Ib,
  2377. m = a.url
  2378. if (
  2379. !this.Z4(
  2380. a,
  2381. function (a, b) {
  2382. var c = a.Ib,
  2383. d = a.url,
  2384. e = d.match(/&t=([^&]+)/)[1].split(';')
  2385. b.reverse().forEach(function (a) {
  2386. a = c.indexOf(a)
  2387. ;-1 !== a && e.splice(a, 1)
  2388. })
  2389. a.url = d.replace(/&t=[^&]+/, '&t=' + e.join(';'))
  2390. },
  2391. b
  2392. )
  2393. ) {
  2394. if (this.bC() && (this.gX(), k)) {
  2395. this.Ll(l, b)
  2396. return
  2397. }
  2398. var n = 0,
  2399. p = this,
  2400. q = this.NC(a)
  2401. k ? this.qo.push(q) : ((this.Rk[q.yE] = q), (q.Ib = l), (q.Mc = b))
  2402. var r = !1
  2403. q.onreadystatechange = function () {
  2404. if (4 === q.readyState && 0 === q.status) q.Mt || ((q.Mt = !0), f.Ll(l, b), (q.onreadystatechange = null), k ? f.E0(q) : delete f.Rk[q.yE]), (q = null)
  2405. else if (!q.Mt)
  2406. if (3 === q.readyState) {
  2407. var h = q.responseText.substring(n)
  2408. q.Nq = e(h, q.Nq)
  2409. n = q.responseText.length
  2410. } else
  2411. 4 === q.readyState && ((h = q.responseText.substring(n)), a.Ci && (h += '|'), e(h, q.Nq, !0), (q.Nq = ''), k ? f.E0(q) : delete f.Rk[q.yE], (q = null))
  2412. }
  2413. q.onerror = function () {}
  2414. q.open('GET', m, !0)
  2415. q.send()
  2416. k &&
  2417. (q.T9 = l.map(function (a) {
  2418. return a.key
  2419. }))
  2420. }
  2421. },
  2422. $D: function (a) {
  2423. function b(d, p, r) {
  2424. var s = [r, d, p].join('/')
  2425. d = e.filter(function (a) {
  2426. return a.key === s
  2427. })[0]
  2428. 18 < k && !n && (s += '/' + k)
  2429. if (d && 'loaded' !== d.status && -1 !== m.indexOf(t))
  2430. if ('limg' === t)
  2431. (p = h[1]),
  2432. (d.qd = p),
  2433. 'string' === typeof p.b && (p.b = w.aB(p.b)),
  2434. (r = ''),
  2435. (r = 'object' === typeof p.u ? p.u.url : p.u) && (p.u = { url: r, Bk: 'limg-' + d.key + '-' + f })
  2436. else {
  2437. p = { Hg: d.ta, Oi: s, Oa: h, Ed: t, iy: a.Du, FD: 'building' === t, Bi: 'poilabel' === t || 'roadlabel' === t || ('building' === t && q) }
  2438. if ('poilabel' === t || 'roadlabel' === t) p.qd = d.qd
  2439. t === m[m.length - 1] && (d.status = 'loaded')
  2440. l.push(p)
  2441. }
  2442. }
  2443. var e = a.Ib,
  2444. f = a.LS,
  2445. h = a.PC,
  2446. k = a.Md,
  2447. l = a.Oc,
  2448. m = a.ga,
  2449. n = a.Mf,
  2450. p = a.WR,
  2451. q = a.Ae,
  2452. r = h[0].split('-'),
  2453. s = parseInt(r[1]),
  2454. u = parseInt(r[2]),
  2455. v = parseInt(r[0]),
  2456. w = this,
  2457. t = r[3],
  2458. r = Math.pow(2, v)
  2459. 10 > v && (s <= p && b(s + r, u, v), s >= r - p && b(s - r, u, v))
  2460. b(s, u, v)
  2461. },
  2462. E0: function (a) {
  2463. for (var b = this.qo.length - 1; 0 <= b; b--) this.qo[b] === a && this.qo.splice(b, 1)
  2464. },
  2465. iga: function (a) {
  2466. for (var b = 0, e = this.qo.length; b < e; b++) if (this.qo[b] === a) return !0
  2467. return !1
  2468. },
  2469. bC: function () {
  2470. return Object.keys(this.Rk).length ? !0 : !1
  2471. },
  2472. gX: function () {
  2473. if (this.qo.length) {
  2474. for (var a = this.qo.length - 1; 0 <= a; a--) {
  2475. var b = this.qo[a]
  2476. b.Mt || b.abort()
  2477. b.T9 && this.bU(b.T9)
  2478. }
  2479. this.qo.length = 0
  2480. }
  2481. },
  2482. Ll: function (a, b) {
  2483. b(null, { Ib: a, P5: !0, disabled: this.disabled }, { cl: !0 })
  2484. },
  2485. }
  2486. },
  2487. { batchSend: !1 }
  2488. )
  2489. b.wf(
  2490. null,
  2491. new Function(
  2492. '\n return {\n ' +
  2493. a.Conf +
  2494. ': ' +
  2495. JSON.stringify(g.r) +
  2496. ',\n ' +
  2497. a.extend +
  2498. ': ' +
  2499. g.extend.toString() +
  2500. ',\n ' +
  2501. a.Browser +
  2502. ': ' +
  2503. JSON.stringify(g.l) +
  2504. ',\n ' +
  2505. a.uncodeCoords +
  2506. ': ' +
  2507. g.a.xw.toString() +
  2508. '\n }'
  2509. )
  2510. )
  2511. return b
  2512. }
  2513. }
  2514. })()
  2515. g.f = {
  2516. CLASS_NAME: 'DomUtil',
  2517. get: function (a) {
  2518. return 'string' === typeof a ? document.getElementById(a) : a
  2519. },
  2520. HD: function (a, b, c) {
  2521. return a.parentNode == b ? !0 : a.parentNode && a.parentNode !== document.body && !g.f.zn(a.parentNode, c) ? g.f.HD(a.parentNode, b) : !1
  2522. },
  2523. Lo: function (a) {
  2524. if (!a) return [0, 0]
  2525. var b = a.offsetWidth,
  2526. c = a.offsetHeight
  2527. ;(b && c) || !a.childNodes[0] || ((b = b || a.childNodes[0].offsetWidth), (c = c || a.childNodes[0].offsetHeight))
  2528. window.opera && ((b = Math.max(b, a.childNodes[0].scrollWidth)), (c = Math.max(c, a.childNodes[0].scrollHeight)))
  2529. return [b, c]
  2530. },
  2531. JFa: function (a, b) {
  2532. var c = document.head || document.getElementsByTagName('head')[0]
  2533. if (c) {
  2534. var d = document.createElement('link')
  2535. d.setAttribute('rel', 'stylesheet')
  2536. d.setAttribute('type', 'text/css')
  2537. d.setAttribute('href', a)
  2538. b ? c.appendChild(d) : c.insertBefore(d, c.firstChild)
  2539. } else document.write("<link rel='stylesheet' href='" + a + "'/>")
  2540. },
  2541. Zc: function (a, b) {
  2542. var c = a.style[b]
  2543. !c && a.currentStyle && (c = a.currentStyle[b])
  2544. ;(c && 'auto' !== c) || !document.defaultView || (c = (c = document.defaultView.getComputedStyle(a, null)) ? c[b] : null)
  2545. ;(c && 'auto' !== c) || 'height' !== b || (c = a.clientHeight + 'px')
  2546. ;(c && 'auto' !== c) || 'width' !== b || (c = a.clientWidth + 'px')
  2547. return 'auto' === c ? null : c
  2548. },
  2549. lJ: function (a) {
  2550. if (a)
  2551. return new g.xd(
  2552. a.clientWidth || document.body.clientWidth,
  2553. a.clientHeight || (g.l.Es ? ('CSS1Compat' === document.compatMode ? document.documentElement.clientHeight : document.body.clientHeight) : document.body.clientHeight),
  2554. !0
  2555. )
  2556. },
  2557. S3: function (a) {
  2558. return new g.xd(a.clientWidth, a.clientHeight)
  2559. },
  2560. RR: function (a) {
  2561. var b = 0,
  2562. c = 0,
  2563. d = a,
  2564. e = document.body,
  2565. f = document.documentElement,
  2566. h,
  2567. k = g.l.sv
  2568. do {
  2569. b += d.offsetTop || 0
  2570. c += d.offsetLeft || 0
  2571. b += parseInt(g.f.Zc(d, 'borderTopWidth'), 10) || 0
  2572. c += parseInt(g.f.Zc(d, 'borderLeftWidth'), 10) || 0
  2573. h = g.f.Zc(d, 'position')
  2574. if (d.offsetParent === e && 'absolute' === h) break
  2575. if ('fixed' === h) {
  2576. b += e.scrollTop || f.scrollTop || 0
  2577. c += e.scrollLeft || f.scrollLeft || 0
  2578. break
  2579. }
  2580. d = d.offsetParent
  2581. } while (d)
  2582. d = a
  2583. do {
  2584. if (d === e) break
  2585. b -= d.scrollTop || 0
  2586. c -= d.scrollLeft || 0
  2587. g.f.Xoa() || (!g.l.B$ && !k) || ((c += d.scrollWidth - d.clientWidth), k && 'hidden' !== g.f.Zc(d, 'overflow-y') && 'hidden' !== g.f.Zc(d, 'overflow') && (c += 17))
  2588. d = d.parentNode
  2589. } while (d)
  2590. return new g.H(c, b)
  2591. },
  2592. Xoa: function () {
  2593. g.f.hea || ((g.f.hea = !0), (g.f.gea = 'ltr' === g.f.Zc(document.body, 'direction')))
  2594. return g.f.gea
  2595. },
  2596. create: function (a, b, c, d) {
  2597. a = document.createElement(a)
  2598. c && (a.className = c)
  2599. b && (d && 'before' === d ? b.insertBefore(a, b.firstChild) : b.appendChild(a))
  2600. return a
  2601. },
  2602. b3: function () {
  2603. document.selection && document.selection.empty && document.selection.empty()
  2604. this.dja || ((this.dja = document.onselectstart), (document.onselectstart = g.a.x3))
  2605. },
  2606. o3: function () {},
  2607. Dya: function (a, b, c) {
  2608. c ? this.Wa(a, b) : this.eb(a, b)
  2609. },
  2610. zn: function (a, b) {
  2611. if (a && b) return 0 < a.className.length && RegExp('(^|\\s)' + b + '(\\s|$)').test(a.className)
  2612. },
  2613. Wa: function (a, b) {
  2614. a && b && (a.classList && a.classList.add ? a.classList.add(b) : g.f.zn(a, b) || (a.className += (a.className ? ' ' : '') + b))
  2615. },
  2616. sxa: function (a, b) {
  2617. a && (a.className = b || '')
  2618. },
  2619. eb: function (a, b) {
  2620. function c(a, c) {
  2621. return c === b ? '' : a
  2622. }
  2623. a && b && (a.classList && a.classList.remove ? a.classList.remove(b) : (a.className = a.className.replace(/(\S+)\s*/g, c).replace(/(^\s+|\s+$)/, '')))
  2624. },
  2625. p4: function (a, b) {
  2626. return 1 === b
  2627. ? ''
  2628. : 'opacity' in a.style
  2629. ? 'opacity:' + b
  2630. : 8 <= document.documentMode
  2631. ? "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=" + Math.ceil(100 * b) + ")'"
  2632. : 'filter:alpha(opacity=' + Math.ceil(100 * b) + ')'
  2633. },
  2634. Xq: function (a, b) {
  2635. if (a.style)
  2636. if ('opacity' in a.style) a.style.opacity = b
  2637. else if ('filter' in a.style) {
  2638. var c = Math.round(100 * b)
  2639. a.style.filter = ''
  2640. 100 !== c && (a.style.filter = ' progid:DXImageTransform.Microsoft.Alpha(opacity=' + c + ')')
  2641. }
  2642. },
  2643. YU: function (a) {
  2644. for (var b = document.documentElement.style, c = 0; c < a.length; c += 1) if (a[c] in b) return a[c]
  2645. return !1
  2646. },
  2647. G4: function (a) {
  2648. var b = g.l.CL
  2649. return 'translate' + (b ? '3d' : '') + '(' + a.x + 'px,' + a.y + 'px' + ((b ? ',0' : '') + ')')
  2650. },
  2651. HEa: function (a, b) {
  2652. return g.f.G4(b.add(b.Nd(-1 * a))) + (' scale(' + a + ') ')
  2653. },
  2654. a9: function (a, b, c) {
  2655. a.aj = b
  2656. !c && g.l.RH
  2657. ? ((b = g.f.G4(b)),
  2658. (c = a.style[g.f.pg].split('rotate')),
  2659. 1 < c.length ? ((c[0] = b), (a.style[g.f.pg] = c.join('rotate'))) : (a.style[g.f.pg] = b),
  2660. g.l.G6 && (a.style.WebkitBackfaceVisibility = 'hidden'))
  2661. : ((a.style.left = b.x + 'px'), (a.style.top = b.y + 'px'))
  2662. },
  2663. Ud: function (a) {
  2664. a.aj || (a.aj = a.style.left ? new g.H(parseInt(a.style.left), parseInt(a.style.top)) : new g.H(0, 0))
  2665. return a.aj
  2666. },
  2667. vHa: function (a, b) {
  2668. a = a instanceof Array ? a : [a]
  2669. for (var c = 0; c < a.length; c += 1) a[c].style.cssText = b
  2670. },
  2671. T8: function (a, b) {
  2672. ';' !== b[b.length - 1] && (b += ';')
  2673. return b.toLowerCase() !== a.style.cssText.replace(/ /g, '').toLowerCase() ? ((a.style.cssText = b), !0) : !1
  2674. },
  2675. $a: function (a, b) {
  2676. a = a instanceof Array ? a : [a]
  2677. for (var c = 0; c < a.length; c += 1) for (var d in b) b.hasOwnProperty(d) && (a[c].style[d] = b[d])
  2678. return this
  2679. },
  2680. Iz: function (a) {
  2681. for (; a.childNodes.length; ) a.removeChild(a.childNodes[0])
  2682. },
  2683. remove: function (a) {
  2684. a && a.parentNode && a.parentNode.removeChild(a)
  2685. },
  2686. rotate: function (a, b, c) {
  2687. var d = g.f.pg
  2688. c = c || { x: a.clientWidth / 2, y: a.clientHeight / 2 }
  2689. d
  2690. ? ((a.style[d] = '' + (' rotate(' + b + 'deg)')), (a.style[g.f.ot[d] + '-origin'] = c.x + 'px ' + c.y + 'px'))
  2691. : ((d = Math.cos((b * Math.PI) / 180)),
  2692. (b = Math.sin((b * Math.PI) / 180)),
  2693. (a.style.filter = 'progid:DXImageTransform.Microsoft.Matrix()'),
  2694. 0 < a.filters.length && ((a = a.filters.item(0)), (a.Dx = -c.x * d + c.y * b + c.x), (a.Dy = -c.x * b - c.y * d + c.y), (a.M11 = a.M22 = d), (a.M12 = -(a.M21 = b))))
  2695. },
  2696. C4: function (a, b, c) {
  2697. var d = g.f.pg
  2698. c = c || { x: a.clientWidth / 2, y: a.clientHeight / 2 }
  2699. return d ? g.f.ot[d] + ':' + ('' + (' rotate(' + b + 'deg)')) + ';' + (g.f.ot[d] + '-origin:' + c.x + 'px ' + c.y + 'px') : ''
  2700. },
  2701. xm: function (a, b, c) {
  2702. a.width = b
  2703. a.height = c
  2704. },
  2705. getElementsByClassName: function (a, b, c) {
  2706. b = b || '*'
  2707. c = c || document
  2708. if (c.getElementsByClassName) return c.getElementsByClassName(a)
  2709. b = c.getElementsByTagName(b)
  2710. a = RegExp('(^|\\s)' + a + '(\\s|$)')
  2711. c = []
  2712. for (var d = 0, e; d < b.length; d++) (e = b[d]), a.test(e.className) && c.push(e)
  2713. return c
  2714. },
  2715. fillText: function (a, b) {
  2716. if (a) return void 0 !== a.textContent ? (a.textContent = b) : void 0 !== a.innerText ? (a.innerText = b) : (a.innerHTML = b), a
  2717. },
  2718. }
  2719. ;(function () {
  2720. var a = g.f.YU(['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']),
  2721. b
  2722. g.extend(g.f, {
  2723. b3: function () {
  2724. g.F.h(window, 'selectstart', g.F.preventDefault)
  2725. if (a) {
  2726. var c = document.documentElement.style
  2727. 'none' !== c[a] && ((b = c[a]), (c[a] = 'none'))
  2728. }
  2729. },
  2730. o3: function () {
  2731. g.F.G(window, 'selectstart', g.F.preventDefault)
  2732. a && 'none' !== b && ((document.documentElement.style[a] = b), (b = 'none'))
  2733. },
  2734. Poa: function () {
  2735. g.F.h(window, 'dragstart', g.F.preventDefault)
  2736. },
  2737. ypa: function () {
  2738. g.F.G(window, 'dragstart', g.F.preventDefault)
  2739. },
  2740. })
  2741. })()
  2742. g.f.pg = g.f.YU(['WebkitTransform', 'OTransform', 'MozTransform', 'msTransform', 'transform'])
  2743. g.f.ot = { transform: 'transform', WebkitTransform: '-webkit-transform', OTransform: '-o-transform', MozTransform: '-moz-transform', msTransform: '-ms-transform' }
  2744. g.f.JF = g.f.YU(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition'])
  2745. g.f.bBa = 'webkitTransition' === g.f.JF || 'OTransition' === g.f.JF ? g.f.JF + 'End' : 'transitionend'
  2746. g.F = {
  2747. h: function (a, b, c, d) {
  2748. function e(b) {
  2749. b = b || window.event
  2750. b.target = b.target || b.srcElement
  2751. return c.call(d || a, b, k)
  2752. }
  2753. var f = g.a.yb(a) + '_' + g.a.yb(c) + '_' + g.a.yb(d || a),
  2754. h = b + f
  2755. if (a[h]) return this
  2756. var k = b
  2757. g.l.bR && 'mousewheel' === b && (b = 'DOMMouseScroll')
  2758. if (g.l.Es && ('mouseover' === b || 'mouseout' === b)) {
  2759. var l = e
  2760. b = 'mouseover' === b ? 'mouseenter' : 'mouseleave'
  2761. e = function (a) {
  2762. l(a)
  2763. }
  2764. }
  2765. if (g.l.P7 && 0 === b.indexOf('touch')) return (a[h] = e), this.Tla(a, b, e, f)
  2766. g.l.Tf && 'dblclick' === b && this.Rla && this.Rla(a, e, f)
  2767. 'addEventListener' in a ? a.addEventListener(b, e, !1) : 'attachEvent' in a ? a.attachEvent('on' + b, e) : (a['on' + b] = e)
  2768. a[h] = e
  2769. return this
  2770. },
  2771. Cj: function (a, b, c, d) {
  2772. var e = this
  2773. this.h(
  2774. a,
  2775. b,
  2776. function h(k) {
  2777. e.G(a, b, h, d)
  2778. return c.call(d || a, k || window.event, b)
  2779. },
  2780. d
  2781. )
  2782. },
  2783. G: function (a, b, c, d) {
  2784. c = g.a.yb(a) + '_' + g.a.yb(c) + '_' + g.a.yb(d || a)
  2785. d = b + c
  2786. var e = a[d]
  2787. g.l.bR && 'mousewheel' === b && (b = 'DOMMouseScroll')
  2788. !g.l.Es || ('mouseover' !== b && 'mouseout' !== b) || (b = 'mouseover' === b ? 'mouseenter' : 'mouseleave')
  2789. g.l.P7 && -1 < b.indexOf('touch')
  2790. ? this.zwa(a, b, c)
  2791. : g.l.Tf && 'dblclick' === b && this.vwa
  2792. ? this.vwa(a, c)
  2793. : 'removeEventListener' in a
  2794. ? a.removeEventListener(b, e, !1)
  2795. : 'detachEvent' in a && -1 === b.indexOf('touch')
  2796. ? e && a.detachEvent('on' + b, e)
  2797. : (a['on' + b] = null)
  2798. a[d] = void 0
  2799. return this
  2800. },
  2801. BHa: function (a, b) {
  2802. var c = document.createEvent('MouseEvents')
  2803. c.initMouseEvent(a, !0, !0, window, 1, b.screenX, b.screenY, b.clientX, b.clientY, !1, !1, !1, !1, 0, null)
  2804. b.target.dispatchEvent(c)
  2805. },
  2806. Yla: function (a) {
  2807. a.$e = 'info'
  2808. g.l.Ue && g.F.stopPropagation(a)
  2809. },
  2810. stopPropagation: function (a) {
  2811. a.stopPropagation ? a.stopPropagation() : (a.cancelBubble = !0)
  2812. return this
  2813. },
  2814. bya: function (a) {
  2815. var b = g.F.Yla
  2816. g.l.Tf && (g.F.h(a, 'touchstart', b, this), g.F.h(a, 'touchmove', b, this), g.F.h(a, 'touchend', b, this))
  2817. g.l.ba || (g.F.h(a, 'mousedown', b, this), g.F.h(a, 'mouseup', b, this), g.F.h(a, 'mousemove', b, this), g.F.h(a, 'mousewheel', b, this))
  2818. g.l.FT && (g.F.h(a, 'pointerdown', b, this), g.F.h(a, 'pointerup', b, this), g.F.h(a, 'pointermove', b, this))
  2819. g.l.I6 && (g.F.h(a, 'MSPointerDown', b, this), g.F.h(a, 'MSPointerUp', b, this), g.F.h(a, 'MSPointerMove', b, this))
  2820. },
  2821. preventDefault: function (a) {
  2822. a.preventDefault ? a.preventDefault() : (a.returnValue = !1)
  2823. return this
  2824. },
  2825. stop: function (a) {
  2826. return g.F.preventDefault(a).stopPropagation(a)
  2827. },
  2828. rxa: function (a) {
  2829. return a && a.getBoundingClientRect ? ((a.rM = a.getBoundingClientRect()), (a.SW = [a.clientLeft, a.clientTop]), !0) : !1
  2830. },
  2831. sza: function (a) {
  2832. a.rM && ((a.rM = null), (a.SW = null))
  2833. },
  2834. Npa: function (a, b) {
  2835. var c = b.rM || b.getBoundingClientRect(),
  2836. d = b.SW || [b.clientLeft, b.clientTop]
  2837. return new g.H(a.clientX - c.left - d[0], a.clientY - c.top - d[1])
  2838. },
  2839. km: function (a, b) {
  2840. if (b && b.getBoundingClientRect) return this.Npa(a, b)
  2841. var c = document.body,
  2842. d = document.documentElement,
  2843. c = new g.H(g.l.Tf ? a.pageX : a.clientX + (c.scrollLeft || d.scrollLeft), g.l.Tf ? a.pageY : a.clientY + (c.scrollTop || d.scrollTop))
  2844. return b ? c.ab(g.f.RR(b)) : c
  2845. },
  2846. M5: function (a) {
  2847. return 1 === a.which || 0 === a.button || 1 === a.button
  2848. },
  2849. }
  2850. g.extend(g.F, {
  2851. uO: [],
  2852. h_: !1,
  2853. Tla: function (a, b, c, d) {
  2854. switch (b) {
  2855. case 'touchstart':
  2856. return this.Wla(a, b, c, d)
  2857. case 'touchend':
  2858. return this.Ula(a, b, c, d)
  2859. case 'touchmove':
  2860. return this.Vla(a, b, c, d)
  2861. }
  2862. },
  2863. No: function (a) {
  2864. if (g.l.FT) return a
  2865. switch (a) {
  2866. case 'pointerdown':
  2867. return 'MSPointerDown'
  2868. case 'pointerup':
  2869. return 'MSPointerUp'
  2870. case 'pointercancel':
  2871. return 'MSPointerCancel'
  2872. case 'pointermove':
  2873. return 'MSPointerMove'
  2874. }
  2875. },
  2876. Wla: function (a, b, c, d) {
  2877. function e(a) {
  2878. for (var b = !1, d = 0; d < f.length; d += 1)
  2879. if (f[d].pointerId === a.pointerId) {
  2880. b = !0
  2881. break
  2882. }
  2883. b || f.push(a)
  2884. a.touches = f.slice()
  2885. a.changedTouches = [a]
  2886. c(a)
  2887. }
  2888. var f = this.uO
  2889. a['_amap_touchstart' + d] = e
  2890. a.addEventListener(this.No('pointerdown'), e, !1)
  2891. this.h_ ||
  2892. ((a = function (a) {
  2893. for (var b = 0; b < f.length; b += 1)
  2894. if (f[b].pointerId === a.pointerId) {
  2895. f.splice(b, 1)
  2896. break
  2897. }
  2898. }),
  2899. document.documentElement.addEventListener(this.No('pointerup'), a, !1),
  2900. document.documentElement.addEventListener(this.No('pointercancel'), a, !1),
  2901. (this.h_ = !0))
  2902. return this
  2903. },
  2904. Vla: function (a, b, c, d) {
  2905. function e(a) {
  2906. if (a.pointerType !== a.MSPOINTER_TYPE_MOUSE || 0 !== a.buttons) {
  2907. for (var b = 0; b < f.length; b += 1)
  2908. if (f[b].pointerId === a.pointerId) {
  2909. f[b] = a
  2910. break
  2911. }
  2912. a.touches = f.slice()
  2913. a.changedTouches = [a]
  2914. c(a)
  2915. }
  2916. }
  2917. var f = this.uO
  2918. a['_amap_touchmove' + d] = e
  2919. a.addEventListener(this.No('pointermove'), e, !1)
  2920. return this
  2921. },
  2922. Ula: function (a, b, c, d) {
  2923. function e(a) {
  2924. for (var b = 0; b < f.length; b += 1)
  2925. if (f[b].pointerId === a.pointerId) {
  2926. f.splice(b, 1)
  2927. break
  2928. }
  2929. a.touches = f.slice()
  2930. a.changedTouches = [a]
  2931. c(a)
  2932. }
  2933. var f = this.uO
  2934. a['_amap_touchend' + d] = e
  2935. a.addEventListener(this.No('pointerup'), e, !1)
  2936. a.addEventListener(this.No('pointercancel'), e, !1)
  2937. return this
  2938. },
  2939. zwa: function (a, b, c) {
  2940. c = a['_amap_' + b + c]
  2941. switch (b) {
  2942. case 'touchstart':
  2943. a.removeEventListener(this.No('pointerdown'), c, !1)
  2944. break
  2945. case 'touchmove':
  2946. a.removeEventListener(this.No('pointermove'), c, !1)
  2947. break
  2948. case 'touchend':
  2949. a.removeEventListener(this.No('pointerup'), c, !1), a.removeEventListener(this.No('pointercancel'), c, !1)
  2950. }
  2951. return this
  2952. },
  2953. })
  2954. ;(function () {
  2955. function a(a) {
  2956. var b = a.target || a.srcElement
  2957. b.cX && f(b.cX)
  2958. b.cX = e(function () {
  2959. var c = b.Bp
  2960. if (c && c.Ap) for (var d = 0; d < c.Ap.length; d += 1) c.Ap[d].call(c, a)
  2961. })
  2962. }
  2963. function b() {
  2964. var b = this.contentDocument.defaultView
  2965. b.Bp = this.aca
  2966. b.addEventListener('resize', a)
  2967. a.call(b, { target: b })
  2968. }
  2969. var c = document.attachEvent,
  2970. d = navigator.userAgent.match(/(Trident|Edge)/),
  2971. e = g.a.Wc,
  2972. f = g.a.ri
  2973. g.extend(g.F, {
  2974. Xla: function (e, f) {
  2975. if (!e.Ap)
  2976. if (((e.Ap = []), c)) (e.Bp = e), e.attachEvent('onresize', a)
  2977. else {
  2978. 'static' === window.getComputedStyle(e).position && (e.style.position = 'relative')
  2979. var l = (e.Bp = document.createElement('object'))
  2980. l.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;')
  2981. l.aca = e
  2982. l.onload = b
  2983. l.type = 'text/html'
  2984. d && e.appendChild(l)
  2985. l.data = 'about:blank'
  2986. d || e.appendChild(l)
  2987. }
  2988. e.Ap.push(f)
  2989. },
  2990. RGa: function (b, d) {
  2991. b.Ap.splice(b.Ap.indexOf(d), 1)
  2992. b.Ap.length || (c ? b.detachEvent('onresize', a) : (b.Bp.contentDocument.defaultView.removeEventListener('resize', a), (b.Bp = !b.removeChild(b.Bp))))
  2993. },
  2994. Cna: function (a) {
  2995. a.Ap = null
  2996. if (a.Bp) {
  2997. var b = a.Bp
  2998. b.parentNode === a && b.parentNode.removeChild(b)
  2999. a.Bp = null
  3000. }
  3001. },
  3002. })
  3003. })()
  3004. g.tb = {
  3005. kua: g.r.Gb + '/maps',
  3006. Ru: g.da.Ru,
  3007. XS: 0,
  3008. Cz: [],
  3009. Mu: {},
  3010. Fg: function (a, b) {
  3011. function c() {
  3012. d += 1
  3013. d === e.length && b && b()
  3014. }
  3015. a.length || b()
  3016. for (var d = 0, e = [], f = 0; f < a.length; f += 1) {
  3017. var h = this.Ru[a[f]]
  3018. if (h) for (var k = 0; k < h.length; k += 1) e.push(h[k])
  3019. e.push(a[f])
  3020. }
  3021. for (f = 0; f < e.length; f += 1) this.YQ(e[f], c)
  3022. },
  3023. ID: function (a) {
  3024. for (var b = 0; b < a.length; b += 1) if (1 !== this.QC(a[b]).status) return !1
  3025. return !0
  3026. },
  3027. YQ: function (a, b) {
  3028. var c = this.QC(a)
  3029. if (1 === c.status) b && b()
  3030. else {
  3031. b && c.ly.push(b)
  3032. try {
  3033. if (g.l.Gv && window.localStorage) {
  3034. var d = window.localStorage['_AMap_' + a]
  3035. d && ((d = JSON.parse(d)), d.version === g.r.Dk ? (window._jsload_(a, d.script, !0), d.css && window._cssload_(a, d.css, !0)) : window.localStorage.removeItem('_AMap_' + a))
  3036. }
  3037. } catch (e) {}
  3038. if (0 === c.status) {
  3039. this.cwa(a)
  3040. var f = this
  3041. f.XS ||
  3042. ((f.XS = 1),
  3043. window.setTimeout(function () {
  3044. f.XS = 0
  3045. var a = f.kua + '/modules?v=' + g.r.ln + '&key=' + g.r.key + '&m=' + f.Cz.join(',') + '&vrs=' + g.r.Dk
  3046. g.tb.Pt(f.Cz.join(','))
  3047. f.Cz = []
  3048. c.TK = f.Bta(a)
  3049. }, 1))
  3050. c.status = -1
  3051. }
  3052. }
  3053. },
  3054. Pt: function (a) {
  3055. a = g.r.Zd + '/v3/log/init?' + ['s=rsv3&product=JsModule&key=' + g.r.key, 'm=' + a].join('&')
  3056. new g.jb.zb(a, { callback: 'callback' })
  3057. },
  3058. load: function (a, b) {
  3059. var c = this.Ru[a]
  3060. if (c) {
  3061. for (var d = [], e = 0; e < c.length; e += 1) d.push(c[e])
  3062. d.push(a)
  3063. for (
  3064. var f = 0,
  3065. c = function () {
  3066. f += 1
  3067. f === d.length && b && b()
  3068. },
  3069. e = 0;
  3070. e < d.length;
  3071. e += 1
  3072. )
  3073. this.YQ(d[e], c)
  3074. } else this.YQ(a, b)
  3075. },
  3076. cwa: function (a) {
  3077. for (var b = 0; b < this.Cz.length; b += 1) if (this.Cz[b] === a) return
  3078. this.Cz.push(a)
  3079. },
  3080. Nn: function (a, b) {
  3081. var c = this.QC(a)
  3082. try {
  3083. eval(b)
  3084. } catch (d) {
  3085. return
  3086. }
  3087. c.status = 1
  3088. for (var e = 0, f = c.ly.length; e < f; e += 1) c.ly[e]()
  3089. c.ly = []
  3090. },
  3091. pd: function (a, b) {
  3092. var c = this
  3093. c.timeout = setTimeout(function () {
  3094. 1 !== c.Mu[a].status ? (c.remove(a), c.load(a, b)) : clearTimeout(c.timeout)
  3095. }, 5e3)
  3096. },
  3097. QC: function (a) {
  3098. this.Mu[a] || ((this.Mu[a] = {}), (this.Mu[a].status = 0), (this.Mu[a].ly = []))
  3099. return this.Mu[a]
  3100. },
  3101. remove: function (a) {
  3102. this.Mu[a] = null
  3103. },
  3104. Bta: function (a) {
  3105. g.r.mode && (a += '&mode=' + g.r.mode)
  3106. var b = document.createElement('script')
  3107. b.charset = 'utf-8'
  3108. a && 0 === a.indexOf(g.r.Gb) && (b.crossOrigin = 'Anonymous')
  3109. b.src = a
  3110. document.body.appendChild(b)
  3111. return b
  3112. },
  3113. }
  3114. window._jsload_ = function (a, b, c) {
  3115. var d = g.tb.QC(a)
  3116. d.TK && 0 <= g.a.indexOf(document.body.childNodes, d.TK) && document.body.removeChild(d.TK)
  3117. d.TK = null
  3118. try {
  3119. if (!c && window.localStorage && b && '' !== b && g.l.Gv) {
  3120. var e = window.localStorage['_AMap_' + a],
  3121. e = e || '{}',
  3122. e = JSON.parse(e)
  3123. e.version !== g.r.Dk || e.script
  3124. ? window.localStorage.setItem('_AMap_' + a, JSON.stringify({ version: g.r.Dk, script: b }))
  3125. : window.localStorage.setItem('_AMap_' + a, JSON.stringify({ version: g.r.Dk, script: b, css: e.css }))
  3126. }
  3127. } catch (f) {}
  3128. g.tb.Nn(a, b)
  3129. }
  3130. window._cssload_ = function (a, b, c) {
  3131. try {
  3132. !c && window.localStorage && b && '' !== b && g.l.Gv && window.localStorage.setItem('_AMap_' + a, JSON.stringify({ css: b, version: g.r.Dk }))
  3133. } catch (d) {}
  3134. var e = document.createElement('style')
  3135. e.type = 'text/css'
  3136. ;-1 === g.r.Gb.indexOf('webapi.amap.com') && (b = b.replace(/webapi.amap.com/gi, g.r.Gb.split('://')[1]))
  3137. 'https' === g.r.tc && (b = b.replace(/http:/gi, 'https:'))
  3138. e.styleSheet
  3139. ? ((a = function () {
  3140. try {
  3141. e.styleSheet.cssText = b
  3142. } catch (a) {}
  3143. }),
  3144. e.styleSheet.disabled ? setTimeout(a, 10) : a())
  3145. : e.appendChild(document.createTextNode(b))
  3146. a = document.head || document.getElementsByTagName('head')[0]
  3147. 2 > a.childNodes.length ? a.appendChild(e) : a.insertBefore(e, a.childNodes[1])
  3148. }
  3149. ;(function (a) {
  3150. var b = g.l
  3151. if (!g.indexedDB && b.Ni) {
  3152. var c = a.indexedDB || a.webkitIndexedDB || a.msIndexedDB || a.mozIndexedDB,
  3153. d = a.IDBKeyRange || a.oIa || a.WFa || a.VFa
  3154. if (c) {
  3155. var e = g.a,
  3156. f = null
  3157. a = 'amap-jsapi' + (a.CAa ? '-debug' : '')
  3158. var h = g.extend({}, g.va),
  3159. k
  3160. try {
  3161. ;(k = c.open(a)),
  3162. (k.onsuccess = function () {
  3163. f = this.result
  3164. h.q('dbReady', { status: 'success' })
  3165. }),
  3166. (k.onerror = function () {
  3167. h.q('dbReady', { status: 'error' })
  3168. }),
  3169. (k.onblocked = function () {
  3170. h.q('dbReady', { status: 'blocked' })
  3171. }),
  3172. (k.onupgradeneeded = function (a) {
  3173. a.currentTarget.result.createObjectStore('tile', { keyPath: 'tileKey' })
  3174. })
  3175. } catch (l) {
  3176. b.Ni = !1
  3177. } finally {
  3178. if (!b.Ni) return
  3179. }
  3180. var b = function (a) {
  3181. return function () {
  3182. try {
  3183. return a.apply(this, arguments)
  3184. } catch (b) {
  3185. var c = arguments[arguments.length - 1]
  3186. 'function' === typeof c &&
  3187. setTimeout(function () {
  3188. c({ code: 4, HI: b })
  3189. }, 1)
  3190. }
  3191. }
  3192. },
  3193. m = b(function (a, b) {
  3194. return null === f
  3195. ? (setTimeout(function () {
  3196. b && b({ code: 3 })
  3197. }, 1),
  3198. null)
  3199. : f.transaction('tile', a).objectStore('tile')
  3200. })
  3201. g.indexedDB = {
  3202. kC: function (a, b) {
  3203. f
  3204. ? 'function' === typeof a && a()
  3205. : h.h('dbReady', function (c) {
  3206. 'success' === c.status ? 'function' === typeof a && a() : 'function' === typeof b && b({ code: 3, status: status })
  3207. })
  3208. },
  3209. count: b(function (a) {
  3210. var b = this,
  3211. c = arguments
  3212. this.kC(function () {
  3213. b.Pt.apply(b, c)
  3214. }, a)
  3215. }),
  3216. Pt: b(function (a) {
  3217. var b = m('readonly', a).count()
  3218. b.onsuccess = function () {
  3219. a(null, b.result)
  3220. }
  3221. b.onerror = function () {
  3222. a({ code: 7 })
  3223. }
  3224. }),
  3225. get: b(function (a, b, c) {
  3226. var d = this,
  3227. e = setTimeout(function () {
  3228. e && ((e = null), c && c({ code: 7 }))
  3229. }, b.timeout || 1e3)
  3230. this.kC(function () {
  3231. d.Jea.call(d, a, function (a, b) {
  3232. e && (clearTimeout(e), (e = null), c(a, b))
  3233. })
  3234. }, c)
  3235. }),
  3236. Jea: b(function (a, b) {
  3237. var c = m('readonly', b)
  3238. if (e.isArray(a)) {
  3239. var d, f
  3240. ;(function () {
  3241. function e(b) {
  3242. var f = c.get(a[b])
  3243. f.onsuccess = function (a) {
  3244. a.target.result && (d[b] = a.target.result)
  3245. h()
  3246. }
  3247. f.onerror = h
  3248. }
  3249. function h() {
  3250. f++
  3251. f === a.length && b(null, d)
  3252. }
  3253. d = []
  3254. for (var k = (f = 0), l = a.length; k < l; k++) e(k)
  3255. })()
  3256. } else {
  3257. var h = c.get(a)
  3258. h.onsuccess = function (a) {
  3259. b && b(null, a.target.result)
  3260. }
  3261. h.onerror = function () {
  3262. b && b({ code: 1 })
  3263. }
  3264. }
  3265. }),
  3266. add: b(function (a, b) {
  3267. var c = this,
  3268. d = arguments
  3269. this.kC(function () {
  3270. c.eca.apply(c, d)
  3271. }, b)
  3272. }),
  3273. eca: b(function (a, b) {
  3274. function c() {
  3275. 0 === --f && b(null)
  3276. }
  3277. e.isArray(a) || (a = [a])
  3278. var d = a.length,
  3279. f = d,
  3280. h = 0,
  3281. k = Math.ceil(d / 5),
  3282. l = setInterval(function () {
  3283. if (h++ < k) {
  3284. var e = 5 * h
  3285. e > d && (e = d)
  3286. for (var f = m('readwrite', b), s = 5 * (h - 1); s < e; s++) {
  3287. var E = f.put(a[s])
  3288. E.onsuccess = E.onerror = c
  3289. }
  3290. } else clearInterval(l)
  3291. }, 32)
  3292. }),
  3293. remove: b(function (a, b) {
  3294. var c = this,
  3295. d = arguments
  3296. this.kC(function () {
  3297. c.qka.apply(c, d)
  3298. }, b)
  3299. }),
  3300. qka: b(function (a, b) {
  3301. var c = m('readwrite', b)
  3302. e.isArray(a) || (a = [a])
  3303. a = a.sort()
  3304. c.openCursor(d.bound(a[0], a[a.length - 1])).onsuccess = function (c) {
  3305. if ((c = c.target.result)) {
  3306. if (e.ka(c.value.tileKey, a)) c['delete']()
  3307. for (var d = -1, f = 0, h = a.length; f < h; f++)
  3308. if (a[f] > c.value.tileKey) {
  3309. d = f
  3310. break
  3311. }
  3312. c['continue'](a[d])
  3313. } else b && b(null)
  3314. }
  3315. }),
  3316. clear: b(function (a) {
  3317. var b = this,
  3318. c = arguments
  3319. this.kC(function () {
  3320. b.bG.apply(b, c)
  3321. }, a)
  3322. }),
  3323. bG: b(function (a) {
  3324. var b = m('readwrite', a).clear()
  3325. b.onsuccess = function () {
  3326. a && a(null)
  3327. }
  3328. b.onerror = function () {
  3329. a && a({ code: 2 })
  3330. }
  3331. }),
  3332. }
  3333. } else b.Ni = !1
  3334. }
  3335. })(window)
  3336. ;(function () {
  3337. function a(a) {
  3338. u.data.keys = u.data.keys
  3339. .filter(function (b) {
  3340. return !r.ka(a, b)
  3341. })
  3342. .concat(a)
  3343. }
  3344. function b(a) {
  3345. var b = g.r.Dk + '|' + a.Oi.replace(/\//g, ',') + '|' + (a.Mf ? 'w' : 'v') + '|',
  3346. c
  3347. c = a.ja
  3348. var d = a.Ae
  3349. c = [c ? 1 : 0, q.ba ? 1 : 0, d ? 1 : 0].join()
  3350. return b + c + '|' + m(a.url)
  3351. }
  3352. function c() {
  3353. u.data.keys.length >= u.VL && d()
  3354. }
  3355. function d() {
  3356. var a = u.data.keys.length,
  3357. b = Math.floor(a / 2)
  3358. a > u.VL && (b = Math.floor(a - u.VL / 2))
  3359. a = u.data.keys.slice(0, b)
  3360. u.data.keys = u.data.keys.slice(b + 1)
  3361. s.remove(a, function (a) {
  3362. a && 3 === a.code && (q.Ni = !1)
  3363. })
  3364. }
  3365. function e() {
  3366. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : r.Rs
  3367. k()
  3368. w.setItem(u.key, u.data, !0)
  3369. f(a)
  3370. }
  3371. function f(a) {
  3372. q.Ni &&
  3373. s &&
  3374. s.clear(function (b) {
  3375. b && 3 === b.code && (q.Ni = !1)
  3376. a()
  3377. })
  3378. }
  3379. function h() {
  3380. k()
  3381. var a = w.getItem(u.key, !0)
  3382. a && (a.vdataVer === u.data.vdataVer && a.apiVer === u.data.apiVer ? (u.data = a) : e())
  3383. }
  3384. function k() {
  3385. u.data = { vdataVer: q.lf, apiVer: g.r.Dk, keys: [], config: {}, fsTiles: {} }
  3386. u.pt = {}
  3387. }
  3388. function l(a) {
  3389. a && ((u.data.vdataVer = a), (q.lf = a))
  3390. }
  3391. function m(a) {
  3392. var b = 'limg'
  3393. ;/flds=([^&]+)/.test(a) && (b = RegExp.$1)
  3394. return b
  3395. }
  3396. function n(a) {
  3397. if ('object' === typeof a && null !== a) {
  3398. var b = []
  3399. if (r.isArray(a))
  3400. if (Object.keys(a).length == a.length)
  3401. b = a.map(function (a) {
  3402. return n(a)
  3403. })
  3404. else {
  3405. b.push('__arrayObject')
  3406. var c = {},
  3407. d
  3408. for (d in a) (0 > parseInt(d) || isNaN(parseInt(d))) && a.hasOwnProperty(d) && (c[d] = n(a[d]))
  3409. b.push(c)
  3410. b.push(
  3411. a.map(function (a) {
  3412. return n(a)
  3413. })
  3414. )
  3415. }
  3416. else if (r.jk(a, 'Float32Array')) b.push('__Float32Array'), b.push(Array.prototype.slice.call(a))
  3417. else if (r.jk(a, 'Uint16Array')) b.push('__Uint16Array'), b.push(Array.prototype.slice.call(a))
  3418. else for (d in ((b = {}), a)) a.hasOwnProperty(d) && (b[d] = n(a[d]))
  3419. return b
  3420. }
  3421. return a
  3422. }
  3423. function p(a) {
  3424. if ('object' === typeof a && null !== a) {
  3425. var b = {}
  3426. if (r.isArray(a))
  3427. if ('__Float32Array' === a[0]) b = new Float32Array(a[1])
  3428. else if ('__Uint16Array' === a[0]) b = new Uint16Array(a[1])
  3429. else if ('__arrayObject' === a[0]) {
  3430. b = p(a[2])
  3431. a = a[1]
  3432. for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c])
  3433. } else
  3434. b = a.map(function (a) {
  3435. return p(a)
  3436. })
  3437. else for (c in a) a.hasOwnProperty(c) && (b[c] = p(a[c]))
  3438. return b
  3439. }
  3440. return a
  3441. }
  3442. var q = g.l,
  3443. r = g.a
  3444. if (!g.Nj && q.Ni) {
  3445. var s = g.indexedDB,
  3446. u = { VL: 1e3, key: '_AMap_data.tileKeys' },
  3447. v = [],
  3448. w = {
  3449. getItem: function (a, b) {
  3450. var c = localStorage.getItem(a)
  3451. if (c && b) {
  3452. var d
  3453. try {
  3454. d = JSON.parse(c)
  3455. } catch (e) {
  3456. d = null
  3457. }
  3458. c = d
  3459. }
  3460. return c
  3461. },
  3462. setItem: function (a, b, c) {
  3463. var d = b
  3464. c && ((d = JSON.stringify(b)), 1.5 < d.length / 1024 / 1024 && Object.keys(b.gqa).length && ((b.gqa = {}), (d = JSON.stringify(b))))
  3465. try {
  3466. localStorage.setItem(a, d)
  3467. } catch (f) {
  3468. e()
  3469. }
  3470. },
  3471. }
  3472. g.Nj = {
  3473. clear: e,
  3474. get: function (c, d) {
  3475. function f(a) {
  3476. var b = { iS: l, F6: G, SFa: w, Tg: u.data.config }
  3477. a &&
  3478. B.length &&
  3479. (/\|limg/.test(B[0])
  3480. ? (b.l6 = a
  3481. .map(function (a) {
  3482. return JSON.parse(a.data)
  3483. })
  3484. .filter(function (a) {
  3485. return a && a.key
  3486. }))
  3487. : (b.Oc = h(a)))
  3488. d && d(null, b)
  3489. w.length && ((l = []), (G = []))
  3490. }
  3491. function h(a) {
  3492. var b = []
  3493. m(c.url)
  3494. .split(',')
  3495. .forEach(function (c) {
  3496. a.forEach(function (a) {
  3497. if ((a = JSON.parse(a.data[c]))) {
  3498. var d = a.Hg
  3499. a.Hg = new g.pr(d.z, d.x, d.y)
  3500. a.Hg.T = d.T
  3501. b.push(a)
  3502. }
  3503. })
  3504. })
  3505. return b
  3506. }
  3507. var k = 'FS' === c.type
  3508. if (!q.Gv || !(k || (q.Ni && 0 !== u.data.keys.length))) return d({ code: 1 })
  3509. var l = [],
  3510. w = [],
  3511. B = [],
  3512. G = [],
  3513. H = []
  3514. c.vya.forEach(function (a) {
  3515. var d = !1,
  3516. e = b({ Oi: a.key, url: c.url, Mf: c.Mf, ja: c.o.ja, Ae: c.Ae })
  3517. k && (v.push(e), u.data.fsTiles[e] && (l.push(a), B.push(e), H.push({ data: p(u.data.fsTiles[e]), tileKey: e }), (d = !0)))
  3518. d || (q.Ni && r.ka(u.data.keys, e) ? (B.push(e), w.push(a)) : G.push(a))
  3519. })
  3520. if ((k && 0 === w.length) || 0 === B.length) return f(H)
  3521. k &&
  3522. H.length &&
  3523. H.forEach(function (a) {
  3524. a = r.indexOf(B, a.tileKey)
  3525. B.splice(a, 1)
  3526. })
  3527. s.get(B, { timeout: c.timeout || 1e3 }, function (b, c) {
  3528. if (b || c.length !== B.length) b && 3 === b.code ? (q.Ni = !1) : e(), (G = w), (w = []), f(null)
  3529. else {
  3530. if (k)
  3531. for (var d = c.length - 1; 0 <= d; d--) {
  3532. var h = c[d]
  3533. h && h.data ? (u.data.fsTiles[h.tileKey] = n(h.data)) : G.push(w.splice(d, 1)[0])
  3534. }
  3535. l = w
  3536. w = []
  3537. f(c)
  3538. a(B)
  3539. }
  3540. })
  3541. ;(G.length || w.length) && f(H)
  3542. },
  3543. yw: function (a) {
  3544. a.Ib.forEach(function (c) {
  3545. c = b({ Oi: c.key, url: a.url, Mf: a.Mf, ja: a.o.ja, Ae: a.Ae })
  3546. u.pt[c] && delete u.pt[c]
  3547. })
  3548. },
  3549. set: function (a, c) {
  3550. a.lf && a.lf !== u.data.vdataVer && (l(a.lf), e(), c && c({ code: 2 }))
  3551. !a.qd && a.Oc
  3552. ? a.Oc.forEach(function (c) {
  3553. var d = b({ Oi: c.Oi, url: a.url, Mf: a.Mf, ja: a.o.ja, Ae: a.Ae })
  3554. if (q.Ni || r.ka(v, d)) {
  3555. var e = u.pt[d] || {}
  3556. e[c.Ed] = c.Oa
  3557. u.pt[d] = e
  3558. }
  3559. })
  3560. : a.data &&
  3561. a.data.forEach(function (c) {
  3562. var d = b({ Oi: c.key, url: a.url, Mf: a.Mf, ja: a.o.ja, Ae: a.Ae })
  3563. if (q.Ni || r.ka(v, d)) u.pt[d] = c.data
  3564. })
  3565. u.data.config = { 'x-vd-v': a['x-vd-v'], tv: a.tv, bgc: a.bgc }
  3566. },
  3567. flush: (function () {
  3568. var a = !0
  3569. return function () {
  3570. var b = this
  3571. if (a) {
  3572. if (Object.keys(u.data.fsTiles).length) for (var c in u.data.fsTiles) u.data.fsTiles.hasOwnProperty(c) && !r.ka(v, c) && delete u.data.fsTiles[c]
  3573. q.Ni
  3574. ? s.count(function (a, c) {
  3575. a ||
  3576. (c !== u.data.keys.length
  3577. ? (u.data.keys.length && (u.data.keys = []),
  3578. f(function () {
  3579. b.rG(!0)
  3580. }))
  3581. : b.rG(!0))
  3582. })
  3583. : b.rG(!0)
  3584. a = !1
  3585. } else b.rG()
  3586. }
  3587. })(),
  3588. rG: function () {
  3589. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !1,
  3590. b = {},
  3591. d = [],
  3592. f = Object.keys(u.pt),
  3593. h = []
  3594. f.length
  3595. ? (f.forEach(function (a) {
  3596. var c = u.pt[a]
  3597. a
  3598. .split('|')
  3599. .pop()
  3600. .split(',')
  3601. .every(function (a) {
  3602. return 'limg' === a ? !0 : c && void 0 !== c[a]
  3603. })
  3604. ? (r.ka(u.data.keys, a) || (h.push(a), d.push({ tileKey: a, data: c })), r.ka(v, a) && void 0 === u.data.fsTiles[a] && (u.data.fsTiles[a] = c))
  3605. : (b[a] = c)
  3606. }),
  3607. d.length &&
  3608. (q.Ni
  3609. ? s.add(d, function (a) {
  3610. a ? (3 !== a.code ? e() : (q.Ni = !1)) : ((u.data.keys = u.data.keys.concat(h)), w.setItem(u.key, u.data, !0), c())
  3611. })
  3612. : w.setItem(u.key, u.data, !0)),
  3613. (u.pt = b))
  3614. : (a && w.setItem(u.key, u.data, !0), c())
  3615. },
  3616. }
  3617. h()
  3618. }
  3619. })()
  3620. g.U = g.da.extend({
  3621. A: function (a, b, c) {
  3622. var d = parseFloat(b),
  3623. e = parseFloat(a)
  3624. if (isNaN(a) || isNaN(b)) throw 'Invalid Object: LngLat(' + e + ', ' + d + ')'
  3625. !0 !== c && ((d = Math.max(Math.min(d, 90), -90)), (e = ((e + 180) % 360) + (-180 > e || 180 === e ? 180 : -180)))
  3626. this.Q = d
  3627. this.R = e
  3628. this.lng = Math.round(1e6 * e) / 1e6
  3629. this.lat = Math.round(1e6 * d) / 1e6
  3630. },
  3631. AR: function () {
  3632. return g.a.wb(this.R, 6)
  3633. },
  3634. xR: function () {
  3635. return g.a.wb(this.Q, 6)
  3636. },
  3637. add: function (a, b) {
  3638. return new g.U(this.R + a.R, this.Q + a.Q, b)
  3639. },
  3640. ab: function (a, b) {
  3641. return new g.U(this.R - a.R, this.Q - a.Q, b)
  3642. },
  3643. ld: function (a, b) {
  3644. return new g.U(this.R / a, this.Q / a, b)
  3645. },
  3646. Nd: function (a, b) {
  3647. return new g.U(this.R * a, this.Q * a, b)
  3648. },
  3649. Ge: function (a) {
  3650. return g.Ft.distance(this, a)
  3651. },
  3652. offset: function (a, b) {
  3653. if (isNaN(a) || isNaN(b)) return !1
  3654. var c = 2 * Math.asin(Math.sin(Math.round(a) / 12756274) / Math.cos((this.Q * Math.PI) / 180)),
  3655. c = this.R + (180 * c) / Math.PI,
  3656. d = 2 * Math.asin(Math.round(b) / 12756274)
  3657. return new g.U(c, this.Q + (180 * d) / Math.PI)
  3658. },
  3659. gb: function (a) {
  3660. a = g.a.Ka(a)
  3661. return a instanceof g.U ? 1e-9 >= Math.max(Math.abs(this.Q - a.Q), Math.abs(this.R - a.R)) : !1
  3662. },
  3663. toString: function () {
  3664. return g.a.wb(this.R, 6) + ',' + g.a.wb(this.Q, 6)
  3665. },
  3666. wl: function () {
  3667. return [this.R, this.Q]
  3668. },
  3669. cb: function () {
  3670. var a = this.controlPoints,
  3671. b = new g.U(this.R, this.Q)
  3672. a && (b.controlPoints = [].concat(a))
  3673. return b
  3674. },
  3675. })
  3676. g.U.Nqa = function (a, b, c) {
  3677. c = c + 1 || Math.round(Math.abs(a.R - b.R))
  3678. if (!c || 0.001 > Math.abs(a.R - b.R)) return []
  3679. var d = [],
  3680. e = Math.PI,
  3681. f = g.Lm.Pu,
  3682. h = g.Lm.iwa,
  3683. k = Math.asin,
  3684. l = Math.sqrt,
  3685. m = Math.sin,
  3686. n = Math.pow,
  3687. p = Math.cos,
  3688. q = Math.atan2,
  3689. r = a.Q * f
  3690. a = a.R * f
  3691. var s = b.Q * f
  3692. b = b.R * f
  3693. for (var k = 2 * k(l(n(m((r - s) / 2), 2) + p(r) * p(s) * n(m((a - b) / 2), 2))), u, v, w, t, f = 1; f < c; f += 1)
  3694. (u = (1 / c) * f),
  3695. (v = m((1 - u) * k) / m(k)),
  3696. (w = m(u * k) / m(k)),
  3697. (u = v * p(r) * p(a) + w * p(s) * p(b)),
  3698. (t = v * p(r) * m(a) + w * p(s) * m(b)),
  3699. (v = v * m(r) + w * m(s)),
  3700. (v = q(v, l(n(u, 2) + n(t, 2)))),
  3701. (u = q(t, u)),
  3702. b > a ? (u < a && (u += 2 * e), u > b && (u -= 2 * e)) : (u > a && (u -= 2 * e), u < b && (u += 2 * e)),
  3703. d.push(new g.U(u * h, v * h, !0))
  3704. return d
  3705. }
  3706. g.U.Xb({ AR: 'getLng', xR: 'getLat', add: 'add', ab: 'subtract', ld: 'divideBy', Nd: 'multiplyBy', Ge: 'distance', offset: 'offset', gb: 'equals', toString: 'toString' })
  3707. g.oe = g.da.extend({
  3708. A: function () {
  3709. this.CLASS_NAME = 'AMap.Bounds'
  3710. var a = null,
  3711. b = null
  3712. if (1 === arguments.length && arguments[0] instanceof Array) (a = new g.U(arguments[0][0], arguments[0][1], !0)), (b = new g.U(arguments[0][2], arguments[0][3], !0))
  3713. else if (2 === arguments.length) (a = g.a.Ka(arguments[0])), (b = g.a.Ka(arguments[1]))
  3714. else if (4 === arguments.length) (a = new g.U(arguments[0], arguments[1])), (b = new g.U(arguments[2], arguments[3]))
  3715. else if (0 === arguments.length) (a = new g.U(-180, -90)), (b = new g.U(180, 90))
  3716. else throw 'Invalid Object: Bounds(' + arguments.join(',') + ')'
  3717. this.wc = a
  3718. this.nc = b
  3719. },
  3720. iv: function () {
  3721. return this.wc
  3722. },
  3723. Py: function () {
  3724. return this.nc
  3725. },
  3726. dk: function () {
  3727. return new g.U(this.wc.R, this.nc.Q, !0)
  3728. },
  3729. Oo: function () {
  3730. return new g.U(this.nc.R, this.wc.Q, !0)
  3731. },
  3732. contains: function (a) {
  3733. var b = this.wc,
  3734. c = this.nc,
  3735. d
  3736. if (a instanceof g.tp) return this.dV().contains(a)
  3737. a instanceof g.oe ? ((d = a.wc), (a = a.nc)) : (d = a = g.a.Ka(a))
  3738. var e = d.R,
  3739. f = b.R,
  3740. h = a.R,
  3741. k = c.R
  3742. f > k && ((k += 360), 0 > e && (e += 360), 0 > h && (h += 360))
  3743. return d.Q >= b.Q && a.Q <= c.Q && e >= f && h <= k
  3744. },
  3745. Zg: function (a) {
  3746. var b = this.wc,
  3747. c = this.nc,
  3748. d = a.wc
  3749. a = a.nc
  3750. var e = a.R >= b.R && d.R <= c.R
  3751. return a.Q >= b.Q && d.Q <= c.Q && e
  3752. },
  3753. xi: function () {
  3754. return new g.U(this.wc.R > this.nc.R ? ((this.wc.R + this.nc.R + 360) / 2) % 360 : (this.wc.R + this.nc.R) / 2, (this.wc.Q + this.nc.Q) / 2)
  3755. },
  3756. extend: function (a) {
  3757. this.wc.R = Math.min(this.wc.R, a.R)
  3758. this.wc.Q = Math.min(this.wc.Q, a.Q)
  3759. this.nc.R = Math.max(this.nc.R, a.R)
  3760. this.nc.Q = Math.max(this.nc.Q, a.Q)
  3761. return this
  3762. },
  3763. rza: function (a) {
  3764. return this.extend(a.wc).extend(a.nc)
  3765. },
  3766. toString: function () {
  3767. return this.wc.toString() + ';' + this.nc.toString()
  3768. },
  3769. cb: function () {
  3770. return new g.oe(this.wc.cb(), this.nc.cb())
  3771. },
  3772. gb: function (a) {
  3773. return a instanceof g.oe ? this.wc.gb(a.wc) && this.nc.gb(a.nc) : !1
  3774. },
  3775. vj: function () {
  3776. return Math.abs(this.nc.R - this.wc.R)
  3777. },
  3778. tj: function () {
  3779. return Math.abs(this.wc.Q - this.nc.Q)
  3780. },
  3781. dV: function (a) {
  3782. var b = [this.iv(), this.Oo(), this.Py(), this.dk()]
  3783. a && b.push(this.iv())
  3784. return new g.tp(b)
  3785. },
  3786. zya: function (a) {
  3787. return new g.Wf(a.kc(this.dk(), 20), a.kc(this.Oo(), 20))
  3788. },
  3789. sR: function (a, b) {
  3790. return this.dV(b).sR(a)
  3791. },
  3792. pR: function (a) {
  3793. return this.zya(a).xi()
  3794. },
  3795. })
  3796. g.oe.Xb({ iv: 'getSouthWest', Py: 'getNorthEast', dk: 'getNorthWest', Oo: 'getSouthEast', contains: 'contains', Zg: 'intersects', xi: 'getCenter', extend: 'extend' })
  3797. g.H = g.da.extend({
  3798. A: function (a, b, c) {
  3799. if (isNaN(a) || isNaN(b)) throw 'Invalid Object: Pixel(' + a + ', ' + b + ')'
  3800. this.x = c ? Math.round(a) : Number(a)
  3801. this.y = c ? Math.round(b) : Number(b)
  3802. },
  3803. vf: function () {
  3804. return this.x
  3805. },
  3806. ue: function () {
  3807. return this.y
  3808. },
  3809. add: function (a, b) {
  3810. return new g.H(this.x + a.x, this.y + a.y, b)
  3811. },
  3812. ab: function (a, b) {
  3813. return new g.H(this.x - a.x, this.y - a.y, b)
  3814. },
  3815. ld: function (a, b) {
  3816. return new g.H(this.x / a, this.y / a, b)
  3817. },
  3818. Nd: function (a, b) {
  3819. return new g.H(this.x * a, this.y * a, b)
  3820. },
  3821. Ge: function (a) {
  3822. var b = a.x - this.x
  3823. a = a.y - this.y
  3824. return Math.sqrt(b * b + a * a)
  3825. },
  3826. floor: function () {
  3827. return new g.H(Math.floor(this.x), Math.floor(this.y))
  3828. },
  3829. round: function () {
  3830. return new g.H(this.x, this.y, !0)
  3831. },
  3832. gb: function (a) {
  3833. return a instanceof g.H && this.x === a.x && this.y === a.y
  3834. },
  3835. cb: function (a) {
  3836. return new g.H(this.x, this.y, a)
  3837. },
  3838. toString: function () {
  3839. return this.x + ',' + this.y
  3840. },
  3841. wl: function () {
  3842. return [this.x, this.y]
  3843. },
  3844. length: function () {
  3845. return Math.sqrt(this.x * this.x + this.y * this.y)
  3846. },
  3847. direction: function () {
  3848. var a = this.x,
  3849. b = this.y
  3850. if (0 === a && 0 === b) return null
  3851. if (0 === a) return 0 < b ? 90 : 270
  3852. var c = (180 * Math.atan(b / a)) / Math.PI
  3853. return 0 > a && 0 < b ? c + 180 : 0 > a && 0 > b ? c + 180 : 0 < a && 0 > b ? c + 360 : c
  3854. },
  3855. Lu: function (a) {
  3856. var b = this.length(),
  3857. c = a.length()
  3858. return b && c ? (180 * Math.acos((this.x * a.x + this.y * a.y) / c / b)) / Math.PI : null
  3859. },
  3860. uoa: function (a) {
  3861. var b = this.length(),
  3862. c = a.length()
  3863. return b && c ? (this.x * a.x + this.y * a.y) / c / b : null
  3864. },
  3865. toFixed: function (a) {
  3866. this.x = g.a.wb(this.x, a)
  3867. this.y = g.a.wb(this.y, a)
  3868. return this
  3869. },
  3870. })
  3871. g.H.Xb({ vf: 'getX', ue: 'getY', add: 'add', ab: 'subtract', ld: 'divideBy', Nd: 'multiplyBy', Ge: 'distance', gb: 'equals', toString: 'toString' })
  3872. g.xd = g.da.extend({
  3873. A: function (a, b, c) {
  3874. if (isNaN(a) || isNaN(b)) throw 'Invalid Object: Size(' + a + ', ' + b + ')'
  3875. this.width = c ? Math.round(a) : Number(a)
  3876. this.height = c ? Math.round(b) : Number(b)
  3877. },
  3878. cb: function () {
  3879. return new g.xd(this.width, this.height)
  3880. },
  3881. vj: function () {
  3882. return this.width
  3883. },
  3884. tj: function () {
  3885. return this.height
  3886. },
  3887. PE: function () {
  3888. return new g.H(this.vj(), this.tj())
  3889. },
  3890. contains: function (a) {
  3891. return Math.abs(a.x) <= Math.abs(this.width) && Math.abs(a.y) <= Math.abs(this.height)
  3892. },
  3893. gb: function (a) {
  3894. return a instanceof g.xd && this.width === a.width && this.height === a.height
  3895. },
  3896. toString: function () {
  3897. return this.vj() + ',' + this.tj()
  3898. },
  3899. })
  3900. g.xd.Xb({ vj: 'getWidth', tj: 'getHeight', toString: 'toString' })
  3901. g.tp = g.da.extend({
  3902. A: function (a) {
  3903. this.CLASS_NAME = 'AMap.ArrayBounds'
  3904. a = g.a.Ka(a)
  3905. this.path = []
  3906. for (var b = 0; b < a.length; b += 1) this.path.push([a[b].R, a[b].Q])
  3907. this.bounds = this.Rd = a
  3908. },
  3909. contains: function (a, b) {
  3910. if (a instanceof g.tp) return g.Ft.isRingInRing(a.path, this.path)
  3911. a instanceof g.H ? (a = [a.x, a.y]) : a instanceof g.U && (a = [a.R, a.Q])
  3912. return g.wd.Sd(a, this.path, b)
  3913. },
  3914. toBounds: function () {
  3915. for (var a = new g.oe(180, 90, -180, -90), b = this.Rd.length - 1; 0 <= b; b -= 1) a.extend(this.Rd[b])
  3916. return a
  3917. },
  3918. sR: function (a) {
  3919. for (var b = [], c = 0; c < this.path.length; c += 1) b[c] = a.kc(this.path[c], 20)
  3920. return b
  3921. },
  3922. pR: function (a) {
  3923. return this.toBounds().pR(a)
  3924. },
  3925. xi: function () {
  3926. return this.toBounds().xi()
  3927. },
  3928. toString: function () {
  3929. return this.path.join(';')
  3930. },
  3931. })
  3932. g.tp.Xb({ contains: 'contains', xi: 'getCenter' })
  3933. g.daa = g.tp.extend({
  3934. A: function (a) {
  3935. this.CLASS_NAME = 'AMap.CoordsBounds'
  3936. this.path = a
  3937. if (a[0] instanceof g.H) {
  3938. this.path = []
  3939. for (var b = 0; b < a.length; b += 1) this.path.push([a[b].x, a[b].y])
  3940. }
  3941. this.bounds = this.Rd = a
  3942. },
  3943. toString: function () {
  3944. return this.path.join(';')
  3945. },
  3946. })
  3947. g.Wf = g.da.extend({
  3948. A: function () {
  3949. if (2 === arguments.length) (this.hc = arguments[0]), (this.Vd = arguments[1])
  3950. else if ((1 === arguments.length && arguments[0] instanceof Array) || 4 === arguments.length) {
  3951. var a = arguments[0] instanceof Array ? arguments[0] : arguments
  3952. this.hc = new g.H(a[0], a[1])
  3953. this.Vd = new g.H(a[2], a[3])
  3954. } else throw 'Invalid Object: PixelBounds(' + arguments.join(',') + ')'
  3955. },
  3956. xi: function (a) {
  3957. return new g.H((this.hc.x + this.Vd.x) / 2, (this.hc.y + this.Vd.y) / 2, a)
  3958. },
  3959. contains: function (a) {
  3960. var b
  3961. a instanceof g.Wf ? ((b = a.hc), (a = a.Vd)) : (b = a)
  3962. return b.x > this.hc.x && a.x < this.Vd.x && b.y > this.hc.y && a.y < this.Vd.y
  3963. },
  3964. vj: function () {
  3965. return this.Vd.x - this.hc.x
  3966. },
  3967. tj: function () {
  3968. return this.Vd.y - this.hc.y
  3969. },
  3970. Zg: function (a, b) {
  3971. b || 0 === b || (b = 20)
  3972. var c = this.hc,
  3973. d = this.Vd,
  3974. e = a.hc,
  3975. f = a.Vd,
  3976. h = f.y >= c.y - b && e.y <= d.y + b
  3977. return f.x >= c.x - b && e.x <= d.x + b && h
  3978. },
  3979. toString: function () {
  3980. return this.hc + ';' + this.Vd
  3981. },
  3982. cb: function () {
  3983. return new g.Wf(this.hc.cb(), this.Vd.cb())
  3984. },
  3985. })
  3986. g.I = {}
  3987. g.I.QP = function (a) {
  3988. for (var b = [Infinity, Infinity, -Infinity, -Infinity], c = 0, d = a.length; c < d; c += 1) g.I.II(b, a[c])
  3989. return b
  3990. }
  3991. g.I.a2 = function (a, b, c) {
  3992. var d = Math.min.apply(null, a)
  3993. a = Math.max.apply(null, a)
  3994. var e = Math.min.apply(null, b)
  3995. b = Math.max.apply(null, b)
  3996. return g.I.qoa(d, a, e, b, c)
  3997. }
  3998. g.I.buffer = function (a, b) {
  3999. a[0] -= b
  4000. a[1] -= b
  4001. a[2] += b
  4002. a[3] += b
  4003. }
  4004. g.I.cb = function (a) {
  4005. return a.slice()
  4006. }
  4007. g.I.Sd = function (a, b) {
  4008. return a[0] <= b[0] && b[0] <= a[2] && a[1] <= b[1] && b[1] <= a[3]
  4009. }
  4010. g.I.N2 = function (a, b) {
  4011. return a[0] <= b[0] && b[2] <= a[2] && a[1] <= b[1] && b[3] <= a[3]
  4012. }
  4013. g.I.oDa = function () {
  4014. return [Infinity, Infinity, -Infinity, -Infinity]
  4015. }
  4016. g.I.qoa = function (a, b, c, d, e) {
  4017. return 'undefined' !== typeof e ? ((e[0] = a), (e[2] = b), (e[1] = c), (e[3] = d), e) : [a, c, b, d]
  4018. }
  4019. g.I.empty = function (a) {
  4020. a[0] = a[1] = Infinity
  4021. a[2] = a[3] = -Infinity
  4022. return a
  4023. }
  4024. g.I.gb = function (a, b) {
  4025. return a[0] === b[0] && a[2] === b[2] && a[1] === b[1] && a[3] === b[3]
  4026. }
  4027. g.I.extend = function (a, b) {
  4028. b[0] < a[0] && (a[0] = b[0])
  4029. b[2] > a[2] && (a[2] = b[2])
  4030. b[1] < a[1] && (a[1] = b[1])
  4031. b[3] > a[3] && (a[3] = b[3])
  4032. }
  4033. g.I.II = function (a, b) {
  4034. b[0] < a[0] && (a[0] = b[0])
  4035. b[0] > a[2] && (a[2] = b[0])
  4036. b[1] < a[1] && (a[1] = b[1])
  4037. b[1] > a[3] && (a[3] = b[1])
  4038. }
  4039. g.I.hEa = function (a) {
  4040. return [a[0], a[1]]
  4041. }
  4042. g.I.iEa = function (a) {
  4043. return [a[2], a[1]]
  4044. }
  4045. g.I.xi = function (a) {
  4046. return [(a[0] + a[2]) / 2, (a[1] + a[3]) / 2]
  4047. }
  4048. g.I.uEa = function (a, b, c, d, e) {
  4049. var f = (b * d[0]) / 2
  4050. d = (b * d[1]) / 2
  4051. b = Math.cos(c)
  4052. c = Math.sin(c)
  4053. f = [-f, -f, f, f]
  4054. d = [-d, d, -d, d]
  4055. var h, k, l
  4056. for (h = 0; 4 > h; h += 1) (k = f[h]), (l = d[h]), (f[h] = a[0] + k * b - l * c), (d[h] = a[1] + k * c + l * b)
  4057. return g.I.a2(f, d, e)
  4058. }
  4059. g.I.tj = function (a) {
  4060. return a[3] - a[1]
  4061. }
  4062. g.I.IEa = function (a) {
  4063. return [a[2] - a[0], a[3] - a[1]]
  4064. }
  4065. g.I.NEa = function (a) {
  4066. return [a[0], a[3]]
  4067. }
  4068. g.I.OEa = function (a) {
  4069. return [a[2], a[3]]
  4070. }
  4071. g.I.vj = function (a) {
  4072. return a[2] - a[0]
  4073. }
  4074. g.I.Zg = function (a, b) {
  4075. return a[0] <= b[2] && a[2] >= b[0] && a[1] <= b[3] && a[3] >= b[1]
  4076. }
  4077. g.I.uh = function (a) {
  4078. return a[2] < a[0] || a[3] < a[1]
  4079. }
  4080. g.I.normalize = function (a, b) {
  4081. return [(b[0] - a[0]) / (a[2] - a[0]), (b[1] - a[1]) / (a[3] - a[1])]
  4082. }
  4083. g.I.pHa = function (a, b) {
  4084. var c = ((a[2] - a[0]) / 2) * (b - 1),
  4085. d = ((a[3] - a[1]) / 2) * (b - 1)
  4086. a[0] -= c
  4087. a[2] += c
  4088. a[1] -= d
  4089. a[3] += d
  4090. }
  4091. g.I.touches = function (a, b) {
  4092. return g.I.Zg(a, b) && (a[0] === b[2] || a[2] === b[0] || a[1] === b[3] || a[3] === b[1])
  4093. }
  4094. g.I.transform = function (a, b, c) {
  4095. a = [a[0], a[1], a[0], a[3], a[2], a[1], a[2], a[3]]
  4096. b(a, a, 2)
  4097. return g.I.a2([a[0], a[2], a[4], a[6]], [a[1], a[3], a[5], a[7]], c)
  4098. }
  4099. g.oe.Hb({
  4100. A: (function () {
  4101. var a = g.oe.prototype.A
  4102. return function () {
  4103. a.apply(this, arguments)
  4104. this.southwest = this.wc
  4105. this.northeast = this.nc
  4106. }
  4107. })(),
  4108. extend: (function () {
  4109. var a = g.oe.prototype.extend
  4110. return function () {
  4111. a.apply(this, arguments)
  4112. this.wc.lng = this.wc.R
  4113. this.wc.lat = this.wc.Q
  4114. this.nc.lng = this.nc.R
  4115. this.nc.lat = this.nc.Q
  4116. return this
  4117. }
  4118. })(),
  4119. })
  4120. g.KF = g.da.extend({
  4121. A: function (a, b, c, d) {
  4122. this.eX = a
  4123. this.uX = b
  4124. this.IX = c
  4125. this.eY = d
  4126. },
  4127. transform: function (a, b) {
  4128. return this.s1(a.cb(), b)
  4129. },
  4130. s1: function (a, b) {
  4131. b = b || 1
  4132. a.x = b * (this.eX * a.x + this.uX)
  4133. a.y = b * (this.IX * a.y + this.eY)
  4134. return a
  4135. },
  4136. tza: function (a, b) {
  4137. b = b || 1
  4138. return new g.H((a.x / b - this.uX) / this.eX, (a.y / b - this.eY) / this.IX)
  4139. },
  4140. })
  4141. g.zp = g.da.extend({
  4142. A: function (a) {
  4143. this.UL = a.MAX_LATITUDE || 85.0511287798
  4144. a.project && a.unproject && ((this.kc = a.project), (this.Wh = a.unproject))
  4145. },
  4146. })
  4147. g.zp.pW = {
  4148. kc: function (a) {
  4149. return new g.H(a.R, a.Q)
  4150. },
  4151. Wh: function (a, b) {
  4152. return new g.U(a.x, a.y, b)
  4153. },
  4154. }
  4155. g.zp.pba = new g.zp({
  4156. MAX_LATITUDE: 85.0511287798,
  4157. project: function (a) {
  4158. var b = Math.PI / 180,
  4159. c = this.UL,
  4160. c = Math.max(Math.min(c, a.Q), -c)
  4161. a = a.R * b
  4162. b = Math.log(Math.tan(Math.PI / 4 + (c * b) / 2))
  4163. return new g.H(a, b, !1)
  4164. },
  4165. unproject: function (a, b) {
  4166. var c = 180 / Math.PI
  4167. return new g.U(a.x * c, (2 * Math.atan(Math.exp(a.y)) - Math.PI / 2) * c, b)
  4168. },
  4169. })
  4170. g.zp.tW = {
  4171. UL: 85.0840591556,
  4172. gM: 6356752.3142,
  4173. fM: 6378137,
  4174. kc: function (a) {
  4175. var b = Math.PI / 180,
  4176. c = this.UL,
  4177. d = Math.max(Math.min(c, a.Q), -c),
  4178. e = this.fM,
  4179. c = this.gM
  4180. a = a.R * b * e
  4181. b *= d
  4182. e = c / e
  4183. e = Math.sqrt(1 - e * e)
  4184. d = e * Math.sin(b)
  4185. d = Math.pow((1 - d) / (1 + d), 0.5 * e)
  4186. b = Math.tan(0.5 * (0.5 * Math.PI - b)) / d
  4187. b = -c * Math.log(b)
  4188. return new g.H(a, b)
  4189. },
  4190. Wh: function (a, b) {
  4191. for (
  4192. var c = 180 / Math.PI, d = this.fM, e = this.gM, f = (a.x * c) / d, d = e / d, d = Math.sqrt(1 - d * d), e = Math.exp(-a.y / e), h = Math.PI / 2 - 2 * Math.atan(e), k = 15, l = 0.1;
  4193. 1e-7 < Math.abs(l) && ((k -= 1), 0 < k);
  4194. )
  4195. (l = d * Math.sin(h)), (l = Math.PI / 2 - 2 * Math.atan(e * Math.pow((1 - l) / (1 + l), 0.5 * d)) - h), (h += l)
  4196. return new g.U(f, h * c, b)
  4197. },
  4198. }
  4199. g.Zh = {}
  4200. g.Zh.pF = {
  4201. MD: function (a, b) {
  4202. var c = this.Pf.kc(a),
  4203. d = this.scale(b)
  4204. return this.UE.s1(c, d)
  4205. },
  4206. lE: function (a, b, c) {
  4207. b = this.scale(b)
  4208. a = this.UE.tza(a, b)
  4209. return this.Pf.Wh(a, c)
  4210. },
  4211. kc: function (a) {
  4212. return this.Pf.kc(a)
  4213. },
  4214. scale: function (a) {
  4215. return 256 << a
  4216. },
  4217. nq: function (a) {
  4218. return (12756274 * Math.PI) / (256 * Math.pow(2, a))
  4219. },
  4220. }
  4221. g.Zh.IL = g.extend({}, g.Zh.pF, {
  4222. code: 'EPSG:3857',
  4223. Pf: g.zp.pba,
  4224. UE: new g.KF(0.5 / Math.PI, 0.5, -0.5 / Math.PI, 0.5),
  4225. kc: function (a) {
  4226. return this.Pf.kc(a).Nd(6378137)
  4227. },
  4228. })
  4229. g.Zh.$V = g.extend({}, g.Zh.pF, {
  4230. code: 'EPSG:3395',
  4231. Pf: g.zp.tW,
  4232. UE: (function () {
  4233. var a = g.zp.tW
  4234. return new g.KF(0.5 / (Math.PI * a.fM), 0.5, -0.5 / (Math.PI * a.gM), 0.5)
  4235. })(),
  4236. })
  4237. g.Zh.aW = g.extend({}, g.Zh.pF, { code: 'EPSG:4326', Pf: g.zp.pW, UE: new g.KF(1 / 360, 0.5, -1 / 360, 0.25) })
  4238. g.Zh.YAa = g.extend({}, g.Zh.pF, { Pf: g.zp.pW, UE: new g.KF(1, 0, 1, 0) })
  4239. g.RJ = {
  4240. kc: function (a, b) {
  4241. a = g.a.Ka(a)
  4242. return this.mj.MD(a, b || this.get('zoom'))
  4243. },
  4244. Wh: function (a, b, c) {
  4245. return this.mj.lE(a, b || this.get('zoom'), c)
  4246. },
  4247. ota: function (a, b) {
  4248. return this.kc(a, b)
  4249. },
  4250. eEa: function (a, b) {
  4251. return this.Wh(a, b)
  4252. },
  4253. $p: function (a, b, c) {
  4254. g.c.add(this, 'containerToLngLat')
  4255. var d = this.get('size').PE().ld(2)
  4256. if (a.gb(d) && !c) return this.get('center')
  4257. a = this.yg(a, b, c)
  4258. return this.Od(a)
  4259. },
  4260. Ls: function (a, b) {
  4261. g.c.add(this, 'lngLatToContainer')
  4262. var c = 0
  4263. b && (c = 'string' === typeof b ? Math.round(parseFloat(b) / 0.14929107086948487) : b)
  4264. var d = this.Bb(a)
  4265. return this.Xd(d, null, c)
  4266. },
  4267. Bb: function (a) {
  4268. a = g.a.Ka(a)
  4269. return this.kc(a, 20)
  4270. },
  4271. Od: function (a) {
  4272. return a ? this.Wh(a, 20) : a
  4273. },
  4274. LJ: function (a) {
  4275. a = g.a.Ka(a)
  4276. return this.kc(a, 20).ab(g.a.dc)
  4277. },
  4278. m6: function (a, b) {
  4279. b || (a = g.a.Ka(a))
  4280. var c = [],
  4281. d = !1
  4282. void 0 === a[0].length && (d = !0)
  4283. for (var c = [], e = 0, f = a.length; e < f; e += 1)
  4284. if (d) {
  4285. var h = this.kc(a[e], 20).ab(g.a.dc)
  4286. c[e] = [h.x, h.y]
  4287. } else c[e] = this.m6(a[e], !0)
  4288. return c
  4289. },
  4290. kqa: function (a) {
  4291. return this.Wh(a.add(g.a.dc), 20)
  4292. },
  4293. fEa: function (a) {
  4294. return this.Xd(a.add(g.a.dc))
  4295. },
  4296. nEa: function (a) {
  4297. return a ? this.kc(this.get('center'), a) : this.get('centerPixel')
  4298. },
  4299. GBa: function (a) {
  4300. return new g.H(a.x + 2.0037508342789244e7, 2.0037508342789244e7 - a.y).ld(0.14929107086948487)
  4301. },
  4302. t7: function (a) {
  4303. return new g.H(0.14929107086948487 * a.x - 2.0037508342789244e7, 2.0037508342789244e7 - 0.14929107086948487 * a.y)
  4304. },
  4305. }
  4306. z.NF = g.da.extend({
  4307. ka: [g.va, g.Ze],
  4308. w: { center: new g.U(116.397128, 39.916527), zoom: 13, rotation: 0, crs: 'EPSG3857' },
  4309. A: function (a) {
  4310. this.CLASS_NAME = 'AMap.View2D'
  4311. g.c.ya(this, a)
  4312. a = a || {}
  4313. a.center && (a.center = g.a.Ka(a.center))
  4314. this.w = a
  4315. },
  4316. })
  4317. z.Rb = g.da.extend({
  4318. ka: [g.va, g.Ze, g.RJ],
  4319. w: {
  4320. features: 'all',
  4321. showLabel: !0,
  4322. dragEnable: !0,
  4323. showIndoorMap: g.l.ba ? !1 : !0,
  4324. lang: 'zh_cn',
  4325. keyboardEnable: !0,
  4326. doubleClickZoom: !0,
  4327. scrollWheel: !0,
  4328. zoomEnable: !0,
  4329. jogEnable: !0,
  4330. continuousZoomEnable: !0,
  4331. resizeEnable: !1,
  4332. animateEnable: !0,
  4333. rotateEnable: !1,
  4334. labelzIndex: 99,
  4335. showFog: !0,
  4336. touchZoom: !0,
  4337. zooms: [3, g.l.ba ? (g.l.Jc ? 19 : 20) : 18],
  4338. defaultCursor: '',
  4339. limitBounds: null,
  4340. logoUrl: g.r.Gb + '/theme/v1.3/logo@1x.png',
  4341. logoUrlRetina: g.r.Gb + '/theme/v1.3/logo@2x.png',
  4342. copyright: '\x3c!--v1.4.16--\x3e &copy ' + new Date().getFullYear() + ' AutoNavi ',
  4343. isHotspot: !g.l.ba,
  4344. baseRender: g.l.T1,
  4345. overlayRender: g.l.kva,
  4346. mapStyle: 'amap://styles/normal',
  4347. showBuildingBlock: g.l.Mf,
  4348. crs: 'EPSG3857',
  4349. rotation: 0,
  4350. pitch: 0,
  4351. yaw: 0,
  4352. scale: 1,
  4353. center: new g.U(116.397128, 39.916527),
  4354. zoom: 13,
  4355. detectRetina: !0,
  4356. pitchEnable: !1,
  4357. buildingAnimation: !1,
  4358. maxPitch: 83,
  4359. turboMode: !0,
  4360. preloadMode: !1,
  4361. workerMode: !0,
  4362. },
  4363. poiOnAMAP: function (a) {
  4364. g.c.add(this, 'poiOnAMAP')
  4365. var b = {},
  4366. c = g.a.Ka(a.location)
  4367. b.id = a.id
  4368. c && ((b.y = c.Q), (b.x = c.R))
  4369. b.name = a.name
  4370. b.address = a.address
  4371. g.$h.mt(g.$h.u4(b))
  4372. },
  4373. detailOnAMAP: function (a) {
  4374. g.c.add(this, 'detailOnAMAP')
  4375. var b = {},
  4376. c = g.a.Ka(a.location)
  4377. b.id = a.id
  4378. c && ((b.y = c.Q), (b.x = c.R))
  4379. b.name = a.name
  4380. g.$h.mt(g.$h.s4(b))
  4381. },
  4382. setLabelzIndex: function (a) {
  4383. g.c.add(this, 'setLabelzIndex')
  4384. return this.set('labelzIndex', a)
  4385. },
  4386. getLabelzIndex: function () {
  4387. return this.get('labelzIndex', null, !0)
  4388. },
  4389. setVectorMapForeign: function (a) {
  4390. if (g.l.Xp) {
  4391. var b = this.Z6(a)
  4392. a = b[0]
  4393. var c = b[1]
  4394. this.set('name_field', c, !0)
  4395. this.set('vectorMapForeign', a, !0)
  4396. var d = this,
  4397. b = []
  4398. a && (b.push('gridmap'), b.push('MVT', 'vectorForeign'), b.push('labelcanvas'))
  4399. g.tb.Fg(b, function () {
  4400. d.q6(function () {
  4401. d.map &&
  4402. ((d.map.Fi = !0),
  4403. d.map.EG && d.map.EG(),
  4404. d.map.Re && d.map.Re instanceof g.Rb.CF && d.map.Re.he && d.map.Re.he.S && (d.map.Re.he.S.dI(), (d.map.Re.he.S.K6 = c), d.map.Re.he.S.reload()),
  4405. d.set('display'))
  4406. })
  4407. })
  4408. }
  4409. },
  4410. setMapStyle: function (a) {
  4411. g.c.add(this, 'setMapStyle')
  4412. a = a || 'normal'
  4413. ;-1 === a.indexOf('amap://styles/') ? (g.r.dK[a] ? this.set('styleUrl', 'amap://styles/' + g.r.dK[a]) : this.set('styleUrl', '')) : this.set('styleUrl', a)
  4414. this.ZS()
  4415. },
  4416. getMapStyle: function () {
  4417. return this.get('styleUrl') || this.get('mapStyle', null, !0)
  4418. },
  4419. getFeatures: function () {
  4420. return this.get('features', null, !0)
  4421. },
  4422. setFeatures: function (a) {
  4423. g.c.add(this, 'setFeatures')
  4424. this.set('features', a)
  4425. },
  4426. setLang: function (a) {
  4427. g.c.add(this, 'setLang', a)
  4428. ;('en' !== a && 'zh_cn' !== a && 'zh_en' !== a) || a === this.get('lang', null, !0) || (this.set('lang', a), this.hk && this.hk.z8(this))
  4429. },
  4430. getLang: function () {
  4431. return this.get('lang', null, !0)
  4432. },
  4433. setCity: function (a, b) {
  4434. g.c.add(this, 'setCity')
  4435. var c = this
  4436. new g.jb.zb(g.r.Zd + '/v3/config/district?subdistrict=0&extensions=all&key=' + g.r.key + '&s=rsv3&output=json&keywords=' + a, { callback: 'callback' }).h(
  4437. 'complete',
  4438. function (d) {
  4439. var e = d.districts
  4440. if (e && e.length) {
  4441. d = e[0]
  4442. ;/[^\w]+/.test(a) &&
  4443. (e = g.a.find(e, function (b) {
  4444. return b.name === a
  4445. })) &&
  4446. e !== d &&
  4447. (d = e)
  4448. try {
  4449. var f = d.center.split(','),
  4450. h
  4451. switch (d.level) {
  4452. case 'city':
  4453. h = 10
  4454. break
  4455. case 'province':
  4456. h = 7
  4457. break
  4458. case 'district':
  4459. h = 12
  4460. break
  4461. case 'country':
  4462. h = 4
  4463. break
  4464. default:
  4465. h = 12
  4466. }
  4467. ;-1 !== d.name.indexOf('\u5e02') && (h = 10)
  4468. c.C = !0
  4469. c.setZoomAndCenter(h, new g.U(f[0], f[1]), !0)
  4470. c.C = !1
  4471. b && b.call(c, f, h)
  4472. } catch (k) {}
  4473. }
  4474. },
  4475. this
  4476. )
  4477. },
  4478. getScreenShot: function (a, b) {
  4479. g.c.add(this, 'getScreenShot')
  4480. return this.map && g.l.il ? this.map.E4(a, b) : ''
  4481. },
  4482. getCity: function (a, b) {
  4483. g.c.add(this, 'getCity')
  4484. var c = g.r.Zd + '/v3/geocode/regeo?&extensions=&&key=' + g.r.key + '&s=rsv3&output=json&location=' + (b || this.get('center', null, !0))
  4485. new g.jb.zb(c, { callback: 'callback', gy: !0, Ed: 'REGEO' }).h(
  4486. 'complete',
  4487. function (b) {
  4488. b = b.regeocode.addressComponent
  4489. a({
  4490. province: b.province,
  4491. city: b.city instanceof Array ? '' : b.city,
  4492. citycode: b.citycode instanceof Array ? '' : b.citycode,
  4493. district: b.district instanceof Array ? '' : b.district,
  4494. })
  4495. },
  4496. this
  4497. )
  4498. },
  4499. A: function (a, b) {
  4500. b = g.extend({}, b)
  4501. this.id = g.a.yb(this)
  4502. this.CLASS_NAME = 'AMap.Map'
  4503. g.c.ya(this, b)
  4504. this.C = !0
  4505. b = b || {}
  4506. b.mapStyle && g.r.dK[b.mapStyle] && (b.mapStyle = 'amap://styles/' + g.r.dK[b.mapStyle])
  4507. b.mapStyle && -1 !== b.mapStyle.indexOf('amap://styles/') ? ((b.styleUrl = b.mapStyle), delete b.mapStyle) : (b.styleUrl = 'amap://styles/normal')
  4508. b.bgColor && g.extend(g.r.De, b.bgColor)
  4509. b.maxPitch && (b.maxPitch = Math.min(this.w.maxPitch, Math.max(b.maxPitch, 0)))
  4510. b.pitch && (b.pitch = Math.min(b.maxPitch || this.w.maxPitch, Math.max(b.pitch, 0)))
  4511. '3D' !== b.viewMode && (b.pitch = 0)
  4512. g.r.Vr = b.buildingColor || null
  4513. b.mobile && (g.l.ba = !0)
  4514. b.noPoi && (g.r.wua = !0)
  4515. b.editEnable = g.r.RQ ? b.editEnable : !1
  4516. b.editEnable && ((b.nolimg = !0), (b.showIndoorMap = !1))
  4517. void 0 !== b.nolimg && (b.nolimg_param = b.nolimg)
  4518. '3D' === b.viewMode && g.l.qp && void 0 === b.showBuildingBlock && !0 === b.showBuildingBlock
  4519. this.wq = !!b.enableSocket
  4520. b.server && (g.r.Zd = b.server)
  4521. b.vdataUrl && (g.r.vL = b.vdataUrl)
  4522. if ('string' === typeof a) {
  4523. if (((a = this.K = document.getElementById(a)), !a)) return
  4524. } else 'DIV' === a.tagName && (this.K = a)
  4525. if (this.K.___amap___) {
  4526. var c = this.K.___amap___
  4527. c.C = !0
  4528. c.destroy()
  4529. c.C = !1
  4530. }
  4531. this.K.___amap___ = this
  4532. var c = this.w.zooms[1],
  4533. d = this.w.zooms[0]
  4534. b.zooms ? ((b.zooms[0] = Math.max(d, b.zooms[0])), !0 === b.expandZoomRange && (c = g.l.ba ? (g.l.Jc ? 19 : 20) : 20), (b.zooms[1] = Math.min(c, b.zooms[1]))) : (b.zooms = [d, c])
  4535. b.forceZooms && (b.zooms = b.forceZooms)
  4536. b = this.ina(b)
  4537. c = this.getSize(!0)
  4538. b.center && (b.center = g.a.Ka(b.center))
  4539. this.mj = this.roa(b.crs || this.w.crs, b.center || this.w.center)
  4540. this.nma(c, b)
  4541. d = b.lang
  4542. 'en' !== d && 'zh_cn' !== d && 'zh_en' !== d && (b.lang = 'zh_cn')
  4543. g.f.pg || ((b.rotation = 0), (b.pitch = 0), (b.rotateEnable = !1))
  4544. b.preloadMode = !1
  4545. g.l.GS ? !1 !== b.workerMode && (z.Rb.Pt ? ((b.workerMode = !1), z.Rb.Pt++) : (z.Rb.Pt = 1)) : (b.workerMode = !1)
  4546. b.layers && ((d = b.layers), delete b.layers, (b.layers = d))
  4547. b.baseRender = b.baseRender || g.l.T1
  4548. b.forceVector && (b.baseRender = g.l.Mf ? 'vw' : 'v')
  4549. b.disableVector && (b.baseRender = 'd')
  4550. 'dom' === b.renderer && ((b.baseRender = 'd'), (b.overlayRender = 'd'))
  4551. c = Math.max(c.width, c.height)
  4552. g.l.ja && (c *= Math.min(2, window.devicePixelRatio || 1))
  4553. 'vw' === b.baseRender && c > g.l.Vta && (b.baseRender = 'dv')
  4554. c = b.vectorMapForeign
  4555. 'd' == b.baseRender && c && (b.vectorMapForeign = !1)
  4556. c && !g.l.Xp && (b.vectorMapForeign = !1)
  4557. c = this.Z6(b.vectorMapForeign)
  4558. b.vectorMapForeign = c[0]
  4559. b.name_field = c[1]
  4560. b.turboMode = !1
  4561. g.a.ub(this, b)
  4562. this.jf(this.w)
  4563. 'rotateEnable' in b || '3D' !== b.viewMode || !g.l.qp || this.set('rotateEnable', !0)
  4564. 'pitchEnable' in b || '3D' !== b.viewMode || !g.l.qp || this.set('pitchEnable', !0)
  4565. c = this.get('zoom', null, !0)
  4566. ;('3D' === this.get('viewMode') && g.l.qp) || (c = Math.round(c))
  4567. d = this.get('zooms')
  4568. c > d[1] ? (c = d[1]) : c < d[0] && (c = d[0])
  4569. this.set('zoom', c)
  4570. this.w.zoom = c
  4571. this.toa(this.w)
  4572. this.cQ()
  4573. var e = this
  4574. this.jf({ overlays: [], infos: {}, controls: {} })
  4575. var f = []
  4576. b.vectorMapForeign && f.push('gridmap')
  4577. b.vectorMapForeign && g.l.Xp && f.push('MVT', 'vectorForeign')
  4578. b.forceVector && (f.push('vectorlayer'), f.push('overlay'))
  4579. '3D' === b.viewMode && g.l.qp && f.push('Map3D')
  4580. g.l.il && (b.vectorMapForeign || b.mapStyle || b.nolimg) && f.push('labelcanvas')
  4581. b.editEnable && f.push('edit')
  4582. g.l.il && (f.push('AMap.IndoorMap'), -1 !== f.indexOf('Map3D') && f.push('AMap.IndoorMap3D'))
  4583. this.ja = g.l.ja && this.get('detectRetina')
  4584. this.t$(b)
  4585. this.C = !1
  4586. e = this
  4587. this.Fta(function () {
  4588. e.q6(function () {
  4589. g.tb.Fg(f, function () {
  4590. if (!e.get('destroy')) {
  4591. var b = new g.Rb(a, e)
  4592. if (g.Te) {
  4593. var c = (g.Te[0] || g.Te).stylemaps['50001:1'].browserStyle[0].split('&')
  4594. b.VF = [c[0], c[4]]
  4595. }
  4596. b.af('zoom center centerCoords rotation yaw pitch resolution'.split(' '), e.view, !0)
  4597. b.h(
  4598. 'complete',
  4599. function () {
  4600. var a = {}
  4601. b.J && '3D' == b.J.type && ((a.canvas = b.J.xa), (a.gl = b.J.ca))
  4602. this.q('complete', a)
  4603. },
  4604. e,
  4605. !0
  4606. )
  4607. b.mj = e.mj
  4608. e.af(['zoomSlow', 'panTo', 'targetLevel', 'render'], b)
  4609. b.af(['size', 'bounds'], e)
  4610. e.loaded = !0
  4611. e.q('coreMapCreated')
  4612. g.l.il && e.Pla()
  4613. e.C = !0
  4614. '3D' === e.view.type && (e.AmbientLight || (e.AmbientLight = new g.Sw.PV([1, 1, 1], 0.9)), e.DirectionLight || (e.DirectionLight = new g.Sw.ZV([0, -1, 1], [1, 1, 1], 0.1)))
  4615. e.C = !1
  4616. }
  4617. })
  4618. })
  4619. })
  4620. },
  4621. Z6: function (a) {
  4622. if (a) {
  4623. if ('string' == typeof a && 'style_' === a.substr(0, 6)) return [a]
  4624. switch (a) {
  4625. case !0:
  4626. case 'Chinese_Simplified':
  4627. return ['style_zh_cn']
  4628. case 'English':
  4629. return ['style_en']
  4630. case 'Local':
  4631. return ['style_local']
  4632. case 'Chinese_Traditional':
  4633. return ['style_en', ['coalesce', '{name_zh-Hant}', '{name}']]
  4634. default:
  4635. return ['style_zh_cn']
  4636. }
  4637. } else return [!1]
  4638. },
  4639. q6: function (a) {
  4640. try {
  4641. var b = this.get('vectorMapForeign')
  4642. if (b)
  4643. if (((g.PJ = 0), (g.OJ = 0), 'string' == typeof b && 'style_' == b.substr(0, 6))) {
  4644. var c = this,
  4645. d,
  4646. e = b.slice(6)
  4647. 32 == e.length
  4648. ? ((c.js = !0),
  4649. (g.r.aqa = g.r.SI + 'style_local/'),
  4650. (d = g.r.tc + '://restapi.amap.com/v4/sdk/map/styles?styleid=' + e + '&key=' + g.r.key + '&sdkType=abroad_js_json&s=rsv3'),
  4651. (d += '&platform=JS&logversion=2.0'),
  4652. (d += '&appname=' + g.r.Up),
  4653. (d += '&csid=' + g.a.Bw()),
  4654. (d += '&sdkversion=' + g.r.ln))
  4655. : ((c.js = !1), (g.r.aqa = g.r.SI + b + '/'), (d = g.r.Gb + '/styles/foreign/web_v8_' + b + '.json'))
  4656. var f = new g.jb.XMLHttpRequest(d, { pU: 'application/json', responseType: 'json' })
  4657. f.h(
  4658. 'complete',
  4659. function (b) {
  4660. if (b && b.data && !b.data.MDa) {
  4661. if (b.data.style) b = b.data
  4662. else if ('string' === typeof b.data) b = JSON.parse(b.data)
  4663. else {
  4664. c.set('vectorMapForeign', !1)
  4665. c.js = !1
  4666. a()
  4667. return
  4668. }
  4669. var d = b.hole
  4670. if (d) {
  4671. g.oy = []
  4672. for (var e = 0, f = d.length; e < f - 1; e += 2) {
  4673. var h = c.kc([d[e + 1], d[e]], 16)
  4674. g.oy.push([h.x >> 0, h.y >> 0])
  4675. }
  4676. }
  4677. ;(d = b.style) && d.layers && ((g.Ota = d.layers), b.zoomlevel && ((g.PJ = b.zoomlevel[0]), (g.OJ = b.zoomlevel[1])))
  4678. } else (c.js = !1), c.set('vectorMapForeign', !1)
  4679. a()
  4680. },
  4681. this
  4682. )
  4683. f.h(
  4684. 'error',
  4685. function () {
  4686. c.js = !1
  4687. c.set('vectorMapForeign', !1)
  4688. a()
  4689. },
  4690. this
  4691. )
  4692. } else (this.js = !1), this.set('vectorMapForeign', !1), a()
  4693. else (this.js = !1), this.set('vectorMapForeign', !1), a()
  4694. } catch (h) {
  4695. ;(this.js = !1), this.set('vectorMapForeign', !1), a()
  4696. }
  4697. },
  4698. Fta: function (a) {
  4699. function b() {
  4700. var a = AMap.anole,
  4701. b = {},
  4702. c = [],
  4703. d = 0,
  4704. e = void 0
  4705. if (a) {
  4706. for (var a = a.replace(/\?/g, ':').replace(/\//g, '&'), e = a.split(''), a = 0, f = e.length; a < f; a++) void 0 === b[e[a]] && ((b[e[a]] = d++), c.push(e[a]))
  4707. c.reverse()
  4708. d = 0
  4709. for (a = e.length; d < a; d++) e[d] = c[b[e[d]]]
  4710. a = e.join('')
  4711. g.Te = eval(a)
  4712. delete AMap.anole
  4713. }
  4714. }
  4715. if (g.l.Ue || g.Te) a()
  4716. else {
  4717. var c = !0
  4718. if (window.__AMapStyleSource) c = !1
  4719. else
  4720. try {
  4721. var d = JSON.parse(localStorage.getItem('_AMap_anole'))
  4722. d && d.version === g.l.lf && d.script && 100 < d.script.length ? eval(d.script) : (c = !1)
  4723. } catch (e) {
  4724. c = !1
  4725. }
  4726. if (c) b(), a()
  4727. else {
  4728. var f = document.createElement('script')
  4729. f.qDa = 'anonymous'
  4730. f.id = 'amap_anole_js'
  4731. f.src = window.__AMapStyleSource || g.r.tc + '://vdata.amap.com/style?v=' + g.r.ln + '&key=' + g.r.key + '&mapstyle=normal'
  4732. c = document
  4733. ;(c.head || c.getElementsByTagName('head')[0] || c.body).appendChild(f)
  4734. f.onload = function () {
  4735. if (!g.Te) {
  4736. if (AMap.anole && !window.__AMapStyleSource && g.l.Gv)
  4737. try {
  4738. var c = { version: g.l.lf, script: "AMap['anole']=" + JSON.stringify(AMap.anole) }
  4739. localStorage.setItem('_AMap_anole', JSON.stringify(c))
  4740. } catch (d) {}
  4741. b()
  4742. }
  4743. a()
  4744. f.parentNode.removeChild(f)
  4745. }
  4746. }
  4747. }
  4748. },
  4749. getViewMode_: function () {
  4750. return this.view.type
  4751. },
  4752. qqa: function (a, b, c) {
  4753. var d = new g.U(a[4], a[5])
  4754. if ((a = new g.oe(a[0], a[1], a[2], a[3])) && b && d) {
  4755. for (var e = c[1]; e > c[0]; e -= 1) {
  4756. var f = this.kc(a.wc, e),
  4757. h = this.kc(a.nc, e)
  4758. if (Math.abs(h.x - f.x) < b.width && Math.abs(f.y - h.y) < b.height) break
  4759. }
  4760. return [d, Math.min(e + 1, c[1])]
  4761. }
  4762. return null
  4763. },
  4764. nma: function (a, b) {
  4765. if (!(b && b.center && b.zoom)) {
  4766. var c = this.qqa(g.r.Rd, a, b.zooms)
  4767. b.center = b.center || (c && c[0])
  4768. 'number' !== typeof b.zoom && (b.zoom = c && c[1])
  4769. }
  4770. },
  4771. roa: function (a, b) {
  4772. if (b instanceof g.U) {
  4773. if ('string' === typeof a) {
  4774. switch (a) {
  4775. case 'EPSG3395':
  4776. return g.Zh.$V
  4777. case 'EPSG4326':
  4778. return g.Zh.aW
  4779. }
  4780. return g.Zh.IL
  4781. }
  4782. if (a.pointToLngLat && a.lngLatToPoint) return { lE: a.pointToLngLat, MD: a.lngLatToPoint, nq: a.getResolution }
  4783. throw 'illegal projection'
  4784. }
  4785. var c = this.get('zoom', null, !0)
  4786. return {
  4787. nq: function (a) {
  4788. return Math.pow(2, c - a)
  4789. },
  4790. MD: function () {},
  4791. lE: function () {},
  4792. }
  4793. },
  4794. Lxa: function (a, b) {
  4795. this.ax && this.ax.stop()
  4796. var c = ['pitch', 'rotation', 'zoom', 'center'],
  4797. d = {},
  4798. e = !1,
  4799. f
  4800. for (f in a)
  4801. if (a.hasOwnProperty(f) && -1 !== g.a.indexOf(c, f)) {
  4802. var h = this.get(f)
  4803. void 0 === h || h === a[f] || (h.gb && h.gb(a[f])) || ((d[f] = this.get(f)), (e = !0))
  4804. }
  4805. e &&
  4806. ((this.ax = new g.Kj(d, a, null, 0)),
  4807. (this.ax.transition = function (a, c, e) {
  4808. e /= b || 300
  4809. if (1 <= e) return c
  4810. var f = {},
  4811. h
  4812. for (h in d) d.hasOwnProperty(h) && (f[h] = 'center' === h ? a[h].add(c[h].ab(a[h]).Nd(e)) : a[h] + (c[h] - a[h]) * e)
  4813. return f
  4814. }),
  4815. (this.ax.Jq = function (b) {
  4816. b === a && (this.ax.stop(), (this.Fd = null))
  4817. for (var c in b) b.hasOwnProperty(c) && ('center' === c ? ((this.C = !0), this.setCenter(b[c], !0), (this.C = !1)) : this.set(c, b[c]))
  4818. }),
  4819. this.ax.Nn(this))
  4820. },
  4821. toa: function (a) {
  4822. '3D' === this.get('viewMode') && g.l.qp ? (this.set('baseRender', 'vw'), (this.view = new g.qM(this, a))) : (this.view = new g.NF(this, a))
  4823. this.o5()
  4824. },
  4825. o5: function () {
  4826. this.Bi = 'd' < this.get('baseRender') || '3D' === this.view.type
  4827. },
  4828. featuresChanged: function () {
  4829. this.cQ()
  4830. },
  4831. ZS: function () {
  4832. this.cQ()
  4833. this.KU()
  4834. },
  4835. KU: function () {
  4836. if (this.qm) {
  4837. var a = !0
  4838. this.C = !0
  4839. var b = this.getMapStyle()
  4840. if (!1 === this.get('showIndoorMap') || ('normal' !== b && 'amap://styles/normal' !== b)) a = !1
  4841. for (var b = this.getLayers(), c = (this.C = !1), d = 0, e = b.length; d < e; d += 1) {
  4842. if (b.hasOwnProperty(d) && 'AMap.IndoorMap' === b[d].CLASS_NAME && b[d] !== this.qm) {
  4843. a = !1
  4844. break
  4845. }
  4846. b[d].vq && b[d].vq() && b[d].get('visible') && (c = !0)
  4847. }
  4848. ;(a = c && a) && this.qm.getMap() !== this && this.qm.setMap(this)
  4849. this.qm.set('visible', a)
  4850. }
  4851. },
  4852. cQ: function () {
  4853. this.t$()
  4854. if (this.view && '3D' !== this.view.type) {
  4855. var a = this.get('baseRender')
  4856. if (a && !('dv' < a)) {
  4857. var b = this.get('features', null, !0)
  4858. this.C = !0
  4859. var c = this.getMapStyle()
  4860. this.C = !1
  4861. var d = this.get('editEnable')
  4862. b &&
  4863. c &&
  4864. (g.l.Xp && (d || 'all' !== b || ('normal' !== c && 'amap://styles/normal' !== c))
  4865. ? (this.set('baseRender', 'v'), (this.uT = a))
  4866. : this.uT && (this.set('baseRender', this.uT), (this.uT = null)))
  4867. this.o5()
  4868. }
  4869. }
  4870. },
  4871. Pla: function () {
  4872. var a = this
  4873. !a.qm &&
  4874. a.K &&
  4875. ((a.indoorMap = a.qm = new AMap.IndoorMap({ innerLayer: !0 })),
  4876. a.KU(),
  4877. g.a.Wc(function () {
  4878. a.q('indoor_create', { target: a })
  4879. a.set('display')
  4880. }))
  4881. },
  4882. layersChanged: function () {
  4883. this.C = !0
  4884. var a = this.getLayers()
  4885. this.YJ = this.C = !1
  4886. for (var b = 0; b < a.length; b += 1) (a[b].C = !0), a[b].getMap() !== this && a[b].setMap(this), (a[b].C = !1), a[b].YJ && (this.YJ = !0)
  4887. this.KU()
  4888. },
  4889. getMapNumber: function () {
  4890. if (this.map) return this.map.tE()
  4891. },
  4892. getAdcode: function () {
  4893. g.c.add(this, 'getAdcode')
  4894. return g.r.Nla
  4895. },
  4896. t$: function () {
  4897. function a() {
  4898. var a = !1
  4899. g.a.Tb(
  4900. b.w.layers,
  4901. function (b) {
  4902. if (b.FG && b.constructor === z.o.rb) return (a = !0), !1
  4903. },
  4904. b
  4905. )
  4906. if (
  4907. g.a.ka(['d', 'dv'], b.get('baseRender')) ||
  4908. !g.a.ka(['normal', 'amap://styles/normal'], b.get('mapStyle')) ||
  4909. ('3D' === b.get('viewMode') && 0 < b.get('pitch')) ||
  4910. 'all' !== b.get('features') ||
  4911. b.get('editEnable') ||
  4912. !b.get('turboMode')
  4913. )
  4914. a = !1
  4915. return a
  4916. }
  4917. if (!this.d8) {
  4918. var b = this,
  4919. c = a(),
  4920. d = this.get('rasterLayer')
  4921. if (d && !c) this.sk(d), this.set('rasterLayer', void 0)
  4922. else if (!d && c && this.get('layers')) {
  4923. d = new z.o.rb({ innerLayer: !0, map: this, Sv: !0, zIndex: 0 })
  4924. d.Hsa = !0
  4925. if (this.w.layers) {
  4926. var e = null
  4927. g.a.Tb(this.w.layers, function (a) {
  4928. a instanceof z.o.rb && a.FG && (null === e || a.get('zIndex') > e.get('zIndex')) && (e = a)
  4929. })
  4930. e && d.af(['zIndex', 'opacity', 'zooms', 'visible'], e)
  4931. }
  4932. this.set('rasterLayer', d, !0)
  4933. }
  4934. }
  4935. },
  4936. ina: function (a) {
  4937. a || (a = {})
  4938. if (a.hasOwnProperty('defaultLayer')) {
  4939. a.layers = [a.defaultLayer]
  4940. var b = a.defaultLayer
  4941. b.GP = !0
  4942. this.set('defaultLayer', b, !0)
  4943. }
  4944. a.layers && 0 !== a.layers.length ? this.set('defaultLayer', a.layers[0], !0) : ((b = new z.o.rb({ innerLayer: !0 })), (a.layers = [b]), (b.GP = !0), this.set('defaultLayer', b, !0))
  4945. if ((b = a.view))
  4946. b.w.rotation && (a.rotation = b.w.rotation),
  4947. b.w.center && (a.center = b.w.center),
  4948. b.w.zoom && (a.zoom = Math.max(a.zooms[0], Math.min(a.zooms[1], b.w.zoom))),
  4949. b.w.crs && (a.crs = b.w.crs)
  4950. a.level && !a.zoom && (a.zoom = a.level)
  4951. return a
  4952. },
  4953. setLimitBounds: function (a) {
  4954. g.c.add(this, 'setLimitBounds')
  4955. a instanceof g.tp && ((a.C = !0), (a = a.toBounds()), (a.C = !1))
  4956. a instanceof g.oe || (a = null)
  4957. this.set('limitBounds', a)
  4958. },
  4959. clearLimitBounds: function () {
  4960. g.c.add(this, 'clearLimitBounds')
  4961. this.set('limitBounds', null)
  4962. },
  4963. getLimitBounds: function () {
  4964. g.c.add(this, 'getLimitBounds')
  4965. return this.get('limitBounds', null, !0)
  4966. },
  4967. PH: function (a) {
  4968. var b = this.get('layers')
  4969. if (!(0 <= g.a.indexOf(b, a)) && (b.push(a), this.set('layers', b), a.xB)) {
  4970. a = a.getLayers()
  4971. for (var b = -1, c = a.length; ++b < c; ) {
  4972. var d = a[b]
  4973. d instanceof z.o.Yb || !d.setMap || d.setMap(this)
  4974. }
  4975. }
  4976. },
  4977. sC: function (a) {
  4978. var b = this.get('overlays')
  4979. 0 <= g.a.indexOf(b, a) ||
  4980. (a instanceof z.B.Tn
  4981. ? (this.get('overlays').push(a), this.ry instanceof z.B.Tn && ((this.ry.C = !0), this.ry.close(), (this.ry.C = !1)), (this.ry = a), this.set('contextmenu', a, !0))
  4982. : (a instanceof z.B.Ye && (this.rm instanceof z.B.Ye && this.Jz(this.rm), (this.rm = a)), this.get('overlays').push(a)),
  4983. this.q('overlays'))
  4984. },
  4985. sk: function (a) {
  4986. var b = this.get('layers'),
  4987. c = g.a.indexOf(b, a)
  4988. if (-1 !== c) {
  4989. if (a.xB)
  4990. for (c = b.length; -1 < --c; ) {
  4991. var d = b[c]
  4992. ;(d.YA !== a && d !== a) || b.splice(c, 1)
  4993. }
  4994. else a.YA && a.YA.Tka(a), (b = g.a.Fo(b, c))
  4995. this.set('layers', b)
  4996. if (a.xB) for (a = a.getLayers(), b = -1, c = a.length; ++b < c; ) (d = a[b]), d instanceof z.o.Yb || !d.setMap || d.setMap()
  4997. }
  4998. },
  4999. getZooms: function () {
  5000. return this.get('zooms', null, !0)
  5001. },
  5002. setZooms: function (a) {
  5003. return this.set('zooms', a, !0)
  5004. },
  5005. Jz: function (a) {
  5006. var b = this.get('overlays')
  5007. this.set('overlays', g.a.Fo(b, g.a.indexOf(b, a)))
  5008. },
  5009. getTileCoordByLngLat: function (a, b, c) {
  5010. b = b || 256
  5011. this.C = !0
  5012. c = c || Math.round(this.getZoom())
  5013. this.C = !1
  5014. a = this.kc(a, c)
  5015. c = new g.pr(c, Math.floor(a.x / b), Math.floor(a.y / b))
  5016. c.aD = a.x % b
  5017. c.bD = a.y % b
  5018. return c
  5019. },
  5020. setZoom: function (a, b) {
  5021. g.c.add(this, 'setZoom')
  5022. a = this.gD(a)
  5023. var c = this.get('zooms')
  5024. a > c[1] && (a = c[1])
  5025. a < c[0] && (a = c[0])
  5026. this.get('zoomEnable') && (b || !this.loaded ? (this.set('zoom', a), this.q('zoomstart'), this.q('zoomchange'), this.q('zoomend')) : this.set('zoomSlow', a))
  5027. },
  5028. getZoom: function (a) {
  5029. g.c.add(this, 'getZoom')
  5030. return a ? this.get('zoom', null, !0) : this.gD(this.get('targetLevel') || this.get('zoom', null, !0))
  5031. },
  5032. getCenter: function () {
  5033. g.c.add(this, 'getCenter')
  5034. return this.get('center', null, !0)
  5035. },
  5036. setCenter: function (a, b) {
  5037. g.c.add(this, 'setCenter')
  5038. a = g.a.Ka(a)
  5039. b || !this.loaded ? (this.q('movestart'), this.set('center', a), this.q('mapmove'), this.map ? this.map.q('moveend') : this.q('moveend')) : ((this.C = !0), this.panTo(a), (this.C = !1))
  5040. },
  5041. getCoordsBound: function () {
  5042. return this.view.jm()
  5043. },
  5044. getCoordsBoundByZoom: function (a) {
  5045. return this.view.nqa(a)
  5046. },
  5047. setRotation: function () {
  5048. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0
  5049. g.c.add(this, 'setRotation')
  5050. !g.l.Ue && this.get('rotateEnable') && this.set('rotation', a)
  5051. },
  5052. getRotation: function () {
  5053. g.c.add(this, 'getRotation')
  5054. return this.get('rotation')
  5055. },
  5056. setPitch: function (a) {
  5057. g.c.add(this, 'setPitch')
  5058. a = Math.min(this.get('maxPitch'), Math.max(a, 0))
  5059. '3D' === this.view.type && this.get('pitchEnable') && this.set('pitch', a)
  5060. },
  5061. getPitch: function () {
  5062. g.c.add(this, 'getRotation')
  5063. return '3D' === this.view.type ? this.get('pitch') : 0
  5064. },
  5065. getStatus: function () {
  5066. g.c.add(this, 'getStatus')
  5067. for (
  5068. var a = 'isHotspot pitchEnable dragEnable zoomEnable keyboardEnable jogEnable doubleClickZoom scrollWheel resizeEnable touchZoom rotateEnable animateEnable'.split(' '), b = {}, c = 0;
  5069. c < a.length;
  5070. c += 1
  5071. )
  5072. b[a[c]] = this.get(a[c], null, !0)
  5073. return b
  5074. },
  5075. setStatus: function (a) {
  5076. g.c.add(this, 'setStatus')
  5077. for (var b in a)
  5078. a.hasOwnProperty(b) &&
  5079. -1 !==
  5080. 'isHotspot,pitchEnable,dragEnable,keyboardEnable,doubleClickZoom,scrollWheel,zoomEnable,jogEnable,continuousZoomEnable,resizeEnable,animateEnable,rotateEnable,touchZoom'.indexOf(
  5081. b
  5082. ) &&
  5083. this.set(b, a[b])
  5084. },
  5085. getResolution: function (a, b) {
  5086. g.c.add(this, 'getResolution')
  5087. var c = (a = g.a.Ka(a)) ? a.Q : this.get('center', null, !0).Q
  5088. return this.mj.nq(b || this.get('zoom')) * Math.cos((c * Math.PI) / 180)
  5089. },
  5090. getScale: function (a) {
  5091. g.c.add(this, 'getScale')
  5092. this.C = !0
  5093. a = (this.getResolution() * (a || 96)) / 0.0254
  5094. this.C = !1
  5095. return a
  5096. },
  5097. getDefaultCursor: function () {
  5098. g.c.add(this, 'getDefaultCursor')
  5099. return this.get('defaultCursor', null, !0) || 'url(' + g.r.Gb + '/theme/v1.3/openhand.cur),default'
  5100. },
  5101. setDefaultCursor: function (a) {
  5102. g.c.add(this, 'setDefaultCursor')
  5103. return this.set('defaultCursor', a, !0)
  5104. },
  5105. zoomIn: function (a) {
  5106. g.c.add(this, 'zoomIn')
  5107. this.C = !0
  5108. this.setZoom(this.getZoom() + 1, a)
  5109. this.C = !1
  5110. },
  5111. zoomOut: function (a) {
  5112. g.c.add(this, 'zoomOut')
  5113. this.C = !0
  5114. this.setZoom(this.getZoom() - 1, a)
  5115. this.C = !1
  5116. },
  5117. gD: function (a) {
  5118. return this.view && '3D' === this.view.type ? g.a.wb(a, 4) : Math.round(a)
  5119. },
  5120. setZoomAndCenter: function (a, b, c) {
  5121. g.c.add(this, 'setZoomAndCenter')
  5122. b = g.a.Ka(b)
  5123. a = this.gD(a)
  5124. var d = this.get('zooms')
  5125. a > d[1] && (a = d[1])
  5126. a < d[0] && (a = d[0])
  5127. this.C = !0
  5128. this.loaded ? this.set('zoomAndCenter', [a, b, c]) : (this.setZoom(a, !0), this.setCenter(b, !0))
  5129. this.C = !1
  5130. },
  5131. clearMap: function () {
  5132. g.c.add(this, 'clearMap')
  5133. for (var a = this.get('overlays'), b = 0; b < a.length; b += 1) a[b].set('map', null, !0)
  5134. this.set('overlays', [])
  5135. if (this.map && this.map.la)
  5136. for (a = this.map.la, b = a.length - 1; 0 <= b; b -= 1)
  5137. if (a[b].S instanceof z.o.ML) {
  5138. var c = a[b].S
  5139. c.C = !0
  5140. c.setMap(null)
  5141. c.C = !1
  5142. }
  5143. },
  5144. destroy: function () {
  5145. g.c.add(this, 'destroy')
  5146. this.qm && (this.qm.setMap(), (this.indoorMap = this.qm = null))
  5147. this.set('overlays', [])
  5148. this.set('defaultLayer', null)
  5149. this.set('layers', [])
  5150. var a = this.get('controls')
  5151. a.remove = []
  5152. for (var b in a.Ld) a.Ld.hasOwnProperty(b) && a.remove.push(a.Ld[b])
  5153. a.Ld = []
  5154. a.add = []
  5155. this.set('controls', a)
  5156. this.set('destroy', !0)
  5157. this.Ra = !1
  5158. this.yl()
  5159. this.w = this.K = null
  5160. this.Gc && this.Gc.yl()
  5161. this.Gc = null
  5162. this.view && this.view.yl()
  5163. this.view = null
  5164. this.ti()
  5165. z.Rb.Pt--
  5166. },
  5167. addControl: function (a) {
  5168. g.c.add(this, 'addControl')
  5169. var b = g.a.yb(a),
  5170. c = this.get('controls') || {}
  5171. c.Ld = c.Ld || {}
  5172. c.Ld[b] || (c.Ld[b] = a)
  5173. c.add = c.add || []
  5174. c.add.push(a)
  5175. this.set('controls', c)
  5176. },
  5177. removeControl: function (a) {
  5178. g.c.add(this, 'removeControl')
  5179. var b = g.a.yb(a),
  5180. c = this.get('controls') || {}
  5181. c.Ld = c.Ld || {}
  5182. c.Ld[b] && delete c.Ld[b]
  5183. c.remove = c.remove || []
  5184. c.remove.push(a)
  5185. this.set('controls', c)
  5186. },
  5187. clearControl: function () {
  5188. g.c.add(this, 'clearControl')
  5189. var a = this.get('controls') || {}
  5190. a.remove = a.remove || []
  5191. a.Ld = a.Ld || {}
  5192. for (var b in a.Ld) a.Ld.hasOwnProperty(b) && (a.remove.push(a.Ld[b]), delete a.Ld[b])
  5193. this.set('controls', a)
  5194. },
  5195. plugin: function (a, b) {
  5196. g.c.add(this, 'plugin')
  5197. 'string' === typeof a && (a = [a])
  5198. for (var c = [], d = 0; d < a.length; d += 1) {
  5199. var e = a[d].split('.')
  5200. 2 < e.length || (2 == e.length ? 'AMap' === e[0] && (window.AMap[e[1]] || c.push(a[d])) : c.push(a[d]))
  5201. }
  5202. if (0 === c.length) return b(), this
  5203. g.tb.Fg(c, b)
  5204. return this
  5205. },
  5206. clearInfoWindow: function () {
  5207. g.c.add(this, 'clearInfoWindow')
  5208. var a = this.get('overlays')
  5209. a && 0 !== a.length && this.rm && ((this.rm.C = !0), this.rm.close(), (this.rm.C = !1))
  5210. },
  5211. remove: function (a) {
  5212. g.c.add(this, 'remove')
  5213. a instanceof Array || (a = [a])
  5214. for (var b = 0; b < a.length; b += 1) {
  5215. var c = a[b]
  5216. c.C = !0
  5217. c.getMap && c.getMap() === this && (c.close ? c.close() : c.setMap && c.setMap(null))
  5218. c.C = !1
  5219. }
  5220. },
  5221. add: function (a) {
  5222. g.c.add(this, 'add')
  5223. a instanceof Array || (a = [a])
  5224. for (var b = 0; b < a.length; b += 1) {
  5225. var c = a[b]
  5226. c.C = !0
  5227. if (c.getMap && c.getMap() !== this)
  5228. if (c.open) continue
  5229. else c.setMap && c.setMap(this)
  5230. c.C = !1
  5231. }
  5232. },
  5233. getAllOverlays: function (a, b) {
  5234. g.c.add(this, 'getAllOverlays')
  5235. var c = this.get('overlays')
  5236. if (a) {
  5237. for (var d = 'amap.' + a.toLowerCase(), e = [], f = 0; f < c.length; f += 1) d !== c[f].CLASS_NAME.toLowerCase() || (!b && (c[f].Da || c[f].isOfficial)) || e.push(c[f])
  5238. return e
  5239. }
  5240. if (!b) {
  5241. e = []
  5242. for (f = 0; f < c.length; f += 1) c[f].Da || c[f].isOfficial || e.push(c[f])
  5243. c = e
  5244. }
  5245. d = this.get('layers')
  5246. e = []
  5247. if (d) for (var f = 0, h = d.length; f < h; f += 1) d[f] instanceof z.o.ML && e.push(d[f]), d[f].kb && (e = e.concat(d[f].kb))
  5248. return c.concat(e)
  5249. },
  5250. triggerResize: function () {
  5251. this.map && this.map.WO()
  5252. },
  5253. refreshSize: function () {
  5254. this.eG = this.W3()
  5255. },
  5256. W3: function () {
  5257. return g.f.S3(this.K)
  5258. },
  5259. getSize: function () {
  5260. g.c.add(this, 'getSize')
  5261. ;(!this.eG || 10 > this.eG.width * this.eG.height) && this.refreshSize()
  5262. return this.eG
  5263. },
  5264. getContainer: function () {
  5265. g.c.add(this, 'getContainer')
  5266. return this.K
  5267. },
  5268. panTo: function (a) {
  5269. g.c.add(this, 'panTo')
  5270. a = g.a.Ka(a)
  5271. this.loaded ? this.set('panTo', a) : ((this.C = !0), this.setCenter(a), (this.C = !1))
  5272. },
  5273. panBy: function (a, b, c) {
  5274. g.c.add(this, 'panBy')
  5275. this.C = !0
  5276. var d = (this.get('rotation') * Math.PI) / 180,
  5277. e = a * Math.cos(d) + Math.sin(d) * b
  5278. a = -Math.sin(d) * a + Math.cos(d) * b
  5279. b = this.loaded && this.map && this.map.Fd ? this.map.Fd.E9 : this.get('centerCoords')
  5280. d = Math.pow(2, 20 - this.getZoom())
  5281. e = b.add(new g.H(-e * d, -a * d))
  5282. e = this.Od(e)
  5283. !this.loaded || c ? this.setCenter(e, c) : this.set('panTo', e)
  5284. this.C = !1
  5285. },
  5286. setFitView: function (a, b, c, d) {
  5287. g.c.add(this, 'setFitView')
  5288. this.C = !0
  5289. var e = this.get('size'),
  5290. f = e.height
  5291. if (!e.width || !f) return !0
  5292. if ((a = this.q4(a))) {
  5293. if ((c = this.bJ(a, 0, new g.H(40, 40), c, d)))
  5294. (b = b || !this.getBounds().contains(a.xi()) || (g.l.ba && 1 < Math.abs(c[0] + this.get('zoom', null, !0)))), this.setZoomAndCenter(c[0], c[1], b)
  5295. this.C = !1
  5296. return a
  5297. }
  5298. },
  5299. q4: function (a) {
  5300. if (a)
  5301. if (a instanceof z.B.Eh) a = [a]
  5302. else {
  5303. if (!(a instanceof Array)) return null
  5304. }
  5305. else (this.C = !0), (a = this.getAllOverlays()), (this.C = !1)
  5306. if (a) {
  5307. for (var b, c = 0; c < a.length; c += 1) {
  5308. var d = a[c]
  5309. if (d.get('visible') && !(d instanceof z.B.Ye || d instanceof z.B.Tn)) {
  5310. d.C = !0
  5311. var e = d.getBounds()
  5312. d.C = !1
  5313. e && (b = b ? b.rza(e) : e.cb())
  5314. }
  5315. }
  5316. return b
  5317. }
  5318. },
  5319. getBounds: function (a) {
  5320. g.c.add(this, 'getBounds')
  5321. var b = this.view.Kd()
  5322. return a && b.toBounds ? ((b.C = !0), (a = b.toBounds()), (b.C = !1), a) : b
  5323. },
  5324. setBounds: function (a, b, c, d, e, f) {
  5325. g.c.add(this, 'setBounds')
  5326. c = this.bJ(a, b, c, e, f)
  5327. d = d || (g.l.ba && 1 < Math.abs(c[0] + b - this.get('zoom', null, !0)))
  5328. this.C = !0
  5329. this.setZoomAndCenter(c[0], c[1], d)
  5330. this.C = !1
  5331. return a
  5332. },
  5333. c4: function (a, b, c, d, e) {
  5334. a = this.q4(a)
  5335. return this.bJ(a, b, c, d, e)
  5336. },
  5337. getCoordsBoundByZoomIn3D: function (a) {
  5338. this.UH || (this.UH = new g.qM())
  5339. this.C = !0
  5340. var b = this.getRotation(),
  5341. c = this.getPitch(),
  5342. d = this.getSize(!0).cb()
  5343. this.C = !1
  5344. a = { size: d, zoom: a, rotation: b, pitch: c, centerCoords: this.get('centerCoords') }
  5345. this.UH.jf(a, !0)
  5346. this.UH.ir()
  5347. return this.UH.jm()
  5348. },
  5349. bJ: function (a, b, c, d, e) {
  5350. b = b ? Number(b) : 0
  5351. this.C = !0
  5352. var f = this.getRotation(),
  5353. h = this.getPitch(),
  5354. k = this.getSize(!0).cb(),
  5355. l = this.view.type
  5356. this.C = !1
  5357. var m = a.pR(this)
  5358. a = a.sR(this)
  5359. this.wC || (this.wC = '3D' === l ? new g.qM() : new g.NF())
  5360. this.wC.jf({ size: k, zoom: 3, rotation: f, pitch: h, centerCoords: m }, !0)
  5361. var n = (h = 0)
  5362. d ? ((n = d[0]), (c = d[1]), (h = d[2]), (d = d[3]), (k.width -= h + d), (k.height -= n + c), (h = (h - d) / 2), (n = (n - c) / 2)) : c && ((k.width -= 2 * c.x), (k.height -= 2 * c.y))
  5363. e = e || (g.l.ba ? 17 : 18)
  5364. c = this.get('zooms')
  5365. d = c[0]
  5366. var p = Infinity,
  5367. q = Infinity
  5368. do {
  5369. this.wC.jf({ zoom: d }, !0)
  5370. '3D' === l && this.wC.ir()
  5371. for (var q = (p = Infinity), r = -Infinity, s = -Infinity, u = 0; u < a.length; u += 1)
  5372. var v = this.wC.Xd(a[u]), p = Math.min(p, v.x), r = Math.max(r, v.x), q = Math.min(q, v.y), s = Math.max(s, v.y)
  5373. p = r - p
  5374. q = s - q
  5375. if (p > k.width || q > k.height) {
  5376. d -= 1
  5377. break
  5378. }
  5379. d += 1
  5380. } while (d <= c[1])
  5381. d = Math.min(c[1], e, Math.max(c[0], d + b))
  5382. d = Math.floor(d)
  5383. b = Math.pow(2, 20 - d)
  5384. e = (f * Math.PI) / 180
  5385. f = h * Math.cos(e) + Math.sin(e) * n
  5386. e = -Math.sin(e) * h + Math.cos(e) * n
  5387. m = m.ab(new g.H(f * b, e * b))
  5388. m = this.Wh(m, 20)
  5389. return [d, m]
  5390. },
  5391. setLayers: function (a) {
  5392. g.c.add(this, 'setLayers')
  5393. for (var b = 0; b < a.length; b += 1) a[b].set('map', this, !0)
  5394. this.set('layers', a)
  5395. },
  5396. getLayers: function () {
  5397. g.c.add(this, 'getLayers')
  5398. var a = this.get('layers', null, !0),
  5399. a = a.slice()
  5400. if (this.C) {
  5401. for (var b = [], c = -1, d = a.length; ++c < d; ) {
  5402. var e = a[c]
  5403. if (e.xB)
  5404. for (var e = e.getLayers(), f = -1, h = e.length; ++f < h; ) {
  5405. var k = e[f]
  5406. k instanceof z.o.Yb && -1 === g.a.indexOf(a, k) && b.push(k)
  5407. }
  5408. }
  5409. a = a.concat(b)
  5410. } else for (b = a.length; -1 < --b; ) a[b].YA && a.splice(b, 1)
  5411. return a
  5412. },
  5413. getDefaultLayer: function () {
  5414. g.c.add(this, 'getDefaultLayer')
  5415. return this.get('defaultLayer', null, !0)
  5416. },
  5417. setDefaultLayer: function (a) {
  5418. if (a) {
  5419. g.c.add(this, 'setDefaultLayer')
  5420. this.C = !0
  5421. a.GP = !0
  5422. var b = this.get('defaultLayer'),
  5423. c = this.get('layers')
  5424. if (b) {
  5425. if (a === b) {
  5426. a.setMap(this)
  5427. return
  5428. }
  5429. b.GP = !1
  5430. c = g.a.Fo(c, g.a.indexOf(c, b))
  5431. }
  5432. this.set('defaultLayer', a, !0)
  5433. a.C = !0
  5434. ;-1 === g.a.indexOf(c, a) && c.push(a)
  5435. a.C = !1
  5436. this.setLayers(c)
  5437. this.C = !1
  5438. }
  5439. },
  5440. pixelToLngLat: function (a, b) {
  5441. g.c.add(this, 'pixelToLngLat')
  5442. return this.Wh(a, b)
  5443. },
  5444. lnglatToPixel: function (a, b) {
  5445. g.c.add(this, 'lnglatToPixel')
  5446. return this.kc(a, b)
  5447. },
  5448. drawPolyline: function (a) {
  5449. g.c.add(this, 'drawPolyline')
  5450. this.set('draw', 'polyline')
  5451. this.set('drawStyle', a || { strokeColor: '#006600', pb: 0.9 })
  5452. },
  5453. render: function (a) {
  5454. g.c.add(this, 'render')
  5455. this.map && this.map.set('display', a ? 1 : 0)
  5456. },
  5457. setMask: function (a) {
  5458. g.c.add(this, 'setMask')
  5459. this.set('mask', a)
  5460. this.map && ((this.map.UJ = !0), this.map.set('display'))
  5461. },
  5462. drawPolygon: function (a) {
  5463. g.c.add(this, 'drawPolygon')
  5464. this.set('draw', 'polygon')
  5465. this.set('drawStyle', a || { strokeColor: '#006600', pb: 0.9, fillColor: '#FFAA00', le: 0.9 })
  5466. },
  5467. drawCircle: function (a) {
  5468. g.c.add(this, 'drawCircle')
  5469. this.set('draw', 'circle')
  5470. this.set('drawStyle', a || { strokeColor: '#006600', pb: 0.9, fillColor: '#006600', le: 0.9 })
  5471. },
  5472. rD: function () {
  5473. return this.view.rD()
  5474. },
  5475. getCameraState: function () {
  5476. g.c.add(this, 'getCameraState')
  5477. if (this.view && '3D' == this.view.type) return this.view.R3()
  5478. },
  5479. endDraw: function () {
  5480. this.set('draw', null)
  5481. },
  5482. isGoogleTileVisible: function () {
  5483. return this.map.isForeignMapVisible()
  5484. },
  5485. isForeignMapVisible: function () {
  5486. if (this.get('gridForeignMap') || this.get('vectorForeignMap')) return this.map && this.map.xga()
  5487. },
  5488. Xd: function (a, b, c) {
  5489. g.c.add(this, 'p20ToContainer')
  5490. return this.view.Xd(a, b, c)
  5491. },
  5492. yg: function (a, b, c) {
  5493. g.c.add(this, 'containerToP20')
  5494. return this.view.yg(a, b, c)
  5495. },
  5496. getObject3DByContainerPos: function (a, b, c) {
  5497. g.c.add(this, 'getObject3DByContainerPos')
  5498. if ('2D' === this.view.type || !this.map || !this.map.J) return null
  5499. this.C = !0
  5500. this.view.yg(a)
  5501. var d = this.view.V3(a),
  5502. e = this.map.J.OT,
  5503. f = this.view.cc,
  5504. h = this.get('zoom', null, !0),
  5505. h = Math.pow(2, 20 - h)
  5506. b = b || this.getLayers()
  5507. this.C = !1
  5508. for (var k = [], l = 0; l < b.length; l += 1) {
  5509. var m = b[l]
  5510. m instanceof z.o.Nm && (m = m.kp(e, d, f, h, a)) && k.push(m)
  5511. }
  5512. return c
  5513. ? k
  5514. : k.length
  5515. ? (k.sort(function (a, b) {
  5516. return a.Td - b.Td
  5517. }),
  5518. { index: k[0].index, point: k[0].kE, distance: k[0].Td, object: k[0].object })
  5519. : null
  5520. },
  5521. eJ: function (a) {
  5522. var b = this.get('layers', null, !0),
  5523. b = b.slice()
  5524. if (this.C) {
  5525. for (var c = [], d = -1, e = b.length; ++d < e; ) {
  5526. var f = b[d]
  5527. if (f.xB)
  5528. for (var f = f.yEa(), h = -1, k = f.length; ++h < k; ) {
  5529. var l = f[h]
  5530. ;-1 === g.a.indexOf(b, l) && c.push(l)
  5531. }
  5532. }
  5533. b = b.concat(c)
  5534. }
  5535. return b.filter(function (b) {
  5536. return b instanceof z.o.Nm && (a ? -1 < a.indexOf(b) : !0)
  5537. })
  5538. },
  5539. queryObjectIndexFromFboByContainerPos: function (a, b) {
  5540. g.c.add(this, 'queryObjectIndexFromFboByContainerPos')
  5541. if ('2D' === this.view.type || !this.map || !this.map.J) return null
  5542. var c = this.diffFilterLayers(b),
  5543. d = this.eJ(b),
  5544. e = this.getSize()
  5545. if (c) (this.YG = this.view.Le.cb()), (this.XG = this.view.cc.cb())
  5546. else if (this.YG && this.XG) {
  5547. if (((c = this.XG.Yu(this.view.cc)), (c = !(this.YG.Yu(this.view.Le) && c)))) (this.YG = this.view.Le.cb()), (this.XG = this.view.cc.cb())
  5548. } else (this.YG = this.view.Le.cb()), (this.XG = this.view.cc.cb())
  5549. if (c) this.map.Pq(d)
  5550. else {
  5551. for (var f = 0; f < d.length; f += 1) {
  5552. var h = d[f]
  5553. if (h instanceof z.o.Nm && h.Ora()) {
  5554. c = !0
  5555. break
  5556. }
  5557. }
  5558. c && this.map.Pq(d)
  5559. }
  5560. return this.map.Oy().gwa(a, e)
  5561. },
  5562. diffFilterLayers: function (a) {
  5563. a = a || []
  5564. if (!this.ju || this.ju.length !== a.length) return (this.ju = a ? a.slice(0) : []), !0
  5565. for (var b = 0; b < this.ju.length; ) {
  5566. if (this.ju[b] !== a[b]) return (this.ju = a ? a.slice(0) : []), !0
  5567. b++
  5568. }
  5569. this.ju = a ? a.slice(0) : []
  5570. },
  5571. })
  5572. z.Rb.Xb({
  5573. LJ: 'lngLatToGeodeticCoord',
  5574. kqa: 'geodeticCoordToLngLat',
  5575. bJ: 'getFitZoomAndCenterByBounds',
  5576. c4: 'getFitZoomAndCenterByOverlays',
  5577. Ls: 'lnglatTocontainer',
  5578. lnglatTocontainer: 'lngLatToContainer',
  5579. $p: 'containTolnglat',
  5580. containTolnglat: 'containerToLngLat',
  5581. Bb: 'lngLatToP20',
  5582. Od: 'p20ToLngLat',
  5583. Xd: 'p20ToContainer',
  5584. yg: 'containerToP20',
  5585. kc: 'project',
  5586. Wh: 'unproject',
  5587. queryObjectIndexFromFboByContainerPos: 'pickObject3DByContainerPos',
  5588. })
  5589. z.Rb.Hb({
  5590. isHotspotChanged: function () {
  5591. if ('undefined' !== typeof this.uD && (this.Ina(), this.get('isHotspot'))) {
  5592. var a = this.get('layers', null, !0)
  5593. a && a.length && !this.uD && this.YJ && this.Xua()
  5594. }
  5595. },
  5596. Xua: function () {
  5597. if (this.hk) this.c5()
  5598. else {
  5599. var a = this
  5600. this.C = !0
  5601. this.plugin('AMap.HotSpot', function () {
  5602. if (!a.uD) {
  5603. if (!a.hk) {
  5604. var b = new g.bi()
  5605. new z.B.Ye({ innerOverlay: !0 })
  5606. a.hk = b
  5607. }
  5608. a.c5()
  5609. }
  5610. })
  5611. this.C = !1
  5612. }
  5613. },
  5614. Ina: function () {
  5615. this.hk && this.Sra()
  5616. },
  5617. m7: function (a) {
  5618. a.type = 'hotspotover'
  5619. a.isIndoorPOI = !1
  5620. this.q('hotspotover', a)
  5621. },
  5622. k7: function (a) {
  5623. a.type = 'hotspotclick'
  5624. a.isIndoorPOI = !1
  5625. this.q('hotspotclick', a)
  5626. },
  5627. l7: function (a) {
  5628. a.type = 'hotspotout'
  5629. a.isIndoorPOI = !1
  5630. this.q('hotspotout', a)
  5631. },
  5632. c5: function () {
  5633. var a = this.hk
  5634. this.hk.C = !0
  5635. this.hk.setMap(this)
  5636. this.hk.C = !1
  5637. a.h('mouseover', this.m7, this)
  5638. a.h('click', this.k7, this)
  5639. a.h('mouseout', this.l7, this)
  5640. },
  5641. Sra: function () {
  5642. var a = this.hk
  5643. a.G('mouseover', this.m7, this)
  5644. a.G('click', this.k7, this)
  5645. a.G('mouseout', this.l7, this)
  5646. this.hk.C = !0
  5647. this.hk.setMap(null)
  5648. this.hk.C = !1
  5649. this.hk = null
  5650. },
  5651. })
  5652. z.event = {
  5653. Y: function (a, b, c, d) {
  5654. g.F.h(a, b, c, d)
  5655. return new g.sF(0, a, b, c, d)
  5656. },
  5657. Qla: function () {},
  5658. addListener: function (a, b, c, d) {
  5659. g.a.Ph(a.addListener) ? a.addListener(b, c, d) : (a.ve || (a.ve = g.va.ve), g.va.h.call(a, b, c, d))
  5660. return new g.sF(1, a, b, c, d)
  5661. },
  5662. by: function (a, b, c, d) {
  5663. g.a.Ph(a.by) ? a.by(b, c, d) : (a.ve || (a.ve = g.va.ve), g.va.h.call(a, b, c, d, !0))
  5664. return new g.sF(1, a, b, c, d)
  5665. },
  5666. kI: function (a) {
  5667. g.a.Ph(a.kI) ? a.kI() : g.va.ti.call(a)
  5668. },
  5669. Hu: function (a, b) {
  5670. g.a.Ph(a.Hu) ? a.Hu(b) : g.va.ti.call(a, b)
  5671. },
  5672. removeListener: function (a) {
  5673. a instanceof g.sF &&
  5674. (g.a.Ph(a.Ai.removeListener)
  5675. ? a.Ai.removeListener(a)
  5676. : 0 === a.type
  5677. ? g.F.G(a.Ai, a.VQ, a.cS, a.bf)
  5678. : 1 === a.type && (a.Ai.ve || (a.Ai.ve = g.va.ve), g.va.G.call(a.Ai, a.VQ, a.cS, a.bf)))
  5679. },
  5680. O: function (a, b) {
  5681. var c = Array.prototype.slice.call(arguments, 1)
  5682. g.a.Ph(a.O) ? a.O.apply(a, c) : (a.ve || (a.ve = g.va.ve), g.va.q.apply(a, c))
  5683. },
  5684. }
  5685. g.sF = g.da.extend({
  5686. A: function (a, b, c, d, e) {
  5687. this.type = a
  5688. this.Ai = b
  5689. this.VQ = c
  5690. this.cS = d
  5691. this.bf = e
  5692. },
  5693. })
  5694. var qc = {
  5695. Y: 'addDomListener',
  5696. Qla: 'addDomListenerOnce',
  5697. addListener: 'addListener',
  5698. by: 'addListenerOnce',
  5699. kI: 'clearInstanceListeners',
  5700. Hu: 'clearListeners',
  5701. removeListener: 'removeListener',
  5702. O: 'trigger',
  5703. },
  5704. rc
  5705. for (rc in qc) qc.hasOwnProperty(rc) && (z.event[qc[rc]] = z.event[rc])
  5706. g.event = z.event
  5707. z.o.Yb = g.da.extend({
  5708. ka: [g.va, g.Ze],
  5709. A: function (a) {
  5710. new Date().getTime()
  5711. this.CLASS_NAME = this.CLASS_NAME || 'AMap.Layer'
  5712. g.a.ub(this, a)
  5713. this.w.map && ((a = this.w.map), delete this.w.map, (this.w.map = a))
  5714. this.jf(this.w)
  5715. },
  5716. getContainer: function () {
  5717. g.c.add(this, 'getContainer')
  5718. if (this.o && this.o.M) return this.o.M.uj()
  5719. },
  5720. getZooms: function () {
  5721. return this.get('zooms', null, !0)
  5722. },
  5723. setOpacity: function (a) {
  5724. g.c.add(this, 'setOpacity')
  5725. a !== this.get('opacity', null, !0) && this.set('opacity', a)
  5726. },
  5727. getOpacity: function () {
  5728. return this.get('opacity', null, !0)
  5729. },
  5730. show: function () {
  5731. g.c.add(this, 'show')
  5732. this.set('visible', !0)
  5733. if (this.Gq) {
  5734. var a = this.get('map', null, !0)
  5735. a && a.set('layers', a.get('layers', null, !0))
  5736. }
  5737. },
  5738. hide: function () {
  5739. g.c.add(this, 'hide')
  5740. this.set('visible', !1)
  5741. if (this.Gq) {
  5742. var a = this.get('map', null, !0)
  5743. a && a.set('layers', a.get('layers', null, !0))
  5744. }
  5745. },
  5746. setMap: function (a) {
  5747. g.c.add(this, 'setMap')
  5748. var b = this.get('map')
  5749. if (a) b && a !== b && b.sk(this), this.set('map', a)
  5750. else if (b && (b.sk(this), this.set('map', null, !0), (this.qi = !1), this.gg && this.gg(), this.onRemove)) this.onRemove()
  5751. },
  5752. getMap: function () {
  5753. g.c.add(this, 'getMap')
  5754. return this.get('map', null, !0)
  5755. },
  5756. mapChanged: function () {
  5757. var a = this.get('map')
  5758. a && a.PH(this)
  5759. },
  5760. setzIndex: function (a) {
  5761. g.c.add(this, 'setzIndex')
  5762. this.set('zIndex', a)
  5763. },
  5764. getzIndex: function () {
  5765. return this.get('zIndex', null, !0)
  5766. },
  5767. })
  5768. z.o.rb = z.o.Yb.extend({
  5769. w: {
  5770. tileSize: 256,
  5771. visible: !0,
  5772. opacity: 1,
  5773. zIndex: 0,
  5774. noLimg: 1,
  5775. zooms: [3, 20],
  5776. getTileUrl: g.l.ba ? g.r.TE : g.r.OD,
  5777. errorUrl: g.a.wpa,
  5778. detectRetina: !0,
  5779. className: 'amap-layer',
  5780. mapNumber: '',
  5781. merge: !1,
  5782. sort: !1,
  5783. cacheSize: g.l.size,
  5784. },
  5785. A: function (a) {
  5786. this.CLASS_NAME = this.CLASS_NAME || 'AMap.TileLayer'
  5787. g.c.ya(this, a)
  5788. ;(a = a || {}) && a.tileUrl && (a.getTileUrl = a.tileUrl)
  5789. this.pna(a)
  5790. var b = a.zooms
  5791. b && b[1] >= this.ol[0] ? (b[0] < this.ol[0] && (b[0] = this.ol[0]), b[1] > this.ol[1] && (b[1] = this.ol[1])) : (a.zooms = [this.ol[0], this.ol[1]])
  5792. arguments.callee.ma.call(this, a)
  5793. a.Sv && (this.Sv = !0)
  5794. this.FG = this.vq()
  5795. },
  5796. setTextIndex: function (a) {
  5797. g.c.add(this, 'setTextIndex')
  5798. this.set('textIndex', a)
  5799. },
  5800. vq: function () {
  5801. if (this.get('createTile')) return !1
  5802. var a = this.get('getTileUrl')
  5803. return a && a !== g.r.OD && a !== g.r.TE ? !1 : !0
  5804. },
  5805. v2: function () {
  5806. if (!this.vq()) return !1
  5807. var a = this.get('map')
  5808. return a && a.Bi && 'zh_cn' === a.get('lang') && !this.noVector ? !0 : !1
  5809. },
  5810. y4: function (a) {
  5811. var b = g.r.SJ
  5812. g.l.ja && this.get('detectRetina') && (b = g.r.SJ.replace('scl=1', 'scl=2'))
  5813. a && (b = b.replace('ltype=3', 'ltype=11'))
  5814. return b
  5815. },
  5816. bg: function (a) {
  5817. var b = this.v2(),
  5818. c = this.get('map')
  5819. this.vq() && this.set('mapNumber', 'GS(2019)6379')
  5820. if (this.Sv) return new g.o.rb(this, a, this.yr(this.y4(!0)), this.w.maxDataZoom, !0)
  5821. if (b)
  5822. if (((this.Gq = !0), g.o.ei)) {
  5823. if ('dv' === c.get('baseRender') && !this.get('watermark')) {
  5824. var b = c.get('showBuildingBlock'),
  5825. d = new g.o.rb(this, a, this.yr(this.y4(!b)), void 0, !0)
  5826. b &&
  5827. ((d.Hj = new g.o.od(new z.o.rb({ zooms: [16, 20], innerLayer: !0 }), a, ['building'])),
  5828. (d.Hj.type = '\u697c\u5757\u56fe\u5c42'),
  5829. d.Hj.af(['visible', 'opacity', 'zIndex'], d, !0),
  5830. d.Hj.AC(c.get('mapStyle') || 'normal'))
  5831. d.type = '\u6805\u683c\u5e95\u56fe'
  5832. return d
  5833. }
  5834. if ('v' <= c.get('baseRender') || this.get('watermark'))
  5835. return (
  5836. '3D' == a.D.view.type
  5837. ? ((c = new g.o.od(this, a, ['region', 'road'])),
  5838. (c.type = '\u77e2\u91cf\u5e95\u56fe'),
  5839. (b = new z.o.rb({ zooms: [17, 20], zIndex: 50, innerLayer: !0 })),
  5840. (c.Hj = new g.o.od(b, a, ['building'])),
  5841. (c.Hj.ff = 17),
  5842. (c.Hj.type = '\u697c\u5757\u56fe\u5c42'),
  5843. (c.Hj.Yy = 1),
  5844. c.Hj.af(['visible', 'merge', 'sort', 'opacity'], c, !0),
  5845. b.X('rejectMapMask', this, !0))
  5846. : ((c = new g.o.od(this, a, ['region', 'building', 'road'])), (c.type = '\u77e2\u91cf\u5e95\u56fe')),
  5847. (a.xma = c)
  5848. )
  5849. } else return ['vectorlayer', 'overlay']
  5850. else return (this.Gq = !1), new g.o.rb(this, a, null, this.w.maxDataZoom)
  5851. },
  5852. getTileUrlChanged: function () {
  5853. var a = this.get('getTileUrl')
  5854. if (a === g.r.OD || a === g.r.TE || a === g.r.OK) this.YJ = !0
  5855. 'string' === typeof a && (a = this.yr(a))
  5856. this.set('tileFun', a)
  5857. },
  5858. pna: function (a) {
  5859. this.ol || (this.ol = [this.w.zooms[0], this.w.zooms[1]])
  5860. var b
  5861. a.hasOwnProperty('detectRetina') && !1 === a.detectRetina && (b = !0)
  5862. g.l.ba && g.l.ja && this.w.detectRetina && !b && (this.ol[1] -= 1)
  5863. },
  5864. getTiles: function () {
  5865. g.c.add(this, 'getTiles')
  5866. var a = this.get('tiles', null, !0)
  5867. if (a && a.length) a = a[0]
  5868. else return []
  5869. for (var b = [], c, d = 0; d < a.length; d += 1) a[d].key && ((c = a[d].key.split('/')), b.push('' + c[1] + ',' + c[2]))
  5870. return b
  5871. },
  5872. reload: function () {
  5873. g.c.add(this, 'reload')
  5874. this.set('reload', 1)
  5875. },
  5876. $s: function () {
  5877. this.C = !0
  5878. var a = this.get('map', null, !0)
  5879. this.setMap(null)
  5880. this.qi = !1
  5881. this.setMap(a)
  5882. this.C = !1
  5883. },
  5884. setTileUrl: function (a) {
  5885. g.c.add(this, 'setTileUrl')
  5886. this.v2() ? (this.set('getTileUrl', a), this.$s()) : this.set('getTileUrl', a)
  5887. },
  5888. yr: function (a) {
  5889. var b = this,
  5890. c,
  5891. d,
  5892. e
  5893. return function (f, h, k) {
  5894. f = (f + Math.pow(2, k)) % Math.pow(2, k)
  5895. if ('number' !== typeof (f + h + k)) return null
  5896. var l = b.get('map'),
  5897. m = 'zh_cn'
  5898. l && (m = l.get('lang') || 'zh_cn')
  5899. k = a.replace('[x]', f).replace('[y]', h).replace('[z]', k).replace('[lang]', m)
  5900. if (!c) {
  5901. if ((d = a.match(/\{.*\}/))) (e = d.toString().replace('{', '').replace('}', '')), (e = e.split(','))
  5902. c = !0
  5903. }
  5904. e && e.length && (k = k.replace(d, e[Math.abs(f + h) % e.length]))
  5905. return k
  5906. }
  5907. },
  5908. getTileUrl: function (a, b, c) {
  5909. g.c.add(this, 'getTileUrl')
  5910. return this.get('tileFun', null, !0)(a, b, c)
  5911. },
  5912. getZooms: function (a) {
  5913. a || g.c.add(this, 'getZooms')
  5914. return this.get('zooms', null, !0)
  5915. },
  5916. })
  5917. z.o.rb.EW = z.o.rb.extend({
  5918. w: { getTileUrl: g.r.xU, zooms: [3, 20], zIndex: 2, maxDataZoom: 18, detectRetina: !1, mapNumber: 'GS(2021)4122', className: 'amap-layer amap-satellite', cacheSize: g.l.size },
  5919. A: function (a) {
  5920. this.CLASS_NAME = 'AMap.TileLayer.Satellite'
  5921. g.c.ya(this, a)
  5922. this.ol = [3, 20]
  5923. arguments.callee.ma.apply(this, arguments)
  5924. },
  5925. })
  5926. z.o.rb.AW = z.o.rb.extend({
  5927. w: { getTileUrl: g.r.OK, zooms: [3, 20], zIndex: 3, type: 'overlayer', maxDataZoom: 18, className: 'amap-layer amap-roadnet', cacheSize: g.l.size },
  5928. A: function (a) {
  5929. this.CLASS_NAME = 'AMap.TileLayer.RoadNet'
  5930. g.c.ya(this, a)
  5931. this.ol = [3, 20]
  5932. arguments.callee.ma.apply(this, arguments)
  5933. },
  5934. bg: function (a) {
  5935. if (this.get('map').Bi) {
  5936. this.Gq = !0
  5937. var b = g.r.PK
  5938. g.l.ja && this.get('detectRetina') && (b = g.r.PK.replace('scl=1', 'scl=2'))
  5939. a = new g.o.rb(this, a, this.yr(b), this.w.maxDataZoom)
  5940. } else (this.Gq = !1), (a = new g.o.rb(this, a))
  5941. return a
  5942. },
  5943. })
  5944. z.o.rb.MW = z.o.rb.extend({
  5945. w: {
  5946. getTileUrl: function (a, b, c) {
  5947. return g.r.tc + '://tm.amap.com/trafficengine/mapabc/traffictile?v=1.0&t=1&zoom=' + (17 - c) + '&x=' + a + '&y=' + b
  5948. },
  5949. zooms: [6, 20],
  5950. zIndex: 4,
  5951. type: 'overlayer',
  5952. autoRefresh: !1,
  5953. interval: 180,
  5954. maxDataZoom: 17,
  5955. alwaysRender: !g.l.j3,
  5956. className: 'amap-layer amap-traffic',
  5957. cacheSize: g.l.size,
  5958. },
  5959. A: function (a) {
  5960. this.CLASS_NAME = 'AMap.TileLayer.Traffic'
  5961. g.c.ya(this, a)
  5962. this.ol = [6, 20]
  5963. arguments.callee.ma.apply(this, arguments)
  5964. this.C = !0
  5965. this.startRefresh()
  5966. this.C = !1
  5967. },
  5968. stopRefresh: function () {
  5969. g.c.add(this, 'stopRefresh')
  5970. this.CK && (clearInterval(this.CK), (this.CK = null))
  5971. },
  5972. startRefresh: function () {
  5973. g.c.add(this, 'startRefresh')
  5974. if (this.get('autoRefresh') && !this.CK) {
  5975. var a = this
  5976. this.CK = setInterval(function () {
  5977. a.C = !0
  5978. a.reload()
  5979. a.C = !1
  5980. a.q('refresh')
  5981. }, Math.max(1e3 * (this.get('interval') || 180), 1e4))
  5982. }
  5983. },
  5984. reload: function () {
  5985. g.c.add(this, 'reload')
  5986. g.a.Wc(function () {
  5987. this.set('reload')
  5988. }, this)
  5989. },
  5990. gg: function () {
  5991. this.C = !0
  5992. this.stopRefresh()
  5993. this.get('map') && this.get('map').G('zoomstart', this.reload, this)
  5994. this.C = !1
  5995. },
  5996. bg: function (a) {
  5997. var b = this.get('map'),
  5998. b = a.D
  5999. b.h('zoomstart', this.reload, this)
  6000. return 'd' !== b.get('baseRender') ? (g.o.$w ? (a = new g.o.$w(this, a)) : ['vt']) : (a = new g.o.rb(this, a, null, this.w.maxDataZoom))
  6001. },
  6002. })
  6003. z.o.rb.yA = z.o.rb.extend({
  6004. w: { zooms: [3, 20], zIndex: 12, detectRetina: !1, className: 'amap-layer amap-flexible', cacheSize: g.l.size },
  6005. A: function (a) {
  6006. this.CLASS_NAME = this.CLASS_NAME || 'AMap.TileLayer.Flexible'
  6007. g.c.ya(this, a)
  6008. this.Isa = !0
  6009. arguments.callee.ma.call(this, a)
  6010. },
  6011. setCreateTile: function (a) {
  6012. g.c.add(this, 'setCreateTile')
  6013. 'function' === typeof a && a !== this.get('createTile') && this.set('createTile', a)
  6014. },
  6015. getCreateTile: function () {
  6016. return this.get('createTile', null, !0)
  6017. },
  6018. })
  6019. z.o.rb.Hba = z.o.rb.yA.extend({
  6020. w: { zooms: [3, 20], zIndex: 12, tileSize: 512, detectRetina: !1, className: 'amap-layer amap-wms', cacheSize: g.l.size, url: '', params: '' },
  6021. A: function (a) {
  6022. this.CLASS_NAME = 'AMap.TileLayer.WMS'
  6023. g.c.ya(this, a)
  6024. arguments.callee.ma.call(this, a)
  6025. this.zw()
  6026. var b = this,
  6027. c = this.get('tileSize')
  6028. this.set('createTile', function (a, e, f, h, k) {
  6029. var l = Math.pow(2, 20 - f) * c
  6030. f = new g.H(l * a, l * (e + 1))
  6031. a = new g.H(l * (a + 1), l * e)
  6032. e = g.RJ.t7(f)
  6033. a = g.RJ.t7(a)
  6034. var m = document.createElement('img')
  6035. '3D' === b.Uf && (m.crossOrigin = 'anonymous')
  6036. g.F.h(m, 'load', function () {
  6037. h(m)
  6038. })
  6039. g.F.h(m, 'error', function () {
  6040. k(m)
  6041. })
  6042. m.src = this.url + '&BBOX=' + e + ',' + a
  6043. })
  6044. },
  6045. zw: function () {
  6046. var a = this.get('url', null, !0),
  6047. b = this.get('params', null, !0),
  6048. c = this.get('tileSize')
  6049. b.WIDTH = c
  6050. b.HEIGHT = c
  6051. b.CRS = b.CRS || 'EPSG:3857'
  6052. b.REQUEST = 'GetMap'
  6053. b.SERVICE = 'WMS'
  6054. b.FORMAT = b.FORMAT || 'image/png'
  6055. b.TRANSPARENT = void 0 === b.TRANSPARENT ? 'true' : b.TRANSPARENT
  6056. delete b.BBOX
  6057. this.url = a + '?' + g.a.join(b, '&')
  6058. this.C = !0
  6059. this.reload()
  6060. this.C = !1
  6061. },
  6062. setUrl: function (a) {
  6063. g.c.add(this, 'setUrl')
  6064. this.set('url', a, !0)
  6065. this.zw()
  6066. },
  6067. getUrl: function () {
  6068. g.c.add(this, 'getUrl')
  6069. return this.get('url', null, !0)
  6070. },
  6071. setParams: function (a) {
  6072. g.c.add(this, 'setParams')
  6073. g.extend(this.get('params', null, !0), a || {})
  6074. this.zw()
  6075. },
  6076. getParams: function () {
  6077. g.c.add(this, 'getParams')
  6078. return this.get('params', null, !0)
  6079. },
  6080. })
  6081. z.o.rb.Iba = z.o.rb.yA.extend({
  6082. w: { zooms: [3, 20], tileSize: 256, zIndex: 12, detectRetina: !1, className: 'amap-layer amap-wmts', cacheSize: g.l.size },
  6083. A: function (a) {
  6084. this.CLASS_NAME = 'AMap.TileLayer.WMTS'
  6085. g.c.ya(this, a)
  6086. arguments.callee.ma.call(this, a)
  6087. this.zw()
  6088. var b = this
  6089. this.get('tileSize')
  6090. this.set('createTile', function (a, d, e, f, h) {
  6091. var k = document.createElement('img')
  6092. '3D' === b.Uf && (k.crossOrigin = 'anonymous')
  6093. g.F.h(k, 'load', function () {
  6094. f(k)
  6095. })
  6096. g.F.h(k, 'error', function () {
  6097. h(k)
  6098. })
  6099. k.src = this.url + '&TileMatrix=' + e + '&TileRow=' + d + '&TileCol=' + a
  6100. })
  6101. },
  6102. zw: function () {
  6103. var a = this.get('url', null, !0),
  6104. b = this.get('params', null, !0)
  6105. b.TileMatrixSet = b.TileMatrixSet || 'EPSG:3857'
  6106. b.Request = 'GetTile'
  6107. b.Service = 'WMTS'
  6108. b.Format = b.Format || 'image/png'
  6109. this.url = a + '?' + g.a.join(b, '&')
  6110. this.C = !0
  6111. this.reload()
  6112. this.C = !1
  6113. },
  6114. setUrl: function (a) {
  6115. g.c.add(this, 'setUrl')
  6116. this.set('url', a, !0)
  6117. this.zw()
  6118. },
  6119. getUrl: function () {
  6120. g.c.add(this, 'getUrl')
  6121. return this.get('url', null, !0)
  6122. },
  6123. setParams: function (a) {
  6124. g.c.add(this, 'setParams')
  6125. g.extend(this.get('params', null, !0), a || {})
  6126. this.zw()
  6127. },
  6128. getParams: function () {
  6129. g.c.add(this, 'getParams')
  6130. return this.get('params', null, !0)
  6131. },
  6132. })
  6133. z.o.rb.LL = z.o.rb.yA.extend({
  6134. w: { detectRetina: !0, zooms: [10, 18], zIndex: 2 },
  6135. A: function (a) {
  6136. arguments.callee.ma.apply(this, arguments)
  6137. var b = this
  6138. this.set('createTile', function (a, d, e, f, h) {
  6139. var k = b.Ce.map.map
  6140. k.Re.NE(a, d, e, function (l) {
  6141. if (l) h()
  6142. else {
  6143. var m = document.createElement('img')
  6144. '3D' === b.Uf && (m.crossOrigin = 'anonymous')
  6145. g.F.h(m, 'load', function () {
  6146. f(m)
  6147. })
  6148. g.F.h(m, 'error', function () {
  6149. h(m)
  6150. })
  6151. m.src = (function (a, c, d) {
  6152. var e = 'zh_cn'
  6153. b && b.get && k && (e = k.get('lang') || 'zh_cn')
  6154. return g.r.tc + '://grid.amap.com/grid/' + d + '/' + a + '/' + c + '?src=jsapi&key=' + g.r.key + '&lang=' + e + '&dpiType=' + (g.l.Jc ? 'wprd' : 'webrd')
  6155. })(a, d, e)
  6156. }
  6157. })
  6158. })
  6159. },
  6160. })
  6161. z.o.fd = z.o.Yb.extend({
  6162. w: { visible: !0, zooms: [3, 25], type: 'overlay', zIndex: 5, alwaysRender: !0 },
  6163. A: function (a) {
  6164. this.w5 = !0
  6165. arguments.callee.ma.apply(this, arguments)
  6166. },
  6167. bg: function (a) {
  6168. return new g.o.fd(this, a)
  6169. },
  6170. })
  6171. z.o.W$ = z.o.Yb.extend({
  6172. w: { zooms: [14, 20], zIndex: 8, visible: !0, merge: !0, sort: !1 },
  6173. A: function (a) {
  6174. this.CLASS_NAME = 'AMap.Buildings'
  6175. g.c.ya(this, a)
  6176. a = a || {}
  6177. a.zooms && (a.zooms[0] = Math.max(14, a.zooms[0]))
  6178. arguments.callee.ma.apply(this, arguments)
  6179. },
  6180. vq: function () {
  6181. return !1
  6182. },
  6183. bg: function (a) {
  6184. if (g.l.Xp) return (a = new g.o.Eba(this, a)), (a.Yy = this.get('heightFactor') || 1), a
  6185. },
  6186. setStyle: function (a) {
  6187. this.set('customStyle', a)
  6188. g.c.add(this, 'setStyle')
  6189. },
  6190. })
  6191. z.o.EL = z.o.Yb.extend({
  6192. w: { visible: !0, zooms: [3, g.l.ba ? 20 : 18], opacity: 1, type: 'overlay', zIndex: 6 },
  6193. A: function (a) {
  6194. arguments.callee.ma.apply(this, arguments)
  6195. },
  6196. bg: function (a) {
  6197. return g.o.BA ? new g.o.BA(this, a) : ['imagelayer']
  6198. },
  6199. getMap: function () {
  6200. g.c.add(this, 'getMap')
  6201. return this.Ce.map
  6202. },
  6203. show: function () {
  6204. g.c.add(this, 'show')
  6205. this.set('visible', !0)
  6206. this.q('options')
  6207. },
  6208. getOpacity: function () {
  6209. g.c.add(this, 'getOpacity')
  6210. return this.get('opacity', null, !0)
  6211. },
  6212. setOpacity: function (a) {
  6213. g.c.add(this, 'setOpacity')
  6214. this.set('opacity', a)
  6215. },
  6216. getBounds: function () {
  6217. g.c.add(this, 'getBounds')
  6218. return this.get('bounds', null, !0).cb()
  6219. },
  6220. setBounds: function (a) {
  6221. g.c.add(this, 'setBounds')
  6222. this.q('bounds', a)
  6223. this.C = !0
  6224. this.setOptions({ bounds: a })
  6225. this.C = !1
  6226. },
  6227. hide: function () {
  6228. g.c.add(this, 'hide')
  6229. this.set('visible', !1)
  6230. this.q('options')
  6231. },
  6232. setOptions: function (a) {
  6233. g.c.add(this, 'setOptions')
  6234. this.jf(a)
  6235. this.q('options')
  6236. },
  6237. getOptions: function () {
  6238. g.c.add(this, 'getOptions')
  6239. var a = {},
  6240. b
  6241. for (b in this.w) this.w.hasOwnProperty(b) && (a[b] = this.get(b))
  6242. return a
  6243. },
  6244. getElement: function () {
  6245. return this.o.M ? this.o.M.Ob : this.o.Bf ? this.o.Bf.Ob : null
  6246. },
  6247. })
  6248. z.o.BA = z.o.EL.extend({
  6249. A: function (a) {
  6250. this.CLASS_NAME = 'AMap.ImageLayer'
  6251. g.c.ya(this, a)
  6252. a && a.url && (a.__source__ = a.url)
  6253. arguments.callee.ma.apply(this, arguments)
  6254. },
  6255. getImageUrl: function () {
  6256. g.c.add(this, 'getImageUrl')
  6257. return this.get('__source__')
  6258. },
  6259. setImageUrl: function (a) {
  6260. g.c.add(this, 'setImageUrl')
  6261. return this.set('__source__', a)
  6262. },
  6263. })
  6264. z.o.Gba = z.o.EL.extend({
  6265. A: function (a) {
  6266. this.CLASS_NAME = 'AMap.VideoLayer'
  6267. g.c.ya(this, a)
  6268. a && a.url && (a.__source__ = a.url)
  6269. arguments.callee.ma.apply(this, arguments)
  6270. },
  6271. play: function () {
  6272. var a = this.getElement()
  6273. a && a.play && a.play()
  6274. },
  6275. pause: function () {
  6276. var a = this.getElement()
  6277. a && a.pause && a.pause()
  6278. },
  6279. getVideoUrl: function () {
  6280. g.c.add(this, 'getVideoUrl')
  6281. return this.get('__source__')
  6282. },
  6283. setVideoUrl: function (a) {
  6284. g.c.add(this, 'setVideoUrl')
  6285. return this.set('__source__', a)
  6286. },
  6287. })
  6288. z.o.Y$ = z.o.EL.extend({
  6289. A: function (a) {
  6290. this.CLASS_NAME = 'AMap.CanvasLayer'
  6291. g.c.ya(this, a)
  6292. a && a.canvas && (a.__source__ = a.canvas)
  6293. arguments.callee.ma.apply(this, arguments)
  6294. },
  6295. getCanvas: function () {
  6296. g.c.add(this, 'getCanvas')
  6297. return this.get('__source__')
  6298. },
  6299. setCanvas: function (a) {
  6300. g.c.add(this, 'setCanvas')
  6301. return this.set('__source__', a)
  6302. },
  6303. reFresh: function () {
  6304. this.o && ((this.o.KE = !0), this.o.set('display'))
  6305. },
  6306. })
  6307. z.o.Raa = z.o.Yb.extend({
  6308. w: { visible: !0, zooms: [3, 20], type: 'overlay', zIndex: 5, cursor: 'pointer', alwaysRender: !0, stable: !0, bubble: !0, rejectMapMask: !0, className: 'amap-mass' },
  6309. A: function (a, b) {
  6310. this.CLASS_NAME = 'AMap.MassMarks'
  6311. g.c.ya(this, b)
  6312. g.l.il &&
  6313. ((this.zj = !0),
  6314. b.size && (b.size = g.a.Lq(b.size)),
  6315. (this.C = !0),
  6316. this.setData(a),
  6317. g.a.ub(this, b),
  6318. b.style ? (this.jf(this.w, !0), this.setStyle(b.style)) : this.setStyle(this.w),
  6319. (this.C = !1))
  6320. },
  6321. clear: function () {
  6322. g.c.add(this, 'clear')
  6323. this.set('dataSources', '')
  6324. },
  6325. getStyle: function () {
  6326. g.c.add(this, 'getStyle')
  6327. return this.Cm
  6328. },
  6329. setStyle: function (a) {
  6330. g.c.add(this, 'setStyle')
  6331. if (a instanceof Array) {
  6332. for (var b = 0; b < a.length; b += 1)
  6333. (a[b].rotation_ = (Math.PI * (a[b].rotation || 0)) / 180),
  6334. (a[b].size = g.a.Lq(a[b].size)),
  6335. (a.Af = Math.max(a.Af || 0, a[b].size.width + a[b].anchor.x)),
  6336. (a.ig = Math.max(a.Af || 0, a[b].size.height + a[b].anchor.y))
  6337. this.Cm = a
  6338. } else
  6339. a.size && (a.size = g.a.Lq(a.size)),
  6340. (a.rotation_ = (Math.PI * (a.rotation || 0)) / 180),
  6341. this.jf(a, !0),
  6342. (this.Cm = { anchor: this.get('anchor'), url: this.get('url'), size: this.get('size'), rotation_: this.get('rotation_') }),
  6343. (this.Cm.Af = this.Cm.size.width + this.Cm.anchor.x),
  6344. (this.Cm.ig = this.Cm.size.height + this.Cm.anchor.y)
  6345. this.q('style')
  6346. },
  6347. setData: function (a) {
  6348. g.c.add(this, 'setData')
  6349. this.set('dataSources', a)
  6350. },
  6351. getData: function () {
  6352. g.c.add(this, 'getData')
  6353. return this.get('datas') || this.get('dataSources')
  6354. },
  6355. setMap: function (a) {
  6356. g.c.add(this, 'setMap')
  6357. g.l.il &&
  6358. (a ? (this.get('map') && this.get('map').sk(this), this.set('map', a)) : this.get('map') && (this.get('map').sk(this), this.set('map', null, !0), (this.qi = !1), this.gg && this.gg()))
  6359. },
  6360. bg: function (a) {
  6361. return g.tb.ID(['cvector']) ? ((a = new g.o.fd(this, a)), this.X('datas', a), a) : ['cvector']
  6362. },
  6363. })
  6364. z.o.baa = z.o.Yb.extend({
  6365. A: function (a) {
  6366. this.CLASS_NAME = 'AMap.CompositeLayer'
  6367. this.xB = !0
  6368. g.a.ub(this, a)
  6369. this.Vm = []
  6370. this.jf(this.w)
  6371. },
  6372. opacityChanged: function () {
  6373. for (var a = this.get('opacity', null, !0), b = -1, c = this.Vm.length; ++b < c; ) this.Vm[b].setOpacity(a)
  6374. },
  6375. addLayer: function (a) {
  6376. if (!this.has(a)) {
  6377. a.YA = this
  6378. var b = this.get('map')
  6379. a.setMap(b)
  6380. this.Vm.push(a)
  6381. }
  6382. return this
  6383. },
  6384. removeLayer: function (a) {
  6385. this.has(a) && a.setMap(null)
  6386. return this
  6387. },
  6388. Tka: function (a) {
  6389. if (this.has(a)) {
  6390. delete a.YA
  6391. var b = this.Vm
  6392. a = g.a.indexOf(b, a)
  6393. g.a.Fo(b, a)
  6394. }
  6395. },
  6396. has: function (a) {
  6397. return -1 !== g.a.indexOf(this.Vm, a)
  6398. },
  6399. show: function () {
  6400. for (var a = -1, b = this.Vm.length; ++a < b; ) this.Vm[a].show()
  6401. },
  6402. hide: function () {
  6403. for (var a = -1, b = this.Vm.length; ++a < b; ) this.Vm[a].hide()
  6404. },
  6405. setzIndex: function (a, b) {
  6406. g.c.add(this, 'setzIndex')
  6407. this.set('zIndex', a)
  6408. var c = this.Vm
  6409. if ('undefined' === typeof b)
  6410. for (var d = -1, e = c.length; ++d < e; ) {
  6411. var f = c[d]
  6412. f.setzIndex(a)
  6413. }
  6414. else (f = c[b]) && f.setzIndex(a)
  6415. },
  6416. bg: function (a) {
  6417. this.e = a
  6418. },
  6419. getLayers: function () {
  6420. return this.Vm
  6421. },
  6422. })
  6423. z.o.qr = z.o.Yb.extend({
  6424. Faa: { visible: !0, zIndex: 121, opacity: 1, zooms: [3, 20], collision: !0, animation: !0, alwaysRender: !0 },
  6425. w: { zooms: [3, 20] },
  6426. oP: null,
  6427. _markerBindArray: {},
  6428. A: function (a) {
  6429. this.CLASS_NAME = this.CLASS_NAME || 'AMap.LabelsLayer'
  6430. a = a || {}
  6431. g.c.ya(this, a)
  6432. arguments.callee.ma.apply(this, arguments)
  6433. this.w = this.Faa
  6434. g.a.ub(this, a)
  6435. this.jf(this.w)
  6436. this.Xf = []
  6437. this.kb = []
  6438. this.Ou = []
  6439. },
  6440. getCollision: function () {
  6441. return this.get('collision', null, !0)
  6442. },
  6443. setCollision: function () {
  6444. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0
  6445. this.set('collision', a)
  6446. this.w.collision = a
  6447. this.g && this.g.ub(this.w, this.Xf)
  6448. },
  6449. getOpacity: function () {
  6450. return this.get('opacity', null, !0)
  6451. },
  6452. setOpacity: function () {
  6453. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 1
  6454. this.set('opacity', a)
  6455. this.w.opacity = a
  6456. this.g && this.g.ub(this.w, this.Xf)
  6457. },
  6458. getzIndex: function () {
  6459. return this.get('zIndex', null, !0)
  6460. },
  6461. setzIndex: function () {
  6462. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 120
  6463. this.set('zIndex', a)
  6464. this.w.zIndex = a
  6465. this.g && this.g.ub(this.w, this.Xf)
  6466. },
  6467. getAnimation: function () {
  6468. return this.get('animation', null, !0)
  6469. },
  6470. setAnimation: function () {
  6471. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0
  6472. this.set('animation', a)
  6473. this.w.animation = a
  6474. this.g && this.g.ub(this.w, this.Xf)
  6475. },
  6476. getZooms: function () {
  6477. return this.get('zooms', null, !0)
  6478. },
  6479. setZooms: function () {
  6480. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [3, 20]
  6481. this.set('zooms', a)
  6482. this.w.zooms = a
  6483. this.g && this.g.ub(this.w, this.Xf)
  6484. },
  6485. add: function (a) {
  6486. g.c.add(this, 'add')
  6487. if (a) {
  6488. a = '[object Array]' !== Object.prototype.toString.apply(a) ? [a] : a
  6489. for (var b = 0; b < a.length; b++) {
  6490. var c = a[b]
  6491. if (c) {
  6492. c.g = this
  6493. var d = c.w,
  6494. e = {
  6495. data: { id: c._LabelMarkerId || void 0, name: d.title || '', position: this.nfa(d.position) || void 0, rank: d.rank || void 0 },
  6496. opts: {
  6497. zooms: d.zooms || void 0,
  6498. opacity: 'number' === typeof d.opacity ? d.opacity : 1,
  6499. zIndex: 'number' === typeof d.zIndex ? d.zIndex : 1,
  6500. height: 'number' === typeof d.height ? d.height : 0,
  6501. icon: {},
  6502. text: {},
  6503. },
  6504. }
  6505. if (d.icon) {
  6506. var f = d.icon,
  6507. h = f.size,
  6508. k = f.clipSize
  6509. h && (f.size = this.wG(h))
  6510. k && (f.clipSize = this.wG(k))
  6511. e.opts.icon = d.icon
  6512. }
  6513. d.text && ((e.opts.text = d.text), d.text.content && (e.data.txt = d.text.content), (d = (d = e.opts.text.style) && d.padding) && (e.opts.text.style.padding = this.sha(d)))
  6514. this.Xf.push(e)
  6515. this.kb.push(c)
  6516. this._markerBindArray[c._LabelMarkerId] = c
  6517. }
  6518. }
  6519. this.Ho()
  6520. b = a.length
  6521. for (c = 0; c < b; c++) (e = a[c]) && e.Q8 && e.Q8()
  6522. }
  6523. },
  6524. getMarkers: function () {
  6525. return this.kb
  6526. },
  6527. remove: function (a) {
  6528. g.c.add(this, 'remove')
  6529. if (a) {
  6530. var b = void 0,
  6531. b = '[object Array]' !== Object.prototype.toString.apply(a) ? [a] : a
  6532. if (this.Xf) {
  6533. for (a = 0; a < b.length; a++) {
  6534. var c = this.vn(this.Xf, b[a])
  6535. ;-1 !== c && (this.Xf.splice(c, 1), this.kb.splice(c, 1))
  6536. }
  6537. this.Ho()
  6538. }
  6539. }
  6540. },
  6541. clear: function () {
  6542. g.c.add(this, 'clear')
  6543. this.g && this.g.clear()
  6544. this.Xf = []
  6545. this.kb = []
  6546. },
  6547. setPosition: function () {},
  6548. positionChanged: function () {},
  6549. on: function (a) {
  6550. g.c.add(this, 'on')
  6551. this.g ? (this.Ch(arguments), this.g.X1(a)) : this.Ou.push(arguments)
  6552. },
  6553. off: function (a) {
  6554. g.c.add(this, 'off')
  6555. this.g && this.g.o$(a)
  6556. },
  6557. Ho: function () {
  6558. this.g && this.g.Qz(this.Xf)
  6559. },
  6560. Qz: function (a) {
  6561. this.W0(a)
  6562. },
  6563. IU: function (a, b) {
  6564. var c = this.oP
  6565. a && (b ? (c && c._LabelMarkerId !== a._LabelMarkerId && c.setTop(!1), (this.oP = a)) : (this.oP = null))
  6566. },
  6567. wR: function (a) {
  6568. if (this.g) return this.g.wR(a)
  6569. },
  6570. vn: function (a, b) {
  6571. for (var c = b._LabelMarkerId || null, d = 0; d < a.length; d++) if (a[d].data.id === c) return d
  6572. return -1
  6573. },
  6574. removeItem: function () {},
  6575. bg: function (a) {
  6576. this.get('map') || this.set('map', a.D, !0)
  6577. if (g.o.qr) {
  6578. this.g = new g.o.qr(this, a)
  6579. this.Xf && this.Ho()
  6580. a = this.Ou
  6581. if (a.length) {
  6582. for (var b = 0; b < a.length; b++) this.on.apply(this, a[b])
  6583. this.Ou = []
  6584. }
  6585. return this.g
  6586. }
  6587. return ['AMap.LabelsLayer']
  6588. },
  6589. m4: function (a) {
  6590. if (a) return this._markerBindArray[a] || null
  6591. },
  6592. xZ: function () {
  6593. var a = this
  6594. return g.a.LD(function (b) {
  6595. var c = a.g
  6596. c ? c.Qz(b) : (a.tD = b)
  6597. }, 100)
  6598. },
  6599. If: function (a) {
  6600. return 'undefined' === typeof a
  6601. },
  6602. QZ: function (a) {
  6603. return 'string' === typeof a
  6604. },
  6605. Aga: function (a) {
  6606. return 'number' === typeof a
  6607. },
  6608. wG: function () {
  6609. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []
  6610. return this.If(a.width) || this.If(a.height) ? (this.QZ(a) ? a.split(',') : this.Aga(a) ? [a, a] : a) : [a.width, a.height]
  6611. },
  6612. nfa: function () {
  6613. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []
  6614. return this.If(a.R) || this.If(a.Q) ? (this.QZ(a) ? a.split(',') : a) : [a.R, a.Q]
  6615. },
  6616. sha: function (a) {
  6617. 'string' === typeof a && ((a = a.trim()), (a = a.split(' ')))
  6618. if ('[object Array]' === Object.prototype.toString.apply(a)) {
  6619. for (var b = a.length, c = 0; c < b; c++) {
  6620. var d = parseInt(a[c])
  6621. a[c] = isNaN(d) ? 3 : d
  6622. }
  6623. switch (b) {
  6624. case 0:
  6625. a = [3, 3, 3, 3]
  6626. break
  6627. case 1:
  6628. a = [a[0], a[0], a[0], a[0]]
  6629. break
  6630. case 2:
  6631. a = [a[0], a[1], a[0], a[1]]
  6632. break
  6633. case 3:
  6634. a = [a[0], a[1], a[2], a[1]]
  6635. }
  6636. return a
  6637. }
  6638. return [3, 3, 3, 3]
  6639. },
  6640. })
  6641. z.o.ML = z.o.BA.extend({
  6642. A: function (a, b, c) {
  6643. this.CLASS_NAME = 'AMap.GroundImage'
  6644. g.c.ya(this, c)
  6645. c = c || {}
  6646. this.$g = !0
  6647. var d = parseFloat(c.opacity)
  6648. isNaN(d) && (d = 1)
  6649. arguments.callee.ma.call(this, { url: a, bounds: b, clickable: c.clickable, opacity: d, map: c.map, zooms: c.zooms || [3, 20] })
  6650. this.CLASS_NAME = 'AMap.GroundImage'
  6651. },
  6652. Nua: function (a) {
  6653. this.get('bounds').contains(a.lnglat) && ((a.target = this), this.q('click', a))
  6654. },
  6655. Oua: function (a) {
  6656. this.get('bounds').contains(a.lnglat) && ((a.target = this), this.q('dblclick', a))
  6657. },
  6658. setMap: function (a) {
  6659. g.c.add(this, 'setMap')
  6660. a
  6661. ? (this.get('map') && (this.get('map').sk(this), this.F2 && z.event.removeListener(this.F2), this.W2 && z.event.removeListener(this.W2)), this.set('map', a))
  6662. : this.get('map') && (this.get('map').sk(this), (this.Ce.map = null))
  6663. },
  6664. mapChanged: function () {
  6665. this.get('map') &&
  6666. (this.get('map').PH(this),
  6667. this.get('clickable') && ((this.F2 = z.event.addListener(this.get('map'), 'click', this.Nua, this)), (this.W2 = z.event.addListener(this.get('map'), 'dblclick', this.Oua, this))))
  6668. },
  6669. })
  6670. z.B.Eh = g.da.extend({
  6671. ka: [g.va, g.Ze, { Ka: g.a.Ka }],
  6672. w: { extData: {}, bubble: !1, clickable: !0, draggable: !1 },
  6673. A: function () {
  6674. this.MG = g.a.yb(this)
  6675. },
  6676. xEa: function () {
  6677. return this.MG
  6678. },
  6679. bDa: function () {
  6680. this.C = !0
  6681. this.get('map', null, !0) && this.setMap(this.get('map'))
  6682. this.C = !1
  6683. },
  6684. mapChanged: function () {
  6685. this.get('map', null, !0) && this.get('map', null, !0).sC(this)
  6686. },
  6687. cR: function (a) {
  6688. var b = 0
  6689. a && (b = 'string' === typeof a ? Math.round(parseFloat(a) / 0.14929107086948487) : a)
  6690. return b
  6691. },
  6692. setHeight: function (a) {
  6693. this.height = a = a || 0
  6694. a = this.cR(a)
  6695. this.set('altitude', a)
  6696. },
  6697. getHeight: function () {
  6698. return this.height
  6699. },
  6700. show: function () {
  6701. g.c.add(this, 'show')
  6702. !0 != this.get('visible', null, !0) && this.set('visible', !0)
  6703. },
  6704. hide: function () {
  6705. g.c.add(this, 'hide')
  6706. !1 != this.get('visible', null, !0) && this.set('visible', !1)
  6707. },
  6708. setMap: function (a) {
  6709. g.c.add(this, 'setMap')
  6710. a !== this.get('map', null, !0) &&
  6711. (a
  6712. ? (this.get('map', null, !0) && this.get('map', null, !0).Jz(this), this.set('map', a))
  6713. : this.get('map', null, !0) && (this.get('map', null, !0).Jz(this), this.set('map', null, !0)))
  6714. },
  6715. getMap: function () {
  6716. g.c.add(this, 'getMap')
  6717. return this.get('map', null, !0)
  6718. },
  6719. setExtData: function (a) {
  6720. g.c.add(this, 'setExtData')
  6721. this.set('extData', a)
  6722. },
  6723. positionChanged: function () {},
  6724. getExtData: function () {
  6725. g.c.add(this, 'getExtData')
  6726. return this.get('extData', null, !0)
  6727. },
  6728. getVisible: function () {
  6729. return this.get('visible', null, !0)
  6730. },
  6731. })
  6732. z.B.fd = z.B.Eh.extend({
  6733. A: function (a) {
  6734. z.B.fd.bd.A.apply(this, arguments)
  6735. },
  6736. show: function () {
  6737. g.c.add(this, 'show')
  6738. !1 == this.get('visible', null, !0) && (this.set('visible', !0), this.q('show', { type: 'show', target: this }))
  6739. },
  6740. hide: function () {
  6741. g.c.add(this, 'hide')
  6742. !0 == this.get('visible', null, !0) && (this.set('visible', !1), this.q('hide', { type: 'hide', target: this }))
  6743. },
  6744. getVisible: function () {
  6745. g.c.add(this, 'getVisible')
  6746. return this.get('visible', null, !0)
  6747. },
  6748. getOptions: function () {
  6749. g.c.add(this, 'getOptions')
  6750. var a = {},
  6751. b = 'map zIndex strokeColor strokeOpacity strokeWeight strokeStyle strokeDasharray extData bubble clickable draggable'.split(' '),
  6752. c = 'isOutline outlineColor geodesic path lineJoin lineCap borderWeight showDir dirColor dirImg'.split(' '),
  6753. d = ['fillColor', 'fillOpacity', 'path', 'lineJoin', 'texture'],
  6754. e = ['center', 'radius', 'texture'],
  6755. f = ['bounds', 'texture'],
  6756. h = []
  6757. this instanceof z.B.Zb && (h = b.concat(c))
  6758. this instanceof z.B.Dc && (h = b.concat(d))
  6759. this instanceof z.B.gh && (h = b.concat(e).concat(d))
  6760. this instanceof z.B.Et && (h = b.concat(e).concat(d))
  6761. this instanceof z.B.Lt && (h = b.concat(d).concat(f))
  6762. for (b = 0; b < h.length; b += 1) a[h[b]] = this.get(h[b], null, !0)
  6763. return a
  6764. },
  6765. setOptions: function (a) {
  6766. g.c.add(this, 'setOptions')
  6767. a.hasOwnProperty('path') && ((a.path && a.path.length) || (a.path = []), (a.path = this.Ka(a.path)))
  6768. a.center && (a.center = this.Ka(a.center))
  6769. var b
  6770. a.hasOwnProperty('map') && ((b = a.map), delete a.map)
  6771. this.jf(a)
  6772. void 0 !== b && (this.setMap(b), (a.map = b))
  6773. this.q('options')
  6774. this.q('change', { type: 'change', target: this })
  6775. },
  6776. setzIndex: function (a) {
  6777. g.c.add(this, 'setzIndex')
  6778. this.set('zIndex', a)
  6779. },
  6780. getzIndex: function () {
  6781. g.c.add(this, 'getzIndex')
  6782. return this.get('zIndex', null, !0)
  6783. },
  6784. setDraggable: function (a) {
  6785. g.c.add(this, 'setDraggable')
  6786. this.set('draggable', a)
  6787. },
  6788. })
  6789. z.B.dM = z.B.fd.extend({
  6790. w: { visible: !0, zIndex: 10, strokeColor: '#006600', strokeOpacity: 0.9, strokeWeight: 3, strokeStyle: 'solid', strokeDasharray: [10, 5], lineJoin: 'miter', lineCap: 'butt', path: [] },
  6791. A: function (a) {
  6792. z.B.dM.bd.A.apply(this, arguments)
  6793. },
  6794. setPath: function (a, b) {
  6795. g.c.add(this, 'setPath')
  6796. ;(a && a.length) || (a = [])
  6797. a = this.Ka(a)
  6798. this.B && this.B.get('deltaPos') && this.B.set('deltaPos', [0, 0], !0)
  6799. this.set('path', a)
  6800. this.q('change', { type: 'change', target: this })
  6801. b || this.q('setPath')
  6802. },
  6803. getPath: function () {
  6804. g.c.add(this, 'getPath')
  6805. return this.L2()
  6806. },
  6807. reset: function () {
  6808. var a = this.L2()
  6809. this.B.set('deltaPos', [0, 0], !0)
  6810. this.setPath(a)
  6811. },
  6812. L2: function () {
  6813. var a = this.get('path', null, !0)
  6814. this.B && this.B.get('deltaPos') && (a = this.B.St(a, this.B.get('deltaPos')))
  6815. return a
  6816. },
  6817. })
  6818. z.B.ci = g.da.extend({
  6819. ka: [g.va, g.Ze],
  6820. w: { size: new g.xd(36, 36), imageOffset: new g.H(0, 0), image: g.r.Gb + '/theme/v1.3/markers/0.png', imageSize: null },
  6821. A: function (a) {
  6822. this.CLASS_NAME = 'AMap.Icon'
  6823. g.c.ya(this, a)
  6824. a = a || {}
  6825. a.size && (a.size = g.a.Lq(a.size))
  6826. a.imageSize && (a.imageSize = g.a.Lq(a.imageSize))
  6827. g.a.ub(this, a)
  6828. this.jf(this.w)
  6829. },
  6830. setImageSize: function (a) {
  6831. g.c.add(this, 'setImageSize')
  6832. a = g.a.Lq(a)
  6833. this.set('imageSize', a)
  6834. },
  6835. getImageSize: function () {
  6836. g.c.add(this, 'getImageSize')
  6837. return this.get('imageSize', null, !0)
  6838. },
  6839. })
  6840. z.B.Paa = g.da.extend({
  6841. ka: [g.va, g.Ze],
  6842. w: { coords: [], type: '' },
  6843. A: function (a) {
  6844. this.CLASS_NAME = 'AMap.MarkerShape'
  6845. g.c.ya(this, a)
  6846. g.a.ub(this, a)
  6847. this.jf(this.w)
  6848. },
  6849. })
  6850. z.B.vb = z.B.Eh.extend({
  6851. w: {
  6852. cursor: 'pointer',
  6853. visible: !0,
  6854. zIndex: 100,
  6855. angle: 0,
  6856. textAlign: 'left',
  6857. verticalAlign: 'top',
  6858. autoRotation: !1,
  6859. opacity: 1,
  6860. offset: new g.H(-9, -31),
  6861. size: new g.H(19, 33),
  6862. raiseOnDrag: !1,
  6863. topWhenClick: !1,
  6864. topWhenMouseOver: !1,
  6865. animation: 'AMAP_ANIMATION_NONE',
  6866. },
  6867. A: function (a) {
  6868. this.CLASS_NAME = this.CLASS_NAME || 'AMap.Marker'
  6869. g.c.ya(this, a)
  6870. a = a || {}
  6871. this.$g = !0
  6872. this.hha = g.a.yb(this)
  6873. this.C = !0
  6874. a.position && (a.position = this.Ka(a.position))
  6875. a.height && this.setHeight(a.height)
  6876. g.a.ub(this, a)
  6877. g.l.Ue && (this.w.angle = 0)
  6878. this.jf(this.w, !0)
  6879. this.mapChanged()
  6880. this.C = !1
  6881. },
  6882. getAnchor: function () {
  6883. g.c.add(this, 'getAnchor')
  6884. return this.get('anchor', null, !0)
  6885. },
  6886. setAnchor: function (a) {
  6887. g.c.add(this, 'setAnchor')
  6888. this.set('anchor', a)
  6889. },
  6890. getId: function () {
  6891. g.c.add(this, 'getId')
  6892. return this.hha
  6893. },
  6894. setRaiseOnDrag: function (a) {
  6895. g.c.add(this, 'setRaiseOnDrag')
  6896. this.set('raiseOnDrag', a)
  6897. },
  6898. setPosition: function (a, b) {
  6899. g.c.add(this, 'setPosition')
  6900. a = this.Ka(a)
  6901. void 0 !== b && ((this.C = !0), this.setHeight(b), (this.C = !1))
  6902. this.set('position', a)
  6903. },
  6904. getPosition: function () {
  6905. g.c.add(this, 'getPosition')
  6906. return this.get('position', null, !0)
  6907. },
  6908. getBounds: function () {
  6909. var a = this.get('position', null, !0).cb()
  6910. return new g.oe(a, a.cb())
  6911. },
  6912. mapChanged: function () {
  6913. this.xl('zoom')
  6914. var a = this.get('map', null, !0)
  6915. a && (this.get('position', null, !0) || this.set('position', a.get('center')), a.sC(this), this.X('zoom', a))
  6916. },
  6917. getZooms: function () {
  6918. g.c.add(this, 'getZooms')
  6919. return this.get('zooms', null, !0)
  6920. },
  6921. zoomChanged: function () {
  6922. var a = this.get('zooms', null, !0)
  6923. if (a) {
  6924. var b = this.get('zoom')
  6925. b < a[0] || b > a[1] ? this.set('outOfZooms', !0) : this.set('outOfZooms', !1)
  6926. this.B && this.B.jva()
  6927. }
  6928. },
  6929. setIcon: function (a) {
  6930. g.c.add(this, 'setIcon')
  6931. this.set('icon', a)
  6932. },
  6933. getIcon: function () {
  6934. g.c.add(this, 'getIcon')
  6935. return this.get('icon', null, !0)
  6936. },
  6937. setContent: function (a) {
  6938. g.c.add(this, 'setContent')
  6939. this.set('content', a)
  6940. },
  6941. getContent: function () {
  6942. g.c.add(this, 'getContent')
  6943. return this.get('content', null, !0)
  6944. },
  6945. getContentDom: function () {
  6946. return this.get('contentDom', null, !0)
  6947. },
  6948. hide: function () {
  6949. g.c.add(this, 'hide')
  6950. !0 == this.get('visible', null, !0) && this.set('visible', !1)
  6951. },
  6952. show: function () {
  6953. g.c.add(this, 'show')
  6954. !1 == this.get('visible', null, !0) && this.set('visible', !0)
  6955. },
  6956. setCursor: function (a) {
  6957. g.c.add(this, 'setCursor')
  6958. this.set('cursor', a)
  6959. },
  6960. setRotation: function (a) {
  6961. g.c.add(this, 'setRotation')
  6962. g.l.Ue || this.set('angle', a)
  6963. },
  6964. setAngle: function (a) {
  6965. g.c.add(this, 'setAngle')
  6966. g.l.Ue || 'number' !== typeof a || this.set('angle', a)
  6967. },
  6968. getAngle: function () {
  6969. g.c.add(this, 'getAngle')
  6970. return this.get('angle', null, !0)
  6971. },
  6972. setOffset: function (a) {
  6973. g.c.add(this, 'setOffset')
  6974. this.set('offset', a)
  6975. },
  6976. getOffset: function () {
  6977. g.c.add(this, 'getOffset')
  6978. return this.get('offset', null, !0)
  6979. },
  6980. setTextAlign: function (a) {
  6981. g.c.add(this, 'setTextAlign')
  6982. this.set('textAlign', a)
  6983. },
  6984. getTextAlign: function () {
  6985. g.c.add(this, 'getTextAlign')
  6986. return this.get('textAlign', null, !0)
  6987. },
  6988. setVerticalAlign: function (a) {
  6989. g.c.add(this, 'setVerticalAlign')
  6990. this.set('verticalAlign', a)
  6991. },
  6992. getVerticalAlign: function () {
  6993. g.c.add(this, 'getVerticalAlign')
  6994. return this.get('verticalAlign', null, !0)
  6995. },
  6996. setzIndex: function (a) {
  6997. g.c.add(this, 'setzIndex')
  6998. this.set('zIndex', a)
  6999. },
  7000. getzIndex: function () {
  7001. g.c.add(this, 'getzIndex')
  7002. return this.get('zIndex', null, !0)
  7003. },
  7004. setOpacity: function (a) {
  7005. g.c.add(this, 'setOpacity')
  7006. this.set('opacity', a)
  7007. },
  7008. setDraggable: function (a) {
  7009. g.c.add(this, 'setDraggable')
  7010. this.set('draggable', a)
  7011. },
  7012. getDraggable: function () {
  7013. g.c.add(this, 'getDraggable')
  7014. return this.get('draggable', null, !0)
  7015. },
  7016. moveTo: function (a, b, c) {
  7017. g.c.add(this, 'moveTo')
  7018. a = this.Ka(a)
  7019. this.set('move', { Nf: a, speed: b, xb: c })
  7020. },
  7021. moveAlong: function (a, b, c, d) {
  7022. g.c.add(this, 'moveAlong')
  7023. if (!(2 > a.length)) {
  7024. a = this.Ka(a)
  7025. for (var e = [a[0]], f = a[0], h = 1; h < a.length; h += 1) f.gb(a[h]) || (e.push(a[h]), (f = a[h]))
  7026. this.set('move', { Nf: e, speed: b, xb: c, vna: d })
  7027. }
  7028. },
  7029. stopMove: function () {
  7030. g.c.add(this, 'stopMove')
  7031. this.set('move', !1)
  7032. },
  7033. pauseMove: function () {
  7034. g.c.add(this, 'pauseMove')
  7035. var a = this.get('move')
  7036. if (!a) return !1
  7037. a.action = 'pause'
  7038. this.set('move', a)
  7039. return !0
  7040. },
  7041. resumeMove: function () {
  7042. g.c.add(this, 'resumeMove')
  7043. var a = this.get('move')
  7044. if (!a) return !1
  7045. a.action = 'resume'
  7046. this.set('move', a)
  7047. return !0
  7048. },
  7049. setShadow: function (a) {
  7050. g.c.add(this, 'setShadow')
  7051. this.set('shadow', a)
  7052. },
  7053. getShadow: function () {
  7054. g.c.add(this, 'getShadow')
  7055. return this.get('shadow', null, !0)
  7056. },
  7057. setClickable: function (a) {
  7058. g.c.add(this, 'setClickable')
  7059. a !== this.get('clickable', null, !0) && this.set('clickable', a)
  7060. },
  7061. getClickable: function () {
  7062. g.c.add(this, 'getClickable')
  7063. return this.get('clickable', null, !0)
  7064. },
  7065. setTitle: function (a, b) {
  7066. g.c.add(this, 'setTitle')
  7067. 'string' === typeof a && this.set('title', a, b)
  7068. },
  7069. getTitle: function () {
  7070. g.c.add(this, 'getTitle')
  7071. return this.get('title', null, !0)
  7072. },
  7073. setLabel: function (a) {
  7074. g.c.add(this, 'setLabel')
  7075. a && !g.a.uh(a) && (a = g.extend({}, this.get('label'), a))
  7076. this.set('label', a)
  7077. },
  7078. getLabel: function () {
  7079. g.c.add(this, 'getLabel')
  7080. return this.get('label', null, !0)
  7081. },
  7082. setTop: function (a, b) {
  7083. g.c.add(this, 'setTop')
  7084. this.set('isTop', a, b)
  7085. },
  7086. getTop: function () {
  7087. g.c.add(this, 'getTop')
  7088. return this.get('isTop', null, !0)
  7089. },
  7090. setShape: function (a, b) {
  7091. g.c.add(this, 'setShape')
  7092. this.set('shape', a, b)
  7093. },
  7094. getShape: function () {
  7095. g.c.add(this, 'getShape')
  7096. return this.get('shape', null, !0)
  7097. },
  7098. setAnimation: function (a, b) {
  7099. g.c.add(this, 'setAnimation')
  7100. this.set('animation', a, b)
  7101. },
  7102. getAnimation: function () {
  7103. g.c.add(this, 'getAnimation')
  7104. return this.get('animation', null, !0)
  7105. },
  7106. getMap: function () {
  7107. g.c.add(this, 'getMap')
  7108. return this.get('map', null, !0)
  7109. },
  7110. markOnAMAP: function (a) {
  7111. g.c.add(this, 'markOnAMAP')
  7112. a = a || {}
  7113. var b = {}
  7114. b.name = a.name || this.get('name', null, !0) || ''
  7115. a = this.Ka(a.position) || this.get('position', null, !0)
  7116. b.y = a.Q
  7117. b.x = a.R
  7118. g.$h.mt(g.$h.era(b))
  7119. },
  7120. })
  7121. z.B.Iaa = z.B.Eh.extend({
  7122. Taa: Math.pow(2, 31),
  7123. w: { position: null, zooms: [3, 20], opacity: 1, visible: !0, zIndex: 1, rank: 1, extData: null },
  7124. A: function (a) {
  7125. a = a || {}
  7126. this.CLASS_NAME = this.CLASS_NAME || 'AMap.LabelMarker'
  7127. g.c.ya(this, a)
  7128. arguments.callee.ma.apply(this, arguments)
  7129. this._LabelMarkerId = g.a.yb(this)
  7130. g.a.ub(this, a)
  7131. this.jf(this.w, !0)
  7132. this.r3 = []
  7133. },
  7134. vn: function (a, b) {
  7135. for (var c = b._LabelMarkerId || null, d = 0, e = a.length; d < e; d++) if (a[d].data.id === c) return d
  7136. return -1
  7137. },
  7138. Q8: function () {
  7139. var a = this.r3 || []
  7140. if (a.length) {
  7141. for (var b = 0, c = a.length; b < c; b++) this.on.apply(this, a[b])
  7142. this.r3 = []
  7143. }
  7144. },
  7145. hJ: function () {
  7146. var a = this.g
  7147. if (!a) return null
  7148. var a = a.Xf || [],
  7149. b = this.vn(a, this)
  7150. return -1 !== b ? a[b] : null
  7151. },
  7152. getName: function () {
  7153. g.c.add(this, 'getName')
  7154. return this.w.name
  7155. },
  7156. setName: function (a) {
  7157. g.c.add(this, 'setName')
  7158. this.w.name = a
  7159. var b = this.hJ()
  7160. b && (b.opts.title = a)
  7161. },
  7162. getBounds: function () {
  7163. g.c.add(this, 'getBounds')
  7164. var a = this.get('position', null, !0)
  7165. try {
  7166. return 'string' === typeof a ? (a = new g.U(a.split(','))) : '[object Array]' == Object.prototype.toString.apply(a) && (a = new g.U(a[0], a[1])), new g.oe(a, a.cb())
  7167. } catch (b) {
  7168. return null
  7169. }
  7170. },
  7171. getPosition: function () {
  7172. g.c.add(this, 'getPosition')
  7173. var a = this.g.Xf,
  7174. b = this.vn(a, this)
  7175. return -1 !== b ? a[b].data.position : null
  7176. },
  7177. setPosition: function (a) {
  7178. g.c.add(this, 'setPosition')
  7179. this.w.position = a
  7180. var b = this.g
  7181. if (b) {
  7182. var c = b.Xf,
  7183. d = this.vn(c, this)
  7184. ;-1 !== d && ((c[d].data.position = a), b.Ho())
  7185. }
  7186. },
  7187. getZooms: function () {
  7188. g.c.add(this, 'getZooms')
  7189. var a = this.g.Xf,
  7190. b = this.vn(a, this)
  7191. return -1 !== b ? a[b].opts.zooms : null
  7192. },
  7193. setZooms: function (a) {
  7194. g.c.add(this, 'setZooms')
  7195. this.w.zooms = a
  7196. var b = this.g
  7197. if (b) {
  7198. var c = b.Xf || [],
  7199. d = this.vn(c, this)
  7200. ;-1 !== d && ((c[d].opts.zooms = a), b.Ho())
  7201. }
  7202. },
  7203. getOpacity: function () {
  7204. g.c.add(this, 'getOpacity')
  7205. var a = this.g.Xf,
  7206. b = this.vn(a, this)
  7207. return -1 !== b ? a[b].opts.opacity : null
  7208. },
  7209. setOpacity: function (a) {
  7210. g.c.add(this, 'setOpacity')
  7211. this.w.opacity = a
  7212. var b = this.g
  7213. if (b) {
  7214. var c = b.Xf,
  7215. d = this.vn(c, this)
  7216. ;-1 !== d && ((c[d].opts.opacity = a), b.Ho())
  7217. }
  7218. },
  7219. getzIndex: function () {
  7220. g.c.add(this, 'getzIndex')
  7221. if (this.hJ()) return this.w.zIndex
  7222. },
  7223. setzIndex: function (a) {
  7224. g.c.add(this, 'setzIndex')
  7225. this.w.zIndex = a
  7226. var b = this.hJ()
  7227. b && ((b.opts.zIndex = a), this.g.Ho())
  7228. },
  7229. getRank: function () {
  7230. g.c.add(this, 'getRank')
  7231. return this.w.rank
  7232. },
  7233. setRank: function (a) {
  7234. g.c.add(this, 'setZIndex')
  7235. var b = this.hJ()
  7236. this.w.rank = a
  7237. b && ((b.data.rank = a), this.g.Ho())
  7238. },
  7239. getIcon: function () {
  7240. g.c.add(this, 'getIcon')
  7241. return this.w.icon
  7242. },
  7243. setIcon: function (a) {
  7244. g.c.add(this, 'setIcon')
  7245. this.w.icon = this.w.icon ? g.extend({}, this.w.icon, a) : a
  7246. var b = this.g
  7247. if (b) {
  7248. var b = b.Xf,
  7249. c = this.vn(b, this)
  7250. if (-1 !== c) {
  7251. var d = a.size,
  7252. e = a.clipSize
  7253. d && (a.size = this.g.wG(d))
  7254. e && (a.clipSize = this.g.wG(e))
  7255. b[c].opts.icon = g.extend({}, b[c].opts.icon, a)
  7256. this.g.Ho()
  7257. }
  7258. }
  7259. },
  7260. getText: function () {
  7261. g.c.add(this, 'getText')
  7262. return this.w.text
  7263. },
  7264. setText: function (a) {
  7265. g.c.add(this, 'setText')
  7266. this.w.text = this.w.text ? g.extend({}, this.w.text, a) : a
  7267. var b = this.g
  7268. if (b) {
  7269. var b = b.Xf,
  7270. c = this.vn(b, this)
  7271. ;-1 !== c &&
  7272. ((b[c].data.txt = void 0 == a.content ? b[c].data.txt : a.content),
  7273. (b[c].opts.text = g.extend({}, b[c].opts.text, a)),
  7274. a.style && (b[c].opts.text.style = g.extend({}, b[c].opts.text.style, a.style)),
  7275. this.g.Ho())
  7276. }
  7277. },
  7278. setTop: function () {
  7279. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0
  7280. g.c.add(this, 'setTop')
  7281. this.g && this.g.IU(this, a)
  7282. a ? ((this.yca = this.w.zIndex), this.setzIndex(this.Taa)) : this.setzIndex(this.yca || this.w.zIndex)
  7283. },
  7284. getVisible: function () {
  7285. g.c.add(this, 'getVisible')
  7286. var a = this.w.visible
  7287. this.g && a && (a = !this.g.wR(this._LabelMarkerId))
  7288. return a
  7289. },
  7290. getExtData: function () {
  7291. g.c.add(this, 'getExtData')
  7292. return this.w.extData
  7293. },
  7294. setExtData: function (a) {
  7295. g.c.add(this, 'setExtData')
  7296. this.w.extData = a
  7297. },
  7298. getOptions: function () {
  7299. return this.w
  7300. },
  7301. show: function () {
  7302. g.c.add(this, 'show')
  7303. this.w.visible = !0
  7304. this.g && this.g.add(this)
  7305. return this
  7306. },
  7307. hide: function () {
  7308. g.c.add(this, 'hide')
  7309. this.w.visible = !1
  7310. this.g && this.g.remove(this)
  7311. return this
  7312. },
  7313. })
  7314. z.B.Tn = z.B.Eh.extend({
  7315. w: { visible: !1, items: [] },
  7316. A: function (a) {
  7317. this.CLASS_NAME = 'AMap.ContextMenu'
  7318. g.c.ya(this, a)
  7319. this.$g = !0
  7320. g.a.ub(this, a)
  7321. this.w.items = []
  7322. this.jf(this.w)
  7323. },
  7324. addItem: function (a, b, c) {
  7325. g.c.add(this, 'addItem')
  7326. this.get('items').push({ Qn: a, xb: b, jK: c })
  7327. this.q('items')
  7328. },
  7329. removeItem: function (a, b) {
  7330. g.c.add(this, 'removeItem')
  7331. var c = this.get('items'),
  7332. d,
  7333. e
  7334. for (e = 0; e < c.length; e += 1)
  7335. if (((d = c[e]), d.Qn === a && d.xb === b)) {
  7336. c.splice(e, 1)
  7337. break
  7338. }
  7339. this.q('items')
  7340. },
  7341. open: function (a, b) {
  7342. g.c.add(this, 'open')
  7343. this.C = !0
  7344. b = g.a.Ka(b)
  7345. this.set('position', b)
  7346. this.map ? this.map && this.map !== a && (this.map.Jz(this), (this.map = a), this.setMap(a)) : ((this.map = a), this.setMap(a))
  7347. this.q('open', { type: 'open', target: this })
  7348. this.C = !1
  7349. },
  7350. close: function () {
  7351. g.c.add(this, 'close')
  7352. this.C = !0
  7353. this.setMap(null)
  7354. this.map && ((this.map = this.map.ry = null), this.q('close', { type: 'close', target: this }))
  7355. this.C = !1
  7356. },
  7357. })
  7358. z.B.Ye = z.B.Eh.extend({
  7359. w: { visible: !0, offset: new g.H(0, 0), showShadow: !1, closeWhenClickMap: !1, retainWhenClose: !0, autoMove: !0, altitude: 0, anchor: 'bottom-center' },
  7360. A: function (a) {
  7361. this.CLASS_NAME = this.CLASS_NAME || 'AMap.InfoWindow'
  7362. g.c.ya(this, a)
  7363. a = a || {}
  7364. this.$g = !0
  7365. a && a.size && (a.size = g.a.Lq(a.size))
  7366. g.a.ub(this, a)
  7367. this.jf(this.w)
  7368. a.position && this.set('position', g.a.Ka(a.position), !0)
  7369. a.height && this.set('altitude', this.cR(a.height), !0)
  7370. },
  7371. open: function (a, b, c) {
  7372. g.c.add(this, 'open')
  7373. b = g.a.Ka(b)
  7374. if (a && !this.hL && (b = b || this.get('position', null, !0))) {
  7375. this.q('change', { type: 'change', target: this })
  7376. c = this.cR(c) || this.get('altitude')
  7377. var d = this.get('map', null, !0)
  7378. d && d === a
  7379. ? (this.set('altitude', c, !0), this.set('position', b))
  7380. : ((this.map = a), a.rm && a.rm.close(), this.set('position', b, !0), this.set('altitude', c, !0), (this.C = !0), this.setMap(a), (this.C = !1))
  7381. this.q('open', { type: 'open', target: this })
  7382. }
  7383. },
  7384. close: function () {
  7385. g.c.add(this, 'close')
  7386. this.B && this.B.map && ((this.C = !0), this.setMap(null), (this.map = null), this.q('change', { type: 'change', target: this }), (this.C = !1))
  7387. },
  7388. getAnchor: function () {
  7389. g.c.add(this, 'getAnchor')
  7390. return this.get('anchor', null, !0)
  7391. },
  7392. setAnchor: function (a) {
  7393. g.c.add(this, 'setAnchor')
  7394. this.set('anchor', a)
  7395. this.q('change', { type: 'change', target: this })
  7396. },
  7397. setContent: function (a) {
  7398. g.c.add(this, 'setContent')
  7399. this.set('content', a)
  7400. this.q('change', { type: 'change', target: this })
  7401. },
  7402. getContentU: function () {
  7403. g.c.add(this, 'getContentU')
  7404. return this.get('content', null, !0)
  7405. },
  7406. getContentDom: function () {
  7407. return this.get('contentDom', null, !0)
  7408. },
  7409. getContent: function () {
  7410. g.c.add(this, 'getContent')
  7411. return this.get('content', null, !0)
  7412. },
  7413. setPosition: function (a) {
  7414. g.c.add(this, 'setPosition')
  7415. a = g.a.Ka(a)
  7416. this.set('position', a)
  7417. this.q('change', { type: 'change', target: this })
  7418. },
  7419. setOffset: function (a) {
  7420. g.c.add(this, 'setOffset')
  7421. this.set('offset', a)
  7422. this.q('change', { type: 'change', target: this })
  7423. },
  7424. getPosition: function () {
  7425. g.c.add(this, 'getPosition')
  7426. return this.get('position', null, !0)
  7427. },
  7428. setSize: function (a) {
  7429. g.c.add(this, 'setSize')
  7430. a = g.a.Lq(a)
  7431. this.set('size', a)
  7432. this.q('change', { type: 'change', target: this })
  7433. },
  7434. getSize: function (a) {
  7435. g.c.add(this, 'getSize')
  7436. var b = this.get('size', null, !0)
  7437. if (b) return b
  7438. if (this.B && !a) return new g.xd(this.B.ph.offsetWidth, this.B.ph.offsetHeight)
  7439. },
  7440. getIsOpen: function () {
  7441. g.c.add(this, 'getIsOpen')
  7442. return !!this.get('map')
  7443. },
  7444. })
  7445. z.B.Zb = z.B.dM.extend({
  7446. w: { isOutline: !1, outlineColor: '#000000', geodesic: !1, dirColor: 'white', showDir: !1, borderWeight: 1 },
  7447. A: function (a) {
  7448. this.CLASS_NAME = this.CLASS_NAME || 'AMap.Polyline'
  7449. g.c.ya(this, a)
  7450. this.C = !0
  7451. z.B.Zb.bd.A.apply(this, arguments)
  7452. this.$g = !0
  7453. a = a || {}
  7454. a.zIndex = 'number' === typeof a.zIndex ? a.zIndex : 50
  7455. a.path && (a.path = this.Ka(a.path))
  7456. g.a.ub(this, a)
  7457. this.setOptions(this.w)
  7458. this.C = !1
  7459. },
  7460. getLength: function () {
  7461. g.c.add(this, 'getLength')
  7462. for (var a = this.get('path'), b = 0, c = 0; c < a.length - 1; c += 1) b += a[c].Ge(a[c + 1])
  7463. return parseFloat(b.toFixed(2))
  7464. },
  7465. getBounds: function () {
  7466. var a = this.get('path')
  7467. if (!a || !a.length) return null
  7468. for (var b = new g.oe(180, 90, -180, -90), c = a.length - 1; 0 <= c; c -= 1) b.extend(a[c])
  7469. return b
  7470. },
  7471. })
  7472. ;(function (a) {
  7473. function b(a, b, c, d) {
  7474. if (1 <= a) return d
  7475. var e = 1 - a
  7476. return e * e * b + 2 * e * a * c + a * a * d
  7477. }
  7478. function c(a, b, c, d, e) {
  7479. if (1 <= a) return e
  7480. var f = 3 * (c[0] - b[0]),
  7481. h = 3 * (d[0] - c[0]) - f,
  7482. s = 3 * (c[1] - b[1])
  7483. c = 3 * (d[1] - c[1]) - s
  7484. return [(e[0] - b[0] - f - h) * Math.pow(a, 3) + h * Math.pow(a, 2) + f * a + b[0], (e[1] - b[1] - s - c) * Math.pow(a, 3) + c * Math.pow(a, 2) + s * a + b[1]]
  7485. }
  7486. function d(a, c, d, e) {
  7487. return [b(a, c[0], d[0], e[0]), b(a, c[1], d[1], e[1])]
  7488. }
  7489. function e(b, c) {
  7490. c = a.a.Ka(c)
  7491. return b.MD(c, 20).wl()
  7492. }
  7493. function f(b, c) {
  7494. a.a.isArray(c) && (c = new a.H(c[0], c[1]))
  7495. return b.lE(c, 20)
  7496. }
  7497. function h(b, f, h, n, p, q) {
  7498. var r = null
  7499. if (b && h && h.length) {
  7500. b = [b]
  7501. b.push.apply(b, h)
  7502. b.push(f)
  7503. h = 0
  7504. for (r = b.length; h < r; h++) b[h] = e(n, b[h])
  7505. h = a.extend({ tolerance: 4, interpolateNumLimit: [3, 300] }, q)
  7506. q = h.tolerance
  7507. h = h.interpolateNumLimit
  7508. q = Math.max(2, q)
  7509. for (var s = (r = 0), u = 0, v = b.length; u < v - 1; u++) var w = b[u], t = b[u + 1], r = r + Math.abs(t[0] - w[0]), s = s + Math.abs(t[1] - w[1])
  7510. a: {
  7511. p = Math.min(h[1], Math.max(h[0], Math.round(Math.max(r, s) / p / q)))
  7512. q = null
  7513. switch (b.length) {
  7514. case 3:
  7515. q = d
  7516. break
  7517. case 4:
  7518. q = c
  7519. break
  7520. default:
  7521. r = null
  7522. break a
  7523. }
  7524. h = []
  7525. r = [0].concat(b)
  7526. for (s = 1; s < p - 2; s++) (r[0] = s / p), h.push(q.apply(null, r))
  7527. h.push(b[b.length - 1])
  7528. r = h
  7529. }
  7530. }
  7531. return r || [e(n, f)]
  7532. }
  7533. a.Kw = {
  7534. LGa: d,
  7535. rDa: c,
  7536. EI: (function () {
  7537. function a(b, c, d) {
  7538. return (((1 - 3 * d + 3 * c) * b + (3 * d - 6 * c)) * b + 3 * c) * b
  7539. }
  7540. function b(a) {
  7541. return a
  7542. }
  7543. var c = {},
  7544. d = 'function' === typeof Float32Array
  7545. return function (e, f, h, s) {
  7546. function u(b) {
  7547. if (0 === b) b = 0
  7548. else if (1 === b) b = 1
  7549. else {
  7550. for (var c = 0, d = 1; 10 !== d && w[d] <= b; ++d) c += 0.1
  7551. --d
  7552. var d = c + ((b - w[d]) / (w[d + 1] - w[d])) * 0.1,
  7553. l = 3 * (1 - 3 * h + 3 * e) * d * d + 2 * (3 * h - 6 * e) * d + 3 * e
  7554. if (0.001 <= l) {
  7555. for (c = 0; 4 > c; ++c) {
  7556. l = 3 * (1 - 3 * h + 3 * e) * d * d + 2 * (3 * h - 6 * e) * d + 3 * e
  7557. if (0 === l) break
  7558. d -= (a(d, e, h) - b) / l
  7559. }
  7560. b = d
  7561. } else if (0 === l) b = d
  7562. else {
  7563. var d = c,
  7564. c = c + 0.1,
  7565. m,
  7566. n = 0
  7567. do (m = d + (c - d) / 2), (l = a(m, e, h) - b), 0 < l ? (c = m) : (d = m)
  7568. while (1e-7 < Math.abs(l) && 10 > ++n)
  7569. b = m
  7570. }
  7571. b = a(b, f, s)
  7572. }
  7573. return b
  7574. }
  7575. if (!(0 <= e && 1 >= e && 0 <= h && 1 >= h)) throw Error('bezier x values must be in [0, 1] range')
  7576. var v = arguments.toString()
  7577. if (c[v]) return c[v]
  7578. if (e === f && h === s) return b
  7579. for (var w = d ? new Float32Array(11) : Array(11), t = 0; 11 > t; ++t) w[t] = a(0.1 * t, e, h)
  7580. return (c[v] = u)
  7581. }
  7582. })(),
  7583. h4: function (a, b, c, d) {
  7584. var e,
  7585. f,
  7586. r = []
  7587. e = 0
  7588. for (f = a.length; e < f; e += 1) r.push.apply(r, h(a[e - 1], a[e], a[e].controlPoints, b, c, d))
  7589. return r
  7590. },
  7591. Sqa: function (a, b, c, d) {
  7592. a = this.h4(a, b, c, d)
  7593. c = []
  7594. d = 0
  7595. for (var e = a.length; d < e; d++) c.push(f(b, a[d]))
  7596. return c
  7597. },
  7598. }
  7599. })(g)
  7600. z.B.sA = z.B.Zb.extend({
  7601. w: { tolerance: 4, interpolateNumLimit: [3, 300] },
  7602. A: function (a) {
  7603. this.CLASS_NAME = 'AMap.BezierCurve'
  7604. g.c.ya(this, a)
  7605. z.B.sA.bd.A.apply(this, arguments)
  7606. },
  7607. getLength: function () {
  7608. g.c.add(this, 'getLength')
  7609. this.get('map')
  7610. this.C = !0
  7611. var a = this.getInterpolateLngLats()
  7612. this.C = !1
  7613. return g.Ft.distanceOfLine(a)
  7614. },
  7615. getInterpolateLngLats: function () {
  7616. g.c.add(this, 'getInterpolateLngLats')
  7617. var a = this.get('map')
  7618. return g.Kw.Sqa(this.get('path'), (a && a.mj) || g.Zh.IL, Math.pow(2, 2), this.w)
  7619. },
  7620. getSerializedPath: function () {
  7621. g.c.add(this, 'getSerializedPath')
  7622. for (var a = this.get('path', null, !0), b = [], c = 0, d = a.length; c < d; c++) {
  7623. var e = a[c]
  7624. if (e instanceof g.U) {
  7625. var f = []
  7626. if (e.controlPoints) for (var h = 0, k = e.controlPoints.length; h < k; h++) f.push(e.controlPoints[h].AR()), f.push(e.controlPoints[h].xR())
  7627. f.push(e.AR())
  7628. f.push(e.xR())
  7629. b.push(f)
  7630. } else b.push(e)
  7631. }
  7632. return b
  7633. },
  7634. Ka: function (a) {
  7635. var b = typeof a[0]
  7636. if (g.a.isArray(a) && 'object' === b) {
  7637. for (b = 0; b < a.length; b += 1) a[b] = this.zja(a[b])
  7638. return a
  7639. }
  7640. return [this.qGa(a)]
  7641. },
  7642. zja: function (a) {
  7643. var b
  7644. if (a instanceof g.U) b = a
  7645. else {
  7646. b = typeof a[0]
  7647. var c,
  7648. d,
  7649. e = []
  7650. if ('string' === b || 'number' === b) {
  7651. d = a.length
  7652. if (d % 2) throw Error("LngLat number should be even, now it's " + d)
  7653. b = new g.U(a[d - 2], a[d - 1])
  7654. c = 0
  7655. for (d -= 2; c < d; c += 2) e.push(new g.U(a[c], a[c + 1]))
  7656. } else if (g.a.isArray(a[0])) for (d = a.length, b = new g.U(a[d - 1][0], a[d - 1][1]), c = 0, d -= 1; c < d; c++) e.push(new g.U(a[c][0], a[c][1]))
  7657. else throw Error("AMap.LngLat expected, now it's " + a)
  7658. b && e.length && (b.controlPoints = g.a.Ka(e))
  7659. }
  7660. if (b.controlPoints && 2 < b.controlPoints.length) throw Error('Control Points Number should be 1 or 2 !')
  7661. return b
  7662. },
  7663. })
  7664. z.B.Dc = z.B.dM.extend({
  7665. A: function (a) {
  7666. this.CLASS_NAME = this.CLASS_NAME || 'AMap.Polygon'
  7667. g.c.ya(this, a)
  7668. this.C = !0
  7669. z.B.Dc.bd.A.apply(this, arguments)
  7670. this.$g = !0
  7671. a = a || {}
  7672. a.zIndex = 'number' === typeof a.zIndex ? a.zIndex : 10
  7673. a.path && (a.path = this.Ka(a.path))
  7674. g.a.ub(this, g.extend({ fillColor: '#FFAA00', fillOpacity: 0.9 }, a))
  7675. this.setOptions(this.w)
  7676. this.C = !1
  7677. },
  7678. w4: function (a) {
  7679. var b = (6378137 * Math.PI) / 180,
  7680. c = 0,
  7681. d = a.length
  7682. if (3 > d) return 0
  7683. for (var e = 0; e < d - 1; e += 1)
  7684. var f = a[e], h = a[e + 1], k = f.R * b * Math.cos((f.Q * Math.PI) / 180), f = f.Q * b, l = h.R * b * Math.cos((h.Q * Math.PI) / 180), c = c + (k * h.Q * b - l * f)
  7685. e = a[e]
  7686. a = a[0]
  7687. d = e.R * b * Math.cos((e.Q * Math.PI) / 180)
  7688. e = e.Q * b
  7689. h = a.R * b * Math.cos((a.Q * Math.PI) / 180)
  7690. c += d * a.Q * b - h * e
  7691. return 0.5 * Math.abs(c)
  7692. },
  7693. bK: function (a) {
  7694. return a.length ? (a[0] instanceof g.U ? [[a]] : a[0] instanceof Array && a[0][0] instanceof g.U ? [a] : a) : a
  7695. },
  7696. getArea: function () {
  7697. g.c.add(this, 'getArea')
  7698. for (var a = this.get('path', null, !0), a = this.bK(a), b = 0, c = 0, d = a.length; c < d; c += 1)
  7699. for (var e = a[c], b = b + this.w4(e[0]), f = 1; f < e.length; f += 1) b -= this.w4(e[f])
  7700. return Number(b.toFixed(2))
  7701. },
  7702. toString: function () {
  7703. g.c.add(this, 'toString')
  7704. for (var a = this.get('path'), a = this.bK(a), b = [], c = 0, d = a.length; c < d; c += 1) {
  7705. for (var e = a[c], f = [], h = 0, k = e.length; h < k; h += 1) f.push(e[h].join(';'))
  7706. b.push(f.join('|'))
  7707. }
  7708. return b.join('^')
  7709. },
  7710. getBounds: function () {
  7711. var a = this.get('path')
  7712. if (a && a.length) {
  7713. for (var a = this.bK(a), b = new g.oe(180, 90, -180, -90), c = 0, d = a.length; c < d; c += 1) for (var e = a[c][0], f = e.length - 1; 0 <= f; f -= 1) b.extend(e[f])
  7714. return b
  7715. }
  7716. return null
  7717. },
  7718. contains: function (a) {
  7719. g.c.add(this, 'contains')
  7720. a = g.a.Ka(a)
  7721. var b = this.get('path'),
  7722. b = this.bK(b)
  7723. a = [a.R, a.Q]
  7724. for (var c = 0, d = b.length; c < d; c += 1) {
  7725. for (var e = b[c], f = !1, h = 0, k = e.length; h < k && ((f = this.dna(e[h])), g.wd.uq(f) || f.reverse(), (f = g.wd.Sd(a, f, 0 === h ? !0 : !1)), 0 < h && (f = !f), f); h += 1);
  7726. if (f) return !0
  7727. }
  7728. return !1
  7729. },
  7730. dna: function (a) {
  7731. for (var b = [], c = 0; c < a.length; c += 1) b.push([a[c].R, a[c].Q])
  7732. return b
  7733. },
  7734. })
  7735. z.B.gh = z.B.fd.extend({
  7736. w: {
  7737. visible: !0,
  7738. zIndex: 10,
  7739. strokeColor: '#006600',
  7740. strokeOpacity: 0.9,
  7741. strokeWeight: 3,
  7742. strokeStyle: 'solid',
  7743. strokeDasharray: [10, 5],
  7744. radius: 1e3,
  7745. fillColor: '#006600',
  7746. fillOpacity: 0.9,
  7747. unit: 'miter',
  7748. },
  7749. A: function (a) {
  7750. this.CLASS_NAME = this.CLASS_NAME || 'AMap.Circle'
  7751. g.c.ya(this, a)
  7752. this.C = !0
  7753. z.B.gh.bd.A.apply(this, arguments)
  7754. a = a || {}
  7755. a.center && (a.center = g.a.Ka(a.center))
  7756. a.zIndex = 'number' === typeof a.zIndex ? a.zIndex : 10
  7757. g.a.jk(a.radius, 'string') && ((a.radius = parseFloat(a.radius)), isNaN(a.radius) && delete a.radius)
  7758. g.a.ub(this, a)
  7759. this.$g = this.w.center ? !0 : !1
  7760. this.setOptions(this.w)
  7761. this.C = !1
  7762. },
  7763. setCenter: function (a, b) {
  7764. g.c.add(this, 'setCenter')
  7765. ;(a = g.a.Ka(a)) &&
  7766. a instanceof g.U &&
  7767. (this.B && this.B.get('deltaPos') && this.B.set('deltaPos', [0, 0], !0),
  7768. this.set('center', a),
  7769. this.q('change', { type: 'change', target: this }),
  7770. this.$g || ((this.$g = !0), this.get('map') && this.get('map').q('overlays')),
  7771. b || this.q('setCenter'))
  7772. },
  7773. getCenter: function () {
  7774. g.c.add(this, 'getCenter')
  7775. var a = this.get('center', null, !0)
  7776. this.B && this.B.get('deltaPos') && (a = this.B.St([a], this.B.get('deltaPos'))[0])
  7777. return a
  7778. },
  7779. reset: function () {
  7780. var a = this.get('center', null, !0)
  7781. this.B && this.B.get('deltaPos') && ((a = this.B.St([a], this.B.get('deltaPos'))[0]), this.B.set('deltaPos', [0, 0], !0))
  7782. this.set('center', a)
  7783. },
  7784. setRadius: function (a, b) {
  7785. g.c.add(this, 'setRadius')
  7786. this.set('radius', a)
  7787. this.q('change', { type: 'change', target: this })
  7788. b || this.q('setRadius')
  7789. },
  7790. getPath: function (a) {
  7791. g.c.add(this, 'getPath')
  7792. a = a || 36
  7793. for (var b = this.get('center', null, !0), c = this.get('radius', null, !0), d = [], e = 0; e < a; e += 1) {
  7794. var f = ((Math.PI * e) / a) * 2,
  7795. h = Math.cos(f) * c,
  7796. f = Math.sin(f) * c
  7797. d.push(b.offset(h, f))
  7798. }
  7799. return d
  7800. },
  7801. getRadius: function () {
  7802. g.c.add(this, 'getRadius')
  7803. return this.get('radius', null, !0)
  7804. },
  7805. getBounds: function () {
  7806. var a = this.get('center'),
  7807. b = this.get('radius')
  7808. if (!a) return null
  7809. var c = a.offset(-b, -b),
  7810. a = a.offset(b, b)
  7811. return new g.oe(c, a)
  7812. },
  7813. contains: function (a) {
  7814. g.c.add(this, 'contains')
  7815. return this.get('center').Ge(a) <= this.get('radius') ? !0 : !1
  7816. },
  7817. })
  7818. z.B.VV = z.B.gh.extend({
  7819. A: function (a) {
  7820. this.CLASS_NAME = 'AMap.CircleMarker'
  7821. g.c.ya(this, a)
  7822. a = a || {}
  7823. a.unit = 'px'
  7824. void 0 === a.radius ? (a.radius = 20) : g.a.jk(a.radius, 'string') && ((a.radius = parseFloat(a.radius)), isNaN(a.radius) && (a.radius = 20))
  7825. z.B.VV.bd.A.apply(this, arguments)
  7826. },
  7827. getBounds: function () {
  7828. this.C = !0
  7829. var a = this.getCenter()
  7830. this.C = !1
  7831. return new g.oe(a, a.cb())
  7832. },
  7833. contains: function (a) {
  7834. g.c.add(this, 'contains')
  7835. this.C = !0
  7836. var b = this.getMap()
  7837. this.C = !1
  7838. if (!b) return !1
  7839. var c = this.get('center')
  7840. b.C = !0
  7841. var d = !1
  7842. c.Ge(a) <= this.get('radius') * b.getResolution(c) && (d = !0)
  7843. b.C = !1
  7844. return d
  7845. },
  7846. })
  7847. var sc = g.da.extend({
  7848. A: function (a) {
  7849. var b = Array(3),
  7850. c
  7851. c = a instanceof Array ? a : a instanceof g.Fl || a instanceof g.Pa ? a.elements : arguments
  7852. b[0] = c[0] || 0
  7853. b[1] = c[1] || 0
  7854. b[2] = c[2] || 0
  7855. this.elements = b
  7856. },
  7857. length: function () {
  7858. return Math.sqrt(this.k6())
  7859. },
  7860. k6: function () {
  7861. var a = this.elements
  7862. return a[0] * a[0] + a[1] * a[1] + a[2] * a[2]
  7863. },
  7864. normalize: function () {
  7865. var a = this.elements,
  7866. b = a[0],
  7867. c = a[1],
  7868. d = a[2],
  7869. e = Math.sqrt(b * b + c * c + d * d)
  7870. if (e) {
  7871. if (1 === e) return this
  7872. } else return (a[0] = 0), (a[1] = 0), (a[2] = 0), this
  7873. e = 1 / e
  7874. a[0] = b * e
  7875. a[1] = c * e
  7876. a[2] = d * e
  7877. return this
  7878. },
  7879. cb: function () {
  7880. return new g.Pa(this)
  7881. },
  7882. copy: function (a) {
  7883. var b = this.elements
  7884. a = a.elements
  7885. b[0] = a[0]
  7886. b[1] = a[1]
  7887. b[2] = a[2]
  7888. return this
  7889. },
  7890. set: function (a, b, c) {
  7891. var d = this.elements
  7892. d[0] = a
  7893. d[1] = b
  7894. d[2] = c
  7895. },
  7896. gb: function (a) {
  7897. var b = this.elements
  7898. a = a.elements
  7899. return b[0] === a[0] && b[1] === a[1] && b[2] === a[2]
  7900. },
  7901. Kn: function (a) {
  7902. var b = this.elements
  7903. b[0] *= a
  7904. b[1] *= a
  7905. b[2] *= a
  7906. return this
  7907. },
  7908. add: function (a) {
  7909. var b = this.elements
  7910. a = a.elements
  7911. b[0] += a[0]
  7912. b[1] += a[1]
  7913. b[2] += a[2]
  7914. return this
  7915. },
  7916. $la: function (a, b) {
  7917. var c = a.elements,
  7918. d = b.elements,
  7919. e = this.elements
  7920. e[0] = c[0] + d[0]
  7921. e[1] = c[1] + d[1]
  7922. e[2] = c[2] + d[2]
  7923. return this
  7924. },
  7925. sub: function (a) {
  7926. a = a.elements
  7927. var b = this.elements
  7928. b[0] -= a[0]
  7929. b[1] -= a[1]
  7930. b[2] -= a[2]
  7931. return this
  7932. },
  7933. Vz: function (a, b) {
  7934. var c = a.elements,
  7935. d = b.elements,
  7936. e = this.elements
  7937. e[0] = c[0] - d[0]
  7938. e[1] = c[1] - d[1]
  7939. e[2] = c[2] - d[2]
  7940. return this
  7941. },
  7942. hs: function (a) {
  7943. a = a.elements
  7944. var b = this.elements
  7945. b[0] = b[1] * a[2] - b[2] * a[1]
  7946. b[1] = b[2] * a[0] - b[0] * a[2]
  7947. b[2] = b[0] * a[1] - b[1] * a[0]
  7948. return this
  7949. },
  7950. wy: function (a, b) {
  7951. var c = a.elements,
  7952. d = b.elements,
  7953. e = this.elements
  7954. e[0] = c[1] * d[2] - c[2] * d[1]
  7955. e[1] = c[2] * d[0] - c[0] * d[2]
  7956. e[2] = c[0] * d[1] - c[1] * d[0]
  7957. return this
  7958. },
  7959. Lf: function (a) {
  7960. a = a.elements
  7961. var b = this.elements
  7962. return b[0] * a[0] + b[1] * a[1] + b[2] * a[2]
  7963. },
  7964. Ge: function (a) {
  7965. return Math.sqrt(this.d3(a))
  7966. },
  7967. d3: function (a) {
  7968. var b = a.elements,
  7969. c = this.elements
  7970. a = c[0] - b[0]
  7971. var d = c[1] - b[1],
  7972. b = c[2] - b[2]
  7973. return a * a + d * d + b * b
  7974. },
  7975. sf: function (a) {
  7976. var b = this.elements[0],
  7977. c = this.elements[1],
  7978. d = this.elements[2]
  7979. a = a.elements
  7980. var e = 1 / (a[3] * b + a[7] * c + a[11] * d + a[15])
  7981. this.elements[0] = (a[0] * b + a[4] * c + a[8] * d + a[12]) * e
  7982. this.elements[1] = (a[1] * b + a[5] * c + a[9] * d + a[13]) * e
  7983. this.elements[2] = (a[2] * b + a[6] * c + a[10] * d + a[14]) * e
  7984. return this
  7985. },
  7986. })
  7987. g.Pa = sc
  7988. g.Pa.Xb({ Lf: 'dot', cb: 'clone', add: 'add', sub: 'sub', $la: 'addVectors', Vz: 'subVectors', wy: 'crossVectors', normalize: 'normalize', length: 'length' })
  7989. var vc = g.da.extend({
  7990. A: function (a) {
  7991. var b = Array(4),
  7992. c
  7993. c = a instanceof Array ? a : arguments
  7994. b[0] = c[0]
  7995. b[1] = c[1]
  7996. b[2] = c[2]
  7997. b[3] = c[3] || 1
  7998. this.elements = b
  7999. },
  8000. copy: function (a) {
  8001. var b = this.elements
  8002. a = a.elements
  8003. b[0] = a[0]
  8004. b[1] = a[1]
  8005. b[2] = a[2]
  8006. b[3] = void 0 !== a[3] ? a[3] : 1
  8007. return this
  8008. },
  8009. multiply: function (a) {
  8010. var b = this.elements
  8011. b[0] *= a
  8012. b[1] *= a
  8013. b[2] *= a
  8014. b[3] *= a
  8015. },
  8016. sf: function (a) {
  8017. var b = this.elements[0],
  8018. c = this.elements[1],
  8019. d = this.elements[2],
  8020. e = this.elements[3]
  8021. a = a.elements
  8022. this.elements[0] = a[0] * b + a[4] * c + a[8] * d + a[12] * e
  8023. this.elements[1] = a[1] * b + a[5] * c + a[9] * d + a[13] * e
  8024. this.elements[2] = a[2] * b + a[6] * c + a[10] * d + a[14] * e
  8025. this.elements[3] = a[3] * b + a[7] * c + a[11] * d + a[15] * e
  8026. return this
  8027. },
  8028. })
  8029. g.Fl = vc
  8030. function wc(a, b) {
  8031. this.vz = void 0 !== a ? a : new g.Pa(1, 0, 0)
  8032. this.KC = void 0 !== b ? b : 0
  8033. }
  8034. g.Vw = wc
  8035. wc.prototype = {
  8036. set: function (a, b) {
  8037. this.vz.copy(a)
  8038. this.KC = b
  8039. return this
  8040. },
  8041. normalize: function () {
  8042. var a = 1 / this.vz.length()
  8043. this.vz.Kn(a)
  8044. this.KC *= a
  8045. return this
  8046. },
  8047. xI: function (a) {
  8048. return this.vz.Lf(a) + this.KC
  8049. },
  8050. }
  8051. function xc(a, b, c, d, e) {
  8052. a.vz.set(b, c, d)
  8053. a.KC = e
  8054. return a
  8055. }
  8056. function yc(a, b, c, d, e, f) {
  8057. this.iE = [
  8058. void 0 !== a ? a : new g.Vw(),
  8059. void 0 !== b ? b : new g.Vw(),
  8060. void 0 !== c ? c : new g.Vw(),
  8061. void 0 !== d ? d : new g.Vw(),
  8062. void 0 !== e ? e : new g.Vw(),
  8063. void 0 !== f ? f : new g.Vw(),
  8064. ]
  8065. }
  8066. g.eW = yc
  8067. yc.prototype = {
  8068. set: function (a, b, c, d, e, f) {
  8069. var h = this.iE
  8070. h[0].copy(a)
  8071. h[1].copy(b)
  8072. h[2].copy(c)
  8073. h[3].copy(d)
  8074. h[4].copy(e)
  8075. h[5].copy(f)
  8076. return this
  8077. },
  8078. cb: function () {
  8079. return new g.eW().copy(this)
  8080. },
  8081. copy: function (a) {
  8082. for (var b = this.iE, c = 0; 6 > c; c++) b[c].copy(a.iE[c])
  8083. return this
  8084. },
  8085. yJ: (function () {
  8086. var a = new g.Pa(),
  8087. b = new g.Pa(),
  8088. c = a.elements,
  8089. d = b.elements
  8090. return function (e) {
  8091. var f = this.iE,
  8092. h = e.max.elements
  8093. e = e.min.elements
  8094. for (var k = 0; 6 > k; k++) {
  8095. var l = f[k],
  8096. m = l.vz.elements
  8097. c[0] = 0 < m[0] ? e[0] : h[0]
  8098. d[0] = 0 < m[0] ? h[0] : e[0]
  8099. c[1] = 0 < m[1] ? e[1] : h[1]
  8100. d[1] = 0 < m[1] ? h[1] : e[1]
  8101. c[2] = 0 < m[2] ? e[2] : h[2]
  8102. d[2] = 0 < m[2] ? h[2] : e[2]
  8103. m = l.xI(a)
  8104. l = l.xI(b)
  8105. if (0 > m && 0 > l) return !1
  8106. }
  8107. return !0
  8108. }
  8109. })(),
  8110. }
  8111. ;(function (a) {
  8112. function b(a) {
  8113. this.elements = a || [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
  8114. }
  8115. a.cM = function (a) {
  8116. this.elements = [a.elements[0], a.elements[1], a.elements[2], a.elements[4], a.elements[5], a.elements[6], a.elements[8], a.elements[9], a.elements[10]]
  8117. }
  8118. b.prototype.CU = function () {
  8119. var a = this.elements
  8120. a[0] = 1
  8121. a[4] = 0
  8122. a[8] = 0
  8123. a[12] = 0
  8124. a[1] = 0
  8125. a[5] = 1
  8126. a[9] = 0
  8127. a[13] = 0
  8128. a[2] = 0
  8129. a[6] = 0
  8130. a[10] = 1
  8131. a[14] = 0
  8132. a[3] = 0
  8133. a[7] = 0
  8134. a[11] = 0
  8135. a[15] = 1
  8136. }
  8137. b.prototype.set = function (a) {
  8138. if (a.elements !== this.elements) return (this.elements = a.elements.slice(0)), this
  8139. }
  8140. b.prototype.toFixed = function (b) {
  8141. for (var d = this.elements, e = 0; 16 > e; ++e) 0 !== d[e] && (d[e] = a.a.wb(d[e], b))
  8142. return this
  8143. }
  8144. b.prototype.concat = function (a) {
  8145. var b, e, f, h, k, l, m
  8146. e = b = this.elements
  8147. f = a.elements
  8148. if (b === f) for (f = Array(16), a = 0; 16 > a; ++a) f[a] = b[a]
  8149. for (a = 0; 4 > a; a++)
  8150. (h = e[a]),
  8151. (k = e[a + 4]),
  8152. (l = e[a + 8]),
  8153. (m = e[a + 12]),
  8154. (b[a] = h * f[0] + k * f[1] + l * f[2] + m * f[3]),
  8155. (b[a + 4] = h * f[4] + k * f[5] + l * f[6] + m * f[7]),
  8156. (b[a + 8] = h * f[8] + k * f[9] + l * f[10] + m * f[11]),
  8157. (b[a + 12] = h * f[12] + k * f[13] + l * f[14] + m * f[15])
  8158. return this
  8159. }
  8160. b.multiply = function (b, d) {
  8161. var e = Array(16),
  8162. f,
  8163. h,
  8164. k,
  8165. l,
  8166. m,
  8167. n,
  8168. p
  8169. k = h = b.elements
  8170. l = d.elements
  8171. if (h === l) for (f = 0; 16 > f; ++f) e[f] = h[f]
  8172. for (f = 0; 4 > f; f++)
  8173. (h = k[f]),
  8174. (m = k[f + 4]),
  8175. (n = k[f + 8]),
  8176. (p = k[f + 12]),
  8177. (e[f] = h * l[0] + m * l[1] + n * l[2] + p * l[3]),
  8178. (e[f + 4] = h * l[4] + m * l[5] + n * l[6] + p * l[7]),
  8179. (e[f + 8] = h * l[8] + m * l[9] + n * l[10] + p * l[11]),
  8180. (e[f + 12] = h * l[12] + m * l[13] + n * l[14] + p * l[15])
  8181. return new a.Cc(e)
  8182. }
  8183. b.prototype.multiply = b.prototype.concat
  8184. b.prototype.Ah = function (b) {
  8185. var d = this.elements
  8186. b = b.elements
  8187. var e = new a.Fl(),
  8188. f = e.elements
  8189. f[0] = b[0] * d[0] + b[1] * d[4] + b[2] * d[8] + b[3] * d[12]
  8190. f[1] = b[0] * d[1] + b[1] * d[5] + b[2] * d[9] + b[3] * d[13]
  8191. f[2] = b[0] * d[2] + b[1] * d[6] + b[2] * d[10] + b[3] * d[14]
  8192. f[3] = b[0] * d[3] + b[1] * d[7] + b[2] * d[11] + b[3] * d[15]
  8193. return e
  8194. }
  8195. b.prototype.cA = function () {
  8196. var a, b
  8197. a = this.elements
  8198. b = a[1]
  8199. a[1] = a[4]
  8200. a[4] = b
  8201. b = a[2]
  8202. a[2] = a[8]
  8203. a[8] = b
  8204. b = a[3]
  8205. a[3] = a[12]
  8206. a[12] = b
  8207. b = a[6]
  8208. a[6] = a[9]
  8209. a[9] = b
  8210. b = a[7]
  8211. a[7] = a[13]
  8212. a[13] = b
  8213. b = a[11]
  8214. a[11] = a[14]
  8215. a[14] = b
  8216. return this
  8217. }
  8218. b.prototype.Axa = function (a) {
  8219. var b, e, f
  8220. b = a.elements
  8221. a = this.elements
  8222. e = []
  8223. e[0] = b[5] * (b[10] * b[15] - b[11] * b[14]) - b[9] * (b[6] * b[15] + b[7] * b[14]) + b[13] * (b[6] * b[11] - b[7] * b[10])
  8224. e[4] = -b[4] * (b[10] * b[15] - b[11] * b[14]) + b[8] * (b[6] * b[15] - b[7] * b[14]) - b[12] * (b[6] * b[11] - b[7] * b[10])
  8225. e[8] = b[4] * (b[9] * b[15] - b[11] * b[13]) - b[8] * (b[5] * b[15] - b[7] * b[13]) + b[12] * (b[5] * b[11] - b[7] * b[9])
  8226. e[12] = -b[4] * (b[9] * b[14] - b[10] * b[13]) + b[8] * (b[5] * b[14] - b[6] * b[13]) - b[12] * (b[5] * b[10] - b[6] * b[9])
  8227. e[1] = -b[1] * (b[10] * b[15] - b[11] * b[14]) + b[9] * (b[2] * b[15] - b[3] * b[14]) - b[13] * (b[2] * b[11] - b[3] * b[10])
  8228. e[5] = b[0] * (b[10] * b[15] - b[11] * b[14]) - b[8] * (b[2] * b[15] - b[3] * b[14]) + b[12] * (b[2] * b[11] - b[3] * b[10])
  8229. e[9] = -b[0] * (b[9] * b[15] - b[11] * b[13]) + b[8] * (b[1] * b[15] - b[3] * b[13]) - b[12] * (b[1] * b[11] - b[3] * b[9])
  8230. e[13] = b[0] * (b[9] * b[14] - b[10] * b[13]) - b[8] * (b[1] * b[14] - b[2] * b[13]) + b[12] * (b[1] * b[10] - b[2] * b[9])
  8231. e[2] = b[1] * (b[6] * b[15] - b[7] * b[14]) - b[5] * (b[2] * b[15] - b[3] * b[14]) + b[13] * (b[2] * b[7] - b[3] * b[6])
  8232. e[6] = -b[0] * (b[6] * b[15] - b[7] * b[14]) + b[4] * (b[2] * b[15] - b[3] * b[14]) - b[12] * (b[2] * b[7] - b[3] * b[6])
  8233. e[10] = b[0] * (b[5] * b[15] - b[7] * b[13]) - b[4] * (b[1] * b[15] - b[3] * b[13]) + b[12] * (b[1] * b[7] - b[3] * b[5])
  8234. e[14] = -b[0] * (b[5] * b[14] - b[6] * b[13]) + b[4] * (b[1] * b[14] - b[2] * b[13]) - b[12] * (b[1] * b[6] - b[2] * b[5])
  8235. e[3] = -b[1] * (b[6] * b[11] - b[7] * b[10]) + b[5] * (b[2] * b[11] - b[3] * b[10]) - b[9] * (b[2] * b[7] - b[3] * b[6])
  8236. e[7] = b[0] * (b[6] * b[11] - b[7] * b[10]) - b[4] * (b[2] * b[11] + b[3] * b[10]) + b[8] * (b[2] * b[7] - b[3] * b[6])
  8237. e[11] = -b[0] * (b[5] * b[11] + b[7] * b[9]) + b[4] * (b[1] * b[11] - b[3] * b[9]) - b[8] * (b[1] * b[7] + b[3] * b[5])
  8238. e[15] = b[0] * (b[5] * b[10] - b[6] * b[9]) - b[4] * (b[1] * b[10] + b[2] * b[9]) + b[8] * (b[1] * b[6] - b[2] * b[5])
  8239. f = b[0] * e[0] + b[1] * e[4] + b[2] * e[8] + b[3] * e[12]
  8240. if (0 === f) return this
  8241. f = 1 / f
  8242. for (b = 0; 16 > b; b++) a[b] = e[b] * f
  8243. return this
  8244. }
  8245. b.prototype.Dg = function () {
  8246. return new b().Axa(this)
  8247. }
  8248. b.prototype.FU = function (a, b, e, f, h, k) {
  8249. var l, m, n, p
  8250. if (a === b || e === f || h === k) throw 'null frustum'
  8251. m = 1 / (b - a)
  8252. n = 1 / (f - e)
  8253. p = 1 / (k - h)
  8254. l = this.elements
  8255. l[0] = 2 * m
  8256. l[1] = 0
  8257. l[2] = 0
  8258. l[3] = 0
  8259. l[4] = 0
  8260. l[5] = 2 * n
  8261. l[6] = 0
  8262. l[7] = 0
  8263. l[8] = 0
  8264. l[9] = 0
  8265. l[10] = -2 * p
  8266. l[11] = 0
  8267. l[12] = -(b + a) * m
  8268. l[13] = -(f + e) * n
  8269. l[14] = -(k + h) * p
  8270. l[15] = 1
  8271. return this
  8272. }
  8273. b.prototype.hva = function (a, d, e, f, h, k) {
  8274. return this.concat(new b().FU(a, d, e, f, h, k))
  8275. }
  8276. b.prototype.yxa = function (a, b, e, f, h, k) {
  8277. var l, m, n, p
  8278. if (a === b || f === e || h === k) throw 'null frustum'
  8279. if (0 >= h) throw 'near <= 0'
  8280. if (0 >= k) throw 'far <= 0'
  8281. m = 1 / (b - a)
  8282. n = 1 / (f - e)
  8283. p = 1 / (k - h)
  8284. l = this.elements
  8285. l[0] = 2 * h * m
  8286. l[1] = 0
  8287. l[2] = 0
  8288. l[3] = 0
  8289. l[4] = 0
  8290. l[5] = 2 * h * n
  8291. l[6] = 0
  8292. l[7] = 0
  8293. l[8] = (b + a) * m
  8294. l[9] = (f + e) * n
  8295. l[10] = -(k + h) * p
  8296. l[11] = -1
  8297. l[12] = 0
  8298. l[13] = 0
  8299. l[14] = -2 * h * k * p
  8300. l[15] = 0
  8301. return this
  8302. }
  8303. b.prototype.mR = function (a, d, e, f, h, k) {
  8304. return this.concat(new b().yxa(a, d, e, f, h, k))
  8305. }
  8306. b.prototype.Z8 = function (a, b, e, f) {
  8307. var h, k
  8308. if (e === f || 0 === b) throw 'null frustum'
  8309. if (0 >= e) throw 'near <= 0'
  8310. if (0 >= f) throw 'far <= 0'
  8311. a /= 2
  8312. k = Math.sin(a)
  8313. if (0 === k) throw 'null frustum'
  8314. h = 1 / (f - e)
  8315. k = Math.cos(a) / k
  8316. a = this.elements
  8317. a[0] = k / b
  8318. a[1] = 0
  8319. a[2] = 0
  8320. a[3] = 0
  8321. a[4] = 0
  8322. a[5] = k
  8323. a[6] = 0
  8324. a[7] = 0
  8325. a[8] = 0
  8326. a[9] = 0
  8327. a[10] = -(f + e) * h
  8328. a[11] = -1
  8329. a[12] = 0
  8330. a[13] = 0
  8331. a[14] = -2 * e * f * h
  8332. a[15] = 0
  8333. return this
  8334. }
  8335. b.prototype.perspective = function (a, d, e, f) {
  8336. return this.concat(new b().Z8(a, d, e, f))
  8337. }
  8338. b.prototype.bw = function (a, b, e) {
  8339. var f = this.elements
  8340. f[0] = a
  8341. f[4] = 0
  8342. f[8] = 0
  8343. f[12] = 0
  8344. f[1] = 0
  8345. f[5] = b
  8346. f[9] = 0
  8347. f[13] = 0
  8348. f[2] = 0
  8349. f[6] = 0
  8350. f[10] = e
  8351. f[14] = 0
  8352. f[3] = 0
  8353. f[7] = 0
  8354. f[11] = 0
  8355. f[15] = 1
  8356. return this
  8357. }
  8358. b.prototype.scale = function (a, b, e) {
  8359. var f = this.elements
  8360. f[0] *= a
  8361. f[4] *= b
  8362. f[8] *= e
  8363. f[1] *= a
  8364. f[5] *= b
  8365. f[9] *= e
  8366. f[2] *= a
  8367. f[6] *= b
  8368. f[10] *= e
  8369. f[3] *= a
  8370. f[7] *= b
  8371. f[11] *= e
  8372. return this
  8373. }
  8374. b.prototype.c9 = function (a, b, e) {
  8375. var f = this.elements
  8376. f[12] = a
  8377. f[13] = b
  8378. f[14] = e
  8379. return this
  8380. }
  8381. b.prototype.translate = function (a, b, e) {
  8382. var f = this.elements
  8383. f[12] += f[0] * a + f[4] * b + f[8] * e
  8384. f[13] += f[1] * a + f[5] * b + f[9] * e
  8385. f[14] += f[2] * a + f[6] * b + f[10] * e
  8386. f[15] += f[3] * a + f[7] * b + f[11] * e
  8387. return this
  8388. }
  8389. b.prototype.Rz = function (a, b, e, f) {
  8390. var h, k, l, m, n, p, q, r
  8391. a = (Math.PI * a) / 180
  8392. h = this.elements
  8393. k = Math.sin(a)
  8394. a = Math.cos(a)
  8395. 0 !== b && 0 === e && 0 === f
  8396. ? (0 > b && (k = -k),
  8397. (h[0] = 1),
  8398. (h[4] = 0),
  8399. (h[8] = 0),
  8400. (h[12] = 0),
  8401. (h[1] = 0),
  8402. (h[5] = a),
  8403. (h[9] = -k),
  8404. (h[13] = 0),
  8405. (h[2] = 0),
  8406. (h[6] = k),
  8407. (h[10] = a),
  8408. (h[14] = 0),
  8409. (h[3] = 0),
  8410. (h[7] = 0),
  8411. (h[11] = 0))
  8412. : 0 === b && 0 !== e && 0 === f
  8413. ? (0 > e && (k = -k),
  8414. (h[0] = a),
  8415. (h[4] = 0),
  8416. (h[8] = k),
  8417. (h[12] = 0),
  8418. (h[1] = 0),
  8419. (h[5] = 1),
  8420. (h[9] = 0),
  8421. (h[13] = 0),
  8422. (h[2] = -k),
  8423. (h[6] = 0),
  8424. (h[10] = a),
  8425. (h[14] = 0),
  8426. (h[3] = 0),
  8427. (h[7] = 0),
  8428. (h[11] = 0))
  8429. : 0 === b && 0 === e && 0 !== f
  8430. ? (0 > f && (k = -k),
  8431. (h[0] = a),
  8432. (h[4] = -k),
  8433. (h[8] = 0),
  8434. (h[12] = 0),
  8435. (h[1] = k),
  8436. (h[5] = a),
  8437. (h[9] = 0),
  8438. (h[13] = 0),
  8439. (h[2] = 0),
  8440. (h[6] = 0),
  8441. (h[10] = 1),
  8442. (h[14] = 0),
  8443. (h[3] = 0),
  8444. (h[7] = 0),
  8445. (h[11] = 0))
  8446. : ((l = Math.sqrt(b * b + e * e + f * f)),
  8447. 1 !== l && ((l = 1 / l), (b *= l), (e *= l), (f *= l)),
  8448. (l = 1 - a),
  8449. (m = b * e),
  8450. (n = e * f),
  8451. (p = f * b),
  8452. (q = b * k),
  8453. (r = e * k),
  8454. (k *= f),
  8455. (h[0] = b * b * l + a),
  8456. (h[1] = m * l + k),
  8457. (h[2] = p * l - r),
  8458. (h[3] = 0),
  8459. (h[4] = m * l - k),
  8460. (h[5] = e * e * l + a),
  8461. (h[6] = n * l + q),
  8462. (h[7] = 0),
  8463. (h[8] = p * l + r),
  8464. (h[9] = n * l - q),
  8465. (h[10] = f * f * l + a),
  8466. (h[11] = 0),
  8467. (h[12] = 0),
  8468. (h[13] = 0),
  8469. (h[14] = 0))
  8470. h[15] = 1
  8471. return this
  8472. }
  8473. b.prototype.rotate = function (a, d, e, f) {
  8474. return this.concat(new b().Rz(a, d, e, f))
  8475. }
  8476. b.prototype.dt = function (a) {
  8477. return this.rotate(a, 1, 0, 0)
  8478. }
  8479. b.prototype.et = function (a) {
  8480. return this.rotate(a, 0, 1, 0)
  8481. }
  8482. b.prototype.ft = function (a) {
  8483. return this.rotate(a, 0, 0, 1)
  8484. }
  8485. b.prototype.Yu = function (a) {
  8486. for (var b = 0, e = this.elements.length; b < e; b++) if (this.elements[b] !== a.elements[b]) return !1
  8487. return !0
  8488. }
  8489. b.prototype.cb = function () {
  8490. return new b(this.elements.slice(0))
  8491. }
  8492. a.Cc = b
  8493. })(g)
  8494. z.B.Et = z.B.Dc.extend({
  8495. w: {
  8496. visible: !0,
  8497. zIndex: 10,
  8498. strokeColor: '#006600',
  8499. strokeOpacity: 0.9,
  8500. strokeWeight: 3,
  8501. strokeStyle: 'solid',
  8502. strokeDasharray: [10, 5],
  8503. radius: [1e3, 1e3],
  8504. fillColor: '#006600',
  8505. fillOpacity: 0.9,
  8506. },
  8507. A: function () {
  8508. var a = this,
  8509. b = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
  8510. this.CLASS_NAME = 'AMap.Ellipse'
  8511. g.c.ya(this, b)
  8512. var b = g.extend({}, this.w, b),
  8513. c = this.Ur(b)
  8514. b.path = c
  8515. z.B.Et.bd.A.call(this, b)
  8516. this.set('path', c)
  8517. ;(this.get('center') && this.get('map')) || (this.$g = !1)
  8518. this.on('movepoly', function (b) {
  8519. var c = a.get('map')
  8520. b = c.Od(c.Bb(a.get('center')).add(b.qK))
  8521. '3D' === c.view.type && a.set('deltaPos', [0, 0], !0)
  8522. a.set('center', b)
  8523. })
  8524. },
  8525. Ur: function () {
  8526. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
  8527. b = [],
  8528. c = a.center || this.get('center'),
  8529. d = a.map || this.get('map')
  8530. if (c && d)
  8531. for (
  8532. var c = g.a.Ka(c),
  8533. e = a.radius || this.get('radius'),
  8534. f = d.Bb(c),
  8535. a = f.x,
  8536. f = f.y,
  8537. h = g.a.map(e, function (a) {
  8538. return a / d.getResolution(c, 20)
  8539. }),
  8540. e = h[0],
  8541. h = h[1],
  8542. k = g.l.ba,
  8543. l = ((k ? 4 : 1) * Math.PI) / 180,
  8544. m = 0,
  8545. k = k ? 89 : 359;
  8546. m <= k;
  8547. m++
  8548. ) {
  8549. var n = m * l,
  8550. n = { x: a + e * Math.cos(n), y: f + h * Math.sin(n) }
  8551. b.push(d.Od(n))
  8552. }
  8553. return b
  8554. },
  8555. mapChanged: function () {
  8556. g.a.Ph(z.B.Et.bd.mapChanged) && z.B.Et.bd.mapChanged.apply(this)
  8557. this.C = !0
  8558. this.setPath(this.Ur())
  8559. this.C = !1
  8560. !this.$g && this.get('map') && ((this.$g = !0), this.get('map').q('overlays'))
  8561. },
  8562. setCenter: function (a, b) {
  8563. g.c.add(this, 'setCenter')
  8564. ;(a = g.a.Ka(a)) &&
  8565. a instanceof g.U &&
  8566. (this.B && this.B.get('deltaPos') && this.B.set('deltaPos', [0, 0], !0),
  8567. this.set('center', a),
  8568. this.set('path', this.Ur()),
  8569. this.$g || ((this.$g = !0), this.get('map') && this.get('map').q('overlays')),
  8570. b || (this.q('setCenter'), this.q('change', { type: 'change', target: this })))
  8571. },
  8572. setRadius: function (a) {
  8573. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
  8574. g.c.add(this, 'setRadius')
  8575. a && 2 === a.length && (this.set('radius', a), this.set('path', this.Ur()), b || (this.q('change', { type: 'change', target: this }), this.q('setPath')))
  8576. },
  8577. setOptions: function (a) {
  8578. z.B.Et.bd.setOptions.call(this, a)
  8579. this.C = !0
  8580. a.radius && this.setRadius(a.radius, !0)
  8581. a.center && this.setCenter(a.center, !0)
  8582. this.C = !1
  8583. },
  8584. getRadius: function () {
  8585. g.c.add(this, 'getRadius')
  8586. return this.get('radius', null, !0)
  8587. },
  8588. getCenter: function () {
  8589. g.c.add(this, 'getCenter')
  8590. var a = this.get('center', null, !0)
  8591. this.B && this.B.get('deltaPos') && this.B.St([a], this.B.get('deltaPos'))[0]
  8592. return a
  8593. },
  8594. })
  8595. z.B.Lt = z.B.Dc.extend({
  8596. w: { visible: !0, zIndex: 10, strokeColor: '#006600', strokeOpacity: 0.9, strokeWeight: 3, strokeStyle: 'solid', strokeDasharray: [10, 5], fillColor: '#006600', fillOpacity: 0.9 },
  8597. A: function () {
  8598. var a = this,
  8599. b = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
  8600. this.CLASS_NAME = 'AMap.Rectangle'
  8601. g.c.ya(this, b)
  8602. b = g.extend({}, this.w, b)
  8603. this.C = !0
  8604. var c = this.Ur(b)
  8605. b.path = c
  8606. z.B.Lt.bd.A.call(this, b)
  8607. this.setPath(c)
  8608. ;(this.w.bounds && this.get('map')) || (this.$g = !1)
  8609. this.on('movepoly', function (b) {
  8610. var c = a.get('map'),
  8611. f = a.get('bounds'),
  8612. h = c.Od(c.Bb(f.wc).add(b.qK))
  8613. b = c.Od(c.Bb(f.nc).add(b.qK))
  8614. '3D' === c.view.type && a.set('deltaPos', [0, 0])
  8615. a.set('bounds', new g.oe(h, b))
  8616. })
  8617. this.C = !1
  8618. },
  8619. Ur: function () {
  8620. var a = [],
  8621. b = (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).bounds || this.get('bounds')
  8622. if (b) {
  8623. b.C = !0
  8624. var c = b.getSouthWest(),
  8625. d = b.getNorthEast()
  8626. b.C = !1
  8627. g.a.Tb([new g.U(c.R, c.Q, !0), new g.U(d.R, c.Q, !0), new g.U(d.R, d.Q, !0), new g.U(c.R, d.Q, !0)], function (b) {
  8628. return a.push(b)
  8629. })
  8630. }
  8631. return a
  8632. },
  8633. mapChanged: function () {
  8634. g.a.Ph(z.B.Lt.bd.mapChanged) && z.B.Lt.bd.mapChanged.apply(this)
  8635. this.C = !0
  8636. this.setPath(this.Ur())
  8637. this.C = !1
  8638. !this.$g && this.get('map') && ((this.$g = !0), this.get('map').q('overlays'))
  8639. },
  8640. setOptions: function (a) {
  8641. this.C = !0
  8642. z.B.Lt.bd.setOptions.call(this, a)
  8643. a.bounds && this.setBounds(a.bounds, !0)
  8644. this.C = !1
  8645. },
  8646. setBounds: function (a) {
  8647. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
  8648. g.c.add(this, 'setBounds')
  8649. a &&
  8650. a instanceof g.oe &&
  8651. (this.set('bounds', a),
  8652. this.set('path', this.Ur()),
  8653. this.$g || ((this.$g = !0), this.get('map') && this.get('map').q('overlays')),
  8654. b || (this.q('change', { type: 'change', target: this }), this.q('setBounds')))
  8655. },
  8656. getBounds: function () {
  8657. g.c.add(this, 'getBounds')
  8658. return this.get('bounds', null, !0)
  8659. },
  8660. })
  8661. z.B.KW = z.B.vb.extend({
  8662. w: { text: '', textAlign: 'center', verticalAlign: 'middle', offset: new g.H(0, 0) },
  8663. A: function (a) {
  8664. this.CLASS_NAME = 'AMap.Text'
  8665. g.c.ya(this, a)
  8666. z.B.KW.bd.A.apply(this, arguments)
  8667. this.lga()
  8668. this.C = !0
  8669. this.setText(this.get('text'))
  8670. this.setStyle(this.get('style'))
  8671. this.C = !1
  8672. },
  8673. lga: function () {
  8674. if (!this.jC) {
  8675. var a = document.createElement('div')
  8676. a.className = 'amap-overlay-text-container'
  8677. this.jC = a
  8678. }
  8679. },
  8680. getText: function () {
  8681. g.c.add(this, 'getText')
  8682. return this.get('text', null, !0)
  8683. },
  8684. setText: function (a) {
  8685. g.c.add(this, 'setText')
  8686. a || 0 === a || (a = '')
  8687. g.f.Dya(this.jC, 'amap-overlay-text-empty', !a)
  8688. g.c.add(this, 'setText')
  8689. this.set('text', a)
  8690. this.jC.innerHTML = a
  8691. this.h8()
  8692. },
  8693. setStyle: function (a) {
  8694. g.c.add(this, 'setStyle')
  8695. a = a || {}
  8696. for (var b in a) a.hasOwnProperty(b) && (this.jC.style[b] = a[b])
  8697. this.h8()
  8698. },
  8699. h8: function () {
  8700. this.C = !0
  8701. this.setContent(this.jC)
  8702. this.setShadow(this.getShadow())
  8703. this.C = !1
  8704. },
  8705. })
  8706. g.hW = {
  8707. find: function (a) {
  8708. return g.a.find(this.fx || [], a)
  8709. },
  8710. XI: function () {
  8711. return this.fx || []
  8712. },
  8713. Ld: function (a) {
  8714. return null !== this.find(a)
  8715. },
  8716. add: function (a) {
  8717. var b = this,
  8718. c = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : g.a.Rs,
  8719. d = this.fx || (this.fx = [])
  8720. g.a.isArray(a)
  8721. ? g.a.Tb(a, function (a) {
  8722. b.add(a, c)
  8723. })
  8724. : null === this.find(a) && (d.push(a), c(a))
  8725. return this
  8726. },
  8727. remove: function (a) {
  8728. var b = this,
  8729. c = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : g.a.Rs,
  8730. d = this.fx
  8731. if (d)
  8732. if (g.a.isArray(a))
  8733. g.a.Tb(a, function (a) {
  8734. b.remove(a, c)
  8735. })
  8736. else {
  8737. var e = g.a.indexOf(d, a)
  8738. ;-1 !== e && (c(d[e]), d.splice(e, 1))
  8739. }
  8740. return this
  8741. },
  8742. clear: function () {
  8743. this.Tb(0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : g.a.Rs)
  8744. this.fx = []
  8745. return this
  8746. },
  8747. Tb: function () {
  8748. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : g.a.Rs,
  8749. b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null
  8750. g.a.Tb(this.fx || [], function () {
  8751. for (var c = arguments.length, d = Array(c), e = 0; e < c; e++) d[e] = arguments[e]
  8752. c = d[0]
  8753. g.a.Ph(c.Tb) ? c.Tb(a, b) : a.apply(b || c, d)
  8754. })
  8755. return this
  8756. },
  8757. So: function (a) {
  8758. for (var b = arguments.length, c = Array(1 < b ? b - 1 : 0), d = 1; d < b; d++) c[d - 1] = arguments[d]
  8759. this.Tb(function (b) {
  8760. b && g.a.Ph(b[a]) && b[a].apply(b, c)
  8761. })
  8762. return this
  8763. },
  8764. h: function (a) {
  8765. var b = arguments
  8766. this.Tb(function (a) {
  8767. a.on.apply(a, b)
  8768. })
  8769. return this
  8770. },
  8771. G: function (a) {
  8772. var b = arguments
  8773. this.Tb(function (a) {
  8774. a.off.apply(a, b)
  8775. })
  8776. return this
  8777. },
  8778. addListener: function () {
  8779. this.h.apply(this, arguments)
  8780. },
  8781. by: function (a) {
  8782. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : g.a.Rs,
  8783. c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
  8784. this.Tb(function (d) {
  8785. d.on.call(
  8786. d,
  8787. event,
  8788. function () {
  8789. b()
  8790. d.off(a)
  8791. },
  8792. c
  8793. )
  8794. })
  8795. },
  8796. removeListener: function (a) {
  8797. this.G(a.VQ, a.cS, a.bf)
  8798. },
  8799. O: function (a, b) {
  8800. this.Tb(function (c) {
  8801. c.emit(a, b)
  8802. })
  8803. },
  8804. }
  8805. z.B.Wn = z.B.Eh.extend({
  8806. ka: [g.hW],
  8807. A: function () {
  8808. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []
  8809. this.CLASS_NAME = 'AMap.OverlayGroup'
  8810. g.c.ya(this)
  8811. z.B.Wn.bd.A.apply(this)
  8812. this.map = null
  8813. this.add(a)
  8814. },
  8815. vc: function (a) {
  8816. g.c.add(this, 'setMap')
  8817. this.So('setMap', a)
  8818. this.So('setMap', a)
  8819. this.set('map', a)
  8820. this.map = a
  8821. return this
  8822. },
  8823. mapChanged: function () {},
  8824. sC: function (a) {
  8825. var b = this
  8826. g.c.add(this, 'addOverlay')
  8827. this.add(a, function (a) {
  8828. b.map && ((a.C = !0), a.setMap(b.map), (a.C = !1))
  8829. })
  8830. return this
  8831. },
  8832. Jz: function (a) {
  8833. var b = this
  8834. g.c.add(this, 'removeOverlay')
  8835. this.remove(a, function (a) {
  8836. a.C = !0
  8837. a.getMap() === b.map && a.setMap(null)
  8838. a.C = !1
  8839. })
  8840. return this
  8841. },
  8842. kd: function () {
  8843. var a = this
  8844. g.c.add(this, 'clearOverlays')
  8845. this.clear(function (b) {
  8846. b.C = !0
  8847. b.getMap() === a.map && b.setMap(null)
  8848. b.C = !1
  8849. })
  8850. return this
  8851. },
  8852. Zy: function () {
  8853. g.c.add(this, 'hide')
  8854. this.So('hide')
  8855. return this
  8856. },
  8857. show: function () {
  8858. g.c.add(this, 'show')
  8859. this.So('show')
  8860. return this
  8861. },
  8862. ub: function () {
  8863. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
  8864. g.c.add(this, 'setOptions')
  8865. this.So('setOptions', a)
  8866. return this
  8867. },
  8868. })
  8869. z.B.Wn.Xb({
  8870. find: 'getOverlay',
  8871. XI: 'getOverlays',
  8872. sC: ['addOverlay', 'addOverlays'],
  8873. Ld: 'hasOverlay',
  8874. Jz: ['removeOverlay', 'removeOverlays'],
  8875. kd: 'clearOverlays',
  8876. Tb: 'eachOverlay',
  8877. vc: 'setMap',
  8878. ub: 'setOptions',
  8879. show: 'show',
  8880. Zy: 'hide',
  8881. h: 'on',
  8882. G: 'off',
  8883. })
  8884. ;(function (a, b) {
  8885. function c(a, b) {
  8886. if (!a.length) return !1
  8887. for (var c = 0, d = a.length; c < d; c++) {
  8888. var e = a[c]
  8889. if (!('*' === b || (e && e.geometry && e.geometry.type === b)) || (e && e.properties && !e.properties._isAmap)) return !1
  8890. }
  8891. return !0
  8892. }
  8893. function d(a) {
  8894. for (var b = [], c = 0, d = a.length; c < d; c++) b.push(a[c].geometry.coordinates)
  8895. return b
  8896. }
  8897. function e(a) {
  8898. if (!a || !a.length) return []
  8899. a = b.a.Ka(a)
  8900. for (var c = [], d = 0, e = a.length; d < e; d++) c[d] = a[d].wl()
  8901. a[a.length - 1].gb(a[0]) || c.push(a[0].wl())
  8902. return c
  8903. }
  8904. function f(a) {
  8905. if (!a) return []
  8906. a = b.a.Ka(a)
  8907. b.a.isArray(a[0]) || (a = [a])
  8908. for (var c = [], d = 0, f = a.length; d < f; d++) c[d] = e(a[d])
  8909. return c
  8910. }
  8911. a.B.fW = a.B.Wn.extend({
  8912. A: function (c) {
  8913. this.CLASS_NAME = 'AMap.GeoJSON'
  8914. b.c.ya(this, c)
  8915. a.B.fW.bd.A.call(this, [])
  8916. this.C = !0
  8917. this.w = b.extend(
  8918. {
  8919. getMarker: function (b, c) {
  8920. return new a.B.vb({ innerOverlay: !0, position: c })
  8921. },
  8922. getPolyline: function (b, c) {
  8923. return new a.B.Zb({ path: c, innerOverlay: !0 })
  8924. },
  8925. getPolygon: function (b, c) {
  8926. return new a.B.Dc({ path: c, innerOverlay: !0 })
  8927. },
  8928. coordsToLatLng: function (a) {
  8929. return a
  8930. },
  8931. },
  8932. c
  8933. )
  8934. if (!this.w.coordsToLatLngs) {
  8935. var d = this.w.coordsToLatLng
  8936. this.w.coordsToLatLngs = function (a) {
  8937. for (var b = [], c = 0, e = a.length; c < e; c++) b.push(d.call(null, a[c]))
  8938. return b
  8939. }
  8940. }
  8941. this.importData(this.w.geoJSON)
  8942. this.C = !1
  8943. },
  8944. importData: function (a) {
  8945. b.c.add(this, 'importData')
  8946. if (a && ((a = this.gga(a)), a.length)) {
  8947. this.clearOverlays()
  8948. this.sC(a)
  8949. var c = this.w.map
  8950. if (c) for (var d = 0, e = a.length; d < e; d++) (a[d].C = !0), a[d].setMap(c), (a[d].C = !1)
  8951. }
  8952. },
  8953. toGeoJSON: function () {
  8954. b.c.add(this, 'toGeoJSON')
  8955. for (var a = this.XI(), c = [], d = 0, e = a.length; d < e; d++) (a[d].C = !0), (c[d] = a[d].toGeoJSON()), (a[d].C = !1)
  8956. return c
  8957. },
  8958. gga: function (a) {
  8959. if (a) {
  8960. b.a.isArray(a) || (a = [a])
  8961. for (var c = [], d = 0, e = a.length; d < e; d++) {
  8962. var f = this.hga(a[d])
  8963. f && c.push(f)
  8964. }
  8965. return c
  8966. }
  8967. },
  8968. DX: function (a) {
  8969. var b = 'Feature' === a.type ? a.geometry : a,
  8970. b = this.w.coordsToLatLng(b ? b.coordinates : null),
  8971. b = this.w.getMarker(a, b)
  8972. this.Lr(a, b)
  8973. return b
  8974. },
  8975. Yca: function (c) {
  8976. for (var d = 'Feature' === c.type ? c.geometry : c, d = d ? d.coordinates : null, e = [], f = 0, n = d.length; f < n; f++)
  8977. e.push(this.DX(b.extend({}, c, { type: 'Feature', properties: { _isAmap: !0, _pointIndex: f, _parentProperities: c.properties }, geometry: { type: 'Point', coordinates: d[f] } })))
  8978. d = new a.B.Wn(e)
  8979. this.Lr(c, d)
  8980. return d
  8981. },
  8982. CX: function (a) {
  8983. var b = 'Feature' === a.type ? a.geometry : a,
  8984. b = this.w.coordsToLatLngs(b ? b.coordinates : null),
  8985. b = this.w.getPolyline(a, b)
  8986. this.Lr(a, b)
  8987. return b
  8988. },
  8989. Xca: function (c) {
  8990. for (var d = 'Feature' === c.type ? c.geometry : c, d = d ? d.coordinates : null, e = [], f = 0, n = d.length; f < n; f++)
  8991. e.push(
  8992. this.CX(
  8993. b.extend({}, c, {
  8994. type: 'Feature',
  8995. properties: { _isAmap: !0, _lineStringIndex: f, _parentProperities: c.properties },
  8996. geometry: { type: 'LineString', coordinates: d[f] },
  8997. })
  8998. )
  8999. )
  9000. d = new a.B.Wn(e)
  9001. this.Lr(c, d)
  9002. return d
  9003. },
  9004. EX: function (a) {
  9005. for (var b = 'Feature' === a.type ? a.geometry : a, b = b ? b.coordinates : null, c = [], d = 0, e = b.length; d < e; d++) c.push(this.w.coordsToLatLngs(b[d]))
  9006. b = this.w.getPolygon(a, c)
  9007. this.Lr(a, b)
  9008. return b
  9009. },
  9010. Zca: function (c) {
  9011. for (var d = 'Feature' === c.type ? c.geometry : c, d = d ? d.coordinates : null, e = [], f = 0, n = d.length; f < n; f++)
  9012. e.push(
  9013. this.EX(b.extend({}, c, { type: 'Feature', properties: { _isAmap: !0, _polygonIndex: f, _parentProperities: c.properties }, geometry: { type: 'Polygon', coordinates: d[f] } }))
  9014. )
  9015. d = new a.B.Wn(e)
  9016. this.Lr(c, d)
  9017. return d
  9018. },
  9019. Rca: function (c) {
  9020. for (var d = ('Feature' === c.type ? c.geometry : c).geometries, e = [], f = 0, n = d.length; f < n; f++)
  9021. e.push(this.MN(b.extend({}, c, { type: 'Feature', properties: { _isAmap: !0, _geometryIndex: f, _parentProperities: c.properties }, geometry: d[f] })))
  9022. d = new a.B.Wn(e)
  9023. this.Lr(c, d)
  9024. return d
  9025. },
  9026. hga: function (b) {
  9027. if (b)
  9028. switch (b.type) {
  9029. case 'Feature':
  9030. return this.MN(b)
  9031. case 'FeatureCollection':
  9032. for (var c = b.features, d = [], e = 0, f = c.length; e < f; e++) {
  9033. var p = this.MN(c[e])
  9034. p && d.push(p)
  9035. }
  9036. c = new a.B.Wn(d)
  9037. this.Lr(b, c)
  9038. return c
  9039. default:
  9040. throw Error('Invalid GeoJSON object.' + b.type)
  9041. }
  9042. },
  9043. Lr: function (a, c) {
  9044. c && a.properties && c.setExtData && ((c.C = !0), c.setExtData(b.extend({}, c.getExtData() || {}, { _geoJsonProperties: a.properties })), (c.C = !1))
  9045. },
  9046. MN: function (a) {
  9047. var b = 'Feature' === a.type ? a.geometry : a
  9048. if (!((b && b.coordinates) || b)) return null
  9049. switch (b.type) {
  9050. case 'Point':
  9051. return this.DX(a)
  9052. case 'MultiPoint':
  9053. return this.Yca(a)
  9054. case 'LineString':
  9055. return this.CX(a)
  9056. case 'MultiLineString':
  9057. return this.Xca(a)
  9058. case 'Polygon':
  9059. return this.EX(a)
  9060. case 'MultiPolygon':
  9061. return this.Zca(a)
  9062. case 'GeometryCollection':
  9063. return this.Rca(a)
  9064. default:
  9065. throw Error('Invalid GeoJSON geometry.' + b.type)
  9066. }
  9067. },
  9068. })
  9069. a.B.Wn.Hb({
  9070. toGeoJSON: function (a) {
  9071. b.c.add(this, 'toGeoJSON')
  9072. a = a || this.XI()
  9073. for (var e = [], f = 0, m = a.length; f < m; f++) a[f].toGeoJSON && ((a[f].C = !0), (e[f] = a[f].toGeoJSON()), (a[f].C = !1))
  9074. this.C = !0
  9075. a = this.getExtData() || {}
  9076. this.C = !1
  9077. if (c(e, 'Point')) e = { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiPoint', coordinates: d(e) } }
  9078. else if (c(e, 'LineString')) e = { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiLineString', coordinates: d(e) } }
  9079. else if (c(e, 'Polygon')) e = { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiPolygon', coordinates: d(e) } }
  9080. else if (c(e, '*')) {
  9081. a = a._geoJsonProperties || {}
  9082. for (var f = [], m = 0, n = e.length; m < n; m++) f.push(e[m].geometry)
  9083. e = { type: 'Feature', properties: a, geometry: { type: 'GeometryCollection', geometries: f } }
  9084. } else e = { type: 'FeatureCollection', properties: a._geoJsonProperties || {}, features: e }
  9085. return e
  9086. },
  9087. })
  9088. a.B.vb.Hb({
  9089. toGeoJSON: function () {
  9090. b.c.add(this, 'toGeoJSON')
  9091. this.C = !0
  9092. var a = this.getExtData() || {},
  9093. c = this.getPosition().wl()
  9094. this.C = !1
  9095. return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'Point', coordinates: c } }
  9096. },
  9097. })
  9098. a.B.Zb.Hb({
  9099. toGeoJSON: function () {
  9100. b.c.add(this, 'toGeoJSON')
  9101. this.C = !0
  9102. var a = this.getExtData() || {},
  9103. c = this.getPath()
  9104. this.C = !1
  9105. return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'LineString', coordinates: e(c) } }
  9106. },
  9107. })
  9108. a.B.Dc.Hb({
  9109. toGeoJSON: function () {
  9110. b.c.add(this, 'toGeoJSON')
  9111. this.C = !0
  9112. var a = this.getExtData() || {},
  9113. c = this.getPath()
  9114. this.C = !1
  9115. if (b.a.isArray(c[0]) && b.a.isArray(c[0][0])) {
  9116. for (var d = [], e = 0; e < c.length; e += 1) d.push(f(c[e]))
  9117. return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiPolygon', coordinates: d } }
  9118. }
  9119. return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'Polygon', coordinates: f(c) } }
  9120. },
  9121. })
  9122. })(z, g)
  9123. z.o.RL = z.o.Yb.extend({
  9124. ka: [g.hW],
  9125. A: function (a) {
  9126. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}
  9127. this.CLASS_NAME = 'AMap.LayerGroup'
  9128. g.c.ya(this, b)
  9129. z.o.RL.bd.A.call(this, b)
  9130. this.map = null
  9131. this.add(a)
  9132. },
  9133. vc: function (a) {
  9134. g.c.add(this, 'setMap')
  9135. this.So('setMap', a)
  9136. this.set('map', a)
  9137. this.map = a
  9138. return this
  9139. },
  9140. mapChanged: function () {},
  9141. PH: function (a) {
  9142. var b = this
  9143. g.c.add(this, 'addLayer')
  9144. this.add(a, function (a) {
  9145. b.map && ((a.C = !0), a.setMap(b.map), (a.C = !1))
  9146. })
  9147. return this
  9148. },
  9149. sk: function (a) {
  9150. var b = this
  9151. g.c.add(this, 'removeLayer')
  9152. this.remove(a, function (a) {
  9153. a.C = !0
  9154. a.getMap() === b.map && a.setMap(null)
  9155. a.C = !1
  9156. })
  9157. return this
  9158. },
  9159. Ana: function () {
  9160. var a = this
  9161. g.c.add(this, 'clearLayers')
  9162. this.clear(function (b) {
  9163. b.C = !0
  9164. b.getMap() === a.map && b.setMap(null)
  9165. b.C = !1
  9166. })
  9167. return this
  9168. },
  9169. Zy: function () {
  9170. g.c.add(this, 'hide')
  9171. this.So('hide')
  9172. return this
  9173. },
  9174. show: function () {
  9175. g.c.add(this, 'show')
  9176. this.So('show')
  9177. return this
  9178. },
  9179. reload: function () {
  9180. this.So('reload')
  9181. return this
  9182. },
  9183. ub: function () {
  9184. var a = this,
  9185. b = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
  9186. g.c.add(this, 'setOptions')
  9187. var c = g.a.keys(b)
  9188. g.a.Tb(c, function (c) {
  9189. a.So('set', c, b[c])
  9190. })
  9191. return this
  9192. },
  9193. })
  9194. z.o.RL.Xb({
  9195. find: 'getLayer',
  9196. XI: 'getLayers',
  9197. PH: ['addLayer', 'addLayers'],
  9198. Ld: 'hasLayer',
  9199. sk: ['removeLayer', 'removeLayers'],
  9200. Ana: 'clearLayers',
  9201. Tb: 'eachLayer',
  9202. vc: 'setMap',
  9203. ub: 'setOptions',
  9204. show: 'show',
  9205. Zy: 'hide',
  9206. reload: 'reload',
  9207. h: 'on',
  9208. G: 'off',
  9209. })
  9210. g.Zaa = z.Rb.extend({
  9211. A: function (a, b) {
  9212. b && ((b.center = b.position), (b.zoom = 11))
  9213. arguments.callee.ma.apply(this, arguments)
  9214. window.console && window.console.log && window.console.log('\u9ad8\u5fb7\u5730\u56feJSAPI\u8857\u666f\u5df2\u4e0b\u7ebf\uff0c\u611f\u8c22\u60a8\u7684\u652f\u6301\u3002')
  9215. },
  9216. })
  9217. g.$aa = z.B.vb.extend({
  9218. A: function (a) {
  9219. arguments.callee.ma.apply(this, arguments)
  9220. },
  9221. })
  9222. g.wd = {
  9223. ms: function (a, b) {
  9224. for (var c = Infinity, d = 0, e = 1, f = b.length; e < f; d = e, e += 1) c = Math.min(c, g.wd.Wxa(a, [b[d], b[e]]))
  9225. return Math.sqrt(c)
  9226. },
  9227. Wxa: function (a, b) {
  9228. return this.aL(a, this.G2(a, b))
  9229. },
  9230. aL: function (a, b) {
  9231. var c = a[0] - b[0],
  9232. d = a[1] - b[1]
  9233. return c * c + d * d
  9234. },
  9235. GGa: function (a, b, c, d) {
  9236. d = d || 1e-6
  9237. if (c[0] === b[0]) {
  9238. var e = Math.min(b[1], c[1])
  9239. b = Math.max(b[1], c[1])
  9240. return Math.abs(a[0] - c[0]) < d && a[1] >= e && a[1] <= b
  9241. }
  9242. var e = Math.min(b[0], c[0]),
  9243. f = Math.max(b[0], c[0])
  9244. return Math.abs(((c[1] - b[1]) / (c[0] - b[0])) * (a[0] - b[0]) + b[1] - a[1]) < d && a[0] >= e && a[0] <= f
  9245. },
  9246. G2: function (a, b) {
  9247. var c = a[0],
  9248. d = a[1],
  9249. e = b[0],
  9250. f = b[1],
  9251. h = e[0],
  9252. e = e[1],
  9253. k = f[0],
  9254. f = f[1],
  9255. l = k - h,
  9256. m = f - e,
  9257. c = 0 === l && 0 === m ? 0 : (l * (c - h) + m * (d - e)) / (l * l + m * m || 0)
  9258. 0 >= c || (1 <= c ? ((h = k), (e = f)) : ((h += c * l), (e += c * m)))
  9259. return [h, e]
  9260. },
  9261. uq: function (a) {
  9262. for (var b = a.length, c = 0, d = a[b - 1], e = d[0], d = d[1], f, h, k = 0; k < b; k += 1) (h = a[k]), (f = h[0]), (h = h[1]), (c += (f - e) * (h + d)), (e = f), (d = h)
  9263. return 0 < c
  9264. },
  9265. Sd: function (a, b, c) {
  9266. var d = a[0]
  9267. a = a[1]
  9268. var e = !1,
  9269. f,
  9270. h,
  9271. k,
  9272. l,
  9273. m = b.length,
  9274. n = 0
  9275. for (l = m - 1; n < m; l = n, n += 1) {
  9276. var p = !1
  9277. f = b[n][0]
  9278. h = b[n][1]
  9279. k = b[l][0]
  9280. l = b[l][1]
  9281. if ((f === d && h === a) || (k === d && l === a)) return c ? !0 : !1
  9282. if (h < a === l >= a) {
  9283. f = ((k - f) * (a - h)) / (l - h) + f
  9284. if (d === f) return c ? !0 : !1
  9285. p = d < f
  9286. }
  9287. p && (e = !e)
  9288. }
  9289. return e
  9290. },
  9291. Q7: function (a, b) {
  9292. function c(a, b, c, d) {
  9293. var e = [a[0] - b[0], a[1] - b[1]],
  9294. f = [c[0] - d[0], c[1] - d[1]]
  9295. a = a[0] * b[1] - a[1] * b[0]
  9296. c = c[0] * d[1] - c[1] * d[0]
  9297. d = 1 / (e[0] * f[1] - e[1] * f[0])
  9298. return [(a * f[0] - c * e[0]) * d, (a * f[1] - c * e[1]) * d]
  9299. }
  9300. function d(a, b, c) {
  9301. return (c[0] - b[0]) * (a[1] - b[1]) > (c[1] - b[1]) * (a[0] - b[0])
  9302. }
  9303. var e,
  9304. f,
  9305. h,
  9306. k,
  9307. l = a
  9308. e = b[b.length - 2]
  9309. for (var m = 0, n = b.length - 1; m < n; m++) {
  9310. f = b[m]
  9311. var p = l,
  9312. l = []
  9313. h = p[p.length - 1]
  9314. for (var q = 0, r = p.length; q < r; q++) (k = p[q]), d(k, e, f) ? (d(h, e, f) || l.push(c(e, f, h, k)), l.push(k)) : d(h, e, f) && l.push(c(e, f, h, k)), (h = k)
  9315. e = f
  9316. }
  9317. if (3 > l.length) return []
  9318. l.push(l[0])
  9319. return l
  9320. },
  9321. }
  9322. ;(function (a) {
  9323. function b(b, c) {
  9324. var d
  9325. a: {
  9326. switch (b) {
  9327. case 'EPSG3395':
  9328. d = a.Zh.$V
  9329. break a
  9330. case 'EPSG4326':
  9331. d = a.Zh.aW
  9332. break a
  9333. }
  9334. d = a.Zh.IL
  9335. }
  9336. return {
  9337. project: function (b) {
  9338. a.a.isArray(b) && (b = new a.U(b[0], b[1]))
  9339. return d.MD(b, c).wl()
  9340. },
  9341. unproject: function (b) {
  9342. a.a.isArray(b) && (b = new a.H(b[0], b[1]))
  9343. return d.lE(b, c).wl()
  9344. },
  9345. normalizePoint: function (b) {
  9346. return a.a.Ka(b)
  9347. },
  9348. distance: function (b, c) {
  9349. c = this.normalizePoint(c)
  9350. if (a.a.isArray(c)) return this.distanceToLine(b, c)
  9351. b = this.normalizePoint(b)
  9352. var d = a.Lm.Pu,
  9353. e = Math.cos,
  9354. f = b.Q * d,
  9355. h = c.Q * d,
  9356. k = 2 * a.Lm.PQ,
  9357. d = c.R * d - b.R * d,
  9358. e = (1 - e(h - f) + (1 - e(d)) * e(f) * e(h)) / 2
  9359. return k * Math.asin(Math.sqrt(e))
  9360. },
  9361. ringArea: function (b) {
  9362. b = this.normalizeLine(b)
  9363. var c = a.Lm.PQ * a.Lm.Pu,
  9364. d = 0,
  9365. e = b.length
  9366. if (3 > e) return 0
  9367. for (var f = 0; f < e - 1; f += 1)
  9368. var h = b[f], k = b[f + 1], u = h.R * c * Math.cos(h.Q * a.Lm.Pu), h = h.Q * c, v = k.R * c * Math.cos(k.Q * a.Lm.Pu), d = d + (u * k.Q * c - v * h)
  9369. f = b[f]
  9370. b = b[0]
  9371. e = f.R * c * Math.cos(f.Q * a.Lm.Pu)
  9372. f = f.Q * c
  9373. k = b.R * c * Math.cos(b.Q * a.Lm.Pu)
  9374. d += e * b.Q * c - k * f
  9375. return 0.5 * Math.abs(d)
  9376. },
  9377. sphericalCalotteArea: function (b) {
  9378. var c = a.Lm.PQ
  9379. b = c - c * Math.cos(b / c)
  9380. return 2 * Math.PI * c * b
  9381. },
  9382. }
  9383. }
  9384. function c() {
  9385. return {
  9386. normalizePoint: function (a) {
  9387. return a && a.x && a.y ? [a.x, a.y] : a
  9388. },
  9389. distance: function (a, b) {
  9390. var c = a[0] - b[0],
  9391. d = a[1] - b[1]
  9392. return Math.sqrt(c * c + d * d)
  9393. },
  9394. project: function (a) {
  9395. return a
  9396. },
  9397. unproject: function (a) {
  9398. return a
  9399. },
  9400. ringArea: function (a) {
  9401. for (var b = [0, 0], c = [0, 0], d = 0, e = a[0], n = a.length, p = 2; p < n; p++) {
  9402. var q = a[p - 1],
  9403. r = a[p]
  9404. b[0] = e[0] - r[0]
  9405. b[1] = e[1] - r[1]
  9406. c[0] = e[0] - q[0]
  9407. c[1] = e[1] - q[1]
  9408. d += b[0] * c[1] - b[1] * c[0]
  9409. }
  9410. return d / 2
  9411. },
  9412. }
  9413. }
  9414. function d(a) {
  9415. for (var b = 0, c = a.length, d = 0; d < c - 1; d++) var e = a[d], n = a[d + 1], b = b + (n[0] - e[0]) * (n[1] + e[1])
  9416. if (a[c - 1][0] !== a[0][0] || a[c - 1][1] !== a[0][1]) (e = a[c - 1]), (n = a[0]), (b += (n[0] - e[0]) * (n[1] + e[1]))
  9417. return 0 >= b
  9418. }
  9419. function e(b) {
  9420. this.CLASS_NAME = 'AMap.GeometryUtil'
  9421. this.Vb = a.extend({ onSegmentTolerance: 5, crs: 'EPSG3857', maxZoom: 20 }, b)
  9422. this.setCrs(this.Vb.crs)
  9423. }
  9424. a.extend(e.prototype, {
  9425. clone: function (b) {
  9426. return new e(a.extend({}, this.Vb, b))
  9427. },
  9428. isPoint: function (b) {
  9429. return b && (b instanceof a.U || (a.a.isArray(b) && !isNaN(b[0])))
  9430. },
  9431. normalizePoint: function (a) {
  9432. return a
  9433. },
  9434. normalizeLine: function (a) {
  9435. for (var b = [], c = 0, d = a.length; c < d; c++) b.push(this.normalizePoint(a[c]))
  9436. return b
  9437. },
  9438. normalizeMultiLines: function (b) {
  9439. a.a.isArray(b) && this.isPoint(b[0]) && (b = [b])
  9440. for (var c = [], d = 0, e = b.length; d < e; d++) c.push(this.normalizeLine(b[d]))
  9441. return c
  9442. },
  9443. setCrs: function (d) {
  9444. a.extend(this, d && d.project && d.unproject ? d : 'plane' === d ? c() : b(d, this.Vb.maxZoom))
  9445. },
  9446. distance: function () {
  9447. throw Error('distance Not implemented!')
  9448. },
  9449. Fx: function (a, b) {
  9450. a = this.normalizeLine(a)
  9451. this.isPoint(a[0]) || (a = a[0])
  9452. for (var c = [], d = 0, e = a.length; d < e; d++) c.push(this.project(a[d]))
  9453. !0 === b ? (c = this.makesureClockwise(c)) : !1 === b && ((c = this.makesureClockwise(c)), c.reverse())
  9454. return c
  9455. },
  9456. dka: function (a) {
  9457. for (var b = [], c = 0, d = a.length; c < d; c++) b.push(this.unproject(a[c]))
  9458. return b
  9459. },
  9460. closestOnSegment: function (b, c, d) {
  9461. b = a.wd.G2(this.project(b), this.Fx([c, d]))
  9462. return this.unproject(b)
  9463. },
  9464. closestOnLine: function (a, b) {
  9465. b = this.normalizeLine(b)
  9466. for (var c = Infinity, d, e = 0, n = b.length; e < n - 1; e++) {
  9467. var p = this.closestOnSegment(a, b[e], b[e + 1]),
  9468. q = this.distance(a, p)
  9469. q < c && ((c = q), (d = p))
  9470. }
  9471. return d
  9472. },
  9473. distanceToSegment: function (a, b, c) {
  9474. return this.distanceToLine(a, [b, c])
  9475. },
  9476. distanceToLine: function (a, b) {
  9477. b = this.normalizeLine(b)
  9478. this.isPoint(b[0]) || (b = b[0])
  9479. for (var c = Infinity, d = 0, e = b.length; d < e - 1; d++) var n = this.closestOnSegment(a, b[d], b[d + 1]), c = Math.min(c, this.distance(a, n))
  9480. return c
  9481. },
  9482. distanceToPolygon: function (a, b) {
  9483. return this.isPointInRing(a, b) ? 0 : this.distanceToLine(a, b)
  9484. },
  9485. isPointOnSegment: function (a, b, c, d) {
  9486. if ((!d && 0 !== d) || 0 > d) d = this.Vb.onSegmentTolerance
  9487. return this.distanceToSegment(a, b, c) <= d
  9488. },
  9489. isPointOnLine: function (a, b, c) {
  9490. b = this.normalizeLine(b)
  9491. for (var d = 0, e = b.length; d < e - 1; d++) if (this.isPointOnSegment(a, b[d], b[d + 1], c)) return !0
  9492. return !1
  9493. },
  9494. isPointOnRing: function (a, b, c) {
  9495. b = this.normalizeLine(b)
  9496. for (var d = 0, e = b.length; d < e; d++) if (this.isPointOnSegment(a, b[d], b[d === e - 1 ? 0 : d + 1], c)) return !0
  9497. return !1
  9498. },
  9499. isPointOnPolygon: function (a, b, c) {
  9500. b = this.normalizeMultiLines(b)
  9501. for (var d = 0, e = b.length; d < e; d++) if (this.isPointOnRing(a, b[d], c)) return !0
  9502. return !1
  9503. },
  9504. makesureClockwise: function (a) {
  9505. d(a) || ((a = [].concat(a)), a.reverse())
  9506. return a
  9507. },
  9508. makesureAntiClockwise: function (a) {
  9509. d(a) && ((a = [].concat(a)), a.reverse())
  9510. return a
  9511. },
  9512. isPointInRing: function (b, c, d) {
  9513. d || (c = this.normalizeLine(c))
  9514. c = this.Fx(c, !0)
  9515. return a.wd.Sd(this.project(b), c, !1)
  9516. },
  9517. isRingInRing: function (a, b, c) {
  9518. for (var d = 0, e = a.length; d < e; d++) if (!this.isPointInRing(a[d], b, c)) return !1
  9519. d = 0
  9520. for (e = b.length; d < e; d++) if (this.isPointInRing(b[d], a, c)) return !1
  9521. return !0
  9522. },
  9523. isPointInPolygon: function (a, b) {
  9524. b = this.normalizeMultiLines(b)
  9525. for (var c, d = 0, e = b.length; d < e && ((c = this.isPointInRing(a, b[d])), 0 < d && (c = !c), c); d += 1);
  9526. return c
  9527. },
  9528. doesSegmentsIntersect: function (a, b, c, d, e) {
  9529. e = e ? [a, b, c, d] : this.Fx([a, b, c, d])
  9530. a = e[0]
  9531. b = e[1]
  9532. c = e[2]
  9533. d = e[3]
  9534. e = !1
  9535. var n = (d[0] - c[0]) * (a[1] - c[1]) - (d[1] - c[1]) * (a[0] - c[0]),
  9536. p = (b[0] - a[0]) * (a[1] - c[1]) - (b[1] - a[1]) * (a[0] - c[0])
  9537. a = (d[1] - c[1]) * (b[0] - a[0]) - (d[0] - c[0]) * (b[1] - a[1])
  9538. 0 !== a && ((b = n / a), (a = p / a), 0 <= b && 1 >= b && 0 <= a && 1 >= a && (e = !0))
  9539. return e
  9540. },
  9541. doesSegmentLineIntersect: function (a, b, c) {
  9542. c = this.normalizeLine(c)
  9543. for (var d = 0, e = c.length; d < e - 1; d++) if (this.doesSegmentsIntersect(a, b, c[d], c[d + 1])) return !0
  9544. return !1
  9545. },
  9546. doesSegmentRingIntersect: function (a, b, c, d) {
  9547. d || (c = this.normalizeLine(c))
  9548. for (var e = 0, n = c.length; e < n; e++) if (this.doesSegmentsIntersect(a, b, c[e], c[e === n - 1 ? 0 : e + 1], d)) return !0
  9549. return !1
  9550. },
  9551. doesSegmentPolygonIntersect: function (a, b, c) {
  9552. c = this.normalizeMultiLines(c)
  9553. for (var d = 0, e = c.length; d < e; d++) if (this.doesSegmentRingIntersect(a, b, c[d])) return !0
  9554. return !1
  9555. },
  9556. doesLineLineIntersect: function (a, b) {
  9557. a = this.normalizeLine(a)
  9558. for (var c = 0, d = a.length; c < d - 1; c++) if (this.doesSegmentLineIntersect(a[c], a[c + 1], b)) return !0
  9559. return !1
  9560. },
  9561. doesLineRingIntersect: function (a, b) {
  9562. a = this.normalizeLine(a)
  9563. for (var c = 0, d = a.length; c < d - 1; c++) if (this.doesSegmentRingIntersect(a[c], a[c + 1], b)) return !0
  9564. return !1
  9565. },
  9566. doesPolygonPolygonIntersect: function (a, b) {
  9567. return this.doesRingRingIntersect(b, a) || this.isRingInRing(a, b) || this.isRingInRing(b, a) ? !0 : !1
  9568. },
  9569. doesPolygonContainsPolygon: function (a, b, c) {
  9570. return this.isRingInRing(b, a, !0) || (c ? this.doesRingRingIntersect(b, a, !0) : !1)
  9571. },
  9572. doesRingRingIntersect: function (a, b, c) {
  9573. c || (a = this.normalizeLine(a))
  9574. for (var d = 0, e = a.length; d < e; d++) if (this.doesSegmentRingIntersect(a[d], a[d === e - 1 ? 0 : d + 1], b, c)) return !0
  9575. return !1
  9576. },
  9577. EP: function (a, b) {
  9578. for (var c = 0, d = 0; d < a.length - 1; d += 1) {
  9579. var e = this.distance(a[d], a[d + 1])
  9580. if (e + c < b) c += e
  9581. else return (c = (b - c) / e), [a[d][0] + c * (a[d + 1][0] - a[d][0]), a[d][1] + c * (a[d + 1][1] - a[d][1]), d]
  9582. }
  9583. return null
  9584. },
  9585. UX: function (a, b) {
  9586. function c() {
  9587. var a = [e[0] - n[0], e[1] - n[1]],
  9588. b = [p[0] - q[0], p[1] - q[1]],
  9589. d = e[0] * n[1] - e[1] * n[0],
  9590. f = p[0] * q[1] - p[1] * q[0],
  9591. h = 1 / (a[0] * b[1] - a[1] * b[0])
  9592. return [(d * b[0] - f * a[0]) * h, (d * b[1] - f * a[1]) * h]
  9593. }
  9594. function d(a) {
  9595. return (n[0] - e[0]) * (a[1] - e[1]) > (n[1] - e[1]) * (a[0] - e[0])
  9596. }
  9597. a = this.makesureAntiClockwise(a)
  9598. b = this.makesureClockwise(b)
  9599. var e,
  9600. n,
  9601. p,
  9602. q,
  9603. r = a
  9604. e = b[b.length - 1]
  9605. for (var s = 0, u = b.length; s < u; s++) {
  9606. n = b[s]
  9607. var v = r,
  9608. r = []
  9609. p = v[v.length - 1]
  9610. for (var w = 0, t = v.length; w < t; w++) (q = v[w]), d(q) ? (d(p) || r.push(c()), r.push(q)) : d(p) && r.push(c()), (p = q)
  9611. e = n
  9612. }
  9613. return r
  9614. },
  9615. ringRingClip: function (a, b) {
  9616. a = this.Fx(a)
  9617. b = this.Fx(b)
  9618. var c = this.UX(a, b)
  9619. 0 == c.length && (c = this.UX(b, a))
  9620. return this.dka(c)
  9621. },
  9622. ringArea: function () {
  9623. throw Error('distance Not implemented!')
  9624. },
  9625. distanceOfLine: function (a) {
  9626. a = this.normalizeLine(a)
  9627. for (var b = 0, c = 0, d = a.length; c < d - 1; c++) b += this.distance(a[c], a[c + 1])
  9628. return b
  9629. },
  9630. isClockwise: function (a) {
  9631. a = this.Fx(a)
  9632. return d(a)
  9633. },
  9634. })
  9635. a.Ft = new e()
  9636. a.di = new e()
  9637. a.di.setCrs('plane')
  9638. })(g)
  9639. g.KL = function () {
  9640. var a = {}
  9641. ;(function () {
  9642. function b(a) {
  9643. for (var b = 0, e = a.length, f = 0; f < e - 1; f++) var h = a[f], k = a[f + 1], b = b + (k[0] - h[0]) * (k[1] + h[1])
  9644. if (a[e - 1][0] !== a[0][0] || a[e - 1][1] !== a[0][1]) (h = a[e - 1]), (k = a[0]), (b += (k[0] - h[0]) * (k[1] + h[1]))
  9645. return 0 >= b
  9646. }
  9647. a.Nta = function (a) {
  9648. b(a) && ((a = [].concat(a)), a.reverse())
  9649. return a
  9650. }
  9651. a.D5 = b
  9652. })()
  9653. ;(function () {
  9654. function b(a) {
  9655. var b = a.length
  9656. 2 < b && a[b - 1][0] == a[0][0] && a[b - 1][1] == a[0][1] && a.pop()
  9657. }
  9658. function c(a, b) {
  9659. for (var c = 0; c < b.length; c++) a.push(b[c][0]), a.push(b[c][1])
  9660. }
  9661. a.Vh = function (a, e) {
  9662. var f = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 0,
  9663. h = arguments[3]
  9664. e = e || []
  9665. var k = [],
  9666. l = []
  9667. b(a)
  9668. c(k, a)
  9669. var m = a.length
  9670. e.forEach(b)
  9671. for (var n = 0; n < e.length; n++) l.push(m), (m += e[n].length), c(k, e[n])
  9672. l = (this.lL ? this.lL : g.Ec.lL)(k, l)
  9673. if (h) {
  9674. f = []
  9675. for (n = 0; n < l.length; n += 1) (h = 2 * l[n]), f.push([k[h], k[h + 1]])
  9676. return f
  9677. }
  9678. if (f) for (n = 0; n < l.length; n += 1) l[n] += f
  9679. return l
  9680. }
  9681. })()
  9682. return a
  9683. }
  9684. ;(function (a) {
  9685. a.rF = function () {
  9686. function a(b, c, d, e, f) {
  9687. for (var h, k = 0, l = c, n = d - e; l < d; l += e) (k += (b[n] - b[l]) * (b[l + 1] + b[n + 1])), (n = l)
  9688. if (f === 0 < k) for (f = c; f < d; f += e) h = r(f, b[f], b[f + 1], h)
  9689. else for (f = d - e; f >= c; f -= e) h = r(f, b[f], b[f + 1], h)
  9690. h && m(h, h.next) && (s(h), (h = h.next))
  9691. return h
  9692. }
  9693. function c(a, b) {
  9694. if (!a) return a
  9695. b || (b = a)
  9696. var c = a,
  9697. d
  9698. do
  9699. if (((d = !1), c.u9 || (!m(c, c.next) && 0 !== l(c.Ia, c, c.next)))) c = c.next
  9700. else {
  9701. s(c)
  9702. c = b = c.Ia
  9703. if (c === c.next) break
  9704. d = !0
  9705. }
  9706. while (d || c !== b)
  9707. return b
  9708. }
  9709. function d(a, b, e, f, r, u, C) {
  9710. if (a) {
  9711. if (!C && u) {
  9712. var D = a,
  9713. A = D
  9714. do null === A.z && (A.z = h(A.x, A.y, f, r, u)), (A.ip = A.Ia), (A = A.nl = A.next)
  9715. while (A !== D)
  9716. A.ip.nl = null
  9717. A.ip = null
  9718. var D = A,
  9719. B,
  9720. G,
  9721. H,
  9722. I,
  9723. P,
  9724. L,
  9725. M = 1
  9726. do {
  9727. A = D
  9728. H = D = null
  9729. for (I = 0; A; ) {
  9730. I++
  9731. G = A
  9732. for (B = P = 0; B < M && (P++, (G = G.nl), G); B++);
  9733. for (L = M; 0 < P || (0 < L && G); )
  9734. 0 !== P && (0 === L || !G || A.z <= G.z) ? ((B = A), (A = A.nl), P--) : ((B = G), (G = G.nl), L--), H ? (H.nl = B) : (D = B), (B.ip = H), (H = B)
  9735. A = G
  9736. }
  9737. H.nl = null
  9738. M *= 2
  9739. } while (1 < I)
  9740. }
  9741. for (D = a; a.Ia !== a.next; ) {
  9742. A = a.Ia
  9743. G = a.next
  9744. if (u)
  9745. a: if (((H = a.Ia), (I = a.next), 0 <= l(H, a, I))) H = !1
  9746. else {
  9747. P = h(H.x < a.x ? (H.x < I.x ? H.x : I.x) : a.x < I.x ? a.x : I.x, H.y < a.y ? (H.y < I.y ? H.y : I.y) : a.y < I.y ? a.y : I.y, f, r, u)
  9748. M = h(H.x > a.x ? (H.x > I.x ? H.x : I.x) : a.x > I.x ? a.x : I.x, H.y > a.y ? (H.y > I.y ? H.y : I.y) : a.y > I.y ? a.y : I.y, f, r, u)
  9749. for (B = a.nl; B && B.z <= M; ) {
  9750. if (B !== a.Ia && B !== a.next && k(H.x, H.y, a.x, a.y, I.x, I.y, B.x, B.y) && 0 <= l(B.Ia, B, B.next)) {
  9751. H = !1
  9752. break a
  9753. }
  9754. B = B.nl
  9755. }
  9756. for (B = a.ip; B && B.z >= P; ) {
  9757. if (B !== a.Ia && B !== a.next && k(H.x, H.y, a.x, a.y, I.x, I.y, B.x, B.y) && 0 <= l(B.Ia, B, B.next)) {
  9758. H = !1
  9759. break a
  9760. }
  9761. B = B.ip
  9762. }
  9763. H = !0
  9764. }
  9765. else
  9766. a: if (((H = a.Ia), (I = a.next), 0 <= l(H, a, I))) H = !1
  9767. else {
  9768. for (P = a.next.next; P !== a.Ia; ) {
  9769. if (k(H.x, H.y, a.x, a.y, I.x, I.y, P.x, P.y) && 0 <= l(P.Ia, P, P.next)) {
  9770. H = !1
  9771. break a
  9772. }
  9773. P = P.next
  9774. }
  9775. H = !0
  9776. }
  9777. if (H) b.push(A.we / e), b.push(a.we / e), b.push(G.we / e), s(a), (D = a = G.next)
  9778. else if (((a = G), a === D)) {
  9779. if (C)
  9780. if (1 === C) {
  9781. C = b
  9782. D = e
  9783. A = a
  9784. do
  9785. (G = A.Ia),
  9786. (H = A.next.next),
  9787. !m(G, H) && n(G, A, A.next, H) && p(G, H) && p(H, G) && (C.push(G.we / D), C.push(A.we / D), C.push(H.we / D), s(A), s(A.next), (A = a = H)),
  9788. (A = A.next)
  9789. while (A !== a)
  9790. a = A
  9791. d(a, b, e, f, r, u, 2)
  9792. } else {
  9793. if (2 === C)
  9794. a: {
  9795. C = a
  9796. do {
  9797. for (D = C.next.next; D !== C.Ia; ) {
  9798. if ((A = C.we !== D.we))
  9799. if (((A = void 0), (A = C.next.we !== D.we)))
  9800. if (((A = void 0), (A = C.Ia.we !== D.we))) {
  9801. A = A = void 0
  9802. b: {
  9803. A = C
  9804. do {
  9805. if (A.we !== C.we && A.next.we !== C.we && A.we !== D.we && A.next.we !== D.we && n(A, A.next, C, D)) {
  9806. A = !0
  9807. break b
  9808. }
  9809. A = A.next
  9810. } while (A !== C)
  9811. A = !1
  9812. }
  9813. if ((A = !A))
  9814. if (((A = void 0), (A = p(C, D))))
  9815. if (((A = void 0), (A = p(D, C)))) {
  9816. A = C
  9817. G = !1
  9818. H = (C.x + D.x) / 2
  9819. I = (C.y + D.y) / 2
  9820. do
  9821. A.y > I !== A.next.y > I && A.next.y !== A.y && H < ((A.next.x - A.x) * (I - A.y)) / (A.next.y - A.y) + A.x && (G = !G),
  9822. (A = A.next)
  9823. while (A !== C)
  9824. A = G
  9825. }
  9826. }
  9827. if (A) {
  9828. a = q(C, D)
  9829. C = c(C, C.next)
  9830. a = c(a, a.next)
  9831. d(C, b, e, f, r, u)
  9832. d(a, b, e, f, r, u)
  9833. break a
  9834. }
  9835. D = D.next
  9836. }
  9837. C = C.next
  9838. } while (C !== a)
  9839. }
  9840. }
  9841. else d(c(a), b, e, f, r, u, 1)
  9842. break
  9843. }
  9844. }
  9845. }
  9846. }
  9847. function e(a, b) {
  9848. return a.x - b.x
  9849. }
  9850. function f(a, b) {
  9851. var c = b,
  9852. d = a.x,
  9853. e = a.y,
  9854. f = -Infinity,
  9855. h
  9856. do {
  9857. if (e <= c.y && e >= c.next.y && c.next.y !== c.y) {
  9858. var l = c.x + ((e - c.y) * (c.next.x - c.x)) / (c.next.y - c.y)
  9859. if (l <= d && l > f) {
  9860. f = l
  9861. if (l === d) {
  9862. if (e === c.y) return c
  9863. if (e === c.next.y) return c.next
  9864. }
  9865. h = c.x < c.next.x ? c : c.next
  9866. }
  9867. }
  9868. c = c.next
  9869. } while (c !== b)
  9870. if (!h) return null
  9871. if (d === f) return h.Ia
  9872. for (var l = h, m = h.x, n = h.y, r = Infinity, s, c = h.next; c !== l; )
  9873. d >= c.x &&
  9874. c.x >= m &&
  9875. d !== c.x &&
  9876. k(e < n ? d : f, e, m, n, e < n ? f : d, e, c.x, c.y) &&
  9877. ((s = Math.abs(e - c.y) / (d - c.x)), (s < r || (s === r && c.x > h.x)) && p(c, a) && ((h = c), (r = s))),
  9878. (c = c.next)
  9879. return h
  9880. }
  9881. function h(a, b, c, d, e) {
  9882. a = 32767 * (a - c) * e
  9883. b = 32767 * (b - d) * e
  9884. a = (a | (a << 8)) & 16711935
  9885. a = (a | (a << 4)) & 252645135
  9886. a = (a | (a << 2)) & 858993459
  9887. b = (b | (b << 8)) & 16711935
  9888. b = (b | (b << 4)) & 252645135
  9889. b = (b | (b << 2)) & 858993459
  9890. return ((a | (a << 1)) & 1431655765) | (((b | (b << 1)) & 1431655765) << 1)
  9891. }
  9892. function k(a, b, c, d, e, f, h, k) {
  9893. return 0 <= (e - h) * (b - k) - (a - h) * (f - k) && 0 <= (a - h) * (d - k) - (c - h) * (b - k) && 0 <= (c - h) * (f - k) - (e - h) * (d - k)
  9894. }
  9895. function l(a, b, c) {
  9896. return (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y)
  9897. }
  9898. function m(a, b) {
  9899. return a.x === b.x && a.y === b.y
  9900. }
  9901. function n(a, b, c, d) {
  9902. return (m(a, b) && m(c, d)) || (m(a, d) && m(c, b)) ? !0 : 0 < l(a, b, c) !== 0 < l(a, b, d) && 0 < l(c, d, a) !== 0 < l(c, d, b)
  9903. }
  9904. function p(a, b) {
  9905. return 0 > l(a.Ia, a, a.next) ? 0 <= l(a, b, a.next) && 0 <= l(a, a.Ia, b) : 0 > l(a, b, a.Ia) || 0 > l(a, a.next, b)
  9906. }
  9907. function q(a, b) {
  9908. var c = new u(a.we, a.x, a.y),
  9909. d = new u(b.we, b.x, b.y),
  9910. e = a.next,
  9911. f = b.Ia
  9912. a.next = b
  9913. b.Ia = a
  9914. c.next = e
  9915. e.Ia = c
  9916. d.next = c
  9917. c.Ia = d
  9918. f.next = d
  9919. d.Ia = f
  9920. return d
  9921. }
  9922. function r(a, b, c, d) {
  9923. a = new u(a, b, c)
  9924. d ? ((a.next = d.next), (a.Ia = d), (d.next.Ia = a), (d.next = a)) : ((a.Ia = a), (a.next = a))
  9925. return a
  9926. }
  9927. function s(a) {
  9928. a.next.Ia = a.Ia
  9929. a.Ia.next = a.next
  9930. a.ip && (a.ip.nl = a.nl)
  9931. a.nl && (a.nl.ip = a.ip)
  9932. }
  9933. function u(a, b, c) {
  9934. this.we = a
  9935. this.x = b
  9936. this.y = c
  9937. this.nl = this.ip = this.z = this.next = this.Ia = null
  9938. this.u9 = !1
  9939. }
  9940. return {
  9941. lL: function (h, k, l) {
  9942. l = l || 2
  9943. var m = k && k.length,
  9944. n = m ? k[0] * l : h.length,
  9945. p = a(h, 0, n, l, !0),
  9946. r = []
  9947. if (!p) return r
  9948. var s, u, B, G
  9949. if (m) {
  9950. var H = l,
  9951. m = [],
  9952. I,
  9953. P,
  9954. L
  9955. G = 0
  9956. for (I = k.length; G < I; G++) {
  9957. P = k[G] * H
  9958. L = G < I - 1 ? k[G + 1] * H : h.length
  9959. P = a(h, P, L, H, !1)
  9960. P === P.next && (P.u9 = !0)
  9961. var M = (L = P)
  9962. do L.x < M.x && (M = L), (L = L.next)
  9963. while (L !== P)
  9964. m.push(M)
  9965. }
  9966. m.sort(e)
  9967. for (G = 0; G < m.length; G++) {
  9968. k = m[G]
  9969. H = p
  9970. if ((H = f(k, H))) (k = q(H, k)), c(k, k.next)
  9971. p = c(p, p.next)
  9972. }
  9973. }
  9974. if (h.length > 80 * l) {
  9975. s = B = h[0]
  9976. u = m = h[1]
  9977. for (H = l; H < n; H += l) (G = h[H]), (k = h[H + 1]), G < s && (s = G), k < u && (u = k), G > B && (B = G), k > m && (m = k)
  9978. B = Math.max(B - s, m - u)
  9979. B = 0 !== B ? 1 / B : 0
  9980. }
  9981. d(p, r, l, s, u, B)
  9982. return r
  9983. },
  9984. }
  9985. }
  9986. a.faa = a.rF()
  9987. })(g)
  9988. ;(function (a) {
  9989. function b(a) {
  9990. var b = a.length
  9991. 2 < b && a[b - 1][0] == a[0][0] && a[b - 1][1] == a[0][1] && a.pop()
  9992. }
  9993. function c(a, b) {
  9994. for (var c = 0; c < b.length; c++) a.push(b[c][0]), a.push(b[c][1])
  9995. }
  9996. a.Zn = {
  9997. oi: function (a) {
  9998. for (var b = a.length, c = 0, h = b - 1, k = 0; k < b; h = k++) c += a[h][0] * a[k][1] - a[k][0] * a[h][1]
  9999. return 0.5 * c
  10000. },
  10001. D5: function (b) {
  10002. return 0 > a.Zn.oi(b)
  10003. },
  10004. normalize: function (b) {
  10005. var c
  10006. if (b) {
  10007. c = []
  10008. for (var f = 0, h = b.length; f < h; f += 1)
  10009. c[f] = b[f] instanceof Array ? this.normalize(b[f]) : b[f] instanceof a.U ? [b[f].R, b[f].Q] : b[f] instanceof a.H ? [b[f].x, b[f].y] : b[f]
  10010. }
  10011. return c
  10012. },
  10013. Vh: function (d, e) {
  10014. e = e || []
  10015. var f = [],
  10016. h = []
  10017. b(d)
  10018. c(f, d)
  10019. var k = d.length
  10020. e.forEach(b)
  10021. for (var l = 0; l < e.length; l++) h.push(k), (k += e[l].length), c(f, e[l])
  10022. return a.faa.lL(f, h)
  10023. },
  10024. }
  10025. })(g)
  10026. g.qI = function (a, b, c) {
  10027. g.c.add({ CLASS_NAME: 'convertFrom' }, b)
  10028. var d = g.r.Zd + '/v3/assistant/coordinate/convert'
  10029. a = g.a.Ka(a)
  10030. var e = []
  10031. if (a instanceof Array) {
  10032. for (var f = 0, h = a.length; f < h; f += 1) e.push(a[f] + '')
  10033. e = e.join(';')
  10034. } else e = a + ''
  10035. b = ['key=' + g.r.key, 's=rsv3', 'locations=' + e, 'coordsys=' + (b || 'gps')]
  10036. d += 0 < b.length ? '?' + b.join('&') : ''
  10037. d = new g.jb.zb(d, { callback: 'callback' })
  10038. d.h(
  10039. 'complete',
  10040. function (a) {
  10041. if ('1' === a.status) {
  10042. a = a.locations.split(';')
  10043. for (var b = 0; b < a.length; b += 1) {
  10044. var d = a[b].split(',')
  10045. a[b] = new AMap.LngLat(d[0], d[1])
  10046. }
  10047. c && 'function' === typeof c && c('complete', { info: 'ok', locations: a })
  10048. } else c && 'function' === typeof c && c('error', a.info)
  10049. },
  10050. this
  10051. )
  10052. d.h(
  10053. 'error',
  10054. function (a) {
  10055. c && 'function' === typeof c && c('error', a.info)
  10056. },
  10057. this
  10058. )
  10059. }
  10060. g.jb = g.jb || {}
  10061. g.jb.iM = g.da.extend({
  10062. ka: [g.va],
  10063. A: function (a, b) {
  10064. this.w = { callback: 'cbk', type: 'json', charset: 'utf-8' }
  10065. b = b || {}
  10066. g.a.ub(this, b)
  10067. this.url = a
  10068. this.send(a, b.Ed, b.O2, b.pU, b.responseType)
  10069. },
  10070. send: function (a) {
  10071. var b = g.f.create('script')
  10072. b.type = 'text/javascript'
  10073. b.charset = this.w.charset
  10074. var c = this
  10075. g.l.Ue
  10076. ? (b.onreadystatechange = function () {
  10077. ;('loaded' !== this.readyState && 'complete' !== this.readyState) || c.q('complete')
  10078. })
  10079. : ((b.onload = function () {
  10080. c.q('complete')
  10081. }),
  10082. (b.onerror = function () {
  10083. c.q('error', { status: 0, info: 'service error', url: a })
  10084. }))
  10085. b.src = a
  10086. document.getElementsByTagName('head')[0].appendChild(b)
  10087. },
  10088. })
  10089. g.jb.zb = g.jb.iM.extend({
  10090. jna: function () {
  10091. if (g.a.P8) return g.a.cL.push(this), !0
  10092. },
  10093. Xwa: function () {
  10094. this.q('error', { info: 'TIME_OUT_A' })
  10095. },
  10096. send: function (a, b, c, d) {
  10097. function e() {
  10098. window[f] = null
  10099. try {
  10100. window[f] = null
  10101. } catch (a) {}
  10102. h.onerror = null
  10103. h.parentNode && h.parentNode.removeChild(h)
  10104. }
  10105. if (!this.w.gy || !this.jna()) {
  10106. a = encodeURI(a)
  10107. var f = this.w.fun
  10108. if (!f || window[f]) f = g.a.f4('jsonp_', 6) + '_'
  10109. var h = document.createElement('script')
  10110. h.type = 'text/javascript'
  10111. h.charset = 'utf-8'
  10112. h.async = !0
  10113. var k = this
  10114. g.l.Ue ||
  10115. (h.onerror = function () {
  10116. e()
  10117. k.q('error', { info: 'REQUEST_FAILED', url: a })
  10118. })
  10119. window[f] = function (a) {
  10120. e()
  10121. if (k.w.callbackFunction) k.w.callbackFunction.call(k.w.context, a)
  10122. else if (3e4 === a.errcode && a.data)
  10123. (g.a.P8 = !0),
  10124. g.tb.load('AMap.AntiCrabFrame', function () {
  10125. g.a.gy || (g.a.gy = new g.R$())
  10126. g.a.cL.push(k)
  10127. g.a.gy.open(k.w.Ed, a.data.host, k.fE || '', k.url)
  10128. })
  10129. else {
  10130. if (a instanceof Array || 'string' === typeof a) a = { data: a }
  10131. a.dEa = f
  10132. k.q('complete', a)
  10133. }
  10134. }
  10135. b = '?'
  10136. ;-1 !== a.indexOf('?') && (b = '&')
  10137. b = a + b + this.w.callback + '=' + f
  10138. if (-1 !== a.indexOf(g.r.Zd + '/v') || -1 !== a.indexOf('yuntuapi.amap.com/datasearch') || -1 !== a.indexOf('webapi.amap.com/'))
  10139. (b = b + '&platform=JS&logversion=2.0' + ('&appname=' + g.r.Up)), (b += '&csid=' + g.a.Bw()), (b += '&sdkversion=' + g.r.ln)
  10140. if ((c = this.w.GI)) {
  10141. var l = [],
  10142. m
  10143. for (m in c) c.hasOwnProperty(m) && (l.push(m + '=' + c[m]), (b += '&' + m + '=' + encodeURIComponent(c[m])))
  10144. k.fE = l.join('&')
  10145. }
  10146. h.src = d ? b + '&rereq=true' : b
  10147. g.jb.zb.iea = document.getElementsByTagName('body')[0] || document.getElementsByTagName('head')[0]
  10148. g.jb.zb.iea.appendChild(h)
  10149. }
  10150. },
  10151. })
  10152. g.jb.XMLHttpRequest = g.jb.iM.extend({
  10153. send: function (a, b, c, d, e) {
  10154. var f = this
  10155. if ((g.l.Ue || g.l.j5) && window.XDomainRequest) {
  10156. var h = (this.K$ = new XDomainRequest())
  10157. h.onerror = function (b) {
  10158. f.q('error', { url: a, data: b })
  10159. }
  10160. h.onload = function () {
  10161. f.q('complete', { url: a, data: h.responseText })
  10162. }
  10163. h.open(b || 'GET', a)
  10164. setTimeout(function () {
  10165. h.send(c || void 0)
  10166. }, 0)
  10167. } else {
  10168. var k = (this.K$ = new XMLHttpRequest())
  10169. k.onreadystatechange = function () {
  10170. 4 === k.readyState && 200 === k.status
  10171. ? f.q('complete', { url: a, data: 'arraybuffer' === k.responseType || 'json' === k.responseType ? k.response : k.responseText })
  10172. : 404 === k.status && (k.abort(), f.q('error', { url: a, data: '404' }))
  10173. }
  10174. k.onerror = function (b) {
  10175. k.abort()
  10176. f.q('error', { url: a, data: b })
  10177. }
  10178. k.open(b || 'GET', a)
  10179. 'POST' === b && k.setRequestHeader('Content-Type', d || 'application/x-www-form-urlencoded')
  10180. e && (k.responseType = e)
  10181. k.send(c || void 0)
  10182. }
  10183. },
  10184. abort: function () {
  10185. this.K$.abort()
  10186. },
  10187. })
  10188. for (
  10189. var $ = {
  10190. v: '1.4.17',
  10191. Pixel: g.H,
  10192. LngLat: g.U,
  10193. Size: g.xd,
  10194. Bounds: g.oe,
  10195. ArrayBounds: g.tp,
  10196. PixelBounds: g.Wf,
  10197. Panorama: g.Zaa,
  10198. PanoramaMarker: g.$aa,
  10199. Map: z.Rb,
  10200. View2D: z.NF,
  10201. GroundImage: z.o.ML,
  10202. Marker: z.B.vb,
  10203. ImageMarker: z.B.GAa,
  10204. Text: z.B.KW,
  10205. Icon: z.B.ci,
  10206. MarkerShape: z.B.Paa,
  10207. Polyline: z.B.Zb,
  10208. BezierCurve: z.B.sA,
  10209. Polygon: z.B.Dc,
  10210. Circle: z.B.gh,
  10211. CircleMarker: z.B.VV,
  10212. Ellipse: z.B.Et,
  10213. Rectangle: z.B.Lt,
  10214. ContextMenu: z.B.Tn,
  10215. InfoWindow: z.B.Ye,
  10216. Buildings: z.o.W$,
  10217. TileLayer: z.o.rb,
  10218. ImageLayer: z.o.BA,
  10219. CanvasLayer: z.o.Y$,
  10220. VideoLayer: z.o.Gba,
  10221. VectorLayer: z.o.fd,
  10222. MassMarks: z.o.Raa,
  10223. CompositeLayer: z.o.baa,
  10224. LabelsLayer: z.o.qr,
  10225. LabelMarker: z.B.Iaa,
  10226. LayerGroup: z.o.RL,
  10227. OverlayGroup: z.B.Wn,
  10228. GeoJSON: z.B.fW,
  10229. CANVAS: 'canvas',
  10230. DOM: 'dom',
  10231. convertFrom: g.qI,
  10232. Http: { JSONP: g.jb.zb },
  10233. event: { CLASS_NAME: 'AMap.event' },
  10234. },
  10235. Ic = 'addDomListener addDomListenerOnce addListener addListenerOnce clearInstanceListeners clearListeners removeListener trigger'.split(' '),
  10236. Jc = 0;
  10237. Jc < Ic.length;
  10238. Jc += 1
  10239. )
  10240. $.event[Ic[Jc]] = (function () {
  10241. var a = g.event[Ic[Jc]],
  10242. b = Ic[Jc]
  10243. return function () {
  10244. g.c.ya($.event)
  10245. g.c.add($.event, b)
  10246. return a.apply(g.event, Array.prototype.slice.call(arguments))
  10247. }
  10248. })()
  10249. $.GeometryUtil = { CLASS_NAME: 'AMap.GeometryUtil' }
  10250. for (
  10251. var Kc =
  10252. 'distance ringArea isClockwise makesureClockwise makesureAntiClockwise distanceOfLine ringRingClip doesSegmentsIntersect doesSegmentLineIntersect doesSegmentRingIntersect doesSegmentPolygonIntersect doesLineLineIntersect doesLineRingIntersect doesPolygonPolygonIntersect doesRingRingIntersect isPointInRing isRingInRing isPointInPolygon isPointOnSegment isPointOnLine isPointOnRing isPointOnPolygon closestOnSegment closestOnLine distanceToSegment distanceToLine distanceToPolygon'.split(
  10253. ' '
  10254. ),
  10255. Jc = 0;
  10256. Jc < Kc.length;
  10257. Jc += 1
  10258. )
  10259. $.GeometryUtil[Kc[Jc]] = (function () {
  10260. var a = g.Ft[Kc[Jc]],
  10261. b = Kc[Jc]
  10262. return function () {
  10263. g.c.ya($.GeometryUtil)
  10264. g.c.add($.GeometryUtil, b)
  10265. return a.apply(g.Ft, Array.prototype.slice.call(arguments))
  10266. }
  10267. })()
  10268. $.GeometryUtil.triangulateShape = function (a, b) {
  10269. g.c.ya($.GeometryUtil)
  10270. g.c.add($.GeometryUtil, 'triangulateShape')
  10271. a = g.Zn.normalize(a)
  10272. b = g.Zn.normalize(b)
  10273. return g.Zn.Vh(a, b)
  10274. }
  10275. $.PlaneGeometryUtil = { CLASS_NAME: 'AMap.PlaneGeometryUtil' }
  10276. for (Jc = 0; Jc < Kc.length; Jc += 1)
  10277. $.PlaneGeometryUtil[Kc[Jc]] = (function () {
  10278. var a = g.di[Kc[Jc]],
  10279. b = Kc[Jc]
  10280. return function () {
  10281. g.c.ya($.PlaneGeometryUtil)
  10282. g.c.add($.PlaneGeometryUtil, b)
  10283. return a.apply(g.di, Array.prototype.slice.call(arguments))
  10284. }
  10285. })()
  10286. $.PlaneGeometryUtil.triangulateShape = function (a, b) {
  10287. g.c.ya($.PlaneGeometryUtil)
  10288. g.c.add($.PlaneGeometryUtil, 'triangulateShape')
  10289. a = g.Zn.normalize(a)
  10290. b = g.Zn.normalize(b)
  10291. return g.Zn.Vh(a, b)
  10292. }
  10293. $.plugin = $.service = z.Rb.prototype.plugin
  10294. $.TileLayer.Satellite = z.o.rb.EW
  10295. $.TileLayer.RoadNet = z.o.rb.AW
  10296. $.TileLayer.google = z.o.rb.LL
  10297. $.TileLayer.Flexible = z.o.rb.yA
  10298. $.TileLayer.WMS = z.o.rb.Hba
  10299. $.TileLayer.WMTS = z.o.rb.Iba
  10300. $.TileLayer.Traffic = z.o.rb.MW
  10301. $.Panorama.Events = z.event
  10302. $.TileLayer.PanoramaLayer = z.o.rb.OAa
  10303. $.UA = { ie: g.l.Es, ielt9: g.l.Ue, ielt11: g.l.$ra, mobile: g.l.ba, android: g.l.Xl, ios: g.l.ED }
  10304. $.Browser = {
  10305. ua: navigator.userAgent,
  10306. mobile: g.l.ba,
  10307. plat: g.l.Dz,
  10308. mac: g.l.nz,
  10309. windows: g.l.$za,
  10310. ios: g.l.ED,
  10311. iPad: g.l.Tra,
  10312. iPhone: g.l.Ura,
  10313. android: g.l.Xl,
  10314. android23: g.l.cma,
  10315. chrome: g.l.chrome,
  10316. firefox: g.l.bR,
  10317. safari: g.l.AE,
  10318. wechat: g.l.C$,
  10319. uc: g.l.oza,
  10320. qq: g.l.ewa,
  10321. ie: g.l.Es,
  10322. ie6: g.l.zi,
  10323. ie7: g.l.sv,
  10324. ie8: g.l.Ue && !g.l.sv && !g.l.zi,
  10325. ie9: g.l.j5,
  10326. ie10: g.l.i5,
  10327. ie11: g.l.Xra,
  10328. edge: g.l.spa,
  10329. ielt9: g.l.Ue,
  10330. baidu: g.l.VH,
  10331. isLocalStorage: g.l.Gv,
  10332. isGeolocation: !!navigator.geolocation,
  10333. mobileWebkit: g.l.jua,
  10334. mobileWebkit3d: g.l.G6,
  10335. mobileOpera: !!g.l.iua,
  10336. retina: g.l.Jc,
  10337. touch: !!g.l.Tf,
  10338. msPointer: !!g.l.I6,
  10339. pointer: !!g.l.FT,
  10340. webkit: g.l.B$,
  10341. ie3d: g.l.Yra,
  10342. webkit3d: g.l.CL,
  10343. gecko3d: g.l.jqa,
  10344. opera3d: g.l.bva,
  10345. any3d: g.l.RH,
  10346. isCanvas: g.l.il,
  10347. isSvg: g.l.En,
  10348. isVML: g.l.Es,
  10349. isWorker: !!window.Worker,
  10350. isWebsocket: !!window.WebSocket,
  10351. isWebGL: function () {
  10352. for (var a = document.createElement('canvas'), b = ['webgl', 'experimental-webgl', 'moz-webgl'], c = null, d = 0; d < b.length; d += 1) {
  10353. try {
  10354. c = a.getContext(b[d])
  10355. } catch (e) {}
  10356. if (c)
  10357. if (c.drawingBufferWidth !== a.width || c.drawingBufferHeight !== a.height) break
  10358. else return !0
  10359. }
  10360. return !1
  10361. },
  10362. }
  10363. $.Util = { CLASS_NAME: 'AMap.Util' }
  10364. var Lc = {
  10365. colorNameToHex: g.a.lI,
  10366. rgbHex2Rgba: g.a.B8,
  10367. argbHex2Rgba: g.a.Rr,
  10368. isEmpty: g.a.uh,
  10369. deleteItemFromArray: g.a.Ay,
  10370. deleteItemFromArrayByIndex: g.a.Fo,
  10371. indexOf: g.a.indexOf,
  10372. format: g.a.wb,
  10373. isArray: g.a.isArray,
  10374. isDOM: g.a.EJ,
  10375. includes: g.a.ka,
  10376. requestIdleCallback: g.a.qU,
  10377. cancelIdleCallback: g.a.$P,
  10378. requestAnimFrame: g.a.Wc,
  10379. cancelAnimFrame: g.a.ri,
  10380. color2RgbaArray: g.a.Zl,
  10381. color2Rgba: g.a.Ona,
  10382. }
  10383. for (Jc in Lc)
  10384. Lc.hasOwnProperty(Jc) &&
  10385. 'function' == typeof Lc[Jc] &&
  10386. ($.Util[Jc] = (function () {
  10387. var a = Jc
  10388. return function () {
  10389. g.c.ya($.Util)
  10390. g.c.add($.Util, a)
  10391. return Lc[a].apply(g.a, Array.prototype.slice.call(arguments))
  10392. }
  10393. })())
  10394. $.DomUtil = { CLASS_NAME: 'AMap.DomUtil' }
  10395. var Mc = {
  10396. getViewport: g.f.lJ,
  10397. getViewportOffset: g.f.RR,
  10398. create: g.f.create,
  10399. setClass: g.f.sxa,
  10400. hasClass: g.f.zn,
  10401. addClass: g.f.Wa,
  10402. removeClass: g.f.eb,
  10403. setOpacity: g.f.Xq,
  10404. rotate: g.f.rotate,
  10405. setCss: g.f.$a,
  10406. empty: g.f.Iz,
  10407. remove: g.f.remove,
  10408. TRANSFORM: g.f.pg,
  10409. TRANSITION: g.f.JF,
  10410. }
  10411. for (Jc in Mc)
  10412. Mc.hasOwnProperty(Jc) &&
  10413. 'function' == typeof Mc[Jc] &&
  10414. ($.DomUtil[Jc] = (function () {
  10415. var a = Jc
  10416. return function () {
  10417. g.c.ya($.DomUtil)
  10418. g.c.add($.DomUtil, a)
  10419. return Mc[a].apply(g.f, Array.prototype.slice.call(arguments))
  10420. }
  10421. })())
  10422. var Nc = g.r
  10423. $.User = { key: Nc.key }
  10424. window.AMap = $
  10425. window.AMap.BuryPoint = g.BuryPoint
  10426. window.AMap.Class = g.da
  10427. g.Kj = g.da.extend({
  10428. A: function (a, b, c, d) {
  10429. this.start = a
  10430. this.end = b
  10431. this.transition = c
  10432. this.precision = d || 0
  10433. this.Zv = !1
  10434. this.update = g.a.bind(this.update, this)
  10435. return this
  10436. },
  10437. Nn: function (a) {
  10438. this.hh = this.startTime = +new Date()
  10439. this.frames = 0
  10440. this.Zv = !0
  10441. this.yo = g.a.Wc(this.update)
  10442. this.Qia = g.a.bind(this.Jq, a || this)
  10443. },
  10444. update: function () {
  10445. this.frames += 1
  10446. var a = +new Date(),
  10447. b = a - this.startTime,
  10448. b = this.transition ? this.transition(this.start, this.end, b, this.frames, a - this.hh) : null
  10449. 'number' === typeof b && Math.abs(b - this.end) < this.precision ? (this.stop(), (b = this.end)) : (this.yo = g.a.Wc(this.update))
  10450. this.hh = a
  10451. this.Qia(b)
  10452. },
  10453. stop: function (a) {
  10454. g.a.ri(this.yo)
  10455. a && this.update()
  10456. this.Zv = !1
  10457. },
  10458. })
  10459. g.Kj.Easing = {
  10460. Linear: {
  10461. None: function (a) {
  10462. return a
  10463. },
  10464. },
  10465. Bounce: {
  10466. In: function (a) {
  10467. return (
  10468. 1 -
  10469. (a < 1 / 2.75
  10470. ? 7.5625 * a * a
  10471. : a < 2 / 2.75
  10472. ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75
  10473. : a < 2.5 / 2.75
  10474. ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375
  10475. : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375)
  10476. )
  10477. },
  10478. Out: function (a) {
  10479. return g.Kj.Easing.Bounce.In(1 - a)
  10480. },
  10481. },
  10482. Cubic: {
  10483. In: function (a) {
  10484. return 1 - a * a * a
  10485. },
  10486. Out: function (a) {
  10487. a = 1 - a
  10488. return 1 - a * a * a
  10489. },
  10490. },
  10491. }
  10492. g.Rb = g.da.extend({
  10493. ka: [g.va, g.Ze, g.RJ],
  10494. A: function (a, b) {
  10495. this.oc = g.a.bind(this.oc, this)
  10496. this.D = b
  10497. this.mj = b.mj
  10498. this.Bm = ''
  10499. this.rg = this.Jf = this.ej = !1
  10500. this.Tm = {}
  10501. this.K = a
  10502. this.Vga()
  10503. this.tsa()
  10504. this.X('zooms', b, !0)
  10505. this.X('size', b, !0)
  10506. this.X('limitBounds', b)
  10507. this.X('view', b)
  10508. this.X('nolimg', b, !0)
  10509. this.X('mapNumber', b, !0)
  10510. this.X('lang', b, !0)
  10511. this.X('features', b, !0)
  10512. this.X('styleID', b, !0)
  10513. this.X('forceBig', b, !0)
  10514. this.X('mode', b, !0)
  10515. this.X('showBuildingBlock', b, !0)
  10516. this.X('mapStyle', b)
  10517. var c = this.get('mapStyle')
  10518. this.De = g.r.De[c] || g.r.De['default']
  10519. this.KH = '#a3ccff'
  10520. this.ou = b.get('skyColor') || '#cce0ff'
  10521. g.r.RQ && this.X('editEnable', b)
  10522. g.r.RQ && this.Bd ? this.X('style', b, !0) : this.X('styleUrl', b)
  10523. this.X('hightlight', b, !0)
  10524. this.X('labelzIndex', b, !0)
  10525. if (g.l.bL) {
  10526. c = new z.o.rb({ innerLayer: !0, zIndex: b.get('labelzIndex'), visible: !1 })
  10527. this.Gc = new g.o.Pj(c, this, ['point', 'road'])
  10528. this.Gc.type = '\u77e2\u91cf\u6807\u6ce8'
  10529. var d = this.D.get('defaultLayer')
  10530. d && c.X('rejectMapMask', d, !0)
  10531. b.labelsLayer = this.Gc.S
  10532. this.Gc.S.h('complete', this.Br, this, !0)
  10533. this.Gc.S.h('renderComplete', this.Br, this)
  10534. this.Gc.yB = this.Gc.Ci = !0
  10535. }
  10536. this.X('isHotspot', b, !0)
  10537. this.X('layers', b)
  10538. this.X('overlays', b)
  10539. this.X('infos', b, !0)
  10540. this.X('contextmenus', b, !0)
  10541. this.X('controls', b)
  10542. this.X('bounds', b)
  10543. this.X('draw', b)
  10544. this.af('zoomAndCenter destroy defaultCursor jogEnable animateEnable baseRender overlayRender vectorMapForeign'.split(' '), b)
  10545. this.af('rotateEnable pitchEnable dragEnable keyboardEnable doubleClickZoom scrollWheel zoomEnable touchZoom'.split(' '), b, !0)
  10546. this.get('jogEnable') ? (this.vv = !0) : (this.vv = !1)
  10547. this.kga()
  10548. this.rga()
  10549. this.EG && this.EG()
  10550. this.X('resizeEnable', b)
  10551. this.D.map = this
  10552. c = this.get('size')
  10553. c = (c.width * c.height) / 65536
  10554. g.l.Jc && 3 < c && (this.WH = !0)
  10555. this.V = { Ad: !1 }
  10556. this.LK()
  10557. },
  10558. editEnableChanged: function () {
  10559. this.Bd = this.get('editEnable')
  10560. },
  10561. labelzIndexChanged: function () {
  10562. this.Gc && this.Gc.set('zIndex', this.get('labelzIndex'))
  10563. },
  10564. styleChanged: function () {
  10565. this.Fi = !0
  10566. },
  10567. mapStyleChanged: function () {
  10568. if (this.D.Bi) {
  10569. this.Bm && (this.set('style', ''), (this.Nu = this.Bm = ''))
  10570. var a = this.get('mapStyle')
  10571. this.Fi = !0
  10572. this.De = g.r.De[a] || g.r.De['default']
  10573. this.tE()
  10574. }
  10575. },
  10576. styleUrlChanged: function () {
  10577. if (this.D.Bi) {
  10578. var a = this.get('styleUrl') || ''
  10579. if (a !== this.Bm) {
  10580. var b = -1 !== a.indexOf('?isPublic=true'),
  10581. a = a.substr(0, 46),
  10582. c = a.split('amap://styles/')[1]
  10583. 'normal' === c
  10584. ? ((this.Bm = ''), this.set('nolimg', !!this.D.get('nolimg_param')), this.set('style', ''), (this.Nu = ''))
  10585. : ((this.hA = !0),
  10586. this.set('nolimg', !0),
  10587. (b = new g.jb.zb(
  10588. 32 > c.length
  10589. ? g.r.tc + '://webapi.amap.com/style2?name=' + c + '&key=' + g.r.key
  10590. : g.r.tc + '://webapi.amap.com/v4/map/styles2?styleid=' + c + '&s=rsv3&key=' + g.r.key + (b ? '&ispublic=1' : ''),
  10591. { callback: 'callback' }
  10592. )),
  10593. b.h(
  10594. 'complete',
  10595. function (a) {
  10596. a.data && a.data.layer && this.set('layerStyle', JSON.parse(a.data.layer))
  10597. a.data && a.data.content ? this.set('style', JSON.parse(a.data.content)) : this.set('style', '')
  10598. this.hA = !1
  10599. },
  10600. this
  10601. ),
  10602. b.h(
  10603. 'error',
  10604. function () {
  10605. this.hA = !1
  10606. },
  10607. this
  10608. ),
  10609. (this.Bm = a),
  10610. this.tE())
  10611. }
  10612. }
  10613. },
  10614. R8: function (a) {
  10615. this.K.style.background = a
  10616. },
  10617. lqa: function (a) {
  10618. var b = this.get('center')
  10619. if (a.contains(b)) return null
  10620. a = g.Ft.closestOnLine(b, a.dV().path)
  10621. return new g.U(a[0], a[1])
  10622. },
  10623. lna: function () {
  10624. var a = this.get('limitBounds'),
  10625. b = this.get('bounds')
  10626. b.wc && b.wc.R > b.nc.R && (b.nc.R += 360)
  10627. if (!a.contains(b)) {
  10628. if (b instanceof g.tp) return this.lqa(a, b)
  10629. var c = this.get('center').cb()
  10630. a.vj() < b.vj() ? (c.R = a.xi().R) : (a.wc.R > b.wc.R && (c.R += a.wc.R - b.wc.R), a.nc.R < b.nc.R && (c.R += a.nc.R - b.nc.R))
  10631. a.tj() < b.tj() ? (c.Q = a.xi().Q) : (a.wc.Q > b.wc.Q && (c.Q += a.wc.Q - b.wc.Q), a.nc.Q < b.nc.Q && (c.Q += a.nc.Q - b.nc.Q))
  10632. return c
  10633. }
  10634. },
  10635. WO: function () {
  10636. var a = this.OU
  10637. this.D.refreshSize()
  10638. var b = this.get('size')
  10639. b && a && !b.gb(a) && ((this.OU = b), (this.ht = !0), this.set('display'), this.y8(b), this.get('resizeEnable') && this.qa('resize', { Cua: a, S6: b }))
  10640. },
  10641. m0: function () {
  10642. var a = this
  10643. a.WO()
  10644. a.QO = setTimeout(function () {
  10645. a.m0()
  10646. }, 200)
  10647. },
  10648. pda: function () {
  10649. this.QO && (clearTimeout(this.QO), (this.QO = null))
  10650. },
  10651. Vga: function () {
  10652. this.D.C = !0
  10653. this.OU = this.D.getSize()
  10654. this.D.C = !1
  10655. if (g.l.Ue || (g.l.C$ && g.l.ED) || g.l.Xta) this.m0()
  10656. else {
  10657. var a = this
  10658. g.F.Xla(this.K, function (b) {
  10659. a.WO(b)
  10660. })
  10661. }
  10662. },
  10663. tsa: function () {
  10664. var a = this.K
  10665. g.f.Wa(a, 'amap-container')
  10666. var b = {}
  10667. b.$c = g.f.create('div', a, 'amap-maps')
  10668. this.Ml = g.f.create('div', a)
  10669. this.Ml.style.display = 'none'
  10670. b.Xr = g.f.create('div', b.$c, 'amap-drags')
  10671. b.o = g.f.create('div', b.Xr, 'amap-layers')
  10672. b.B = g.f.create('div', b.Xr, 'amap-overlays')
  10673. b.controls = g.f.create('div', a, 'amap-controls')
  10674. b.YS = g.f.create('a', a, 'amap-logo')
  10675. g.f.create('img', b.YS).src = g.l.Jc ? this.D.w.logoUrlRetina : this.D.w.logoUrl
  10676. b.rn = g.f.create('div', a, 'amap-copyright')
  10677. b.rn.style.display = 'none'
  10678. 350 < g.f.lJ(this.K).width && ((b.rn.innerHTML = this.D.w.copyright), (b.rn.v6 = g.f.create('span', b.rn, 'amap-mcode')), this.tE())
  10679. this.Xa = b
  10680. },
  10681. tE: function () {
  10682. var a = this.get('layers')
  10683. if (a) {
  10684. for (var b = -1, c = '', d = 0; d < a.length; d += 1) {
  10685. var e = a[d].get('mapNumber'),
  10686. f = a[d].get('zIndex', null, !0)
  10687. e && f > b && a[d].get('visible') && ((c = e), (b = f))
  10688. }
  10689. this.set('mapNumber', c)
  10690. this.D.C = !0
  10691. a = this.D.getMapStyle()
  10692. this.D.C = !1
  10693. 'GS(2019)6379' === c && a && 'normal' !== a && 'amap://styles/normal' !== a && ((c = ''), (this.Xa.rn.style.visibility = 'hidden'))
  10694. c && this.Xa.rn.v6 && ((this.Xa.rn.v6.innerHTML = '- ' + c + '\u53f7'), (this.Xa.rn.style.visibility = 'visible'))
  10695. return c
  10696. }
  10697. },
  10698. zY: function () {
  10699. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !1
  10700. g.Nj &&
  10701. (a
  10702. ? g.Nj.flush()
  10703. : this.F3 ||
  10704. (this.F3 = g.a.Wc(function () {
  10705. g.Nj.flush()
  10706. this.F3 = null
  10707. }, this)))
  10708. },
  10709. cU: function (a) {
  10710. var b = this,
  10711. c = this.D.get('rasterLayer')
  10712. c &&
  10713. (this.D.set('rasterLayer', void 0),
  10714. (this.D.d8 = !0),
  10715. (this.D.Sv = this.D.Ra),
  10716. this.vi && (this.vi.vD = !1),
  10717. c.o && (c.o.XD = !0),
  10718. a ||
  10719. (this.dU = g.a.qU(function () {
  10720. b.dU = null
  10721. b.D && b.D.sk(c)
  10722. })))
  10723. a && this.dU && g.a.$P(this.dU)
  10724. },
  10725. Br: function () {
  10726. function a() {
  10727. for (var a = d.get('layers'), b = d.get('zoom'), c = 0; c < a.length; c += 1) {
  10728. var e = a[c].get('zooms')
  10729. if (
  10730. !(
  10731. a[c].zj ||
  10732. a[c].Sv ||
  10733. a[c].s5 ||
  10734. !e ||
  10735. b > e[1] ||
  10736. b < e[0] ||
  10737. !a[c].get('visible') ||
  10738. (a[c].o && a[c].o.ga && 0 === a[c].o.ga.length) ||
  10739. (a[c].o && a[c].o.XD) ||
  10740. (a[c].o && a[c].o.Ra)
  10741. )
  10742. )
  10743. return !1
  10744. }
  10745. a = d.D.get('features')
  10746. return ('all' === a || g.a.ka(a, 'point')) && d.Gc && d.Gc.get('visible') && 0 < d.Gc.ga.length && !d.Gc.Ra && !d.Gc.po ? !1 : !0
  10747. }
  10748. function b() {
  10749. d.D && d.D.qm && d.D.qm.OB && d.D.qm.OB()
  10750. d.D.W7 = 1
  10751. d.zY()
  10752. d.set('display')
  10753. d.NS = !0
  10754. }
  10755. function c() {
  10756. g.a.Wc(function () {
  10757. this.q('complete')
  10758. }, d)
  10759. d.D.Ra = !0
  10760. d.set('display')
  10761. }
  10762. if (!this.vI)
  10763. if (this.NS) this.zY()
  10764. else {
  10765. var d = this,
  10766. e = this.D.get('rasterLayer'),
  10767. f = a()
  10768. e ? (e.o && e.o.Ra && (this.D.Ra || c()), f && (this.D.Ra || c(), this.cU(), b())) : f && (this.D.Ra || c(), b(), (this.D.d8 = !0))
  10769. }
  10770. },
  10771. layersChanged: function () {
  10772. this.la = this.la || []
  10773. for (var a = this.get('layers'), b = this.la.length - 1; 0 <= b; b -= 1)
  10774. this.la[b] === this.td ||
  10775. this.la[b] === this.Zs ||
  10776. this.la[b].yB ||
  10777. this.la[b].S.yB ||
  10778. -1 !== g.a.indexOf(a, this.la[b].S) ||
  10779. (this.la[b].gg(), this.la[b].Hj && this.la[b].Hj.gg(), this.la[b].S.G('complete', this.Br, this), this.la[b].S.G('renderComplete', this.Br, this), (this.la = g.a.Fo(this.la, b)))
  10780. for (var c = !1, d = !0, e = this.get('labelzIndex'), b = 0; b < a.length; b += 1)
  10781. if (!a[b].s5)
  10782. if (a[b].qi) -1 === g.a.indexOf(this.la, a[b].o) && this.la.push(a[b].o)
  10783. else {
  10784. var f = this.bg(a[b])
  10785. f && (this.la.push(f), (a[b].qi = !0), (a[b].o = f))
  10786. a[b].h('complete', this.Br, this, !0)
  10787. a[b].h('renderComplete', this.Br, this)
  10788. }
  10789. for (b = 0; b < this.la.length; b += 1) (f = this.la[b].S), f.Gq && f.get('visible') && ((c = !0), !1 === f.get('detectRetina') && (d = !1), (e = f.get('textIndex') || e))
  10790. this.Gc &&
  10791. (c || '3D' !== this.D.view.type
  10792. ? (this.Gc.po = !1)
  10793. : ((c = g.a.find(a, function (a) {
  10794. if (z.o.Ht && a instanceof z.o.Ht && a.get('visible')) return !0
  10795. })),
  10796. (this.Gc.po = c = !!c)))
  10797. a = g.a.indexOf(this.la, this.Gc)
  10798. c && this.D.get('showLabel')
  10799. ? (-1 === a && this.la.push(this.Gc),
  10800. (this.Gc.ja = d && g.l.ja),
  10801. this.Gc.AC(this.get('mapStyle') || 'normal'),
  10802. this.Gc.set('zIndex', e),
  10803. this.Gc.set('visible', !0),
  10804. (this.D.uD = !0),
  10805. this.D.get('isHotspot') ? this.Gc.Vua() : this.Gc.iQ())
  10806. : (this.Gc && (this.Gc.set('visible', !1), (this.D.uD = !1), this.Gc.iQ()), (this.D.uD = !1))
  10807. this.D.isHotspotChanged()
  10808. this.set('display', 0)
  10809. this.tE()
  10810. },
  10811. isHotspotChanged: function () {
  10812. this.layersChanged()
  10813. },
  10814. controlsChanged: function () {
  10815. var a = this.get('controls'),
  10816. b,
  10817. c
  10818. if (a.add && 0 < a.add.length) for (; 0 < a.add.length; ) (b = a.add.shift()), (c = b.xu || b.addTo) && c.call(b, this.D, this.Xa.controls)
  10819. else if (a.remove && a.remove.length) for (; 0 < a.remove.length; ) (b = a.remove.shift()), (c = b.Uv || b.removeFrom) && c.call(b, this.D, this.Xa.controls)
  10820. },
  10821. z1: function () {
  10822. if (!this.vI) {
  10823. var a = this
  10824. this.E1 = !1
  10825. a.td || ((a.td = new g.o.fd(new z.o.fd(), a)), (a.td.Af = 36), (a.td.ig = 36), a.td.set('zIndex', 120), a.la.push(a.td), (a.td.WC = !0))
  10826. for (var b = a.get('overlays'), c = [], d = 0; d < a.Vc.length; d += 1)
  10827. -1 === g.a.indexOf(b, a.Vc[d].Lb) &&
  10828. (a.Vc[d].Lb instanceof z.B.Ye || a.Vc[d].Lb instanceof z.B.Tn
  10829. ? a.Vc[d].gg()
  10830. : (a.td && a.Vc[d] instanceof g.B.vb ? ((a.td.ah = g.a.Ay(a.td.ah, a.Vc[d].L)), a.td.k8([a.Vc[d].L])) : a.Zs && a.Zs.k8([a.Vc[d].L]),
  10831. a.Vc[d].L.fa
  10832. ? (g.f.remove(a.Vc[d].L.fa), (a.Vc[d].L.fa = null))
  10833. : a.Vc[d].L.Ma && (g.f.remove(a.Vc[d].L.Ma.Oh), g.f.remove(a.Vc[d].L.Ma.Qc), g.f.remove(a.Vc[d].L.Ma.dir), (a.Vc[d].L.Ma = null)),
  10834. a.Vc[d].Gn && a.Vc[d].Gn.stop(),
  10835. a.Vc[d].yh && a.Vc[d].yh.stop(),
  10836. (a.Vc[d].Lb.qi = !1),
  10837. a.Vc[d].Lb.yl(),
  10838. (a.Vc[d].Lb.B = null),
  10839. (a.Vc[d].Lb = null),
  10840. a.Vc[d].L.Soa(),
  10841. (a.Vc[d].L = null),
  10842. a.Vc[d].yl(),
  10843. (a.Vc[d].Ce = null),
  10844. a.Vc[d].ti(),
  10845. (a.Vc[d].map = null)),
  10846. c.push(a.Vc[d]))
  10847. for (d = 0; d < c.length; d += 1) a.Vc = g.a.Fo(a.Vc, g.a.indexOf(a.Vc, c[d]))
  10848. var e = [],
  10849. f = []
  10850. g.a.nxa(function (b) {
  10851. if (!b.qi && b.$g) {
  10852. var c = b.B || a.Rma(b)
  10853. c && (a.Vc.push(c), c instanceof g.B.Ye || c instanceof g.B.Tn ? c.Ts(a) : c instanceof g.B.vb ? e.push(c.L) : f.push(c.L), (b.qi = !0))
  10854. }
  10855. }, b)
  10856. e.length && a.td.ay(e)
  10857. f.length && (a.Zs || ((a.Zs = new g.o.fd(new z.o.fd(), a)), a.Zs.set('zIndex', 110), a.la.push(a.Zs)), a.Zs.ay(f))
  10858. a.set('display', 0)
  10859. }
  10860. },
  10861. overlaysChanged: function () {
  10862. this.Vc = this.Vc || []
  10863. this.get('overlays') && 0 === this.get('overlays').length ? this.z1() : this.E1 || (g.a.Wc(this.z1, this), (this.E1 = !0))
  10864. },
  10865. contextmenusChanged: function () {
  10866. var a = this.get('contextmenu')
  10867. if (a) {
  10868. var b = this
  10869. g.tb.load('overlay', function () {
  10870. b.ry = new g.B.Tn(a, b)
  10871. b.set('display', 0)
  10872. })
  10873. }
  10874. },
  10875. infosChanged: function () {
  10876. var a = this.get('infos')
  10877. if (a) {
  10878. this.rm = this.rm || {}
  10879. var b,
  10880. c = this
  10881. g.tb.load('overlay', function () {
  10882. for (var d in a) a.hasOwnProperty(d) && ((b = a[d]), (c.rm[d] = c.rm[d] || new g.B.Ye(b, c)))
  10883. })
  10884. }
  10885. },
  10886. Rma: function (a) {
  10887. var b = null
  10888. if (a instanceof z.B.vb) b = new g.B.vb(a, this)
  10889. else if (a instanceof z.B.Tn) b = new g.B.Tn(a, this)
  10890. else if (a instanceof z.B.Ye) b = new g.B.Ye(a, this)
  10891. else {
  10892. var c = ['overlay']
  10893. 'd' === this.get('overlayRender') ? (c.push('dvector'), g.l.En ? c.push('svg') : c.push('vml')) : c.push('cvector')
  10894. if (!this.Kza && !g.tb.ID(c)) {
  10895. var d = this
  10896. g.tb.Fg(c, function () {
  10897. this.Kza = !0
  10898. d.overlaysChanged()
  10899. })
  10900. return
  10901. }
  10902. a instanceof z.B.Dc
  10903. ? (b = new g.B.Dc(a, this))
  10904. : a instanceof z.B.sA
  10905. ? (b = new g.B.sA(a, this))
  10906. : a instanceof z.B.Zb
  10907. ? (b = new g.B.Zb(a, this))
  10908. : a instanceof z.B.gh
  10909. ? (b = new g.B.gh(a, this))
  10910. : a instanceof z.B.Et
  10911. ? (b = new g.B.Dc(a, this))
  10912. : a instanceof z.B.Lt && (b = new g.B.Dc(a, this))
  10913. }
  10914. return b
  10915. },
  10916. N3: function () {
  10917. var a = this.De
  10918. this.Nu && (!this.Re || !this.Re.Hp || (this.D && this.D.js)) && (a = 'function' === typeof this.Nu ? this.Nu(this.vi.P.zoom) : this.Nu)
  10919. return a
  10920. },
  10921. JCa: function () {
  10922. function a() {}
  10923. var b = new g.o.fd(),
  10924. c = [],
  10925. d = new g.U(116.405467, 39.907761)
  10926. new g.style.Ng.ci()
  10927. for (var e = 0; 100 > e; e += 1)
  10928. for (var f = 0; 100 > f; f += 1) {
  10929. var h = new g.U(d.R + 0.02 * f, d.Q + 0.02 * e),
  10930. h = new g.ai({ name: 'point' + (100 * e + f), map: this, W: new g.Aa.Mg(this.Bb(h)) })
  10931. c[100 * e + f] = h
  10932. h.h('hover', a, h)
  10933. }
  10934. b.ay(c)
  10935. this.la.push(b)
  10936. },
  10937. mc: function () {},
  10938. HCa: function (a) {
  10939. var b = new g.o.fd(),
  10940. c = [],
  10941. c = new g.raa({ map: this }).RT(a)
  10942. b.ay(c)
  10943. this.la.push(b)
  10944. this.set('display', 0)
  10945. },
  10946. bg: function (a) {
  10947. var b = this
  10948. a = a.bg(this)
  10949. if (!a) return null
  10950. if (a.length && 'string' == typeof a[0])
  10951. g.tb.Fg(a, function () {
  10952. b.layersChanged()
  10953. })
  10954. else return a
  10955. return null
  10956. },
  10957. CEa: function () {
  10958. return this.Xa
  10959. },
  10960. SGa: function () {
  10961. this.set('display', 0)
  10962. },
  10963. displayChanged: function (a) {
  10964. this.r1 || this.LK(a)
  10965. },
  10966. LK: function (a) {
  10967. if (a)
  10968. if ((g.a.ri(this.xE), g.l.Xl)) {
  10969. var b = this
  10970. setTimeout(function () {
  10971. b.oc()
  10972. }, 0)
  10973. } else this.oc()
  10974. else this.Dw || ((this.xE = g.a.Wc(this.oc)), (this.Dw = !0))
  10975. },
  10976. oc: function () {
  10977. this.xE = null
  10978. if (!this.vI) {
  10979. this.q('render')
  10980. this.Dw = !1
  10981. var a = {}
  10982. if (this.la && ((a.size = this.D.get('size')), a.size.width && a.size.height)) {
  10983. for (var b = this.D.view.type, c = [], d = 0, e = this.la.length; d < e; d += 1)
  10984. this.la[d].Uf && this.la[d].Uf !== b ? (this.la[d].Ra = !0) : (c.push(this.la[d]), this.la[d].Hj && c.push(this.la[d].Hj))
  10985. c.sort(function (a, b) {
  10986. var c = a.get('zIndex'),
  10987. d = b.get('zIndex')
  10988. return c > d ? 1 : c === d ? (a.ex > b.ex ? 1 : -1) : -1
  10989. })
  10990. a.la = c
  10991. c = g.l.ja ? Math.min(window.devicePixelRatio || 1, 2) : 1
  10992. a.W1 = 15e5 < a.size.width * a.size.height * c * c
  10993. a.vD = !!this.D.get('rasterLayer')
  10994. a.ba = g.l.ba
  10995. a.lang = this.get('lang')
  10996. a.P = this.D.rD()
  10997. a.Uf = b
  10998. this.D.C = !0
  10999. a.T = this.D.getResolution([0, 0])
  11000. a.Dq = this.D.get('mapStyle')
  11001. a.Fi = this.Fi
  11002. this.D.C = !1
  11003. a.Ad = this.rg
  11004. a.Yoa = this.Tm
  11005. a.ge = this.ej
  11006. a.gf = this.Jf
  11007. a.SE = this.Jf && g.l.ba
  11008. a.jL = g.l.ba && this.ej
  11009. a.nt = g.l.ba && this.rg
  11010. this.nt = a.nt
  11011. b = this.get('targetLevel') || a.P.zoom
  11012. a.sp = a.P.zoom > b
  11013. a.Gf = a.P.zoom > b ? 'zoomOut' : a.P.zoom < b ? 'zoomIn' : 'stable'
  11014. a.rua = !0
  11015. a.WH = this.WH
  11016. for (var b = !1, f, c = !1, d = 0; d < this.la.length; d += 1)
  11017. this.la[d].Di && this.la[d].S.get('visible') && a.P.zoom <= this.la[d].S.get('zooms')[1] && (a.hU = !0), this.la[d].me().Jc && (b = !0)
  11018. for (d = 0; d < this.la.length; d += 1)
  11019. this.la[d].S.NP && a.hU && (!this.ej && this.la[d].S.get('visible') && ((f = this.la[d].S.NP()), (f.kFa = 1), (f.zoom = a.P.zoom)), (c = !0))
  11020. this.nb = []
  11021. c && f && this.nb !== f && (this.nb = f)
  11022. a.nb = this.nb
  11023. a.Jc = b
  11024. a.scale = Math.pow(2, a.P.zoom - a.P.ne)
  11025. this.vi = a
  11026. this.Nc = this.D.get('mask')
  11027. a.Nc = this.Nc
  11028. a.UJ = this.UJ
  11029. if ((f = this.Oy())) f.oc(a), (this.Fi = this.hR = this.UJ = !1)
  11030. }
  11031. }
  11032. },
  11033. Pq: function (a) {
  11034. if (!this.vI) {
  11035. var b = {}
  11036. if (this.la && ((b.size = this.D.get('size')), b.size.width && b.size.height)) {
  11037. for (var c = this.D.view.type, d = [], e = 0, f = this.la.length; e < f; e += 1)
  11038. (this.la[e].Uf && this.la[e].Uf !== c) || !(this.la[e] instanceof g.o.Nm) || 0 > a.indexOf(this.la[e].S) || (d.push(this.la[e]), this.la[e].Hj && d.push(this.la[e].Hj))
  11039. d.sort(function (a, b) {
  11040. var c = a.get('zIndex'),
  11041. d = b.get('zIndex')
  11042. return c > d ? 1 : c === d ? (a.ex > b.ex ? 1 : -1) : -1
  11043. })
  11044. b.la = d
  11045. a = g.l.ja ? Math.min(window.devicePixelRatio || 1, 2) : 1
  11046. b.W1 = 15e5 < b.size.width * b.size.height * a * a
  11047. b.vD = !!this.D.get('rasterLayer')
  11048. b.ba = g.l.ba
  11049. b.lang = this.get('lang')
  11050. b.P = this.D.rD()
  11051. b.Uf = c
  11052. this.D.C = !0
  11053. b.T = this.D.getResolution([0, 0])
  11054. b.Dq = this.D.get('mapStyle')
  11055. b.Fi = this.Fi
  11056. this.D.C = !1
  11057. b.Ad = this.rg
  11058. b.Yoa = this.Tm
  11059. b.ge = this.ej
  11060. b.gf = this.Jf
  11061. b.SE = this.Jf && g.l.ba
  11062. b.jL = g.l.ba && this.ej
  11063. b.nt = g.l.ba && this.rg
  11064. this.nt = b.nt
  11065. c = this.get('targetLevel') || b.P.zoom
  11066. b.sp = b.P.zoom > c
  11067. b.Gf = b.P.zoom > c ? 'zoomOut' : b.P.zoom < c ? 'zoomIn' : 'stable'
  11068. b.rua = !0
  11069. b.WH = this.WH
  11070. c = !1
  11071. for (a = 0; a < this.la.length; a += 1) this.la[a].me().Jc && (c = !0)
  11072. this.nb = []
  11073. b.nb = this.nb
  11074. b.Jc = c
  11075. b.scale = Math.pow(2, b.P.zoom - b.P.ne)
  11076. this.vi = b
  11077. this.Nc = this.D.get('mask')
  11078. b.Nc = this.Nc
  11079. ;(c = this.Oy()) && c.Pq(b)
  11080. }
  11081. }
  11082. },
  11083. Oy: function () {
  11084. if (!this.J || this.J.type !== this.D.view.type || this.J.Mta)
  11085. if (((this.J = null), '3D' == this.D.view.type)) {
  11086. var a = this
  11087. g.tb.load('Map3D', function () {
  11088. a.J || ((a.J = new g.Ea.BF(a)), a.set('display'))
  11089. })
  11090. } else this.J = new g.M.canvas.Rb(this)
  11091. return this.J
  11092. },
  11093. wqa: function () {
  11094. var a = [],
  11095. b = this.get('controls').Ld,
  11096. c
  11097. for (c in b) b[c].Qy && b[c].Qy() && a.push(b[c].Qy())
  11098. return a
  11099. },
  11100. destroyChanged: function () {
  11101. this.vI = 1
  11102. this.cU(!0)
  11103. this.V = {}
  11104. this.Gc && (this.Gc.S.G('complete', this.Br, this), this.Gc.gg(), (this.la = g.a.Fo(this.la, g.a.indexOf(this.la, this.Gc))))
  11105. this.Re && this.Re.he && this.Re.he.S && this.Re.he.S.setMap()
  11106. this.Oka && clearTimeout(this.Oka)
  11107. this.ska()
  11108. this.vha()
  11109. this.zO && this.zO()
  11110. this.yla()
  11111. this.yl()
  11112. this.D = this.D.map = null
  11113. this.K = this.K.___amap___ = null
  11114. this.ti()
  11115. this.He && (this.He.stop(), (this.He = null))
  11116. this.Vf && (this.Vf.stop(), (this.Vf = null))
  11117. this.Fd && (this.Fd.stop(), (this.Fd = null))
  11118. this.J && this.J.Kf && this.J.Kf()
  11119. this.J = null
  11120. },
  11121. yla: function () {
  11122. var a = this.K
  11123. this.pda()
  11124. g.F.Cna(a)
  11125. g.f.Iz(a)
  11126. this.Ml = null
  11127. g.f.eb(a, 'amap-container')
  11128. this.Xa = null
  11129. },
  11130. jogEnableChanged: function () {
  11131. this.get('jogEnable') ? (this.vv = !0) : (this.vv = !1)
  11132. },
  11133. drawChanged: function () {
  11134. var a = this,
  11135. b,
  11136. c,
  11137. d = this.get('draw')
  11138. if (d) {
  11139. this.tq || (this.tq = [])
  11140. b = 0
  11141. for (c = this.tq.length; b < c; b += 1) this.tq[b].wwa()
  11142. g.tb.load('interaction', function () {
  11143. var b = new g.IAa({ type: d, o: a.Zs }, a)
  11144. a.tq.push(b)
  11145. a.loaded = !0
  11146. })
  11147. } else if (this.tq) for (b = 0, c = this.tq.length; b < c; b += 1) this.tq[b].wwa(), this.tq[b].fDa(), this.G('click', this.tq[b].SEa, this)
  11148. },
  11149. Xd: function (a, b, c) {
  11150. return this.D.view.Xd(a, b, c)
  11151. },
  11152. yg: function (a, b, c) {
  11153. return this.D.view.yg(a, b, c)
  11154. },
  11155. E4: function (a, b) {
  11156. var c = this.get('size'),
  11157. d = document.createElement('canvas')
  11158. a = a || c.width
  11159. b = b || c.height
  11160. d.width = a
  11161. d.height = b
  11162. for (var e = -(c.width - a) / 2, c = -(c.height - b) / 2, f = d.getContext('2d'), h = this.Xa.o.childNodes, k = [], l = 0; l < h.length; l += 1) k.push(h[l])
  11163. k.sort(function (a, b) {
  11164. return a.style.zIndex - b.style.zIndex
  11165. })
  11166. for (l = 0; l < k.length; l += 1) {
  11167. var m = k[l]
  11168. if (g.f.zn(m, 'amap-layer') || g.f.zn(m, 'amap-e') || g.f.zn(m, 'amap-labels'))
  11169. if ('CANVAS' === m.tagName) {
  11170. var h = c,
  11171. n = e,
  11172. p = parseFloat(m.style.width) || m.width,
  11173. q = parseFloat(m.style.height) || m.height,
  11174. r = 1
  11175. m.style.transform && (r = parseFloat(m.style.transform.split('(')[1]))
  11176. f.drawImage(m, n, h, p * r, q * r)
  11177. } else if ('DIV' === m.tagName)
  11178. for (var r = m.childNodes, s = parseFloat(m.style.top) || 0 + c, m = parseFloat(m.style.left) || 0 + e, u = 0; u < r.length; u += 1) {
  11179. var v = r[u]
  11180. if ('CANVAS' === v.tagName || 'IMG' === v.tagName)
  11181. (h = parseFloat(v.style.top) || 0),
  11182. (n = parseFloat(v.style.left) || 0),
  11183. (p = parseFloat(v.style.width) || v.width),
  11184. (q = parseFloat(v.style.height) || v.height),
  11185. f.drawImage(v, n + m, h + s, p, q)
  11186. }
  11187. }
  11188. return d.toDataURL()
  11189. },
  11190. })
  11191. g.Rb.Hb({
  11192. kga: function () {
  11193. this.DB = !1
  11194. g.l.Tf && ('3D' === this.D.view.type ? this.Hca() : this.Fca())
  11195. g.l.ba || this.Cca()
  11196. },
  11197. ska: function () {
  11198. g.l.Tf && ('3D' === this.D.view.type ? this.Aha() : this.zha())
  11199. g.l.ba || (this.wha(), this.m_())
  11200. },
  11201. rotateEnableChanged: function () {
  11202. this.dxa = this.get('rotateEnable')
  11203. g.l.Tf && this.Y1 && '3D' !== this.D.view.type && (this.dxa ? this.Y1() : this.Bua())
  11204. },
  11205. zoomEnableChanged: function () {
  11206. this.get('zoomEnable') ? (g.l.Tf && this.PP && '3D' !== this.D.view.type && this.PP(), g.l.ba || this.Eca()) : (g.l.Tf && this.hT && this.hT(), g.l.ba || this.m_())
  11207. },
  11208. mousewheelChanged: function () {},
  11209. WS: function (a) {
  11210. a && (this.DB = a.su)
  11211. },
  11212. ww: function () {
  11213. this.DB = !1
  11214. },
  11215. Li: function (a, b, c, d) {
  11216. var e,
  11217. f = {}
  11218. a || (a = window.event)
  11219. var h = g.F.km(a, this.Xa.$c)
  11220. g.l.Tf && ('touchend' !== a.type ? (this.V.Qga = h) : (h = this.V.Qga))
  11221. f.Cb = h
  11222. f.Ta = this.yg(h)
  11223. f.Ta && (f.Ta = f.Ta.toFixed(3))
  11224. f.Nf = this.Od(f.Ta)
  11225. c || ((c = this.DB ? (this.DB ? [this.DB] : null) : this.afa(f.Ta, d)) && 0 < c.length && c[0].uo && ((e = c[0].uo), (f.su = c[0])))
  11226. e || 'info' === a.$e || (e = this)
  11227. f.hd = e
  11228. f.IBa = a.altKey
  11229. f.ctrlKey = a.ctrlKey
  11230. f.button = void 0 === a.button ? 0 : a.button
  11231. f.vT = a
  11232. e && 'AMap.LabelMarker' === e.CLASS_NAME && ((f.lnglat = f.Nf), (f.pixel = f.Cb), (f.target = e), (f.data = e.VW), (f.originEvent = a))
  11233. b || g.F.preventDefault(a)
  11234. return f
  11235. },
  11236. XN: function (a) {
  11237. return a && a !== this && a !== document
  11238. },
  11239. RO: function () {
  11240. var a = this.V
  11241. a.fg && (a.ak.Cb.x === a.fg.x && a.ak.Cb.y === a.fg.y ? (a.Jf = !1) : ((a.Jf = !0), a.Ep || (a.jq.q('dragstart', a.iq), (a.Ep = !0)), a.jq.q('dragging', a.ak), (a.fg = a.ak.Cb)))
  11242. },
  11243. Uxa: function (a) {
  11244. for (var b = [], c = 0; c < a.length; c += 1) a[c] && (b = b.concat(a[c]))
  11245. return b
  11246. },
  11247. Ov: function (a, b, c) {
  11248. return a && b && (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) < (c || 10)
  11249. },
  11250. afa: function (a, b) {
  11251. var c = this.Oy()
  11252. if (!c) return null
  11253. var d,
  11254. e = this
  11255. this.la.sort(function (a, b) {
  11256. return a.get('zIndex') > b.get('zIndex') ? -1 : 1
  11257. })
  11258. c.mq(
  11259. a,
  11260. this.la,
  11261. function (a) {
  11262. d = a
  11263. d = e.Uxa(d)
  11264. },
  11265. function () {
  11266. d = []
  11267. },
  11268. b
  11269. )
  11270. return d
  11271. },
  11272. })
  11273. g.Rb.Hb({
  11274. rga: function () {
  11275. this.Tm = {}
  11276. this.h('moveend', this.g7, this)
  11277. g.l.Xl && (g.l.qL || g.l.VH) && this.h('zoomend', this.IV, this)
  11278. this.h('movestart', this.h7, this)
  11279. this.h('zoomstart', this.o7, this)
  11280. this.h('zoomend', this.n7, this)
  11281. this.GM()
  11282. this.hB = 0
  11283. this.EY = {}
  11284. 'undefined' === typeof window.requestAnimationFrame && (this.hB = 2)
  11285. },
  11286. o7: function () {
  11287. 2 !== this.hB && 12 === this.get('zoom') && ((this.hB = 1), g.a.iR.start(this.EY))
  11288. this.ej = !0
  11289. },
  11290. n7: function () {
  11291. 1 === this.hB && 13 !== this.get('zoom') && ((this.hB = 0), g.a.iR.cancel(this.EY))
  11292. this.ej = !1
  11293. this.set('display')
  11294. },
  11295. V0: function (a, b) {
  11296. this.Tm.left = 0 < a
  11297. this.Tm.right = 0 > a
  11298. this.Tm.bF = 0 < b
  11299. this.Tm.FQ = 0 > b
  11300. },
  11301. mu: function () {
  11302. this.Tm.left = !1
  11303. this.Tm.right = !1
  11304. this.Tm.bF = !1
  11305. this.Tm.FQ = !1
  11306. },
  11307. vha: function () {
  11308. this.G('moveend', this.g7, this)
  11309. g.l.Xl && (g.l.qL || g.l.VH) && this.G('zoomend', this.IV, this)
  11310. this.G('movestart', this.h7, this)
  11311. this.G('zoomstart', this.o7, this)
  11312. this.G('zoomend', this.n7, this)
  11313. this.xha()
  11314. },
  11315. g7: function (a) {
  11316. this.Jf = !1
  11317. this.mu()
  11318. this.y8()
  11319. !a.N5 && this.D.get('limitBounds', null, !0) ? ((a = this.lna()) && !a.gb(this.get('center')) ? this.VK(this.get('zoom'), a, !1, !0) : this.qa('moveend')) : this.qa('moveend')
  11320. this.set('display')
  11321. },
  11322. h7: function () {
  11323. this.Jf = !0
  11324. this.mu()
  11325. },
  11326. dragEnableChanged: function () {
  11327. ;(this.XC = this.get('dragEnable')) ? this.FM() : this.yO()
  11328. },
  11329. qa: function (a, b) {
  11330. if (this.D.ve(a)) {
  11331. var c
  11332. b && (c = b.S6 ? { type: a, newsize: b.S6, oldsize: b.Cua } : { type: a, pixel: b.Cb, target: this.D, lnglat: b.Nf, originEvent: b.vT })
  11333. this.D.q(a, c)
  11334. }
  11335. },
  11336. GM: function () {
  11337. this.h('click', this.y_)
  11338. this.h('dblclick', this.C_)
  11339. g.l.Tf && this.wX()
  11340. g.l.ba || this.Dca()
  11341. },
  11342. xha: function () {
  11343. this.G('click', this.y_)
  11344. this.G('dblclick', this.C_)
  11345. g.l.Tf && this.n_()
  11346. g.l.ba || this.yha()
  11347. },
  11348. cH: function (a, b) {
  11349. var c = this.get('targetLevel') || this.get('zoom'),
  11350. c = 0 < b ? Math.floor(c) + 1 : Math.ceil(c) - 1,
  11351. c = Math.min(Math.max(c, this.get('zooms')[0]), this.get('zooms')[1])
  11352. c === this.get('zoom') || (this.Vf && this.Vf.Zv && c === this.Vf.end) || this.qA(c, !1, a)
  11353. },
  11354. y_: function (a) {
  11355. this.qa('click', a)
  11356. },
  11357. C_: function (a) {
  11358. this.get('doubleClickZoom') && this.get('zoomEnable') && this.cH(a.Ta, 1)
  11359. this.qa('dblclick', a)
  11360. },
  11361. pCa: function (a) {
  11362. this.cH(a.KHa, a.H9)
  11363. this.qa('touchend', a)
  11364. },
  11365. FM: function () {
  11366. this.XC &&
  11367. ('3D' === this.D.view.type
  11368. ? (this.h('dragstart', this.I_), this.h('dragging', this.E_), this.h('dragend', this.G_))
  11369. : (this.h('dragstart', this.H_), this.h('dragging', this.D_), this.h('dragend', this.F_)))
  11370. },
  11371. yO: function () {
  11372. this.XC ||
  11373. ('3D' === this.D.view.type
  11374. ? (this.G('dragstart', this.I_), this.G('dragging', this.E_), this.G('dragend', this.G_))
  11375. : (this.G('dragstart', this.H_), this.G('dragging', this.D_), this.G('dragend', this.F_)))
  11376. },
  11377. H_: function (a) {
  11378. this.WS(a)
  11379. this.mu()
  11380. this.rg = !0
  11381. this.V.Fy = a.Cb.x
  11382. this.V.YC = a.Cb.y
  11383. this.He && (this.He.stop(), this.us(!0))
  11384. this.qa('dragstart')
  11385. this.qa('movestart')
  11386. this.q('movestart', a)
  11387. this.$xa()
  11388. },
  11389. D_: function () {
  11390. var a = this.V,
  11391. b = a.ak.Cb.x - a.Fy,
  11392. c = a.ak.Cb.y - a.YC
  11393. if (c || b) {
  11394. this.V.Jf = !0
  11395. this.V0(b, c)
  11396. a.Fy = a.ak.Cb.x
  11397. a.YC = a.ak.Cb.y
  11398. var a = b,
  11399. d = c,
  11400. e = this.rotation
  11401. e && ((e *= Math.PI / 180), (a = b * Math.cos(e) + Math.sin(e) * c), (d = -Math.sin(e) * b + Math.cos(e) * c))
  11402. a = this.get('centerCoords').ab(new g.H(a, d).Nd(this.T))
  11403. ;(d = this.x2(a)) && (c = Math.round(this.Xd(d).ab(this.Xd(a)).y))
  11404. this.Zo(this.Xa.Xr, b, c)
  11405. a.x = (a.x + g.a.Fa) % g.a.Fa
  11406. this.set('centerCoords', a, !0)
  11407. this.set('center', this.Od(a), !0)
  11408. this.vv && (this.hh ? ((a = new Date()), (this.Yt = 100 < a - this.hh ? new g.H(0, 0) : new g.H(b, c)), (this.hh = a)) : (this.hh = new Date()))
  11409. this.qa('dragging')
  11410. this.qa('mapmove')
  11411. } else (this.V.Jf = !1), (this.Yt = null), this.mu()
  11412. },
  11413. Zo: function (a, b, c) {
  11414. if (a && !(1 > Math.abs(b) && 1 > Math.abs(c))) {
  11415. var d = parseFloat(a.style.top) || 0,
  11416. e = parseFloat(a.style.left) || 0,
  11417. f = ''
  11418. this.rotation && (f = g.f.ot[g.f.pg] + ':rotate(' + this.rotation + 'deg);overflow:visible;')
  11419. a.style.cssText = 'position:absolute;top:' + (d + c) + 'px;left:' + (e + b) + 'px;' + f
  11420. }
  11421. },
  11422. x2: function (a) {
  11423. var b = this.D.view.ZW(),
  11424. c = (this.OU.height * this.T) / 2
  11425. return a.y < b.fc + c ? ((a.y = b.fc + c), a) : a.y > b.sc - c ? ((a.y = b.sc - c), a) : null
  11426. },
  11427. F_: function () {
  11428. this.ww()
  11429. 100 < new Date() - this.hh && (this.Yt = null)
  11430. this.V.fg = null
  11431. this.rg = !1
  11432. this.mu()
  11433. this.qa('dragend')
  11434. if (this.vv && this.Yt)
  11435. if (this.V.Jf) {
  11436. var a = this.Yt,
  11437. b = new g.H(0, 0)
  11438. this.He = new g.Kj(
  11439. a,
  11440. b,
  11441. function (a, b, e) {
  11442. return 600 <= e ? b : a.Nd(1 - Math.pow(e / 600, 2)).floor()
  11443. },
  11444. 1
  11445. )
  11446. this.He.Jq = function (a) {
  11447. if (2 > Math.abs(a.x) && 2 > Math.abs(a.y)) this.He.stop(), this.q('moveend'), this.us(), (this.Yt = this.hh = null)
  11448. else {
  11449. var b = a.x,
  11450. e = a.y,
  11451. f = this.rotation
  11452. f && ((f *= Math.PI / 180), (b = a.x * Math.cos(f) + Math.sin(f) * a.y), (e = -Math.sin(f) * a.x + Math.cos(f) * a.y))
  11453. b = this.get('centerCoords').ab(new g.H(b, e).Nd(this.T))
  11454. e = this.x2(b)
  11455. f = a.y
  11456. e && (f = Math.round(this.Xd(e).ab(this.Xd(b)).y))
  11457. this.Zo(this.Xa.Xr, a.x, f)
  11458. b.x = (b.x + g.a.Fa) % g.a.Fa
  11459. this.set('centerCoords', b, !0)
  11460. this.set('center', this.Od(b), !0)
  11461. this.qa('mapmove')
  11462. }
  11463. }
  11464. this.He.Nn(this)
  11465. } else this.q('moveend'), this.us(!0), (this.Yt = this.hh = null)
  11466. else this.q('moveend'), this.us(), (this.Yt = this.hh = null)
  11467. },
  11468. $xa: function () {
  11469. if (!this.V.refresh) {
  11470. var a = this,
  11471. b = null
  11472. this.V.refresh = setInterval(
  11473. function () {
  11474. b !== a.V.fg && (a.set('display', 0), (b = a.V.fg))
  11475. },
  11476. g.l.ba ? 400 : 100
  11477. )
  11478. }
  11479. },
  11480. IV: function () {
  11481. if (g.l.Xl && (g.l.qL || g.l.VH)) {
  11482. for (var a = this.Xa.o.childNodes, b = 0; b < a.length; b += 1) {
  11483. var c = a[b]
  11484. c instanceof HTMLCanvasElement && (c.width = 0)
  11485. 'amap-e' === c.className && (c.style.height = '0')
  11486. }
  11487. for (b = 0; b < this.la.length; b += 1) (c = this.la[b]), 'undefined' !== typeof AMap.IndoorMap && c instanceof AMap.IndoorMap && (c.uu && (c.uu.width = 0), c.Wx && (c.Wx.width = 0))
  11488. }
  11489. },
  11490. us: function (a) {
  11491. this.V.refresh && (clearInterval(this.V.refresh), (this.V.refresh = null))
  11492. a || (this.IV(), this.set('display', 0))
  11493. },
  11494. y8: function (a) {
  11495. this.set('refresh', a)
  11496. },
  11497. })
  11498. g.Rb.Hb({
  11499. setZoomSlow: function (a) {
  11500. this.VK(a, null, !this.get('animateEnable'))
  11501. },
  11502. setPanTo: function (a) {
  11503. this.VK(null, a, !this.get('animateEnable'))
  11504. },
  11505. zoomAndCenterChanged: function (a) {
  11506. var b = a[0]
  11507. b < this.get('zooms')[0] && (b = this.get('zooms')[0])
  11508. b > this.get('zooms')[1] && (b = this.get('zooms')[1])
  11509. this.VK(b, a[1], a[2] || !this.get('animateEnable'))
  11510. },
  11511. zoomChanged: function () {
  11512. this.T = Math.pow(2, 20 - this.get('zoom'))
  11513. this.q('closeOverlays')
  11514. this.set('display')
  11515. },
  11516. rotationChanged: function (a) {
  11517. this.rotation = this.get('rotation')
  11518. this.D.q('rotate', { rotation: this.rotation || 0 })
  11519. !0 !== a && this.set('display', 0)
  11520. },
  11521. pitchChanged: function () {
  11522. this.pitch = this.get('pitch')
  11523. this.D.q('pitch', { pitch: this.pitch || 0 })
  11524. this.set('display', 0)
  11525. },
  11526. centerCoordsChanged: function () {
  11527. this.q('closeOverlays')
  11528. this.NBa ? this.LK(!0) : this.LK(!1)
  11529. },
  11530. })
  11531. g.OW = g.da.extend({
  11532. ka: [g.va, g.Ze],
  11533. A: function (a, b) {
  11534. this.type = '2D'
  11535. this.jf(b, !0)
  11536. a && this.Bma(a)
  11537. },
  11538. Bma: function (a) {
  11539. this.map = a
  11540. this.af(['size', 'refresh', 'maxPitch'], a)
  11541. this.centerChanged()
  11542. a.af(['zoom', 'center', 'centerCoords', 'rotation', 'pitch'], this)
  11543. },
  11544. ZW: function () {
  11545. this.wM || this.Vna()
  11546. return this.wM
  11547. },
  11548. Vna: function () {
  11549. var a
  11550. if (this.get('center') instanceof g.U) {
  11551. a = new g.oe(-180, -85, 180, 85)
  11552. var b = this.map.Bb(a.dk())
  11553. a = this.map.Bb(a.Oo())
  11554. this.wM = { Ic: b.x, fc: b.y, Hc: a.x, sc: a.y }
  11555. } else (a = this.map.get('limitBounds', null, !0)), (this.wM = { Ic: a[0], fc: a[1], Hc: a[2], sc: a[3] })
  11556. },
  11557. rD: function () {
  11558. var a = this.map,
  11559. b = this.get('zoom')
  11560. return {
  11561. zoom: b,
  11562. oh: this.get('center'),
  11563. Ha: this.jm(),
  11564. lb: this.get('centerCoords'),
  11565. rotation: parseInt(this.get('rotation')),
  11566. Pf: a.get('crs'),
  11567. T: Math.pow(2, 20 - b),
  11568. ne: Math.round(b),
  11569. Gg: Math.pow(2, 20 - Math.round(this.get('zoom'))),
  11570. }
  11571. },
  11572. centerChanged: function () {
  11573. this.set('centerCoords', this.map.Bb(this.get('center')).toFixed(3), !0)
  11574. },
  11575. centerCoordsChanged: function () {
  11576. var a = this.map
  11577. a.C = !0
  11578. var b = this.ZW(),
  11579. c = this.get('centerCoords'),
  11580. d = a.getSize()
  11581. a.C = !1
  11582. var e = this.get('zoom', null, !0),
  11583. a = this.get('center', null, !0),
  11584. d = (d.height * Math.pow(2, 20 - e)) / 2
  11585. a instanceof g.U ? (c.x = (c.x + 268435456) % 268435456) : 0 > c.x ? (c.x = 0) : c.x > b.Hc && (c.x = b.Hc)
  11586. c.y < b.fc + d ? (c.y = b.fc + d) : c.y > b.sc - d && (c.y = b.sc - d)
  11587. this.set('center', this.map.Od(c), !0)
  11588. },
  11589. })
  11590. g.NF = g.OW.extend({
  11591. jm: function () {
  11592. var a = this.get('size'),
  11593. b = this.get('centerCoords'),
  11594. c = parseInt(this.get('rotation')) % 360,
  11595. d = this.get('zoom', null, !0),
  11596. e = Math.pow(2, 20 - d),
  11597. c = (Math.PI * c) / 180,
  11598. a = new g.H((Math.abs(a.width * Math.cos(c)) + Math.abs(a.height * Math.sin(c))) / 2, (Math.abs(a.width * Math.sin(c)) + Math.abs(a.height * Math.cos(c))) / 2),
  11599. e = new g.Wf(b.ab(a.Nd(e)), b.add(a.Nd(e))),
  11600. c = this.map.get('targetLevel')
  11601. if (c > d - 1) {
  11602. var f = Math.pow(2, 20 - c)
  11603. e.N$ = new g.Wf(b.ab(a.Nd(f)), b.add(a.Nd(f)))
  11604. }
  11605. e.F9 = c || d
  11606. e.Ac = a
  11607. return e
  11608. },
  11609. nqa: function (a) {
  11610. var b = this.get('size'),
  11611. c = this.get('centerCoords'),
  11612. d = parseInt(this.get('rotation')) % 360,
  11613. d = (Math.PI * d) / 180,
  11614. b = new g.H((Math.abs(b.width * Math.cos(d)) + Math.abs(b.height * Math.sin(d))) / 2, (Math.abs(b.width * Math.sin(d)) + Math.abs(b.height * Math.cos(d))) / 2)
  11615. a = Math.pow(2, 20 - a)
  11616. return new g.Wf(c.ab(b.Nd(a)), c.add(b.Nd(a)))
  11617. },
  11618. Kd: function () {
  11619. var a = this.jm(),
  11620. b = a.Vd.x,
  11621. c = a.hc.y,
  11622. a = new g.H(a.hc.x, a.Vd.y),
  11623. b = new g.H(b, c)
  11624. return new g.oe(this.map.Od(a), this.map.Od(b))
  11625. },
  11626. zoomChanged: function () {},
  11627. Xd: function (a, b) {
  11628. this.get('size')
  11629. var c = a.cb(),
  11630. d = this.get('centerCoords'),
  11631. e = c.ab(d)
  11632. e.x < -g.a.Fa / 2 ? (e.x += g.a.Fa) : e.x > g.a.Fa / 2 && (e.x -= g.a.Fa)
  11633. var c = this.get('size').PE().ld(2),
  11634. f = (this.get('rotation') * Math.PI) / 180,
  11635. d = e.x * Math.cos(f) - Math.sin(f) * e.y,
  11636. e = Math.sin(f) * e.x + Math.cos(f) * e.y
  11637. return c.add(new g.H(d, e).Nd(Math.pow(2, (b || this.get('zoom')) - 20)))
  11638. },
  11639. yg: function (a, b) {
  11640. var c = this.get('size').PE().ld(2),
  11641. d = a.ab(c),
  11642. e = (this.get('rotation') * Math.PI) / 180,
  11643. c = d.x * Math.cos(e) + Math.sin(e) * d.y,
  11644. d = -Math.sin(e) * d.x + Math.cos(e) * d.y,
  11645. c = this.get('centerCoords').add(new g.H(c, d).Nd(Math.pow(2, 20 - (b || this.get('zoom')))))
  11646. c.x = (c.x + 268435456) % 268435456
  11647. return c
  11648. },
  11649. })
  11650. g.qM = g.OW.extend({
  11651. A: function (a, b) {
  11652. this.Le = new g.Cc()
  11653. this.cc = new g.Cc([1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1])
  11654. arguments.callee.ma.apply(this, arguments)
  11655. this.scale = 1
  11656. this.type = '3D'
  11657. this.mA = null
  11658. this.T7 = ''
  11659. this.P = ['', 0, 0, '', 0]
  11660. this.mA = {}
  11661. },
  11662. refreshChanged: function () {
  11663. this.ir()
  11664. },
  11665. zoomChanged: function (a) {
  11666. this.ir()
  11667. this.P[4] = a
  11668. },
  11669. centerChanged: function (a) {
  11670. arguments.callee.ma.apply(this, arguments)
  11671. this.ir()
  11672. },
  11673. centerCoordsChanged: function (a) {
  11674. arguments.callee.ma.apply(this, arguments)
  11675. this.ir()
  11676. this.P[0] = a.toString()
  11677. },
  11678. rotationChanged: function (a) {
  11679. this.ir()
  11680. this.P[2] = a
  11681. },
  11682. pitchChanged: function (a) {
  11683. this.Ce.pitch = Math.min(this.get('maxPitch'), Math.max(a, 0))
  11684. this.ir()
  11685. this.P[1] = a
  11686. },
  11687. ir: function () {
  11688. if (!this.Bza() && (this.sL(), this.Toa(), this.map)) {
  11689. var a = this,
  11690. b = function () {
  11691. a.map.camera = a.R3()
  11692. a.map.q('camerachange', { map: a.map, camera: a.map.camera })
  11693. }
  11694. a.map.Ra ? b() : this.map.h('complete', b, this)
  11695. }
  11696. },
  11697. R3: function () {
  11698. return { height: this.pn, fov: this.bqa, aspect: this.uC, near: this.sz, far: this.LI, position: this.Yma, rotation: this.Ce.rotation, pitch: this.Ce.pitch }
  11699. },
  11700. Toa: function () {
  11701. this.Rga = g.a.dg()
  11702. },
  11703. Uo: function () {
  11704. var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 300
  11705. return g.a.dg() - this.Rga > a
  11706. },
  11707. sL: function () {
  11708. var a = this.get('centerCoords'),
  11709. b = this.get('pitch'),
  11710. c = this.get('rotation'),
  11711. d = new g.Cc().c9(-a.x + g.a.dc.x, -a.y + g.a.dc.y, 0)
  11712. this.Yma = { x: a.x - g.a.dc.x, y: a.y - g.a.dc.y }
  11713. a = new g.Cc().Rz(180 - b, 1, 0, 0)
  11714. this.I7 = new g.Cc().set(a)
  11715. c = new g.Cc().Rz(c, 0, 0, 1)
  11716. this.Tq = new g.Cc().set(c)
  11717. this.$pa = d.Dg()
  11718. this.cc = new g.Cc()
  11719. .c9(0, 0, -this.pn)
  11720. .multiply(a.multiply(c.multiply(d)))
  11721. .toFixed(8)
  11722. this.cc.df = this.cc.Dg()
  11723. },
  11724. Bza: function (a) {
  11725. a = a || this.get('zoom')
  11726. var b = this.get('size'),
  11727. c = b.width,
  11728. b = b.height
  11729. if (!c || !b) return !0
  11730. this.uC = c /= b
  11731. b = (b / 2) * Math.pow(2, 20 - a)
  11732. a = g.a.wb(((56 - a) * Math.PI) / 180, 2)
  11733. var d = g.a.wb(b / Math.tan(a / 2), 0)
  11734. 2400 > d && ((d = 2400), (a = 2 * Math.atan(b / d)))
  11735. this.bqa = a
  11736. this.pn = d
  11737. this.sz = this.pn / 10
  11738. this.LI = 50 * this.pn
  11739. this.Coa = (this.pn - this.sz) / (this.LI - this.sz)
  11740. this.Le.Z8(a, c, this.sz, this.LI)
  11741. this.Le.df = this.Le.Dg()
  11742. a = this.Le
  11743. var c = new g.eW(),
  11744. b = c.iE,
  11745. e = this.Le.elements,
  11746. d = e[0],
  11747. f = e[1],
  11748. h = e[2],
  11749. k = e[3],
  11750. l = e[4],
  11751. m = e[5],
  11752. n = e[6],
  11753. p = e[7],
  11754. q = e[8],
  11755. r = e[9],
  11756. s = e[10],
  11757. u = e[11],
  11758. v = e[12],
  11759. w = e[13],
  11760. t = e[14],
  11761. e = e[15]
  11762. xc(b[0], k - d, p - l, u - q, e - v).normalize()
  11763. xc(b[1], k + d, p + l, u + q, e + v).normalize()
  11764. xc(b[2], k + f, p + m, u + r, e + w).normalize()
  11765. xc(b[3], k - f, p - m, u - r, e - w).normalize()
  11766. xc(b[4], k - h, p - n, u - s, e - t).normalize()
  11767. xc(b[5], k + h, p + n, u + s, e + t).normalize()
  11768. a.mR = c
  11769. },
  11770. rD: function () {
  11771. var a = this.map
  11772. a.map.ht && (this.ir(), (this.P[3] = a.get('size').toString()))
  11773. var b = this.P.toString()
  11774. if (b !== this.T7) {
  11775. var c = this.get('zoom'),
  11776. d = this.mA
  11777. d.zoom = c
  11778. d.uC = this.uC
  11779. d.top = this.top
  11780. d.Ha = this.jm()
  11781. d.lb = this.get('centerCoords')
  11782. d.rotation = (a.get('rotateEnable') && parseInt(this.get('rotation'))) || 0
  11783. d.pitch = this.get('pitch') || 0
  11784. d.BIa = this.get('yaw')
  11785. d.Pf = a.get('crs')
  11786. d.T = Math.pow(2, 20 - c)
  11787. d.ne = Math.round(c)
  11788. d.q7 = Math.floor(c)
  11789. d.Gg = Math.pow(2, 20 - d.ne)
  11790. d.cva = Math.pow(2, 20 - d.q7)
  11791. d.Le = this.Le
  11792. d.cc = this.cc
  11793. this.T7 = d.key = b
  11794. }
  11795. this.mA.oh = this.get('center')
  11796. this.mA.gr = g.a.dg()
  11797. this.mA.Uo = this.Uo()
  11798. return this.mA
  11799. },
  11800. jm: function () {
  11801. var a = this.get('size'),
  11802. b = a.width,
  11803. a = a.height
  11804. if (!b || !a) return null
  11805. var c, d
  11806. d = 0
  11807. var e = new g.H(0, d)
  11808. c = this.yg(e, !0)
  11809. if (55 < this.Ce.pitch || !c) for (; !c; ) (d += a / 40), (e.y = d), (c = this.yg(e, !0))
  11810. this.top = d / a
  11811. e.x = b
  11812. d = this.yg(e, !0)
  11813. var f = 0,
  11814. h = this.Ce.zoom
  11815. 50 <= this.Ce.pitch && 18 <= h && (f = 0)
  11816. e.y = a + f
  11817. f = this.yg(e, !0)
  11818. e.x = 0
  11819. h = this.yg(e, !0)
  11820. c = [c.wl(), d.wl(), f.wl(), h.wl(), c.wl()]
  11821. c = new g.daa(c)
  11822. e.x = b / 2
  11823. e.y = a + 256
  11824. c.YP = this.yg(e, !0)
  11825. return c
  11826. },
  11827. Kd: function () {
  11828. var a = this.jm()
  11829. if (a) {
  11830. for (var b = [], c = 0; c < a.path.length; c += 1) {
  11831. var d = this.map.Od(new g.H(a.path[c][0], a.path[c][1]))
  11832. b.push(d)
  11833. }
  11834. return new g.tp(b)
  11835. }
  11836. },
  11837. Xd: function (a, b, c) {
  11838. a.z = c || 0
  11839. a = this.J6([a])
  11840. a = a[0]
  11841. return new g.H(a.x, a.y)
  11842. },
  11843. V3: function (a) {
  11844. var b = this.get('size')
  11845. a = new g.Fl([(a.x / b.width) * 2 - 1, 1 - (a.y / b.height) * 2, -1, 1])
  11846. a.multiply(this.sz)
  11847. return this.Le.df.Ah(a)
  11848. },
  11849. yg: function (a, b, c) {
  11850. var d
  11851. this.map ? ((this.map.C = !0), (d = this.map.getSize(!0)), (this.map.C = !1)) : (d = this.get('size'))
  11852. var e = (a.x / d.width) * 2 - 1
  11853. d = 1 - (a.y / d.height) * 2
  11854. a = new g.Fl([e, d, -1, 1])
  11855. a.multiply(this.sz)
  11856. if (!this.Le.df) return null
  11857. a = this.Le.df.Ah(a)
  11858. e = new g.Fl([e, d, 1, 1])
  11859. e.multiply(this.LI)
  11860. d = this.Le.df.Ah(e)
  11861. var f = this.cc.df,
  11862. e = f.Ah(a).elements
  11863. a = f.Ah(d).elements
  11864. c = (e[2] - (-c || 0)) / (e[2] - a[2])
  11865. if (0 > a[2] || 0 > c || (b && c > 2.5 * this.Coa)) return null
  11866. b = e[0] - c * (e[0] - a[0])
  11867. c = e[1] - c * (e[1] - a[1])
  11868. return isNaN(b) || isNaN(c) ? null : new g.H(b, c).add(g.a.dc)
  11869. },
  11870. J6: function (a) {
  11871. for (
  11872. var b = this.get('centerCoords'),
  11873. c = g.a.dc.x,
  11874. d = g.a.dc.y,
  11875. e = this.get('size'),
  11876. f = g.a.Fa,
  11877. h = b.x + f / 2,
  11878. b = b.x - f / 2,
  11879. k = [],
  11880. l = new g.Fl([0, 0, 0, 1]),
  11881. m = l.elements,
  11882. n = new g.H(0, 0),
  11883. p = g.Cc.multiply(this.Le, this.cc),
  11884. q = 0,
  11885. r = a.length;
  11886. q < r;
  11887. q++
  11888. )
  11889. if (a[q]) {
  11890. a[q].concat ? ((n.x = a[q][0]), (n.y = a[q][1]), (n.z = -a[q][2] || 0)) : ((n.x = a[q].x), (n.y = a[q].y), (n.z = -a[q].z || 0))
  11891. h < n.x ? (n.x -= f) : b > n.x && (n.x += f)
  11892. m[0] = n.x - c
  11893. m[1] = n.y - d
  11894. m[2] = n.z
  11895. var s = p.Ah(l)
  11896. s.multiply(1 / s.elements[3])
  11897. k[q] = { x: ((s.elements[0] + 1) / 2) * e.width, y: ((-s.elements[1] + 1) / 2) * e.height, z: s.elements[2] }
  11898. }
  11899. return k
  11900. },
  11901. cAa: function (a) {
  11902. var b = this.get('size')
  11903. a = this.Le.Ah(this.cc.Ah(new g.Fl().copy(a)))
  11904. a.multiply(1 / a.elements[3])
  11905. b = new g.H(((a.elements[0] + 1) / 2) * b.width, ((-a.elements[1] + 1) / 2) * b.height)
  11906. b.z = a.elements[2]
  11907. return b
  11908. },
  11909. })
  11910. g.a.dc = new g.H(215440491, 106744817)
  11911. g.Rb.Hb({
  11912. s2: function (a, b, c) {
  11913. var d = this
  11914. d.iF ? (clearTimeout(d.iF), (d.iF = null)) : (d.qa('zoomstart', { zoom: a }), d.q('zoomstart'))
  11915. d.iF = setTimeout(function () {
  11916. d.iF = null
  11917. d.qa('zoomend', { zoom: a })
  11918. d.qa('zoomchange', { zoom: a })
  11919. d.q('zoomend')
  11920. }, 150)
  11921. a = g.a.wb(a, 2)
  11922. d.qA(a, !0, b, c)
  11923. },
  11924. qA: function (a, b, c, d) {
  11925. var e = this.get('zoom')
  11926. if (e !== a) {
  11927. var f = this.get('zooms')
  11928. '3D' !== this.D.view.type && (g.l.ba || g.l.Ue) && (b = !0)
  11929. a = a || e
  11930. a = Math.min(Math.max(a, f[0]), f[1])
  11931. var h = a !== e,
  11932. k = !!c
  11933. this.He && (this.He.stop(), (this.He = null))
  11934. c = c || this.get('centerCoords')
  11935. var l = this.Xd(c)
  11936. c = function (c) {
  11937. b || (c = g.a.wb(c, 2))
  11938. var d = this.yg(l)
  11939. this.set('zoom', c)
  11940. var e = this.yg(l),
  11941. d = e && e ? e.ab(d) : new g.H(0, 0)
  11942. this.set('centerCoords', this.get('centerCoords').ab(d).toFixed(3))
  11943. d.x && d.y && this.qa('mapmove')
  11944. c === a &&
  11945. a << 0 === a &&
  11946. (this.set('targetLevel', null), h && !this.iF && (this.qa('zoomchange'), this.qa('zoomend')), this.q('zoomend'), k && this.q('moveend'), (this.Vf = null))
  11947. }
  11948. var m
  11949. this.Fd && this.Fd.Zv && (this.Fd.stop(), this.Fd.eS && (d = !0), this.Fd.sD && (m = !0), (this.Fd = null), this.set('targetLevel', null))
  11950. this.Vf && this.Vf.Zv && (this.Vf.stop(), (d = !0), this.Vf.sD && (m = !0), (this.Vf = null), this.set('targetLevel', null))
  11951. h && !d && this.qa('zoomstart')
  11952. k && !m && this.qa('movestart')
  11953. this.q('zoomstart')
  11954. b
  11955. ? c.call(this, a)
  11956. : ((this.Vf = new g.Kj(e, a, null, 0.04)),
  11957. (this.Vf.eS = h),
  11958. (this.Vf.sD = k),
  11959. (this.Vf.transition = function (a, b, c) {
  11960. return c >= g.r.QH ? b : (b - a) * (1 - Math.pow(1 - c / g.r.QH, 4)) + a
  11961. }),
  11962. (this.Vf.Jq = c),
  11963. this.Vf.Nn(this, !0),
  11964. this.set('targetLevel', a))
  11965. }
  11966. },
  11967. VK: function (a, b, c, d) {
  11968. var e = null
  11969. a || (a = this.Fd ? this.Fd.kya : this.get('targetLevel') || this.get('zoom'))
  11970. var e = b ? this.Bb(b).toFixed(3) : this.Fd ? this.Fd.E9 : this.get('centerCoords'),
  11971. f = a !== this.get('zoom'),
  11972. h = !e.gb(this.get('centerCoords')),
  11973. k = (b = !1)
  11974. this.Vf && this.Vf.Zv && (this.Vf.stop(), (b = !0), this.Vf.sD && (k = !0), (this.Vf = null), this.set('targetLevel', null))
  11975. this.Fd && this.Fd.Zv && (this.Fd.stop(), this.Fd.eS && (b = !0), this.Fd.sD && (k = !0), (this.Fd = null), this.set('targetLevel', null))
  11976. this.He && (this.He.stop(), (this.He = null))
  11977. if (f || h) {
  11978. if (!this.D.view.jm().contains(e) || (f && '3D' !== this.D.view.type && (g.l.ba || g.l.Ue))) c = !0
  11979. if (c)
  11980. f && (b || (this.q('zoomstart'), this.qa('zoomstart')), this.set('zoom', a), this.qa('zoomchange'), this.qa('zoomend'), this.q('zoomend')),
  11981. h && (k || d || (this.qa('movestart'), this.q('movestart')), this.set('centerCoords', e), this.qa('mapmove'), this.q('moveend', { N5: d })),
  11982. this.set('targetLevel', null)
  11983. else {
  11984. this.set('targetLevel', a)
  11985. var l = a - this.get('zoom'),
  11986. m = e.ab(this.get('centerCoords')).toFixed(3)
  11987. this.Fd = new g.Kj(1, 0, null, 0.001)
  11988. this.Fd.eS = f
  11989. this.Fd.sD = h
  11990. this.Fd.E9 = e
  11991. this.Fd.kya = a
  11992. this.Fd.transition = function (a, b, c) {
  11993. return Math.pow(1 - Math.min(g.r.QH, c) / g.r.QH, 2)
  11994. }
  11995. this.Fd.Jq = function (b) {
  11996. 0.02 > b
  11997. ? (this.Fd && (this.Fd.stop(), (this.Fd = null)),
  11998. f && (this.set('zoom', a), this.qa('zoomchange'), this.qa('zoomend'), (f = !1), this.q('zoomend')),
  11999. h && (this.set('centerCoords', e), this.q('mapmove'), this.q('moveend', { N5: d })),
  12000. this.set('targetLevel', null))
  12001. : (f && this.set('zoom', a - l * b), h && ((b = e.ab(m.Nd(b)).toFixed(3)), this.set('centerCoords', b), this.qa('mapmove')))
  12002. this.set('display', 1)
  12003. }
  12004. this.Fd.Nn(this)
  12005. f && !b && (this.q('zoomstart'), this.qa('zoomstart'))
  12006. !h || k || d || (this.q('movestart'), this.qa('movestart'))
  12007. }
  12008. }
  12009. },
  12010. })
  12011. g.o = {}
  12012. g.o.Yb = g.da.extend({
  12013. ka: [g.va, g.Ze],
  12014. A: function (a, b) {
  12015. this.S = a
  12016. this.Ya = [3, 18]
  12017. this.ex = g.a.yb(this)
  12018. a && this.af(['opacity', 'visible', 'zIndex', 'zooms'], a)
  12019. a.Uf = b.D.view.type
  12020. this.e = b
  12021. this.X('display', b)
  12022. },
  12023. gg: function () {
  12024. this.Di && this.iQ()
  12025. if (g.Ca && g.Ca.kr && g.Ca.kr.length) {
  12026. var a = g.a.indexOf(g.Ca.kr, this)
  12027. ;-1 !== a && (g.Ca.kr = g.a.Fo(g.Ca.kr, a))
  12028. }
  12029. if ((a = this.Nb)) {
  12030. if (a.length) for (var b = 0; b < a.length; b += 1) a[b].parentNode && a[b].parentNode.removeChild(a[b])
  12031. else a.parentNode && a.parentNode.removeChild(a)
  12032. this.Nb = null
  12033. }
  12034. this.S.gg && this.S.gg()
  12035. this.S.qi = !1
  12036. this.S.o = null
  12037. this.yl()
  12038. var c
  12039. this.M && (this.M.$j(), (this.M = null), (c = '-' + this.lc))
  12040. this.Bf && (this.Bf.$j(), (this.Bf = null), (c = '-' + this.lc))
  12041. if (c) for (var d in g.Ca.Fj) g.a.cD(d, c) && delete g.Ca.Fj[d]
  12042. },
  12043. qa: function (a, b) {
  12044. this.S.q(a, b)
  12045. },
  12046. visibleChanged: function () {
  12047. this.set('display', 0)
  12048. },
  12049. zIndexChanged: function () {
  12050. this.set('display', 0)
  12051. },
  12052. EU: function (a) {
  12053. g.f.Xq(a, this.opacity)
  12054. },
  12055. opacityChanged: function () {
  12056. var a = this.get('opacity')
  12057. this.opacity = Math.min(Math.max(0, a), 1)
  12058. if ((a = this.Nb))
  12059. if (a.length) for (var b = 0; b < a.length; b += 1) this.EU(a[b])
  12060. else this.EU(a)
  12061. this.e && this.e.D && '3D' == this.e.D.view.type && this.set('display', 0)
  12062. },
  12063. yn: function () {
  12064. return this.e.Nc && !this.S.get('rejectMapMask')
  12065. },
  12066. aJ: function () {
  12067. var a = this.get('bounds')
  12068. if (a) {
  12069. if (a instanceof g.oe) {
  12070. var b = a.dk(),
  12071. a = a.Oo(),
  12072. c = this.e.Bb(new g.U(180, 0)).x,
  12073. d = this.e.Bb(b),
  12074. e = this.e.Bb(a),
  12075. f = this.e.get('center')
  12076. b.R > a.R && (0 < f.R ? (e.x += c) : (d.x -= c))
  12077. this.I = [d.x, d.y, e.x, e.y]
  12078. } else
  12079. a instanceof g.Wf
  12080. ? (this.I = [a.hc.x, a.hc.y, a.Vd.x, a.Vd.y])
  12081. : a instanceof g.OF && '3D' === this.S.Uf && ((b = a.path[1]), (d = this.e.Bb(a.path[0])), (e = this.e.Bb(b)), (this.I = [d.x, d.y, e.x, e.y, a.O8, a.height]))
  12082. return this.I
  12083. }
  12084. return null
  12085. },
  12086. })
  12087. var Oc = (function () {
  12088. function a(a) {
  12089. this.RF[g.a.yb(a)] = a
  12090. return this
  12091. }
  12092. function b(a) {
  12093. this.RF[g.a.yb(a)] = null
  12094. return this
  12095. }
  12096. return function () {
  12097. function c() {
  12098. var a = c.RF,
  12099. b,
  12100. f = [],
  12101. h
  12102. for (h in a) a.hasOwnProperty(h) && f.push(a[h])
  12103. for (a = f.length - 1; 0 <= a; a -= 1) (h = f[a].apply(this, arguments)), void 0 !== h && (b = h)
  12104. return b
  12105. }
  12106. c.RF = {}
  12107. c.K1 = a
  12108. c.QGa = b
  12109. return c
  12110. }
  12111. })()
  12112. g.og = g.da.extend({
  12113. ka: [g.va],
  12114. A: function (a, b) {
  12115. this.Ip = a | 0
  12116. this.UF = !!b
  12117. this.count = 0
  12118. this.iK = Oc()
  12119. this.clear()
  12120. this.CB = []
  12121. },
  12122. uh: function () {
  12123. return !this.count
  12124. },
  12125. hFa: function () {
  12126. return this.count >= this.Ip
  12127. },
  12128. yHa: function (a) {
  12129. this.Ip !== a && (this.Ip = a | 0) && this.u1(this.Ip)
  12130. },
  12131. Ld: function (a) {
  12132. return !!this.e[a]
  12133. },
  12134. get: function (a, b) {
  12135. var c = this.wY(a)
  12136. return c ? c.value : b
  12137. },
  12138. set: function (a, b) {
  12139. var c = this.wY(a)
  12140. c ? (c.value = b) : ((c = new g.og.tr(a, b)), (this.e[a] = c), this.tB(c), (this.count += 1), this.count > this.Ip && this.u1(this.Ip))
  12141. },
  12142. yw: function (a) {
  12143. this.remove(a)
  12144. },
  12145. remove: function (a) {
  12146. return this.e.hasOwnProperty(a) && this.UB(this.e[a]) ? !0 : !1
  12147. },
  12148. forEach: function (a, b) {
  12149. for (var c = this.cd.next; c !== this.cd; c = c.next) a.call(b, c.value, c.key, this)
  12150. },
  12151. pK: function (a, b) {
  12152. return this.e.hasOwnProperty(a) ? this.e[a].value : b
  12153. },
  12154. tGa: function () {
  12155. return this.cd.next.value
  12156. },
  12157. uGa: function () {
  12158. return this.cd.Ia.value
  12159. },
  12160. shift: function () {
  12161. return this.n0(this.cd.next)
  12162. },
  12163. C2: function () {
  12164. this.CB.length = 0
  12165. },
  12166. t6: function (a) {
  12167. this.CB.push(a)
  12168. },
  12169. push: function (a) {
  12170. a = new g.og.tr('', a)
  12171. 0 === this.count ? ((this.cd.Ia = null), (a.Ia = this.cd), (this.cd.next = a)) : ((this.iC.next = a), (a.Ia = this.iC))
  12172. this.count += 1
  12173. this.iC = a
  12174. },
  12175. qza: function (a) {
  12176. a = new g.og.tr('', a)
  12177. 0 === this.count ? ((this.cd.Ia = null), (a.Ia = this.cd), (this.iC = this.cd.next = a)) : ((this.cd.next.Ia = a), (a.next = this.cd.next), (a.Ia = this.cd), (this.cd.next = a))
  12178. this.count += 1
  12179. },
  12180. uua: function () {
  12181. if (this.count) {
  12182. this.count -= 1
  12183. var a = this.cd.next
  12184. a.next ? ((a.next.Ia = this.cd), (this.cd.next = a.next)) : ((this.cd.next = null), (this.iC = this.cd.Ia = null))
  12185. a.next = null
  12186. a.Ia = null
  12187. return a.value
  12188. }
  12189. return null
  12190. },
  12191. pop: function () {
  12192. return this.n0(this.cd.Ia)
  12193. },
  12194. wY: function (a) {
  12195. if (this.e.hasOwnProperty(a)) return (a = this.e[a]), this.UF && (a.remove(), this.tB(a)), a
  12196. },
  12197. tB: function (a) {
  12198. this.UF ? ((a.next = this.cd.next), (a.Ia = this.cd), (this.cd.next = a), (a.next.Ia = a)) : ((a.Ia = this.cd.Ia), (a.next = this.cd), (this.cd.Ia = a), (a.Ia.next = a))
  12199. },
  12200. u1: function (a) {
  12201. if (!(this.count <= a || this.count < 2 * this.CB.length)) {
  12202. for (var b = this.UF ? this.cd.Ia : this.cd.next, c = {}, d = 0, e = this.CB.length; d < e; d++) c[this.CB[d]] = !0
  12203. for (
  12204. a = Math.ceil((2 * a) / 3);
  12205. b && this.count > a && ((d = this.UF ? b.Ia : b.next), b.key && !c[b.key] && this.UB(b) && this.iK(b.value), (b = d), b !== this.cd && b !== this.iC);
  12206. );
  12207. }
  12208. },
  12209. UB: function (a) {
  12210. if (this.xC && !1 == this.xC(a.value)) return !1
  12211. a.remove()
  12212. delete this.e[a.key]
  12213. this.count -= 1
  12214. return !0
  12215. },
  12216. n0: function (a) {
  12217. this.cd !== a && (this.xC && console.log('Warnning!!!'), this.UB(a))
  12218. return a.value
  12219. },
  12220. clear: function () {
  12221. this.e = {}
  12222. this.cd = new g.og.tr('', null)
  12223. this.cd.Ia = this.cd.next = this.cd
  12224. this.count = 0
  12225. },
  12226. })
  12227. g.og.tr = function (a, b) {
  12228. this.key = a
  12229. this.value = b
  12230. }
  12231. g.og.tr.prototype.Ia = null
  12232. g.og.tr.prototype.next = null
  12233. g.og.tr.prototype.remove = function () {
  12234. this.Ia.next = this.next
  12235. this.next.Ia = this.Ia
  12236. this.next = this.Ia = null
  12237. }
  12238. function Pc(a, b, c) {
  12239. this.url = a
  12240. this.Mc = b
  12241. this.gR = c
  12242. this.qn = this.MK = !1
  12243. }
  12244. function Qc(a, b, c) {
  12245. var d = Rc
  12246. return function () {
  12247. return d.call(this, a, b, c)
  12248. }
  12249. }
  12250. function Rc(a, b, c) {
  12251. a.KDa = +new Date()
  12252. a.loaded = b
  12253. clearTimeout(a.yya)
  12254. var d = a.Hta
  12255. d.Ln.remove(a.url) && d.Sga()
  12256. d = a.Msa ? a.ga : a.Ba
  12257. a.ga = null
  12258. ;(c || b || a.gR) && a.Mc(b ? d : null, a)
  12259. a.V5 ? (a.V5.ti(), (a.V5 = null)) : d && ((d.onload = null), (d.onerror = null), (d.onabort = null), (a.Ba = null))
  12260. }
  12261. g.wF = g.da.extend({
  12262. KBa: 'assets/image/blank.gif',
  12263. A: function (a, b, c) {
  12264. this.timeout = b || 15e3
  12265. this.Oq = new g.og(1024)
  12266. this.Ln = new g.og(1024)
  12267. this.M2 = a
  12268. this.UQ = c
  12269. },
  12270. NM: function (a) {
  12271. a && this.Ln.count >= this.M2 && ((a = this.Ln.cd.Ia.value), a.qn && (this.Ln.remove(a.url), this.fX(a)))
  12272. for (; this.Oq.count && !(this.Ln.count >= this.M2); ) this.eea(this.Oq.shift())
  12273. },
  12274. Sga: function () {
  12275. if (!this.PX) {
  12276. this.PX = !0
  12277. var a = this
  12278. setTimeout(function () {
  12279. a.PX = !1
  12280. a.NM()
  12281. }, 0)
  12282. }
  12283. },
  12284. eea: function (a) {
  12285. var b = document.createElement('img')
  12286. a.dqa && (b.crossOrigin = 'anonymous')
  12287. b.src = a.url
  12288. a.Ba = b
  12289. a.Hta = this
  12290. a.startTime = +new Date()
  12291. a.MK = !0
  12292. b.complete ? Rc(a, !0) : (this.Ln.set(a.url, a), (b.onload = Qc(a, !0)), (b.onerror = Qc(a, !1, !0)), (b.onabort = Qc(a, !1)), (a.yya = setTimeout(Qc(a, !1, !0), this.timeout)))
  12293. },
  12294. fX: function (a) {
  12295. a.MK && (Rc(a, !1), (a.qn = !0), (a.GCa = !0))
  12296. },
  12297. GFa: function (a, b, c) {
  12298. return this.mz(a.url, b, c, !0, a.ta.z + '_' + a.ta.x + '_' + a.ta.y)
  12299. },
  12300. mz: function (a, b, c, d, e) {
  12301. var f = this.Ln.get(a)
  12302. if (f && f.qn) (f.qn = !1), (f.Mc = b), (f.gR = c)
  12303. else {
  12304. f = new Pc(a, b, c)
  12305. f.Msa = d
  12306. f.key = e
  12307. if (this.Oq.get(g.a.yb(f))) return
  12308. this.Oq.set(g.a.yb(f), f)
  12309. this.NM(!0)
  12310. }
  12311. return f
  12312. },
  12313. wta: function (a, b, c) {
  12314. var d = this.Ln.get(a)
  12315. if (d && d.qn) (d.qn = !1), (d.Mc = b), (d.gR = c)
  12316. else {
  12317. d = new Pc(a, b, c)
  12318. d.dqa = !0
  12319. if (this.Oq.get(g.a.yb(d))) return
  12320. this.Oq.set(g.a.yb(d), d)
  12321. this.NM(!0)
  12322. }
  12323. return d
  12324. },
  12325. q2: function (a) {
  12326. a.qn || ((a.qn = !0), this.Oq.remove(g.a.yb(a)))
  12327. },
  12328. clear: function (a) {
  12329. this.Oq.forEach(function (a) {
  12330. a.qn = !0
  12331. })
  12332. this.Oq.clear()
  12333. if (a) for (; 0 < this.Ln.length; ) (a = this.Ln.pop()), this.fX(a)
  12334. else
  12335. this.Ln.forEach(function (a) {
  12336. a.qn = !0
  12337. })
  12338. },
  12339. })
  12340. function Sc(a, b, c) {
  12341. this.z = a
  12342. this.x = b
  12343. this.y = c
  12344. }
  12345. Sc.prototype.cb = function () {
  12346. return new Sc(this.z, this.x, this.y)
  12347. }
  12348. Sc.prototype.toString = function () {
  12349. return this.z + '/' + this.x + '/' + this.y
  12350. }
  12351. g.rb = function (a) {
  12352. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
  12353. this.ta = a
  12354. this.key = a.toString()
  12355. this.Ie = b
  12356. }
  12357. g.pr = Sc
  12358. g.o.rb = g.o.Yb.extend({
  12359. A: function (a, b, c, d, e) {
  12360. arguments.callee.ma.apply(this, arguments)
  12361. this.X('tileSize', a)
  12362. this.X('tiles', a)
  12363. this.af(['zooms', 'type', 'detectRetina', 'errorUrl'], a)
  12364. a.FG && (this.X('lang', b, !0), this.X('mapStyle', b, !0), this.X('style', b, !0), this.X('features', b, !0))
  12365. var f = 'overlayer' === a.get('type') || !1 === a.get('blend')
  12366. this.Il = !1
  12367. var h = b.get('size'),
  12368. h = (h.width * h.height) / 65536
  12369. this.ja = g.l.ba && g.l.ja && this.get('detectRetina')
  12370. g.l.Jc && g.l.ba && 9 < h && (this.Il = !1)
  12371. this.Yi = !f && !a.Sv
  12372. this.Zi = !f && !a.Sv
  12373. this.gL = c
  12374. this.X('reload', a)
  12375. a.Isa ? this.X('createTile', a) : this.X('tileFun', a)
  12376. this.ff = d
  12377. this.nS = e
  12378. },
  12379. langChanged: function () {
  12380. this.set('reload')
  12381. this.S.$s()
  12382. },
  12383. styleChanged: function () {
  12384. this.e.Bd || (this.set('reload'), this.S.$s())
  12385. },
  12386. featuresChanged: function () {
  12387. this.set('reload')
  12388. this.S.$s()
  12389. },
  12390. reloadChanged: function () {
  12391. this.set('display', 0)
  12392. },
  12393. tileFunChanged: function () {
  12394. var a = this.gL || this.get('tileFun')
  12395. this.Bo = function (b, c, d) {
  12396. var e = a(b.ta.x, b.ta.y, b.ta.z)
  12397. if (!b.Is || b.Is.qn)
  12398. (b.loaded = !1),
  12399. (b.Is = ('3D' === this.e.D.view.type ? g.pm.wta : g.pm.mz).call(
  12400. g.pm,
  12401. e,
  12402. function (a) {
  12403. b.Is = null
  12404. a ? c(a) : d()
  12405. },
  12406. !1
  12407. ))
  12408. }
  12409. },
  12410. createTileChanged: function () {
  12411. this.S.C = !0
  12412. var a = this.S.getCreateTile()
  12413. this.S.C = !1
  12414. this.Bo = function (b, c, d) {
  12415. a.call(this.g.S, b.ta.x, b.ta.y, b.ta.z, c, d, b)
  12416. }
  12417. this.set('reload')
  12418. },
  12419. me: function () {
  12420. var a = this.S.get('zooms', null, !0)
  12421. this.S.Hsa && (a = [Math.min(a[0], 18), Math.min(a[1], 18)])
  12422. return {
  12423. Dd: this.S.get('tileSize'),
  12424. visible: this.S.get('visible'),
  12425. I: this.aJ(),
  12426. Ya: a,
  12427. ZH: this.Il,
  12428. Yi: this.Yi,
  12429. Zi: this.Zi,
  12430. opacity: this.S.get('opacity'),
  12431. Bo: this.S.get('createTile'),
  12432. Po: this.gL || this.S.get('tileFun'),
  12433. Jc: this.S.Gq ? !1 : this.S.get('detectRetina') && g.l.ja && g.l.ba,
  12434. Nc: this.yn(),
  12435. }
  12436. },
  12437. $l: function (a) {
  12438. if (g.M.be.Ti) return new g.M.be.Ti(this, a)
  12439. },
  12440. })
  12441. g.pm = new g.wF(6, null)
  12442. g.o.fd = g.o.Yb.extend({
  12443. A: function (a, b) {
  12444. this.Ua = Math.min(2, window.devicePixelRatio || 1)
  12445. this.Jc = g.l.ja
  12446. this.map = b
  12447. this.er = 0
  12448. this.mm = !1
  12449. this.ig = this.Af = 0
  12450. this.ah = []
  12451. arguments.callee.ma.apply(this, arguments)
  12452. this.Jv = []
  12453. this.em = new g.o.laa()
  12454. a && (this.X('style', a), this.X('cursor', a, !0), (this.Xxa = a.get('stable') || !1), this.X('dataSources', a), this.X('bubble', a))
  12455. this.X('display', b)
  12456. this.zca()
  12457. },
  12458. me: function () {
  12459. return { visible: this.get('visible'), Ya: this.get('zooms'), opacity: this.get('opacity'), zIndex: this.get('zIndex'), ey: this.S.get('alwaysRender') || !1, Nc: this.yn() }
  12460. },
  12461. dataSourcesChanged: function () {
  12462. var a = this.get('dataSources')
  12463. a && a.length
  12464. ? 'string' === typeof a
  12465. ? new g.jb.zb(a).h(
  12466. 'complete',
  12467. function (a) {
  12468. this.y7(a.data)
  12469. this.ls = a.data
  12470. this.mm = !0
  12471. this.set('display')
  12472. this.Ra = !0
  12473. this.S.q('complete')
  12474. },
  12475. this
  12476. )
  12477. : a.length && (this.y7(a), (this.ls = a), (this.mm = !0), this.set('display'), (this.Ra = !0), this.S.q('complete'))
  12478. : this.clear()
  12479. },
  12480. getDatas: function () {
  12481. return this.ls
  12482. },
  12483. vza: function () {
  12484. if (this.S.zj) {
  12485. var a = this.Cm
  12486. this.Af = a.Af
  12487. this.ig = a.ig
  12488. }
  12489. },
  12490. qa: function (a, b) {
  12491. var c = { type: a, data: 'mouseout' === a ? this.Pga || null : b.su.hb, target: this.S, originEvent: b.vT }
  12492. this.Pga = 'mouseout' === a ? null : b.su.hb
  12493. this.S.q(a, c)
  12494. },
  12495. rc: function (a) {
  12496. this.qa(a.type, a)
  12497. },
  12498. zca: function () {
  12499. this.h('click', this.rc)
  12500. this.h('dblclick', this.rc)
  12501. this.h('mousedown', this.rc)
  12502. this.h('mouseup', this.rc)
  12503. this.h('mouseover', this.rc)
  12504. this.h('mouseout', this.rc)
  12505. this.h('touchstart', this.rc)
  12506. this.h('touchend', this.rc)
  12507. },
  12508. DCa: function () {
  12509. this.G('click', this.rc)
  12510. this.G('dblclick', this.rc)
  12511. this.G('mousedown', this.rc)
  12512. this.G('mouseup', this.rc)
  12513. this.G('mouseover', this.rc)
  12514. this.G('mouseout', this.rc)
  12515. this.G('touchstart', this.rc)
  12516. this.G('touchend', this.rc)
  12517. },
  12518. styleChanged: function () {
  12519. this.Cm = this.get('style')
  12520. this.vza()
  12521. this.set('display', 0)
  12522. },
  12523. y7: function (a) {
  12524. if (a) {
  12525. this.clear()
  12526. for (var b = 0; b < a.length; b += 1) {
  12527. var c = a[b].lnglat
  12528. a[b].lnglat = g.a.Ka(c)
  12529. c = this.map.Bb(c)
  12530. c = new g.ai({ name: 'point-' + g.a.yb(this), W: new g.Aa.Mg([c.x, c.y], !0) })
  12531. c.uo = this
  12532. c.hb = a[b]
  12533. this.OH(c)
  12534. }
  12535. }
  12536. },
  12537. bra: function (a) {
  12538. if ('geojson' === a) return new g.raa({ map: this.map })
  12539. if ('topjson' === a) return new g.fBa({ map: this.map })
  12540. if ('subway' === a) return new g.aBa({ map: this.map })
  12541. },
  12542. Iva: function (a) {
  12543. if (a) {
  12544. var b = [],
  12545. b = [],
  12546. c = {}
  12547. if (a.rules) {
  12548. for (var b = a.rules, d = 0, e = b.length; d < e; d += 1) {
  12549. for (var f = [], h = b[d].symbolizers, k = 0, l = h.length; k < l; k += 1)
  12550. h[k].fill && (f[k] = new g.style.Ng.cW(h[k].fill)), h[k].stroke && (f[k] = new g.style.Ng.HW(h[k].stroke))
  12551. h = f
  12552. b[d].dL = h
  12553. b[d] = new g.style.jba(b[d])
  12554. }
  12555. c.rules = b
  12556. }
  12557. if (a.symbolizers) {
  12558. b = a.symbolizers
  12559. a = 0
  12560. for (d = b.length; a < d; a += 1) b[a].fill && (b[a] = new g.style.Ng.cW(b[a].fill)), b[a].stroke && (b[a] = new g.style.Ng.HW(b[a].stroke))
  12561. c.dL = b
  12562. }
  12563. a = new g.lM(c)
  12564. } else a = new g.lM({})
  12565. this.set('style', a)
  12566. return a
  12567. },
  12568. zCa: function (a, b) {
  12569. var c = new g.jb.zb(a)
  12570. c.h(
  12571. 'complete',
  12572. function (c) {
  12573. c = this.ga[a] = this.bra(b).RT(c)
  12574. this.ay(c)
  12575. this.qa('complete')
  12576. },
  12577. this
  12578. )
  12579. c.h('error', this.mc, this)
  12580. },
  12581. jwa: function (a) {
  12582. 'px' === a.target.get('unit')
  12583. ? ((this.Af = Math.max(a.tl, this.Af)), (this.ig = Math.max(a.tl, this.ig)))
  12584. : a.tl > this.Ns && ((this.Ns = a.tl), (this.pz = this.Ns / this.map.D.mj.nq(20)))
  12585. },
  12586. OH: function (a) {
  12587. this.em.add(a)
  12588. if (!this.WC && !this.S.zj) {
  12589. if (0 === a.name.indexOf('circle') || 0 === a.name.indexOf('ellipse')) {
  12590. a.h('rad', this.jwa, this)
  12591. var b = a.get('radius')
  12592. b.length && (b = Math.max.apply(null, b))
  12593. 'px' === a.get('unit')
  12594. ? ((this.Af = Math.max(b, this.Af)), (this.ig = Math.max(b, this.ig)))
  12595. : this.Ns
  12596. ? b > this.Ns && ((this.Ns = b), (this.pz = this.Ns / this.map.D.mj.nq(20)))
  12597. : ((this.Ns = b), (this.pz = this.Ns / this.map.D.mj.nq(20)))
  12598. }
  12599. b = a.get('strokeWeight') || 0
  12600. if (!this.qz || b > this.qz) this.qz = b
  12601. }
  12602. this.Xxa || a.X('feature', this, !0)
  12603. },
  12604. ay: function (a) {
  12605. this.mm = !0
  12606. for (var b = 0, c = a.length; b < c; b += 1) this.OH(a[b])
  12607. },
  12608. clear: function () {
  12609. this.mm = !0
  12610. this.ls = []
  12611. this.em.clear()
  12612. this.set('display', 0)
  12613. },
  12614. xn: function (a) {
  12615. var b, c
  12616. b = this.em.xn([a[0] + g.a.Fa, a[1], a[2] + g.a.Fa, a[3]])
  12617. c = this.em.xn([a[0] - g.a.Fa, a[1], a[2] - g.a.Fa, a[3]])
  12618. a = this.em.xn(a)
  12619. return g.extend(a, g.extend(b, c))
  12620. },
  12621. zEa: function (a) {
  12622. var b,
  12623. c = this.get('style'),
  12624. d = a.ul
  12625. c instanceof g.lM || (c = this.Iva(c))
  12626. if (d && 0 < d.length) b = c.Q2(d, a)
  12627. else {
  12628. if (c.I8.length || c.ul.length) b = c.poa(a)
  12629. b || (b = a.Eqa())
  12630. }
  12631. return b
  12632. },
  12633. UR: function (a) {
  12634. function b(a, b) {
  12635. return a.fm - b.fm
  12636. }
  12637. var c = [],
  12638. d,
  12639. e,
  12640. f,
  12641. h,
  12642. k,
  12643. l = {}
  12644. for (d in a)
  12645. if (a.hasOwnProperty(d)) {
  12646. f = a[d]
  12647. h = f.get('zIndex')
  12648. for (e in l) if (l.hasOwnProperty(e) && ((k = c[l[e]][2]), k === h)) break
  12649. 'undefined' === typeof l[h] && (c.push([[], [], h]), (l[h] = c.length - 1))
  12650. h = c[l[h]]
  12651. h[0].push(f)
  12652. }
  12653. c.sort(this.Txa)
  12654. a = 0
  12655. for (d = c.length; a < d; a += 1) c[a][0].sort(b)
  12656. return c
  12657. },
  12658. featureChanged: function (a) {
  12659. this.mm = !0
  12660. var b = a.target,
  12661. c = b.ec()
  12662. 0 !== this.em.Jqa([g.a.yb(b)]).length && (this.em.remove(b, a.Lv), c && !a.Ioa && this.em.add(b))
  12663. },
  12664. k8: function (a) {
  12665. this.mm = !0
  12666. for (var b, c = 0, d = a.length; c < d; c += 1) (b = a[c]), (b.W.Lv = null), b.ss(!0), b.xl('feature')
  12667. },
  12668. DHa: function (a, b) {
  12669. return a[1].zIndex === b[1].zIndex ? g.a.yb(a[1]) - g.a.yb(b[1]) : a[1].zIndex - b[1].zIndex
  12670. },
  12671. Txa: function (a, b) {
  12672. return a[2] - b[2]
  12673. },
  12674. qHa: function (a) {
  12675. return a.FEa() === g.o.kBa.UAa
  12676. },
  12677. $l: function (a) {
  12678. return this.WC
  12679. ? new g.M.Ke.Gl(this, a)
  12680. : 'c' === this.map.get('overlayRender') && g.M.canvas.Gl
  12681. ? new g.M.canvas.Gl(this, a)
  12682. : g.M.be.Gl && 'd' === this.map.get('overlayRender')
  12683. ? new g.M.be.Gl(this, a)
  12684. : null
  12685. },
  12686. })
  12687. g.o.fd.Hb({
  12688. am: function (a) {
  12689. return this.WC ? new g.Ea.Ke.Gl(this, a) : this.S.zj ? new g.Ea.Saa(this, a) : new g.Ea.Gl(this, a)
  12690. },
  12691. })
  12692. g.o.laa = g.da.extend({
  12693. A: function () {
  12694. this.clear()
  12695. },
  12696. clear: function () {
  12697. this.rq = []
  12698. this.NT = new g.Kk()
  12699. },
  12700. add: function (a) {
  12701. var b = g.a.yb(a),
  12702. c = a.ec()
  12703. this.rq[b] || ((this.count += 1), (this.rq[b] = a), c && !g.I.gb(c.Kd(), [Infinity, Infinity, -Infinity, -Infinity]) && this.NT.Gs(c.Kd(), a))
  12704. },
  12705. tEa: function () {
  12706. return this.rq
  12707. },
  12708. xn: function (a) {
  12709. return this.NT.gxa(a)
  12710. },
  12711. Jqa: function (a) {
  12712. var b = a.length,
  12713. c = [],
  12714. d
  12715. for (d = 0; d < b; d += 1) this.rq[a[d]] && c.push(this.rq[a[d]])
  12716. return c
  12717. },
  12718. remove: function (a, b) {
  12719. var c = g.a.yb(a).toString(),
  12720. d = a.ec()
  12721. this.rq[c] && ((this.rq[c] = null), d && ((c = 'undefined' !== typeof b ? b : d.Kd()), this.NT.remove(c, a)))
  12722. },
  12723. })
  12724. g.Kk = g.da.extend({
  12725. A: function (a) {
  12726. this.z6 = 'undefined' !== typeof a ? a : 6
  12727. this.VJ = Math.floor(this.z6 / 2)
  12728. this.QK = { I: [Infinity, Infinity, -Infinity, -Infinity], Jb: [] }
  12729. this.count = 0
  12730. },
  12731. rna: function (a, b) {
  12732. var c = -1,
  12733. d = [],
  12734. e
  12735. d.push(b)
  12736. var f = b.Jb
  12737. do {
  12738. ;-1 !== c && (d.push(f[c]), (f = f[c].Jb), (c = -1))
  12739. for (var h = f.length - 1; 0 <= h; h -= 1) {
  12740. var k = f[h]
  12741. if ('undefined' !== typeof k.Ve) {
  12742. c = -1
  12743. break
  12744. }
  12745. var l = g.Kk.Tz(k.I[2] - k.I[0], k.I[3] - k.I[1], k.Jb.length + 1),
  12746. k = g.Kk.Tz(
  12747. (k.I[2] > a.I[2] ? k.I[2] : a.I[2]) - (k.I[0] < a.I[0] ? k.I[0] : a.I[0]),
  12748. (k.I[3] > a.I[3] ? k.I[3] : a.I[3]) - (k.I[1] < a.I[1] ? k.I[1] : a.I[1]),
  12749. k.Jb.length + 2
  12750. )
  12751. if (0 > c || Math.abs(k - l) < e) (e = Math.abs(k - l)), (c = h)
  12752. }
  12753. } while (-1 !== c)
  12754. return d
  12755. },
  12756. Gs: function (a, b, c) {
  12757. a = { I: a, Ve: b }
  12758. 'undefined' !== typeof c && (a.type = c)
  12759. this.x5(a, this.QK)
  12760. this.count += 1
  12761. },
  12762. x5: function (a, b) {
  12763. var c
  12764. if (0 === b.Jb.length) (b.I = g.I.cb(a.I)), b.Jb.push(a)
  12765. else {
  12766. var d = this.rna(a, b),
  12767. e = a
  12768. do {
  12769. if (c && 'undefined' !== typeof c.Jb && 0 === c.Jb.length) {
  12770. var f = c
  12771. c = d.pop()
  12772. for (var h = 0, k = c.Jb.length; h < k; h += 1)
  12773. if (c.Jb[h] === f || 0 === c.Jb[h].Jb.length) {
  12774. c.Jb.splice(h, 1)
  12775. break
  12776. }
  12777. } else c = d.pop()
  12778. f = e instanceof Array
  12779. if ('undefined' !== typeof e.Ve || 'undefined' !== typeof e.Jb || f) {
  12780. if (f) {
  12781. f = 0
  12782. for (h = e.length; f < h; f += 1) g.I.extend(c.I, e[f].I)
  12783. c.Jb = c.Jb.concat(e)
  12784. } else g.I.extend(c.I, e.I), c.Jb.push(e)
  12785. if (c.Jb.length <= this.z6)
  12786. if (0 < d.length) e = { I: g.I.cb(c.I) }
  12787. else break
  12788. else (e = f = this.lta(c.Jb)), 1 > d.length && (c.Jb.push(f[0]), d.push(c), (e = f[1]))
  12789. } else g.I.extend(c.I, e.I), (e = { I: g.I.cb(c.I) })
  12790. } while (0 < d.length)
  12791. }
  12792. },
  12793. lta: function (a) {
  12794. for (var b = this.Nva(a); 0 < a.length; ) this.Ova(a, b[0], b[1])
  12795. return b
  12796. },
  12797. Nva: function (a) {
  12798. for (var b = a.length - 1, c = 0, d = a.length - 1, e = 0, f = a.length - 2; 0 <= f; f -= 1) {
  12799. var h = a[f]
  12800. h.I[0] > a[c].I[0] ? (c = f) : h.I[2] < a[b].I[1] && (b = f)
  12801. h.I[1] > a[e].I[1] ? (e = f) : h.I[3] < a[d].I[3] && (d = f)
  12802. }
  12803. Math.abs(a[b].I[2] - a[c].I[0]) > Math.abs(a[d].I[3] - a[e].I[1])
  12804. ? b > c
  12805. ? ((b = a.splice(b, 1)[0]), (c = a.splice(c, 1)[0]))
  12806. : ((c = a.splice(c, 1)[0]), (b = a.splice(b, 1)[0]))
  12807. : d > e
  12808. ? ((b = a.splice(d, 1)[0]), (c = a.splice(e, 1)[0]))
  12809. : ((c = a.splice(e, 1)[0]), (b = a.splice(d, 1)[0]))
  12810. return [
  12811. { I: g.I.cb(b.I), Jb: [b] },
  12812. { I: g.I.cb(c.I), Jb: [c] },
  12813. ]
  12814. },
  12815. Ova: function (a, b, c) {
  12816. for (var d = g.Kk.Tz(b.I[2] - b.I[0], b.I[3] - b.I[1], b.Jb.length + 1), e = g.Kk.Tz(c.I[2] - c.I[0], c.I[3] - c.I[1], c.Jb.length + 1), f, h, k, l = a.length - 1; 0 <= l; l -= 1) {
  12817. var m = a[l],
  12818. n = [b.I[0] < m.I[0] ? b.I[0] : m.I[0], b.I[2] > m.I[2] ? b.I[2] : m.I[2], b.I[1] < m.I[1] ? b.I[1] : m.I[1], b.I[3] > m.I[3] ? b.I[3] : m.I[3]],
  12819. n = Math.abs(g.Kk.Tz(n[1] - n[0], n[3] - n[2], b.Jb.length + 2) - d),
  12820. m = [c.I[0] < m.I[0] ? c.I[0] : m.I[0], c.I[2] > m.I[2] ? c.I[2] : m.I[2], c.I[1] < m.I[1] ? c.I[1] : m.I[1], c.I[3] > m.I[3] ? c.I[3] : m.I[3]],
  12821. m = Math.abs(g.Kk.Tz(m[1] - m[0], m[3] - m[2], c.Jb.length + 2) - e),
  12822. p = Math.abs(m - n)
  12823. if (!h || !f || p < f) (h = l), (f = p), (k = m < n ? c : b)
  12824. }
  12825. d = a.splice(h, 1)[0]
  12826. b.Jb.length + a.length + 1 <= this.VJ
  12827. ? (b.Jb.push(d), g.I.extend(b.I, d.I))
  12828. : c.Jb.length + a.length + 1 <= this.VJ
  12829. ? (c.Jb.push(d), g.I.extend(c.I, d.I))
  12830. : (k.Jb.push(d), g.I.extend(k.I, d.I))
  12831. },
  12832. remove: function (a, b) {
  12833. var c = []
  12834. c[0] = { I: a }
  12835. ;(c[1] = b) || (c[1] = !1)
  12836. c[2] = this.QK
  12837. this.count -= 1
  12838. if (!1 === c[1]) {
  12839. var d = 0,
  12840. e = []
  12841. do (d = e.length), (e = e.concat(this.n8.apply(this, c)))
  12842. while (d !== e.length)
  12843. return e
  12844. }
  12845. return this.n8.apply(this, c)
  12846. },
  12847. n8: function (a, b, c) {
  12848. var d = [],
  12849. e = [],
  12850. f = []
  12851. if (!a || !g.I.Zg(a.I, c.I)) return f
  12852. a = g.I.cb(a.I)
  12853. var h
  12854. e.push(c.Jb.length)
  12855. d.push(c)
  12856. do {
  12857. c = d.pop()
  12858. var k = e.pop() - 1
  12859. if ('undefined' !== typeof b)
  12860. for (; 0 <= k; ) {
  12861. var l = c.Jb[k]
  12862. if (g.I.Zg(a, l.I))
  12863. if ((b && 'undefined' !== typeof l.Ve && l.Ve === b) || (!b && ('undefined' !== typeof l.Ve || g.I.N2(a, l.I)))) {
  12864. 'undefined' !== typeof l.Jb ? ((f = this.Nz(l, !0, [], l)), c.Jb.splice(k, 1)) : (f = c.Jb.splice(k, 1))
  12865. g.Kk.XT(c)
  12866. b = void 0
  12867. c.Jb.length < this.VJ && (h = this.Nz(c, !0, [], c))
  12868. break
  12869. } else 'undefined' !== typeof l.Jb && (e.push(k), d.push(c), (c = l), (k = l.Jb.length))
  12870. k -= 1
  12871. }
  12872. else if ('undefined' !== typeof h) {
  12873. c.Jb.splice(k + 1, 1)
  12874. 0 < c.Jb.length && g.Kk.XT(c)
  12875. k = 0
  12876. for (l = h.length; k < l; k += 1) this.x5(h[k], c)
  12877. h.length = 0
  12878. 0 === d.length && 1 >= c.Jb.length
  12879. ? ((h = this.Nz(c, !0, h, c)), (c.Jb.length = 0), d.push(c), e.push(1))
  12880. : 0 < d.length && c.Jb.length < this.VJ
  12881. ? ((h = this.Nz(c, !0, h, c)), (c.Jb.length = 0))
  12882. : (h = void 0)
  12883. } else g.Kk.XT(c)
  12884. } while (0 < d.length)
  12885. return f
  12886. },
  12887. search: function (a, b) {
  12888. return this.Nz({ I: a }, !1, [], this.QK, b)
  12889. },
  12890. gxa: function (a, b) {
  12891. return this.Nz({ I: a }, !1, [], this.QK, b, !0)
  12892. },
  12893. Nz: function (a, b, c, d, e, f) {
  12894. var h = {},
  12895. k = []
  12896. if (!g.I.Zg(a.I, d.I)) return f ? h : c
  12897. k.push(d.Jb)
  12898. do {
  12899. d = k.pop()
  12900. for (var l = d.length - 1; 0 <= l; l -= 1) {
  12901. var m = d[l]
  12902. if (g.I.Zg(a.I, m.I))
  12903. if ('undefined' !== typeof m.Jb) k.push(m.Jb)
  12904. else if ('undefined' !== typeof m.Ve)
  12905. if (b) c.push(m)
  12906. else if ('undefined' === typeof e || m.type === e) (m = m.Ve), 'undefined' !== typeof f ? (h[g.a.yb(m)] = m) : c.push(m)
  12907. }
  12908. } while (0 < k.length)
  12909. return 'undefined' !== typeof f ? h : c
  12910. },
  12911. })
  12912. g.Kk.XT = function (a) {
  12913. var b = a.Jb.length,
  12914. c = a.I
  12915. if (0 === b) g.I.empty(c)
  12916. else {
  12917. var d = a.Jb[0].I
  12918. c[0] = d[0]
  12919. c[2] = d[2]
  12920. c[1] = d[1]
  12921. c[3] = d[3]
  12922. for (d = 1; d < b; d += 1) g.I.extend(c, a.Jb[d].I)
  12923. }
  12924. }
  12925. g.Kk.Tz = function (a, b, c) {
  12926. var d = (a + b) / 2
  12927. a *= b
  12928. return (a * c) / (a / (d * d))
  12929. }
  12930. g.B = g.B || {}
  12931. g.B.Eh = g.da.extend({
  12932. ka: [g.va, g.Ze],
  12933. sva: ['position', 'altitude', 'visible', 'clickable', 'bubble'],
  12934. A: function (a, b) {
  12935. this.map = b
  12936. this.af(this.sva, a)
  12937. this.X('zIndex', a)
  12938. this.X('draggable', a)
  12939. g.l.Tf && this.Gca()
  12940. g.l.ba || this.GM()
  12941. this.Lb = a
  12942. this.Lb.B = this
  12943. },
  12944. draggableChanged: function () {
  12945. this.get('draggable') ? this.FM() : this.yO()
  12946. },
  12947. qa: function (a, b) {
  12948. var c
  12949. c = b ? { type: a, pixel: b.Cb, target: this.Lb, lnglat: b.Nf, originEvent: b.vT } : { type: a }
  12950. this.Lb && this.Lb.q(a, c)
  12951. },
  12952. rc: function (a) {
  12953. ;(('click' !== a.type && 'rightclick' !== a.type && 'dblclick' !== a.type && 'longclick' !== a.type) || this.get('clickable')) && this.qa(a.type, a)
  12954. },
  12955. EM: function () {
  12956. this.h('click', this.rc)
  12957. this.h('rightclick', this.rc)
  12958. this.h('longclick', this.rc)
  12959. this.h('longpress', this.rc)
  12960. this.h('dblclick', this.rc)
  12961. },
  12962. w1: function () {
  12963. this.G('click', this.rc)
  12964. this.G('rightclick', this.rc)
  12965. this.G('longclick', this.rc)
  12966. this.G('longpress', this.rc)
  12967. this.G('dblclick', this.rc)
  12968. },
  12969. GM: function () {
  12970. this.get('clickable') && this.EM()
  12971. this.h('mousemove', this.rc)
  12972. this.h('mouseout', this.rc)
  12973. this.h('mouseover', this.rc)
  12974. this.h('mousedown', this.rc)
  12975. this.h('mouseup', this.rc)
  12976. },
  12977. ECa: function () {
  12978. this.w1()
  12979. this.G('mousemove', this.rc)
  12980. this.G('mouseout', this.rc)
  12981. this.G('mouseover', this.rc)
  12982. this.G('mousedown', this.rc)
  12983. this.G('mouseup', this.rc)
  12984. },
  12985. clickableChanged: function () {
  12986. this.get('clickable') ? this.EM() : this.w1()
  12987. },
  12988. Gca: function () {
  12989. this.get('clickable') && this.EM()
  12990. this.h('touchstart', this.rc, this)
  12991. this.h('touchmove', this.rc, this)
  12992. this.h('touchend', this.rc, this)
  12993. },
  12994. FM: function () {
  12995. this.h('dragstart', this.eu)
  12996. this.h('dragging', this.cu)
  12997. this.h('dragend', this.du)
  12998. },
  12999. eu: function (a) {
  13000. this.map.WS(a)
  13001. this.fg = a.Cb
  13002. this.Z5 = a.Ta
  13003. this.Y5 = a.Nf
  13004. this.qa('dragstart', a)
  13005. },
  13006. cu: function (a) {
  13007. var b = this.map.D.view.type
  13008. if ('2D' == b) {
  13009. var c = a.Cb.ab(this.fg),
  13010. b = c.x,
  13011. c = c.y
  13012. this.fg = a.Cb
  13013. var d = (this.map.get('rotation') * Math.PI) / 180,
  13014. e = b * Math.cos(d) + Math.sin(d) * c,
  13015. b = -Math.sin(d) * b + Math.cos(d) * c
  13016. this.Zo(new g.H(e, b))
  13017. this.qa('dragging', a)
  13018. } else
  13019. '3D' == b &&
  13020. a.Ta &&
  13021. ((c = a.Cb.ab(this.fg)),
  13022. (b = c.x),
  13023. (c = c.y),
  13024. (e = a.Ta.ab(this.Z5)),
  13025. a.Nf.ab(this.Y5),
  13026. (this.fg = a.Cb),
  13027. 'function' === typeof this.rz && this.rz(b, c, e),
  13028. (this.Z5 = a.Ta),
  13029. (this.Y5 = a.Nf),
  13030. this.qa('dragging', a))
  13031. },
  13032. du: function (a) {
  13033. this.map.ww()
  13034. '3D' == this.map.D.view.type && this.Lb.reset && this.Lb.reset()
  13035. this.qa('dragend', a)
  13036. },
  13037. yO: function () {
  13038. this.G('dragstart', this.eu)
  13039. this.G('dragging', this.cu)
  13040. this.G('dragend', this.du)
  13041. },
  13042. yN: function (a) {
  13043. var b,
  13044. c,
  13045. d = []
  13046. if (a) for (b = 0, c = a.length; b < c; b += 1) d.push(this.zN(a[b]))
  13047. return d
  13048. },
  13049. zN: function (a) {
  13050. a = this.map.Bb(a)
  13051. return [a.x, a.y]
  13052. },
  13053. hg: function (a) {
  13054. var b = this.L.mb || this.map.get('centerCoords'),
  13055. c = Math.pow(2, 20 - this.map.get('zoom'))
  13056. return [(a[0] - b.x) / c, (a[1] - b.y) / c]
  13057. },
  13058. St: function (a, b) {
  13059. var c = this.map.D,
  13060. d = [],
  13061. e = !1
  13062. a[0] instanceof Array && 'number' !== typeof a[0][0] && (e = !0)
  13063. if (e)
  13064. for (var e = 0, f = a.length; e < f; e++) {
  13065. for (var h = [], k = 0, l = a[e].length; k < l; k++) {
  13066. var m = c.Bb(a[e][k])
  13067. m.x += b[0]
  13068. m.y += b[1]
  13069. h.push(c.Od(m))
  13070. }
  13071. d.push(h)
  13072. }
  13073. else for (e = 0, f = a.length; e < f; e++) (h = c.Bb(a[e])), (h.x += b[0]), (h.y += b[1]), d.push(c.Od(h))
  13074. return d
  13075. },
  13076. })
  13077. g.B.vb = g.B.Eh.extend({
  13078. fE: 'content contentDom icon opacity angle autoRotation offset textAlign verticalAlign shadow title label isTop shape topWhenClick topWhenMouseOver noSelect anchor'.split(' '),
  13079. dma: { AMAP_ANIMATION_NONE: !1, AMAP_ANIMATION_DROP: g.Kj.Easing.Bounce, AMAP_ANIMATION_BOUNCE: g.Kj.Easing.Cubic },
  13080. A: function (a, b) {
  13081. arguments.callee.ma.apply(this, arguments)
  13082. this.af(this.fE, a)
  13083. this.X('move', a)
  13084. this.Tma()
  13085. this.Fu()
  13086. this.set('AnimationOffset', new g.H(0, 0), !0)
  13087. this.X('raiseOnDrag', a)
  13088. this.X('animation', a)
  13089. },
  13090. QN: function (a, b, c) {
  13091. var d = this.get('animation')
  13092. if (d && 'AMAP_ANIMATION_NONE' !== d) {
  13093. var e = this
  13094. this.Gn = new g.Kj()
  13095. this.Gn.transition = function (c, h, k) {
  13096. if ('AMAP_ANIMATION_NONE' === d) return 0
  13097. if (a && 600 <= k) return e.Gn.stop(), 0
  13098. c = 0 === Math.floor(k / 600) % 2 ? 'Out' : 'In'
  13099. 'out' === b ? (c = 'Out') : 'in' === b && (c = 'In')
  13100. return e.dma[d][c]((k % 600) / 600)
  13101. }
  13102. c = c || 40
  13103. this.Gn.Jq = function (a) {
  13104. e.set('AnimationOffset', e.BO.add(new g.H(0, -1 * c * a)))
  13105. }
  13106. this.BO = new g.H(0, 0)
  13107. this.Gn.Nn()
  13108. }
  13109. },
  13110. AnimationOffsetChanged: function () {
  13111. this.positionChanged()
  13112. },
  13113. y0: function () {
  13114. this.Gn && (this.Gn.stop(), this.set('AnimationOffset', this.BO))
  13115. this.set('AnimationOffset', new g.H(0, -40))
  13116. if (this.nr) this.nr.set('position', this.get('position'))
  13117. else {
  13118. var a = new z.B.vb({
  13119. zIndex: this.get('zIndex') - 1,
  13120. icon: new z.B.ci({ image: g.r.Gb + '/theme/v1.3/dragCross.png', size: new g.xd(14, 11), innerOverlay: !0 }),
  13121. offset: new g.H(-4, -5),
  13122. position: this.get('position'),
  13123. innerOverlay: !0,
  13124. })
  13125. a.Da = !0
  13126. this.nr = a
  13127. }
  13128. this.nr.C = !0
  13129. this.nr.setMap(this.map.D)
  13130. this.nr.C = !1
  13131. },
  13132. kY: function () {
  13133. this.set('animation', 'AMAP_ANIMATION_DROP', !0)
  13134. this.QN(!0, 'in')
  13135. this.nr.C = !0
  13136. this.nr.C = !1
  13137. },
  13138. animationChanged: function () {
  13139. this.Gn && (this.Gn.stop(), this.set('AnimationOffset', this.BO), (this.Gn = null))
  13140. var a = this.get('animation')
  13141. a && 'AMAP_ANIMATION_NONE' !== a && ('AMAP_ANIMATION_DROP' === a ? this.QN(!0, 'in', 100) : this.QN())
  13142. },
  13143. rg: function () {
  13144. this.nr && this.nr.set('position', this.get('position'))
  13145. },
  13146. raiseOnDragChanged: function () {
  13147. this.get('raiseOnDrag')
  13148. ? (this.h('dragstart', this.y0, this), this.h('dragging', this.rg, this), this.h('dragend', this.kY, this))
  13149. : (this.G('dragstart', this.y0, this), this.G('dragging', this.rg, this), this.G('dragend', this.kY, this))
  13150. },
  13151. Zo: function (a) {
  13152. var b = this.get('position')
  13153. a = this.map.Bb(b).add(a.Nd(Math.pow(2, 20 - this.map.get('zoom'))))
  13154. b instanceof g.U ? this.set('position', this.map.Od(a)) : this.set('position', a)
  13155. },
  13156. rz: function (a, b) {
  13157. var c = this.get('position'),
  13158. d = this.get('altitude'),
  13159. c = this.map.Ls(c, d),
  13160. d = this.map.$p(new g.H(c.x + a, c.y + b), null, d)
  13161. this.set('position', d)
  13162. },
  13163. Tma: function () {
  13164. var a = this.get('content'),
  13165. b = this.get('shadow'),
  13166. c = this.get('offset'),
  13167. d = this.get('label'),
  13168. e,
  13169. f = this
  13170. e = a
  13171. ? this.d2(a, c)
  13172. : this.TP(this.get('icon'), function () {
  13173. f.L && f.L.fa ? (g.l.zi && g.a.iepngFix(e), f.offsetChanged(), f.rL()) : f.map && f.map.set('display')
  13174. })
  13175. this.set('contentDom', e, !0)
  13176. b && ((a = this.j2(b, c)), this.set('shadowDom', a, !0))
  13177. d && d.content && this.set('labelDom', this.UP(d.content), !0)
  13178. },
  13179. UP: function (a) {
  13180. var b = document.createElement('div')
  13181. b.className = 'amap-marker-label'
  13182. b.innerHTML = a
  13183. return b
  13184. },
  13185. Fu: function () {
  13186. var a = this.get('position')
  13187. if (this.map && a && !this.L) {
  13188. var b = this.map,
  13189. a = this.map.Bb(a),
  13190. a = (this.L = new g.ai({ name: 'marker-' + g.a.yb(this), map: b, W: new g.Aa.Mg([a.x, a.y]) }))
  13191. a.Tp = this.Lb.CLASS_NAME
  13192. a.uo = this
  13193. this.X('coords', a, !0)
  13194. a.af('offset textAlign verticalAlign isTop zIndex params noSelect'.split(' '), this)
  13195. }
  13196. },
  13197. getParams: function () {
  13198. return {
  13199. zIndex: this.get('zIndex'),
  13200. Rp: this.get('angle'),
  13201. Ug: this.get('contentDom'),
  13202. IJ: this.get('labelDom'),
  13203. e9: this.get('shadowDom'),
  13204. opacity: this.get('opacity'),
  13205. altitude: this.get('altitude'),
  13206. title: this.get('title'),
  13207. label: this.get('label'),
  13208. nF: this.get('AnimationOffset'),
  13209. verticalAlign: this.get('verticalAlign'),
  13210. textAlign: this.get('textAlign'),
  13211. offset: this.get('offset'),
  13212. S5: this.get('isTop'),
  13213. shape: this.get('shape'),
  13214. visible: this.get('visible') && !this.Lb.get('outOfZooms'),
  13215. anchor: this.get('anchor'),
  13216. }
  13217. },
  13218. offsetChanged: function () {
  13219. function a(a) {
  13220. var c = b.get('offset'),
  13221. f = b.get('AnimationOffset'),
  13222. h = b.get('verticalAlign'),
  13223. k = b.get('textAlign'),
  13224. l = Math.round(a.x) + c.x + f.x
  13225. a = Math.round(a.y) + c.y + f.y
  13226. var f = b.get('anchor'),
  13227. m = b.L.Wj || g.f.Lo(b.L.Ug)
  13228. b.L.Wj = m
  13229. c = m[0]
  13230. m = m[1]
  13231. f && ((f = f.split('-')), 2 === f.length ? ((k = f[1]), (h = f[0])) : 1 === f.length && 'center' === f[0] && ((k = 'center'), (h = 'middle')))
  13232. switch (k) {
  13233. case 'center':
  13234. l -= c / 2
  13235. break
  13236. case 'right':
  13237. l -= c
  13238. }
  13239. switch (h) {
  13240. case 'middle':
  13241. a -= m / 2
  13242. break
  13243. case 'bottom':
  13244. a -= m
  13245. }
  13246. b.L.fa.style.left = l + 'px'
  13247. b.L.fa.style.top = a + 'px'
  13248. }
  13249. if (this.map)
  13250. if (this.L && this.L.fa) {
  13251. var b = this,
  13252. c = this.map.D.view.type
  13253. '2D' == c
  13254. ? ((c = this.map.Bb(this.get('position'))),
  13255. (c = c.ab(this.L.Na).ld(Math.pow(2, 20 - this.map.get('zoom')))),
  13256. this.L.fa && (this.L.fa.LB && this.L.fa.parentNode !== this.L.fa.LB ? this.map.set('display') : a(c)))
  13257. : '3D' == c &&
  13258. ((c = this.get('position')),
  13259. (c = this.map.Ls(c, this.get('altitude'))),
  13260. this.L.fa && (this.L.fa.LB && this.L.fa.parentNode !== this.L.fa.LB ? this.map.set('display') : a(c)))
  13261. } else this.map.set('display')
  13262. },
  13263. altitudeChanged: function () {
  13264. this.offsetChanged()
  13265. },
  13266. positionChanged: function () {
  13267. if (this.L) {
  13268. var a = this.map.Bb(this.get('position'))
  13269. this.set('coords', [a.x, a.y])
  13270. this.map && ((this.L.cba = !0), this.offsetChanged())
  13271. }
  13272. },
  13273. anchorChanged: function () {
  13274. this.SF()
  13275. },
  13276. textAlignChanged: function () {
  13277. this.SF()
  13278. },
  13279. verticalAlignChanged: function () {
  13280. this.SF()
  13281. },
  13282. SF: function () {
  13283. this.L && ((this.L.Wj = null), (this.L.re = !0), this.map && ((this.map.td.lm = !0), this.map.set('display')))
  13284. },
  13285. contentChanged: function () {
  13286. if (this.L) {
  13287. this.L.Wj = null
  13288. this.map.td.lm = !0
  13289. ;-1 === g.a.indexOf(this.map.td.ah, this.L) && this.map.td.ah.push(this.L)
  13290. var a = this.get('contentDom')
  13291. this.L.fa && this.L.fa === a.parentNode && this.L.fa.removeChild(a)
  13292. var a = this.get('content'),
  13293. b = this.get('offset'),
  13294. a = this.d2(a, b)
  13295. this.set('contentDom', a)
  13296. this.L.fa ? (g.l.zi && g.a.iepngFix(a), this.L.fa.appendChild(a), (this.L.Ug = a), this.offsetChanged(), this.rL()) : this.map && this.map.set('display')
  13297. this.titleChanged()
  13298. }
  13299. },
  13300. iconChanged: function () {
  13301. if (this.L && !this.get('content')) {
  13302. this.L.Wj = null
  13303. this.map.td.lm = !0
  13304. ;-1 === g.a.indexOf(this.map.td.ah, this.L) && this.map.td.ah.push(this.L)
  13305. this.L.fa && this.get('contentDom') && this.L.fa.removeChild(this.get('contentDom'))
  13306. var a = this.get('icon')
  13307. this.get('offset')
  13308. var b = this,
  13309. c = this.TP(a, function () {
  13310. b.L && b.L.fa ? (g.l.zi && g.a.iepngFix(c), b.offsetChanged(), b.rL()) : b.map && b.map.set('display')
  13311. })
  13312. this.set('contentDom', c)
  13313. this.L.fa && (this.L.fa.appendChild(c), (this.L.Ug = c))
  13314. this.titleChanged()
  13315. }
  13316. },
  13317. shadowChanged: function () {
  13318. if (this.L) {
  13319. var a = this.get('shadowDom')
  13320. this.L.fa && a && a.parentNode === this.L.fa && this.L.fa.removeChild(a)
  13321. if ((a = this.get('shadow'))) {
  13322. var b = this.get('offset'),
  13323. a = this.j2(a, b)
  13324. this.set('shadowDom', a)
  13325. this.L.fa && this.L.fa.appendChild(a)
  13326. }
  13327. }
  13328. },
  13329. titleChanged: function () {
  13330. this.L && this.L.Ug && 'string' === typeof this.get('title') && this.L.Ug && this.get('title') && (this.L.Ug.title = this.get('title'))
  13331. },
  13332. rL: function (a, b) {
  13333. a = a || this.get('label')
  13334. b = b || this.get('labelDom')
  13335. if (a && b) {
  13336. var c = a.direction,
  13337. d = this.L.Wj || g.f.Lo(this.L.Ug),
  13338. e = d[0],
  13339. d = d[1],
  13340. f = g.f.Lo(b),
  13341. h = f[0],
  13342. k = f[1]
  13343. this.L.Cv = f
  13344. var l = (f = 0)
  13345. switch (c) {
  13346. case 'top':
  13347. f = -k
  13348. l = (e - h) / 2
  13349. break
  13350. case 'right':
  13351. f = (d - k) / 2
  13352. l = e
  13353. break
  13354. case 'bottom':
  13355. f = d
  13356. l = (e - h) / 2
  13357. break
  13358. case 'left':
  13359. f = (d - k) / 2
  13360. l = -h
  13361. break
  13362. case 'center':
  13363. ;(f = (d - k) / 2), (l = (e - h) / 2)
  13364. }
  13365. a.offset && ((f += a.offset.y), (l += a.offset.x))
  13366. b.style.top = f + 'px'
  13367. b.style.left = l + 'px'
  13368. }
  13369. },
  13370. labelChanged: function (a) {
  13371. a = a || this.get('label')
  13372. if (this.L && this.L.fa) {
  13373. this.L.Cv = null
  13374. var b = this.L.fa,
  13375. c = this.get('labelDom')
  13376. c && c.parentNode === b && b.removeChild(c)
  13377. a && a.content && ((c = ''), a.content && ((c = this.UP(a.content)), b.appendChild(c), this.rL(a, c)), this.set('labelDom', c))
  13378. } else a && a.content ? this.set('labelDom', this.UP(a.content), !0) : this.set('labelDom', null)
  13379. },
  13380. isTopChanged: function () {
  13381. var a = this.map.td.iL,
  13382. b = this.get('isTop'),
  13383. c = this.get('zIndex')
  13384. a
  13385. ? a === this
  13386. ? this.L && this.L.fa && ((this.L.fa.style.zIndex = b ? this.map.td.er + 10 : c), (this.map.td.iL = b ? this : null))
  13387. : (a.L && a.L.fa && (a.L.fa.style.zIndex = b ? a.get('zIndex') : this.map.td.er + 10),
  13388. this.L && this.L.fa && (this.L.fa.style.zIndex = b ? this.map.td.er + 10 : c),
  13389. (this.map.td.iL = b ? this : a))
  13390. : ((this.map.td.iL = this), this.L && this.L.fa && (this.L.fa.style.zIndex = b ? this.map.td.er + 10 : c))
  13391. },
  13392. visibleChanged: function () {
  13393. this.L && this.L.fa && (this.get('visible') && !this.Lb.get('outOfZooms') ? (this.L.fa.style.display = 'block') : (this.L.fa.style.display = 'none'))
  13394. },
  13395. jva: function () {
  13396. this.visibleChanged()
  13397. },
  13398. angleChanged: function () {
  13399. if (!g.l.Ue && this.L && this.L.fa) {
  13400. var a = this.L,
  13401. b = a.get('params'),
  13402. c = b.textAlign,
  13403. d = b.verticalAlign,
  13404. e = b.offset,
  13405. b = e.x,
  13406. e = e.y
  13407. this.SF()
  13408. if ('AMap.Text' == a.Tp) {
  13409. var e = (b = 0),
  13410. f = a.Wj || g.f.Lo(a.Ug),
  13411. h = f[0],
  13412. k = f[1]
  13413. a.Wj = f
  13414. switch (c) {
  13415. case 'center':
  13416. b = h / 2
  13417. break
  13418. case 'right':
  13419. b = h
  13420. }
  13421. switch (d) {
  13422. case 'middle':
  13423. e = k / 2
  13424. break
  13425. case 'bottom':
  13426. e = k
  13427. }
  13428. } else (b = -b), (e = -e)
  13429. g.f.rotate(this.L.fa, this.get('angle') || 0, { x: b, y: e })
  13430. }
  13431. },
  13432. zIndexChanged: function () {
  13433. var a = this.get('zIndex')
  13434. if (a > this.map.td.er) {
  13435. this.map.td.er = a
  13436. var b = this.map.td.iL
  13437. b && b.L && b.L.fa && (b.L.fa.style.zIndex = a + 10)
  13438. }
  13439. this.L && this.L.fa && (this.L.fa.style.zIndex = this.get('isTop') ? this.map.td.er + 10 : this.get('zIndex'))
  13440. },
  13441. opacityChanged: function () {
  13442. var a = this.get('contentDom'),
  13443. b = this.get('shadowDom')
  13444. a && g.f.Xq(a, this.get('opacity'))
  13445. b && g.f.Xq(b, this.get('opacity'))
  13446. },
  13447. d2: function (a) {
  13448. var b
  13449. b = document.createElement('div')
  13450. b.className = 'amap-marker-content'
  13451. 'string' !== typeof a ? b.appendChild(a) : ((b.innerHTML = a), b.childNodes[0] && !b.childNodes[0].style && (b.style['white-space'] = 'pre'))
  13452. g.f.Xq(b, this.get('opacity'))
  13453. return b
  13454. },
  13455. TP: function (a, b) {
  13456. var c,
  13457. d = 0,
  13458. e = 0,
  13459. f,
  13460. h,
  13461. k,
  13462. l,
  13463. m,
  13464. n
  13465. a
  13466. ? ('string' === typeof a
  13467. ? ((c = a), (n = !0))
  13468. : ((c = a.get('image')), (e = a.get('size')), (f = a.get('imageSize')), (d = e.width), (e = e.height), f && ((l = f.width), (m = f.height))),
  13469. (f = 'string' !== typeof a ? a.get('imageOffset') : { x: 0, y: 0 }))
  13470. : ((c = g.r.Hi + '/mark_bs.png'), (f = { x: 0, y: 0 }), (d = 19), (e = 33), (l = 19), (m = 33))
  13471. h = document.createElement('div')
  13472. h.className = 'amap-icon'
  13473. h.style.position = 'absolute'
  13474. h.style.overflow = n ? 'inherit' : 'hidden'
  13475. d && (h.style.width = d + 'px')
  13476. e && (h.style.height = e + 'px')
  13477. k = document.createElement('img')
  13478. l && m && ((k.style.width = l + 'px'), (k.style.height = m + 'px'))
  13479. k.style.top = f.y + 'px'
  13480. k.style.left = f.x + 'px'
  13481. h.appendChild(k)
  13482. g.f.Xq(g.l.Ue && n ? k : h, this.get('opacity'))
  13483. ;(d && e) || (h.yM = !1)
  13484. g.F.h(
  13485. k,
  13486. 'load',
  13487. function q() {
  13488. this.L && (this.L.Wj = null)
  13489. this.map && this.map.td && (this.map.td.lm = !0)
  13490. g.F.G(k, 'load', q, this)
  13491. if (this.L && this.L.fa) {
  13492. var a = this.get('labelDom')
  13493. a && this.L.fa.appendChild(a)
  13494. }
  13495. h.yM = !0
  13496. b && b()
  13497. },
  13498. this
  13499. )
  13500. k.src = c
  13501. return h
  13502. },
  13503. j2: function (a) {
  13504. a = this.TP(a)
  13505. a.style.zIndex = -1
  13506. return a
  13507. },
  13508. moveChanged: function () {
  13509. var a = this.get('move')
  13510. if (!1 === a) return this.dya()
  13511. void 0 !== a &&
  13512. ('pause' === a.action
  13513. ? this.Lva()
  13514. : '[object Array]' === Object.prototype.toString.call(a.Nf)
  13515. ? a.Nf &&
  13516. ('resume' === a.action && this.NG
  13517. ? this.moveTo(a.Nf[a.Nf.Kp || 0], a.speed, a.xb)
  13518. : (this.NG && this.q('movestop'), (a.Nf.Kp = 0), this.set('position', a.Nf[0]), this.nua(a.Nf, a.speed, a.xb, a.vna)))
  13519. : this.moveTo(a.Nf, a.speed, a.xb, !0))
  13520. },
  13521. moveTo: function (a, b, c, d) {
  13522. if (!(0 >= b)) {
  13523. var e = this.get('position')
  13524. a.ab(e)
  13525. var f = Math.round((a.Ge(e) / 1e3 / b) * 36e5)
  13526. if (0 === f) return this.q('moveend')
  13527. this.yh && (this.yh.stop(), (this.yh = null))
  13528. this.yh = new g.Kj(e, a)
  13529. c =
  13530. c ||
  13531. function (a) {
  13532. return a
  13533. }
  13534. this.yh.transition = function (a, b, d) {
  13535. if (d >= f) return b
  13536. var e = (b.R - a.R) * c(d / f) + a.R
  13537. a = (b.Q - a.Q) * c(d / f) + a.Q
  13538. return new g.U(e, a)
  13539. }
  13540. this.yh.Jq = function (b) {
  13541. this.set('position', b)
  13542. d && this.Lb.q('moving', { target: this.Lb, passedPath: [this.yh.start, this.get('position')] })
  13543. this.q('moving')
  13544. b.gb(a) && (this.yh && (this.yh.stop(), (this.yh = null)), this.Lb.q('moveend', { target: this.Lb }), this.q('moveend'))
  13545. }
  13546. this.get('autoRotation') && !g.l.Ue && ((b = '2D' == (this.map.D.view.type || '2D') ? this.Yea(e, a) : this.Zea(e, a)), this.set('angle', b))
  13547. this.yh.Nn(this)
  13548. }
  13549. },
  13550. dya: function () {
  13551. this.yh && (this.yh.stop(), (this.yh = null), this.q('movestop'))
  13552. },
  13553. Lva: function () {
  13554. this.yh && (this.yh.stop(), (this.yh = null), this.q('movepause'))
  13555. },
  13556. nua: function (a, b, c, d) {
  13557. function e() {
  13558. var b = a.slice(0, a.Kp || 0)
  13559. b.push(this.get('position'))
  13560. this.Lb.q('moving', { target: this.Lb, passedPath: b })
  13561. }
  13562. function f() {
  13563. a.Kp < a.length - 1 ? ((a.Kp += 1), this.moveTo(a[a.Kp], b, c)) : (this.qa('movealong'), d ? ((a.Kp = 0), this.set('position', a[0]), this.moveTo(a[a.Kp], b, c)) : this.q('movestop'))
  13564. }
  13565. var h = Math.min(a.Kp || 0, a.length - 1)
  13566. this.NG ||
  13567. ((this.NG = !0),
  13568. this.h('moving', e, this),
  13569. this.h('moveend', f, this),
  13570. this.h(
  13571. 'movestop',
  13572. function l() {
  13573. this.NG = !1
  13574. this.G('moveend', f, this)
  13575. this.G('moving', e, this)
  13576. this.G('movestop', l, this)
  13577. },
  13578. this
  13579. ))
  13580. this.moveTo(a[h], b, c)
  13581. },
  13582. Zea: function (a, b) {
  13583. var c = this.map,
  13584. d = c.Ls(a),
  13585. c = c.Ls(b),
  13586. e = 0
  13587. c.Ge(d)
  13588. var f = c.y - d.y,
  13589. h = c.x - d.x
  13590. 0 !== c.x - d.x
  13591. ? ((e = Math.atan((c.y - d.y) / (c.x - d.x))), 0 <= f && 0 > h ? (e = Math.PI + e) : 0 > f && 0 >= h ? (e = Math.PI + e) : 0 > f && 0 <= h && (e = 2 * Math.PI + e))
  13592. : (e = c.y > d.y ? Math.PI / 2 : (3 * Math.PI) / 2)
  13593. return g.a.wb((180 * e) / Math.PI, 1)
  13594. },
  13595. Yea: function (a, b) {
  13596. var c = this.map,
  13597. d = c.Bb(a),
  13598. c = c.Bb(b),
  13599. e = 0
  13600. c.Ge(d)
  13601. var f = c.y - d.y,
  13602. h = c.x - d.x
  13603. 0 !== c.x - d.x
  13604. ? ((e = Math.atan((c.y - d.y) / (c.x - d.x))), 0 <= f && 0 > h ? (e = Math.PI + e) : 0 > f && 0 >= h ? (e = Math.PI + e) : 0 > f && 0 <= h && (e = 2 * Math.PI + e))
  13605. : (e = c.y > d.y ? Math.PI / 2 : (3 * Math.PI) / 2)
  13606. return g.a.wb((180 * e) / Math.PI, 1)
  13607. },
  13608. })
  13609. g.B.Tn = g.B.Eh.extend({
  13610. A: function (a, b) {
  13611. arguments.callee.ma.apply(this, arguments)
  13612. this.X('items', a, !0)
  13613. this.X('content', a, !0)
  13614. this.X('resolution', b)
  13615. this.X('centerCoords', b)
  13616. this.Sp = a
  13617. },
  13618. Ts: function (a) {
  13619. this.Yg()
  13620. this.tt()
  13621. this.Em()
  13622. this.xl('resolution')
  13623. this.xl('centerCoords')
  13624. this.xl('render')
  13625. this.X('resolution', a)
  13626. this.X('centerCoords', a)
  13627. this.X('render', a)
  13628. this.map.h('movestart', this.$m, this)
  13629. this.map.h('mapmove', this.$m, this)
  13630. this.map.h('zoomstart', this.$m, this)
  13631. this.map.h('click', this.$m, this)
  13632. this.map.h('closeOverlays', this.$m, this)
  13633. this.map.h('rotate', this.$m, this)
  13634. },
  13635. $m: function () {
  13636. this.Sp.map && ((this.Sp.C = !0), this.Sp.close(), (this.Sp.C = !1))
  13637. },
  13638. mapChanged: function () {},
  13639. positionChanged: function () {
  13640. this.Em()
  13641. },
  13642. renderChanged: function () {
  13643. this.Em()
  13644. },
  13645. Yg: function () {
  13646. this.K && (this.K.parentNode && this.K.parentNode.removeChild(this.K), (this.K = null))
  13647. var a = g.f.create('div', null, 'amap-menu')
  13648. g.F.h(
  13649. a,
  13650. 'mousedown',
  13651. function (a) {
  13652. g.F.stopPropagation(a)
  13653. },
  13654. this
  13655. )
  13656. this.K = a
  13657. this.map.Xa.B.appendChild(this.K)
  13658. },
  13659. tt: function () {
  13660. var a = this,
  13661. b = this.K
  13662. b.innerHTML = ''
  13663. var c = this.get('content')
  13664. if ('object' === typeof c) b.appendChild(c)
  13665. else if ('string' === typeof c) b.innerHTML = c
  13666. else if ((c = this.get('items')) && c.length) {
  13667. var d = g.f.create('ul', b, 'amap-menu-outer')
  13668. c.sort(function (a, b) {
  13669. return isNaN(a.jK) || isNaN(b.jK) ? 0 : a.jK - b.jK
  13670. })
  13671. for (b = 0; b < c.length; b += 1)
  13672. (function (b) {
  13673. var c = b.Qn,
  13674. h = b.xb,
  13675. k = g.f.create('li', d)
  13676. k.innerHTML = c
  13677. g.F.h(
  13678. k,
  13679. 'click',
  13680. function () {
  13681. h.call(k)
  13682. a.Sp.C = !0
  13683. a.Sp.close()
  13684. a.Sp.C = !1
  13685. },
  13686. k
  13687. )
  13688. })(c[b])
  13689. } else this.K.innerHTML = ''
  13690. },
  13691. Em: function () {
  13692. var a = this.map,
  13693. b = this.K
  13694. a &&
  13695. b &&
  13696. (this.map.get('zoom'),
  13697. (b = this.get('position')),
  13698. (b = a.Ls(b)),
  13699. (a = b.y),
  13700. (b = b.x),
  13701. (this.K.style.right = ''),
  13702. (this.K.style.bottom = ''),
  13703. (this.K.style.left = b + 'px'),
  13704. (this.K.style.top = a + 'px'))
  13705. },
  13706. gg: function () {
  13707. this.K &&
  13708. (this.map.G('click', this.QBa, this),
  13709. this.map.Xa.B.removeChild(this.K),
  13710. (this.Sp.qi = !1),
  13711. (this.K = this.Sp.Ce.map = null),
  13712. this.map.G('movestart', this.$m, this),
  13713. this.map.G('zoomstart', this.$m, this),
  13714. this.map.G('click', this.$m, this),
  13715. this.map.G('closeOverlays', this.$m, this),
  13716. this.map.G('rotate', this.$m, this))
  13717. },
  13718. visibleChanged: function () {
  13719. this.K && (this.get('visible') ? (this.K.style.display = 'block') : (this.K.style.display = 'none'))
  13720. },
  13721. itemsChanged: function () {
  13722. this.K && this.tt()
  13723. },
  13724. })
  13725. g.B.Ye = g.B.Eh.extend({
  13726. A: function (a, b) {
  13727. arguments.callee.ma.apply(this, arguments)
  13728. this.af('content contentDom position contentU altitude isCustom autoMove showShadow closeWhenClickMap size offset anchor'.split(' '), a)
  13729. this.X('retainWhenClose', a, !0)
  13730. a.X('toBeClose', this)
  13731. this.rf = a
  13732. },
  13733. Ts: function (a) {
  13734. this.Yna || (this.Yg(), this.tt())
  13735. this.xl('resolution')
  13736. this.xl('centerCoords')
  13737. this.xl('render')
  13738. this.X('resolution', a)
  13739. this.X('centerCoords', a)
  13740. this.X('render', a)
  13741. this.map = a
  13742. a.Xa.B.appendChild(this.Qc)
  13743. this.zV()
  13744. this.Em()
  13745. this.nX()
  13746. this.Yna = !0
  13747. this.Nna()
  13748. this.Lb.q('onAdd', { type: 'onAdd', target: this.Lb })
  13749. },
  13750. Yg: function () {
  13751. var a = g.f.create('div')
  13752. a.className = 'amap-info'
  13753. var b = g.f.create('div', a, 'amap-info-shadowContainer'),
  13754. c = g.f.create('div', a),
  13755. d = this.get('anchor'),
  13756. e = 'amap-info-contentContainer'
  13757. d && (e = d + ' amap-info-contentContainer')
  13758. d = g.f.create('div', c, e)
  13759. a.style.position = 'absolute'
  13760. c.style.position = 'absolute'
  13761. c.style.bottom = '0px'
  13762. c.style.left = '0px'
  13763. b.style.position = 'absolute'
  13764. this.Qc = a
  13765. this.Oh = c
  13766. this.JU = b
  13767. this.ph = d
  13768. this.set('contentDom', this.ph, !0)
  13769. },
  13770. tt: function () {
  13771. var a = this.get('contentU')
  13772. if (a) {
  13773. var b = this.get('isCustom'),
  13774. c = this.ph,
  13775. d = this.JU
  13776. c.innerHTML = ''
  13777. var e = null
  13778. if (b) {
  13779. if ('string' === typeof a) c.innerHTML = a
  13780. else if (a instanceof Array) for (e = 0; e < a.length; e += 1) c.appendChild(a[e])
  13781. else c.appendChild(a)
  13782. e = c
  13783. d.parentNode && d.parentNode.removeChild(d)
  13784. } else {
  13785. e = 'amap-info-content amap-info-outer'
  13786. g.l.Ue && (e += ' amap-info-content-ie8')
  13787. e = this.ksa = d = g.f.create('div', c, e)
  13788. 'string' === typeof a ? (d.innerHTML = a) : d.appendChild(a)
  13789. this.$na = d
  13790. a = g.f.create('a', this.ksa, 'amap-info-close')
  13791. a.innerHTML = '\u00d7'
  13792. this.hQ = a
  13793. a.href = 'javascript: void(0)'
  13794. g.l.Tf &&
  13795. (g.F.h(
  13796. a,
  13797. 'touchstart',
  13798. function (a) {
  13799. g.F.stop(a)
  13800. },
  13801. this
  13802. ),
  13803. g.F.h(
  13804. a,
  13805. 'touchend',
  13806. function (a) {
  13807. g.F.stop(a)
  13808. this.rf.C = !0
  13809. this.rf.close()
  13810. this.rf.C = !1
  13811. },
  13812. this
  13813. ),
  13814. g.F.h(
  13815. a,
  13816. 'click',
  13817. function (a) {
  13818. g.F.stop(a)
  13819. this.rf.C = !0
  13820. this.rf.close()
  13821. this.rf.C = !1
  13822. },
  13823. this
  13824. ))
  13825. g.l.ba ||
  13826. (g.F.h(
  13827. a,
  13828. 'mousedown',
  13829. function (a) {
  13830. g.F.stop(a)
  13831. },
  13832. this
  13833. ),
  13834. g.F.h(
  13835. a,
  13836. 'click',
  13837. function (a) {
  13838. g.F.stop(a)
  13839. this.rf.C = !0
  13840. this.rf.close()
  13841. this.rf.C = !1
  13842. },
  13843. this
  13844. ))
  13845. if ((a = this.get('size', !0))) 0 !== a.width && (d.style.width = a.width + 'px'), 0 !== a.height && (d.style.height = a.height + 'px')
  13846. this.get('anchor')
  13847. g.f.create('div', c, g.l.Ue ? 'amap-info-sharp-old' : 'amap-info-sharp')
  13848. this.JU.style.display = 'block'
  13849. }
  13850. g.F.bya(e)
  13851. }
  13852. },
  13853. zV: function () {
  13854. var a = this.get('isCustom'),
  13855. b = this.get('showShadow')
  13856. if (!a && b) {
  13857. var a = this.JU,
  13858. b = g.f.lJ(this.ph),
  13859. c = b.height - 23,
  13860. d = b.width
  13861. if (g.l.zi || g.l.sv) (c = this.ph.childNodes[0].offsetHeight), (d = this.ph.childNodes[0].offsetWidth + 26)
  13862. b = 'background-image:url(' + g.r.Gb + (g.l.zi ? '/theme/v1.3/iws.gif);' : '/theme/v1.3/iws.png);')
  13863. a.innerHTML = ''
  13864. var e = [],
  13865. f
  13866. f = e[1] = {}
  13867. f.height = 0.5 * c + 4
  13868. f.width = d
  13869. f.offsetX = 400
  13870. f.offsetY = 16
  13871. f.top = -f.height - 10 - 15
  13872. f.left = 23
  13873. f = e[2] = {}
  13874. f.height = e[1].height
  13875. f.width = e[1].height
  13876. f.offsetX = 1075 - f.width
  13877. f.offsetY = e[1].offsetY
  13878. f.top = e[1].top
  13879. f.left = 23 + e[1].width
  13880. f = e[3] = {}
  13881. f.height = 10
  13882. f.width = 22
  13883. f.offsetX = 30
  13884. f.offsetY = 445
  13885. f.top = -25
  13886. f.left = 23 + (g.l.sv || g.l.zi ? 5 : 0)
  13887. f = e[4] = {}
  13888. f.height = 10
  13889. f.width = d / 2 - 15 - e[3].left - e[3].width
  13890. f.offsetX = 132
  13891. f.offsetY = 445
  13892. f.top = -25
  13893. f.left = e[3].left + e[3].width
  13894. f = e[5] = {}
  13895. f.height = 10
  13896. f.width = 70
  13897. f.offsetX = 80
  13898. f.offsetY = 445
  13899. f.top = -25
  13900. f.left = e[4].left + e[4].width
  13901. f = e[6] = {}
  13902. f.height = 10
  13903. f.width = d - e[5].left - e[5].width
  13904. f.offsetX = 132
  13905. f.offsetY = 445
  13906. f.top = -25
  13907. f.left = e[5].left + e[5].width
  13908. f = e[7] = {}
  13909. f.height = 10
  13910. f.width = 30
  13911. f.offsetX = 621
  13912. f.offsetY = 445
  13913. f.top = -25
  13914. f.left = d
  13915. f = e[8] = {}
  13916. f.height = 15
  13917. f.width = 70
  13918. f.offsetX = 47
  13919. f.offsetY = 470
  13920. f.top = -15
  13921. f.left = d / 2 - 15
  13922. for (c = 1; 8 >= c; c += 1)
  13923. (d = g.f.create('div', a)),
  13924. (f = []),
  13925. f.push('position:absolute;'),
  13926. f.push(b),
  13927. f.push('top:' + e[c].top + 'px;'),
  13928. f.push('left:' + e[c].left + 'px;'),
  13929. f.push('width:' + e[c].width + 'px;'),
  13930. f.push('height:' + e[c].height + 'px;'),
  13931. f.push('background-position:' + -e[c].offsetX + 'px ' + -e[c].offsetY + 'px;'),
  13932. (d.style.cssText = f.join(''))
  13933. }
  13934. },
  13935. hIa: function () {},
  13936. Em: function () {
  13937. var a = this.map,
  13938. b = this.Qc,
  13939. c = this.get('position'),
  13940. d = this.get('anchor')
  13941. if (a && b && c) {
  13942. a = a.Ls(c, this.get('altitude'))
  13943. d && (this.ph.className = d + ' amap-info-contentContainer')
  13944. var e = g.f.lJ(this.ph)
  13945. if (g.l.zi || g.l.sv) e.width = this.ph.childNodes[0].offsetWidth + 14
  13946. b = e.height
  13947. c = this.get('offset')
  13948. this.get('isCustom')
  13949. e = e.width
  13950. this.Qc.style.left = Math.round(a.x - e / 2 + (c.x || 0)) + 'px'
  13951. this.Qc.style.top = Math.round(a.y + (c.y || 0)) + 'px'
  13952. if (d) {
  13953. var f
  13954. 'center' == d ? ((d = 'center'), (f = 'middle')) : ((f = d.split('-')), (d = f[1]), (f = f[0]))
  13955. switch (f) {
  13956. case 'middle':
  13957. this.Qc.style.top = Math.round(a.y + b / 2 + (c.y || 0)) + 'px'
  13958. break
  13959. case 'top':
  13960. this.Qc.style.top = Math.round(a.y + b + (c.y || 0)) + 'px'
  13961. }
  13962. switch (d) {
  13963. case 'left':
  13964. this.Qc.style.left = Math.round(a.x + (c.x || 0)) + 'px'
  13965. break
  13966. case 'right':
  13967. this.Qc.style.left = Math.round(a.x - e + (c.x || 0)) + 'px'
  13968. }
  13969. }
  13970. d = this.$na
  13971. if (this.hQ && d.childNodes[0]) {
  13972. for (b = a = 0; b < d.childNodes.length; b += 1) a += d.childNodes[0].clientHeight || 0
  13973. a > (this.get('size').height || d.clientHeight) ? (this.hQ.style.right = '20px') : (this.hQ.style.right = '5px')
  13974. }
  13975. }
  13976. },
  13977. Bda: function () {
  13978. var a = new g.H(2 - this.ph.offsetWidth / 2, 2 - this.ph.offsetHeight),
  13979. b = this.get('offset') || new g.H(0, 0),
  13980. c = this.get('anchor')
  13981. if (c) {
  13982. var a = this.ph.offsetWidth,
  13983. d = this.ph.offsetHeight,
  13984. e,
  13985. f,
  13986. h = 2 - a / 2,
  13987. k = 2 - d
  13988. c && ((c = c.split('-')), 2 === c.length ? ((e = c[1]), (f = c[0])) : 1 === c.length && 'center' === c[0] && ((e = 'center'), (f = 'middle')))
  13989. switch (e) {
  13990. case 'left':
  13991. h = 2
  13992. break
  13993. case 'right':
  13994. h = -a
  13995. }
  13996. switch (f) {
  13997. case 'middle':
  13998. k = -d / 2
  13999. break
  14000. case 'top':
  14001. k = -2
  14002. }
  14003. a = new g.H(h, k)
  14004. }
  14005. this.get('isCustom') || (a = a.add(new g.H(0, -23)))
  14006. return a.add(b)
  14007. },
  14008. altitudeChanged: function () {
  14009. this.Em()
  14010. },
  14011. nX: function () {
  14012. if (this.get('position') && this.get('autoMove') && this.ph) {
  14013. for (
  14014. var a = this.map,
  14015. b = new g.xd(this.ph.offsetWidth, this.ph.offsetHeight),
  14016. c = a.Ls(this.get('position'), this.get('altitude')).add(this.Bda()),
  14017. d = c.add(b.PE()),
  14018. e = a.get('size'),
  14019. f = a.wqa(),
  14020. h = 0,
  14021. k = 0,
  14022. l = 0;
  14023. l < f.length;
  14024. l += 1
  14025. ) {
  14026. var m = f[l],
  14027. n = 0,
  14028. p = 0
  14029. 0 === m[1] && 0 === m[2]
  14030. ? ((n = m[3] - (c.x + h)), (p = m[0] - (c.y + k)), 0 < n && 0 < p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
  14031. : 0 === m[2] && 0 === m[3]
  14032. ? ((n = e.vj() - m[1] - (d.x + h)), (p = m[0] - (c.y + k)), 0 > n && 0 < p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
  14033. : 0 === m[0] && 0 === m[3]
  14034. ? ((n = e.vj() - m[1] - (d.x + h)), (p = e.tj() - m[2] - (d.y + k)), 0 > n && 0 > p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
  14035. : 0 === m[0] && 0 === m[1] && ((n = m[3] - (c.x + h)), (p = e.tj() - m[2] - (d.y + k)), 0 < n && 0 > p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
  14036. }
  14037. c = c.add(new g.H(h, k))
  14038. d = d.add(new g.H(h, k))
  14039. l = f = 0
  14040. 0 > c.x || b.vj() > e.vj() ? (f = 20 - c.x) : e.vj() < d.x && (f = e.vj() - d.x - 25)
  14041. 0 > c.y || b.tj() > e.tj() ? (l = 5 - c.y) : e.tj() < d.y && (l = e.tj() - d.y - 15)
  14042. f += h
  14043. l += k
  14044. if (f || l) (a.D.C = !0), a.D.panBy(f, l), (a.D.C = !1)
  14045. }
  14046. },
  14047. Nna: function () {
  14048. this.get('closeWhenClickMap') && (this.map.h('clickstart', this.A_, this, !1), this.map.h('clickend', this.z_, this, !1))
  14049. },
  14050. A_: function () {
  14051. this.rf.qi && ((this.rf.C = !0), this.rf.getIsOpen() && (this.rf.hL = !0), (this.rf.C = !1))
  14052. },
  14053. z_: function () {
  14054. this.rf.qi && (this.rf.hL && ((this.rf.C = !0), this.rf.close(), (this.rf.C = !1)), (this.rf.hL = !1))
  14055. },
  14056. gg: function () {
  14057. this.Qc &&
  14058. this.map &&
  14059. ((this.rf.hL = !1),
  14060. this.get('closeWhenClickMap') && (this.map.G('clickstart', this.A_, this), this.map.G('clickend', this.z_, this)),
  14061. this.get('retainWhenClose') ? this.map.Ml.appendChild(this.Qc) : (this.Qc.parentNode === this.map.Xa.B && this.map.Xa.B.removeChild(this.Qc), (this.rf.B = null)),
  14062. (this.map = null),
  14063. (this.rf.qi = !1),
  14064. this.Lb.q('close', { type: 'close', target: this.Lb }))
  14065. },
  14066. $Ba: function () {
  14067. if (!this.get('isCustom')) return this.ph.offsetWidth
  14068. for (var a = this.gi, b = a.firstChild, c = a.lastChild; b && c && b.style && c.style && b === c; ) (a = b), (b = a.firstChild), (c = a.lastChild)
  14069. a = g.f.Zc(a, 'width')
  14070. return (a = parseInt(a.replace('px', ''), 10))
  14071. },
  14072. renderChanged: function () {
  14073. this.Em()
  14074. },
  14075. positionChanged: function () {
  14076. this.map && this.Qc && (this.Em(), this.nX())
  14077. },
  14078. anchorChanged: function () {
  14079. this.positionChanged()
  14080. },
  14081. offsetChanged: function () {
  14082. this.positionChanged()
  14083. },
  14084. contentChanged: function () {
  14085. this.tt()
  14086. this.zV()
  14087. this.Em()
  14088. },
  14089. sizeChanged: function () {
  14090. this.tt()
  14091. this.zV()
  14092. this.Em()
  14093. },
  14094. })
  14095. g.Aa = {}
  14096. g.Aa.Oe = g.da.extend({
  14097. ka: [g.va, g.Ze],
  14098. A: function () {},
  14099. ev: function () {
  14100. var a = this.Kd()
  14101. a.oh || (a.oh = g.I.xi(a))
  14102. return a.oh
  14103. },
  14104. cb: function () {
  14105. return new this.A(this.za)
  14106. },
  14107. rR: function () {
  14108. return this.za
  14109. },
  14110. setCoords: function (a) {
  14111. this.S8(a)
  14112. },
  14113. S8: function (a) {
  14114. this.Lv = this.Kd()
  14115. this.xg = null
  14116. if (g.Aa.xp && this instanceof g.Aa.xp) {
  14117. var b = a.length
  14118. this.je = this.je.slice(0, b)
  14119. for (var c = 0; c < b; c += 1)
  14120. if (this.je[c]) this.je[c].S8(a[c])
  14121. else {
  14122. var d = new g.Aa.Dc(a[c])
  14123. this.je[c] = d
  14124. }
  14125. } else if (g.Aa.Dc && this instanceof g.Aa.Dc) {
  14126. b = a.length
  14127. this.Qf = Array(b)
  14128. for (var e, c = 0; c < b; c += 1)
  14129. if (((d = a[c]), (e = new g.Aa.SL(d)), (this.Qf[c] = e), 0 === c)) {
  14130. if (0 === d.length) break
  14131. e.uq(d) || d.reverse()
  14132. } else 0 !== d.length && e.uq(d) && d.reverse()
  14133. } else this.za = a
  14134. },
  14135. })
  14136. g.Aa.Pe = g.extend({}, { Uw: 'point', OL: 'linestring', oW: 'linearring', EF: 'polygon', $L: 'multipoint', ZL: 'multilinestring', AF: 'multipolygon', EAa: 'geometrycollection' })
  14137. g.ai = g.da.extend({
  14138. ka: [g.va, g.Ze],
  14139. A: function (a) {
  14140. a = a || {}
  14141. a.wB && (this.wB = a.wB)
  14142. a.SN && (this.SN = a.SN)
  14143. a.JZ && (this.JZ = a.JZ)
  14144. this.map = a.map
  14145. this.fm = a.tN || g.a.yb(this)
  14146. this.name = a.name || ''
  14147. this.re = !1
  14148. this.set('visible', !0, !0)
  14149. this.BU(a.W)
  14150. this.ul = a.dL
  14151. this.style = a.style
  14152. },
  14153. Soa: function () {
  14154. this.name = this.map = null
  14155. this.style = this.ul = this.uo = this.g6 = this.W = this.W.Oa = null
  14156. this.yl()
  14157. this.ti()
  14158. },
  14159. qra: function () {
  14160. return this.ul
  14161. },
  14162. Hxa: function (a) {
  14163. this.ul = a
  14164. this.zIndex = this.ul[0].Hk || this.zIndex
  14165. },
  14166. ec: function () {
  14167. return this.W
  14168. },
  14169. BU: function (a) {
  14170. a && ((this.W = a), this.X('coords', a, !0), this.wB || this.SN) && (a.X('radius', this), a.X('center', this), a.X('resolution', this), a.X('strokeWeight', this))
  14171. },
  14172. setStyle: function (a) {
  14173. this.Hxa(a)
  14174. this.ss()
  14175. },
  14176. coordsChanged: function () {
  14177. this.ss()
  14178. },
  14179. radiusChanged: function () {
  14180. this.W.Lv = this.W.Kd()
  14181. this.W.xg = null
  14182. this.ss()
  14183. },
  14184. ss: function (a) {
  14185. this.set('feature', { target: this, Ioa: a, Lv: this.W.Lv || this.W.Kd(), tua: this.W.Kd() })
  14186. this.W.Lv = this.W.Kd()
  14187. },
  14188. visibleChanged: function () {
  14189. this.ss()
  14190. },
  14191. LEa: function (a) {
  14192. for (var b = 0; b < this.ul.length; b += 1) {
  14193. var c = this.ul[b]
  14194. if (a.gb(c.ty(this))) return c
  14195. }
  14196. },
  14197. Eqa: function () {
  14198. var a = this.ec(),
  14199. b = []
  14200. a.yi() === g.Aa.Pe.EF || a.yi() === g.Aa.Pe.AF
  14201. ? b.push(new g.style.Be.Dc({ fillColor: '#78cdd1', le: 0.2, strokeColor: '#122e29', pb: 0.5, pc: 1 }))
  14202. : a.yi() === g.Aa.Pe.OL || a.yi() === g.Aa.Pe.oW || a.yi() === g.Aa.Pe.ZL
  14203. ? b.push(new g.style.Be.wp({ color: '#888888', width: 1, zIndex: 10 }))
  14204. : (a.yi() !== g.Aa.Pe.Uw && a.yi() !== g.Aa.Pe.$L) ||
  14205. b.push(new g.style.Be.ci({ url: g.r.Gb + '/theme/v1.3/markers/0.png', width: 36, height: 36, rotation: 0, yIa: -12, AIa: -36, zIndex: 100 }))
  14206. return b
  14207. },
  14208. })
  14209. g.ai.zAa = 'geometry'
  14210. g.Aa.Mg = g.Aa.Oe.extend({
  14211. A: function (a, b) {
  14212. this.za = a
  14213. this.zj = b
  14214. this.xg = null
  14215. },
  14216. Kd: function () {
  14217. if (!this.xg) {
  14218. var a = this.za[0],
  14219. b = this.za[1]
  14220. if (this.zj) this.xg = [a, b, a, b]
  14221. else {
  14222. var c = this.get('radius'),
  14223. d = this.get('resolution') * this.get('strokeWeight') || 0,
  14224. c = c ? c / Math.cos((Math.PI * this.get('center').Q) / 180) : 0
  14225. this.xg = [a - c - d, b - c - d, a + c + d, b + c + d]
  14226. }
  14227. }
  14228. return this.xg
  14229. },
  14230. yi: function () {
  14231. return g.Aa.Pe.Uw
  14232. },
  14233. })
  14234. g.M = { canvas: {}, be: {}, Xe: {}, Ke: {} }
  14235. g.M.Yb = g.da.extend({
  14236. ka: [g.va, g.Ze],
  14237. A: function (a, b) {
  14238. this.g = a
  14239. this.zj = a.S.zj
  14240. this.J = b
  14241. this.e = b.e
  14242. this.X('display', b)
  14243. },
  14244. $j: function () {
  14245. this.Iq && this.Iq()
  14246. this.yl()
  14247. this.e = this.J = this.g = null
  14248. },
  14249. mq: function (a, b, c, d) {
  14250. var e = this.zoom
  14251. c = []
  14252. var f = this.g
  14253. if (Math.floor(e) !== e) b(c, f)
  14254. else {
  14255. a = [a.x, a.y]
  14256. if (f.lm) {
  14257. for (var e = f.ah, h = !0, k = [], l = 0; l < e.length; l += 1) {
  14258. var m = e[l].Ug
  14259. if (m)
  14260. if (m.parentNode && m.parentNode.parentNode && this.J && m.parentNode.parentNode !== this.J.Ml && 'none' !== m.parentNode.style.display) {
  14261. var n = g.f.Lo(m),
  14262. m = n[0],
  14263. n = n[1]
  14264. if (m && n) {
  14265. var p = Math.max(Math.abs(e[l].get('offset').x), Math.abs(e[l].get('offset').y)) + Math.max(m, n)
  14266. f.Af = Math.max(f.Af, p)
  14267. f.ig = Math.max(f.ig, p)
  14268. e[l].width = m
  14269. e[l].height = n
  14270. } else (h = !1), k.push(e[l])
  14271. } else (h = !1), k.push(e[l])
  14272. }
  14273. h ? ((f.lm = !1), (f.ah = [])) : (f.ah = k)
  14274. }
  14275. e = Math.max(f.Af, f.qz || 0) * this.T
  14276. h = Math.max(f.ig, f.qz || 0) * this.T
  14277. k = 0
  14278. f.pz && (k = f.pz / Math.cos((Math.PI * this.e.get('center').Q) / 180))
  14279. h = Math.max(h, k || 0)
  14280. e = Math.max(e, k || 0)
  14281. if ((e = f.xn([a[0] - e, a[1] - h, a[0] + e, a[1] + h]))) {
  14282. for (var q in e)
  14283. if (e.hasOwnProperty(q) && ((h = e[q]), h.get('visible') && !h.get('noSelect')))
  14284. if (((k = h.ec()), k instanceof g.Aa.Mg))
  14285. if (this.zj) {
  14286. l = this.g.Cm
  14287. l instanceof Array && (l = 'number' === typeof h.hb.style && l[h.hb.style] ? l[h.hb.style] : l[0])
  14288. var m = l.size.width * this.T,
  14289. n = l.size.height * this.T,
  14290. p = l.anchor.x * this.T,
  14291. r = l.anchor.y * this.T,
  14292. k = k.za,
  14293. s = l.rotation_,
  14294. u = [a[0], a[1]]
  14295. if (s) {
  14296. var v = (a[0] - k[0]) / this.T,
  14297. w = (a[1] - k[1]) / this.T,
  14298. t = s,
  14299. s = Math.cos(-t),
  14300. x = Math.sin(-t),
  14301. t = v * s - w * x,
  14302. v = v * x + w * s
  14303. u[0] = k[0] + t * this.T
  14304. u[1] = k[1] + v * this.T
  14305. }
  14306. m = g.I.QP([
  14307. [u[0] - m + p, u[1] - n + r],
  14308. [u[0] + p, u[1] + r],
  14309. ])
  14310. g.I.Sd(m, k) && c.push(h)
  14311. } else if ('undefined' !== typeof k.get('radius'))
  14312. (l = k.za),
  14313. (l = new g.H(l[0], l[1])),
  14314. (m = new g.H(a[0], a[1])),
  14315. (k = k.get('radius')),
  14316. 'px' === h.get('unit')
  14317. ? m.Ge(l) / Math.pow(2, 20 - this.zoom) < k && c.push(h)
  14318. : m.Ge(l) * Math.cos((h.get('center').Q * Math.PI) / 180) <= (k / this.Cq) * Math.pow(2, 20 - this.zoom) && c.push(h)
  14319. else if ('AMap.Text' == h.Tp) (l = h.get('params')), l.visible && h.fa && g.f.HD(d, h.fa, 'amap-markers') && c.push(h)
  14320. else {
  14321. if (((l = h.get('params')), l.visible && h.fa))
  14322. if (l.shape)
  14323. for (
  14324. k = k.za,
  14325. s = l.Rp % 360,
  14326. u = [a[0], a[1]],
  14327. s &&
  14328. ((v = (a[0] - k[0]) / this.T),
  14329. (w = (a[1] - k[1]) / this.T),
  14330. (t = (Math.PI * s) / 180),
  14331. (s = Math.cos(-t)),
  14332. (x = Math.sin(-t)),
  14333. (t = v * s - w * x),
  14334. (v = v * x + w * s),
  14335. (u[0] = k[0] + t * this.T),
  14336. (u[1] = k[1] + v * this.T)),
  14337. m = h.width * this.T,
  14338. n = h.height * this.T,
  14339. p = l.offset.x * this.T,
  14340. r = l.offset.y * this.T,
  14341. m = g.I.QP([
  14342. [u[0] - m - p, u[1] - n - r],
  14343. [u[0] - p, u[1] - r],
  14344. ]),
  14345. k[0] instanceof Array || (k = [k]),
  14346. n = k.length - 1;
  14347. 0 <= n;
  14348. n -= 1
  14349. ) {
  14350. if (g.I.Sd(m, k[n])) {
  14351. l.shape ? this.GD(h, u, k) && c.push(h) : c.push(h)
  14352. break
  14353. }
  14354. }
  14355. else g.f.HD(d, h.fa, 'amap-markers') && c.push(h)
  14356. }
  14357. else k.Sd ? k.Sd(a) && c.push(h) : k.Cy && 1.8 * k.Cy(a) <= h.get('strokeWeight') * this.T && c.push(h)
  14358. this.zj
  14359. ? c.sort(function (a, b) {
  14360. return a.fm > b.fm ? -1 : 1
  14361. })
  14362. : c.sort(function (a, b) {
  14363. return a.get('isTop') ? -1 : b.get('isTop') ? 1 : a.get('zIndex') > b.get('zIndex') || (a.get('zIndex') === b.get('zIndex') && a.fm > b.fm) ? -1 : 1
  14364. })
  14365. b(c, f)
  14366. } else b([], f)
  14367. }
  14368. },
  14369. GD: function (a, b, c) {
  14370. var d = (b[0] - c[0][0]) / this.T
  14371. b = (b[1] - c[0][1]) / this.T
  14372. a = a.get('params')
  14373. c = a.offset
  14374. var d = [d - c.x, b - c.y],
  14375. e
  14376. a = a.shape
  14377. if ('circle' === a.w.type) {
  14378. if (((b = a.w.coords[0]), (c = a.w.coords[1]), Math.sqrt((d[0] - b) * (d[0] - b) + (d[1] - c) * (d[1] - c)) <= a.w.coords[2])) return !0
  14379. } else {
  14380. if ('poly' === a.w.type) return (e = a.w.coords), (e = this.gI(e)), g.wd.Sd(d, e)
  14381. if ('rect' === a.w.type)
  14382. return (
  14383. (e = a.w.coords),
  14384. (a = e[0]),
  14385. (b = e[1]),
  14386. (c = e[2]),
  14387. (e = e[3]),
  14388. (e = [
  14389. [a, b],
  14390. [c, b],
  14391. [c, e],
  14392. [a, e],
  14393. ]),
  14394. g.wd.Sd(d, e)
  14395. )
  14396. }
  14397. return !1
  14398. },
  14399. gI: function (a) {
  14400. for (var b = [], c = 0; c / 2 < a.length / 2; c += 2) b.push([a[c], a[c + 1]])
  14401. return b
  14402. },
  14403. g4: function (a, b, c, d, e, f, h) {
  14404. var k = ['position:absolute;']
  14405. k.push('top:' + Math.round(c) + 'px;')
  14406. k.push('left:' + Math.round(b) + 'px;')
  14407. k.push('width:' + Math.round(d) + 'px;')
  14408. k.push('height:' + Math.round(e) + 'px;')
  14409. 1 > f &&
  14410. ('opacity' in a.style
  14411. ? (k.push('opacity'), k.push(':'), k.push(f), k.push(';'))
  14412. : 8 <= document.documentMode
  14413. ? (k.push("-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(opacity="), k.push(Math.ceil(100 * f)), k.push(")';"))
  14414. : (k.push('filter:alpha(opacity='), k.push(Math.ceil(100 * f)), k.push(');')))
  14415. k.push('z-index:' + h + ';')
  14416. k.join('')
  14417. g.f.T8(a, k.join(''))
  14418. },
  14419. })
  14420. g.M.Rb = g.da.extend({
  14421. ka: [g.va, g.Ze],
  14422. A: function (a) {
  14423. this.e = a
  14424. this.type = '2D'
  14425. this.Gj = g.a.wb(a.get('zoom'), 1)
  14426. this.Ml = a.Ml
  14427. this.K = a.Xa.o
  14428. this.X('display', a)
  14429. this.X('rotateEnable', a)
  14430. this.X('style', a)
  14431. this.X('zoom', a)
  14432. this.X('hightlight', a)
  14433. },
  14434. jT: function (a) {
  14435. this.De = a || g.a.Xk('ff' + this.e.De.slice(1))
  14436. },
  14437. mq: function (a, b, c, d, e) {
  14438. function f(a, d) {
  14439. a.length && (k[g.a.indexOf(b, d)] = a)
  14440. l -= 1
  14441. 0 >= l && (c(k), (l = 0))
  14442. }
  14443. for (var h = b.length, k = [], l = 0, m, n = [], p = 0; p < h; p += 1)
  14444. (m = b[p]), (m instanceof g.o.fd || 'AMap.LabelLayer' === m.CLASS_NAME) && m.get('visible') && (n.push(this.zs(m)), (l += 1))
  14445. for (h = 0; h < n.length; h += 1) n[h].mq(a, f, d, e)
  14446. },
  14447. })
  14448. g.T2 = {
  14449. kD: function (a, b, c) {
  14450. for (var d = null, e = null, f = 0, h = 0, k = 0, l = b.length; k < l; k++) {
  14451. var m = b[k]
  14452. if (m < a) (d = c[m]), (f = m)
  14453. else {
  14454. e = c[m]
  14455. h = m
  14456. break
  14457. }
  14458. }
  14459. null === d ? ((d = e), (f = h)) : null === e && ((e = d), (h = f))
  14460. return { Gz: f, aK: h, Mq: d, WD: e }
  14461. },
  14462. tra: function (a) {
  14463. var b = this,
  14464. c = g.a,
  14465. d = [],
  14466. e = {}
  14467. c.Tb(a.nodes, function (a) {
  14468. !1 !== a.value && null !== a.value && ((e[a.zoom] = g.r.tc + '://' + a.value), d.push(a.zoom))
  14469. })
  14470. return function (a) {
  14471. a = c.wb(a, 1)
  14472. void 0 === e[a] && (e[a] = b.kD(a, d, e).Mq)
  14473. return e[a]
  14474. }
  14475. },
  14476. ara: function (a) {
  14477. var b = this,
  14478. c = g.a,
  14479. d = [],
  14480. e = {},
  14481. f = a.transitional
  14482. c.Tb(a.nodes, function (a) {
  14483. null !== a.value && !1 !== a.value && ((e[a.zoom] = a.value), d.push(a.zoom))
  14484. })
  14485. return function (a) {
  14486. a = c.wb(a, 1)
  14487. if (void 0 === e[a]) {
  14488. var k = b.kD(a, d, e)
  14489. e[a] = f && 'none' !== f && k.aK !== k.Gz && k.Mq !== k.WD ? c.F4(k.Mq, k.WD, (a - k.Gz) / (k.aK - k.Gz), f) : k.Mq
  14490. }
  14491. return e[a]
  14492. }
  14493. },
  14494. mqa: function (a) {
  14495. var b = this,
  14496. c = g.a,
  14497. d = [],
  14498. e = {}
  14499. c.Tb(a.nodes, function (a) {
  14500. null !== a.value && ((e[a.zoom] = a.value), d.push(a.zoom))
  14501. })
  14502. return function (a) {
  14503. a = c.wb(a, 1)
  14504. void 0 === e[a] && (e[a] = b.kD(a, d, e).Mq)
  14505. return e[a]
  14506. }
  14507. },
  14508. n4: function (a) {
  14509. var b = this,
  14510. c = g.a,
  14511. d = [],
  14512. e = {}
  14513. c.Tb(a.nodes, function (a) {
  14514. null !== a.value && ((e[a.zoom] = a.value), d.push(a.zoom))
  14515. })
  14516. return function (a) {
  14517. a = c.wb(a, 1)
  14518. void 0 === e[a] && (e[a] = b.kD(a, d, e).Mq)
  14519. return e[a]
  14520. }
  14521. },
  14522. uqa: function (a, b, c) {
  14523. var d = this,
  14524. e = g.a,
  14525. f = [],
  14526. h = {},
  14527. k = a.transitional
  14528. e.Tb(a.nodes, function (a) {
  14529. a.value && ((h[a.zoom] = e.gma(a.value, c ? 'rgba' : 'webgl')), f.push(a.zoom))
  14530. })
  14531. return function (a) {
  14532. var b = null
  14533. a = e.wb(a, 1)
  14534. if (void 0 === h[a]) {
  14535. var b = d.kD(a, f, h),
  14536. n = b.Mq
  14537. if (k && 'none' !== k && b.Gz !== b.aK && b.Mq.join('') !== b.WD.join(''))
  14538. for (var n = n.slice(0), p = (a - b.Gz) / (b.aK - b.Gz), q = 0, r = b.WD.length; q < r; q++) n[q] = e.F4(b.Mq[q], b.WD[q], p, k)
  14539. h[a] = n
  14540. }
  14541. b = h[a]
  14542. return c && b ? 'rgba(' + b.join(',') + ')' : b || ''
  14543. }
  14544. },
  14545. Bz: function (a, b, c, d) {
  14546. var e = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : {},
  14547. f
  14548. for (f in c)
  14549. if (c.hasOwnProperty(f)) {
  14550. var h = c[f]
  14551. void 0 !== b[h]
  14552. ? (b[h].nodes &&
  14553. 1 < b[h].nodes.length &&
  14554. b[h].nodes.sort(function (a, b) {
  14555. return a.zoom - b.zoom
  14556. }),
  14557. (a[f] = e.Csa ? { Xe: d.call(this, b[h], c[f]), canvas: d.call(this, b[h], c[f], !0) } : d.call(this, b[h], c[f])))
  14558. : e.Bsa && (a[f] = !0)
  14559. }
  14560. },
  14561. Rr: function (a, b) {
  14562. for (var c = [], d = 0, e = a.length; d < e; d += 2) {
  14563. var f = 0,
  14564. f = 'str' === b ? g.a.wb(parseInt(a.substr(d, 2), 16) / (0 === d ? 255 : 1), 3) : g.a.wb(parseInt(a.substr(d, 2), 16) / 255, 3)
  14565. c.push(f)
  14566. }
  14567. return c.length ? (c.push(c.shift()), 'str' === b ? 'rgba(' + c.join(',') + ')' : c) : ''
  14568. },
  14569. B7: function (a, b, c, d) {
  14570. var e = {},
  14571. f = { visible: 'visible', LU: 'showLabel', vk: 'showIcon' },
  14572. h = [
  14573. ['color', { color: 'color' }, { opacity: 'opacity' }],
  14574. ['fillColor', { fillColor: 'fillColor' }, { le: 'fillOpacity' }],
  14575. ['strokeColor', { strokeColor: 'strokeColor' }, { pb: 'strokeOpacity' }],
  14576. ['textFillColor', { nya: 'textFillColor' }, { oya: 'textFillOpacity' }],
  14577. ['textStrokeColor', { qya: 'textStrokeColor' }, { rya: 'textStrokeOpacity' }],
  14578. ['backgroundColor', { backgroundColor: 'backgroundColor' }, { pma: 'backgroundOpacity' }],
  14579. ],
  14580. k = { fontSize: 'fontSize' },
  14581. l = { fillWidth: 'fillWidth', strokeWidth: 'strokeWidth' }
  14582. if (a.styles) {
  14583. a = a.styles
  14584. this.Bz(e, a, f, this.mqa, { Bsa: !0 })
  14585. this.Bz(e, a, k, this.n4, { Qsa: !0 })
  14586. this.Bz(e, a, l, this.n4, { Qsa: !0 })
  14587. k = 0
  14588. for (l = h.length; k < l; k++) {
  14589. var m = h[k]
  14590. a[m[0]] ? this.Bz(e, a, m[1], this.uqa, { Csa: !0 }) : this.Bz(e, a, m[2], this.ara)
  14591. }
  14592. a.texture &&
  14593. (this.Bz(e, a, { Ja: 'texture' }, this.tra),
  14594. (e.ed = []),
  14595. g.a.Tb(a.texture.nodes, function (a) {
  14596. a.value && e.ed.push(g.r.tc + '://' + a.value)
  14597. }))
  14598. } else {
  14599. for (var n in f)
  14600. if (f.hasOwnProperty(n)) {
  14601. var p = f[n]
  14602. e[n] = void 0 === a[p] ? !0 : a[p]
  14603. }
  14604. f = 0
  14605. for (n = h.length; f < n; f++) {
  14606. var q = h[f],
  14607. p = g.a.keys(q[1])[0],
  14608. r = q[1][p],
  14609. s = g.a.keys(q[2])[0],
  14610. q = q[2][s]
  14611. void 0 !== a[r] ? (e[p] = { canvas: this.Rr(a[r], 'str'), Xe: this.Rr(a[r]) }) : (e[s] = a[q])
  14612. }
  14613. for (m in k) k.hasOwnProperty(m) && void 0 !== a[m] && (e[m] = a[m])
  14614. for (var u in l) l.hasOwnProperty(u) && void 0 !== a[u] && (e[u] = a[u])
  14615. a.texture && (e.Ja = g.r.tc + '://' + a.texture)
  14616. }
  14617. b[c] || (b[c] = {})
  14618. b[c][d] = e
  14619. },
  14620. AT: function (a, b) {
  14621. if (a)
  14622. for (var c = Object.keys(a), d = 0; d < c.length; d++)
  14623. for (var e = c[d], f = Object.keys(a[e]), h = 0; h < f.length; h++) {
  14624. var k = f[h]
  14625. a[e][k] && this.B7(a[e][k], b, e, k)
  14626. }
  14627. },
  14628. oGa: function (a, b, c, d) {
  14629. if (a)
  14630. for (var e in a)
  14631. if (a.hasOwnProperty(e) && g.a.jk(a[e], 'object')) {
  14632. var f = a[e]
  14633. console.log(e + '--')
  14634. var h = e
  14635. c && (h = c + ':' + e)
  14636. if (f.detailedType) this.B7(f, b, h), this.AT(f.detailedType, b, h, f)
  14637. else if (f.subType) this.AT(f.subType, b, h)
  14638. else if (void 0 !== f.code) for (var k in d) d.hasOwnProperty(k) && !g.a.ka(['isDetailed', 'detailedType', 'styles'], k) && void 0 === f[k] && void 0 !== d[k] && (f[k] = d[k])
  14639. }
  14640. },
  14641. wV: function (a) {
  14642. if (!this.cm || this.cm.zoom != a) {
  14643. var b = g.a.Ph,
  14644. c = { zoom: a },
  14645. d
  14646. for (d in this.ae)
  14647. if (this.ae.hasOwnProperty(d)) {
  14648. var e = this.ae[d]
  14649. c[d] = {}
  14650. for (var f in e)
  14651. if (e.hasOwnProperty(f)) {
  14652. var h = e[f]
  14653. if (h) {
  14654. c[d][f] = {}
  14655. for (var k in h)
  14656. h.hasOwnProperty(k) &&
  14657. void 0 !== h[k] &&
  14658. ((c[d][f][k] = {}),
  14659. h[k].Xe
  14660. ? (b(h[k].Xe) ? (c[d][f][k].Xe = h[k].Xe(a)) : (c[d][f][k].Xe = h[k].Xe),
  14661. b(h[k].canvas) ? (c[d][f][k].canvas = h[k].canvas(a)) : (c[d][f][k].canvas = h[k].canvas))
  14662. : b(h[k])
  14663. ? (c[d][f][k] = h[k](a))
  14664. : (c[d][f][k] = h[k]))
  14665. } else c[d][f] = h
  14666. }
  14667. }
  14668. this.cm = c
  14669. }
  14670. },
  14671. styleChanged: function () {
  14672. if (this.e.D.Bi) {
  14673. var a = this.get('style')
  14674. this.el.QA || ((this.el = g.a.bind(this.el, this)), (this.kq = g.a.bind(this.kq, this)), (this.el.QA = !0))
  14675. var b = g.a
  14676. if (a) {
  14677. var c = {}
  14678. this.AT(a, c)
  14679. this.ae = c
  14680. } else this.ae = null
  14681. var d, e, f, h, k
  14682. this.ae &&
  14683. ((d = this.ae[30001] && this.ae[30001][1]),
  14684. (e = this.ae[30001] && this.ae[30001][2]),
  14685. (f = this.ae['00001'] && this.ae['00001'][1]),
  14686. (h = this.ae['00001'] && this.ae['00001'][2]),
  14687. (k = this.ae[50001] && this.ae[50001][1]))
  14688. var l,
  14689. m,
  14690. n,
  14691. p,
  14692. q,
  14693. r,
  14694. a = this.Gj
  14695. if (d) {
  14696. c = 'rgba(0, 0, 0, 0)'
  14697. if (d.visible) {
  14698. var s = this.kq(b.B8(this.e.De.substr(1)), d.opacity, d.color, !0, a)
  14699. s && ((c = this.Bt(s, d.visible, 'rgba(0, 0, 0, 0)')), (s = this.el(b.op(this.e.De.substr(1)), d.opacity, d.color, !0, a)), (l = this.Bt(s, d.visible)))
  14700. }
  14701. this.e.Nu = c
  14702. } else this.e.Nu = ''
  14703. e && e.visible && ((m = this.el(b.op(this.e.KH.substr(1)), e.opacity, e.color, !0, a)), (m = this.Bt(m, e.visible)))
  14704. f && f.visible && ((n = this.el(b.op(this.e.ou.substr(1)), void 0, f.color, !0, a)), (n = this.Bt(n, f.visible)), (p = this.Bt(n, f.visible)))
  14705. h && h.visible && ((d = h.color), !d && f && f.color && (d = f.color), (p = this.el(b.op(this.e.ou.substr(1)), void 0, d, !0, a)), (p = this.Bt(p, h.visible)))
  14706. k &&
  14707. (k.visible
  14708. ? ((q = this.el(b.Xk(this.e.VF[0]), void 0, k.fillColor, !0, a)),
  14709. (q = this.Bt(q, k.visible)),
  14710. (r = this.el(b.Xk(this.e.VF[1]), void 0, k.strokeColor, !0, a)),
  14711. (r = this.Bt(r, k.visible)))
  14712. : ((q = [1, 1, 1, 0]), (r = [1, 1, 1, 0])))
  14713. this.jT && this.jT(l, m, n, [q, r], p)
  14714. this.r$ ? this.r$(this.ae) : this.set('display')
  14715. delete this.cm
  14716. this.wV(a)
  14717. }
  14718. },
  14719. Bt: function (a, b) {
  14720. var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : [0, 0, 0, 0],
  14721. d = g.a.Ph
  14722. if (d(a) && d(b)) {
  14723. var e = a
  14724. a = function (a) {
  14725. return b(a) ? e(a) : c
  14726. }
  14727. }
  14728. return a
  14729. },
  14730. kq: function (a, b, c, d, e) {
  14731. if (a) {
  14732. if (void 0 !== b) return (a = a.split(',')), (c = b), 'function' === typeof b && (c = b(e)), (a[3] = g.a.wb(c, 3) + ')'), a.join(',')
  14733. if (c) return 'function' === typeof c.canvas ? (d ? c.canvas : c.canvas(e)) : c.canvas
  14734. }
  14735. return a
  14736. },
  14737. el: function (a, b, c, d, e) {
  14738. if (a) {
  14739. if (b) return (c = b), 'function' === typeof b && (c = b(e)), [a[0], a[1], a[2], g.a.wb(c, 3)]
  14740. if (c) return 'function' === typeof c.Xe ? (d ? c.Xe : c.Xe(e)) : c.Xe
  14741. }
  14742. return a
  14743. },
  14744. qD: function (a, b) {
  14745. var c = this.ae
  14746. if (c && a) {
  14747. var d = a.split(':'),
  14748. e = d[0],
  14749. d = d[1]
  14750. if (c[e]) {
  14751. this.cm && b && b == this.cm.zoom && (c = this.cm)
  14752. if (c[e][d]) return c[e][d]
  14753. if (c[e].all) return c[e].all
  14754. }
  14755. }
  14756. },
  14757. JEa: function (a, b, c) {
  14758. var d = this.ae
  14759. if (d) {
  14760. this.cm && c && c == this.cm.zoom && (d = this.cm)
  14761. if (b || 0 === b) if ((b = d[a + ':' + b])) return b
  14762. return d[a]
  14763. }
  14764. },
  14765. im: function (a, b, c, d, e) {
  14766. var f = null,
  14767. h = a
  14768. d = d ? this.kq : this.el
  14769. e = e || this.Gj
  14770. if ((f = this.qD(b, e)))
  14771. if (('function' === typeof f.visible && !f.visible(e)) || !1 === f.visible) h = ''
  14772. else {
  14773. var h = 1,
  14774. k = ''
  14775. if (c)
  14776. if (f.fillColor || f.le) (h = f.le), (k = f.fillColor)
  14777. else {
  14778. if (f.color || f.opacity) (h = f.opacity), (k = f.color)
  14779. }
  14780. else if (f.strokeColor || f.pb) (h = f.pb), (k = f.strokeColor)
  14781. else if (f.color || f.opacity) (h = f.opacity), (k = f.color)
  14782. h = d(a, h, k, !1, e)
  14783. }
  14784. this.Cs === b && (h = this.gv(h || a))
  14785. return h
  14786. },
  14787. Zc: function (a, b, c) {
  14788. var d = this.ae
  14789. if (d) {
  14790. this.cm && c && c == this.cm.zoom && (d = this.cm)
  14791. if (b || 0 === b) if ((b = d[a + ':' + b])) return b
  14792. return d[a]
  14793. }
  14794. },
  14795. kv: function (a, b) {
  14796. var c = null
  14797. return (c = this.qD(a, b || this.Gj))
  14798. },
  14799. xs: function (a, b, c, d) {
  14800. c = c ? this.kq : this.el
  14801. var e = null,
  14802. f = a
  14803. d = d || this.Gj
  14804. ;(e = this.qD(b, d)) && (f = ('function' === typeof e.visible && !e.visible(d)) || !1 === e.visible ? '' : c(a, e.opacity, e.color, !1, d))
  14805. this.Cs === b && (f = this.gv(f || a))
  14806. return f
  14807. },
  14808. My: function (a, b, c, d, e, f) {
  14809. var h = a,
  14810. k = b,
  14811. l = c,
  14812. m = !0,
  14813. n = !0,
  14814. p,
  14815. q = 1
  14816. f = f || this.Gj
  14817. var r = this.qD(d, f)
  14818. r &&
  14819. (('function' === typeof r.visible && !r.visible(f)) || !1 === r.visible || ('function' === typeof r.LU && !r.LU(f)) || !1 === r.LU
  14820. ? ((n = m = !1), (h = k = l = ''))
  14821. : ((h = this.kq(a, r.oya, r.nya, !1, f)),
  14822. (k = this.kq(b, r.rya, r.qya, !1, f)),
  14823. (l = this.kq(c, r.pma, r.backgroundColor, !1, f)),
  14824. (m = 'function' === typeof r.vk ? r.vk(f) : r.vk),
  14825. r.fontSize && ((p = 'function' === typeof r.fontSize ? r.fontSize(f) : r.fontSize), (p = 12 <= p ? p : 12), (p = 22 >= p ? p : 22)),
  14826. p && g.l.Jc && (p *= 2)))
  14827. f = !1
  14828. this.Cs === d ? (f = !0) : void 0 !== e && this.Cs === d + '-' + e && (f = !0)
  14829. f && ((h = this.gv(h || a)), (k = this.gv(k || b)), (l = this.gv(l || c)), (q = 1 - 1.6 * this.yD), (n = m = !0))
  14830. return [h, k, l, m, n, q, p]
  14831. },
  14832. Ly: function (a, b, c, d, e) {
  14833. var f = null,
  14834. h = a,
  14835. k = b
  14836. d = d ? this.kq : this.el
  14837. var l = e || this.Gj
  14838. if ((f = this.qD(c, e)))
  14839. ('function' === typeof f.visible && !f.visible(l)) || !1 === f.visible ? (h = k = '') : ((h = d(a, f.le, f.fillColor, !1, l)), (k = d(b, f.pb, f.strokeColor, !1, l)))
  14840. this.Cs === c && ((b = k || b), (h = this.gv(h || a)), (k = this.gv(b)))
  14841. return [h, k]
  14842. },
  14843. }
  14844. g.M.Rb.Hb(g.T2)
  14845. g.M.canvas.Rb = g.M.Rb.extend({
  14846. A: function (a) {
  14847. arguments.callee.ma.apply(this, arguments)
  14848. },
  14849. zs: function (a) {
  14850. if (!a.M) {
  14851. var b = a.$l(this)
  14852. b && !b.koa && (a.M = b)
  14853. }
  14854. return a.M
  14855. },
  14856. oc: function (a) {
  14857. var b = this.e.N3()
  14858. b && this.VT !== b && this.e.D.Bi && (this.e.R8(b), (this.VT = b))
  14859. this.e.Xa.Xr.style.cssText = ''
  14860. var c = a.la,
  14861. b = a.P,
  14862. d = this.e.D.get('features'),
  14863. e = a.size.width,
  14864. f = a.size.height
  14865. this.Gj = 'vw' === this.e.D.Ce.baseRender ? g.a.wb(b.zoom, 1) : a.P.ne
  14866. this.T = b.T
  14867. if (!this.Na || 1e4 < Math.abs(b.lb.x - this.Na.x) / this.T || 1e4 < Math.abs(b.lb.y - this.Na.y) / this.T) this.Na = b.lb
  14868. this.Na.x - b.lb.x < -g.a.Fa / 2 ? (this.Na = new g.H(this.Na.x + g.a.Fa, this.Na.y)) : this.Na.x - b.lb.x > g.a.Fa / 2 && (this.Na = new g.H(this.Na.x - g.a.Fa, this.Na.y))
  14869. for (var h = 0; h < c.length; h += 1) {
  14870. var k = c[h],
  14871. l = this.zs(k),
  14872. m = c[h].me()
  14873. if (l && l.g)
  14874. if (!m.visible || k.XD || m.Ya[0] > b.zoom || m.Ya[1] < b.zoom || (k.ga && 0 === k.ga.length)) {
  14875. if ((l = l.uj()))
  14876. if (l.length) for (m = 0; m < l.length; m += 1) l[m].parentNode === this.K && this.K.removeChild(l[m])
  14877. else l.parentNode === this.K && this.K.removeChild(l)
  14878. } else if (this.GJ(k, d)) {
  14879. l.oc(a, m)
  14880. l.kk && (a.te = l.te)
  14881. var k = l.uj(),
  14882. n,
  14883. p,
  14884. q = l.transform
  14885. if (!q || !k || (l.Ci && !this.e.D.Ra)) c[h].yj && k.parentNode !== this.K && (this.K.appendChild(k), (c[h].Nb = k))
  14886. else {
  14887. c[h].Nb = k
  14888. k.length || ((k = [k]), (q = [q]))
  14889. for (var r = 0; r < k.length; r += 1)
  14890. if (((n = k[r]), (p = q[r]), !p.Zy)) {
  14891. var s = p.translate.x,
  14892. u = p.translate.y
  14893. c[h].FJ || ((s = g.a.wb(s, 2)), (u = g.a.wb(u, 2)))
  14894. var v = p.scale
  14895. 1e-5 > Math.abs(s) && (s = 0)
  14896. 1e-5 > Math.abs(u) && (u = 0)
  14897. var w = []
  14898. w.push('position:absolute')
  14899. w.push('z-index:' + (p.Hk || c[h].get('zIndex')))
  14900. c[h].WC
  14901. ? (w.push('top:' + Math.floor(f / 2 + u) + 'px'), w.push('left:' + Math.floor(e / 2 + s) + 'px'))
  14902. : n.L5
  14903. ? (w.push('height:' + n.height * v + 'px'),
  14904. w.push('width:' + n.width * v + 'px'),
  14905. w.push('top:' + (f / 2 - u * v) + 'px'),
  14906. w.push('left:' + (e / 2 - s * v) + 'px'))
  14907. : (1 !== v && (w.push(g.f.ot[g.f.pg] + '-origin:' + s + 'px ' + u + 'px'), w.push(g.f.ot[g.f.pg] + ':scale3d(' + v + ',' + v + ',1)')),
  14908. w.push('top:' + Math.floor(f / 2 - u) + 'px'),
  14909. w.push('left:' + Math.floor(e / 2 - s) + 'px'),
  14910. w.push('display:block'),
  14911. l.jl && (w.push('height:' + n.height + 'px'), w.push('width:' + n.width + 'px')))
  14912. l.FJ || 1 === m.opacity || 'number' !== typeof m.opacity || w.push(g.f.p4(n, m.opacity))
  14913. n.parentNode !== this.K && this.K.appendChild(n)
  14914. g.f.T8(n, w.join(';'))
  14915. }
  14916. }
  14917. }
  14918. }
  14919. a = this.e.Xa.Xr
  14920. k = this.e.Xa.o
  14921. c = this.e.Xa.B
  14922. g.f.pg && 'number' === typeof b.rotation && 0 !== b.rotation
  14923. ? ((a.style[g.f.pg + 'Origin'] = e / 2 + 'px ' + f / 2 + 'px'),
  14924. (a.style[g.f.pg] = 'rotate(' + b.rotation + 'deg)'),
  14925. (a.style.overflow = 'visible'),
  14926. (k.style.overflow = 'visible'),
  14927. (c.style.overflow = 'visible'))
  14928. : ((a.style.cssText = ''), (k.style.cssText = '-webkit-transform: translateZ(0);'), (c.style.cssText = ''))
  14929. this.e.ht = !1
  14930. },
  14931. GJ: function (a, b) {
  14932. if ('all' === b || void 0 === a.Wl) return !0
  14933. for (var c = 0, d = a.Wl.length; c < d; c++) if (g.a.ka(b, 'region' === a.Wl[c] ? 'bg' : a.Wl[c])) return !0
  14934. return !1
  14935. },
  14936. zoomChanged: function () {
  14937. var a = this.e.get('zoom')
  14938. this.Gj = 'vw' === this.e.D.Ce.baseRender ? g.a.wb(a, 1) : Math.round(a)
  14939. this.ae && this.wV(this.Gj)
  14940. },
  14941. })
  14942. g.M.Ti = g.M.Yb.extend({
  14943. A: function (a, b) {
  14944. arguments.callee.ma.apply(this, arguments)
  14945. this.X('reload', a, !0)
  14946. var c = a.S.get('cacheSize')
  14947. if (this.e && this.e.D) {
  14948. var d = this.e.D.get('tileCacheSize')
  14949. d && 0 < d && (c = d)
  14950. }
  14951. this.oa = new g.og(c)
  14952. var e = this
  14953. this.oa.iK.K1(function (a) {
  14954. e.bB(a)
  14955. })
  14956. this.oa.xC = function (a) {
  14957. return a.ob ? ((a.ob.Sg -= 1), 0 == a.ob.Sg && (a.zv = !1), delete a.ob, !0) : a.zv ? (a.Sg ? !1 : !0) : !0
  14958. }
  14959. this.gd = 1
  14960. this.$n = 50
  14961. this.pX = !0
  14962. this.g.oa = this.oa
  14963. this.pm = new g.wF(6, null, a.UQ)
  14964. new g.wF(5, null, a.UQ)
  14965. },
  14966. Iq: function () {
  14967. this.clear()
  14968. this.Ig = null
  14969. this.oa.clear()
  14970. this.oa.xC = null
  14971. this.oa = this.oa.iK.RF = null
  14972. this.Kc && (this.Kc.G('tiles', this.bE, this), this.Kc.G('ack', this.aE, this), this.Kc.G('disable', this.ZD, this), (this.Kc = null))
  14973. this.e.G('zoomend', this.ck, this)
  14974. this.e.G('moveend', this.ck, this)
  14975. },
  14976. reloadChanged: function () {
  14977. this.g && (this.g.Ra = !1)
  14978. this.oa.clear()
  14979. this.reload = !0
  14980. this.set('display')
  14981. },
  14982. xh: function (a, b, c) {
  14983. function d(b) {
  14984. a.loaded = !0
  14985. e.g && ((a.status = 'loaded'), (a.Ba = !0), (a.jd = b), e.set('display', 0), 'function' === typeof c && c())
  14986. }
  14987. var e = this
  14988. a.status = 'loading'
  14989. this.g.Bo &&
  14990. this.g.Bo.call(this, a, d, function () {
  14991. a.loaded = !0
  14992. e.g && ((a.status = 'loaded'), (a.Ba = !0), e.set('display', 0), 'function' === typeof c && c())
  14993. })
  14994. },
  14995. ZHa: function (a, b, c, d) {
  14996. var e = []
  14997. c = c || 18
  14998. b = Math.pow(2, b - c)
  14999. for (var f = 0; f < a.length; f += 1) {
  15000. var h = a[f].ta,
  15001. k = Math.floor(h.x / b),
  15002. h = Math.floor(h.y / b)
  15003. if (d) {
  15004. if (((k = c + '/' + k + '/' + h), (h = this.oa.get(k)) && 'loaded' == h.status)) continue
  15005. } else (h = new g.pr(c, k, h)), (k = h + ''), (h = new g.rb(h))
  15006. !e[k] && h && (e.push(h), (e[k] = 1))
  15007. }
  15008. return e
  15009. },
  15010. MI: function (a, b) {
  15011. var c = this,
  15012. d = this
  15013. if (this.g.uH) {
  15014. var e,
  15015. f,
  15016. h,
  15017. k,
  15018. l,
  15019. m,
  15020. n,
  15021. p = (function () {
  15022. var p = 0
  15023. for (e = a.length - 1; 0 <= e; e -= 1) (f = a[e]), (p += f.length)
  15024. if (0 == p) return b.call(c, a), { tL: void 0 }
  15025. d.eV = a
  15026. for (e = a.length - 1; 0 <= e; e -= 1)
  15027. for (f = a[e], h = [], k = [], f.WT = h, f.Kv = k, l = f.length - 1; 0 <= l; l -= 1)
  15028. (m = f[l]),
  15029. (n = m.ta),
  15030. c.g.e.Re.NE(
  15031. n.x,
  15032. n.y,
  15033. n.z,
  15034. (function () {
  15035. var c = l
  15036. return function (e) {
  15037. e ? h.push(f[c]) : k.push(f[c])
  15038. p -= 1
  15039. if (0 == p) {
  15040. for (e = a.length - 1; 0 <= e; e -= 1) {
  15041. var l = a[e]
  15042. a[e] = l.WT
  15043. if (l.Kv)
  15044. for (var m = l.Kv.length - 1; 0 <= m; m -= 1) {
  15045. var n = l.Kv[m]
  15046. n.status = 'loaded'
  15047. n.loaded = !0
  15048. n.Ba = !0
  15049. }
  15050. }
  15051. b.call(d, a)
  15052. }
  15053. }
  15054. })()
  15055. )
  15056. })()
  15057. if ('object' === typeof p) return p.tL
  15058. } else b.call(this, a)
  15059. },
  15060. qw: function (a, b, c) {
  15061. if ((a = this.oa.get(a + '/' + b + '/' + c))) {
  15062. if (a.zv) return a
  15063. if (a.ob) return a.ob
  15064. a.zv = !0
  15065. a.Sg = 0
  15066. return a
  15067. }
  15068. },
  15069. jJ: function (a) {
  15070. var b = a.ta
  15071. a = b.x
  15072. var c = b.y,
  15073. b = b.z,
  15074. d = Math.pow(2, b),
  15075. e = (a + d) % d,
  15076. f = e + d,
  15077. d = e - d,
  15078. h = null
  15079. e !== a && (h = this.qw(b, e, c))
  15080. h || d === a || (h = this.qw(b, d, c))
  15081. h || f === a || (h = this.qw(b, f, c))
  15082. return h
  15083. },
  15084. Fn: function (a) {
  15085. var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
  15086. if ((!this.kk || (!this.gf && !this.ge)) && a.length)
  15087. if (this.HK) this.ZJ = !0
  15088. else {
  15089. for (var c = a.length - 1; 0 <= c; c -= 1) {
  15090. var d = a[c]
  15091. if (d.length)
  15092. for (var e = Math.pow(2, 20 - d[0].ta.z), c = d.length - 1; 0 <= c; c--) {
  15093. var f = d[c],
  15094. h = f.ta
  15095. h.T = e
  15096. f.ra = {}
  15097. f.al = 0
  15098. if (10 > h.z) {
  15099. var k = this.jJ(f)
  15100. k && ((f.ob = k), (f.status = 'loaded'), (f.Ba = !0), (k.Sg += 1), (f.al = (h.x - k.ta.x) / Math.pow(2, h.z)), d.splice(c, 1), this.set('display', 0))
  15101. }
  15102. this.oa.set(f.key, f)
  15103. !b && f.Ie ? (f.Ie = !1) : (f.status = 'loading')
  15104. }
  15105. }
  15106. var l = this
  15107. this.MI(a, function (a) {
  15108. for (var c = a.length - 1; 0 <= c; c -= 1) {
  15109. var d = a[c]
  15110. if (d.length)
  15111. if (l.Di) {
  15112. if (l.e.hA) break
  15113. var e = d[0].ta.z
  15114. l.ew(d, l.jl ? 1 : 0)
  15115. for (var f = 0, h = 0; f < d.length; ) l.US(d.slice(10 * h, 10 * h + 10), e, b), (f += 10), (h += 1)
  15116. } else
  15117. for (
  15118. e = (function () {
  15119. var a = d.length
  15120. return function () {
  15121. --a
  15122. }
  15123. })(),
  15124. l.ew(d),
  15125. l.zq += d.length,
  15126. f = d.length - 1;
  15127. 0 <= f;
  15128. f -= 1
  15129. )
  15130. l.xh(d[f], l.pm, e)
  15131. }
  15132. })
  15133. }
  15134. },
  15135. Sy: function (a, b) {
  15136. var c = this.oa.get(a + '')
  15137. c || b || (c = new g.rb(a.cb()))
  15138. return c
  15139. },
  15140. ZK: function (a, b) {
  15141. return this.Dd * Math.pow(2, a - b)
  15142. },
  15143. bB: function (a) {
  15144. a.Is && this.pm.q2(a.Is)
  15145. a.MK = !1
  15146. a.loaded = !1
  15147. this.Kf && this.Kf(a)
  15148. },
  15149. qy: function (a, b) {
  15150. var c = (2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 0) || this.fb,
  15151. d = a.Vd.x,
  15152. e = a.Vd.y,
  15153. f = a.hc.x,
  15154. h = a.hc.y
  15155. new g.H(0, 0)
  15156. var k = this.ZK(20, c)
  15157. b && ((f = Math.max(b[0], f) - b[0]), (h = Math.max(b[1], h) - b[1]), (d = Math.min(b[2], d) - b[0]), (e = Math.min(b[3], e) - b[1]), new g.H(Math.floor(b[0] / k), Math.floor(b[1] / k)))
  15158. d /= k
  15159. e /= k
  15160. d = { Hc: 0 === d % 1 ? d - 1 : Math.floor(d), sc: 0 === e % 1 ? e - 1 : Math.floor(e), Ic: Math.floor(f / k), fc: Math.floor(h / k) }
  15161. d.rE = d.Hc - d.Ic + 1
  15162. d.zK = d.sc - d.fc + 1
  15163. d.z = c
  15164. d.T = this.T * Math.pow(2, this.zoom - c)
  15165. d.Uy = Math.ceil(d.rE / 2)
  15166. return d
  15167. },
  15168. uv: function (a, b, c) {
  15169. return b < a.Ic || b > a.Hc || c < a.fc || c > a.sc ? !1 : !0
  15170. },
  15171. ew: function (a, b) {
  15172. if (a.length) {
  15173. var c = this.lb.ld(this.Dd << (20 - a[0].ta.z)),
  15174. d = Math.floor(c.x),
  15175. e = Math.floor(c.y)
  15176. a.sort(function (a, c) {
  15177. var k = a.ta,
  15178. l = c.ta,
  15179. m = k.x - d,
  15180. k = k.y - e,
  15181. n = l.x - d,
  15182. l = l.y - e
  15183. return (b ? -1 : 1) * (n * n + l * l - (m * m + k * k))
  15184. })
  15185. }
  15186. },
  15187. clear: function () {
  15188. this.pm.clear()
  15189. },
  15190. gp: function (a, b) {
  15191. this.vg = !1
  15192. this.clear()
  15193. this.Zi = b.Zi
  15194. this.Yi = b.Yi
  15195. this.Dd = b.Dd
  15196. var c = a.P
  15197. this.Pf = b.Pf || a.P.Pf
  15198. this.oh = c.oh
  15199. this.size = a.size
  15200. this.rotation = c.rotation
  15201. this.lb = c.lb
  15202. this.Ha = a.P.Ha
  15203. this.Gf = a.Gf
  15204. this.ge = a.ge
  15205. this.gf = a.gf
  15206. this.zoom = c.zoom
  15207. this.ne = c.ne
  15208. this.fb = 'AMap.MapBox' == this.g.S.CLASS_NAME ? Math.max(2, this.ne - g.r.Vn) : !1 === this.Di && !this.g.nS && this.g.ja ? this.ne + 1 : this.ne
  15209. this.ff && this.fb > this.ff && (this.fb = this.ff)
  15210. this.Yo && this.fb < this.Yo && (this.fb = this.Yo)
  15211. this.T = c.T
  15212. this.Gg = c.Gg
  15213. c = a.P.Ha
  15214. this.pk = this.qy(c, b.I)
  15215. this.Gw = c.N$ ? this.qy(c.N$, b.I) : null
  15216. var c = this.pk,
  15217. d = this.Ha.F9,
  15218. e = null,
  15219. e = d < this.zoom && this.Gw ? this.Gw : c,
  15220. f = [],
  15221. h = [],
  15222. k,
  15223. l = [],
  15224. m = [],
  15225. n = [],
  15226. p = new g.pr(0, 0, 0),
  15227. q,
  15228. r = this.zoom,
  15229. m = this.Nk || '',
  15230. s = {},
  15231. u = {},
  15232. v,
  15233. w,
  15234. t,
  15235. x,
  15236. y,
  15237. E
  15238. this.ee = (1e6 * Math.random()) << 0
  15239. for (q = m.length - 1; 0 <= q; q -= 1)
  15240. if (((k = m[q]), !(k.hx < b.opacity)))
  15241. if (((p.z = k.ta.z), (p.x = k.ta.x), (p.y = k.ta.y), p.z === this.fb)) s[p + ''] |= 16
  15242. else if (p.z < this.fb) {
  15243. if (((s[p + ''] |= 64), this.Zi))
  15244. for (
  15245. x = this.fb - p.z,
  15246. v = Math.max(c.Ic, p.x << x),
  15247. r = Math.min(c.Hc, ((p.x + 1) << x) - 1),
  15248. w = Math.max(c.fc, p.y << x),
  15249. t = Math.min(c.sc, ((p.y + 1) << x) - 1),
  15250. p.z = this.fb,
  15251. x = v;
  15252. x <= r;
  15253. x += 1
  15254. )
  15255. for (p.x = x, y = w; y <= t; y += 1) (p.y = y), (E = p + ''), (s[E] |= 32), (u[E] = u[E] ? Math.max(k.ta.z, u[E]) : k.ta.z)
  15256. } else if (this.Yi)
  15257. for (v = 1; p.z >= this.fb; ) {
  15258. s[p + ''] |= v
  15259. v = p.x >> 1
  15260. w = p.y >> 1
  15261. r = v << 1
  15262. t = w << 1
  15263. k = 0
  15264. for (x = 2; 0 < x; x -= 1) for (p.x = r + x, y = 2; 0 < y; y -= 1) (p.y = t + y), s[p + ''] & 5 && (k += 1)
  15265. p.z -= 1
  15266. p.x = v
  15267. p.y = w
  15268. v = 4 === k ? 4 : 2
  15269. }
  15270. m = []
  15271. p.z = this.fb
  15272. q = !0
  15273. this.oa.C2()
  15274. for (x = e.Ic; x <= e.Hc; x += 1)
  15275. for (p.x = x, y = e.fc; y <= e.sc; y += 1)
  15276. (p.y = y),
  15277. (k = this.Sy(p)),
  15278. this.au(k),
  15279. (v = !1),
  15280. k.Ba
  15281. ? ((k.ee = this.ee), this.uv(c, x, y) && (m.push(k), this.Il && (k.gd !== this.gd || 1 > k.hx) && (v = !0)))
  15282. : ((q = !1), this.uv(c, x, y) && (v = !0), (k.status && !k.Ie) || this.ne !== d || (this.Gw && !this.uv(this.Gw, x, y)) || l.push(k)),
  15283. v && n.push(k)
  15284. q ? this.fD || (this.fD = !0) : (this.g.Ra = !1)
  15285. this.vg = q
  15286. m.length && this.fD && (f.push(m), (m.vg = q))
  15287. h.push(l)
  15288. e = !1
  15289. if (this.Yi) {
  15290. n = n.slice(0)
  15291. l = []
  15292. for (q = n.length - 1; 0 <= q; q -= 1) (k = n[q]), s[k.key] & 4 || l.push(k)
  15293. k = b.Ya[1]
  15294. for (r = this.fb + 1; n.length && r <= k; r += 1) {
  15295. m = []
  15296. d = n
  15297. n = []
  15298. p.z = r
  15299. for (q = d.length - 1; 0 <= q; q -= 1)
  15300. if (((x = d[q]), (v = s[x.key]), v & 7))
  15301. for (v = x.ta.x << 1, w = x.ta.y << 1, x = 1; 0 <= x; x -= 1)
  15302. for (p.x = v + x, y = 1; 0 <= y; y -= 1)
  15303. (p.y = w + y), (E = p + ''), (t = this.oa.pK(E)), s[E] & 5 && t && t.Ba ? ((t.IB = !0), (t.ee = this.ee), m.push(t), this.au(t)) : n.push(new g.rb(p.cb()))
  15304. m.length && ((e = !0), f.push(m))
  15305. }
  15306. n = l
  15307. }
  15308. if (!e && this.Zi)
  15309. for (x = !f.length || this.jl ? b.Ya[0] : Math.max(b.Ya[0], this.fb - 2), Math.max(x, this.fb - this.cha), r = this.fb - 1; n.length && r >= x; r -= 1) {
  15310. m = []
  15311. y = {}
  15312. d = n
  15313. n = []
  15314. for (q = d.length - 1; 0 <= q; q -= 1)
  15315. (k = d[q]),
  15316. (p.z = r),
  15317. (p.x = k.ta.x >> 1),
  15318. (p.y = k.ta.y >> 1),
  15319. (k = this.Sy(p)),
  15320. y[k.key] ||
  15321. ((y[k.key] = 1),
  15322. (v = !1),
  15323. k.Ba && (!this.cja || s[k.key] & 64)
  15324. ? ((p.x = Math.min(c.Hc, Math.max(c.Ic, p.x << (this.fb - r)))),
  15325. (p.y = Math.min(c.sc, Math.max(c.fc, p.y << (this.fb - r)))),
  15326. (p.z = this.fb),
  15327. (E = p + ''),
  15328. 'number' === typeof u[E] && k.ta.z > u[E] ? (v = !0) : (k.IB = !0),
  15329. (k.ee = this.ee),
  15330. m.push(k),
  15331. this.au(k))
  15332. : (v = !0),
  15333. v && n.push(k))
  15334. m.length && f.push(m)
  15335. }
  15336. this.eV = h
  15337. this.Fv = this.zq = 0
  15338. this.Fn(h)
  15339. this.Ig = f
  15340. this.g.set('tiles', f)
  15341. },
  15342. au: function (a) {
  15343. this.oa.t6(a.CFa)
  15344. },
  15345. HR: function (a, b) {
  15346. for (var c = [], d = this.e.D.getCoordsBoundByZoom(a), d = this.qy(d, b, a), e = d.Ic; e < d.Hc; e++)
  15347. for (var f = d.fc; f < d.sc; f++) {
  15348. var h = [a, e, f].join('/')
  15349. this.oa.Ld(h) || c.push(new g.rb(new g.pr(a, e, f), !0))
  15350. }
  15351. return c
  15352. },
  15353. MX: function () {
  15354. var a = this.e.D
  15355. return a.W7 && a.get('preloadMode') && 200 <= this.oa.Ip && this.g.S.vq() && 'stable' != this.Gf && this.Yx && this.Yx() && this.zoom !== this.fb
  15356. },
  15357. mE: function (a, b) {
  15358. var c = b.I,
  15359. d = b.Ya
  15360. if (this.MX() && this.fb >= d[0] + 1) {
  15361. var d = [],
  15362. e = null,
  15363. e = 'zoomOut' === this.Gf ? Math.floor(this.zoom) : Math.ceil(this.zoom),
  15364. e = this.HR(e, c)
  15365. e.length && d.push(e)
  15366. d.length && this.Fn(d, !0)
  15367. }
  15368. },
  15369. })
  15370. g.M.be.Ti = g.M.Ti.extend({
  15371. A: function (a, b) {
  15372. arguments.callee.ma.apply(this, arguments)
  15373. this.$n = 120
  15374. this.Di = !1
  15375. this.Yg()
  15376. this.ff = a.ff
  15377. this.Yo = a.Yo
  15378. },
  15379. uj: function () {
  15380. return this.Nb
  15381. },
  15382. Yg: function () {
  15383. this.Nb = document.createElement('div')
  15384. this.Nb.className = this.g.S.get('className') || 'amap-layer'
  15385. this.bv = document.createDocumentFragment()
  15386. },
  15387. Wv: function (a) {
  15388. var b = Math.pow(2, a.P.zoom - this.Cf),
  15389. c = a.P.lb.ab(this.Js).ld(this.wm)
  15390. this.transform = { translate: this.transform.translate.add(c), scale: b, rotate: 0 }
  15391. this.lb = a.P.lb
  15392. },
  15393. OP: function (a, b) {
  15394. this.Na = this.J.Na
  15395. this.Cf = this.ne
  15396. this.wm = this.Gg
  15397. this.ye = !1
  15398. this.currentTime = +new Date()
  15399. this.BV = b.BV
  15400. var c = this.pk
  15401. this.Il = this.$n && b.ZH
  15402. var d = this.Ig,
  15403. e = 256 * c.rE,
  15404. c = 256 * c.zK
  15405. this.ge = this.zoom << 0 !== this.zoom
  15406. var f = this.lb.ab(this.Na)
  15407. f.x < -g.a.Fa / 2 ? (f.x += g.a.Fa) : f.x > g.a.Fa / 2 && (f.x -= g.a.Fa)
  15408. this.aQ = f.ld(this.Gg)
  15409. return [d, e, c, b]
  15410. },
  15411. Lz: function (a, b) {
  15412. var c = this.OP(a, b)
  15413. this.at.apply(this, c)
  15414. this.Ne(a)
  15415. this.vg && !this.g.Ra && ((c = this.g), (c.Ra = !0), c.Jd ? c.qa('renderComplete') : ((c.Jd = !0), c.qa('complete')))
  15416. },
  15417. oc: function (a, b) {
  15418. this.sp = a.sp
  15419. this.gf = a.gf
  15420. this.gp(a, b)
  15421. this.Js && g.l.Xl && (a.ge || a.gf) ? this.Wv(a, b) : this.Lz(a, b)
  15422. this.Js = this.lb
  15423. this.ye && this.set('display', 0)
  15424. },
  15425. Vv: function () {
  15426. for (var a = this.Nb.childNodes, b = a.length - 1; 0 <= b; b -= 1) a[b] && a[b].gd !== this.gd && this.Nb.removeChild(a[b])
  15427. },
  15428. qE: function (a, b) {
  15429. return a.fc === b.fc && a.Ic === b.Ic && a.sc === b.sc && a.Hc === b.Hc
  15430. },
  15431. at: function (a) {
  15432. var b = this.gd
  15433. this.gd += 1
  15434. var c = !1,
  15435. d,
  15436. e,
  15437. f
  15438. e = !1
  15439. var h = [],
  15440. k,
  15441. l
  15442. for (d = a.length - 1; 0 <= d; d -= 1)
  15443. if (((f = a[d]), f.length)) {
  15444. e = f[0].ta.z
  15445. var m,
  15446. n,
  15447. p = this.ZK(this.ne, e),
  15448. q = !1
  15449. this.kk && f.vg && f[0].ta.z == this.fb && ((k = []), (l = []), (q = !0))
  15450. for (var r = f.length - 1; 0 <= r; r -= 1) {
  15451. n = f[r]
  15452. q && n.ga && (k.push.apply(k, n.ga), l.push(n.ta + ''))
  15453. this.mU(n)
  15454. if (this.Na === n.Na && n.Cf === this.Cf) {
  15455. var s = n.jd
  15456. if (s && s.parentNode === this.Nb && 1 === n.hx) {
  15457. h.push(n)
  15458. s.gd = this.gd
  15459. n.gd = this.gd
  15460. continue
  15461. }
  15462. }
  15463. n.Na = this.Na
  15464. n.Cf = this.Cf
  15465. m = n.ta
  15466. var c = !0,
  15467. u = new g.H((m.x << (20 - e)) * this.Dd, (m.y << (20 - e)) * this.Dd).ab(this.Na),
  15468. u = u.ld(this.Gg)
  15469. u.x = g.a.wb(u.x, 1)
  15470. u.y = g.a.wb(u.y, 1)
  15471. var v = 1
  15472. if (!n.lY || (this.pX && n.gd !== b)) n.lY = this.currentTime
  15473. this.Il && !n.IB
  15474. ? ((v = Math.max(0, Math.abs(m.z - this.zoom) - 1)), (v = Math.min(1, (this.currentTime - n.lY) / ((1 / Math.pow(1.32, v)) * this.$n))), 1 !== v && (this.ye = !0))
  15475. : (n.IB = !1)
  15476. n.gd = this.gd
  15477. n.hx = v
  15478. n.Ba
  15479. ? ((s = n.jd),
  15480. !s &&
  15481. n.ob &&
  15482. n.ob.jd &&
  15483. ('CANVAS' === n.ob.jd.tagName
  15484. ? ((s = document.createElement('canvas')),
  15485. (s.width = n.ob.jd.width),
  15486. (s.height = n.ob.jd.height),
  15487. s.getContext('2d').drawImage(n.ob.jd, 0, 0, s.width, s.height),
  15488. (n.jd = s),
  15489. (n.ob.Sg -= 1),
  15490. (n.ob = null),
  15491. (n.al = 0))
  15492. : 'IMG' === n.ob.jd.tagName
  15493. ? ((s = document.createElement('img')), (s.src = n.ob.jd.src), (n.jd = s), (n.ob.Sg -= 1), (n.ob = null), (n.al = 0))
  15494. : (s = n.ob.jd)),
  15495. 0 !== v &&
  15496. s &&
  15497. (this.g4(s, u.x, u.y, p, p, v, m.z),
  15498. s.parentNode !== this.Nb && (g.l.zi && 'overlayer' === this.g.get('type') && (s.style.display = 'none'), this.bv.appendChild(s)),
  15499. (s.gd = this.gd),
  15500. (n.ne = this.ne),
  15501. h.push(n)))
  15502. : (n.ee = null)
  15503. }
  15504. e = !0
  15505. }
  15506. this.kk && k && ((r = l.sort().join(';')), (k.HS = r), r !== this.te.HS && (this.te = k))
  15507. 1 < a.length && (this.ye = !0)
  15508. this.Nk = h
  15509. this.Vv()
  15510. this.Nb.appendChild(this.bv)
  15511. return c || !e
  15512. },
  15513. mU: function () {},
  15514. Ne: function () {
  15515. this.transform = { translate: this.aQ, scale: Math.pow(2, this.zoom - this.ne), rotate: 0 }
  15516. },
  15517. })
  15518. window.CanvasRenderingContext2D &&
  15519. ((window.CanvasRenderingContext2D.prototype.AQ = function (a, b, c, d, e) {
  15520. 'undefined' === typeof e && (e = [10, 10])
  15521. this.moveTo(a, b)
  15522. var f = c - a,
  15523. h = d - b,
  15524. k = Math.floor(Math.sqrt(f * f + h * h))
  15525. d = f / k
  15526. c = h / k
  15527. e.Eg = 0
  15528. for (var l = [], f = this.sI, m = 0, n = 0, p = !1, q = (h = 0); q < e.length; q += 1)
  15529. (e.Eg += e[q]), (l[q] = { aD: e[q] * d, bD: e[q] * c, ez: (h += e[q]) }), (f -= e[q]), 0 > f && !p && ((m = q), (n = -f), (p = !0))
  15530. for (p = 0; n + p <= k; )
  15531. n < e[m] ? ((f = n * d), (h = n * c)) : ((f = l[m].aD), (h = l[m].bD)),
  15532. (a += f),
  15533. (b += h),
  15534. this.HE ? this.moveTo(a, b) : this.lineTo(a, b),
  15535. (p += n),
  15536. (this.HE = !this.HE),
  15537. (n = e[(m + 1) % e.length]),
  15538. (m = (m + 1) % e.length)
  15539. k -= p
  15540. a += k * d
  15541. b += k * c
  15542. this.HE ? this.moveTo(a, b) : this.lineTo(a, b)
  15543. this.sI = (this.sI + p + k) % e.Eg
  15544. }),
  15545. (window.CanvasRenderingContext2D.prototype.yoa = function (a, b, c, d) {
  15546. 'undefined' === typeof d && (d = [10, 10])
  15547. var e = 2 * Math.PI * c,
  15548. f = 0 >= d ? e : Math.round(e / (d[0] + d[1])),
  15549. h = ((d[0] + d[1]) / e) * 2 * Math.PI
  15550. d = (d[0] / e) * 2 * Math.PI
  15551. for (e = 0; e < f; e += 1) this.beginPath(), this.arc(a, b, c, e * h, e * h + d), this.stroke()
  15552. }))
  15553. g.M.Ke.Gl = g.M.Ti.extend({
  15554. A: function (a, b) {
  15555. arguments.callee.ma.apply(this, arguments)
  15556. this.Yg()
  15557. },
  15558. LR: function () {
  15559. return this.Za.WU
  15560. },
  15561. uj: function () {
  15562. return this.Nb
  15563. },
  15564. Yg: function () {
  15565. this.Nb = document.createElement('div')
  15566. this.Nb.className = 'amap-markers'
  15567. this.Za = new g.M.Ke.fd(this.Nb)
  15568. this.Za.g = this.g
  15569. this.J.K.appendChild(this.Nb)
  15570. },
  15571. ut: function (a, b) {
  15572. this.bv = b.bv
  15573. this.hz = b
  15574. this.Pf = a.P.Pf
  15575. this.T = a.P.T
  15576. this.zoom = a.P.zoom
  15577. this.size = a.size
  15578. this.Ha = a.P.Ha
  15579. this.Cq = a.T
  15580. this.mb = a.P.lb
  15581. this.oh = a.P.oh
  15582. var c = !1
  15583. if (!this.Na || 500 < Math.abs(this.mb.x - this.Na.x) / this.T || 500 < Math.abs(this.mb.y - this.Na.y) / this.T) c = !0
  15584. if (c || this.zoom << 0 !== this.zoom || this.Cf !== this.zoom) (this.Na = this.mb), (this.Cf = this.zoom)
  15585. },
  15586. jv: function (a) {
  15587. var b = a.P.Ha.Ac.y * this.T
  15588. a = a.P.Ha.Ac.x * this.T
  15589. return [this.mb.x - a, this.mb.y - b, this.mb.x + a, this.mb.y + b]
  15590. },
  15591. Vv: function () {
  15592. if (this.Sh && this.Sh)
  15593. for (var a in this.Sh)
  15594. if (this.Sh.hasOwnProperty(a)) {
  15595. var b = this.Sh[a]
  15596. b.ee !== this.ee && b.fa && this.J.Ml.appendChild(b.fa)
  15597. }
  15598. },
  15599. oc: function (a, b) {
  15600. this.ee = (1e6 * Math.random()) << 0
  15601. this.ut(a, b)
  15602. this.P = a.P
  15603. this.size = a.size
  15604. var c = this.g
  15605. this.Dd = 256
  15606. var d, e
  15607. e = this.jv(a)
  15608. var f = 0
  15609. c.lm && (f = 50 * this.T)
  15610. e[0] -= this.g.Af * this.T + f
  15611. e[1] -= this.g.ig * this.T + f
  15612. e[2] += this.g.Af * this.T + f
  15613. e[3] += this.g.ig * this.T + f
  15614. c = c.xn(e)
  15615. for (d in c) c.hasOwnProperty(d) && ((c[d].ee = this.ee), (c[d].g6 = this))
  15616. this.Vv(c)
  15617. this.ut.call(this.Za, a, b)
  15618. this.Za.wE(c)
  15619. this.Sh = c
  15620. this.Ne(a)
  15621. },
  15622. Ne: function () {
  15623. var a = Math.pow(2, this.zoom - this.ne)
  15624. this.transform = { translate: this.Na.ab(this.mb).ld(this.T), scale: a, rotate: 0 }
  15625. },
  15626. })
  15627. g.M.Ke.fd = g.da.extend({
  15628. A: function (a) {
  15629. this.pl = a
  15630. },
  15631. wE: function (a, b) {
  15632. var c = document.createDocumentFragment(),
  15633. d = b && b.zS ? null : {},
  15634. e = !0,
  15635. f
  15636. for (f in a)
  15637. if (a.hasOwnProperty(f)) {
  15638. var h = a[f],
  15639. k,
  15640. l = h.get('params')
  15641. if (h.fa) k = h.fa
  15642. else {
  15643. k = g.f.create('div')
  15644. k.className = 'amap-marker'
  15645. var m = l.Ug,
  15646. n = l.e9,
  15647. p = l.IJ
  15648. m && k.appendChild(m)
  15649. n && k.appendChild(n)
  15650. p && !1 !== m.yM && k.appendChild(p)
  15651. h.fa = k
  15652. h.Ug = m
  15653. if ((n = l.title)) m.title = n
  15654. this.g.lm = !0
  15655. ;-1 === g.a.indexOf(this.g.ah, h) && this.g.ah.push(h)
  15656. h.re = !0
  15657. }
  15658. var p = l.offset,
  15659. q = p.x,
  15660. r = p.y,
  15661. s = l.textAlign,
  15662. u = l.verticalAlign,
  15663. n = l.anchor,
  15664. m = !1,
  15665. v,
  15666. w
  15667. n && ((n = n.split('-')), 2 === n.length ? ((s = n[1]), (u = n[0])) : 1 === n.length && 'center' === n[0] && ((s = 'center'), (u = 'middle')))
  15668. var t,
  15669. n = (t = 0)
  15670. if ('AMap.Text' == h.Tp || 'AMap.Marker' == h.Tp) {
  15671. if (((w = v = 0), k.parentNode !== this.pl && d && ((m = !0), (d[f] = h), (e = !1)), !m)) {
  15672. h.re || !h.Wj ? ((t = g.f.Lo(h.Ug)), (h.Wj = t)) : (t = h.Wj)
  15673. n = t[0]
  15674. t = t[1]
  15675. switch (s) {
  15676. case 'center':
  15677. v = n / 2
  15678. break
  15679. case 'right':
  15680. v = n
  15681. }
  15682. switch (u) {
  15683. case 'middle':
  15684. w = t / 2
  15685. break
  15686. case 'bottom':
  15687. w = t
  15688. }
  15689. q -= v
  15690. r -= w
  15691. }
  15692. } else (v = -q), (w = -r)
  15693. var x, y
  15694. if (!m)
  15695. if (h.re) {
  15696. var E = []
  15697. x = this.Ku(h.W.za)
  15698. h.Na = this.Na
  15699. y = l.nF
  15700. r = Math.round(x[1] + r + y.y)
  15701. q = Math.round(x[0] + q + y.x)
  15702. E.push('top:' + r + 'px')
  15703. E.push('left:' + q + 'px')
  15704. E.push('z-index:' + (l.S5 ? this.g.er + 10 : l.zIndex))
  15705. if (!g.l.Ue) {
  15706. r = v
  15707. q = w
  15708. if ('AMap.Marker' == h.Tp) {
  15709. r = -p.x
  15710. q = -p.y
  15711. switch (s) {
  15712. case 'center':
  15713. r = -p.x + n / 2
  15714. q = -p.y + t / 2
  15715. break
  15716. case 'right':
  15717. r = -p.x + n
  15718. }
  15719. switch (u) {
  15720. case 'middle':
  15721. q = -p.y + t / 2
  15722. break
  15723. case 'bottom':
  15724. q = -p.y + t
  15725. }
  15726. }
  15727. E.push(g.f.C4(k, l.Rp, { x: r, y: q }))
  15728. }
  15729. E.push('display:' + (l.visible ? 'block' : 'none') + ';')
  15730. k.style.cssText = E.join(';')
  15731. if ((p = l.label) && p.content) {
  15732. l = l.IJ
  15733. s = p.direction
  15734. r = null
  15735. h.Cv || ((r = g.f.Lo(l)), (h.Cv = r))
  15736. u = (r = h.Cv) && r[0]
  15737. w = r && r[1]
  15738. q = r = 0
  15739. if (s && u && w)
  15740. switch (s) {
  15741. case 'top':
  15742. r = -w
  15743. q = (n - u) / 2
  15744. break
  15745. case 'right':
  15746. r = (t - w) / 2
  15747. q = n
  15748. break
  15749. case 'bottom':
  15750. r = t
  15751. q = (n - u) / 2
  15752. break
  15753. case 'left':
  15754. r = (t - w) / 2
  15755. q = -u
  15756. break
  15757. case 'center':
  15758. ;(r = (t - w) / 2), (q = (n - u) / 2)
  15759. }
  15760. p.offset ? ((r = r + p.offset.y + 'px'), (q = q + p.offset.x + 'px')) : ((r += 'px'), (q += 'px'))
  15761. l.style.top = r
  15762. l.style.left = q
  15763. }
  15764. } else if (h.cba || this.zoom << 0 !== this.zoom || h.zoom !== this.zoom || k.parentNode !== this.pl || h.Na !== this.Na)
  15765. (x = this.Ku(h.W.za)), (h.Na = this.Na), (y = l.nF), (r = Math.round(x[1] + r + y.y)), (q = Math.round(x[0] + q + y.x)), (k.style.top = r + 'px'), (k.style.left = q + 'px')
  15766. h.zoom = this.zoom
  15767. k.parentNode !== this.pl && (g.l.zi && g.a.iepngFix(k), c.appendChild(k))
  15768. h.re = m
  15769. k.LB = this.pl
  15770. }
  15771. this.pl.appendChild(c)
  15772. e || this.wE(d, { zS: !0 })
  15773. },
  15774. Ku: function (a) {
  15775. var b = a[0] - this.Na.x
  15776. b > g.a.Fa / 2 ? (b -= g.a.Fa) : b < -g.a.Fa / 2 && (b += g.a.Fa)
  15777. return [b / this.T, (a[1] - this.Na.y) / this.T]
  15778. },
  15779. })
  15780. var Nc = g.r,
  15781. Tc = g.l,
  15782. gc = g.da.Ru,
  15783. Uc = g.Qva,
  15784. fa = document,
  15785. Vc = !0,
  15786. Wc = []
  15787. Tc.Tf && Wc.push('touch')
  15788. Tc.ba || Wc.push('mouse')
  15789. Tc.bL && (Wc.push('vectorlayer', 'overlay'), Tc.qp ? Wc.push('wgl') : Wc.push('cgl'))
  15790. if (Uc) {
  15791. for (var Xc = [], Yc = Uc.split(','), Jc = 0; Jc < Yc.length; Jc += 1) {
  15792. var Zc = Yc[Jc]
  15793. gc[Zc] && Xc.push.apply(Xc, gc[Zc])
  15794. Xc.push(Zc)
  15795. }
  15796. Wc = Wc.concat(Xc)
  15797. }
  15798. Wc.push('sync')
  15799. if (Tc.Gv) {
  15800. var $c = !0,
  15801. ad = [],
  15802. bd = []
  15803. try {
  15804. for (var Jc = 0, cd = Wc.length; Jc < cd; Jc++) {
  15805. var dd = JSON.parse(localStorage.getItem('_AMap_' + Wc[Jc]))
  15806. if (dd && dd.version === Nc.Dk) ad.push(dd.script), dd.css && bd.push(dd.css)
  15807. else {
  15808. ad = void 0
  15809. $c = !1
  15810. break
  15811. }
  15812. }
  15813. } catch (ed) {
  15814. ;(ad = bd = void 0), ($c = !1)
  15815. }
  15816. if ($c)
  15817. try {
  15818. bd.length && fd()
  15819. var gd = ad.join(';')
  15820. eval(gd)
  15821. } catch (hd) {
  15822. Vc = !1
  15823. }
  15824. else Vc = !1
  15825. } else Vc = !1
  15826. if (Vc) for (Jc = 0; Jc < Wc.length; Jc += 1) g.tb.QC(Wc[Jc]).status = 1
  15827. else (Nc.MJ = !1), id()
  15828. function jd() {
  15829. for (var a = fa.getElementsByTagName('script'), b, c = 0; c < a.length; c += 1)
  15830. if (0 === a[c].src.indexOf(Nc.Gb + '/maps?')) {
  15831. b = a[c]
  15832. break
  15833. }
  15834. return Nc.Mc || (b && b.async)
  15835. }
  15836. function id() {
  15837. var a = Nc.Gb + '/maps/modules?v=' + Nc.ln + '&key=' + Nc.key + '&vrs=' + Nc.Dk + '&m=' + Wc.join(',')
  15838. jd()
  15839. ? kd(a)
  15840. : (fa.write('<script crossorigin="anonymous" id="amap_plus_js" src="' + a + '" type="text/javascript">\x3c/script>'),
  15841. setTimeout(function () {
  15842. fa.getElementById('amap_plus_js') || kd(a)
  15843. }, 1))
  15844. }
  15845. function kd(a) {
  15846. var b = fa.createElement('script')
  15847. b.charset = 'utf-8'
  15848. b.src = a
  15849. b.id = 'amap_plus_js'
  15850. ;(a = fa.head || fa.getElementsByTagName('head')[0] || fa.body) && a.appendChild(b)
  15851. }
  15852. function fd() {
  15853. var a = bd.join('\n'),
  15854. b = fa.createElement('style')
  15855. b.type = 'text/css'
  15856. ;-1 === Nc.Gb.indexOf('webapi.amap.com') && (a = a.replace(/webapi.amap.com/gi, Nc.Gb.split('://')[1]))
  15857. 'https' === Nc.tc && (a = a.replace(/http:/gi, 'https:'))
  15858. if (b.styleSheet) {
  15859. var c = function () {
  15860. try {
  15861. b.styleSheet.cssText = a
  15862. } catch (c) {}
  15863. }
  15864. b.styleSheet.disabled ? setTimeout(c, 10) : c()
  15865. } else b.appendChild(fa.createTextNode(a))
  15866. c = fa.head || fa.getElementsByTagName('head')[0]
  15867. 2 > c.childNodes.length ? c.appendChild(b) : c.insertBefore(b, c.childNodes[1])
  15868. }
  15869. typeof _cssload_ == 'function' && _cssload_('logo', '.amap-logo{display:block!important;pointer-events:none;}', true)
  15870. })([
  15871. 'e661b00bdf2c44cccf71ef6070ef41b8',
  15872. [113.084824, 21.806335, 114.325757, 22.443655, 113.553986, 22.224979],
  15873. 'https://webapi.amap.com',
  15874. 1,
  15875. '1.4.17',
  15876. null,
  15877. '440400',
  15878. '',
  15879. true,
  15880. false,
  15881. false,
  15882. true,
  15883. '20211117211203-20201123-1',
  15884. false,
  15885. 'A',
  15886. '3_21_11_19_00',
  15887. 'https',
  15888. 'webapi.amap.com',
  15889. ])