iclient-classic.js 623 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207
  1. /******/ (function() { // webpackBootstrap
  2. /******/ var __webpack_modules__ = ({
  3. /***/ 3393:
  4. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  5. "use strict";
  6. var parent = __webpack_require__(5114);
  7. module.exports = parent;
  8. /***/ }),
  9. /***/ 6396:
  10. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  11. "use strict";
  12. var parent = __webpack_require__(6417);
  13. module.exports = parent;
  14. /***/ }),
  15. /***/ 4130:
  16. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  17. "use strict";
  18. __webpack_require__(8786);
  19. var path = __webpack_require__(5761);
  20. module.exports = path.Object.assign;
  21. /***/ }),
  22. /***/ 7969:
  23. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  24. "use strict";
  25. __webpack_require__(3001);
  26. var WrappedWellKnownSymbolModule = __webpack_require__(5787);
  27. module.exports = WrappedWellKnownSymbolModule.f('asyncIterator');
  28. /***/ }),
  29. /***/ 4363:
  30. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31. "use strict";
  32. var isCallable = __webpack_require__(1977);
  33. var tryToString = __webpack_require__(5959);
  34. var $TypeError = TypeError;
  35. // `Assert: IsCallable(argument) is true`
  36. module.exports = function (argument) {
  37. if (isCallable(argument)) return argument;
  38. throw $TypeError(tryToString(argument) + ' is not a function');
  39. };
  40. /***/ }),
  41. /***/ 6424:
  42. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  43. "use strict";
  44. var isObject = __webpack_require__(7212);
  45. var $String = String;
  46. var $TypeError = TypeError;
  47. // `Assert: Type(argument) is Object`
  48. module.exports = function (argument) {
  49. if (isObject(argument)) return argument;
  50. throw $TypeError($String(argument) + ' is not an object');
  51. };
  52. /***/ }),
  53. /***/ 4525:
  54. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  55. "use strict";
  56. var toIndexedObject = __webpack_require__(630);
  57. var toAbsoluteIndex = __webpack_require__(5217);
  58. var lengthOfArrayLike = __webpack_require__(8601);
  59. // `Array.prototype.{ indexOf, includes }` methods implementation
  60. var createMethod = function createMethod(IS_INCLUDES) {
  61. return function ($this, el, fromIndex) {
  62. var O = toIndexedObject($this);
  63. var length = lengthOfArrayLike(O);
  64. var index = toAbsoluteIndex(fromIndex, length);
  65. var value;
  66. // Array#includes uses SameValueZero equality algorithm
  67. // eslint-disable-next-line no-self-compare -- NaN check
  68. if (IS_INCLUDES && el != el) while (length > index) {
  69. value = O[index++];
  70. // eslint-disable-next-line no-self-compare -- NaN check
  71. if (value != value) return true;
  72. // Array#indexOf ignores holes, Array#includes - not
  73. } else for (; length > index; index++) {
  74. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  75. }
  76. return !IS_INCLUDES && -1;
  77. };
  78. };
  79. module.exports = {
  80. // `Array.prototype.includes` method
  81. // https://tc39.es/ecma262/#sec-array.prototype.includes
  82. includes: createMethod(true),
  83. // `Array.prototype.indexOf` method
  84. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  85. indexOf: createMethod(false)
  86. };
  87. /***/ }),
  88. /***/ 2393:
  89. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  90. "use strict";
  91. var uncurryThis = __webpack_require__(4686);
  92. var toString = uncurryThis({}.toString);
  93. var stringSlice = uncurryThis(''.slice);
  94. module.exports = function (it) {
  95. return stringSlice(toString(it), 8, -1);
  96. };
  97. /***/ }),
  98. /***/ 6616:
  99. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  100. "use strict";
  101. var hasOwn = __webpack_require__(2011);
  102. var ownKeys = __webpack_require__(3575);
  103. var getOwnPropertyDescriptorModule = __webpack_require__(4912);
  104. var definePropertyModule = __webpack_require__(421);
  105. module.exports = function (target, source, exceptions) {
  106. var keys = ownKeys(source);
  107. var defineProperty = definePropertyModule.f;
  108. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  109. for (var i = 0; i < keys.length; i++) {
  110. var key = keys[i];
  111. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  112. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  113. }
  114. }
  115. };
  116. /***/ }),
  117. /***/ 1873:
  118. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  119. "use strict";
  120. var DESCRIPTORS = __webpack_require__(1337);
  121. var definePropertyModule = __webpack_require__(421);
  122. var createPropertyDescriptor = __webpack_require__(1283);
  123. module.exports = DESCRIPTORS ? function (object, key, value) {
  124. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  125. } : function (object, key, value) {
  126. object[key] = value;
  127. return object;
  128. };
  129. /***/ }),
  130. /***/ 1283:
  131. /***/ (function(module) {
  132. "use strict";
  133. module.exports = function (bitmap, value) {
  134. return {
  135. enumerable: !(bitmap & 1),
  136. configurable: !(bitmap & 2),
  137. writable: !(bitmap & 4),
  138. value: value
  139. };
  140. };
  141. /***/ }),
  142. /***/ 8424:
  143. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  144. "use strict";
  145. var isCallable = __webpack_require__(1977);
  146. var definePropertyModule = __webpack_require__(421);
  147. var makeBuiltIn = __webpack_require__(4382);
  148. var defineGlobalProperty = __webpack_require__(6722);
  149. module.exports = function (O, key, value, options) {
  150. if (!options) options = {};
  151. var simple = options.enumerable;
  152. var name = options.name !== undefined ? options.name : key;
  153. if (isCallable(value)) makeBuiltIn(value, name, options);
  154. if (options.global) {
  155. if (simple) O[key] = value;else defineGlobalProperty(key, value);
  156. } else {
  157. try {
  158. if (!options.unsafe) delete O[key];else if (O[key]) simple = true;
  159. } catch (error) {/* empty */}
  160. if (simple) O[key] = value;else definePropertyModule.f(O, key, {
  161. value: value,
  162. enumerable: false,
  163. configurable: !options.nonConfigurable,
  164. writable: !options.nonWritable
  165. });
  166. }
  167. return O;
  168. };
  169. /***/ }),
  170. /***/ 6722:
  171. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  172. "use strict";
  173. var global = __webpack_require__(2021);
  174. // eslint-disable-next-line es/no-object-defineproperty -- safe
  175. var defineProperty = Object.defineProperty;
  176. module.exports = function (key, value) {
  177. try {
  178. defineProperty(global, key, {
  179. value: value,
  180. configurable: true,
  181. writable: true
  182. });
  183. } catch (error) {
  184. global[key] = value;
  185. }
  186. return value;
  187. };
  188. /***/ }),
  189. /***/ 1337:
  190. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  191. "use strict";
  192. var fails = __webpack_require__(4418);
  193. // Detect IE8's incomplete defineProperty implementation
  194. module.exports = !fails(function () {
  195. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  196. return Object.defineProperty({}, 1, {
  197. get: function get() {
  198. return 7;
  199. }
  200. })[1] != 7;
  201. });
  202. /***/ }),
  203. /***/ 6330:
  204. /***/ (function(module) {
  205. "use strict";
  206. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  207. var documentAll = (typeof document === "undefined" ? "undefined" : _typeof(document)) == 'object' && document.all;
  208. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  209. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  210. var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
  211. module.exports = {
  212. all: documentAll,
  213. IS_HTMLDDA: IS_HTMLDDA
  214. };
  215. /***/ }),
  216. /***/ 2649:
  217. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  218. "use strict";
  219. var global = __webpack_require__(2021);
  220. var isObject = __webpack_require__(7212);
  221. var document = global.document;
  222. // typeof document.createElement is 'object' in old IE
  223. var EXISTS = isObject(document) && isObject(document.createElement);
  224. module.exports = function (it) {
  225. return EXISTS ? document.createElement(it) : {};
  226. };
  227. /***/ }),
  228. /***/ 2894:
  229. /***/ (function(module) {
  230. "use strict";
  231. module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  232. /***/ }),
  233. /***/ 617:
  234. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  235. "use strict";
  236. var global = __webpack_require__(2021);
  237. var userAgent = __webpack_require__(2894);
  238. var process = global.process;
  239. var Deno = global.Deno;
  240. var versions = process && process.versions || Deno && Deno.version;
  241. var v8 = versions && versions.v8;
  242. var match, version;
  243. if (v8) {
  244. match = v8.split('.');
  245. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  246. // but their correct versions are not interesting for us
  247. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  248. }
  249. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  250. // so check `userAgent` even if `.v8` exists, but 0
  251. if (!version && userAgent) {
  252. match = userAgent.match(/Edge\/(\d+)/);
  253. if (!match || match[1] >= 74) {
  254. match = userAgent.match(/Chrome\/(\d+)/);
  255. if (match) version = +match[1];
  256. }
  257. }
  258. module.exports = version;
  259. /***/ }),
  260. /***/ 154:
  261. /***/ (function(module) {
  262. "use strict";
  263. // IE8- don't enum bug keys
  264. module.exports = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
  265. /***/ }),
  266. /***/ 4427:
  267. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  268. "use strict";
  269. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  270. var global = __webpack_require__(2021);
  271. var getOwnPropertyDescriptor = (__webpack_require__(4912).f);
  272. var createNonEnumerableProperty = __webpack_require__(1873);
  273. var defineBuiltIn = __webpack_require__(8424);
  274. var defineGlobalProperty = __webpack_require__(6722);
  275. var copyConstructorProperties = __webpack_require__(6616);
  276. var isForced = __webpack_require__(1943);
  277. /*
  278. options.target - name of the target object
  279. options.global - target is the global object
  280. options.stat - export as static methods of target
  281. options.proto - export as prototype methods of target
  282. options.real - real prototype method for the `pure` version
  283. options.forced - export even if the native feature is available
  284. options.bind - bind methods to the target, required for the `pure` version
  285. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  286. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  287. options.sham - add a flag to not completely full polyfills
  288. options.enumerable - export as enumerable property
  289. options.dontCallGetSet - prevent calling a getter on target
  290. options.name - the .name of the function if it does not match the key
  291. */
  292. module.exports = function (options, source) {
  293. var TARGET = options.target;
  294. var GLOBAL = options.global;
  295. var STATIC = options.stat;
  296. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  297. if (GLOBAL) {
  298. target = global;
  299. } else if (STATIC) {
  300. target = global[TARGET] || defineGlobalProperty(TARGET, {});
  301. } else {
  302. target = (global[TARGET] || {}).prototype;
  303. }
  304. if (target) for (key in source) {
  305. sourceProperty = source[key];
  306. if (options.dontCallGetSet) {
  307. descriptor = getOwnPropertyDescriptor(target, key);
  308. targetProperty = descriptor && descriptor.value;
  309. } else targetProperty = target[key];
  310. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  311. // contained in target
  312. if (!FORCED && targetProperty !== undefined) {
  313. if (_typeof(sourceProperty) == _typeof(targetProperty)) continue;
  314. copyConstructorProperties(sourceProperty, targetProperty);
  315. }
  316. // add a flag to not completely full polyfills
  317. if (options.sham || targetProperty && targetProperty.sham) {
  318. createNonEnumerableProperty(sourceProperty, 'sham', true);
  319. }
  320. defineBuiltIn(target, key, sourceProperty, options);
  321. }
  322. };
  323. /***/ }),
  324. /***/ 4418:
  325. /***/ (function(module) {
  326. "use strict";
  327. module.exports = function (exec) {
  328. try {
  329. return !!exec();
  330. } catch (error) {
  331. return true;
  332. }
  333. };
  334. /***/ }),
  335. /***/ 6973:
  336. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  337. "use strict";
  338. var fails = __webpack_require__(4418);
  339. module.exports = !fails(function () {
  340. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  341. var test = function () {/* empty */}.bind();
  342. // eslint-disable-next-line no-prototype-builtins -- safe
  343. return typeof test != 'function' || test.hasOwnProperty('prototype');
  344. });
  345. /***/ }),
  346. /***/ 5563:
  347. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  348. "use strict";
  349. var NATIVE_BIND = __webpack_require__(6973);
  350. var call = Function.prototype.call;
  351. module.exports = NATIVE_BIND ? call.bind(call) : function () {
  352. return call.apply(call, arguments);
  353. };
  354. /***/ }),
  355. /***/ 7967:
  356. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  357. "use strict";
  358. var DESCRIPTORS = __webpack_require__(1337);
  359. var hasOwn = __webpack_require__(2011);
  360. var FunctionPrototype = Function.prototype;
  361. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  362. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  363. var EXISTS = hasOwn(FunctionPrototype, 'name');
  364. // additional protection from minified / mangled / dropped function names
  365. var PROPER = EXISTS && function something() {/* empty */}.name === 'something';
  366. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable);
  367. module.exports = {
  368. EXISTS: EXISTS,
  369. PROPER: PROPER,
  370. CONFIGURABLE: CONFIGURABLE
  371. };
  372. /***/ }),
  373. /***/ 4686:
  374. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  375. "use strict";
  376. var NATIVE_BIND = __webpack_require__(6973);
  377. var FunctionPrototype = Function.prototype;
  378. var call = FunctionPrototype.call;
  379. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  380. module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  381. return function () {
  382. return call.apply(fn, arguments);
  383. };
  384. };
  385. /***/ }),
  386. /***/ 5718:
  387. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  388. "use strict";
  389. var global = __webpack_require__(2021);
  390. var isCallable = __webpack_require__(1977);
  391. var aFunction = function aFunction(argument) {
  392. return isCallable(argument) ? argument : undefined;
  393. };
  394. module.exports = function (namespace, method) {
  395. return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
  396. };
  397. /***/ }),
  398. /***/ 1260:
  399. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  400. "use strict";
  401. var aCallable = __webpack_require__(4363);
  402. var isNullOrUndefined = __webpack_require__(5323);
  403. // `GetMethod` abstract operation
  404. // https://tc39.es/ecma262/#sec-getmethod
  405. module.exports = function (V, P) {
  406. var func = V[P];
  407. return isNullOrUndefined(func) ? undefined : aCallable(func);
  408. };
  409. /***/ }),
  410. /***/ 2021:
  411. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  412. "use strict";
  413. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  414. var check = function check(it) {
  415. return it && it.Math == Math && it;
  416. };
  417. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  418. module.exports =
  419. // eslint-disable-next-line es/no-global-this -- safe
  420. check((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) == 'object' && globalThis) || check((typeof window === "undefined" ? "undefined" : _typeof(window)) == 'object' && window) ||
  421. // eslint-disable-next-line no-restricted-globals -- safe
  422. check((typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self) || check((typeof __webpack_require__.g === "undefined" ? "undefined" : _typeof(__webpack_require__.g)) == 'object' && __webpack_require__.g) ||
  423. // eslint-disable-next-line no-new-func -- fallback
  424. function () {
  425. return this;
  426. }() || this || Function('return this')();
  427. /***/ }),
  428. /***/ 2011:
  429. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  430. "use strict";
  431. var uncurryThis = __webpack_require__(4686);
  432. var toObject = __webpack_require__(4548);
  433. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  434. // `HasOwnProperty` abstract operation
  435. // https://tc39.es/ecma262/#sec-hasownproperty
  436. // eslint-disable-next-line es/no-object-hasown -- safe
  437. module.exports = Object.hasOwn || function hasOwn(it, key) {
  438. return hasOwnProperty(toObject(it), key);
  439. };
  440. /***/ }),
  441. /***/ 8653:
  442. /***/ (function(module) {
  443. "use strict";
  444. module.exports = {};
  445. /***/ }),
  446. /***/ 4497:
  447. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  448. "use strict";
  449. var DESCRIPTORS = __webpack_require__(1337);
  450. var fails = __webpack_require__(4418);
  451. var createElement = __webpack_require__(2649);
  452. // Thanks to IE8 for its funny defineProperty
  453. module.exports = !DESCRIPTORS && !fails(function () {
  454. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  455. return Object.defineProperty(createElement('div'), 'a', {
  456. get: function get() {
  457. return 7;
  458. }
  459. }).a != 7;
  460. });
  461. /***/ }),
  462. /***/ 3436:
  463. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  464. "use strict";
  465. var uncurryThis = __webpack_require__(4686);
  466. var fails = __webpack_require__(4418);
  467. var classof = __webpack_require__(2393);
  468. var $Object = Object;
  469. var split = uncurryThis(''.split);
  470. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  471. module.exports = fails(function () {
  472. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  473. // eslint-disable-next-line no-prototype-builtins -- safe
  474. return !$Object('z').propertyIsEnumerable(0);
  475. }) ? function (it) {
  476. return classof(it) == 'String' ? split(it, '') : $Object(it);
  477. } : $Object;
  478. /***/ }),
  479. /***/ 5430:
  480. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  481. "use strict";
  482. var uncurryThis = __webpack_require__(4686);
  483. var isCallable = __webpack_require__(1977);
  484. var store = __webpack_require__(8817);
  485. var functionToString = uncurryThis(Function.toString);
  486. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  487. if (!isCallable(store.inspectSource)) {
  488. store.inspectSource = function (it) {
  489. return functionToString(it);
  490. };
  491. }
  492. module.exports = store.inspectSource;
  493. /***/ }),
  494. /***/ 5774:
  495. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  496. "use strict";
  497. var NATIVE_WEAK_MAP = __webpack_require__(1859);
  498. var global = __webpack_require__(2021);
  499. var isObject = __webpack_require__(7212);
  500. var createNonEnumerableProperty = __webpack_require__(1873);
  501. var hasOwn = __webpack_require__(2011);
  502. var shared = __webpack_require__(8817);
  503. var sharedKey = __webpack_require__(8093);
  504. var hiddenKeys = __webpack_require__(8653);
  505. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  506. var TypeError = global.TypeError;
  507. var WeakMap = global.WeakMap;
  508. var set, get, has;
  509. var enforce = function enforce(it) {
  510. return has(it) ? get(it) : set(it, {});
  511. };
  512. var getterFor = function getterFor(TYPE) {
  513. return function (it) {
  514. var state;
  515. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  516. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  517. }
  518. return state;
  519. };
  520. };
  521. if (NATIVE_WEAK_MAP || shared.state) {
  522. var store = shared.state || (shared.state = new WeakMap());
  523. /* eslint-disable no-self-assign -- prototype methods protection */
  524. store.get = store.get;
  525. store.has = store.has;
  526. store.set = store.set;
  527. /* eslint-enable no-self-assign -- prototype methods protection */
  528. set = function set(it, metadata) {
  529. if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
  530. metadata.facade = it;
  531. store.set(it, metadata);
  532. return metadata;
  533. };
  534. get = function get(it) {
  535. return store.get(it) || {};
  536. };
  537. has = function has(it) {
  538. return store.has(it);
  539. };
  540. } else {
  541. var STATE = sharedKey('state');
  542. hiddenKeys[STATE] = true;
  543. set = function set(it, metadata) {
  544. if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);
  545. metadata.facade = it;
  546. createNonEnumerableProperty(it, STATE, metadata);
  547. return metadata;
  548. };
  549. get = function get(it) {
  550. return hasOwn(it, STATE) ? it[STATE] : {};
  551. };
  552. has = function has(it) {
  553. return hasOwn(it, STATE);
  554. };
  555. }
  556. module.exports = {
  557. set: set,
  558. get: get,
  559. has: has,
  560. enforce: enforce,
  561. getterFor: getterFor
  562. };
  563. /***/ }),
  564. /***/ 1977:
  565. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  566. "use strict";
  567. var $documentAll = __webpack_require__(6330);
  568. var documentAll = $documentAll.all;
  569. // `IsCallable` abstract operation
  570. // https://tc39.es/ecma262/#sec-iscallable
  571. module.exports = $documentAll.IS_HTMLDDA ? function (argument) {
  572. return typeof argument == 'function' || argument === documentAll;
  573. } : function (argument) {
  574. return typeof argument == 'function';
  575. };
  576. /***/ }),
  577. /***/ 1943:
  578. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  579. "use strict";
  580. var fails = __webpack_require__(4418);
  581. var isCallable = __webpack_require__(1977);
  582. var replacement = /#|\.prototype\./;
  583. var isForced = function isForced(feature, detection) {
  584. var value = data[normalize(feature)];
  585. return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
  586. };
  587. var normalize = isForced.normalize = function (string) {
  588. return String(string).replace(replacement, '.').toLowerCase();
  589. };
  590. var data = isForced.data = {};
  591. var NATIVE = isForced.NATIVE = 'N';
  592. var POLYFILL = isForced.POLYFILL = 'P';
  593. module.exports = isForced;
  594. /***/ }),
  595. /***/ 5323:
  596. /***/ (function(module) {
  597. "use strict";
  598. // we can't use just `it == null` since of `document.all` special case
  599. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  600. module.exports = function (it) {
  601. return it === null || it === undefined;
  602. };
  603. /***/ }),
  604. /***/ 7212:
  605. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  606. "use strict";
  607. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  608. var isCallable = __webpack_require__(1977);
  609. var $documentAll = __webpack_require__(6330);
  610. var documentAll = $documentAll.all;
  611. module.exports = $documentAll.IS_HTMLDDA ? function (it) {
  612. return _typeof(it) == 'object' ? it !== null : isCallable(it) || it === documentAll;
  613. } : function (it) {
  614. return _typeof(it) == 'object' ? it !== null : isCallable(it);
  615. };
  616. /***/ }),
  617. /***/ 9596:
  618. /***/ (function(module) {
  619. "use strict";
  620. module.exports = false;
  621. /***/ }),
  622. /***/ 6874:
  623. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  624. "use strict";
  625. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  626. var getBuiltIn = __webpack_require__(5718);
  627. var isCallable = __webpack_require__(1977);
  628. var isPrototypeOf = __webpack_require__(6701);
  629. var USE_SYMBOL_AS_UID = __webpack_require__(1635);
  630. var $Object = Object;
  631. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  632. return _typeof(it) == 'symbol';
  633. } : function (it) {
  634. var $Symbol = getBuiltIn('Symbol');
  635. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  636. };
  637. /***/ }),
  638. /***/ 8601:
  639. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  640. "use strict";
  641. var toLength = __webpack_require__(3346);
  642. // `LengthOfArrayLike` abstract operation
  643. // https://tc39.es/ecma262/#sec-lengthofarraylike
  644. module.exports = function (obj) {
  645. return toLength(obj.length);
  646. };
  647. /***/ }),
  648. /***/ 4382:
  649. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  650. "use strict";
  651. var uncurryThis = __webpack_require__(4686);
  652. var fails = __webpack_require__(4418);
  653. var isCallable = __webpack_require__(1977);
  654. var hasOwn = __webpack_require__(2011);
  655. var DESCRIPTORS = __webpack_require__(1337);
  656. var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(7967).CONFIGURABLE);
  657. var inspectSource = __webpack_require__(5430);
  658. var InternalStateModule = __webpack_require__(5774);
  659. var enforceInternalState = InternalStateModule.enforce;
  660. var getInternalState = InternalStateModule.get;
  661. var $String = String;
  662. // eslint-disable-next-line es/no-object-defineproperty -- safe
  663. var defineProperty = Object.defineProperty;
  664. var stringSlice = uncurryThis(''.slice);
  665. var replace = uncurryThis(''.replace);
  666. var join = uncurryThis([].join);
  667. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  668. return defineProperty(function () {/* empty */}, 'length', {
  669. value: 8
  670. }).length !== 8;
  671. });
  672. var TEMPLATE = String(String).split('String');
  673. var makeBuiltIn = module.exports = function (value, name, options) {
  674. if (stringSlice($String(name), 0, 7) === 'Symbol(') {
  675. name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
  676. }
  677. if (options && options.getter) name = 'get ' + name;
  678. if (options && options.setter) name = 'set ' + name;
  679. if (!hasOwn(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
  680. if (DESCRIPTORS) defineProperty(value, 'name', {
  681. value: name,
  682. configurable: true
  683. });else value.name = name;
  684. }
  685. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  686. defineProperty(value, 'length', {
  687. value: options.arity
  688. });
  689. }
  690. try {
  691. if (options && hasOwn(options, 'constructor') && options.constructor) {
  692. if (DESCRIPTORS) defineProperty(value, 'prototype', {
  693. writable: false
  694. });
  695. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  696. } else if (value.prototype) value.prototype = undefined;
  697. } catch (error) {/* empty */}
  698. var state = enforceInternalState(value);
  699. if (!hasOwn(state, 'source')) {
  700. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  701. }
  702. return value;
  703. };
  704. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  705. // eslint-disable-next-line no-extend-native -- required
  706. Function.prototype.toString = makeBuiltIn(function toString() {
  707. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  708. }, 'toString');
  709. /***/ }),
  710. /***/ 6729:
  711. /***/ (function(module) {
  712. "use strict";
  713. var ceil = Math.ceil;
  714. var floor = Math.floor;
  715. // `Math.trunc` method
  716. // https://tc39.es/ecma262/#sec-math.trunc
  717. // eslint-disable-next-line es/no-math-trunc -- safe
  718. module.exports = Math.trunc || function trunc(x) {
  719. var n = +x;
  720. return (n > 0 ? floor : ceil)(n);
  721. };
  722. /***/ }),
  723. /***/ 6898:
  724. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  725. "use strict";
  726. var DESCRIPTORS = __webpack_require__(1337);
  727. var uncurryThis = __webpack_require__(4686);
  728. var call = __webpack_require__(5563);
  729. var fails = __webpack_require__(4418);
  730. var objectKeys = __webpack_require__(6555);
  731. var getOwnPropertySymbolsModule = __webpack_require__(9833);
  732. var propertyIsEnumerableModule = __webpack_require__(5073);
  733. var toObject = __webpack_require__(4548);
  734. var IndexedObject = __webpack_require__(3436);
  735. // eslint-disable-next-line es/no-object-assign -- safe
  736. var $assign = Object.assign;
  737. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  738. var defineProperty = Object.defineProperty;
  739. var concat = uncurryThis([].concat);
  740. // `Object.assign` method
  741. // https://tc39.es/ecma262/#sec-object.assign
  742. module.exports = !$assign || fails(function () {
  743. // should have correct order of operations (Edge bug)
  744. if (DESCRIPTORS && $assign({
  745. b: 1
  746. }, $assign(defineProperty({}, 'a', {
  747. enumerable: true,
  748. get: function get() {
  749. defineProperty(this, 'b', {
  750. value: 3,
  751. enumerable: false
  752. });
  753. }
  754. }), {
  755. b: 2
  756. })).b !== 1) return true;
  757. // should work with symbols and should have deterministic property order (V8 bug)
  758. var A = {};
  759. var B = {};
  760. // eslint-disable-next-line es/no-symbol -- safe
  761. var symbol = Symbol();
  762. var alphabet = 'abcdefghijklmnopqrst';
  763. A[symbol] = 7;
  764. alphabet.split('').forEach(function (chr) {
  765. B[chr] = chr;
  766. });
  767. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  768. }) ? function assign(target, source) {
  769. // eslint-disable-line no-unused-vars -- required for `.length`
  770. var T = toObject(target);
  771. var argumentsLength = arguments.length;
  772. var index = 1;
  773. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  774. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  775. while (argumentsLength > index) {
  776. var S = IndexedObject(arguments[index++]);
  777. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  778. var length = keys.length;
  779. var j = 0;
  780. var key;
  781. while (length > j) {
  782. key = keys[j++];
  783. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  784. }
  785. }
  786. return T;
  787. } : $assign;
  788. /***/ }),
  789. /***/ 421:
  790. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  791. "use strict";
  792. var DESCRIPTORS = __webpack_require__(1337);
  793. var IE8_DOM_DEFINE = __webpack_require__(4497);
  794. var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(3504);
  795. var anObject = __webpack_require__(6424);
  796. var toPropertyKey = __webpack_require__(8069);
  797. var $TypeError = TypeError;
  798. // eslint-disable-next-line es/no-object-defineproperty -- safe
  799. var $defineProperty = Object.defineProperty;
  800. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  801. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  802. var ENUMERABLE = 'enumerable';
  803. var CONFIGURABLE = 'configurable';
  804. var WRITABLE = 'writable';
  805. // `Object.defineProperty` method
  806. // https://tc39.es/ecma262/#sec-object.defineproperty
  807. exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  808. anObject(O);
  809. P = toPropertyKey(P);
  810. anObject(Attributes);
  811. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  812. var current = $getOwnPropertyDescriptor(O, P);
  813. if (current && current[WRITABLE]) {
  814. O[P] = Attributes.value;
  815. Attributes = {
  816. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  817. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  818. writable: false
  819. };
  820. }
  821. }
  822. return $defineProperty(O, P, Attributes);
  823. } : $defineProperty : function defineProperty(O, P, Attributes) {
  824. anObject(O);
  825. P = toPropertyKey(P);
  826. anObject(Attributes);
  827. if (IE8_DOM_DEFINE) try {
  828. return $defineProperty(O, P, Attributes);
  829. } catch (error) {/* empty */}
  830. if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
  831. if ('value' in Attributes) O[P] = Attributes.value;
  832. return O;
  833. };
  834. /***/ }),
  835. /***/ 4912:
  836. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  837. "use strict";
  838. var DESCRIPTORS = __webpack_require__(1337);
  839. var call = __webpack_require__(5563);
  840. var propertyIsEnumerableModule = __webpack_require__(5073);
  841. var createPropertyDescriptor = __webpack_require__(1283);
  842. var toIndexedObject = __webpack_require__(630);
  843. var toPropertyKey = __webpack_require__(8069);
  844. var hasOwn = __webpack_require__(2011);
  845. var IE8_DOM_DEFINE = __webpack_require__(4497);
  846. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  847. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  848. // `Object.getOwnPropertyDescriptor` method
  849. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  850. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  851. O = toIndexedObject(O);
  852. P = toPropertyKey(P);
  853. if (IE8_DOM_DEFINE) try {
  854. return $getOwnPropertyDescriptor(O, P);
  855. } catch (error) {/* empty */}
  856. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  857. };
  858. /***/ }),
  859. /***/ 4190:
  860. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  861. "use strict";
  862. var internalObjectKeys = __webpack_require__(1717);
  863. var enumBugKeys = __webpack_require__(154);
  864. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  865. // `Object.getOwnPropertyNames` method
  866. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  867. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  868. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  869. return internalObjectKeys(O, hiddenKeys);
  870. };
  871. /***/ }),
  872. /***/ 9833:
  873. /***/ (function(__unused_webpack_module, exports) {
  874. "use strict";
  875. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  876. exports.f = Object.getOwnPropertySymbols;
  877. /***/ }),
  878. /***/ 6701:
  879. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  880. "use strict";
  881. var uncurryThis = __webpack_require__(4686);
  882. module.exports = uncurryThis({}.isPrototypeOf);
  883. /***/ }),
  884. /***/ 1717:
  885. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  886. "use strict";
  887. var uncurryThis = __webpack_require__(4686);
  888. var hasOwn = __webpack_require__(2011);
  889. var toIndexedObject = __webpack_require__(630);
  890. var indexOf = (__webpack_require__(4525).indexOf);
  891. var hiddenKeys = __webpack_require__(8653);
  892. var push = uncurryThis([].push);
  893. module.exports = function (object, names) {
  894. var O = toIndexedObject(object);
  895. var i = 0;
  896. var result = [];
  897. var key;
  898. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  899. // Don't enum bug & hidden keys
  900. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  901. ~indexOf(result, key) || push(result, key);
  902. }
  903. return result;
  904. };
  905. /***/ }),
  906. /***/ 6555:
  907. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  908. "use strict";
  909. var internalObjectKeys = __webpack_require__(1717);
  910. var enumBugKeys = __webpack_require__(154);
  911. // `Object.keys` method
  912. // https://tc39.es/ecma262/#sec-object.keys
  913. // eslint-disable-next-line es/no-object-keys -- safe
  914. module.exports = Object.keys || function keys(O) {
  915. return internalObjectKeys(O, enumBugKeys);
  916. };
  917. /***/ }),
  918. /***/ 5073:
  919. /***/ (function(__unused_webpack_module, exports) {
  920. "use strict";
  921. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  922. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  923. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  924. // Nashorn ~ JDK8 bug
  925. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
  926. 1: 2
  927. }, 1);
  928. // `Object.prototype.propertyIsEnumerable` method implementation
  929. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  930. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  931. var descriptor = getOwnPropertyDescriptor(this, V);
  932. return !!descriptor && descriptor.enumerable;
  933. } : $propertyIsEnumerable;
  934. /***/ }),
  935. /***/ 4565:
  936. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  937. "use strict";
  938. var call = __webpack_require__(5563);
  939. var isCallable = __webpack_require__(1977);
  940. var isObject = __webpack_require__(7212);
  941. var $TypeError = TypeError;
  942. // `OrdinaryToPrimitive` abstract operation
  943. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  944. module.exports = function (input, pref) {
  945. var fn, val;
  946. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  947. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  948. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  949. throw $TypeError("Can't convert object to primitive value");
  950. };
  951. /***/ }),
  952. /***/ 3575:
  953. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  954. "use strict";
  955. var getBuiltIn = __webpack_require__(5718);
  956. var uncurryThis = __webpack_require__(4686);
  957. var getOwnPropertyNamesModule = __webpack_require__(4190);
  958. var getOwnPropertySymbolsModule = __webpack_require__(9833);
  959. var anObject = __webpack_require__(6424);
  960. var concat = uncurryThis([].concat);
  961. // all object keys, includes non-enumerable and symbols
  962. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  963. var keys = getOwnPropertyNamesModule.f(anObject(it));
  964. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  965. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  966. };
  967. /***/ }),
  968. /***/ 5761:
  969. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  970. "use strict";
  971. var global = __webpack_require__(2021);
  972. module.exports = global;
  973. /***/ }),
  974. /***/ 8089:
  975. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  976. "use strict";
  977. var isNullOrUndefined = __webpack_require__(5323);
  978. var $TypeError = TypeError;
  979. // `RequireObjectCoercible` abstract operation
  980. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  981. module.exports = function (it) {
  982. if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
  983. return it;
  984. };
  985. /***/ }),
  986. /***/ 8093:
  987. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  988. "use strict";
  989. var shared = __webpack_require__(678);
  990. var uid = __webpack_require__(4552);
  991. var keys = shared('keys');
  992. module.exports = function (key) {
  993. return keys[key] || (keys[key] = uid(key));
  994. };
  995. /***/ }),
  996. /***/ 8817:
  997. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  998. "use strict";
  999. var global = __webpack_require__(2021);
  1000. var defineGlobalProperty = __webpack_require__(6722);
  1001. var SHARED = '__core-js_shared__';
  1002. var store = global[SHARED] || defineGlobalProperty(SHARED, {});
  1003. module.exports = store;
  1004. /***/ }),
  1005. /***/ 678:
  1006. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1007. "use strict";
  1008. var IS_PURE = __webpack_require__(9596);
  1009. var store = __webpack_require__(8817);
  1010. (module.exports = function (key, value) {
  1011. return store[key] || (store[key] = value !== undefined ? value : {});
  1012. })('versions', []).push({
  1013. version: '3.32.0',
  1014. mode: IS_PURE ? 'pure' : 'global',
  1015. copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
  1016. license: 'https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE',
  1017. source: 'https://github.com/zloirock/core-js'
  1018. });
  1019. /***/ }),
  1020. /***/ 6009:
  1021. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1022. "use strict";
  1023. /* eslint-disable es/no-symbol -- required for testing */
  1024. var V8_VERSION = __webpack_require__(617);
  1025. var fails = __webpack_require__(4418);
  1026. var global = __webpack_require__(2021);
  1027. var $String = global.String;
  1028. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  1029. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  1030. var symbol = Symbol();
  1031. // Chrome 38 Symbol has incorrect toString conversion
  1032. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  1033. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  1034. // of course, fail.
  1035. return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
  1036. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  1037. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  1038. });
  1039. /***/ }),
  1040. /***/ 5217:
  1041. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1042. "use strict";
  1043. var toIntegerOrInfinity = __webpack_require__(2898);
  1044. var max = Math.max;
  1045. var min = Math.min;
  1046. // Helper for a popular repeating case of the spec:
  1047. // Let integer be ? ToInteger(index).
  1048. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  1049. module.exports = function (index, length) {
  1050. var integer = toIntegerOrInfinity(index);
  1051. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  1052. };
  1053. /***/ }),
  1054. /***/ 630:
  1055. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1056. "use strict";
  1057. // toObject with fallback for non-array-like ES3 strings
  1058. var IndexedObject = __webpack_require__(3436);
  1059. var requireObjectCoercible = __webpack_require__(8089);
  1060. module.exports = function (it) {
  1061. return IndexedObject(requireObjectCoercible(it));
  1062. };
  1063. /***/ }),
  1064. /***/ 2898:
  1065. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1066. "use strict";
  1067. var trunc = __webpack_require__(6729);
  1068. // `ToIntegerOrInfinity` abstract operation
  1069. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  1070. module.exports = function (argument) {
  1071. var number = +argument;
  1072. // eslint-disable-next-line no-self-compare -- NaN check
  1073. return number !== number || number === 0 ? 0 : trunc(number);
  1074. };
  1075. /***/ }),
  1076. /***/ 3346:
  1077. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1078. "use strict";
  1079. var toIntegerOrInfinity = __webpack_require__(2898);
  1080. var min = Math.min;
  1081. // `ToLength` abstract operation
  1082. // https://tc39.es/ecma262/#sec-tolength
  1083. module.exports = function (argument) {
  1084. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  1085. };
  1086. /***/ }),
  1087. /***/ 4548:
  1088. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1089. "use strict";
  1090. var requireObjectCoercible = __webpack_require__(8089);
  1091. var $Object = Object;
  1092. // `ToObject` abstract operation
  1093. // https://tc39.es/ecma262/#sec-toobject
  1094. module.exports = function (argument) {
  1095. return $Object(requireObjectCoercible(argument));
  1096. };
  1097. /***/ }),
  1098. /***/ 3841:
  1099. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1100. "use strict";
  1101. var call = __webpack_require__(5563);
  1102. var isObject = __webpack_require__(7212);
  1103. var isSymbol = __webpack_require__(6874);
  1104. var getMethod = __webpack_require__(1260);
  1105. var ordinaryToPrimitive = __webpack_require__(4565);
  1106. var wellKnownSymbol = __webpack_require__(3048);
  1107. var $TypeError = TypeError;
  1108. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  1109. // `ToPrimitive` abstract operation
  1110. // https://tc39.es/ecma262/#sec-toprimitive
  1111. module.exports = function (input, pref) {
  1112. if (!isObject(input) || isSymbol(input)) return input;
  1113. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  1114. var result;
  1115. if (exoticToPrim) {
  1116. if (pref === undefined) pref = 'default';
  1117. result = call(exoticToPrim, input, pref);
  1118. if (!isObject(result) || isSymbol(result)) return result;
  1119. throw $TypeError("Can't convert object to primitive value");
  1120. }
  1121. if (pref === undefined) pref = 'number';
  1122. return ordinaryToPrimitive(input, pref);
  1123. };
  1124. /***/ }),
  1125. /***/ 8069:
  1126. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1127. "use strict";
  1128. var toPrimitive = __webpack_require__(3841);
  1129. var isSymbol = __webpack_require__(6874);
  1130. // `ToPropertyKey` abstract operation
  1131. // https://tc39.es/ecma262/#sec-topropertykey
  1132. module.exports = function (argument) {
  1133. var key = toPrimitive(argument, 'string');
  1134. return isSymbol(key) ? key : key + '';
  1135. };
  1136. /***/ }),
  1137. /***/ 5959:
  1138. /***/ (function(module) {
  1139. "use strict";
  1140. var $String = String;
  1141. module.exports = function (argument) {
  1142. try {
  1143. return $String(argument);
  1144. } catch (error) {
  1145. return 'Object';
  1146. }
  1147. };
  1148. /***/ }),
  1149. /***/ 4552:
  1150. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1151. "use strict";
  1152. var uncurryThis = __webpack_require__(4686);
  1153. var id = 0;
  1154. var postfix = Math.random();
  1155. var toString = uncurryThis(1.0.toString);
  1156. module.exports = function (key) {
  1157. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  1158. };
  1159. /***/ }),
  1160. /***/ 1635:
  1161. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1162. "use strict";
  1163. /* eslint-disable es/no-symbol -- required for testing */
  1164. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  1165. var NATIVE_SYMBOL = __webpack_require__(6009);
  1166. module.exports = NATIVE_SYMBOL && !Symbol.sham && _typeof(Symbol.iterator) == 'symbol';
  1167. /***/ }),
  1168. /***/ 3504:
  1169. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1170. "use strict";
  1171. var DESCRIPTORS = __webpack_require__(1337);
  1172. var fails = __webpack_require__(4418);
  1173. // V8 ~ Chrome 36-
  1174. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  1175. module.exports = DESCRIPTORS && fails(function () {
  1176. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1177. return Object.defineProperty(function () {/* empty */}, 'prototype', {
  1178. value: 42,
  1179. writable: false
  1180. }).prototype != 42;
  1181. });
  1182. /***/ }),
  1183. /***/ 1859:
  1184. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1185. "use strict";
  1186. var global = __webpack_require__(2021);
  1187. var isCallable = __webpack_require__(1977);
  1188. var WeakMap = global.WeakMap;
  1189. module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
  1190. /***/ }),
  1191. /***/ 5273:
  1192. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1193. "use strict";
  1194. var path = __webpack_require__(5761);
  1195. var hasOwn = __webpack_require__(2011);
  1196. var wrappedWellKnownSymbolModule = __webpack_require__(5787);
  1197. var defineProperty = (__webpack_require__(421).f);
  1198. module.exports = function (NAME) {
  1199. var _Symbol = path.Symbol || (path.Symbol = {});
  1200. if (!hasOwn(_Symbol, NAME)) defineProperty(_Symbol, NAME, {
  1201. value: wrappedWellKnownSymbolModule.f(NAME)
  1202. });
  1203. };
  1204. /***/ }),
  1205. /***/ 5787:
  1206. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1207. "use strict";
  1208. var wellKnownSymbol = __webpack_require__(3048);
  1209. exports.f = wellKnownSymbol;
  1210. /***/ }),
  1211. /***/ 3048:
  1212. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1213. "use strict";
  1214. var global = __webpack_require__(2021);
  1215. var shared = __webpack_require__(678);
  1216. var hasOwn = __webpack_require__(2011);
  1217. var uid = __webpack_require__(4552);
  1218. var NATIVE_SYMBOL = __webpack_require__(6009);
  1219. var USE_SYMBOL_AS_UID = __webpack_require__(1635);
  1220. var _Symbol = global.Symbol;
  1221. var WellKnownSymbolsStore = shared('wks');
  1222. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? _Symbol['for'] || _Symbol : _Symbol && _Symbol.withoutSetter || uid;
  1223. module.exports = function (name) {
  1224. if (!hasOwn(WellKnownSymbolsStore, name)) {
  1225. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(_Symbol, name) ? _Symbol[name] : createWellKnownSymbol('Symbol.' + name);
  1226. }
  1227. return WellKnownSymbolsStore[name];
  1228. };
  1229. /***/ }),
  1230. /***/ 8786:
  1231. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  1232. "use strict";
  1233. var $ = __webpack_require__(4427);
  1234. var assign = __webpack_require__(6898);
  1235. // `Object.assign` method
  1236. // https://tc39.es/ecma262/#sec-object.assign
  1237. // eslint-disable-next-line es/no-object-assign -- required for testing
  1238. $({
  1239. target: 'Object',
  1240. stat: true,
  1241. arity: 2,
  1242. forced: Object.assign !== assign
  1243. }, {
  1244. assign: assign
  1245. });
  1246. /***/ }),
  1247. /***/ 3001:
  1248. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  1249. "use strict";
  1250. var defineWellKnownSymbol = __webpack_require__(5273);
  1251. // `Symbol.asyncIterator` well-known symbol
  1252. // https://tc39.es/ecma262/#sec-symbol.asynciterator
  1253. defineWellKnownSymbol('asyncIterator');
  1254. /***/ }),
  1255. /***/ 5114:
  1256. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1257. "use strict";
  1258. var parent = __webpack_require__(4130);
  1259. module.exports = parent;
  1260. /***/ }),
  1261. /***/ 6417:
  1262. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1263. "use strict";
  1264. var parent = __webpack_require__(7969);
  1265. module.exports = parent;
  1266. /***/ }),
  1267. /***/ 5122:
  1268. /***/ (function(module) {
  1269. (function (self) {
  1270. 'use strict';
  1271. // if __disableNativeFetch is set to true, the it will always polyfill fetch
  1272. // with Ajax.
  1273. if (!self.__disableNativeFetch && self.fetch) {
  1274. return;
  1275. }
  1276. function normalizeName(name) {
  1277. if (typeof name !== 'string') {
  1278. name = String(name);
  1279. }
  1280. if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
  1281. throw new TypeError('Invalid character in header field name');
  1282. }
  1283. return name.toLowerCase();
  1284. }
  1285. function normalizeValue(value) {
  1286. if (typeof value !== 'string') {
  1287. value = String(value);
  1288. }
  1289. return value;
  1290. }
  1291. function Headers(headers) {
  1292. this.map = {};
  1293. if (headers instanceof Headers) {
  1294. headers.forEach(function (value, name) {
  1295. this.append(name, value);
  1296. }, this);
  1297. } else if (headers) {
  1298. Object.getOwnPropertyNames(headers).forEach(function (name) {
  1299. this.append(name, headers[name]);
  1300. }, this);
  1301. }
  1302. }
  1303. Headers.prototype.append = function (name, value) {
  1304. name = normalizeName(name);
  1305. value = normalizeValue(value);
  1306. var list = this.map[name];
  1307. if (!list) {
  1308. list = [];
  1309. this.map[name] = list;
  1310. }
  1311. list.push(value);
  1312. };
  1313. Headers.prototype['delete'] = function (name) {
  1314. delete this.map[normalizeName(name)];
  1315. };
  1316. Headers.prototype.get = function (name) {
  1317. var values = this.map[normalizeName(name)];
  1318. return values ? values[0] : null;
  1319. };
  1320. Headers.prototype.getAll = function (name) {
  1321. return this.map[normalizeName(name)] || [];
  1322. };
  1323. Headers.prototype.has = function (name) {
  1324. return this.map.hasOwnProperty(normalizeName(name));
  1325. };
  1326. Headers.prototype.set = function (name, value) {
  1327. this.map[normalizeName(name)] = [normalizeValue(value)];
  1328. };
  1329. Headers.prototype.forEach = function (callback, thisArg) {
  1330. Object.getOwnPropertyNames(this.map).forEach(function (name) {
  1331. this.map[name].forEach(function (value) {
  1332. callback.call(thisArg, value, name, this);
  1333. }, this);
  1334. }, this);
  1335. };
  1336. function consumed(body) {
  1337. if (body.bodyUsed) {
  1338. return Promise.reject(new TypeError('Already read'));
  1339. }
  1340. body.bodyUsed = true;
  1341. }
  1342. function fileReaderReady(reader) {
  1343. return new Promise(function (resolve, reject) {
  1344. reader.onload = function () {
  1345. resolve(reader.result);
  1346. };
  1347. reader.onerror = function () {
  1348. reject(reader.error);
  1349. };
  1350. });
  1351. }
  1352. function readBlobAsArrayBuffer(blob) {
  1353. var reader = new FileReader();
  1354. reader.readAsArrayBuffer(blob);
  1355. return fileReaderReady(reader);
  1356. }
  1357. function readBlobAsText(blob, options) {
  1358. var reader = new FileReader();
  1359. var contentType = options.headers.map['content-type'] ? options.headers.map['content-type'].toString() : '';
  1360. var regex = /charset\=[0-9a-zA-Z\-\_]*;?/;
  1361. var _charset = blob.type.match(regex) || contentType.match(regex);
  1362. var args = [blob];
  1363. if (_charset) {
  1364. args.push(_charset[0].replace(/^charset\=/, '').replace(/;$/, ''));
  1365. }
  1366. reader.readAsText.apply(reader, args);
  1367. return fileReaderReady(reader);
  1368. }
  1369. var support = {
  1370. blob: 'FileReader' in self && 'Blob' in self && function () {
  1371. try {
  1372. new Blob();
  1373. return true;
  1374. } catch (e) {
  1375. return false;
  1376. }
  1377. }(),
  1378. formData: 'FormData' in self,
  1379. arrayBuffer: 'ArrayBuffer' in self
  1380. };
  1381. function Body() {
  1382. this.bodyUsed = false;
  1383. this._initBody = function (body, options) {
  1384. this._bodyInit = body;
  1385. if (typeof body === 'string') {
  1386. this._bodyText = body;
  1387. } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
  1388. this._bodyBlob = body;
  1389. this._options = options;
  1390. } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
  1391. this._bodyFormData = body;
  1392. } else if (!body) {
  1393. this._bodyText = '';
  1394. } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
  1395. // Only support ArrayBuffers for POST method.
  1396. // Receiving ArrayBuffers happens via Blobs, instead.
  1397. } else {
  1398. throw new Error('unsupported BodyInit type');
  1399. }
  1400. };
  1401. if (support.blob) {
  1402. this.blob = function () {
  1403. var rejected = consumed(this);
  1404. if (rejected) {
  1405. return rejected;
  1406. }
  1407. if (this._bodyBlob) {
  1408. return Promise.resolve(this._bodyBlob);
  1409. } else if (this._bodyFormData) {
  1410. throw new Error('could not read FormData body as blob');
  1411. } else {
  1412. return Promise.resolve(new Blob([this._bodyText]));
  1413. }
  1414. };
  1415. this.arrayBuffer = function () {
  1416. return this.blob().then(readBlobAsArrayBuffer);
  1417. };
  1418. this.text = function () {
  1419. var rejected = consumed(this);
  1420. if (rejected) {
  1421. return rejected;
  1422. }
  1423. if (this._bodyBlob) {
  1424. return readBlobAsText(this._bodyBlob, this._options);
  1425. } else if (this._bodyFormData) {
  1426. throw new Error('could not read FormData body as text');
  1427. } else {
  1428. return Promise.resolve(this._bodyText);
  1429. }
  1430. };
  1431. } else {
  1432. this.text = function () {
  1433. var rejected = consumed(this);
  1434. return rejected ? rejected : Promise.resolve(this._bodyText);
  1435. };
  1436. }
  1437. if (support.formData) {
  1438. this.formData = function () {
  1439. return this.text().then(decode);
  1440. };
  1441. }
  1442. this.json = function () {
  1443. return this.text().then(JSON.parse);
  1444. };
  1445. return this;
  1446. }
  1447. // HTTP methods whose capitalization should be normalized
  1448. var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
  1449. function normalizeMethod(method) {
  1450. var upcased = method.toUpperCase();
  1451. return methods.indexOf(upcased) > -1 ? upcased : method;
  1452. }
  1453. function Request(input, options) {
  1454. options = options || {};
  1455. var body = options.body;
  1456. if (Request.prototype.isPrototypeOf(input)) {
  1457. if (input.bodyUsed) {
  1458. throw new TypeError('Already read');
  1459. }
  1460. this.url = input.url;
  1461. this.credentials = input.credentials;
  1462. if (!options.headers) {
  1463. this.headers = new Headers(input.headers);
  1464. }
  1465. this.method = input.method;
  1466. this.mode = input.mode;
  1467. if (!body) {
  1468. body = input._bodyInit;
  1469. input.bodyUsed = true;
  1470. }
  1471. } else {
  1472. this.url = input;
  1473. }
  1474. this.credentials = options.credentials || this.credentials || 'omit';
  1475. if (options.headers || !this.headers) {
  1476. this.headers = new Headers(options.headers);
  1477. }
  1478. this.method = normalizeMethod(options.method || this.method || 'GET');
  1479. this.mode = options.mode || this.mode || null;
  1480. this.referrer = null;
  1481. if ((this.method === 'GET' || this.method === 'HEAD') && body) {
  1482. throw new TypeError('Body not allowed for GET or HEAD requests');
  1483. }
  1484. this._initBody(body, options);
  1485. }
  1486. Request.prototype.clone = function () {
  1487. return new Request(this);
  1488. };
  1489. function decode(body) {
  1490. var form = new FormData();
  1491. body.trim().split('&').forEach(function (bytes) {
  1492. if (bytes) {
  1493. var split = bytes.split('=');
  1494. var name = split.shift().replace(/\+/g, ' ');
  1495. var value = split.join('=').replace(/\+/g, ' ');
  1496. form.append(decodeURIComponent(name), decodeURIComponent(value));
  1497. }
  1498. });
  1499. return form;
  1500. }
  1501. function headers(xhr) {
  1502. var head = new Headers();
  1503. var pairs = xhr.getAllResponseHeaders().trim().split('\n');
  1504. pairs.forEach(function (header) {
  1505. var split = header.trim().split(':');
  1506. var key = split.shift().trim();
  1507. var value = split.join(':').trim();
  1508. head.append(key, value);
  1509. });
  1510. return head;
  1511. }
  1512. Body.call(Request.prototype);
  1513. function Response(bodyInit, options) {
  1514. if (!options) {
  1515. options = {};
  1516. }
  1517. this._initBody(bodyInit, options);
  1518. this.type = 'default';
  1519. this.status = options.status;
  1520. this.ok = this.status >= 200 && this.status < 300;
  1521. this.statusText = options.statusText;
  1522. this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
  1523. this.url = options.url || '';
  1524. }
  1525. Body.call(Response.prototype);
  1526. Response.prototype.clone = function () {
  1527. return new Response(this._bodyInit, {
  1528. status: this.status,
  1529. statusText: this.statusText,
  1530. headers: new Headers(this.headers),
  1531. url: this.url
  1532. });
  1533. };
  1534. Response.error = function () {
  1535. var response = new Response(null, {
  1536. status: 0,
  1537. statusText: ''
  1538. });
  1539. response.type = 'error';
  1540. return response;
  1541. };
  1542. var redirectStatuses = [301, 302, 303, 307, 308];
  1543. Response.redirect = function (url, status) {
  1544. if (redirectStatuses.indexOf(status) === -1) {
  1545. throw new RangeError('Invalid status code');
  1546. }
  1547. return new Response(null, {
  1548. status: status,
  1549. headers: {
  1550. location: url
  1551. }
  1552. });
  1553. };
  1554. self.Headers = Headers;
  1555. self.Request = Request;
  1556. self.Response = Response;
  1557. self.fetch = function (input, init) {
  1558. return new Promise(function (resolve, reject) {
  1559. var request;
  1560. if (Request.prototype.isPrototypeOf(input) && !init) {
  1561. request = input;
  1562. } else {
  1563. request = new Request(input, init);
  1564. }
  1565. var xhr = new XMLHttpRequest();
  1566. function responseURL() {
  1567. if ('responseURL' in xhr) {
  1568. return xhr.responseURL;
  1569. }
  1570. // Avoid security warnings on getResponseHeader when not allowed by CORS
  1571. if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
  1572. return xhr.getResponseHeader('X-Request-URL');
  1573. }
  1574. return;
  1575. }
  1576. var __onLoadHandled = false;
  1577. function onload() {
  1578. if (xhr.readyState !== 4) {
  1579. return;
  1580. }
  1581. var status = xhr.status === 1223 ? 204 : xhr.status;
  1582. if (status < 100 || status > 599) {
  1583. if (__onLoadHandled) {
  1584. return;
  1585. } else {
  1586. __onLoadHandled = true;
  1587. }
  1588. reject(new TypeError('Network request failed'));
  1589. return;
  1590. }
  1591. var options = {
  1592. status: status,
  1593. statusText: xhr.statusText,
  1594. headers: headers(xhr),
  1595. url: responseURL()
  1596. };
  1597. var body = 'response' in xhr ? xhr.response : xhr.responseText;
  1598. if (__onLoadHandled) {
  1599. return;
  1600. } else {
  1601. __onLoadHandled = true;
  1602. }
  1603. resolve(new Response(body, options));
  1604. }
  1605. xhr.onreadystatechange = onload;
  1606. xhr.onload = onload;
  1607. xhr.onerror = function () {
  1608. if (__onLoadHandled) {
  1609. return;
  1610. } else {
  1611. __onLoadHandled = true;
  1612. }
  1613. reject(new TypeError('Network request failed'));
  1614. };
  1615. xhr.open(request.method, request.url, true);
  1616. // `withCredentials` should be setted after calling `.open` in IE10
  1617. // http://stackoverflow.com/a/19667959/1219343
  1618. try {
  1619. if (request.credentials === 'include') {
  1620. if ('withCredentials' in xhr) {
  1621. xhr.withCredentials = true;
  1622. } else {
  1623. console && console.warn && console.warn('withCredentials is not supported, you can ignore this warning');
  1624. }
  1625. }
  1626. } catch (e) {
  1627. console && console.warn && console.warn('set withCredentials error:' + e);
  1628. }
  1629. if ('responseType' in xhr && support.blob) {
  1630. xhr.responseType = 'blob';
  1631. }
  1632. request.headers.forEach(function (value, name) {
  1633. xhr.setRequestHeader(name, value);
  1634. });
  1635. xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
  1636. });
  1637. };
  1638. self.fetch.polyfill = true;
  1639. // Support CommonJS
  1640. if ( true && module.exports) {
  1641. module.exports = self.fetch;
  1642. }
  1643. })(typeof self !== 'undefined' ? self : this);
  1644. /***/ }),
  1645. /***/ 683:
  1646. /***/ (function(module, exports) {
  1647. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  1648. if (true) {
  1649. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  1650. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  1651. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  1652. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  1653. } else { var mod; }
  1654. })(this, function (exports, module) {
  1655. 'use strict';
  1656. var defaultOptions = {
  1657. timeout: 5000,
  1658. jsonpCallback: 'callback',
  1659. jsonpCallbackFunction: null
  1660. };
  1661. function generateCallbackFunction() {
  1662. return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);
  1663. }
  1664. function clearFunction(functionName) {
  1665. // IE8 throws an exception when you try to delete a property on window
  1666. // http://stackoverflow.com/a/1824228/751089
  1667. try {
  1668. delete window[functionName];
  1669. } catch (e) {
  1670. window[functionName] = undefined;
  1671. }
  1672. }
  1673. function removeScript(scriptId) {
  1674. var script = document.getElementById(scriptId);
  1675. if (script) {
  1676. document.getElementsByTagName('head')[0].removeChild(script);
  1677. }
  1678. }
  1679. function fetchJsonp(_url) {
  1680. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
  1681. // to avoid param reassign
  1682. var url = _url;
  1683. var timeout = options.timeout || defaultOptions.timeout;
  1684. var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;
  1685. var timeoutId = undefined;
  1686. return new Promise(function (resolve, reject) {
  1687. var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();
  1688. var scriptId = jsonpCallback + '_' + callbackFunction;
  1689. window[callbackFunction] = function (response) {
  1690. resolve({
  1691. ok: true,
  1692. // keep consistent with fetch API
  1693. json: function json() {
  1694. return Promise.resolve(response);
  1695. }
  1696. });
  1697. if (timeoutId) clearTimeout(timeoutId);
  1698. removeScript(scriptId);
  1699. clearFunction(callbackFunction);
  1700. };
  1701. // Check if the user set their own params, and if not add a ? to start a list of params
  1702. url += url.indexOf('?') === -1 ? '?' : '&';
  1703. var jsonpScript = document.createElement('script');
  1704. jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);
  1705. if (options.charset) {
  1706. jsonpScript.setAttribute('charset', options.charset);
  1707. }
  1708. jsonpScript.id = scriptId;
  1709. document.getElementsByTagName('head')[0].appendChild(jsonpScript);
  1710. timeoutId = setTimeout(function () {
  1711. reject(new Error('JSONP request to ' + _url + ' timed out'));
  1712. clearFunction(callbackFunction);
  1713. removeScript(scriptId);
  1714. window[callbackFunction] = function () {
  1715. clearFunction(callbackFunction);
  1716. };
  1717. }, timeout);
  1718. // Caught if got 404/500
  1719. jsonpScript.onerror = function () {
  1720. reject(new Error('JSONP request to ' + _url + ' failed'));
  1721. clearFunction(callbackFunction);
  1722. removeScript(scriptId);
  1723. if (timeoutId) clearTimeout(timeoutId);
  1724. };
  1725. });
  1726. }
  1727. // export as global function
  1728. /*
  1729. let local;
  1730. if (typeof global !== 'undefined') {
  1731. local = global;
  1732. } else if (typeof self !== 'undefined') {
  1733. local = self;
  1734. } else {
  1735. try {
  1736. local = Function('return this')();
  1737. } catch (e) {
  1738. throw new Error('polyfill failed because global object is unavailable in this environment');
  1739. }
  1740. }
  1741. local.fetchJsonp = fetchJsonp;
  1742. */
  1743. module.exports = fetchJsonp;
  1744. });
  1745. /***/ }),
  1746. /***/ 2347:
  1747. /***/ (function(module, exports, __webpack_require__) {
  1748. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  1749. (function (global, factory) {
  1750. ( false ? 0 : _typeof(exports)) === 'object' && "object" !== 'undefined' ? factory() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  1751. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  1752. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  1753. __WEBPACK_AMD_DEFINE_FACTORY__),
  1754. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : 0;
  1755. })(this, function () {
  1756. 'use strict';
  1757. /**
  1758. * @this {Promise}
  1759. */
  1760. function finallyConstructor(callback) {
  1761. var constructor = this.constructor;
  1762. return this.then(function (value) {
  1763. // @ts-ignore
  1764. return constructor.resolve(callback()).then(function () {
  1765. return value;
  1766. });
  1767. }, function (reason) {
  1768. // @ts-ignore
  1769. return constructor.resolve(callback()).then(function () {
  1770. // @ts-ignore
  1771. return constructor.reject(reason);
  1772. });
  1773. });
  1774. }
  1775. function allSettled(arr) {
  1776. var P = this;
  1777. return new P(function (resolve, reject) {
  1778. if (!(arr && typeof arr.length !== 'undefined')) {
  1779. return reject(new TypeError(_typeof(arr) + ' ' + arr + ' is not iterable(cannot read property Symbol(Symbol.iterator))'));
  1780. }
  1781. var args = Array.prototype.slice.call(arr);
  1782. if (args.length === 0) return resolve([]);
  1783. var remaining = args.length;
  1784. function res(i, val) {
  1785. if (val && (_typeof(val) === 'object' || typeof val === 'function')) {
  1786. var then = val.then;
  1787. if (typeof then === 'function') {
  1788. then.call(val, function (val) {
  1789. res(i, val);
  1790. }, function (e) {
  1791. args[i] = {
  1792. status: 'rejected',
  1793. reason: e
  1794. };
  1795. if (--remaining === 0) {
  1796. resolve(args);
  1797. }
  1798. });
  1799. return;
  1800. }
  1801. }
  1802. args[i] = {
  1803. status: 'fulfilled',
  1804. value: val
  1805. };
  1806. if (--remaining === 0) {
  1807. resolve(args);
  1808. }
  1809. }
  1810. for (var i = 0; i < args.length; i++) {
  1811. res(i, args[i]);
  1812. }
  1813. });
  1814. }
  1815. // Store setTimeout reference so promise-polyfill will be unaffected by
  1816. // other code modifying setTimeout (like sinon.useFakeTimers())
  1817. var setTimeoutFunc = setTimeout;
  1818. function isArray(x) {
  1819. return Boolean(x && typeof x.length !== 'undefined');
  1820. }
  1821. function noop() {}
  1822. // Polyfill for Function.prototype.bind
  1823. function bind(fn, thisArg) {
  1824. return function () {
  1825. fn.apply(thisArg, arguments);
  1826. };
  1827. }
  1828. /**
  1829. * @constructor
  1830. * @param {Function} fn
  1831. */
  1832. function Promise(fn) {
  1833. if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
  1834. if (typeof fn !== 'function') throw new TypeError('not a function');
  1835. /** @type {!number} */
  1836. this._state = 0;
  1837. /** @type {!boolean} */
  1838. this._handled = false;
  1839. /** @type {Promise|undefined} */
  1840. this._value = undefined;
  1841. /** @type {!Array<!Function>} */
  1842. this._deferreds = [];
  1843. doResolve(fn, this);
  1844. }
  1845. function handle(self, deferred) {
  1846. while (self._state === 3) {
  1847. self = self._value;
  1848. }
  1849. if (self._state === 0) {
  1850. self._deferreds.push(deferred);
  1851. return;
  1852. }
  1853. self._handled = true;
  1854. Promise._immediateFn(function () {
  1855. var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
  1856. if (cb === null) {
  1857. (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
  1858. return;
  1859. }
  1860. var ret;
  1861. try {
  1862. ret = cb(self._value);
  1863. } catch (e) {
  1864. reject(deferred.promise, e);
  1865. return;
  1866. }
  1867. resolve(deferred.promise, ret);
  1868. });
  1869. }
  1870. function resolve(self, newValue) {
  1871. try {
  1872. // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
  1873. if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
  1874. if (newValue && (_typeof(newValue) === 'object' || typeof newValue === 'function')) {
  1875. var then = newValue.then;
  1876. if (newValue instanceof Promise) {
  1877. self._state = 3;
  1878. self._value = newValue;
  1879. finale(self);
  1880. return;
  1881. } else if (typeof then === 'function') {
  1882. doResolve(bind(then, newValue), self);
  1883. return;
  1884. }
  1885. }
  1886. self._state = 1;
  1887. self._value = newValue;
  1888. finale(self);
  1889. } catch (e) {
  1890. reject(self, e);
  1891. }
  1892. }
  1893. function reject(self, newValue) {
  1894. self._state = 2;
  1895. self._value = newValue;
  1896. finale(self);
  1897. }
  1898. function finale(self) {
  1899. if (self._state === 2 && self._deferreds.length === 0) {
  1900. Promise._immediateFn(function () {
  1901. if (!self._handled) {
  1902. Promise._unhandledRejectionFn(self._value);
  1903. }
  1904. });
  1905. }
  1906. for (var i = 0, len = self._deferreds.length; i < len; i++) {
  1907. handle(self, self._deferreds[i]);
  1908. }
  1909. self._deferreds = null;
  1910. }
  1911. /**
  1912. * @constructor
  1913. */
  1914. function Handler(onFulfilled, onRejected, promise) {
  1915. this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
  1916. this.onRejected = typeof onRejected === 'function' ? onRejected : null;
  1917. this.promise = promise;
  1918. }
  1919. /**
  1920. * Take a potentially misbehaving resolver function and make sure
  1921. * onFulfilled and onRejected are only called once.
  1922. *
  1923. * Makes no guarantees about asynchrony.
  1924. */
  1925. function doResolve(fn, self) {
  1926. var done = false;
  1927. try {
  1928. fn(function (value) {
  1929. if (done) return;
  1930. done = true;
  1931. resolve(self, value);
  1932. }, function (reason) {
  1933. if (done) return;
  1934. done = true;
  1935. reject(self, reason);
  1936. });
  1937. } catch (ex) {
  1938. if (done) return;
  1939. done = true;
  1940. reject(self, ex);
  1941. }
  1942. }
  1943. Promise.prototype['catch'] = function (onRejected) {
  1944. return this.then(null, onRejected);
  1945. };
  1946. Promise.prototype.then = function (onFulfilled, onRejected) {
  1947. // @ts-ignore
  1948. var prom = new this.constructor(noop);
  1949. handle(this, new Handler(onFulfilled, onRejected, prom));
  1950. return prom;
  1951. };
  1952. Promise.prototype['finally'] = finallyConstructor;
  1953. Promise.all = function (arr) {
  1954. return new Promise(function (resolve, reject) {
  1955. if (!isArray(arr)) {
  1956. return reject(new TypeError('Promise.all accepts an array'));
  1957. }
  1958. var args = Array.prototype.slice.call(arr);
  1959. if (args.length === 0) return resolve([]);
  1960. var remaining = args.length;
  1961. function res(i, val) {
  1962. try {
  1963. if (val && (_typeof(val) === 'object' || typeof val === 'function')) {
  1964. var then = val.then;
  1965. if (typeof then === 'function') {
  1966. then.call(val, function (val) {
  1967. res(i, val);
  1968. }, reject);
  1969. return;
  1970. }
  1971. }
  1972. args[i] = val;
  1973. if (--remaining === 0) {
  1974. resolve(args);
  1975. }
  1976. } catch (ex) {
  1977. reject(ex);
  1978. }
  1979. }
  1980. for (var i = 0; i < args.length; i++) {
  1981. res(i, args[i]);
  1982. }
  1983. });
  1984. };
  1985. Promise.allSettled = allSettled;
  1986. Promise.resolve = function (value) {
  1987. if (value && _typeof(value) === 'object' && value.constructor === Promise) {
  1988. return value;
  1989. }
  1990. return new Promise(function (resolve) {
  1991. resolve(value);
  1992. });
  1993. };
  1994. Promise.reject = function (value) {
  1995. return new Promise(function (resolve, reject) {
  1996. reject(value);
  1997. });
  1998. };
  1999. Promise.race = function (arr) {
  2000. return new Promise(function (resolve, reject) {
  2001. if (!isArray(arr)) {
  2002. return reject(new TypeError('Promise.race accepts an array'));
  2003. }
  2004. for (var i = 0, len = arr.length; i < len; i++) {
  2005. Promise.resolve(arr[i]).then(resolve, reject);
  2006. }
  2007. });
  2008. };
  2009. // Use polyfill for setImmediate for performance gains
  2010. Promise._immediateFn =
  2011. // @ts-ignore
  2012. typeof setImmediate === 'function' && function (fn) {
  2013. // @ts-ignore
  2014. setImmediate(fn);
  2015. } || function (fn) {
  2016. setTimeoutFunc(fn, 0);
  2017. };
  2018. Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
  2019. if (typeof console !== 'undefined' && console) {
  2020. console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
  2021. }
  2022. };
  2023. /** @suppress {undefinedVars} */
  2024. var globalNS = function () {
  2025. // the only reliable means to get the global object is
  2026. // `Function('return this')()`
  2027. // However, this causes CSP violations in Chrome apps.
  2028. if (typeof self !== 'undefined') {
  2029. return self;
  2030. }
  2031. if (typeof window !== 'undefined') {
  2032. return window;
  2033. }
  2034. if (typeof __webpack_require__.g !== 'undefined') {
  2035. return __webpack_require__.g;
  2036. }
  2037. throw new Error('unable to locate global object');
  2038. }();
  2039. // Expose the polyfill if Promise is undefined or set to a
  2040. // non-function value. The latter can be due to a named HTMLElement
  2041. // being exposed by browsers for legacy reasons.
  2042. // https://github.com/taylorhakes/promise-polyfill/issues/114
  2043. if (typeof globalNS['Promise'] !== 'function') {
  2044. globalNS['Promise'] = Promise;
  2045. } else {
  2046. if (!globalNS.Promise.prototype['finally']) {
  2047. globalNS.Promise.prototype['finally'] = finallyConstructor;
  2048. }
  2049. if (!globalNS.Promise.allSettled) {
  2050. globalNS.Promise.allSettled = allSettled;
  2051. }
  2052. }
  2053. });
  2054. /***/ }),
  2055. /***/ 8212:
  2056. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  2057. "use strict";
  2058. // UNUSED EXPORTS: AddressMatchService, BuffersAnalystJobsParameter, DatasetService, DatasourceService, ElasticSearch, GeoCodingParameter, GeoDecodingParameter, KernelDensityJobParameter, MapVLayer, MapVRenderer, MappingParameters, OutputSetting, OverlayGeoJobParameter, ProcessingService, SecurityManager, SingleObjectQueryJobsParameter, SummaryAttributesJobsParameter, SummaryMeshJobParameter, SummaryRegionJobParameter, SuperMap, TopologyValidatorJobsParameter, Util
  2059. ;// CONCATENATED MODULE: ./src/common/commontypes/Pixel.js
  2060. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2061. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  2062. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  2063. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  2064. * This program are made available under the terms of the Apache License, Version 2.0
  2065. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  2066. /**
  2067. * @class Pixel
  2068. * @deprecatedclass SuperMap.Pixel
  2069. * @category BaseTypes Geometry
  2070. * @classdesc 用 x,y 坐标描绘屏幕坐标(像素点)。
  2071. * @param {number} [x=0.0] - x 坐标。
  2072. * @param {number} [y=0.0] - y 坐标。
  2073. * @param {Pixel.Mode} [mode=Pixel.Mode.LeftTop] - 坐标模式。
  2074. *
  2075. * @example
  2076. * //单独创建一个对象
  2077. * var pixcel = new Pixel(100,50);
  2078. *
  2079. * //依据 size 创建
  2080. * var size = new Size(21,25);
  2081. * var offset = new Pixel(-(size.w/2), -size.h);
  2082. * @usage
  2083. */
  2084. var Pixel = /*#__PURE__*/function () {
  2085. function Pixel(x, y, mode) {
  2086. _classCallCheck(this, Pixel);
  2087. /**
  2088. * @member {number} [Pixel.prototype.x=0.0]
  2089. * @description x 坐标。
  2090. */
  2091. this.x = x ? parseFloat(x) : 0.0;
  2092. /**
  2093. * @member {number} [Pixel.prototype.y=0.0]
  2094. * @description y 坐标。
  2095. */
  2096. this.y = y ? parseFloat(y) : 0.0;
  2097. /**
  2098. * @member {Pixel.Mode} [Pixel.prototype.mode=Pixel.Mode.LeftTop]
  2099. * @description 坐标模式,有左上、右上、右下、左下这几种模式,分别表示相对于左上角、右上角、右下角、左下角的坐标。
  2100. */
  2101. this.mode = mode;
  2102. this.CLASS_NAME = 'SuperMap.Pixel';
  2103. }
  2104. /**
  2105. * @function Pixel.prototype.toString
  2106. * @description 返回此对象的字符串形式。
  2107. * @example
  2108. *
  2109. * var pixcel = new Pixel(100,50);
  2110. * var str = pixcel.toString();
  2111. *
  2112. * @returns {string} 例如: "x=200.4,y=242.2"
  2113. */
  2114. _createClass(Pixel, [{
  2115. key: "toString",
  2116. value: function toString() {
  2117. return 'x=' + this.x + ',y=' + this.y;
  2118. }
  2119. /**
  2120. * @function Pixel.prototype.clone
  2121. * @description 克隆当前的 pixel 对象。
  2122. * @example
  2123. * var pixcel = new Pixel(100,50);
  2124. * var pixcel2 = pixcel.clone();
  2125. * @returns {Pixel} 新的与当前 pixel 对象有相同 x、y 坐标的 pixel 对象。
  2126. */
  2127. }, {
  2128. key: "clone",
  2129. value: function clone() {
  2130. return new Pixel(this.x, this.y, this.mode);
  2131. }
  2132. /**
  2133. * @function Pixel.prototype.equals
  2134. * @description 比较两 pixel 是否相等。
  2135. * @example
  2136. * var pixcel = new Pixel(100,50);
  2137. * var pixcel2 = new Pixel(100,50);
  2138. * var isEquals = pixcel.equals(pixcel2);
  2139. *
  2140. * @param {Pixel} px - 用于比较相等的 pixel 对象。
  2141. * @returns {boolean} 如果传入的像素点和当前像素点相同返回 true,如果不同或传入参数为 NULL 则返回 false。
  2142. */
  2143. }, {
  2144. key: "equals",
  2145. value: function equals(px) {
  2146. var equals = false;
  2147. if (px != null) {
  2148. equals = this.x == px.x && this.y == px.y || isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y);
  2149. }
  2150. return equals;
  2151. }
  2152. /**
  2153. * @function Pixel.prototype.distanceTo
  2154. * @description 返回两个 pixel 的距离。
  2155. * @example
  2156. * var pixcel = new Pixel(100,50);
  2157. * var pixcel2 = new Pixel(110,30);
  2158. * var distance = pixcel.distanceTo(pixcel2);
  2159. *
  2160. * @param {Pixel} px - 需要计算的 pixel。
  2161. * @returns {number} 作为参数传入的像素与当前像素点的距离。
  2162. */
  2163. }, {
  2164. key: "distanceTo",
  2165. value: function distanceTo(px) {
  2166. return Math.sqrt(Math.pow(this.x - px.x, 2) + Math.pow(this.y - px.y, 2));
  2167. }
  2168. /**
  2169. * @function Pixel.prototype.add
  2170. * @description 在原来像素坐标基础上,x 值加上传入的 x 参数,y 值加上传入的 y 参数。
  2171. * @example
  2172. * var pixcel = new Pixel(100,50);
  2173. * //pixcel2是新的对象
  2174. * var pixcel2 = pixcel.add(20,30);
  2175. *
  2176. * @param {number} x - 传入的 x 值。
  2177. * @param {number} y - 传入的 y 值。
  2178. * @returns {Pixel} 新的 pixel 对象,该 pixel 是由当前的 pixel 与传入的 x,y 相加得到。
  2179. */
  2180. }, {
  2181. key: "add",
  2182. value: function add(x, y) {
  2183. if (x == null || y == null) {
  2184. throw new TypeError('Pixel.add cannot receive null values');
  2185. }
  2186. return new Pixel(this.x + x, this.y + y);
  2187. }
  2188. /**
  2189. * @function Pixel.prototype.offset
  2190. * @description 通过传入的 {@link Pixel} 参数对原屏幕坐标进行偏移。
  2191. * @example
  2192. * var pixcel = new Pixel(100,50);
  2193. * var pixcel2 = new Pixel(130,20);
  2194. * //pixcel3 是新的对象
  2195. * var pixcel3 = pixcel.offset(pixcel2);
  2196. *
  2197. * @param {Pixel} px - 传入的 {@link Pixel} 对象。
  2198. * @returns {Pixel} 新的 pixel,该 pixel 是由当前的 pixel 对象的 x,y 值与传入的 Pixel 对象的 x,y 值相加得到。
  2199. */
  2200. }, {
  2201. key: "offset",
  2202. value: function offset(px) {
  2203. var newPx = this.clone();
  2204. if (px) {
  2205. newPx = this.add(px.x, px.y);
  2206. }
  2207. return newPx;
  2208. }
  2209. /**
  2210. *
  2211. * @function Pixel.prototype.destroy
  2212. * @description 销毁此对象。销毁后此对象的所有属性为 null,而不是初始值。
  2213. * @example
  2214. * var pixcel = new Pixel(100,50);
  2215. * pixcel.destroy();
  2216. */
  2217. }, {
  2218. key: "destroy",
  2219. value: function destroy() {
  2220. this.x = null;
  2221. this.y = null;
  2222. this.mode = null;
  2223. }
  2224. }]);
  2225. return Pixel;
  2226. }();
  2227. /**
  2228. * @enum Mode
  2229. * @memberOf Pixel
  2230. * @readonly
  2231. * @description 模式。
  2232. * @type {string}
  2233. */
  2234. Pixel.Mode = {
  2235. /** 左上模式。*/
  2236. LeftTop: 'lefttop',
  2237. /** 右上模式。 */
  2238. RightTop: 'righttop',
  2239. /** 右下模式。 */
  2240. RightBottom: 'rightbottom',
  2241. /** 左下模式。 */
  2242. LeftBottom: 'leftbottom'
  2243. };
  2244. ;// CONCATENATED MODULE: ./src/common/commontypes/BaseTypes.js
  2245. function BaseTypes_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  2246. function BaseTypes_createClass(Constructor, protoProps, staticProps) { if (protoProps) BaseTypes_defineProperties(Constructor.prototype, protoProps); if (staticProps) BaseTypes_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  2247. function BaseTypes_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2248. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  2249. * This program are made available under the terms of the Apache License, Version 2.0
  2250. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  2251. /**
  2252. * @function inherit
  2253. * @description 除了 C 和 P 两个必要参数外,可以传递任意数量的对象,这些对象都将继承C。
  2254. * @param {Object} C - 继承的类。
  2255. * @param {Object} P - 被继承的父类。
  2256. * @private
  2257. */
  2258. var inheritExt = function inheritExt(C, P) {
  2259. var F = function F() {};
  2260. F.prototype = P.prototype;
  2261. C.prototype = new F();
  2262. var i, l, o;
  2263. for (i = 2, l = arguments.length; i < l; i++) {
  2264. o = arguments[i];
  2265. if (typeof o === "function") {
  2266. o = o.prototype;
  2267. }
  2268. Util.extend(C.prototype, o);
  2269. }
  2270. };
  2271. /**
  2272. * @function mixinExt
  2273. * @description 实现多重继承。
  2274. * @param {Class|Object} ...mixins - 继承的类。
  2275. * @private
  2276. */
  2277. var mixinExt = function mixinExt() {
  2278. for (var _len = arguments.length, mixins = new Array(_len), _key = 0; _key < _len; _key++) {
  2279. mixins[_key] = arguments[_key];
  2280. }
  2281. var Mix = /*#__PURE__*/BaseTypes_createClass(function Mix(options) {
  2282. BaseTypes_classCallCheck(this, Mix);
  2283. for (var index = 0; index < mixins.length; index++) {
  2284. copyProperties(this, new mixins[index](options));
  2285. }
  2286. });
  2287. for (var index = 0; index < mixins.length; index++) {
  2288. var mixin = mixins[index];
  2289. copyProperties(Mix, mixin);
  2290. copyProperties(Mix.prototype, mixin.prototype);
  2291. copyProperties(Mix.prototype, new mixin());
  2292. }
  2293. return Mix;
  2294. function copyProperties(target, source) {
  2295. var ownKeys = Object.getOwnPropertyNames(source);
  2296. if (Object.getOwnPropertySymbols) {
  2297. ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source));
  2298. }
  2299. for (var index = 0; index < ownKeys.length; index++) {
  2300. var key = ownKeys[index];
  2301. if (key !== "constructor" && key !== "prototype" && key !== "name" && key !== "length") {
  2302. var desc = Object.getOwnPropertyDescriptor(source, key);
  2303. if (window["ActiveXObject"]) {
  2304. Object.defineProperty(target, key, desc || {});
  2305. } else {
  2306. Object.defineProperty(target, key, desc);
  2307. }
  2308. }
  2309. }
  2310. }
  2311. };
  2312. /**
  2313. * @name String
  2314. * @namespace
  2315. * @category BaseTypes Util
  2316. * @description 字符串操作的一系列常用扩展函数。
  2317. * @private
  2318. */
  2319. var StringExt = {
  2320. /**
  2321. * @function StringExt.startsWith
  2322. * @description 判断目标字符串是否以指定的子字符串开头。
  2323. * @param {string} str - 目标字符串。
  2324. * @param {string} sub - 查找的子字符串。
  2325. * @returns {boolean} 目标字符串以指定的子字符串开头,则返回 true;否则返回 false。
  2326. */
  2327. startsWith: function startsWith(str, sub) {
  2328. return str.indexOf(sub) == 0;
  2329. },
  2330. /**
  2331. * @function StringExt.contains
  2332. * @description 判断目标字符串是否包含指定的子字符串。
  2333. * @param {string} str - 目标字符串。
  2334. * @param {string} sub - 查找的子字符串。
  2335. * @returns {boolean} 目标字符串中包含指定的子字符串,则返回 true;否则返回 false。
  2336. */
  2337. contains: function contains(str, sub) {
  2338. return str.indexOf(sub) != -1;
  2339. },
  2340. /**
  2341. * @function StringExt.trim
  2342. * @description 删除一个字符串的开头和结尾处的所有空白字符。
  2343. * @param {string} str - (可能)存在空白字符填塞的字符串。
  2344. * @returns {string} 删除开头和结尾处空白字符后的字符串。
  2345. */
  2346. trim: function trim(str) {
  2347. return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  2348. },
  2349. /**
  2350. * @function StringExt.camelize
  2351. * @description 骆驼式("-")连字符的字符串处理。
  2352. * 例如:"chicken-head" becomes "chickenHead",
  2353. * "-chicken-head" becomes "ChickenHead"。
  2354. * @param {string} str - 要处理的字符串,原始内容不应被修改。
  2355. * @returns {string}
  2356. */
  2357. camelize: function camelize(str) {
  2358. var oStringList = str.split('-');
  2359. var camelizedString = oStringList[0];
  2360. for (var i = 1, len = oStringList.length; i < len; i++) {
  2361. var s = oStringList[i];
  2362. camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
  2363. }
  2364. return camelizedString;
  2365. },
  2366. /**
  2367. * @function StringExt.format
  2368. * @description 提供带 ${token} 标记的字符串, 返回 context 对象属性中指定标记的属性值。
  2369. * @example
  2370. * 示例:
  2371. * (code)
  2372. * 1、template = "${value,getValue}";
  2373. * context = {value: {getValue:function(){return Math.max.apply(null,argument);}}};
  2374. * args = [2,23,12,36,21];
  2375. * 返回值:36
  2376. * (end)
  2377. * 示例:
  2378. * (code)
  2379. * 2、template = "$${{value,getValue}}";
  2380. * context = {value: {getValue:function(){return Math.max.apply(null,argument);}}};
  2381. * args = [2,23,12,36,21];
  2382. * 返回值:"${36}"
  2383. * (end)
  2384. * 示例:
  2385. * (code)
  2386. * 3、template = "${a,b}";
  2387. * context = {a: {b:"format"}};
  2388. * args = null;
  2389. * 返回值:"format"
  2390. * (end)
  2391. * 示例:
  2392. * (code)
  2393. * 3、template = "${a,b}";
  2394. * context = null;
  2395. * args = null;
  2396. * 返回值:"${a.b}"
  2397. * (end)
  2398. * @param {string} template - 带标记的字符串将要被替换。参数 template 格式为"${token}",此处的 token 标记会替换为 context["token"] 属性的值。
  2399. * @param {Object} [context=window] - 带有属性的可选对象的属性用于匹配格式化字符串中的标记。如果该参数为空,将使用 window 对象。
  2400. * @param {Array.<number>} [args] - 可选参数传递给在 context 对象上找到的函数。
  2401. * @returns {string} 从 context 对象属性中替换字符串标记位的字符串。
  2402. */
  2403. format: function format(template, context, args) {
  2404. if (!context) {
  2405. context = window;
  2406. }
  2407. // Example matching:
  2408. // str = ${foo.bar}
  2409. // match = foo.bar
  2410. var replacer = function replacer(str, match) {
  2411. var replacement;
  2412. // Loop through all subs. Example: ${a.b.c}
  2413. // 0 -> replacement = context[a];
  2414. // 1 -> replacement = context[a][b];
  2415. // 2 -> replacement = context[a][b][c];
  2416. var subs = match.split(/\.+/);
  2417. for (var i = 0; i < subs.length; i++) {
  2418. if (i == 0) {
  2419. replacement = context;
  2420. }
  2421. replacement = replacement[subs[i]];
  2422. }
  2423. if (typeof replacement === "function") {
  2424. replacement = args ? replacement.apply(null, args) : replacement();
  2425. }
  2426. // If replacement is undefined, return the string 'undefined'.
  2427. // This is a workaround for a bugs in browsers not properly
  2428. // dealing with non-participating groups in regular expressions:
  2429. // http://blog.stevenlevithan.com/archives/npcg-javascript
  2430. if (typeof replacement == 'undefined') {
  2431. return 'undefined';
  2432. } else {
  2433. return replacement;
  2434. }
  2435. };
  2436. return template.replace(StringExt.tokenRegEx, replacer);
  2437. },
  2438. /**
  2439. * @member {RegExp} [StringExt.tokenRegEx]
  2440. * @description 寻找带 token 的字符串,默认为 tokenRegEx=/\$\{([\w.]+?)\}/g。
  2441. * @example
  2442. * Examples: ${a}, ${a.b.c}, ${a-b}, ${5}
  2443. */
  2444. tokenRegEx: /\$\{([\w.]+?)\}/g,
  2445. /**
  2446. * @member {RegExp} [StringExt.numberRegEx]
  2447. * @description 判断一个字符串是否只包含一个数值,默认为 numberRegEx=/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/。
  2448. */
  2449. numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
  2450. /**
  2451. * @function StringExt.isNumeric
  2452. * @description 判断一个字符串是否只包含一个数值。
  2453. * @example
  2454. * (code)
  2455. * StringExt.isNumeric("6.02e23") // true
  2456. * StringExt.isNumeric("12 dozen") // false
  2457. * StringExt.isNumeric("4") // true
  2458. * StringExt.isNumeric(" 4 ") // false
  2459. * (end)
  2460. * @returns {boolean} 字符串包含唯一的数值,返回 true;否则返回 false。
  2461. */
  2462. isNumeric: function isNumeric(value) {
  2463. return StringExt.numberRegEx.test(value);
  2464. },
  2465. /**
  2466. * @function StringExt.numericIf
  2467. * @description 把一个看似数值型的字符串转化为一个数值。
  2468. * @returns {(number|string)} 如果能转换为数值则返回数值,否则返回字符串本身。
  2469. */
  2470. numericIf: function numericIf(value) {
  2471. return StringExt.isNumeric(value) ? parseFloat(value) : value;
  2472. }
  2473. };
  2474. /**
  2475. * @name Number
  2476. * @namespace
  2477. * @category BaseTypes Util
  2478. * @description 数值操作的一系列常用扩展函数。
  2479. * @private
  2480. */
  2481. var NumberExt = {
  2482. /**
  2483. * @member {string} [NumberExt.decimalSeparator='.']
  2484. * @description 格式化数字时默认的小数点分隔符。
  2485. * @constant
  2486. */
  2487. decimalSeparator: ".",
  2488. /**
  2489. * @member {string} [NumberExt.thousandsSeparator=',']
  2490. * @description 格式化数字时默认的千位分隔符。
  2491. * @constant
  2492. */
  2493. thousandsSeparator: ",",
  2494. /**
  2495. * @function NumberExt.limitSigDigs
  2496. * @description 限制浮点数的有效数字位数。
  2497. * @param {number} num - 浮点数。
  2498. * @param {number} sig - 有效位数。
  2499. * @returns {number} 将数字四舍五入到指定数量的有效位数。
  2500. */
  2501. limitSigDigs: function limitSigDigs(num, sig) {
  2502. var fig = 0;
  2503. if (sig > 0) {
  2504. fig = parseFloat(num.toPrecision(sig));
  2505. }
  2506. return fig;
  2507. },
  2508. /**
  2509. * @function NumberExt.format
  2510. * @description 数字格式化输出。
  2511. * @param {number} num - 数字。
  2512. * @param {number} [dec=0] - 数字的小数部分四舍五入到指定的位数。设置为 null 值时小数部分不变。
  2513. * @param {string} [tsep=','] - 千位分隔符。
  2514. * @param {string} [dsep='.'] - 小数点分隔符。
  2515. * @returns {string} 数字格式化后的字符串。
  2516. */
  2517. format: function format(num, dec, tsep, dsep) {
  2518. dec = typeof dec != "undefined" ? dec : 0;
  2519. tsep = typeof tsep != "undefined" ? tsep : NumberExt.thousandsSeparator;
  2520. dsep = typeof dsep != "undefined" ? dsep : NumberExt.decimalSeparator;
  2521. if (dec != null) {
  2522. num = parseFloat(num.toFixed(dec));
  2523. }
  2524. var parts = num.toString().split(".");
  2525. if (parts.length === 1 && dec == null) {
  2526. // integer where we do not want to touch the decimals
  2527. dec = 0;
  2528. }
  2529. var integer = parts[0];
  2530. if (tsep) {
  2531. var thousands = /(-?[0-9]+)([0-9]{3})/;
  2532. while (thousands.test(integer)) {
  2533. integer = integer.replace(thousands, "$1" + tsep + "$2");
  2534. }
  2535. }
  2536. var str;
  2537. if (dec == 0) {
  2538. str = integer;
  2539. } else {
  2540. var rem = parts.length > 1 ? parts[1] : "0";
  2541. if (dec != null) {
  2542. rem = rem + new Array(dec - rem.length + 1).join("0");
  2543. }
  2544. str = integer + dsep + rem;
  2545. }
  2546. return str;
  2547. }
  2548. };
  2549. if (!Number.prototype.limitSigDigs) {
  2550. /**
  2551. * APIMethod: Number.limitSigDigs
  2552. * 限制浮点数的有效数字位数.
  2553. * @param {number} sig -有效位数。
  2554. * @returns {number} 将数字四舍五入到指定数量的有效位数。
  2555. * 如果传入值 为 null、0、或者是负数, 返回值 0。
  2556. */
  2557. Number.prototype.limitSigDigs = function (sig) {
  2558. return NumberExt.limitSigDigs(this, sig);
  2559. };
  2560. }
  2561. /**
  2562. * @name Function
  2563. * @namespace
  2564. * @category BaseTypes Util
  2565. * @description 函数操作的一系列常用扩展函数。
  2566. * @private
  2567. */
  2568. var FunctionExt = {
  2569. /**
  2570. * @function FunctionExt.bind
  2571. * @description 绑定函数到对象。方便创建 this 的作用域。
  2572. * @param {function} func - 输入函数。
  2573. * @param {Object} object - 对象绑定到输入函数(作为输入函数的 this 对象)。
  2574. * @returns {function} object 参数作为 func 函数的 this 对象。
  2575. */
  2576. bind: function bind(func, object) {
  2577. // create a reference to all arguments past the second one
  2578. var args = Array.prototype.slice.apply(arguments, [2]);
  2579. return function () {
  2580. // Push on any additional arguments from the actual function call.
  2581. // These will come after those sent to the bind call.
  2582. var newArgs = args.concat(Array.prototype.slice.apply(arguments, [0]));
  2583. return func.apply(object, newArgs);
  2584. };
  2585. },
  2586. /**
  2587. * @function FunctionExt.bindAsEventListener
  2588. * @description 绑定函数到对象,在调用该函数时配置并使用事件对象作为第一个参数。
  2589. * @param {function} func - 用于监听事件的函数。
  2590. * @param {Object} object - this 对象的引用。
  2591. * @returns {function}
  2592. */
  2593. bindAsEventListener: function bindAsEventListener(func, object) {
  2594. return function (event) {
  2595. return func.call(object, event || window.event);
  2596. };
  2597. },
  2598. /**
  2599. * @function FunctionExt.False
  2600. * @description 该函数仅仅返回 false。该函数主要是避免在 IE8 以下浏览中 DOM 事件句柄的匿名函数问题。
  2601. * @example
  2602. * document.onclick = FunctionExt.False;
  2603. * @returns {boolean}
  2604. */
  2605. False: function False() {
  2606. return false;
  2607. },
  2608. /**
  2609. * @function FunctionExt.True
  2610. * @description 该函数仅仅返回 true。该函数主要是避免在 IE8 以下浏览中 DOM 事件句柄的匿名函数问题。
  2611. * @example
  2612. * document.onclick = FunctionExt.True;
  2613. * @returns {boolean}
  2614. */
  2615. True: function True() {
  2616. return true;
  2617. },
  2618. /**
  2619. * @function FunctionExt.Void
  2620. * @description 可重用函数,仅仅返回 "undefined"。
  2621. * @returns {undefined}
  2622. */
  2623. Void: function Void() {}
  2624. };
  2625. /**
  2626. * @name Array
  2627. * @namespace
  2628. * @category BaseTypes Util
  2629. * @description 数组操作的一系列常用扩展函数。
  2630. * @private
  2631. */
  2632. var ArrayExt = {
  2633. /**
  2634. * @function ArrayExt.filter
  2635. * @description 过滤数组,提供了 ECMA-262 标准中 Array.prototype.filter 函数的扩展。详见:{@link http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter}
  2636. * @param {Array} array - 要过滤的数组。
  2637. * @param {function} callback - 数组中的每一个元素调用该函数。</br>
  2638. * 如果函数的返回值为 true,该元素将包含在返回的数组中。该函数有三个参数: 数组中的元素,元素的索引,数组自身。</br>
  2639. * 如果设置了可选参数 caller,在调用 callback 时,使用可选参数 caller 设置为 callback 的参数。</br>
  2640. * @param {Object} [caller] - 在调用 callback 时,使用参数 caller 设置为 callback 的参数。
  2641. * @returns {Array} callback 函数返回 true 时的元素将作为返回数组中的元素。
  2642. */
  2643. filter: function filter(array, callback, caller) {
  2644. var selected = [];
  2645. if (Array.prototype.filter) {
  2646. selected = array.filter(callback, caller);
  2647. } else {
  2648. var len = array.length;
  2649. if (typeof callback != "function") {
  2650. throw new TypeError();
  2651. }
  2652. for (var i = 0; i < len; i++) {
  2653. if (i in array) {
  2654. var val = array[i];
  2655. if (callback.call(caller, val, i, array)) {
  2656. selected.push(val);
  2657. }
  2658. }
  2659. }
  2660. }
  2661. return selected;
  2662. }
  2663. };
  2664. ;// CONCATENATED MODULE: ./src/common/commontypes/Geometry.js
  2665. function Geometry_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  2666. function Geometry_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  2667. function Geometry_createClass(Constructor, protoProps, staticProps) { if (protoProps) Geometry_defineProperties(Constructor.prototype, protoProps); if (staticProps) Geometry_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  2668. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  2669. * This program are made available under the terms of the Apache License, Version 2.0
  2670. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  2671. // import {WKT} from '../format/WKT';
  2672. // import {Vector} from './Vector';
  2673. /**
  2674. * @class Geometry
  2675. * @deprecatedclass SuperMap.Geometry
  2676. * @category BaseTypes Geometry
  2677. * @classdesc 几何对象类,描述地理对象的几何图形。
  2678. * @usage
  2679. */
  2680. var Geometry = /*#__PURE__*/function () {
  2681. function Geometry() {
  2682. Geometry_classCallCheck(this, Geometry);
  2683. this.CLASS_NAME = "SuperMap.Geometry";
  2684. /**
  2685. * @member {string} Geometry.prototype.id
  2686. * @description 几何对象的唯一标识符。
  2687. *
  2688. */
  2689. this.id = Util_Util.createUniqueID(this.CLASS_NAME + "_");
  2690. /**
  2691. * @member {Geometry} Geometry.prototype.parent
  2692. * @description 父类几何对象。
  2693. */
  2694. this.parent = null;
  2695. /**
  2696. * @member {Bounds} Geometry.prototype.bounds
  2697. * @description 几何对象的范围。
  2698. *
  2699. */
  2700. this.bounds = null;
  2701. /**
  2702. * @member {number} Geometry.prototype.SRID
  2703. * @description 投影坐标参数。通过该参数,服务器判断 Geometry 对象的坐标参考系是否与数据集相同,如果不同,则在数据入库前进行投影变换。
  2704. * @example
  2705. * var geometry= new Geometry();
  2706. * geometry. SRID=4326;
  2707. *
  2708. */
  2709. this.SRID = null;
  2710. }
  2711. /**
  2712. * @function Geometry.prototype.destroy
  2713. * @description 解构 Geometry 类,释放资源。
  2714. */
  2715. Geometry_createClass(Geometry, [{
  2716. key: "destroy",
  2717. value: function destroy() {
  2718. this.id = null;
  2719. this.bounds = null;
  2720. this.SRID = null;
  2721. }
  2722. /**
  2723. * @function Geometry.prototype.clone
  2724. * @description 克隆几何图形。克隆的几何图形不设置非标准的属性。
  2725. * @returns {Geometry} 克隆的几何图形。
  2726. */
  2727. }, {
  2728. key: "clone",
  2729. value: function clone() {
  2730. return new Geometry();
  2731. }
  2732. /**
  2733. * @function Geometry.prototype.setBounds
  2734. * @description 设置几何对象的 bounds。
  2735. * @param {Bounds} bounds - 范围。
  2736. */
  2737. }, {
  2738. key: "setBounds",
  2739. value: function setBounds(bounds) {
  2740. if (bounds) {
  2741. this.bounds = bounds.clone();
  2742. }
  2743. }
  2744. /**
  2745. * @function Geometry.prototype.clearBounds
  2746. * @description 清除几何对象的 bounds。
  2747. * 如果该对象有父类,也会清除父类几何对象的 bounds。
  2748. */
  2749. }, {
  2750. key: "clearBounds",
  2751. value: function clearBounds() {
  2752. this.bounds = null;
  2753. if (this.parent) {
  2754. this.parent.clearBounds();
  2755. }
  2756. }
  2757. /**
  2758. * @function Geometry.prototype.extendBounds
  2759. * @description 扩展现有边界以包含新边界。如果尚未设置几何边界,则设置新边界。
  2760. * @param {Bounds} newBounds - 几何对象的 bounds。
  2761. */
  2762. }, {
  2763. key: "extendBounds",
  2764. value: function extendBounds(newBounds) {
  2765. var bounds = this.getBounds();
  2766. if (!bounds) {
  2767. this.setBounds(newBounds);
  2768. } else {
  2769. this.bounds.extend(newBounds);
  2770. }
  2771. }
  2772. /**
  2773. * @function Geometry.prototype.getBounds
  2774. * @description 获得几何图形的边界。如果没有设置边界,可通过计算获得。
  2775. * @returns {Bounds} 几何对象的边界。
  2776. */
  2777. }, {
  2778. key: "getBounds",
  2779. value: function getBounds() {
  2780. if (this.bounds == null) {
  2781. this.calculateBounds();
  2782. }
  2783. return this.bounds;
  2784. }
  2785. /**
  2786. * @function Geometry.prototype.calculateBounds
  2787. * @description 重新计算几何图形的边界(需要在子类中实现此方法)。
  2788. */
  2789. }, {
  2790. key: "calculateBounds",
  2791. value: function calculateBounds() {
  2792. //
  2793. // This should be overridden by subclasses.
  2794. //
  2795. }
  2796. /**
  2797. * @function Geometry.prototype.getVertices
  2798. * @description 返回几何图形的所有顶点的列表(需要在子类中实现此方法)。
  2799. * @param {boolean} [nodes] - 如果是 true,线则只返回线的末端点,如果 false,仅仅返回顶点,如果没有设置,则返回顶点。
  2800. * @returns {Array} 几何图形的顶点列表。
  2801. */
  2802. }, {
  2803. key: "getVertices",
  2804. value: function getVertices(nodes) {// eslint-disable-line no-unused-vars
  2805. }
  2806. /**
  2807. * @function Geometry.prototype.getArea
  2808. * @description 计算几何对象的面积 ,此方法需要在子类中定义。
  2809. * @returns {number} 计算后的对象面积。
  2810. */
  2811. }, {
  2812. key: "getArea",
  2813. value: function getArea() {
  2814. //to be overridden by geometries that actually have an area
  2815. //
  2816. return 0.0;
  2817. }
  2818. // /**
  2819. // * @function Geometry.prototype.toString
  2820. // * @description 返回geometry对象的字符串表述,需要引入{@link WKTFormat}。此方法只能在子类实现,在父类使用会报错。
  2821. // * @returns {string} geometry对象的字符串表述(Well-Known Text)
  2822. // */
  2823. // toString() {
  2824. // var string;
  2825. // if (WKT) {
  2826. // var wkt = new WKT();
  2827. // string = wkt.write(new Vector(this));
  2828. // } else {
  2829. // string = Object.prototype.toString.call(this);
  2830. // }
  2831. // return string;
  2832. // }
  2833. }]);
  2834. return Geometry;
  2835. }();
  2836. ;// CONCATENATED MODULE: ./src/common/commontypes/Util.js
  2837. function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
  2838. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  2839. * This program are made available under the terms of the Apache License, Version 2.0
  2840. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  2841. /**
  2842. * @description 浏览器名称,依赖于 userAgent 属性,BROWSER_NAME 可以是空,或者以下浏览器:
  2843. * * "opera" -- Opera
  2844. * * "msie" -- Internet Explorer
  2845. * * "safari" -- Safari
  2846. * * "firefox" -- Firefox
  2847. * * "mozilla" -- Mozilla
  2848. * @category BaseTypes Constant
  2849. * @constant {Object}
  2850. * @usage
  2851. * ```
  2852. * // 浏览器
  2853. * <script type="text/javascript" src="{cdn}"></script>
  2854. * <script>
  2855. * const result = {namespace}.Browser.name;
  2856. *
  2857. * </script>
  2858. * // ES6 Import
  2859. * import { Browser } from '{npm}';
  2860. *
  2861. * const result = Browser.name;
  2862. * ```
  2863. */
  2864. var Browser = function () {
  2865. var name = '',
  2866. version = '',
  2867. device = 'pc',
  2868. uaMatch;
  2869. //以下进行测试
  2870. var ua = navigator.userAgent.toLowerCase();
  2871. if (ua.indexOf('msie') > -1 || ua.indexOf('trident') > -1 && ua.indexOf('rv') > -1) {
  2872. name = 'msie';
  2873. uaMatch = ua.match(/msie ([\d.]+)/) || ua.match(/rv:([\d.]+)/);
  2874. } else if (ua.indexOf('chrome') > -1) {
  2875. name = 'chrome';
  2876. uaMatch = ua.match(/chrome\/([\d.]+)/);
  2877. } else if (ua.indexOf('firefox') > -1) {
  2878. name = 'firefox';
  2879. uaMatch = ua.match(/firefox\/([\d.]+)/);
  2880. } else if (ua.indexOf('opera') > -1) {
  2881. name = 'opera';
  2882. uaMatch = ua.match(/version\/([\d.]+)/);
  2883. } else if (ua.indexOf('safari') > -1) {
  2884. name = 'safari';
  2885. uaMatch = ua.match(/version\/([\d.]+)/);
  2886. }
  2887. version = uaMatch ? uaMatch[1] : '';
  2888. if (ua.indexOf('ipad') > -1 || ua.indexOf('ipod') > -1 || ua.indexOf('iphone') > -1) {
  2889. device = 'apple';
  2890. } else if (ua.indexOf('android') > -1) {
  2891. uaMatch = ua.match(/version\/([\d.]+)/);
  2892. version = uaMatch ? uaMatch[1] : '';
  2893. device = 'android';
  2894. }
  2895. return {
  2896. name: name,
  2897. version: version,
  2898. device: device
  2899. };
  2900. }();
  2901. var isSupportCanvas = function () {
  2902. var checkRes = true,
  2903. broz = Browser;
  2904. if (document.createElement('canvas').getContext) {
  2905. if (broz.name === 'firefox' && parseFloat(broz.version) < 5) {
  2906. checkRes = false;
  2907. }
  2908. if (broz.name === 'safari' && parseFloat(broz.version) < 4) {
  2909. checkRes = false;
  2910. }
  2911. if (broz.name === 'opera' && parseFloat(broz.version) < 10) {
  2912. checkRes = false;
  2913. }
  2914. if (broz.name === 'msie' && parseFloat(broz.version) < 9) {
  2915. checkRes = false;
  2916. }
  2917. } else {
  2918. checkRes = false;
  2919. }
  2920. return checkRes;
  2921. }();
  2922. /**
  2923. * @description 如果 userAgent 捕获到浏览器使用的是 Gecko 引擎则返回 true。
  2924. * @constant {number}
  2925. * @private
  2926. */
  2927. var IS_GECKO = function () {
  2928. var ua = navigator.userAgent.toLowerCase();
  2929. return ua.indexOf('webkit') === -1 && ua.indexOf('gecko') !== -1;
  2930. }();
  2931. /**
  2932. * @constant {number}
  2933. * @default
  2934. * @description 分辨率与比例尺之间转换的常量。
  2935. * @private
  2936. */
  2937. var DOTS_PER_INCH = 96;
  2938. /**
  2939. * @name CommonUtil
  2940. * @namespace
  2941. * @category BaseTypes Util
  2942. * @description common 工具类。
  2943. * @usage
  2944. * ```
  2945. * // 浏览器
  2946. * <script type="text/javascript" src="{cdn}"></script>
  2947. * <script>
  2948. * const result = {namespace}.CommonUtil.getElement();
  2949. *
  2950. * // 弃用的写法
  2951. * const result = SuperMap.Util.getElement();
  2952. *
  2953. * </script>
  2954. *
  2955. * // ES6 Import
  2956. * import { CommonUtil } from '{npm}';
  2957. *
  2958. * const result = CommonUtil.getElement();
  2959. * ```
  2960. */
  2961. var Util_Util = {
  2962. /**
  2963. * @function Util.extend
  2964. * @description 对象拷贝赋值。
  2965. * @param {Object} dest - 目标对象。
  2966. * @param {Object} arguments - 待拷贝的对象。
  2967. * @returns {Object} 赋值后的目标对象。
  2968. */
  2969. assign: function assign(dest) {
  2970. for (var index = 0; index < Object.getOwnPropertyNames(arguments).length; index++) {
  2971. var arg = Object.getOwnPropertyNames(arguments)[index];
  2972. if (arg == "caller" || arg == "callee" || arg == "length" || arg == "arguments") {
  2973. continue;
  2974. }
  2975. var obj = arguments[arg];
  2976. if (obj) {
  2977. for (var j = 0; j < Object.getOwnPropertyNames(obj).length; j++) {
  2978. var key = Object.getOwnPropertyNames(obj)[j];
  2979. if (arg == "caller" || arg == "callee" || arg == "length" || arg == "arguments") {
  2980. continue;
  2981. }
  2982. dest[key] = obj[key];
  2983. }
  2984. }
  2985. }
  2986. return dest;
  2987. },
  2988. /**
  2989. * @memberOf CommonUtil
  2990. * @description 复制源对象的所有属性到目标对象上,源对象上的没有定义的属性在目标对象上也不会被设置。
  2991. * @example
  2992. * 要复制 Size 对象的所有属性到自定义对象上,使用方法如下:
  2993. * var size = new Size(100, 100);
  2994. * var obj = {};
  2995. * CommonUtil.extend(obj, size);
  2996. * @param {Object} [destination] - 目标对象。
  2997. * @param {Object} source - 源对象,其属性将被设置到目标对象上。
  2998. * @returns {Object} 目标对象。
  2999. */
  3000. extend: function extend(destination, source) {
  3001. destination = destination || {};
  3002. if (source) {
  3003. for (var property in source) {
  3004. var value = source[property];
  3005. if (value !== undefined) {
  3006. destination[property] = value;
  3007. }
  3008. }
  3009. /**
  3010. * IE doesn't include the toString property when iterating over an object's
  3011. * properties with the for(property in object) syntax. Explicitly check if
  3012. * the source has its own toString property.
  3013. */
  3014. /*
  3015. * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
  3016. * prototype object" when calling hawOwnProperty if the source object
  3017. * is an instance of window.Event.
  3018. */
  3019. var sourceIsEvt = typeof window.Event === 'function' && source instanceof window.Event;
  3020. if (!sourceIsEvt && source.hasOwnProperty && source.hasOwnProperty('toString')) {
  3021. destination.toString = source.toString;
  3022. }
  3023. }
  3024. return destination;
  3025. },
  3026. /**
  3027. * @memberOf CommonUtil
  3028. * @description 对象拷贝。
  3029. * @param {Object} [des] - 目标对象。
  3030. * @param {Object} soc - 源对象。
  3031. */
  3032. copy: function copy(des, soc) {
  3033. des = des || {};
  3034. var v;
  3035. if (soc) {
  3036. for (var p in des) {
  3037. v = soc[p];
  3038. if (typeof v !== 'undefined') {
  3039. des[p] = v;
  3040. }
  3041. }
  3042. }
  3043. },
  3044. /**
  3045. * @memberOf CommonUtil
  3046. * @description 销毁对象,将其属性置空。
  3047. * @param {Object} [obj] - 目标对象。
  3048. */
  3049. reset: function reset(obj) {
  3050. obj = obj || {};
  3051. for (var p in obj) {
  3052. if (obj.hasOwnProperty(p)) {
  3053. if (_typeof(obj[p]) === 'object' && obj[p] instanceof Array) {
  3054. for (var i in obj[p]) {
  3055. if (obj[p][i].destroy) {
  3056. obj[p][i].destroy();
  3057. }
  3058. }
  3059. obj[p].length = 0;
  3060. } else if (_typeof(obj[p]) === 'object' && obj[p] instanceof Object) {
  3061. if (obj[p].destroy) {
  3062. obj[p].destroy();
  3063. }
  3064. }
  3065. obj[p] = null;
  3066. }
  3067. }
  3068. },
  3069. /**
  3070. * @memberOf CommonUtil
  3071. * @description 获取 HTML 元素数组。
  3072. * @returns {Array.<HTMLElement>} HTML 元素数组。
  3073. */
  3074. getElement: function getElement() {
  3075. var elements = [];
  3076. for (var i = 0, len = arguments.length; i < len; i++) {
  3077. var element = arguments[i];
  3078. if (typeof element === 'string') {
  3079. element = document.getElementById(element);
  3080. }
  3081. if (arguments.length === 1) {
  3082. return element;
  3083. }
  3084. elements.push(element);
  3085. }
  3086. return elements;
  3087. },
  3088. /**
  3089. * @memberOf CommonUtil
  3090. * @description instance of 的跨浏览器实现。
  3091. * @param {Object} o - 对象。
  3092. * @returns {boolean} 是否是页面元素。
  3093. */
  3094. isElement: function isElement(o) {
  3095. return !!(o && o.nodeType === 1);
  3096. },
  3097. /**
  3098. * @memberOf CommonUtil
  3099. * @description 判断一个对象是否是数组。
  3100. * @param {Object} a - 对象。
  3101. * @returns {boolean} 是否是数组。
  3102. */
  3103. isArray: function isArray(a) {
  3104. return Object.prototype.toString.call(a) === '[object Array]';
  3105. },
  3106. /**
  3107. * @memberOf CommonUtil
  3108. * @description 从数组中删除某一项。
  3109. * @param {Array} array - 数组。
  3110. * @param {Object} item - 数组中要删除的一项。
  3111. * @returns {Array} 执行删除操作后的数组。
  3112. */
  3113. removeItem: function removeItem(array, item) {
  3114. for (var i = array.length - 1; i >= 0; i--) {
  3115. if (array[i] === item) {
  3116. array.splice(i, 1);
  3117. //break;more than once??
  3118. }
  3119. }
  3120. return array;
  3121. },
  3122. /**
  3123. * @memberOf CommonUtil
  3124. * @description 获取某对象在数组中的索引值。
  3125. * @param {Array.<Object>} array - 数组。
  3126. * @param {Object} obj - 对象。
  3127. * @returns {number} 某对象在数组中的索引值。
  3128. */
  3129. indexOf: function indexOf(array, obj) {
  3130. if (array == null) {
  3131. return -1;
  3132. } else {
  3133. // use the build-in function if available.
  3134. if (typeof array.indexOf === 'function') {
  3135. return array.indexOf(obj);
  3136. } else {
  3137. for (var i = 0, len = array.length; i < len; i++) {
  3138. if (array[i] === obj) {
  3139. return i;
  3140. }
  3141. }
  3142. return -1;
  3143. }
  3144. }
  3145. },
  3146. /**
  3147. * @memberOf CommonUtil
  3148. * @description 修改某 DOM 元素的许多属性。
  3149. * @param {HTMLElement} element - 待修改的 DOM 元素。
  3150. * @param {string} [id] - DOM 元素的 ID。
  3151. * @param {Pixel} [px] - DOM 元素的 style 属性的 left 和 top 属性。
  3152. * @param {Size} [sz] - DOM 元素的 width 和 height 属性。
  3153. * @param {string} [position] - DOM 元素的 position 属性。
  3154. * @param {string} [border] - DOM 元素的 style 属性的 border 属性。
  3155. * @param {string} [overflow] - DOM 元素的 style 属性的 overflow 属性。
  3156. * @param {number} [opacity] - 不透明度值。取值范围为(0.0 - 1.0)。
  3157. */
  3158. modifyDOMElement: function modifyDOMElement(element, id, px, sz, position, border, overflow, opacity) {
  3159. if (id) {
  3160. element.id = id;
  3161. }
  3162. if (px) {
  3163. element.style.left = px.x + 'px';
  3164. element.style.top = px.y + 'px';
  3165. }
  3166. if (sz) {
  3167. element.style.width = sz.w + 'px';
  3168. element.style.height = sz.h + 'px';
  3169. }
  3170. if (position) {
  3171. element.style.position = position;
  3172. }
  3173. if (border) {
  3174. element.style.border = border;
  3175. }
  3176. if (overflow) {
  3177. element.style.overflow = overflow;
  3178. }
  3179. if (parseFloat(opacity) >= 0.0 && parseFloat(opacity) < 1.0) {
  3180. element.style.filter = 'alpha(opacity=' + opacity * 100 + ')';
  3181. element.style.opacity = opacity;
  3182. } else if (parseFloat(opacity) === 1.0) {
  3183. element.style.filter = '';
  3184. element.style.opacity = '';
  3185. }
  3186. },
  3187. /**
  3188. * @memberOf CommonUtil
  3189. * @description 比较两个对象并合并。
  3190. * @param {Object} [to] - 目标对象。
  3191. * @param {Object} from - 源对象。
  3192. * @returns {Object} 返回合并后的对象。
  3193. */
  3194. applyDefaults: function applyDefaults(to, from) {
  3195. to = to || {};
  3196. /*
  3197. * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
  3198. * prototype object" when calling hawOwnProperty if the source object is an
  3199. * instance of window.Event.
  3200. */
  3201. var fromIsEvt = typeof window.Event === 'function' && from instanceof window.Event;
  3202. for (var key in from) {
  3203. if (to[key] === undefined || !fromIsEvt && from.hasOwnProperty && from.hasOwnProperty(key) && !to.hasOwnProperty(key)) {
  3204. to[key] = from[key];
  3205. }
  3206. }
  3207. /**
  3208. * IE doesn't include the toString property when iterating over an object's
  3209. * properties with the for(property in object) syntax. Explicitly check if
  3210. * the source has its own toString property.
  3211. */
  3212. if (!fromIsEvt && from && from.hasOwnProperty && from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) {
  3213. to.toString = from.toString;
  3214. }
  3215. return to;
  3216. },
  3217. /**
  3218. * @memberOf CommonUtil
  3219. * @description 将参数对象转换为 HTTP 的 GET 请求中的参数字符串。例如:"key1=value1&key2=value2&key3=value3"。
  3220. * @param {Object} params - 参数对象。
  3221. * @returns {string} HTTP 的 GET 请求中的参数字符串。
  3222. */
  3223. getParameterString: function getParameterString(params) {
  3224. var paramsArray = [];
  3225. for (var key in params) {
  3226. var value = params[key];
  3227. if (value != null && typeof value !== 'function') {
  3228. var encodedValue;
  3229. if (Array.isArray(value) || value.toString() === '[object Object]') {
  3230. encodedValue = encodeURIComponent(JSON.stringify(value));
  3231. } else {
  3232. /* value is a string; simply encode */
  3233. encodedValue = encodeURIComponent(value);
  3234. }
  3235. paramsArray.push(encodeURIComponent(key) + '=' + encodedValue);
  3236. }
  3237. }
  3238. return paramsArray.join('&');
  3239. },
  3240. /**
  3241. * @memberOf CommonUtil
  3242. * @description 给 URL 追加查询参数。
  3243. * @param {string} url - 待追加参数的 URL 字符串。
  3244. * @param {string} paramStr - 待追加的查询参数。
  3245. * @returns {string} 新的 URL。
  3246. */
  3247. urlAppend: function urlAppend(url, paramStr) {
  3248. var newUrl = url;
  3249. if (paramStr) {
  3250. if (paramStr.indexOf('?') === 0) {
  3251. paramStr = paramStr.substring(1);
  3252. }
  3253. var parts = (url + ' ').split(/[?&]/);
  3254. newUrl += parts.pop() === ' ' ? paramStr : parts.length ? '&' + paramStr : '?' + paramStr;
  3255. }
  3256. return newUrl;
  3257. },
  3258. /**
  3259. * @memberOf CommonUtil
  3260. * @description 给 URL 追加 path 参数。
  3261. * @param {string} url - 待追加参数的 URL 字符串。
  3262. * @param {string} paramStr - 待追加的path参数。
  3263. * @returns {string} 新的 URL。
  3264. */
  3265. urlPathAppend: function urlPathAppend(url, pathStr) {
  3266. var newUrl = url;
  3267. if (!pathStr) {
  3268. return newUrl;
  3269. }
  3270. if (pathStr.indexOf('/') === 0) {
  3271. pathStr = pathStr.substring(1);
  3272. }
  3273. var parts = url.split('?');
  3274. if (parts[0].indexOf('/', parts[0].length - 1) < 0) {
  3275. parts[0] += '/';
  3276. }
  3277. newUrl = "".concat(parts[0]).concat(pathStr).concat(parts.length > 1 ? "?".concat(parts[1]) : '');
  3278. return newUrl;
  3279. },
  3280. /**
  3281. * @memberOf CommonUtil
  3282. * @description 为了避免浮点精度错误而保留的有效位数。
  3283. * @type {number}
  3284. * @default 14
  3285. */
  3286. DEFAULT_PRECISION: 14,
  3287. /**
  3288. * @memberOf CommonUtil
  3289. * @description 将字符串以接近的精度转换为数字。
  3290. * @param {string} number - 字符串。
  3291. * @param {number} [precision=14] - 精度。
  3292. * @returns {number} 转化后的数字。
  3293. */
  3294. toFloat: function toFloat(number, precision) {
  3295. if (precision == null) {
  3296. precision = Util_Util.DEFAULT_PRECISION;
  3297. }
  3298. if (typeof number !== 'number') {
  3299. number = parseFloat(number);
  3300. }
  3301. return precision === 0 ? number : parseFloat(number.toPrecision(precision));
  3302. },
  3303. /**
  3304. * @memberOf CommonUtil
  3305. * @description 角度转弧度。
  3306. * @param {number} x - 角度。
  3307. * @returns {number} 转化后的弧度。
  3308. */
  3309. rad: function rad(x) {
  3310. return x * Math.PI / 180;
  3311. },
  3312. /**
  3313. * @memberOf CommonUtil
  3314. * @description 从 URL 字符串中解析出参数对象。
  3315. * @param {string} url - URL。
  3316. * @returns {Object} 解析出的参数对象。
  3317. */
  3318. getParameters: function getParameters(url) {
  3319. // if no url specified, take it from the location bar
  3320. url = url === null || url === undefined ? window.location.href : url;
  3321. //parse out parameters portion of url string
  3322. var paramsString = '';
  3323. if (StringExt.contains(url, '?')) {
  3324. var start = url.indexOf('?') + 1;
  3325. var end = StringExt.contains(url, '#') ? url.indexOf('#') : url.length;
  3326. paramsString = url.substring(start, end);
  3327. }
  3328. var parameters = {};
  3329. var pairs = paramsString.split(/[&;]/);
  3330. for (var i = 0, len = pairs.length; i < len; ++i) {
  3331. var keyValue = pairs[i].split('=');
  3332. if (keyValue[0]) {
  3333. var key = keyValue[0];
  3334. try {
  3335. key = decodeURIComponent(key);
  3336. } catch (err) {
  3337. key = unescape(key);
  3338. }
  3339. // being liberal by replacing "+" with " "
  3340. var value = (keyValue[1] || '').replace(/\+/g, ' ');
  3341. try {
  3342. value = decodeURIComponent(value);
  3343. } catch (err) {
  3344. value = unescape(value);
  3345. }
  3346. // follow OGC convention of comma delimited values
  3347. value = value.split(',');
  3348. //if there's only one value, do not return as array
  3349. if (value.length == 1) {
  3350. value = value[0];
  3351. }
  3352. parameters[key] = value;
  3353. }
  3354. }
  3355. return parameters;
  3356. },
  3357. /**
  3358. * @memberOf CommonUtil
  3359. * @description 不断递增计数变量,用于生成唯一 ID。
  3360. * @type {number}
  3361. * @default 0
  3362. */
  3363. lastSeqID: 0,
  3364. /**
  3365. * @memberOf CommonUtil
  3366. * @description 创建唯一 ID 值。
  3367. * @param {string} [prefix] - 前缀。
  3368. * @returns {string} 唯一的 ID 值。
  3369. */
  3370. createUniqueID: function createUniqueID(prefix) {
  3371. if (prefix == null) {
  3372. prefix = 'id_';
  3373. }
  3374. Util_Util.lastSeqID += 1;
  3375. return prefix + Util_Util.lastSeqID;
  3376. },
  3377. /**
  3378. * @memberOf CommonUtil
  3379. * @description 判断并转化比例尺。
  3380. * @param {number} scale - 比例尺。
  3381. * @returns {number} 正常的 scale 值。
  3382. */
  3383. normalizeScale: function normalizeScale(scale) {
  3384. var normScale = scale > 1.0 ? 1.0 / scale : scale;
  3385. return normScale;
  3386. },
  3387. /**
  3388. * @memberOf CommonUtil
  3389. * @description 比例尺转分辨率。
  3390. * @param {number} scale - 比例尺。
  3391. * @param {string} [units='degrees'] - 比例尺单位。
  3392. * @returns {number} 转化后的分辨率。
  3393. */
  3394. getResolutionFromScale: function getResolutionFromScale(scale, units) {
  3395. var resolution;
  3396. if (scale) {
  3397. if (units == null) {
  3398. units = 'degrees';
  3399. }
  3400. var normScale = Util_Util.normalizeScale(scale);
  3401. resolution = 1 / (normScale * INCHES_PER_UNIT[units] * DOTS_PER_INCH);
  3402. }
  3403. return resolution;
  3404. },
  3405. /**
  3406. * @memberOf CommonUtil
  3407. * @description 分辨率转比例尺。
  3408. * @param {number} resolution - 分辨率。
  3409. * @param {string} [units='degrees'] - 分辨率单位。
  3410. * @returns {number} 转化后的比例尺。
  3411. */
  3412. getScaleFromResolution: function getScaleFromResolution(resolution, units) {
  3413. if (units == null) {
  3414. units = 'degrees';
  3415. }
  3416. var scale = resolution * INCHES_PER_UNIT[units] * DOTS_PER_INCH;
  3417. return scale;
  3418. },
  3419. /**
  3420. * @memberOf CommonUtil
  3421. * @description 获取浏览器相关信息。支持的浏览器包括:Opera,Internet Explorer,Safari,Firefox。
  3422. * @returns {Object} 浏览器名称、版本、设备名称。对应的属性分别为 name, version, device。
  3423. */
  3424. getBrowser: function getBrowser() {
  3425. return Browser;
  3426. },
  3427. /**
  3428. * @memberOf CommonUtil
  3429. * @description 浏览器是否支持 Canvas。
  3430. * @returns {boolean} 当前浏览器是否支持 HTML5 Canvas。
  3431. */
  3432. isSupportCanvas: isSupportCanvas,
  3433. /**
  3434. * @memberOf CommonUtil
  3435. * @description 判断浏览器是否支持 Canvas。
  3436. * @returns {boolean} 当前浏览器是否支持 HTML5 Canvas 。
  3437. */
  3438. supportCanvas: function supportCanvas() {
  3439. return Util_Util.isSupportCanvas;
  3440. },
  3441. /**
  3442. * @memberOf CommonUtil
  3443. * @description 判断一个 URL 请求是否在当前域中。
  3444. * @param {string} url - URL 请求字符串。
  3445. * @returns {boolean} URL 请求是否在当前域中。
  3446. */
  3447. isInTheSameDomain: function isInTheSameDomain(url) {
  3448. if (!url) {
  3449. return true;
  3450. }
  3451. var index = url.indexOf('//');
  3452. var documentUrl = document.location.toString();
  3453. var documentIndex = documentUrl.indexOf('//');
  3454. if (index === -1) {
  3455. return true;
  3456. } else {
  3457. var protocol;
  3458. var substring = protocol = url.substring(0, index);
  3459. var documentSubString = documentUrl.substring(documentIndex + 2);
  3460. documentIndex = documentSubString.indexOf('/');
  3461. var documentPortIndex = documentSubString.indexOf(':');
  3462. var documentDomainWithPort = documentSubString.substring(0, documentIndex);
  3463. //var documentPort;
  3464. var documentprotocol = document.location.protocol;
  3465. if (documentPortIndex !== -1) {
  3466. // documentPort = +documentSubString.substring(documentPortIndex, documentIndex);
  3467. } else {
  3468. documentDomainWithPort += ':' + (documentprotocol.toLowerCase() === 'http:' ? 80 : 443);
  3469. }
  3470. if (documentprotocol.toLowerCase() !== substring.toLowerCase()) {
  3471. return false;
  3472. }
  3473. substring = url.substring(index + 2);
  3474. var portIndex = substring.indexOf(':');
  3475. index = substring.indexOf('/');
  3476. var domainWithPort = substring.substring(0, index);
  3477. var domain;
  3478. if (portIndex !== -1) {
  3479. domain = substring.substring(0, portIndex);
  3480. } else {
  3481. domain = substring.substring(0, index);
  3482. domainWithPort += ':' + (protocol.toLowerCase() === 'http:' ? 80 : 443);
  3483. }
  3484. var documentDomain = document.domain;
  3485. if (domain === documentDomain && domainWithPort === documentDomainWithPort) {
  3486. return true;
  3487. }
  3488. }
  3489. return false;
  3490. },
  3491. /**
  3492. * @memberOf CommonUtil
  3493. * @description 计算 iServer 服务的 REST 图层的显示分辨率,需要从 iServer 的 REST 图层表述中获取 viewBounds、viewer、scale、coordUnit、datumAxis 五个参数,来进行计算。
  3494. * @param {Bounds} viewBounds - 地图的参照可视范围,即地图初始化时默认的地图显示范围。
  3495. * @param {Size} viewer - 地图初始化时默认的地图图片的尺寸。
  3496. * @param {number} scale - 地图初始化时默认的显示比例尺。
  3497. * @param {string} [coordUnit='degrees'] - 投影坐标系统的地图单位。
  3498. * @param {number} [datumAxis=6378137] - 地理坐标系统椭球体长半轴。用户自定义地图的 Options 时,若未指定该参数的值,则系统默认为 WGS84 参考系的椭球体长半轴 6378137。
  3499. * @returns {number} 图层显示分辨率。
  3500. */
  3501. calculateDpi: function calculateDpi(viewBounds, viewer, scale, coordUnit, datumAxis) {
  3502. //10000 是 0.1毫米与米的转换。DPI的计算公式:Viewer / DPI * 0.0254 * 10000 = ViewBounds * scale ,公式中的10000是为了提高计算结果的精度,以下出现的ratio皆为如此。
  3503. if (!viewBounds || !viewer || !scale) {
  3504. return;
  3505. }
  3506. var ratio = 10000,
  3507. rvbWidth = viewBounds.getWidth(),
  3508. rvbHeight = viewBounds.getHeight(),
  3509. rvWidth = viewer.w,
  3510. rvHeight = viewer.h;
  3511. //用户自定义地图的Options时,若未指定该参数的值,则系统默认为6378137米,即WGS84参考系的椭球体长半轴。
  3512. datumAxis = datumAxis || 6378137;
  3513. coordUnit = coordUnit || 'degrees';
  3514. var dpi;
  3515. if (coordUnit.toLowerCase() === 'degree' || coordUnit.toLowerCase() === 'degrees' || coordUnit.toLowerCase() === 'dd') {
  3516. var num1 = rvbWidth / rvWidth,
  3517. num2 = rvbHeight / rvHeight,
  3518. resolution = num1 > num2 ? num1 : num2;
  3519. dpi = 0.0254 * ratio / resolution / scale / (Math.PI * 2 * datumAxis / 360) / ratio;
  3520. } else {
  3521. var _resolution = rvbWidth / rvWidth;
  3522. dpi = 0.0254 * ratio / _resolution / scale / ratio;
  3523. }
  3524. return dpi;
  3525. },
  3526. /**
  3527. * @memberOf CommonUtil
  3528. * @description 将对象转换成 JSON 字符串。
  3529. * @param {Object} obj - 要转换成 JSON 的 Object 对象。
  3530. * @returns {string} 转换后的 JSON 对象。
  3531. */
  3532. toJSON: function toJSON(obj) {
  3533. var objInn = obj;
  3534. if (objInn == null) {
  3535. return null;
  3536. }
  3537. switch (objInn.constructor) {
  3538. case String:
  3539. //s = "'" + str.replace(/(["\\])/g, "\\$1") + "'"; string含有单引号出错
  3540. objInn = '"' + objInn.replace(/(["\\])/g, '\\$1') + '"';
  3541. objInn = objInn.replace(/\n/g, '\\n');
  3542. objInn = objInn.replace(/\r/g, '\\r');
  3543. objInn = objInn.replace('<', '&lt;');
  3544. objInn = objInn.replace('>', '&gt;');
  3545. objInn = objInn.replace(/%/g, '%25');
  3546. objInn = objInn.replace(/&/g, '%26');
  3547. return objInn;
  3548. case Array:
  3549. var arr = '';
  3550. for (var i = 0, len = objInn.length; i < len; i++) {
  3551. arr += Util_Util.toJSON(objInn[i]);
  3552. if (i !== objInn.length - 1) {
  3553. arr += ',';
  3554. }
  3555. }
  3556. return "[" + arr + "]";
  3557. case Number:
  3558. return isFinite(objInn) ? String(objInn) : null;
  3559. case Boolean:
  3560. return String(objInn);
  3561. case Date:
  3562. var dateStr = '{' + '\'__type\':"System.DateTime",' + "'Year':" + objInn.getFullYear() + ',' + "'Month':" + (objInn.getMonth() + 1) + ',' + "'Day':" + objInn.getDate() + ',' + "'Hour':" + objInn.getHours() + ',' + "'Minute':" + objInn.getMinutes() + ',' + "'Second':" + objInn.getSeconds() + ',' + "'Millisecond':" + objInn.getMilliseconds() + ',' + "'TimezoneOffset':" + objInn.getTimezoneOffset() + '}';
  3563. return dateStr;
  3564. default:
  3565. if (objInn['toJSON'] != null && typeof objInn['toJSON'] === 'function') {
  3566. return objInn.toJSON();
  3567. }
  3568. if (_typeof(objInn) === 'object') {
  3569. if (objInn.length) {
  3570. var _arr = [];
  3571. for (var _i2 = 0, _len2 = objInn.length; _i2 < _len2; _i2++) {
  3572. _arr.push(Util_Util.toJSON(objInn[_i2]));
  3573. }
  3574. return '[' + _arr.join(',') + ']';
  3575. }
  3576. var _arr2 = [];
  3577. for (var attr in objInn) {
  3578. //为解决Geometry类型头json时堆栈溢出的问题,attr == "parent"时不进行json转换
  3579. if (typeof objInn[attr] !== 'function' && attr !== 'CLASS_NAME' && attr !== 'parent') {
  3580. _arr2.push("'" + attr + "':" + Util_Util.toJSON(objInn[attr]));
  3581. }
  3582. }
  3583. if (_arr2.length > 0) {
  3584. return '{' + _arr2.join(',') + '}';
  3585. } else {
  3586. return '{}';
  3587. }
  3588. }
  3589. return objInn.toString();
  3590. }
  3591. },
  3592. /**
  3593. * @memberOf CommonUtil
  3594. * @description 根据比例尺和 DPI 计算屏幕分辨率。
  3595. * @category BaseTypes Util
  3596. * @param {number} scale - 比例尺。
  3597. * @param {number} dpi - 图像分辨率,表示每英寸内的像素个数。
  3598. * @param {string} [coordUnit] - 投影坐标系统的地图单位。
  3599. * @param {number} [datumAxis=6378137] - 地理坐标系统椭球体长半轴。用户自定义地图的 Options 时,若未指定该参数的值,则 DPI 默认按照 WGS84 参考系的椭球体长半轴 6378137 来计算。
  3600. * @returns {number} 当前比例尺下的屏幕分辨率。
  3601. */
  3602. getResolutionFromScaleDpi: function getResolutionFromScaleDpi(scale, dpi, coordUnit, datumAxis) {
  3603. var resolution = null,
  3604. ratio = 10000;
  3605. //用户自定义地图的Options时,若未指定该参数的值,则系统默认为6378137米,即WGS84参考系的椭球体长半轴。
  3606. datumAxis = datumAxis || 6378137;
  3607. coordUnit = coordUnit || '';
  3608. if (scale > 0 && dpi > 0) {
  3609. scale = Util_Util.normalizeScale(scale);
  3610. if (coordUnit.toLowerCase() === 'degree' || coordUnit.toLowerCase() === 'degrees' || coordUnit.toLowerCase() === 'dd') {
  3611. //scale = Util.normalizeScale(scale);
  3612. resolution = 0.0254 * ratio / dpi / scale / (Math.PI * 2 * datumAxis / 360) / ratio;
  3613. return resolution;
  3614. } else {
  3615. resolution = 0.0254 * ratio / dpi / scale / ratio;
  3616. return resolution;
  3617. }
  3618. }
  3619. return -1;
  3620. },
  3621. /**
  3622. * @memberOf CommonUtil
  3623. * @description 根据 resolution、dpi、coordUnit 和 datumAxis 计算比例尺。
  3624. * @param {number} resolution - 用于计算比例尺的地图分辨率。
  3625. * @param {number} dpi - 图像分辨率,表示每英寸内的像素个数。
  3626. * @param {string} [coordUnit] - 投影坐标系统的地图单位。
  3627. * @param {number} [datumAxis=6378137] - 地理坐标系统椭球体长半轴。用户自定义地图的 Options 时,若未指定该参数的值,则 DPI 默认按照 WGS84 参考系的椭球体长半轴 6378137 来计算。
  3628. * @returns {number} 当前屏幕分辨率下的比例尺。
  3629. */
  3630. getScaleFromResolutionDpi: function getScaleFromResolutionDpi(resolution, dpi, coordUnit, datumAxis) {
  3631. var scale = null,
  3632. ratio = 10000;
  3633. //用户自定义地图的Options时,若未指定该参数的值,则系统默认为6378137米,即WGS84参考系的椭球体长半轴。
  3634. datumAxis = datumAxis || 6378137;
  3635. coordUnit = coordUnit || '';
  3636. if (resolution > 0 && dpi > 0) {
  3637. if (coordUnit.toLowerCase() === 'degree' || coordUnit.toLowerCase() === 'degrees' || coordUnit.toLowerCase() === 'dd') {
  3638. scale = 0.0254 * ratio / dpi / resolution / (Math.PI * 2 * datumAxis / 360) / ratio;
  3639. return scale;
  3640. } else {
  3641. scale = 0.0254 * ratio / dpi / resolution / ratio;
  3642. return scale;
  3643. }
  3644. }
  3645. return -1;
  3646. },
  3647. /**
  3648. * @memberOf CommonUtil
  3649. * @description 转换查询结果。
  3650. * @param {Object} result - 查询结果。
  3651. * @returns {Object} 转换后的查询结果。
  3652. */
  3653. transformResult: function transformResult(result) {
  3654. if (result.responseText && typeof result.responseText === 'string') {
  3655. result = JSON.parse(result.responseText);
  3656. }
  3657. return result;
  3658. },
  3659. /**
  3660. * @memberOf CommonUtil
  3661. * @description 属性拷贝,不拷贝方法类名(CLASS_NAME)等。
  3662. * @param {Object} [destination] - 拷贝目标。
  3663. * @param {Object} source - 源对象。
  3664. *
  3665. */
  3666. copyAttributes: function copyAttributes(destination, source) {
  3667. destination = destination || {};
  3668. if (source) {
  3669. for (var property in source) {
  3670. var value = source[property];
  3671. if (value !== undefined && property !== 'CLASS_NAME' && typeof value !== 'function') {
  3672. destination[property] = value;
  3673. }
  3674. }
  3675. }
  3676. return destination;
  3677. },
  3678. /**
  3679. * @memberOf CommonUtil
  3680. * @description 将源对象上的属性拷贝到目标对象上。(不拷贝 CLASS_NAME 和方法)
  3681. * @param {Object} [destination] - 目标对象。
  3682. * @param {Object} source - 源对象。
  3683. * @param {Array.<string>} clip - 源对象中禁止拷贝到目标对象的属性,目的是防止目标对象上不可修改的属性被篡改。
  3684. *
  3685. */
  3686. copyAttributesWithClip: function copyAttributesWithClip(destination, source, clip) {
  3687. destination = destination || {};
  3688. if (source) {
  3689. for (var property in source) {
  3690. //去掉禁止拷贝的属性
  3691. var isInClip = false;
  3692. if (clip && clip.length) {
  3693. for (var i = 0, len = clip.length; i < len; i++) {
  3694. if (property === clip[i]) {
  3695. isInClip = true;
  3696. break;
  3697. }
  3698. }
  3699. }
  3700. if (isInClip === true) {
  3701. continue;
  3702. }
  3703. var value = source[property];
  3704. if (value !== undefined && property !== 'CLASS_NAME' && typeof value !== 'function') {
  3705. destination[property] = value;
  3706. }
  3707. }
  3708. }
  3709. return destination;
  3710. },
  3711. /**
  3712. * @memberOf CommonUtil
  3713. * @description 克隆一个 Object 对象。
  3714. * @param {Object} obj - 需要克隆的对象。
  3715. * @returns {Object} 对象的拷贝对象,注意是新的对象,不是指向。
  3716. */
  3717. cloneObject: function cloneObject(obj) {
  3718. // Handle the 3 simple types, and null or undefined
  3719. if (null === obj || 'object' !== _typeof(obj)) {
  3720. return obj;
  3721. }
  3722. // Handle Date
  3723. if (obj instanceof Date) {
  3724. var copy = new Date();
  3725. copy.setTime(obj.getTime());
  3726. return copy;
  3727. }
  3728. // Handle Array
  3729. if (obj instanceof Array) {
  3730. var _copy = obj.slice(0);
  3731. return _copy;
  3732. }
  3733. // Handle Object
  3734. if (obj instanceof Object) {
  3735. var _copy2 = {};
  3736. for (var attr in obj) {
  3737. if (obj.hasOwnProperty(attr)) {
  3738. _copy2[attr] = Util_Util.cloneObject(obj[attr]);
  3739. }
  3740. }
  3741. return _copy2;
  3742. }
  3743. throw new Error("Unable to copy obj! Its type isn't supported.");
  3744. },
  3745. /**
  3746. * @memberOf CommonUtil
  3747. * @description 判断两条线段是不是有交点。
  3748. * @param {GeometryPoint} a1 - 第一条线段的起始节点。
  3749. * @param {GeometryPoint} a2 - 第一条线段的结束节点。
  3750. * @param {GeometryPoint} b1 - 第二条线段的起始节点。
  3751. * @param {GeometryPoint} b2 - 第二条线段的结束节点。
  3752. * @returns {Object} 如果相交返回交点,如果不相交返回两条线段的位置关系。
  3753. */
  3754. lineIntersection: function lineIntersection(a1, a2, b1, b2) {
  3755. var intersectValue = null;
  3756. var k1;
  3757. var k2;
  3758. var b = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x);
  3759. var a = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x);
  3760. var ab = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y);
  3761. //ab==0代表两条线断的斜率一样
  3762. if (ab != 0) {
  3763. k1 = b / ab;
  3764. k2 = a / ab;
  3765. if (k1 >= 0 && k2 <= 1 && k1 <= 1 && k2 >= 0) {
  3766. intersectValue = new Geometry.Point(a1.x + k1 * (a2.x - a1.x), a1.y + k1 * (a2.y - a1.y));
  3767. } else {
  3768. intersectValue = 'No Intersection';
  3769. }
  3770. } else {
  3771. if (b == 0 && a == 0) {
  3772. var maxy = Math.max(a1.y, a2.y);
  3773. var miny = Math.min(a1.y, a2.y);
  3774. var maxx = Math.max(a1.x, a2.x);
  3775. var minx = Math.min(a1.x, a2.x);
  3776. if ((b1.y >= miny && b1.y <= maxy || b2.y >= miny && b2.y <= maxy) && b1.x >= minx && b1.x <= maxx || b2.x >= minx && b2.x <= maxx) {
  3777. intersectValue = 'Coincident'; //重合
  3778. } else {
  3779. intersectValue = 'Parallel'; //平行
  3780. }
  3781. } else {
  3782. intersectValue = 'Parallel'; //平行
  3783. }
  3784. }
  3785. return intersectValue;
  3786. },
  3787. /**
  3788. * @memberOf CommonUtil
  3789. * @description 获取文本外接矩形宽度与高度。
  3790. * @param {ThemeStyle} style - 文本样式。
  3791. * @param {string} text - 文本内容。
  3792. * @param {Object} element - DOM 元素。
  3793. * @returns {Object} 裁剪后的宽度,高度信息。
  3794. */
  3795. getTextBounds: function getTextBounds(style, text, element) {
  3796. document.body.appendChild(element);
  3797. element.style.width = 'auto';
  3798. element.style.height = 'auto';
  3799. if (style.fontSize) {
  3800. element.style.fontSize = style.fontSize;
  3801. }
  3802. if (style.fontFamily) {
  3803. element.style.fontFamily = style.fontFamily;
  3804. }
  3805. if (style.fontWeight) {
  3806. element.style.fontWeight = style.fontWeight;
  3807. }
  3808. element.style.position = 'relative';
  3809. element.style.visibility = 'hidden';
  3810. //fix 在某些情况下,element内的文本变成竖起排列,导致宽度计算不正确的bug
  3811. element.style.display = 'inline-block';
  3812. element.innerHTML = text;
  3813. var textWidth = element.clientWidth;
  3814. var textHeight = element.clientHeight;
  3815. document.body.removeChild(element);
  3816. return {
  3817. textWidth: textWidth,
  3818. textHeight: textHeight
  3819. };
  3820. },
  3821. /**
  3822. * @memberOf CommonUtil
  3823. * @description 获取转换后的path路径。
  3824. * @param {string} path - 待转换的path,包含`{param}`。
  3825. * @param {Object} pathParams - path中待替换的参数。
  3826. * @returns {string} 转换后的path路径。
  3827. */
  3828. convertPath: function convertPath(path, pathParams) {
  3829. if (!pathParams) {
  3830. return path;
  3831. }
  3832. return path.replace(/\{([\w-\.]+)\}/g, function (fullMatch, key) {
  3833. var value;
  3834. if (pathParams.hasOwnProperty(key)) {
  3835. value = paramToString(pathParams[key]);
  3836. } else {
  3837. value = fullMatch;
  3838. }
  3839. return encodeURIComponent(value);
  3840. });
  3841. }
  3842. };
  3843. /**
  3844. * @enum INCHES_PER_UNIT
  3845. * @description 每单位的英尺数。
  3846. * @type {number}
  3847. * @private
  3848. */
  3849. var INCHES_PER_UNIT = {
  3850. inches: 1.0,
  3851. ft: 12.0,
  3852. mi: 63360.0,
  3853. m: 39.3701,
  3854. km: 39370.1,
  3855. dd: 4374754,
  3856. yd: 36
  3857. };
  3858. INCHES_PER_UNIT['in'] = INCHES_PER_UNIT.inches;
  3859. INCHES_PER_UNIT['degrees'] = INCHES_PER_UNIT.dd;
  3860. INCHES_PER_UNIT['nmi'] = 1852 * INCHES_PER_UNIT.m;
  3861. // Units from CS-Map
  3862. var METERS_PER_INCH = 0.0254000508001016002;
  3863. Util_Util.extend(INCHES_PER_UNIT, {
  3864. Inch: INCHES_PER_UNIT.inches,
  3865. Meter: 1.0 / METERS_PER_INCH,
  3866. //EPSG:9001
  3867. Foot: 0.30480060960121920243 / METERS_PER_INCH,
  3868. //EPSG:9003
  3869. IFoot: 0.3048 / METERS_PER_INCH,
  3870. //EPSG:9002
  3871. ClarkeFoot: 0.3047972651151 / METERS_PER_INCH,
  3872. //EPSG:9005
  3873. SearsFoot: 0.30479947153867624624 / METERS_PER_INCH,
  3874. //EPSG:9041
  3875. GoldCoastFoot: 0.30479971018150881758 / METERS_PER_INCH,
  3876. //EPSG:9094
  3877. IInch: 0.0254 / METERS_PER_INCH,
  3878. MicroInch: 0.0000254 / METERS_PER_INCH,
  3879. Mil: 0.0000000254 / METERS_PER_INCH,
  3880. Centimeter: 0.01 / METERS_PER_INCH,
  3881. Kilometer: 1000.0 / METERS_PER_INCH,
  3882. //EPSG:9036
  3883. Yard: 0.91440182880365760731 / METERS_PER_INCH,
  3884. SearsYard: 0.914398414616029 / METERS_PER_INCH,
  3885. //EPSG:9040
  3886. IndianYard: 0.91439853074444079983 / METERS_PER_INCH,
  3887. //EPSG:9084
  3888. IndianYd37: 0.91439523 / METERS_PER_INCH,
  3889. //EPSG:9085
  3890. IndianYd62: 0.9143988 / METERS_PER_INCH,
  3891. //EPSG:9086
  3892. IndianYd75: 0.9143985 / METERS_PER_INCH,
  3893. //EPSG:9087
  3894. IndianFoot: 0.30479951 / METERS_PER_INCH,
  3895. //EPSG:9080
  3896. IndianFt37: 0.30479841 / METERS_PER_INCH,
  3897. //EPSG:9081
  3898. IndianFt62: 0.3047996 / METERS_PER_INCH,
  3899. //EPSG:9082
  3900. IndianFt75: 0.3047995 / METERS_PER_INCH,
  3901. //EPSG:9083
  3902. Mile: 1609.34721869443738887477 / METERS_PER_INCH,
  3903. IYard: 0.9144 / METERS_PER_INCH,
  3904. //EPSG:9096
  3905. IMile: 1609.344 / METERS_PER_INCH,
  3906. //EPSG:9093
  3907. NautM: 1852.0 / METERS_PER_INCH,
  3908. //EPSG:9030
  3909. 'Lat-66': 110943.316488932731 / METERS_PER_INCH,
  3910. 'Lat-83': 110946.25736872234125 / METERS_PER_INCH,
  3911. Decimeter: 0.1 / METERS_PER_INCH,
  3912. Millimeter: 0.001 / METERS_PER_INCH,
  3913. Dekameter: 10.0 / METERS_PER_INCH,
  3914. Decameter: 10.0 / METERS_PER_INCH,
  3915. Hectometer: 100.0 / METERS_PER_INCH,
  3916. GermanMeter: 1.0000135965 / METERS_PER_INCH,
  3917. //EPSG:9031
  3918. CaGrid: 0.999738 / METERS_PER_INCH,
  3919. ClarkeChain: 20.1166194976 / METERS_PER_INCH,
  3920. //EPSG:9038
  3921. GunterChain: 20.11684023368047 / METERS_PER_INCH,
  3922. //EPSG:9033
  3923. BenoitChain: 20.116782494375872 / METERS_PER_INCH,
  3924. //EPSG:9062
  3925. SearsChain: 20.11676512155 / METERS_PER_INCH,
  3926. //EPSG:9042
  3927. ClarkeLink: 0.201166194976 / METERS_PER_INCH,
  3928. //EPSG:9039
  3929. GunterLink: 0.2011684023368047 / METERS_PER_INCH,
  3930. //EPSG:9034
  3931. BenoitLink: 0.20116782494375872 / METERS_PER_INCH,
  3932. //EPSG:9063
  3933. SearsLink: 0.2011676512155 / METERS_PER_INCH,
  3934. //EPSG:9043
  3935. Rod: 5.02921005842012 / METERS_PER_INCH,
  3936. IntnlChain: 20.1168 / METERS_PER_INCH,
  3937. //EPSG:9097
  3938. IntnlLink: 0.201168 / METERS_PER_INCH,
  3939. //EPSG:9098
  3940. Perch: 5.02921005842012 / METERS_PER_INCH,
  3941. Pole: 5.02921005842012 / METERS_PER_INCH,
  3942. Furlong: 201.1684023368046 / METERS_PER_INCH,
  3943. Rood: 3.778266898 / METERS_PER_INCH,
  3944. CapeFoot: 0.3047972615 / METERS_PER_INCH,
  3945. Brealey: 375.0 / METERS_PER_INCH,
  3946. ModAmFt: 0.304812252984505969011938 / METERS_PER_INCH,
  3947. Fathom: 1.8288 / METERS_PER_INCH,
  3948. 'NautM-UK': 1853.184 / METERS_PER_INCH,
  3949. '50kilometers': 50000.0 / METERS_PER_INCH,
  3950. '150kilometers': 150000.0 / METERS_PER_INCH
  3951. });
  3952. //unit abbreviations supported by PROJ.4
  3953. Util_Util.extend(INCHES_PER_UNIT, {
  3954. mm: INCHES_PER_UNIT['Meter'] / 1000.0,
  3955. cm: INCHES_PER_UNIT['Meter'] / 100.0,
  3956. dm: INCHES_PER_UNIT['Meter'] * 100.0,
  3957. km: INCHES_PER_UNIT['Meter'] * 1000.0,
  3958. kmi: INCHES_PER_UNIT['nmi'],
  3959. //International Nautical Mile
  3960. fath: INCHES_PER_UNIT['Fathom'],
  3961. //International Fathom
  3962. ch: INCHES_PER_UNIT['IntnlChain'],
  3963. //International Chain
  3964. link: INCHES_PER_UNIT['IntnlLink'],
  3965. //International Link
  3966. 'us-in': INCHES_PER_UNIT['inches'],
  3967. //U.S. Surveyor's Inch
  3968. 'us-ft': INCHES_PER_UNIT['Foot'],
  3969. //U.S. Surveyor's Foot
  3970. 'us-yd': INCHES_PER_UNIT['Yard'],
  3971. //U.S. Surveyor's Yard
  3972. 'us-ch': INCHES_PER_UNIT['GunterChain'],
  3973. //U.S. Surveyor's Chain
  3974. 'us-mi': INCHES_PER_UNIT['Mile'],
  3975. //U.S. Surveyor's Statute Mile
  3976. 'ind-yd': INCHES_PER_UNIT['IndianYd37'],
  3977. //Indian Yard
  3978. 'ind-ft': INCHES_PER_UNIT['IndianFt37'],
  3979. //Indian Foot
  3980. 'ind-ch': 20.11669506 / METERS_PER_INCH //Indian Chain
  3981. });
  3982. //将服务端的地图单位转成SuperMap的地图单位
  3983. INCHES_PER_UNIT['degree'] = INCHES_PER_UNIT.dd;
  3984. INCHES_PER_UNIT['meter'] = INCHES_PER_UNIT.m;
  3985. INCHES_PER_UNIT['foot'] = INCHES_PER_UNIT.ft;
  3986. INCHES_PER_UNIT['inch'] = INCHES_PER_UNIT.inches;
  3987. INCHES_PER_UNIT['mile'] = INCHES_PER_UNIT.mi;
  3988. INCHES_PER_UNIT['kilometer'] = INCHES_PER_UNIT.km;
  3989. INCHES_PER_UNIT['yard'] = INCHES_PER_UNIT.yd;
  3990. function paramToString(param) {
  3991. if (param == undefined || param == null) {
  3992. return '';
  3993. }
  3994. if (param instanceof Date) {
  3995. return param.toJSON();
  3996. }
  3997. if (canBeJsonified(param)) {
  3998. return JSON.stringify(param);
  3999. }
  4000. return param.toString();
  4001. }
  4002. function canBeJsonified(str) {
  4003. if (typeof str !== 'string' && _typeof(str) !== 'object') {
  4004. return false;
  4005. }
  4006. try {
  4007. var type = str.toString();
  4008. return type === '[object Object]' || type === '[object Array]';
  4009. } catch (err) {
  4010. return false;
  4011. }
  4012. }
  4013. ;// CONCATENATED MODULE: ./src/common/commontypes/Event.js
  4014. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  4015. * This program are made available under the terms of the Apache License, Version 2.0
  4016. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  4017. /**
  4018. * @name Event
  4019. * @namespace
  4020. * @category BaseTypes Events
  4021. * @description 事件处理函数.
  4022. * @usage
  4023. * ```
  4024. * // 浏览器
  4025. * <script type="text/javascript" src="{cdn}"></script>
  4026. * <script>
  4027. * const element = {namespace}.Event.element();
  4028. *
  4029. * // 弃用的写法
  4030. * const result = SuperMap.Event.element();
  4031. *
  4032. * </script>
  4033. *
  4034. * // ES6 Import
  4035. * import { Event } from '{npm}';
  4036. *
  4037. * const result = Event.element();
  4038. * ```
  4039. */
  4040. var Event = {
  4041. /**
  4042. * @description 事件观察者列表。
  4043. * @type {Object}
  4044. * @default false
  4045. */
  4046. observers: false,
  4047. /**
  4048. * @description KEY_SPACE
  4049. * @type {number}
  4050. * @default 32
  4051. */
  4052. KEY_SPACE: 32,
  4053. /**
  4054. * @description KEY_BACKSPACE
  4055. * @type {number}
  4056. * @default 8
  4057. */
  4058. KEY_BACKSPACE: 8,
  4059. /**
  4060. * @description KEY_TAB
  4061. * @type {number}
  4062. * @default 9
  4063. */
  4064. KEY_TAB: 9,
  4065. /**
  4066. * @description KEY_RETURN
  4067. * @type {number}
  4068. * @default 13
  4069. */
  4070. KEY_RETURN: 13,
  4071. /**
  4072. * @description KEY_ESC
  4073. * @type {number}
  4074. * @default 27
  4075. */
  4076. KEY_ESC: 27,
  4077. /**
  4078. * @description KEY_LEFT
  4079. * @type {number}
  4080. * @default 37
  4081. */
  4082. KEY_LEFT: 37,
  4083. /**
  4084. * @description KEY_UP
  4085. * @type {number}
  4086. * @default 38
  4087. */
  4088. KEY_UP: 38,
  4089. /**
  4090. * @description KEY_RIGHT
  4091. * @type {number}
  4092. * @default 39
  4093. */
  4094. KEY_RIGHT: 39,
  4095. /**
  4096. * @description KEY_DOWN
  4097. * @type {number}
  4098. * @default 40
  4099. */
  4100. KEY_DOWN: 40,
  4101. /**
  4102. * @description KEY_DELETE
  4103. * @type {number}
  4104. * @default 46
  4105. */
  4106. KEY_DELETE: 46,
  4107. /**
  4108. * @description 监听浏览器 DOM 事件。
  4109. * @param {Event} event - Event 对象。
  4110. * @returns {HTMLElement} 触发事件的 DOM 元素。
  4111. */
  4112. element: function element(event) {
  4113. return event.target || event.srcElement;
  4114. },
  4115. /**
  4116. * @description 判断事件是否由单次触摸引起。
  4117. * @param {Event} event - Event 对象。
  4118. * @returns {boolean} 是否有且只有一个当前在与触摸表面接触的 Touch 对象。
  4119. */
  4120. isSingleTouch: function isSingleTouch(event) {
  4121. return event.touches && event.touches.length === 1;
  4122. },
  4123. /**
  4124. * @description 判断事件是否由多点触控引起。
  4125. * @param {Event} event - Event 对象。
  4126. * @returns {boolean} 是否存在多个当前在与触摸表面接触的 Touch 对象。
  4127. */
  4128. isMultiTouch: function isMultiTouch(event) {
  4129. return event.touches && event.touches.length > 1;
  4130. },
  4131. /**
  4132. * @description 确定事件是否由左键单击引起。
  4133. * @param {Event} event - Event 对象。
  4134. * @returns {boolean} 是否点击鼠标左键。
  4135. */
  4136. isLeftClick: function isLeftClick(event) {
  4137. return event.which && event.which === 1 || event.button && event.button === 1;
  4138. },
  4139. /**
  4140. * @description 确定事件是否由鼠标右键单击引起。
  4141. * @param {Event} event - Event 对象。
  4142. * @returns {boolean} 是否点击鼠标右键。
  4143. */
  4144. isRightClick: function isRightClick(event) {
  4145. return event.which && event.which === 3 || event.button && event.button === 2;
  4146. },
  4147. /**
  4148. * @description 阻止事件冒泡。
  4149. * @param {Event} event - Event 对象。
  4150. * @param {boolean} allowDefault - 默认为 false,表示阻止事件的默认行为。
  4151. */
  4152. stop: function stop(event, allowDefault) {
  4153. if (!allowDefault) {
  4154. if (event.preventDefault) {
  4155. event.preventDefault();
  4156. } else {
  4157. event.returnValue = false;
  4158. }
  4159. }
  4160. if (event.stopPropagation) {
  4161. event.stopPropagation();
  4162. } else {
  4163. event.cancelBubble = true;
  4164. }
  4165. },
  4166. /**
  4167. * @description 查询触发指定事件的 DOM 元素。
  4168. * @param {Event} event - Event 对象。
  4169. * @param {string} tagName - html 标签名。
  4170. * @returns {HTMLElement} DOM 元素。
  4171. */
  4172. findElement: function findElement(event, tagName) {
  4173. var element = Event.element(event);
  4174. while (element.parentNode && (!element.tagName || element.tagName.toUpperCase() != tagName.toUpperCase())) {
  4175. element = element.parentNode;
  4176. }
  4177. return element;
  4178. },
  4179. /**
  4180. * @description 监听事件,注册事件处理方法。
  4181. * @param {(HTMLElement|string)} elementParam - 待监听的 DOM 对象或者其 ID 标识。
  4182. * @param {string} name - 监听事件的类别名称。
  4183. * @param {function} observer - 注册的事件处理方法。
  4184. * @param {boolean} [useCapture=false] - 是否捕获。
  4185. */
  4186. observe: function observe(elementParam, name, observer, useCapture) {
  4187. var element = Util_Util.getElement(elementParam);
  4188. useCapture = useCapture || false;
  4189. if (name === 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)) {
  4190. name = 'keydown';
  4191. }
  4192. //if observers cache has not yet been created, create it
  4193. if (!this.observers) {
  4194. this.observers = {};
  4195. }
  4196. //if not already assigned, make a new unique cache ID
  4197. if (!element._eventCacheID) {
  4198. var idPrefix = "eventCacheID_";
  4199. if (element.id) {
  4200. idPrefix = element.id + "_" + idPrefix;
  4201. }
  4202. element._eventCacheID = Util_Util.createUniqueID(idPrefix);
  4203. }
  4204. var cacheID = element._eventCacheID;
  4205. //if there is not yet a hash entry for this element, add one
  4206. if (!this.observers[cacheID]) {
  4207. this.observers[cacheID] = [];
  4208. }
  4209. //add a new observer to this element's list
  4210. this.observers[cacheID].push({
  4211. 'element': element,
  4212. 'name': name,
  4213. 'observer': observer,
  4214. 'useCapture': useCapture
  4215. });
  4216. //add the actual browser event listener
  4217. if (element.addEventListener) {
  4218. if (name === 'mousewheel') {
  4219. // https://www.chromestatus.com/features/6662647093133312
  4220. element.addEventListener(name, observer, {
  4221. useCapture: useCapture,
  4222. passive: false
  4223. });
  4224. } else {
  4225. element.addEventListener(name, observer, useCapture);
  4226. }
  4227. } else if (element.attachEvent) {
  4228. element.attachEvent('on' + name, observer);
  4229. }
  4230. },
  4231. /**
  4232. * @description 移除给定 DOM 元素的监听事件。
  4233. * @param {(HTMLElement|string)} elementParam - 待监听的 DOM 对象或者其 ID 标识。
  4234. */
  4235. stopObservingElement: function stopObservingElement(elementParam) {
  4236. var element = Util_Util.getElement(elementParam);
  4237. var cacheID = element._eventCacheID;
  4238. this._removeElementObservers(Event.observers[cacheID]);
  4239. },
  4240. _removeElementObservers: function _removeElementObservers(elementObservers) {
  4241. if (elementObservers) {
  4242. for (var i = elementObservers.length - 1; i >= 0; i--) {
  4243. var entry = elementObservers[i];
  4244. var args = new Array(entry.element, entry.name, entry.observer, entry.useCapture);
  4245. Event.stopObserving.apply(this, args);
  4246. }
  4247. }
  4248. },
  4249. /**
  4250. * @description 移除事件监听和注册的事件处理方法。注意:事件的移除和监听相对应,移除时的各属性信息必须监听时保持一致才能确保事件移除成功。
  4251. * @param {(HTMLElement|string)} elementParam - 被监听的 DOM 元素或者其 ID。
  4252. * @param {string} name - 需要移除的被监听事件名称。
  4253. * @param {function} observer - 需要移除的事件处理方法。
  4254. * @param {boolean} [useCapture=false] - 是否捕获。
  4255. * @returns {boolean} 监听事件是否被移除。
  4256. */
  4257. stopObserving: function stopObserving(elementParam, name, observer, useCapture) {
  4258. useCapture = useCapture || false;
  4259. var element = Util_Util.getElement(elementParam);
  4260. var cacheID = element._eventCacheID;
  4261. if (name === 'keypress') {
  4262. if (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent) {
  4263. name = 'keydown';
  4264. }
  4265. }
  4266. // find element's entry in this.observers cache and remove it
  4267. var foundEntry = false;
  4268. var elementObservers = Event.observers[cacheID];
  4269. if (elementObservers) {
  4270. // find the specific event type in the element's list
  4271. var i = 0;
  4272. while (!foundEntry && i < elementObservers.length) {
  4273. var cacheEntry = elementObservers[i];
  4274. if (cacheEntry.name === name && cacheEntry.observer === observer && cacheEntry.useCapture === useCapture) {
  4275. elementObservers.splice(i, 1);
  4276. if (elementObservers.length == 0) {
  4277. delete Event.observers[cacheID];
  4278. }
  4279. foundEntry = true;
  4280. break;
  4281. }
  4282. i++;
  4283. }
  4284. }
  4285. //actually remove the event listener from browser
  4286. if (foundEntry) {
  4287. if (element.removeEventListener) {
  4288. element.removeEventListener(name, observer, useCapture);
  4289. } else if (element && element.detachEvent) {
  4290. element.detachEvent('on' + name, observer);
  4291. }
  4292. }
  4293. return foundEntry;
  4294. },
  4295. /**
  4296. * @description 移除缓存中的监听事件。
  4297. */
  4298. unloadCache: function unloadCache() {
  4299. // check for Event before checking for observers, because
  4300. // Event may be undefined in IE if no map instance was
  4301. // created
  4302. if (Event && Event.observers) {
  4303. for (var cacheID in Event.observers) {
  4304. var elementObservers = Event.observers[cacheID];
  4305. Event._removeElementObservers.apply(this, [elementObservers]);
  4306. }
  4307. Event.observers = false;
  4308. }
  4309. },
  4310. CLASS_NAME: "SuperMap.Event"
  4311. };
  4312. /* prevent memory leaks in IE */
  4313. Event.observe(window, 'resize', Event.unloadCache, false);
  4314. ;// CONCATENATED MODULE: ./src/common/commontypes/Events.js
  4315. function Events_typeof(obj) { "@babel/helpers - typeof"; return Events_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, Events_typeof(obj); }
  4316. function Events_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4317. function Events_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  4318. function Events_createClass(Constructor, protoProps, staticProps) { if (protoProps) Events_defineProperties(Constructor.prototype, protoProps); if (staticProps) Events_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  4319. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  4320. * This program are made available under the terms of the Apache License, Version 2.0
  4321. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  4322. /**
  4323. * @class Events
  4324. * @deprecatedclass SuperMap.Events
  4325. * @classdesc 事件类。
  4326. * @category BaseTypes Events
  4327. * @param {Object} object - 当前事件对象被添加到的 JS 对象。
  4328. * @param {HTMLElement} element - 响应浏览器事件的 DOM 元素。
  4329. * @param {Array.<string>} eventTypes - 自定义应用事件的数组。
  4330. * @param {boolean} [fallThrough=false] - 是否允许事件处理之后向上传递(冒泡),为 false 的时候阻止事件冒泡。
  4331. * @param {Object} options - 事件对象选项。
  4332. * @usage
  4333. */
  4334. var Events = /*#__PURE__*/function () {
  4335. function Events(object, element, eventTypes, fallThrough, options) {
  4336. Events_classCallCheck(this, Events);
  4337. /**
  4338. * @member {Array.<string>} Events.prototype.BROWSER_EVENTS
  4339. * @description 支持的事件。
  4340. * @constant
  4341. * @default [
  4342. "mouseover", "mouseout","mousedown", "mouseup", "mousemove",
  4343. "click", "dblclick", "rightclick", "dblrightclick","resize",
  4344. "focus", "blur","touchstart", "touchmove", "touchend","keydown",
  4345. "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup",
  4346. "MSGestureStart", "MSGestureChange", "MSGestureEnd","contextmenu"
  4347. ]
  4348. */
  4349. this.BROWSER_EVENTS = ["mouseover", "mouseout", "mousedown", "mouseup", "mousemove", "click", "dblclick", "rightclick", "dblrightclick", "resize", "focus", "blur", "touchstart", "touchmove", "touchend", "keydown", "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup", "MSGestureStart", "MSGestureChange", "MSGestureEnd", "contextmenu"];
  4350. /**
  4351. * @member {Object} Events.prototype.listeners
  4352. * @description 事件监听器函数。
  4353. */
  4354. this.listeners = {};
  4355. /**
  4356. * @member {Object} Events.prototype.object
  4357. * @description 发布应用程序事件的对象。
  4358. */
  4359. this.object = object;
  4360. /**
  4361. * @member {HTMLElement} Events.prototype.element
  4362. * @description 接受浏览器事件的 DOM 节点。
  4363. */
  4364. this.element = null;
  4365. /**
  4366. * @member {Array.<string>} Events.prototype.eventTypes
  4367. * @description 支持的事件类型列表。
  4368. */
  4369. this.eventTypes = [];
  4370. /**
  4371. * @member {function} Events.prototype.eventHandler
  4372. * @description 绑定在元素上的事件处理器对象。
  4373. */
  4374. this.eventHandler = null;
  4375. /**
  4376. * @member {boolean} [Events.prototype.fallThrough=false]
  4377. * @description 是否允许事件处理之后向上传递(冒泡),为 false 的时候阻止事件冒泡。
  4378. */
  4379. this.fallThrough = fallThrough;
  4380. /**
  4381. * @member {boolean} [Events.prototype.includeXY=false]
  4382. * @description 判断是否让 xy 属性自动创建到浏览器上的鼠标事件,一般设置为 false,如果设置为 true,鼠标事件将会在事件传递过程中自动产生 xy 属性。可根据事件对象的 'evt.object' 属性在相关的事件句柄上调用 getMousePosition 函数。这个选项习惯默认为 false 的原因在于,当创建一个事件对象,其主要目的是管理。在一个 div 的相对定位的鼠标事件,将其设为 true 也是有意义的。这个选项也可以用来控制是否抵消缓存。如果设为 false 不抵消,如果设为 true,用 this.clearMouseCache() 清除缓存偏移(边界元素偏移,元素在页面的位置偏移)。
  4383. * @example
  4384. * function named(evt) {
  4385. * this.xy = this.object.events.getMousePosition(evt);
  4386. * }
  4387. */
  4388. this.includeXY = false;
  4389. /**
  4390. * @member {Object} Events.prototype.extensions
  4391. * @description 事件扩展。Keys 代表事件类型,values 代表事件对象。
  4392. */
  4393. this.extensions = {};
  4394. /**
  4395. * @member {Object} Events.prototype.extensionCount
  4396. * @description 事件扩展数量。
  4397. */
  4398. this.extensionCount = {};
  4399. /**
  4400. * @member {Object} Events.prototype.clearMouseListener
  4401. * @description 待移除的鼠标监听事件。
  4402. */
  4403. this.clearMouseListener = null;
  4404. Util_Util.extend(this, options);
  4405. if (eventTypes != null) {
  4406. for (var i = 0, len = eventTypes.length; i < len; i++) {
  4407. this.addEventType(eventTypes[i]);
  4408. }
  4409. }
  4410. if (element != null) {
  4411. this.attachToElement(element);
  4412. }
  4413. this.CLASS_NAME = "SuperMap.Events";
  4414. }
  4415. /**
  4416. * @function Events.prototype.destroy
  4417. * @description 移除当前要素 element 上的所有事件监听和处理。
  4418. */
  4419. Events_createClass(Events, [{
  4420. key: "destroy",
  4421. value: function destroy() {
  4422. for (var e in this.extensions) {
  4423. if (typeof this.extensions[e] !== "boolean") {
  4424. this.extensions[e].destroy();
  4425. }
  4426. }
  4427. this.extensions = null;
  4428. if (this.element) {
  4429. Event.stopObservingElement(this.element);
  4430. if (this.element.hasScrollEvent) {
  4431. Event.stopObserving(window, "scroll", this.clearMouseListener);
  4432. }
  4433. }
  4434. this.element = null;
  4435. this.listeners = null;
  4436. this.object = null;
  4437. this.eventTypes = null;
  4438. this.fallThrough = null;
  4439. this.eventHandler = null;
  4440. }
  4441. /**
  4442. * @function Events.prototype.addEventType
  4443. * @description 在此事件对象中添加新的事件类型,如果这个事件类型已经添加过了,则不做任何事情。
  4444. * @param {string} eventName - 事件名。
  4445. */
  4446. }, {
  4447. key: "addEventType",
  4448. value: function addEventType(eventName) {
  4449. if (!this.listeners[eventName]) {
  4450. this.eventTypes.push(eventName);
  4451. this.listeners[eventName] = [];
  4452. }
  4453. }
  4454. /**
  4455. * @function Events.prototype.attachToElement
  4456. * @description 给 DOM 元素绑定浏览器事件。
  4457. * @param {HTMLElement} element - 绑定浏览器事件的 DOM 元素。
  4458. */
  4459. }, {
  4460. key: "attachToElement",
  4461. value: function attachToElement(element) {
  4462. if (this.element) {
  4463. Event.stopObservingElement(this.element);
  4464. } else {
  4465. // keep a bound copy of handleBrowserEvent() so that we can
  4466. // pass the same function to both Event.observe() and .stopObserving()
  4467. this.eventHandler = FunctionExt.bindAsEventListener(this.handleBrowserEvent, this);
  4468. // to be used with observe and stopObserving
  4469. this.clearMouseListener = FunctionExt.bind(this.clearMouseCache, this);
  4470. }
  4471. this.element = element;
  4472. for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
  4473. var eventType = this.BROWSER_EVENTS[i];
  4474. // every browser event has a corresponding application event
  4475. // (whether it's listened for or not).
  4476. this.addEventType(eventType);
  4477. // use Prototype to register the event cross-browser
  4478. Event.observe(element, eventType, this.eventHandler);
  4479. }
  4480. // disable dragstart in IE so that mousedown/move/up works normally
  4481. Event.observe(element, "dragstart", Event.stop);
  4482. }
  4483. /**
  4484. * @function Events.prototype.on
  4485. * @description 在一个相同的范围内注册监听器的方法,此方法调用 register 函数。
  4486. * @example
  4487. * // 注册一个 "loadstart" 监听事件
  4488. * events.on({"loadstart": loadStartListener});
  4489. *
  4490. * // 同样注册一个 "loadstart" 监听事件
  4491. * events.register("loadstart", undefined, loadStartListener);
  4492. *
  4493. * // 同时为对象注册多个监听事件
  4494. * events.on({
  4495. * "loadstart": loadStartListener,
  4496. * "loadend": loadEndListener,
  4497. * scope: object
  4498. * });
  4499. *
  4500. * // 同时为对象注册多个监听事件,多次调用 register 方法
  4501. * events.register("loadstart", object, loadStartListener);
  4502. * events.register("loadend", object, loadEndListener);
  4503. *
  4504. *
  4505. * @param {Object} object - 添加监听的对象。
  4506. */
  4507. }, {
  4508. key: "on",
  4509. value: function on(object) {
  4510. for (var type in object) {
  4511. if (type !== "scope" && object.hasOwnProperty(type)) {
  4512. this.register(type, object.scope, object[type]);
  4513. }
  4514. }
  4515. }
  4516. /**
  4517. * @function Events.prototype.register
  4518. * @description 在事件对象上注册一个事件。当事件被触发时,'func' 函数被调用,假设我们触发一个事件,
  4519. * 指定 Bounds 作为 "obj",当事件被触发时,回调函数的上下文作为 Bounds 对象。
  4520. * @param {string} type - 事件注册者的名字。
  4521. * @param {Object} [obj=this.object] - 对象绑定的回调。
  4522. * @param {function} [func] - 回调函数,如果没有特定的回调,则这个函数不做任何事情。
  4523. * @param {(boolean|Object)} [priority] - 当为 true 时将新的监听加在事件队列的前面。
  4524. */
  4525. }, {
  4526. key: "register",
  4527. value: function register(type, obj, func, priority) {
  4528. if (type in Events && !this.extensions[type]) {
  4529. this.extensions[type] = new Events[type](this);
  4530. }
  4531. if (func != null && Util_Util.indexOf(this.eventTypes, type) !== -1) {
  4532. if (obj == null) {
  4533. obj = this.object;
  4534. }
  4535. var listeners = this.listeners[type];
  4536. if (!listeners) {
  4537. listeners = [];
  4538. this.listeners[type] = listeners;
  4539. this.extensionCount[type] = 0;
  4540. }
  4541. var listener = {
  4542. obj: obj,
  4543. func: func
  4544. };
  4545. if (priority) {
  4546. listeners.splice(this.extensionCount[type], 0, listener);
  4547. if (Events_typeof(priority) === "object" && priority.extension) {
  4548. this.extensionCount[type]++;
  4549. }
  4550. } else {
  4551. listeners.push(listener);
  4552. }
  4553. }
  4554. }
  4555. /**
  4556. * @function Events.prototype.registerPriority
  4557. * @description 相同的注册方法,但是在前面增加新的监听者事件查询而代替到方法的结束。
  4558. * @param {string} type - 事件注册者的名字。
  4559. * @param {Object} [obj=this.object] - 对象绑定的回调。
  4560. * @param {function} [func] - 回调函数,如果没有特定的回调,则这个函数不做任何事情。
  4561. */
  4562. }, {
  4563. key: "registerPriority",
  4564. value: function registerPriority(type, obj, func) {
  4565. this.register(type, obj, func, true);
  4566. }
  4567. /**
  4568. * @function Events.prototype.un
  4569. * @description 在一个相同的范围内取消注册监听器的方法,此方法调用 unregister 函数。
  4570. * @example
  4571. * // 移除 "loadstart" 事件监听
  4572. * events.un({"loadstart": loadStartListener});
  4573. *
  4574. * // 使用 "unregister" 方法移除 "loadstart" 事件监听
  4575. * events.unregister("loadstart", undefined, loadStartListener);
  4576. *
  4577. * // 取消对象多个事件监听
  4578. * events.un({
  4579. * "loadstart": loadStartListener,
  4580. * "loadend": loadEndListener,
  4581. * scope: object
  4582. * });
  4583. *
  4584. * // 取消对象多个事件监听,多次调用unregister方法。
  4585. * events.unregister("loadstart", object, loadStartListener);
  4586. * events.unregister("loadend", object, loadEndListener);
  4587. *
  4588. * @param {Object} object - 移除监听的对象。
  4589. */
  4590. }, {
  4591. key: "un",
  4592. value: function un(object) {
  4593. for (var type in object) {
  4594. if (type !== "scope" && object.hasOwnProperty(type)) {
  4595. this.unregister(type, object.scope, object[type]);
  4596. }
  4597. }
  4598. }
  4599. /**
  4600. * @function Events.prototype.unregister
  4601. * @description 取消注册。
  4602. * @param {string} type - 事件类型。
  4603. * @param {Object} [obj=this.object] - 对象绑定的回调。
  4604. * @param {function} [func] - 回调函数,如果没有特定的回调,则这个函数不做任何事情。
  4605. */
  4606. }, {
  4607. key: "unregister",
  4608. value: function unregister(type, obj, func) {
  4609. if (obj == null) {
  4610. obj = this.object;
  4611. }
  4612. var listeners = this.listeners[type];
  4613. if (listeners != null) {
  4614. for (var i = 0, len = listeners.length; i < len; i++) {
  4615. if (listeners[i].obj === obj && listeners[i].func === func) {
  4616. listeners.splice(i, 1);
  4617. break;
  4618. }
  4619. }
  4620. }
  4621. }
  4622. /**
  4623. * @function Events.prototype.remove
  4624. * @description 删除某个事件类型的所有监听,如果该事件类型没有注册,则不做任何操作。
  4625. * @param {string} type - 事件类型。
  4626. */
  4627. }, {
  4628. key: "remove",
  4629. value: function remove(type) {
  4630. if (this.listeners[type] != null) {
  4631. this.listeners[type] = [];
  4632. }
  4633. }
  4634. /**
  4635. * @function Events.prototype.triggerEvent
  4636. * @description 触发一个特定的注册事件。
  4637. * @param {string} type - 触发事件类型。
  4638. * @param {Event} evt - 事件对象。
  4639. * @returns {Event|boolean} 监听对象,如果返回是 false,则停止监听。
  4640. */
  4641. }, {
  4642. key: "triggerEvent",
  4643. value: function triggerEvent(type, evt) {
  4644. var listeners = this.listeners[type];
  4645. // fast path
  4646. if (!listeners || listeners.length == 0) {
  4647. return undefined;
  4648. }
  4649. // prep evt object with object & div references
  4650. if (evt == null) {
  4651. evt = {};
  4652. }
  4653. evt.object = this.object;
  4654. evt.element = this.element;
  4655. if (!evt.type) {
  4656. evt.type = type;
  4657. }
  4658. // execute all callbacks registered for specified type
  4659. // get a clone of the listeners array to
  4660. // allow for splicing during callbacks
  4661. listeners = listeners.slice();
  4662. var continueChain;
  4663. for (var i = 0, len = listeners.length; i < len; i++) {
  4664. var callback = listeners[i];
  4665. // bind the context to callback.obj
  4666. continueChain = callback.func.apply(callback.obj, [evt]);
  4667. if (continueChain != undefined && continueChain === false) {
  4668. // if callback returns false, execute no more callbacks.
  4669. break;
  4670. }
  4671. }
  4672. // don't fall through to other DOM elements
  4673. if (!this.fallThrough) {
  4674. Event.stop(evt, true);
  4675. }
  4676. return continueChain;
  4677. }
  4678. /**
  4679. * @function Events.prototype.handleBrowserEvent
  4680. * @description 对 triggerEvent 函数的包装,给事件对象设置了 xy 属性(即当前鼠标点的 xy 坐标)。
  4681. * @param {Event} evt - 事件对象。
  4682. */
  4683. }, {
  4684. key: "handleBrowserEvent",
  4685. value: function handleBrowserEvent(evt) {
  4686. var type = evt.type,
  4687. listeners = this.listeners[type];
  4688. if (!listeners || listeners.length == 0) {
  4689. // noone's listening, bail out
  4690. return;
  4691. }
  4692. // add clientX & clientY to all events - corresponds to average x, y
  4693. var touches = evt.touches;
  4694. if (touches && touches[0]) {
  4695. var x = 0;
  4696. var y = 0;
  4697. var num = touches.length;
  4698. var touch;
  4699. for (var i = 0; i < num; ++i) {
  4700. touch = touches[i];
  4701. x += touch.clientX;
  4702. y += touch.clientY;
  4703. }
  4704. evt.clientX = x / num;
  4705. evt.clientY = y / num;
  4706. }
  4707. if (this.includeXY) {
  4708. evt.xy = this.getMousePosition(evt);
  4709. }
  4710. this.triggerEvent(type, evt);
  4711. }
  4712. /**
  4713. * @function Events.prototype.clearMouseCache
  4714. * @description 清除鼠标缓存。
  4715. */
  4716. }, {
  4717. key: "clearMouseCache",
  4718. value: function clearMouseCache() {
  4719. this.element.scrolls = null;
  4720. this.element.lefttop = null;
  4721. var body = document.body;
  4722. if (body && !((body.scrollTop != 0 || body.scrollLeft != 0) && navigator.userAgent.match(/iPhone/i))) {
  4723. this.element.offsets = null;
  4724. }
  4725. }
  4726. /**
  4727. * @function Events.prototype.getMousePosition
  4728. * @description 获取当前鼠标的位置。
  4729. * @param {Event} evt - 事件对象。
  4730. * @returns {Pixel} 当前的鼠标的 xy 坐标点。
  4731. */
  4732. }, {
  4733. key: "getMousePosition",
  4734. value: function getMousePosition(evt) {
  4735. if (!this.includeXY) {
  4736. this.clearMouseCache();
  4737. } else if (!this.element.hasScrollEvent) {
  4738. Event.observe(window, "scroll", this.clearMouseListener);
  4739. this.element.hasScrollEvent = true;
  4740. }
  4741. if (!this.element.scrolls) {
  4742. var viewportElement = Util_Util.getViewportElement();
  4743. this.element.scrolls = [viewportElement.scrollLeft, viewportElement.scrollTop];
  4744. }
  4745. if (!this.element.lefttop) {
  4746. this.element.lefttop = [document.documentElement.clientLeft || 0, document.documentElement.clientTop || 0];
  4747. }
  4748. if (!this.element.offsets) {
  4749. this.element.offsets = Util_Util.pagePosition(this.element);
  4750. }
  4751. return new Pixel(evt.clientX + this.element.scrolls[0] - this.element.offsets[0] - this.element.lefttop[0], evt.clientY + this.element.scrolls[1] - this.element.offsets[1] - this.element.lefttop[1]);
  4752. }
  4753. }]);
  4754. return Events;
  4755. }();
  4756. Events.prototype.BROWSER_EVENTS = ["mouseover", "mouseout", "mousedown", "mouseup", "mousemove", "click", "dblclick", "rightclick", "dblrightclick", "resize", "focus", "blur", "touchstart", "touchmove", "touchend", "keydown", "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup", "MSGestureStart", "MSGestureChange", "MSGestureEnd", "contextmenu"];
  4757. ;// CONCATENATED MODULE: external "function(){try{return elasticsearch}catch(e){return {}}}()"
  4758. var external_function_try_return_elasticsearch_catch_e_return_namespaceObject = function(){try{return elasticsearch}catch(e){return {}}}();
  4759. var external_function_try_return_elasticsearch_catch_e_return_default = /*#__PURE__*/__webpack_require__.n(external_function_try_return_elasticsearch_catch_e_return_namespaceObject);
  4760. ;// CONCATENATED MODULE: ./src/common/thirdparty/elasticsearch/ElasticSearch.js
  4761. function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
  4762. function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  4763. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  4764. function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
  4765. function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
  4766. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
  4767. function ElasticSearch_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4768. function ElasticSearch_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  4769. function ElasticSearch_createClass(Constructor, protoProps, staticProps) { if (protoProps) ElasticSearch_defineProperties(Constructor.prototype, protoProps); if (staticProps) ElasticSearch_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  4770. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  4771. * This program are made available under the terms of the Apache License, Version 2.0
  4772. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  4773. /**
  4774. * @class ElasticSearch
  4775. * @deprecatedclass SuperMap.ElasticSearch
  4776. * @classdesc ElasticSearch服务类。
  4777. * @category ElasticSearch
  4778. * @modulecategory Services
  4779. * @param {string} url - ElasticSearch服务地址。
  4780. * @param {Object} options - 参数。
  4781. * @param {function} [options.change] - 服务器返回数据后执行的函数。废弃,不建议使用。使用search或msearch方法。
  4782. * @param {boolean} [options.openGeoFence=false] - 是否开启地理围栏验证,默认为不开启。
  4783. * @param {function} [options.outOfGeoFence] - 数据超出地理围栏后执行的函数。
  4784. * @param {Object} [options.geoFence] - 地理围栏。
  4785. * @description
  4786. * <h3 style="font-size: 20px;margin-top: 20px;margin-bottom: 10px;">11.1.0</h3>
  4787. * 该功能依赖<a href="https://github.com/elastic/elasticsearch">@elastic/elasticsearch</a>, webpack5或其他不包含Node.js Polyfills的打包工具,需要加入相关配置,以webpack为例:<br/>
  4788. <p style="margin-top:10px;">首先安装相关Polyfills</p><pre><code>npm i stream-http https-browserify stream-browserify tty-browserify browserify-zlib os-browserify buffer url assert process -D</code></pre>
  4789. 然后配置webpack<pre><code>module.exports: {
  4790. resolve: {
  4791. alias: {
  4792. process: 'process/browser',
  4793. },
  4794. mainFields: ['browser', 'main'],
  4795. fallback: {
  4796. fs: false,
  4797. http: require.resolve('stream-http'),
  4798. https: require.resolve('https-browserify'),
  4799. os: require.resolve('os-browserify/browser'),
  4800. stream: require.resolve('stream-browserify'),
  4801. tty: require.resolve('tty-browserify'),
  4802. zlib: require.resolve('browserify-zlib')
  4803. }
  4804. }
  4805. plugins: [
  4806. new webpack.ProvidePlugin({
  4807. process: 'process/browser',
  4808. Buffer: ['buffer', 'Buffer']
  4809. }),
  4810. ]
  4811. }</code></pre>
  4812. * @usage
  4813. */
  4814. var ElasticSearch = /*#__PURE__*/function () {
  4815. function ElasticSearch(url, options) {
  4816. ElasticSearch_classCallCheck(this, ElasticSearch);
  4817. options = options || {};
  4818. /**
  4819. * @member {string} ElasticSearch.prototype.url
  4820. * @description ElasticSearch服务地址。
  4821. */
  4822. this.url = url;
  4823. /**
  4824. * @member {Object} ElasticSearch.prototype.client
  4825. * @description client ES客户端。
  4826. */
  4827. try {
  4828. // 老版本
  4829. this.client = new (external_function_try_return_elasticsearch_catch_e_return_default()).Client({
  4830. host: this.url
  4831. });
  4832. } catch (e) {
  4833. // 新版本
  4834. this.client = new (external_function_try_return_elasticsearch_catch_e_return_default()).Client({
  4835. node: {
  4836. url: new URL(this.url)
  4837. }
  4838. });
  4839. }
  4840. /**
  4841. * @deprecated
  4842. * @member {function} [ElasticSearch.prototype.change]
  4843. * @description 服务器返回数据后执行的函数。废弃,不建议使用。使用search或msearch方法。
  4844. */
  4845. this.change = null;
  4846. /**
  4847. * @member {boolean} [ElasticSearch.prototype.openGeoFence=false]
  4848. * @description 是否开启地理围栏验证,默认为不开启。
  4849. */
  4850. this.openGeoFence = false;
  4851. /**
  4852. * @member {function} [ElasticSearch.prototype.outOfGeoFence]
  4853. * @description 数据超出地理围栏后执行的函数。
  4854. */
  4855. this.outOfGeoFence = null;
  4856. /**
  4857. * @member {Object} [ElasticSearch.prototype.geoFence]
  4858. * @description 地理围栏。
  4859. * @example {
  4860. * radius: 1000,//单位是m
  4861. * center: [104.40, 30.43],
  4862. * unit: 'meter|degree'
  4863. * }
  4864. */
  4865. this.geoFence = null;
  4866. /*
  4867. * Constant: EVENT_TYPES
  4868. * {Array.<String>}
  4869. * 此类支持的事件类型。
  4870. *
  4871. */
  4872. this.EVENT_TYPES = ['change', 'error', 'outOfGeoFence'];
  4873. /**
  4874. * @member {Events} ElasticSearch.prototype.events
  4875. * @description 事件。
  4876. */
  4877. this.events = new Events(this, null, this.EVENT_TYPES);
  4878. /**
  4879. * @member {Object} ElasticSearch.prototype.eventListeners
  4880. * @description 监听器对象,在构造函数中设置此参数(可选),对 MapService 支持的两个事件 processCompleted 、processFailed 进行监听,
  4881. * 相当于调用 Events.on(eventListeners)。
  4882. */
  4883. this.eventListeners = null;
  4884. Util_Util.extend(this, options);
  4885. if (this.eventListeners instanceof Object) {
  4886. this.events.on(this.eventListeners);
  4887. }
  4888. }
  4889. /**
  4890. * @function ElasticSearch.prototype.setGeoFence
  4891. * @description 设置地理围栏,openGeoFence参数为true的时候,设置的地理围栏才生效。
  4892. * @param {Geometry} geoFence - 地理围栏。
  4893. */
  4894. ElasticSearch_createClass(ElasticSearch, [{
  4895. key: "setGeoFence",
  4896. value: function setGeoFence(geoFence) {
  4897. this.geoFence = geoFence;
  4898. }
  4899. /**
  4900. * @function ElasticSearch.prototype.bulk
  4901. * @description 批量操作API,允许执行多个索引/删除操作。
  4902. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-bulk}</br>
  4903. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html}</br>
  4904. * @param {Object} params - 参数。
  4905. * @param {function} callback - 回调函数。
  4906. */
  4907. }, {
  4908. key: "bulk",
  4909. value: function bulk(params, callback) {
  4910. return this.client.bulk(params, this._handleCallback(callback));
  4911. }
  4912. /**
  4913. * @function ElasticSearch.prototype.clearScroll
  4914. * @description 通过指定scroll参数进行查询来清除已经创建的scroll请求。
  4915. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-clearscroll}</br>
  4916. *更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html}</br>
  4917. * @param {Object} params - 参数。
  4918. * @param {function} callback - 回调函数。
  4919. */
  4920. }, {
  4921. key: "clearScroll",
  4922. value: function clearScroll(params, callback) {
  4923. return this.client.clearScroll(params, this._handleCallback(callback));
  4924. }
  4925. /**
  4926. * @function ElasticSearch.prototype.count
  4927. * @description 获取集群、索引、类型或查询的文档个数。
  4928. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-count}</br>
  4929. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html}</br>
  4930. * @param {Object} params - 参数。
  4931. * @param {function} callback - 回调函数。
  4932. */
  4933. }, {
  4934. key: "count",
  4935. value: function count(params, callback) {
  4936. return this.client.count(params, this._handleCallback(callback));
  4937. }
  4938. /**
  4939. * @function ElasticSearch.prototype.create
  4940. * @description 在特定索引中添加一个类型化的JSON文档,使其可搜索。如果具有相同index,type且ID已经存在的文档将发生错误。</br>
  4941. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-create}
  4942. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html}
  4943. * @param {Object} params - 参数。
  4944. * @param {function} callback - 回调函数。
  4945. */
  4946. }, {
  4947. key: "create",
  4948. value: function create(params, callback) {
  4949. return this.client.create(params, this._handleCallback(callback));
  4950. }
  4951. /**
  4952. * @function ElasticSearch.prototype.delete
  4953. * @description 根据其ID从特定索引中删除键入的JSON文档。
  4954. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-delete}</br>
  4955. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html}</br>
  4956. * @param {Object} params - 参数。
  4957. * @param {function} callback - 回调函数。
  4958. */
  4959. }, {
  4960. key: "delete",
  4961. value: function _delete(params, callback) {
  4962. return this.client["delete"](params, this._handleCallback(callback));
  4963. }
  4964. /**
  4965. * @function ElasticSearch.prototype.deleteByQuery
  4966. * @description 根据其ID从特定索引中删除键入的JSON文档。
  4967. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletebyquery}</br>
  4968. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html}</br>
  4969. * @param {Object} params - 参数。
  4970. * @param {function} callback - 回调函数。
  4971. */
  4972. }, {
  4973. key: "deleteByQuery",
  4974. value: function deleteByQuery(params, callback) {
  4975. return this.client.deleteByQuery(params, this._handleCallback(callback));
  4976. }
  4977. /**
  4978. * @function ElasticSearch.prototype.deleteScript
  4979. * @description 根据其ID删除脚本。</br>
  4980. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletescript}</br>
  4981. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}</br>
  4982. * @param {Object} params - 参数。
  4983. * @param {function} callback - 回调函数。
  4984. */
  4985. }, {
  4986. key: "deleteScript",
  4987. value: function deleteScript(params, callback) {
  4988. return this.client.deleteScript(params, this._handleCallback(callback));
  4989. }
  4990. /**
  4991. * @function ElasticSearch.prototype.deleteTemplate
  4992. * @description 根据其ID删除模板。</br>
  4993. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletetemplate}</br>
  4994. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  4995. * @param {Object} params - 参数。
  4996. * @param {function} callback - 回调函数。
  4997. */
  4998. }, {
  4999. key: "deleteTemplate",
  5000. value: function deleteTemplate(params, callback) {
  5001. return this.client.deleteTemplate(params, this._handleCallback(callback));
  5002. }
  5003. /**
  5004. * @function ElasticSearch.prototype.exists
  5005. * @description 检查给定文档是否存在。</br>
  5006. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-exists}</br>
  5007. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  5008. * @param {Object} params - 参数。
  5009. * @param {function} callback - 回调函数。
  5010. */
  5011. }, {
  5012. key: "exists",
  5013. value: function exists(params, callback) {
  5014. return this.client.exists(params, this._handleCallback(callback));
  5015. }
  5016. /**
  5017. * @function ElasticSearch.prototype.existsSource
  5018. * @description 检查资源是否存在。</br>
  5019. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-existssource}</br>
  5020. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  5021. * @param {Object} params - 参数。
  5022. * @param {function} callback - 回调函数。
  5023. */
  5024. }, {
  5025. key: "existsSource",
  5026. value: function existsSource(params, callback) {
  5027. return this.client.existsSource(params, this._handleCallback(callback));
  5028. }
  5029. /**
  5030. * @function ElasticSearch.prototype.explain
  5031. * @description 提供与特定查询相关的特定文档分数的详细信息。它还会告诉您文档是否与指定的查询匹配。</br>
  5032. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-explain}</br>
  5033. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html}</br>
  5034. * @param {Object} params - 参数。
  5035. * @param {function} callback - 回调函数。
  5036. */
  5037. }, {
  5038. key: "explain",
  5039. value: function explain(params, callback) {
  5040. return this.client.explain(params, this._handleCallback(callback));
  5041. }
  5042. /**
  5043. * @function ElasticSearch.prototype.fieldCaps
  5044. * @description 允许检索多个索引之间的字段的功能。(实验性API,可能会在未来版本中删除)</br>
  5045. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-fieldcaps}</br>
  5046. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html}</br>
  5047. * @param {Object} params - 参数。
  5048. * @param {function} callback - 回调函数。
  5049. */
  5050. }, {
  5051. key: "fieldCaps",
  5052. value: function fieldCaps(params, callback) {
  5053. return this.client.fieldCaps(params, this._handleCallback(callback));
  5054. }
  5055. /**
  5056. * @function ElasticSearch.prototype.get
  5057. * @description 从索引获取一个基于其ID的类型的JSON文档。</br>
  5058. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-get}</br>
  5059. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  5060. * @param {Object} params - 参数。
  5061. * @param {function} callback - 回调函数。
  5062. */
  5063. }, {
  5064. key: "get",
  5065. value: function get(params, callback) {
  5066. return this.client.get(params, this._handleCallback(callback));
  5067. }
  5068. /**
  5069. * @function ElasticSearch.prototype.getScript
  5070. * @description 获取脚本。</br>
  5071. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getscript}</br>
  5072. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}</br>
  5073. * @param {Object} params - 参数。
  5074. * @param {function} callback - 回调函数。
  5075. */
  5076. }, {
  5077. key: "getScript",
  5078. value: function getScript(params, callback) {
  5079. return this.client.getScript(params, this._handleCallback(callback));
  5080. }
  5081. /**
  5082. * @function ElasticSearch.prototype.getSource
  5083. * @description 通过索引,类型和ID获取文档的源。</br>
  5084. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getsource}</br>
  5085. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  5086. * @param {Object} params - 参数。
  5087. * @param {function} callback - 回调函数。
  5088. */
  5089. }, {
  5090. key: "getSource",
  5091. value: function getSource(params, callback) {
  5092. return this.client.getSource(params, this._handleCallback(callback));
  5093. }
  5094. /**
  5095. * @function ElasticSearch.prototype.getTemplate
  5096. * @description 获取模板。</br>
  5097. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-gettemplate}</br>
  5098. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  5099. * @param {Object} params - 参数。
  5100. * @param {function} callback - 回调函数。
  5101. */
  5102. }, {
  5103. key: "getTemplate",
  5104. value: function getTemplate(params, callback) {
  5105. return this.client.getTemplate(params, this._handleCallback(callback));
  5106. }
  5107. /**
  5108. * @function ElasticSearch.prototype.index
  5109. * @description 在索引中存储一个键入的JSON文档,使其可搜索。</br>
  5110. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-index}</br>
  5111. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html}</br>
  5112. * @param {Object} params - 参数。
  5113. * @param {function} callback - 回调函数。
  5114. */
  5115. }, {
  5116. key: "index",
  5117. value: function index(params, callback) {
  5118. return this.client.index(params, this._handleCallback(callback));
  5119. }
  5120. /**
  5121. * @function ElasticSearch.prototype.info
  5122. * @description 从当前集群获取基本信息。</br>
  5123. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-info}</br>
  5124. * 更多信息参考 {@link https://www.elastic.co/guide/index.html}</br>
  5125. * @param {Object} params - 参数。
  5126. * @param {function} callback - 回调函数。
  5127. */
  5128. }, {
  5129. key: "info",
  5130. value: function info(params, callback) {
  5131. return this.client.info(params, this._handleCallback(callback));
  5132. }
  5133. /**
  5134. * @function ElasticSearch.prototype.mget
  5135. * @description 根据索引,类型(可选)和ids来获取多个文档。mget所需的主体可以采用两种形式:文档位置数组或文档ID数组。</br>
  5136. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mget}</br>
  5137. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html}</br>
  5138. * @param {Object} params - 参数。
  5139. * @param {function} callback - 回调函数。
  5140. */
  5141. }, {
  5142. key: "mget",
  5143. value: function mget(params, callback) {
  5144. return this.client.mget(params, this._handleCallback(callback));
  5145. }
  5146. /**
  5147. * @function ElasticSearch.prototype.msearch
  5148. * @description 在同一请求中执行多个搜索请求。</br>
  5149. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearch}</br>
  5150. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html}</br>
  5151. * @param {Object} params - 参数。
  5152. * @param {function} callback - 请求返回的回调函数。也可以使用then表达式获取返回结果。
  5153. * 回调参数:error,response,结果存储在response.responses中。
  5154. */
  5155. }, {
  5156. key: "msearch",
  5157. value: function msearch(params, callback) {
  5158. var me = this;
  5159. return me.client.msearch(params).then(function (resp) {
  5160. resp = resp.body || resp;
  5161. me._update(resp.responses, callback);
  5162. return resp;
  5163. }, function (err) {
  5164. callback(err);
  5165. me.events.triggerEvent('error', {
  5166. error: err
  5167. });
  5168. return err;
  5169. });
  5170. }
  5171. /**
  5172. * @function ElasticSearch.prototype.msearchTemplate
  5173. * @description 在同一请求中执行多个搜索模板请求。</br>
  5174. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearchtemplate}</br>
  5175. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  5176. * @param {Object} params - 参数。
  5177. * @param {function} callback - 回调函数。
  5178. */
  5179. }, {
  5180. key: "msearchTemplate",
  5181. value: function msearchTemplate(params, callback) {
  5182. return this.client.msearchTemplate(params, this._handleCallback(callback));
  5183. }
  5184. /**
  5185. * @function ElasticSearch.prototype.mtermvectors
  5186. * @description 多termvectors API允许一次获得多个termvectors。</br>
  5187. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mtermvectors}</br>
  5188. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html}</br>
  5189. * @param {Object} params - 参数。
  5190. * @param {function} callback - 回调函数。
  5191. */
  5192. }, {
  5193. key: "mtermvectors",
  5194. value: function mtermvectors(params, callback) {
  5195. return this.client.mtermvectors(params, this._handleCallback(callback));
  5196. }
  5197. /**
  5198. * @function ElasticSearch.prototype.ping
  5199. * @description 测试连接。</br>
  5200. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-ping}</br>
  5201. * 更多信息参考 {@link https://www.elastic.co/guide/index.html}</br>
  5202. * @param {Object} params - 参数。
  5203. * @param {function} callback - 回调函数。
  5204. */
  5205. }, {
  5206. key: "ping",
  5207. value: function ping(params, callback) {
  5208. return this.client.ping(params, this._handleCallback(callback));
  5209. }
  5210. /**
  5211. * @function ElasticSearch.prototype.putScript
  5212. * @description 添加脚本。</br>
  5213. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-putscript}</br>
  5214. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}</br>
  5215. * @param {Object} params - 参数。
  5216. * @param {function} callback - 回调函数。
  5217. */
  5218. }, {
  5219. key: "putScript",
  5220. value: function putScript(params, callback) {
  5221. return this.client.putScript(params, this._handleCallback(callback));
  5222. }
  5223. /**
  5224. * @function ElasticSearch.prototype.putTemplate
  5225. * @description 添加模板。</br>
  5226. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-puttemplate}</br>
  5227. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  5228. * @param {Object} params - 参数。
  5229. * @param {function} callback - 回调函数。
  5230. */
  5231. }, {
  5232. key: "putTemplate",
  5233. value: function putTemplate(params, callback) {
  5234. return this.client.putTemplate(params, this._handleCallback(callback));
  5235. }
  5236. /**
  5237. * @function ElasticSearch.prototype.reindex
  5238. * @description 重新索引。</br>
  5239. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindex}</br>
  5240. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html}</br>
  5241. * @param {Object} params - 参数。
  5242. * @param {function} callback - 回调函数。
  5243. */
  5244. }, {
  5245. key: "reindex",
  5246. value: function reindex(params, callback) {
  5247. return this.client.reindex(params, this._handleCallback(callback));
  5248. }
  5249. /**
  5250. * @function ElasticSearch.prototype.reindexRessrottle
  5251. * @description 重新索引。</br>
  5252. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindexrethrottle}</br>
  5253. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html}</br>
  5254. * @param {Object} params - 参数。
  5255. * @param {function} callback - 回调函数。
  5256. */
  5257. }, {
  5258. key: "reindexRessrottle",
  5259. value: function reindexRessrottle(params, callback) {
  5260. return this.client.reindexRessrottle(params, this._handleCallback(callback));
  5261. }
  5262. /**
  5263. * @function ElasticSearch.prototype.renderSearchTemplate
  5264. * @description 搜索模板。</br>
  5265. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-rendersearchtemplate}</br>
  5266. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  5267. * @param {Object} params - 参数。
  5268. * @param {function} callback - 回调函数。
  5269. */
  5270. }, {
  5271. key: "renderSearchTemplate",
  5272. value: function renderSearchTemplate(params, callback) {
  5273. return this.client.renderSearchTemplate(params, this._handleCallback(callback));
  5274. }
  5275. /**
  5276. * @function ElasticSearch.prototype.scroll
  5277. * @description 在search()调用中指定滚动参数之后,滚动搜索请求(检索下一组结果)。</br>
  5278. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-scroll}</br>
  5279. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html}</br>
  5280. * @param {Object} params - 参数。
  5281. * @param {function} callback - 回调函数。
  5282. */
  5283. }, {
  5284. key: "scroll",
  5285. value: function scroll(params, callback) {
  5286. return this.client.scroll(params, this._handleCallback(callback));
  5287. }
  5288. /**
  5289. * @function ElasticSearch.prototype.search
  5290. * @description 在search()调用中指定滚动参数之后,滚动搜索请求(检索下一组结果)。
  5291. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search}</br>
  5292. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html}</br>
  5293. * @param {Object} params - 参数。
  5294. * @param {function} callback - 请求返回的回调函数。也可以使用then表达式获取返回结果。
  5295. * 回调参数:error,response,结果存储在response.responses中。
  5296. */
  5297. }, {
  5298. key: "search",
  5299. value: function search(params, callback) {
  5300. var me = this;
  5301. return me.client.search(params).then(function (resp) {
  5302. resp = resp.body || resp;
  5303. me._update(resp, callback);
  5304. return resp;
  5305. }, function (err) {
  5306. callback && callback(err);
  5307. me.events.triggerEvent('error', {
  5308. error: err
  5309. });
  5310. return err;
  5311. });
  5312. }
  5313. /**
  5314. * @function ElasticSearch.prototype.searchShards
  5315. * @description 返回要执行搜索请求的索引和分片。
  5316. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchshards}</br>
  5317. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html}</br>
  5318. * @param {Object} params - 参数。
  5319. * @param {function} callback - 回调函数。
  5320. */
  5321. }, {
  5322. key: "searchShards",
  5323. value: function searchShards(params, callback) {
  5324. return this.client.searchShards(params, this._handleCallback(callback));
  5325. }
  5326. /**
  5327. * @function ElasticSearch.prototype.searchTemplate
  5328. * @description 搜索模板。
  5329. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchtemplate}</br>
  5330. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html}</br>
  5331. * @param {Object} params - 参数。
  5332. * @param {function} callback - 回调函数。
  5333. */
  5334. }, {
  5335. key: "searchTemplate",
  5336. value: function searchTemplate(params, callback) {
  5337. return this.client.searchTemplate(params, this._handleCallback(callback));
  5338. }
  5339. /**
  5340. * @function ElasticSearch.prototype.suggest
  5341. * @description 该建议功能通过使用特定的建议者,基于所提供的文本来建议类似的术语。
  5342. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-suggest}</br>
  5343. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html}</br>
  5344. * @param {Object} params - 参数。
  5345. * @param {function} callback - 回调函数。
  5346. */
  5347. }, {
  5348. key: "suggest",
  5349. value: function suggest(params, callback) {
  5350. return this.client.suggest(params, this._handleCallback(callback));
  5351. }
  5352. /**
  5353. * @function ElasticSearch.prototype.termvectors
  5354. * @description 返回有关特定文档字段中的术语的信息和统计信息。
  5355. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-termvectors}</br>
  5356. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html}</br>
  5357. * @param {Object} params - 参数。
  5358. * @param {function} callback - 回调函数。
  5359. */
  5360. }, {
  5361. key: "termvectors",
  5362. value: function termvectors(params, callback) {
  5363. return this.client.termvectors(params, this._handleCallback(callback));
  5364. }
  5365. /**
  5366. * @function ElasticSearch.prototype.update
  5367. * @description 更新文档的部分。
  5368. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-update}</br>
  5369. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html}</br>
  5370. * @param {Object} params - 参数。
  5371. * @param {function} callback - 回调函数。
  5372. */
  5373. }, {
  5374. key: "update",
  5375. value: function update(params, callback) {
  5376. return this.client.update(params, this._handleCallback(callback));
  5377. }
  5378. /**
  5379. * @function ElasticSearch.prototype.updateByQuery
  5380. * @description 通过查询API来更新文档。
  5381. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-updatebyquery}</br>
  5382. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html}</br>
  5383. * @param {Object} params - 参数。
  5384. * @param {function} callback - 回调函数。
  5385. */
  5386. }, {
  5387. key: "updateByQuery",
  5388. value: function updateByQuery(params, callback) {
  5389. return this.client.updateByQuery(params, this._handleCallback(callback));
  5390. }
  5391. /**
  5392. * @function ElasticSearch.prototype._handleCallback
  5393. * @description 处理ElasticSearch 16.x和5.x的callback兼容。 5.x的回调参数多包了一层body
  5394. * @param {function} callback - 回调函数。
  5395. * @private
  5396. */
  5397. }, {
  5398. key: "_handleCallback",
  5399. value: function _handleCallback(callback) {
  5400. return function () {
  5401. var args = Array.from(arguments);
  5402. var error = args.shift();
  5403. var resp = args.shift();
  5404. var body = resp && resp.body;
  5405. if (body) {
  5406. var _resp2 = resp,
  5407. statusCode = _resp2.statusCode,
  5408. headers = _resp2.headers;
  5409. args = [statusCode, headers];
  5410. resp = body;
  5411. }
  5412. callback.call.apply(callback, [this, error, resp].concat(_toConsumableArray(args)));
  5413. };
  5414. }
  5415. }, {
  5416. key: "_update",
  5417. value: function _update(data, callback) {
  5418. var me = this;
  5419. if (!data) {
  5420. return;
  5421. }
  5422. me.data = data;
  5423. if (me.openGeoFence && me.geoFence) {
  5424. me._validateDatas(data);
  5425. }
  5426. me.events.triggerEvent('change', {
  5427. data: me.data
  5428. });
  5429. //change方法已废弃,不建议使用。建议使用search方法的第二个参数传入请求成功的回调
  5430. if (me.change) {
  5431. me.change && me.change(data);
  5432. } else {
  5433. //加responses是为了保持跟原来es自身的数据结构一致
  5434. callback && callback(undefined, {
  5435. responses: data
  5436. });
  5437. }
  5438. }
  5439. }, {
  5440. key: "_validateDatas",
  5441. value: function _validateDatas(datas) {
  5442. if (!datas) {
  5443. return;
  5444. }
  5445. if (!(datas instanceof Array)) {
  5446. datas = [datas];
  5447. }
  5448. var i,
  5449. len = datas.length;
  5450. for (i = 0; i < len; i++) {
  5451. this._validateData(datas[i]);
  5452. }
  5453. }
  5454. }, {
  5455. key: "_validateData",
  5456. value: function _validateData(data) {
  5457. var me = this;
  5458. data.hits.hits.map(function (source) {
  5459. var content = source._source;
  5460. var meterUnit = me._getMeterPerMapUnit(me.geoFence.unit);
  5461. var geoFenceCX = me.geoFence.center[0] * meterUnit;
  5462. var geoFenceCY = me.geoFence.center[1] * meterUnit;
  5463. var contentX = content.x * meterUnit;
  5464. var contentY = content.y * meterUnit;
  5465. var distance = me._distance(contentX, contentY, geoFenceCX, geoFenceCY);
  5466. var radius = me.geoFence.radius;
  5467. if (distance > radius) {
  5468. me.outOfGeoFence && me.outOfGeoFence(data);
  5469. me.events.triggerEvent('outOfGeoFence', {
  5470. data: data
  5471. });
  5472. }
  5473. return source;
  5474. });
  5475. }
  5476. }, {
  5477. key: "_distance",
  5478. value: function _distance(x1, y1, x2, y2) {
  5479. return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  5480. }
  5481. }, {
  5482. key: "_getMeterPerMapUnit",
  5483. value: function _getMeterPerMapUnit(mapUnit) {
  5484. var earchRadiusInMeters = 6378137;
  5485. var meterPerMapUnit;
  5486. if (mapUnit === 'meter') {
  5487. meterPerMapUnit = 1;
  5488. } else if (mapUnit === 'degree') {
  5489. // 每度表示多少米。
  5490. meterPerMapUnit = Math.PI * 2 * earchRadiusInMeters / 360;
  5491. }
  5492. return meterPerMapUnit;
  5493. }
  5494. }]);
  5495. return ElasticSearch;
  5496. }();
  5497. // EXTERNAL MODULE: ./node_modules/promise-polyfill/dist/polyfill.js
  5498. var polyfill = __webpack_require__(2347);
  5499. // EXTERNAL MODULE: ./node_modules/fetch-ie8/fetch.js
  5500. var fetch = __webpack_require__(5122);
  5501. // EXTERNAL MODULE: ./node_modules/fetch-jsonp/build/fetch-jsonp.js
  5502. var fetch_jsonp = __webpack_require__(683);
  5503. var fetch_jsonp_default = /*#__PURE__*/__webpack_require__.n(fetch_jsonp);
  5504. ;// CONCATENATED MODULE: ./src/common/util/FetchRequest.js
  5505. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  5506. * This program are made available under the terms of the Apache License, Version 2.0
  5507. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  5508. var FetchRequest_fetch = window.fetch;
  5509. var setFetch = function setFetch(newFetch) {
  5510. FetchRequest_fetch = newFetch;
  5511. };
  5512. var RequestJSONPPromise = {
  5513. limitLength: 1500,
  5514. queryKeys: [],
  5515. queryValues: [],
  5516. supermap_callbacks: {},
  5517. addQueryStrings: function addQueryStrings(values) {
  5518. var me = this;
  5519. for (var key in values) {
  5520. me.queryKeys.push(key);
  5521. if (typeof values[key] !== 'string') {
  5522. values[key] = Util_Util.toJSON(values[key]);
  5523. }
  5524. var tempValue = encodeURIComponent(values[key]);
  5525. me.queryValues.push(tempValue);
  5526. }
  5527. },
  5528. issue: function issue(config) {
  5529. var me = this,
  5530. uid = me.getUid(),
  5531. url = config.url,
  5532. splitQuestUrl = [];
  5533. // me.addQueryStrings({
  5534. // callback: "RequestJSONPPromise.supermap_callbacks[" + uid + "]"
  5535. // });
  5536. var sectionURL = url,
  5537. keysCount = 0; //此次sectionURL中有多少个key
  5538. var length = me.queryKeys ? me.queryKeys.length : 0;
  5539. for (var i = 0; i < length; i++) {
  5540. if (sectionURL.length + me.queryKeys[i].length + 2 >= me.limitLength) {
  5541. //+2 for ("&"or"?")and"="
  5542. if (keysCount == 0) {
  5543. return false;
  5544. }
  5545. splitQuestUrl.push(sectionURL);
  5546. sectionURL = url;
  5547. keysCount = 0;
  5548. i--;
  5549. } else {
  5550. if (sectionURL.length + me.queryKeys[i].length + 2 + me.queryValues[i].length > me.limitLength) {
  5551. var leftValue = me.queryValues[i];
  5552. while (leftValue.length > 0) {
  5553. var leftLength = me.limitLength - sectionURL.length - me.queryKeys[i].length - 2; //+2 for ("&"or"?")and"="
  5554. if (sectionURL.indexOf('?') > -1) {
  5555. sectionURL += '&';
  5556. } else {
  5557. sectionURL += '?';
  5558. }
  5559. var tempLeftValue = leftValue.substring(0, leftLength);
  5560. //避免 截断sectionURL时,将类似于%22这样的符号截成两半,从而导致服务端组装sectionURL时发生错误
  5561. if (tempLeftValue.substring(leftLength - 1, leftLength) === '%') {
  5562. leftLength -= 1;
  5563. tempLeftValue = leftValue.substring(0, leftLength);
  5564. } else if (tempLeftValue.substring(leftLength - 2, leftLength - 1) === '%') {
  5565. leftLength -= 2;
  5566. tempLeftValue = leftValue.substring(0, leftLength);
  5567. }
  5568. sectionURL += me.queryKeys[i] + '=' + tempLeftValue;
  5569. leftValue = leftValue.substring(leftLength);
  5570. if (tempLeftValue.length > 0) {
  5571. splitQuestUrl.push(sectionURL);
  5572. sectionURL = url;
  5573. keysCount = 0;
  5574. }
  5575. }
  5576. } else {
  5577. keysCount++;
  5578. if (sectionURL.indexOf('?') > -1) {
  5579. sectionURL += '&';
  5580. } else {
  5581. sectionURL += '?';
  5582. }
  5583. sectionURL += me.queryKeys[i] + '=' + me.queryValues[i];
  5584. }
  5585. }
  5586. }
  5587. splitQuestUrl.push(sectionURL);
  5588. return me.send(splitQuestUrl, 'SuperMapJSONPCallbacks_' + uid, config && config.proxy);
  5589. },
  5590. getUid: function getUid() {
  5591. var uid = new Date().getTime(),
  5592. random = Math.floor(Math.random() * 1e17);
  5593. return uid * 1000 + random;
  5594. },
  5595. send: function send(splitQuestUrl, callback, proxy) {
  5596. var len = splitQuestUrl.length;
  5597. if (len > 0) {
  5598. return new Promise(function (resolve) {
  5599. var jsonpUserID = new Date().getTime();
  5600. for (var i = 0; i < len; i++) {
  5601. var url = splitQuestUrl[i];
  5602. if (url.indexOf('?') > -1) {
  5603. url += '&';
  5604. } else {
  5605. url += '?';
  5606. }
  5607. url += 'sectionCount=' + len;
  5608. url += '&sectionIndex=' + i;
  5609. url += '&jsonpUserID=' + jsonpUserID;
  5610. if (proxy) {
  5611. url = decodeURIComponent(url);
  5612. url = proxy + encodeURIComponent(url);
  5613. }
  5614. fetch_jsonp_default()(url, {
  5615. jsonpCallbackFunction: callback,
  5616. timeout: 30000
  5617. }).then(function (result) {
  5618. resolve(result.json());
  5619. });
  5620. }
  5621. });
  5622. }
  5623. },
  5624. GET: function GET(config) {
  5625. var me = this;
  5626. me.queryKeys.length = 0;
  5627. me.queryValues.length = 0;
  5628. me.addQueryStrings(config.params);
  5629. return me.issue(config);
  5630. },
  5631. POST: function POST(config) {
  5632. var me = this;
  5633. me.queryKeys.length = 0;
  5634. me.queryValues.length = 0;
  5635. me.addQueryStrings({
  5636. requestEntity: config.data
  5637. });
  5638. return me.issue(config);
  5639. },
  5640. PUT: function PUT(config) {
  5641. var me = this;
  5642. me.queryKeys.length = 0;
  5643. me.queryValues.length = 0;
  5644. me.addQueryStrings({
  5645. requestEntity: config.data
  5646. });
  5647. return me.issue(config);
  5648. },
  5649. DELETE: function DELETE(config) {
  5650. var me = this;
  5651. me.queryKeys.length = 0;
  5652. me.queryValues.length = 0;
  5653. me.addQueryStrings({
  5654. requestEntity: config.data
  5655. });
  5656. return me.issue(config);
  5657. }
  5658. };
  5659. var CORS;
  5660. var RequestTimeout;
  5661. /**
  5662. * @function setCORS
  5663. * @description 设置是否允许跨域请求,全局配置,优先级低于 service 下的 crossOring 参数。
  5664. * @category BaseTypes Util
  5665. * @param {boolean} cors - 是否允许跨域请求。
  5666. * @usage
  5667. * ```
  5668. * // 浏览器
  5669. * <script type="text/javascript" src="{cdn}"></script>
  5670. * <script>
  5671. * {namespace}.setCORS(cors);
  5672. *
  5673. * // 弃用的写法
  5674. * SuperMap.setCORS(cors);
  5675. *
  5676. * </script>
  5677. *
  5678. * // ES6 Import
  5679. * import { setCORS } from '{npm}';
  5680. *
  5681. * setCORS(cors);
  5682. * ```
  5683. */
  5684. var setCORS = function setCORS(cors) {
  5685. CORS = cors;
  5686. };
  5687. /**
  5688. * @function isCORS
  5689. * @description 是是否允许跨域请求。
  5690. * @category BaseTypes Util
  5691. * @returns {boolean} 是否允许跨域请求。
  5692. * @usage
  5693. * ```
  5694. * // 浏览器
  5695. * <script type="text/javascript" src="{cdn}"></script>
  5696. * <script>
  5697. * const result = {namespace}.isCORS();
  5698. *
  5699. * // 弃用的写法
  5700. * const result = SuperMap.isCORS();
  5701. *
  5702. * </script>
  5703. *
  5704. * // ES6 Import
  5705. * import { isCORS } from '{npm}';
  5706. *
  5707. * const result = isCORS();
  5708. * ```
  5709. */
  5710. var isCORS = function isCORS() {
  5711. if (CORS != undefined) {
  5712. return CORS;
  5713. }
  5714. return window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest();
  5715. };
  5716. /**
  5717. * @function setRequestTimeout
  5718. * @category BaseTypes Util
  5719. * @description 设置请求超时时间。
  5720. * @param {number} [timeout=45] - 请求超时时间,单位秒。
  5721. * @usage
  5722. * ```
  5723. * // 浏览器
  5724. <script type="text/javascript" src="{cdn}"></script>
  5725. <script>
  5726. {namespace}.setRequestTimeout(timeout);
  5727. // 弃用的写法
  5728. SuperMap.setRequestTimeout(timeout);
  5729. </script>
  5730. // ES6 Import
  5731. import { setRequestTimeout } from '{npm}';
  5732. setRequestTimeout(timeout);
  5733. * ```
  5734. */
  5735. var setRequestTimeout = function setRequestTimeout(timeout) {
  5736. return RequestTimeout = timeout;
  5737. };
  5738. /**
  5739. * @function getRequestTimeout
  5740. * @category BaseTypes Util
  5741. * @description 获取请求超时时间。
  5742. * @returns {number} 请求超时时间。
  5743. * @usage
  5744. * ```
  5745. * // 浏览器
  5746. <script type="text/javascript" src="{cdn}"></script>
  5747. <script>
  5748. {namespace}.getRequestTimeout();
  5749. // 弃用的写法
  5750. SuperMap.getRequestTimeout();
  5751. </script>
  5752. // ES6 Import
  5753. import { getRequestTimeout } from '{npm}';
  5754. getRequestTimeout();
  5755. * ```
  5756. */
  5757. var getRequestTimeout = function getRequestTimeout() {
  5758. return RequestTimeout || 45000;
  5759. };
  5760. /**
  5761. * @name FetchRequest
  5762. * @namespace
  5763. * @category BaseTypes Util
  5764. * @description 获取请求。
  5765. * @usage
  5766. * ```
  5767. * // 浏览器
  5768. * <script type="text/javascript" src="{cdn}"></script>
  5769. * <script>
  5770. * const result = {namespace}.FetchRequest.commit(method, url, params, options);
  5771. *
  5772. * </script>
  5773. *
  5774. * // ES6 Import
  5775. * import { FetchRequest } from '{npm}';
  5776. *
  5777. * const result = FetchRequest.commit(method, url, params, options);
  5778. *
  5779. * ```
  5780. */
  5781. var FetchRequest = {
  5782. /**
  5783. * @function FetchRequest.commit
  5784. * @description commit 请求。
  5785. * @param {string} method - 请求方法。
  5786. * @param {string} url - 请求地址。
  5787. * @param {string} params - 请求参数。
  5788. * @param {Object} options - 请求的配置属性。
  5789. * @returns {Promise} Promise 对象。
  5790. */
  5791. commit: function commit(method, url, params, options) {
  5792. method = method ? method.toUpperCase() : method;
  5793. switch (method) {
  5794. case 'GET':
  5795. return this.get(url, params, options);
  5796. case 'POST':
  5797. return this.post(url, params, options);
  5798. case 'PUT':
  5799. return this.put(url, params, options);
  5800. case 'DELETE':
  5801. return this["delete"](url, params, options);
  5802. default:
  5803. return this.get(url, params, options);
  5804. }
  5805. },
  5806. /**
  5807. * @function FetchRequest.supportDirectRequest
  5808. * @description supportDirectRequest 请求。
  5809. * @param {string} url - 请求地址。
  5810. * @param {Object} options - 请求的配置属性。
  5811. * @returns {boolean} 是否允许跨域请求。
  5812. */
  5813. supportDirectRequest: function supportDirectRequest(url, options) {
  5814. if (Util_Util.isInTheSameDomain(url)) {
  5815. return true;
  5816. }
  5817. if (options.crossOrigin != undefined) {
  5818. return options.crossOrigin;
  5819. } else {
  5820. return isCORS() || options.proxy;
  5821. }
  5822. },
  5823. /**
  5824. * @function FetchRequest.get
  5825. * @description get 请求。
  5826. * @param {string} url - 请求地址。
  5827. * @param {string} params - 请求参数。
  5828. * @param {Object} options - 请求的配置属性。
  5829. * @returns {Promise} Promise 对象。
  5830. */
  5831. get: function get(url, params, options) {
  5832. options = options || {};
  5833. var type = 'GET';
  5834. url = Util_Util.urlAppend(url, this._getParameterString(params || {}));
  5835. url = this._processUrl(url, options);
  5836. if (!this.supportDirectRequest(url, options)) {
  5837. url = url.replace('.json', '.jsonp');
  5838. var config = {
  5839. url: url,
  5840. data: params
  5841. };
  5842. return RequestJSONPPromise.GET(config);
  5843. }
  5844. if (!this.urlIsLong(url)) {
  5845. return this._fetch(url, params, options, type);
  5846. } else {
  5847. return this._postSimulatie(type, url.substring(0, url.indexOf('?')), params, options);
  5848. }
  5849. },
  5850. /**
  5851. * @function FetchRequest.delete
  5852. * @description delete 请求。
  5853. * @param {string} url - 请求地址。
  5854. * @param {string} params - 请求参数。
  5855. * @param {Object} options -请求的配置属性。
  5856. * @returns {Promise} Promise 对象。
  5857. */
  5858. "delete": function _delete(url, params, options) {
  5859. options = options || {};
  5860. var type = 'DELETE';
  5861. url = Util_Util.urlAppend(url, this._getParameterString(params || {}));
  5862. url = this._processUrl(url, options);
  5863. if (!this.supportDirectRequest(url, options)) {
  5864. url = url.replace('.json', '.jsonp');
  5865. var config = {
  5866. url: url += "&_method=DELETE",
  5867. data: params
  5868. };
  5869. return RequestJSONPPromise.DELETE(config);
  5870. }
  5871. if (this.urlIsLong(url)) {
  5872. return this._postSimulatie(type, url.substring(0, url.indexOf('?')), params, options);
  5873. }
  5874. return this._fetch(url, params, options, type);
  5875. },
  5876. /**
  5877. * @function FetchRequest.post
  5878. * @description post 请求。
  5879. * @param {string} url - 请求地址。
  5880. * @param {string} params - 请求参数。
  5881. * @param {Object} options - 请求的配置属性。
  5882. * @returns {Promise} Promise 对象。
  5883. */
  5884. post: function post(url, params, options) {
  5885. options = options || {};
  5886. url = this._processUrl(url, options);
  5887. if (!this.supportDirectRequest(url, options)) {
  5888. url = url.replace('.json', '.jsonp');
  5889. var config = {
  5890. url: Util_Util.urlAppend(url, "_method=POST"),
  5891. data: params
  5892. };
  5893. return RequestJSONPPromise.POST(config);
  5894. }
  5895. return this._fetch(url, params, options, 'POST');
  5896. },
  5897. /**
  5898. * @function FetchRequest.put
  5899. * @description put 请求。
  5900. * @param {string} url - 请求地址。
  5901. * @param {string} params - 请求参数。
  5902. * @param {Object} options - 请求的配置属性。
  5903. * @returns {Promise} Promise 对象。
  5904. */
  5905. put: function put(url, params, options) {
  5906. options = options || {};
  5907. url = this._processUrl(url, options);
  5908. if (!this.supportDirectRequest(url, options)) {
  5909. url = url.replace('.json', '.jsonp');
  5910. var config = {
  5911. url: url += "&_method=PUT",
  5912. data: params
  5913. };
  5914. return RequestJSONPPromise.PUT(config);
  5915. }
  5916. return this._fetch(url, params, options, 'PUT');
  5917. },
  5918. /**
  5919. * @function FetchRequest.urlIsLong
  5920. * @description URL 的字节长度是否太长。
  5921. * @param {string} url - 请求地址。
  5922. * @returns {boolean} URL 的字节长度是否太长。
  5923. */
  5924. urlIsLong: function urlIsLong(url) {
  5925. //当前url的字节长度。
  5926. var totalLength = 0,
  5927. charCode = null;
  5928. for (var i = 0, len = url.length; i < len; i++) {
  5929. //转化为Unicode编码
  5930. charCode = url.charCodeAt(i);
  5931. if (charCode < 0x007f) {
  5932. totalLength++;
  5933. } else if (0x0080 <= charCode && charCode <= 0x07ff) {
  5934. totalLength += 2;
  5935. } else if (0x0800 <= charCode && charCode <= 0xffff) {
  5936. totalLength += 3;
  5937. }
  5938. }
  5939. return totalLength < 2000 ? false : true;
  5940. },
  5941. _postSimulatie: function _postSimulatie(type, url, params, options) {
  5942. var separator = url.indexOf('?') > -1 ? '&' : '?';
  5943. url += separator + '_method=' + type;
  5944. if (typeof params !== 'string') {
  5945. params = JSON.stringify(params);
  5946. }
  5947. return this.post(url, params, options);
  5948. },
  5949. _processUrl: function _processUrl(url, options) {
  5950. if (this._isMVTRequest(url)) {
  5951. return url;
  5952. }
  5953. if (url.indexOf('.json') === -1 && !options.withoutFormatSuffix) {
  5954. if (url.indexOf('?') < 0) {
  5955. url += '.json';
  5956. } else {
  5957. var urlArrays = url.split('?');
  5958. if (urlArrays.length === 2) {
  5959. url = urlArrays[0] + '.json?' + urlArrays[1];
  5960. }
  5961. }
  5962. }
  5963. if (options && options.proxy) {
  5964. if (typeof options.proxy === 'function') {
  5965. url = options.proxy(url);
  5966. } else {
  5967. url = decodeURIComponent(url);
  5968. url = options.proxy + encodeURIComponent(url);
  5969. }
  5970. }
  5971. return url;
  5972. },
  5973. _fetch: function _fetch(url, params, options, type) {
  5974. options = options || {};
  5975. options.headers = options.headers || {};
  5976. if (!options.headers['Content-Type'] && !FormData.prototype.isPrototypeOf(params)) {
  5977. options.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
  5978. }
  5979. if (options.timeout) {
  5980. return this._timeout(options.timeout, FetchRequest_fetch(url, {
  5981. method: type,
  5982. headers: options.headers,
  5983. body: type === 'PUT' || type === 'POST' ? params : undefined,
  5984. credentials: this._getWithCredentials(options),
  5985. mode: 'cors',
  5986. timeout: getRequestTimeout()
  5987. }).then(function (response) {
  5988. return response;
  5989. }));
  5990. }
  5991. return FetchRequest_fetch(url, {
  5992. method: type,
  5993. body: type === 'PUT' || type === 'POST' ? params : undefined,
  5994. headers: options.headers,
  5995. credentials: this._getWithCredentials(options),
  5996. mode: 'cors',
  5997. timeout: getRequestTimeout()
  5998. }).then(function (response) {
  5999. return response;
  6000. });
  6001. },
  6002. _getWithCredentials: function _getWithCredentials(options) {
  6003. if (options.withCredentials === true) {
  6004. return 'include';
  6005. }
  6006. if (options.withCredentials === false) {
  6007. return 'omit';
  6008. }
  6009. return 'same-origin';
  6010. },
  6011. _fetchJsonp: function _fetchJsonp(url, options) {
  6012. options = options || {};
  6013. return fetch_jsonp_default()(url, {
  6014. method: 'GET',
  6015. timeout: options.timeout
  6016. }).then(function (response) {
  6017. return response;
  6018. });
  6019. },
  6020. _timeout: function _timeout(seconds, promise) {
  6021. return new Promise(function (resolve, reject) {
  6022. setTimeout(function () {
  6023. reject(new Error('timeout'));
  6024. }, seconds);
  6025. promise.then(resolve, reject);
  6026. });
  6027. },
  6028. _getParameterString: function _getParameterString(params) {
  6029. var paramsArray = [];
  6030. for (var key in params) {
  6031. var value = params[key];
  6032. if (value != null && typeof value !== 'function') {
  6033. var encodedValue;
  6034. if (Array.isArray(value) || value.toString() === '[object Object]') {
  6035. encodedValue = encodeURIComponent(JSON.stringify(value));
  6036. } else {
  6037. encodedValue = encodeURIComponent(value);
  6038. }
  6039. paramsArray.push(encodeURIComponent(key) + '=' + encodedValue);
  6040. }
  6041. }
  6042. return paramsArray.join('&');
  6043. },
  6044. _isMVTRequest: function _isMVTRequest(url) {
  6045. return url.indexOf('.mvt') > -1 || url.indexOf('.pbf') > -1;
  6046. }
  6047. };
  6048. ;// CONCATENATED MODULE: ./src/common/commontypes/Credential.js
  6049. function Credential_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6050. function Credential_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6051. function Credential_createClass(Constructor, protoProps, staticProps) { if (protoProps) Credential_defineProperties(Constructor.prototype, protoProps); if (staticProps) Credential_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  6052. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  6053. * This program are made available under the terms of the Apache License, Version 2.0
  6054. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6055. /**
  6056. * @class Credential
  6057. * @deprecatedclass SuperMap.Credential
  6058. * @category Security
  6059. * @classdesc SuperMap 的安全证书类,其中包括 token 等安全验证信息。</br>
  6060. * 需要使用用户名和密码在:"http://localhost:8090/iserver/services/security/tokens" 下申请 value。</br>
  6061. * 获得形如:"2OMwGmcNlrP2ixqv1Mk4BuQMybOGfLOrljruX6VcYMDQKc58Sl9nMHsqQaqeBx44jRvKSjkmpZKK1L596y7skQ.." 的 value。</br>
  6062. * 目前支持的功能包括:地图服务、专题图、量算、查询、公交换乘、空间分析、网络分析,不支持轮询功能。</br>
  6063. * @param {string} value - 访问受安全限制的服务时用于通过安全认证的验证信息。
  6064. * @param {string} [name='token'] - 验证信息前缀,name=value 部分的 name 部分。
  6065. * @example
  6066. * var pixcel = new Credential("valueString","token");
  6067. * pixcel.destroy();
  6068. * @usage
  6069. */
  6070. var Credential = /*#__PURE__*/function () {
  6071. function Credential(value, name) {
  6072. Credential_classCallCheck(this, Credential);
  6073. /**
  6074. * @member {string} Credential.prototype.value
  6075. * @description 访问受安全限制的服务时用于通过安全认证的验证信息。
  6076. */
  6077. this.value = value ? value : "";
  6078. /**
  6079. * @member {string} [Credential.prototype.name='token']
  6080. * @description 验证信息前缀,name=value 部分的 name 部分。
  6081. */
  6082. this.name = name ? name : "token";
  6083. this.CLASS_NAME = "SuperMap.Credential";
  6084. }
  6085. /**
  6086. * @function Credential.prototype.getUrlParameters
  6087. * @description 获取 name=value 的表达式。
  6088. * @example
  6089. * var credential = new Credential("valueString","token");
  6090. * //这里 str = "token=valueString";
  6091. * var str = credential.getUrlParameters();
  6092. * @returns {string} 安全信息组成的 url 片段。
  6093. */
  6094. Credential_createClass(Credential, [{
  6095. key: "getUrlParameters",
  6096. value: function getUrlParameters() {
  6097. //当需要其他安全信息的时候,则需要return this.name + "=" + this.value + "&" + "...";的形式添加。
  6098. return this.name + "=" + this.value;
  6099. }
  6100. /**
  6101. * @function Credential.prototype.getValue
  6102. * @description 获取 value。
  6103. * @example
  6104. * var credential = new Credential("2OMwGmcNlrP2ixqv1Mk4BuQMybOGfLOrljruX6VcYMDQKc58Sl9nMHsqQaqeBx44jRvKSjkmpZKK1L596y7skQ..","token");
  6105. * //这里 str = "2OMwGmcNlrP2ixqv1Mk4BuQMybOGfLOrljruX6VcYMDQKc58Sl9nMHsqQaqeBx44jRvKSjkmpZKK1L596y7skQ..";
  6106. * var str = credential.getValue();
  6107. * @returns {string} value 字符串,在 iServer 服务下该 value 值即为 token 值。
  6108. */
  6109. }, {
  6110. key: "getValue",
  6111. value: function getValue() {
  6112. return this.value;
  6113. }
  6114. /**
  6115. *
  6116. * @function Credential.prototype.destroy
  6117. * @description 销毁此对象。销毁后此对象的所有属性为 null,而不是初始值。
  6118. * @example
  6119. * var credential = new Credential("valueString","token");
  6120. * credential.destroy();
  6121. */
  6122. }, {
  6123. key: "destroy",
  6124. value: function destroy() {
  6125. this.value = null;
  6126. this.name = null;
  6127. }
  6128. }]);
  6129. return Credential;
  6130. }();
  6131. /**
  6132. * @member {Credential} Credential.CREDENTIAL
  6133. * @description 这个对象保存一个安全类的实例,在服务端需要安全验证的时候必须进行设置。
  6134. * @example
  6135. * 代码实例:
  6136. * // 当iServer启用服务安全的时候,下边的代码是必须的。安全证书类能够接收一个value和一个name参数。
  6137. * var value = "(以iServer为例,这里是申请的token值)";
  6138. * var name = "token";
  6139. * // 默认name参数为token,所以当使用iServer服务的时候可以不进行设置。
  6140. * Credential.CREDENTIAL = new Credential(value, name);
  6141. *
  6142. */
  6143. Credential.CREDENTIAL = null;
  6144. ;// CONCATENATED MODULE: ./src/common/security/SecurityManager.js
  6145. function SecurityManager_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6146. function SecurityManager_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6147. function SecurityManager_createClass(Constructor, protoProps, staticProps) { if (protoProps) SecurityManager_defineProperties(Constructor.prototype, protoProps); if (staticProps) SecurityManager_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  6148. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  6149. * This program are made available under the terms of the Apache License, Version 2.0
  6150. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6151. /**
  6152. * @class SecurityManager
  6153. * @deprecatedclass SuperMap.SecurityManager
  6154. * @category Security
  6155. * @classdesc 安全管理中心,提供 iServer,iPortal,Online 统一权限认证管理。
  6156. * > 使用说明:
  6157. * > 创建任何一个服务之前调用 {@link SecurityManager.registerToken}或
  6158. * > {@link SecurityManager.registerKey}注册凭据。
  6159. * > 发送请求时根据 URL 或者服务 ID 获取相应的 key 或者 token 并自动添加到服务地址中。
  6160. * @usage
  6161. */
  6162. var SecurityManager = /*#__PURE__*/function () {
  6163. function SecurityManager() {
  6164. SecurityManager_classCallCheck(this, SecurityManager);
  6165. }
  6166. SecurityManager_createClass(SecurityManager, null, [{
  6167. key: "generateToken",
  6168. value:
  6169. /**
  6170. * @description 从服务器获取一个token,在此之前要注册服务器信息。
  6171. * @function SecurityManager.generateToken
  6172. * @param {string} url - 服务器域名+端口,如:http://localhost:8092。
  6173. * @param {TokenServiceParameter} tokenParam - token 申请参数。
  6174. * @returns {Promise} 包含 token 信息的 Promise 对象。
  6175. */
  6176. function generateToken(url, tokenParam) {
  6177. var serverInfo = this.servers[url];
  6178. if (!serverInfo) {
  6179. return;
  6180. }
  6181. return FetchRequest.post(serverInfo.tokenServiceUrl, JSON.stringify(tokenParam.toJSON())).then(function (response) {
  6182. return response.text();
  6183. });
  6184. }
  6185. /**
  6186. * @description 注册安全服务器相关信息。
  6187. * @function SecurityManager.registerServers
  6188. * @param {ServerInfo} serverInfos - 服务器信息。
  6189. */
  6190. }, {
  6191. key: "registerServers",
  6192. value: function registerServers(serverInfos) {
  6193. this.servers = this.servers || {};
  6194. if (!Util_Util.isArray(serverInfos)) {
  6195. serverInfos = [serverInfos];
  6196. }
  6197. for (var i = 0; i < serverInfos.length; i++) {
  6198. var serverInfo = serverInfos[i];
  6199. this.servers[serverInfo.server] = serverInfo;
  6200. }
  6201. }
  6202. /**
  6203. * @description 服务请求都会自动带上这个 token。
  6204. * @function SecurityManager.registerToken
  6205. * @param {string} url -服务器域名+端口:如http://localhost:8090。
  6206. * @param {string} token - token。
  6207. */
  6208. }, {
  6209. key: "registerToken",
  6210. value: function registerToken(url, token) {
  6211. this.tokens = this.tokens || {};
  6212. if (!url || !token) {
  6213. return;
  6214. }
  6215. var domain = this._getTokenStorageKey(url);
  6216. this.tokens[domain] = token;
  6217. }
  6218. /**
  6219. * @description 注册 key,ids 为数组(存在一个 key 对应多个服务)。
  6220. * @function SecurityManager.registerKey
  6221. * @param {Array} ids - 可以是服务 ID 数组或者 URL 地址数组或者 webAPI 类型数组。
  6222. * @param {string} key - key。
  6223. */
  6224. }, {
  6225. key: "registerKey",
  6226. value: function registerKey(ids, key) {
  6227. this.keys = this.keys || {};
  6228. if (!ids || ids.length < 1 || !key) {
  6229. return;
  6230. }
  6231. ids = Util_Util.isArray(ids) ? ids : [ids];
  6232. for (var i = 0; i < ids.length; i++) {
  6233. var id = this._getUrlRestString(ids[0]) || ids[0];
  6234. this.keys[id] = key;
  6235. }
  6236. }
  6237. /**
  6238. * @description 获取服务器信息。
  6239. * @function SecurityManager.getServerInfo
  6240. * @param {string} url - 服务器域名+端口,如:http://localhost:8092。
  6241. * @returns {ServerInfo} 服务器信息。
  6242. */
  6243. }, {
  6244. key: "getServerInfo",
  6245. value: function getServerInfo(url) {
  6246. this.servers = this.servers || {};
  6247. return this.servers[url];
  6248. }
  6249. /**
  6250. * @description 根据 URL 获取token。
  6251. * @function SecurityManager.getToken
  6252. * @param {string} url - 服务器域名+端口,如:http://localhost:8092。
  6253. * @returns {string} token。
  6254. */
  6255. }, {
  6256. key: "getToken",
  6257. value: function getToken(url) {
  6258. if (!url) {
  6259. return;
  6260. }
  6261. this.tokens = this.tokens || {};
  6262. var domain = this._getTokenStorageKey(url);
  6263. return this.tokens[domain];
  6264. }
  6265. /**
  6266. * @description 根据 URL 获取 key。
  6267. * @function SecurityManager.getKey
  6268. * @param {string} id - ID。
  6269. * @returns {string} key。
  6270. */
  6271. }, {
  6272. key: "getKey",
  6273. value: function getKey(id) {
  6274. this.keys = this.keys || {};
  6275. var key = this._getUrlRestString(id) || id;
  6276. return this.keys[key];
  6277. }
  6278. /**
  6279. * @description iServer 登录验证。
  6280. * @function SecurityManager.loginiServer
  6281. * @param {string} url - iServer 首页地址,如:http://localhost:8090/iserver。
  6282. * @param {string} username - 用户名。
  6283. * @param {string} password - 密码。
  6284. * @param {boolean} [rememberme=false] - 是否记住。
  6285. * @returns {Promise} 包含 iServer 登录请求结果的 Promise 对象。
  6286. */
  6287. }, {
  6288. key: "loginiServer",
  6289. value: function loginiServer(url, username, password, rememberme) {
  6290. url = Util_Util.urlPathAppend(url, 'services/security/login');
  6291. var loginInfo = {
  6292. username: username && username.toString(),
  6293. password: password && password.toString(),
  6294. rememberme: rememberme
  6295. };
  6296. loginInfo = JSON.stringify(loginInfo);
  6297. var requestOptions = {
  6298. headers: {
  6299. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  6300. }
  6301. };
  6302. return FetchRequest.post(url, loginInfo, requestOptions).then(function (response) {
  6303. return response.json();
  6304. });
  6305. }
  6306. /**
  6307. * @description iServer登出。
  6308. * @function SecurityManager.logoutiServer
  6309. * @param {string} url - iServer 首页地址,如:http://localhost:8090/iserver。
  6310. * @returns {Promise} 是否登出成功。
  6311. */
  6312. }, {
  6313. key: "logoutiServer",
  6314. value: function logoutiServer(url) {
  6315. url = Util_Util.urlPathAppend(url, 'services/security/logout');
  6316. var requestOptions = {
  6317. headers: {
  6318. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  6319. },
  6320. withoutFormatSuffix: true
  6321. };
  6322. return FetchRequest.get(url, '', requestOptions).then(function () {
  6323. return true;
  6324. })["catch"](function () {
  6325. return false;
  6326. });
  6327. }
  6328. /**
  6329. * @description Online 登录验证。
  6330. * @function SecurityManager.loginOnline
  6331. * @param {string} callbackLocation - 跳转位置。
  6332. * @param {boolean} [newTab=true] - 是否新窗口打开。
  6333. */
  6334. }, {
  6335. key: "loginOnline",
  6336. value: function loginOnline(callbackLocation, newTab) {
  6337. var loginUrl = SecurityManager.SSO + '/login?service=' + callbackLocation;
  6338. this._open(loginUrl, newTab);
  6339. }
  6340. /**
  6341. * @description iPortal登录验证。
  6342. * @function SecurityManager.loginiPortal
  6343. * @param {string} url - iportal 首页地址,如:http://localhost:8092/iportal。
  6344. * @param {string} username - 用户名。
  6345. * @param {string} password - 密码。
  6346. * @returns {Promise} 包含 iPortal 登录请求结果的 Promise 对象。
  6347. */
  6348. }, {
  6349. key: "loginiPortal",
  6350. value: function loginiPortal(url, username, password) {
  6351. url = Util_Util.urlPathAppend(url, 'web/login');
  6352. var loginInfo = {
  6353. username: username && username.toString(),
  6354. password: password && password.toString()
  6355. };
  6356. loginInfo = JSON.stringify(loginInfo);
  6357. var requestOptions = {
  6358. headers: {
  6359. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  6360. },
  6361. withCredentials: true
  6362. };
  6363. return FetchRequest.post(url, loginInfo, requestOptions).then(function (response) {
  6364. return response.json();
  6365. });
  6366. }
  6367. /**
  6368. * @description iPortal 登出。
  6369. * @function SecurityManager.logoutiPortal
  6370. * @param {string} url - iportal 首页地址,如:http://localhost:8092/iportal。
  6371. * @returns {Promise} 如果登出成功,返回 true;否则返回 false。
  6372. */
  6373. }, {
  6374. key: "logoutiPortal",
  6375. value: function logoutiPortal(url) {
  6376. url = Util_Util.urlPathAppend(url, 'services/security/logout');
  6377. var requestOptions = {
  6378. headers: {
  6379. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  6380. },
  6381. withCredentials: true,
  6382. withoutFormatSuffix: true
  6383. };
  6384. return FetchRequest.get(url, '', requestOptions).then(function () {
  6385. return true;
  6386. })["catch"](function () {
  6387. return false;
  6388. });
  6389. }
  6390. /**
  6391. * @description iManager 登录验证。
  6392. * @function SecurityManager.loginManager
  6393. * @param {string} url - iManager 地址。地址参数为 iManager 首页地址,如: http://localhost:8390/imanager。
  6394. * @param {Object} [loginInfoParams] - iManager 登录参数。
  6395. * @param {string} loginInfoParams.userName - 用户名。
  6396. * @param {string} loginInfoParams.password - 密码。
  6397. * @param {Object} options
  6398. * @param {boolean} [options.isNewTab=true] - 不同域时是否在新窗口打开登录页面。
  6399. * @returns {Promise} 包含 iManager 登录请求结果的 Promise 对象。
  6400. */
  6401. }, {
  6402. key: "loginManager",
  6403. value: function loginManager(url, loginInfoParams, options) {
  6404. if (!Util_Util.isInTheSameDomain(url)) {
  6405. var isNewTab = options ? options.isNewTab : true;
  6406. this._open(url, isNewTab);
  6407. return;
  6408. }
  6409. var requestUrl = Util_Util.urlPathAppend(url, 'icloud/security/tokens');
  6410. var params = loginInfoParams || {};
  6411. var loginInfo = {
  6412. username: params.userName && params.userName.toString(),
  6413. password: params.password && params.password.toString()
  6414. };
  6415. loginInfo = JSON.stringify(loginInfo);
  6416. var requestOptions = {
  6417. headers: {
  6418. Accept: '*/*',
  6419. 'Content-Type': 'application/json'
  6420. }
  6421. };
  6422. var me = this;
  6423. return FetchRequest.post(requestUrl, loginInfo, requestOptions).then(function (response) {
  6424. response.text().then(function (result) {
  6425. me.imanagerToken = result;
  6426. return result;
  6427. });
  6428. });
  6429. }
  6430. /**
  6431. * @description 清空全部验证信息。
  6432. * @function SecurityManager.destroyAllCredentials
  6433. */
  6434. }, {
  6435. key: "destroyAllCredentials",
  6436. value: function destroyAllCredentials() {
  6437. this.keys = null;
  6438. this.tokens = null;
  6439. this.servers = null;
  6440. }
  6441. /**
  6442. * @description 清空令牌信息。
  6443. * @function SecurityManager.destroyToken
  6444. * @param {string} url - iportal 首页地址,如:http://localhost:8092/iportal。
  6445. */
  6446. }, {
  6447. key: "destroyToken",
  6448. value: function destroyToken(url) {
  6449. if (!url) {
  6450. return;
  6451. }
  6452. var domain = this._getTokenStorageKey(url);
  6453. this.tokens = this.tokens || {};
  6454. if (this.tokens[domain]) {
  6455. delete this.tokens[domain];
  6456. }
  6457. }
  6458. /**
  6459. * @description 清空服务授权码。
  6460. * @function SecurityManager.destroyKey
  6461. * @param {string} url - iServer 首页地址,如:http://localhost:8090/iserver。
  6462. */
  6463. }, {
  6464. key: "destroyKey",
  6465. value: function destroyKey(url) {
  6466. if (!url) {
  6467. return;
  6468. }
  6469. this.keys = this.keys || {};
  6470. var key = this._getUrlRestString(url) || url;
  6471. if (this.keys[key]) {
  6472. delete this.keys[key];
  6473. }
  6474. }
  6475. /**
  6476. * @description 服务URL追加授权信息,授权信息需先通过SecurityManager.registerKey或SecurityManager.registerToken注册。
  6477. * @version 10.1.2
  6478. * @function SecurityManager.appendCredential
  6479. * @param {string} url - 服务URL。
  6480. * @returns {string} 绑定了token或者key的服务URL。
  6481. */
  6482. }, {
  6483. key: "appendCredential",
  6484. value: function appendCredential(url) {
  6485. var newUrl = url;
  6486. var value = this.getToken(url);
  6487. var credential = value ? new Credential(value, 'token') : null;
  6488. if (!credential) {
  6489. value = this.getKey(url);
  6490. credential = value ? new Credential(value, 'key') : null;
  6491. }
  6492. if (credential) {
  6493. newUrl = Util_Util.urlAppend(newUrl, credential.getUrlParameters());
  6494. }
  6495. return newUrl;
  6496. }
  6497. }, {
  6498. key: "_open",
  6499. value: function _open(url, newTab) {
  6500. newTab = newTab != null ? newTab : true;
  6501. var offsetX = window.screen.availWidth / 2 - this.INNER_WINDOW_WIDTH / 2;
  6502. var offsetY = window.screen.availHeight / 2 - this.INNER_WINDOW_HEIGHT / 2;
  6503. var options = 'height=' + this.INNER_WINDOW_HEIGHT + ', width=' + this.INNER_WINDOW_WIDTH + ',top=' + offsetY + ', left=' + offsetX + ',toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no';
  6504. if (newTab) {
  6505. window.open(url, 'login');
  6506. } else {
  6507. window.open(url, 'login', options);
  6508. }
  6509. }
  6510. }, {
  6511. key: "_getTokenStorageKey",
  6512. value: function _getTokenStorageKey(url) {
  6513. var patten = /(.*?):\/\/([^\/]+)/i;
  6514. var result = url.match(patten);
  6515. if (!result) {
  6516. return url;
  6517. }
  6518. return result[0];
  6519. }
  6520. }, {
  6521. key: "_getUrlRestString",
  6522. value: function _getUrlRestString(url) {
  6523. if (!url) {
  6524. return url;
  6525. }
  6526. // var patten = /http:\/\/(.*\/rest)/i;
  6527. var patten = /(http|https):\/\/(.*\/rest)/i;
  6528. var result = url.match(patten);
  6529. if (!result) {
  6530. return url;
  6531. }
  6532. return result[0];
  6533. }
  6534. }]);
  6535. return SecurityManager;
  6536. }();
  6537. SecurityManager.INNER_WINDOW_WIDTH = 600;
  6538. SecurityManager.INNER_WINDOW_HEIGHT = 600;
  6539. SecurityManager.SSO = 'https://sso.supermap.com';
  6540. SecurityManager.ONLINE = 'https://www.supermapol.com';
  6541. ;// CONCATENATED MODULE: ./src/common/REST.js
  6542. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  6543. * This program are made available under the terms of the Apache License, Version 2.0
  6544. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6545. /**
  6546. * @enum DataFormat
  6547. * @description 服务请求返回结果数据类型
  6548. * @category BaseTypes Constant
  6549. * @type {string}
  6550. * @usage
  6551. * ```
  6552. * // 浏览器
  6553. * <script type="text/javascript" src="{cdn}"></script>
  6554. * <script>
  6555. * const result = {namespace}.DataFormat.GEOJSON;
  6556. *
  6557. * </script>
  6558. * // ES6 Import
  6559. * import { DataFormat } from '{npm}';
  6560. *
  6561. * const result = DataFormat.GEOJSON;
  6562. * ```
  6563. */
  6564. var DataFormat = {
  6565. /** GEOJSON */
  6566. GEOJSON: "GEOJSON",
  6567. /** ISERVER */
  6568. ISERVER: "ISERVER",
  6569. /** FGB */
  6570. FGB: "FGB"
  6571. };
  6572. /**
  6573. * @enum ServerType
  6574. * @description 服务器类型
  6575. * @category BaseTypes Constant
  6576. * @type {string}
  6577. * @usage
  6578. * ```
  6579. * // 浏览器
  6580. * <script type="text/javascript" src="{cdn}"></script>
  6581. * <script>
  6582. * const result = {namespace}.ServerType.ISERVER;
  6583. *
  6584. * </script>
  6585. * // ES6 Import
  6586. * import { ServerType } from '{npm}';
  6587. *
  6588. * const result = ServerType.ISERVER;
  6589. * ```
  6590. */
  6591. var ServerType = {
  6592. /** ISERVER */
  6593. ISERVER: "ISERVER",
  6594. /** IPORTAL */
  6595. IPORTAL: "IPORTAL",
  6596. /** ONLINE */
  6597. ONLINE: "ONLINE"
  6598. };
  6599. /**
  6600. * @enum GeometryType
  6601. * @description 几何对象枚举,定义了一系列几何对象类型。
  6602. * @category BaseTypes Constant
  6603. * @type {string}
  6604. * @usage
  6605. * ```
  6606. * // 浏览器
  6607. * <script type="text/javascript" src="{cdn}"></script>
  6608. * <script>
  6609. * const result = {namespace}.GeometryType.LINE;
  6610. *
  6611. * </script>
  6612. * // ES6 Import
  6613. * import { GeometryType } from '{npm}';
  6614. *
  6615. * const result = GeometryType.LINE;
  6616. * ```
  6617. */
  6618. var GeometryType = {
  6619. /** 线几何对象类型。 */
  6620. LINE: "LINE",
  6621. /** 路由对象。 */
  6622. LINEM: "LINEM",
  6623. /** 点几何对象类型。 */
  6624. POINT: "POINT",
  6625. /** 面几何对象类型。 */
  6626. REGION: "REGION",
  6627. /** EPS点几何对象。 */
  6628. POINTEPS: "POINTEPS",
  6629. /** EPS线几何对象。 */
  6630. LINEEPS: "LINEEPS",
  6631. /** EPS面几何对象。 */
  6632. REGIONEPS: "REGIONEPS",
  6633. /** 椭圆。 */
  6634. ELLIPSE: "ELLIPSE",
  6635. /** 圆。 */
  6636. CIRCLE: "CIRCLE",
  6637. /** 文本几何对象类型。 */
  6638. TEXT: "TEXT",
  6639. /** 矩形。 */
  6640. RECTANGLE: "RECTANGLE",
  6641. /** 未定义。 */
  6642. UNKNOWN: "UNKNOWN",
  6643. /** 复合几何对象类型。 */
  6644. GEOCOMPOUND: "GEOCOMPOUND"
  6645. };
  6646. /**
  6647. * @enum QueryOption
  6648. * @description 查询结果类型枚举,描述查询结果返回类型,包括只返回属性、只返回几何实体以及返回属性和几何实体。
  6649. * @category BaseTypes Constant
  6650. * @type {string}
  6651. * @usage
  6652. * ```
  6653. * // 浏览器
  6654. * <script type="text/javascript" src="{cdn}"></script>
  6655. * <script>
  6656. * const result = {namespace}.QueryOption.ATTRIBUTE;
  6657. *
  6658. * </script>
  6659. * // ES6 Import
  6660. * import { QueryOption } from '{npm}';
  6661. *
  6662. * const result = QueryOption.ATTRIBUTE;
  6663. * ```
  6664. */
  6665. var QueryOption = {
  6666. /** 属性。 */
  6667. ATTRIBUTE: "ATTRIBUTE",
  6668. /** 属性和几何对象。 */
  6669. ATTRIBUTEANDGEOMETRY: "ATTRIBUTEANDGEOMETRY",
  6670. /** 几何对象。 */
  6671. GEOMETRY: "GEOMETRY"
  6672. };
  6673. /**
  6674. * @enum JoinType
  6675. * @description 关联查询时的关联类型常量。
  6676. * 该类定义了两个表之间的连接类型常量,决定了对两个表之间进行连接查询时,查询结果中得到的记录的情况。
  6677. * @category BaseTypes Constant
  6678. * @type {string}
  6679. * @usage
  6680. * ```
  6681. * // 浏览器
  6682. * <script type="text/javascript" src="{cdn}"></script>
  6683. * <script>
  6684. * const result = {namespace}.JoinType.INNERJOIN;
  6685. *
  6686. * </script>
  6687. * // ES6 Import
  6688. * import { JoinType } from '{npm}';
  6689. *
  6690. * const result = JoinType.INNERJOIN;
  6691. * ```
  6692. */
  6693. var JoinType = {
  6694. /** 内连接。 */
  6695. INNERJOIN: "INNERJOIN",
  6696. /** 左连接。 */
  6697. LEFTJOIN: "LEFTJOIN"
  6698. };
  6699. /**
  6700. * @enum SpatialQueryMode
  6701. * @description 空间查询模式枚举。该类定义了空间查询操作模式常量。
  6702. * @category BaseTypes Constant
  6703. * @type {string}
  6704. * @usage
  6705. * ```
  6706. * // 浏览器
  6707. * <script type="text/javascript" src="{cdn}"></script>
  6708. * <script>
  6709. * const result = {namespace}.SpatialQueryMode.CONTAIN;
  6710. *
  6711. * </script>
  6712. * // ES6 Import
  6713. * import { SpatialQueryMode } from '{npm}';
  6714. *
  6715. * const result = SpatialQueryMode.CONTAIN;
  6716. * ```
  6717. */
  6718. var SpatialQueryMode = {
  6719. /** 包含空间查询模式。 */
  6720. CONTAIN: "CONTAIN",
  6721. /** 交叉空间查询模式。 */
  6722. CROSS: "CROSS",
  6723. /** 分离空间查询模式。 */
  6724. DISJOINT: "DISJOINT",
  6725. /** 重合空间查询模式。 */
  6726. IDENTITY: "IDENTITY",
  6727. /** 相交空间查询模式。 */
  6728. INTERSECT: "INTERSECT",
  6729. /** 无空间查询。 */
  6730. NONE: "NONE",
  6731. /** 叠加空间查询模式。 */
  6732. OVERLAP: "OVERLAP",
  6733. /** 邻接空间查询模式。 */
  6734. TOUCH: "TOUCH",
  6735. /** 被包含空间查询模式。 */
  6736. WITHIN: "WITHIN"
  6737. };
  6738. /**
  6739. * @enum SpatialRelationType
  6740. * @description 数据集对象间的空间关系枚举。
  6741. * 该类定义了数据集对象间的空间关系类型常量。
  6742. * @category BaseTypes Constant
  6743. * @type {string}
  6744. * @usage
  6745. * ```
  6746. * // 浏览器
  6747. * <script type="text/javascript" src="{cdn}"></script>
  6748. * <script>
  6749. * const result = {namespace}.SpatialRelationType.CONTAIN;
  6750. *
  6751. * </script>
  6752. * // ES6 Import
  6753. * import { SpatialRelationType } from '{npm}';
  6754. *
  6755. * const result = {namespace}.SpatialRelationType.CONTAIN;
  6756. * ```
  6757. */
  6758. var SpatialRelationType = {
  6759. /** 包含关系。 */
  6760. CONTAIN: "CONTAIN",
  6761. /** 相交关系。 */
  6762. INTERSECT: "INTERSECT",
  6763. /** 被包含关系。 */
  6764. WITHIN: "WITHIN"
  6765. };
  6766. /**
  6767. * @enum MeasureMode
  6768. * @type {string}
  6769. * @description 量算模式枚举。
  6770. * @category BaseTypes Constant
  6771. * 该类定义了两种测量模式:距离测量和面积测量。
  6772. * @usage
  6773. * ```
  6774. * // 浏览器
  6775. * <script type="text/javascript" src="{cdn}"></script>
  6776. * <script>
  6777. * const result = {namespace}.MeasureMode.DISTANCE;
  6778. *
  6779. * </script>
  6780. * // ES6 Import
  6781. * import { MeasureMode } from '{npm}';
  6782. *
  6783. * const result = MeasureMode.DISTANCE;
  6784. * ```
  6785. */
  6786. var MeasureMode = {
  6787. /** 距离测量。 */
  6788. DISTANCE: "DISTANCE",
  6789. /** 面积测量。 */
  6790. AREA: "AREA"
  6791. };
  6792. /**
  6793. * @enum Unit
  6794. * @description 距离单位枚举。
  6795. * 该类定义了一系列距离单位类型。
  6796. * @category BaseTypes Constant
  6797. * @type {string}
  6798. * @usage
  6799. * ```
  6800. * // 浏览器
  6801. * <script type="text/javascript" src="{cdn}"></script>
  6802. * <script>
  6803. * const result = {namespace}.Unit.METER;
  6804. *
  6805. * </script>
  6806. * // ES6 Import
  6807. * import { Unit } from '{npm}';
  6808. *
  6809. * const result = Unit.METER;
  6810. * ```
  6811. */
  6812. var Unit = {
  6813. /** 米。 */
  6814. METER: "METER",
  6815. /** 千米。 */
  6816. KILOMETER: "KILOMETER",
  6817. /** 英里。 */
  6818. MILE: "MILE",
  6819. /** 码。 */
  6820. YARD: "YARD",
  6821. /** 度。 */
  6822. DEGREE: "DEGREE",
  6823. /** 毫米。 */
  6824. MILLIMETER: "MILLIMETER",
  6825. /** 厘米。 */
  6826. CENTIMETER: "CENTIMETER",
  6827. /** 英寸。 */
  6828. INCH: "INCH",
  6829. /** 分米。 */
  6830. DECIMETER: "DECIMETER",
  6831. /** 英尺。 */
  6832. FOOT: "FOOT",
  6833. /** 秒。 */
  6834. SECOND: "SECOND",
  6835. /** 分。 */
  6836. MINUTE: "MINUTE",
  6837. /** 弧度。 */
  6838. RADIAN: "RADIAN"
  6839. };
  6840. /**
  6841. * @enum BufferRadiusUnit
  6842. * @description 缓冲区距离单位枚举。该类定义了一系列缓冲距离单位类型。
  6843. * @category BaseTypes Constant
  6844. * @type {string}
  6845. * @usage
  6846. * ```
  6847. * // 浏览器
  6848. * <script type="text/javascript" src="{cdn}"></script>
  6849. * <script>
  6850. * const result = {namespace}.BufferRadiusUnit.CENTIMETER;
  6851. *
  6852. * </script>
  6853. * // ES6 Import
  6854. * import { BufferRadiusUnit } from '{npm}';
  6855. *
  6856. * const result = BufferRadiusUnit.CENTIMETER;
  6857. * ```
  6858. */
  6859. var BufferRadiusUnit = {
  6860. /** 厘米。 */
  6861. CENTIMETER: "CENTIMETER",
  6862. /** 分米。 */
  6863. DECIMETER: "DECIMETER",
  6864. /** 英尺。 */
  6865. FOOT: "FOOT",
  6866. /** 英寸。 */
  6867. INCH: "INCH",
  6868. /** 千米。 */
  6869. KILOMETER: "KILOMETER",
  6870. /** 米。 */
  6871. METER: "METER",
  6872. /** 英里。 */
  6873. MILE: "MILE",
  6874. /** 毫米。 */
  6875. MILLIMETER: "MILLIMETER",
  6876. /** 码。 */
  6877. YARD: "YARD"
  6878. };
  6879. /**
  6880. * @enum EngineType
  6881. * @description 数据源引擎类型枚举。
  6882. * @category BaseTypes Constant
  6883. * @type {string}
  6884. * @usage
  6885. * ```
  6886. * // 浏览器
  6887. * <script type="text/javascript" src="{cdn}"></script>
  6888. * <script>
  6889. * const result = {namespace}.EngineType.IMAGEPLUGINS;
  6890. *
  6891. * </script>
  6892. * // ES6 Import
  6893. * import { EngineType } from '{npm}';
  6894. *
  6895. * const result = EngineType.IMAGEPLUGINS;
  6896. * ```
  6897. */
  6898. var EngineType = {
  6899. /** 影像只读引擎类型,文件引擎,针对通用影像格式如 BMP,JPG,TIFF 以及超图自定义影像格式 SIT 等。 */
  6900. IMAGEPLUGINS: "IMAGEPLUGINS",
  6901. /** OGC 引擎类型,针对于 Web 数据源,Web 引擎,目前支持的类型有 WMS,WFS,WCS。 */
  6902. OGC: "OGC",
  6903. /** Oracle 引擎类型,针对 Oracle 数据源,数据库引擎。 */
  6904. ORACLEPLUS: "ORACLEPLUS",
  6905. /** SDB 引擎类型,文件引擎,即 SDB 数据源。 */
  6906. SDBPLUS: "SDBPLUS",
  6907. /** SQL Server 引擎类型,针对 SQL Server 数据源,数据库引擎。 */
  6908. SQLPLUS: "SQLPLUS",
  6909. /** UDB 引擎类型,文件引擎。 */
  6910. UDB: "UDB"
  6911. };
  6912. /**
  6913. * @enum ThemeGraphTextFormat
  6914. * @description 统计专题图文本显示格式枚举。
  6915. * @category BaseTypes Constant
  6916. * @type {string}
  6917. * @usage
  6918. * ```
  6919. * // 浏览器
  6920. * <script type="text/javascript" src="{cdn}"></script>
  6921. * <script>
  6922. * const result = {namespace}.ThemeGraphTextFormat.CAPTION;
  6923. *
  6924. * </script>
  6925. * // ES6 Import
  6926. * import { ThemeGraphTextFormat } from '{npm}';
  6927. *
  6928. * const result = ThemeGraphTextFormat.CAPTION;
  6929. * ```
  6930. */
  6931. var ThemeGraphTextFormat = {
  6932. /** 标题。以各子项的标题来进行标注。 */
  6933. CAPTION: "CAPTION",
  6934. /** 标题 + 百分数。以各子项的标题和所占的百分比来进行标注。 */
  6935. CAPTION_PERCENT: "CAPTION_PERCENT",
  6936. /** 标题 + 实际数值。以各子项的标题和真实数值来进行标注。 */
  6937. CAPTION_VALUE: "CAPTION_VALUE",
  6938. /** 百分数。以各子项所占的百分比来进行标注。 */
  6939. PERCENT: "PERCENT",
  6940. /** 实际数值。以各子项的真实数值来进行标注。 */
  6941. VALUE: "VALUE"
  6942. };
  6943. /**
  6944. * @enum ThemeGraphType
  6945. * @description 统计专题图类型枚举。
  6946. * @category BaseTypes Constant
  6947. * @type {string}
  6948. * @usage
  6949. * ```
  6950. * // 浏览器
  6951. * <script type="text/javascript" src="{cdn}"></script>
  6952. * <script>
  6953. * const result = {namespace}.ThemeGraphType.AREA;
  6954. *
  6955. * </script>
  6956. * // ES6 Import
  6957. * import { ThemeGraphType } from '{npm}';
  6958. *
  6959. * const result = ThemeGraphType.AREA;
  6960. * ```
  6961. */
  6962. var ThemeGraphType = {
  6963. /** 面积图。 */
  6964. AREA: "AREA",
  6965. /** 柱状图。 */
  6966. BAR: "BAR",
  6967. /** 三维柱状图。 */
  6968. BAR3D: "BAR3D",
  6969. /** 折线图。 */
  6970. LINE: "LINE",
  6971. /** 饼图。 */
  6972. PIE: "PIE",
  6973. /** 三维饼图。 */
  6974. PIE3D: "PIE3D",
  6975. /** 点状图。 */
  6976. POINT: "POINT",
  6977. /** 环状图。 */
  6978. RING: "RING",
  6979. /** 玫瑰图。 */
  6980. ROSE: "ROSE",
  6981. /** 三维玫瑰图。 */
  6982. ROSE3D: "ROSE3D",
  6983. /** 堆叠柱状图。 */
  6984. STACK_BAR: "STACK_BAR",
  6985. /** 三维堆叠柱状图。 */
  6986. STACK_BAR3D: "STACK_BAR3D",
  6987. /** 阶梯图。 */
  6988. STEP: "STEP"
  6989. };
  6990. /**
  6991. * @enum GraphAxesTextDisplayMode
  6992. * @description 统计专题图坐标轴文本显示模式。
  6993. * @category BaseTypes Constant
  6994. * @type {string}
  6995. * @usage
  6996. * ```
  6997. * // 浏览器
  6998. * <script type="text/javascript" src="{cdn}"></script>
  6999. * <script>
  7000. * const result = {namespace}.GraphAxesTextDisplayMode.ALL;
  7001. *
  7002. * </script>
  7003. * // ES6 Import
  7004. * import { GraphAxesTextDisplayMode } from '{npm}';
  7005. *
  7006. * const result = GraphAxesTextDisplayMode.ALL;
  7007. * ```
  7008. */
  7009. var GraphAxesTextDisplayMode = {
  7010. /** 显示全部文本。 */
  7011. ALL: "ALL",
  7012. /** 不显示。 */
  7013. NONE: "NONE",
  7014. /** 显示Y轴的文本。 */
  7015. YAXES: "YAXES"
  7016. };
  7017. /**
  7018. * @enum GraduatedMode
  7019. * @description 专题图分级模式枚举。
  7020. * @category BaseTypes Constant
  7021. * @type {string}
  7022. * @usage
  7023. * ```
  7024. * // 浏览器
  7025. * <script type="text/javascript" src="{cdn}"></script>
  7026. * <script>
  7027. * const result = {namespace}.GraduatedMode.CONSTANT;
  7028. *
  7029. * </script>
  7030. * // ES6 Import
  7031. * import { GraduatedMode } from '{npm}';
  7032. *
  7033. * const result = GraduatedMode.CONSTANT;
  7034. * ```
  7035. */
  7036. var GraduatedMode = {
  7037. /** 常量分级模式。 */
  7038. CONSTANT: "CONSTANT",
  7039. /** 对数分级模式。 */
  7040. LOGARITHM: "LOGARITHM",
  7041. /** 平方根分级模式。 */
  7042. SQUAREROOT: "SQUAREROOT"
  7043. };
  7044. /**
  7045. * @enum RangeMode
  7046. * @description 范围分段专题图分段方式枚举。
  7047. * @category BaseTypes Constant
  7048. * @type {string}
  7049. * @usage
  7050. * ```
  7051. * // 浏览器
  7052. * <script type="text/javascript" src="{cdn}"></script>
  7053. * <script>
  7054. * const result = {namespace}.RangeMode.CUSTOMINTERVAL;
  7055. *
  7056. * </script>
  7057. * // ES6 Import
  7058. * import { RangeMode } from '{npm}';
  7059. *
  7060. * const result = RangeMode.CUSTOMINTERVAL;
  7061. * ```
  7062. */
  7063. var RangeMode = {
  7064. /** 自定义分段法。 */
  7065. CUSTOMINTERVAL: "CUSTOMINTERVAL",
  7066. /** 等距离分段法。 */
  7067. EQUALINTERVAL: "EQUALINTERVAL",
  7068. /** 对数分段法。 */
  7069. LOGARITHM: "LOGARITHM",
  7070. /** 等计数分段法。 */
  7071. QUANTILE: "QUANTILE",
  7072. /** 平方根分段法。 */
  7073. SQUAREROOT: "SQUAREROOT",
  7074. /** 标准差分段法。 */
  7075. STDDEVIATION: "STDDEVIATION"
  7076. };
  7077. /**
  7078. * @enum ThemeType
  7079. * @description 专题图类型枚举。
  7080. * @category BaseTypes Constant
  7081. * @type {string}
  7082. * @usage
  7083. * ```
  7084. * // 浏览器
  7085. * <script type="text/javascript" src="{cdn}"></script>
  7086. * <script>
  7087. * const result = {namespace}.ThemeType.DOTDENSITY;
  7088. *
  7089. * </script>
  7090. * // ES6 Import
  7091. * import { ThemeType } from '{npm}';
  7092. *
  7093. * const result = ThemeType.DOTDENSITY;
  7094. * ```
  7095. */
  7096. var ThemeType = {
  7097. /** 点密度专题图。 */
  7098. DOTDENSITY: "DOTDENSITY",
  7099. /** 等级符号专题图。 */
  7100. GRADUATEDSYMBOL: "GRADUATEDSYMBOL",
  7101. /** 统计专题图。 */
  7102. GRAPH: "GRAPH",
  7103. /** 标签专题图。 */
  7104. LABEL: "LABEL",
  7105. /** 分段专题图。 */
  7106. RANGE: "RANGE",
  7107. /** 単值专题图。 */
  7108. UNIQUE: "UNIQUE"
  7109. };
  7110. /**
  7111. * @enum ColorGradientType
  7112. * @description 渐变颜色枚举。
  7113. * @category BaseTypes Constant
  7114. * @type {string}
  7115. * @usage
  7116. * ```
  7117. * // 浏览器
  7118. * <script type="text/javascript" src="{cdn}"></script>
  7119. * <script>
  7120. * const result = {namespace}.ColorGradientType.BLACK_WHITE;
  7121. *
  7122. * </script>
  7123. * // ES6 Import
  7124. * import { ColorGradientType } from '{npm}';
  7125. *
  7126. * const result = ColorGradientType.BLACK_WHITE;
  7127. * ```
  7128. */
  7129. var ColorGradientType = {
  7130. /** 黑白渐变色。 */
  7131. BLACK_WHITE: "BLACKWHITE",
  7132. /** 蓝黑渐变色。 */
  7133. BLUE_BLACK: "BLUEBLACK",
  7134. /** 蓝红渐变色。 */
  7135. BLUE_RED: "BLUERED",
  7136. /** 蓝白渐变色。 */
  7137. BLUE_WHITE: "BLUEWHITE",
  7138. /** 青黑渐变色。 */
  7139. CYAN_BLACK: "CYANBLACK",
  7140. /** 青蓝渐变色。 */
  7141. CYAN_BLUE: "CYANBLUE",
  7142. /** 青绿渐变色。 */
  7143. CYAN_GREEN: "CYANGREEN",
  7144. /** 青白渐变色。 */
  7145. CYAN_WHITE: "CYANWHITE",
  7146. /** 绿黑渐变色。 */
  7147. GREEN_BLACK: "GREENBLACK",
  7148. /** 绿蓝渐变色。 */
  7149. GREEN_BLUE: "GREENBLUE",
  7150. /** 绿橙紫渐变色。 */
  7151. GREEN_ORANGE_VIOLET: "GREENORANGEVIOLET",
  7152. /** 绿红渐变色。 */
  7153. GREEN_RED: "GREENRED",
  7154. /** 蓝红渐变色。 */
  7155. GREEN_WHITE: "GREENWHITE",
  7156. /** 粉黑渐变色。 */
  7157. PINK_BLACK: "PINKBLACK",
  7158. /** 粉蓝渐变色。 */
  7159. PINK_BLUE: "PINKBLUE",
  7160. /** 粉红渐变色。 */
  7161. PINK_RED: "PINKRED",
  7162. /** 粉白渐变色。 */
  7163. PINK_WHITE: "PINKWHITE",
  7164. /** 彩虹色。 */
  7165. RAIN_BOW: "RAINBOW",
  7166. /** 红黑渐变色。 */
  7167. RED_BLACK: "REDBLACK",
  7168. /** 红白渐变色。 */
  7169. RED_WHITE: "REDWHITE",
  7170. /** 光谱渐变。 */
  7171. SPECTRUM: "SPECTRUM",
  7172. /** 地形渐变,用于三维显示效果较好。 */
  7173. TERRAIN: "TERRAIN",
  7174. /** 黄黑渐变色。 */
  7175. YELLOW_BLACK: "YELLOWBLACK",
  7176. /** 黄蓝渐变色。 */
  7177. YELLOW_BLUE: "YELLOWBLUE",
  7178. /** 黄绿渐变色。 */
  7179. YELLOW_GREEN: "YELLOWGREEN",
  7180. /** 黄红渐变色。 */
  7181. YELLOW_RED: "YELLOWRED",
  7182. /** 黄白渐变色。 */
  7183. YELLOW_WHITE: "YELLOWWHITE"
  7184. };
  7185. /**
  7186. * @enum TextAlignment
  7187. * @description 文本对齐枚举。
  7188. * @category BaseTypes Constant
  7189. * @type {string}
  7190. * @usage
  7191. * ```
  7192. * // 浏览器
  7193. * <script type="text/javascript" src="{cdn}"></script>
  7194. * <script>
  7195. * const result = {namespace}.TextAlignment.TOPLEFT;
  7196. *
  7197. * </script>
  7198. * // ES6 Import
  7199. * import { TextAlignment } from '{npm}';
  7200. *
  7201. * const result = TextAlignment.TOPLEFT;
  7202. * ```
  7203. */
  7204. var TextAlignment = {
  7205. /** 左上角对齐。 */
  7206. TOPLEFT: "TOPLEFT",
  7207. /** 顶部居中对齐。 */
  7208. TOPCENTER: "TOPCENTER",
  7209. /** 右上角对齐。 */
  7210. TOPRIGHT: "TOPRIGHT",
  7211. /** 基准线左对齐。 */
  7212. BASELINELEFT: "BASELINELEFT",
  7213. /** 基准线居中对齐。 */
  7214. BASELINECENTER: "BASELINECENTER",
  7215. /** 基准线右对齐。 */
  7216. BASELINERIGHT: "BASELINERIGHT",
  7217. /** 左下角对齐。 */
  7218. BOTTOMLEFT: "BOTTOMLEFT",
  7219. /** 底部居中对齐。 */
  7220. BOTTOMCENTER: "BOTTOMCENTER",
  7221. /** 右下角对齐。 */
  7222. BOTTOMRIGHT: "BOTTOMRIGHT",
  7223. /** 左中对齐。 */
  7224. MIDDLELEFT: "MIDDLELEFT",
  7225. /** 中心对齐。 */
  7226. MIDDLECENTER: "MIDDLECENTER",
  7227. /** 右中对齐。 */
  7228. MIDDLERIGHT: "MIDDLERIGHT"
  7229. };
  7230. /**
  7231. * @enum FillGradientMode
  7232. * @description 渐变填充风格的渐变类型枚举。
  7233. * @category BaseTypes Constant
  7234. * @type {string}
  7235. * @usage
  7236. * ```
  7237. * // 浏览器
  7238. * <script type="text/javascript" src="{cdn}"></script>
  7239. * <script>
  7240. * const result = {namespace}.FillGradientMode.NONE;
  7241. *
  7242. * </script>
  7243. * // ES6 Import
  7244. * import { FillGradientMode } from '{npm}';
  7245. *
  7246. * const result = FillGradientMode.NONE;
  7247. * ```
  7248. */
  7249. var FillGradientMode = {
  7250. /** 无渐变。 */
  7251. NONE: "NONE",
  7252. /** 线性渐变填充。 */
  7253. LINEAR: "LINEAR",
  7254. /** 辐射渐变填充。 */
  7255. RADIAL: "RADIAL",
  7256. /** 圆锥渐变填充。 */
  7257. CONICAL: "CONICAL",
  7258. /** 四角渐变填充。 */
  7259. SQUARE: "SQUARE"
  7260. };
  7261. /**
  7262. * @enum AlongLineDirection
  7263. * @description 标签沿线标注方向枚举。
  7264. * @category BaseTypes Constant
  7265. * @type {string}
  7266. * @usage
  7267. * ```
  7268. * // 浏览器
  7269. * <script type="text/javascript" src="{cdn}"></script>
  7270. * <script>
  7271. * const result = {namespace}.AlongLineDirection.NORMAL;
  7272. *
  7273. * </script>
  7274. * // ES6 Import
  7275. * import { AlongLineDirection } from '{npm}';
  7276. *
  7277. * const result = AlongLineDirection.NORMAL;
  7278. * ```
  7279. */
  7280. var AlongLineDirection = {
  7281. /** 沿线的法线方向放置标签。 */
  7282. NORMAL: "ALONG_LINE_NORMAL",
  7283. /** 从下到上,从左到右放置。 */
  7284. LB_TO_RT: "LEFT_BOTTOM_TO_RIGHT_TOP",
  7285. /** 从上到下,从左到右放置。 */
  7286. LT_TO_RB: "LEFT_TOP_TO_RIGHT_BOTTOM",
  7287. /** 从下到上,从右到左放置。 */
  7288. RB_TO_LT: "RIGHT_BOTTOM_TO_LEFT_TOP",
  7289. /** 从上到下,从右到左放置。 */
  7290. RT_TO_LB: "RIGHT_TOP_TO_LEFT_BOTTOM"
  7291. };
  7292. /**
  7293. * @enum LabelBackShape
  7294. * @description 标签专题图中标签背景的形状枚举。
  7295. * @category BaseTypes Constant
  7296. * @type {string}
  7297. * @usage
  7298. * ```
  7299. * // 浏览器
  7300. * <script type="text/javascript" src="{cdn}"></script>
  7301. * <script>
  7302. * const result = {namespace}.LabelBackShape.DIAMOND;
  7303. *
  7304. * </script>
  7305. * // ES6 Import
  7306. * import { LabelBackShape } from '{npm}';
  7307. *
  7308. * const result = LabelBackShape.DIAMOND;
  7309. * ```
  7310. */
  7311. var LabelBackShape = {
  7312. /** 菱形背景,即标签背景的形状为菱形。 */
  7313. DIAMOND: "DIAMOND",
  7314. /** 椭圆形背景,即标签背景的行状为椭圆形。 */
  7315. ELLIPSE: "ELLIPSE",
  7316. /** 符号背景,即标签背景的形状为设定的符号。 */
  7317. MARKER: "MARKER",
  7318. /** 空背景,即不使用任何形状作为标签的背景。 */
  7319. NONE: "NONE",
  7320. /** 矩形背景,即标签背景的形状为矩形。 */
  7321. RECT: "RECT",
  7322. /** 圆角矩形背景,即标签背景的形状为圆角矩形。 */
  7323. ROUNDRECT: "ROUNDRECT",
  7324. /** 三角形背景,即标签背景的形状为三角形。 */
  7325. TRIANGLE: "TRIANGLE"
  7326. };
  7327. /**
  7328. * @enum LabelOverLengthMode
  7329. * @description 标签专题图中超长标签的处理模式枚举。
  7330. * @category BaseTypes Constant
  7331. * @type {string}
  7332. * @usage
  7333. * ```
  7334. * // 浏览器
  7335. * <script type="text/javascript" src="{cdn}"></script>
  7336. * <script>
  7337. * const result = {namespace}.LabelOverLengthMode.NEWLINE;
  7338. *
  7339. * </script>
  7340. * // ES6 Import
  7341. * import { LabelOverLengthMode } from '{npm}';
  7342. *
  7343. * const result = LabelOverLengthMode.NEWLINE;
  7344. * ```
  7345. */
  7346. var LabelOverLengthMode = {
  7347. /** 换行显示。 */
  7348. NEWLINE: "NEWLINE",
  7349. /** 对超长标签不进行处理。 */
  7350. NONE: "NONE",
  7351. /** 省略超出部分。 */
  7352. OMIT: "OMIT"
  7353. };
  7354. /**
  7355. * @enum DirectionType
  7356. * @description 网络分析中方向枚举。
  7357. * 在行驶引导子项中使用。
  7358. * @category BaseTypes Constant
  7359. * @type {string}
  7360. * @usage
  7361. * ```
  7362. * // 浏览器
  7363. * <script type="text/javascript" src="{cdn}"></script>
  7364. * <script>
  7365. * const result = {namespace}.DirectionType.EAST;
  7366. *
  7367. * </script>
  7368. * // ES6 Import
  7369. * import { DirectionType } from '{npm}';
  7370. *
  7371. * const result = DirectionType.EAST;
  7372. * ```
  7373. */
  7374. var DirectionType = {
  7375. /** 东。 */
  7376. EAST: "EAST",
  7377. /** 无方向。 */
  7378. NONE: "NONE",
  7379. /** 北。 */
  7380. NORTH: "NORTH",
  7381. /** 南。 */
  7382. SOURTH: "SOURTH",
  7383. /** 西。 */
  7384. WEST: "WEST"
  7385. };
  7386. /**
  7387. * @enum SideType
  7388. * @description 行驶位置枚举。
  7389. * 表示在行驶在路的左边、右边或者路上的枚举,该类用在行驶导引子项类中。
  7390. * @category BaseTypes Constant
  7391. * @type {string}
  7392. * @usage
  7393. * ```
  7394. * // 浏览器
  7395. * <script type="text/javascript" src="{cdn}"></script>
  7396. * <script>
  7397. * const result = {namespace}.SideType.LEFT;
  7398. *
  7399. * </script>
  7400. * // ES6 Import
  7401. * import { SideType } from '{npm}';
  7402. *
  7403. * const result = SideType.LEFT;
  7404. * ```
  7405. */
  7406. var SideType = {
  7407. /** 路的左侧。 */
  7408. LEFT: "LEFT",
  7409. /** 在路上(即路的中间)。 */
  7410. MIDDLE: "MIDDLE",
  7411. /** 无效值。 */
  7412. NONE: "NONE",
  7413. /** 路的右侧。 */
  7414. RIGHT: "RIGHT"
  7415. };
  7416. /**
  7417. * @enum SupplyCenterType
  7418. * @description 资源供给中心类型枚举。
  7419. * 该枚举定义了网络分析中资源中心点的类型,主要用于资源分配和选址分区。
  7420. * 资源供给中心点的类型包括非中心,固定中心和可选中心。固定中心用于资源分配分析;固定中心和可选中心用于选址分析;非中心在两种网络分析时都不予考虑。
  7421. * @category BaseTypes Constant
  7422. * @type {string}
  7423. * @usage
  7424. * ```
  7425. * // 浏览器
  7426. * <script type="text/javascript" src="{cdn}"></script>
  7427. * <script>
  7428. * const result = {namespace}.SupplyCenterType.FIXEDCENTER;
  7429. *
  7430. * </script>
  7431. * // ES6 Import
  7432. * import { SupplyCenterType } from '{npm}';
  7433. *
  7434. * const result = SupplyCenterType.FIXEDCENTER;
  7435. * ```
  7436. */
  7437. var SupplyCenterType = {
  7438. /** 固定中心点。 */
  7439. FIXEDCENTER: "FIXEDCENTER",
  7440. /** 非中心点。 */
  7441. NULL: "NULL",
  7442. /** 可选中心点。 */
  7443. OPTIONALCENTER: "OPTIONALCENTER"
  7444. };
  7445. /**
  7446. * @enum TurnType
  7447. * @description 转弯方向枚举。
  7448. * 用在行驶引导子项类中,表示转弯的方向。
  7449. * @category BaseTypes Constant
  7450. * @type {string}
  7451. * @usage
  7452. * ```
  7453. * // 浏览器
  7454. * <script type="text/javascript" src="{cdn}"></script>
  7455. * <script>
  7456. * const result = {namespace}.TurnType.AHEAD;
  7457. *
  7458. * </script>
  7459. * // ES6 Import
  7460. * import { TurnType } from '{npm}';
  7461. *
  7462. * const result = TurnType.AHEAD;
  7463. * ```
  7464. */
  7465. var TurnType = {
  7466. /** 向前直行。 */
  7467. AHEAD: "AHEAD",
  7468. /** 掉头。 */
  7469. BACK: "BACK",
  7470. /** 终点,不拐弯。 */
  7471. END: "END",
  7472. /** 左转弯。 */
  7473. LEFT: "LEFT",
  7474. /** 无效值。 */
  7475. NONE: "NONE",
  7476. /** 右转弯。 */
  7477. RIGHT: "RIGHT"
  7478. };
  7479. /**
  7480. * @enum BufferEndType
  7481. * @description 缓冲区分析BufferEnd类型。
  7482. * @category BaseTypes Constant
  7483. * @type {string}
  7484. * @usage
  7485. * ```
  7486. * // 浏览器
  7487. * <script type="text/javascript" src="{cdn}"></script>
  7488. * <script>
  7489. * const result = {namespace}.BufferEndType.FLAT;
  7490. *
  7491. * </script>
  7492. * // ES6 Import
  7493. * import { BufferEndType } from '{npm}';
  7494. *
  7495. * const result = BufferEndType.FLAT;
  7496. * ```
  7497. */
  7498. var BufferEndType = {
  7499. /** 平头缓冲。 */
  7500. FLAT: "FLAT",
  7501. /** 圆头缓冲。 */
  7502. ROUND: "ROUND"
  7503. };
  7504. /**
  7505. * @enum OverlayOperationType
  7506. * @description 叠加分析类型枚举。
  7507. * @category BaseTypes Constant
  7508. * @type {string}
  7509. * @usage
  7510. * ```
  7511. * // 浏览器
  7512. * <script type="text/javascript" src="{cdn}"></script>
  7513. * <script>
  7514. * const result = {namespace}.OverlayOperationType.CLIP;
  7515. *
  7516. * </script>
  7517. * // ES6 Import
  7518. * import { OverlayOperationType } from '{npm}';
  7519. *
  7520. * const result = OverlayOperationType.CLIP;
  7521. * ```
  7522. */
  7523. var OverlayOperationType = {
  7524. /** 操作数据集(几何对象)裁剪被操作数据集(几何对象)。 */
  7525. CLIP: "CLIP",
  7526. /** 在被操作数据集(几何对象)上擦除掉与操作数据集(几何对象)相重合的部分。 */
  7527. ERASE: "ERASE",
  7528. /**对被操作数据集(几何对象)进行同一操作,即操作执行后,被操作数据集(几何对象)包含来自操作数据集(几何对象)的几何形状。 */
  7529. IDENTITY: "IDENTITY",
  7530. /** 对两个数据集(几何对象)求交,返回两个数据集(几何对象)的交集。 */
  7531. INTERSECT: "INTERSECT",
  7532. /** 对两个面数据集(几何对象)进行合并操作。 */
  7533. UNION: "UNION",
  7534. /** 对两个面数据集(几何对象)进行更新操作。 */
  7535. UPDATE: "UPDATE",
  7536. /** 对两个面数据集(几何对象)进行对称差操作。 */
  7537. XOR: "XOR"
  7538. };
  7539. /**
  7540. * @enum OutputType
  7541. * @description 分布式分析输出类型枚举。
  7542. * @category BaseTypes Constant
  7543. * @type {string}
  7544. * @usage
  7545. * ```
  7546. * // 浏览器
  7547. * <script type="text/javascript" src="{cdn}"></script>
  7548. * <script>
  7549. * const result = {namespace}.OutputType.INDEXEDHDFS;
  7550. *
  7551. * </script>
  7552. * // ES6 Import
  7553. * import { OutputType } from '{npm}';
  7554. *
  7555. * const result = OutputType.INDEXEDHDFS;
  7556. * ```
  7557. */
  7558. var OutputType = {
  7559. /** INDEXEDHDFS */
  7560. INDEXEDHDFS: "INDEXEDHDFS",
  7561. /** UDB */
  7562. UDB: "UDB",
  7563. /** MONGODB */
  7564. MONGODB: "MONGODB",
  7565. /** PG */
  7566. PG: "PG"
  7567. };
  7568. /**
  7569. * @enum SmoothMethod
  7570. * @description 光滑方法枚举。
  7571. * 用于从Grid 或DEM数据生成等值线或等值面时对等值线或者等值面的边界线进行平滑处理的方法。
  7572. * @category BaseTypes Constant
  7573. * @type {string}
  7574. * @usage
  7575. * ```
  7576. * // 浏览器
  7577. * <script type="text/javascript" src="{cdn}"></script>
  7578. * <script>
  7579. * const result = {namespace}.SmoothMethod.BSPLINE;
  7580. *
  7581. * </script>
  7582. * // ES6 Import
  7583. * import { SmoothMethod } from '{npm}';
  7584. *
  7585. * const result = SmoothMethod.BSPLINE;
  7586. * ```
  7587. */
  7588. var SmoothMethod = {
  7589. /** B 样条法。 */
  7590. BSPLINE: "BSPLINE",
  7591. /** 磨角法。 */
  7592. POLISH: "POLISH"
  7593. };
  7594. /**
  7595. * @enum SurfaceAnalystMethod
  7596. * @description 表面分析方法枚举。
  7597. * 通过对数据进行表面分析,能够挖掘原始数据所包含的信息,使某些细节明显化,易于分析。
  7598. * @category BaseTypes Constant
  7599. * @type {string}
  7600. * @usage
  7601. * ```
  7602. * // 浏览器
  7603. * <script type="text/javascript" src="{cdn}"></script>
  7604. * <script>
  7605. * const result = {namespace}.SurfaceAnalystMethod.ISOLINE;
  7606. *
  7607. * </script>
  7608. * // ES6 Import
  7609. * import { SurfaceAnalystMethod } from '{npm}';
  7610. *
  7611. * const result = SurfaceAnalystMethod.ISOLINE;
  7612. * ```
  7613. */
  7614. var SurfaceAnalystMethod = {
  7615. /** 等值线提取。 */
  7616. ISOLINE: "ISOLINE",
  7617. /** 等值面提取。 */
  7618. ISOREGION: "ISOREGION"
  7619. };
  7620. /**
  7621. * @enum DataReturnMode
  7622. * @description 数据返回模式枚举。
  7623. * 该枚举用于指定空间分析返回结果模式,包含返回数据集标识和记录集、只返回数据集标识(数据集名称@数据源名称)及只返回记录集三种模式。
  7624. * @category BaseTypes Constant
  7625. * @type {string}
  7626. * @usage
  7627. * ```
  7628. * // 浏览器
  7629. * <script type="text/javascript" src="{cdn}"></script>
  7630. * <script>
  7631. * const result = {namespace}.DataReturnMode.DATASET_AND_RECORDSET;
  7632. *
  7633. * </script>
  7634. * // ES6 Import
  7635. * import { DataReturnMode } from '{npm}';
  7636. *
  7637. * const result = DataReturnMode.DATASET_AND_RECORDSET;
  7638. * ```
  7639. */
  7640. var DataReturnMode = {
  7641. /** 返回结果数据集标识(数据集名称@数据源名称)和记录集(RecordSet)。 */
  7642. DATASET_AND_RECORDSET: "DATASET_AND_RECORDSET",
  7643. /** 只返回数据集标识(数据集名称@数据源名称)。 */
  7644. DATASET_ONLY: "DATASET_ONLY",
  7645. /** 只返回记录集(RecordSet)。 */
  7646. RECORDSET_ONLY: "RECORDSET_ONLY"
  7647. };
  7648. /**
  7649. * @enum EditType
  7650. * @description 要素集更新模式枚举。
  7651. * 该枚举用于指定数据服务中要素集更新模式,包含添加要素集、更新要素集和删除要素集。
  7652. * @category BaseTypes Constant
  7653. * @type {string}
  7654. * @usage
  7655. * ```
  7656. * // 浏览器
  7657. * <script type="text/javascript" src="{cdn}"></script>
  7658. * <script>
  7659. * const result = {namespace}.EditType.ADD;
  7660. *
  7661. * </script>
  7662. * // ES6 Import
  7663. * import { EditType } from '{npm}';
  7664. *
  7665. * const result = {namespace}.EditType.ADD;
  7666. * ```
  7667. */
  7668. var EditType = {
  7669. /** 增加操作。 */
  7670. ADD: "add",
  7671. /** 修改操作。 */
  7672. UPDATE: "update",
  7673. /** 删除操作。 */
  7674. DELETE: "delete"
  7675. };
  7676. /**
  7677. * @enum TransferTactic
  7678. * @description 公交换乘策略枚举。
  7679. * 该枚举用于指定公交服务中要素集更新模式,包含添加要素集、更新要素集和删除要素集。
  7680. * @category BaseTypes Constant
  7681. * @type {string}
  7682. * @usage
  7683. * ```
  7684. * // 浏览器
  7685. * <script type="text/javascript" src="{cdn}"></script>
  7686. * <script>
  7687. * const result = {namespace}.TransferTactic.LESS_TIME;
  7688. *
  7689. * </script>
  7690. * // ES6 Import
  7691. * import { TransferTactic } from '{npm}';
  7692. *
  7693. * const result = TransferTactic.LESS_TIME;
  7694. * ```
  7695. */
  7696. var TransferTactic = {
  7697. /** 时间短。 */
  7698. LESS_TIME: "LESS_TIME",
  7699. /** 少换乘。 */
  7700. LESS_TRANSFER: "LESS_TRANSFER",
  7701. /** 少步行。 */
  7702. LESS_WALK: "LESS_WALK",
  7703. /** 距离最短。 */
  7704. MIN_DISTANCE: "MIN_DISTANCE"
  7705. };
  7706. /**
  7707. * @enum TransferPreference
  7708. * @description 公交换乘策略枚举。
  7709. * 该枚举用于指定交通换乘服务中设置地铁优先、公交优先、不乘地铁、无偏好等偏好设置。
  7710. * @category BaseTypes Constant
  7711. * @type {string}
  7712. * @usage
  7713. * ```
  7714. * // 浏览器
  7715. * <script type="text/javascript" src="{cdn}"></script>
  7716. * <script>
  7717. * const result = {namespace}.TransferPreference.BUS;
  7718. *
  7719. * </script>
  7720. * // ES6 Import
  7721. * import { TransferPreference } from '{npm}';
  7722. *
  7723. * const result = TransferPreference.BUS;
  7724. * ```
  7725. */
  7726. var TransferPreference = {
  7727. /** 公交汽车优先。 */
  7728. BUS: "BUS",
  7729. /** 地铁优先。 */
  7730. SUBWAY: "SUBWAY",
  7731. /** 不乘坐地铁。 */
  7732. NO_SUBWAY: "NO_SUBWAY",
  7733. /** 无乘车偏好。 */
  7734. NONE: "NONE"
  7735. };
  7736. /**
  7737. * @enum GridType
  7738. * @description 地图背景格网类型枚举。
  7739. * @category BaseTypes Constant
  7740. * @type {string}
  7741. * @usage
  7742. * ```
  7743. * // 浏览器
  7744. * <script type="text/javascript" src="{cdn}"></script>
  7745. * <script>
  7746. * const result = {namespace}.GridType.CROSS;
  7747. *
  7748. * </script>
  7749. * // ES6 Import
  7750. * import { GridType } from '{npm}';
  7751. *
  7752. * const result = GridType.CROSS;
  7753. * ```
  7754. */
  7755. var GridType = {
  7756. /** 十字叉丝。 */
  7757. CROSS: "CROSS",
  7758. /** 网格线。 */
  7759. GRID: "GRID",
  7760. /** 点。 */
  7761. POINT: "POINT"
  7762. };
  7763. /**
  7764. * @enum ColorSpaceType
  7765. * @description 色彩空间枚举。
  7766. * 由于成色原理的不同,决定了显示器、投影仪这类靠色光直接合成颜色的颜色设备和打印机、
  7767. * 印刷机这类靠使用颜料的印刷设备在生成颜色方式上的区别。
  7768. * 针对上述不同成色方式,SuperMap 提供两种色彩空间,
  7769. * 分别为 RGB 和 CMYK。RGB 主要用于显示系统中,CMYK 主要用于印刷系统中。
  7770. * @category BaseTypes Constant
  7771. * @type {string}
  7772. * @usage
  7773. * ```
  7774. * // 浏览器
  7775. * <script type="text/javascript" src="{cdn}"></script>
  7776. * <script>
  7777. * const result = {namespace}.ColorSpaceType.CMYK;
  7778. *
  7779. * </script>
  7780. * // ES6 Import
  7781. * import { ColorSpaceType } from '{npm}';
  7782. *
  7783. * const result = ColorSpaceType.CMYK;
  7784. * ```
  7785. */
  7786. var ColorSpaceType = {
  7787. /** 该类型主要在印刷系统使用。 */
  7788. CMYK: "CMYK",
  7789. /** 该类型主要在显示系统中使用。 */
  7790. RGB: "RGB"
  7791. };
  7792. /**
  7793. * @enum LayerType
  7794. * @description 图层类型。
  7795. * @category BaseTypes Constant
  7796. * @type {string}
  7797. * @usage
  7798. * ```
  7799. * // 浏览器
  7800. * <script type="text/javascript" src="{cdn}"></script>
  7801. * <script>
  7802. * const result = {namespace}.LayerType.UGC;
  7803. *
  7804. * </script>
  7805. * // ES6 Import
  7806. * import { LayerType } from '{npm}';
  7807. *
  7808. * const result = LayerType.UGC;
  7809. * ```
  7810. */
  7811. var LayerType = {
  7812. /** SuperMap UGC 类型图层。如矢量图层、栅格(Grid)图层、影像图层。 */
  7813. UGC: "UGC",
  7814. /** WMS 图层。 */
  7815. WMS: "WMS",
  7816. /** WFS 图层。 */
  7817. WFS: "WFS",
  7818. /** 自定义图层。 */
  7819. CUSTOM: "CUSTOM"
  7820. };
  7821. /**
  7822. * @enum UGCLayerType
  7823. * @description SuperMap 图层类型。
  7824. * @category BaseTypes Constant
  7825. * @type {string}
  7826. * @usage
  7827. * ```
  7828. * // 浏览器
  7829. * <script type="text/javascript" src="{cdn}"></script>
  7830. * <script>
  7831. * const result = {namespace}.UGCLayerType.THEME;
  7832. *
  7833. * </script>
  7834. * // ES6 Import
  7835. * import { UGCLayerType } from '{npm}';
  7836. *
  7837. * const result = UGCLayerType.THEME;
  7838. * ```
  7839. */
  7840. var UGCLayerType = {
  7841. /** 专题图层。 */
  7842. THEME: "THEME",
  7843. /** 矢量图层。 */
  7844. VECTOR: "VECTOR",
  7845. /** 栅格图层。 */
  7846. GRID: "GRID",
  7847. /** 影像图层。 */
  7848. IMAGE: "IMAGE"
  7849. };
  7850. /**
  7851. * @enum StatisticMode
  7852. * @description 字段统计方法类型。
  7853. * @category BaseTypes Constant
  7854. * @type {string}
  7855. * @usage
  7856. * ```
  7857. * // 浏览器
  7858. * <script type="text/javascript" src="{cdn}"></script>
  7859. * <script>
  7860. * const result = {namespace}.StatisticMode.AVERAGE;
  7861. *
  7862. * </script>
  7863. * // ES6 Import
  7864. * import { StatisticMode } from '{npm}';
  7865. *
  7866. * const result = StatisticMode.AVERAGE;
  7867. * ```
  7868. */
  7869. var StatisticMode = {
  7870. /** 统计所选字段的平均值。 */
  7871. AVERAGE: "AVERAGE",
  7872. /** 统计所选字段的最大值。 */
  7873. MAX: "MAX",
  7874. /** 统计所选字段的最小值。 */
  7875. MIN: "MIN",
  7876. /** 统计所选字段的标准差 */
  7877. STDDEVIATION: "STDDEVIATION",
  7878. /** 统计所选字段的总和。 */
  7879. SUM: "SUM",
  7880. /** 统计所选字段的方差。 */
  7881. VARIANCE: "VARIANCE"
  7882. };
  7883. /**
  7884. * @enum PixelFormat
  7885. * @description 栅格与影像数据存储的像素格式枚举。
  7886. * @category BaseTypes Constant
  7887. * @type {string}
  7888. * @usage
  7889. * ```
  7890. * // 浏览器
  7891. * <script type="text/javascript" src="{cdn}"></script>
  7892. * <script>
  7893. * const result = {namespace}.PixelFormat.BIT16;
  7894. *
  7895. * </script>
  7896. * // ES6 Import
  7897. * import { PixelFormat } from '{npm}';
  7898. *
  7899. * const result = PixelFormat.BIT16;
  7900. * ```
  7901. */
  7902. var PixelFormat = {
  7903. /** 每个像元用16个比特(即2个字节)表示。 */
  7904. BIT16: "BIT16",
  7905. /** 每个像元用32个比特(即4个字节)表示。 */
  7906. BIT32: "BIT32",
  7907. /** 每个像元用64个比特(即8个字节)表示,只提供给栅格数据集使用。 */
  7908. BIT64: "BIT64",
  7909. /** 每个像元用4个字节来表示,只提供给栅格数据集使用。 */
  7910. SINGLE: "SINGLE",
  7911. /** 每个像元用8个字节来表示,只提供给栅格数据集使用。 */
  7912. DOUBLE: "DOUBLE",
  7913. /** 每个像元用1个比特表示。 */
  7914. UBIT1: "UBIT1",
  7915. /** 每个像元用4个比特来表示。 */
  7916. UBIT4: "UBIT4",
  7917. /** 每个像元用8个比特(即1个字节)来表示。 */
  7918. UBIT8: "UBIT8",
  7919. /** 每个像元用24个比特(即3个字节)来表示。 */
  7920. UBIT24: "UBIT24",
  7921. /** 每个像元用32个比特(即4个字节)来表示。 */
  7922. UBIT32: "UBIT32"
  7923. };
  7924. /**
  7925. * @enum SearchMode
  7926. * @description 内插时使用的样本点的查找方式枚举。
  7927. * @category BaseTypes Constant
  7928. * @type {string}
  7929. * @usage
  7930. * ```
  7931. * // 浏览器
  7932. * <script type="text/javascript" src="{cdn}"></script>
  7933. * <script>
  7934. * const result = {namespace}.SearchMode.KDTREE_FIXED_COUNT;
  7935. *
  7936. * </script>
  7937. * // ES6 Import
  7938. * import { SearchMode } from '{npm}';
  7939. *
  7940. * const result = SearchMode.KDTREE_FIXED_COUNT;
  7941. * ```
  7942. */
  7943. var SearchMode = {
  7944. /** 使用 KDTREE 的固定点数方式查找参与内插分析的点。 */
  7945. KDTREE_FIXED_COUNT: "KDTREE_FIXED_COUNT",
  7946. /** 使用 KDTREE 的定长方式查找参与内插分析的点。 */
  7947. KDTREE_FIXED_RADIUS: "KDTREE_FIXED_RADIUS",
  7948. /** 不进行查找,使用所有的输入点进行内插分析。 */
  7949. NONE: "NONE",
  7950. /** 使用 QUADTREE 方式查找参与内插分析的点,仅对样条(RBF)插值和普通克吕金(Kriging)有用。 */
  7951. QUADTREE: "QUADTREE"
  7952. };
  7953. /**
  7954. * @enum InterpolationAlgorithmType
  7955. * @description 插值分析的算法的类型。
  7956. * @category BaseTypes Constant
  7957. * @type {string}
  7958. * @usage
  7959. * ```
  7960. * // 浏览器
  7961. * <script type="text/javascript" src="{cdn}"></script>
  7962. * <script>
  7963. * const result = {namespace}.InterpolationAlgorithmType.KRIGING;
  7964. *
  7965. * </script>
  7966. * // ES6 Import
  7967. * import { InterpolationAlgorithmType } from '{npm}';
  7968. *
  7969. * const result = InterpolationAlgorithmType.KRIGING;
  7970. * ```
  7971. */
  7972. var InterpolationAlgorithmType = {
  7973. /** 普通克吕金插值法。 */
  7974. KRIGING: "KRIGING",
  7975. /** 简单克吕金插值法。 */
  7976. SimpleKriging: "SimpleKriging",
  7977. /** 泛克吕金插值法。 */
  7978. UniversalKriging: "UniversalKriging"
  7979. };
  7980. /**
  7981. * @enum VariogramMode
  7982. * @description 克吕金(Kriging)插值时的半变函数类型枚举。
  7983. * @category BaseTypes Constant
  7984. * @type {string}
  7985. * @usage
  7986. * ```
  7987. * // 浏览器
  7988. * <script type="text/javascript" src="{cdn}"></script>
  7989. * <script>
  7990. * const result = {namespace}.VariogramMode.EXPONENTIAL;
  7991. *
  7992. * </script>
  7993. * // ES6 Import
  7994. * import { VariogramMode } from '{npm}';
  7995. *
  7996. * const result = VariogramMode.EXPONENTIAL;
  7997. * ```
  7998. */
  7999. var VariogramMode = {
  8000. /** 指数函数。 */
  8001. EXPONENTIAL: "EXPONENTIAL",
  8002. /** 高斯函数。 */
  8003. GAUSSIAN: "GAUSSIAN",
  8004. /** 球型函数。 */
  8005. SPHERICAL: "SPHERICAL"
  8006. };
  8007. /**
  8008. * @enum Exponent
  8009. * @description 定义了泛克吕金(UniversalKriging)插值时样点数据中趋势面方程的阶数。
  8010. * @category BaseTypes Constant
  8011. * @type {string}
  8012. * @usage
  8013. * ```
  8014. * // 浏览器
  8015. * <script type="text/javascript" src="{cdn}"></script>
  8016. * <script>
  8017. * const result = {namespace}.Exponent.EXP1;
  8018. *
  8019. * </script>
  8020. * // ES6 Import
  8021. * import { Exponent } from '{npm}';
  8022. *
  8023. * const result = Exponent.EXP1;
  8024. * ```
  8025. */
  8026. var Exponent = {
  8027. /** 阶数为1。 */
  8028. EXP1: "EXP1",
  8029. /** 阶数为2。 */
  8030. EXP2: "EXP2"
  8031. };
  8032. /**
  8033. * @enum ClientType
  8034. * @description token申请的客户端标识类型。
  8035. * @category BaseTypes Constant
  8036. * @type {string}
  8037. * @usage
  8038. * ```
  8039. * // 浏览器
  8040. * <script type="text/javascript" src="{cdn}"></script>
  8041. * <script>
  8042. * const result = {namespace}.ClientType.IP;
  8043. *
  8044. * </script>
  8045. * // ES6 Import
  8046. * import { ClientType } from '{npm}';
  8047. *
  8048. * const result = ClientType.IP;
  8049. * ```
  8050. */
  8051. var ClientType = {
  8052. /** 指定的 IP 地址。 */
  8053. IP: "IP",
  8054. /** 指定的 URL。 */
  8055. REFERER: "Referer",
  8056. /** 发送申请令牌请求的客户端 IP。 */
  8057. REQUESTIP: "RequestIP",
  8058. /** 不做任何验证。 */
  8059. NONE: "NONE",
  8060. /** SERVER。 */
  8061. SERVER: "SERVER",
  8062. /** WEB。 */
  8063. WEB: "WEB"
  8064. };
  8065. /**
  8066. * @enum ChartType
  8067. * @description 客户端专题图图表类型。
  8068. * @category BaseTypes Constant
  8069. * @type {string}
  8070. * @usage
  8071. * ```
  8072. * // 浏览器
  8073. * <script type="text/javascript" src="{cdn}"></script>
  8074. * <script>
  8075. * const result = {namespace}.ChartType.BAR;
  8076. *
  8077. * </script>
  8078. * // ES6 Import
  8079. * import { ChartType } from '{npm}';
  8080. *
  8081. * const result = ChartType.BAR;
  8082. * ```
  8083. */
  8084. var ChartType = {
  8085. /** 柱状图。 */
  8086. BAR: "Bar",
  8087. /** 三维柱状图。 */
  8088. BAR3D: "Bar3D",
  8089. /** 圆形图。 */
  8090. CIRCLE: "Circle",
  8091. /** 饼图。 */
  8092. PIE: "Pie",
  8093. /** 散点图。 */
  8094. POINT: "Point",
  8095. /** 折线图。 */
  8096. LINE: "Line",
  8097. /** 环状图。 */
  8098. RING: "Ring"
  8099. };
  8100. /**
  8101. * @enum ClipAnalystMode
  8102. * @description 裁剪分析模式
  8103. * @category BaseTypes Constant
  8104. * @type {string}
  8105. * @usage
  8106. * ```
  8107. * // 浏览器
  8108. * <script type="text/javascript" src="{cdn}"></script>
  8109. * <script>
  8110. * const result = {namespace}.ClipAnalystMode.CLIP;
  8111. *
  8112. * </script>
  8113. * // ES6 Import
  8114. * import { ClipAnalystMode } from '{npm}';
  8115. *
  8116. * const result = ClipAnalystMode.CLIP;
  8117. * ```
  8118. */
  8119. var ClipAnalystMode = {
  8120. /** CLIP。 */
  8121. CLIP: "clip",
  8122. /** INTERSECT。 */
  8123. INTERSECT: "intersect"
  8124. };
  8125. /**
  8126. * @enum AnalystAreaUnit
  8127. * @description 分布式分析面积单位。
  8128. * @category BaseTypes Constant
  8129. * @type {string}
  8130. * @usage
  8131. * ```
  8132. * // 浏览器
  8133. * <script type="text/javascript" src="{cdn}"></script>
  8134. * <script>
  8135. * const result = {namespace}.AnalystAreaUnit.SQUAREMETER;
  8136. *
  8137. * </script>
  8138. * // ES6 Import
  8139. * import { AnalystAreaUnit } from '{npm}';
  8140. *
  8141. * const result = AnalystAreaUnit.SQUAREMETER;
  8142. * ```
  8143. */
  8144. var AnalystAreaUnit = {
  8145. /** 平方米。 */
  8146. "SQUAREMETER": "SquareMeter",
  8147. /** 平方千米。 */
  8148. "SQUAREKILOMETER": "SquareKiloMeter",
  8149. /** 公顷。 */
  8150. "HECTARE": "Hectare",
  8151. /** 公亩。 */
  8152. "ARE": "Are",
  8153. /** 英亩。 */
  8154. "ACRE": "Acre",
  8155. /** 平方英尺。 */
  8156. "SQUAREFOOT": "SquareFoot",
  8157. /** 平方码。 */
  8158. "SQUAREYARD": "SquareYard",
  8159. /** 平方英里。 */
  8160. "SQUAREMILE": "SquareMile"
  8161. };
  8162. /**
  8163. * @enum AnalystSizeUnit
  8164. * @description 分布式分析单位。
  8165. * @category BaseTypes Constant
  8166. * @type {string}
  8167. * @usage
  8168. * ```
  8169. * // 浏览器
  8170. * <script type="text/javascript" src="{cdn}"></script>
  8171. * <script>
  8172. * const result = {namespace}.AnalystSizeUnit.METER;
  8173. *
  8174. * </script>
  8175. * // ES6 Import
  8176. * import { AnalystSizeUnit } from '{npm}';
  8177. *
  8178. * const result = AnalystSizeUnit.METER;
  8179. * ```
  8180. */
  8181. var AnalystSizeUnit = {
  8182. /** 米。 */
  8183. "METER": "Meter",
  8184. /** 千米。 */
  8185. "KILOMETER": "Kilometer",
  8186. /** 码。 */
  8187. "YARD": "Yard",
  8188. /** 英尺。 */
  8189. "FOOT": "Foot",
  8190. /** 英里。 */
  8191. "MILE": "Mile"
  8192. };
  8193. /**
  8194. * @enum StatisticAnalystMode
  8195. * @description 分布式分析统计模式。
  8196. * @category BaseTypes Constant
  8197. * @type {string}
  8198. * @usage
  8199. * ```
  8200. * // 浏览器
  8201. * <script type="text/javascript" src="{cdn}"></script>
  8202. * <script>
  8203. * const result = {namespace}.StatisticAnalystMode.MAX;
  8204. *
  8205. * </script>
  8206. * // ES6 Import
  8207. * import { StatisticAnalystMode } from '{npm}';
  8208. *
  8209. * const result = StatisticAnalystMode.MAX;
  8210. * ```
  8211. */
  8212. var StatisticAnalystMode = {
  8213. /** 统计所选字段的最大值。 */
  8214. "MAX": "max",
  8215. /** 统计所选字段的最小值。 */
  8216. "MIN": "min",
  8217. /** 统计所选字段的平均值。 */
  8218. "AVERAGE": "average",
  8219. /** 统计所选字段的总和。 */
  8220. "SUM": "sum",
  8221. /** 统计所选字段的方差。 */
  8222. "VARIANCE": "variance",
  8223. /** 统计所选字段的标准差。 */
  8224. "STDDEVIATION": "stdDeviation"
  8225. };
  8226. /**
  8227. * @enum SummaryType
  8228. * @description 分布式分析聚合类型。
  8229. * @category BaseTypes Constant
  8230. * @type {string}
  8231. * @usage
  8232. * ```
  8233. * // 浏览器
  8234. * <script type="text/javascript" src="{cdn}"></script>
  8235. * <script>
  8236. * const result = {namespace}.SummaryType.SUMMARYMESH;
  8237. *
  8238. * </script>
  8239. * // ES6 Import
  8240. * import { SummaryType } from '{npm}';
  8241. *
  8242. * const result = SummaryType.SUMMARYMESH;
  8243. * ```
  8244. */
  8245. var SummaryType = {
  8246. /** 格网聚合。 */
  8247. "SUMMARYMESH": "SUMMARYMESH",
  8248. /** 多边形聚合。 */
  8249. "SUMMARYREGION": "SUMMARYREGION"
  8250. };
  8251. /**
  8252. * @enum TopologyValidatorRule
  8253. * @description 拓扑检查模式枚举。该类定义了拓扑检查操作模式常量。
  8254. * @category BaseTypes Constant
  8255. * @type {string}
  8256. * @usage
  8257. * ```
  8258. * // 浏览器
  8259. * <script type="text/javascript" src="{cdn}"></script>
  8260. * <script>
  8261. * const result = {namespace}.TopologyValidatorRule.REGIONNOOVERLAP;
  8262. *
  8263. * </script>
  8264. * // ES6 Import
  8265. * import { TopologyValidatorRule } from '{npm}';
  8266. *
  8267. * const result = TopologyValidatorRule.REGIONNOOVERLAP;
  8268. * ```
  8269. */
  8270. var TopologyValidatorRule = {
  8271. /** 面内无重叠,用于对面数据进行拓扑检查。 */
  8272. REGIONNOOVERLAP: "REGIONNOOVERLAP",
  8273. /** 面与面无重叠,用于对面数据进行拓扑检查。 */
  8274. REGIONNOOVERLAPWITH: "REGIONNOOVERLAPWITH",
  8275. /** 面被面包含,用于对面数据进行拓扑检查。 */
  8276. REGIONCONTAINEDBYREGION: "REGIONCONTAINEDBYREGION",
  8277. /** 面被面覆盖,用于对面数据进行拓扑检查。 */
  8278. REGIONCOVEREDBYREGION: "REGIONCOVEREDBYREGION",
  8279. /** 线与线无重叠,用于对线数据进行拓扑检查。 */
  8280. LINENOOVERLAP: "LINENOOVERLAP",
  8281. /** 线内无重叠,用于对线数据进行拓扑检查。 */
  8282. LINENOOVERLAPWITH: "LINENOOVERLAPWITH",
  8283. /** 点不相同,用于对点数据进行拓扑检查。 */
  8284. POINTNOIDENTICAL: "POINTNOIDENTICAL"
  8285. };
  8286. /**
  8287. * @enum BucketAggType
  8288. * @description 格网聚合查询枚举类,该类定义了Elasticsearch数据服务中聚合查询模式常量
  8289. * @category BaseTypes Constant
  8290. * @type {string}
  8291. * @usage
  8292. * ```
  8293. * // 浏览器
  8294. * <script type="text/javascript" src="{cdn}"></script>
  8295. * <script>
  8296. * const result = {namespace}.BucketAggType.GEOHASH_GRID;
  8297. *
  8298. * </script>
  8299. * // ES6 Import
  8300. * import { BucketAggType } from '{npm}';
  8301. *
  8302. * const result = BucketAggType.GEOHASH_GRID;
  8303. * ```
  8304. */
  8305. var BucketAggType = {
  8306. /** 格网聚合类型。 */
  8307. GEOHASH_GRID: "geohash_grid"
  8308. };
  8309. /**
  8310. * @enum MetricsAggType
  8311. * @description 指标聚合类型枚举类,该类定义了Elasticsearch数据服务中聚合查询模式常量。
  8312. * @category BaseTypes Constant
  8313. * @type {string}
  8314. * @usage
  8315. * ```
  8316. * // 浏览器
  8317. * <script type="text/javascript" src="{cdn}"></script>
  8318. * <script>
  8319. * const result = {namespace}.MetricsAggType.AVG;
  8320. *
  8321. * </script>
  8322. * // ES6 Import
  8323. * import { MetricsAggType } from '{npm}';
  8324. *
  8325. * const result = MetricsAggType.AVG;
  8326. * ```
  8327. */
  8328. var MetricsAggType = {
  8329. /** 平均值聚合类型。 */
  8330. AVG: 'avg',
  8331. /** 最大值聚合类型。 */
  8332. MAX: 'max',
  8333. /** 最小值聚合类型。 */
  8334. MIN: 'min',
  8335. /** 求和聚合类型。 */
  8336. SUM: 'sum'
  8337. };
  8338. /**
  8339. * @enum GetFeatureMode
  8340. * @description feature 查询方式。
  8341. * @category BaseTypes Constant
  8342. * @type {string}
  8343. * @usage
  8344. * ```
  8345. * // 浏览器
  8346. * <script type="text/javascript" src="{cdn}"></script>
  8347. * <script>
  8348. * const result = {namespace}.GetFeatureMode.BOUNDS;
  8349. *
  8350. * </script>
  8351. * // ES6 Import
  8352. * import { GetFeatureMode } from '{npm}';
  8353. *
  8354. * const result = GetFeatureMode.BOUNDS;
  8355. * ```
  8356. */
  8357. var GetFeatureMode = {
  8358. /** 通过范围查询来获取要素。 */
  8359. BOUNDS: "BOUNDS",
  8360. /** 通过几何对象的缓冲区来获取要素。 */
  8361. BUFFER: "BUFFER",
  8362. /** 通过 ID 来获取要素。 */
  8363. ID: "ID",
  8364. /** 通过空间查询模式来获取要素。 */
  8365. SPATIAL: "SPATIAL",
  8366. /** 通过 SQL 查询来获取要素。 */
  8367. SQL: 'SQL'
  8368. };
  8369. /**
  8370. * @enum RasterFunctionType
  8371. * @description 栅格分析方法。
  8372. * @category BaseTypes Constant
  8373. * @type {string}
  8374. * @usage
  8375. * ```
  8376. * // 浏览器
  8377. * <script type="text/javascript" src="{cdn}"></script>
  8378. * <script>
  8379. * const result = {namespace}.GetFeatureMode.NDVI;
  8380. *
  8381. * </script>
  8382. * // ES6 Import
  8383. * import { GetFeatureMode } from '{npm}';
  8384. *
  8385. * const result = GetFeatureMode.NDVI;
  8386. * ```
  8387. */
  8388. var RasterFunctionType = {
  8389. /** 归一化植被指数。 */
  8390. NDVI: "NDVI",
  8391. /** 阴影面分析。 */
  8392. HILLSHADE: "HILLSHADE"
  8393. };
  8394. /**
  8395. * @enum ResourceType
  8396. * @description iportal资源类型。
  8397. * @category BaseTypes Constant
  8398. * @version 10.0.1
  8399. * @type {string}
  8400. * @usage
  8401. * ```
  8402. * // 浏览器
  8403. * <script type="text/javascript" src="{cdn}"></script>
  8404. * <script>
  8405. * const result = {namespace}.GetFeatureMode.MAP;
  8406. *
  8407. * </script>
  8408. * // ES6 Import
  8409. * import { GetFeatureMode } from '{npm}';
  8410. *
  8411. * const result = GetFeatureMode.MAP;
  8412. * ```
  8413. */
  8414. var ResourceType = {
  8415. /** 地图。 */
  8416. MAP: "MAP",
  8417. /** 服务。 */
  8418. SERVICE: "SERVICE",
  8419. /** 场景。 */
  8420. SCENE: "SCENE",
  8421. /** 数据。 */
  8422. DATA: "DATA",
  8423. /** 洞察。 */
  8424. INSIGHTS_WORKSPACE: "INSIGHTS_WORKSPACE",
  8425. /** 大屏。 */
  8426. MAP_DASHBOARD: "MAP_DASHBOARD"
  8427. };
  8428. /**
  8429. * @enum OrderBy
  8430. * @description iportal资源排序字段。
  8431. * @category BaseTypes Constant
  8432. * @version 10.0.1
  8433. * @type {string}
  8434. * @usage
  8435. * ```
  8436. * // 浏览器
  8437. * <script type="text/javascript" src="{cdn}"></script>
  8438. * <script>
  8439. * const result = {namespace}.OrderBy.UPDATETIME;
  8440. *
  8441. * </script>
  8442. * // ES6 Import
  8443. * import { OrderBy } from '{npm}';
  8444. *
  8445. * const result = OrderBy.UPDATETIME;
  8446. * ```
  8447. */
  8448. var OrderBy = {
  8449. /** 按更新时间排序。 */
  8450. UPDATETIME: "UPDATETIME",
  8451. /** 按热度(可能是访问量、下载量)排序。 */
  8452. HEATLEVEL: "HEATLEVEL",
  8453. /** 按相关性排序。 */
  8454. RELEVANCE: "RELEVANCE"
  8455. };
  8456. /**
  8457. * @enum OrderType
  8458. * @description iportal资源升序还是降序过滤。
  8459. * @category BaseTypes Constant
  8460. * @version 10.0.1
  8461. * @type {string}
  8462. * @usage
  8463. * ```
  8464. * // 浏览器
  8465. * <script type="text/javascript" src="{cdn}"></script>
  8466. * <script>
  8467. * const result = {namespace}.OrderType.ASC;
  8468. *
  8469. * </script>
  8470. * // ES6 Import
  8471. * import { OrderType } from '{npm}';
  8472. *
  8473. * const result = OrderType.ASC;
  8474. * ```
  8475. */
  8476. var OrderType = {
  8477. /** 升序。 */
  8478. ASC: "ASC",
  8479. /** 降序。 */
  8480. DESC: "DESC"
  8481. };
  8482. /**
  8483. * @enum SearchType
  8484. * @description iportal资源查询的范围进行过滤。
  8485. * @category BaseTypes Constant
  8486. * @version 10.0.1
  8487. * @type {string}
  8488. * @usage
  8489. * ```
  8490. * // 浏览器
  8491. * <script type="text/javascript" src="{cdn}"></script>
  8492. * <script>
  8493. * const result = {namespace}.SearchType.PUBLIC;
  8494. *
  8495. * </script>
  8496. * // ES6 Import
  8497. * import { SearchType } from '{npm}';
  8498. *
  8499. * const result = SearchType.PUBLIC;
  8500. * ```
  8501. */
  8502. var SearchType = {
  8503. /** 公开资源。 */
  8504. PUBLIC: "PUBLIC",
  8505. /** 我的资源。 */
  8506. MY_RES: "MY_RES",
  8507. /** 我的群组资源。 */
  8508. MYGROUP_RES: "MYGROUP_RES",
  8509. /** 我的部门资源。 */
  8510. MYDEPARTMENT_RES: "MYDEPARTMENT_RES",
  8511. /** 分享给我的资源。 */
  8512. SHARETOME_RES: "SHARETOME_RES"
  8513. };
  8514. /**
  8515. * @enum AggregationTypes
  8516. * @description iportal资源聚合查询的类型。
  8517. * @category BaseTypes Constant
  8518. * @version 10.0.1
  8519. * @type {string}
  8520. * @usage
  8521. * ```
  8522. * // 浏览器
  8523. * <script type="text/javascript" src="{cdn}"></script>
  8524. * <script>
  8525. * const result = {namespace}.AggregationTypes.TAG;
  8526. *
  8527. * </script>
  8528. * // ES6 Import
  8529. * import { AggregationTypes } from '{npm}';
  8530. *
  8531. * const result = AggregationTypes.TAG;
  8532. * ```
  8533. */
  8534. var AggregationTypes = {
  8535. /** 标签。 */
  8536. TAG: "TAG",
  8537. /** 资源类型。 */
  8538. TYPE: "TYPE"
  8539. };
  8540. /**
  8541. * @enum PermissionType
  8542. * @description iportal资源权限类型。
  8543. * @category BaseTypes Constant
  8544. * @version 10.0.1
  8545. * @type {string}
  8546. * @usage
  8547. * ```
  8548. * // 浏览器
  8549. * <script type="text/javascript" src="{cdn}"></script>
  8550. * <script>
  8551. * const result = {namespace}.PermissionType.SEARCH;
  8552. *
  8553. * </script>
  8554. * // ES6 Import
  8555. * import { PermissionType } from '{npm}';
  8556. *
  8557. * const result = PermissionType.SEARCH;
  8558. * ```
  8559. */
  8560. var PermissionType = {
  8561. /** 可检索。 */
  8562. SEARCH: "SEARCH",
  8563. /** 可查看。 */
  8564. READ: "READ",
  8565. /** 可编辑。 */
  8566. READWRITE: "READWRITE",
  8567. /** 可删除。 */
  8568. DELETE: "DELETE",
  8569. /** 可下载,包括可读、可检索。 */
  8570. DOWNLOAD: "DOWNLOAD"
  8571. };
  8572. /**
  8573. * @enum EntityType
  8574. * @description iportal资源实体类型。
  8575. * @category BaseTypes Constant
  8576. * @version 10.0.1
  8577. * @type {string}
  8578. * @usage
  8579. * ```
  8580. * // 浏览器
  8581. * <script type="text/javascript" src="{cdn}"></script>
  8582. * <script>
  8583. * const result = {namespace}.EntityType.DEPARTMENT;
  8584. *
  8585. * </script>
  8586. * // ES6 Import
  8587. * import { EntityType } from '{npm}';
  8588. *
  8589. * const result = EntityType.DEPARTMENT;
  8590. * ```
  8591. */
  8592. var EntityType = {
  8593. /** 部门。 */
  8594. DEPARTMENT: "DEPARTMENT",
  8595. /** 用户组。 */
  8596. GROUP: "GROUP",
  8597. /** 群组。 */
  8598. IPORTALGROUP: "IPORTALGROUP",
  8599. /** 角色。 */
  8600. ROLE: "ROLE",
  8601. /** 用户。 */
  8602. USER: "USER"
  8603. };
  8604. /**
  8605. * @enum DataItemType
  8606. * @description iportal数据类型。
  8607. * @category BaseTypes Constant
  8608. * @version 10.0.1
  8609. * @type {string}
  8610. * @usage
  8611. * ```
  8612. * // 浏览器
  8613. * <script type="text/javascript" src="{cdn}"></script>
  8614. * <script>
  8615. * const result = {namespace}.DataItemType.GEOJSON;
  8616. *
  8617. * </script>
  8618. * // ES6 Import
  8619. * import { DataItemType } from '{npm}';
  8620. *
  8621. * const result = DataItemType.GEOJSON;
  8622. * ```
  8623. */
  8624. var DataItemType = {
  8625. /** geojson 数据。 */
  8626. GEOJSON: "GEOJSON",
  8627. /** UGCV5_MVT。 */
  8628. UGCV5_MVT: "UGCV5_MVT",
  8629. /** json数据。 */
  8630. JSON: "JSON",
  8631. /** 音频文件。 */
  8632. AUDIO: "AUDIO",
  8633. /** Color 颜色。 */
  8634. COLOR: "COLOR",
  8635. /** ColorScheme 颜色方案。 */
  8636. COLORSCHEME: "COLORSCHEME",
  8637. /** CSV 数据。 */
  8638. CSV: "CSV",
  8639. /** EXCEL 数据。 */
  8640. EXCEL: "EXCEL",
  8641. /** FillSymbol 填充符号库。 */
  8642. FILLSYMBOL: "FILLSYMBOL",
  8643. /** 图片类型。 */
  8644. IMAGE: "IMAGE",
  8645. /** LayerTemplate 图层模板。 */
  8646. LAYERTEMPLATE: "LAYERTEMPLATE",
  8647. /** LayoutTemplate 布局模板。 */
  8648. LAYOUTTEMPLATE: "LAYOUTTEMPLATE",
  8649. /** LineSymbol 线符号库。 */
  8650. LINESYMBOL: "LINESYMBOL",
  8651. /** MapTemplate 地图模板。 */
  8652. MAPTEMPLATE: "MAPTEMPLATE",
  8653. /** MarkerSymbol 点符号库。 */
  8654. MARKERSYMBOL: "MARKERSYMBOL",
  8655. /** MBTILES。 */
  8656. MBTILES: "MBTILES",
  8657. /** 照片。 */
  8658. PHOTOS: "PHOTOS",
  8659. /** SHP 空间数据。 */
  8660. SHP: "SHP",
  8661. /** SMTILES。 */
  8662. SMTILES: "SMTILES",
  8663. /** SVTILES。 */
  8664. SVTILES: "SVTILES",
  8665. /** ThemeTemplate 专题图模板。 */
  8666. THEMETEMPLATE: "THEMETEMPLATE",
  8667. /** TPK。 */
  8668. TPK: "TPK",
  8669. /** UDB 数据源。 */
  8670. UDB: "UDB",
  8671. /** UGCV5。 */
  8672. UGCV5: "UGCV5",
  8673. /** 其他类型(普通文件)。 */
  8674. UNKNOWN: "UNKNOWN",
  8675. /** 视频文件。 */
  8676. VIDEO: "VIDEO",
  8677. /** WorkEnviroment 工作环境。 */
  8678. WORKENVIRONMENT: "WORKENVIRONMENT",
  8679. /** 工作空间。 */
  8680. WORKSPACE: "WORKSPACE"
  8681. };
  8682. /**
  8683. * @enum WebExportFormatType
  8684. * @description Web 打印输出的格式。
  8685. * @category BaseTypes Constant
  8686. * @version 10.0.1
  8687. * @type {string}
  8688. * @usage
  8689. * ```
  8690. * // 浏览器
  8691. * <script type="text/javascript" src="{cdn}"></script>
  8692. * <script>
  8693. * const result = {namespace}.WebExportFormatType.PNG;
  8694. *
  8695. * </script>
  8696. * // ES6 Import
  8697. * import { WebExportFormatType } from '{npm}';
  8698. *
  8699. * const result = WebExportFormatType.PNG;
  8700. * ```
  8701. */
  8702. var WebExportFormatType = {
  8703. /** PNG */
  8704. PNG: "PNG",
  8705. /** PDF */
  8706. PDF: "PDF"
  8707. };
  8708. /**
  8709. * @enum WebScaleOrientationType
  8710. * @description Web 比例尺的方位样式。
  8711. * @category BaseTypes Constant
  8712. * @version 10.0.1
  8713. * @type {string}
  8714. * @usage
  8715. * ```
  8716. * // 浏览器
  8717. * <script type="text/javascript" src="{cdn}"></script>
  8718. * <script>
  8719. * const result = {namespace}.WebScaleOrientationType.HORIZONTALLABELSBELOW;
  8720. *
  8721. * </script>
  8722. * // ES6 Import
  8723. * import { WebScaleOrientationType } from '{npm}';
  8724. *
  8725. * const result = WebScaleOrientationType.HORIZONTALLABELSBELOW;
  8726. * ```
  8727. */
  8728. var WebScaleOrientationType = {
  8729. /** horizontal labels below. */
  8730. HORIZONTALLABELSBELOW: "HORIZONTALLABELSBELOW",
  8731. /** horizontal labels above. */
  8732. HORIZONTALLABELSABOVE: "HORIZONTALLABELSABOVE",
  8733. /** vertical labels left. */
  8734. VERTICALLABELSLEFT: "VERTICALLABELSLEFT",
  8735. /** vertical labels right. */
  8736. VERTICALLABELSRIGHT: "VERTICALLABELSRIGHT"
  8737. };
  8738. /**
  8739. * @enum WebScaleType
  8740. * @description Web 比例尺的样式。
  8741. * @category BaseTypes Constant
  8742. * @version 10.0.1
  8743. * @type {string}
  8744. * @usage
  8745. * ```
  8746. * // 浏览器
  8747. * <script type="text/javascript" src="{cdn}"></script>
  8748. * <script>
  8749. * const result = {namespace}.WebScaleType.LINE;
  8750. *
  8751. * </script>
  8752. * // ES6 Import
  8753. * import { WebScaleType } from '{npm}';
  8754. *
  8755. * const result = WebScaleType.LINE;
  8756. * ```
  8757. */
  8758. var WebScaleType = {
  8759. /** line. */
  8760. LINE: "LINE",
  8761. /** bar. */
  8762. BAR: "BAR",
  8763. /** bar sub. */
  8764. BAR_SUB: "BAR_SUB"
  8765. };
  8766. /**
  8767. * @enum WebScaleUnit
  8768. * @description Web 比例尺的单位制。
  8769. * @category BaseTypes Constant
  8770. * @version 10.0.1
  8771. * @type {string}
  8772. * @usage
  8773. * ```
  8774. * // 浏览器
  8775. * <script type="text/javascript" src="{cdn}"></script>
  8776. * <script>
  8777. * const result = {namespace}.WebScaleUnit.METER;
  8778. *
  8779. * </script>
  8780. * // ES6 Import
  8781. * import { WebScaleUnit } from '{npm}';
  8782. *
  8783. * const result = WebScaleUnit.METER;
  8784. * ```
  8785. */
  8786. var WebScaleUnit = {
  8787. /** 米。 */
  8788. METER: "METER",
  8789. /** 英尺。 */
  8790. FOOT: "FOOT",
  8791. /** 度。 */
  8792. DEGREES: "DEGREES"
  8793. };
  8794. ;// CONCATENATED MODULE: ./src/common/iServer/DatasourceConnectionInfo.js
  8795. function DatasourceConnectionInfo_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8796. function DatasourceConnectionInfo_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8797. function DatasourceConnectionInfo_createClass(Constructor, protoProps, staticProps) { if (protoProps) DatasourceConnectionInfo_defineProperties(Constructor.prototype, protoProps); if (staticProps) DatasourceConnectionInfo_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  8798. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  8799. * This program are made available under the terms of the Apache License, Version 2.0
  8800. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8801. // eslint-disable-line no-unused-vars
  8802. /**
  8803. * @class DatasourceConnectionInfo
  8804. * @deprecatedclass SuperMap.DatasourceConnectionInfo
  8805. * @category iServer Data Datasource
  8806. * @classdesc 数据源连接信息类。该类包括了进行数据源连接的所有信息,如所要连接的服务器名称、数据库名称、用户名以及密码等。
  8807. * 当保存为工作空间时,工作空间中的数据源的连接信息都将存储到工作空间文件中。对于不同类型的数据源,其连接信息有所区别。
  8808. * 所以在使用该类所包含的成员时,请注意该成员所适用的数据源类型。对于从数据源对象中返回的数据连接信息对象,只有 connect 方法可以被修改,
  8809. * 其他内容是不可以被修改的。对于用户创建的数据源连接信息对象,其内容都可以修改。
  8810. * @param {Object} options - 参数。
  8811. * @param {string} options.alias - 数据源别名。
  8812. * @param {string} options.dataBase - 数据源连接的数据库名。
  8813. * @param {boolean} [options.connect] - 数据源是否自动连接数据。
  8814. * @param {string} [options.driver] - 使用 ODBC(Open Database Connectivity,开放数据库互连)的数据库的驱动程序名。
  8815. * @param {EngineType} [options.engineType] - 数据源连接的引擎类型。
  8816. * @param {boolean} [options.exclusive] - 是否以独占方式打开数据源。
  8817. * @param {boolean} [options.OpenLinkTable] - 是否把数据库中的其他非 SuperMap 数据表作为 LinkTable 打开。
  8818. * @param {string} [options.password] - 登录数据源连接的数据库或文件的密码。
  8819. * @param {boolean} [options.readOnly] - 是否以只读方式打开数据源。
  8820. * @param {string} [options.server] - 数据库服务器名或 SDB 文件名。
  8821. * @param {string} [options.user] - 登录数据库的用户名。
  8822. * @usage
  8823. */
  8824. var DatasourceConnectionInfo = /*#__PURE__*/function () {
  8825. function DatasourceConnectionInfo(options) {
  8826. DatasourceConnectionInfo_classCallCheck(this, DatasourceConnectionInfo);
  8827. /**
  8828. * @member {string} DatasourceConnectionInfo.prototype.alias
  8829. * @description 数据源别名。
  8830. */
  8831. this.alias = null;
  8832. /**
  8833. * @member {boolean} [DatasourceConnectionInfo.prototype.connect]
  8834. * @description 数据源是否自动连接数据。
  8835. */
  8836. this.connect = null;
  8837. /**
  8838. * @member {string} DatasourceConnectionInfo.prototype.dataBase
  8839. * @description 数据源连接的数据库名。
  8840. */
  8841. this.dataBase = null;
  8842. /**
  8843. * @member {string} [DatasourceConnectionInfo.prototype.driver]
  8844. * @description 使用 ODBC(Open Database Connectivity,开放数据库互连) 的数据库的驱动程序名。
  8845. * 其中,对于 SQL Server 数据库与 iServer 发布的 WMTS 服务,此为必设参数。
  8846. * 对于 SQL Server 数据库,它使用 ODBC 连接,所设置的驱动程序名为 "SQL Server" 或 "SQL Native Client";
  8847. * 对于 iServer 发布的 WMTS 服务,设置的驱动名称为 "WMTS"。
  8848. */
  8849. this.driver = null;
  8850. /**
  8851. * @member {EngineType} [DatasourceConnectionInfo.prototype.engineType]
  8852. * @description 数据源连接的引擎类型。
  8853. */
  8854. this.engineType = null;
  8855. /**
  8856. * @member {boolean} [DatasourceConnectionInfo.prototype.exclusive]
  8857. * @description 是否以独占方式打开数据源。
  8858. */
  8859. this.exclusive = null;
  8860. /**
  8861. * @member {boolean} [DatasourceConnectionInfo.prototype.OpenLinkTable]
  8862. * @description 是否把数据库中的其他非 SuperMap 数据表作为 LinkTable 打开。
  8863. */
  8864. this.OpenLinkTable = null;
  8865. /**
  8866. * @member {string} [DatasourceConnectionInfo.prototype.password]
  8867. * @description 登录数据源连接的数据库或文件的密码。
  8868. */
  8869. this.password = null;
  8870. /**
  8871. * @member {boolean} [DatasourceConnectionInfo.prototype.readOnly]
  8872. * @description 是否以只读方式打开数据源。
  8873. */
  8874. this.readOnly = null;
  8875. /**
  8876. * @member {string} [DatasourceConnectionInfo.prototype.server]
  8877. * @description 数据库服务器名、文件名或服务地址。
  8878. * 1.对于 SDB 和 UDB 文件,为其文件的绝对路径。注意:当绝对路径的长度超过 UTF-8 编码格式的 260 字节长度,该数据源无法打开。
  8879. * 2.对于 Oracle 数据库,其服务器名为其 TNS 服务名称。
  8880. * 3.对于 SQL Server 数据库,其服务器名为其系统的 DSN(Database Source Name) 名称。
  8881. * 4.对于 PostgreSQL 数据库,其服务器名为 “IP:端口号”,默认的端口号是 5432。
  8882. * 5.对于 DB2 数据库,已经进行了编目,所以不需要进行服务器的设置。
  8883. * 6.对于 Kingbase 数据库,其服务器名为其 IP 地址。
  8884. * 7.对于 GoogleMaps 数据源,其服务器地址,默认设置为 “{@link http://maps.google.com}”,且不可更改。
  8885. * 8.对于 SuperMapCould 数据源,为其服务地址。
  8886. * 9.对于 MAPWORLD 数据源,为其服务地址,默认设置为 “{@link http://www.tianditu.cn}”,且不可更改。
  8887. * 10.对于 OGC 和 REST 数据源,为其服务地址。
  8888. */
  8889. this.server = null;
  8890. /**
  8891. * @member {string} DatasourceConnectionInfo.prototype.user
  8892. * @description 登录数据库的用户名。
  8893. */
  8894. this.user = null;
  8895. if (options) {
  8896. Util_Util.extend(this, options);
  8897. }
  8898. this.CLASS_NAME = "SuperMap.DatasourceConnectionInfo";
  8899. }
  8900. /**
  8901. * @function DatasourceConnectionInfo.prototype.destroy
  8902. * @description 释放资源,将引用资源的属性置空。
  8903. */
  8904. DatasourceConnectionInfo_createClass(DatasourceConnectionInfo, [{
  8905. key: "destroy",
  8906. value: function destroy() {
  8907. var me = this;
  8908. me.alias = null;
  8909. me.connect = null;
  8910. me.dataBase = null;
  8911. me.driver = null;
  8912. me.engineType = null;
  8913. me.exclusive = null;
  8914. me.OpenLinkTable = null;
  8915. me.password = null;
  8916. me.readOnly = null;
  8917. me.server = null;
  8918. me.user = null;
  8919. }
  8920. }]);
  8921. return DatasourceConnectionInfo;
  8922. }();
  8923. ;// CONCATENATED MODULE: ./src/common/iServer/OutputSetting.js
  8924. function OutputSetting_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8925. function OutputSetting_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8926. function OutputSetting_createClass(Constructor, protoProps, staticProps) { if (protoProps) OutputSetting_defineProperties(Constructor.prototype, protoProps); if (staticProps) OutputSetting_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  8927. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  8928. * This program are made available under the terms of the Apache License, Version 2.0
  8929. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8930. /**
  8931. * @class OutputSetting
  8932. * @deprecatedclass SuperMap.OutputSetting
  8933. * @category iServer ProcessingService
  8934. * @classdesc 分布式分析输出类型设置类。
  8935. * @param {Object} options - 参数。
  8936. * @param {DatasourceConnectionInfo} options.datasourceInfo - 数据源连接信息。
  8937. * @param {string} [options.datasetName='analystResult'] - 结果数据集名称。
  8938. * @param {OutputType} [options.type=OutputType.UDB] - 输出类型。
  8939. * @param {string} [options.outputPath] - 分析结果输出路径。
  8940. * @usage
  8941. */
  8942. var OutputSetting = /*#__PURE__*/function () {
  8943. function OutputSetting(options) {
  8944. OutputSetting_classCallCheck(this, OutputSetting);
  8945. /**
  8946. * @member {OutputType} OutputSetting.prototype.type
  8947. * @description 分布式分析的输出类型。
  8948. */
  8949. this.type = OutputType.UDB;
  8950. /**
  8951. * @member {string} [OutputSetting.prototype.datasetName='analystResult']
  8952. * @description 分布式分析的输出结果数据集名称。
  8953. */
  8954. this.datasetName = "analystResult";
  8955. /**
  8956. * @member {DatasourceConnectionInfo} OutputSetting.prototype.datasourceInfo
  8957. * @description 分布式分析的输出结果数据源连接信息。
  8958. */
  8959. this.datasourceInfo = null;
  8960. /**
  8961. * @member {string} [OutputSetting.prototype.outputPath]
  8962. * @description 分布式分析的分析结果输出路径。
  8963. */
  8964. this.outputPath = "";
  8965. Util_Util.extend(this, options);
  8966. this.CLASS_NAME = "SuperMap.OutputSetting";
  8967. }
  8968. /**
  8969. * @function OutputSetting.prototype.destroy
  8970. * @description 释放资源,将引用资源的属性置空。
  8971. */
  8972. OutputSetting_createClass(OutputSetting, [{
  8973. key: "destroy",
  8974. value: function destroy() {
  8975. var me = this;
  8976. me.type = null;
  8977. me.datasetName = null;
  8978. me.outputPath = null;
  8979. if (me.datasourceInfo instanceof DatasourceConnectionInfo) {
  8980. me.datasourceInfo.destroy();
  8981. me.datasourceInfo = null;
  8982. }
  8983. }
  8984. }]);
  8985. return OutputSetting;
  8986. }();
  8987. ;// CONCATENATED MODULE: ./src/common/iServer/MappingParameters.js
  8988. function MappingParameters_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8989. function MappingParameters_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8990. function MappingParameters_createClass(Constructor, protoProps, staticProps) { if (protoProps) MappingParameters_defineProperties(Constructor.prototype, protoProps); if (staticProps) MappingParameters_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  8991. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  8992. * This program are made available under the terms of the Apache License, Version 2.0
  8993. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8994. /**
  8995. * @class MappingParameters
  8996. * @deprecatedclass SuperMap.MappingParameters
  8997. * @category iServer ProcessingService
  8998. * @classdesc 分析后结果可视化的参数类。
  8999. * @param {Object} options - 参数。
  9000. * @param {Array.<ThemeGridRangeItem>} [options.items] - 栅格分段专题图子项数组。
  9001. * @param {number} [options.numericPrecision=1] - 精度,此字段用于设置分析结果标签专题图中标签数值的精度,如“1”表示精确到小数点的后一位。
  9002. * @param {RangeMode} [options.rangeMode=RangeMode.EQUALINTERVAL] - 专题图分段模式。
  9003. * @param {number} [options.rangeCount] - 专题图分段个数。
  9004. * @param {ColorGradientType} [options.colorGradientType=ColorGradientType.YELLOW_RED] - 专题图颜色渐变模式。
  9005. * @usage
  9006. */
  9007. var MappingParameters = /*#__PURE__*/function () {
  9008. function MappingParameters(options) {
  9009. MappingParameters_classCallCheck(this, MappingParameters);
  9010. /**
  9011. * @member {Array.<ThemeGridRangeItem>} [MappingParameters.prototype.items]
  9012. * @description 栅格分段专题图子项数组。
  9013. */
  9014. this.items = null;
  9015. /**
  9016. * @member {number} [MappingParameters.prototype.numericPrecision=1]
  9017. * @description 精度,此字段用于设置分析结果标签专题图中标签数值的精度,如“1”表示精确到小数点的后一位。
  9018. */
  9019. this.numericPrecision = 1;
  9020. /**
  9021. * @member {RangeMode} [MappingParameters.prototype.RangeMode=RangeMode.EQUALINTERVAL]
  9022. * @description 专题图分段模式。
  9023. */
  9024. this.rangeMode = RangeMode.EQUALINTERVAL;
  9025. /**
  9026. * @member {number} [MappingParameters.prototype.rangeCount]
  9027. * @description 专题图分段个数。
  9028. */
  9029. this.rangeCount = "";
  9030. /**
  9031. * @member {ColorGradientType} [MappingParameters.prototype.colorGradientType=ColorGradientType.YELLOW_RED]
  9032. * @description 专题图颜色渐变模式。
  9033. */
  9034. this.colorGradientType = ColorGradientType.YELLOW_RED;
  9035. Util_Util.extend(this, options);
  9036. this.CLASS_NAME = "SuperMap.MappingParameters";
  9037. }
  9038. /**
  9039. * @function MappingParameters.prototype.destroy
  9040. * @description 释放资源,将引用资源的属性置空。
  9041. */
  9042. MappingParameters_createClass(MappingParameters, [{
  9043. key: "destroy",
  9044. value: function destroy() {
  9045. var me = this;
  9046. if (me.items) {
  9047. if (me.items.length > 0) {
  9048. for (var item in me.items) {
  9049. me.items[item].destroy();
  9050. me.items[item] = null;
  9051. }
  9052. }
  9053. me.items = null;
  9054. }
  9055. me.numericPrecision = null;
  9056. me.rangeMode = null;
  9057. me.rangeCount = null;
  9058. me.colorGradientType = null;
  9059. }
  9060. }]);
  9061. return MappingParameters;
  9062. }();
  9063. ;// CONCATENATED MODULE: ./src/common/iServer/KernelDensityJobParameter.js
  9064. function KernelDensityJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9065. function KernelDensityJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9066. function KernelDensityJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) KernelDensityJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) KernelDensityJobParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9067. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9068. * This program are made available under the terms of the Apache License, Version 2.0
  9069. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9070. /**
  9071. * @class KernelDensityJobParameter
  9072. * @deprecatedclass SuperMap.KernelDensityJobParameter
  9073. * @category iServer ProcessingService DensityAnalyst
  9074. * @classdesc 核密度分析服务参数类。
  9075. * @param {Object} options - 参数。
  9076. * @param {string} options.datasetName - 数据集名。
  9077. * @param {string} options.fields - 权重索引。
  9078. * @param {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} [options.query] - 分析范围(默认为全图范围)。
  9079. * @param {number} [options.resolution=80] - 分辨率。
  9080. * @param {number} [options.method=0] - 分析方法。
  9081. * @param {number} [options.meshType=0] - 分析类型。
  9082. * @param {number} [options.radius=300] - 分析的影响半径。
  9083. * @param {AnalystSizeUnit} [options.meshSizeUnit=AnalystSizeUnit.METER] - 网格大小单位。
  9084. * @param {AnalystSizeUnit} [options.radiusUnit=AnalystSizeUnit.METER] - 搜索半径单位。
  9085. * @param {AnalystAreaUnit} [options.areaUnit=AnalystAreaUnit.SQUAREMILE] - 面积单位。
  9086. * @param {OutputSetting} [options.output] - 输出参数设置。
  9087. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9088. * @usage
  9089. */
  9090. var KernelDensityJobParameter = /*#__PURE__*/function () {
  9091. function KernelDensityJobParameter(options) {
  9092. KernelDensityJobParameter_classCallCheck(this, KernelDensityJobParameter);
  9093. if (!options) {
  9094. return;
  9095. }
  9096. /**
  9097. * @member {string} KernelDensityJobParameter.prototype.datasetName
  9098. * @description 数据集名。
  9099. */
  9100. this.datasetName = "";
  9101. /**
  9102. * @member {SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject} [KernelDensityJobParameter.prototype.query]
  9103. * @description 分析范围。
  9104. */
  9105. this.query = "";
  9106. /**
  9107. * @member {number} [KernelDensityJobParameter.prototype.resolution=80]
  9108. * @description 网格大小。
  9109. */
  9110. this.resolution = 80;
  9111. /**
  9112. * @member {number} [KernelDensityJobParameter.prototype.method=0]
  9113. * @description 分析方法。
  9114. */
  9115. this.method = 0;
  9116. /**
  9117. * @member {number} [KernelDensityJobParameter.prototype.meshType=0]
  9118. * @description 分析类型。
  9119. */
  9120. this.meshType = 0;
  9121. /**
  9122. * @member {string} KernelDensityJobParameter.prototype.fields
  9123. * @description 权重索引。
  9124. */
  9125. this.fields = "";
  9126. /**
  9127. * @member {number} [KernelDensityJobParameter.prototype.radius=300]
  9128. * @description 分析的影响半径。
  9129. */
  9130. this.radius = 300;
  9131. /**
  9132. * @member {AnalystSizeUnit} [KernelDensityJobParameter.prototype.meshSizeUnit=AnalystSizeUnit.METER]
  9133. * @description 网格大小单位。
  9134. */
  9135. this.meshSizeUnit = AnalystSizeUnit.METER;
  9136. /**
  9137. * @member {AnalystSizeUnit} [KernelDensityJobParameter.prototype.radiusUnit=AnalystSizeUnit.METER]
  9138. * @description 搜索半径单位。
  9139. */
  9140. this.radiusUnit = AnalystSizeUnit.METER;
  9141. /**
  9142. * @member {AnalystAreaUnit} [KernelDensityJobParameter.prototype.areaUnit=AnalystAreaUnit.SQUAREMILE]
  9143. * @description 面积单位。
  9144. */
  9145. this.areaUnit = AnalystAreaUnit.SQUAREMILE;
  9146. /**
  9147. * @member {OutputSetting} KernelDensityJobParameter.prototype.output
  9148. * @description 输出参数设置类。
  9149. */
  9150. this.output = null;
  9151. /**
  9152. * @member {MappingParameters} [KernelDensityJobParameter.prototype.mappingParameters]
  9153. * @description 分析后结果可视化的参数类。
  9154. */
  9155. this.mappingParameters = null;
  9156. Util_Util.extend(this, options);
  9157. this.CLASS_NAME = "SuperMap.KernelDensityJobParameter";
  9158. }
  9159. /**
  9160. * @function KernelDensityJobParameter.prototype.destroy
  9161. * @description 释放资源,将引用资源的属性置空。
  9162. */
  9163. KernelDensityJobParameter_createClass(KernelDensityJobParameter, [{
  9164. key: "destroy",
  9165. value: function destroy() {
  9166. this.datasetName = null;
  9167. this.query = null;
  9168. this.resolution = null;
  9169. this.method = null;
  9170. this.radius = null;
  9171. this.meshType = null;
  9172. this.fields = null;
  9173. this.meshSizeUnit = null;
  9174. this.radiusUnit = null;
  9175. this.areaUnit = null;
  9176. if (this.output instanceof OutputSetting) {
  9177. this.output.destroy();
  9178. this.output = null;
  9179. }
  9180. if (this.mappingParameters instanceof MappingParameters) {
  9181. this.mappingParameters.destroy();
  9182. this.mappingParameters = null;
  9183. }
  9184. }
  9185. /**
  9186. * @function KernelDensityJobParameter.toObject
  9187. * @param {KernelDensityJobParameter} kernelDensityJobParameter - 核密度分析服务参数类。
  9188. * @param {KernelDensityJobParameter} tempObj - 核密度分析服务参数对象。
  9189. * @description 将核密度分析服务参数对象转换为 JSON 对象。
  9190. * @returns JSON 对象。
  9191. */
  9192. }], [{
  9193. key: "toObject",
  9194. value: function toObject(kernelDensityJobParameter, tempObj) {
  9195. for (var name in kernelDensityJobParameter) {
  9196. if (name === "datasetName") {
  9197. tempObj['input'] = tempObj['input'] || {};
  9198. tempObj['input'][name] = kernelDensityJobParameter[name];
  9199. continue;
  9200. }
  9201. if (name === "output") {
  9202. tempObj['output'] = tempObj['output'] || {};
  9203. tempObj['output'] = kernelDensityJobParameter[name];
  9204. continue;
  9205. }
  9206. tempObj['analyst'] = tempObj['analyst'] || {};
  9207. if (name === 'query' && kernelDensityJobParameter[name]) {
  9208. tempObj['analyst'][name] = kernelDensityJobParameter[name].toBBOX();
  9209. } else {
  9210. tempObj['analyst'][name] = kernelDensityJobParameter[name];
  9211. }
  9212. if (name === 'mappingParameters') {
  9213. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  9214. tempObj['analyst']['mappingParameters'] = kernelDensityJobParameter[name];
  9215. }
  9216. }
  9217. }
  9218. }]);
  9219. return KernelDensityJobParameter;
  9220. }();
  9221. ;// CONCATENATED MODULE: ./src/common/iServer/SingleObjectQueryJobsParameter.js
  9222. function SingleObjectQueryJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9223. function SingleObjectQueryJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9224. function SingleObjectQueryJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SingleObjectQueryJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SingleObjectQueryJobsParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9225. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9226. * This program are made available under the terms of the Apache License, Version 2.0
  9227. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9228. /**
  9229. * @class SingleObjectQueryJobsParameter
  9230. * @deprecatedclass SuperMap.SingleObjectQueryJobsParameter
  9231. * @category iServer ProcessingService Query
  9232. * @classdesc 单对象空间查询分析任务参数类。
  9233. * @param {Object} options - 参数。
  9234. * @param {string} options.datasetName - 数据集名。
  9235. * @param {string} options.datasetQuery - 查询对象所在的数据集名称。
  9236. * @param {SpatialQueryMode} [options.mode=SpatialQueryMode.CONTAIN] - 空间查询模式。
  9237. * @param {OutputSetting} [options.output] - 输出参数设置。
  9238. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9239. * @usage
  9240. */
  9241. var SingleObjectQueryJobsParameter = /*#__PURE__*/function () {
  9242. function SingleObjectQueryJobsParameter(options) {
  9243. SingleObjectQueryJobsParameter_classCallCheck(this, SingleObjectQueryJobsParameter);
  9244. if (!options) {
  9245. return;
  9246. }
  9247. /**
  9248. * @member {string} SingleObjectQueryJobsParameter.prototype.datasetName
  9249. * @description 数据集名。
  9250. */
  9251. this.datasetName = "";
  9252. /**
  9253. * @member {string} SingleObjectQueryJobsParameter.prototype.datasetQuery
  9254. * @description 查询对象所在的数据集名称。
  9255. */
  9256. this.datasetQuery = "";
  9257. /**
  9258. * @member {string} SingleObjectQueryJobsParameter.prototype.geometryQuery
  9259. * @description 查询对象所在的几何对象。
  9260. */
  9261. this.geometryQuery = "";
  9262. /**
  9263. * @member {SpatialQueryMode} [SingleObjectQueryJobsParameter.prototype.mode=SpatialQueryMode.CONTAIN]
  9264. * @description 空间查询模式 。
  9265. */
  9266. this.mode = SpatialQueryMode.CONTAIN;
  9267. /**
  9268. * @member {OutputSetting} [SingleObjectQueryJobsParameter.prototype.output]
  9269. * @description 输出参数设置类。
  9270. */
  9271. this.output = null;
  9272. /**
  9273. * @member {MappingParameters} [SingleObjectQueryJobsParameter.prototype.mappingParameters]
  9274. * @description 分析后结果可视化的参数类。
  9275. */
  9276. this.mappingParameters = null;
  9277. Util_Util.extend(this, options);
  9278. this.CLASS_NAME = "SuperMap.SingleObjectQueryJobsParameter";
  9279. }
  9280. /**
  9281. * @function SingleObjectQueryJobsParameter.prototype.destroy
  9282. * @description 释放资源,将引用资源的属性置空。
  9283. */
  9284. SingleObjectQueryJobsParameter_createClass(SingleObjectQueryJobsParameter, [{
  9285. key: "destroy",
  9286. value: function destroy() {
  9287. this.datasetName = null;
  9288. this.datasetQuery = null;
  9289. this.geometryQuery = null;
  9290. this.mode = null;
  9291. if (this.output instanceof OutputSetting) {
  9292. this.output.destroy();
  9293. this.output = null;
  9294. }
  9295. if (this.mappingParameters instanceof MappingParameters) {
  9296. this.mappingParameters.destroy();
  9297. this.mappingParameters = null;
  9298. }
  9299. }
  9300. /**
  9301. * @function SingleObjectQueryJobsParameter.toObject
  9302. * @param {Object} singleObjectQueryJobsParameter - 单对象空间查询分析任务参数。
  9303. * @param {Object} tempObj - 目标对象。
  9304. * @description 生成单对象空间查询分析任务对象。
  9305. */
  9306. }], [{
  9307. key: "toObject",
  9308. value: function toObject(singleObjectQueryJobsParameter, tempObj) {
  9309. for (var name in singleObjectQueryJobsParameter) {
  9310. if (name === "datasetName") {
  9311. tempObj['input'] = tempObj['input'] || {};
  9312. tempObj['input'][name] = singleObjectQueryJobsParameter[name];
  9313. continue;
  9314. }
  9315. if (name === "output") {
  9316. tempObj['output'] = tempObj['output'] || {};
  9317. tempObj['output'] = singleObjectQueryJobsParameter[name];
  9318. continue;
  9319. }
  9320. tempObj['analyst'] = tempObj['analyst'] || {};
  9321. tempObj['analyst'][name] = singleObjectQueryJobsParameter[name];
  9322. if (name === 'mappingParameters') {
  9323. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  9324. tempObj['analyst']['mappingParameters'] = singleObjectQueryJobsParameter[name];
  9325. }
  9326. }
  9327. }
  9328. }]);
  9329. return SingleObjectQueryJobsParameter;
  9330. }();
  9331. ;// CONCATENATED MODULE: ./src/common/iServer/SummaryAttributesJobsParameter.js
  9332. function SummaryAttributesJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9333. function SummaryAttributesJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9334. function SummaryAttributesJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryAttributesJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryAttributesJobsParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9335. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9336. * This program are made available under the terms of the Apache License, Version 2.0
  9337. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9338. /**
  9339. * @class SummaryAttributesJobsParameter
  9340. * @deprecatedclass SuperMap.SummaryAttributesJobsParameter
  9341. * @category iServer ProcessingService SummaryAttributes
  9342. * @classdesc 属性汇总分析任务参数类。
  9343. * @param {Object} options - 参数。
  9344. * @param {string} options.datasetName - 数据集名。
  9345. * @param {string} options.groupField - 分组字段。
  9346. * @param {string} options.attributeField - 属性字段。
  9347. * @param {string} options.statisticModes - 统计模式。
  9348. * @param {OutputSetting} [options.output] -输出参数设置。
  9349. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9350. * @usage
  9351. */
  9352. var SummaryAttributesJobsParameter = /*#__PURE__*/function () {
  9353. function SummaryAttributesJobsParameter(options) {
  9354. SummaryAttributesJobsParameter_classCallCheck(this, SummaryAttributesJobsParameter);
  9355. if (!options) {
  9356. return;
  9357. }
  9358. /**
  9359. * @member {string} SummaryAttributesJobsParameter.prototype.datasetName
  9360. * @description 汇总数据集名称。
  9361. */
  9362. this.datasetName = "";
  9363. /**
  9364. * @member {string} SummaryAttributesJobsParameter.prototype.groupField
  9365. * @description 分组字段。
  9366. */
  9367. this.groupField = "";
  9368. /**
  9369. * @member {string} SummaryAttributesJobsParameter.prototype.attributeField
  9370. * @description 属性字段。
  9371. */
  9372. this.attributeField = "";
  9373. /**
  9374. * @member {string} SummaryAttributesJobsParameter.prototype.statisticModes
  9375. * @description 属性汇总统计模式。
  9376. */
  9377. this.statisticModes = "";
  9378. /**
  9379. * @member {OutputSetting} SummaryAttributesJobsParameter.prototype.output
  9380. * @description 输出参数设置类。
  9381. */
  9382. this.output = null;
  9383. /**
  9384. * @member {MappingParameters} [SummaryAttributesJobsParameter.prototype.mappingParameters]
  9385. * @description 分析后结果可视化的参数类。
  9386. */
  9387. this.mappingParameters = null;
  9388. Util_Util.extend(this, options);
  9389. this.CLASS_NAME = "SuperMap.SummaryAttributesJobsParameter";
  9390. }
  9391. /**
  9392. * @function SummaryAttributesJobsParameter.prototype.destroy
  9393. * @description 释放资源,将资源的属性置空。
  9394. */
  9395. SummaryAttributesJobsParameter_createClass(SummaryAttributesJobsParameter, [{
  9396. key: "destroy",
  9397. value: function destroy() {
  9398. this.datasetName = null;
  9399. this.groupField = null;
  9400. this.attributeField = null;
  9401. this.statisticModes = null;
  9402. if (this.output instanceof OutputSetting) {
  9403. this.output.destroy();
  9404. this.output = null;
  9405. }
  9406. if (this.mappingParameters instanceof MappingParameters) {
  9407. this.mappingParameters.destroy();
  9408. this.mappingParameters = null;
  9409. }
  9410. }
  9411. /**
  9412. * @function SummaryAttributesJobsParameter.toObject
  9413. * @param {Object} SummaryAttributesJobsParameter - 属性汇总任务参数。
  9414. * @param {Object} tempObj - 目标对象。
  9415. * @description 生成属性汇总分析任务对象。
  9416. */
  9417. }], [{
  9418. key: "toObject",
  9419. value: function toObject(_SummaryAttributesJobsParameter, tempObj) {
  9420. for (var name in _SummaryAttributesJobsParameter) {
  9421. if (name === "datasetName") {
  9422. tempObj['input'] = tempObj['input'] || {};
  9423. tempObj['input'][name] = _SummaryAttributesJobsParameter[name];
  9424. continue;
  9425. }
  9426. if (name === "output") {
  9427. tempObj['output'] = tempObj['output'] || {};
  9428. tempObj['output'] = _SummaryAttributesJobsParameter[name];
  9429. continue;
  9430. }
  9431. tempObj['analyst'] = tempObj['analyst'] || {};
  9432. tempObj['analyst'][name] = _SummaryAttributesJobsParameter[name];
  9433. if (name === 'mappingParameters') {
  9434. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  9435. tempObj['analyst']['mappingParameters'] = _SummaryAttributesJobsParameter[name];
  9436. }
  9437. }
  9438. }
  9439. }]);
  9440. return SummaryAttributesJobsParameter;
  9441. }();
  9442. ;// CONCATENATED MODULE: ./src/common/iServer/SummaryMeshJobParameter.js
  9443. function SummaryMeshJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9444. function SummaryMeshJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9445. function SummaryMeshJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryMeshJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryMeshJobParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9446. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9447. * This program are made available under the terms of the Apache License, Version 2.0
  9448. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9449. /**
  9450. * @class SummaryMeshJobParameter
  9451. * @deprecatedclass SuperMap.SummaryMeshJobParameter
  9452. * @category iServer ProcessingService AggregatePoints
  9453. * @classdesc 点聚合分析任务参数类。
  9454. * @param {Object} options - 参数。
  9455. * @param {string} options.datasetName - 数据集名。
  9456. * @param {string} [options.regionDataset ] - 聚合面数据集(聚合类型为多边形聚合时使用的参数)
  9457. * @param {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} [options.query] - 分析范围(默认为全图范围)。
  9458. * @param {number} options.fields - 权重索引。
  9459. * @param {number} [options.resolution=100] - 分辨率。
  9460. * @param {StatisticAnalystMode} [options.statisticModes=StatisticAnalystMode.AVERAGE] - 分析模式。
  9461. * @param {number} [options.meshType=0] - 分析类型。
  9462. * @param {SummaryType} [options.type=SummaryType.SUMMARYMESH] - 聚合类型。
  9463. * @param {OutputSetting} [options.output] - 输出参数设置。
  9464. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9465. * @usage
  9466. */
  9467. var SummaryMeshJobParameter = /*#__PURE__*/function () {
  9468. function SummaryMeshJobParameter(options) {
  9469. SummaryMeshJobParameter_classCallCheck(this, SummaryMeshJobParameter);
  9470. if (!options) {
  9471. return;
  9472. }
  9473. /**
  9474. * @member {string} SummaryMeshJobParameter.prototype.datasetName
  9475. * @description 数据集名。
  9476. */
  9477. this.datasetName = "";
  9478. /**
  9479. * @member {string} SummaryMeshJobParameter.prototype.regionDataset
  9480. * @description 聚合面数据集(聚合类型为多边形聚合时使用的参数)。
  9481. */
  9482. this.regionDataset = "";
  9483. /**
  9484. * @member {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} SummaryMeshJobParameter.prototype.query
  9485. * @description 分析范围(聚合类型为网格面聚合时使用的参数)。
  9486. */
  9487. this.query = "";
  9488. /**
  9489. * @member {number} [SummaryMeshJobParameter.prototype.resolution=100]
  9490. * @description 分辨率(聚合类型为网格面聚合时使用的参数)。
  9491. */
  9492. this.resolution = 100;
  9493. /**
  9494. * @member {number} [SummaryMeshJobParameter.prototype.meshType=0]
  9495. * @description 网格面类型(聚合类型为网格面聚合时使用的参数),取值:0 或 1。
  9496. */
  9497. this.meshType = 0;
  9498. /**
  9499. * @member {StatisticAnalystMode} [SummaryMeshJobParameter.prototype.statisticModes=StatisticAnalystMode.AVERAGE]
  9500. * @description 统计模式。
  9501. */
  9502. this.statisticModes = StatisticAnalystMode.AVERAGE;
  9503. /**
  9504. * @member {number} SummaryMeshJobParameter.prototype.fields
  9505. * @description 权重字段。
  9506. */
  9507. this.fields = "";
  9508. /**
  9509. * @member {SummaryType} [SummaryMeshJobParameter.prototype.type=SummaryType.SUMMARYMESH]
  9510. * @description 聚合类型。
  9511. */
  9512. this.type = SummaryType.SUMMARYMESH;
  9513. /**
  9514. * @member {OutputSetting} [SummaryMeshJobParameter.prototype.output]
  9515. * @description 输出参数设置类。
  9516. */
  9517. this.output = null;
  9518. /**
  9519. * @member {MappingParameters} [SummaryMeshJobParameter.prototype.mappingParameters]
  9520. * @description 分析后结果可视化的参数类。
  9521. */
  9522. this.mappingParameters = null;
  9523. Util_Util.extend(this, options);
  9524. this.CLASS_NAME = "SuperMap.SummaryMeshJobParameter";
  9525. }
  9526. /**
  9527. * @function SummaryMeshJobParameter.prototype.destroy
  9528. * @description 释放资源,将资源的属性置空。
  9529. */
  9530. SummaryMeshJobParameter_createClass(SummaryMeshJobParameter, [{
  9531. key: "destroy",
  9532. value: function destroy() {
  9533. this.datasetName = null;
  9534. this.query = null;
  9535. this.resolution = null;
  9536. this.statisticModes = null;
  9537. this.meshType = null;
  9538. this.fields = null;
  9539. this.regionDataset = null;
  9540. this.type = null;
  9541. if (this.output instanceof OutputSetting) {
  9542. this.output.destroy();
  9543. this.output = null;
  9544. }
  9545. if (this.mappingParameters instanceof MappingParameters) {
  9546. this.mappingParameters.destroy();
  9547. this.mappingParameters = null;
  9548. }
  9549. }
  9550. /**
  9551. * @function SummaryMeshJobParameter.toObject
  9552. * @param {Object} summaryMeshJobParameter - 点聚合分析任务参数。
  9553. * @param {Object} tempObj - 目标对象。
  9554. * @description 生成点聚合分析任务对象。
  9555. */
  9556. }], [{
  9557. key: "toObject",
  9558. value: function toObject(summaryMeshJobParameter, tempObj) {
  9559. for (var name in summaryMeshJobParameter) {
  9560. if (name === "datasetName") {
  9561. tempObj['input'] = tempObj['input'] || {};
  9562. tempObj['input'][name] = summaryMeshJobParameter[name];
  9563. continue;
  9564. }
  9565. if (name === "type") {
  9566. tempObj['type'] = summaryMeshJobParameter[name];
  9567. continue;
  9568. }
  9569. if (name === "output") {
  9570. tempObj['output'] = tempObj['output'] || {};
  9571. tempObj['output'] = summaryMeshJobParameter[name];
  9572. continue;
  9573. }
  9574. if (summaryMeshJobParameter.type === 'SUMMARYMESH' && name !== 'regionDataset' || summaryMeshJobParameter.type === 'SUMMARYREGION' && !contains(['meshType', 'resolution', 'query'], name)) {
  9575. tempObj['analyst'] = tempObj['analyst'] || {};
  9576. if (name === 'query' && summaryMeshJobParameter[name]) {
  9577. tempObj['analyst'][name] = summaryMeshJobParameter[name].toBBOX();
  9578. } else {
  9579. tempObj['analyst'][name] = summaryMeshJobParameter[name];
  9580. }
  9581. if (name === 'mappingParameters') {
  9582. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  9583. tempObj['analyst']['mappingParameters'] = summaryMeshJobParameter[name];
  9584. }
  9585. }
  9586. }
  9587. function contains(arr, obj) {
  9588. var i = arr.length;
  9589. while (i--) {
  9590. if (arr[i] === obj) {
  9591. return true;
  9592. }
  9593. }
  9594. return false;
  9595. }
  9596. }
  9597. }]);
  9598. return SummaryMeshJobParameter;
  9599. }();
  9600. ;// CONCATENATED MODULE: ./src/common/iServer/SummaryRegionJobParameter.js
  9601. function SummaryRegionJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9602. function SummaryRegionJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9603. function SummaryRegionJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryRegionJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryRegionJobParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9604. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9605. * This program are made available under the terms of the Apache License, Version 2.0
  9606. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9607. /**
  9608. * @class SummaryRegionJobParameter
  9609. * @deprecatedclass SuperMap.SummaryRegionJobParameter
  9610. * @category iServer ProcessingService SummaryRegion
  9611. * @classdesc 区域汇总分析任务参数类。
  9612. * @param {Object} options - 参数。
  9613. * @param {string} options.datasetName - 数据集名。
  9614. * @param {string} [options.regionDataset] - 汇总数据源(多边形汇总时用到的参数)。
  9615. * @param {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} [options.query] - 分析范围(默认为全图范围)。
  9616. * @param {string} [options.standardFields] - 标准属性字段名称。
  9617. * @param {string} [options.weightedFields] - 权重字段名称。
  9618. * @param {StatisticAnalystMode} [options.standardStatisticModes] - 标准属性字段的统计模式。standardSummaryFields 为 true 时必填。
  9619. * @param {StatisticAnalystMode} [options.weightedStatisticModes] - 权重字段的统计模式。weightedSummaryFields 为 true 时必填。
  9620. * @param {boolean} [options.sumShape=true] - 是否统计长度或面积。
  9621. * @param {boolean} [options.standardSummaryFields=false] - 是否以标准属性字段统计。
  9622. * @param {boolean} [options.weightedSummaryFields=false] - 是否以权重字段统计。
  9623. * @param {number} [options.resolution=100] - 网格大小。
  9624. * @param {number} [options.meshType=0] - 网格面汇总类型。
  9625. * @param {AnalystSizeUnit} [options.meshSizeUnit=AnalystSizeUnit.METER] - 网格大小单位。
  9626. * @param {SummaryType} [options.type=SummaryType.SUMMARYMESH] - 汇总类型。
  9627. * @param {OutputSetting} [options.output] - 输出参数设置。
  9628. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9629. * @usage
  9630. */
  9631. var SummaryRegionJobParameter = /*#__PURE__*/function () {
  9632. function SummaryRegionJobParameter(options) {
  9633. SummaryRegionJobParameter_classCallCheck(this, SummaryRegionJobParameter);
  9634. if (!options) {
  9635. return;
  9636. }
  9637. /**
  9638. * @member {string} SummaryRegionJobParameter.prototype.datasetName
  9639. * @description 数据集名。
  9640. */
  9641. this.datasetName = "";
  9642. /**
  9643. * @member {string} SummaryRegionJobParameter.prototype.regionDataset
  9644. * @description 汇总数据源(多边形汇总时用到的参数)。
  9645. */
  9646. this.regionDataset = "";
  9647. /**
  9648. * @member {boolean} [SummaryRegionJobParameter.prototype.sumShape=true]
  9649. * @description 是否统计长度或面积。
  9650. */
  9651. this.sumShape = true;
  9652. /**
  9653. * @member {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} SummaryRegionJobParameter.prototype.query
  9654. * @description 分析范围。
  9655. */
  9656. this.query = "";
  9657. /**
  9658. * @member {boolean} [SummaryRegionJobParameter.prototype.standardSummaryFields=false]
  9659. * @description 是否以标准属字段统计。
  9660. */
  9661. this.standardSummaryFields = false;
  9662. /**
  9663. * @member {string} SummaryRegionJobParameter.prototype.standardFields
  9664. * @description 标准属性字段名称。仅支持系统字段以外的整形、长整形、浮点型的字段的名称。standardSummaryFields 为 true 时必填。
  9665. */
  9666. this.standardFields = "";
  9667. /**
  9668. * @member {StatisticAnalystMode} SummaryRegionJobParameter.prototype.standardStatisticModes
  9669. * @description 标准属性字段的统计模式。standardSummaryFields 为 true 时必填。
  9670. */
  9671. this.standardStatisticModes = "";
  9672. /**
  9673. * @member {boolean} [SummaryRegionJobParameter.prototype.weightedSummaryFields=false]
  9674. * @description 是否以权重字段统计。
  9675. */
  9676. this.weightedSummaryFields = false;
  9677. /**
  9678. * @member {string} SummaryRegionJobParameter.prototype.weightedFields
  9679. * @description 权重字段名称。仅支持系统字段以外的整形、长整形、浮点型的字段的名称。weightedSummaryFields 为 true 时必填。
  9680. */
  9681. this.weightedFields = "";
  9682. /**
  9683. * @member {StatisticAnalystMode} SummaryRegionJobParameter.prototype.weightedStatisticModes
  9684. * @description 以权重字段统计的统计模式。权重字段的统计模式。weightedSummaryFields 为 true 时必填。
  9685. */
  9686. this.weightedStatisticModes = "";
  9687. /**
  9688. * @member {number} [SummaryRegionJobParameter.prototype.meshType=0]
  9689. * @description 网格面汇总类型。
  9690. */
  9691. this.meshType = 0;
  9692. /**
  9693. * @member {number} [SummaryRegionJobParameter.prototype.resolution=100]
  9694. * @description 网格大小。
  9695. */
  9696. this.resolution = 100;
  9697. /**
  9698. * @member {AnalystSizeUnit} [SummaryRegionJobParameter.prototype.meshSizeUnit=AnalystSizeUnit.METER]
  9699. * @description 网格大小单位。
  9700. */
  9701. this.meshSizeUnit = AnalystSizeUnit.METER;
  9702. /**
  9703. * @member {SummaryType} [SummaryRegionJobParameter.prototype.type=SummaryType.SUMMARYMESH]
  9704. * @description 汇总类型。
  9705. */
  9706. this.type = SummaryType.SUMMARYMESH;
  9707. /**
  9708. * @member {OutputSetting} SummaryRegionJobParameter.prototype.output
  9709. * @description 输出参数设置类。
  9710. */
  9711. this.output = null;
  9712. /**
  9713. * @member {MappingParameters} [SummaryRegionJobParameter.prototype.mappingParameters]
  9714. * @description 分析后结果可视化的参数类。
  9715. */
  9716. this.mappingParameters = null;
  9717. Util_Util.extend(this, options);
  9718. this.CLASS_NAME = "SuperMap.SummaryRegionJobParameter";
  9719. }
  9720. /**
  9721. * @function SummaryRegionJobParameter.prototype.destroy
  9722. * @description 释放资源,将引用资源的属性置空。
  9723. */
  9724. SummaryRegionJobParameter_createClass(SummaryRegionJobParameter, [{
  9725. key: "destroy",
  9726. value: function destroy() {
  9727. this.datasetName = null;
  9728. this.sumShape = null;
  9729. this.regionDataset = null;
  9730. this.query = null;
  9731. this.standardSummaryFields = null;
  9732. this.standardFields = null;
  9733. this.standardStatisticModes = null;
  9734. this.weightedSummaryFields = null;
  9735. this.weightedFields = null;
  9736. this.weightedStatisticModes = null;
  9737. this.meshType = null;
  9738. this.resolution = null;
  9739. this.meshSizeUnit = null;
  9740. this.type = null;
  9741. if (this.output instanceof OutputSetting) {
  9742. this.output.destroy();
  9743. this.output = null;
  9744. }
  9745. if (this.mappingParameters instanceof MappingParameters) {
  9746. this.mappingParameters.destroy();
  9747. this.mappingParameters = null;
  9748. }
  9749. }
  9750. /**
  9751. * @function SummaryRegionJobParameter.toObject
  9752. * @param {Object} summaryRegionJobParameter - 矢量裁剪分析任务参数。
  9753. * @param {Object} tempObj - 目标对象。
  9754. * @description 生成区域汇总分析服务对象。
  9755. */
  9756. }], [{
  9757. key: "toObject",
  9758. value: function toObject(summaryRegionJobParameter, tempObj) {
  9759. for (var name in summaryRegionJobParameter) {
  9760. if (name === "datasetName") {
  9761. tempObj['input'] = tempObj['input'] || {};
  9762. tempObj['input'][name] = summaryRegionJobParameter[name];
  9763. continue;
  9764. }
  9765. if (name === "type") {
  9766. tempObj['type'] = summaryRegionJobParameter[name];
  9767. continue;
  9768. }
  9769. if (name === "type") {
  9770. tempObj['type'] = summaryRegionJobParameter[name];
  9771. continue;
  9772. }
  9773. if (name === "output") {
  9774. tempObj['output'] = tempObj['output'] || {};
  9775. tempObj['output'] = summaryRegionJobParameter[name];
  9776. continue;
  9777. }
  9778. if (summaryRegionJobParameter.type === "SUMMARYREGION" || summaryRegionJobParameter.type === "SUMMARYMESH" && name !== "regionDataset") {
  9779. tempObj['analyst'] = tempObj['analyst'] || {};
  9780. if (name === 'query' && summaryRegionJobParameter[name]) {
  9781. tempObj['analyst'][name] = summaryRegionJobParameter[name].toBBOX();
  9782. } else {
  9783. tempObj['analyst'][name] = summaryRegionJobParameter[name];
  9784. }
  9785. if (name === 'mappingParameters') {
  9786. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  9787. tempObj['analyst']['mappingParameters'] = summaryRegionJobParameter[name];
  9788. }
  9789. }
  9790. }
  9791. }
  9792. }]);
  9793. return SummaryRegionJobParameter;
  9794. }();
  9795. ;// CONCATENATED MODULE: ./src/common/iServer/OverlayGeoJobParameter.js
  9796. function OverlayGeoJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9797. function OverlayGeoJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9798. function OverlayGeoJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) OverlayGeoJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) OverlayGeoJobParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9799. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9800. * This program are made available under the terms of the Apache License, Version 2.0
  9801. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9802. /**
  9803. * @class OverlayGeoJobParameter
  9804. * @deprecatedclass SuperMap.OverlayGeoJobParameter
  9805. * @category iServer ProcessingService OverlayAnalyst
  9806. * @classdesc 叠加分析任务参数类。
  9807. * @param {Object} options - 参数。
  9808. * @param {string} options.datasetName - 数据集名。
  9809. * @param {string} options.datasetOverlay - 叠加对象所在的数据集名称。
  9810. * @param {string} options.srcFields - 输入数据需要保留的字段。
  9811. * @param {string} [options.overlayFields] - 叠加数据需要保留的字段。对分析模式为 clip、update、erase 时,此参数无效。
  9812. * @param {string} [options.mode] - 叠加分析模式。
  9813. * @param {OutputSetting} [options.output] - 输出参数设置。
  9814. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9815. * @usage
  9816. */
  9817. var OverlayGeoJobParameter = /*#__PURE__*/function () {
  9818. function OverlayGeoJobParameter(options) {
  9819. OverlayGeoJobParameter_classCallCheck(this, OverlayGeoJobParameter);
  9820. if (!options) {
  9821. return;
  9822. }
  9823. /**
  9824. * @member {string} OverlayGeoJobParameter.prototype.datasetName
  9825. * @description 数据集名。
  9826. */
  9827. this.datasetName = "";
  9828. /**
  9829. * @member {string} OverlayGeoJobParameter.prototype.datasetOverlay
  9830. * @description 叠加对象所在的数据集名称。
  9831. */
  9832. this.datasetOverlay = "";
  9833. /**
  9834. * @member {string} [OverlayGeoJobParameter.prototype.mode]
  9835. * @description 叠加分析模式。
  9836. */
  9837. this.mode = "";
  9838. /**
  9839. * @member {string} OverlayGeoJobParameter.prototype.srcFields
  9840. * @description 输入数据需要保留的字段。
  9841. */
  9842. this.srcFields = "";
  9843. /**
  9844. * @member {string} OverlayGeoJobParameter.prototype.overlayFields
  9845. * @description 叠加数据需要保留的字段,对分析模式为 clip、update、erase 时,此参数无效。
  9846. */
  9847. this.overlayFields = "";
  9848. /**
  9849. * @member {OutputSetting} [OverlayGeoJobParameter.prototype.output]
  9850. * @description 输出参数设置类。
  9851. */
  9852. this.output = null;
  9853. /**
  9854. * @member {MappingParameters} [OverlayGeoJobParameter.prototype.mappingParameters]
  9855. * @description 分析后结果可视化的参数类。
  9856. */
  9857. this.mappingParameters = null;
  9858. Util_Util.extend(this, options);
  9859. this.CLASS_NAME = "SuperMap.OverlayGeoJobParameter";
  9860. }
  9861. /**
  9862. * @function OverlayGeoJobParameter.prototype.destroy
  9863. * @description 释放资源,将资源的属性置空。
  9864. */
  9865. OverlayGeoJobParameter_createClass(OverlayGeoJobParameter, [{
  9866. key: "destroy",
  9867. value: function destroy() {
  9868. this.datasetName = null;
  9869. this.datasetOverlay = null;
  9870. this.mode = null;
  9871. this.srcFields = null;
  9872. this.overlayFields = null;
  9873. if (this.output instanceof OutputSetting) {
  9874. this.output.destroy();
  9875. this.output = null;
  9876. }
  9877. if (this.mappingParameters instanceof MappingParameters) {
  9878. this.mappingParameters.destroy();
  9879. this.mappingParameters = null;
  9880. }
  9881. }
  9882. /**
  9883. * @function OverlayGeoJobParameter.toObject
  9884. * @param {Object} OverlayGeoJobParameter - 点聚合分析任务参数。
  9885. * @param {Object} tempObj - 目标对象。
  9886. * @description 生成点聚合分析任务对象。
  9887. */
  9888. }], [{
  9889. key: "toObject",
  9890. value: function toObject(_OverlayGeoJobParameter, tempObj) {
  9891. for (var name in _OverlayGeoJobParameter) {
  9892. if (name == "datasetName") {
  9893. tempObj['input'] = tempObj['input'] || {};
  9894. tempObj['input'][name] = _OverlayGeoJobParameter[name];
  9895. continue;
  9896. }
  9897. if (name === "output") {
  9898. tempObj['output'] = tempObj['output'] || {};
  9899. tempObj['output'] = _OverlayGeoJobParameter[name];
  9900. continue;
  9901. }
  9902. tempObj['analyst'] = tempObj['analyst'] || {};
  9903. tempObj['analyst'][name] = _OverlayGeoJobParameter[name];
  9904. if (name === 'mappingParameters') {
  9905. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  9906. tempObj['analyst']['mappingParameters'] = _OverlayGeoJobParameter[name];
  9907. }
  9908. }
  9909. }
  9910. }]);
  9911. return OverlayGeoJobParameter;
  9912. }();
  9913. ;// CONCATENATED MODULE: ./src/common/iServer/BuffersAnalystJobsParameter.js
  9914. function BuffersAnalystJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9915. function BuffersAnalystJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9916. function BuffersAnalystJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) BuffersAnalystJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) BuffersAnalystJobsParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  9917. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  9918. * This program are made available under the terms of the Apache License, Version 2.0
  9919. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9920. /**
  9921. * @class BuffersAnalystJobsParameter
  9922. * @deprecatedclass SuperMap.BuffersAnalystJobsParameter
  9923. * @category iServer ProcessingService BufferAnalyst
  9924. * @classdesc 缓冲区分析任务参数类。
  9925. * @param {Object} options - 参数。
  9926. * @param {string} options.datasetName - 数据集名。
  9927. * @param {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} [options.bounds] - 分析范围(默认为全图范围)。
  9928. * @param {string} [options.distance='15'] - 缓冲距离,或缓冲区半径。
  9929. * @param {string} [options.distanceField='pickup_latitude'] - 缓冲区分析距离字段。
  9930. * @param {AnalystSizeUnit} [options.distanceUnit=AnalystSizeUnit.METER] - 缓冲距离单位单位。
  9931. * @param {OutputSetting} [options.output] - 输出参数设置。
  9932. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  9933. * @usage
  9934. */
  9935. var BuffersAnalystJobsParameter = /*#__PURE__*/function () {
  9936. function BuffersAnalystJobsParameter(options) {
  9937. BuffersAnalystJobsParameter_classCallCheck(this, BuffersAnalystJobsParameter);
  9938. /**
  9939. * @member {string} BuffersAnalystJobsParameter.prototype.datasetName
  9940. * @description 数据集名。
  9941. */
  9942. this.datasetName = '';
  9943. /**
  9944. * @member {(SuperMap.Bounds|L.Bounds|L.LatLngBounds|ol.extent|mapboxgl.LngLatBounds|GeoJSONObject)} BuffersAnalystJobsParameter.prototype.bounds
  9945. * @description 分析范围。
  9946. */
  9947. this.bounds = '';
  9948. /**
  9949. * @member {string} [BuffersAnalystJobsParameter.prototype.distance='15']
  9950. * @description 缓冲距离,或称为缓冲区半径。当缓冲距离字段为空时,此参数有效。
  9951. */
  9952. this.distance = '';
  9953. /**
  9954. * @member {string} [BuffersAnalystJobsParameter.prototype.distanceField='pickup_latitude']
  9955. * @description 缓冲距离字段。
  9956. */
  9957. this.distanceField = '';
  9958. /**
  9959. * @member {AnalystSizeUnit} [BuffersAnalystJobsParameter.prototype.distanceUnit=AnalystSizeUnit.METER]
  9960. * @description 缓冲距离单位。
  9961. */
  9962. this.distanceUnit = AnalystSizeUnit.METER;
  9963. /**
  9964. * @member {string} BuffersAnalystJobsParameter.prototype.dissolveField
  9965. * @description 融合字段,根据字段值对缓冲区结果面对象进行融合。
  9966. */
  9967. this.dissolveField = '';
  9968. /**
  9969. * @member {OutputSetting} [BuffersAnalystJobsParameter.prototype.output]
  9970. * @description 输出参数设置类。
  9971. */
  9972. this.output = null;
  9973. /**
  9974. * @member {MappingParameters} [BuffersAnalystJobsParameter.prototype.mappingParameters]
  9975. * @description 分析后结果可视化的参数类。
  9976. */
  9977. this.mappingParameters = null;
  9978. if (!options) {
  9979. return this;
  9980. }
  9981. Util_Util.extend(this, options);
  9982. this.CLASS_NAME = 'SuperMap.BuffersAnalystJobsParameter';
  9983. }
  9984. /**
  9985. * @function BuffersAnalystJobsParameter.prototype.destroy
  9986. * @description 释放资源,将引用资源的属性置空。
  9987. */
  9988. BuffersAnalystJobsParameter_createClass(BuffersAnalystJobsParameter, [{
  9989. key: "destroy",
  9990. value: function destroy() {
  9991. this.datasetName = null;
  9992. this.bounds = null;
  9993. this.distance = null;
  9994. this.distanceField = null;
  9995. this.distanceUnit = null;
  9996. this.dissolveField = null;
  9997. if (this.output instanceof OutputSetting) {
  9998. this.output.destroy();
  9999. this.output = null;
  10000. }
  10001. if (this.mappingParameters instanceof MappingParameters) {
  10002. this.mappingParameters.destroy();
  10003. this.mappingParameters = null;
  10004. }
  10005. }
  10006. /**
  10007. * @function BuffersAnalystJobsParameter.toObject
  10008. * @param {BuffersAnalystJobsParameter} BuffersAnalystJobsParameter - 缓冲区分析任务参数。
  10009. * @param {Object} tempObj - 目标对象。
  10010. * @description 生成缓冲区分析任务对象。
  10011. */
  10012. }], [{
  10013. key: "toObject",
  10014. value: function toObject(_BuffersAnalystJobsParameter, tempObj) {
  10015. for (var name in _BuffersAnalystJobsParameter) {
  10016. if (name === 'datasetName') {
  10017. tempObj['input'] = tempObj['input'] || {};
  10018. tempObj['input'][name] = _BuffersAnalystJobsParameter[name];
  10019. continue;
  10020. }
  10021. if (name === 'output') {
  10022. tempObj['output'] = tempObj['output'] || {};
  10023. tempObj['output'] = _BuffersAnalystJobsParameter[name];
  10024. continue;
  10025. }
  10026. tempObj['analyst'] = tempObj['analyst'] || {};
  10027. if (name === 'bounds' && _BuffersAnalystJobsParameter[name]) {
  10028. tempObj['analyst'][name] = _BuffersAnalystJobsParameter[name].toBBOX();
  10029. } else {
  10030. tempObj['analyst'][name] = _BuffersAnalystJobsParameter[name];
  10031. }
  10032. if (name === 'mappingParameters') {
  10033. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  10034. tempObj['analyst']['mappingParameters'] = _BuffersAnalystJobsParameter[name];
  10035. }
  10036. }
  10037. }
  10038. }]);
  10039. return BuffersAnalystJobsParameter;
  10040. }();
  10041. ;// CONCATENATED MODULE: ./src/common/iServer/TopologyValidatorJobsParameter.js
  10042. function TopologyValidatorJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10043. function TopologyValidatorJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10044. function TopologyValidatorJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) TopologyValidatorJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) TopologyValidatorJobsParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  10045. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  10046. * This program are made available under the terms of the Apache License, Version 2.0
  10047. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10048. /**
  10049. * @class TopologyValidatorJobsParameter
  10050. * @deprecatedclass SuperMap.TopologyValidatorJobsParameter
  10051. * @category iServer ProcessingService TopologyValidator
  10052. * @classdesc 拓扑检查分析任务参数类。
  10053. * @param {Object} options - 参数。
  10054. * @param {string} options.datasetName - 数据集名。
  10055. * @param {string} options.datasetTopology -检查对象所在的数据集名称。
  10056. * @param {TopologyValidatorRule} [options.rule=TopologyValidatorRule.REGIONNOOVERLAP] - 拓扑检查规则。
  10057. * @param {string} [options.tolerance] - 容限。
  10058. * @param {OutputSetting} [options.output] - 输出参数设置。
  10059. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  10060. * @usage
  10061. */
  10062. var TopologyValidatorJobsParameter = /*#__PURE__*/function () {
  10063. function TopologyValidatorJobsParameter(options) {
  10064. TopologyValidatorJobsParameter_classCallCheck(this, TopologyValidatorJobsParameter);
  10065. if (!options) {
  10066. return;
  10067. }
  10068. /**
  10069. * @member {string} TopologyValidatorJobsParameter.prototype.datasetName
  10070. * @description 数据集名。
  10071. */
  10072. this.datasetName = "";
  10073. /**
  10074. * @member {string} TopologyValidatorJobsParameter.prototype.datasetTopology
  10075. * @description 拓扑检查对象所在的数据集名称。
  10076. */
  10077. this.datasetTopology = "";
  10078. /**
  10079. * @member {string} [TopologyValidatorJobsParameter.prototype.tolerance]
  10080. * @description 容限,指定的拓扑错误检查时使用的容限。
  10081. */
  10082. this.tolerance = "";
  10083. /**
  10084. * @member {TopologyValidatorRule} [TopologyValidatorJobsParameter.prototype.rule=TopologyValidatorRule.REGIONNOOVERLAP]
  10085. * @description 拓扑检查模式。
  10086. */
  10087. this.rule = TopologyValidatorRule.REGIONNOOVERLAP;
  10088. /**
  10089. * @member {OutputSetting} [TopologyValidatorJobsParameter.prototype.output]
  10090. * @description 输出参数设置类。
  10091. */
  10092. this.output = null;
  10093. /**
  10094. * @member {MappingParameters} [TopologyValidatorJobsParameter.prototype.mappingParameters]
  10095. * @description 分析后结果可视化的参数类。
  10096. */
  10097. this.mappingParameters = null;
  10098. Util_Util.extend(this, options);
  10099. this.CLASS_NAME = "SuperMap.TopologyValidatorJobsParameter";
  10100. }
  10101. /**
  10102. * @function TopologyValidatorJobsParameter.prototype.destroy
  10103. * @description 释放资源,将引用资源的属性置空。
  10104. */
  10105. TopologyValidatorJobsParameter_createClass(TopologyValidatorJobsParameter, [{
  10106. key: "destroy",
  10107. value: function destroy() {
  10108. this.datasetName = null;
  10109. this.datasetTopology = null;
  10110. this.tolerance = null;
  10111. this.rule = null;
  10112. if (this.output instanceof OutputSetting) {
  10113. this.output.destroy();
  10114. this.output = null;
  10115. }
  10116. if (this.mappingParameters instanceof MappingParameters) {
  10117. this.mappingParameters.destroy();
  10118. this.mappingParameters = null;
  10119. }
  10120. }
  10121. /**
  10122. * @function TopologyValidatorJobsParameter.toObject
  10123. * @param {Object} TopologyValidatorJobsParameter -拓扑检查分析任务参数。
  10124. * @param {Object} tempObj - 目标对象。
  10125. * @description 生成拓扑检查分析任务对象。
  10126. */
  10127. }], [{
  10128. key: "toObject",
  10129. value: function toObject(_TopologyValidatorJobsParameter, tempObj) {
  10130. for (var name in _TopologyValidatorJobsParameter) {
  10131. if (name === "datasetName") {
  10132. tempObj['input'] = tempObj['input'] || {};
  10133. tempObj['input'][name] = _TopologyValidatorJobsParameter[name];
  10134. continue;
  10135. }
  10136. if (name === "output") {
  10137. tempObj['output'] = tempObj['output'] || {};
  10138. tempObj['output'] = _TopologyValidatorJobsParameter[name];
  10139. continue;
  10140. }
  10141. tempObj['analyst'] = tempObj['analyst'] || {};
  10142. tempObj['analyst'][name] = _TopologyValidatorJobsParameter[name];
  10143. if (name === 'mappingParameters') {
  10144. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  10145. tempObj['analyst']['mappingParameters'] = _TopologyValidatorJobsParameter[name];
  10146. }
  10147. }
  10148. }
  10149. }]);
  10150. return TopologyValidatorJobsParameter;
  10151. }();
  10152. ;// CONCATENATED MODULE: ./src/common/iServer/GeoCodingParameter.js
  10153. function GeoCodingParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10154. function GeoCodingParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10155. function GeoCodingParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) GeoCodingParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) GeoCodingParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  10156. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  10157. * This program are made available under the terms of the Apache License, Version 2.0
  10158. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10159. /**
  10160. * @class GeoCodingParameter
  10161. * @deprecatedclass SuperMap.GeoCodingParameter
  10162. * @category iServer AddressMatch
  10163. * @classdesc 地理正向匹配参数类。
  10164. * @param {Object} options - 参数。
  10165. * @param {string} options.address - 地点关键词。
  10166. * @param {number} [options.fromIndex] - 设置返回对象的起始索引值。
  10167. * @param {number} [options.toIndex] - 设置返回对象的结束索引值。
  10168. * @param {Array.<string>} [options.filters] - 过滤字段,限定查询区域。
  10169. * @param {string} [options.prjCoordSys] - 查询结果的坐标系。
  10170. * @param {number} [options.maxReturn] - 最大返回结果数。
  10171. * @usage
  10172. */
  10173. var GeoCodingParameter = /*#__PURE__*/function () {
  10174. function GeoCodingParameter(options) {
  10175. GeoCodingParameter_classCallCheck(this, GeoCodingParameter);
  10176. if (options.filters && typeof options.filters === 'string') {
  10177. options.filters = options.filters.split(',');
  10178. }
  10179. /**
  10180. * @member {string} GeoCodingParameter.prototype.address
  10181. * @description 地点关键词。
  10182. */
  10183. this.address = null;
  10184. /**
  10185. * @member {number} [GeoCodingParameter.prototype.fromIndex]
  10186. * @description 设置返回对象的起始索引值。
  10187. */
  10188. this.fromIndex = null;
  10189. /**
  10190. * @member {number} [GeoCodingParameter.prototype.toIndex]
  10191. * @description 设置返回对象的结束索引值。
  10192. */
  10193. this.toIndex = null;
  10194. /**
  10195. * @member {Array.<string>} [GeoCodingParameter.prototype.filters]
  10196. * @description 过滤字段,限定查询区域。
  10197. */
  10198. this.filters = null;
  10199. /**
  10200. * @member {string} [GeoCodingParameter.prototype.prjCoordSys]
  10201. * @description 查询结果的坐标系。
  10202. */
  10203. this.prjCoordSys = null;
  10204. /**
  10205. * @member {number} [GeoCodingParameter.prototype.maxReturn]
  10206. * @description 最大返回结果数。
  10207. */
  10208. this.maxReturn = null;
  10209. Util_Util.extend(this, options);
  10210. }
  10211. /**
  10212. * @function GeoCodingParameter.prototype.destroy
  10213. * @description 释放资源,将引用资源的属性置空。
  10214. */
  10215. GeoCodingParameter_createClass(GeoCodingParameter, [{
  10216. key: "destroy",
  10217. value: function destroy() {
  10218. this.address = null;
  10219. this.fromIndex = null;
  10220. this.toIndex = null;
  10221. this.filters = null;
  10222. this.prjCoordSys = null;
  10223. this.maxReturn = null;
  10224. }
  10225. }]);
  10226. return GeoCodingParameter;
  10227. }();
  10228. ;// CONCATENATED MODULE: ./src/common/iServer/GeoDecodingParameter.js
  10229. function GeoDecodingParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10230. function GeoDecodingParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10231. function GeoDecodingParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) GeoDecodingParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) GeoDecodingParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  10232. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  10233. * This program are made available under the terms of the Apache License, Version 2.0
  10234. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10235. /**
  10236. * @class GeoDecodingParameter
  10237. * @deprecatedclass SuperMap.GeoDecodingParameter
  10238. * @category iServer AddressMatch
  10239. * @classdesc 地理反向匹配参数类。
  10240. * @param {Object} options - 参数。
  10241. * @param {number} options.x - 查询位置的横坐标。
  10242. * @param {number} options.y - 查询位置的纵坐标。
  10243. * @param {number} [options.fromIndex] - 设置返回对象的起始索引值。
  10244. * @param {number} [options.toIndex] - 设置返回对象的结束索引值。
  10245. * @param {Array.<string>} [options.filters] - 过滤字段,限定查询区域。
  10246. * @param {string} [options.prjCoordSys] - 查询结果的坐标系。
  10247. * @param {number} [options.maxReturn] - 最大返回结果数。
  10248. * @param {number} [options.geoDecodingRadius] - 查询半径。
  10249. * @usage
  10250. */
  10251. var GeoDecodingParameter = /*#__PURE__*/function () {
  10252. function GeoDecodingParameter(options) {
  10253. GeoDecodingParameter_classCallCheck(this, GeoDecodingParameter);
  10254. if (options.filters) {
  10255. options.filters = options.filters.split(',');
  10256. }
  10257. /**
  10258. * @member {number} GeoDecodingParameter.prototype.x
  10259. * @description 查询位置的横坐标。
  10260. */
  10261. this.x = null;
  10262. /**
  10263. * @member {number} GeoDecodingParameter.prototype.y
  10264. * @description 查询位置的纵坐标。
  10265. */
  10266. this.y = null;
  10267. /**
  10268. * @member {number} [GeoDecodingParameter.prototype.fromIndex]
  10269. * @description 设置返回对象的起始索引值。
  10270. */
  10271. this.fromIndex = null;
  10272. /**
  10273. * @member {number} [GeoDecodingParameter.prototype.toIndex]
  10274. * @description 设置返回对象的结束索引值。
  10275. */
  10276. this.toIndex = null;
  10277. /**
  10278. * @member {Array.<string>} [GeoDecodingParameter.prototype.filters]
  10279. * @description 过滤字段,限定查询区域。
  10280. */
  10281. this.filters = null;
  10282. /**
  10283. * @member {string} [GeoDecodingParameter.prototype.prjCoordSys]
  10284. * @description 查询结果的坐标系。
  10285. */
  10286. this.prjCoordSys = null;
  10287. /**
  10288. * @member {number} [GeoDecodingParameter.prototype.maxReturn]
  10289. * @description 最大返回结果数。
  10290. */
  10291. this.maxReturn = null;
  10292. /**
  10293. * @member {number} GeoDecodingParameter.prototype.geoDecodingRadius
  10294. * @description 查询半径。
  10295. */
  10296. this.geoDecodingRadius = null;
  10297. Util_Util.extend(this, options);
  10298. }
  10299. /**
  10300. * @function GeoDecodingParameter.prototype.destroy
  10301. * @description 释放资源,将引用资源的属性置空。
  10302. */
  10303. GeoDecodingParameter_createClass(GeoDecodingParameter, [{
  10304. key: "destroy",
  10305. value: function destroy() {
  10306. this.x = null;
  10307. this.y = null;
  10308. this.fromIndex = null;
  10309. this.toIndex = null;
  10310. this.filters = null;
  10311. this.prjCoordSys = null;
  10312. this.maxReturn = null;
  10313. this.geoDecodingRadius = null;
  10314. }
  10315. }]);
  10316. return GeoDecodingParameter;
  10317. }();
  10318. ;// CONCATENATED MODULE: ./src/classic/SuperMap.js
  10319. var SuperMap = window.SuperMap = window.SuperMap || {};
  10320. SuperMap.REST = SuperMap.REST || {};
  10321. ;// CONCATENATED MODULE: external "function(){try{return mapv}catch(e){return {}}}()"
  10322. var external_function_try_return_mapv_catch_e_return_namespaceObject = function(){try{return mapv}catch(e){return {}}}();
  10323. ;// CONCATENATED MODULE: ./src/common/util/MapCalculateUtil.js
  10324. /**
  10325. * @function getMeterPerMapUnit
  10326. * @description 单位换算,把米|度|千米|英寸|英尺换成米。
  10327. * @category BaseTypes Util
  10328. * @param {string} mapUnit 地图单位。
  10329. * @returns {number} 返回地图的距离单位。
  10330. * @usage
  10331. * ```
  10332. * // 浏览器
  10333. * <script type="text/javascript" src="{cdn}"></script>
  10334. * <script>
  10335. * const result = {namespace}.getMeterPerMapUnit(mapUnit);
  10336. *
  10337. * </script>
  10338. *
  10339. * // ES6 Import
  10340. * import { getMeterPerMapUnit } from '{npm}';
  10341. *
  10342. * const result = getMeterPerMapUnit(mapUnit);
  10343. * ```
  10344. */
  10345. var getMeterPerMapUnit = function getMeterPerMapUnit(mapUnit) {
  10346. var earchRadiusInMeters = 6378137;
  10347. var meterPerMapUnit;
  10348. if (mapUnit === Unit.METER) {
  10349. meterPerMapUnit = 1;
  10350. } else if (mapUnit === Unit.DEGREE) {
  10351. // 每度表示多少米。
  10352. meterPerMapUnit = Math.PI * 2 * earchRadiusInMeters / 360;
  10353. } else if (mapUnit === Unit.KILOMETER) {
  10354. meterPerMapUnit = 1.0e-3;
  10355. } else if (mapUnit === Unit.INCH) {
  10356. meterPerMapUnit = 1 / 2.5399999918e-2;
  10357. } else if (mapUnit === Unit.FOOT) {
  10358. meterPerMapUnit = 0.3048;
  10359. } else {
  10360. return meterPerMapUnit;
  10361. }
  10362. return meterPerMapUnit;
  10363. };
  10364. /**
  10365. * @function getWrapNum
  10366. * @description 获取该坐标系的经纬度范围的经度或纬度。
  10367. * @category BaseTypes Util
  10368. * @param {number} x 经度或纬度。
  10369. * @param {boolean} includeMax 是否获取经度或纬度的最大值。
  10370. * @param {boolean} includeMin 是否获取经度或纬度的最小值。
  10371. * @param {number} range 坐标系的经纬度范围。
  10372. * @returns {number} 返回经度或纬度的值。
  10373. * @usage
  10374. * ```
  10375. * // 浏览器
  10376. * <script type="text/javascript" src="{cdn}"></script>
  10377. * <script>
  10378. * const result = {namespace}.getWrapNum(x, includeMax, includeMin, range);
  10379. *
  10380. * </script>
  10381. *
  10382. * // ES6 Import
  10383. * import { getWrapNum } from '{npm}';
  10384. *
  10385. * const result = getWrapNum(x, includeMax, includeMin, range);
  10386. * ```
  10387. */
  10388. function getWrapNum(x) {
  10389. var includeMax = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  10390. var includeMin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10391. var range = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [-180, 180];
  10392. var max = range[1],
  10393. min = range[0],
  10394. d = max - min;
  10395. if (x === max && includeMax) {
  10396. return x;
  10397. }
  10398. if (x === min && includeMin) {
  10399. return x;
  10400. }
  10401. var tmp = ((x - min) % d + d) % d;
  10402. if (tmp === 0 && includeMax) {
  10403. return max;
  10404. }
  10405. return ((x - min) % d + d) % d + min;
  10406. }
  10407. /**
  10408. * @function conversionDegree
  10409. * @description 转换经纬度。
  10410. * @category BaseTypes Util
  10411. * @param {number} degrees 经度或纬度。
  10412. * @returns {string} 返回度分秒。
  10413. * @usage
  10414. * ```
  10415. * // 浏览器
  10416. * <script type="text/javascript" src="{cdn}"></script>
  10417. * <script>
  10418. * const result = {namespace}.conversionDegree(degrees);
  10419. *
  10420. * </script>
  10421. *
  10422. * // ES6 Import
  10423. * import { conversionDegree } from '{npm}';
  10424. *
  10425. * const result = conversionDegree(degrees);
  10426. * ```
  10427. */
  10428. function conversionDegree(degrees) {
  10429. var degree = parseInt(degrees);
  10430. var fraction = parseInt((degrees - degree) * 60);
  10431. var second = parseInt(((degrees - degree) * 60 - fraction) * 60);
  10432. fraction = parseInt(fraction / 10) === 0 ? "0".concat(fraction) : fraction;
  10433. second = parseInt(second / 10) === 0 ? "0".concat(second) : second;
  10434. return "".concat(degree, "\xB0").concat(fraction, "'").concat(second);
  10435. }
  10436. /**
  10437. * @function scalesToResolutions
  10438. * @description 通过比例尺数组计算分辨率数组,没有传入比例尺数组时通过地图范围与地图最大级别进行计算。
  10439. * @version 11.0.1
  10440. * @param {Array} scales - 比例尺数组。
  10441. * @param {Object} bounds - 地图范围。
  10442. * @param {number} dpi - 屏幕分辨率。
  10443. * @param {string} mapUnit - 地图单位。
  10444. * @param {number} [level=22] - 地图最大级别。
  10445. * @returns {number} 分辨率。
  10446. * @usage
  10447. * ```
  10448. * // 浏览器
  10449. * <script type="text/javascript" src="{cdn}"></script>
  10450. * <script>
  10451. * const result = {namespace}.scalesToResolutions(scales, bounds, dpi, mapUnit);
  10452. *
  10453. * </script>
  10454. *
  10455. * // ES6 Import
  10456. * import { scalesToResolutions } from '{npm}';
  10457. *
  10458. * const result = scalesToResolutions(scales, bounds, dpi, mapUnit);
  10459. * ```
  10460. */
  10461. function scalesToResolutions(scales, bounds, dpi, mapUnit) {
  10462. var level = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 22;
  10463. var resolutions = [];
  10464. if (scales && scales.length > 0) {
  10465. for (var i = 0; i < scales.length; i++) {
  10466. resolutions.push(scaleToResolution(scales[i], dpi, mapUnit));
  10467. }
  10468. } else {
  10469. var maxReolution = Math.abs(bounds.left - bounds.right) / 256;
  10470. for (var _i2 = 0; _i2 < level; _i2++) {
  10471. resolutions.push(maxReolution / Math.pow(2, _i2));
  10472. }
  10473. }
  10474. return resolutions.sort(function (a, b) {
  10475. return b - a;
  10476. });
  10477. }
  10478. /**
  10479. * @function getZoomByResolution
  10480. * @description 通过分辨率获取地图级别。
  10481. * @version 11.0.1
  10482. * @param {number} resolution - 分辨率。
  10483. * @param {Array} resolutions - 分辨率数组。
  10484. * @returns {number} 地图级别。
  10485. * @usage
  10486. * ```
  10487. * // 浏览器
  10488. * <script type="text/javascript" src="{cdn}"></script>
  10489. * <script>
  10490. * const result = {namespace}.getZoomByResolution(resolution, resolutions);
  10491. *
  10492. * </script>
  10493. *
  10494. * // ES6 Import
  10495. * import { getZoomByResolution } from '{npm}';
  10496. *
  10497. * const result = getZoomByResolution(resolution, resolutions);
  10498. * ```
  10499. */
  10500. function getZoomByResolution(resolution, resolutions) {
  10501. var zoom = 0;
  10502. var minDistance;
  10503. for (var i = 0; i < resolutions.length; i++) {
  10504. if (i === 0) {
  10505. minDistance = Math.abs(resolution - resolutions[i]);
  10506. }
  10507. if (minDistance > Math.abs(resolution - resolutions[i])) {
  10508. minDistance = Math.abs(resolution - resolutions[i]);
  10509. zoom = i;
  10510. }
  10511. }
  10512. return zoom;
  10513. }
  10514. /**
  10515. * @function scaleToResolution
  10516. * @description 通过比例尺计算分辨率。
  10517. * @version 11.0.1
  10518. * @param {number} scale - 比例尺。
  10519. * @param {number} dpi - 屏幕分辨率。
  10520. * @param {string} mapUnit - 地图单位。
  10521. * @returns {number} 分辨率。
  10522. * @usage
  10523. * ```
  10524. * // 浏览器
  10525. * <script type="text/javascript" src="{cdn}"></script>
  10526. * <script>
  10527. * const result = {namespace}.scaleToResolution(scale, dpi, mapUnit);
  10528. *
  10529. * </script>
  10530. *
  10531. * // ES6 Import
  10532. * import { scaleToResolution } from '{npm}';
  10533. *
  10534. * const result = scaleToResolution(scale, dpi, mapUnit);
  10535. * ```
  10536. */
  10537. function scaleToResolution(scale, dpi, mapUnit) {
  10538. var inchPerMeter = 1 / 0.0254;
  10539. var meterPerMapUnitValue = getMeterPerMapUnit(mapUnit);
  10540. var resolution = 1 / (scale * dpi * inchPerMeter * meterPerMapUnitValue);
  10541. return resolution;
  10542. }
  10543. /**
  10544. * 范围是否相交
  10545. * @param {Array} extent1 范围1
  10546. * @param {Array} extent2 范围2
  10547. * @return {boolean} 范围是否相交。
  10548. */
  10549. function intersects(extent1, extent2) {
  10550. return extent1[0] <= extent2[2] && extent1[2] >= extent2[0] && extent1[1] <= extent2[3] && extent1[3] >= extent2[1];
  10551. }
  10552. /**
  10553. * 获取两个范围的交集
  10554. * @param {Array} extent1 Extent 1
  10555. * @param {Array} extent2 Extent 2
  10556. * @return {Array} 相交范围数组.
  10557. * @api
  10558. */
  10559. function getIntersection(extent1, extent2) {
  10560. var intersection = [];
  10561. if (intersects(extent1, extent2)) {
  10562. if (extent1[0] > extent2[0]) {
  10563. intersection[0] = extent1[0];
  10564. } else {
  10565. intersection[0] = extent2[0];
  10566. }
  10567. if (extent1[1] > extent2[1]) {
  10568. intersection[1] = extent1[1];
  10569. } else {
  10570. intersection[1] = extent2[1];
  10571. }
  10572. if (extent1[2] < extent2[2]) {
  10573. intersection[2] = extent1[2];
  10574. } else {
  10575. intersection[2] = extent2[2];
  10576. }
  10577. if (extent1[3] < extent2[3]) {
  10578. intersection[3] = extent1[3];
  10579. } else {
  10580. intersection[3] = extent2[3];
  10581. }
  10582. }
  10583. return intersection;
  10584. }
  10585. ;// CONCATENATED MODULE: ./src/classic/overlay/mapv/MapVRenderer.js
  10586. function MapVRenderer_typeof(obj) { "@babel/helpers - typeof"; return MapVRenderer_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, MapVRenderer_typeof(obj); }
  10587. function MapVRenderer_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10588. function MapVRenderer_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10589. function MapVRenderer_createClass(Constructor, protoProps, staticProps) { if (protoProps) MapVRenderer_defineProperties(Constructor.prototype, protoProps); if (staticProps) MapVRenderer_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  10590. function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
  10591. function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
  10592. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
  10593. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  10594. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  10595. function _possibleConstructorReturn(self, call) { if (call && (MapVRenderer_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
  10596. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10597. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  10598. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  10599. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  10600. * This program are made available under the terms of the Apache License, Version 2.0
  10601. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10602. /**
  10603. * @class MapVRenderer
  10604. * @classdesc MapV渲染器。
  10605. * @private
  10606. * @extends {mapv.baiduMapLayer}
  10607. * @param {SuperMap.Map} map - 待渲染的地图。
  10608. * @param {SuperMap.Layer.MapVLayer} layer - 待渲染的图层。
  10609. * @param {Mapv.DataSet} dataSet - 待渲染的数据集,数据所属坐标系要求与 map 保持一致。
  10610. * @param {Object} options - 渲染的参数。
  10611. */
  10612. var MapVBaseLayer = external_function_try_return_mapv_catch_e_return_namespaceObject.baiduMapLayer ? external_function_try_return_mapv_catch_e_return_namespaceObject.baiduMapLayer.__proto__ : Function;
  10613. var MapVRenderer = /*#__PURE__*/function (_MapVBaseLayer) {
  10614. _inherits(MapVRenderer, _MapVBaseLayer);
  10615. var _super = _createSuper(MapVRenderer);
  10616. function MapVRenderer(map, layer, dataSet, options) {
  10617. var _this;
  10618. MapVRenderer_classCallCheck(this, MapVRenderer);
  10619. _this = _super.call(this, map, dataSet, options);
  10620. if (!MapVBaseLayer) {
  10621. return _possibleConstructorReturn(_this, _assertThisInitialized(_this));
  10622. }
  10623. var self = _assertThisInitialized(_this);
  10624. options = options || {};
  10625. self.init(options);
  10626. self.argCheck(options);
  10627. _this.canvasLayer = layer;
  10628. _this.clickEvent = _this.clickEvent.bind(_assertThisInitialized(_this));
  10629. _this.mousemoveEvent = _this.mousemoveEvent.bind(_assertThisInitialized(_this));
  10630. _this.bindEvent();
  10631. return _this;
  10632. }
  10633. /**
  10634. * @function MapvRenderer.prototype.clickEvent
  10635. * @description 点击事件。
  10636. * @param {Object} e - 触发对象。
  10637. */
  10638. MapVRenderer_createClass(MapVRenderer, [{
  10639. key: "clickEvent",
  10640. value: function clickEvent(e) {
  10641. var pixel = e.xy;
  10642. var devicePixelRatio = this.devicePixelRatio || 1;
  10643. _get(_getPrototypeOf(MapVRenderer.prototype), "clickEvent", this).call(this, {
  10644. x: pixel.x / devicePixelRatio,
  10645. y: pixel.y / devicePixelRatio
  10646. }, e);
  10647. }
  10648. /**
  10649. * @function MapvRenderer.prototype.mousemoveEvent
  10650. * @description 鼠标移动事件。
  10651. * @param {Object} e - 触发对象。
  10652. */
  10653. }, {
  10654. key: "mousemoveEvent",
  10655. value: function mousemoveEvent(e) {
  10656. var pixel = e.xy;
  10657. _get(_getPrototypeOf(MapVRenderer.prototype), "mousemoveEvent", this).call(this, pixel, e);
  10658. }
  10659. /**
  10660. * @function MapvRenderer.prototype.bindEvent
  10661. * @description 绑定鼠标移动和鼠标点击事件。
  10662. */
  10663. }, {
  10664. key: "bindEvent",
  10665. value: function bindEvent() {
  10666. var map = this.map;
  10667. if (this.options.methods) {
  10668. if (this.options.methods.click) {
  10669. map.events.on({
  10670. click: this.clickEvent
  10671. });
  10672. }
  10673. if (this.options.methods.mousemove) {
  10674. map.events.on({
  10675. mousemove: this.mousemoveEvent
  10676. });
  10677. }
  10678. }
  10679. }
  10680. /**
  10681. * @function MapvRenderer.prototype.unbindEvent
  10682. * @description 解绑鼠标移动和鼠标滑动触发的事件。
  10683. */
  10684. }, {
  10685. key: "unbindEvent",
  10686. value: function unbindEvent() {
  10687. var map = this.map;
  10688. if (this.options.methods) {
  10689. if (this.options.methods.click) {
  10690. map.events.un({
  10691. click: this.clickEvent
  10692. });
  10693. }
  10694. if (this.options.methods.mousemove) {
  10695. map.events.un({
  10696. mousemove: this.mousemoveEvent
  10697. });
  10698. }
  10699. }
  10700. }
  10701. /**
  10702. * @function MapvRenderer.prototype.getContext
  10703. * @description 获取信息。
  10704. */
  10705. }, {
  10706. key: "getContext",
  10707. value: function getContext() {
  10708. return this.canvasLayer && this.canvasLayer.canvasContext;
  10709. }
  10710. /**
  10711. * @function MapvRenderer.prototype.addData
  10712. * @description 追加数据
  10713. * @param {Object} data - 待添加的数据。
  10714. * @param {Object} options - 待添加的数据信息。
  10715. */
  10716. }, {
  10717. key: "addData",
  10718. value: function addData(data, options) {
  10719. var _data = data;
  10720. if (data && data.get) {
  10721. _data = data.get();
  10722. }
  10723. this.dataSet.add(_data);
  10724. this.update({
  10725. options: options
  10726. });
  10727. }
  10728. /**
  10729. * @function MapvRenderer.prototype.updateData
  10730. * @description 更新覆盖原数据。
  10731. * @param {Object} data - 待更新的数据。
  10732. * @param {Object} options - 待更新的数据信息。
  10733. */
  10734. }, {
  10735. key: "setData",
  10736. value: function setData(data, options) {
  10737. var _data = data;
  10738. if (data && data.get) {
  10739. _data = data.get();
  10740. }
  10741. this.dataSet = this.dataSet || new external_function_try_return_mapv_catch_e_return_namespaceObject.DataSet();
  10742. this.dataSet.set(_data);
  10743. this.update({
  10744. options: options
  10745. });
  10746. }
  10747. /**
  10748. * @function MapvRenderer.prototype.getData
  10749. * @description 获取数据。
  10750. */
  10751. }, {
  10752. key: "getData",
  10753. value: function getData() {
  10754. return this.dataSet;
  10755. }
  10756. /**
  10757. * @function MapvRenderer.prototype.removeData
  10758. * @description 删除符合过滤条件的数据。
  10759. * @param {function} filter - 过滤条件。条件参数为数据项,返回值为 true,表示删除该元素;否则表示不删除。
  10760. */
  10761. }, {
  10762. key: "removeData",
  10763. value: function removeData(_filter) {
  10764. if (!this.dataSet) {
  10765. return;
  10766. }
  10767. var newData = this.dataSet.get({
  10768. filter: function filter(data) {
  10769. return _filter != null && typeof _filter === 'function' ? !_filter(data) : true;
  10770. }
  10771. });
  10772. this.dataSet.set(newData);
  10773. this.update({
  10774. options: null
  10775. });
  10776. }
  10777. /**
  10778. * @function MapvRenderer.prototype.clearData
  10779. * @description 清除数据。
  10780. */
  10781. }, {
  10782. key: "clearData",
  10783. value: function clearData() {
  10784. this.dataSet && this.dataSet.clear();
  10785. this.update({
  10786. options: null
  10787. });
  10788. }
  10789. /**
  10790. * @function MapvRenderer.prototype.render
  10791. * @description 着色。
  10792. * @param {number} time
  10793. */
  10794. }, {
  10795. key: "render",
  10796. value: function render(time) {
  10797. this._canvasUpdate(time);
  10798. }
  10799. /**
  10800. * @function MapvRenderer.prototype.transferToMercator
  10801. * @description 墨卡托坐标为经纬度。
  10802. * @deprecated
  10803. */
  10804. }, {
  10805. key: "transferToMercator",
  10806. value: function transferToMercator() {
  10807. if (this.options.coordType && ['bd09mc', 'coordinates_mercator'].indexOf(this.options.coordType) > -1) {
  10808. var data = this.dataSet.get();
  10809. data = this.dataSet.transferCoordinate(data, function (coordinates) {
  10810. var pixel = SuperMap.Projection.transform({
  10811. x: coordinates[0],
  10812. y: coordinates[1]
  10813. }, 'EPSG:3857', 'EPSG:4326');
  10814. return [pixel.x, pixel.y];
  10815. }, 'coordinates', 'coordinates');
  10816. this.dataSet._set(data);
  10817. }
  10818. }
  10819. }, {
  10820. key: "_canvasUpdate",
  10821. value: function _canvasUpdate(time) {
  10822. if (!this.canvasLayer) {
  10823. return;
  10824. }
  10825. var self = this;
  10826. var animationOptions = self.options.animation;
  10827. var context = this.getContext();
  10828. var map = this.map;
  10829. if (self.isEnabledTime()) {
  10830. if (time === undefined) {
  10831. this.clear(context);
  10832. return;
  10833. }
  10834. if (this.context === '2d') {
  10835. context.save();
  10836. context.globalCompositeOperation = 'destination-out';
  10837. context.fillStyle = 'rgba(0, 0, 0, .1)';
  10838. context.fillRect(0, 0, context.canvas.width, context.canvas.height);
  10839. context.restore();
  10840. }
  10841. } else {
  10842. this.clear(context);
  10843. }
  10844. if (this.context === '2d') {
  10845. for (var key in self.options) {
  10846. context[key] = self.options[key];
  10847. }
  10848. } else {
  10849. context.clear(context.COLOR_BUFFER_BIT);
  10850. }
  10851. if (self.options.minZoom && map.getZoom() < self.options.minZoom || self.options.maxZoom && map.getZoom() > self.options.maxZoom) {
  10852. return;
  10853. }
  10854. var layer = self.canvasLayer;
  10855. var dataGetOptions = {
  10856. fromColumn: 'coordinates',
  10857. transferCoordinate: function transferCoordinate(coordinate) {
  10858. var coord = {
  10859. lon: coordinate[0],
  10860. lat: coordinate[1]
  10861. };
  10862. var worldPoint = map.getViewPortPxFromLonLat(coord);
  10863. return [worldPoint.x, worldPoint.y];
  10864. }
  10865. };
  10866. if (time !== undefined) {
  10867. dataGetOptions.filter = function (item) {
  10868. var trails = animationOptions.trails || 10;
  10869. return time && item.time > time - trails && item.time < time;
  10870. };
  10871. }
  10872. var data = self.dataSet.get(dataGetOptions);
  10873. this.processData(data);
  10874. // 一个像素是多少米
  10875. var zoomUnit = map.getResolution() * getMeterPerMapUnit('DEGREE');
  10876. // // 兼容unit为'm'的情况
  10877. if (self.options.unit === 'm') {
  10878. if (self.options.size) {
  10879. self.options._size = self.options.size / zoomUnit;
  10880. }
  10881. if (self.options.width) {
  10882. self.options._width = self.options.width / zoomUnit;
  10883. }
  10884. if (self.options.height) {
  10885. self.options._height = self.options.height / zoomUnit;
  10886. }
  10887. } else {
  10888. self.options._size = self.options.size;
  10889. self.options._height = self.options.height;
  10890. self.options._width = self.options.width;
  10891. }
  10892. var worldPoint = map.getViewPortPxFromLonLat(layer.transferToMapLatLng({
  10893. lon: 0,
  10894. lat: 0
  10895. }));
  10896. this.drawContext(context, data, self.options, worldPoint);
  10897. self.options.updateCallback && self.options.updateCallback(time);
  10898. }
  10899. }, {
  10900. key: "init",
  10901. value: function init(options) {
  10902. var self = this;
  10903. self.options = options;
  10904. this.initDataRange(options);
  10905. this.context = self.options.context || '2d';
  10906. if (self.options.zIndex) {
  10907. this.canvasLayer && this.canvasLayer.setZIndex(self.options.zIndex);
  10908. }
  10909. this.initAnimator();
  10910. }
  10911. /**
  10912. * @function MapvRenderer.prototype.addAnimatorEvent
  10913. * @description 添加动画事件。
  10914. */
  10915. }, {
  10916. key: "addAnimatorEvent",
  10917. value: function addAnimatorEvent() {
  10918. this.map.events.on({
  10919. movestart: this.animatorMovestartEvent.bind(this)
  10920. });
  10921. this.map.events.on({
  10922. moveend: this.animatorMoveendEvent.bind(this)
  10923. });
  10924. }
  10925. /**
  10926. * @function MapvRenderer.prototype.clear
  10927. * @description 清除环境。
  10928. * @param {Object} context - 当前环境。
  10929. */
  10930. }, {
  10931. key: "clear",
  10932. value: function clear(context) {
  10933. context && context.clearRect && context.clearRect(0, 0, context.canvas.width, context.canvas.height);
  10934. }
  10935. /**
  10936. * @function MapvRenderer.prototype.show
  10937. * @description 展示渲染效果。
  10938. */
  10939. }, {
  10940. key: "show",
  10941. value: function show() {
  10942. this.map.addLayer(this.canvasLayer);
  10943. }
  10944. /**
  10945. * @function MapvRenderer.prototype.hide
  10946. * @description 隐藏渲染效果。
  10947. */
  10948. }, {
  10949. key: "hide",
  10950. value: function hide() {
  10951. this.map.removeLayer(this.canvasLayer);
  10952. }
  10953. /**
  10954. * @function MapvRenderer.prototype.draw
  10955. * @description 渲染绘制。
  10956. */
  10957. }, {
  10958. key: "draw",
  10959. value: function draw() {
  10960. this.canvasLayer.redraw();
  10961. }
  10962. }]);
  10963. return MapVRenderer;
  10964. }(MapVBaseLayer);
  10965. ;// CONCATENATED MODULE: ./src/classic/overlay/MapVLayer.js
  10966. function MapVLayer_typeof(obj) { "@babel/helpers - typeof"; return MapVLayer_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, MapVLayer_typeof(obj); }
  10967. function MapVLayer_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10968. function MapVLayer_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10969. function MapVLayer_createClass(Constructor, protoProps, staticProps) { if (protoProps) MapVLayer_defineProperties(Constructor.prototype, protoProps); if (staticProps) MapVLayer_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  10970. function MapVLayer_get() { if (typeof Reflect !== "undefined" && Reflect.get) { MapVLayer_get = Reflect.get.bind(); } else { MapVLayer_get = function _get(target, property, receiver) { var base = MapVLayer_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return MapVLayer_get.apply(this, arguments); }
  10971. function MapVLayer_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = MapVLayer_getPrototypeOf(object); if (object === null) break; } return object; }
  10972. function MapVLayer_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) MapVLayer_setPrototypeOf(subClass, superClass); }
  10973. function MapVLayer_setPrototypeOf(o, p) { MapVLayer_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return MapVLayer_setPrototypeOf(o, p); }
  10974. function MapVLayer_createSuper(Derived) { var hasNativeReflectConstruct = MapVLayer_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = MapVLayer_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = MapVLayer_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return MapVLayer_possibleConstructorReturn(this, result); }; }
  10975. function MapVLayer_possibleConstructorReturn(self, call) { if (call && (MapVLayer_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return MapVLayer_assertThisInitialized(self); }
  10976. function MapVLayer_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10977. function MapVLayer_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  10978. function MapVLayer_getPrototypeOf(o) { MapVLayer_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return MapVLayer_getPrototypeOf(o); }
  10979. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  10980. * This program are made available under the terms of the Apache License, Version 2.0
  10981. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10982. /**
  10983. * @class SuperMap.Layer.MapVLayer
  10984. * @category Visualization MapV
  10985. * @classdesc MapV 图层类。
  10986. * @modulecategory Overlay
  10987. * @extends {SuperMap.Layer}
  10988. * @param {string} name - 图层名。
  10989. * @param {Object} options - 可选参数。
  10990. * @param {Mapv.DataSet} options.dataSet - MapV 的 dataSet 对象。
  10991. * @param {Object} options.options - MapV 绘图风格配置信息。
  10992. */
  10993. var MapVLayer = /*#__PURE__*/function (_SuperMap$Layer) {
  10994. MapVLayer_inherits(MapVLayer, _SuperMap$Layer);
  10995. var _super = MapVLayer_createSuper(MapVLayer);
  10996. function MapVLayer(name, options) {
  10997. var _this;
  10998. MapVLayer_classCallCheck(this, MapVLayer);
  10999. _this = _super.call(this, name, options);
  11000. /**
  11001. * @member {Mapv.DataSet} SuperMap.Layer.MapVLayer.prototype.dataSet
  11002. * @description MapV 的 dataset 对象。
  11003. */
  11004. _this.dataSet = null;
  11005. /**
  11006. * @member {Object} SuperMap.Layer.MapVLayer.prototype.options
  11007. * @description MapV 绘图风格配置信息。
  11008. */
  11009. _this.options = null;
  11010. /**
  11011. * @member {boolean} [SuperMap.Layer.MapVLayer.prototype.supported=false]
  11012. * @description 当前浏览器是否支持 canvas 绘制。决定了 MapV 图是否可用,内部判断使用。
  11013. */
  11014. _this.supported = false;
  11015. /**
  11016. * @member {HTMLCanvasElement} SuperMap.Layer.MapVLayer.prototype.canvas
  11017. * @description MapV 图主绘制面板。
  11018. */
  11019. _this.canvas = null;
  11020. /**
  11021. * @private
  11022. * @member {CanvasContext} SuperMap.Layer.MapVLayer.prototype.canvasContext
  11023. * @description MapV 图主绘制对象。
  11024. */
  11025. _this.canvasContext = null;
  11026. if (options) {
  11027. SuperMap.Util.extend(MapVLayer_assertThisInitialized(_this), options);
  11028. }
  11029. //MapV图要求使用canvas绘制,判断是否支持
  11030. _this.canvas = document.createElement('canvas');
  11031. if (!_this.canvas.getContext) {
  11032. return MapVLayer_possibleConstructorReturn(_this);
  11033. }
  11034. _this.supported = true;
  11035. //构建绘图面板
  11036. _this.canvas.style.position = 'absolute';
  11037. _this.canvas.style.top = 0 + 'px';
  11038. _this.canvas.style.left = 0 + 'px';
  11039. _this.div.appendChild(_this.canvas);
  11040. var context = _this.options && _this.options.context || '2d';
  11041. _this.canvasContext = _this.canvas.getContext(context);
  11042. var global$2 = typeof window === 'undefined' ? {} : window;
  11043. var devicePixelRatio = _this.devicePixelRatio = global$2.devicePixelRatio || 1;
  11044. if (context === '2d') {
  11045. _this.canvasContext.scale(devicePixelRatio, devicePixelRatio);
  11046. }
  11047. _this.attribution = "© 2018 百度 <a href='https://mapv.baidu.com' target='_blank'>MapV</a> with <span>© <a target='_blank' href='https://iclient.supermap.io' " + "style='color: #08c;text-decoration: none;'>SuperMap iClient</a></span>";
  11048. _this.CLASS_NAME = 'SuperMap.Layer.MapVLayer';
  11049. return _this;
  11050. }
  11051. /**
  11052. * @function SuperMap.Layer.MapVLayer.prototype.destroy
  11053. * @description 销毁此图层,销毁后此图层的所有属性为 null。
  11054. * @override
  11055. */
  11056. MapVLayer_createClass(MapVLayer, [{
  11057. key: "destroy",
  11058. value: function destroy() {
  11059. if (this.renderer && this.renderer.animator) {
  11060. this.renderer.animator.stop();
  11061. this.renderer.animator = null;
  11062. }
  11063. this.dataSet = null;
  11064. this.options = null;
  11065. this.renderer = null;
  11066. this.supported = null;
  11067. this.canvas = null;
  11068. this.canvasContext = null;
  11069. this.maxWidth = null;
  11070. this.maxHeight = null;
  11071. MapVLayer_get(MapVLayer_getPrototypeOf(MapVLayer.prototype), "destroy", this).call(this);
  11072. }
  11073. /**
  11074. * @function SuperMap.Layer.MapVLayer.prototype.addData
  11075. * @description 追加数据。
  11076. * @param {Mapv.DataSet} dataSet - MapV 的 dataSet 对象。
  11077. * @param {Object} options - MapV 绘图风格配置信息。
  11078. */
  11079. }, {
  11080. key: "addData",
  11081. value: function addData(dataSet, options) {
  11082. this.renderer && this.renderer.addData(dataSet, options);
  11083. }
  11084. /**
  11085. * @function SuperMap.Layer.MapVLayer.prototype.
  11086. * @description 设置数据。
  11087. * @param {Mapv.DataSet} dataSet - MapV 的 dataSet 对象。
  11088. * @param {Object} options - MapV 绘图风格配置信息。
  11089. */
  11090. }, {
  11091. key: "setData",
  11092. value: function setData(dataSet, options) {
  11093. this.renderer && this.renderer.setData(dataSet, options);
  11094. }
  11095. /**
  11096. * @function SuperMap.Layer.MapVLayer.prototype.getData
  11097. * @description 获取数据。
  11098. * @returns {Mapv.DataSet} MapV 的 dataSet 对象。
  11099. */
  11100. }, {
  11101. key: "getData",
  11102. value: function getData() {
  11103. if (this.renderer) {
  11104. this.dataSet = this.renderer.getData();
  11105. }
  11106. return this.dataSet;
  11107. }
  11108. /**
  11109. * @function SuperMap.Layer.MapVLayer.prototype.removeData
  11110. * @description 删除符合过滤条件的数据。
  11111. * @param {function} filter - 过滤条件。条件参数为数据项,返回值为 true,表示删除该元素;否则表示不删除。
  11112. * @example
  11113. * filter=function(data){
  11114. * if(data.id=="1"){
  11115. * return true
  11116. * }
  11117. * return false;
  11118. * }
  11119. */
  11120. }, {
  11121. key: "removeData",
  11122. value: function removeData(filter) {
  11123. this.renderer && this.renderer.removeData(filter);
  11124. }
  11125. /**
  11126. * @function SuperMap.Layer.MapVLayer.prototype.clearData
  11127. * @description 清除数据。
  11128. */
  11129. }, {
  11130. key: "clearData",
  11131. value: function clearData() {
  11132. this.renderer.clearData();
  11133. }
  11134. /**
  11135. * @function SuperMap.Layer.MapVLayer.prototype.setMap
  11136. * @description 图层已经添加到 Map 中。
  11137. * 如果当前浏览器支持 canvas,则开始渲染要素;如果不支持则移除图层。
  11138. * @param {SuperMap.Map} map - 需要绑定的 map 对象。
  11139. */
  11140. }, {
  11141. key: "setMap",
  11142. value: function setMap(map) {
  11143. MapVLayer_get(MapVLayer_getPrototypeOf(MapVLayer.prototype), "setMap", this).call(this, map);
  11144. this.renderer = new MapVRenderer(map, this, this.dataSet, this.options);
  11145. this.renderer.devicePixelRatio = this.devicePixelRatio;
  11146. if (!this.supported) {
  11147. this.map.removeLayer(this);
  11148. } else {
  11149. this.redraw();
  11150. }
  11151. }
  11152. /**
  11153. * @function SuperMap.Layer.MapVLayer.prototype.moveTo
  11154. * @description 重置当前 MapV 图层的 div,再一次与 Map 控件保持一致。
  11155. * 修改当前显示范围,当平移或者缩放结束后开始重绘 MapV 图的渲染效果。
  11156. * @param {SuperMap.Bounds} bounds - 图层范围。
  11157. * @param {boolean} [zoomChanged] - 缩放级别是否改变。
  11158. * @param {boolean} [dragging] - 是否拖动。
  11159. */
  11160. }, {
  11161. key: "moveTo",
  11162. value: function moveTo(bounds, zoomChanged, dragging) {
  11163. MapVLayer_get(MapVLayer_getPrototypeOf(MapVLayer.prototype), "moveTo", this).call(this, bounds, zoomChanged, dragging);
  11164. if (!this.supported) {
  11165. return;
  11166. }
  11167. this.zoomChanged = zoomChanged;
  11168. if (!dragging) {
  11169. this.div.style.visibility = 'hidden';
  11170. this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + 'px';
  11171. this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + 'px';
  11172. /*this.canvas.style.left = this.div.style.left;
  11173. this.canvas.style.top = this.div.style.top;*/
  11174. var size = this.map.getSize();
  11175. this.div.style.width = parseInt(size.w) + 'px';
  11176. this.div.style.height = parseInt(size.h) + 'px';
  11177. if (this.options.draw === 'heatmap') {
  11178. this.canvas.width = parseInt(size.w) * this.devicePixelRatio;
  11179. this.canvas.height = parseInt(size.h) * this.devicePixelRatio;
  11180. } else {
  11181. this.canvas.width = parseInt(size.w);
  11182. this.canvas.height = parseInt(size.h);
  11183. }
  11184. this.canvas.style.width = this.div.style.width;
  11185. this.canvas.style.height = this.div.style.height;
  11186. this.maxWidth = size.w;
  11187. this.maxHeight = size.h;
  11188. this.div.style.visibility = '';
  11189. if (!zoomChanged) {
  11190. this.renderer && this.renderer.render();
  11191. }
  11192. }
  11193. if (zoomChanged) {
  11194. this.renderer && this.renderer.render();
  11195. }
  11196. }
  11197. /**
  11198. * @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
  11199. * @description 将经纬度转成底图的投影坐标。
  11200. * @param {SuperMap.LonLat} latLng - 经纬度坐标。
  11201. * @deprecated
  11202. */
  11203. }, {
  11204. key: "transferToMapLatLng",
  11205. value: function transferToMapLatLng(latLng) {
  11206. var source = 'EPSG:4326',
  11207. dest = 'EPSG:4326';
  11208. var unit = this.map.getUnits() || 'degree';
  11209. if (['m', 'meter'].indexOf(unit.toLowerCase()) > -1) {
  11210. dest = 'EPSG:3857';
  11211. }
  11212. return new SuperMap.LonLat(latLng.lon, latLng.lat).transform(source, dest);
  11213. }
  11214. }]);
  11215. return MapVLayer;
  11216. }(SuperMap.Layer);
  11217. SuperMap.Layer.MapVLayer = MapVLayer;
  11218. ;// CONCATENATED MODULE: ./src/classic/overlay/mapv/index.js
  11219. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  11220. * This program are made available under the terms of the Apache License, Version 2.0
  11221. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11222. ;// CONCATENATED MODULE: ./src/classic/overlay/index.js
  11223. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  11224. * This program are made available under the terms of the Apache License, Version 2.0
  11225. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11226. ;// CONCATENATED MODULE: ./src/common/format/Format.js
  11227. function Format_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  11228. function Format_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  11229. function Format_createClass(Constructor, protoProps, staticProps) { if (protoProps) Format_defineProperties(Constructor.prototype, protoProps); if (staticProps) Format_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  11230. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  11231. * This program are made available under the terms of the Apache License, Version 2.0
  11232. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11233. /**
  11234. * @class Format
  11235. * @deprecatedclass SuperMap.Format
  11236. * @classdesc 读写各种格式的格式类基类。其子类应该包含并实现 read 和 write 方法。
  11237. * @category BaseTypes Format
  11238. * @param {Object} options - 可选参数。
  11239. * @param {boolean} [options.keepData=false] - 如果设置为 true, data 属性会指向被解析的对象(例如 JSON 或 xml 数据对象)。
  11240. * @param {Object} [options.data] - 当 keepData 属性设置为 true,这是传递给 read 操作的要被解析的字符串。
  11241. * @usage
  11242. */
  11243. var Format = /*#__PURE__*/function () {
  11244. function Format(options) {
  11245. Format_classCallCheck(this, Format);
  11246. /**
  11247. * @member {Object} Format.prototype.data
  11248. * @description 当 keepData 属性设置为 true,这是传递给 read 操作的要被解析的字符串。
  11249. */
  11250. this.data = null;
  11251. /**
  11252. * @member {Object} [Format.prototype.keepData=false]
  11253. * @description 保持最近读到的数据的引用(通过 data 属性)。
  11254. */
  11255. this.keepData = false;
  11256. Util_Util.extend(this, options);
  11257. this.options = options;
  11258. this.CLASS_NAME = "SuperMap.Format";
  11259. }
  11260. /**
  11261. * @function Format.prototype.destroy
  11262. * @description 销毁该格式类,释放相关资源。
  11263. */
  11264. Format_createClass(Format, [{
  11265. key: "destroy",
  11266. value: function destroy() {
  11267. //用来销毁该格式类,释放相关资源
  11268. }
  11269. /**
  11270. * @function Format.prototype.read
  11271. * @description 来从字符串中读取数据。
  11272. * @param {string} data - 读取的数据。
  11273. */
  11274. }, {
  11275. key: "read",
  11276. value: function read(data) {// eslint-disable-line no-unused-vars
  11277. //用来从字符串中读取数据
  11278. }
  11279. /**
  11280. * @function Format.prototype.write
  11281. * @description 将对象写成字符串。
  11282. * @param {Object} object - 可序列化的对象。
  11283. * @returns {string} 对象转化后的字符串。
  11284. */
  11285. }, {
  11286. key: "write",
  11287. value: function write(object) {// eslint-disable-line no-unused-vars
  11288. //用来写字符串
  11289. }
  11290. }]);
  11291. return Format;
  11292. }();
  11293. ;// CONCATENATED MODULE: ./src/common/format/JSON.js
  11294. function JSON_typeof(obj) { "@babel/helpers - typeof"; return JSON_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, JSON_typeof(obj); }
  11295. function JSON_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  11296. function JSON_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  11297. function JSON_createClass(Constructor, protoProps, staticProps) { if (protoProps) JSON_defineProperties(Constructor.prototype, protoProps); if (staticProps) JSON_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  11298. function JSON_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) JSON_setPrototypeOf(subClass, superClass); }
  11299. function JSON_setPrototypeOf(o, p) { JSON_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return JSON_setPrototypeOf(o, p); }
  11300. function JSON_createSuper(Derived) { var hasNativeReflectConstruct = JSON_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = JSON_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = JSON_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return JSON_possibleConstructorReturn(this, result); }; }
  11301. function JSON_possibleConstructorReturn(self, call) { if (call && (JSON_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return JSON_assertThisInitialized(self); }
  11302. function JSON_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  11303. function JSON_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  11304. function JSON_getPrototypeOf(o) { JSON_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return JSON_getPrototypeOf(o); }
  11305. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  11306. * This program are made available under the terms of the Apache License, Version 2.0
  11307. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11308. /**
  11309. * @class JSONFormat
  11310. * @aliasclass Format.JSON
  11311. * @deprecatedclass SuperMap.Format.JSON
  11312. * @classdesc 安全的读写 JSON 的解析类。使用 {@link JSONFormat} 构造函数创建新实例。
  11313. * @category BaseTypes Format
  11314. * @param {Object} [options] - 可选参数。
  11315. * @param {string} [options.indent=" "] - 用于格式化输出,indent 字符串会在每次缩进的时候使用一次。
  11316. * @param {string} [options.space=" "] - 用于格式化输出,space 字符串会在名值对的 ":" 后边添加。
  11317. * @param {string} [options.newline="\n"] - 用于格式化输出, newline 字符串会用在每一个名值对或数组项末尾。
  11318. * @param {number} [options.level=0] - 用于格式化输出, 表示的是缩进级别。
  11319. * @param {boolean} [options.pretty=false] - 是否在序列化的时候使用额外的空格控制结构。在 write 方法中使用。
  11320. * @param {boolean} [options.nativeJSON] - 需要被注册的监听器对象。
  11321. * @extends {Format}
  11322. * @usage
  11323. */
  11324. var JSONFormat = /*#__PURE__*/function (_Format) {
  11325. JSON_inherits(JSONFormat, _Format);
  11326. var _super = JSON_createSuper(JSONFormat);
  11327. function JSONFormat(options) {
  11328. var _this;
  11329. JSON_classCallCheck(this, JSONFormat);
  11330. _this = _super.call(this, options);
  11331. /**
  11332. * @member {string} [JSONFormat.prototype.indent=" "]
  11333. * @description 用于格式化输出,indent 字符串会在每次缩进的时候使用一次。
  11334. */
  11335. _this.indent = " ";
  11336. /**
  11337. * @member {string} [JSONFormat.prototype.space=" "]
  11338. * @description 用于格式化输出,space 字符串会在名值对的 ":" 后边添加。
  11339. */
  11340. _this.space = " ";
  11341. /**
  11342. * @member {string} [JSONFormat.prototype.newline="\n"]
  11343. * @description 用于格式化输出, newline 字符串会用在每一个名值对或数组项末尾。
  11344. */
  11345. _this.newline = "\n";
  11346. /**
  11347. * @member {number} [JSONFormat.prototype.level=0]
  11348. * @description 用于格式化输出, 表示的是缩进级别。
  11349. */
  11350. _this.level = 0;
  11351. /**
  11352. * @member {boolean} [JSONFormat.prototype.pretty=false]
  11353. * @description 是否在序列化的时候使用额外的空格控制结构。在 write 方法中使用。
  11354. */
  11355. _this.pretty = false;
  11356. /**
  11357. * @member {boolean} JSONFormat.prototype.nativeJSON
  11358. * @description 判断浏览器是否原生支持 JSON 格式数据。
  11359. */
  11360. _this.nativeJSON = function () {
  11361. return !!(window.JSON && typeof JSON.parse === "function" && typeof JSON.stringify === "function");
  11362. }();
  11363. _this.CLASS_NAME = "SuperMap.Format.JSON";
  11364. /**
  11365. * @member JSONFormat.prototype.serialize
  11366. * @description 提供一些类型对象转 JSON 字符串的方法。
  11367. */
  11368. _this.serialize = {
  11369. /**
  11370. * @function JSONFormat.serialize.object
  11371. * @description 把对象转换为 JSON 字符串。
  11372. * @param {Object} object - 可序列化的对象。
  11373. * @returns {string} JSON 字符串。
  11374. */
  11375. 'object': function object(_object) {
  11376. // three special objects that we want to treat differently
  11377. if (_object == null) {
  11378. return "null";
  11379. }
  11380. if (_object.constructor === Date) {
  11381. return this.serialize.date.apply(this, [_object]);
  11382. }
  11383. if (_object.constructor === Array) {
  11384. return this.serialize.array.apply(this, [_object]);
  11385. }
  11386. var pieces = ['{'];
  11387. this.level += 1;
  11388. var key, keyJSON, valueJSON;
  11389. var addComma = false;
  11390. for (key in _object) {
  11391. if (_object.hasOwnProperty(key)) {
  11392. // recursive calls need to allow for sub-classing
  11393. keyJSON = this.write.apply(this, [key, this.pretty]);
  11394. valueJSON = this.write.apply(this, [_object[key], this.pretty]);
  11395. if (keyJSON != null && valueJSON != null) {
  11396. if (addComma) {
  11397. pieces.push(',');
  11398. }
  11399. pieces.push(this.writeNewline(), this.writeIndent(), keyJSON, ':', this.writeSpace(), valueJSON);
  11400. addComma = true;
  11401. }
  11402. }
  11403. }
  11404. this.level -= 1;
  11405. pieces.push(this.writeNewline(), this.writeIndent(), '}');
  11406. return pieces.join('');
  11407. },
  11408. /**
  11409. * @function JSONFormat.serialize.array
  11410. * @description 把数组转换成 JSON 字符串。
  11411. * @param {Array} array - 可序列化的数组。
  11412. * @returns {string} JSON 字符串。
  11413. */
  11414. 'array': function array(_array) {
  11415. var json;
  11416. var pieces = ['['];
  11417. this.level += 1;
  11418. for (var i = 0, len = _array.length; i < len; ++i) {
  11419. // recursive calls need to allow for sub-classing
  11420. json = this.write.apply(this, [_array[i], this.pretty]);
  11421. if (json != null) {
  11422. if (i > 0) {
  11423. pieces.push(',');
  11424. }
  11425. pieces.push(this.writeNewline(), this.writeIndent(), json);
  11426. }
  11427. }
  11428. this.level -= 1;
  11429. pieces.push(this.writeNewline(), this.writeIndent(), ']');
  11430. return pieces.join('');
  11431. },
  11432. /**
  11433. * @function JSONFormat.serialize.string
  11434. * @description 把字符串转换成 JSON 字符串。
  11435. * @param {string} string - 可序列化的字符串。
  11436. * @returns {string} JSON 字符串。
  11437. */
  11438. 'string': function string(_string) {
  11439. // If the string contains no control characters, no quote characters, and no
  11440. // backslash characters, then we can simply slap some quotes around it.
  11441. // Otherwise we must also replace the offending characters with safe
  11442. // sequences.
  11443. var m = {
  11444. '\b': '\\b',
  11445. '\t': '\\t',
  11446. '\n': '\\n',
  11447. '\f': '\\f',
  11448. '\r': '\\r',
  11449. '"': '\\"',
  11450. '\\': '\\\\'
  11451. };
  11452. /*eslint-disable no-control-regex*/
  11453. if (/["\\\x00-\x1f]/.test(_string)) {
  11454. return '"' + _string.replace(/([\x00-\x1f\\"])/g, function (a, b) {
  11455. var c = m[b];
  11456. if (c) {
  11457. return c;
  11458. }
  11459. c = b.charCodeAt();
  11460. return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
  11461. }) + '"';
  11462. }
  11463. return '"' + _string + '"';
  11464. },
  11465. /**
  11466. * @function JSONFormat.serialize.number
  11467. * @description 把数字转换成 JSON 字符串。
  11468. * @param {number} number - 可序列化的数字。
  11469. * @returns {string} JSON 字符串。
  11470. */
  11471. 'number': function number(_number) {
  11472. return isFinite(_number) ? String(_number) : "null";
  11473. },
  11474. /**
  11475. * @function JSONFormat.serialize.boolean
  11476. * @description Transform a boolean into a JSON string.
  11477. * @param {boolean} bool - The boolean to be serialized.
  11478. * @returns {string} A JSON string representing the boolean.
  11479. */
  11480. 'boolean': function boolean(bool) {
  11481. return String(bool);
  11482. },
  11483. /**
  11484. * @function JSONFormat.serialize.object
  11485. * @description 将日期对象转换成 JSON 字符串。
  11486. * @param {Date} date - 可序列化的日期对象。
  11487. * @returns {string} JSON 字符串。
  11488. */
  11489. 'date': function date(_date) {
  11490. function format(number) {
  11491. // Format integers to have at least two digits.
  11492. return number < 10 ? '0' + number : number;
  11493. }
  11494. return '"' + _date.getFullYear() + '-' + format(_date.getMonth() + 1) + '-' + format(_date.getDate()) + 'T' + format(_date.getHours()) + ':' + format(_date.getMinutes()) + ':' + format(_date.getSeconds()) + '"';
  11495. }
  11496. };
  11497. return _this;
  11498. }
  11499. /**
  11500. * @function JSONFormat.prototype.read
  11501. * @description 将一个符合 JSON 结构的字符串进行解析。
  11502. * @param {string} json - 符合 JSON 结构的字符串。
  11503. * @param {function} filter - 过滤方法,最终结果的每一个键值对都会调用该过滤方法,并在对应的值的位置替换成该方法返回的值。
  11504. * @returns {(Object|string|Array|number|boolean)} 对象,数组,字符串或数字。
  11505. */
  11506. JSON_createClass(JSONFormat, [{
  11507. key: "read",
  11508. value: function read(json, filter) {
  11509. var object;
  11510. if (this.nativeJSON) {
  11511. try {
  11512. object = JSON.parse(json, filter);
  11513. } catch (e) {
  11514. // Fall through if the regexp test fails.
  11515. return {
  11516. data: json
  11517. };
  11518. }
  11519. }
  11520. if (this.keepData) {
  11521. this.data = object;
  11522. }
  11523. return object;
  11524. }
  11525. /**
  11526. * @function JSONFormat.prototype.write
  11527. * @description 序列化一个对象到一个符合 JSON 格式的字符串。
  11528. * @param {Object|string|Array|number|boolean} value - 需要被序列化的对象,数组,字符串,数字,布尔值。
  11529. * @param {boolean} [pretty=false] - 是否在序列化的时候使用额外的空格控制结构。在 write 方法中使用。
  11530. * @returns {string} 符合 JSON 格式的字符串。
  11531. *
  11532. */
  11533. }, {
  11534. key: "write",
  11535. value: function write(value, pretty) {
  11536. this.pretty = !!pretty;
  11537. var json = null;
  11538. var type = JSON_typeof(value);
  11539. if (this.serialize[type]) {
  11540. try {
  11541. json = !this.pretty && this.nativeJSON ? JSON.stringify(value) : this.serialize[type].apply(this, [value]);
  11542. } catch (err) {
  11543. //console.error("Trouble serializing: " + err);
  11544. }
  11545. }
  11546. return json;
  11547. }
  11548. /**
  11549. * @function JSONFormat.prototype.writeIndent
  11550. * @description 根据缩进级别输出一个缩进字符串。
  11551. * @private
  11552. * @returns {string} 一个适当的缩进字符串。
  11553. */
  11554. }, {
  11555. key: "writeIndent",
  11556. value: function writeIndent() {
  11557. var pieces = [];
  11558. if (this.pretty) {
  11559. for (var i = 0; i < this.level; ++i) {
  11560. pieces.push(this.indent);
  11561. }
  11562. }
  11563. return pieces.join('');
  11564. }
  11565. /**
  11566. * @function JSONFormat.prototype.writeNewline
  11567. * @description 在格式化输出模式情况下输出代表新一行的字符串。
  11568. * @private
  11569. * @returns {string} 代表新的一行的字符串。
  11570. */
  11571. }, {
  11572. key: "writeNewline",
  11573. value: function writeNewline() {
  11574. return this.pretty ? this.newline : '';
  11575. }
  11576. /**
  11577. * @function JSONFormat.prototype.writeSpace
  11578. * @private
  11579. * @description 在格式化输出模式情况下输出一个代表空格的字符串。
  11580. * @returns {string} 空格字符串。
  11581. */
  11582. }, {
  11583. key: "writeSpace",
  11584. value: function writeSpace() {
  11585. return this.pretty ? this.space : '';
  11586. }
  11587. }]);
  11588. return JSONFormat;
  11589. }(Format);
  11590. ;// CONCATENATED MODULE: ./src/common/iServer/CommonServiceBase.js
  11591. function CommonServiceBase_typeof(obj) { "@babel/helpers - typeof"; return CommonServiceBase_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, CommonServiceBase_typeof(obj); }
  11592. function CommonServiceBase_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  11593. function CommonServiceBase_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  11594. function CommonServiceBase_createClass(Constructor, protoProps, staticProps) { if (protoProps) CommonServiceBase_defineProperties(Constructor.prototype, protoProps); if (staticProps) CommonServiceBase_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  11595. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  11596. * This program are made available under the terms of the Apache License, Version 2.0
  11597. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11598. /**
  11599. * @class CommonServiceBase
  11600. * @deprecatedclass SuperMap.CommonServiceBase
  11601. * @category iServer Core
  11602. * @classdesc 对接 iServer 各种服务的 Service 的基类。
  11603. * @param {string} url - 服务地址。
  11604. * @param {Object} options - 参数。
  11605. * @param {Object} options.eventListeners - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  11606. * @param {string} [options.proxy] - 服务代理地址。
  11607. * @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
  11608. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  11609. * @param {Object} [options.headers] - 请求头。
  11610. * @usage
  11611. */
  11612. var CommonServiceBase = /*#__PURE__*/function () {
  11613. function CommonServiceBase(url, options) {
  11614. CommonServiceBase_classCallCheck(this, CommonServiceBase);
  11615. var me = this;
  11616. this.EVENT_TYPES = ['processCompleted', 'processFailed'];
  11617. this.events = null;
  11618. this.eventListeners = null;
  11619. this.url = null;
  11620. this.urls = null;
  11621. this.proxy = null;
  11622. this.index = null;
  11623. this.length = null;
  11624. this.totalTimes = null;
  11625. this.POLLING_TIMES = 3;
  11626. this.isInTheSameDomain = null;
  11627. this.withCredentials = false;
  11628. if (Util_Util.isArray(url)) {
  11629. me.urls = url;
  11630. me.length = url.length;
  11631. me.totalTimes = me.length;
  11632. if (me.length === 1) {
  11633. me.url = url[0];
  11634. } else {
  11635. me.index = parseInt(Math.random() * me.length);
  11636. me.url = url[me.index];
  11637. }
  11638. } else {
  11639. me.totalTimes = 1;
  11640. me.url = url;
  11641. }
  11642. if (Util_Util.isArray(url) && !me.isServiceSupportPolling()) {
  11643. me.url = url[0];
  11644. me.totalTimes = 1;
  11645. }
  11646. options = options || {};
  11647. this.crossOrigin = options.crossOrigin;
  11648. this.headers = options.headers;
  11649. Util_Util.extend(this, options);
  11650. me.isInTheSameDomain = Util_Util.isInTheSameDomain(me.url);
  11651. me.events = new Events(me, null, me.EVENT_TYPES, true);
  11652. if (me.eventListeners instanceof Object) {
  11653. me.events.on(me.eventListeners);
  11654. }
  11655. this.CLASS_NAME = 'SuperMap.CommonServiceBase';
  11656. }
  11657. /**
  11658. * @function CommonServiceBase.prototype.destroy
  11659. * @description 释放资源,将引用的资源属性置空。
  11660. */
  11661. CommonServiceBase_createClass(CommonServiceBase, [{
  11662. key: "destroy",
  11663. value: function destroy() {
  11664. var me = this;
  11665. if (Util_Util.isArray(me.urls)) {
  11666. me.urls = null;
  11667. me.index = null;
  11668. me.length = null;
  11669. me.totalTimes = null;
  11670. }
  11671. me.url = null;
  11672. me._processSuccess = null;
  11673. me._processFailed = null;
  11674. me.isInTheSameDomain = null;
  11675. me.EVENT_TYPES = null;
  11676. if (me.events) {
  11677. me.events.destroy();
  11678. me.events = null;
  11679. }
  11680. if (me.eventListeners) {
  11681. me.eventListeners = null;
  11682. }
  11683. }
  11684. /**
  11685. * @function CommonServiceBase.prototype.request
  11686. * @description: 该方法用于向服务发送请求。
  11687. * @param {Object} options - 参数。
  11688. * @param {string} [options.method='GET'] - 请求方式,包括 "GET","POST","PUT","DELETE"。
  11689. * @param {string} [options.url] - 发送请求的地址。
  11690. * @param {Object} [options.params] - 作为查询字符串添加到 URL 中的一组键值对,此参数只适用于 GET 方式发送的请求。
  11691. * @param {string} [options.data] - 发送到服务器的数据。
  11692. * @param {function} options.success - 请求成功后的回调函数。
  11693. * @param {function} options.failure - 请求失败后的回调函数。
  11694. * @param {Object} [options.scope] - 如果回调函数是对象的一个公共方法,设定该对象的范围。
  11695. * @param {boolean} [options.isInTheSameDomain] - 请求是否在当前域中。
  11696. * @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
  11697. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  11698. * @param {Object} [options.headers] - 请求头。
  11699. */
  11700. }, {
  11701. key: "request",
  11702. value: function request(options) {
  11703. var format = options.scope.format;
  11704. if (format && !this.supportDataFormat(format)) {
  11705. throw new Error("".concat(this.CLASS_NAME, " is not surport ").concat(format, " format!"));
  11706. }
  11707. var me = this;
  11708. options.url = options.url || me.url;
  11709. if (this._returnContent(options) && !options.url.includes('returnContent=true')) {
  11710. options.url = Util_Util.urlAppend(options.url, 'returnContent=true');
  11711. }
  11712. options.proxy = options.proxy || me.proxy;
  11713. options.withCredentials = options.withCredentials != undefined ? options.withCredentials : me.withCredentials;
  11714. options.crossOrigin = options.crossOrigin != undefined ? options.crossOrigin : me.crossOrigin;
  11715. options.headers = options.headers || me.headers;
  11716. options.isInTheSameDomain = me.isInTheSameDomain;
  11717. options.withoutFormatSuffix = options.scope.withoutFormatSuffix || false;
  11718. //为url添加安全认证信息片段
  11719. options.url = SecurityManager.appendCredential(options.url);
  11720. me.calculatePollingTimes();
  11721. options.scope = me;
  11722. var success = options.scope ? options.success.bind(options.scope) : options.success;
  11723. var failure = options.scope ? options.failure.bind(options.scope) : options.failure;
  11724. options.success = me.getUrlCompleted(success, options);
  11725. options.failure = me.getUrlFailed(failure, options);
  11726. me._commit(options);
  11727. }
  11728. /**
  11729. * @function CommonServiceBase.prototype.getUrlCompleted
  11730. * @description 请求成功后执行此方法。
  11731. * @param {Object} cb - 成功回调函数。
  11732. * @param {Object} options - 请求参数对象。
  11733. * @private
  11734. */
  11735. }, {
  11736. key: "getUrlCompleted",
  11737. value: function getUrlCompleted(cb, options) {
  11738. // @param {Object} result - 服务器返回的结果对象。
  11739. return function (result) {
  11740. cb && cb(result, options);
  11741. };
  11742. }
  11743. /**
  11744. * @function CommonServiceBase.prototype.getUrlFailed
  11745. * @description 请求失败后执行此方法。
  11746. * @param {Object} cb - 失败回调函数。
  11747. * @param {Object} options - 请求参数对象。
  11748. * @private
  11749. */
  11750. }, {
  11751. key: "getUrlFailed",
  11752. value: function getUrlFailed(cb, options) {
  11753. var me = this;
  11754. // @param {Object} result - 服务器返回的结果对象。
  11755. return function (result) {
  11756. if (me.totalTimes > 0) {
  11757. me.totalTimes--;
  11758. me.ajaxPolling(options);
  11759. } else {
  11760. cb && cb(result, options);
  11761. }
  11762. };
  11763. }
  11764. /**
  11765. *
  11766. * @function CommonServiceBase.prototype.ajaxPolling
  11767. * @description 请求失败后,如果剩余请求失败次数不为 0,重新获取 URL 发送请求。
  11768. * @param {Object} options - 请求参数对象。
  11769. * @private
  11770. */
  11771. }, {
  11772. key: "ajaxPolling",
  11773. value: function ajaxPolling(options) {
  11774. var me = this,
  11775. url = options.url,
  11776. re = /^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;
  11777. me.index = parseInt(Math.random() * me.length);
  11778. me.url = me.urls[me.index];
  11779. url = url.replace(re, re.exec(me.url)[0]);
  11780. options.url = url;
  11781. options.isInTheSameDomain = Util_Util.isInTheSameDomain(url);
  11782. me._commit(options);
  11783. }
  11784. /**
  11785. * @function CommonServiceBase.prototype.calculatePollingTimes
  11786. * @description 计算剩余请求失败执行次数。
  11787. */
  11788. }, {
  11789. key: "calculatePollingTimes",
  11790. value: function calculatePollingTimes() {
  11791. var me = this;
  11792. if (me.times) {
  11793. if (me.totalTimes > me.POLLING_TIMES) {
  11794. if (me.times > me.POLLING_TIMES) {
  11795. me.totalTimes = me.POLLING_TIMES;
  11796. } else {
  11797. me.totalTimes = me.times;
  11798. }
  11799. } else {
  11800. if (me.times < me.totalTimes) {
  11801. me.totalTimes = me.times;
  11802. }
  11803. }
  11804. } else {
  11805. if (me.totalTimes > me.POLLING_TIMES) {
  11806. me.totalTimes = me.POLLING_TIMES;
  11807. }
  11808. }
  11809. me.totalTimes--;
  11810. }
  11811. /**
  11812. * @function CommonServiceBase.prototype.isServiceSupportPolling
  11813. * @description 判断服务是否支持轮询。
  11814. */
  11815. }, {
  11816. key: "isServiceSupportPolling",
  11817. value: function isServiceSupportPolling() {
  11818. var me = this;
  11819. return !(me.CLASS_NAME === 'SuperMap.REST.ThemeService' || me.CLASS_NAME === 'SuperMap.REST.EditFeaturesService');
  11820. }
  11821. /**
  11822. * @function CommonServiceBase.prototype.serviceProcessCompleted
  11823. * @description 状态完成,执行此方法。
  11824. * @param {Object} result - 服务器返回的结果对象。
  11825. * @param {Object} options - 请求参数对象。
  11826. * @private
  11827. */
  11828. }, {
  11829. key: "serviceProcessCompleted",
  11830. value: function serviceProcessCompleted(result, options) {
  11831. result = Util_Util.transformResult(result);
  11832. this.events.triggerEvent('processCompleted', {
  11833. result: result,
  11834. options: options
  11835. });
  11836. }
  11837. /**
  11838. * @function CommonServiceBase.prototype.serviceProcessFailed
  11839. * @description 状态失败,执行此方法。
  11840. * @param {Object} result - 服务器返回的结果对象。
  11841. * @param {Object} options - 请求参数对象。对象
  11842. * @private
  11843. */
  11844. }, {
  11845. key: "serviceProcessFailed",
  11846. value: function serviceProcessFailed(result, options) {
  11847. result = Util_Util.transformResult(result);
  11848. var error = result.error || result;
  11849. this.events.triggerEvent('processFailed', {
  11850. error: error,
  11851. options: options
  11852. });
  11853. }
  11854. }, {
  11855. key: "_returnContent",
  11856. value: function _returnContent(options) {
  11857. if (options.scope.format === DataFormat.FGB) {
  11858. return false;
  11859. }
  11860. if (options.scope.returnContent) {
  11861. return true;
  11862. }
  11863. return false;
  11864. }
  11865. }, {
  11866. key: "supportDataFormat",
  11867. value: function supportDataFormat(foramt) {
  11868. return this.dataFormat().includes(foramt);
  11869. }
  11870. }, {
  11871. key: "dataFormat",
  11872. value: function dataFormat() {
  11873. return [DataFormat.GEOJSON, DataFormat.ISERVER];
  11874. }
  11875. }, {
  11876. key: "_commit",
  11877. value: function _commit(options) {
  11878. if (options.method === 'POST' || options.method === 'PUT' || options.method === 'PATCH') {
  11879. if (options.params) {
  11880. options.url = Util_Util.urlAppend(options.url, Util_Util.getParameterString(options.params || {}));
  11881. }
  11882. if (CommonServiceBase_typeof(options.data) === 'object') {
  11883. try {
  11884. options.params = Util_Util.toJSON(options.data);
  11885. } catch (e) {
  11886. console.log('不是json对象');
  11887. }
  11888. } else {
  11889. options.params = options.data;
  11890. }
  11891. }
  11892. FetchRequest.commit(options.method, options.url, options.params, {
  11893. headers: options.headers,
  11894. withoutFormatSuffix: options.withoutFormatSuffix,
  11895. withCredentials: options.withCredentials,
  11896. crossOrigin: options.crossOrigin,
  11897. timeout: options.async ? 0 : null,
  11898. proxy: options.proxy
  11899. }).then(function (response) {
  11900. if (response.text) {
  11901. return response.text();
  11902. }
  11903. if (response.json) {
  11904. return response.json();
  11905. }
  11906. return response;
  11907. }).then(function (text) {
  11908. var requestResult = text;
  11909. if (typeof text === 'string') {
  11910. requestResult = new JSONFormat().read(text);
  11911. }
  11912. if (!requestResult || requestResult.error || requestResult.code >= 300 && requestResult.code !== 304) {
  11913. if (requestResult && requestResult.error) {
  11914. requestResult = {
  11915. error: requestResult.error
  11916. };
  11917. } else {
  11918. requestResult = {
  11919. error: requestResult
  11920. };
  11921. }
  11922. }
  11923. if (requestResult && options.scope.format === DataFormat.FGB) {
  11924. requestResult.newResourceLocation = requestResult.newResourceLocation.replace('.json', '') + '.fgb';
  11925. }
  11926. return requestResult;
  11927. })["catch"](function (e) {
  11928. return {
  11929. error: e
  11930. };
  11931. }).then(function (requestResult) {
  11932. if (requestResult.error) {
  11933. var failure = options.scope ? FunctionExt.bind(options.failure, options.scope) : options.failure;
  11934. failure(requestResult);
  11935. } else {
  11936. requestResult.succeed = requestResult.succeed == undefined ? true : requestResult.succeed;
  11937. var success = options.scope ? FunctionExt.bind(options.success, options.scope) : options.success;
  11938. success(requestResult);
  11939. }
  11940. });
  11941. }
  11942. }]);
  11943. return CommonServiceBase;
  11944. }();
  11945. /**
  11946. * 服务器请求回调函数。
  11947. * @callback RequestCallback
  11948. * @category BaseTypes Util
  11949. * @example
  11950. * var requestCallback = function (serviceResult){
  11951. * console.log(serviceResult.result);
  11952. * }
  11953. * new QueryService(url).queryByBounds(param, requestCallback);
  11954. * @param {Object} serviceResult
  11955. * @param {Object} serviceResult.result 服务器返回结果。
  11956. * @param {Object} serviceResult.object 发布应用程序事件的对象。
  11957. * @param {Object} serviceResult.type 事件类型。
  11958. * @param {Object} serviceResult.element 接受浏览器事件的 DOM 节点。
  11959. * @param {Object} serviceResult.options 请求参数。
  11960. */
  11961. ;// CONCATENATED MODULE: ./src/common/iServer/AddressMatchService.js
  11962. function AddressMatchService_typeof(obj) { "@babel/helpers - typeof"; return AddressMatchService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, AddressMatchService_typeof(obj); }
  11963. function AddressMatchService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  11964. function AddressMatchService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  11965. function AddressMatchService_createClass(Constructor, protoProps, staticProps) { if (protoProps) AddressMatchService_defineProperties(Constructor.prototype, protoProps); if (staticProps) AddressMatchService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  11966. function AddressMatchService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { AddressMatchService_get = Reflect.get.bind(); } else { AddressMatchService_get = function _get(target, property, receiver) { var base = AddressMatchService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return AddressMatchService_get.apply(this, arguments); }
  11967. function AddressMatchService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = AddressMatchService_getPrototypeOf(object); if (object === null) break; } return object; }
  11968. function AddressMatchService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) AddressMatchService_setPrototypeOf(subClass, superClass); }
  11969. function AddressMatchService_setPrototypeOf(o, p) { AddressMatchService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return AddressMatchService_setPrototypeOf(o, p); }
  11970. function AddressMatchService_createSuper(Derived) { var hasNativeReflectConstruct = AddressMatchService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = AddressMatchService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = AddressMatchService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return AddressMatchService_possibleConstructorReturn(this, result); }; }
  11971. function AddressMatchService_possibleConstructorReturn(self, call) { if (call && (AddressMatchService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return AddressMatchService_assertThisInitialized(self); }
  11972. function AddressMatchService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  11973. function AddressMatchService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  11974. function AddressMatchService_getPrototypeOf(o) { AddressMatchService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return AddressMatchService_getPrototypeOf(o); }
  11975. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  11976. * This program are made available under the terms of the Apache License, Version 2.0
  11977. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11978. /**
  11979. * @class AddressMatchService
  11980. * @deprecatedclass SuperMap.AddressMatchService
  11981. * @category iServer AddressMatch
  11982. * @classdesc 地址匹配服务,包括正向匹配和反向匹配。
  11983. * @param {string} url - 服务地址。
  11984. * @param {Object} options - 可选参数。
  11985. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  11986. * @param {Object} [options.headers] - 请求头。
  11987. * @usage
  11988. */
  11989. var AddressMatchService_AddressMatchService = /*#__PURE__*/function (_CommonServiceBase) {
  11990. AddressMatchService_inherits(AddressMatchService, _CommonServiceBase);
  11991. var _super = AddressMatchService_createSuper(AddressMatchService);
  11992. function AddressMatchService(url, options) {
  11993. var _this;
  11994. AddressMatchService_classCallCheck(this, AddressMatchService);
  11995. _this = _super.call(this, url, options);
  11996. _this.options = options || {};
  11997. _this.eventCount = 0;
  11998. _this.CLASS_NAME = 'SuperMap.AddressMatchService';
  11999. return _this;
  12000. }
  12001. /**
  12002. * @function AddressMatchService.prototype.destroy
  12003. * @override
  12004. */
  12005. AddressMatchService_createClass(AddressMatchService, [{
  12006. key: "destroy",
  12007. value: function destroy() {
  12008. AddressMatchService_get(AddressMatchService_getPrototypeOf(AddressMatchService.prototype), "destroy", this).call(this);
  12009. }
  12010. /**
  12011. * @function AddressMatchService.prototype.code
  12012. * @param {string} url - 正向地址匹配服务地址。
  12013. * @param {GeoCodingParameter} params - 正向地址匹配服务参数。
  12014. */
  12015. }, {
  12016. key: "code",
  12017. value: function code(url, params, callback) {
  12018. if (!(params instanceof GeoCodingParameter)) {
  12019. return;
  12020. }
  12021. this.processAsync(url, params, callback);
  12022. }
  12023. /**
  12024. * @function AddressMatchService.prototype.decode
  12025. * @param {string} url - 反向地址匹配服务地址。
  12026. * @param {GeoDecodingParameter} params - 反向地址匹配服务参数。
  12027. */
  12028. }, {
  12029. key: "decode",
  12030. value: function decode(url, params, callback) {
  12031. if (!(params instanceof GeoDecodingParameter)) {
  12032. return;
  12033. }
  12034. this.processAsync(url, params, callback);
  12035. }
  12036. /**
  12037. * @function AddressMatchService.prototype.processAsync
  12038. * @description 负责将客户端的动态分段服务参数传递到服务端。
  12039. * @param {string} url - 服务地址。
  12040. * @param {Object} params - 参数。
  12041. */
  12042. }, {
  12043. key: "processAsync",
  12044. value: function processAsync(url, params, callback) {
  12045. var eventId = ++this.eventCount;
  12046. var eventListeners = {
  12047. scope: this,
  12048. processCompleted: function processCompleted(result) {
  12049. if (eventId === result.result.eventId && callback) {
  12050. delete result.result.eventId;
  12051. callback(result);
  12052. this.events && this.events.un(eventListeners);
  12053. return false;
  12054. }
  12055. },
  12056. processFailed: function processFailed(result) {
  12057. if ((eventId === result.error.eventId || eventId === result.eventId) && callback) {
  12058. callback(result);
  12059. this.events && this.events.un(eventListeners);
  12060. return false;
  12061. }
  12062. }
  12063. };
  12064. this.events.on(eventListeners);
  12065. this.request({
  12066. method: 'GET',
  12067. url: url,
  12068. params: params,
  12069. scope: this,
  12070. success: function success(result, options) {
  12071. result.eventId = eventId;
  12072. this.serviceProcessCompleted(result, options);
  12073. },
  12074. failure: function failure(result, options) {
  12075. if (result.error) {
  12076. result.error.eventId = eventId;
  12077. }
  12078. result.eventId = eventId;
  12079. this.serviceProcessFailed(result, options);
  12080. }
  12081. });
  12082. }
  12083. /**
  12084. * @function AddressMatchService.prototype.serviceProcessCompleted
  12085. * @param {Object} result - 服务器返回的结果对象。
  12086. * @description 服务流程是否完成
  12087. */
  12088. }, {
  12089. key: "serviceProcessCompleted",
  12090. value: function serviceProcessCompleted(result, options) {
  12091. if (result.succeed) {
  12092. delete result.succeed;
  12093. }
  12094. AddressMatchService_get(AddressMatchService_getPrototypeOf(AddressMatchService.prototype), "serviceProcessCompleted", this).call(this, result, options);
  12095. }
  12096. /**
  12097. * @function AddressMatchService.prototype.serviceProcessCompleted
  12098. * @param {Object} result - 服务器返回的结果对象。
  12099. * @description 服务流程是否失败
  12100. */
  12101. }, {
  12102. key: "serviceProcessFailed",
  12103. value: function serviceProcessFailed(result, options) {
  12104. AddressMatchService_get(AddressMatchService_getPrototypeOf(AddressMatchService.prototype), "serviceProcessFailed", this).call(this, result, options);
  12105. }
  12106. }]);
  12107. return AddressMatchService;
  12108. }(CommonServiceBase);
  12109. ;// CONCATENATED MODULE: ./src/classic/services/AddressMatchService.js
  12110. function services_AddressMatchService_typeof(obj) { "@babel/helpers - typeof"; return services_AddressMatchService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, services_AddressMatchService_typeof(obj); }
  12111. function services_AddressMatchService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12112. function services_AddressMatchService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12113. function services_AddressMatchService_createClass(Constructor, protoProps, staticProps) { if (protoProps) services_AddressMatchService_defineProperties(Constructor.prototype, protoProps); if (staticProps) services_AddressMatchService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12114. function services_AddressMatchService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) services_AddressMatchService_setPrototypeOf(subClass, superClass); }
  12115. function services_AddressMatchService_setPrototypeOf(o, p) { services_AddressMatchService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return services_AddressMatchService_setPrototypeOf(o, p); }
  12116. function services_AddressMatchService_createSuper(Derived) { var hasNativeReflectConstruct = services_AddressMatchService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = services_AddressMatchService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = services_AddressMatchService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return services_AddressMatchService_possibleConstructorReturn(this, result); }; }
  12117. function services_AddressMatchService_possibleConstructorReturn(self, call) { if (call && (services_AddressMatchService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return services_AddressMatchService_assertThisInitialized(self); }
  12118. function services_AddressMatchService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  12119. function services_AddressMatchService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12120. function services_AddressMatchService_getPrototypeOf(o) { services_AddressMatchService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return services_AddressMatchService_getPrototypeOf(o); }
  12121. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12122. * This program are made available under the terms of the Apache License, Version 2.0
  12123. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12124. /**
  12125. * @class SuperMap.REST.AddressMatchService
  12126. * @category iServer AddressMatch
  12127. * @classdesc 地址匹配服务类。包括正向匹配和反向匹配。
  12128. * @modulecategory Services
  12129. * @extends {CommonServiceBase}
  12130. * @param {string} url - 服务地址。
  12131. * @param {Object} options - 参数。
  12132. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  12133. * @param {Object} [options.headers] - 请求头。
  12134. */
  12135. var AddressMatchService = /*#__PURE__*/function (_CommonServiceBase) {
  12136. services_AddressMatchService_inherits(AddressMatchService, _CommonServiceBase);
  12137. var _super = services_AddressMatchService_createSuper(AddressMatchService);
  12138. function AddressMatchService(url, options) {
  12139. var _this;
  12140. services_AddressMatchService_classCallCheck(this, AddressMatchService);
  12141. _this = _super.call(this, url, options);
  12142. _this.CLASS_NAME = "SuperMap.REST.AddressMatchService";
  12143. return _this;
  12144. }
  12145. /**
  12146. * @function SuperMap.REST.AddressMatchService.prototype.code
  12147. * @description 正向匹配。
  12148. * @param {GeoCodingParameter} params - 正向匹配参数。
  12149. * @param {RequestCallback} callback - 回调函数。
  12150. */
  12151. services_AddressMatchService_createClass(AddressMatchService, [{
  12152. key: "code",
  12153. value: function code(params, callback) {
  12154. var me = this;
  12155. var addressMatchService = new AddressMatchService_AddressMatchService(me.url, {
  12156. headers: me.headers,
  12157. proxy: me.proxy,
  12158. withCredentials: me.withCredentials,
  12159. crossOrigin: me.crossOrigin,
  12160. eventListeners: {
  12161. scope: me,
  12162. processCompleted: callback,
  12163. processFailed: callback
  12164. }
  12165. });
  12166. addressMatchService.code(me.url + '/geocoding', params);
  12167. }
  12168. /**
  12169. * @function SuperMap.REST.AddressMatchService.prototype.decode
  12170. * @description 反向匹配。
  12171. * @param {GeoDecodingParameter} params - 反向匹配参数。
  12172. * @param {RequestCallback} callback - 回调函数。
  12173. */
  12174. }, {
  12175. key: "decode",
  12176. value: function decode(params, callback) {
  12177. var me = this;
  12178. var addressMatchService = new AddressMatchService_AddressMatchService(me.url, {
  12179. headers: me.headers,
  12180. proxy: me.proxy,
  12181. withCredentials: me.withCredentials,
  12182. crossOrigin: me.crossOrigin,
  12183. eventListeners: {
  12184. scope: me,
  12185. processCompleted: callback,
  12186. processFailed: callback
  12187. }
  12188. });
  12189. addressMatchService.decode(me.url + '/geodecoding', params);
  12190. }
  12191. }]);
  12192. return AddressMatchService;
  12193. }(CommonServiceBase);
  12194. SuperMap.REST.AddressMatchService = AddressMatchService;
  12195. ;// CONCATENATED MODULE: ./src/common/iServer/DatasetService.js
  12196. function DatasetService_typeof(obj) { "@babel/helpers - typeof"; return DatasetService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, DatasetService_typeof(obj); }
  12197. function DatasetService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12198. function DatasetService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12199. function DatasetService_createClass(Constructor, protoProps, staticProps) { if (protoProps) DatasetService_defineProperties(Constructor.prototype, protoProps); if (staticProps) DatasetService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12200. function DatasetService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { DatasetService_get = Reflect.get.bind(); } else { DatasetService_get = function _get(target, property, receiver) { var base = DatasetService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return DatasetService_get.apply(this, arguments); }
  12201. function DatasetService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = DatasetService_getPrototypeOf(object); if (object === null) break; } return object; }
  12202. function DatasetService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) DatasetService_setPrototypeOf(subClass, superClass); }
  12203. function DatasetService_setPrototypeOf(o, p) { DatasetService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return DatasetService_setPrototypeOf(o, p); }
  12204. function DatasetService_createSuper(Derived) { var hasNativeReflectConstruct = DatasetService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = DatasetService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = DatasetService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return DatasetService_possibleConstructorReturn(this, result); }; }
  12205. function DatasetService_possibleConstructorReturn(self, call) { if (call && (DatasetService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return DatasetService_assertThisInitialized(self); }
  12206. function DatasetService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  12207. function DatasetService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12208. function DatasetService_getPrototypeOf(o) { DatasetService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return DatasetService_getPrototypeOf(o); }
  12209. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12210. * This program are made available under the terms of the Apache License, Version 2.0
  12211. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12212. /**
  12213. * @class DatasetService
  12214. * @deprecatedclass SuperMap.DatasetService
  12215. * @category iServer Data Dataset
  12216. * @classdesc 数据集查询服务。
  12217. * @param {string} url - 服务的访问地址。如访问World Data服务,只需将url设为:http://localhost:8090/iserver/services/data-world/rest/data 即可。
  12218. * @param {Object} options - 参数。
  12219. * @param {Object} options.eventListeners - 事件监听器对象。有processCompleted属性可传入处理完成后的回调函数。processFailed属性传入处理失败后的回调函数。
  12220. * @param {DataFormat} [options.format=DataFormat.GEOJSON] - 查询结果返回格式,目前支持 iServerJSON 和 GeoJSON 两种格式。参数格式为 "ISERVER","GEOJSON"。
  12221. * @param {string}options.datasource - 数据源名称。
  12222. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  12223. * @param {Object} [options.headers] - 请求头。
  12224. * @usage
  12225. */
  12226. var DatasetService_DatasetService = /*#__PURE__*/function (_CommonServiceBase) {
  12227. DatasetService_inherits(DatasetService, _CommonServiceBase);
  12228. var _super = DatasetService_createSuper(DatasetService);
  12229. function DatasetService(url, options) {
  12230. var _this;
  12231. DatasetService_classCallCheck(this, DatasetService);
  12232. _this = _super.call(this, url, options);
  12233. if (!options) {
  12234. return DatasetService_possibleConstructorReturn(_this);
  12235. }
  12236. /**
  12237. * @member {string} DatasetService.prototype.datasource
  12238. * @description 要查询的数据集所在的数据源名称。
  12239. */
  12240. _this.datasource = null;
  12241. /**
  12242. * @member {string} DatasetService.prototype.dataset
  12243. * @description 要查询的数据集名称。
  12244. */
  12245. _this.dataset = null;
  12246. _this.eventCount = 0;
  12247. if (options) {
  12248. Util_Util.extend(DatasetService_assertThisInitialized(_this), options);
  12249. }
  12250. _this.CLASS_NAME = "SuperMap.DatasetService";
  12251. return _this;
  12252. }
  12253. /**
  12254. * @function DatasetService.prototype.destroy
  12255. * @override
  12256. */
  12257. DatasetService_createClass(DatasetService, [{
  12258. key: "destroy",
  12259. value: function destroy() {
  12260. DatasetService_get(DatasetService_getPrototypeOf(DatasetService.prototype), "destroy", this).call(this);
  12261. var me = this;
  12262. me.datasource = null;
  12263. me.dataset = null;
  12264. }
  12265. /**
  12266. * @function DatasetService.prototype.getDatasetsService
  12267. * @description 执行服务,查询数据集服务。
  12268. */
  12269. }, {
  12270. key: "getDatasetsService",
  12271. value: function getDatasetsService(params, callback) {
  12272. var url = Util_Util.urlPathAppend(this.url, "datasources/name/".concat(params, "/datasets"));
  12273. this.processAsync(url, 'GET', callback);
  12274. }
  12275. /**
  12276. * @function DatasetService.prototype.getDatasetService
  12277. * @description 执行服务,查询数据集信息服务。
  12278. */
  12279. }, {
  12280. key: "getDatasetService",
  12281. value: function getDatasetService(datasourceName, datasetName, callback) {
  12282. var url = Util_Util.urlPathAppend(this.url, "datasources/name/".concat(datasourceName, "/datasets/name/").concat(datasetName));
  12283. this.processAsync(url, 'GET', callback);
  12284. }
  12285. /**
  12286. * @function DatasetService.prototype.setDatasetService
  12287. * @description 执行服务,更改数据集信息服务。
  12288. */
  12289. }, {
  12290. key: "setDatasetService",
  12291. value: function setDatasetService(params, callback) {
  12292. if (!params) {
  12293. return;
  12294. }
  12295. var url = Util_Util.urlPathAppend(this.url, "datasources/name/".concat(params.datasourceName, "/datasets/name/").concat(params.datasetName));
  12296. delete params.datasourceName;
  12297. this.processAsync(url, 'PUT', callback, params);
  12298. }
  12299. /**
  12300. * @function DatasetService.prototype.deleteDatasetService
  12301. * @description 执行服务,删除数据集信息服务。
  12302. */
  12303. }, {
  12304. key: "deleteDatasetService",
  12305. value: function deleteDatasetService(datasourceName, datasetName, callback) {
  12306. var url = Util_Util.urlPathAppend(this.url, "datasources/name/".concat(datasourceName, "/datasets/name/").concat(datasetName));
  12307. this.processAsync(url, 'DELETE', callback);
  12308. }
  12309. }, {
  12310. key: "processAsync",
  12311. value: function processAsync(url, method, callback, params) {
  12312. var eventId = ++this.eventCount;
  12313. var eventListeners = {
  12314. scope: this,
  12315. processCompleted: function processCompleted(result) {
  12316. if (eventId === result.result.eventId && callback) {
  12317. delete result.result.eventId;
  12318. callback(result);
  12319. this.events && this.events.un(eventListeners);
  12320. return false;
  12321. }
  12322. },
  12323. processFailed: function processFailed(result) {
  12324. if ((eventId === result.error.eventId || eventId === result.eventId) && callback) {
  12325. callback(result);
  12326. this.events && this.events.un(eventListeners);
  12327. return false;
  12328. }
  12329. }
  12330. };
  12331. this.events.on(eventListeners);
  12332. var me = this;
  12333. var requestConfig = {
  12334. url: url,
  12335. method: method,
  12336. scope: me,
  12337. success: function success(result, options) {
  12338. result.eventId = eventId;
  12339. me.serviceProcessCompleted(result, options);
  12340. },
  12341. failure: function failure(result, options) {
  12342. if (result.error) {
  12343. result.error.eventId = eventId;
  12344. }
  12345. result.eventId = eventId;
  12346. me.serviceProcessFailed(result, options);
  12347. }
  12348. };
  12349. params && (requestConfig.data = Util_Util.toJSON(params));
  12350. me.request(requestConfig);
  12351. }
  12352. }]);
  12353. return DatasetService;
  12354. }(CommonServiceBase);
  12355. ;// CONCATENATED MODULE: ./src/common/iServer/CreateDatasetParameters.js
  12356. function CreateDatasetParameters_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12357. function CreateDatasetParameters_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12358. function CreateDatasetParameters_createClass(Constructor, protoProps, staticProps) { if (protoProps) CreateDatasetParameters_defineProperties(Constructor.prototype, protoProps); if (staticProps) CreateDatasetParameters_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12359. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12360. * This program are made available under the terms of the Apache License, Version 2.0
  12361. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12362. /**
  12363. * @class CreateDatasetParameters
  12364. * @deprecatedclass SuperMap.CreateDatasetParameters
  12365. * @category iServer Data Dataset
  12366. * @classdesc 数据集创建参数类。
  12367. * @param {Object} options - 参数。
  12368. * @param {string} options.datasourceName - 数据源名称,此为必选参数。
  12369. * @param {string} options.datasetName - 数据集名称,此为必选参数。
  12370. * @param {string} options.datasetType - 数据集类型。目前支持创建的数据集类型有:点、线、面、文本、复合(CAD)和属性数据集。
  12371. * @usage
  12372. */
  12373. var CreateDatasetParameters = /*#__PURE__*/function () {
  12374. function CreateDatasetParameters(options) {
  12375. CreateDatasetParameters_classCallCheck(this, CreateDatasetParameters);
  12376. if (!options) {
  12377. return;
  12378. }
  12379. /**
  12380. * @member {string} CreateDatasetParameters.prototype.datasourceName
  12381. * @description 数据源名称,此为必选参数。
  12382. */
  12383. this.datasourceName = null;
  12384. /**
  12385. * @member {string} CreateDatasetParameters.prototype.datasetName
  12386. * @description 数据集名称,此为必选参数。
  12387. */
  12388. this.datasetName = null;
  12389. /**
  12390. * @member {string} CreateDatasetParameters.prototype.datasetType
  12391. * @description 数据集类型。目前支持创建的数据集类型有:点、线、面、文本、复合(CAD)和属性数据集。
  12392. */
  12393. this.datasetType = null;
  12394. if (options) {
  12395. Util_Util.extend(this, options);
  12396. }
  12397. this.CLASS_NAME = "SuperMap.CreateDatasetParameters";
  12398. }
  12399. /**
  12400. * @function CreateDatasetParameters.prototype.destroy
  12401. * @description 释放资源,将引用资源的属性置空。
  12402. */
  12403. CreateDatasetParameters_createClass(CreateDatasetParameters, [{
  12404. key: "destroy",
  12405. value: function destroy() {
  12406. var me = this;
  12407. me.datasourceName = null;
  12408. me.datasetName = null;
  12409. me.datasetType = null;
  12410. }
  12411. }]);
  12412. return CreateDatasetParameters;
  12413. }();
  12414. ;// CONCATENATED MODULE: ./src/common/iServer/UpdateDatasetParameters.js
  12415. function UpdateDatasetParameters_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12416. function UpdateDatasetParameters_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12417. function UpdateDatasetParameters_createClass(Constructor, protoProps, staticProps) { if (protoProps) UpdateDatasetParameters_defineProperties(Constructor.prototype, protoProps); if (staticProps) UpdateDatasetParameters_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12418. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12419. * This program are made available under the terms of the Apache License, Version 2.0
  12420. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12421. /**
  12422. * @class UpdateDatasetParameters
  12423. * @deprecatedclass SuperMap.UpdateDatasetParameters
  12424. * @category iServer Data Dataset
  12425. * @classdesc 数据集信息更改参数类。
  12426. * @param {Object} options - 参数。
  12427. * @param {string} options.datasourceName - 数据源名称。
  12428. * @param {string} options.datasetName - 数据集名称。
  12429. * @param {boolean} options.isFileCache - 是否使用文件形式的缓存。仅对数据库型数据源中的矢量数据集有效。
  12430. * @param {string} options.description - 数据集描述信息。
  12431. * @param {string} options.prjCoordSys - 投影坐标系。
  12432. * @param {Object} options.charset - 矢量数据集的字符集。当数据集类型为矢量数据集时,可以传递此参数。如果用户传递空值,则编码方式保持不变。
  12433. * @param {Array.<string>} options.palette - 影像数据的颜色调色板。当数据集类型为影像数据集时,可以传递此参数。
  12434. * @param {number} options.noValue - 栅格数据集中没有数据的像元的栅格值。当数据集类型为栅格数据集时,可以传递此参数。
  12435. * @usage
  12436. */
  12437. var UpdateDatasetParameters = /*#__PURE__*/function () {
  12438. function UpdateDatasetParameters(options) {
  12439. UpdateDatasetParameters_classCallCheck(this, UpdateDatasetParameters);
  12440. if (!options) {
  12441. return;
  12442. }
  12443. /**
  12444. * @member {string} UpdateDatasetParameters.prototype.datasourceName
  12445. * @description 数据源名称。
  12446. */
  12447. this.datasourceName = null;
  12448. /**
  12449. * @member {string} UpdateDatasetParameters.prototype.datasetName
  12450. * @description 数据集名称。
  12451. */
  12452. this.datasetName = null;
  12453. /**
  12454. * @member {boolean} UpdateDatasetParameters.prototype.isFileCache
  12455. * @description 是否使用文件形式的缓存。仅对数据库型数据源中的矢量数据集有效。
  12456. */
  12457. this.isFileCache = null;
  12458. /**
  12459. * @member {string} UpdateDatasetParameters.prototype.description
  12460. * @description 数据集描述信息。
  12461. */
  12462. this.description = null;
  12463. /**
  12464. * @member {string} UpdateDatasetParameters.prototype.prjCoordSys
  12465. * @description 投影坐标系。
  12466. */
  12467. this.prjCoordSys = null;
  12468. /**
  12469. * @member {Object} UpdateDatasetParameters.prototype.charset
  12470. * @description 矢量数据集的字符集。
  12471. */
  12472. this.charset = null;
  12473. /**
  12474. * @member {Array.<string>} UpdateDatasetParameters.prototype.palette
  12475. * @description 影像数据的颜色调色板。
  12476. */
  12477. this.palette = null;
  12478. /**
  12479. * @member {number} UpdateDatasetParameters.prototype.noValue
  12480. * @description 栅格数据集中没有数据的像元的栅格值。
  12481. */
  12482. this.noValue = null;
  12483. if (options) {
  12484. Util_Util.extend(this, options);
  12485. }
  12486. this.CLASS_NAME = "SuperMap.UpdateDatasetParameters";
  12487. }
  12488. /**
  12489. * @function UpdateDatasetParameters.prototype.destroy
  12490. * @description 释放资源,将引用资源的属性置空。
  12491. */
  12492. UpdateDatasetParameters_createClass(UpdateDatasetParameters, [{
  12493. key: "destroy",
  12494. value: function destroy() {
  12495. var me = this;
  12496. me.datasourceName = null;
  12497. me.datasetName = null;
  12498. me.isFileCache = null;
  12499. me.prjCoordSys = null;
  12500. me.charset = null;
  12501. me.palette = null;
  12502. me.noValue = null;
  12503. }
  12504. }]);
  12505. return UpdateDatasetParameters;
  12506. }();
  12507. ;// CONCATENATED MODULE: ./src/classic/services/DatasetService.js
  12508. function services_DatasetService_typeof(obj) { "@babel/helpers - typeof"; return services_DatasetService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, services_DatasetService_typeof(obj); }
  12509. function services_DatasetService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12510. function services_DatasetService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12511. function services_DatasetService_createClass(Constructor, protoProps, staticProps) { if (protoProps) services_DatasetService_defineProperties(Constructor.prototype, protoProps); if (staticProps) services_DatasetService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12512. function services_DatasetService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) services_DatasetService_setPrototypeOf(subClass, superClass); }
  12513. function services_DatasetService_setPrototypeOf(o, p) { services_DatasetService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return services_DatasetService_setPrototypeOf(o, p); }
  12514. function services_DatasetService_createSuper(Derived) { var hasNativeReflectConstruct = services_DatasetService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = services_DatasetService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = services_DatasetService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return services_DatasetService_possibleConstructorReturn(this, result); }; }
  12515. function services_DatasetService_possibleConstructorReturn(self, call) { if (call && (services_DatasetService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return services_DatasetService_assertThisInitialized(self); }
  12516. function services_DatasetService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  12517. function services_DatasetService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12518. function services_DatasetService_getPrototypeOf(o) { services_DatasetService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return services_DatasetService_getPrototypeOf(o); }
  12519. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12520. * This program are made available under the terms of the Apache License, Version 2.0
  12521. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12522. /**
  12523. * @class SuperMap.REST.DatasetService
  12524. * @category iServer Data Dataset
  12525. * @classdesc 数据集信息服务。
  12526. * @extends {CommonServiceBase}
  12527. * @param {string} url - 服务地址。
  12528. * @param {Object} options - 参数。
  12529. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  12530. * @param {Object} [options.headers] - 请求头。
  12531. */
  12532. var DatasetService = /*#__PURE__*/function (_CommonServiceBase) {
  12533. services_DatasetService_inherits(DatasetService, _CommonServiceBase);
  12534. var _super = services_DatasetService_createSuper(DatasetService);
  12535. function DatasetService(url, options) {
  12536. var _this;
  12537. services_DatasetService_classCallCheck(this, DatasetService);
  12538. _this = _super.call(this, url, options);
  12539. var me = services_DatasetService_assertThisInitialized(_this);
  12540. _this._datasetService = new DatasetService_DatasetService(me.url, {
  12541. proxy: me.proxy,
  12542. withCredentials: me.withCredentials,
  12543. crossOrigin: me.crossOrigin,
  12544. headers: me.headers
  12545. });
  12546. _this.CLASS_NAME = "SuperMap.REST.DatasetService";
  12547. return _this;
  12548. }
  12549. /**
  12550. * @function SuperMap.REST.DatasetService.prototype.getDatasets
  12551. * @description 数据集查询服务。
  12552. * @example
  12553. * new SuperMap.REST.DatasetService(url).getDatasets(datasourceName,function(result){
  12554. * //doSomething
  12555. * });
  12556. * @param {string} datasourceName - 数据源名称。
  12557. * @param {RequestCallback} callback - 回调函数。
  12558. */
  12559. services_DatasetService_createClass(DatasetService, [{
  12560. key: "getDatasets",
  12561. value: function getDatasets(datasourceName, callback) {
  12562. if (!datasourceName) {
  12563. return;
  12564. }
  12565. this._datasetService.getDatasetsService(datasourceName, callback);
  12566. }
  12567. /**
  12568. * @function SuperMap.REST.DatasetService.prototype.getDataset
  12569. * @description 数据集查询服务。
  12570. * @example
  12571. * new SuperMap.REST.DatasetService(url).getDataset(datasourceName, datasetName, function(result){
  12572. * //doSomething
  12573. * });
  12574. * @param {string} datasourceName - 数据源名称。
  12575. * @param {string} datasetName - 数据集名称。
  12576. * @param {RequestCallback} callback - 回调函数。
  12577. */
  12578. }, {
  12579. key: "getDataset",
  12580. value: function getDataset(datasourceName, datasetName, callback) {
  12581. if (!datasourceName || !datasetName) {
  12582. return;
  12583. }
  12584. this._datasetService.getDatasetService(datasourceName, datasetName, callback);
  12585. }
  12586. /**
  12587. * @function SuperMap.REST.DatasetService.prototype.setDataset
  12588. * @description 数据集信息设置服务。可实现修改已存在数据集,新增不存在数据集。
  12589. * @example
  12590. * new SuperMap.REST.DatasetService(url).setDataset(params, function(result){
  12591. * //doSomething
  12592. * });
  12593. * @param {CreateDatasetParameters | UpdateDatasetParameters } params - 数据集创建参数类或数据集信息更改参数类。
  12594. * @param {RequestCallback} callback - 回调函数。
  12595. */
  12596. }, {
  12597. key: "setDataset",
  12598. value: function setDataset(params, callback) {
  12599. if (!(params instanceof CreateDatasetParameters) && !(params instanceof UpdateDatasetParameters)) {
  12600. return;
  12601. }
  12602. var datasetParams;
  12603. if (params instanceof CreateDatasetParameters) {
  12604. datasetParams = {
  12605. "datasetType": params.datasetType,
  12606. "datasourceName": params.datasourceName,
  12607. "datasetName": params.datasetName
  12608. };
  12609. } else if (params instanceof UpdateDatasetParameters) {
  12610. datasetParams = {
  12611. "datasetName": params.datasetName,
  12612. "datasourceName": params.datasourceName,
  12613. "isFileCache": params.isFileCache,
  12614. "description": params.description,
  12615. "prjCoordSys": params.prjCoordSys,
  12616. "charset": params.charset
  12617. };
  12618. }
  12619. this._datasetService.setDatasetService(datasetParams, callback);
  12620. }
  12621. /**
  12622. * @function SuperMap.REST.DatasetService.prototype.deleteDataset
  12623. * @description 指定数据源下的数据集删除服务。
  12624. * @example
  12625. * new SuperMap.REST.DatasetService(url).deleteDataset(datasourceName, datasetName, function(result){
  12626. * //doSomething
  12627. * });
  12628. * @param {string} datasourceName - 数据源名称。
  12629. * @param {string} datasetName - 数据集名称。
  12630. * @param {RequestCallback} callback - 回调函数。
  12631. */
  12632. }, {
  12633. key: "deleteDataset",
  12634. value: function deleteDataset(datasourceName, datasetName, callback) {
  12635. this._datasetService.deleteDatasetService(datasourceName, datasetName, callback);
  12636. }
  12637. }]);
  12638. return DatasetService;
  12639. }(CommonServiceBase);
  12640. SuperMap.REST.DatasetService = DatasetService;
  12641. ;// CONCATENATED MODULE: ./src/common/iServer/DatasourceService.js
  12642. function DatasourceService_typeof(obj) { "@babel/helpers - typeof"; return DatasourceService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, DatasourceService_typeof(obj); }
  12643. function DatasourceService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12644. function DatasourceService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12645. function DatasourceService_createClass(Constructor, protoProps, staticProps) { if (protoProps) DatasourceService_defineProperties(Constructor.prototype, protoProps); if (staticProps) DatasourceService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12646. function DatasourceService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { DatasourceService_get = Reflect.get.bind(); } else { DatasourceService_get = function _get(target, property, receiver) { var base = DatasourceService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return DatasourceService_get.apply(this, arguments); }
  12647. function DatasourceService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = DatasourceService_getPrototypeOf(object); if (object === null) break; } return object; }
  12648. function DatasourceService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) DatasourceService_setPrototypeOf(subClass, superClass); }
  12649. function DatasourceService_setPrototypeOf(o, p) { DatasourceService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return DatasourceService_setPrototypeOf(o, p); }
  12650. function DatasourceService_createSuper(Derived) { var hasNativeReflectConstruct = DatasourceService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = DatasourceService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = DatasourceService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return DatasourceService_possibleConstructorReturn(this, result); }; }
  12651. function DatasourceService_possibleConstructorReturn(self, call) { if (call && (DatasourceService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return DatasourceService_assertThisInitialized(self); }
  12652. function DatasourceService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  12653. function DatasourceService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12654. function DatasourceService_getPrototypeOf(o) { DatasourceService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return DatasourceService_getPrototypeOf(o); }
  12655. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12656. * This program are made available under the terms of the Apache License, Version 2.0
  12657. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12658. /**
  12659. * @class DatasourceService
  12660. * @deprecatedclass SuperMap.DatasourceService
  12661. * @category iServer Data Datasource
  12662. * @classdesc 数据源查询服务类。
  12663. * @param {string} url - 服务地址。如访问World Data服务,只需将url设为:http://localhost:8090/iserver/services/data-world/rest/data 即可。
  12664. * @param {Object} options - 参数。
  12665. * @param {Object} options.eventListeners - 事件监听器对象。有processCompleted属性可传入处理完成后的回调函数。processFailed属性传入处理失败后的回调函数。
  12666. * @param {DataFormat} [options.format=DataFormat.GEOJSON] - 查询结果返回格式,目前支持 iServerJSON 和 GeoJSON 两种格式。参数格式为 "ISERVER","GEOJSON"。
  12667. * @param {string} options.datasource - 要查询的数据集所在的数据源名称。
  12668. * @param {string} options.dataset - 要查询的数据集名称。
  12669. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  12670. * @param {Object} [options.headers] - 请求头。
  12671. * @extends {CommonServiceBase}
  12672. * @usage
  12673. */
  12674. var DatasourceService_DatasourceService = /*#__PURE__*/function (_CommonServiceBase) {
  12675. DatasourceService_inherits(DatasourceService, _CommonServiceBase);
  12676. var _super = DatasourceService_createSuper(DatasourceService);
  12677. function DatasourceService(url, options) {
  12678. var _this;
  12679. DatasourceService_classCallCheck(this, DatasourceService);
  12680. _this = _super.call(this, url, options);
  12681. if (options) {
  12682. Util_Util.extend(DatasourceService_assertThisInitialized(_this), options);
  12683. }
  12684. _this.eventCount = 0;
  12685. _this.CLASS_NAME = "SuperMap.DatasourceService";
  12686. return _this;
  12687. }
  12688. /**
  12689. * @function DatasourceService.prototype.destroy
  12690. * @override
  12691. */
  12692. DatasourceService_createClass(DatasourceService, [{
  12693. key: "destroy",
  12694. value: function destroy() {
  12695. this.eventCount = 0;
  12696. DatasourceService_get(DatasourceService_getPrototypeOf(DatasourceService.prototype), "destroy", this).call(this);
  12697. }
  12698. /**
  12699. * @function DatasourceService.prototype.getDatasourceService
  12700. * @description 获取指定数据源信息。
  12701. */
  12702. }, {
  12703. key: "getDatasourceService",
  12704. value: function getDatasourceService(datasourceName, callback) {
  12705. var url = Util_Util.urlPathAppend(this.url, "datasources/name/".concat(datasourceName));
  12706. this.processAsync(url, "GET", callback);
  12707. }
  12708. /**
  12709. * @function DatasourceService.prototype.getDatasourcesService
  12710. * @description 获取所有数据源信息。
  12711. */
  12712. }, {
  12713. key: "getDatasourcesService",
  12714. value: function getDatasourcesService(callback) {
  12715. var url = Util_Util.urlPathAppend(this.url, "datasources");
  12716. this.processAsync(url, "GET", callback);
  12717. }
  12718. /**
  12719. * @function DatasourceService.prototype.setDatasourceService
  12720. * @description 更新数据源信息。
  12721. */
  12722. }, {
  12723. key: "setDatasourceService",
  12724. value: function setDatasourceService(params, callback) {
  12725. if (!params) {
  12726. return;
  12727. }
  12728. var url = Util_Util.urlPathAppend(this.url, "datasources/name/".concat(params.datasourceName));
  12729. this.processAsync(url, "PUT", callback, params);
  12730. }
  12731. }, {
  12732. key: "processAsync",
  12733. value: function processAsync(url, method, callback, params) {
  12734. var eventId = ++this.eventCount;
  12735. var eventListeners = {
  12736. scope: this,
  12737. processCompleted: function processCompleted(result) {
  12738. if (eventId === result.result.eventId && callback) {
  12739. delete result.result.eventId;
  12740. callback(result);
  12741. this.events && this.events.un(eventListeners);
  12742. return false;
  12743. }
  12744. },
  12745. processFailed: function processFailed(result) {
  12746. if ((eventId === result.error.eventId || eventId === result.eventId) && callback) {
  12747. callback(result);
  12748. this.events && this.events.un(eventListeners);
  12749. return false;
  12750. }
  12751. }
  12752. };
  12753. this.events.on(eventListeners);
  12754. var me = this;
  12755. var requestConfig = {
  12756. url: url,
  12757. method: method,
  12758. scope: me,
  12759. success: function success(result, options) {
  12760. result.eventId = eventId;
  12761. this.serviceProcessCompleted(result, options);
  12762. },
  12763. failure: function failure(result, options) {
  12764. if (result.error) {
  12765. result.error.eventId = eventId;
  12766. }
  12767. result.eventId = eventId;
  12768. this.serviceProcessFailed(result, options);
  12769. }
  12770. };
  12771. params && (requestConfig.data = Util_Util.toJSON(params));
  12772. me.request(requestConfig);
  12773. }
  12774. }]);
  12775. return DatasourceService;
  12776. }(CommonServiceBase);
  12777. ;// CONCATENATED MODULE: ./src/common/iServer/SetDatasourceParameters.js
  12778. function SetDatasourceParameters_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12779. function SetDatasourceParameters_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12780. function SetDatasourceParameters_createClass(Constructor, protoProps, staticProps) { if (protoProps) SetDatasourceParameters_defineProperties(Constructor.prototype, protoProps); if (staticProps) SetDatasourceParameters_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12781. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12782. * This program are made available under the terms of the Apache License, Version 2.0
  12783. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12784. /**
  12785. * @class SetDatasourceParameters
  12786. * @deprecatedclass SuperMap.SetDatasourceParameters
  12787. * @category iServer Data Datasource
  12788. * @classdesc 设置数据源信息参数类。
  12789. * @param {Object} options - 参数。
  12790. * @param {string} options.datasourceName - 数据源名称。
  12791. * @param {string} options.description - 数据源描述信息。
  12792. * @param {string} options.coordUnit - 坐标单位。
  12793. * @param {string} options.distanceUnit - 距离单位。
  12794. * @usage
  12795. */
  12796. var SetDatasourceParameters = /*#__PURE__*/function () {
  12797. function SetDatasourceParameters(options) {
  12798. SetDatasourceParameters_classCallCheck(this, SetDatasourceParameters);
  12799. if (!options) {
  12800. return;
  12801. }
  12802. /**
  12803. * @member {string} SetDatasourceParameters.prototype.datasourceName
  12804. * @description 数据源名称。
  12805. */
  12806. this.datasourceName = null;
  12807. /**
  12808. * @member {string} SetDatasourceParameters.prototype.description
  12809. * @description 数据源描述信息。
  12810. */
  12811. this.description = null;
  12812. /**
  12813. * @member {string} SetDatasourceParameters.prototype.coordUnit
  12814. * @description 坐标单位。
  12815. */
  12816. this.coordUnit = null;
  12817. /**
  12818. * @member {string} SetDatasourceParameters.prototype.distanceUnit
  12819. * @description 距离单位。
  12820. */
  12821. this.distanceUnit = null;
  12822. if (options) {
  12823. Util_Util.extend(this, options);
  12824. }
  12825. this.CLASS_NAME = "SuperMap.SetDatasourceParameters";
  12826. }
  12827. /**
  12828. * @function SetDatasourceParameters.prototype.destroy
  12829. * @description 释放资源,将引用资源的属性置空。
  12830. */
  12831. SetDatasourceParameters_createClass(SetDatasourceParameters, [{
  12832. key: "destroy",
  12833. value: function destroy() {
  12834. var me = this;
  12835. me.datasourceName = null;
  12836. me.description = null;
  12837. me.coordUnit = null;
  12838. me.distanceUnit = null;
  12839. }
  12840. }]);
  12841. return SetDatasourceParameters;
  12842. }();
  12843. ;// CONCATENATED MODULE: ./src/classic/services/DatasourceService.js
  12844. function services_DatasourceService_typeof(obj) { "@babel/helpers - typeof"; return services_DatasourceService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, services_DatasourceService_typeof(obj); }
  12845. function services_DatasourceService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12846. function services_DatasourceService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12847. function services_DatasourceService_createClass(Constructor, protoProps, staticProps) { if (protoProps) services_DatasourceService_defineProperties(Constructor.prototype, protoProps); if (staticProps) services_DatasourceService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12848. function services_DatasourceService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) services_DatasourceService_setPrototypeOf(subClass, superClass); }
  12849. function services_DatasourceService_setPrototypeOf(o, p) { services_DatasourceService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return services_DatasourceService_setPrototypeOf(o, p); }
  12850. function services_DatasourceService_createSuper(Derived) { var hasNativeReflectConstruct = services_DatasourceService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = services_DatasourceService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = services_DatasourceService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return services_DatasourceService_possibleConstructorReturn(this, result); }; }
  12851. function services_DatasourceService_possibleConstructorReturn(self, call) { if (call && (services_DatasourceService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return services_DatasourceService_assertThisInitialized(self); }
  12852. function services_DatasourceService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  12853. function services_DatasourceService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12854. function services_DatasourceService_getPrototypeOf(o) { services_DatasourceService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return services_DatasourceService_getPrototypeOf(o); }
  12855. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12856. * This program are made available under the terms of the Apache License, Version 2.0
  12857. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12858. /**
  12859. * @class SuperMap.REST.DatasourceService
  12860. * @category iServer Data Datasource
  12861. * @classdesc 数据源服务类。
  12862. * @extends {CommonServiceBase}
  12863. * @param {string} url - 服务地址。
  12864. * @param {Object} options - 参数。
  12865. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  12866. * @param {Object} [options.headers] - 请求头。
  12867. */
  12868. var DatasourceService = /*#__PURE__*/function (_CommonServiceBase) {
  12869. services_DatasourceService_inherits(DatasourceService, _CommonServiceBase);
  12870. var _super = services_DatasourceService_createSuper(DatasourceService);
  12871. function DatasourceService(url, options) {
  12872. var _this;
  12873. services_DatasourceService_classCallCheck(this, DatasourceService);
  12874. _this = _super.call(this, url, options);
  12875. var me = services_DatasourceService_assertThisInitialized(_this);
  12876. _this._datasourceService = new DatasourceService_DatasourceService(me.url, {
  12877. proxy: me.proxy,
  12878. withCredentials: me.withCredentials,
  12879. crossOrigin: me.crossOrigin,
  12880. headers: me.headers
  12881. });
  12882. _this.CLASS_NAME = "SuperMap.REST.DatasourceService";
  12883. return _this;
  12884. }
  12885. /**
  12886. * @function SuperMap.REST.DatasourceService.prototype.getDatasources
  12887. * @description 数据源集查询服务。
  12888. * @example
  12889. * new SuperMap.REST.DatasourceService(url).getDatasources(function(result){
  12890. * //doSomething
  12891. * });
  12892. * @param {RequestCallback} callback - 回调函数。
  12893. */
  12894. services_DatasourceService_createClass(DatasourceService, [{
  12895. key: "getDatasources",
  12896. value: function getDatasources(callback) {
  12897. this._datasourceService.getDatasourcesService(callback);
  12898. }
  12899. /**
  12900. * @function SuperMap.REST.DatasourceService.prototype.getDatasource
  12901. * @description 数据源信息查询服务。
  12902. * @example
  12903. * new SuperMap.REST.DatasourceService(url).getDatasource(datasourceName,function(result){
  12904. * //doSomething
  12905. * });
  12906. * @param {string} datasourceName - 数据源名称。
  12907. * @param {RequestCallback} callback 回调函数。
  12908. */
  12909. }, {
  12910. key: "getDatasource",
  12911. value: function getDatasource(datasourceName, callback) {
  12912. if (!datasourceName) {
  12913. return;
  12914. }
  12915. this._datasourceService.getDatasourceService(datasourceName, callback);
  12916. }
  12917. /**
  12918. * @function SuperMap.REST.DatasourceService.prototype.setDatasource
  12919. * @description 数据源信息设置服务。可实现更改当前数据源信息。
  12920. * @example
  12921. * new SuperMap.REST.DatasourceService(url).setDatasource(params, function(result){
  12922. * //doSomething
  12923. * });
  12924. * @param {SetDatasourceParameters} params - 数据源信息查询参数类。
  12925. * @param {RequestCallback} callback - 回调函数。
  12926. */
  12927. }, {
  12928. key: "setDatasource",
  12929. value: function setDatasource(params, callback) {
  12930. if (!(params instanceof SetDatasourceParameters)) {
  12931. return;
  12932. }
  12933. var datasourceParams = {
  12934. description: params.description,
  12935. coordUnit: params.coordUnit,
  12936. distanceUnit: params.distanceUnit,
  12937. datasourceName: params.datasourceName
  12938. };
  12939. this._datasourceService.setDatasourceService(datasourceParams, callback);
  12940. }
  12941. }]);
  12942. return DatasourceService;
  12943. }(CommonServiceBase);
  12944. SuperMap.REST.DatasourceService = DatasourceService;
  12945. ;// CONCATENATED MODULE: ./src/common/iServer/ProcessingServiceBase.js
  12946. function ProcessingServiceBase_typeof(obj) { "@babel/helpers - typeof"; return ProcessingServiceBase_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, ProcessingServiceBase_typeof(obj); }
  12947. function ProcessingServiceBase_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  12948. function ProcessingServiceBase_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  12949. function ProcessingServiceBase_createClass(Constructor, protoProps, staticProps) { if (protoProps) ProcessingServiceBase_defineProperties(Constructor.prototype, protoProps); if (staticProps) ProcessingServiceBase_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  12950. function ProcessingServiceBase_get() { if (typeof Reflect !== "undefined" && Reflect.get) { ProcessingServiceBase_get = Reflect.get.bind(); } else { ProcessingServiceBase_get = function _get(target, property, receiver) { var base = ProcessingServiceBase_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return ProcessingServiceBase_get.apply(this, arguments); }
  12951. function ProcessingServiceBase_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = ProcessingServiceBase_getPrototypeOf(object); if (object === null) break; } return object; }
  12952. function ProcessingServiceBase_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) ProcessingServiceBase_setPrototypeOf(subClass, superClass); }
  12953. function ProcessingServiceBase_setPrototypeOf(o, p) { ProcessingServiceBase_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ProcessingServiceBase_setPrototypeOf(o, p); }
  12954. function ProcessingServiceBase_createSuper(Derived) { var hasNativeReflectConstruct = ProcessingServiceBase_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = ProcessingServiceBase_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = ProcessingServiceBase_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return ProcessingServiceBase_possibleConstructorReturn(this, result); }; }
  12955. function ProcessingServiceBase_possibleConstructorReturn(self, call) { if (call && (ProcessingServiceBase_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return ProcessingServiceBase_assertThisInitialized(self); }
  12956. function ProcessingServiceBase_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  12957. function ProcessingServiceBase_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  12958. function ProcessingServiceBase_getPrototypeOf(o) { ProcessingServiceBase_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ProcessingServiceBase_getPrototypeOf(o); }
  12959. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  12960. * This program are made available under the terms of the Apache License, Version 2.0
  12961. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  12962. /**
  12963. * @class ProcessingServiceBase
  12964. * @deprecatedclass SuperMap.ProcessingServiceBase
  12965. * @category iServer Core
  12966. * @classdesc 分布式分析服务基类
  12967. * @extends {CommonServiceBase}
  12968. * @param {string} url - 服务地址。
  12969. * @param {Object} options - 参数。
  12970. * @param {Events} options.events - 处理所有事件的对象。
  12971. * @param {number} options.index - 服务访问地址在数组中的位置。
  12972. * @param {number} options.length - 服务访问地址数组长度。
  12973. * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  12974. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  12975. * @param {Object} [options.headers] - 请求头。
  12976. * @usage
  12977. */
  12978. var ProcessingServiceBase = /*#__PURE__*/function (_CommonServiceBase) {
  12979. ProcessingServiceBase_inherits(ProcessingServiceBase, _CommonServiceBase);
  12980. var _super = ProcessingServiceBase_createSuper(ProcessingServiceBase);
  12981. function ProcessingServiceBase(url, options) {
  12982. var _this;
  12983. ProcessingServiceBase_classCallCheck(this, ProcessingServiceBase);
  12984. options = options || {};
  12985. /*
  12986. * Constant: EVENT_TYPES
  12987. * {Array.<string>}
  12988. * 此类支持的事件类型
  12989. * - *processCompleted* 创建成功后触发的事件。
  12990. * - *processFailed* 创建失败后触发的事件 。
  12991. * - *processRunning* 创建过程的整个阶段都会触发的事件,用于获取创建过程的状态 。
  12992. */
  12993. options.EVENT_TYPES = ["processCompleted", "processFailed", "processRunning"];
  12994. _this = _super.call(this, url, options);
  12995. _this.CLASS_NAME = "SuperMap.ProcessingServiceBase";
  12996. return _this;
  12997. }
  12998. /**
  12999. * @function ProcessingServiceBase.prototype.destroy
  13000. * @override
  13001. */
  13002. ProcessingServiceBase_createClass(ProcessingServiceBase, [{
  13003. key: "destroy",
  13004. value: function destroy() {
  13005. ProcessingServiceBase_get(ProcessingServiceBase_getPrototypeOf(ProcessingServiceBase.prototype), "destroy", this).call(this);
  13006. }
  13007. /**
  13008. * @function ProcessingServiceBase.prototype.getJobs
  13009. * @description 获取分布式分析任务。
  13010. * @param {string} url - 资源地址。
  13011. */
  13012. }, {
  13013. key: "getJobs",
  13014. value: function getJobs(url) {
  13015. var me = this;
  13016. FetchRequest.get(SecurityManager.appendCredential(url), null, {
  13017. proxy: me.proxy
  13018. }).then(function (response) {
  13019. return response.json();
  13020. }).then(function (result) {
  13021. me.events.triggerEvent("processCompleted", {
  13022. result: result
  13023. });
  13024. })["catch"](function (e) {
  13025. me.eventListeners.processFailed({
  13026. error: e
  13027. });
  13028. });
  13029. }
  13030. /**
  13031. * @function ProcessingServiceBase.prototype.addJob
  13032. * @description 添加分布式分析任务。
  13033. * @param {string} url - 资源根地址。
  13034. * @param {Object} params - 创建一个空间分析的请求参数。
  13035. * @param {string} paramType - 请求参数类型。
  13036. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13037. */
  13038. }, {
  13039. key: "addJob",
  13040. value: function addJob(url, params, paramType, seconds) {
  13041. var me = this,
  13042. parameterObject = null;
  13043. if (params && params instanceof paramType) {
  13044. parameterObject = new Object();
  13045. paramType.toObject(params, parameterObject);
  13046. }
  13047. var headers = Object.assign({
  13048. 'Content-Type': 'application/x-www-form-urlencoded'
  13049. }, me.headers || {});
  13050. var options = {
  13051. proxy: me.proxy,
  13052. headers: headers,
  13053. withCredentials: me.withCredentials,
  13054. crossOrigin: me.crossOrigin,
  13055. isInTheSameDomain: me.isInTheSameDomain
  13056. };
  13057. FetchRequest.post(SecurityManager.appendCredential(url), JSON.stringify(parameterObject), options).then(function (response) {
  13058. return response.json();
  13059. }).then(function (result) {
  13060. if (result.succeed) {
  13061. me.serviceProcessCompleted(result, seconds);
  13062. } else {
  13063. me.serviceProcessFailed(result);
  13064. }
  13065. })["catch"](function (e) {
  13066. me.serviceProcessFailed({
  13067. error: e
  13068. });
  13069. });
  13070. }
  13071. }, {
  13072. key: "serviceProcessCompleted",
  13073. value: function serviceProcessCompleted(result, seconds) {
  13074. result = Util_Util.transformResult(result);
  13075. seconds = seconds || 1000;
  13076. var me = this;
  13077. if (result) {
  13078. var id = setInterval(function () {
  13079. FetchRequest.get(SecurityManager.appendCredential(result.newResourceLocation), {
  13080. _t: new Date().getTime()
  13081. }).then(function (response) {
  13082. return response.json();
  13083. }).then(function (job) {
  13084. me.events.triggerEvent("processRunning", {
  13085. id: job.id,
  13086. state: job.state
  13087. });
  13088. if (job.state.runState === 'LOST' || job.state.runState === 'KILLED' || job.state.runState === 'FAILED') {
  13089. clearInterval(id);
  13090. me.events.triggerEvent("processFailed", {
  13091. error: job.state.errorMsg,
  13092. state: job.state.runState
  13093. });
  13094. }
  13095. if (job.state.runState === 'FINISHED' && job.setting.serviceInfo) {
  13096. clearInterval(id);
  13097. me.events.triggerEvent("processCompleted", {
  13098. result: job
  13099. });
  13100. }
  13101. })["catch"](function (e) {
  13102. clearInterval(id);
  13103. me.events.triggerEvent("processFailed", {
  13104. error: e
  13105. });
  13106. });
  13107. }, seconds);
  13108. }
  13109. }
  13110. }, {
  13111. key: "serviceProcessFailed",
  13112. value: function serviceProcessFailed(result) {
  13113. ProcessingServiceBase_get(ProcessingServiceBase_getPrototypeOf(ProcessingServiceBase.prototype), "serviceProcessFailed", this).call(this, result);
  13114. }
  13115. }]);
  13116. return ProcessingServiceBase;
  13117. }(CommonServiceBase);
  13118. ;// CONCATENATED MODULE: ./src/common/iServer/KernelDensityJobsService.js
  13119. function KernelDensityJobsService_typeof(obj) { "@babel/helpers - typeof"; return KernelDensityJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, KernelDensityJobsService_typeof(obj); }
  13120. function KernelDensityJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13121. function KernelDensityJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13122. function KernelDensityJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) KernelDensityJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) KernelDensityJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13123. function KernelDensityJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { KernelDensityJobsService_get = Reflect.get.bind(); } else { KernelDensityJobsService_get = function _get(target, property, receiver) { var base = KernelDensityJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return KernelDensityJobsService_get.apply(this, arguments); }
  13124. function KernelDensityJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = KernelDensityJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13125. function KernelDensityJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) KernelDensityJobsService_setPrototypeOf(subClass, superClass); }
  13126. function KernelDensityJobsService_setPrototypeOf(o, p) { KernelDensityJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return KernelDensityJobsService_setPrototypeOf(o, p); }
  13127. function KernelDensityJobsService_createSuper(Derived) { var hasNativeReflectConstruct = KernelDensityJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = KernelDensityJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = KernelDensityJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return KernelDensityJobsService_possibleConstructorReturn(this, result); }; }
  13128. function KernelDensityJobsService_possibleConstructorReturn(self, call) { if (call && (KernelDensityJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return KernelDensityJobsService_assertThisInitialized(self); }
  13129. function KernelDensityJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13130. function KernelDensityJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13131. function KernelDensityJobsService_getPrototypeOf(o) { KernelDensityJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return KernelDensityJobsService_getPrototypeOf(o); }
  13132. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13133. * This program are made available under the terms of the Apache License, Version 2.0
  13134. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13135. /**
  13136. * @class KernelDensityJobsService
  13137. * @deprecatedclass SuperMap.KernelDensityJobsService
  13138. * @category iServer ProcessingService DensityAnalyst
  13139. * @classdesc 核密度分析服务类
  13140. * @extends {ProcessingServiceBase}
  13141. * @param {string} url - 服务地址。
  13142. * @param {Object} options - 可选参数。
  13143. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13144. * @param {Object} [options.headers] - 请求头。
  13145. * @usage
  13146. */
  13147. var KernelDensityJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13148. KernelDensityJobsService_inherits(KernelDensityJobsService, _ProcessingServiceBas);
  13149. var _super = KernelDensityJobsService_createSuper(KernelDensityJobsService);
  13150. function KernelDensityJobsService(url, options) {
  13151. var _this;
  13152. KernelDensityJobsService_classCallCheck(this, KernelDensityJobsService);
  13153. _this = _super.call(this, url, options);
  13154. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/density');
  13155. _this.CLASS_NAME = "SuperMap.KernelDensityJobsService";
  13156. return _this;
  13157. }
  13158. /**
  13159. * @function KernelDensityJobsService.prototype.destroy
  13160. * @override
  13161. */
  13162. KernelDensityJobsService_createClass(KernelDensityJobsService, [{
  13163. key: "destroy",
  13164. value: function destroy() {
  13165. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "destroy", this).call(this);
  13166. }
  13167. /**
  13168. * @function KernelDensityJobsService.prototype.getKernelDensityJobs
  13169. * @description 获取核密度分析任务
  13170. */
  13171. }, {
  13172. key: "getKernelDensityJobs",
  13173. value: function getKernelDensityJobs() {
  13174. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "getJobs", this).call(this, this.url);
  13175. }
  13176. /**
  13177. * @function KernelDensityJobsService.prototype.getKernelDensityJobs
  13178. * @description 获取指定id的核密度分析服务
  13179. * @param {string} id - 指定要获取数据的id
  13180. */
  13181. }, {
  13182. key: "getKernelDensityJob",
  13183. value: function getKernelDensityJob(id) {
  13184. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13185. }
  13186. /**
  13187. * @function KernelDensityJobsService.prototype.addKernelDensityJob
  13188. * @description 新建核密度分析服务
  13189. * @param {KernelDensityJobParameter} params - 核密度分析服务参数类。
  13190. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13191. */
  13192. }, {
  13193. key: "addKernelDensityJob",
  13194. value: function addKernelDensityJob(params, seconds) {
  13195. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "addJob", this).call(this, this.url, params, KernelDensityJobParameter, seconds);
  13196. }
  13197. }]);
  13198. return KernelDensityJobsService;
  13199. }(ProcessingServiceBase);
  13200. ;// CONCATENATED MODULE: ./src/common/iServer/SingleObjectQueryJobsService.js
  13201. function SingleObjectQueryJobsService_typeof(obj) { "@babel/helpers - typeof"; return SingleObjectQueryJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, SingleObjectQueryJobsService_typeof(obj); }
  13202. function SingleObjectQueryJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13203. function SingleObjectQueryJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13204. function SingleObjectQueryJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SingleObjectQueryJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SingleObjectQueryJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13205. function SingleObjectQueryJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { SingleObjectQueryJobsService_get = Reflect.get.bind(); } else { SingleObjectQueryJobsService_get = function _get(target, property, receiver) { var base = SingleObjectQueryJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return SingleObjectQueryJobsService_get.apply(this, arguments); }
  13206. function SingleObjectQueryJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SingleObjectQueryJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13207. function SingleObjectQueryJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) SingleObjectQueryJobsService_setPrototypeOf(subClass, superClass); }
  13208. function SingleObjectQueryJobsService_setPrototypeOf(o, p) { SingleObjectQueryJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SingleObjectQueryJobsService_setPrototypeOf(o, p); }
  13209. function SingleObjectQueryJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SingleObjectQueryJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SingleObjectQueryJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SingleObjectQueryJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SingleObjectQueryJobsService_possibleConstructorReturn(this, result); }; }
  13210. function SingleObjectQueryJobsService_possibleConstructorReturn(self, call) { if (call && (SingleObjectQueryJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return SingleObjectQueryJobsService_assertThisInitialized(self); }
  13211. function SingleObjectQueryJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13212. function SingleObjectQueryJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13213. function SingleObjectQueryJobsService_getPrototypeOf(o) { SingleObjectQueryJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SingleObjectQueryJobsService_getPrototypeOf(o); }
  13214. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13215. * This program are made available under the terms of the Apache License, Version 2.0
  13216. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13217. /**
  13218. * @class SingleObjectQueryJobsService
  13219. * @deprecatedclass SuperMap.SingleObjectQueryJobsService
  13220. * @category iServer ProcessingService Query
  13221. * @classdesc 单对象查询分析服务类
  13222. * @extends {ProcessingServiceBase}
  13223. * @param {string} url - 服务地址。
  13224. * @param {Object} options - 可选参数。
  13225. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13226. * @param {Object} [options.headers] - 请求头。
  13227. * @usage
  13228. */
  13229. var SingleObjectQueryJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13230. SingleObjectQueryJobsService_inherits(SingleObjectQueryJobsService, _ProcessingServiceBas);
  13231. var _super = SingleObjectQueryJobsService_createSuper(SingleObjectQueryJobsService);
  13232. function SingleObjectQueryJobsService(url, options) {
  13233. var _this;
  13234. SingleObjectQueryJobsService_classCallCheck(this, SingleObjectQueryJobsService);
  13235. _this = _super.call(this, url, options);
  13236. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/query');
  13237. _this.CLASS_NAME = 'SuperMap.SingleObjectQueryJobsService';
  13238. return _this;
  13239. }
  13240. /**
  13241. *@override
  13242. */
  13243. SingleObjectQueryJobsService_createClass(SingleObjectQueryJobsService, [{
  13244. key: "destroy",
  13245. value: function destroy() {
  13246. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "destroy", this).call(this);
  13247. }
  13248. /**
  13249. * @function SingleObjectQueryJobsService.protitype.getQueryJobs
  13250. * @description 获取单对象空间查询分析所有任务
  13251. */
  13252. }, {
  13253. key: "getQueryJobs",
  13254. value: function getQueryJobs() {
  13255. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "getJobs", this).call(this, this.url);
  13256. }
  13257. /**
  13258. * @function KernelDensityJobsService.protitype.getQueryJob
  13259. * @description 获取指定id的单对象空间查询分析服务
  13260. * @param {string} id - 指定要获取数据的id
  13261. */
  13262. }, {
  13263. key: "getQueryJob",
  13264. value: function getQueryJob(id) {
  13265. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13266. }
  13267. /**
  13268. * @function SingleObjectQueryJobsService.protitype.addQueryJob
  13269. * @description 新建单对象空间查询分析服务
  13270. * @param {SingleObjectQueryJobsParameter} params - 创建一个空间分析的请求参数。
  13271. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13272. */
  13273. }, {
  13274. key: "addQueryJob",
  13275. value: function addQueryJob(params, seconds) {
  13276. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "addJob", this).call(this, this.url, params, SingleObjectQueryJobsParameter, seconds);
  13277. }
  13278. }]);
  13279. return SingleObjectQueryJobsService;
  13280. }(ProcessingServiceBase);
  13281. ;// CONCATENATED MODULE: ./src/common/iServer/SummaryMeshJobsService.js
  13282. function SummaryMeshJobsService_typeof(obj) { "@babel/helpers - typeof"; return SummaryMeshJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, SummaryMeshJobsService_typeof(obj); }
  13283. function SummaryMeshJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13284. function SummaryMeshJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13285. function SummaryMeshJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryMeshJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryMeshJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13286. function SummaryMeshJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { SummaryMeshJobsService_get = Reflect.get.bind(); } else { SummaryMeshJobsService_get = function _get(target, property, receiver) { var base = SummaryMeshJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return SummaryMeshJobsService_get.apply(this, arguments); }
  13287. function SummaryMeshJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SummaryMeshJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13288. function SummaryMeshJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) SummaryMeshJobsService_setPrototypeOf(subClass, superClass); }
  13289. function SummaryMeshJobsService_setPrototypeOf(o, p) { SummaryMeshJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SummaryMeshJobsService_setPrototypeOf(o, p); }
  13290. function SummaryMeshJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SummaryMeshJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SummaryMeshJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SummaryMeshJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SummaryMeshJobsService_possibleConstructorReturn(this, result); }; }
  13291. function SummaryMeshJobsService_possibleConstructorReturn(self, call) { if (call && (SummaryMeshJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return SummaryMeshJobsService_assertThisInitialized(self); }
  13292. function SummaryMeshJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13293. function SummaryMeshJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13294. function SummaryMeshJobsService_getPrototypeOf(o) { SummaryMeshJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SummaryMeshJobsService_getPrototypeOf(o); }
  13295. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13296. * This program are made available under the terms of the Apache License, Version 2.0
  13297. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13298. /**
  13299. * @class SummaryMeshJobsService
  13300. * @deprecatedclass SuperMap.SummaryMeshJobsService
  13301. * @category iServer ProcessingService AggregatePoints
  13302. * @classdesc 点聚合分析任务类。
  13303. * @param {string} url - 服务地址。
  13304. * @param {Object} options - 参数。
  13305. * @param {Events} options.events - 处理所有事件的对象。
  13306. * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  13307. * @param {number} options.index - 服务地址在数组中的位置。
  13308. * @param {number} options.length - 服务地址数组长度。
  13309. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13310. * @param {Object} [options.headers] - 请求头。
  13311. * @usage
  13312. */
  13313. var SummaryMeshJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13314. SummaryMeshJobsService_inherits(SummaryMeshJobsService, _ProcessingServiceBas);
  13315. var _super = SummaryMeshJobsService_createSuper(SummaryMeshJobsService);
  13316. function SummaryMeshJobsService(url, options) {
  13317. var _this;
  13318. SummaryMeshJobsService_classCallCheck(this, SummaryMeshJobsService);
  13319. _this = _super.call(this, url, options);
  13320. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/aggregatepoints');
  13321. _this.CLASS_NAME = 'SuperMap.SummaryMeshJobsService';
  13322. return _this;
  13323. }
  13324. /**
  13325. * @override
  13326. */
  13327. SummaryMeshJobsService_createClass(SummaryMeshJobsService, [{
  13328. key: "destroy",
  13329. value: function destroy() {
  13330. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "destroy", this).call(this);
  13331. }
  13332. /**
  13333. * @function SummaryMeshJobsService.prototype.getSummaryMeshJobs
  13334. * @description 获取点聚合分析任务
  13335. */
  13336. }, {
  13337. key: "getSummaryMeshJobs",
  13338. value: function getSummaryMeshJobs() {
  13339. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "getJobs", this).call(this, this.url);
  13340. }
  13341. /**
  13342. * @function SummaryMeshJobsService.prototype.getSummaryMeshJob
  13343. * @description 获取指定ip的点聚合分析任务
  13344. * @param {string} id - 指定要获取数据的id
  13345. */
  13346. }, {
  13347. key: "getSummaryMeshJob",
  13348. value: function getSummaryMeshJob(id) {
  13349. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13350. }
  13351. /**
  13352. * @function SummaryMeshJobsService.prototype.addSummaryMeshJob
  13353. * @description 新建点聚合分析服务
  13354. * @param {SummaryMeshJobParameter} params - 创建一个空间分析的请求参数。
  13355. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13356. */
  13357. }, {
  13358. key: "addSummaryMeshJob",
  13359. value: function addSummaryMeshJob(params, seconds) {
  13360. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "addJob", this).call(this, this.url, params, SummaryMeshJobParameter, seconds);
  13361. }
  13362. }]);
  13363. return SummaryMeshJobsService;
  13364. }(ProcessingServiceBase);
  13365. ;// CONCATENATED MODULE: ./src/common/iServer/SummaryRegionJobsService.js
  13366. function SummaryRegionJobsService_typeof(obj) { "@babel/helpers - typeof"; return SummaryRegionJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, SummaryRegionJobsService_typeof(obj); }
  13367. function SummaryRegionJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13368. function SummaryRegionJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13369. function SummaryRegionJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryRegionJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryRegionJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13370. function SummaryRegionJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { SummaryRegionJobsService_get = Reflect.get.bind(); } else { SummaryRegionJobsService_get = function _get(target, property, receiver) { var base = SummaryRegionJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return SummaryRegionJobsService_get.apply(this, arguments); }
  13371. function SummaryRegionJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SummaryRegionJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13372. function SummaryRegionJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) SummaryRegionJobsService_setPrototypeOf(subClass, superClass); }
  13373. function SummaryRegionJobsService_setPrototypeOf(o, p) { SummaryRegionJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SummaryRegionJobsService_setPrototypeOf(o, p); }
  13374. function SummaryRegionJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SummaryRegionJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SummaryRegionJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SummaryRegionJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SummaryRegionJobsService_possibleConstructorReturn(this, result); }; }
  13375. function SummaryRegionJobsService_possibleConstructorReturn(self, call) { if (call && (SummaryRegionJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return SummaryRegionJobsService_assertThisInitialized(self); }
  13376. function SummaryRegionJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13377. function SummaryRegionJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13378. function SummaryRegionJobsService_getPrototypeOf(o) { SummaryRegionJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SummaryRegionJobsService_getPrototypeOf(o); }
  13379. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13380. * This program are made available under the terms of the Apache License, Version 2.0
  13381. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13382. /**
  13383. * @class SummaryRegionJobsService
  13384. * @deprecatedclass SuperMap.SummaryRegionJobsService
  13385. * @category iServer ProcessingService SummaryRegion
  13386. * @classdesc 区域汇总分析服务类
  13387. * @extends {ProcessingServiceBase}
  13388. * @param {string} url - 服务地址。
  13389. * @param {Object} options - 可选参数。
  13390. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13391. * @param {Object} [options.headers] - 请求头。
  13392. * @usage
  13393. */
  13394. var SummaryRegionJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13395. SummaryRegionJobsService_inherits(SummaryRegionJobsService, _ProcessingServiceBas);
  13396. var _super = SummaryRegionJobsService_createSuper(SummaryRegionJobsService);
  13397. function SummaryRegionJobsService(url, options) {
  13398. var _this;
  13399. SummaryRegionJobsService_classCallCheck(this, SummaryRegionJobsService);
  13400. _this = _super.call(this, url, options);
  13401. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/summaryregion');
  13402. _this.CLASS_NAME = 'SuperMap.SummaryRegionJobsService';
  13403. return _this;
  13404. }
  13405. /**
  13406. *@override
  13407. */
  13408. SummaryRegionJobsService_createClass(SummaryRegionJobsService, [{
  13409. key: "destroy",
  13410. value: function destroy() {
  13411. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "destroy", this).call(this);
  13412. }
  13413. /**
  13414. * @function SummaryRegionJobsService.prototype.getSummaryRegionJobs
  13415. * @description 获取区域汇总分析任务集合。
  13416. */
  13417. }, {
  13418. key: "getSummaryRegionJobs",
  13419. value: function getSummaryRegionJobs() {
  13420. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "getJobs", this).call(this, this.url);
  13421. }
  13422. /**
  13423. * @function SummaryRegionJobsService.prototype.getSummaryRegionJob
  13424. * @description 获取指定id的区域汇总分析任务。
  13425. * @param {string} id -要获取区域汇总分析任务的id
  13426. */
  13427. }, {
  13428. key: "getSummaryRegionJob",
  13429. value: function getSummaryRegionJob(id) {
  13430. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13431. }
  13432. /**
  13433. * @function SummaryRegionJobsService.prototype.addSummaryRegionJob
  13434. * @description 新建区域汇总任务。
  13435. * @param {SummaryRegionJobParameter} params - 区域汇总分析任务参数类。
  13436. * @param {number} seconds - 创建成功结果的时间间隔。
  13437. */
  13438. }, {
  13439. key: "addSummaryRegionJob",
  13440. value: function addSummaryRegionJob(params, seconds) {
  13441. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "addJob", this).call(this, this.url, params, SummaryRegionJobParameter, seconds);
  13442. }
  13443. }]);
  13444. return SummaryRegionJobsService;
  13445. }(ProcessingServiceBase);
  13446. ;// CONCATENATED MODULE: ./src/common/iServer/VectorClipJobsParameter.js
  13447. function VectorClipJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13448. function VectorClipJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13449. function VectorClipJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) VectorClipJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) VectorClipJobsParameter_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13450. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13451. * This program are made available under the terms of the Apache License, Version 2.0
  13452. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13453. /**
  13454. * @class VectorClipJobsParameter
  13455. * @deprecatedclass SuperMap.VectorClipJobsParameter
  13456. * @category iServer ProcessingService VectorClip
  13457. * @classdesc 矢量裁剪分析任务参数类。
  13458. * @param {Object} options - 参数。
  13459. * @param {string} options.datasetName - 数据集名。
  13460. * @param {string} options.datasetOverlay - 裁剪对象数据集。
  13461. * @param {ClipAnalystMode} [options.mode=ClipAnalystMode.CLIP] - 裁剪分析模式。
  13462. * @param {string} [options.geometryClip] - 裁剪几何对象。
  13463. * @param {OutputSetting} [options.output] - 输出参数设置。
  13464. * @param {MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  13465. * @usage
  13466. */
  13467. var VectorClipJobsParameter = /*#__PURE__*/function () {
  13468. function VectorClipJobsParameter(options) {
  13469. VectorClipJobsParameter_classCallCheck(this, VectorClipJobsParameter);
  13470. options = options || {};
  13471. /**
  13472. * @member {string} VectorClipJobsParameter.prototype.datasetName
  13473. * @description 数据集名。
  13474. */
  13475. this.datasetName = "";
  13476. /**
  13477. * @member {string} VectorClipJobsParameter.prototype.datasetOverlay
  13478. * @description 裁剪对象数据集。
  13479. */
  13480. this.datasetVectorClip = "";
  13481. /**
  13482. * @member {string} VectorClipJobsParameter.prototype.geometryClip
  13483. * @description 裁剪几何对象。
  13484. */
  13485. this.geometryClip = "";
  13486. /**
  13487. * @member {ClipAnalystMode} [VectorClipJobsParameter.prototype.mode=ClipAnalystMode.CLIP]
  13488. * @description 裁剪分析模式 。
  13489. */
  13490. this.mode = ClipAnalystMode.CLIP;
  13491. /**
  13492. * @member {OutputSetting} VectorClipJobsParameter.prototype.output
  13493. * @description 输出参数设置类。
  13494. */
  13495. this.output = null;
  13496. /**
  13497. * @member {MappingParameters} [VectorClipJobsParameter.prototype.mappingParameters]
  13498. * @description 分析后结果可视化的参数类。
  13499. */
  13500. this.mappingParameters = null;
  13501. Util_Util.extend(this, options);
  13502. this.CLASS_NAME = "SuperMap.VectorClipJobsParameter";
  13503. }
  13504. /**
  13505. * @function VectorClipJobsParameter.prototype.destroy
  13506. * @description 释放资源,将引用资源的属性置空。
  13507. */
  13508. VectorClipJobsParameter_createClass(VectorClipJobsParameter, [{
  13509. key: "destroy",
  13510. value: function destroy() {
  13511. this.datasetName = null;
  13512. this.datasetVectorClip = null;
  13513. this.geometryClip = null;
  13514. this.mode = null;
  13515. if (this.output instanceof OutputSetting) {
  13516. this.output.destroy();
  13517. this.output = null;
  13518. }
  13519. if (this.mappingParameters instanceof MappingParameters) {
  13520. this.mappingParameters.destroy();
  13521. this.mappingParameters = null;
  13522. }
  13523. }
  13524. /**
  13525. * @function VectorClipJobsParameter.toObject
  13526. * @param {Object} vectorClipJobsParameter - 区域汇总分析服务参数。
  13527. * @param {Object} tempObj - 目标对象。
  13528. * @description 矢量裁剪分析任务对象。
  13529. */
  13530. }], [{
  13531. key: "toObject",
  13532. value: function toObject(vectorClipJobsParameter, tempObj) {
  13533. for (var name in vectorClipJobsParameter) {
  13534. if (name === "datasetName") {
  13535. tempObj['input'] = tempObj['input'] || {};
  13536. tempObj['input'][name] = vectorClipJobsParameter[name];
  13537. continue;
  13538. }
  13539. if (name === "output") {
  13540. tempObj['output'] = tempObj['output'] || {};
  13541. tempObj['output'] = vectorClipJobsParameter[name];
  13542. continue;
  13543. }
  13544. tempObj['analyst'] = tempObj['analyst'] || {};
  13545. tempObj['analyst'][name] = vectorClipJobsParameter[name];
  13546. if (name === 'mappingParameters') {
  13547. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  13548. tempObj['analyst']['mappingParameters'] = vectorClipJobsParameter[name];
  13549. }
  13550. }
  13551. }
  13552. }]);
  13553. return VectorClipJobsParameter;
  13554. }();
  13555. ;// CONCATENATED MODULE: ./src/common/iServer/VectorClipJobsService.js
  13556. function VectorClipJobsService_typeof(obj) { "@babel/helpers - typeof"; return VectorClipJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, VectorClipJobsService_typeof(obj); }
  13557. function VectorClipJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13558. function VectorClipJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13559. function VectorClipJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) VectorClipJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) VectorClipJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13560. function VectorClipJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { VectorClipJobsService_get = Reflect.get.bind(); } else { VectorClipJobsService_get = function _get(target, property, receiver) { var base = VectorClipJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return VectorClipJobsService_get.apply(this, arguments); }
  13561. function VectorClipJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = VectorClipJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13562. function VectorClipJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) VectorClipJobsService_setPrototypeOf(subClass, superClass); }
  13563. function VectorClipJobsService_setPrototypeOf(o, p) { VectorClipJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return VectorClipJobsService_setPrototypeOf(o, p); }
  13564. function VectorClipJobsService_createSuper(Derived) { var hasNativeReflectConstruct = VectorClipJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = VectorClipJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = VectorClipJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return VectorClipJobsService_possibleConstructorReturn(this, result); }; }
  13565. function VectorClipJobsService_possibleConstructorReturn(self, call) { if (call && (VectorClipJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return VectorClipJobsService_assertThisInitialized(self); }
  13566. function VectorClipJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13567. function VectorClipJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13568. function VectorClipJobsService_getPrototypeOf(o) { VectorClipJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return VectorClipJobsService_getPrototypeOf(o); }
  13569. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13570. * This program are made available under the terms of the Apache License, Version 2.0
  13571. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13572. /**
  13573. * @class VectorClipJobsService
  13574. * @deprecatedclass SuperMap.VectorClipJobsService
  13575. * @category iServer ProcessingService VectorClip
  13576. * @classdesc 矢量裁剪分析服务类
  13577. * @extends {ProcessingServiceBase}
  13578. * @param {string} url -服务地址。
  13579. * @param {Object} options - 可选参数。
  13580. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13581. * @param {Object} [options.headers] - 请求头。
  13582. * @usage
  13583. */
  13584. var VectorClipJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13585. VectorClipJobsService_inherits(VectorClipJobsService, _ProcessingServiceBas);
  13586. var _super = VectorClipJobsService_createSuper(VectorClipJobsService);
  13587. function VectorClipJobsService(url, options) {
  13588. var _this;
  13589. VectorClipJobsService_classCallCheck(this, VectorClipJobsService);
  13590. _this = _super.call(this, url, options);
  13591. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/vectorclip');
  13592. _this.CLASS_NAME = 'SuperMap.VectorClipJobsService';
  13593. return _this;
  13594. }
  13595. /**
  13596. *@override
  13597. */
  13598. VectorClipJobsService_createClass(VectorClipJobsService, [{
  13599. key: "destroy",
  13600. value: function destroy() {
  13601. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "destroy", this).call(this);
  13602. }
  13603. /**
  13604. * @function VectorClipJobsService.protitype.getVectorClipJobs
  13605. * @description 获取矢量裁剪分析所有任务
  13606. */
  13607. }, {
  13608. key: "getVectorClipJobs",
  13609. value: function getVectorClipJobs() {
  13610. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "getJobs", this).call(this, this.url);
  13611. }
  13612. /**
  13613. * @function KernelDensityJobsService.protitype.getVectorClipJob
  13614. * @description 获取指定id的矢量裁剪分析服务
  13615. * @param {string} id - 指定要获取数据的id
  13616. */
  13617. }, {
  13618. key: "getVectorClipJob",
  13619. value: function getVectorClipJob(id) {
  13620. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13621. }
  13622. /**
  13623. * @function VectorClipJobsService.protitype.addVectorClipJob
  13624. * @description 新建矢量裁剪分析服务
  13625. * @param {VectorClipJobsParameter} params - 创建一个空间分析的请求参数。
  13626. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13627. */
  13628. }, {
  13629. key: "addVectorClipJob",
  13630. value: function addVectorClipJob(params, seconds) {
  13631. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "addJob", this).call(this, this.url, params, VectorClipJobsParameter, seconds);
  13632. }
  13633. }]);
  13634. return VectorClipJobsService;
  13635. }(ProcessingServiceBase);
  13636. ;// CONCATENATED MODULE: ./src/common/iServer/OverlayGeoJobsService.js
  13637. function OverlayGeoJobsService_typeof(obj) { "@babel/helpers - typeof"; return OverlayGeoJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, OverlayGeoJobsService_typeof(obj); }
  13638. function OverlayGeoJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13639. function OverlayGeoJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13640. function OverlayGeoJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) OverlayGeoJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) OverlayGeoJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13641. function OverlayGeoJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { OverlayGeoJobsService_get = Reflect.get.bind(); } else { OverlayGeoJobsService_get = function _get(target, property, receiver) { var base = OverlayGeoJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return OverlayGeoJobsService_get.apply(this, arguments); }
  13642. function OverlayGeoJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = OverlayGeoJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13643. function OverlayGeoJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) OverlayGeoJobsService_setPrototypeOf(subClass, superClass); }
  13644. function OverlayGeoJobsService_setPrototypeOf(o, p) { OverlayGeoJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return OverlayGeoJobsService_setPrototypeOf(o, p); }
  13645. function OverlayGeoJobsService_createSuper(Derived) { var hasNativeReflectConstruct = OverlayGeoJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = OverlayGeoJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = OverlayGeoJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return OverlayGeoJobsService_possibleConstructorReturn(this, result); }; }
  13646. function OverlayGeoJobsService_possibleConstructorReturn(self, call) { if (call && (OverlayGeoJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return OverlayGeoJobsService_assertThisInitialized(self); }
  13647. function OverlayGeoJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13648. function OverlayGeoJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13649. function OverlayGeoJobsService_getPrototypeOf(o) { OverlayGeoJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return OverlayGeoJobsService_getPrototypeOf(o); }
  13650. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13651. * This program are made available under the terms of the Apache License, Version 2.0
  13652. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13653. /**
  13654. * @class OverlayGeoJobsService
  13655. * @deprecatedclass SuperMap.OverlayGeoJobsService
  13656. * @category iServer ProcessingService OverlayAnalyst
  13657. * @classdesc 叠加分析任务类。
  13658. * @param {string} url - 服务地址。
  13659. * @param {Object} options - 参数。
  13660. * @param {Events} options.events - 处理所有事件的对象。
  13661. * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  13662. * @param {number} options.index - 服务访问地址在数组中的位置。
  13663. * @param {number} options.length - 服务访问地址数组长度。
  13664. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13665. * @param {Object} [options.headers] - 请求头。
  13666. * @usage
  13667. */
  13668. var OverlayGeoJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13669. OverlayGeoJobsService_inherits(OverlayGeoJobsService, _ProcessingServiceBas);
  13670. var _super = OverlayGeoJobsService_createSuper(OverlayGeoJobsService);
  13671. function OverlayGeoJobsService(url, options) {
  13672. var _this;
  13673. OverlayGeoJobsService_classCallCheck(this, OverlayGeoJobsService);
  13674. _this = _super.call(this, url, options);
  13675. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/overlay');
  13676. _this.CLASS_NAME = 'SuperMap.OverlayGeoJobsService';
  13677. return _this;
  13678. }
  13679. /**
  13680. * @override
  13681. */
  13682. OverlayGeoJobsService_createClass(OverlayGeoJobsService, [{
  13683. key: "destroy",
  13684. value: function destroy() {
  13685. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "destroy", this).call(this);
  13686. }
  13687. /**
  13688. * @function OverlayGeoJobsService.prototype.getOverlayGeoJobs
  13689. * @description 获取叠加分析任务
  13690. */
  13691. }, {
  13692. key: "getOverlayGeoJobs",
  13693. value: function getOverlayGeoJobs() {
  13694. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "getJobs", this).call(this, this.url);
  13695. }
  13696. /**
  13697. * @function OverlayGeoJobsService.prototype.getOverlayGeoJob
  13698. * @description 获取指定id的叠加分析任务
  13699. * @param {string} id - 指定要获取数据的id
  13700. */
  13701. }, {
  13702. key: "getOverlayGeoJob",
  13703. value: function getOverlayGeoJob(id) {
  13704. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13705. }
  13706. /**
  13707. * @function OverlayGeoJobsService.prototype.addOverlayGeoJob
  13708. * @description 新建点叠加析服务
  13709. * @param {OverlayGeoJobParameter} params - 创建一个叠加分析的请求参数。
  13710. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13711. */
  13712. }, {
  13713. key: "addOverlayGeoJob",
  13714. value: function addOverlayGeoJob(params, seconds) {
  13715. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "addJob", this).call(this, this.url, params, OverlayGeoJobParameter, seconds);
  13716. }
  13717. }]);
  13718. return OverlayGeoJobsService;
  13719. }(ProcessingServiceBase);
  13720. ;// CONCATENATED MODULE: ./src/common/iServer/BuffersAnalystJobsService.js
  13721. function BuffersAnalystJobsService_typeof(obj) { "@babel/helpers - typeof"; return BuffersAnalystJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, BuffersAnalystJobsService_typeof(obj); }
  13722. function BuffersAnalystJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13723. function BuffersAnalystJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13724. function BuffersAnalystJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) BuffersAnalystJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) BuffersAnalystJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13725. function BuffersAnalystJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { BuffersAnalystJobsService_get = Reflect.get.bind(); } else { BuffersAnalystJobsService_get = function _get(target, property, receiver) { var base = BuffersAnalystJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return BuffersAnalystJobsService_get.apply(this, arguments); }
  13726. function BuffersAnalystJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = BuffersAnalystJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13727. function BuffersAnalystJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) BuffersAnalystJobsService_setPrototypeOf(subClass, superClass); }
  13728. function BuffersAnalystJobsService_setPrototypeOf(o, p) { BuffersAnalystJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return BuffersAnalystJobsService_setPrototypeOf(o, p); }
  13729. function BuffersAnalystJobsService_createSuper(Derived) { var hasNativeReflectConstruct = BuffersAnalystJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = BuffersAnalystJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = BuffersAnalystJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return BuffersAnalystJobsService_possibleConstructorReturn(this, result); }; }
  13730. function BuffersAnalystJobsService_possibleConstructorReturn(self, call) { if (call && (BuffersAnalystJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return BuffersAnalystJobsService_assertThisInitialized(self); }
  13731. function BuffersAnalystJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13732. function BuffersAnalystJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13733. function BuffersAnalystJobsService_getPrototypeOf(o) { BuffersAnalystJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return BuffersAnalystJobsService_getPrototypeOf(o); }
  13734. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13735. * This program are made available under the terms of the Apache License, Version 2.0
  13736. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13737. /**
  13738. * @class BuffersAnalystJobsService
  13739. * @deprecatedclass SuperMap.BuffersAnalystJobsService
  13740. * @category iServer ProcessingService BufferAnalyst
  13741. * @classdesc 缓冲区分析服务类。
  13742. * @extends {ProcessingServiceBase}
  13743. * @param {string} url - 服务地址。
  13744. * @param {Object} options - 参数。
  13745. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13746. * @param {Object} [options.headers] - 请求头。
  13747. * @usage
  13748. */
  13749. var BuffersAnalystJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13750. BuffersAnalystJobsService_inherits(BuffersAnalystJobsService, _ProcessingServiceBas);
  13751. var _super = BuffersAnalystJobsService_createSuper(BuffersAnalystJobsService);
  13752. function BuffersAnalystJobsService(url, options) {
  13753. var _this;
  13754. BuffersAnalystJobsService_classCallCheck(this, BuffersAnalystJobsService);
  13755. _this = _super.call(this, url, options);
  13756. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/buffers');
  13757. _this.CLASS_NAME = 'SuperMap.BuffersAnalystJobsService';
  13758. return _this;
  13759. }
  13760. /**
  13761. *@override
  13762. */
  13763. BuffersAnalystJobsService_createClass(BuffersAnalystJobsService, [{
  13764. key: "destroy",
  13765. value: function destroy() {
  13766. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "destroy", this).call(this);
  13767. }
  13768. /**
  13769. * @function BuffersAnalystJobsService.prototype.getBufferJobs
  13770. * @description 获取缓冲区分析所有任务
  13771. */
  13772. }, {
  13773. key: "getBuffersJobs",
  13774. value: function getBuffersJobs() {
  13775. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "getJobs", this).call(this, this.url);
  13776. }
  13777. /**
  13778. * @function BuffersAnalystJobsService.prototype.getBufferJob
  13779. * @description 获取指定id的缓冲区分析服务
  13780. * @param {string} id - 指定要获取数据的id。
  13781. */
  13782. }, {
  13783. key: "getBuffersJob",
  13784. value: function getBuffersJob(id) {
  13785. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13786. }
  13787. /**
  13788. * @function BuffersAnalystJobsService.prototype.addBufferJob
  13789. * @description 新建缓冲区分析服务
  13790. * @param {BuffersAnalystJobsParameter} params - 创建一个空间分析的请求参数。
  13791. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  13792. */
  13793. }, {
  13794. key: "addBuffersJob",
  13795. value: function addBuffersJob(params, seconds) {
  13796. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "addJob", this).call(this, this.url, params, BuffersAnalystJobsParameter, seconds);
  13797. }
  13798. }]);
  13799. return BuffersAnalystJobsService;
  13800. }(ProcessingServiceBase);
  13801. ;// CONCATENATED MODULE: ./src/common/iServer/TopologyValidatorJobsService.js
  13802. function TopologyValidatorJobsService_typeof(obj) { "@babel/helpers - typeof"; return TopologyValidatorJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, TopologyValidatorJobsService_typeof(obj); }
  13803. function TopologyValidatorJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13804. function TopologyValidatorJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13805. function TopologyValidatorJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) TopologyValidatorJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) TopologyValidatorJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13806. function TopologyValidatorJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { TopologyValidatorJobsService_get = Reflect.get.bind(); } else { TopologyValidatorJobsService_get = function _get(target, property, receiver) { var base = TopologyValidatorJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return TopologyValidatorJobsService_get.apply(this, arguments); }
  13807. function TopologyValidatorJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = TopologyValidatorJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13808. function TopologyValidatorJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) TopologyValidatorJobsService_setPrototypeOf(subClass, superClass); }
  13809. function TopologyValidatorJobsService_setPrototypeOf(o, p) { TopologyValidatorJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return TopologyValidatorJobsService_setPrototypeOf(o, p); }
  13810. function TopologyValidatorJobsService_createSuper(Derived) { var hasNativeReflectConstruct = TopologyValidatorJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = TopologyValidatorJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = TopologyValidatorJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return TopologyValidatorJobsService_possibleConstructorReturn(this, result); }; }
  13811. function TopologyValidatorJobsService_possibleConstructorReturn(self, call) { if (call && (TopologyValidatorJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return TopologyValidatorJobsService_assertThisInitialized(self); }
  13812. function TopologyValidatorJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13813. function TopologyValidatorJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13814. function TopologyValidatorJobsService_getPrototypeOf(o) { TopologyValidatorJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return TopologyValidatorJobsService_getPrototypeOf(o); }
  13815. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13816. * This program are made available under the terms of the Apache License, Version 2.0
  13817. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13818. /**
  13819. * @class TopologyValidatorJobsService
  13820. * @deprecatedclass SuperMap.TopologyValidatorJobsService
  13821. * @category iServer ProcessingService TopologyValidator
  13822. * @classdesc 拓扑检查分析服务类
  13823. * @extends {ProcessingServiceBase}
  13824. * @param {string} url - 服务地址。
  13825. * @param {Object} options - 可选参数。
  13826. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13827. * @param {Object} [options.headers] - 请求头。
  13828. * @usage
  13829. */
  13830. var TopologyValidatorJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13831. TopologyValidatorJobsService_inherits(TopologyValidatorJobsService, _ProcessingServiceBas);
  13832. var _super = TopologyValidatorJobsService_createSuper(TopologyValidatorJobsService);
  13833. function TopologyValidatorJobsService(url, options) {
  13834. var _this;
  13835. TopologyValidatorJobsService_classCallCheck(this, TopologyValidatorJobsService);
  13836. _this = _super.call(this, url, options);
  13837. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/topologyvalidator');
  13838. _this.CLASS_NAME = "SuperMap.TopologyValidatorJobsService";
  13839. return _this;
  13840. }
  13841. /**
  13842. *@override
  13843. */
  13844. TopologyValidatorJobsService_createClass(TopologyValidatorJobsService, [{
  13845. key: "destroy",
  13846. value: function destroy() {
  13847. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "destroy", this).call(this);
  13848. }
  13849. /**
  13850. * @function TopologyValidatorJobsService.protitype.getTopologyValidatorJobs
  13851. * @description 获取拓扑检查分析所有任务
  13852. */
  13853. }, {
  13854. key: "getTopologyValidatorJobs",
  13855. value: function getTopologyValidatorJobs() {
  13856. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "getJobs", this).call(this, this.url);
  13857. }
  13858. /**
  13859. * @function TopologyValidatorJobsService.protitype.getTopologyValidatorJob
  13860. * @description 获取指定id的拓扑检查分析服务
  13861. * @param {string} id - 指定要获取数据的id
  13862. */
  13863. }, {
  13864. key: "getTopologyValidatorJob",
  13865. value: function getTopologyValidatorJob(id) {
  13866. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13867. }
  13868. /**
  13869. * @function TopologyValidatorJobsService.protitype.addTopologyValidatorJob
  13870. * @description 新建拓扑检查分析服务
  13871. * @param {TopologyValidatorJobsParameter} params - 拓扑检查分析任务参数类。
  13872. * @param {number} seconds -创建成功结果的时间间隔。
  13873. */
  13874. }, {
  13875. key: "addTopologyValidatorJob",
  13876. value: function addTopologyValidatorJob(params, seconds) {
  13877. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "addJob", this).call(this, this.url, params, TopologyValidatorJobsParameter, seconds);
  13878. }
  13879. }]);
  13880. return TopologyValidatorJobsService;
  13881. }(ProcessingServiceBase);
  13882. ;// CONCATENATED MODULE: ./src/common/iServer/SummaryAttributesJobsService.js
  13883. function SummaryAttributesJobsService_typeof(obj) { "@babel/helpers - typeof"; return SummaryAttributesJobsService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, SummaryAttributesJobsService_typeof(obj); }
  13884. function SummaryAttributesJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13885. function SummaryAttributesJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13886. function SummaryAttributesJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryAttributesJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryAttributesJobsService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13887. function SummaryAttributesJobsService_get() { if (typeof Reflect !== "undefined" && Reflect.get) { SummaryAttributesJobsService_get = Reflect.get.bind(); } else { SummaryAttributesJobsService_get = function _get(target, property, receiver) { var base = SummaryAttributesJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return SummaryAttributesJobsService_get.apply(this, arguments); }
  13888. function SummaryAttributesJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SummaryAttributesJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  13889. function SummaryAttributesJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) SummaryAttributesJobsService_setPrototypeOf(subClass, superClass); }
  13890. function SummaryAttributesJobsService_setPrototypeOf(o, p) { SummaryAttributesJobsService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SummaryAttributesJobsService_setPrototypeOf(o, p); }
  13891. function SummaryAttributesJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SummaryAttributesJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SummaryAttributesJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SummaryAttributesJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SummaryAttributesJobsService_possibleConstructorReturn(this, result); }; }
  13892. function SummaryAttributesJobsService_possibleConstructorReturn(self, call) { if (call && (SummaryAttributesJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return SummaryAttributesJobsService_assertThisInitialized(self); }
  13893. function SummaryAttributesJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13894. function SummaryAttributesJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13895. function SummaryAttributesJobsService_getPrototypeOf(o) { SummaryAttributesJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SummaryAttributesJobsService_getPrototypeOf(o); }
  13896. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13897. * This program are made available under the terms of the Apache License, Version 2.0
  13898. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13899. /**
  13900. * @class SummaryAttributesJobsService
  13901. * @deprecatedclass SuperMap.SummaryAttributesJobsService
  13902. * @category iServer ProcessingService SummaryAttributes
  13903. * @classdesc 属性汇总分析服务类
  13904. * @extends {ProcessingServiceBase}
  13905. * @param {string} url - 服务地址。
  13906. * @param {Object} options - 可选参数。
  13907. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13908. * @param {Object} [options.headers] - 请求头。
  13909. * @usage
  13910. */
  13911. var SummaryAttributesJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  13912. SummaryAttributesJobsService_inherits(SummaryAttributesJobsService, _ProcessingServiceBas);
  13913. var _super = SummaryAttributesJobsService_createSuper(SummaryAttributesJobsService);
  13914. function SummaryAttributesJobsService(url, options) {
  13915. var _this;
  13916. SummaryAttributesJobsService_classCallCheck(this, SummaryAttributesJobsService);
  13917. _this = _super.call(this, url, options);
  13918. _this.url = Util_Util.urlPathAppend(_this.url, 'spatialanalyst/summaryattributes');
  13919. _this.CLASS_NAME = "SuperMap.SummaryAttributesJobsService";
  13920. return _this;
  13921. }
  13922. /**
  13923. *@override
  13924. */
  13925. SummaryAttributesJobsService_createClass(SummaryAttributesJobsService, [{
  13926. key: "destroy",
  13927. value: function destroy() {
  13928. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "destroy", this).call(this);
  13929. }
  13930. /**
  13931. * @function SummaryAttributesJobsService.protitype.getSummaryAttributesJobs
  13932. * @description 获取属性汇总分析所有任务
  13933. */
  13934. }, {
  13935. key: "getSummaryAttributesJobs",
  13936. value: function getSummaryAttributesJobs() {
  13937. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "getJobs", this).call(this, this.url);
  13938. }
  13939. /**
  13940. * @function SummaryAttributesJobsService.protitype.getSummaryAttributesJob
  13941. * @description 获取指定id的属性汇总分析服务
  13942. * @param {string} id - 指定要获取数据的id
  13943. */
  13944. }, {
  13945. key: "getSummaryAttributesJob",
  13946. value: function getSummaryAttributesJob(id) {
  13947. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "getJobs", this).call(this, Util_Util.urlPathAppend(this.url, id));
  13948. }
  13949. /**
  13950. * @function SummaryAttributesJobsService.protitype.addSummaryAttributesJob
  13951. * @description 新建属性汇总分析服务
  13952. * @param {SummaryAttributesJobsParameter} params - 属性汇总分析任务参数类。
  13953. * @param {number} seconds - 创建成功结果的时间间隔。
  13954. */
  13955. }, {
  13956. key: "addSummaryAttributesJob",
  13957. value: function addSummaryAttributesJob(params, seconds) {
  13958. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "addJob", this).call(this, this.url, params, SummaryAttributesJobsParameter, seconds);
  13959. }
  13960. }]);
  13961. return SummaryAttributesJobsService;
  13962. }(ProcessingServiceBase);
  13963. ;// CONCATENATED MODULE: ./src/classic/services/ProcessingService.js
  13964. function ProcessingService_typeof(obj) { "@babel/helpers - typeof"; return ProcessingService_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, ProcessingService_typeof(obj); }
  13965. function ProcessingService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  13966. function ProcessingService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  13967. function ProcessingService_createClass(Constructor, protoProps, staticProps) { if (protoProps) ProcessingService_defineProperties(Constructor.prototype, protoProps); if (staticProps) ProcessingService_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
  13968. function ProcessingService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) ProcessingService_setPrototypeOf(subClass, superClass); }
  13969. function ProcessingService_setPrototypeOf(o, p) { ProcessingService_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ProcessingService_setPrototypeOf(o, p); }
  13970. function ProcessingService_createSuper(Derived) { var hasNativeReflectConstruct = ProcessingService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = ProcessingService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = ProcessingService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return ProcessingService_possibleConstructorReturn(this, result); }; }
  13971. function ProcessingService_possibleConstructorReturn(self, call) { if (call && (ProcessingService_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return ProcessingService_assertThisInitialized(self); }
  13972. function ProcessingService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  13973. function ProcessingService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13974. function ProcessingService_getPrototypeOf(o) { ProcessingService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ProcessingService_getPrototypeOf(o); }
  13975. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  13976. * This program are made available under the terms of the Apache License, Version 2.0
  13977. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  13978. /**
  13979. * @class SuperMap.REST.ProcessingService
  13980. * @category iServer ProcessingService
  13981. * @classdesc 分布式分析相关服务类。
  13982. * @modulecategory Services
  13983. * @augments CommonServiceBase
  13984. * @example
  13985. * new SuperMap.REST.ProcessingService(url,options)
  13986. * .getKernelDensityJobs(function(result){
  13987. * //doSomething
  13988. * })
  13989. * @param {string} url - 分布式分析服务地址。
  13990. * @param {Object} options - 可选参数。
  13991. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  13992. * @param {Object} [options.headers] - 请求头。
  13993. */
  13994. var ProcessingService = /*#__PURE__*/function (_CommonServiceBase) {
  13995. ProcessingService_inherits(ProcessingService, _CommonServiceBase);
  13996. var _super = ProcessingService_createSuper(ProcessingService);
  13997. function ProcessingService(url, options) {
  13998. var _this;
  13999. ProcessingService_classCallCheck(this, ProcessingService);
  14000. _this = _super.call(this, url, options);
  14001. _this.kernelDensityJobs = {};
  14002. _this.summaryMeshJobs = {};
  14003. _this.queryJobs = {};
  14004. _this.summaryRegionJobs = {};
  14005. _this.vectorClipJobs = {};
  14006. _this.overlayGeoJobs = {};
  14007. _this.buffersJobs = {};
  14008. _this.topologyValidatorJobs = {};
  14009. _this.summaryAttributesJobs = {};
  14010. return _this;
  14011. }
  14012. /**
  14013. * @function SuperMap.REST.ProcessingService.prototype.getKernelDensityJobs
  14014. * @description 获取密度分析的列表。
  14015. * @param {function} callback - 回调函数。
  14016. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14017. */
  14018. ProcessingService_createClass(ProcessingService, [{
  14019. key: "getKernelDensityJobs",
  14020. value: function getKernelDensityJobs(callback, resultFormat) {
  14021. var me = this,
  14022. format = me._processFormat(resultFormat);
  14023. var kernelDensityJobsService = new KernelDensityJobsService(me.url, {
  14024. headers: me.headers,
  14025. proxy: me.proxy,
  14026. withCredentials: me.withCredentials,
  14027. crossOrigin: me.crossOrigin,
  14028. eventListeners: {
  14029. scope: me,
  14030. processCompleted: callback,
  14031. processFailed: callback
  14032. },
  14033. format: format
  14034. });
  14035. kernelDensityJobsService.getKernelDensityJobs();
  14036. }
  14037. /**
  14038. * @function SuperMap.REST.ProcessingService.prototype.getKernelDensityJob
  14039. * @description 获取某一个密度分析。
  14040. * @param {string} id - 空间分析的 ID。
  14041. * @param {function} callback - 回调函数。
  14042. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14043. */
  14044. }, {
  14045. key: "getKernelDensityJob",
  14046. value: function getKernelDensityJob(id, callback, resultFormat) {
  14047. var me = this,
  14048. format = me._processFormat(resultFormat);
  14049. var kernelDensityJobsService = new KernelDensityJobsService(me.url, {
  14050. headers: me.headers,
  14051. proxy: me.proxy,
  14052. withCredentials: me.withCredentials,
  14053. crossOrigin: me.crossOrigin,
  14054. eventListeners: {
  14055. scope: me,
  14056. processCompleted: callback,
  14057. processFailed: callback
  14058. },
  14059. format: format
  14060. });
  14061. kernelDensityJobsService.getKernelDensityJob(id);
  14062. }
  14063. /**
  14064. * @function SuperMap.REST.ProcessingService.prototype.addKernelDensityJob
  14065. * @description 密度分析。
  14066. * @param {KernelDensityJobParameter} params - 核密度分析服务参数类。
  14067. * @param {function} callback - 回调函数。
  14068. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14069. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14070. */
  14071. }, {
  14072. key: "addKernelDensityJob",
  14073. value: function addKernelDensityJob(params, callback, seconds, resultFormat) {
  14074. var me = this,
  14075. format = me._processFormat(resultFormat);
  14076. var kernelDensityJobsService = new KernelDensityJobsService(me.url, {
  14077. headers: me.headers,
  14078. proxy: me.proxy,
  14079. withCredentials: me.withCredentials,
  14080. crossOrigin: me.crossOrigin,
  14081. eventListeners: {
  14082. scope: me,
  14083. processCompleted: callback,
  14084. processFailed: callback,
  14085. processRunning: function processRunning(job) {
  14086. me.kernelDensityJobs[job.id] = job.state;
  14087. }
  14088. },
  14089. format: format
  14090. });
  14091. kernelDensityJobsService.addKernelDensityJob(params, seconds);
  14092. }
  14093. /**
  14094. * @function SuperMap.REST.ProcessingService.prototype.getKernelDensityJobState
  14095. * @description 获取密度分析的状态。
  14096. * @param {string} id - 密度分析的 ID。
  14097. * @returns {Object} 密度分析的状态。
  14098. */
  14099. }, {
  14100. key: "getKernelDensityJobState",
  14101. value: function getKernelDensityJobState(id) {
  14102. return this.kernelDensityJobs[id];
  14103. }
  14104. /**
  14105. * @function SuperMap.REST.ProcessingService.prototype.getSummaryMeshJobs
  14106. * @description 获取点聚合分析的列表。
  14107. * @param {function} callback - 回调函数。
  14108. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14109. */
  14110. }, {
  14111. key: "getSummaryMeshJobs",
  14112. value: function getSummaryMeshJobs(callback, resultFormat) {
  14113. var me = this,
  14114. format = me._processFormat(resultFormat);
  14115. var summaryMeshJobsService = new SummaryMeshJobsService(me.url, {
  14116. headers: me.headers,
  14117. proxy: me.proxy,
  14118. withCredentials: me.withCredentials,
  14119. crossOrigin: me.crossOrigin,
  14120. eventListeners: {
  14121. scope: me,
  14122. processCompleted: callback,
  14123. processFailed: callback
  14124. },
  14125. format: format
  14126. });
  14127. summaryMeshJobsService.getSummaryMeshJobs();
  14128. }
  14129. /**
  14130. * @function SuperMap.REST.ProcessingService.prototype.getSummaryMeshJob
  14131. * @description 获取点聚合分析。
  14132. * @param {string} id - 点聚合分析的 ID。
  14133. * @param {function} callback - 回调函数。
  14134. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14135. */
  14136. }, {
  14137. key: "getSummaryMeshJob",
  14138. value: function getSummaryMeshJob(id, callback, resultFormat) {
  14139. var me = this,
  14140. format = me._processFormat(resultFormat);
  14141. var summaryMeshJobsService = new SummaryMeshJobsService(me.url, {
  14142. headers: me.headers,
  14143. proxy: me.proxy,
  14144. withCredentials: me.withCredentials,
  14145. crossOrigin: me.crossOrigin,
  14146. eventListeners: {
  14147. scope: me,
  14148. processCompleted: callback,
  14149. processFailed: callback
  14150. },
  14151. format: format
  14152. });
  14153. summaryMeshJobsService.getSummaryMeshJob(id);
  14154. }
  14155. /**
  14156. * @function SuperMap.REST.ProcessingService.prototype.addSummaryMeshJob
  14157. * @description 点聚合分析。
  14158. * @param {SummaryMeshJobParameter} params - 点聚合分析任务参数类。
  14159. * @param {function} callback - 回调函数。
  14160. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14161. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14162. */
  14163. }, {
  14164. key: "addSummaryMeshJob",
  14165. value: function addSummaryMeshJob(params, callback, seconds, resultFormat) {
  14166. var me = this,
  14167. format = me._processFormat(resultFormat);
  14168. var summaryMeshJobsService = new SummaryMeshJobsService(me.url, {
  14169. headers: me.headers,
  14170. proxy: me.proxy,
  14171. withCredentials: me.withCredentials,
  14172. crossOrigin: me.crossOrigin,
  14173. eventListeners: {
  14174. scope: me,
  14175. processCompleted: callback,
  14176. processFailed: callback,
  14177. processRunning: function processRunning(job) {
  14178. me.summaryMeshJobs[job.id] = job.state;
  14179. }
  14180. },
  14181. format: format
  14182. });
  14183. summaryMeshJobsService.addSummaryMeshJob(params, seconds);
  14184. }
  14185. /**
  14186. * @function SuperMap.REST.ProcessingService.prototype.getSummaryMeshJobState
  14187. * @description 获取点聚合分析的状态。
  14188. * @param {string} id - 点聚合分析的 ID。
  14189. * @returns {Object} 点聚合分析的状态。
  14190. */
  14191. }, {
  14192. key: "getSummaryMeshJobState",
  14193. value: function getSummaryMeshJobState(id) {
  14194. return this.summaryMeshJobs[id];
  14195. }
  14196. /**
  14197. * @function SuperMap.REST.ProcessingService.prototype.getQueryJobs
  14198. * @description 获取单对象查询分析的列表。
  14199. * @param {function} callback - 回调函数。
  14200. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14201. */
  14202. }, {
  14203. key: "getQueryJobs",
  14204. value: function getQueryJobs(callback, resultFormat) {
  14205. var me = this,
  14206. format = me._processFormat(resultFormat);
  14207. var singleObjectQueryJobsService = new SingleObjectQueryJobsService(me.url, {
  14208. headers: me.headers,
  14209. proxy: me.proxy,
  14210. withCredentials: me.withCredentials,
  14211. crossOrigin: me.crossOrigin,
  14212. eventListeners: {
  14213. scope: me,
  14214. processCompleted: callback,
  14215. processFailed: callback
  14216. },
  14217. format: format
  14218. });
  14219. singleObjectQueryJobsService.getQueryJobs();
  14220. }
  14221. /**
  14222. * @function SuperMap.REST.ProcessingService.prototype.getQueryJob
  14223. * @description 获取单对象查询分析。
  14224. * @param {string} id - 单对象查询分析的 ID。
  14225. * @param {function} callback - 回调函数。
  14226. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14227. */
  14228. }, {
  14229. key: "getQueryJob",
  14230. value: function getQueryJob(id, callback, resultFormat) {
  14231. var me = this,
  14232. format = me._processFormat(resultFormat);
  14233. var singleObjectQueryJobsService = new SingleObjectQueryJobsService(me.url, {
  14234. headers: me.headers,
  14235. proxy: me.proxy,
  14236. withCredentials: me.withCredentials,
  14237. crossOrigin: me.crossOrigin,
  14238. eventListeners: {
  14239. scope: me,
  14240. processCompleted: callback,
  14241. processFailed: callback
  14242. },
  14243. format: format
  14244. });
  14245. singleObjectQueryJobsService.getQueryJob(id);
  14246. }
  14247. /**
  14248. * @function SuperMap.REST.ProcessingService.prototype.addQueryJob
  14249. * @description 单对象查询分析。
  14250. * @param {SingleObjectQueryJobsParameter} params - 单对象空间查询分析任务参数类。
  14251. * @param {function} callback - 回调函数。
  14252. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14253. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14254. */
  14255. }, {
  14256. key: "addQueryJob",
  14257. value: function addQueryJob(params, callback, seconds, resultFormat) {
  14258. var me = this,
  14259. param = me._processParams(params),
  14260. format = me._processFormat(resultFormat);
  14261. var singleObjectQueryJobsService = new SingleObjectQueryJobsService(me.url, {
  14262. headers: me.headers,
  14263. proxy: me.proxy,
  14264. withCredentials: me.withCredentials,
  14265. crossOrigin: me.crossOrigin,
  14266. eventListeners: {
  14267. scope: me,
  14268. processCompleted: callback,
  14269. processFailed: callback,
  14270. processRunning: function processRunning(job) {
  14271. me.queryJobs[job.id] = job.state;
  14272. }
  14273. },
  14274. format: format
  14275. });
  14276. singleObjectQueryJobsService.addQueryJob(param, seconds);
  14277. }
  14278. /**
  14279. * @function SuperMap.REST.ProcessingService.prototype.getQueryJobState
  14280. * @description 获取单对象查询分析的状态。
  14281. * @param {string} id - 单对象查询分析的 ID。
  14282. * @returns {Object} 单对象查询分析的状态。
  14283. */
  14284. }, {
  14285. key: "getQueryJobState",
  14286. value: function getQueryJobState(id) {
  14287. return this.queryJobs[id];
  14288. }
  14289. /**
  14290. * @function SuperMap.REST.ProcessingService.prototype.getSummaryRegionJobs
  14291. * @description 获取区域汇总分析的列表。
  14292. * @param {function} callback - 回调函数。
  14293. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14294. */
  14295. }, {
  14296. key: "getSummaryRegionJobs",
  14297. value: function getSummaryRegionJobs(callback, resultFormat) {
  14298. var me = this,
  14299. format = me._processFormat(resultFormat);
  14300. var summaryRegionJobsService = new SummaryRegionJobsService(me.url, {
  14301. proxy: me.proxy,
  14302. headers: me.headers,
  14303. withCredentials: me.withCredentials,
  14304. crossOrigin: me.crossOrigin,
  14305. eventListeners: {
  14306. scope: me,
  14307. processCompleted: callback,
  14308. processFailed: callback
  14309. },
  14310. format: format
  14311. });
  14312. summaryRegionJobsService.getSummaryRegionJobs();
  14313. }
  14314. /**
  14315. * @function SuperMap.REST.ProcessingService.prototype.getSummaryRegionJob
  14316. * @description 获取某一个区域汇总分析。
  14317. * @param {string} id - 区域汇总分析的 ID。
  14318. * @param {function} callback - 回调函数。
  14319. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14320. */
  14321. }, {
  14322. key: "getSummaryRegionJob",
  14323. value: function getSummaryRegionJob(id, callback, resultFormat) {
  14324. var me = this,
  14325. format = me._processFormat(resultFormat);
  14326. var summaryRegionJobsService = new SummaryRegionJobsService(me.url, {
  14327. proxy: me.proxy,
  14328. withCredentials: me.withCredentials,
  14329. crossOrigin: me.crossOrigin,
  14330. headers: me.headers,
  14331. eventListeners: {
  14332. scope: me,
  14333. processCompleted: callback,
  14334. processFailed: callback
  14335. },
  14336. format: format
  14337. });
  14338. summaryRegionJobsService.getSummaryRegionJob(id);
  14339. }
  14340. /**
  14341. * @function SuperMap.REST.ProcessingService.prototype.addSummaryRegionJob
  14342. * @description 新建一个区域汇总分析。
  14343. * @param {SummaryRegionJobParameter} params -创建一个区域汇总分析的请求参数。
  14344. * @param {function} callback - 回调函数。
  14345. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  14346. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14347. */
  14348. }, {
  14349. key: "addSummaryRegionJob",
  14350. value: function addSummaryRegionJob(params, callback, seconds, resultFormat) {
  14351. var me = this,
  14352. format = me._processFormat(resultFormat);
  14353. var summaryRegionJobsService = new SummaryRegionJobsService(me.url, {
  14354. proxy: me.proxy,
  14355. withCredentials: me.withCredentials,
  14356. crossOrigin: me.crossOrigin,
  14357. headers: me.headers,
  14358. eventListeners: {
  14359. scope: me,
  14360. processCompleted: callback,
  14361. processFailed: callback,
  14362. processRunning: function processRunning(job) {
  14363. me.summaryRegionJobs[job.id] = job.state;
  14364. }
  14365. },
  14366. format: format
  14367. });
  14368. summaryRegionJobsService.addSummaryRegionJob(params, seconds);
  14369. }
  14370. /**
  14371. * @function SuperMap.REST.ProcessingService.prototype.getSummaryRegionJobState
  14372. * @description 获取区域汇总分析的状态。
  14373. * @param {string} id - 区域汇总分析的 ID。
  14374. * @returns {Object} 区域汇总分析的状态。
  14375. */
  14376. }, {
  14377. key: "getSummaryRegionJobState",
  14378. value: function getSummaryRegionJobState(id) {
  14379. return this.summaryRegionJobs[id];
  14380. }
  14381. /**
  14382. * @function SuperMap.REST.ProcessingService.prototype.getVectorClipJobs
  14383. * @description 获取矢量裁剪分析的列表。
  14384. * @param {function} callback - 回调函数。
  14385. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14386. */
  14387. }, {
  14388. key: "getVectorClipJobs",
  14389. value: function getVectorClipJobs(callback, resultFormat) {
  14390. var me = this,
  14391. format = me._processFormat(resultFormat);
  14392. var vectorClipJobsService = new VectorClipJobsService(me.url, {
  14393. proxy: me.proxy,
  14394. withCredentials: me.withCredentials,
  14395. crossOrigin: me.crossOrigin,
  14396. headers: me.headers,
  14397. eventListeners: {
  14398. scope: me,
  14399. processCompleted: callback,
  14400. processFailed: callback
  14401. },
  14402. format: format
  14403. });
  14404. vectorClipJobsService.getVectorClipJobs();
  14405. }
  14406. /**
  14407. * @function SuperMap.REST.ProcessingService.prototype.getVectorClipJob
  14408. * @description 获取矢量裁剪分析。
  14409. * @param {string} id - 矢量裁剪分析的 ID。
  14410. * @param {function} callback - 回调函数。
  14411. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14412. */
  14413. }, {
  14414. key: "getVectorClipJob",
  14415. value: function getVectorClipJob(id, callback, resultFormat) {
  14416. var me = this,
  14417. format = me._processFormat(resultFormat);
  14418. var vectorClipJobsService = new VectorClipJobsService(me.url, {
  14419. proxy: me.proxy,
  14420. withCredentials: me.withCredentials,
  14421. crossOrigin: me.crossOrigin,
  14422. headers: me.headers,
  14423. eventListeners: {
  14424. scope: me,
  14425. processCompleted: callback,
  14426. processFailed: callback
  14427. },
  14428. format: format
  14429. });
  14430. vectorClipJobsService.getVectorClipJob(id);
  14431. }
  14432. /**
  14433. * @function SuperMap.REST.ProcessingService.prototype.addVectorClipJob
  14434. * @description 矢量裁剪分析。
  14435. * @param {VectorClipJobsParameter} params - 矢量裁剪分析任务参数类。
  14436. * @param {function} callback - 回调函数。
  14437. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14438. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14439. */
  14440. }, {
  14441. key: "addVectorClipJob",
  14442. value: function addVectorClipJob(params, callback, seconds, resultFormat) {
  14443. var me = this,
  14444. param = me._processParams(params),
  14445. format = me._processFormat(resultFormat);
  14446. var vectorClipJobsService = new VectorClipJobsService(me.url, {
  14447. proxy: me.proxy,
  14448. withCredentials: me.withCredentials,
  14449. crossOrigin: me.crossOrigin,
  14450. headers: me.headers,
  14451. eventListeners: {
  14452. scope: me,
  14453. processCompleted: callback,
  14454. processFailed: callback,
  14455. processRunning: function processRunning(job) {
  14456. me.vectorClipJobs[job.id] = job.state;
  14457. }
  14458. },
  14459. format: format
  14460. });
  14461. vectorClipJobsService.addVectorClipJob(param, seconds);
  14462. }
  14463. /**
  14464. * @function SuperMap.REST.ProcessingService.prototype.getVectorClipJobState
  14465. * @description 获取矢量裁剪分析的状态。
  14466. * @param {string} id - 矢量裁剪分析的 ID。
  14467. * @returns {Object} 矢量裁剪分析的状态。
  14468. */
  14469. }, {
  14470. key: "getVectorClipJobState",
  14471. value: function getVectorClipJobState(id) {
  14472. return this.vectorClipJobs[id];
  14473. }
  14474. /**
  14475. * @function SuperMap.REST.ProcessingService.prototype.getOverlayGeoJobs
  14476. * @description 获取叠加分析的列表。
  14477. * @param {function} callback - 回调函数。
  14478. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14479. */
  14480. }, {
  14481. key: "getOverlayGeoJobs",
  14482. value: function getOverlayGeoJobs(callback, resultFormat) {
  14483. var me = this,
  14484. format = me._processFormat(resultFormat);
  14485. var overlayGeoJobsService = new OverlayGeoJobsService(me.url, {
  14486. proxy: me.proxy,
  14487. withCredentials: me.withCredentials,
  14488. crossOrigin: me.crossOrigin,
  14489. headers: me.headers,
  14490. eventListeners: {
  14491. scope: me,
  14492. processCompleted: callback,
  14493. processFailed: callback
  14494. },
  14495. format: format
  14496. });
  14497. overlayGeoJobsService.getOverlayGeoJobs();
  14498. }
  14499. /**
  14500. * @function SuperMap.REST.ProcessingService.prototype.getOverlayGeoJob
  14501. * @description 获取叠加分析。
  14502. * @param {string} id - 叠加分析的 ID。
  14503. * @param {function} callback - 回调函数。
  14504. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14505. */
  14506. }, {
  14507. key: "getOverlayGeoJob",
  14508. value: function getOverlayGeoJob(id, callback, resultFormat) {
  14509. var me = this,
  14510. format = me._processFormat(resultFormat);
  14511. var overlayGeoJobsService = new OverlayGeoJobsService(me.url, {
  14512. proxy: me.proxy,
  14513. withCredentials: me.withCredentials,
  14514. crossOrigin: me.crossOrigin,
  14515. headers: me.headers,
  14516. eventListeners: {
  14517. scope: me,
  14518. processCompleted: callback,
  14519. processFailed: callback
  14520. },
  14521. format: format
  14522. });
  14523. overlayGeoJobsService.getOverlayGeoJob(id);
  14524. }
  14525. /**
  14526. * @function SuperMap.REST.ProcessingService.prototype.addOverlayGeoJob
  14527. * @description 叠加分析。
  14528. * @param {OverlayGeoJobParameter} params - 叠加分析任务参数类。
  14529. * @param {function} callback - 回调函数。
  14530. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14531. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14532. */
  14533. }, {
  14534. key: "addOverlayGeoJob",
  14535. value: function addOverlayGeoJob(params, callback, seconds, resultFormat) {
  14536. var me = this,
  14537. format = me._processFormat(resultFormat);
  14538. var overlayGeoJobsService = new OverlayGeoJobsService(me.url, {
  14539. proxy: me.proxy,
  14540. withCredentials: me.withCredentials,
  14541. crossOrigin: me.crossOrigin,
  14542. headers: me.headers,
  14543. eventListeners: {
  14544. scope: me,
  14545. processCompleted: callback,
  14546. processFailed: callback,
  14547. processRunning: function processRunning(job) {
  14548. me.overlayGeoJobs[job.id] = job.state;
  14549. }
  14550. },
  14551. format: format
  14552. });
  14553. overlayGeoJobsService.addOverlayGeoJob(params, seconds);
  14554. }
  14555. /**
  14556. * @function SuperMap.REST.ProcessingService.prototype.getoverlayGeoJobState
  14557. * @description 获取叠加分析的状态。
  14558. * @param {string} id - 叠加分析的 ID。
  14559. * @returns {Object} 叠加分析的状态。
  14560. */
  14561. }, {
  14562. key: "getoverlayGeoJobState",
  14563. value: function getoverlayGeoJobState(id) {
  14564. return this.overlayGeoJobs[id];
  14565. }
  14566. /**
  14567. * @function SuperMap.REST.ProcessingService.prototype.getBuffersJobs
  14568. * @description 获取缓冲区分析的列表。
  14569. * @param {function} callback - 回调函数。
  14570. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14571. */
  14572. }, {
  14573. key: "getBuffersJobs",
  14574. value: function getBuffersJobs(callback, resultFormat) {
  14575. var me = this,
  14576. format = me._processFormat(resultFormat);
  14577. var buffersAnalystJobsService = new BuffersAnalystJobsService(me.url, {
  14578. proxy: me.proxy,
  14579. withCredentials: me.withCredentials,
  14580. crossOrigin: me.crossOrigin,
  14581. headers: me.headers,
  14582. eventListeners: {
  14583. scope: me,
  14584. processCompleted: callback,
  14585. processFailed: callback
  14586. },
  14587. format: format
  14588. });
  14589. buffersAnalystJobsService.getBuffersJobs();
  14590. }
  14591. /**
  14592. * @function SuperMap.REST.ProcessingService.prototype.getBuffersJob
  14593. * @description 获取缓冲区分析。
  14594. * @param {string} id - 缓冲区分析的 ID。
  14595. * @param {function} callback - 回调函数。
  14596. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14597. */
  14598. }, {
  14599. key: "getBuffersJob",
  14600. value: function getBuffersJob(id, callback, resultFormat) {
  14601. var me = this,
  14602. format = me._processFormat(resultFormat);
  14603. var buffersAnalystJobsService = new BuffersAnalystJobsService(me.url, {
  14604. proxy: me.proxy,
  14605. withCredentials: me.withCredentials,
  14606. crossOrigin: me.crossOrigin,
  14607. headers: me.headers,
  14608. eventListeners: {
  14609. scope: me,
  14610. processCompleted: callback,
  14611. processFailed: callback
  14612. },
  14613. format: format
  14614. });
  14615. buffersAnalystJobsService.getBuffersJob(id);
  14616. }
  14617. /**
  14618. * @function SuperMap.REST.ProcessingService.prototype.addBuffersJob
  14619. * @description 缓冲区分析。
  14620. * @param {BuffersAnalystJobsParameter} params - 创建一个缓冲区分析的请求参数。
  14621. * @param {function} callback - 回调函数。
  14622. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14623. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14624. */
  14625. }, {
  14626. key: "addBuffersJob",
  14627. value: function addBuffersJob(params, callback, seconds, resultFormat) {
  14628. var me = this,
  14629. format = me._processFormat(resultFormat);
  14630. var buffersAnalystJobsService = new BuffersAnalystJobsService(me.url, {
  14631. proxy: me.proxy,
  14632. withCredentials: me.withCredentials,
  14633. crossOrigin: me.crossOrigin,
  14634. headers: me.headers,
  14635. eventListeners: {
  14636. scope: me,
  14637. processCompleted: callback,
  14638. processFailed: callback,
  14639. processRunning: function processRunning(job) {
  14640. me.buffersJobs[job.id] = job.state;
  14641. }
  14642. },
  14643. format: format
  14644. });
  14645. buffersAnalystJobsService.addBuffersJob(params, seconds);
  14646. }
  14647. /**
  14648. * @function SuperMap.REST.ProcessingService.prototype.getBuffersJobState
  14649. * @description 获取缓冲区分析的状态。
  14650. * @param {string} id - 缓冲区分析的 ID。
  14651. * @returns {Object} 缓冲区分析的状态。
  14652. */
  14653. }, {
  14654. key: "getBuffersJobState",
  14655. value: function getBuffersJobState(id) {
  14656. return this.buffersJobs[id];
  14657. }
  14658. /**
  14659. * @function SuperMap.REST.ProcessingService.prototype.getTopologyValidatorJobs
  14660. * @description 获取拓扑检查分析的列表。
  14661. * @param {function} callback - 回调函数。
  14662. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14663. */
  14664. }, {
  14665. key: "getTopologyValidatorJobs",
  14666. value: function getTopologyValidatorJobs(callback, resultFormat) {
  14667. var me = this,
  14668. format = me._processFormat(resultFormat);
  14669. var topologyValidatorJobsService = new TopologyValidatorJobsService(me.url, {
  14670. proxy: me.proxy,
  14671. withCredentials: me.withCredentials,
  14672. crossOrigin: me.crossOrigin,
  14673. headers: me.headers,
  14674. eventListeners: {
  14675. scope: me,
  14676. processCompleted: callback,
  14677. processFailed: callback
  14678. },
  14679. format: format
  14680. });
  14681. topologyValidatorJobsService.getTopologyValidatorJobs();
  14682. }
  14683. /**
  14684. * @function SuperMap.REST.ProcessingService.prototype.getTopologyValidatorJob
  14685. * @description 获取拓扑检查分析。
  14686. * @param {string} id - 拓扑检查分析的 ID。
  14687. * @param {function} callback - 回调函数。
  14688. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14689. */
  14690. }, {
  14691. key: "getTopologyValidatorJob",
  14692. value: function getTopologyValidatorJob(id, callback, resultFormat) {
  14693. var me = this,
  14694. format = me._processFormat(resultFormat);
  14695. var topologyValidatorJobsService = new TopologyValidatorJobsService(me.url, {
  14696. proxy: me.proxy,
  14697. withCredentials: me.withCredentials,
  14698. crossOrigin: me.crossOrigin,
  14699. headers: me.headers,
  14700. eventListeners: {
  14701. scope: me,
  14702. processCompleted: callback,
  14703. processFailed: callback
  14704. },
  14705. format: format
  14706. });
  14707. topologyValidatorJobsService.getTopologyValidatorJob(id);
  14708. }
  14709. /**
  14710. * @function SuperMap.REST.ProcessingService.prototype.addTopologyValidatorJob
  14711. * @description 拓扑检查分析。
  14712. * @param {TopologyValidatorJobsParameter} params - 拓扑检查分析任务参数类。
  14713. * @param {function} callback - 回调函数。
  14714. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14715. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14716. */
  14717. }, {
  14718. key: "addTopologyValidatorJob",
  14719. value: function addTopologyValidatorJob(params, callback, seconds, resultFormat) {
  14720. var me = this,
  14721. format = me._processFormat(resultFormat);
  14722. var topologyValidatorJobsService = new TopologyValidatorJobsService(me.url, {
  14723. proxy: me.proxy,
  14724. withCredentials: me.withCredentials,
  14725. crossOrigin: me.crossOrigin,
  14726. headers: me.headers,
  14727. eventListeners: {
  14728. scope: me,
  14729. processCompleted: callback,
  14730. processFailed: callback,
  14731. processRunning: function processRunning(job) {
  14732. me.topologyValidatorJobs[job.id] = job.state;
  14733. }
  14734. },
  14735. format: format
  14736. });
  14737. topologyValidatorJobsService.addTopologyValidatorJob(params, seconds);
  14738. }
  14739. /**
  14740. * @function SuperMap.REST.ProcessingService.prototype.getTopologyValidatorJobState
  14741. * @description 获取拓扑检查分析的状态。
  14742. * @param {string} id - 拓扑检查分析的 ID。
  14743. * @returns {Object} 拓扑检查分析的状态。
  14744. */
  14745. }, {
  14746. key: "getTopologyValidatorJobState",
  14747. value: function getTopologyValidatorJobState(id) {
  14748. return this.topologyValidatorJobs[id];
  14749. }
  14750. /**
  14751. * @function SuperMap.REST.ProcessingService.prototype.getSummaryAttributesJobs
  14752. * @description 获取属性汇总分析的列表。
  14753. * @param {function} callback - 回调函数。
  14754. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14755. */
  14756. }, {
  14757. key: "getSummaryAttributesJobs",
  14758. value: function getSummaryAttributesJobs(callback, resultFormat) {
  14759. var me = this,
  14760. format = me._processFormat(resultFormat);
  14761. var summaryAttributesJobsService = new SummaryAttributesJobsService(me.url, {
  14762. proxy: me.proxy,
  14763. withCredentials: me.withCredentials,
  14764. crossOrigin: me.crossOrigin,
  14765. headers: me.headers,
  14766. eventListeners: {
  14767. scope: me,
  14768. processCompleted: callback,
  14769. processFailed: callback
  14770. },
  14771. format: format
  14772. });
  14773. summaryAttributesJobsService.getSummaryAttributesJobs();
  14774. }
  14775. /**
  14776. * @function SuperMap.REST.ProcessingService.prototype.getSummaryAttributesJob
  14777. * @description 获取属性汇总分析。
  14778. * @param {string} id - 属性汇总分析的 ID。
  14779. * @param {function} callback - 回调函数。
  14780. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14781. */
  14782. }, {
  14783. key: "getSummaryAttributesJob",
  14784. value: function getSummaryAttributesJob(id, callback, resultFormat) {
  14785. var me = this,
  14786. format = me._processFormat(resultFormat);
  14787. var summaryAttributesJobsService = new SummaryAttributesJobsService(me.url, {
  14788. proxy: me.proxy,
  14789. withCredentials: me.withCredentials,
  14790. crossOrigin: me.crossOrigin,
  14791. headers: me.headers,
  14792. eventListeners: {
  14793. scope: me,
  14794. processCompleted: callback,
  14795. processFailed: callback
  14796. },
  14797. format: format
  14798. });
  14799. summaryAttributesJobsService.getSummaryAttributesJob(id);
  14800. }
  14801. /**
  14802. * @function SuperMap.REST.ProcessingService.prototype.addSummaryAttributesJob
  14803. * @description 属性汇总分析。
  14804. * @param {SummaryAttributesJobsParameter} params - 属性汇总分析任务参数类。
  14805. * @param {function} callback - 回调函数。
  14806. * @param {number} [seconds=1000] - 获取创建成功结果的时间间隔。
  14807. * @param {DataFormat} [resultFormat=DataFormat.GEOJSON] - 返回结果类型。
  14808. */
  14809. }, {
  14810. key: "addSummaryAttributesJob",
  14811. value: function addSummaryAttributesJob(params, callback, seconds, resultFormat) {
  14812. var me = this,
  14813. format = me._processFormat(resultFormat);
  14814. var summaryAttributesJobsService = new SummaryAttributesJobsService(me.url, {
  14815. proxy: me.proxy,
  14816. withCredentials: me.withCredentials,
  14817. crossOrigin: me.crossOrigin,
  14818. headers: me.headers,
  14819. eventListeners: {
  14820. scope: me,
  14821. processCompleted: callback,
  14822. processFailed: callback,
  14823. processRunning: function processRunning(job) {
  14824. me.summaryAttributesJobs[job.id] = job.state;
  14825. }
  14826. },
  14827. format: format
  14828. });
  14829. summaryAttributesJobsService.addSummaryAttributesJob(params, seconds);
  14830. }
  14831. /**
  14832. * @function SuperMap.REST.ProcessingService.prototype.getSummaryAttributesJobState
  14833. * @description 获取属性汇总分析的状态。
  14834. * @param {string} id - 属性汇总分析的 ID。
  14835. * @returns {Object} 属性汇总分析的状态。
  14836. */
  14837. }, {
  14838. key: "getSummaryAttributesJobState",
  14839. value: function getSummaryAttributesJobState(id) {
  14840. return this.summaryAttributesJobs[id];
  14841. }
  14842. }, {
  14843. key: "_processFormat",
  14844. value: function _processFormat(resultFormat) {
  14845. return resultFormat ? resultFormat : DataFormat.GEOJSON;
  14846. }
  14847. }, {
  14848. key: "_processParams",
  14849. value: function _processParams(params) {
  14850. if (!params) {
  14851. return {};
  14852. }
  14853. if (params.geometryQuery) {
  14854. params.geometryQuery = this._convertPatams(params.geometryQuery);
  14855. }
  14856. if (params.geometryClip) {
  14857. params.geometryClip = this._convertPatams(params.geometryClip);
  14858. }
  14859. return params;
  14860. }
  14861. }, {
  14862. key: "_convertPatams",
  14863. value: function _convertPatams(points) {
  14864. var geometryParam = {};
  14865. if (points.length < 1) {
  14866. geometryParam = '';
  14867. } else {
  14868. var results = [];
  14869. for (var i = 0; i < points.length; i++) {
  14870. var point = {};
  14871. point.x = points[i].x;
  14872. point.y = points[i].y;
  14873. results.push(point);
  14874. }
  14875. geometryParam.type = 'REGION';
  14876. geometryParam.points = results;
  14877. }
  14878. return geometryParam;
  14879. }
  14880. }]);
  14881. return ProcessingService;
  14882. }(CommonServiceBase);
  14883. SuperMap.REST.ProcessingService = ProcessingService;
  14884. ;// CONCATENATED MODULE: ./src/classic/services/index.js
  14885. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  14886. * This program are made available under the terms of the Apache License, Version 2.0
  14887. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  14888. ;// CONCATENATED MODULE: ./src/classic/index.js
  14889. /* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.
  14890. * This program are made available under the terms of the Apache License, Version 2.0
  14891. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  14892. ;// CONCATENATED MODULE: ./src/classic/namespace.js
  14893. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  14894. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  14895. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  14896. SuperMap.ElasticSearch = ElasticSearch;
  14897. SuperMap.SecurityManager = SecurityManager;
  14898. SuperMap.KernelDensityJobParameter = KernelDensityJobParameter;
  14899. SuperMap.SingleObjectQueryJobsParameter = SingleObjectQueryJobsParameter;
  14900. SuperMap.SummaryAttributesJobsParameter = SummaryAttributesJobsParameter;
  14901. SuperMap.SummaryMeshJobParameter = SummaryMeshJobParameter;
  14902. SuperMap.SummaryRegionJobParameter = SummaryRegionJobParameter;
  14903. SuperMap.OverlayGeoJobParameter = OverlayGeoJobParameter;
  14904. SuperMap.BuffersAnalystJobsParameter = BuffersAnalystJobsParameter;
  14905. SuperMap.TopologyValidatorJobsParameter = TopologyValidatorJobsParameter;
  14906. SuperMap.OutputSetting = OutputSetting;
  14907. SuperMap.MappingParameters = MappingParameters;
  14908. SuperMap.GeoCodingParameter = GeoCodingParameter;
  14909. SuperMap.GeoDecodingParameter = GeoDecodingParameter;
  14910. SuperMap.Util = _objectSpread(_objectSpread({}, SuperMap.Util), Util_Util);
  14911. /***/ })
  14912. /******/ });
  14913. /************************************************************************/
  14914. /******/ // The module cache
  14915. /******/ var __webpack_module_cache__ = {};
  14916. /******/
  14917. /******/ // The require function
  14918. /******/ function __webpack_require__(moduleId) {
  14919. /******/ // Check if module is in cache
  14920. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  14921. /******/ if (cachedModule !== undefined) {
  14922. /******/ return cachedModule.exports;
  14923. /******/ }
  14924. /******/ // Create a new module (and put it into the cache)
  14925. /******/ var module = __webpack_module_cache__[moduleId] = {
  14926. /******/ // no module.id needed
  14927. /******/ // no module.loaded needed
  14928. /******/ exports: {}
  14929. /******/ };
  14930. /******/
  14931. /******/ // Execute the module function
  14932. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  14933. /******/
  14934. /******/ // Return the exports of the module
  14935. /******/ return module.exports;
  14936. /******/ }
  14937. /******/
  14938. /************************************************************************/
  14939. /******/ /* webpack/runtime/compat get default export */
  14940. /******/ !function() {
  14941. /******/ // getDefaultExport function for compatibility with non-harmony modules
  14942. /******/ __webpack_require__.n = function(module) {
  14943. /******/ var getter = module && module.__esModule ?
  14944. /******/ function() { return module['default']; } :
  14945. /******/ function() { return module; };
  14946. /******/ __webpack_require__.d(getter, { a: getter });
  14947. /******/ return getter;
  14948. /******/ };
  14949. /******/ }();
  14950. /******/
  14951. /******/ /* webpack/runtime/define property getters */
  14952. /******/ !function() {
  14953. /******/ // define getter functions for harmony exports
  14954. /******/ __webpack_require__.d = function(exports, definition) {
  14955. /******/ for(var key in definition) {
  14956. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  14957. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  14958. /******/ }
  14959. /******/ }
  14960. /******/ };
  14961. /******/ }();
  14962. /******/
  14963. /******/ /* webpack/runtime/global */
  14964. /******/ !function() {
  14965. /******/ __webpack_require__.g = (function() {
  14966. /******/ if (typeof globalThis === 'object') return globalThis;
  14967. /******/ try {
  14968. /******/ return this || new Function('return this')();
  14969. /******/ } catch (e) {
  14970. /******/ if (typeof window === 'object') return window;
  14971. /******/ }
  14972. /******/ })();
  14973. /******/ }();
  14974. /******/
  14975. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  14976. /******/ !function() {
  14977. /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
  14978. /******/ }();
  14979. /******/
  14980. /************************************************************************/
  14981. /******/
  14982. /******/ // startup
  14983. /******/ // Load entry module and return exports
  14984. /******/ // This entry module is referenced by other modules so it can't be inlined
  14985. /******/ __webpack_require__(6396);
  14986. /******/ __webpack_require__(3393);
  14987. /******/ var __webpack_exports__ = __webpack_require__(8212);
  14988. /******/
  14989. /******/ })()
  14990. ;